!function(){"use strict";class t{t;o=0;i=[];u(t){if(t.hadRecentInput)return;const e=this.i[0],n=this.i.at(-1);this.o&&e&&n&&t.startTime-n.startTime<1e3&&t.startTime-e.startTime<5e3?(this.o+=t.value,this.i.push(t)):(this.o=t.value,this.i=[t]),this.t?.(t)}}const e=()=>{const t=performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart{if("loading"===document.readyState)return"loading";{const n=e();if(n){if(t{const e=t.nodeName;return 1===t.nodeType?e.toLowerCase():e.toUpperCase().replace(/^#/,"")},i=t=>{let e="";try{for(;9!==t?.nodeType;){const n=t,i=n.id?"#"+n.id:[r(n),...Array.from(n.classList).sort()].join(".");if(e.length+i.length>99)return e||i;if(e=e?i+">"+e:i,n.id)break;t=n.parentNode}}catch{}return e},o=new WeakMap;function a(t,e){return o.get(t)||o.set(t,new e),o.get(t)}let s=-1;const c=()=>s,u=t=>{addEventListener("pageshow",e=>{e.persisted&&(s=e.timeStamp,t(e))},!0)},l=(t,e,n,r)=>{let i,o;return a=>{e.value>=0&&(a||r)&&(o=e.value-(i??0),(o||void 0===i)&&(i=e.value,e.delta=o,e.rating=((t,e)=>t>e[1]?"poor":t>e[0]?"needs-improvement":"good")(e.value,n),t(e)))}},d=t=>{requestAnimationFrame(()=>requestAnimationFrame(()=>t()))},f=()=>{const t=e();return t?.activationStart??0},h=(t,n=-1)=>{const r=e();let i="navigate";return c()>=0?i="back-forward-cache":r&&(document.prerendering||f()>0?i="prerender":document.wasDiscarded?i="restore":r.type&&(i=r.type.replace(/_/g,"-"))),{name:t,value:n,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:i}},p=(t,e,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const r=new PerformanceObserver(t=>{Promise.resolve().then(()=>{e(t.getEntries())})});return r.observe({type:t,buffered:!0,...n}),r}}catch{}},m=t=>{let e=!1;return()=>{e||(t(),e=!0)}};let v=-1;const g=new Set,y=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,w=t=>{if("hidden"===document.visibilityState){if("visibilitychange"===t.type)for(const t of g)t();isFinite(v)||(v="visibilitychange"===t.type?t.timeStamp:0,removeEventListener("prerenderingchange",w,!0))}},S=()=>{if(v<0){const t=f(),e=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(e=>"hidden"===e.name&&e.startTime>t)[0]?.startTime;v=e??y(),addEventListener("visibilitychange",w,!0),addEventListener("prerenderingchange",w,!0),u(()=>{setTimeout(()=>{v=y()})})}return{get firstHiddenTime(){return v},onHidden(t){g.add(t)}}},b=t=>{document.prerendering?addEventListener("prerenderingchange",()=>t(),!0):t()},C=[1800,3e3],L=(t,e={})=>{b(()=>{const n=S();let r,i=h("FCP");const o=p("paint",t=>{for(const e of t)"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime{i=h("FCP"),r=l(t,i,C,e.reportAllChanges),d(()=>{i.value=performance.now()-n.timeStamp,r(!0)})}))})},z=[.1,.25],B=t=>t.find(t=>1===t.node?.nodeType)||t[0];let D=0,x=1/0,_=0;const T=t=>{for(const e of t)e.interactionId&&(x=Math.min(x,e.interactionId),_=Math.max(_,e.interactionId),D=_?(_-x)/7+1:0)};let M;const A=()=>M?D:performance.interactionCount??0;let P=0;class N{l=[];h=new Map;m;p;v(){P=A(),this.l.length=0,this.h.clear()}M(){const t=Math.min(this.l.length-1,Math.floor((A()-P)/50));return this.l[t]}u(t){if(this.m?.(t),!t.interactionId&&"first-input"!==t.entryType)return;const e=this.l.at(-1);let n=this.h.get(t.interactionId);if(n||this.l.length<10||t.duration>e.T){if(n?t.duration>n.T?(n.entries=[t],n.T=t.duration):t.duration===n.T&&t.startTime===n.entries[0].startTime&&n.entries.push(t):(n={id:t.interactionId,entries:[t],T:t.duration},this.h.set(n.id,n),this.l.push(n)),this.l.sort((t,e)=>e.T-t.T),this.l.length>10){const t=this.l.splice(10);for(const e of t)this.h.delete(e.id)}this.p?.(n)}}}const I=t=>{const e=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?t():(t=m(t),addEventListener("visibilitychange",t,{once:!0,capture:!0}),e(()=>{t(),removeEventListener("visibilitychange",t,{capture:!0})}))},k=[200,500];class q{m;u(t){this.m?.(t)}}const E=[2500,4e3],U=[800,1800],j=t=>{document.prerendering?b(()=>j(t)):"complete"!==document.readyState?addEventListener("load",()=>j(t),!0):setTimeout(t)},H=()=>"undefined"==typeof window;function O(t,...e){if(0===e.length)return t;const n=e[0];return t[n]||(t[n]={}),O(t[n],...e.slice(1))}function W(t){try{return decodeURIComponent(t)}catch(t){return""}}function K(){if(!H())return window}function F(){var t,e;return!H()&&Boolean(null===(t=K())||void 0===t||null===(e=t.Shopify)||void 0===e?void 0:e.theme)}function J(){try{return"undefined"!=typeof PerformanceServerTiming}catch{return!1}}const Z="",R="1",V="0",X="p",Y="a",G="m",$="t",Q="m",tt="a",et="p",nt="s";function rt(t,e=!1){const n=function(){try{return document.cookie}catch{return!1}}()?document.cookie.split("; "):[];for(let e=0;e{});console.log("Monorail event from consent API:",r,n)}catch(t){}}};function ot(){var t,e;return H()?{}:(null===(t=window.Shopify)||void 0===t||null===(e=t.customerPrivacy)||void 0===e?void 0:e.config)||{}}it.instance=void 0;const at=/^https?:\/\/([^/]+)(\/api\/(?:unstable|2\d{3}-\d{2})\/graphql\.json(?=$|\?))?/;function st(t,e){if("fetch"!==t.initiatorType)return!1;const n=t.name.match(at);if(!n)return!1;const[,r,i]=n;return r===e||!!i&&!(null==r||!r.endsWith(`.${e}`))}const ct="_cmp";function ut(t=ct){let e;if(e=pt()&<(()=>function(t=ct){var e,n;if(H())return;const r=null===(e=performance)||void 0===e||null===(n=e.getEntriesByType)||void 0===n?void 0:n.call(e,"resource"),i=window.location.host;let o=ft[t];for(let e=r.length-1;e>=0;e--){const n=r[e];if(!st(n,i))continue;const a=ht(n,t);if(a){o=a;break}}return ft[t]=o,o}(t))||lt(()=>dt(t)),!e){if(t!==ct)return;let e;try{e=sessionStorage.getItem("consentHeader")}catch{}return e||void 0}try{e=decodeURIComponent(e)}catch{}return e}function lt(t){try{return t()}catch{return}}function dt(t=ct){var e,n;if(!mt()&&!function(){try{const t=performance.getEntriesByType("navigation")[0].serverTiming;return!!t&&0!=t.length}catch{return!1}}()){const t=new it;let e="failed_to_fetch";try{e=navigator.userAgent}catch{}t.produce("navigationServerTiming",JSON.stringify({failed:!0,userAgent:e,apiSupported:J()})),function(){if(mt())return;O(K(),"Shopify","customerPrivacy").serverTimingSupportVerified=!0}()}const r=null===(e=performance)||void 0===e||null===(n=e.getEntriesByType)||void 0===n?void 0:n.call(e,"navigation");if(!r)return;const i=r.map(e=>ht(e,t)).find(t=>t);if(i&&t===ct)try{sessionStorage.setItem("consentHeader",i)}catch{}return i}const ft={};function ht(t,e=ct){var n,r;if(t)return null===(n=t.serverTiming)||void 0===n||null===(r=n.find(t=>t.name==e))||void 0===r?void 0:r.description}function pt(){return!H()&&(function(){var t,e;const n=K();return!0===(null==n||null===(t=n.Shopify)||void 0===t||null===(e=t.customerPrivacy)||void 0===e?void 0:e.backendConsentEnabled)||!0===ot().asyncVisitorState}()||!F())}function mt(){var t,e;const n=K();return null==n||null===(t=n.Shopify)||void 0===t||null===(e=t.customerPrivacy)||void 0===e?void 0:e.serverTimingSupportVerified}function vt(){if(!H()){var t,e;const n=(null===(t=window.Shopify)||void 0===t||null===(e=t.customerPrivacy)||void 0===e?void 0:e.injectedConsent)||ot().injectedConsent;return n?W(n):void 0}}function gt(){let t;if(t=H()?vt():function(){var t,e;const n=null===(t=window.Shopify)||void 0===t||null===(e=t.customerPrivacy)||void 0===e?void 0:e.cachedConsent;return n?W(n):void 0}()||vt()||new URLSearchParams(window.location.search).get("_cs")||void 0||rt("_tracking_consent")||ut(),void 0!==t)return function(t){if("%"==t.slice(0,1))try{t=decodeURIComponent(t)}catch{}const e=t.slice(0,1);if("{"==e)return function(t){var e;let n;try{n=JSON.parse(t)}catch{return}if("2.1"!==n.v)return;if(null===(e=n.con)||void 0===e||!e.CMP)return;return n}(t);if("3"==e)return function(t){const e=t.slice(1).split("_"),[n,r,i,o,a]=e;let s,c;try{s=e[5]?JSON.parse(e.slice(5).join("_")):void 0}catch{}if(a){const t=a.replace(/\*/g,"/").replace(/-/g,"+"),e=atob(t);let n="";for(let t=0;tt.slice(0,e)+"-"+t.slice(e),n)}function u(t){const e=n.split(".")[0];return e.includes(t.toLowerCase())?V:e.includes(t.toUpperCase())?R:Z}function l(t){return n.includes(t.replace("t","s").toUpperCase())}return{v:"3",con:{CMP:{[tt]:u(tt),[et]:u(et),[Q]:u(Q),[nt]:u(nt)}},region:r||"",cus:s,purposes:{[Y]:l(Y),[X]:l(X),[G]:l(G),[$]:l($)},sale_of_data_region:"t"==o,display_banner:"t"==i,consent_id:c}}(t);return}(t)}function yt(t){const e=function(){try{let t=gt();if(!t)return;return t}catch{return}}();if(!e||!e.purposes)return!0;const n=e.purposes[t];return"boolean"!=typeof n||n}function wt(){return yt(Y)}const St=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[0-9a-f]{4}-[0-9a-f]{12}$/;function bt(t,e){if("string"!=typeof t)return;if(!function(t){return!!t&&St.test(t.trim().toLowerCase())}(t))return;const n=t.trim();if("00000000-0000-0000-0000-000000000000"===n)return;if("00000000-0000-0000-5000-000000000000"===n)return;return Number.isFinite(NaN)&&Date.now()>NaN?void 0:n}function Ct(t){if(!H())try{var e,n;return null===(e=document.querySelector(`meta[name="${t}"]`))||void 0===e||null===(n=e.getAttribute("content"))||void 0===n?void 0:n.trim()}catch{return}}function Lt(t){const e=Ct(t);if(e)try{const t=JSON.parse(e);return"string"==typeof t?t.trim():void 0}catch{return}}function zt(t){return void 0!==t&&Date.now()>t}function Bt(t){const e=Ct(t);if(!e)return!1;const n=e.replace(/^"(.*)"$/,"$1").toLowerCase();return"true"===n||"t"===n}function Dt(t,e){if(Bt("serialized-isNewCookieStorageEnabled")){const t=bt(Lt(e));if(t&&!zt(function(t){const e=Lt(`${t}Expiration`);if(!e)return;const n=Number(e);return Number.isFinite(n)?n:void 0}(e)))return t}if(Bt("new-cookie-storage-activated")){const e=bt(Ct(t));if(e&&!zt(function(t){if(!H())try{var e,n;const r=null===(e=document.querySelector(`meta[name="${t}"]`))||void 0===e||null===(n=e.getAttribute("data-expiration"))||void 0===n?void 0:n.trim();if(!r)return;const i=Number(r);return Number.isFinite(i)?i:void 0}catch{return}}(t)))return e}}function xt(){return Dt("shopify-y","serialized-shopifyY")}function _t(){return Dt("shopify-s","serialized-shopifyS")}let Tt=class t{constructor(){if(this.endpoint="https://otlp-http-production.shopifysvc.com/v1/metrics",this.serviceName="consent-tracking-api",this.scopeName="consent-tracking-api-opentelemetry",t.instance)return t.instance;t.instance=this}increment(t,e={}){if(!H()&&t)try{const n=this.buildMetricBody(t,e);if(window.location.host.endsWith("spin.dev"))return void console.log("OpenTelemetry metric from consent API:",n);if("function"!=typeof fetch)return;return fetch(this.endpoint,{headers:{accept:"*/*","content-type":"application/json; charset=utf-8"},body:JSON.stringify(n),method:"POST",mode:"cors",credentials:"omit"}).catch(()=>{})}catch(t){}}buildMetricBody(t,e){const n=1e6*Date.now();return{resourceMetrics:[{resource:{attributes:[{key:"service.name",value:{stringValue:this.serviceName}}]},scopeMetrics:[{scope:{name:this.scopeName,version:"1.0.0",attributes:[]},metrics:[{name:t,unit:"1",sum:{aggregationTemporality:1,isMonotonic:!0,dataPoints:[{asDouble:1,startTimeUnixNano:n,timeUnixNano:n,attributes:Mt(e)}]}}]}]}]}}};function Mt(t){return Object.keys(t).reduce((e,n)=>{const r=t[n];return null==r||e.push({key:n,value:At(r)}),e},[])}function At(t){return"string"==typeof t?{stringValue:t}:"boolean"==typeof t?{boolValue:t}:isFinite(t)?Math.floor(t)===t?{intValue:t}:{doubleValue:t}:{stringValue:String(t)}}Tt.instance=void 0;const Pt=new Tt;const Nt={};function It(t){const e=function(t){try{var e,n;const o=null===(e=performance)||void 0===e||null===(n=e.getEntriesByType)||void 0===n?void 0:n.call(e,"resource");if(!o)return;const a=window.location.host;for(let e=o.length-1;e>=0;e--){var r,i;const n=o[e];if(!st(n,a))continue;const s=null===(r=n.serverTiming)||void 0===r||null===(i=r.find(e=>e.name===t))||void 0===i?void 0:i.description;if(s)return s}return}catch{return}}(t);return e&&(Nt[t]=e),e}function kt(t){if(pt()){const e=It(t);if(e)return{value:e,source:"resource"};const n=Nt[t];if(n)return{value:n,source:"cache"}}const e=function(t){try{var e,n,r,i;return null===(e=performance)||void 0===e||null===(n=e.getEntriesByType("navigation")[0])||void 0===n||null===(r=n.serverTiming)||void 0===r||null===(i=r.find(e=>e.name==t))||void 0===i?void 0:i.description}catch{return}}(t);return e?{value:e,source:"navigation"}:{value:void 0,source:null}}function qt(t,e,{generateFallback:n=!1,tag:r="unknown"}={}){if(!wt()&&!yt(G))return;const i=function(t){var e,n,r,i,o,a;const s=K();if(!s)return;const c=null===(e=s.Shopify)||void 0===e||null===(n=e.customerPrivacy)||void 0===n||null===(r=n.cachedToken)||void 0===r?void 0:r[t],u=null===(i=s.Shopify)||void 0===i||null===(o=i.customerPrivacy)||void 0===o||null===(a=o.cachedToken)||void 0===a?void 0:a[t+"_expires_at"];return!c||!u||u<(new Date).getTime()?void 0:bt(c)}(t);if(i)return i;const o=K();if(null!=o&&o.ShopPay)return function(t){const e=K();if(!e||!e.ShopPay)return;const n={_shopify_y:"trackingUnique",_shopify_s:"trackingVisit"}[t];if(!n)return;return bt(e.ShopPay[n])}(t);const a=e();if(a)return a;const s=function(t){const e=t.replace("_shopify",""),n=kt(e).value,r=Number(kt(`${e}e`).value);if(!r||Date.now()/1e3e.trim().startsWith(`${t}=`)))||void 0===r||null===(i=r.split("=")[1])||void 0===i?void 0:i.trim()}catch{return}}(t));if(c)return c;try{!function(t,e=!1,n="unknown"){var r,i;Pt.increment("consent_tracking_api_tracking_token_missing");const o=K();(new it).produce("trackingTokenMissing",JSON.stringify({token:t,hasTrekkie:!(null==o||!o.ShopifyAnalytics),hasTheme:!(null==o||null===(r=o.Shopify)||void 0===r||!r.theme),domain:null==o||null===(i=o.location)||void 0===i?void 0:i.hostname,fallbackRequested:e,tag:n}))}(t,n,r)}catch{}}function Et(){return wt()}function Ut(t,e){if(!{}.hasOwnProperty.call(t,e))throw new TypeError("attempted to use private field on non-instance");return t}!function(){try{var t,e,n,r,i;if(H()||F())return;if("function"!=typeof(null===(t=performance)||void 0===t?void 0:t.setResourceTimingBufferSize))return;if((null!==(e=null===(n=(r=performance).getEntriesByType)||void 0===n||null===(i=n.call(r,"resource"))||void 0===i?void 0:i.length)&&void 0!==e?e:0)>=1e3)return;performance.setResourceTimingBufferSize(1e3)}catch{}}();var jt=0;function Ht(t){return"__private_"+jt+++"_"+t}function Ot(t){return Object.entries(t).map(([t,e])=>({key:t,value:{stringValue:String(e)}}))}function Wt(t){if(Array.isArray(t))return{arrayValue:{values:t.map(t=>Wt(t))}};switch(typeof t){case"boolean":return{boolValue:Boolean(t)};case"number":return{doubleValue:Number(t)};default:return{stringValue:String(t)}}}const Kt=function(t,e,n){const r=[0];for(let i=0;i{t.attributes={...Ut(this,Jt)[Jt],...t.attributes}});const t=Ut(this,Zt)[Zt];Ut(this,Zt)[Zt]=[],await this.exportByKeepalive(t,(t,e)=>Ut(this,Ft)[Ft].exportMetrics(this.aggregateMetrics(t),e))}async exportLogs(){const t=Ut(this,Rt)[Rt];Ut(this,Rt)[Rt]=[],await this.exportByKeepalive(t,(t,e)=>Ut(this,Ft)[Ft].exportLogs(this.formatLogs(t),e))}aggregateMetrics(t){const e={};return t.forEach(t=>{switch(t.type){case"histogram":!function(t,e){var n;const{name:r,value:i,unit:o,timeUnixNano:a,attributes:s}=e,c=null!==(n=e.bounds)&&void 0!==n?n:Kt,u=new Array(c.length+1).fill(0);t[r]||={name:r,unit:o||"1",histogram:{aggregationTemporality:1,dataPoints:[]}};for(let t=0;t0?d:0,bucketCounts:r>0?[1]:[]};t[n].exponentialHistogram.dataPoints.push({attributes:Ot(null!=a?a:{}),startTimeUnixNano:o,timeUnixNano:o,count:1,sum:c,scale:u,zeroCount:f,positive:p,negative:h,min:c,max:c,zeroThreshold:0})}(e,t);break;case"counter":!function(t,e){const{name:n,value:r,unit:i,timeUnixNano:o,attributes:a}=e;t[n]||={name:n,unit:i||"1",sum:{aggregationTemporality:1,isMonotonic:!0,dataPoints:[]}},t[n].sum.dataPoints.push({startTimeUnixNano:o,timeUnixNano:o,asDouble:r,attributes:Ot(null!=a?a:{})})}(e,t);break;case"gauge":!function(t,e){const{name:n,value:r,unit:i,timeUnixNano:o,attributes:a}=e;t[n]||={name:n,unit:i||"1",gauge:{dataPoints:[]}},t[n].gauge.dataPoints.push({startTimeUnixNano:o,timeUnixNano:o,asDouble:r,attributes:Ot(null!=a?a:{})})}(e,t)}}),Object.values(e)}async exportByKeepalive(t,e){if(0===t.length)return;const n=[],r=[];t.forEach(t=>{var e;null===(e=t.requiresKeepalive)||void 0===e||e?n.push(t):r.push(t)});const i=[n.length>0?e(n,{keepalive:!0}):void 0,r.length>0?e(r,{keepalive:!1}):void 0].filter(t=>void 0!==t);await Promise.all(i)}formatLogs(t){return t.map(t=>{const e={timeUnixNano:t.timeUnixNano,observedTimeUnixNano:t.timeUnixNano,attributes:(n={...Ut(this,Jt)[Jt],...t.attributes},Object.entries(n).map(([t,e])=>({key:t,value:Wt(e)})))};var n;return t.body&&(e.body={stringValue:t.body}),e})}}var Xt=Ht("url"),Yt=Ht("serviceName"),Gt=Ht("logger"),$t=Ht("fetchFn"),Qt=Ht("maxPayloadSizeBytes");class te{constructor(t,e,n){var r;Object.defineProperty(this,Xt,{writable:!0,value:void 0}),Object.defineProperty(this,Yt,{writable:!0,value:void 0}),Object.defineProperty(this,Gt,{writable:!0,value:void 0}),Object.defineProperty(this,$t,{writable:!0,value:void 0}),Object.defineProperty(this,Qt,{writable:!0,value:void 0}),Ut(this,Xt)[Xt]=t.replace(/\/v1\/(logs|metrics|traces)\/?$/,""),Ut(this,Yt)[Yt]=e,Ut(this,Gt)[Gt]=null==n?void 0:n.logger,Ut(this,$t)[$t]=null==n?void 0:n.fetchFn,Ut(this,Qt)[Qt]=null!==(r=null==n?void 0:n.maxPayloadSizeBytes)&&void 0!==r?r:51200}async exportMetrics(t,e){var n;const r=null===(n=null==e?void 0:e.keepalive)||void 0===n||n;await this.exportBatches("/v1/metrics",[...t],t=>({resourceMetrics:[{resource:{attributes:[{key:"service.name",value:{stringValue:Ut(this,Yt)[Yt]}}]},scopeMetrics:[{scope:{name:"open-telemetry-mini-client",version:"1.1.0",attributes:[]},metrics:t}]}]}),r)}async exportLogs(t,e){var n;const r=null===(n=null==e?void 0:e.keepalive)||void 0===n||n;await this.exportBatches("/v1/logs",[...t],t=>({resourceLogs:[{resource:{attributes:[{key:"service.name",value:{stringValue:Ut(this,Yt)[Yt]}}]},scopeLogs:[{scope:{name:"open-telemetry-mini-client",version:"1.1.0",attributes:[]},logRecords:t}]}]}),r)}async exportTo(t,e,n){var r;const i=JSON.stringify(t),o=(new TextEncoder).encode(i).length;if(o>Ut(this,Qt)[Qt])throw new ne(`Payload size ${o} exceeds ${Ut(this,Qt)[Qt]} bytes`);const a=await this.exporterFetch()(`${Ut(this,Xt)[Xt]}${e}`,{method:"POST",keepalive:n,headers:{"Content-Type":"application/json"},body:i});if(null===(r=Ut(this,Gt)[Gt])||void 0===r||r.log({status:a.status}),!a.ok){if(400===a.status){const t=await a.text();throw new ee(`Invalid OpenTelemetry Data: ${t}`)}if(429===a.status||503===a.status){const e=await a.text(),n=a.headers.get("Retry-After"),r=n?{seconds:Number(n)}:void 0;throw new ee("Server did not accept data",{errorData:e,retryAfter:r,body:t})}if(401===a.status||403===a.status){const e=await a.text();throw new re(`Authentication failed: ${a.status} ${401===a.status?"Unauthorized":"Forbidden"}`,{errorData:e,body:t})}throw new ee(`Server responded with ${a.status}`)}}exporterFetch(){return Ut(this,$t)[$t]||fetch}async exportBatches(t,e,n,r){let i=e.length;for(;e.length>0;)try{const o=e.slice(0,i);await this.exportTo(n(o),t,r),e.splice(0,i)}catch(t){if(!(t instanceof ne&&i>1))throw t;i=Math.ceil(i/2)}}}class ee extends Error{constructor(t,e){super(t),this.metadata=void 0,this.name="OpenTelemetryClientError",this.metadata=e}}class ne extends Error{constructor(...t){super(...t),this.name="PayloadTooLargeError"}}class re extends Error{constructor(t,e){super(t),this.name="AuthenticationFailedError",this.metadata=void 0,this.name="AuthenticationFailedError",this.metadata=e}}const ie="",oe="1",ae="0",se="p",ce="a",ue="m",le="t",de="m",fe="a",he="p",pe="s",me=()=>"undefined"==typeof window;function ve(t,...e){if(0===e.length)return t;const n=e[0];return t[n]||(t[n]={}),ve(t[n],...e.slice(1))}function ge(t){try{return decodeURIComponent(t)}catch(t){return""}}function ye(){if(!me())return window}function we(){try{return"undefined"!=typeof PerformanceServerTiming}catch{return!1}}function Se(t,e=!1){const n=function(){try{return document.cookie}catch{return!1}}()?document.cookie.split("; "):[];for(let e=0;e{});console.log("Monorail event from consent API:",r,n)}catch(t){}}}function Ce(){var t,e;return me()?{}:(null===(t=window.Shopify)||void 0===t||null===(e=t.customerPrivacy)||void 0===e?void 0:e.config)||{}}be.instance=void 0;const Le="_cmp";function ze(t=Le){let e;if(e=Te()&&Be(()=>function(t=Le){var e,n;const r=null===(e=performance)||void 0===e||null===(n=e.getEntriesByType)||void 0===n?void 0:n.call(e,"resource");let i=xe[t];for(let e=r.length-1;e>=0;e--){let n=_e(r[e],t);if(n){i=n;break}}return xe[t]=i,i}(t))||Be(()=>De(t)),!e){if(t!==Le)return;let e;try{e=sessionStorage.getItem("consentHeader")}catch{}return e||void 0}try{e=decodeURIComponent(e)}catch{}return e}function Be(t){try{return t()}catch{return}}function De(t=Le){var e,n;if(!Me()&&!function(){try{const t=performance.getEntriesByType("navigation")[0].serverTiming;return!!t&&0!=t.length}catch{return!1}}()){const t=new be;let e="failed_to_fetch";try{e=navigator.userAgent}catch{}t.produce("navigationServerTiming",JSON.stringify({failed:!0,userAgent:e,apiSupported:we()})),function(){if(Me())return;ve(ye(),"Shopify","customerPrivacy").serverTimingSupportVerified=!0}()}const r=null===(e=performance)||void 0===e||null===(n=e.getEntriesByType)||void 0===n?void 0:n.call(e,"navigation");if(!r)return;const i=r.map(e=>_e(e,t)).find(t=>t);if(i&&t===Le)try{sessionStorage.setItem("consentHeader",i)}catch{}return i}const xe={};function _e(t,e=Le){var n,r;if(t)return null===(n=t.serverTiming)||void 0===n||null===(r=n.find(t=>t.name==e))||void 0===r?void 0:r.description}function Te(){var t,e;const n=ye();return!0===(null==n||null===(t=n.Shopify)||void 0===t||null===(e=t.customerPrivacy)||void 0===e?void 0:e.backendConsentEnabled)||!0===Ce().asyncVisitorState}function Me(){var t,e;const n=ye();return null==n||null===(t=n.Shopify)||void 0===t||null===(e=t.customerPrivacy)||void 0===e?void 0:e.serverTimingSupportVerified}function Ae(){if(!me()){var t,e;const n=(null===(t=window.Shopify)||void 0===t||null===(e=t.customerPrivacy)||void 0===e?void 0:e.injectedConsent)||Ce().injectedConsent;return n?ge(n):void 0}}function Pe(){let t;if(t=me()?Ae():function(){var t,e;const n=null===(t=window.Shopify)||void 0===t||null===(e=t.customerPrivacy)||void 0===e?void 0:e.cachedConsent;return n?ge(n):void 0}()||Ae()||new URLSearchParams(window.location.search).get("_cs")||void 0||Se("_tracking_consent")||ze(),void 0!==t)return function(t){if("%"==t.slice(0,1))try{t=decodeURIComponent(t)}catch{}const e=t.slice(0,1);if("{"==e)return function(t){var e;let n;try{n=JSON.parse(t)}catch{return}if("2.1"!==n.v)return;if(null===(e=n.con)||void 0===e||!e.CMP)return;return n}(t);if("3"==e)return function(t){const e=t.slice(1).split("_"),[n,r,i,o,a]=e;let s,c;try{s=e[5]?JSON.parse(e.slice(5).join("_")):void 0}catch{}if(a){const t=a.replace(/\*/g,"/").replace(/-/g,"+"),e=atob(t);let n="";for(let t=0;tt.slice(0,e)+"-"+t.slice(e),n)}function u(t){const e=n.split(".")[0];return e.includes(t.toLowerCase())?ae:e.includes(t.toUpperCase())?oe:ie}function l(t){return n.includes(t.replace("t","s").toUpperCase())}return{v:"3",con:{CMP:{[fe]:u(fe),[he]:u(he),[de]:u(de),[pe]:u(pe)}},region:r||"",cus:s,purposes:{[ce]:l(ce),[se]:l(se),[ue]:l(ue),[le]:l(le)},sale_of_data_region:"t"==o,display_banner:"t"==i,consent_id:c}}(t);return}(t)}function Ne(t){const e=function(){try{let t=Pe();if(!t)return;return t}catch{return}}();if(!e||!e.purposes)return!0;const n=e.purposes[t];return"boolean"!=typeof n||n}const Ie=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[0-9a-f]{4}-[0-9a-f]{12}$/;function ke(t){if("string"!=typeof t)return;if(!function(t){return!!t&&Ie.test(t.trim().toLowerCase())}(t))return;const e=t.trim();return"00000000-0000-0000-0000-000000000000"!==e&&"00000000-0000-0000-5000-000000000000"!==e?e:void 0}function qe(t){if(!me())try{var e,n;return null===(e=document.querySelector(`meta[name="${t}"]`))||void 0===e||null===(n=e.getAttribute("content"))||void 0===n?void 0:n.trim()}catch{return}}function Ee(t){const e=qe(t);if(e)try{const t=JSON.parse(e);return"string"==typeof t?t.trim():void 0}catch{return}}function Ue(t){return void 0!==t&&Date.now()>t}function je(t){const e=qe(t);if(!e)return!1;const n=e.replace(/^"(.*)"$/,"$1").toLowerCase();return"true"===n||"t"===n}function He(t,e){if(je("serialized-isNewCookieStorageEnabled")){const t=ke(Ee(e));if(t&&!Ue(function(t){const e=Ee(`${t}Expiration`);if(!e)return;const n=Number(e);return Number.isFinite(n)?n:void 0}(e)))return t}if(je("new-cookie-storage-activated")){const e=ke(qe(t));if(e&&!Ue(function(t){if(!me())try{var e,n;const r=null===(e=document.querySelector(`meta[name="${t}"]`))||void 0===e||null===(n=e.getAttribute("data-expiration"))||void 0===n?void 0:n.trim();if(!r)return;const i=Number(r);return Number.isFinite(i)?i:void 0}catch{return}}(t)))return e}}function Oe(){return He("shopify-y","serialized-shopifyY")}function We(){return He("shopify-s","serialized-shopifyS")}class Ke{constructor(){if(this.endpoint="https://otlp-http-production.shopifysvc.com/v1/metrics",this.serviceName="consent-tracking-api",this.scopeName="consent-tracking-api-opentelemetry",Ke.instance)return Ke.instance;Ke.instance=this}increment(t,e={}){if(!me()&&t)try{const n=this.buildMetricBody(t,e);if(window.location.host.endsWith("spin.dev"))return void console.log("OpenTelemetry metric from consent API:",n);if("function"!=typeof fetch)return;return fetch(this.endpoint,{headers:{accept:"*/*","content-type":"application/json; charset=utf-8"},body:JSON.stringify(n),method:"POST",mode:"cors",credentials:"omit"}).catch(()=>{})}catch(t){}}buildMetricBody(t,e){const n=1e6*Date.now();return{resourceMetrics:[{resource:{attributes:[{key:"service.name",value:{stringValue:this.serviceName}}]},scopeMetrics:[{scope:{name:this.scopeName,version:"1.0.0",attributes:[]},metrics:[{name:t,unit:"1",sum:{aggregationTemporality:1,isMonotonic:!0,dataPoints:[{asDouble:1,startTimeUnixNano:n,timeUnixNano:n,attributes:Fe(e)}]}}]}]}]}}}function Fe(t){return Object.keys(t).reduce((e,n)=>{const r=t[n];return null==r||e.push({key:n,value:Je(r)}),e},[])}function Je(t){return"string"==typeof t?{stringValue:t}:"boolean"==typeof t?{boolValue:t}:isFinite(t)?Math.floor(t)===t?{intValue:t}:{doubleValue:t}:{stringValue:String(t)}}Ke.instance=void 0;const Ze=new Ke;const Re={},Ve=/^https?:\/\/([^/]+)(\/api\/(?:unstable|2\d{3}-\d{2})\/graphql\.json(?=$|\?))?/;function Xe(t){if(Te()){const e=function(t){try{var e,n;const o=null===(e=performance)||void 0===e||null===(n=e.getEntriesByType)||void 0===n?void 0:n.call(e,"resource");if(o){const e=window.location.host;for(let n=o.length-1;n>=0;n--){var r,i;const a=o[n];if("fetch"!==a.initiatorType)continue;const s=a.name.match(Ve);if(!s)continue;const[,c,u]=s;if(!(c===e||u&&(null==c?void 0:c.endsWith(`.${e}`))))continue;const l=null===(r=a.serverTiming)||void 0===r||null===(i=r.find(e=>e.name===t))||void 0===i?void 0:i.description;if(l)return Re[t]=l,l}}return}catch{return}}(t);if(e)return{value:e,source:"resource"};const n=Re[t];if(n)return{value:n,source:"cache"}}const e=function(t){try{var e,n,r,i;return null===(e=performance)||void 0===e||null===(n=e.getEntriesByType("navigation")[0])||void 0===n||null===(r=n.serverTiming)||void 0===r||null===(i=r.find(e=>e.name==t))||void 0===i?void 0:i.description}catch{return}}(t);return e?{value:e,source:"navigation"}:{value:void 0,source:null}}function Ye(t,e,n=!1){if(!Ne(ce)&&!Ne(ue))return;const r=function(t){var e,n,r,i,o,a;const s=ye();if(!s)return;const c=null===(e=s.Shopify)||void 0===e||null===(n=e.customerPrivacy)||void 0===n||null===(r=n.cachedToken)||void 0===r?void 0:r[t],u=null===(i=s.Shopify)||void 0===i||null===(o=i.customerPrivacy)||void 0===o||null===(a=o.cachedToken)||void 0===a?void 0:a[t+"_expires_at"];return!c||!u||u<(new Date).getTime()?void 0:c}(t);if(r)return r;const i=ye();if(null!=i&&i.ShopPay)return function(t){const e=ye();if(!e||!e.ShopPay)return;const n={_shopify_y:"trackingUnique",_shopify_s:"trackingVisit"}[t];if(!n)return;const r=e.ShopPay[n];if(!r)return;const i=ke(r);return i||void 0}(t);const o=e();if(o)return o;const a=function(t){const e=t.replace("_shopify",""),n=Xe(e).value,r=Number(Xe(`${e}e`).value);return r&&Date.now()/1e3>r?void 0:n}(t);if(a)return a;const s=function(t){try{var e,n,r,i;return null===(e=document.cookie)||void 0===e||null===(n=e.split(";"))||void 0===n||null===(r=n.find(e=>e.trim().startsWith(`${t}=`)))||void 0===r||null===(i=r.split("=")[1])||void 0===i?void 0:i.trim()}catch{return}}(t);if(s)return s;try{!function(t,e=!1){var n,r;Ze.increment("consent_tracking_api_tracking_token_missing");const i=ye();(new be).produce("trackingTokenMissing",JSON.stringify({token:t,hasTrekkie:!(null==i||!i.ShopifyAnalytics),hasTheme:!(null==i||null===(n=i.Shopify)||void 0===n||!n.theme),domain:null==i||null===(r=i.location)||void 0===r?void 0:r.hostname,fallbackRequested:e}))}(t,n)}catch{}}function Ge(t=!1){return Ye("_shopify_y",Oe,t)}function $e(t=!1){return Ye("_shopify_s",We,t)}var Qe="2.5.1";function tn(t,e){const n=en();return tn=function(e,r){let i=n[e-=160];if(void 0===tn.bhGkvl){tn.KeTFUQ=function(t){let e="",n="";for(let n,r,i=0,o=0;r=t.charAt(o++);~r&&(n=i%4?64*n+r:r,i++%4)?e+=String.fromCharCode(255&n>>(-2*i&6)):0)r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(r);for(let t=0,r=e.length;t>(-2*i&6)):0)r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(r);for(let t=0,r=e.length;t0&&n++,(t[nn(468)][nn(480)]&&t[nn(468)][nn(480)][nn(476)]>0||typeof e===nn(434)&&e[nn(459)](nn(449)))&&n++,function(t){const e=t[nn(451)][nn(456)]||t[nn(441)][nn(471)][nn(461)],n=t[nn(451)][nn(465)]||t[nn(441)][nn(471)][nn(481)];if(!e||!n||e<=2||n<=2)return!1;const r=e/n;return r>=.2&&r<=5}(t)&&n++,typeof t[nn(451)][nn(458)]!==nn(444)&&n++;try{const t=(new Date)[nn(435)]();t>-840&&t<840&&n++}catch{return n>=3?1:0}return n>=3?1:0}catch{return 0}}function on(){const t=["z2v0vgLTzxPVBMvpzMzZzxq","i2zMzG","BgfUz3vHz2vZ","zM9UDa","DxnLCKfNzw50","ntq2n0jRwMfcta","zg9JDw1LBNq","u2HVCgLMEsbtDg9YzwzYB250","yMX1zq","Dw5KzwzPBMvK","mJy4mdKXnM1zDM54qq","zMLSBfn0EwXL","Dg9eyxrHvvjm","DgvZDa","tw9IAwXL","zMLSBfjLy3q","D2LUzg93","mtzWEcbbCMLHBa","nJmWndy0wwDzBgXY","nJCYndy5mgzpshjfyG","zMLSBfrLEhq","Aw5UzxjxAwr0Aa","z2v0q29UDgv4Da","zgv2AwnLugL4zwXsyxrPBW","Aw5JBhvKzxm","y2fUDMfZ","y2XPzw50v2LKDgG","AgvPz2H0","mZC5nZyZmKvmuuX1sq","mJDswwfrshC","Aw5UzxjizwLNAhq","y3jLyxrLtgLUzwfYr3jHzgLLBNq","nZvjB2HmA3C","BMf2AwDHDg9Y","mZG0mtbfsen1D0S","nJeWntKWBw1ywvPZ","zg9JDw1LBNrfBgvTzw50","nduZmdmWzKPJC2Pu","mJfkv3HbDhe","D2vIzhjPDMvY","y3jLyxrLrwXLBwvUDa","BgvUz3rO","CMvK","ywrKq29SB3jtDg9W","D2LKDgG","CgX1z2LUCW","y2XPzw50sgvPz2H0","C3rYAw5N"];return(on=function(){return t})()}function an(t){const e=function(t){try{return t[nn(468)][nn(474)]?1:0}catch{return 0}}(t),[n,r]=function(t){try{const e=t[nn(468)][nn(439)];try{return[e,String(e)]}catch{return[e,void 0]}}catch{return[void 0,void 0]}}(t),i=function(t){return void 0!==t&&/bot|crawler|spider|scraper/i[nn(448)](t)?0:1}(r),o=function(t){try{const e=t[nn(441)][nn(475)](nn(460));e[nn(479)]=200,e[nn(462)]=50;const n=e[nn(457)]("2d");if(null===n)return 0;const r=n[nn(466)](0,0,200,0);r[nn(478)](0,nn(477)),r[nn(478)](1,nn(443)),n[nn(446)]=r,n[nn(450)](0,0,200,50),n[nn(446)]=nn(436),n[nn(438)]=nn(452),n[nn(455)](nn(442),33,30);const i=e[nn(447)]();return i&&i[nn(476)]>50?1:0}catch{return 0}}(t);return{wd:e,ua:i,cv:o,br:rn(t,n)}}function sn(t,e){var n=cn();return sn=function(e,r){var i=n[e-=280];if(void 0===sn.BtRVEv){sn.Tdpjqm=function(t){for(var e,n,r="",i="",o=0,a=0;n=t.charAt(a++);~n&&(e=o%4?64*e+n:n,o++%4)?r+=String.fromCharCode(255&e>>(-2*o&6)):0)n="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(n);for(var s=0,c=r.length;s>(-2*i&6)):0)r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(r);for(let t=0,r=e.length;t=this[un(458)]))try{await this[un(471)][un(476)]()}catch(t){this[un(465)]&&console[un(478)](un(461)+t)}}[un(457)](){this[un(455)]&&clearTimeout(this[un(455)]),this[un(455)]=window[un(456)](()=>{this[un(477)]()[un(468)](()=>{})},this[un(479)])}}function dn(){const t=["w0vYCM9Yxsa","ntaXmtu3oe5is1H2Aq","mta2mg5rq0zwwq","mty4otvLC3zPtwi","Bg9NrxjYB3i","mJCZntGZoev1sLLACq","zxjYB3jgBhvZAfrPBwvVDxrjza","C2v0vgLTzw91Da","C2nOzwr1BgvfCNjVCKzSDxnO","C2fTCgXLuMf0zq","ndKWruHLEMLq","ntaXotyWBeXsrfjV","w1niu10Gt3rLBcbLEhbVCNqGBg9NCYbMywLSDxjLoIa","BwvZC2fNzq","mJmXELfoD3Dj","C3rHy2S","C3rKB3v0","zxjYB3i","nZi0AePeqKvv","y2f0y2G","w1niuYbfCNjVCL0G","mJK2mLvRBerjuW","B3rLBenSAwvUDa","mtzSDu5JBe4","nJGXntDcv0rLCMy","C2fTCgXLs2v5","mtiZotCYouXZue5KAa","zxHWB3j0tg9NCW","zMX1C2HpDgvStg9NCW","Bg9N","zxjYB3jgBhvZAerLBgf5"];return(dn=function(){return t})()}function fn(){const t=["BgvUz3rO","mtaYnta3ntDKA0TxCNq","ofnNzfbdrG","oteWn2Tfy3npBq","mZvmu1DNr1G","mtGYmZqXoernsenerq","mLrnBeLIBG","ywjZ","mtK4mtK2r1bLzvj5","mZGZnJaWmfLbz2fUrq","ndm1mgrnA3HRDW","odG2nda5mwDYDvfyqW","y2HHCKnVzgvbDa","otq0mtu5CefRrufy"];return(fn=function(){return t})()}function hn(t,e){const n=fn();return hn=function(e,r){let i=n[e-=249];if(void 0===hn.EhdtRA){hn.GozqqI=function(t){let e="",n="";for(let n,r,i=0,o=0;r=t.charAt(o++);~r&&(n=i%4?64*n+r:r,i++%4)?e+=String.fromCharCode(255&n>>(-2*i&6)):0)r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(r);for(let t=0,r=e.length;tt+e.s,0)/t[_n(462)],n=t[_n(477)]((t,n)=>t+(n.s-e)**2,0)/(t[_n(462)]-1),r=Math[_n(472)](n);return{speed:e,jitter:r}}function Cn(t,e,n,r,i,o,a,s,c,u,l,d,f){const h=Math[_n(524)](1e3,t),p=Math[_n(524)](1e3,n),m=Math[_n(524)](1e3,o),v=Math[_n(524)](1e3,s),g=Math[_n(524)](1e3,a),y=Math[_n(524)](1e3,c),w=[];if(e[_n(462)]>=3)for(let t=1;t5e-4){e=!0;break}n=r.s}else n=r.s;return e}(w),b=function(t){if(t[_n(462)]<3)return 0;let e=0,n=0;for(let r=1;r2*Math.PI-Math.PI/12)&&e++,n++}return n>0?e/n:0}(e),{speed:C,jitter:L}=bn(w);let z=0,B=0;if(r[_n(462)]>1){const t=new Set(r[_n(336)](t=>Math[_n(349)](t.x/20)+","+Math[_n(349)](t.y/20)))[_n(321)];z=t>1?1:0,B=r[_n(477)]((t,e)=>t+e[_n(383)],0)/r[_n(462)]}const D=i[_n(477)]((t,e)=>(null===e[_n(387)]||t[_n(376)](e[_n(387)]),t),[]),{rhythmConsistency:x,jitter:_}=function(t){if(t[_n(462)]<2)return{rhythmConsistency:0,jitter:0};const e=t[_n(477)]((t,e)=>t+e,0)/t[_n(462)],n=t[_n(477)]((t,n)=>(t??0)+((n??0)-e)**2,0)/t[_n(462)],r=Math[_n(472)](n);return{rhythmConsistency:0===r?1:Math[_n(429)](0,1-r/e),jitter:r/e}}(D),T=D[_n(462)]>0?D[_n(477)]((t,e)=>t+e,0)/D[_n(462)]:0,M=[];if(u[_n(462)]>=3)for(let t=1;tu[t-1].p?_n(327):"up";M[_n(376)]({s:r,dir:i,t:u[t].t})}const{speed:A,jitter:P}=bn(M),N=function(t){if(t[_n(462)]<2)return 0;let e=0;for(let n=1;n=500&&t[r].t-n>=500&&(e++,n=t[r].t);return e}(M)),{speed:k,jitter:q}=bn(l),E=function(t){if(t[_n(462)]<2)return 0;let e=0;for(let n=1;n=500&&e++;return e}(l)),j=Math[_n(349)]((f-d)/1e3);return{ma:h,ca:p,ka:m,sa:v,ta:y,kba:g,t:Math[_n(524)](3600,j),nm:S?1:0,ms:zn(b),mj:zn(L),msp:zn(C),vc:z,cp:zn(B),rc:zn(x),kj:zn(_),ki:zn(T),ss:zn(A),sj:zn(P),ssm:zn(N),sp:I,ts:zn(k),tj:zn(q),tp:U,tsm:zn(E)}}function Ln(t,e){let n=0;return(...r)=>{const i=typeof performance!==_n(463)?performance[_n(425)]():Date[_n(425)]();i-n>=e&&(n=i,t(...r))}}function zn(t){return Math[_n(444)](100*t)/100}function Bn(t){return{wd:t[_n(391)],ua:t[_n(445)],cf:t[_n(504)],be:t[_n(375)],nm:t[_n(416)],nc:t[_n(307)],ka:t[_n(397)],sa:t[_n(411)],ta:t[_n(325)],pt:t[_n(396)],mp:t[_n(480)],sd:t[_n(356)]}}class Dn{[_n(370)];[_n(355)];[_n(533)];[_n(373)];[_n(362)];[_n(502)]=!1;constructor(t,e,n=wn()){const r={shopId:0,updateInterval:5e3,debug:!1,beaconEndpoint:vn,beaconRetryLimit:3,maxSilenceMs:18e5,exportWithFetch:!1,logsSampleRate:1,candidateSignalsEnabled:!1,candidateActivePageFlushEnabled:!0,candidateUpdateInterval:5e3,candidateSampleRate:100};this[_n(370)]={...r,...e},this[_n(533)]=n,this[_n(373)]=t,this[_n(355)]={startTime:Date[_n(425)](),lastUpdateTime:null,environmentChecked:!1,sessionData:null,mouseActivity:0,clickActivity:0,keyActivity:0,keyboardBurstActivity:0,scrollActivity:0,touchActivity:0,mousePositions:[],clickPositions:[],keyEvents:[],scrollEvents:[],keyboardBursts:[],touchEvents:[],lastTouchEvent:null};const i=this[_n(492)]();this[_n(355)][_n(515)]={lastSignals:i,lastProcessTime:0,lastSuccessfulSendTime:0,retryCount:0},this[_n(362)]=(this[_n(370)][_n(399)],this[_n(370)][_n(302)],this[_n(533)][_n(522)],this[_n(533)][_n(528)],this[_n(370)][_n(446)],this[_n(370)][_n(436)],null)}[_n(478)](){(async()=>{const t=this[_n(348)]();this[_n(326)](t),await Promise[_n(434)](),await this[_n(328)](!0),this[_n(370)][_n(409)]&&this[_n(362)]?.[_n(353)](),this[_n(533)][_n(528)][_n(360)](()=>{this[_n(438)]()},100);const e=()=>{const t=Date[_n(425)](),n=t-(this[_n(355)][_n(523)]||t),r=Math[_n(429)](0,this[_n(370)][_n(509)]-n),i=()=>{this[_n(533)][_n(528)][_n(335)]?this[_n(355)][_n(385)]=this[_n(533)][_n(528)][_n(335)](()=>{this[_n(328)]()[_n(489)](()=>this[_n(373)][_n(450)]())[_n(489)](()=>{e()})},{timeout:2e3}):this[_n(328)]()[_n(489)](()=>this[_n(373)][_n(450)]())[_n(489)](()=>{e()})};r>0?this[_n(533)][_n(528)][_n(360)](i,r):i()};e()})()[_n(324)](t=>{this[_n(373)][_n(319)](t,_n(478))})}[_n(365)](){try{this[_n(362)]?.[_n(365)]()}catch(t){this[_n(373)][_n(319)](t,_n(531))}this[_n(355)][_n(309)]&&this[_n(533)][_n(528)][_n(394)](this[_n(355)][_n(309)]),this[_n(355)][_n(385)]&&this[_n(533)][_n(528)][_n(342)]&&this[_n(533)][_n(528)][_n(342)](this[_n(355)][_n(385)]),this[_n(355)][_n(519)]&&(this[_n(533)][_n(522)][_n(337)](_n(357),this[_n(355)][_n(519)][_n(357)]),this[_n(533)][_n(522)][_n(337)](_n(525),this[_n(355)][_n(519)][_n(525)]),this[_n(533)][_n(522)][_n(337)](_n(466),this[_n(355)][_n(519)][_n(466)]),this[_n(533)][_n(522)][_n(337)](_n(424),this[_n(355)][_n(519)][_n(424)]),_n(350)in window&&this[_n(355)][_n(519)][_n(426)]&&this[_n(355)][_n(519)][_n(422)]&&this[_n(355)][_n(519)][_n(311)]&&(this[_n(533)][_n(522)][_n(337)](_n(426),this[_n(355)][_n(519)][_n(426)]),this[_n(533)][_n(522)][_n(337)](_n(422),this[_n(355)][_n(519)][_n(422)]),this[_n(533)][_n(522)][_n(337)](_n(311),this[_n(355)][_n(519)][_n(311)]))),this[_n(355)][_n(515)]?.[_n(371)]&&this[_n(533)][_n(528)][_n(394)](this[_n(355)][_n(515)][_n(371)]),this[_n(355)][_n(515)]=void 0}[_n(338)](){return this[_n(355)][_n(515)]?.[_n(521)]?Bn(this[_n(355)][_n(515)][_n(521)]):null}[_n(392)](){return this[_n(362)]?.[_n(338)]()??null}[_n(384)](){return this[_n(362)]?.[_n(496)]()??null}[_n(348)](){const t={v1:an(this[_n(533)])};return this[_n(355)][_n(527)]=t.v1,this[_n(355)][_n(313)]=!0,t[_n(314)]}[_n(537)](t,e){return n=>{try{t(n)}catch(t){this[_n(373)][_n(319)](t,_n(447)+e)}}}[_n(438)](){const t=Ln(this[_n(537)](t=>{this[_n(355)][_n(345)]++,this[_n(355)][_n(428)][_n(462)]>=10&&this[_n(355)][_n(428)][_n(512)](),this[_n(355)][_n(428)][_n(376)]({x:t[_n(457)],y:t[_n(381)],t:t[_n(331)]})},_n(357)),100),e=this[_n(537)](t=>{this[_n(355)][_n(361)]++,requestAnimationFrame(()=>setTimeout(()=>{this[_n(355)][_n(310)][_n(462)]>=5&&this[_n(355)][_n(310)][_n(512)](),this[_n(355)][_n(310)][_n(376)]({x:t[_n(457)],y:t[_n(381)],t:t[_n(331)],pre:this[_n(380)](t)})},0))},_n(525)),n=this[_n(537)](t=>{this[_n(355)][_n(437)]++;const e=t[_n(312)];if([_n(453),_n(363),_n(379),_n(481)][_n(427)](e))return;const n=this[_n(355)][_n(517)][this[_n(355)][_n(517)][_n(462)]-1],r=t[_n(331)],i=n?r-n.t:null;this[_n(355)][_n(517)][_n(462)]>=10&&this[_n(355)][_n(517)][_n(512)](),this[_n(355)][_n(517)][_n(376)]({_0x3ba807:e,t:r,int:i}),null!==i&&i<100?(this[_n(355)][_n(535)][_n(376)](i),this[_n(355)][_n(535)][_n(462)]>=5&&(this[_n(355)][_n(330)]++,this[_n(355)][_n(535)]=[])):this[_n(355)][_n(535)]=[]},_n(466)),r=Ln(this[_n(537)](t=>{this[_n(355)][_n(538)]++;const e=t[_n(331)],n=window[_n(347)];this[_n(355)][_n(495)][_n(462)]>=10&&this[_n(355)][_n(495)][_n(512)](),this[_n(355)][_n(495)][_n(376)]({p:n,t:e})},_n(424)),200),i=this[_n(537)](t=>{t[_n(516)]&&0!==t[_n(516)][_n(462)]&&(this[_n(355)][_n(487)]++,this[_n(355)][_n(315)][_n(462)]>=10&&this[_n(355)][_n(315)][_n(512)](),this[_n(355)][_n(482)]={x:t[_n(516)][0][_n(457)],y:t[_n(516)][0][_n(381)],t:t[_n(331)],typ:_n(329),s:0,d:0})},_n(426)),o=Ln(this[_n(537)](t=>{if(!t[_n(516)]||0===t[_n(516)][_n(462)])return;const e={x:t[_n(516)][0][_n(457)],y:t[_n(516)][0][_n(381)]};if(this[_n(355)][_n(482)]){const n=this[_n(497)](this[_n(355)][_n(482)],e);this[_n(355)][_n(315)][_n(462)]>=10&&this[_n(355)][_n(315)][_n(512)]();const r={x:t[_n(516)][0][_n(457)],y:t[_n(516)][0][_n(381)],t:t[_n(331)],typ:_n(343),d:n,s:n/(t[_n(331)]-this[_n(355)][_n(482)].t)};this[_n(355)][_n(315)][_n(376)](r),this[_n(355)][_n(482)]=r}else{const e={x:t[_n(516)][0][_n(457)],y:t[_n(516)][0][_n(381)],t:t[_n(331)],typ:_n(343),s:0,d:0};this[_n(355)][_n(482)]=e}},_n(422)),200),a=this[_n(537)](t=>{this[_n(355)][_n(482)]=null},_n(311));this[_n(533)][_n(522)][_n(435)](_n(357),t,{passive:!0}),this[_n(533)][_n(522)][_n(435)](_n(525),e,{passive:!0}),this[_n(533)][_n(522)][_n(435)](_n(466),n,{passive:!0}),this[_n(533)][_n(522)][_n(435)](_n(424),r,{passive:!0}),_n(350)in window&&(this[_n(533)][_n(522)][_n(435)](_n(426),i,{passive:!0}),this[_n(533)][_n(522)][_n(435)](_n(422),o,{passive:!0}),this[_n(533)][_n(522)][_n(435)](_n(311),a,{passive:!0})),this[_n(355)][_n(519)]={mousemove:t,click:e,keydown:n,scroll:r,touchstart:i,touchmove:o,touchend:a}}async[_n(328)](t=!1){this[_n(404)](t),await this[_n(359)]({includeCandidateSignals:!t}),this[_n(355)][_n(523)]=Date[_n(425)]()}[_n(404)](t=!1){const e=Date[_n(425)]();let n=Math[_n(349)]((e-this[_n(355)][_n(526)])/1e3);null!==this[_n(355)][_n(523)]&&(n=Math[_n(349)]((e-this[_n(355)][_n(523)])/1e3)),this[_n(355)][_n(455)]?(this[_n(355)][_n(455)][_n(402)]+=t?1:0,this[_n(355)][_n(455)][_n(390)]+=n):this[_n(355)][_n(455)]={pageCount:1,sessionStart:this[_n(355)][_n(526)],duration:0}}[_n(473)](t,e=!1){this[_n(373)][_n(459)](_n(507)+t,e)}[_n(492)](){try{if(this[_n(533)][_n(528)][_n(530)]){const e=this[_n(533)][_n(528)][_n(530)][_n(333)](gn);if(e){const n=JSON[_n(430)](e);let r;return _n(391)in n?r=n:r={webdriver_detected:(t=n).wd,bot_user_agent:t.ua,canvas_fingerprint_normal:t.cf,browser_environment_normal:t.be,natural_mouse_activity:t.nm,natural_click_patterns:t.nc,keyboard_activity:t.ka,scroll_activity:t.sa,touch_activity:t.ta,significant_page_time:t.pt,multiple_pages_visited:t.mp,session_duration_reasonable:t.sd},r}}}catch(t){}var t;return null}[_n(432)](t){try{this[_n(533)][_n(528)][_n(530)]&&this[_n(533)][_n(528)][_n(530)][_n(339)](gn,JSON[_n(443)](Bn(t)))}catch(t){}}[_n(380)](t){const e=t[_n(352)];if(!(e&&e instanceof Element&&e[_n(413)]))return 0;const n=e[_n(413)]();if(!n[_n(388)]||!n[_n(518)])return 0;const r=n[_n(320)]+n[_n(388)]/2,i=n[_n(456)]+n[_n(518)]/2,o=this[_n(497)]({x:t[_n(457)],y:t[_n(381)]},{x:r,y:i}),a=Math[_n(472)](n[_n(388)]**2+n[_n(518)]**2)/2;return a>0?Math[_n(429)](0,1-o/a):0}[_n(497)](t,e){return Math[_n(472)]((e.x-t.x)**2+(e.y-t.y)**2)}[_n(431)](t){if(t[_n(479)](_n(417))||t[_n(479)](_n(488)))return t;return""+(this[_n(533)][_n(528)][_n(467)][_n(354)]||this[_n(533)][_n(528)][_n(467)][_n(511)]+"//"+this[_n(533)][_n(528)][_n(467)][_n(322)])+t}[_n(326)](t){try{this[_n(362)]?.[_n(329)](t)}catch(t){this[_n(373)][_n(319)](t,_n(468))}}[_n(382)](t){if(void 0!==t)return this[_n(533)][_n(522)],this[_n(533)][_n(440)],this[_n(305)][_n(460)](this),void this[_n(505)][_n(460)](this)}[_n(305)](){this[_n(502)]||(this[_n(502)]=!0,this[_n(373)][_n(459)](_n(469),!0))}[_n(505)](t){this[_n(373)][_n(319)](t,_n(534))}[_n(316)](){try{return this[_n(384)]()??void 0}catch(t){return void this[_n(373)][_n(319)](t,_n(406))}}[_n(501)](t){const e=this[_n(355)][_n(515)]?.[_n(521)];return!!e&&(null!==this[_n(370)][_n(410)]&&(this[_n(486)](e,_n(536),{candidateSignals:t,updateSilenceClock:!1,allowRetry:!1,transport:_n(407),candidateQueueTracking:_n(334)})[_n(324)](t=>{this[_n(373)][_n(319)](t,_n(389))}),!0))}[_n(476)](t){return!(!this[_n(355)][_n(515)]||null===this[_n(370)][_n(410)])&&(this[_n(359)]({lifecycleCandidateSignals:t})[_n(324)](t=>{this[_n(373)][_n(319)](t,_n(506))}),!0)}async[_n(486)](t,e,n={}){if(!this[_n(355)][_n(515)])return;const r=n[_n(529)]??!0,i=n[_n(301)]??!0,o=n[_n(351)]??_n(494);if(null===this[_n(370)][_n(410)])return void(r&&(this[_n(355)][_n(515)][_n(304)]=Date[_n(425)]()));let a;!1!==n[_n(403)]&&(void 0===n[_n(318)]?a=this[_n(316)]():this[_n(362)]&&(a=n[_n(318)]));const s=this[_n(382)](a),c=void 0===a?void 0:(h=a,this[_n(373)],{pack:h}),u=c?.[_n(442)],l=function(t,e,n,r,i,o){const a=void 0!==r,s=a&&void 0!==i;let c=1;return s?c=3:a&&(c=2),{v:c,s:{wd:e.wd,ua:e.ua,cf:e.cf,be:e.be,nm:e.nm,nc:e.nc,ka:e.ka,sa:e.sa,ta:e.ta,pt:e.pt,mp:e.mp,sd:e.sd},r:n,...void 0!==r&&{c:r},...s&&{t:i.t,...void 0!==i.e&&{e:i.e},w:i.w,...void 0!==o&&{_0x395b25:o}},l:Qe}}(0,Bn(t),e,u,void 0===u?void 0:s,void 0===u?void 0:c?.[_n(344)]),d=JSON[_n(443)](l),f=this[_n(431)](this[_n(370)][_n(410)]);var h;void 0!==a&&o===_n(494)&&this[_n(362)]?.[_n(491)](a);const p=n[_n(464)]??_n(393);if(p!==_n(407)&&this[_n(533)][_n(471)][_n(486)]&&(p===_n(458)||!this[_n(370)][_n(367)]))try{const t=new Blob([d],{type:_n(408)});if(this[_n(533)][_n(471)][_n(486)](f,t))return i&&(this[_n(355)][_n(515)][_n(303)]=0),void(r&&(this[_n(355)][_n(515)][_n(304)]=Date[_n(425)]()))}catch(t){}try{const t=await fetch(f,{method:_n(474),headers:{"Content-Type":_n(408)},body:d,credentials:_n(439),keepalive:!0});if(!t.ok)throw new Error(_n(306)+t[_n(323)]);void 0!==a&&o===_n(334)&&this[_n(362)]?.[_n(491)](a),i&&(this[_n(355)][_n(515)][_n(303)]=0),r&&(this[_n(355)][_n(515)][_n(304)]=Date[_n(425)]())}catch(n){i?this[_n(484)](t,e,a):void 0!==a&&o===_n(494)&&this[_n(362)]?.[_n(366)](a)}}[_n(484)](t,e,n){if(!this[_n(355)][_n(515)]||this[_n(355)][_n(515)][_n(303)]>=this[_n(370)][_n(433)])return void(void 0!==n&&this[_n(362)]?.[_n(366)](n));const r=Math[_n(524)](1e3*2**this[_n(355)][_n(515)][_n(303)],3e4);this[_n(355)][_n(515)][_n(303)]++,this[_n(355)][_n(515)][_n(371)]=this[_n(533)][_n(528)][_n(360)](()=>{this[_n(355)][_n(515)]&&this[_n(486)](t,e)},r)}async[_n(359)](t={}){if(!this[_n(355)][_n(515)])return;const e=Cn(this[_n(355)][_n(345)],this[_n(355)][_n(428)],this[_n(355)][_n(361)],this[_n(355)][_n(310)],this[_n(355)][_n(517)],this[_n(355)][_n(437)],this[_n(355)][_n(330)],this[_n(355)][_n(538)],this[_n(355)][_n(487)],this[_n(355)][_n(495)],this[_n(355)][_n(315)],this[_n(355)][_n(526)],Date[_n(425)]()),n=function(t,e,n,r){const i={webdriver_detected:1===t?.wd||!1,bot_user_agent:0===t?.ua||!1,browser_environment_normal:1===t?.br||!1,canvas_fingerprint_normal:1===t?.cv||!1,natural_mouse_activity:!1,natural_click_patterns:!1,keyboard_activity:!1,scroll_activity:!1,touch_activity:!1,significant_page_time:!1,multiple_pages_visited:!1,session_duration_reasonable:!1};if(e.ma>0&&1===e.nm&&(i[_n(416)]=!0),e.ca>0&&1===e.vc&&(i[_n(307)]=!0),e.ka>0&&(i[_n(397)]=!0),e.sa>0&&(i[_n(411)]=!0),e.ta>0&&(i[_n(325)]=!0),e.t>30&&(i[_n(396)]=!0),n&&(n[_n(402)]>1&&(i[_n(480)]=!0),n[_n(390)]>60&&(i[_n(356)]=!0)),r){const t=Object[_n(423)](i);for(const e of t)i[e]=i[e]||r[e]}return i}(this[_n(355)][_n(527)],e,this[_n(355)][_n(455)],this[_n(355)][_n(515)][_n(521)]),r=function(t,e){if(!e)return!0;const n=Object[_n(423)](t);for(const r of n)if(t[r]!==e[r])return!0;return!1}(n,this[_n(355)][_n(515)][_n(521)]),i=Date[_n(425)]()-this[_n(355)][_n(515)][_n(304)],o=i>=this[_n(370)][_n(420)],a=void 0!==t[_n(514)];if(r||o||a){const e=Date[_n(425)]()-this[_n(355)][_n(515)][_n(452)];if(!a&&e<100)return void this[_n(473)](_n(412),!0);if(o&&!r&&this[_n(473)](_n(510)+Math[_n(444)](i/1e3)+_n(317),!0),r&&this[_n(370)][_n(308)]){if(this[_n(355)][_n(515)][_n(521)]){Object[_n(423)](n)[_n(369)](t=>{this[_n(355)][_n(515)][_n(521)][t],n[t]})}else this[_n(473)](_n(448));this[_n(355)][_n(455)]}if(this[_n(355)][_n(515)][_n(521)]=(s=n,{...s}),this[_n(355)][_n(515)][_n(452)]=Date[_n(425)](),this[_n(432)](n),this[_n(370)][_n(470)]&&r)try{this[_n(370)][_n(470)](Bn(n))}catch(t){this[_n(373)][_n(319)](t,_n(503))}let c=_n(314);r?c=_n(378):o&&(c=_n(377));const u=!r&&!o;await this[_n(486)](n,c,{candidateSignals:t[_n(514)],includeCandidateSignals:t[_n(403)],updateSilenceClock:!u,allowRetry:!u,transport:_n(u?458:393)})}else this[_n(370)][_n(308)];var s}}const xn=(t,e)=>({libVersion:Qe,shopId:e||"",hostname:t[_n(528)]?.[_n(467)]?.[_n(461)]||"",url:t[_n(528)]?.[_n(467)]?.[_n(498)]||"",referrer:t[_n(522)]?.[_n(454)]||"",baseURI:t[_n(522)]?.[_n(441)]||"",sessionToken:$e()||"",uniqueToken:Ge()||""});function _n(t,e){const n=Sn();return _n=function(e,r){let i=n[e-=301];if(void 0===_n.rLaSfy){_n.WxSxFo=function(t){let e="",n="";for(let n,r,i=0,o=0;r=t.charAt(o++);~r&&(n=i%4?64*n+r:r,i++%4)?e+=String.fromCharCode(255&n>>(-2*i&6)):0)r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(r);for(let t=0,r=e.length;t=100||!(e<=0)&&function(t){try{const e=t[_n(528)][_n(530)]?.[_n(333)](yn);if(null!==e&&/^\d{1,2}$/[_n(508)](e)){const t=Number(e);if(t<100)return t}}catch{}const e=Math[_n(349)](100*Math[_n(395)]());try{t[_n(528)][_n(530)]?.[_n(339)](yn,String(e))}catch{}return e}(t){const r=$e(),i=(t?.[_n(399)]??!1)&&Tn(e,t?.[_n(415)]??100);let o;r?o=function(t){let e=0;for(let n=0,r=t[hn(262)];nd[_n(478)]()):d[_n(478)](),d};class An{quietWindowStartCandidates=[];longAnimationFrameObserver=null;longAnimationFrames=[];constructor(){this.initializeLongAnimationFrameObserver()}getQuietWindowStartCandidates(){return[...this.quietWindowStartCandidates].sort((t,e)=>t.startTime-e.startTime)}getLongAnimationFrames(){if(!In()){const t=function(){const{getLongAnimationFrames:t}=window.ShopifyAnalytics?.performance||{};if(!t)return[];return t(!0)}();this.longAnimationFrames=[];for(const e of t)this.handleAnimationFrame(e.startTime,e.endTime)}return[...this.longAnimationFrames].sort((t,e)=>t.startTime-e.startTime)}destroy(){this.cleanup(),this.quietWindowStartCandidates=[],this.longAnimationFrames=[]}initializeLongAnimationFrameObserver(){if(In())try{this.longAnimationFrameObserver=new PerformanceObserver(t=>{const e=t.getEntries();for(const t of e)this.handleAnimationFrame(t.startTime,t.startTime+t.duration)}),this.longAnimationFrameObserver.observe({type:"long-animation-frame",buffered:!0})}catch(t){}}handleAnimationFrame(t,e){if(this.longAnimationFrames.push({startTime:t,endTime:e}),this.quietWindowStartCandidates.length>0){t-this.quietWindowStartCandidates[this.quietWindowStartCandidates.length-1].startTime<250&&this.quietWindowStartCandidates.pop()}this.quietWindowStartCandidates.push({startTime:e})}cleanup(){this.longAnimationFrameObserver&&(this.longAnimationFrameObserver.disconnect(),this.longAnimationFrameObserver=null)}}let Pn=null;function Nn(t,e=0){if(null===t||!In()&&!Boolean(window.ShopifyAnalytics?.performance?.getLongAnimationFrames))return kn(),null;const n=(Pn?Pn.getLongAnimationFrames():[]).map(t=>({startTime:t.startTime-e,endTime:t.endTime-e}));let r=null;for(const e of n){if(e.startTime<=t&&e.endTime>t){r=e;break}if(e.startTime>=t){r=e;break}}if(!r||r.startTime-t>=250)return kn(),t;const i=(Pn?Pn.getQuietWindowStartCandidates():[]).map(t=>({startTime:t.startTime-e}));let o=t;if(i.length>0)for(const e of i)if(e.startTime>=t){o=e.startTime;break}return kn(),o}function In(){return PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")}function kn(){Pn&&(Pn.destroy(),Pn=null)}function qn(){return PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")}function En(){return performance.getEntriesByType("long-animation-frame")}let Un=null,jn=!1;function Hn(){Un=null,jn=!1}const On=Object.freeze({shop_domain:`${window.location.origin}/.well-known/shopify/monorail/v1/produce`,global:"https://monorail-edge.shopifysvc.com/v1/produce",canada:"https://monorail-edge-ca.shopifycloud.com/v1/produce",staging:"https://monorail-edge-staging.shopifycloud.com/v1/produce"}),Wn=new RegExp(`^${window.location.origin}/((?:(?:[a-z]{2,3}|zh-hans|zh-hant)(?:-[a-zA-Z0-9]+)/)?cart/(add|change|update|clear))`),Kn=new RegExp("cart-performance:|add:|change:|clear:|note_update:");var Fn;function Jn({monorailRegion:t,schema:e,rawData:n}){const r=Date.now(),i={schema_id:e,payload:e===Fn.OnUnload?Rn(n):Vn(n),metadata:{event_created_at_ms:r,event_sent_at_ms:r}},o=On[t||""],a=JSON.stringify(i);if(o)if(e!==Fn.OnUnload){if("function"==typeof window.fetchLater)try{return void window.fetchLater(o,{method:"POST",body:a,headers:{"Content-Type":"text/plain"},credentials:"include"})}catch(t){}Zn(o,a)}else!function(t,e){if("function"==typeof window.fetchLater){const n=Un;try{const r=new AbortController;return window.fetchLater(t,{method:"POST",body:e,headers:{"Content-Type":"text/plain"},credentials:"include",signal:r.signal}),Un=r,void n?.abort()}catch(t){if(null!==n)return}}if(jn)return;Zn(t,e),jn=!0}(o,a);else console.debug("📡 Monorail: ",JSON.stringify(i,null,2))}function Zn(t,e){try{const n=new window.Blob([e],{type:"text/plain"});if("function"==typeof window.navigator.sendBeacon&&"function"==typeof window.Blob&&!function(){const{userAgent:t}=window.navigator;return-1!==t.lastIndexOf("iPhone; CPU iPhone OS 12_")||-1!==t.lastIndexOf("iPad; CPU OS 12_")}()&&window.navigator.sendBeacon(t,n))return}catch(t){}const n=new XMLHttpRequest;n.open("POST",t),n.setRequestHeader("Content-type","text/plain"),n.send(e)}function Rn(t){const e=Xn(t,["domInteractive","domContentLoadedEventStart","domContentLoadedEventEnd","domComplete","activationStart","firstPaint","visuallyReady","initiatorType","redirectCount","cartAjaxResourceTimings","cartPerformanceMetrics","totalStylingDuration","totalStyleDuration","totalForcedStyleDuration","totalLayoutDuration","totalForcedLayoutDuration","speculations"]);return{perf_kit_init:t.perfKitInit,perf_kit_version:t.perfKitVersion,url:t.url,page_type:t.pageType,shop_id:t.shopId,application:t.application,storefront_id:t.storefrontId,theme_instance_id:t.themeInstanceId,theme_name:t.themeName,theme_version:t.themeVersion,session_token:t.sessionToken,unique_token:t.uniqueToken,micro_session_id:t.microSessionId,micro_session_count:t.microSessionCount,cumulative_layout_shift:t.cumulativeLayoutShift,cumulative_layout_shift_target:t.cumulativeLayoutShiftTarget,first_contentful_paint:t.firstContentfulPaint,largest_contentful_paint:t.largestContentfulPaint,largest_contentful_paint_target:t.largestContentfulPaintTarget,time_to_first_byte:t.timeToFirstByte,quiet_window_start:t.quietWindowStart,seo_bot:t.seoBot,humanness_score:t.humannessScore,ja3_fingerprint:t.ja3Fingerprint,navigation_start:t.navigationStart,navigation_type:t.navigationType,navigation_bad:t.navigationBad,encoded_body_size:t.encodedBodySize,decoded_body_size:t.decodedBodySize,transfer_size:t.transferSize,first_interim_response_start:t.firstInterimResponseStart,final_response_headers_start:t.finalResponseHeadersStart,response_start:t.responseStart,response_end:t.responseEnd,worker_start:t.workerStart,connect_start:t.connectStart,connect_end:t.connectEnd,domain_lookup_start:t.domainLookupStart,domain_lookup_end:t.domainLookupEnd,fetch_start:t.fetchStart,redirect_start:t.redirectStart,redirect_end:t.redirectEnd,request_start:t.requestStart,secure_connection_start:t.secureConnectionStart,next_hop_protocol:t.nextHopProtocol,server_timing:t.serverTiming,paint_timing_hidden:t.paintTimingHidden,referrer:t.referrer,render_region:t.renderRegion,resource_timing:t.resourceTiming,treatment_ids:t.treatmentIds,other_metrics:JSON.stringify(e)}}function Vn(t){const e=Xn(t,["longAnimationFrame"]);return{url:t.url,page_type:t.pageType,shop_id:t.shopId,application:t.application,storefront_id:t.storefrontId,theme_instance_id:t.themeInstanceId,session_token:t.sessionToken,unique_token:t.uniqueToken,micro_session_id:t.microSessionId,micro_session_count:t.microSessionCount,interaction_to_next_paint:t.interactionToNextPaint,interaction_to_next_paint_target:t.interactionToNextPaintTarget,seo_bot:t.seoBot,humanness_score:t.humannessScore,ja3_fingerprint:t.ja3Fingerprint,referrer:t.referrer,worker_start:t.workerStart,next_hop_protocol:t.nextHopProtocol,navigation_bad:t.navigationBad,treatment_ids:t.treatmentIds,other_interaction_metrics:JSON.stringify(e)}}function Xn(t,e){return e.reduce((e,n)=>{var r;return null!=t[n]&&(e[(r=n,r.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`))]=t[n]),e},{})}function Yn(t,e){return t?Math.max(0,Math.round(t-e)):0}!function(t){t.OnInteraction="perf_kit_on_interaction/3.2",t.OnUnload="perf_kit_on_unload/3.5"}(Fn||(Fn={}));function Gn(t){if(void 0===t||""===t.trim())return;const e=Number(t);return Number.isFinite(e)?e:void 0}function $n(t){return!Number.isFinite(t)||t<=0?0:Math.min(100,Math.floor(t))}function Qn(t){if(!t)return;const e=[];for(const n of t.split(",")){const t=Number(n);isNaN(t)||e.push(t)}return e.length>0?e:void 0}const tr="xxxx-4xxx-xxxx-xxxxxxxxxxxx";function er(){let t="";try{const e=window.crypto,n=new Uint16Array(31);e.getRandomValues(n);let r=0;t=tr.replace(/[x]/g,t=>{const e=n[r]%16;return r++,("x"===t?e:3&e|8).toString(16)}).toUpperCase()}catch(e){t=tr.replace(/[x]/g,t=>{const e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}).toUpperCase()}return`${function(){let t=0,e=0;t=(new Date).getTime()>>>0;try{e=performance.now()>>>0}catch(t){e=0}return Math.abs(t+e).toString(16).toLowerCase().padStart(8,"0")}()}-${t}`}let nr=null,rr=!1,ir=null,or=null,ar=null;let sr=!1;class cr{info;config;sampled;onUnloadCounted;cachedQuietWindowStart;constructor(t){this.config=t;const e="storefront-renderer"===t.storefrontData.application;this.info={perfKitInit:Date.now(),perfKitVersion:"3.9.2",url:window.location.href,referrer:document.referrer||void 0,microSessionId:er(),microSessionCount:0,get sessionToken(){return function({generateFallback:t=!1,tag:e="unknown"}={}){return qt("_shopify_s",_t,{generateFallback:t,tag:e})}({generateFallback:e})},get uniqueToken(){return function({generateFallback:t=!1,tag:e="unknown"}={}){return qt("_shopify_y",xt,{generateFallback:t,tag:e})}({generateFallback:e})}},this.sampled=100*Math.random()<=(t.resourceTimingSamplingRate??10),this.onUnloadCounted=!1,this.cachedQuietWindowStart=void 0,performance.setResourceTimingBufferSize(1e3)}get performanceMetrics(){return function(t){const e=performance.getEntriesByType("navigation");if(0===e.length)return{};const n=e[0],r=n.activationStart||0,i=function(t,e){return!e&&(t.requestStart>0&&t.startTime>0&&t.requestStart0&&t.startTime>0&&t.responseStart0&&t.fetchStart>0&&t.responseStart0&&t.fetchStart0&&t.responseEnd>e+864e5}(n,t);return{encodedBodySize:n.encodedBodySize,decodedBodySize:n.decodedBodySize,navigationStart:Math.round(n.startTime),navigationType:n.type,navigationBad:i,firstInterimResponseStart:Math.round(n.firstInterimResponseStart),finalResponseHeadersStart:Math.round(n.finalResponseHeadersStart),responseStart:Math.round(n.responseStart),responseEnd:Math.round(n.responseEnd),workerStart:Math.round(n.workerStart),connectStart:Math.round(n.connectStart),connectEnd:Math.round(n.connectEnd),domainLookupStart:Math.round(n.domainLookupStart),domainLookupEnd:Math.round(n.domainLookupEnd),fetchStart:Math.round(n.fetchStart),redirectStart:Math.round(n.redirectStart),redirectEnd:Math.round(n.redirectEnd),requestStart:Math.round(n.requestStart),secureConnectionStart:Math.round(n.secureConnectionStart),nextHopProtocol:n.nextHopProtocol,serverTiming:JSON.stringify(n.serverTiming),domInteractive:Yn(n.domInteractive,r),domComplete:Yn(n.domComplete,r),domContentLoadedEventStart:Yn(n.domContentLoadedEventStart,r),domContentLoadedEventEnd:Yn(n.domContentLoadedEventEnd,r),activationStart:Math.round(r),redirectCount:n.redirectCount,initiatorType:n.initiatorType,transferSize:n.transferSize}}(this.info.perfKitInit)}}function ur(t){if(nr=t,or=new cr(t),ar=null,rr=!1,ir=window.location.pathname,lr.clear(),Hn(),Pn||(Pn=new An),t.spaMode&&void 0===window.PerfKit&&(window.PerfKit={navigate:()=>{if(!nr?.spaMode||!or)return;const t=window.location.href,e=window.location.pathname;ir!==e?(ir=e,rr?or.info.url=t:(dr(),or=new cr(nr),lr.clear(),Hn(),rr=!0)):or.info.url=t},setPageType:t=>{nr?.spaMode&&(nr.storefrontData.pageType=t)},setConsent:t=>{ar=t}},document.addEventListener("shopify:page:view",t=>{window.PerfKit.navigate(),t.page?.url&&or&&(or.info.url=t.page.url),t.page?.template&&window.PerfKit.setPageType(t.page.template)},!0)),t.shs&&!t.spaMode){const e=t.shsCandidateSampleRate??0;Mn({debug:!1,shopId:t.storefrontData.shopId,exportWithFetch:t.shsExportWithFetch||!0,logsSampleRate:t.shsLogsSampleRate,candidateSignalsEnabled:e>0,candidateSampleRate:e,...!1===t.shsCandidateActivePageFlush&&{candidateActivePageFlushEnabled:!1},...e>0&&void 0!==t.shsCandidateMask&&{candidateMask:t.shsCandidateMask},...t.shsBeaconEndpoint&&{beaconEndpoint:t.shsBeaconEndpoint}})}}const lr=new Set;function dr(){if(null!==or){if(!pr()&&fr()&&lr.size>0){let t={};for(const e of lr)t={...t,...e};const e=t.firstContentfulPaint??null;if(null!==e&&void 0===or.cachedQuietWindowStart){const t=performance.getEntriesByType("navigation")[0]?.activationStart||0;or.cachedQuietWindowStart=Nn(e,t)}void 0!==or.cachedQuietWindowStart&&null!==or.cachedQuietWindowStart&&(t.quietWindowStart=Math.round(or.cachedQuietWindowStart));const n=function(){if(!qn())return null;const t=En();let e=0;for(const n of t){e+=n.styleAndLayoutStart?n.startTime+n.duration-n.styleAndLayoutStart:0;for(const t of n.scripts)e+=t.forcedStyleAndLayoutDuration}return e}();null!==n&&(t.totalStylingDuration=Math.round(n));const r=function(){if(!qn())return null;const t=En();if(0===t.length)return null;if("number"!=typeof t[0].styleDuration)return null;let e=0,n=0,r=0,i=0;for(const o of t){const t=o;e+=t.styleDuration??0,r+=t.layoutDuration??0;for(const t of o.scripts){const e=t;n+=e.forcedStyleDuration??0,i+=e.forcedLayoutDuration??0}}return{totalStyleDuration:e,totalForcedStyleDuration:n,totalLayoutDuration:r,totalForcedLayoutDuration:i}}();null!==r&&(t.totalStyleDuration=Math.round(r.totalStyleDuration),t.totalForcedStyleDuration=Math.round(r.totalForcedStyleDuration),t.totalLayoutDuration=Math.round(r.totalLayoutDuration),t.totalForcedLayoutDuration=Math.round(r.totalForcedLayoutDuration)),or.onUnloadCounted||(or.info.microSessionCount+=1,or.onUnloadCounted=!0);const i=function(t){if(t)return performance.getEntriesByType("resource").map(t=>{const e=Object.entries(t.toJSON()).map(([t,e])=>"number"==typeof e?[t,Math.round(e)]:[t,e]);return JSON.stringify(Object.fromEntries(e))})}(or.sampled),o=function(t){if("function"!=typeof performance.getSpeculations)return;const e=performance.getSpeculations().preloads??[];let n=0,r=0,i=0;const o=[];for(const a of e){const e=Boolean(a.earlyhint??a.earlyHints);e&&(i+=1),null==a.used?(r+=1,t&&o.push({url:a.url.slice(-20),as:a.as,crossorigin:a.crossorigin??null,early_hint:e})):n+=1}return{used_preloads:n,unused_preloads:r,unused_preload_details:o,early_hint_preloads:i}}(or.sampled),a=performance.getEntriesByType("resource").filter(t=>Wn.test(t.name)),s=performance.getEntriesByType("measure").filter(t=>Kn.test(t.name)).map(t=>{const e=t.toJSON();return e.name.startsWith("cart-performance:")||(e.name=`cart-performance:${e.name}`),e});Jn({monorailRegion:or.config.monorailRegion,schema:Fn.OnUnload,rawData:{...or.info,...or.config.storefrontData,...or.performanceMetrics,...t,resourceTiming:i,cartAjaxResourceTimings:a,cartPerformanceMetrics:s,paintTimingHidden:sr,speculations:o}})}}else console.debug("⛔️ Shopify/perf-kit is not initialized")}function fr(){return null!==ar?ar:Et()}((e,r={})=>{const o=a(r=Object.assign({},r),t),s=new WeakMap;o.t=t=>{if(t?.sources?.length){const e=B(t.sources),n=e?.node;if(n){const t=r.generateTarget?.(n)??i(n);s.set(e,t)}}},((e,n={})=>{const r=S();L(m(()=>{let i,o=h("CLS",0);const s=a(n,t),c=t=>{for(const e of t)s.u(e);s.o>o.value&&(o.value=s.o,o.entries=s.i,i())},f=p("layout-shift",c);f&&(i=l(e,o,z,n.reportAllChanges),r.onHidden(()=>{c(f.takeRecords()),i(!0)}),u(()=>{s.o=0,o=h("CLS",0),i=l(e,o,z,n.reportAllChanges),d(()=>i())}),setTimeout(i))}))})(t=>{const r=(t=>{let e={};if(t.entries.length){const r=t.entries.reduce((t,e)=>t.value>e.value?t:e);if(r?.sources?.length){const t=B(r.sources);t&&(e={largestShiftTarget:s.get(t),largestShiftTime:r.startTime,largestShiftValue:r.value,largestShiftSource:t,largestShiftEntry:r,loadState:n(r.startTime)})}}return Object.assign(t,{attribution:e})})(t);e(r)},r)})(function(t){const{attribution:e,value:n}=t;lr.add({cumulativeLayoutShift:n,cumulativeLayoutShiftTarget:e.largestShiftTarget})},{reportAllChanges:!0}),((t,n={})=>{const r=a(n=Object.assign({},n),q),o=new WeakMap;r.m=t=>{const e=t.element;if(e){const r=n.generateTarget?.(e)??i(e);o.set(t,r)}},((t,e={})=>{b(()=>{const n=S();let r,i=h("LCP");const o=a(e,q),s=t=>{e.reportAllChanges||(t=t.slice(-1));for(const e of t)o.u(e),e.startTime{s(c.takeRecords()),c.disconnect(),r(!0)}),o=t=>{t.isTrusted&&(I(n),removeEventListener(t.type,o,{capture:!0}))};for(const t of["keydown","click","visibilitychange"])addEventListener(t,o,{capture:!0});u(n=>{i=h("LCP"),r=l(t,i,E,e.reportAllChanges),d(()=>{i.value=performance.now()-n.timeStamp,r(!0)})})}})})(n=>{const r=(t=>{let n={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:t.value};if(t.entries.length){const r=e();if(r){const e=r.activationStart||0,i=t.entries.at(-1),a=i.url&&performance.getEntriesByType("resource").filter(t=>t.name===i.url)[0],s=Math.max(0,r.responseStart-e),c=Math.max(s,a?(a.requestStart||a.startTime)-e:0),u=Math.min(t.value,Math.max(c,a?a.responseEnd-e:0));n={target:o.get(i),timeToFirstByte:s,resourceLoadDelay:c-s,resourceLoadDuration:u-c,elementRenderDelay:t.value-u,navigationEntry:r,lcpEntry:i},i.url&&(n.url=i.url),a&&(n.lcpResourceEntry=a)}}return Object.assign(t,{attribution:n})})(n);t(r)},n)})(function(t){const{attribution:e,value:n}=t;lr.add({largestContentfulPaint:Math.round(n),largestContentfulPaintTarget:e.target})},{reportAllChanges:!0}),((t,r={})=>{L(r=>{const i=(t=>{let r={timeToFirstByte:0,firstByteToFCP:t.value,loadState:n(c())};if(t.entries.length){const i=e(),o=t.entries.at(-1);if(i){const e=i.activationStart||0,a=Math.max(0,i.responseStart-e);r={timeToFirstByte:a,firstByteToFCP:t.value-a,loadState:n(t.entries[0].startTime),navigationEntry:i,fcpEntry:o}}}return Object.assign(t,{attribution:r})})(r);t(i)},r)})(function(t){const{value:e}=t;lr.add({firstContentfulPaint:Math.round(e)})}),((t,e={})=>{const r=a(e=Object.assign({},e),N);let o=[],s=[],c=0;const d=new WeakMap,f=new WeakMap;let m=!1;const v=()=>{m||(I(g),m=!0)},g=()=>{const t=r.l.map(t=>d.get(t.entries[0])),e=s.length-50;s=s.filter((n,r)=>r>=e||t.includes(n));const n=new Set;for(const t of s){const e=y(t.startTime,t.processingEnd);for(const t of e)n.add(t)}const i=o.length-1-50;o=o.filter((t,e)=>t.startTime>c&&e>i||n.has(t)),m=!1};r.m=t=>{const e=t.startTime+t.duration;let n;c=Math.max(c,t.processingEnd);for(let r=s.length-1;r>=0;r--){const i=s[r];if(Math.abs(e-i.renderTime)<=8){n=i,n.startTime=Math.min(t.startTime,n.startTime),n.processingStart=Math.min(t.processingStart,n.processingStart),n.processingEnd=Math.max(t.processingEnd,n.processingEnd),n.entries.push(t);break}}n||(n={startTime:t.startTime,processingStart:t.processingStart,processingEnd:t.processingEnd,renderTime:e,entries:[t]},s.push(n)),(t.interactionId||"first-input"===t.entryType)&&d.set(t,n),v()},r.p=t=>{if(!f.get(t)){const n=t.entries[0].target;if(n){const r=e.generateTarget?.(n)??i(n);f.set(t,r)}}};const y=(t,e)=>{const n=[];for(const r of o)if(!(r.startTime+r.duratione)break;n.push(r)}return n},w=t=>{const e=t.entries[0],i=d.get(e),o=e.processingStart,a=Math.max(e.startTime+e.duration,o),s=Math.min(i.processingEnd,a),c=i.entries.sort((t,e)=>t.processingStart-e.processingStart),u=y(e.startTime,s),l=r.h.get(e.interactionId),h={interactionTarget:f.get(l),interactionType:e.name.startsWith("key")?"keyboard":"pointer",interactionTime:e.startTime,nextPaintTime:a,processedEventEntries:c,longAnimationFrameEntries:u,inputDelay:o-e.startTime,processingDuration:s-o,presentationDelay:a-s,loadState:n(e.startTime),longestScript:void 0,totalScriptDuration:void 0,totalStyleAndLayoutDuration:void 0,totalPaintDuration:void 0,totalUnattributedDuration:void 0};return(t=>{if(!t.longAnimationFrameEntries?.length)return;const e=t.interactionTime,n=t.inputDelay,r=t.processingDuration;let i,o,a=0,s=0,c=0,u=0;for(const c of t.longAnimationFrameEntries){s=s+c.startTime+c.duration-c.styleAndLayoutStart;for(const t of c.scripts){const c=t.startTime+t.duration;if(cu&&(o=t.startTime=e+n+r?"presentation-delay":"processing-duration",i=t,u=l)}}const l=t.longAnimationFrameEntries.at(-1),d=l?l.startTime+l.duration:0;d>=e+n+r&&(c=t.nextPaintTime-d),i&&o&&(t.longestScript={entry:i,subpart:o,intersectingDuration:u}),t.totalScriptDuration=a,t.totalStyleAndLayoutDuration=s,t.totalPaintDuration=c,t.totalUnattributedDuration=t.nextPaintTime-e-a-s-c})(h),Object.assign(t,{attribution:h})};p("long-animation-frame",t=>{o=o.concat(t),v()}),((t,e={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=S();b(()=>{"interactionCount"in performance||M||(M=p("event",T,{type:"event",buffered:!0,durationThreshold:0}));let r,i=h("INP");const o=a(e,N),s=t=>{I(()=>{for(const e of t)o.u(e);const e=o.M();e&&e.T!==i.value&&(i.value=e.T,i.entries=e.entries,r())})},c=p("event",s,{durationThreshold:e.durationThreshold??40});r=l(t,i,k,e.reportAllChanges),c&&(c.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{s(c.takeRecords()),r(!0)}),u(()=>{o.v(),i=h("INP"),r=l(t,i,k,e.reportAllChanges)}))})})(e=>{const n=w(e);t(n)},e)})(function(t){const{attribution:e,value:n}=t;if(null===or)return void console.debug("⛔️ Shopify/perf-kit is not initialized");if(function(){const t=navigator.userAgent;if(!t.includes("Safari")||t.includes("Chrome"))return!1;const e=/Version\/(\d+)(?:\.(\d+))?/.exec(t);if(null===e)return!0;const n=Number(e[1]),r=Number(e[2]||0);return n<26||26===n&&r<4}())return;if(pr())return;if(!fr())return;or.info.microSessionCount+=1;const{inputDelay:r,processingDuration:i,presentationDelay:o,longestScript:a,interactionTarget:s}=e,c=a?.entry?{slowest_script:a.entry.sourceURL,slowest_script_duration:Math.round(a.entry.duration)}:{};Jn({monorailRegion:or.config.monorailRegion,schema:Fn.OnInteraction,rawData:{...or.info,...or.config.storefrontData,...or.performanceMetrics,interactionToNextPaint:Math.round(n),interactionToNextPaintTarget:s,longAnimationFrame:{input_delay:Math.round(r),processing_duration:Math.round(i),presentation_delay:Math.round(o),...c}}})},{reportAllChanges:!0}),((t,n={})=>{((t,n={})=>{let r=h("TTFB"),i=l(t,r,U,n.reportAllChanges);j(()=>{const o=e();o&&(r.value=Math.max(o.responseStart-f(),0),r.entries=[o],i(!0),u(()=>{r=h("TTFB",0),i=l(t,r,U,n.reportAllChanges),i(!0)}))})})(e=>{const n=(t=>{let e={waitingDuration:0,cacheDuration:0,dnsDuration:0,connectionDuration:0,requestDuration:0};if(t.entries.length){const n=t.entries[0],r=n.activationStart||0,i=Math.max((n.workerStart||n.fetchStart)-r,0),o=Math.max(n.domainLookupStart-r,0),a=Math.max(n.connectStart-r,0),s=Math.max(n.connectEnd-r,0);e={waitingDuration:i,cacheDuration:o-i,dnsDuration:a-o,connectionDuration:s-a,requestDuration:t.value-s,navigationEntry:n}}return Object.assign(t,{attribution:e})})(e);t(n)},n)})(function(t){const{value:e}=t;lr.add({timeToFirstByte:Math.round(e)})}),addEventListener("DOMContentLoaded",()=>{sr="hidden"===document.visibilityState}),addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&dr()}),addEventListener("pagehide",()=>{dr()});const hr=/bot|crawl|headless|curl|wget|python|spider|libwww-pearl|newrelic|datadog|sitebulb|site24x7/i;function pr(){return!!hr.test(navigator.userAgent)||!!(navigator.webdriver||document.__webdriver_evaluate||document.__selenium_evaluate||document.__webdriver_script_fn||document.__webdriver_script_func||document.__webdriver_script_function||document.$cdc_asdjflasutopfhvcZLmcfl_||document.$wdc_||window._Selenium_IDE_Recorder||window._phantom||window.__nightmare||window.callPhantom||window._phantom||window.__playwright__binding__||window.__pwInitScripts)}!function(){const{dataset:t}=document.currentScript;try{ur(function(t){if(!t.application)throw new Error("Application is missing");if(!["storefront-renderer","hydrogen","shop-web"].includes(t.application.toLowerCase()))throw new Error("Invalid application type");if("shop-web"!==t.application.toLowerCase()){if(!t.shopId)throw new Error("shopId is missing");if(!t.themeInstanceId&&!t.storefrontId)throw new Error("Either `themeInstanceId` or `storefrontId` must be defined");for(const e of["shopId","themeInstanceId","storefrontId"])if(t[e]&&isNaN(Number(t[e])))throw new Error(`Invalid ${e}`)}if(t.humannessScore&&isNaN(Number(t.humannessScore)))throw new Error("Invalid humannessScore");if(t.monorailRegion&&!["shop_domain","global","staging","canada"].includes(t.monorailRegion.toLowerCase()))throw new Error("Invalid monorail region");if(t.resourceTimingSamplingRate&&(isNaN(Number(t.resourceTimingSamplingRate))||Number(t.resourceTimingSamplingRate)<10||Number(t.resourceTimingSamplingRate)>100))throw new Error("Invalid resource timing sampling rate");return{storefrontData:{application:t.application.toLowerCase(),shopId:Number(t.shopId)||0,renderRegion:t.renderRegion,pageType:t.pageType,seoBot:"true"===t.seoBot,humannessScore:Number(t.humannessScore)||void 0,ja3Fingerprint:t.ja3Fingerprint,themeInstanceId:Number(t.themeInstanceId)||void 0,storefrontId:Number(t.storefrontId)||void 0,themeName:t.themeName||void 0,themeVersion:t.themeVersion||void 0,treatmentIds:Qn(t.treatmentIds)},monorailRegion:t.monorailRegion,resourceTimingSamplingRate:Number(t.resourceTimingSamplingRate)||void 0,spaMode:"true"===t.spaMode,shs:"true"===t.shs,shsBeaconEndpoint:t.shsBeaconEndpoint||void 0,shsExportWithFetch:"true"===t.shsExportWithFetch,shsLogsSampleRate:Gn(t.shsLogsSampleRate),shsCandidateSampleRate:$n(Number(t.shsCandidateSampleRate)),shsCandidateMask:t.shsCandidateMask,shsCandidateActivePageFlush:void 0===t.shsCandidateActivePageFlush?void 0:"false"!==t.shsCandidateActivePageFlush}}(t))}catch(t){console.error("🚫 Error initializing PerfKit:",t.message)}}()}();