(function(w,d){zaraz.debug=(eB="")=>{document.cookie=`zarazDebug=${eB}; path=/`;location.reload()};window.zaraz._al=function(co,cp,cq){w.zaraz.listeners.push({item:co,type:cp,callback:cq});co.addEventListener(cp,cq)};zaraz.preview=(cR="")=>{document.cookie=`zarazPreview=${cR}; path=/`;location.reload()};zaraz.i=function(cu){const cv=d.createElement("div");cv.innerHTML=unescape(cu);const cw=cv.querySelectorAll("script");for(let cx=0;cxnew Promise((bV=>{if(bU){bU.e&&bU.e.forEach((bW=>{try{new Function(bW)()}catch(bX){console.error(`Error executing script: ${bW}\n`,bX)}}));Promise.allSettled((bU.f||[]).map((bY=>fetch(bY[0],bY[1]))))}bV()}));zaraz.pageVariables={};zaraz.track=async function(dn,dp,dq){return new Promise(((dr,ds)=>{const dt={name:dn,data:{}};for(const du of[localStorage,sessionStorage])Object.keys(du||{}).filter((dw=>dw.startsWith("_zaraz_"))).forEach((dv=>{try{dt.data[dv.slice(7)]=JSON.parse(du.getItem(dv))}catch{dt.data[dv.slice(7)]=du.getItem(dv)}}));Object.keys(zaraz.pageVariables).forEach((dx=>dt.data[dx]=JSON.parse(zaraz.pageVariables[dx]))); // dt.data={...dt.data,...dp};dt.zarazData=zarazData;fetch("/cdn-cgi/zaraz/t",{credentials:"include",keepalive:!0,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(dt)}).catch((()=>{console.warn("Large event payload sent to Cloudflare Zaraz, cannot assure deliverability.");return fetch("/cdn-cgi/zaraz/t",{credentials:"include",method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(dt)})})).then((function(dz){zarazData._let=(new Date).getTime();dz.ok||ds();return 204!==dz.status&&dz.json()})).then((async dy=>{await zaraz._p(dy);"function"==typeof dq&&dq()})).finally((()=>dr()))}))};zaraz.set=function(dA,dB,dC){try{dB=JSON.stringify(dB)}catch(dD){return}prefixedKey="_zaraz_"+dA;sessionStorage.removeItem(prefixedKey);localStorage.removeItem(prefixedKey);delete zaraz.pageVariables[dA];if(void 0!==dB){dC&&"session"==dC.scope?sessionStorage.setItem(prefixedKey,dB):dC&&"page"==dC.scope?zaraz.pageVariables[dA]=dB:localStorage.setItem(prefixedKey,dB);zaraz.__watchVar={key:dA,value:dB}}};for(const{m:dE,a:dF}of zarazData.q.filter((({m:dG})=>["debug","set"].includes(dG))))zaraz[dE](...dF);for(const{m:dH,a:dI}of zaraz.q)zaraz[dH](...dI);delete zaraz.q;delete zarazData.q;zaraz.fulfilTrigger=function(bJ,bK,bL,bM){zaraz.__zarazTriggerMap||(zaraz.__zarazTriggerMap={});zaraz.__zarazTriggerMap[bJ]||(zaraz.__zarazTriggerMap[bJ]="");zaraz.__zarazTriggerMap[bJ]+="*"+bK+"*";zaraz.track("__zarazEmpty",{...bL,__zarazClientTriggers:zaraz.__zarazTriggerMap[bJ]},bM)};window.dataLayer=w.dataLayer||[];zaraz._processDataLayer=eD=>{for(const eE of Object.entries(eD))zaraz.set(eE[0],eE[1],{scope:"page"});if(eD.event){if(zarazData.dataLayerIgnore&&zarazData.dataLayerIgnore.includes(eD.event))return;let eF={};for(let eG of dataLayer.slice(0,dataLayer.indexOf(eD)+1))eF={...eF,...eG};delete eF.event;eD.event.startsWith("gtm.")||zaraz.track(eD.event,eF)}};const eC=w.dataLayer.push;Object.defineProperty(w.dataLayer,"push",{configurable:!0,enumerable:!1,writable:!0,value:function(...eH){let eI=eC.apply(this,eH);zaraz._processDataLayer(eH[0]);return eI}});dataLayer.forEach((eJ=>zaraz._processDataLayer(eJ)));zaraz._cts=()=>{zaraz._timeouts?.forEach((bm=>clearTimeout(bm)));zaraz._timeouts=[]};zaraz._rl=function(){w.zaraz.listeners?.forEach((bn=>bn.item.removeEventListener(bn.type,bn.callback)));window.zaraz.listeners=[]};history.pushState=function(){try{zaraz._rl();zaraz._cts&&zaraz._cts()}finally{History.prototype.pushState.apply(history,arguments);setTimeout((()=>{zarazData.l=d.location.href;zarazData.t=d.title;zaraz.pageVariables={};zaraz.track("__zarazSPA")}),100)}};history.replaceState=function(){try{zaraz._rl();zaraz._cts&&zaraz._cts()}finally{History.prototype.replaceState.apply(history,arguments);setTimeout((()=>{zarazData.l=d.location.href;zarazData.t=d.title;zaraz.pageVariables={};zaraz.track("__zarazSPA")}),100)}};zaraz._p({"e":["(function(w,d){w.zarazData.executed.push(\"Pageview\");})(window,document)"]})})(window,document);