!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()))},h=()=>{const t=e();return t?.activationStart??0},f=(t,n=-1)=>{const r=e();let i="navigate";return c()>=0?i="back-forward-cache":r&&(document.prerendering||h()>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}},m=(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{}},p=t=>{let e=!1;return()=>{e||(t(),e=!0)}};let g=-1;const v=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 v)t();isFinite(g)||(g="visibilitychange"===t.type?t.timeStamp:0,removeEventListener("prerenderingchange",w,!0))}},C=()=>{if(g<0){const t=h(),e=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(e=>"hidden"===e.name&&e.startTime>t)[0]?.startTime;g=e??y(),addEventListener("visibilitychange",w,!0),addEventListener("prerenderingchange",w,!0),u(()=>{setTimeout(()=>{g=y()})})}return{get firstHiddenTime(){return g},onHidden(t){v.add(t)}}},S=t=>{document.prerendering?addEventListener("prerenderingchange",()=>t(),!0):t()},L=[1800,3e3],b=(t,e={})=>{S(()=>{const n=C();let r,i=f("FCP");const o=m("paint",t=>{for(const e of t)"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime{i=f("FCP"),r=l(t,i,L,e.reportAllChanges),d(()=>{i.value=performance.now()-n.timeStamp,r(!0)})}))})},D=[.1,.25],T=t=>t.find(t=>1===t.node?.nodeType)||t[0];let _=0,B=1/0,x=0;const M=t=>{for(const e of t)e.interactionId&&(B=Math.min(B,e.interactionId),x=Math.max(x,e.interactionId),_=x?(x-B)/7+1:0)};let z;const A=()=>z?_:performance.interactionCount??0;let E=0;class P{l=[];h=new Map;m;p;v(){E=A(),this.l.length=0,this.h.clear()}M(){const t=Math.min(this.l.length-1,Math.floor((A()-E)/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 N=t=>{const e=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?t():(t=p(t),addEventListener("visibilitychange",t,{once:!0,capture:!0}),e(()=>{t(),removeEventListener("visibilitychange",t,{capture:!0})}))},I=[200,500];class U{m;u(t){this.m?.(t)}}const q=[2500,4e3],j=[800,1800],k=t=>{document.prerendering?S(()=>k(t)):"complete"!==document.readyState?addEventListener("load",()=>k(t),!0):setTimeout(t)},H={TRACKING_ACCEPTED:"trackingConsentAccepted",TRACKING_DECLINED:"trackingConsentDeclined",MARKETING_ACCEPTED:"firstPartyMarketingConsentAccepted",SALE_OF_DATA_ACCEPTED:"thirdPartyMarketingConsentAccepted",ANALYTICS_ACCEPTED:"analyticsConsentAccepted",PREFERENCES_ACCEPTED:"preferencesConsentAccepted",MARKETING_DECLINED:"firstPartyMarketingConsentDeclined",SALE_OF_DATA_DECLINED:"thirdPartyMarketingConsentDeclined",ANALYTICS_DECLINED:"analyticsConsentDeclined",PREFERENCES_DECLINED:"preferencesConsentDeclined",CONSENT_COLLECTED:"visitorConsentCollected",CONSENT_TRACKING_API_LOADED:"consentTrackingApiLoaded"},K="",O="1",Z="0",W="p",R="a",F="m",J="t",V="m",X="a",G="p",Y="s",$=()=>"undefined"==typeof window;function Q(t){try{return decodeURIComponent(t)}catch(t){return""}}function tt(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 nt(){var t,e;return $()?{}:(null===(t=window.Shopify)||void 0===t||null===(e=t.customerPrivacy)||void 0===e?void 0:e.config)||{}}et.instance=void 0;function rt(t){try{return t()}catch{return}}function it(){var t,e;if(!lt()&&!function(){try{const t=performance.getEntriesByType("navigation")[0].serverTiming;return!!t&&0!=t.length}catch{return!1}}()){const t=new et;let e="failed_to_fetch";try{e=navigator.userAgent}catch{}t.produce("navigationServerTiming",JSON.stringify({failed:!0,userAgent:e})),function(){if(lt())return;const t=ct();t.Shopify||(t.Shopify={});t.Shopify.customerPrivacy||(t.Shopify.customerPrivacy={});t.Shopify.customerPrivacy.serverTimingSupportVerified=!0}()}const n=null===(t=performance)||void 0===t||null===(e=t.getEntriesByType)||void 0===e?void 0:e.call(t,"navigation");if(!n)return;const r=n.map(st).find(t=>t);if(r)try{sessionStorage.setItem("consentHeader",r)}catch{}return r}let ot;function at(){var t,e;const n=null===(t=performance)||void 0===t||null===(e=t.getEntriesByType)||void 0===e?void 0:e.call(t,"resource");let r=ot;for(let t=n.length-1;t>=0;t--){let e=st(n[t]);if(e){r=e;break}}return ot=r,r}function st(t){var e,n;if(t)return null===(e=t.serverTiming)||void 0===e||null===(n=e.find(t=>"_cmp"==t.name))||void 0===n?void 0:n.description}function ct(){return window}function ut(){var t,e;const n=ct();return!0===(null==n||null===(t=n.Shopify)||void 0===t||null===(e=t.customerPrivacy)||void 0===e?void 0:e.backendConsentEnabled)||!0===nt().isHeadless}function lt(){var t,e;const n=ct();return null==n||null===(t=n.Shopify)||void 0===t||null===(e=t.customerPrivacy)||void 0===e?void 0:e.serverTimingSupportVerified}function dt(){if(!$()){var t,e;const n=(null===(t=window.Shopify)||void 0===t||null===(e=t.customerPrivacy)||void 0===e?void 0:e.injectedConsent)||nt().injectedConsent;return n?Q(n):void 0}}function ht(){let t;if(t=$()?dt():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?Q(n):void 0}()||dt()||new URLSearchParams(window.location.search).get("_cs")||void 0||tt("_tracking_consent")||function(){let t;if(t=ut()&&rt(at)||rt(it),!t){let t;try{t=sessionStorage.getItem("consentHeader")}catch{}return t||void 0}try{t=decodeURIComponent(t)}catch{}return t}(),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())?Z:e.includes(t.toUpperCase())?O:K}function l(t){return n.includes(t.replace("t","s").toUpperCase())}return{v:"3",con:{CMP:{[X]:u(X),[G]:u(G),[V]:u(V),[Y]:u(Y)}},region:r||"",cus:s,purposes:{[R]:l(R),[W]:l(W),[F]:l(F),[J]:l(J)},sale_of_data_region:"t"==o,display_banner:"t"==i,consent_id:c}}(t);return}(t)}function ft(t){const e=function(){try{let t=ht();if(!t)return;return t}catch{return}}();if(!e||!e.purposes)return!0;const n=e.purposes[t];return"boolean"!=typeof n||n}function mt(){return ft(R)}const pt={},gt=/^https?:\/\/([^/]+)(\/api\/(?:unstable|2\d{3}-\d{2})\/graphql\.json(?=$|\?))?/;function vt(t,e){if(ut()){const t=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(gt);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 pt[t]=l,l}}return pt[t]}catch{return pt[t]}}(e);if(t)return t}const n=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}}(e);return n||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.includes(t)))||void 0===r||null===(i=r.split("=")[1])||void 0===i?void 0:i.trim()}catch{return}}(t)}function yt(){return vt("_shopify_y","_y")}function wt(){return vt("_shopify_s","_s")}function Ct(){return mt()}function St(t,e){if(!{}.hasOwnProperty.call(t,e))throw new TypeError("attempted to use private field on non-instance");return t}var Lt=0;function bt(t){return"__private_"+Lt+++"_"+t}function Dt(t){return Object.entries(t).map(([t,e])=>({key:t,value:{stringValue:String(e)}}))}function Tt(t){if(Array.isArray(t))return{arrayValue:{values:t.map(t=>Tt(t))}};switch(typeof t){case"boolean":return{boolValue:Boolean(t)};case"number":return{doubleValue:Number(t)};default:return{stringValue:String(t)}}}const _t=function(t,e,n){const r=[0];for(let i=0;i{t.attributes={...St(this,xt)[xt],...t.attributes}});const t=St(this,Mt)[Mt];St(this,Mt)[Mt]=[],await this.exportByKeepalive(t,(t,e)=>St(this,Bt)[Bt].exportMetrics(this.aggregateMetrics(t),e))}async exportLogs(){const t=St(this,zt)[zt];St(this,zt)[zt]=[],await this.exportByKeepalive(t,(t,e)=>St(this,Bt)[Bt].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:_t,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:Dt(null!=a?a:{}),startTimeUnixNano:o,timeUnixNano:o,count:1,sum:c,scale:u,zeroCount:h,positive:m,negative:f,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:Dt(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:Dt(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={...St(this,xt)[xt],...t.attributes},Object.entries(n).map(([t,e])=>({key:t,value:Tt(e)})))};var n;return t.body&&(e.body={stringValue:t.body}),e})}}var Et=bt("url"),Pt=bt("serviceName"),Nt=bt("logger"),It=bt("fetchFn"),Ut=bt("maxPayloadSizeBytes");class qt{constructor(t,e,n){var r;Object.defineProperty(this,Et,{writable:!0,value:void 0}),Object.defineProperty(this,Pt,{writable:!0,value:void 0}),Object.defineProperty(this,Nt,{writable:!0,value:void 0}),Object.defineProperty(this,It,{writable:!0,value:void 0}),Object.defineProperty(this,Ut,{writable:!0,value:void 0}),St(this,Et)[Et]=t.replace(/\/v1\/(logs|metrics|traces)\/?$/,""),St(this,Pt)[Pt]=e,St(this,Nt)[Nt]=null==n?void 0:n.logger,St(this,It)[It]=null==n?void 0:n.fetchFn,St(this,Ut)[Ut]=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:St(this,Pt)[Pt]}}]},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:St(this,Pt)[Pt]}}]},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>St(this,Ut)[Ut])throw new kt(`Payload size ${o} exceeds ${St(this,Ut)[Ut]} bytes`);const a=await this.exporterFetch()(`${St(this,Et)[Et]}${e}`,{method:"POST",keepalive:n,headers:{"Content-Type":"application/json"},body:i});if(null===(r=St(this,Nt)[Nt])||void 0===r||r.log({status:a.status}),!a.ok){if(400===a.status){const t=await a.text();throw new jt(`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 jt("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 Ht(`Authentication failed: ${a.status} ${401===a.status?"Unauthorized":"Forbidden"}`,{errorData:e,body:t})}throw new jt(`Server responded with ${a.status}`)}}exporterFetch(){return St(this,It)[It]||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 kt&&i>1))throw t;i=Math.ceil(i/2)}}}class jt extends Error{constructor(t,e){super(t),this.metadata=void 0,this.name="OpenTelemetryClientError",this.metadata=e}}class kt extends Error{constructor(...t){super(...t),this.name="PayloadTooLargeError"}}class Ht extends Error{constructor(t,e){super(t),this.name="AuthenticationFailedError",this.metadata=void 0,this.name="AuthenticationFailedError",this.metadata=e}}function Kt(t,e){var n=Ot();return Kt=function(e,r){var i=n[e-=246];if(void 0===Kt.vbfubl){Kt.ZgIQcP=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[Wt(285)]))try{await this[Wt(278)][Wt(291)]()}catch(t){this[Wt(296)]&&console[Wt(292)](Wt(281)+t)}}[Wt(289)](){this[Wt(301)]&&clearTimeout(this[Wt(301)]),this[Wt(301)]=window[Wt(282)](()=>{this[Wt(288)]()[Wt(298)](()=>{})},this[Wt(293)])}}function Ft(){const t=["BgvUz3rO","nJuZnJKXA2vQD2n4","ywjZ","y2HHCKnVzgvbDa","ndvcyuvVt2G","mJzlr1vIz00","mZq3mJC2m2fIvhzWDG","nKfru1DvDG","ndC2mJaWohbps2TzBG","mtK5mZi3otjguxvwtei","odiWndHxywrvuvK","nZuWmZu2muTNzgz3DG","mZqZmZnrt3LTBgu","mtbmAwveyuW"];return(Ft=function(){return t})()}function Jt(t,e){const n=Ft();return Jt=function(e,r){let i=n[e-=232];if(void 0===Jt.DebUyK){Jt.RKXMAA=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;tt+e.s,0)/t[Xt(378)],n=t[Xt(555)]((t,n)=>t+(n.s-e)**2,0)/(t[Xt(378)]-1),r=Math[Xt(531)](n);return{speed:e,jitter:r}}function re(t,e,n,r,i,o,a,s,c,u,l,d,h){const f=Math[Xt(372)](1e3,t),m=Math[Xt(372)](1e3,n),p=Math[Xt(372)](1e3,o),g=Math[Xt(372)](1e3,s),v=Math[Xt(372)](1e3,a),y=Math[Xt(372)](1e3,c),w=[];if(e[Xt(378)]>=3)for(let t=1;t5e-4){e=!0;break}n=r.s}else n=r.s;return e}(w),S=function(t){if(t[Xt(378)]<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:L,jitter:b}=ne(w);let D=0,T=0;if(r[Xt(378)]>1){const t=new Set(r[Xt(552)](t=>Math[Xt(438)](t.x/20)+","+Math[Xt(438)](t.y/20)))[Xt(432)];D=t>1?1:0,T=r[Xt(555)]((t,e)=>t+e[Xt(523)],0)/r[Xt(378)]}const _=i[Xt(555)]((t,e)=>(null===e[Xt(502)]||t[Xt(482)](e[Xt(502)]),t),[]),{rhythmConsistency:B,jitter:x}=function(t){if(t[Xt(378)]<2)return{rhythmConsistency:0,jitter:0};const e=t[Xt(555)]((t,e)=>t+e,0)/t[Xt(378)],n=t[Xt(555)]((t,n)=>(t??0)+((n??0)-e)**2,0)/t[Xt(378)],r=Math[Xt(531)](n);return{rhythmConsistency:0===r?1:Math[Xt(414)](0,1-r/e),jitter:r/e}}(_),M=_[Xt(378)]>0?_[Xt(555)]((t,e)=>t+e,0)/_[Xt(378)]:0,z=[];if(u[Xt(378)]>=3)for(let t=1;tu[t-1].p?Xt(404):"up";z[Xt(482)]({s:r,dir:i,t:u[t].t})}const{speed:A,jitter:E}=ne(z),P=function(t){if(t[Xt(378)]<2)return 0;let e=0;for(let n=1;n=500&&t[r].t-n>=500&&(e++,n=t[r].t);return e}(z)),{speed:I,jitter:U}=ne(l),q=function(t){if(t[Xt(378)]<2)return 0;let e=0;for(let n=1;n=500&&e++;return e}(l)),k=Math[Xt(438)]((h-d)/1e3);return{ma:f,ca:m,ka:p,sa:g,ta:y,kba:v,t:Math[Xt(372)](3600,k),nm:C?1:0,ms:oe(S),mj:oe(b),msp:oe(L),vc:D,cp:oe(T),rc:oe(B),kj:oe(x),ki:oe(M),ss:oe(A),sj:oe(E),ssm:oe(P),sp:N,ts:oe(I),tj:oe(U),tp:j,tsm:oe(q)}}function ie(t,e){let n=0;return(...r)=>{const i=typeof performance!==Xt(593)?performance[Xt(495)]():Date[Xt(495)]();i-n>=e&&(n=i,t(...r))}}function oe(t){return Math[Xt(551)](100*t)/100}function ae(t){return{wd:t[Xt(509)],ua:t[Xt(530)],cf:t[Xt(441)],be:t[Xt(418)],nm:t[Xt(541)],nc:t[Xt(491)],ka:t[Xt(506)],sa:t[Xt(599)],ta:t[Xt(454)],pt:t[Xt(370)],mp:t[Xt(522)],sd:t[Xt(590)]}}class se{[Xt(497)];[Xt(548)];[Xt(598)];[Xt(483)];[Xt(545)];[Xt(560)]=null;constructor(t,e,n=ee()){const r={shopId:0,updateInterval:5e3,debug:!1,beaconEndpoint:Qt,beaconRetryLimit:3,maxSilenceMs:18e5,exportWithFetch:!1,logsSampleRate:1,candidateSignalsEnabled:!1,candidateUpdateInterval:5e3,candidateSampleRate:100};this[Xt(497)]={...r,...e},this[Xt(598)]=n,this[Xt(483)]=t,this[Xt(548)]={startTime:Date[Xt(495)](),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[Xt(592)]();this[Xt(548)][Xt(556)]={lastSignals:i,lastProcessTime:0,lastSuccessfulSendTime:0,retryCount:0},this[Xt(545)]=(this[Xt(497)][Xt(520)],this[Xt(497)][Xt(492)],this[Xt(598)][Xt(445)],this[Xt(598)][Xt(384)],this[Xt(497)][Xt(388)],this[Xt(497)][Xt(412)],null)}[Xt(439)](){this[Xt(553)](),(async()=>{await this[Xt(379)](),await this[Xt(463)](!0),this[Xt(598)][Xt(384)][Xt(450)](()=>{this[Xt(381)]()},100);const t=()=>{const e=Date[Xt(495)](),n=e-(this[Xt(548)][Xt(484)]||e),r=Math[Xt(414)](0,this[Xt(497)][Xt(513)]-n),i=()=>{this[Xt(598)][Xt(384)][Xt(402)]?this[Xt(548)][Xt(572)]=this[Xt(598)][Xt(384)][Xt(402)](()=>{this[Xt(463)]()[Xt(468)](()=>this[Xt(483)][Xt(377)]())[Xt(468)](()=>{t()})},{timeout:2e3}):this[Xt(463)]()[Xt(468)](()=>this[Xt(483)][Xt(377)]())[Xt(468)](()=>{t()})};r>0?this[Xt(598)][Xt(384)][Xt(450)](i,r):i()};t()})()[Xt(476)](t=>{this[Xt(483)][Xt(480)](t,Xt(439))})}[Xt(451)](){this[Xt(453)]();try{this[Xt(545)]?.[Xt(451)]()}catch(t){this[Xt(483)][Xt(480)](t,Xt(465))}this[Xt(548)][Xt(434)]&&this[Xt(598)][Xt(384)][Xt(567)](this[Xt(548)][Xt(434)]),this[Xt(548)][Xt(572)]&&this[Xt(598)][Xt(384)][Xt(387)]&&this[Xt(598)][Xt(384)][Xt(387)](this[Xt(548)][Xt(572)]),this[Xt(548)][Xt(589)]&&(this[Xt(598)][Xt(445)][Xt(539)](Xt(538),this[Xt(548)][Xt(589)][Xt(538)]),this[Xt(598)][Xt(445)][Xt(539)](Xt(368),this[Xt(548)][Xt(589)][Xt(368)]),this[Xt(598)][Xt(445)][Xt(539)](Xt(422),this[Xt(548)][Xt(589)][Xt(422)]),this[Xt(598)][Xt(445)][Xt(539)](Xt(375),this[Xt(548)][Xt(589)][Xt(375)]),Xt(395)in window&&this[Xt(548)][Xt(589)][Xt(389)]&&this[Xt(548)][Xt(589)][Xt(515)]&&this[Xt(548)][Xt(589)][Xt(595)]&&(this[Xt(598)][Xt(445)][Xt(539)](Xt(389),this[Xt(548)][Xt(589)][Xt(389)]),this[Xt(598)][Xt(445)][Xt(539)](Xt(515),this[Xt(548)][Xt(589)][Xt(515)]),this[Xt(598)][Xt(445)][Xt(539)](Xt(595),this[Xt(548)][Xt(589)][Xt(595)]))),this[Xt(548)][Xt(556)]?.[Xt(420)]&&this[Xt(598)][Xt(384)][Xt(567)](this[Xt(548)][Xt(556)][Xt(420)]),this[Xt(548)][Xt(556)]=void 0}[Xt(415)](){return this[Xt(548)][Xt(556)]?.[Xt(583)]?ae(this[Xt(548)][Xt(556)][Xt(583)]):null}[Xt(571)](){return this[Xt(545)]?.[Xt(415)]()??null}[Xt(525)](){return this[Xt(545)]?.[Xt(501)]()??null}[Xt(379)](){const t={wd:this[Xt(598)][Xt(490)][Xt(586)]?1:0,ua:/bot|crawler|spider|scraper/i[Xt(474)](this[Xt(598)][Xt(490)][Xt(519)])?0:1,cv:this[Xt(411)]()?1:0,br:this[Xt(405)]()?1:0};return this[Xt(548)][Xt(566)]=t,this[Xt(548)][Xt(585)]=!0,t}[Xt(411)](){try{const t=this[Xt(598)][Xt(445)][Xt(485)](Xt(426));t[Xt(518)]=200,t[Xt(386)]=50;const e=t[Xt(561)]("2d");if(null===e)return!1;const n=e[Xt(577)](0,0,200,0);n[Xt(391)](0,Xt(466)),n[Xt(391)](1,Xt(536)),e[Xt(457)]=n,e[Xt(431)](0,0,200,50),e[Xt(457)]=Xt(437),e[Xt(517)]=Xt(448),e[Xt(503)](Xt(407),33,30);const r=t[Xt(459)]();return Boolean(r&&r[Xt(378)]>50)}catch(t){return!1}}[Xt(405)](){let t=0;this[Xt(598)][Xt(490)][Xt(565)]&&this[Xt(598)][Xt(490)][Xt(565)][Xt(378)]>0&&t++,(this[Xt(598)][Xt(490)][Xt(392)]&&this[Xt(598)][Xt(490)][Xt(392)][Xt(378)]>0||this[Xt(598)][Xt(490)][Xt(519)][Xt(588)](Xt(433)))&&t++,this[Xt(409)]()&&t++,typeof this[Xt(598)][Xt(384)][Xt(532)]!==Xt(593)&&t++;try{const e=(new Date)[Xt(477)]();e>-840&&e<840&&t++}catch(t){}return t>=3}[Xt(409)](){const t=this[Xt(598)][Xt(384)][Xt(505)]||this[Xt(598)][Xt(445)][Xt(529)][Xt(512)],e=this[Xt(598)][Xt(384)][Xt(540)]||this[Xt(598)][Xt(445)][Xt(529)][Xt(546)];if(!t||!e)return!1;if(t<=2||e<=2)return!1;const n=t/e;return n>=.2&&n<=5}[Xt(442)](t,e){return n=>{try{t(n)}catch(t){this[Xt(483)][Xt(480)](t,Xt(423)+e)}}}[Xt(381)](){const t=ie(this[Xt(442)](t=>{this[Xt(548)][Xt(475)]++,this[Xt(548)][Xt(570)][Xt(378)]>=10&&this[Xt(548)][Xt(570)][Xt(473)](),this[Xt(548)][Xt(570)][Xt(482)]({x:t[Xt(557)],y:t[Xt(579)],t:t[Xt(543)]})},Xt(538)),100),e=this[Xt(442)](t=>{this[Xt(548)][Xt(504)]++,requestAnimationFrame(()=>setTimeout(()=>{this[Xt(548)][Xt(470)][Xt(378)]>=5&&this[Xt(548)][Xt(470)][Xt(473)](),this[Xt(548)][Xt(470)][Xt(482)]({x:t[Xt(557)],y:t[Xt(579)],t:t[Xt(543)],pre:this[Xt(469)](t)})},0))},Xt(368)),n=this[Xt(442)](t=>{this[Xt(548)][Xt(419)]++;const e=t[Xt(403)];if([Xt(408),Xt(526),Xt(549),Xt(591)][Xt(588)](e))return;const n=this[Xt(548)][Xt(514)][this[Xt(548)][Xt(514)][Xt(378)]-1],r=t[Xt(543)],i=n?r-n.t:null;this[Xt(548)][Xt(514)][Xt(378)]>=10&&this[Xt(548)][Xt(514)][Xt(473)](),this[Xt(548)][Xt(514)][Xt(482)]({_0x4344aa:e,t:r,int:i}),null!==i&&i<100?(this[Xt(548)][Xt(489)][Xt(482)](i),this[Xt(548)][Xt(489)][Xt(378)]>=5&&(this[Xt(548)][Xt(486)]++,this[Xt(548)][Xt(489)]=[])):this[Xt(548)][Xt(489)]=[]},Xt(422)),r=ie(this[Xt(442)](t=>{this[Xt(548)][Xt(562)]++;const e=t[Xt(543)],n=window[Xt(559)];this[Xt(548)][Xt(400)][Xt(378)]>=10&&this[Xt(548)][Xt(400)][Xt(473)](),this[Xt(548)][Xt(400)][Xt(482)]({p:n,t:e})},Xt(375)),200),i=this[Xt(442)](t=>{t[Xt(594)]&&0!==t[Xt(594)][Xt(378)]&&(this[Xt(548)][Xt(373)]++,this[Xt(548)][Xt(488)][Xt(378)]>=10&&this[Xt(548)][Xt(488)][Xt(473)](),this[Xt(548)][Xt(383)]={x:t[Xt(594)][0][Xt(557)],y:t[Xt(594)][0][Xt(579)],t:t[Xt(543)],typ:Xt(533),s:0,d:0})},Xt(389)),o=ie(this[Xt(442)](t=>{if(!t[Xt(594)]||0===t[Xt(594)][Xt(378)])return;const e={x:t[Xt(594)][0][Xt(557)],y:t[Xt(594)][0][Xt(579)]};if(this[Xt(548)][Xt(383)]){const n=this[Xt(547)](this[Xt(548)][Xt(383)],e);this[Xt(548)][Xt(488)][Xt(378)]>=10&&this[Xt(548)][Xt(488)][Xt(473)]();const r={x:t[Xt(594)][0][Xt(557)],y:t[Xt(594)][0][Xt(579)],t:t[Xt(543)],typ:Xt(508),d:n,s:n/(t[Xt(543)]-this[Xt(548)][Xt(383)].t)};this[Xt(548)][Xt(488)][Xt(482)](r),this[Xt(548)][Xt(383)]=r}else{const e={x:t[Xt(594)][0][Xt(557)],y:t[Xt(594)][0][Xt(579)],t:t[Xt(543)],typ:Xt(508),s:0,d:0};this[Xt(548)][Xt(383)]=e}},Xt(515)),200),a=this[Xt(442)](t=>{this[Xt(548)][Xt(383)]=null},Xt(595));this[Xt(598)][Xt(445)][Xt(471)](Xt(538),t,{passive:!0}),this[Xt(598)][Xt(445)][Xt(471)](Xt(368),e,{passive:!0}),this[Xt(598)][Xt(445)][Xt(471)](Xt(422),n,{passive:!0}),this[Xt(598)][Xt(445)][Xt(471)](Xt(375),r,{passive:!0}),Xt(395)in window&&(this[Xt(598)][Xt(445)][Xt(471)](Xt(389),i,{passive:!0}),this[Xt(598)][Xt(445)][Xt(471)](Xt(515),o,{passive:!0}),this[Xt(598)][Xt(445)][Xt(471)](Xt(595),a,{passive:!0})),this[Xt(548)][Xt(589)]={mousemove:t,click:e,keydown:n,scroll:r,touchstart:i,touchmove:o,touchend:a}}async[Xt(463)](t=!1){this[Xt(467)](t),await this[Xt(444)](),this[Xt(548)][Xt(484)]=Date[Xt(495)]()}[Xt(467)](t=!1){const e=Date[Xt(495)]();let n=Math[Xt(438)]((e-this[Xt(548)][Xt(440)])/1e3);null!==this[Xt(548)][Xt(484)]&&(n=Math[Xt(438)]((e-this[Xt(548)][Xt(484)])/1e3)),this[Xt(548)][Xt(367)]?(this[Xt(548)][Xt(367)][Xt(416)]+=t?1:0,this[Xt(548)][Xt(367)][Xt(498)]+=n):this[Xt(548)][Xt(367)]={pageCount:1,sessionStart:this[Xt(548)][Xt(440)],duration:0}}[Xt(396)](t,e=!1){this[Xt(483)][Xt(425)](Xt(464)+t,e)}[Xt(592)](){try{if(this[Xt(598)][Xt(384)][Xt(462)]){const e=this[Xt(598)][Xt(384)][Xt(462)][Xt(456)](te);if(e){const n=JSON[Xt(542)](e);let r;return Xt(509)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}[Xt(558)](t){try{this[Xt(598)][Xt(384)][Xt(462)]&&this[Xt(598)][Xt(384)][Xt(462)][Xt(443)](te,JSON[Xt(516)](ae(t)))}catch(t){}}[Xt(469)](t){const e=t[Xt(563)];if(!(e&&e instanceof Element&&e[Xt(493)]))return 0;const n=e[Xt(493)]();if(!n[Xt(518)]||!n[Xt(386)])return 0;const r=n[Xt(447)]+n[Xt(518)]/2,i=n[Xt(510)]+n[Xt(386)]/2,o=this[Xt(547)]({x:t[Xt(557)],y:t[Xt(579)]},{x:r,y:i}),a=Math[Xt(531)](n[Xt(518)]**2+n[Xt(386)]**2)/2;return a>0?Math[Xt(414)](0,1-o/a):0}[Xt(547)](t,e){return Math[Xt(531)]((e.x-t.x)**2+(e.y-t.y)**2)}[Xt(587)](t){if(t[Xt(472)](Xt(461))||t[Xt(472)](Xt(429)))return t;return""+(this[Xt(598)][Xt(384)][Xt(394)][Xt(568)]||this[Xt(598)][Xt(384)][Xt(394)][Xt(369)]+"//"+this[Xt(598)][Xt(384)][Xt(394)][Xt(371)])+t}[Xt(553)](){if(this[Xt(545)])try{if(null!==this[Xt(497)][Xt(413)]&&!this[Xt(428)]())return this[Xt(560)]=()=>{if(this[Xt(428)]()){this[Xt(453)]();try{this[Xt(545)]?.[Xt(533)]()}catch(t){this[Xt(483)][Xt(480)](t,Xt(581))}}},void this[Xt(598)][Xt(445)][Xt(471)](H[Xt(574)],this[Xt(560)]);this[Xt(545)][Xt(533)]()}catch(t){this[Xt(483)][Xt(480)](t,Xt(581))}}[Xt(428)](){try{return Ct()}catch{return!1}}[Xt(453)](){this[Xt(560)]&&(this[Xt(598)][Xt(445)][Xt(539)](H[Xt(574)],this[Xt(560)]),this[Xt(560)]=null)}[Xt(458)](){if(this[Xt(545)])try{if(!Ct()||!wt())return;return this[Xt(525)]()??void 0}catch(t){return void this[Xt(483)][Xt(480)](t,Xt(521))}}async[Xt(582)](t,e){if(!this[Xt(548)][Xt(556)])return;if(null===this[Xt(497)][Xt(413)])return void(this[Xt(548)][Xt(556)][Xt(578)]=Date[Xt(495)]());const n=function(t,e,n,r){return{v:void 0===r?1:2,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}}}(0,ae(t),e,this[Xt(458)]()),r=JSON[Xt(516)](n),i=this[Xt(587)](this[Xt(497)][Xt(413)]);if(this[Xt(598)][Xt(490)][Xt(582)]&&!this[Xt(497)][Xt(500)])try{const t=new Blob([r],{type:Xt(584)});if(this[Xt(598)][Xt(490)][Xt(582)](i,t))return this[Xt(548)][Xt(556)][Xt(511)]=0,void(this[Xt(548)][Xt(556)][Xt(578)]=Date[Xt(495)]())}catch(t){}try{const t=await fetch(i,{method:Xt(417),headers:{"Content-Type":Xt(584)},body:r,credentials:Xt(564),keepalive:!0});if(!t.ok)throw new Error(Xt(528)+t[Xt(376)]);this[Xt(548)][Xt(556)][Xt(511)]=0,this[Xt(548)][Xt(556)][Xt(578)]=Date[Xt(495)]()}catch(n){this[Xt(554)](t,e)}}[Xt(554)](t,e){if(!this[Xt(548)][Xt(556)]||this[Xt(548)][Xt(556)][Xt(511)]>=this[Xt(497)][Xt(580)])return;const n=Math[Xt(372)](1e3*2**this[Xt(548)][Xt(556)][Xt(511)],3e4);this[Xt(548)][Xt(556)][Xt(511)]++,this[Xt(548)][Xt(556)][Xt(420)]=this[Xt(598)][Xt(384)][Xt(450)](()=>{this[Xt(548)][Xt(556)]&&this[Xt(582)](t,e)},n)}async[Xt(444)](){if(!this[Xt(548)][Xt(556)])return;const t=re(this[Xt(548)][Xt(475)],this[Xt(548)][Xt(570)],this[Xt(548)][Xt(504)],this[Xt(548)][Xt(470)],this[Xt(548)][Xt(514)],this[Xt(548)][Xt(419)],this[Xt(548)][Xt(486)],this[Xt(548)][Xt(562)],this[Xt(548)][Xt(373)],this[Xt(548)][Xt(400)],this[Xt(548)][Xt(488)],this[Xt(548)][Xt(440)],Date[Xt(495)]()),e=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[Xt(541)]=!0),e.ca>0&&1===e.vc&&(i[Xt(491)]=!0),e.ka>0&&(i[Xt(506)]=!0),e.sa>0&&(i[Xt(599)]=!0),e.ta>0&&(i[Xt(454)]=!0),e.t>30&&(i[Xt(370)]=!0),n&&(n[Xt(416)]>1&&(i[Xt(522)]=!0),n[Xt(498)]>60&&(i[Xt(590)]=!0)),r){const t=Object[Xt(534)](i);for(const e of t)i[e]=i[e]||r[e]}return i}(this[Xt(548)][Xt(566)],t,this[Xt(548)][Xt(367)],this[Xt(548)][Xt(556)][Xt(583)]),n=function(t,e){if(!e)return!0;const n=Object[Xt(534)](t);for(const r of n)if(t[r]!==e[r])return!0;return!1}(e,this[Xt(548)][Xt(556)][Xt(583)]),r=Date[Xt(495)]()-this[Xt(548)][Xt(556)][Xt(578)],i=r>=this[Xt(497)][Xt(427)];if(n||i){if(Date[Xt(495)]()-this[Xt(548)][Xt(556)][Xt(449)]<100)return void this[Xt(396)](Xt(401),!0);if(i&&!n&&this[Xt(396)](Xt(478)+Math[Xt(551)](r/1e3)+Xt(507),!0),n&&this[Xt(497)][Xt(397)]){if(this[Xt(548)][Xt(556)][Xt(583)]){Object[Xt(534)](e)[Xt(535)](t=>{this[Xt(548)][Xt(556)][Xt(583)][t],e[t]})}else this[Xt(396)](Xt(410));this[Xt(548)][Xt(367)]}if(this[Xt(548)][Xt(556)][Xt(583)]=(o=e,{...o}),this[Xt(548)][Xt(556)][Xt(449)]=Date[Xt(495)](),this[Xt(558)](e),this[Xt(497)][Xt(452)]&&n)try{this[Xt(497)][Xt(452)](ae(e))}catch(t){this[Xt(483)][Xt(480)](t,Xt(399))}const t=Xt(n?382:481);await this[Xt(582)](e,t)}else this[Xt(497)][Xt(397)];var o}}const ce=(t,e)=>({libVersion:"2.4.0",shopId:e||"",hostname:t[Xt(384)]?.[Xt(394)]?.[Xt(406)]||"",url:t[Xt(384)]?.[Xt(394)]?.[Xt(390)]||"",referrer:t[Xt(445)]?.[Xt(487)]||"",baseURI:t[Xt(445)]?.[Xt(455)]||"",sessionToken:wt()||"",uniqueToken:yt()||""});function ue(t,e){return e>=100||!(e<=0||!t)&&Vt(Xt(435)+t)%100t.startTime-e.startTime)}getLongAnimationFrames(){if(!fe()){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(fe())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 de=null;function he(t,e=0){if(null===t||!fe()&&!Boolean(window.ShopifyAnalytics?.performance?.getLongAnimationFrames))return me(),null;const n=(de?de.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 me(),t;const i=(de?de.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 me(),o}function fe(){return PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")}function me(){de&&(de.destroy(),de=null)}function pe(){return PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")}function ge(){return performance.getEntriesByType("long-animation-frame")}let ve=null,ye=!1;function we(){ve=null,ye=!1}const Ce=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"}),Se=new RegExp(`^${window.location.origin}/((?:(?:[a-z]{2,3}|zh-hans|zh-hant)(?:-[a-zA-Z0-9]+)/)?cart/(add|change|update|clear))`),Le=new RegExp("cart-performance:|add:|change:|clear:|note_update:");var be;function De({monorailRegion:t,schema:e,rawData:n}){const r=Date.now(),i={schema_id:e,payload:e===be.OnUnload?_e(n):Be(n),metadata:{event_created_at_ms:r,event_sent_at_ms:r}},o=Ce[t||""],a=JSON.stringify(i);if(o)if(e!==be.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){}Te(o,a)}else!function(t,e){if("function"==typeof window.fetchLater){const n=ve;try{const r=new AbortController;return window.fetchLater(t,{method:"POST",body:e,headers:{"Content-Type":"text/plain"},credentials:"include",signal:r.signal}),ve=r,void n?.abort()}catch(t){if(null!==n)return}}if(ye)return;Te(t,e),ye=!0}(o,a);else console.debug("📡 Monorail: ",JSON.stringify(i,null,2))}function Te(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 _e(t){const e=xe(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 Be(t){const e=xe(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 xe(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 Me(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"}(be||(be={}));function ze(t){return!Number.isFinite(t)||t<=0?0:Math.min(100,Math.floor(t))}function Ae(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 Ee="xxxx-4xxx-xxxx-xxxxxxxxxxxx";function Pe(){let t="";try{const e=window.crypto,n=new Uint16Array(31);e.getRandomValues(n);let r=0;t=Ee.replace(/[x]/g,t=>{const e=n[r]%16;return r++,("x"===t?e:3&e|8).toString(16)}).toUpperCase()}catch(e){t=Ee.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 Ne=null,Ie=!1,Ue=null,qe=null,je=null,ke=!1;class He{info;config;sampled;onUnloadCounted;constructor(t){this.config=t,this.info={perfKitInit:Date.now(),perfKitVersion:"3.8.0",url:window.location.href,referrer:document.referrer||void 0,microSessionId:Pe(),microSessionCount:0,get sessionToken(){return wt()},get uniqueToken(){return yt()}},this.sampled=100*Math.random()<=(t.resourceTimingSamplingRate??10),this.onUnloadCounted=!1,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:Me(n.domInteractive,r),domComplete:Me(n.domComplete,r),domContentLoadedEventStart:Me(n.domContentLoadedEventStart,r),domContentLoadedEventEnd:Me(n.domContentLoadedEventEnd,r),activationStart:Math.round(r),redirectCount:n.redirectCount,initiatorType:n.initiatorType,transferSize:n.transferSize}}(this.info.perfKitInit)}}function Ke(t){if(Ne=t,qe=new He(t),je=null,Ie=!1,Ue=window.location.pathname,Oe.clear(),we(),de||(de=new le),t.spaMode&&void 0===window.PerfKit&&(window.PerfKit={navigate:()=>{if(!Ne?.spaMode||!qe)return;const t=window.location.href,e=window.location.pathname;Ue!==e?(Ue=e,Ie?qe.info.url=t:(Ze(),qe=new He(Ne),Oe.clear(),we(),Ie=!0)):qe.info.url=t},setPageType:t=>{Ne?.spaMode&&(Ne.storefrontData.pageType=t)},setConsent:t=>{je=t}},document.addEventListener("shopify:page:view",t=>{window.PerfKit.navigate(),t.page?.url&&qe&&(qe.info.url=t.page.url),t.page?.template&&window.PerfKit.setPageType(t.page.template)},!0)),t.shs&&!t.spaMode){const e=t.shsCandidateSampleRate??0;((t,e=ee(),n=new qt(Yt,$t))=>{const r=new At({exporter:n,attributes:ce(e,t?.[Xt(575)])}),i=wt(),o=i?Vt(i):void 0,a=new Rt(t?.[Xt(397)]||!1,r,t?.[Xt(576)]||1,o),s={...t,candidateSignalsEnabled:(t?.[Xt(520)]??!1)&&ue(i,t?.[Xt(496)]??100)},c=new se(a,s,e);e[Xt(445)][Xt(527)]===Xt(393)?e[Xt(445)][Xt(471)](Xt(524),()=>c[Xt(439)]()):c[Xt(439)]()})({debug:!1,shopId:t.storefrontData.shopId,exportWithFetch:t.shsExportWithFetch||!0,logsSampleRate:t.shsLogsSampleRate,candidateSignalsEnabled:e>0,candidateSampleRate:e,...e>0&&void 0!==t.shsCandidateMask&&{candidateMask:t.shsCandidateMask},...t.shsBeaconEndpoint&&{beaconEndpoint:t.shsBeaconEndpoint}})}}const Oe=new Set;function Ze(){if(null!==qe){if(!Fe()&&We()&&Oe.size>0){let t={};for(const e of Oe)t={...t,...e};const e=t.firstContentfulPaint??null,n=he(e,performance.getEntriesByType("navigation")[0]?.activationStart||0);null!==e&&null!==n&&(t.quietWindowStart=Math.round(n));const r=function(){if(!pe())return null;const t=ge();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!==r&&(t.totalStylingDuration=Math.round(r));const i=function(){if(!pe())return null;const t=ge();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!==i&&(t.totalStyleDuration=Math.round(i.totalStyleDuration),t.totalForcedStyleDuration=Math.round(i.totalForcedStyleDuration),t.totalLayoutDuration=Math.round(i.totalLayoutDuration),t.totalForcedLayoutDuration=Math.round(i.totalForcedLayoutDuration)),qe.onUnloadCounted||(qe.info.microSessionCount+=1,qe.onUnloadCounted=!0);const o=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))})}(qe.sampled),a=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}}(qe.sampled),s=performance.getEntriesByType("resource").filter(t=>Se.test(t.name)),c=performance.getEntriesByType("measure").filter(t=>Le.test(t.name)).map(t=>{const e=t.toJSON();return e.name.startsWith("cart-performance:")||(e.name=`cart-performance:${e.name}`),e});De({monorailRegion:qe.config.monorailRegion,schema:be.OnUnload,rawData:{...qe.info,...qe.config.storefrontData,...qe.performanceMetrics,...t,resourceTiming:o,cartAjaxResourceTimings:s,cartPerformanceMetrics:c,paintTimingHidden:ke,speculations:a}})}}else console.debug("⛔️ Shopify/perf-kit is not initialized")}function We(){return null!==je?je:Ct()}((e,r={})=>{const o=a(r=Object.assign({},r),t),s=new WeakMap;o.t=t=>{if(t?.sources?.length){const e=T(t.sources),n=e?.node;if(n){const t=r.generateTarget?.(n)??i(n);s.set(e,t)}}},((e,n={})=>{const r=C();b(p(()=>{let i,o=f("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())},h=m("layout-shift",c);h&&(i=l(e,o,D,n.reportAllChanges),r.onHidden(()=>{c(h.takeRecords()),i(!0)}),u(()=>{s.o=0,o=f("CLS",0),i=l(e,o,D,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=T(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;Oe.add({cumulativeLayoutShift:n,cumulativeLayoutShiftTarget:e.largestShiftTarget})},{reportAllChanges:!0}),((t,n={})=>{const r=a(n=Object.assign({},n),U),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={})=>{S(()=>{const n=C();let r,i=f("LCP");const o=a(e,U),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&&(N(n),removeEventListener(t.type,o,{capture:!0}))};for(const t of["keydown","click","visibilitychange"])addEventListener(t,o,{capture:!0});u(n=>{i=f("LCP"),r=l(t,i,q,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;Oe.add({largestContentfulPaint:Math.round(n),largestContentfulPaintTarget:e.target})},{reportAllChanges:!0}),((t,r={})=>{b(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;Oe.add({firstContentfulPaint:Math.round(e)})}),((t,e={})=>{const r=a(e=Object.assign({},e),P);let o=[],s=[],c=0;const d=new WeakMap,h=new WeakMap;let p=!1;const g=()=>{p||(N(v),p=!0)},v=()=>{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)),p=!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),g()},r.p=t=>{if(!h.get(t)){const n=t.entries[0].target;if(n){const r=e.generateTarget?.(n)??i(n);h.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),f={interactionTarget:h.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})(f),Object.assign(t,{attribution:f})};m("long-animation-frame",t=>{o=o.concat(t),g()}),((t,e={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=C();S(()=>{"interactionCount"in performance||z||(z=m("event",M,{type:"event",buffered:!0,durationThreshold:0}));let r,i=f("INP");const o=a(e,P),s=t=>{N(()=>{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=m("event",s,{durationThreshold:e.durationThreshold??40});r=l(t,i,I,e.reportAllChanges),c&&(c.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{s(c.takeRecords()),r(!0)}),u(()=>{o.v(),i=f("INP"),r=l(t,i,I,e.reportAllChanges)}))})})(e=>{const n=w(e);t(n)},e)})(function(t){const{attribution:e,value:n}=t;if(null===qe)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(Fe())return;if(!We())return;qe.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)}:{};De({monorailRegion:qe.config.monorailRegion,schema:be.OnInteraction,rawData:{...qe.info,...qe.config.storefrontData,...qe.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=f("TTFB"),i=l(t,r,j,n.reportAllChanges);k(()=>{const o=e();o&&(r.value=Math.max(o.responseStart-h(),0),r.entries=[o],i(!0),u(()=>{r=f("TTFB",0),i=l(t,r,j,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;Oe.add({timeToFirstByte:Math.round(e)})}),addEventListener("DOMContentLoaded",()=>{ke="hidden"===document.visibilityState}),addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&Ze()}),addEventListener("pagehide",()=>{Ze()});const Re=/bot|crawl|headless|curl|wget|python|spider|libwww-pearl|newrelic|datadog|sitebulb|site24x7/i;function Fe(){return!!Re.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{Ke(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:Ae(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:Number(t.shsLogsSampleRate)||1,shsCandidateSampleRate:ze(Number(t.shsCandidateSampleRate)),shsCandidateMask:t.shsCandidateMask}}(t))}catch(t){console.error("🚫 Error initializing PerfKit:",t.message)}}()}();

search