!function(t){var e={};function n(a){if(e[a])return e[a].exports;var r=e[a]={i:a,l:!1,exports:{}};return t[a].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.d=function(t,e,a){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(a,r,function(e){return t[e]}.bind(null,r));return a},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=16)}([function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function n(t,e){for(var n=0;n1&&void 0!==arguments[1])||arguments[1],n=A.createElement("script");return n.type="text/javascript",n.src=t,n.async=e,A.body.appendChild(n)},x=function(){function t(e){i()(this,t),this.pixels=e,this.parameters={sku:"",orderId:"",qty:"",revenue:"",ltv:""}}return u()(t,[{key:"dropPixel",value:function(t,e){var n=this.pixels[t]||[],a=this.parameters;e&&Object.keys(e).forEach((function(t){return a[t]=e[t],!1})),n.forEach((function(t){var e=t,n="img";return"string"!=typeof t&&(e=t[0],(n=t[1])||(n="img")),e=(e=(e=(e=(e=(e=e.replace(/\[\[SKU\]\]/g,a.sku)).replace(/\[\[ORDERID\]\]/g,a.orderId)).replace(/\[\[QTY\]\]/g,a.qty)).replace(/\[\[REVENUE\]\]/g,a.revenue)).replace(/\[\[LTV\]\]/g,a.ltv)).replace(/\[\[ITEMS\]\]/g,(a.items||[]).map((function(t){return t.id||""})).join(",")),"img"===n?E(e):"script"===n?_(e):"iframe"===n&&function(t){var e=A.createElement("iframe");return e.width=1,e.height=1,e.style.display="none",e.src=t,A.body.appendChild(e)}(e)}))}}]),t}(),k=window.auvars["".concat("322")].t,T=(window.auvars["".concat("322")].p,function(t){function e(){var t;return i()(this,e),(t=d()(this,h()(e).call(this))).brand=window.Shopify.shop,t}return w()(e,t),u()(e,[{key:"captureProduct",value:function(t){try{var e=window.ShopifyAnalytics.meta.selectedVariantId,n=window.ShopifyAnalytics.meta.product.variants[0];return t?n=window.ShopifyAnalytics.meta.product.variants.find((function(e){return e.public_title===t})):e&&(n=window.ShopifyAnalytics.meta.product.variants.find((function(t){return t.id.toString()===e.toString()}))),n||((n=window.ShopifyAnalytics.meta.product.variants[0]).id=window.ShopifyAnalytics.meta.product.id),{id:"".concat(n.id,"-").concat(k),name:n.name,price:parseInt(n.price,10)/100,brand:this.brand}}catch(t){return console.error(t),null}}},{key:"sendProductEvents",value:function(){var t=this,e=this.captureProduct();if(e){this.sendViewProductEventToGA(e),this.appendPageLoadPixelCheck("view");var n=document.querySelector('button[name="add"]')||document.querySelector("form#add-item-form button")||document.querySelector("button.shopify_add_to_cart")||document.querySelector('input[name="add"]')||document.querySelector(".ProductForm__AddToCart")||document.querySelector("#AddToCart")||document.querySelector('.product-add input[type="submit"]');n&&window.au.push({category:"ListenerAttacher",input:n,method:function(){t.sendAddProductEventToGA(e),window.au.push({category:"behavior",action:"purchase-intent"});var n={event:"addToCart",data:e};t.profilerServiceRequest(n)}})}}},{key:"captureCart",value:function(){try{for(var t=document.querySelector("#order-summary").querySelectorAll("tr.product"),e=[],n=0;n0)for(var o=function(e){var n=r[e],a=n.querySelector("button").dataset.cartAdd,o=n.querySelector('[class$="item__title"]').textContent;if(n.querySelector(".js-option-value")){var i=n.querySelector(".js-option-value").textContent.split(": ");o+=i[i.length-1]}var c={id:a,name:o,price:parseFloat(n.querySelector(".product-price__price").textContent.replace(/[^0-9.]/g,"")),brand:t.brand};window.au.push({category:"ListenerAttacher",input:n,method:function(){t.sendAddProductEventToGA(c);var e={event:"addToCart",data:c};window.au.push({category:"behavior",action:"purchase-intent"}),t.profilerServiceRequest(e)}})},i=0;i0)for(window.addEventListener("ProductMetaUpdated",(function(){t.sendProductEvents()})),i=0;i=e.decoratorTarget))return null;var a=I.querySelectorAll("meta"),o=["og:title","og:description","og:image","og:url","og:type","og:name","og:locale"];a.forEach((function(t){var e=t.getAttribute("property");o.includes(e)&&(n[e.replace("og:","")]=t.getAttribute("content")),"keywords"===t.getAttribute("name")&&(n.keywords=(t.getAttribute("content")||"").split(","))})),n.url||(n.url=e.u.href),n.title||(n.title=I.title),n=q({},n,{},t.decor_dict);var i=[].concat(r()(e.metatags),r()(t.tags));i=i.filter((function(t){return"string"==typeof t||t instanceof String})).map((function(t){return t.replace(/,/g,"")})),n.tags=i.join(),n.tagger_id=e.auvars.t,n.partner_id=e.auvars.p;var c=new XMLHttpRequest,u="".concat("https://p.ad.gt","/api/v1/dec");return c.open("POST",u,!0),c.setRequestHeader("Content-type","application/json"),c.send(JSON.stringify(n)),c})),b()(this,"setupGA",(function(){var t,n,a,r,o;L.ga||(n=I,a="script","ga",(t=L).GoogleAnalyticsObject="ga",t.ga=t.ga||function(){(t.ga.q=t.ga.q||[]).push(arguments)},t.ga.l=1*new Date,r=n.createElement(a),o=n.getElementsByTagName(a)[0],r.async=1,r.src="https://www.google-analytics.com/analytics.js",o.parentNode.insertBefore(r,o)),ga("create","UA-87198801-1","auto","auPassiveTagger"),ga("".concat("auPassiveTagger",".require"),"ecommerce"),ga("".concat("auPassiveTagger",".require"),"ec"),ga("".concat("auPassiveTagger",".set"),"anonymizeIp",!0),ga("".concat("auPassiveTagger",".set"),"dimension1",e.auvars.a),ga("".concat("auPassiveTagger",".set"),"dimension2","none"),ga("".concat("auPassiveTagger",".set"),"dimension3",e.auvars.p),ga("".concat("auPassiveTagger",".set"),"dimension4",e.u.hostname),ga("".concat("auPassiveTagger",".set"),"dimension5",e.u.pathname),ga("".concat("auPassiveTagger",".set"),"dimension6","Passive Tagger"),ga("".concat("auPassiveTagger",".set"),"dimension7",e.auvars.t),(e.randNum>=.85||["158"].includes(e.auvars.p.toString())&&e.randNum>=.7||["220"].includes(e.auvars.p.toString()))&&ga("".concat("auPassiveTagger",".send"),"pageview")})),b()(this,"ListenerIterator",(function(t,n){Array.prototype.forEach.call(I.querySelectorAll(t),(function(t){e.ListenerAttacher({input:t,method:n})}))})),b()(this,"ListenerAttacher",(function(t){var e=t.input,n=t.method;e.addEventListener?e.addEventListener("mousedown",n):e.attachEvent&&e.attachEvent("mousedown",n)})),b()(this,"GlobalListenerHandler",(function(t){e.GlobalHandlers[t.type].forEach((function(e){if(t.target.matches(e.selector))e.method(t);else for(var n=t.target,a=!1;n.parentElement&&!a;)(a=(n=n.parentElement).matches(e.selector))&&e.method(q({},t,{target:n}))}))})),b()(this,"GlobalListenerAttacher",(function(t,n,a){"string"==typeof t&&(t=[t]),t.forEach((function(t){e.GlobalHandlers[t]=e.GlobalHandlers[t]||[],e.GlobalHandlers[t].push({selector:n,method:a}),document.addEventListener?(document.removeEventListener(t,window.au.l),document.addEventListener(t,window.au.l)):document.attachEvent&&(document.detachEvent(t,window.au.l),document.attachEvent(t,window.au.l))}))})),b()(this,"sendOffsiteClick",(function(t){var n=t.url;E("".concat("https://a.ad.gt","/api/v1/off-site-click/").concat(e.auvars.p,"?tagger_id=").concat(e.auvars.t,"&url=").concat(n))})),b()(this,"clickHandler",(function(t){var n=t.currentTarget.getAttribute("href");null!==n&&e.include_internal_links.includes(window.location.hostname)&&window.au.push({category:"sendSPAPageView",url:n})})),b()(this,"sendUserBehaviour",(function(t){var n={click_url:t.action,tagger_id:e.auvars.t,audigent_id:e.auvars.a},a=new XMLHttpRequest,r="".concat("https://p.ad.gt","/api/v1/ubh");a.open("POST",r,!0),a.setRequestHeader("Content-type","application/json"),a.send(JSON.stringify(n))})),b()(this,"behavior",(function(t){var n=encodeURIComponent("".concat(e.u.protocol,"//").concat(e.u.hostname).concat(e.u.pathname,"__audigent-behavior-").concat(t.action).concat(e.u.search).concat(e.u.hash));e.sendOffsiteClick({url:n}),e.sendGAEvent({eventCategory:"audigent-behavior",eventAction:t.action,eventLabel:e.auvars.t})})),b()(this,"sendEvent",(function(t){var n=t.event,a=t.events;if(!(n=n||a))return null;var r={tagger_id:e.auvars.t,partner_id:e.auvars.p,audigent_id:e.auvars.a};r.events=Array.isArray(n)?n:[n];var o=new XMLHttpRequest,i="".concat("https://p.ad.gt","/api/v1/event");return o.open("POST",i,!0),o.setRequestHeader("Content-type","application/json"),o.send(JSON.stringify(r)),""})),b()(this,"sendGAEvent",(function(t){var e=t.eventCategory,n=t.eventAction,a=t.eventLabel,r=t.skipSQS;ga("".concat("auPassiveTagger",".send"),{hitType:"event",eventCategory:e,eventAction:n,eventLabel:a}),r||window.au.push({category:"sendEvent",event:{type:e,eventAction:n,eventLabel:a}})})),b()(this,"segCapture",(function(){var t=window.au_seg;if(((t||{}).segments||[]).length>0){var n={tagger_id:e.auvars.t,partner_id:e.auvars.p,audigent_id:e.auvars.a,segment_ids:t.segments.join("|")},a=new XMLHttpRequest,r="".concat("https://p.ad.gt","/api/v1/segs");a.open("POST",r,!0),a.setRequestHeader("Content-type","application/json"),a.send(JSON.stringify(n))}return""})),b()(this,"otpTrack",(function(){var t=window.au_seg;if(t&&t.segments){var n=t.segments.filter((function(t){return t.match(/AU_SEG_(AGE|GENDER)/gi)}));e.randNum>=.9&&(e.sendGAEvent({eventCategory:"otpTracker",eventAction:n.join("|"),eventLabel:e.u.hostname,skipSQS:!0}),e.segCapture())}if(e.randNum>=.99||["134"].includes(e.auvars.p.toString())&&e.randNum>=.7){var a=e.u.hostname,r=new XMLHttpRequest,o="".concat(e.auvars.p.toString(),"-").concat(e.auvars.a),i="".concat(e.auvars.p.toString(),"-").concat(e.auvars.y),c="".concat("https://seg.ad.gt","/api/v1/demo?au_id=").concat(o,"&tagger_id=").concat(i);r.open("get",c,!0),r.setRequestHeader("Content-type","application/json"),r.addEventListener("load",(function(){var t=JSON.parse(this.responseText).segments||[];t.length&&window.au.push({category:"sendGAEvent",eventCategory:"otpTester",eventAction:t.join("|"),eventLabel:a,skipSQS:!0})})),r.send()}})),b()(this,"pixels",(function(){var t="".concat("https://pixels.ad.gt","/api/v1/getpixels?tagger_id=").concat(e.auvars.t,"&url=").concat(encodeURIComponent(e.u.href),"&code='none'");_(t,!0)})),b()(this,"sendSPAPageView",(function(t){var n=t.url;if(n){n.startsWith("//")&&(n="http://"+n),!n.startsWith("/")&&n.includes("://")||(n=I.location.protocol+"//"+I.location.host+(n.startsWith("/")?"":"/")+n);try{var a=new URL(n);a.host===I.location.host&&(e.sendOffsiteClick(a.href),ga("".concat("auPassiveTagger",".send"),"pageview",a.pathname+a.hash))}catch(t){}}})),b()(this,"tags",(function(t){var n=(t.action||t.data||[]).map((function(t){return t.toUpperCase()}));n.length&&e.push({category:"writeDecoratorRecord",tags:n,decor_dict:{}})})),b()(this,"conversion",(function(t){console.log("Audigent Conversion Event - ".concat(t.action))})),b()(this,"pageView",(function(t){console.log("Audigent PageView Event - ".concat(t.action))})),b()(this,"beopEvent",(function(t){var n=t.partnerId||e.auvars.p;e.sendEvent({event:q({},t.data||{},{partner_id:n,type:"beop"})})})),b()(this,"trackEvent",(function(t){return!1})),b()(this,"DispatchEvent",(function(t){var e=function(t){if("function"==typeof window.CustomEvent)return new CustomEvent(t);var e=!1,n=!1,a=void 0,r=document.createEvent("CustomEvent");return r.initCustomEvent(t,e,n,a),r}(t.eventName);window.dispatchEvent(e)})),b()(this,"optout",(function(){E("".concat("https://ids.ad.gt","/api/v1/optout"))})),b()(this,"hpx",(function(t){var n=t.haloId;(e.auvars.hpx||[]).forEach((function(t){return E(t[1].replace(/{haloid}/gi,n).replace(/{auid}/gi,e.auvars.a))}))})),this.u=L.location,this.metatags=[],this.auvars=L.auvars["".concat("322")],this.randNum=Math.random(),this.docReady=this.docReady.bind(this),this.facebook=this.facebook.bind(this),this.GlobalHandlers={},this.decoratorTarget=.995,this.pixels(),this.facebook(),this.setupGA(),this.ListenerIterator("a",this.clickHandler),this.include_internal_links=[],L.addEventListener("hashchange",(function(){e.sendSPAPageView({url:e.u.href}),e.pixels()}))}return u()(t,[{key:"valueOf",value:function(){return null}},{key:"docReady",value:function(){if(window.Shopify){var t=new T;t.initialize(),window.addEventListener("aupixels",(function(){t.updatePixels()}))}this.DispatchEvent({eventName:"aufp"}),window.auvars.fp=!0,this.otpTrack()}},{key:"facebook",value:function(){return!["57","273","305","314"].includes(this.auvars.p)&&(t=window,e=document,n="script",t.fbq||(a=t.fbq=function(){a.callMethod?a.callMethod.apply(a,arguments):a.queue.push(arguments)},t._fbq||(t._fbq=a),a.push=a,a.loaded=!0,a.version="2.0",a.queue=[],(r=e.createElement(n)).async=!0,r.src="https://connect.facebook.net/en_US/fbevents.js",(o=e.getElementsByTagName(n)[0]).parentNode.insertBefore(r,o)),fbq("init","1853083501571805"),fbq("trackSingle","1853083501571805","PageView",{partner_id:this.auvars.p,tagger_id:this.auvars.t}),!0);var t,e,n,a,r,o}}]),t}());O=window,j="".concat("322"),R=O.au&&Array.isArray(O.au)?r()(O.au):[],O.auvars.autag_objs=[].concat(r()((O.auvars.autag_objs||[]).filter((function(t){return"autag"!==t}))),["autag"]),O.au={push:function(){for(var t=arguments.length,e=new Array(t),n=0;n