!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 s(t,e){return o.get(t)||o.set(t,new e),o.get(t)}let a=-1;const c=()=>a,u=t=>{addEventListener("pageshow",e=>{e.persisted&&(a=e.timeStamp,t(e))},!0)},l=(t,e,n,r)=>{let i,o;return s=>{e.value>=0&&(s||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))}},b=()=>{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)}}},C=t=>{document.prerendering?addEventListener("prerenderingchange",()=>t(),!0):t()},S=[1800,3e3],T=(t,e={})=>{C(()=>{const n=b();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,S,e.reportAllChanges),d(()=>{i.value=performance.now()-n.timeStamp,r(!0)})}))})},_=[.1,.25],L=t=>t.find(t=>1===t.node?.nodeType)||t[0];let x=0,B=1/0,D=0;const M=t=>{for(const e of t)e.interactionId&&(B=Math.min(B,e.interactionId),D=Math.max(D,e.interactionId),x=D?(D-B)/7+1:0)};let z;const A=()=>z?x:performance.interactionCount??0;let I=0;class E{l=[];h=new Map;m;p;v(){I=A(),this.l.length=0,this.h.clear()}M(){const t=Math.min(this.l.length-1,Math.floor((A()-I)/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 P=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})}))},N=[200,500];class q{m;u(t){this.m?.(t)}}const j=[2500,4e3],k=[800,1800],H=t=>{document.prerendering?C(()=>H(t)):"complete"!==document.readyState?addEventListener("load",()=>H(t),!0):setTimeout(t)},U="",O="1",Z="0",K="p",W="a",R="m",F="t",J="m",V="a",X="p",Y="s",G=()=>"undefined"==typeof window;function $(t){try{return decodeURIComponent(t)}catch(t){return""}}function Q(t,e=!1){const n=function(){try{return document.cookie}catch{return!1}}()?document.cookie.split("; "):[];for(let e=0;et);if(r)try{sessionStorage.setItem("consentHeader",r)}catch{}return r}let rt;function it(){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=rt;for(let t=n.length-1;t>=0;t--){let e=ot(n[t]);if(e){r=e;break}}return rt=r,r}function ot(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 st(){return window}function at(){var t,e;const n=st();return!0===(null==n||null===(t=n.Shopify)||void 0===t||null===(e=t.customerPrivacy)||void 0===e?void 0:e.backendConsentEnabled)}function ct(){var t,e;const n=st();return null==n||null===(t=n.Shopify)||void 0===t||null===(e=t.customerPrivacy)||void 0===e?void 0:e.serverTimingSupportVerified}function ut(){if(!G()){var t,e;const n=null===(t=window.Shopify)||void 0===t||null===(e=t.customerPrivacy)||void 0===e?void 0:e.injectedConsent;return n?$(n):void 0}}function lt(){let t;if(t=G()?ut():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?$(n):void 0}()||ut()||new URLSearchParams(window.location.search).get("_cs")||void 0||Q("_tracking_consent")||function(){let t;if(t=at()&&et(it)||et(nt),!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,s]=e;let a,c;try{a=e[5]?JSON.parse(e.slice(5).join("_")):void 0}catch{}if(s){const t=s.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:U}function l(t){return n.includes(t.replace("t","s").toUpperCase())}return{v:"3",con:{CMP:{[V]:u(V),[X]:u(X),[J]:u(J),[Y]:u(Y)}},region:r||"",cus:a,purposes:{[W]:l(W),[K]:l(K),[R]:l(R),[F]:l(F)},sale_of_data_region:"t"==o,display_banner:"t"==i,consent_id:c}}(t);return}(t)}function dt(t){const e=function(){try{let t=lt();if(!t)return;return t}catch{return}}();if(!e||!e.purposes)return!0;const n=e.purposes[t];return"boolean"!=typeof n||n}function ht(){return dt(W)}const ft={},mt=/^https?:\/\/([^/]+)(\/api\/(?:unstable|2\d{3}-\d{2})\/graphql\.json(?=$|\?))?/;function pt(t,e){if(at()){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 s=o[n];if("fetch"!==s.initiatorType)continue;const a=s.name.match(mt);if(!a)continue;const[,c,u]=a;if(!(c===e||u&&(null==c?void 0:c.endsWith(`.${e}`))))continue;const l=null===(r=s.serverTiming)||void 0===r||null===(i=r.find(e=>e.name===t))||void 0===i?void 0:i.description;if(l)return ft[t]=l,l}}return ft[t]}catch{return ft[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 gt(t,e){if(!{}.hasOwnProperty.call(t,e))throw new TypeError("attempted to use private field on non-instance");return t}var vt=0;function yt(t){return"__private_"+vt+++"_"+t}function wt(t){return Object.entries(t).map(([t,e])=>({key:t,value:{stringValue:String(e)}}))}function bt(t){if(Array.isArray(t))return{arrayValue:{values:t.map(t=>bt(t))}};switch(typeof t){case"boolean":return{boolValue:Boolean(t)};case"number":return{doubleValue:Number(t)};default:return{stringValue:String(t)}}}const Ct=function(t,e,n){const r=[0];for(let i=0;i{t.attributes={...gt(this,Tt)[Tt],...t.attributes}});const t=gt(this,_t)[_t];gt(this,_t)[_t]=[],await this.exportByKeepalive(t,(t,e)=>gt(this,St)[St].exportMetrics(this.aggregateMetrics(t),e))}async exportLogs(){const t=gt(this,Lt)[Lt];gt(this,Lt)[Lt]=[],await this.exportByKeepalive(t,(t,e)=>gt(this,St)[St].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:s,attributes:a}=e,c=null!==(n=e.bounds)&&void 0!==n?n:Ct,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:wt(null!=s?s:{}),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:s}=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:wt(null!=s?s:{})})}(e,t);break;case"gauge":!function(t,e){const{name:n,value:r,unit:i,timeUnixNano:o,attributes:s}=e;t[n]||={name:n,unit:i||"1",gauge:{dataPoints:[]}},t[n].gauge.dataPoints.push({startTimeUnixNano:o,timeUnixNano:o,asDouble:r,attributes:wt(null!=s?s:{})})}(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={...gt(this,Tt)[Tt],...t.attributes},Object.entries(n).map(([t,e])=>({key:t,value:bt(e)})))};var n;return t.body&&(e.body={stringValue:t.body}),e})}}var Bt=yt("url"),Dt=yt("serviceName"),Mt=yt("logger"),zt=yt("fetchFn"),At=yt("maxPayloadSizeBytes");class It{constructor(t,e,n){var r;Object.defineProperty(this,Bt,{writable:!0,value:void 0}),Object.defineProperty(this,Dt,{writable:!0,value:void 0}),Object.defineProperty(this,Mt,{writable:!0,value:void 0}),Object.defineProperty(this,zt,{writable:!0,value:void 0}),Object.defineProperty(this,At,{writable:!0,value:void 0}),gt(this,Bt)[Bt]=t.replace(/\/v1\/(logs|metrics|traces)\/?$/,""),gt(this,Dt)[Dt]=e,gt(this,Mt)[Mt]=null==n?void 0:n.logger,gt(this,zt)[zt]=null==n?void 0:n.fetchFn,gt(this,At)[At]=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:gt(this,Dt)[Dt]}}]},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:gt(this,Dt)[Dt]}}]},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>gt(this,At)[At])throw new Pt(`Payload size ${o} exceeds ${gt(this,At)[At]} bytes`);const s=await this.exporterFetch()(`${gt(this,Bt)[Bt]}${e}`,{method:"POST",keepalive:n,headers:{"Content-Type":"application/json"},body:i});if(null===(r=gt(this,Mt)[Mt])||void 0===r||r.log({status:s.status}),!s.ok){if(400===s.status){const t=await s.text();throw new Et(`Invalid OpenTelemetry Data: ${t}`)}if(429===s.status||503===s.status){const e=await s.text(),n=s.headers.get("Retry-After"),r=n?{seconds:Number(n)}:void 0;throw new Et("Server did not accept data",{errorData:e,retryAfter:r,body:t})}if(401===s.status||403===s.status){const e=await s.text();throw new Nt(`Authentication failed: ${s.status} ${401===s.status?"Unauthorized":"Forbidden"}`,{errorData:e,body:t})}throw new Et(`Server responded with ${s.status}`)}}exporterFetch(){return gt(this,zt)[zt]||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 Pt&&i>1))throw t;i=Math.ceil(i/2)}}}class Et extends Error{constructor(t,e){super(t),this.metadata=void 0,this.name="OpenTelemetryClientError",this.metadata=e}}class Pt extends Error{constructor(...t){super(...t),this.name="PayloadTooLargeError"}}class Nt extends Error{constructor(t,e){super(t),this.name="AuthenticationFailedError",this.metadata=void 0,this.name="AuthenticationFailedError",this.metadata=e}}function qt(t,e){let n,r;try{var i,o,s,a;n=null===(i=performance)||void 0===i||null===(o=i.getEntriesByType("navigation")[0])||void 0===o||null===(s=o.serverTiming)||void 0===s||null===(a=s.find(t=>t.name==e))||void 0===a?void 0:a.description}catch{n=void 0}try{var c,u,l,d;r=null===(c=document.cookie)||void 0===c||null===(u=c.split(";"))||void 0===u||null===(l=u.find(e=>e.includes(t)))||void 0===l||null===(d=l.split("=")[1])||void 0===d?void 0:d.trim()}catch{r=void 0}return n||r}function jt(){return qt("_shopify_s","_s")}function kt(){var t=["mJyWmvbxy1nfEG","ndy2mdi1n0r5ugTjuG","mZK0mZy1neL6CLbZEa","ndqXnurLuwTWBa","ntG2mtG4wxDYsMrT","mZbpsujOvwu","mZjsr3Htugq","odu3mtKWAe5vALbm","nZiXmJK3wfLyzgXd","mJbnA3zqzLu","mtiYoeniuwHzDG"];return(kt=function(){return t})()}function Ht(t,e){var n=kt();return Ht=function(e,r){var i=n[e-=353];if(void 0===Ht.bsKlNS){Ht.SwNTrB=function(t){for(var e,n,r="",i="",o=0,s=0;n=t.charAt(s++);~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 a=0,c=r.length;a=this[Ot(437)]))try{await this[Ot(428)][Ot(447)]()}catch(t){this[Ot(435)]&&console[Ot(436)](Ot(422)+t)}}[Ot(442)](){this[Ot(444)]&&clearTimeout(this[Ot(444)]),this[Ot(444)]=window[Ot(445)](()=>{this[Ot(446)]()[Ot(426)](()=>{})},this[Ot(432)])}}function Ot(t,e){const n=Zt();return Ot=function(e,r){let i=n[e-=418];if(void 0===Ot.IhDcNA){Ot.zpvkFL=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;t>(-2*i&6)):0)r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(r);for(let t=0,r=e.length;tt+e.s,0)/t[Ft(472)],n=t[Ft(414)]((t,n)=>t+(n.s-e)**2,0)/(t[Ft(472)]-1),r=Math[Ft(546)](n);return{speed:e,jitter:r}}function Qt(t,e,n,r,i,o,s,a,c,u,l,d,h){const f=Math[Ft(412)](1e3,t),m=Math[Ft(412)](1e3,n),p=Math[Ft(412)](1e3,o),g=Math[Ft(412)](1e3,a),v=Math[Ft(412)](1e3,s),y=Math[Ft(412)](1e3,c),w=[];if(e[Ft(472)]>=3)for(let t=1;t5e-4){e=!0;break}n=r.s}else n=r.s;return e}(w),C=function(t){if(t[Ft(472)]<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:S,jitter:T}=$t(w);let _=0,L=0;if(r[Ft(472)]>1){const t=new Set(r[Ft(416)](t=>Math[Ft(466)](t.x/20)+","+Math[Ft(466)](t.y/20)))[Ft(418)];_=t>1?1:0,L=r[Ft(414)]((t,e)=>t+e[Ft(459)],0)/r[Ft(472)]}const x=i[Ft(414)]((t,e)=>(null===e[Ft(380)]||t[Ft(492)](e[Ft(380)]),t),[]),{rhythmConsistency:B,jitter:D}=function(t){if(t[Ft(472)]<2)return{rhythmConsistency:0,jitter:0};const e=t[Ft(414)]((t,e)=>t+e,0)/t[Ft(472)],n=t[Ft(414)]((t,n)=>(t??0)+((n??0)-e)**2,0)/t[Ft(472)],r=Math[Ft(546)](n);return{rhythmConsistency:0===r?1:Math[Ft(511)](0,1-r/e),jitter:r/e}}(x),M=x[Ft(472)]>0?x[Ft(414)]((t,e)=>t+e,0)/x[Ft(472)]:0,z=[];if(u[Ft(472)]>=3)for(let t=1;tu[t-1].p?Ft(383):"up";z[Ft(492)]({s:r,dir:i,t:u[t].t})}const{speed:A,jitter:I}=$t(z),E=function(t){if(t[Ft(472)]<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:N,jitter:q}=$t(l),j=function(t){if(t[Ft(472)]<2)return 0;let e=0;for(let n=1;n=500&&e++;return e}(l)),H=Math[Ft(466)]((h-d)/1e3);return{ma:f,ca:m,ka:p,sa:g,ta:y,kba:v,t:Math[Ft(412)](3600,H),nm:b?1:0,ms:ee(C),mj:ee(T),msp:ee(S),vc:_,cp:ee(L),rc:ee(B),kj:ee(D),ki:ee(M),ss:ee(A),sj:ee(I),ssm:ee(E),sp:P,ts:ee(N),tj:ee(q),tp:k,tsm:ee(j)}}function te(t,e){let n=0;return(...r)=>{const i=typeof performance!==Ft(439)?performance[Ft(399)]():Date[Ft(399)]();i-n>=e&&(n=i,t(...r))}}function ee(t){return Math[Ft(487)](100*t)/100}function ne(t){return{wd:t[Ft(512)],ua:t[Ft(436)],cf:t[Ft(351)],be:t[Ft(506)],nm:t[Ft(519)],nc:t[Ft(357)],ka:t[Ft(490)],sa:t[Ft(533)],ta:t[Ft(338)],pt:t[Ft(476)],mp:t[Ft(530)],sd:t[Ft(386)]}}class re{[Ft(471)];[Ft(392)];[Ft(479)];[Ft(454)];constructor(t,e,n=Gt()){const r={shopId:0,updateInterval:5e3,debug:!1,beaconEndpoint:Xt,beaconRetryLimit:3,maxSilenceMs:18e5,exportWithFetch:!1,logsSampleRate:1};this[Ft(471)]={...r,...e},this[Ft(479)]=n,this[Ft(454)]=t,this[Ft(392)]={startTime:Date[Ft(399)](),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[Ft(345)]();this[Ft(392)][Ft(457)]={lastSignals:i,lastProcessTime:0,lastSuccessfulSendTime:0,retryCount:0}}[Ft(451)](){(async()=>{await this[Ft(344)](),await this[Ft(478)](!0),this[Ft(479)][Ft(495)][Ft(500)](()=>{this[Ft(369)]()},100);const t=()=>{const e=Date[Ft(399)](),n=e-(this[Ft(392)][Ft(507)]||e),r=Math[Ft(511)](0,this[Ft(471)][Ft(367)]-n),i=()=>{this[Ft(479)][Ft(495)][Ft(358)]?this[Ft(392)][Ft(445)]=this[Ft(479)][Ft(495)][Ft(358)](()=>{this[Ft(478)]()[Ft(462)](()=>this[Ft(454)][Ft(461)]())[Ft(462)](()=>{t()})},{timeout:2e3}):this[Ft(478)]()[Ft(462)](()=>this[Ft(454)][Ft(461)]())[Ft(462)](()=>{t()})};r>0?this[Ft(479)][Ft(495)][Ft(500)](i,r):i()};t()})()[Ft(361)](t=>{this[Ft(454)][Ft(544)](t,Ft(451))})}[Ft(475)](){this[Ft(392)][Ft(348)]&&this[Ft(479)][Ft(495)][Ft(524)](this[Ft(392)][Ft(348)]),this[Ft(392)][Ft(445)]&&this[Ft(479)][Ft(495)][Ft(395)]&&this[Ft(479)][Ft(495)][Ft(395)](this[Ft(392)][Ft(445)]),this[Ft(392)][Ft(538)]&&(this[Ft(479)][Ft(455)][Ft(413)](Ft(470),this[Ft(392)][Ft(538)][Ft(470)]),this[Ft(479)][Ft(455)][Ft(413)](Ft(362),this[Ft(392)][Ft(538)][Ft(362)]),this[Ft(479)][Ft(455)][Ft(413)](Ft(423),this[Ft(392)][Ft(538)][Ft(423)]),this[Ft(479)][Ft(455)][Ft(413)](Ft(336),this[Ft(392)][Ft(538)][Ft(336)]),Ft(373)in window&&this[Ft(392)][Ft(538)][Ft(520)]&&this[Ft(392)][Ft(538)][Ft(543)]&&this[Ft(392)][Ft(538)][Ft(363)]&&(this[Ft(479)][Ft(455)][Ft(413)](Ft(520),this[Ft(392)][Ft(538)][Ft(520)]),this[Ft(479)][Ft(455)][Ft(413)](Ft(543),this[Ft(392)][Ft(538)][Ft(543)]),this[Ft(479)][Ft(455)][Ft(413)](Ft(363),this[Ft(392)][Ft(538)][Ft(363)]))),this[Ft(392)][Ft(457)]?.[Ft(539)]&&this[Ft(479)][Ft(495)][Ft(524)](this[Ft(392)][Ft(457)][Ft(539)]),this[Ft(392)][Ft(457)]=void 0}[Ft(347)](){return this[Ft(392)][Ft(457)]?.[Ft(398)]?ne(this[Ft(392)][Ft(457)][Ft(398)]):null}[Ft(344)](){const t={wd:this[Ft(479)][Ft(350)][Ft(505)]?1:0,ua:/bot|crawler|spider|scraper/i[Ft(352)](this[Ft(479)][Ft(350)][Ft(468)])?0:1,cv:this[Ft(403)]()?1:0,br:this[Ft(376)]()?1:0};return this[Ft(392)][Ft(434)]=t,this[Ft(392)][Ft(335)]=!0,t}[Ft(403)](){try{const t=this[Ft(479)][Ft(455)][Ft(377)](Ft(340));t[Ft(355)]=200,t[Ft(360)]=50;const e=t[Ft(485)]("2d");if(null===e)return!1;const n=e[Ft(532)](0,0,200,0);n[Ft(504)](0,Ft(353)),n[Ft(504)](1,Ft(518)),e[Ft(415)]=n,e[Ft(435)](0,0,200,50),e[Ft(415)]=Ft(480),e[Ft(404)]=Ft(346),e[Ft(433)](Ft(372),33,30);const r=t[Ft(426)]();return Boolean(r&&r[Ft(472)]>50)}catch(t){return!1}}[Ft(376)](){let t=0;this[Ft(479)][Ft(350)][Ft(446)]&&this[Ft(479)][Ft(350)][Ft(446)][Ft(472)]>0&&t++,(this[Ft(479)][Ft(350)][Ft(442)]&&this[Ft(479)][Ft(350)][Ft(442)][Ft(472)]>0||this[Ft(479)][Ft(350)][Ft(468)][Ft(448)](Ft(381)))&&t++,this[Ft(541)]()&&t++,typeof this[Ft(479)][Ft(495)][Ft(391)]!==Ft(439)&&t++;try{const e=(new Date)[Ft(440)]();e>-840&&e<840&&t++}catch(t){}return t>=3}[Ft(541)](){const t=this[Ft(479)][Ft(495)][Ft(419)]||this[Ft(479)][Ft(455)][Ft(432)][Ft(443)],e=this[Ft(479)][Ft(495)][Ft(496)]||this[Ft(479)][Ft(455)][Ft(432)][Ft(491)];if(!t||!e)return!1;if(t<=2||e<=2)return!1;const n=t/e;return n>=.2&&n<=5}[Ft(473)](t,e){return n=>{try{t(n)}catch(t){this[Ft(454)][Ft(544)](t,Ft(458)+e)}}}[Ft(369)](){const t=te(this[Ft(473)](t=>{this[Ft(392)][Ft(469)]++,this[Ft(392)][Ft(464)][Ft(472)]>=10&&this[Ft(392)][Ft(464)][Ft(513)](),this[Ft(392)][Ft(464)][Ft(492)]({x:t[Ft(387)],y:t[Ft(341)],t:t[Ft(393)]})},Ft(470)),100),e=this[Ft(473)](t=>{this[Ft(392)][Ft(437)]++,requestAnimationFrame(()=>setTimeout(()=>{this[Ft(392)][Ft(444)][Ft(472)]>=5&&this[Ft(392)][Ft(444)][Ft(513)](),this[Ft(392)][Ft(444)][Ft(492)]({x:t[Ft(387)],y:t[Ft(341)],t:t[Ft(393)],pre:this[Ft(397)](t)})},0))},Ft(362)),n=this[Ft(473)](t=>{this[Ft(392)][Ft(540)]++;const e=t[Ft(509)];if([Ft(489),Ft(420),Ft(515),Ft(499)][Ft(448)](e))return;const n=this[Ft(392)][Ft(527)][this[Ft(392)][Ft(527)][Ft(472)]-1],r=t[Ft(393)],i=n?r-n.t:null;this[Ft(392)][Ft(527)][Ft(472)]>=10&&this[Ft(392)][Ft(527)][Ft(513)](),this[Ft(392)][Ft(527)][Ft(492)]({_0x60a3ec:e,t:r,int:i}),null!==i&&i<100?(this[Ft(392)][Ft(452)][Ft(492)](i),this[Ft(392)][Ft(452)][Ft(472)]>=5&&(this[Ft(392)][Ft(396)]++,this[Ft(392)][Ft(452)]=[])):this[Ft(392)][Ft(452)]=[]},Ft(423)),r=te(this[Ft(473)](t=>{this[Ft(392)][Ft(531)]++;const e=t[Ft(393)],n=window[Ft(467)];this[Ft(392)][Ft(521)][Ft(472)]>=10&&this[Ft(392)][Ft(521)][Ft(513)](),this[Ft(392)][Ft(521)][Ft(492)]({p:n,t:e})},Ft(336)),200),i=this[Ft(473)](t=>{t[Ft(408)]&&0!==t[Ft(408)][Ft(472)]&&(this[Ft(392)][Ft(370)]++,this[Ft(392)][Ft(449)][Ft(472)]>=10&&this[Ft(392)][Ft(449)][Ft(513)](),this[Ft(392)][Ft(379)]={x:t[Ft(408)][0][Ft(387)],y:t[Ft(408)][0][Ft(341)],t:t[Ft(393)],typ:Ft(339),s:0,d:0})},Ft(520)),o=te(this[Ft(473)](t=>{if(!t[Ft(408)]||0===t[Ft(408)][Ft(472)])return;const e={x:t[Ft(408)][0][Ft(387)],y:t[Ft(408)][0][Ft(341)]};if(this[Ft(392)][Ft(379)]){const n=this[Ft(535)](this[Ft(392)][Ft(379)],e);this[Ft(392)][Ft(449)][Ft(472)]>=10&&this[Ft(392)][Ft(449)][Ft(513)]();const r={x:t[Ft(408)][0][Ft(387)],y:t[Ft(408)][0][Ft(341)],t:t[Ft(393)],typ:Ft(356),d:n,s:n/(t[Ft(393)]-this[Ft(392)][Ft(379)].t)};this[Ft(392)][Ft(449)][Ft(492)](r),this[Ft(392)][Ft(379)]=r}else{const e={x:t[Ft(408)][0][Ft(387)],y:t[Ft(408)][0][Ft(341)],t:t[Ft(393)],typ:Ft(356),s:0,d:0};this[Ft(392)][Ft(379)]=e}},Ft(543)),200),s=this[Ft(473)](t=>{this[Ft(392)][Ft(379)]=null},Ft(363));this[Ft(479)][Ft(455)][Ft(349)](Ft(470),t,{passive:!0}),this[Ft(479)][Ft(455)][Ft(349)](Ft(362),e,{passive:!0}),this[Ft(479)][Ft(455)][Ft(349)](Ft(423),n,{passive:!0}),this[Ft(479)][Ft(455)][Ft(349)](Ft(336),r,{passive:!0}),Ft(373)in window&&(this[Ft(479)][Ft(455)][Ft(349)](Ft(520),i,{passive:!0}),this[Ft(479)][Ft(455)][Ft(349)](Ft(543),o,{passive:!0}),this[Ft(479)][Ft(455)][Ft(349)](Ft(363),s,{passive:!0})),this[Ft(392)][Ft(538)]={mousemove:t,click:e,keydown:n,scroll:r,touchstart:i,touchmove:o,touchend:s}}async[Ft(478)](t=!1){this[Ft(431)](t),await this[Ft(364)](),this[Ft(392)][Ft(507)]=Date[Ft(399)]()}[Ft(431)](t=!1){const e=Date[Ft(399)]();let n=Math[Ft(466)]((e-this[Ft(392)][Ft(422)])/1e3);null!==this[Ft(392)][Ft(507)]&&(n=Math[Ft(466)]((e-this[Ft(392)][Ft(507)])/1e3)),this[Ft(392)][Ft(463)]?(this[Ft(392)][Ft(463)][Ft(388)]+=t?1:0,this[Ft(392)][Ft(463)][Ft(400)]+=n):this[Ft(392)][Ft(463)]={pageCount:1,sessionStart:this[Ft(392)][Ft(422)],duration:0}}[Ft(545)](t,e=!1){this[Ft(454)][Ft(342)](Ft(508)+t,e)}[Ft(345)](){try{if(this[Ft(479)][Ft(495)][Ft(517)]){const e=this[Ft(479)][Ft(495)][Ft(517)][Ft(542)](Yt);if(e){const n=JSON[Ft(528)](e);let r;return Ft(512)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}[Ft(537)](t){try{this[Ft(479)][Ft(495)][Ft(517)]&&this[Ft(479)][Ft(495)][Ft(517)][Ft(427)](Yt,JSON[Ft(529)](ne(t)))}catch(t){}}[Ft(397)](t){const e=t[Ft(406)];if(!(e&&e instanceof Element&&e[Ft(477)]))return 0;const n=e[Ft(477)]();if(!n[Ft(355)]||!n[Ft(360)])return 0;const r=n[Ft(402)]+n[Ft(355)]/2,i=n[Ft(438)]+n[Ft(360)]/2,o=this[Ft(535)]({x:t[Ft(387)],y:t[Ft(341)]},{x:r,y:i}),s=Math[Ft(546)](n[Ft(355)]**2+n[Ft(360)]**2)/2;return s>0?Math[Ft(511)](0,1-o/s):0}[Ft(535)](t,e){return Math[Ft(546)]((e.x-t.x)**2+(e.y-t.y)**2)}[Ft(482)](t){if(t[Ft(389)](Ft(481))||t[Ft(389)](Ft(354)))return t;return""+(this[Ft(479)][Ft(495)][Ft(359)][Ft(456)]||this[Ft(479)][Ft(495)][Ft(359)][Ft(510)]+"//"+this[Ft(479)][Ft(495)][Ft(359)][Ft(394)])+t}async[Ft(368)](t,e){if(!this[Ft(392)][Ft(457)])return;if(null===this[Ft(471)][Ft(407)])return void(this[Ft(392)][Ft(457)][Ft(390)]=Date[Ft(399)]());const n=function(t,e,n){return{v:t,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}}(1,ne(t),e),r=JSON[Ft(529)](n),i=this[Ft(482)](this[Ft(471)][Ft(407)]);if(this[Ft(479)][Ft(350)][Ft(368)]&&!this[Ft(471)][Ft(366)])try{const t=new Blob([r],{type:Ft(502)});if(this[Ft(479)][Ft(350)][Ft(368)](i,t))return this[Ft(392)][Ft(457)][Ft(411)]=0,void(this[Ft(392)][Ft(457)][Ft(390)]=Date[Ft(399)]())}catch(t){}try{const t=await fetch(i,{method:Ft(523),headers:{"Content-Type":Ft(502)},body:r,credentials:Ft(522),keepalive:!0});if(!t.ok)throw new Error(Ft(465)+t[Ft(497)]);this[Ft(392)][Ft(457)][Ft(411)]=0,this[Ft(392)][Ft(457)][Ft(390)]=Date[Ft(399)]()}catch(n){this[Ft(421)](t,e)}}[Ft(421)](t,e){if(!this[Ft(392)][Ft(457)]||this[Ft(392)][Ft(457)][Ft(411)]>=this[Ft(471)][Ft(385)])return;const n=Math[Ft(412)](1e3*2**this[Ft(392)][Ft(457)][Ft(411)],3e4);this[Ft(392)][Ft(457)][Ft(411)]++,this[Ft(392)][Ft(457)][Ft(539)]=this[Ft(479)][Ft(495)][Ft(500)](()=>{this[Ft(392)][Ft(457)]&&this[Ft(368)](t,e)},n)}async[Ft(364)](){if(!this[Ft(392)][Ft(457)])return;const t=Qt(this[Ft(392)][Ft(469)],this[Ft(392)][Ft(464)],this[Ft(392)][Ft(437)],this[Ft(392)][Ft(444)],this[Ft(392)][Ft(527)],this[Ft(392)][Ft(540)],this[Ft(392)][Ft(396)],this[Ft(392)][Ft(531)],this[Ft(392)][Ft(370)],this[Ft(392)][Ft(521)],this[Ft(392)][Ft(449)],this[Ft(392)][Ft(422)],Date[Ft(399)]()),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[Ft(519)]=!0),e.ca>0&&1===e.vc&&(i[Ft(357)]=!0),e.ka>0&&(i[Ft(490)]=!0),e.sa>0&&(i[Ft(533)]=!0),e.ta>0&&(i[Ft(338)]=!0),e.t>30&&(i[Ft(476)]=!0),n&&(n[Ft(388)]>1&&(i[Ft(530)]=!0),n[Ft(400)]>60&&(i[Ft(386)]=!0)),r){const t=Object[Ft(453)](i);for(const e of t)i[e]=i[e]||r[e]}return i}(this[Ft(392)][Ft(434)],t,this[Ft(392)][Ft(463)],this[Ft(392)][Ft(457)][Ft(398)]),n=function(t,e){if(!e)return!0;const n=Object[Ft(453)](t);for(const r of n)if(t[r]!==e[r])return!0;return!1}(e,this[Ft(392)][Ft(457)][Ft(398)]),r=Date[Ft(399)]()-this[Ft(392)][Ft(457)][Ft(390)],i=r>=this[Ft(471)][Ft(384)];if(n||i){if(Date[Ft(399)]()-this[Ft(392)][Ft(457)][Ft(447)]<100)return void this[Ft(545)](Ft(409),!0);if(i&&!n&&this[Ft(545)](Ft(483)+Math[Ft(487)](r/1e3)+Ft(516),!0),n&&this[Ft(471)][Ft(514)]){if(this[Ft(392)][Ft(457)][Ft(398)]){Object[Ft(453)](e)[Ft(493)](t=>{this[Ft(392)][Ft(457)][Ft(398)][t],e[t]})}else this[Ft(545)](Ft(536));this[Ft(392)][Ft(463)]}if(this[Ft(392)][Ft(457)][Ft(398)]=(o=e,{...o}),this[Ft(392)][Ft(457)][Ft(447)]=Date[Ft(399)](),this[Ft(537)](e),this[Ft(471)][Ft(425)]&&n)try{this[Ft(471)][Ft(425)](ne(e))}catch(t){this[Ft(454)][Ft(544)](t,Ft(488))}const t=Ft(n?460:441);await this[Ft(368)](e,t)}else this[Ft(471)][Ft(514)];var o}}const ie=(t,e)=>({libVersion:"2.3.0",shopId:e||"",hostname:t[Ft(495)]?.[Ft(359)]?.[Ft(365)]||"",url:t[Ft(495)]?.[Ft(359)]?.[Ft(417)]||"",referrer:t[Ft(455)]?.[Ft(405)]||"",baseURI:t[Ft(455)]?.[Ft(374)]||"",sessionToken:jt()||"",uniqueToken:qt("_shopify_y","_y")||""}),oe=(t,e=Gt(),n=new It(Jt,Vt))=>{const r=new xt({exporter:n,attributes:ie(e,t?.[Ft(526)])}),i=jt(),o=i?function(t){let e=0;for(let n=0,r=t[Wt(186)];na[Ft(451)]()):a[Ft(451)](),a};class se{quietWindowStartCandidates=[];longAnimationFrameObserver=null;longAnimationFrames=[];constructor(){this.initializeLongAnimationFrameObserver()}getQuietWindowStartCandidates(){return[...this.quietWindowStartCandidates].sort((t,e)=>t.startTime-e.startTime)}getLongAnimationFrames(){if(!ue()){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(ue())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 ae=null;function ce(t){if(null===t||!ue()&&!Boolean(window.ShopifyAnalytics?.performance?.getLongAnimationFrames))return le(),null;const e=ae?ae.getLongAnimationFrames():[];let n=null;for(const r of e){if(r.startTime<=t&&r.endTime>t){n=r;break}if(r.startTime>=t){n=r;break}}if(!n||n.startTime-t>=250)return le(),t;const r=ae?ae.getQuietWindowStartCandidates():[];let i=t;if(r.length>0)for(const e of r)if(e.startTime>=t){i=e.startTime;break}return le(),i}function ue(){return PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")}function le(){ae&&(ae.destroy(),ae=null)}function de(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 he=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"}),fe=new RegExp(`^${window.location.origin}/((?:(?:[a-z]{2,3}|zh-hans|zh-hant)(?:-[a-zA-Z0-9]+)/)?cart/(add|change|update|clear))`),me=new RegExp("cart-performance:|add:|change:|clear:|note_update:");var pe;function ge({monorailRegion:t,schema:e,rawData:n}){const r=Date.now(),i={schema_id:e,payload:e===pe.OnUnload?ve(n):ye(n),metadata:{event_created_at_ms:r,event_sent_at_ms:r}},o=he[t||""],s=JSON.stringify(i);if(!o)return void console.debug("📡 Monorail: ",JSON.stringify(i,null,2));try{const t=new window.Blob([s],{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(o,t))return}catch(t){}const a=new XMLHttpRequest;a.open("POST",o),a.setRequestHeader("Content-type","text/plain"),a.send(s)}function ve(t){const e=we(t,["domInteractive","domContentLoadedEventStart","domContentLoadedEventEnd","domComplete","firstPaint","visuallyReady","initiatorType","redirectCount","cartAjaxResourceTimings","cartPerformanceMetrics","totalStylingDuration"]);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 ye(t){const e=we(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 we(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(t){t.OnInteraction="perf_kit_on_interaction/3.2",t.OnUnload="perf_kit_on_unload/3.5"}(pe||(pe={}));const be="xxxx-4xxx-xxxx-xxxxxxxxxxxx";function Ce(){let t="";try{const e=window.crypto,n=new Uint16Array(31);e.getRandomValues(n);let r=0;t=be.replace(/[x]/g,t=>{const e=n[r]%16;return r++,("x"===t?e:3&e|8).toString(16)}).toUpperCase()}catch(e){t=be.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 Se=!0,Te=!1,_e=null,Le=null,xe=!1;class Be{info;config;constructor(t){this.config=t,this.info={perfKitInit:Date.now(),perfKitVersion:"3.3.1",url:window.location.href,referrer:document.referrer||void 0,microSessionId:Ce(),microSessionCount:0,sessionToken:pt("_shopify_s","_s"),uniqueToken:pt("_shopify_y","_y")},performance.setResourceTimingBufferSize(1e3)}get performanceMetrics(){return function(t){const e=performance.getEntriesByType("navigation");if(0===e.length)return{};const n=e[0];let r=!1;return(n.requestStart&&n.startTime&&n.requestStartt+864e5)&&(r=!0),{encodedBodySize:n.encodedBodySize,decodedBodySize:n.decodedBodySize,navigationStart:Math.round(n.startTime),navigationType:n.type,navigationBad:r,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:Math.round(n.domInteractive),domComplete:Math.round(n.domComplete),domContentLoadedEventStart:Math.round(n.domContentLoadedEventStart),domContentLoadedEventEnd:Math.round(n.domContentLoadedEventEnd),redirectCount:n.redirectCount,initiatorType:n.initiatorType,transferSize:n.transferSize}}(this.info.perfKitInit)}}function De(t){_e=new Be(t),Le=null,ae||(ae=new se),t.spaMode&&(window.PerfKit={navigate:()=>{Se?Se=!1:Te||(ze(),_e=new Be(t),Te=!0)},setPageType:e=>{t.storefrontData.pageType=e},setConsent:t=>{Le=t}}),t.shs&&!t.spaMode&&oe({debug:!1,shopId:t.storefrontData.shopId,exportWithFetch:t.shsExportWithFetch||!0,logsSampleRate:t.shsLogsSampleRate,...t.shsBeaconEndpoint&&{beaconEndpoint:t.shsBeaconEndpoint}})}const Me=new Set;function ze(){if(null!==_e){if(!Ee()&&Ae()&&Me.size>0){let t={};for(const e of Me)t={...t,...e};const e=t.firstContentfulPaint??null,n=ce(e);null!==e&&null!==n&&(t.quietWindowStart=Math.round(n));const r=function(){if(!PerformanceObserver.supportedEntryTypes.includes("long-animation-frame"))return null;const t=performance.getEntriesByType("long-animation-frame");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)),Me.clear(),_e.info.microSessionCount+=1;const i=function(t){if(!(100*Math.random()>(t||10)))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))})}(_e.config.resourceTimingSamplingRate),o=performance.getEntriesByType("resource").filter(t=>fe.test(t.name)),s=performance.getEntriesByType("measure").filter(t=>me.test(t.name)).map(t=>{const e=t.toJSON();return e.name.startsWith("cart-performance:")||(e.name=`cart-performance:${e.name}`),e});ge({monorailRegion:_e.config.monorailRegion,schema:pe.OnUnload,rawData:{..._e.info,..._e.config.storefrontData,..._e.performanceMetrics,...t,resourceTiming:i,cartAjaxResourceTimings:o,cartPerformanceMetrics:s,paintTimingHidden:xe}})}}else console.debug("⛔️ Shopify/perf-kit is not initialized")}function Ae(){return null!==Le?Le:ht()}((e,r={})=>{const o=s(r=Object.assign({},r),t),a=new WeakMap;o.t=t=>{if(t?.sources?.length){const e=L(t.sources),n=e?.node;if(n){const t=r.generateTarget?.(n)??i(n);a.set(e,t)}}},((e,n={})=>{const r=b();T(p(()=>{let i,o=f("CLS",0);const a=s(n,t),c=t=>{for(const e of t)a.u(e);a.o>o.value&&(o.value=a.o,o.entries=a.i,i())},h=m("layout-shift",c);h&&(i=l(e,o,_,n.reportAllChanges),r.onHidden(()=>{c(h.takeRecords()),i(!0)}),u(()=>{a.o=0,o=f("CLS",0),i=l(e,o,_,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=L(r.sources);t&&(e={largestShiftTarget:a.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;Me.add({cumulativeLayoutShift:n,cumulativeLayoutShiftTarget:e.largestShiftTarget})}),((t,n={})=>{const r=s(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={})=>{C(()=>{const n=b();let r,i=f("LCP");const o=s(e,q),a=t=>{e.reportAllChanges||(t=t.slice(-1));for(const e of t)o.u(e),e.startTime{a(c.takeRecords()),c.disconnect(),r(!0)}),o=t=>{t.isTrusted&&(P(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,j,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),s=i.url&&performance.getEntriesByType("resource").filter(t=>t.name===i.url)[0],a=Math.max(0,r.responseStart-e),c=Math.max(a,s?(s.requestStart||s.startTime)-e:0),u=Math.min(t.value,Math.max(c,s?s.responseEnd-e:0));n={target:o.get(i),timeToFirstByte:a,resourceLoadDelay:c-a,resourceLoadDuration:u-c,elementRenderDelay:t.value-u,navigationEntry:r,lcpEntry:i},i.url&&(n.url=i.url),s&&(n.lcpResourceEntry=s)}}return Object.assign(t,{attribution:n})})(n);t(r)},n)})(function(t){const{attribution:e,value:n}=t;Me.add({largestContentfulPaint:Math.round(n),largestContentfulPaintTarget:e.target})}),((t,r={})=>{T(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,s=Math.max(0,i.responseStart-e);r={timeToFirstByte:s,firstByteToFCP:t.value-s,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;Me.add({firstContentfulPaint:Math.round(e)})}),((t,e={})=>{const r=s(e=Object.assign({},e),E);let o=[],a=[],c=0;const d=new WeakMap,h=new WeakMap;let p=!1;const g=()=>{p||(P(v),p=!0)},v=()=>{const t=r.l.map(t=>d.get(t.entries[0])),e=a.length-50;a=a.filter((n,r)=>r>=e||t.includes(n));const n=new Set;for(const t of a){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=a.length-1;r>=0;r--){const i=a[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]},a.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,s=Math.max(e.startTime+e.duration,o),a=Math.min(i.processingEnd,s),c=i.entries.sort((t,e)=>t.processingStart-e.processingStart),u=y(e.startTime,a),l=r.h.get(e.interactionId),f={interactionTarget:h.get(l),interactionType:e.name.startsWith("key")?"keyboard":"pointer",interactionTime:e.startTime,nextPaintTime:s,processedEventEntries:c,longAnimationFrameEntries:u,inputDelay:o-e.startTime,processingDuration:a-o,presentationDelay:s-a,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,s=0,a=0,c=0,u=0;for(const c of t.longAnimationFrameEntries){a=a+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=s,t.totalStyleAndLayoutDuration=a,t.totalPaintDuration=c,t.totalUnattributedDuration=t.nextPaintTime-e-s-a-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=b();C(()=>{"interactionCount"in performance||z||(z=m("event",M,{type:"event",buffered:!0,durationThreshold:0}));let r,i=f("INP");const o=s(e,E),a=t=>{P(()=>{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",a,{durationThreshold:e.durationThreshold??40});r=l(t,i,N,e.reportAllChanges),c&&(c.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{a(c.takeRecords()),r(!0)}),u(()=>{o.v(),i=f("INP"),r=l(t,i,N,e.reportAllChanges)}))})})(e=>{const n=w(e);t(n)},e)})(function(t){const{attribution:e,value:n}=t;if(null===_e)return void console.debug("⛔️ Shopify/perf-kit is not initialized");if(navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome"))return;if(Ee())return;if(!Ae())return;_e.info.microSessionCount+=1;const{inputDelay:r,processingDuration:i,presentationDelay:o,longestScript:s,interactionTarget:a}=e,c=s?.entry?{slowest_script:s.entry.sourceURL,slowest_script_duration:Math.round(s.entry.duration)}:{};ge({monorailRegion:_e.config.monorailRegion,schema:pe.OnInteraction,rawData:{..._e.info,..._e.config.storefrontData,..._e.performanceMetrics,interactionToNextPaint:Math.round(n),interactionToNextPaintTarget:a,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,k,n.reportAllChanges);H(()=>{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,k,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),s=Math.max(n.connectStart-r,0),a=Math.max(n.connectEnd-r,0);e={waitingDuration:i,cacheDuration:o-i,dnsDuration:s-o,connectionDuration:a-s,requestDuration:t.value-a,navigationEntry:n}}return Object.assign(t,{attribution:e})})(e);t(n)},n)})(function(t){const{value:e}=t;Me.add({timeToFirstByte:Math.round(e)})}),addEventListener("DOMContentLoaded",()=>{xe="hidden"===document.visibilityState}),addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&ze()});const Ie=/bot|crawl|headless|curl|wget|python|spider|libwww-pearl|newrelic|datadog|sitebulb|site24x7/i;function Ee(){return!!Ie.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{De(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:de(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}}(t))}catch(t){console.error("🚫 Error initializing PerfKit:",t.message)}}()}();