@elevateab/sdk 1.2.0 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,2 +1,41 @@
1
- "use strict";var M=Object.create;var p=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var I=Object.getOwnPropertyNames;var $=Object.getPrototypeOf,F=Object.prototype.hasOwnProperty;var S=(t,e)=>{for(var n in e)p(t,n,{get:e[n],enumerable:!0})},V=(t,e,n,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of I(e))!F.call(t,o)&&o!==n&&p(t,o,{get:()=>e[o],enumerable:!(a=A(e,o))||a.enumerable});return t};var C=(t,e,n)=>(n=t!=null?M($(t)):{},V(e||!t||!t.__esModule?p(n,"default",{value:t,enumerable:!0}):n,t)),j=t=>V(p({},"__esModule",{value:!0}),t);var W={};S(W,{DEFAULT_CONFIG:()=>U,ElevateProvider:()=>L,Experiment:()=>k,VERSION:()=>O,VariantDisplay:()=>w,assignVariant:()=>f,calculateRevenueLift:()=>y,generateExperimentId:()=>b,hashString:()=>x,useElevateConfig:()=>u,useExperiment:()=>B,validateConfig:()=>P});module.exports=j(W);function f(t,e){let n=t.reduce((i,r)=>i+r.weight,0),o=x(e)%n,s=0;for(let i of t)if(s+=i.weight,o<s)return i;return t[0]}function x(t){let e=0;for(let n=0;n<t.length;n++){let a=t.charCodeAt(n);e=(e<<5)-e+a,e=e&e}return Math.abs(e)}function P(t){return!t.testId||!t.name||!t.variations||t.variations.length===0?!1:t.variations.reduce((n,a)=>n+a.weight,0)===100}function b(t){let e=Date.now(),n=Math.random().toString(36).substring(2,9);return`exp-${t.toLowerCase().replace(/[^a-z0-9]/g,"-")}-${e}-${n}`}function y(t,e,n,a){let o=t/n,s=e/a,i=(s-o)/o*100,l=Math.sqrt((t+e)/(n+a))*Math.sqrt(1/n+1/a),v=Math.abs(s-o)/l,m=Math.min(99.9,v*34);return{lift:i,confidence:m}}function g(t){let e=[];for(let[n,a]of Object.entries(t.allTests)){if(!a.data.isLive)continue;let o=[];for(let[s,i]of Object.entries(a)){if(s==="data")continue;let r=i;typeof r=="object"&&r!==null&&"variationName"in r&&o.push({id:s,name:r.variationName,weight:r.trafficPercentage,isControl:r.isControl,productId:r.id,handle:r.handle,price:r.price})}o.length>0&&e.push({testId:n,name:a.data.name,enabled:a.data.isLive,type:a.data.type,variations:o})}return{tests:e,selectors:t.selectors}}var c=C(require("react"),1);var E=C(require("react"),1),h=E.default.createContext(null);function u(){let t=E.default.useContext(h);if(t===null)throw new Error("useElevateConfig must be used within ElevateProvider");return t}var T=c.default.createContext({assignedVariantId:null});function k({testId:t,userId:e,onVariantAssigned:n,children:a}){let{config:o}=u(),[s,i]=c.default.useState(null),r=c.default.useMemo(()=>o&&o.tests.find(l=>l.testId===t)||null,[o,t]);return c.default.useEffect(()=>{if(r&&r.enabled&&r.variations.length>0){let l=f(r.variations,e);i(l),n?.(l)}},[r,e,n]),!r||!r.enabled||!s?null:c.default.createElement(T.Provider,{value:{assignedVariantId:s.id}},c.default.createElement("div",{"data-experiment-id":r.testId,"data-variant-id":s.id},a))}function w({variantId:t,children:e}){let{assignedVariantId:n}=c.default.useContext(T);return n?n!==t?null:c.default.createElement(c.default.Fragment,null,e):c.default.createElement(c.default.Fragment,null,e)}function B(t,e){let{config:n}=u(),[a,o]=c.default.useState(null),[s,i]=c.default.useState(!0),r=c.default.useMemo(()=>n&&n.tests.find(l=>l.testId===t)||null,[n,t]);return c.default.useEffect(()=>{if(!r){console.error(`[ElevateAB] Test not found: ${t}`),i(!1);return}if(!r.enabled){console.error(`[ElevateAB] Test disabled: ${t}`),i(!1);return}let l=f(r.variations,e);o(l),i(!1)},[r,e,t]),{variant:a,isLoading:s}}var d=C(require("react"),1);var N={allTests:{"test-product-title-1":{data:{name:"Product Title Test",isLive:!0,type:"product-title",testTrafficPercentage:100},"variation-control":{variationName:"Control",trafficPercentage:50,isControl:!0},"variation-test":{variationName:"Test Variation",trafficPercentage:50}},"test-price-display-1":{data:{name:"Price Display Test",isLive:!0,type:"price-display",testTrafficPercentage:100},"variation-a":{variationName:"Standard Price",trafficPercentage:50,isControl:!0},"variation-b":{variationName:"Savings Highlight",trafficPercentage:50}}},selectors:{selectorsV2:[]}},D=!0;function L({storeId:t,children:e}){let[n,a]=d.default.useState(null);d.default.useEffect(()=>{async function s(){try{let i=`https://configs.elevateab.com/config/${t}.json`,r=await fetch(i);if(r.status===404){if(D)a({tests:[],selectors:void 0});else{console.warn("[ElevateAB] CDN config not found. Using fallback config for development.");let m=g(N);a(m)}return}if(!r.ok)throw new Error(`Failed to fetch config: ${r.status} ${r.statusText}`);let l=await r.json(),v=g(l);a(v)}catch(i){if(console.error("[ElevateAB] Failed to load config:",i),D)a({tests:[],selectors:void 0});else{console.warn("[ElevateAB] Using fallback config for development due to CDN error.");let r=g(N);a(r)}}}s()},[t]);let o=d.default.useMemo(()=>({config:n}),[n]);return d.default.createElement(h.Provider,{value:o},e)}var O="1.1.0",U={enabled:!0,trackingEndpoint:"https://analytics.elevateab.com/track",cacheDuration:3600};0&&(module.exports={DEFAULT_CONFIG,ElevateProvider,Experiment,VERSION,VariantDisplay,assignVariant,calculateRevenueLift,generateExperimentId,hashString,useElevateConfig,useExperiment,validateConfig});
1
+ "use strict";var Nr=Object.create;var He=Object.defineProperty;var Fr=Object.getOwnPropertyDescriptor;var zr=Object.getOwnPropertyNames;var Mr=Object.getPrototypeOf,qr=Object.prototype.hasOwnProperty;var Be=(e,t)=>()=>(e&&(t=e(e=0)),t);var jr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),$t=(e,t)=>{for(var r in t)He(e,r,{get:t[r],enumerable:!0})},Gt=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of zr(t))!qr.call(e,i)&&i!==r&&He(e,i,{get:()=>t[i],enumerable:!(s=Fr(t,i))||s.enumerable});return e};var Je=(e,t,r)=>(r=e!=null?Nr(Mr(e)):{},Gt(t||!e||!e.__esModule?He(r,"default",{value:e,enumerable:!0}):r,e)),$r=e=>Gt(He({},"__esModule",{value:!0}),e);function Wt(e,t){let r=e.reduce((d,m)=>d+m.weight,0),i=Ve(t)%r,f=0;for(let d of e)if(f+=d.weight,i<f)return d;return e[0]}function Ve(e){let t=0;for(let r=0;r<e.length;r++){let s=e.charCodeAt(r);t=(t<<5)-t+s,t=t&t}return Math.abs(t)}function Ht(e){return!e.testId||!e.name||!e.variations||e.variations.length===0?!1:e.variations.reduce((r,s)=>r+s.weight,0)===100}function Jt(e){let t=Date.now(),r=Math.random().toString(36).substring(2,9);return`exp-${e.toLowerCase().replace(/[^a-z0-9]/g,"-")}-${t}-${r}`}function Yt(e,t,r,s){let i=e/r,f=t/s,d=(f-i)/i*100,l=Math.sqrt((e+t)/(r+s))*Math.sqrt(1/r+1/s),w=Math.abs(f-i)/l,o=Math.min(99.9,w*34);return{lift:d,confidence:o}}function mt(e){let t=[];for(let[r,s]of Object.entries(e.allTests)){if(!s.data.isLive)continue;let i=[],f=0;for(let[d,m]of Object.entries(s)){if(d==="data")continue;let l=m;if(typeof l=="object"&&l!==null&&"variationName"in l){let w=!!l.isControl;i.push({id:d,name:l.variationName,weight:l.trafficPercentage,isControl:w,productId:l.id,handle:l.handle,price:l.price,isA:!w&&f===0,isB:!w&&f===1,isC:!w&&f===2,isD:!w&&f===3}),w||f++}}i.length>0&&t.push({testId:r,name:s.data.name,enabled:s.data.isLive,type:s.data.type,variations:i})}return{tests:t,selectors:e.selectors}}var Ye=Be(()=>{"use strict"});function ae(){try{if(typeof window<"u"&&window.crypto&&window.crypto.getRandomValues){let e=new Uint8Array(16);window.crypto.getRandomValues(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128;let t=Array.from(e).map(r=>r.toString(16).padStart(2,"0"));return[t.slice(0,4).join(""),t.slice(4,6).join(""),t.slice(6,8).join(""),t.slice(8,10).join(""),t.slice(10,16).join("")].join("-")}}catch(e){console.warn("[ElevateAB] Crypto UUID generation failed, falling back to Math.random()",e)}return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}function j(e,t){if(typeof document>"u")return;let r=new Date;r.setTime(r.getTime()+365*24*60*60*1e3);let s="; expires="+r.toUTCString();document.cookie=e+"="+(t||"")+s+"; path=/"}function L(e){if(typeof document>"u")return null;let t=e+"=",r=document.cookie.split(";");for(let s=0;s<r.length;s++){let i=r[s];for(;i.charAt(0)===" ";)i=i.substring(1,i.length);if(i.indexOf(t)===0)return i.substring(t.length,i.length)}return null}function F(e){let t=L(e);if(t)try{return JSON.parse(t)}catch(r){return console.error("[ElevateAB] Error parsing JSON from cookie",r),null}return null}function Qt(e){typeof document>"u"||(document.cookie=e+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")}function re(e,t){typeof sessionStorage>"u"||sessionStorage.setItem(e,JSON.stringify(t))}function Y(e){return typeof sessionStorage>"u"?null:sessionStorage.getItem(e)}function De(e){let t=Y(e);return t?JSON.parse(t):null}function gt(){let e=L("eabUserId");return e||(e=ae(),j("eabUserId",e)),e}function oe(){return gt()}function bt(){let e=Y("eabSessionId");return e||(e=ae(),re("eabSessionId",e)),e}function be(){return bt()}function Qe(e,t){if(typeof sessionStorage>"u")return;let r=Y("eabReferrer"),s=Y("eabEntry");r||re("eabReferrer",e),s||re("eabEntry",t)}function _e(){return{referrer:Y("eabReferrer")||"",entryPage:Y("eabEntry")||""}}var W=Be(()=>{"use strict"});function ke(){return F("ABTL")||{}}function wt(e){j("ABTL",JSON.stringify(e))}function Ke(e){return ke()[e]||null}function Kt(e,t){if(e[t]?.isControl)return-1;let s=0;for(let i=0;i<t;i++)e[i]?.isControl||s++;return s}function Gr(e,t){let r=e.every(o=>typeof o.weight=="number"),s=[],i=0;if(r)for(let o of e)i+=o.weight,s.push(i);else{let o=100/e.length;for(let c=0;c<e.length;c++)i+=o,s.push(i)}let d=Ve(t)%1e4/100,m=0;for(let o=0;o<s.length;o++)if(d<s[o]){m=o;break}let l=e[m]||e[0],w=Kt(e,m);return{...l,isA:w===0,isB:w===1,isC:w===2,isD:w===3}}function Xe(e,t,r){let s=Ke(e);if(s){let l=t.variations.findIndex(w=>w.id===s);if(l!==-1){let w=t.variations[l],o=Kt(t.variations,l);return{...w,isA:o===0,isB:o===1,isC:o===2,isD:o===3}}}let i=t.variations.filter(l=>!l.isDone);if(i.length===0)return null;let f=t.isPersonalization,d;f?d=i.find(w=>!w.isControl)||i[0]:d=Gr(i,r);let m=ke();return m[e]=d.id,wt(m),d}function Ze(e){let t=e.testTrafficPercentage;return typeof t!="number"||Ke(e.testId)?!0:Math.random()*100<t}var et=Be(()=>{"use strict";W();Ye()});var gr=jr((Fe,it)=>{"use strict";(function(e,t){"use strict";var r="1.0.41",s="",i="?",f="function",d="undefined",m="object",l="string",w="major",o="model",c="name",n="type",a="vendor",u="version",k="architecture",x="console",g="mobile",h="tablet",E="smarttv",B="wearable",X="embedded",Se=500,ye="Amazon",ne="Apple",$e="ASUS",p="BlackBerry",b="Browser",S="Chrome",R="Edge",O="Firefox",z="Google",$="Honor",I="Huawei",V="Lenovo",G="LG",me="Microsoft",Z="Motorola",ee="Nvidia",ie="OnePlus",ge="Opera",ut="OPPO",Ie="Samsung",Bt="Sharp",Ue="Sony",dt="Xiaomi",lt="Zebra",Vt="Facebook",Dt="Chromium OS",Nt="Mac OS",Ft=" Browser",Br=function(P,A){var _={};for(var U in P)A[U]&&A[U].length%2===0?_[U]=A[U].concat(P[U]):_[U]=P[U];return _},Ge=function(P){for(var A={},_=0;_<P.length;_++)A[P[_].toUpperCase()]=P[_];return A},zt=function(P,A){return typeof P===l?Re(A).indexOf(Re(P))!==-1:!1},Re=function(P){return P.toLowerCase()},Vr=function(P){return typeof P===l?P.replace(/[^\d\.]/g,s).split(".")[0]:t},ft=function(P,A){if(typeof P===l)return P=P.replace(/^\s\s*/,s),typeof A===d?P:P.substring(0,Se)},Oe=function(P,A){for(var _=0,U,te,H,C,y,J;_<A.length&&!y;){var pt=A[_],jt=A[_+1];for(U=te=0;U<pt.length&&!y&&pt[U];)if(y=pt[U++].exec(P),y)for(H=0;H<jt.length;H++)J=y[++te],C=jt[H],typeof C===m&&C.length>0?C.length===2?typeof C[1]==f?this[C[0]]=C[1].call(this,J):this[C[0]]=C[1]:C.length===3?typeof C[1]===f&&!(C[1].exec&&C[1].test)?this[C[0]]=J?C[1].call(this,J,C[2]):t:this[C[0]]=J?J.replace(C[1],C[2]):t:C.length===4&&(this[C[0]]=J?C[3].call(this,J.replace(C[1],C[2])):t):this[C]=J||t;_+=2}},Le=function(P,A){for(var _ in A)if(typeof A[_]===m&&A[_].length>0){for(var U=0;U<A[_].length;U++)if(zt(A[_][U],P))return _===i?t:_}else if(zt(A[_],P))return _===i?t:_;return A.hasOwnProperty("*")?A["*"]:P},Dr={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},Mt={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},qt={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[u,[c,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[u,[c,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[c,u],[/opios[\/ ]+([\w\.]+)/i],[u,[c,ge+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[u,[c,ge+" GX"]],[/\bopr\/([\w\.]+)/i],[u,[c,ge]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[u,[c,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[u,[c,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[c,u],[/quark(?:pc)?\/([-\w\.]+)/i],[u,[c,"Quark"]],[/\bddg\/([\w\.]+)/i],[u,[c,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[u,[c,"UC"+b]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[u,[c,"WeChat"]],[/konqueror\/([\w\.]+)/i],[u,[c,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[u,[c,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[u,[c,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[u,[c,"Smart Lenovo "+b]],[/(avast|avg)\/([\w\.]+)/i],[[c,/(.+)/,"$1 Secure "+b],u],[/\bfocus\/([\w\.]+)/i],[u,[c,O+" Focus"]],[/\bopt\/([\w\.]+)/i],[u,[c,ge+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[u,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[u,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[u,[c,ge+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[u,[c,"MIUI"+Ft]],[/fxios\/([\w\.-]+)/i],[u,[c,O]],[/\bqihoobrowser\/?([\w\.]*)/i],[u,[c,"360"]],[/\b(qq)\/([\w\.]+)/i],[[c,/(.+)/,"$1Browser"],u],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1"+Ft],u],[/samsungbrowser\/([\w\.]+)/i],[u,[c,Ie+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[u,[c,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[c,"Sogou Mobile"],u],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[c,u],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[c],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[u,c],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[c,Vt],u],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[c,u],[/\bgsa\/([\w\.]+) .*safari\//i],[u,[c,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[u,[c,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[u,[c,S+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,S+" WebView"],u],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[u,[c,"Android "+b]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[c,u],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[u,[c,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[u,c],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[c,[u,Le,Dr]],[/(webkit|khtml)\/([\w\.]+)/i],[c,u],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[c,"Netscape"],u],[/(wolvic|librewolf)\/([\w\.]+)/i],[c,u],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[u,[c,O+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[c,[u,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[c,[u,/master.|lts./,""]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[k,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[k,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[k,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[k,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[k,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[k,/ower/,s,Re]],[/ sun4\w[;\)]/i],[[k,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[k,Re]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[o,[a,Ie],[n,h]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[o,[a,Ie],[n,g]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[o,[a,ne],[n,g]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[o,[a,ne],[n,h]],[/(macintosh);/i],[o,[a,ne]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[o,[a,Bt],[n,g]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[o,[a,$],[n,h]],[/honor([-\w ]+)[;\)]/i],[o,[a,$],[n,g]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[o,[a,I],[n,h]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[o,[a,I],[n,g]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[o,/_/g," "],[a,dt],[n,h]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[o,/_/g," "],[a,dt],[n,g]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[o,[a,ut],[n,g]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[o,[a,Le,{OnePlus:["304","403","203"],"*":ut}],[n,h]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[o,[a,"Vivo"],[n,g]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[o,[a,"Realme"],[n,g]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[o,[a,Z],[n,g]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[o,[a,Z],[n,h]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[o,[a,G],[n,h]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[o,[a,G],[n,g]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[o,[a,V],[n,h]],[/(nokia) (t[12][01])/i],[a,o,[n,h]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[o,/_/g," "],[n,g],[a,"Nokia"]],[/(pixel (c|tablet))\b/i],[o,[a,z],[n,h]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[o,[a,z],[n,g]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[o,[a,Ue],[n,g]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[o,"Xperia Tablet"],[a,Ue],[n,h]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[o,[a,ie],[n,g]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[o,[a,ye],[n,h]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[o,/(.+)/g,"Fire Phone $1"],[a,ye],[n,g]],[/(playbook);[-\w\),; ]+(rim)/i],[o,a,[n,h]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[o,[a,p],[n,g]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[o,[a,$e],[n,h]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[o,[a,$e],[n,g]],[/(nexus 9)/i],[o,[a,"HTC"],[n,h]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[a,[o,/_/g," "],[n,g]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[o,[a,"TCL"],[n,h]],[/(itel) ((\w+))/i],[[a,Re],o,[n,Le,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[o,[a,"Acer"],[n,h]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[o,[a,"Meizu"],[n,g]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[o,[a,"Ulefone"],[n,g]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[o,[a,"Energizer"],[n,g]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[o,[a,"Cat"],[n,g]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[o,[a,"Smartfren"],[n,g]],[/droid.+; (a(?:015|06[35]|142p?))/i],[o,[a,"Nothing"],[n,g]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[o,[a,"Archos"],[n,h]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[o,[a,"Archos"],[n,g]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[a,o,[n,h]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (hmd|imo) ([\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[a,o,[n,g]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[a,o,[n,h]],[/(surface duo)/i],[o,[a,me],[n,h]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[o,[a,"Fairphone"],[n,g]],[/(u304aa)/i],[o,[a,"AT&T"],[n,g]],[/\bsie-(\w*)/i],[o,[a,"Siemens"],[n,g]],[/\b(rct\w+) b/i],[o,[a,"RCA"],[n,h]],[/\b(venue[\d ]{2,7}) b/i],[o,[a,"Dell"],[n,h]],[/\b(q(?:mv|ta)\w+) b/i],[o,[a,"Verizon"],[n,h]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[o,[a,"Barnes & Noble"],[n,h]],[/\b(tm\d{3}\w+) b/i],[o,[a,"NuVision"],[n,h]],[/\b(k88) b/i],[o,[a,"ZTE"],[n,h]],[/\b(nx\d{3}j) b/i],[o,[a,"ZTE"],[n,g]],[/\b(gen\d{3}) b.+49h/i],[o,[a,"Swiss"],[n,g]],[/\b(zur\d{3}) b/i],[o,[a,"Swiss"],[n,h]],[/\b((zeki)?tb.*\b) b/i],[o,[a,"Zeki"],[n,h]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[a,"Dragon Touch"],o,[n,h]],[/\b(ns-?\w{0,9}) b/i],[o,[a,"Insignia"],[n,h]],[/\b((nxa|next)-?\w{0,9}) b/i],[o,[a,"NextBook"],[n,h]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[a,"Voice"],o,[n,g]],[/\b(lvtel\-)?(v1[12]) b/i],[[a,"LvTel"],o,[n,g]],[/\b(ph-1) /i],[o,[a,"Essential"],[n,g]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[o,[a,"Envizen"],[n,h]],[/\b(trio[-\w\. ]+) b/i],[o,[a,"MachSpeed"],[n,h]],[/\btu_(1491) b/i],[o,[a,"Rotor"],[n,h]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[o,[a,ee],[n,h]],[/(sprint) (\w+)/i],[a,o,[n,g]],[/(kin\.[onetw]{3})/i],[[o,/\./g," "],[a,me],[n,g]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[o,[a,lt],[n,h]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[o,[a,lt],[n,g]],[/smart-tv.+(samsung)/i],[a,[n,E]],[/hbbtv.+maple;(\d+)/i],[[o,/^/,"SmartTV"],[a,Ie],[n,E]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[a,G],[n,E]],[/(apple) ?tv/i],[a,[o,ne+" TV"],[n,E]],[/crkey/i],[[o,S+"cast"],[a,z],[n,E]],[/droid.+aft(\w+)( bui|\))/i],[o,[a,ye],[n,E]],[/(shield \w+ tv)/i],[o,[a,ee],[n,E]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[o,[a,Bt],[n,E]],[/(bravia[\w ]+)( bui|\))/i],[o,[a,Ue],[n,E]],[/(mi(tv|box)-?\w+) bui/i],[o,[a,dt],[n,E]],[/Hbbtv.*(technisat) (.*);/i],[a,o,[n,E]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[a,ft],[o,ft],[n,E]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[o,[n,E]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[n,E]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[a,o,[n,x]],[/droid.+; (shield)( bui|\))/i],[o,[a,ee],[n,x]],[/(playstation \w+)/i],[o,[a,Ue],[n,x]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[o,[a,me],[n,x]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[o,[a,Ie],[n,B]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[a,o,[n,B]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[o,[a,ut],[n,B]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[o,[a,ne],[n,B]],[/(opwwe\d{3})/i],[o,[a,ie],[n,B]],[/(moto 360)/i],[o,[a,Z],[n,B]],[/(smartwatch 3)/i],[o,[a,Ue],[n,B]],[/(g watch r)/i],[o,[a,G],[n,B]],[/droid.+; (wt63?0{2,3})\)/i],[o,[a,lt],[n,B]],[/droid.+; (glass) \d/i],[o,[a,z],[n,B]],[/(pico) (4|neo3(?: link|pro)?)/i],[a,o,[n,B]],[/; (quest( \d| pro)?)/i],[o,[a,Vt],[n,B]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[a,[n,X]],[/(aeobc)\b/i],[o,[a,ye],[n,X]],[/(homepod).+mac os/i],[o,[a,ne],[n,X]],[/windows iot/i],[[n,X]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[o,[n,g]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[o,[n,h]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[n,h]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[n,g]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[o,[a,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[u,[c,R+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[c,u],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[u,[c,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[c,u],[/ladybird\//i],[[c,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[u,c]],os:[[/microsoft (windows) (vista|xp)/i],[c,u],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[c,[u,Le,Mt]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[u,Le,Mt],[c,"Windows"]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[u,/_/g,"."],[c,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[c,Nt],[u,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[u,c],[/(ubuntu) ([\w\.]+) like android/i],[[c,/(.+)/,"$1 Touch"],u],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[c,u],[/\(bb(10);/i],[u,[c,p]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[u,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[u,[c,O+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[u,[c,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[u,[c,"watchOS"]],[/crkey\/([\d\.]+)/i],[u,[c,S+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[c,Dt],u],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[c,u],[/(sunos) ?([\w\.\d]*)/i],[[c,"Solaris"],u],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[c,u]]},q=function(P,A){if(typeof P===m&&(A=P,P=t),!(this instanceof q))return new q(P,A).getResult();var _=typeof e!==d&&e.navigator?e.navigator:t,U=P||(_&&_.userAgent?_.userAgent:s),te=_&&_.userAgentData?_.userAgentData:t,H=A?Br(qt,A):qt,C=_&&_.userAgent==U;return this.getBrowser=function(){var y={};return y[c]=t,y[u]=t,Oe.call(y,U,H.browser),y[w]=Vr(y[u]),C&&_&&_.brave&&typeof _.brave.isBrave==f&&(y[c]="Brave"),y},this.getCPU=function(){var y={};return y[k]=t,Oe.call(y,U,H.cpu),y},this.getDevice=function(){var y={};return y[a]=t,y[o]=t,y[n]=t,Oe.call(y,U,H.device),C&&!y[n]&&te&&te.mobile&&(y[n]=g),C&&y[o]=="Macintosh"&&_&&typeof _.standalone!==d&&_.maxTouchPoints&&_.maxTouchPoints>2&&(y[o]="iPad",y[n]=h),y},this.getEngine=function(){var y={};return y[c]=t,y[u]=t,Oe.call(y,U,H.engine),y},this.getOS=function(){var y={};return y[c]=t,y[u]=t,Oe.call(y,U,H.os),C&&!y[c]&&te&&te.platform&&te.platform!="Unknown"&&(y[c]=te.platform.replace(/chrome os/i,Dt).replace(/macos/i,Nt)),y},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return U},this.setUA=function(y){return U=typeof y===l&&y.length>Se?ft(y,Se):y,this},this.setUA(U),this};q.VERSION=r,q.BROWSER=Ge([c,u,w]),q.CPU=Ge([k]),q.DEVICE=Ge([o,a,n,x,g,E,h,B,X]),q.ENGINE=q.OS=Ge([c,u]),typeof Fe!==d?(typeof it!==d&&it.exports&&(Fe=it.exports=q),Fe.UAParser=q):typeof define===f&&define.amd?define(function(){return q}):typeof e!==d&&(e.UAParser=q);var ve=typeof e!==d&&(e.jQuery||e.Zepto);if(ve&&!ve.ua){var We=new q;ve.ua=We.getResult(),ve.ua.get=function(){return We.getUA()},ve.ua.set=function(P){We.setUA(P);var A=We.getResult();for(var _ in A)ve.ua[_]=A[_]}}})(typeof window=="object"?window:Fe)});var ze,Ut=Be(()=>{"use strict";ze=`#graphql
2
+ mutation cartAttributesUpdate($cartId: ID!, $attributes: [AttributeInput!]!) {
3
+ cartAttributesUpdate(cartId: $cartId, attributes: $attributes) {
4
+ cart {
5
+ id
6
+ attributes {
7
+ key
8
+ value
9
+ }
10
+ }
11
+ userErrors {
12
+ field
13
+ message
14
+ }
15
+ }
16
+ }
17
+ `});var xr={};$t(xr,{cleanupCartAttributes:()=>Rt,getCartAttributesPayload:()=>at,updateCartAttributes:()=>Me});function at(){let e=ke(),t=F("ABAU")||{},r=L("eabUserId"),s=L("eabUserPreview")==="true",i=L("abtid"),f={};for(let m in e)t[m]&&(f[m]=e[m]);let d=[{key:"_eabTestsList",value:JSON.stringify(f)},{key:"_eabUserId",value:r||""},{key:"_eabList",value:JSON.stringify(e)}];return s&&i&&d.push({key:"_eabPreviewTest",value:i}),d}async function Me(e,t={}){if(typeof window>"u")return{success:!1,error:"Not in browser environment"};if(!t.storefrontAccessToken&&!t.storefrontApiUrl)return console.warn("[ElevateAB] Missing storefrontAccessToken. For Next.js/non-Hydrogen stores, you must provide a Storefront Access Token. This token is SAFE to use client-side - it's a public token with limited permissions. Get it from: Shopify Admin \u2192 Settings \u2192 Apps \u2192 Develop apps"),{success:!1,error:"Missing storefrontAccessToken. Required for direct Storefront API calls."};try{let r=at(),s=e.startsWith("gid://")?e:`gid://shopify/Cart/${e}`,i=t.storefrontApiUrl||`https://${kr()}/api/2025-01/graphql.json`,f=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json","X-Shopify-Storefront-Access-Token":t.storefrontAccessToken},body:JSON.stringify({query:ze,variables:{cartId:s,attributes:r}})});if(!f.ok)throw new Error(`HTTP error! status: ${f.status}`);let d=await f.json();if(d.errors||d.data?.cartAttributesUpdate?.userErrors?.length>0){let m=d.errors?.[0]?.message||d.data?.cartAttributesUpdate?.userErrors?.[0]?.message||"Unknown error";return console.error("[ElevateAB] Cart attributes update failed:",m),{success:!1,error:m}}return{success:!0}}catch(r){return console.error("[ElevateAB] Error updating cart attributes:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error"}}}async function Rt(e,t={}){if(typeof window>"u")return{success:!1,error:"Not in browser environment"};if(!t.storefrontAccessToken&&!t.storefrontApiUrl)return{success:!1,error:"Missing storefrontAccessToken. Required for direct Storefront API calls."};try{let r=e.startsWith("gid://")?e:`gid://shopify/Cart/${e}`,s=[{key:"_eabTestsList",value:""},{key:"_eabUserId",value:""},{key:"_eabList",value:""},{key:"_eabPreviewTest",value:""}],i=t.storefrontApiUrl||`https://${kr()}/api/2025-01/graphql.json`,f=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json","X-Shopify-Storefront-Access-Token":t.storefrontAccessToken},body:JSON.stringify({query:ze,variables:{cartId:r,attributes:s}})});if(!f.ok)throw new Error(`HTTP error! status: ${f.status}`);let d=await f.json();if(d.errors||d.data?.cartAttributesUpdate?.userErrors?.length>0){let m=d.errors?.[0]?.message||d.data?.cartAttributesUpdate?.userErrors?.[0]?.message||"Unknown error";return console.error("[ElevateAB] Cart attributes cleanup failed:",m),{success:!1,error:m}}return{success:!0}}catch(r){return console.error("[ElevateAB] Error cleaning up cart attributes:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error"}}}function kr(){return typeof window>"u"?"":window.location.hostname}var st=Be(()=>{"use strict";et();W();Ut()});var mo={};$t(mo,{CART_ATTRIBUTES_UPDATE_MUTATION:()=>ze,COUNTRIES:()=>dr,DEFAULT_CONFIG:()=>po,ElevateAnalytics:()=>Lr,ElevateProvider:()=>Or,REGIONS:()=>lr,VERSION:()=>fo,assignAndPersistVariant:()=>Xe,assignVariant:()=>Wt,buildEabTestsParam:()=>Pt,calculateRevenueLift:()=>Yt,checkFacebookBrowser:()=>vt,checkFacebookInstagramBrowser:()=>wr,checkInstagramBrowser:()=>_t,checkPinterestBrowser:()=>xt,checkTikTokBrowser:()=>kt,checkVisitorIdParams:()=>hr,cleanCartToken:()=>Pe,cleanupCartAttributes:()=>Rt,cleanupFlickerPrevention:()=>fr,clearPreviewMode:()=>ir,deleteCookie:()=>Qt,detectShopifyCurrency:()=>_r,extractCartToken:()=>xe,extractProductId:()=>K,extractProductVariantId:()=>ue,extractShopifyId:()=>M,extractShopifyType:()=>yr,generateExperimentId:()=>Jt,getAssignedVariant:()=>Ke,getCartAttributesPayload:()=>at,getCookie:()=>L,getCountryCode:()=>ce,getDeviceType:()=>er,getFlickerPreventionScript:()=>mr,getGeoLocation:()=>sr,getJsonCookie:()=>F,getJsonSessionItem:()=>De,getPageTypeFromPathname:()=>Ae,getPreviewState:()=>Ne,getPreviewVariation:()=>or,getReferrerData:()=>_e,getSessionId:()=>be,getSessionItem:()=>Y,getTestList:()=>ke,getTrafficSource:()=>tr,getUserAgentNoBrowser:()=>Ce,getVisitorId:()=>oe,hasSessionView:()=>Xt,hasUniqueView:()=>Zt,hashString:()=>Ve,hideForFlicker:()=>St,initAnalytics:()=>qe,initializeSessionId:()=>bt,initializeVisitorId:()=>gt,injectFlickerStyles:()=>Et,isCountryExcluded:()=>Ct,isCountryIncluded:()=>At,isFlickerPreventionActive:()=>pr,isInPreviewMode:()=>ar,isPreviewTest:()=>rr,isShopifyGid:()=>vr,matchesGeoTargeting:()=>ur,parseAddViewData:()=>Te,revealAfterFlicker:()=>ot,roundToTwo:()=>v,sanitizeString:()=>T,saveTestList:()=>wt,setCookie:()=>j,setCountryCode:()=>Tt,setGeoLocation:()=>cr,setReferrerData:()=>Qe,setSessionItem:()=>re,setupFlickerPrevention:()=>nt,shouldShowTest:()=>Ze,trackAddToCart:()=>Tr,trackCartView:()=>Cr,trackCheckoutCompleted:()=>Ir,trackCheckoutStarted:()=>Sr,trackPageView:()=>Ot,trackProductView:()=>Pr,trackRemoveFromCart:()=>Ar,trackSearchSubmitted:()=>Er,trackSessionView:()=>yt,trackUniqueView:()=>ht,trackViews:()=>tt,updateCartAttributes:()=>Me,updateUrlWithTestParams:()=>nr,useElevateConfig:()=>ct,useExperiment:()=>Rr,usePageViewTracking:()=>Ur,uuidv4:()=>ae,validateConfig:()=>Ht});module.exports=$r(mo);Ye();W();et();W();function ht(e){let t=F("ABAU")||{};t[e]||(t[e]=!0,j("ABAU",JSON.stringify(t)))}function yt(e){let t=De("ABAV")||{};t[e]||(t[e]=!0,re("ABAV",t))}function tt(e){ht(e),yt(e)}function Xt(e){return!!(De("ABAV")||{})[e]}function Zt(e){return!!(F("ABAU")||{})[e]}function er(){if(typeof navigator>"u")return"desktop";let e=navigator.userAgent||navigator.vendor||window.opera||"",t=e.toLowerCase();return/windows nt.*tablet pc|pixelbook/i.test(e)||/(?:macintosh|windows nt|win(?:95|98)|linux x86_64)/i.test(e)&&!/android|mobile|tablet|ipad|iphone|ipod/i.test(t)?"desktop":/ipad|playbook|tablet|kindle|nexus (7|10)|xoom|sm-t\d+|galaxy tab|tb-\d+|tb\d+[a-z]+|lenovo.*tb|dtab|ideatab|mediapad|matepad|honor.*pad|pad\s+\d+|mi\s+pad|redmi.*pad|xiaomi.*pad|oppo.*pad|oneplus.*pad|opd\d+|tcl.*tab|9\d{3}[a-z]|kobo|archos.*5(?!\d)|ereader|droipad/i.test(e)||/android(?!.*mobile)/i.test(t)&&!/dalvik.*miui|pocophone|mi\s+mix|edge\s+\d+|sm-g9\d+|pixel\s+\d|pixel\s+fold|advan\s+\d{4}/i.test(e)?"tablet":/android.+mobile|iphone|ipod|windows phone|blackberry|mobile|phone|kaios/i.test(t)||/^mobile;/i.test(e)||/dalvik.*miui|pocophone|mi\s+mix|pixel\s+\d|pixel\s+fold/i.test(e)?"mobile":"desktop"}function vt(){if(typeof navigator>"u")return!1;let e=navigator.userAgent||navigator.vendor||window.opera;return/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i.test(e)}function _t(){if(typeof navigator>"u")return!1;let e=navigator.userAgent||navigator.vendor||window.opera;return/(instagram)[\/ ]([-\w\.]+)/i.test(e)}function kt(){if(typeof navigator>"u")return!1;let e=navigator.userAgent||navigator.vendor||window.opera;return/musical_ly/i.test(e)}function xt(){if(typeof navigator>"u")return!1;let e=navigator.userAgent||navigator.vendor||window.opera;return/(pinterest)[\/ ]([-\w\.]+)/i.test(e)}function tr(){if(typeof window>"u")return"direct";let e=(document.referrer||"").toLowerCase(),t=e?new URL(e).hostname.replace("www.",""):"",r=window.location.hostname,s=vt(),i=_t(),f=kt(),d=xt();return s||["facebook.com","fb.com","fb.me","m.facebook.com","l.facebook.com","lm.facebook.com"].includes(t)?"facebook":i||t.includes("instagram")?"instagram":f||["tiktok.com","pangleglobal.com","ads.tiktok.com"].includes(t)?"tiktok":d||t.includes("pinterest")||t==="pin.it"?"pinterest":t.includes("google")?"google":!e||r===t?"direct":"other"}W();function Wr(e){let t={},r={};if(!e)return{assignments:t,views:r};let s=e.split("~");for(let i of s){let f=i.split("_");if(f.length>=2){let d=f[0],m=f[1],l=f[2]==="1";t[d]=m,r[d]=l}}return{assignments:t,views:r}}function Ne(){if(typeof window>"u")return{isPreview:!1,previewTestId:null,forcedAssignments:{},previewedViews:{}};let e=new URLSearchParams(window.location.search),r=(e.get("eabUserPreview")||L("eabUserPreview"))==="true",s=e.get("abtid");s||(s=Y("eabPreviewTestId"));let i=e.get("eab_tests")||"",{assignments:f,views:d}=Wr(i);return e.has("eabUserPreview")&&j("eabUserPreview","true"),e.has("abtid")&&s&&re("eabPreviewTestId",s),{isPreview:r,previewTestId:s,forcedAssignments:f,previewedViews:d}}function rr(e,t){if(!t)return!1;if(e===t)return!0;let r=e.slice(-5);return!!(r===t||t.endsWith(r)||e.endsWith(t))}function or(e,t){if(!t.isPreview)return null;if(t.forcedAssignments[e])return t.forcedAssignments[e];let r=e.slice(-5);return t.forcedAssignments[r]?t.forcedAssignments[r]:null}function Pt(e,t){return Object.entries(e).map(([r,s])=>{let i=r.slice(-5),f=t[r]?"1":"0";return`${i}_${s}_${f}`}).join("~")}function nr(e,t,r){if(typeof window>"u")return;let s=new URL(window.location.href),i=Pt(e,t);i&&s.searchParams.set("eab_tests",i),r&&s.searchParams.set("eabUserId",r),window.history.replaceState({},"",s.toString())}function ir(){if(!(typeof document>"u")&&(document.cookie="eabUserPreview=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;",typeof sessionStorage<"u"&&sessionStorage.removeItem("eabPreviewTestId"),typeof window<"u")){let e=new URL(window.location.href);e.searchParams.delete("eabUserPreview"),e.searchParams.delete("abtid"),e.searchParams.delete("eab_tests"),window.history.replaceState({},"",e.toString())}}function ar(){return Ne().isPreview}W();var se={SHOPIFY_LOCALIZATION:"localization",EAB_COUNTRY:"eabCountryCode",EAB_GEO:"eabGeoLocation"};function ce(){if(typeof window>"u")return null;let t=new URLSearchParams(window.location.search).get("country");if(t)return j(se.EAB_COUNTRY,t.toUpperCase()),t.toUpperCase();let r=L(se.SHOPIFY_LOCALIZATION);if(r)return r.toUpperCase();let s=L(se.EAB_COUNTRY);if(s)return s.toUpperCase();if(typeof localStorage<"u"){let i=localStorage.getItem(se.EAB_COUNTRY);if(i)return i.toUpperCase()}return null}function sr(){let e=ce(),t=L(se.EAB_GEO);if(t)try{let r=JSON.parse(t);return{country:r.country||e,region:r.region,city:r.city}}catch{}return{country:e}}function Tt(e){let t=e.toUpperCase();j(se.EAB_COUNTRY,t),typeof localStorage<"u"&&localStorage.setItem(se.EAB_COUNTRY,t)}function cr(e){e.country&&Tt(e.country),j(se.EAB_GEO,JSON.stringify(e))}function At(e,t){let r=t??ce();return r?e.map(i=>i.toUpperCase()).includes(r.toUpperCase()):!1}function Ct(e,t){let r=t??ce();return r?e.map(i=>i.toUpperCase()).includes(r.toUpperCase()):!1}function ur(e){let t=ce();return!e.includeCountries?.length&&!e.excludeCountries?.length?!0:!t||e.excludeCountries?.length&&Ct(e.excludeCountries,t)?!1:e.includeCountries?.length?At(e.includeCountries,t):!0}var dr={US:"US",CA:"CA",GB:"GB",AU:"AU",DE:"DE",FR:"FR",JP:"JP",MX:"MX",BR:"BR",IN:"IN"},lr={NORTH_AMERICA:["US","CA","MX"],EUROPE:["GB","DE","FR","IT","ES","NL","BE","AT","CH","PL","SE","NO","DK","FI","IE","PT"],APAC:["AU","NZ","JP","KR","SG","HK","TW","TH","MY","PH","ID","VN","IN"],LATAM:["MX","BR","AR","CL","CO","PE"]};var Q="eab-prevent-flicker",rt="eab-flicker-styles";function Et(e=3e3){if(typeof document>"u"||document.getElementById(rt))return;let t=document.createElement("style");t.id=rt,t.textContent=`
18
+ /* Elevate AB - Flicker Prevention */
19
+ .${Q} {
20
+ opacity: 0 !important;
21
+ pointer-events: none !important;
22
+ }
23
+
24
+ /* Failsafe: ensure content shows after timeout via animation */
25
+ @keyframes eab-reveal {
26
+ to { opacity: 1; pointer-events: auto; }
27
+ }
28
+
29
+ .${Q} {
30
+ animation: eab-reveal 0s ${e}ms forwards;
31
+ }
32
+ `;let r=document.head||document.getElementsByTagName("head")[0];r.insertBefore(t,r.firstChild)}function St(e="body"){if(typeof document>"u")return;let t=document.querySelector(e);t&&t.classList.add(Q)}function ot(e="body"){if(typeof document>"u")return;let t=document.querySelector(e);t&&t.classList.remove(Q)}function nt(e="body",t=3e3){if(typeof document>"u")return()=>{};Et(t),St(e);let r=!1,s=setTimeout(()=>{r||(console.warn(`[ElevateAB] Flicker prevention timeout (${t}ms) reached. Revealing content. Check if test assignment is completing.`),ot(e),r=!0)},t);return()=>{r||(clearTimeout(s),ot(e),r=!0)}}function fr(){if(typeof document>"u")return;let e=document.getElementById(rt);e&&e.remove(),document.querySelectorAll(`.${Q}`).forEach(r=>r.classList.remove(Q))}function pr(){return typeof document>"u"?!1:document.querySelector(`.${Q}`)!==null}function mr(e=3e3){return`
33
+ (function() {
34
+ var style = document.createElement('style');
35
+ style.id = '${rt}';
36
+ style.textContent = '.${Q}{opacity:0!important;pointer-events:none!important}@keyframes eab-reveal{to{opacity:1;pointer-events:auto}}.${Q}{animation:eab-reveal 0s ${e}ms forwards}';
37
+ document.head.insertBefore(style, document.head.firstChild);
38
+ document.body && document.body.classList.add('${Q}');
39
+ })();
40
+ `.trim()}var It=Je(gr(),1),br={"facebook.com":"Facebook","fb.me":"Facebook","m.facebook.com":"Facebook","l.facebook.com":"Facebook","lm.facebook.com":"Facebook","instagram.com":"Instagram","l.instagram.com":"Instagram","youtube.com":"Youtube","youtu.be":"Youtube","m.youtube.com":"Youtube","bing.com":"Bing","www.bing.com":"Bing","msnbc.msn.com":"Bing","dizionario.it.msn.com":"Bing","cc.bingj.com":"Bing","m.bing.com":"Bing","twitter.com":"Twitter","t.co":"Twitter"};function T(e){return typeof e!="string"?String(e):e.replace(/[\\"'`\x00-\x1F\x7F]/g,"")}function v(e){if(e==null)return null;let t=typeof e=="string"?parseFloat(e):Number(e);return isNaN(t)?null:+(Math.round(+(t+"e2"))+"e-2")}function K(e){if(!e)return null;let t=/gid:\/\/shopify\/Product\/(\d+)/,r=e.match(t);return r?r[1]:null}function ue(e){if(!e)return null;let t=/gid:\/\/shopify\/ProductVariant\/(\d+)/,r=e.match(t);return r?r[1]:null}function xe(e){if(!e)return null;let t=/gid:\/\/shopify\/Cart\/([^?]+(\?.+)?)/,r=e.match(t);return r?r[1]:null}function Pe(e){try{return typeof e!="string"?null:decodeURIComponent(e).split("?")[0]}catch{return e||null}}function Hr(e){return/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i.test(e)}function Jr(e){return/(instagram)[\/ ]([-\w\.]+)/i.test(e)}function wr(e){return Hr(e)||Jr(e)}function Yr(e){if(!e)return"";switch(e){case"Mobile Safari":return"Safari";case"Chrome Mobile":case"Chrome Mobile iOS":return"Chrome";case"Firefox Mobile":case"Firefox Mobile iOS":return"Firefox";case"Opera Mobile":case"Opera Mini":case"Opera Mini iOS":return"Opera";case"Yandex Browser Lite":return"Yandex Browser";case"Chrome Webview":case"Mobile App":return"Mobile App";default:return e}}function Qr(e){let t={};return e.searchParams.forEach((r,s)=>{t[s]||(t[s]=r)}),t}function Kr(e){return!!e.host&&["http:","https:"].includes(e.protocol)}function Xr(e){return e.replace(/^www\./,"")}function Zr(e,t,r){if(t&&{Facebook:"Facebook",Instagram:"Instagram"}[t])return t;let i,f;try{if(e&&e.trim()!=="")i=new URL(e);else return"Direct";if(i?.hostname&&Kr(i)){if(f=i.hostname,r&&r===f)return"Direct"}else return""}catch{}if(!f)return"";let d=Xr(f);return d?br[d]?br[d]:d?.includes("google")?"Google":d:""}function Te(e){let{referrer:t,entryPage:r,userAgent:s}=e,i={referrer_source:"",browser_info:"",os_info:"",device_type:"",page_entry_path:"",utm_medium:"",utm_source:"",utm_campaign:"",utm_content:"",utm_term:"",referrer_url:t||"",gclid:"",fbclid:"",pins_campaign_id:"",epik:""};try{let f;if(r&&r.trim()!==""&&r.startsWith("http"))try{let d=new URL(r),m=d?.pathname;f=d?.hostname,m&&(i.page_entry_path=m??"");let l=Qr(d);i.utm_medium=l.utm_medium??"",i.utm_source=l.utm_source??"",i.utm_campaign=l.utm_campaign??"",i.utm_content=l.utm_content??"",i.utm_term=l.utm_term??"",i.gclid=l.gclid??"",i.fbclid=l.fbclid??"",i.pins_campaign_id=l.pins_campaign_id??"",i.epik=l.epik??""}catch{}if(s){let d=(0,It.UAParser)(s),m=d?.browser?.name,l=Yr(m);i.browser_info=l??"",i.os_info=d?.os?.name??"",s&&(i.device_type=(d?.device?.type||"desktop")?.toUpperCase()??"")}return i.referrer_source=Zr(t,i?.browser_info,f)??"",i}catch{return i}}function Ae(e,t){let r=e==="/"||e==="",i=t&&/^\/[a-z]{2}(-[a-z]{2})?\/?$/i.test(e);return r||i?"index":/\/products\//.test(e)?"product":/\/collections\//.test(e)?"collection":/\/pages\//.test(e)?"page":/\/search/.test(e)?"search":/\/cart/.test(e)?"cart":/\/checkouts\//.test(e)?"checkout":"unknown"}function hr(e){try{return e&&new URLSearchParams(e).get("eabUserId")||!1}catch{return!1}}function Ce(e){if(!e)return"";try{let t=(0,It.UAParser)(e),r=t?.os,s=t?.device,i="";return r?.name&&(i+=r.name,r.version&&(i+=` ${r.version}`)),s?.type&&(i+=i?` (${s.type})`:s.type),s?.vendor&&(i+=i?` ${s.vendor}`:s.vendor),s?.model&&(i+=i?` ${s.model}`:s.model),i||e}catch{return e}}function M(e){return e?e.includes("gid://")&&e.split("/").pop()||e:""}function yr(e){return!e||!e.includes("gid://")?null:e.split("/")[3]||null}function vr(e){return!!e&&e.startsWith("gid://shopify/")}function _r(){if(typeof window>"u")return;let e=window.Shopify;if(e?.currency?.active)return e.currency.active}st();Ut();W();var we=require("react"),eo="https://bitter-river-9c62.support-67d.workers.dev",to="https://d339co84ntxcme.cloudfront.net/Prod/orders",D=null;function qe(e){D=e}function de(e){let t=e?.storeId||D?.storeId;return t||(console.warn("[ElevateAB] No storeId provided. Call initAnalytics() first or pass storeId to tracking function."),"")}function ro(e){return Object.entries(e).filter(([,t])=>typeof t=="string").map(([t,r])=>({test_id:t,variant_id:r}))}function oo(e,t){return Object.entries(e).filter(([r])=>typeof t[r]=="string").map(([r])=>({test_id:r,variant_id:t[r]}))}function no(){return typeof window>"u"?!1:L("eabUserPreview")==="true"||new URLSearchParams(window.location.search).get("eabUserPreview")==="true"}function le(e,t,r){if(typeof window>"u"||no())return null;let s=navigator.userAgent,i=window.location.pathname,f=Ae(i,r),{referrer:d,entryPage:m}=_e(),l=Te({referrer:d,entryPage:m,userAgent:s}),w=F("ABTL")||{},o=F("ABAU")||{},c=ro(w),n=oo(o,w),a=xe(localStorage.getItem("shopifyCartId")),u=new Date().toISOString(),k=sessionStorage.getItem("eabIsFirstVisit")==="true",x=L("localization")||"";return{pixel_event_id:`sh-${ae()}`,shop_name:e,timestamp:u,event_type:t,client_id:L("_shopify_y")||void 0,visitor_id:oe(),session_id:be(),cart_token:Pe(a||L("cart")),page_url:window.location.href,page_pathname:i,page_search:window.location.search,referrer_url:d,referrer_source:l?.referrer_source,previous_page:document.referrer,page_entry:m,page_entry_path:l?.page_entry_path,page_type:f,utm_medium:l?.utm_medium,utm_source:l?.utm_source,utm_campaign:l?.utm_campaign,utm_content:l?.utm_content,utm_term:l?.utm_term,gclid:l?.gclid,fbclid:l?.fbclid,pins_campaign_id:l?.pins_campaign_id,epik:l?.epik,browser_info:l?.browser_info,os_info:l?.os_info,device_type:l?.device_type,language:navigator.language,root_route:localStorage.getItem("eabRootRoute")||"",user_agent:s,user_agent_no_browser:Ce(s),is_first_visit:k,shopify_country:x,ab_test_assignments:c,ab_test_views:n,is_first_order:null}}async function fe(e,t=eo){try{let r=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),keepalive:!0});if(!r.ok)throw new Error(`Worker error: ${r.status}`)}catch(r){console.error("[ElevateAB] Error sending analytics:",r)}}async function Ot(e={}){let t=de(e);if(!t)return;let r=e.hasLocalizedPaths??D?.hasLocalizedPaths,s=e.workerUrl??D?.workerUrl,i=le(t,"page_viewed",r);if(!i)return;let f={...i,cart_currency:e.currency};await fe(f,s)}async function Pr(e){let t=de(e);if(!t)return;let{productId:r,productVendor:s,productPrice:i,productSku:f,currency:d}=e,m=e.hasLocalizedPaths??D?.hasLocalizedPaths,l=e.workerUrl??D?.workerUrl,w=le(t,"product_viewed",m);if(!w)return;let o={...w,cart_currency:d,product_id:M(r),product_vendor:T(s),product_price:v(i),product_sku:T(f)};await fe(o,l)}async function Tr(e){let t=de(e);if(!t)return;let{productId:r,variantId:s,productVendor:i,productPrice:f,productQuantity:d,productSku:m,currency:l,cartId:w}=e,o=e.hasLocalizedPaths??D?.hasLocalizedPaths,c=e.workerUrl??D?.workerUrl,n=e.storefrontAccessToken??D?.storefrontAccessToken,a=le(t,"product_added_to_cart",o);if(!a)return;let u={...a,cart_currency:l,product_id:M(r),variant_id:M(s),product_vendor:T(i),product_price:v(f),product_quantity:d,product_sku:T(m)};if(await fe(u,c),w&&n)try{let{updateCartAttributes:k}=await Promise.resolve().then(()=>(st(),xr));await k(w,{storefrontAccessToken:n})}catch(k){console.error("[ElevateAB] Failed to update cart attributes:",k)}}async function Ar(e){let t=de(e);if(!t)return;let{productId:r,variantId:s,productVendor:i,productPrice:f,productQuantity:d,productSku:m,currency:l}=e,w=e.hasLocalizedPaths??D?.hasLocalizedPaths,o=e.workerUrl??D?.workerUrl,c=le(t,"product_removed_from_cart",w);if(!c)return;let n={...c,cart_currency:l,product_id:M(r),variant_id:M(s),product_vendor:T(i),product_price:v(f),product_quantity:d,product_sku:T(m)};await fe(n,o)}async function Cr(e){let t=de(e);if(!t)return;let{cartTotalPrice:r,cartTotalQuantity:s,cartItems:i,currency:f}=e,d=e.hasLocalizedPaths??D?.hasLocalizedPaths,m=e.workerUrl??D?.workerUrl,l=le(t,"cart_viewed",d);if(!l)return;let w={...l,cart_currency:f,cart_total_price:v(r),cart_total_quantity:s,cart_items:i?.map(o=>({product_id:M(o.productId),variant_id:M(o.variantId),product_vendor:T(o.productVendor)||"",product_price:v(o.productPrice),product_quantity:o.productQuantity??null,product_sku:T(o.productSku)||""}))};await fe(w,m)}async function Er(e){let t=de(e);if(!t)return;let{searchQuery:r,currency:s}=e,i=e.hasLocalizedPaths??D?.hasLocalizedPaths,f=e.workerUrl??D?.workerUrl,d=le(t,"search_submitted",i);if(!d)return;let m={...d,cart_currency:s,search_query:T(r)};await fe(m,f)}async function Sr(e){let t=de(e);if(!t)return;let{cartTotalPrice:r,cartSubtotalPrice:s,cartShippingPrice:i,cartTaxAmount:f,cartDiscountAmount:d,customerId:m,cartItems:l,currency:w}=e,o=e.hasLocalizedPaths??D?.hasLocalizedPaths,c=e.workerUrl??D?.workerUrl,n=le(t,"checkout_started",o);if(!n)return;let a=0,u=l?.map(x=>{let g=x.productQuantity??0;return a+=g,{product_id:M(x.productId),variant_id:M(x.variantId),product_vendor:T(x.productVendor)||"",vendor:T(x.productVendor)||"",product_price:v(x.productPrice),total_price:v(x.productPrice),product_quantity:g,quantity:g,product_sku:T(x.productSku)||"",sku:T(x.productSku)||"",total_discount:v(x.totalDiscount)}})||[],k={...n,cart_currency:w,cart_total_price:v(r),cart_subtotal_price:v(s),cart_total_quantity:a,cart_shipping_price:v(i),cart_tax_amount:v(f),cart_discount_amount:v(d),cart_items:u,customer_id:m};await fe(k,c)}async function Ir(e){let t=de(e);if(!t)return;let{orderId:r,cartTotalPrice:s,cartSubtotalPrice:i,cartShippingPrice:f,cartTaxAmount:d,cartDiscountAmount:m,customerId:l,isFirstOrder:w,noteAttributes:o,cartItems:c,currency:n}=e,a=e.hasLocalizedPaths??D?.hasLocalizedPaths,u=e.ordersWorkerUrl??D?.ordersWorkerUrl??to,k=le(t,"checkout_completed",a);if(!k)return;let x=0,g=c?.map(E=>{let B=E.productQuantity??0;return x+=B,{product_id:M(E.productId),variant_id:M(E.variantId),product_vendor:T(E.productVendor)||"",vendor:T(E.productVendor)||"",product_price:v(E.productPrice),total_price:v(E.productPrice),product_quantity:B,quantity:B,product_sku:T(E.productSku)||"",sku:T(E.productSku)||"",total_discount:v(E.totalDiscount)}})||[],h={...k,cart_currency:n,cart_total_price:v(s),cart_subtotal_price:v(i),cart_total_quantity:x,cart_shipping_price:v(f),cart_tax_amount:v(d),cart_discount_amount:v(m),cart_items:g,order_id:r,customer_id:l,is_first_order:w??null,note_attributes:o};await fe(h,u)}function Ur(e){let{storeId:t,hasLocalizedPaths:r,currency:s,workerUrl:i,enabled:f=!0,pathname:d}=e,m=(0,we.useRef)(null),[l,w]=(0,we.useState)(()=>d||(typeof window<"u"?window.location.pathname:""));(0,we.useEffect)(()=>{d&&w(d)},[d]),(0,we.useEffect)(()=>{typeof window>"u"||!f||m.current!==l&&(m.current=l,Ot({storeId:t,hasLocalizedPaths:r,currency:s,workerUrl:i}))},[l,t,r,s,i,f])}var Ee=Je(require("react"),1);var Lt=Je(require("react"),1),je=Lt.default.createContext(null);function ct(){let e=Lt.default.useContext(je);if(e===null)throw new Error("useElevateConfig must be used within ElevateProvider");return e}W();et();function Rr(e){let{config:t}=ct(),[r,s]=Ee.default.useState(null),[i,f]=Ee.default.useState(!0),d=Ee.default.useMemo(()=>t&&t.tests.find(l=>l.testId===e)||null,[t,e]),m=Ee.default.useRef(null);return Ee.default.useEffect(()=>{if(t===null)return;if(!d){m.current!==e&&(m.current=e,console.warn(`[ElevateAB] Test not found: ${e}`)),f(!1);return}if(!d.enabled){m.current!==`${e}-disabled`&&(m.current=`${e}-disabled`,console.warn(`[ElevateAB] Test disabled: ${e}`)),f(!1);return}if(!Ze(d)){f(!1);return}let l=oe(),w=Xe(e,d,l);w&&(s(w),tt(e)),f(!1)},[t,d,e]),{variant:r,isLoading:i,isControl:r?.isControl??!1,isA:r?.isA??!1,isB:r?.isB??!1,isC:r?.isC??!1,isD:r?.isD??!1}}var N=Je(require("react"),1);Ye();var io=!1,ao={allTests:{"price-test-001":{8606:{variationName:"Control",trafficPercentage:50,isDone:!1,isControl:!0},8607:{variationName:"Sale Price",trafficPercentage:50,isDone:!1,prices:{"41883969519701":{main:"USD",price:{USD:"599.95"},compare:{USD:"699.95"}}}},data:{name:"Snowboard Price Test",isLive:!0,settings:{afterDiscounts:!0},type:"PRICE_PLUS",filters:[],isPersonalization:!1,currencies:["USD"],handles:["the-complete-snowboard"],productIds:["7240161067093"]}},"content-test-001":{"ctrl-001":{variationName:"Control",trafficPercentage:34,isDone:!1,isControl:!0,content:{headline:"Welcome to our store",subheadline:"Shop the best products"}},"var-a-001":{variationName:"Urgency Copy",trafficPercentage:33,isDone:!1,content:{headline:"Limited Time Offer!",subheadline:"Don't miss out - sale ends soon"}},"var-b-001":{variationName:"Value Copy",trafficPercentage:33,isDone:!1,content:{headline:"Premium Quality, Great Value",subheadline:"Free shipping on orders over $50"}},data:{name:"Homepage Headline Test",isLive:!0,settings:{afterDiscounts:!0},type:"CONTENT",filters:[],isPersonalization:!1,pathnames:["/"]}},"custom-code-test-001":{10150:{variationName:"Control",trafficPercentage:50,isDone:!1,customCode:{id:"c11a582c-6b27-4263-941c-8ed123437c6b",js:"console.log('[Elevate] Control variant active');",css:"",pathnames:["*"],excludePathnames:[]},isControl:!0},10151:{variationName:"Enhanced UI",trafficPercentage:50,isDone:!1,customCode:{id:"df71546a-0a5f-4ad0-8d0f-a1bdeab05e84",js:"console.log('[Elevate] Enhanced UI variant'); document.body.style.borderTop = '3px solid #10b981';",css:".hero-section { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }",pathnames:["*"],excludePathnames:[]}},data:{name:"Custom Code Enhancement",isLive:!0,settings:{afterDiscounts:!0},type:"CUSTOM_CODE",filters:[],isPersonalization:!1,pathnames:["*"],excludePathnames:[]}},"split-url-test-001":{"split-ctrl":{variationName:"Control",trafficPercentage:50,isDone:!1,isControl:!0,splitUrlTestLinks:{default:"/collections/all"}},"split-var-a":{variationName:"New Landing Page",trafficPercentage:50,isDone:!1,splitUrlTestLinks:{default:"/collections/featured"}},data:{name:"Landing Page Split Test",isLive:!0,settings:{afterDiscounts:!0},type:"SPLIT_URL",filters:[],isPersonalization:!1,pathnames:["/promo"]}}},selectors:{selectorsV2:[]}};function Or({storeId:e,storefrontAccessToken:t,preventFlickering:r=!1,flickerTimeout:s=3e3,children:i}){let[f,d]=N.default.useState(null),[m,l]=N.default.useState(null),[w,o]=N.default.useState(null),c=(0,N.useRef)(null);N.default.useEffect(()=>(r&&typeof window<"u"&&(c.current=nt("body",s)),()=>{c.current&&c.current()}),[r,s]),N.default.useEffect(()=>{typeof window>"u"||qe({storeId:e,storefrontAccessToken:t})},[e,t]),N.default.useEffect(()=>{if(typeof window>"u")return;let k=Ne();l(k);let x=ce();o(x)},[]);let n=(0,N.useCallback)(()=>{c.current&&(c.current(),c.current=null)},[]);N.default.useEffect(()=>{async function k(){try{if(!io){let X=mt(ao);d(X),n();return}let x=`https://configs.elevateab.com/config/${e}.json`,g=await fetch(x);if(g.status===404){d({tests:[],selectors:void 0}),n();return}if(!g.ok)throw new Error(`Failed to fetch config: ${g.status} ${g.statusText}`);let h=await g.json();if(h.subscriptionPaused){console.error(`[ElevateAB] Subscription is paused or stopped for store: ${e}. `+(h.subscriptionMessage||"A/B tests will not run. Please reactivate your subscription.")),d({tests:[],selectors:void 0}),n();return}if(!(Object.keys(h.allTests||{}).length>0)){d({tests:[],selectors:void 0}),n();return}let B=mt(h);d(B),n()}catch(x){console.error("[ElevateAB] Failed to load config:",x),d({tests:[],selectors:void 0}),n()}}k()},[e,n]);let a=N.default.useMemo(()=>({config:f,storeId:e,storefrontAccessToken:t,isPreviewMode:m?.isPreview??!1,previewTestId:m?.previewTestId??null,countryCode:w}),[f,e,t,m,w]);N.default.useEffect(()=>{qe({storeId:e,storefrontAccessToken:t})},[e,t]);let u=(0,N.useRef)(!1);return N.default.useEffect(()=>{!t&&!u.current&&(u.current=!0,console.warn("[ElevateAB] No storefrontAccessToken provided. A/B tests will work, but orders won't be attributed to test variants. Add storefrontAccessToken prop to enable order tracking."))},[t]),N.default.createElement(je.Provider,{value:a},i)}var he=require("react");W();W();st();var so="https://bitter-river-9c62.support-67d.workers.dev",co="https://d339co84ntxcme.cloudfront.net/Prod/orders";function pe(){return`sh-${ae()}`}function uo(e){return Object.entries(e).filter(([,t])=>typeof t=="string").map(([t,r])=>({test_id:t,variant_id:r}))}function lo(e,t){return Object.entries(e).filter(([r])=>typeof t[r]=="string").map(([r])=>({test_id:r,variant_id:t[r]}))}function Lr({storeId:e,storefrontAccessToken:t,hasLocalizedPaths:r,workerUrl:s=so,ordersWorkerUrl:i=co,useAnalytics:f}){let d=(0,he.useContext)(je),m=e||d?.storeId||"",l=t||d?.storefrontAccessToken,w=(0,he.useRef)(!1);(0,he.useEffect)(()=>{!d&&!e&&!w.current&&(w.current=!0,console.error("[ElevateAB] ElevateAnalytics must be used inside ElevateProvider, or you must pass storeId as a prop."))},[d,e]);let{subscribe:o,register:c}=f(),{ready:n}=c("Elevate Analytics");return(0,he.useEffect)(()=>{if(typeof window>"u")return;if(oe(),be(),typeof document<"u"){let u=document.referrer||"",k=window.location.href;Qe(u,k)}(()=>{let u=p=>{let b=K(p.products?.[0]?.id);b&&typeof localStorage<"u"?localStorage.setItem("eabProductPageId",b):typeof window<"u"&&!window.location.pathname.includes("/products/")&&localStorage?.removeItem("eabProductPageId");let S=xe(typeof localStorage<"u"?localStorage.getItem("shopifyCartId"):null),{referrer:R,entryPage:O}=_e();return{visitorId:oe(),sessionId:be(),cartToken:S||L("cart")||"",referrer:R,entryPage:O,clientId:L("_shopify_y"),rootRoute:typeof localStorage<"u"&&localStorage.getItem("eabRootRoute")||"",productPageId:typeof localStorage<"u"&&localStorage.getItem("eabProductPageId")||""}},k=(p,b,S,R)=>{let O=typeof navigator<"u"?navigator.userAgent:"",z=S?.url?new URL(S.url).pathname:typeof window<"u"?window.location.pathname:"",$=Ae(z,r),I=Te({referrer:R.referrer,entryPage:R.entryPage,userAgent:O}),V=F("ABTL")||{},G=F("ABAU")||{},me=uo(V),Z=lo(G,V),ee=new Date().toISOString(),ie=typeof sessionStorage<"u"?sessionStorage.getItem("eabIsFirstVisit")==="true":!1,ge=L("localization")||"";return{pixel_event_id:b,shop_name:m,timestamp:ee,event_type:p,client_id:R.clientId,visitor_id:R.visitorId,session_id:R.sessionId,cart_token:Pe(R.cartToken),page_url:S.context?.document?.location?.href||(typeof window<"u"?window.location.href:""),page_pathname:z,page_search:S.context?.document?.location?.search||(typeof window<"u"?window.location.search:""),referrer_url:R.referrer,referrer_source:I?.referrer_source,previous_page:typeof document<"u"?document.referrer:"",page_entry:R.entryPage,page_entry_path:I?.page_entry_path,page_type:$,utm_medium:I?.utm_medium,utm_source:I?.utm_source,utm_campaign:I?.utm_campaign,utm_content:I?.utm_content,utm_term:I?.utm_term,gclid:I?.gclid,fbclid:I?.fbclid,pins_campaign_id:I?.pins_campaign_id,epik:I?.epik,browser_info:I?.browser_info,os_info:I?.os_info,device_type:I?.device_type,language:S.context?.navigator?.language||(typeof navigator<"u"?navigator.language:""),root_route:R.rootRoute,user_agent:O,user_agent_no_browser:Ce(O),is_first_visit:ie,shopify_country:ge,cart_currency:S.shop?.currency,ab_test_assignments:me,ab_test_views:Z,is_first_order:null}},x=async p=>{if(!p.exclude)try{let b=await fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(p),keepalive:!0});if(!b.ok)throw new Error(`Worker error: ${b.status}`);return b}catch(b){console.error("[ElevateAB] Error sending analytics:",b)}},g=async p=>{try{let b=u(p),S=pe(),R=k("page_viewed",S,p,b);await x(R)}catch(b){console.error("[ElevateAB] Error handling page_viewed:",b)}},h=async p=>{try{let b=u(p),S=pe(),O={...k("product_viewed",S,p,b),product_id:K(p?.products?.[0]?.id)||"",product_vendor:T(p?.products?.[0]?.vendor)??"",product_price:v(p?.products?.[0]?.price)??null,product_sku:T(p?.products?.[0]?.sku)??""};await x(O)}catch(b){console.error("[ElevateAB] Error handling product_viewed:",b)}},E=async p=>{try{let b=u(p),S=pe(),O={...k("product_added_to_cart",S,p,b),product_id:K(p?.currentLine?.merchandise?.product?.id)??"",variant_id:ue(p?.currentLine?.merchandise?.id)??"",product_vendor:T(p?.currentLine?.merchandise?.product?.vendor)??"",product_price:v(p?.currentLine?.cost?.totalAmount?.amount)??null,product_quantity:p?.currentLine?.quantity??null,product_sku:T(p?.currentLine?.merchandise?.sku)??""};await x(O);let z=p?.cart?.id;z&&l&&m&&Me(z,{storefrontAccessToken:l,storefrontApiUrl:`https://${m}/api/2025-01/graphql.json`}).catch($=>{console.error("[ElevateAB] Failed to update cart attributes:",$)})}catch(b){console.error("[ElevateAB] Error handling product_added_to_cart:",b)}},B=async p=>{try{let b=u(p),S=pe(),O={...k("product_removed_from_cart",S,p,b),product_id:K(p?.prevLine?.merchandise?.product?.id)??"",variant_id:ue(p?.prevLine?.merchandise?.id)??"",product_vendor:T(p?.prevLine?.merchandise?.product?.vendor)??"",product_price:v(p?.prevLine?.cost?.totalAmount?.amount)??null,product_quantity:p?.prevLine?.quantity??null,product_sku:T(p?.prevLine?.merchandise?.sku)??""};await x(O)}catch(b){console.error("[ElevateAB] Error handling product_removed_from_cart:",b)}},X=async p=>{try{let b=u(p),S=pe(),R=k("cart_viewed",S,p,b),z=(p?.data?.cart?.lines?.nodes||p?.data?.cart?.lines||[]).map(I=>({product_id:K(I?.merchandise?.product?.id)??"",variant_id:ue(I?.merchandise?.id)??"",vendor:T(I?.merchandise?.product?.vendor)??"",total_price:v(I?.cost?.totalAmount?.amount)??null,quantity:I?.quantity??null,sku:T(I?.merchandise?.sku)??""})),$={...R,cart_total_price:v(p?.cart?.cost?.totalAmount?.amount)??null,cart_total_quantity:p?.cart?.totalQuantity??null,cart_items:z};await x($)}catch(b){console.error("[ElevateAB] Error handling cart_viewed:",b)}},Se=async p=>{try{let b=u(p),S=pe(),O={...k("search_submitted",S,p,b),search_query:T(p?.data?.searchResult?.query)??""};await x(O)}catch(b){console.error("[ElevateAB] Error handling search_submitted:",b)}},ye=async p=>{try{let b=u(p),S=pe(),R=k("checkout_started",S,p,b),O=0,$=(p?.data?.checkout?.lineItems??[]).map(V=>{let G=V?.quantity??0;O+=G;let Z=(V?.discountAllocations??[])?.reduce((ee,ie)=>ee+(ie?.amount?.amount||0),0);return{product_id:K(V?.variant?.product?.id)??"",variant_id:ue(V?.variant?.id)??"",vendor:T(V?.variant?.product?.vendor)??"",total_price:v(V?.finalLinePrice?.amount)??null,quantity:G,sku:T(V?.variant?.sku)??"",total_discount:v(Z)??null}}),I={...R,cart_total_price:v(p?.data?.checkout?.totalPrice?.amount)??null,cart_subtotal_price:v(p?.data?.checkout?.subtotalPrice?.amount)??null,cart_total_quantity:O,cart_shipping_price:v(p?.data?.checkout?.shippingLine?.price?.amount)??null,cart_tax_amount:v(p?.data?.checkout?.totalTax?.amount)??null,cart_discount_amount:v(p?.data?.checkout?.discountsAmount?.amount)??null,cart_items:$,customer_id:p?.data?.checkout?.order?.customer?.id??""};await x(I)}catch(b){console.error("[ElevateAB] Error handling checkout_started:",b)}},ne=async p=>{try{let b=u(p),S=pe(),R=k("checkout_completed",S,p,b),O=0,$=(p?.data?.checkout?.lineItems??[]).map(V=>{let G=V?.quantity??0;O+=G;let Z=(V?.discountAllocations??[])?.reduce((ee,ie)=>ee+(ie?.amount?.amount||0),0);return{product_id:K(V?.variant?.product?.id)??"",variant_id:ue(V?.variant?.id)??"",vendor:T(V?.variant?.product?.vendor)??"",total_price:v(V?.finalLinePrice?.amount)??null,quantity:G,sku:T(V?.variant?.sku)??"",total_discount:v(Z)??null}}),I={...R,cart_total_price:v(p?.data?.checkout?.totalPrice?.amount)??null,cart_subtotal_price:v(p?.data?.checkout?.subtotalPrice?.amount)??null,cart_total_quantity:O,cart_shipping_price:v(p?.data?.checkout?.shippingLine?.price?.amount)??null,cart_tax_amount:v(p?.data?.checkout?.totalTax?.amount)??null,cart_discount_amount:v(p?.data?.checkout?.discountsAmount?.amount)??null,cart_items:$,order_id:p?.data?.checkout?.order?.id??"",customer_id:p?.data?.checkout?.order?.customer?.id??"",is_first_order:p?.data?.checkout?.order?.customer?.isFirstOrder??null,note_attributes:p?.data?.checkout?.attributes??[]};await $e(I)}catch(b){console.error("[ElevateAB] Error handling checkout_completed:",b)}},$e=async p=>{if(!p.exclude)try{let b=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(p),keepalive:!0});if(!b.ok)throw new Error(`Orders worker error: ${b.status}`);return b}catch(b){console.error("[ElevateAB] Error sending order analytics:",b)}};o("page_viewed",g),o("product_viewed",h),o("product_added_to_cart",E),o("product_removed_from_cart",B),o("cart_viewed",X),o("search_submitted",Se),o("checkout_started",ye),o("checkout_completed",ne)})(),n()},[o,n,m,r,l,s,i]),null}var fo="1.1.2",po={enabled:!0,trackingEndpoint:"https://analytics.elevateab.com/track",cacheDuration:3600};0&&(module.exports={CART_ATTRIBUTES_UPDATE_MUTATION,COUNTRIES,DEFAULT_CONFIG,ElevateAnalytics,ElevateProvider,REGIONS,VERSION,assignAndPersistVariant,assignVariant,buildEabTestsParam,calculateRevenueLift,checkFacebookBrowser,checkFacebookInstagramBrowser,checkInstagramBrowser,checkPinterestBrowser,checkTikTokBrowser,checkVisitorIdParams,cleanCartToken,cleanupCartAttributes,cleanupFlickerPrevention,clearPreviewMode,deleteCookie,detectShopifyCurrency,extractCartToken,extractProductId,extractProductVariantId,extractShopifyId,extractShopifyType,generateExperimentId,getAssignedVariant,getCartAttributesPayload,getCookie,getCountryCode,getDeviceType,getFlickerPreventionScript,getGeoLocation,getJsonCookie,getJsonSessionItem,getPageTypeFromPathname,getPreviewState,getPreviewVariation,getReferrerData,getSessionId,getSessionItem,getTestList,getTrafficSource,getUserAgentNoBrowser,getVisitorId,hasSessionView,hasUniqueView,hashString,hideForFlicker,initAnalytics,initializeSessionId,initializeVisitorId,injectFlickerStyles,isCountryExcluded,isCountryIncluded,isFlickerPreventionActive,isInPreviewMode,isPreviewTest,isShopifyGid,matchesGeoTargeting,parseAddViewData,revealAfterFlicker,roundToTwo,sanitizeString,saveTestList,setCookie,setCountryCode,setGeoLocation,setReferrerData,setSessionItem,setupFlickerPrevention,shouldShowTest,trackAddToCart,trackCartView,trackCheckoutCompleted,trackCheckoutStarted,trackPageView,trackProductView,trackRemoveFromCart,trackSearchSubmitted,trackSessionView,trackUniqueView,trackViews,updateCartAttributes,updateUrlWithTestParams,useElevateConfig,useExperiment,usePageViewTracking,uuidv4,validateConfig});
2
41
  //# sourceMappingURL=index.cjs.map