!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)},h=(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)))}},l=t=>{requestAnimationFrame(()=>requestAnimationFrame(()=>t()))},d=()=>{const t=e();return t?.activationStart??0},m=(t,n=-1)=>{const r=e();let i="navigate";return c()>=0?i="back-forward-cache":r&&(document.prerendering||d()>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}},f=(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=d(),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=m("FCP");const o=f("paint",t=>{for(const e of t)"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime{i=m("FCP"),r=h(t,i,S,e.reportAllChanges),l(()=>{i.value=performance.now()-n.timeStamp,r(!0)})}))})},L=[.1,.25],x=t=>t.find(t=>1===t.node?.nodeType)||t[0];let M=0,D=1/0,_=0;const B=t=>{for(const e of t)e.interactionId&&(D=Math.min(D,e.interactionId),_=Math.max(_,e.interactionId),M=_?(_-D)/7+1:0)};let z;const A=()=>z?M: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 I=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 k{m;u(t){this.m?.(t)}}const j=[2500,4e3],q=[800,1800],U=t=>{document.prerendering?C(()=>U(t)):"complete"!==document.readyState?addEventListener("load",()=>U(t),!0):setTimeout(t)},H="",O="1",F="0",W="p",R="a",Z="m",V="t",J="m",X="a",K="p",Y="s";function G(t){try{return decodeURIComponent(t)}catch(t){return""}}function $(t,e=!1){const n=function(){try{return document.cookie}catch{return!1}}()?document.cookie.split("; "):[];for(let e=0;e"_cmp"===t.name);let r=null==n?void 0:n.description;if(!r)return;try{r=decodeURIComponent(r)}catch{}return r}catch{return}}();if(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=Array.from(atob(t)).map(t=>t.charCodeAt(0).toString(16).padStart(2,"0")).join("");c=[8,13,18,23].reduce((t,e)=>t.slice(0,e)+"-"+t.slice(e),e)}function u(t){const e=n.split(".")[0];return e.includes(t.toLowerCase())?F:e.includes(t.toUpperCase())?O:H}function h(t){return n.includes(t.replace("t","s").toUpperCase())}return{v:"3",con:{CMP:{[X]:u(X),[K]:u(K),[J]:u(J),[Y]:u(Y)}},region:r||"",cus:a,purposes:{[R]:h(R),[W]:h(W),[Z]:h(Z),[V]:h(V)},sale_of_data_region:"t"==o,display_banner:"t"==i,consent_id:c}}(t);return}(t)}function tt(){return function(t){const e=Q();if(!e||!e.purposes)return!0;const n=e.purposes[t];return"boolean"!=typeof n||n}(R)}function et(){return tt()}function nt(t,e){if(!{}.hasOwnProperty.call(t,e))throw new TypeError("attempted to use private field on non-instance");return t}var rt=0;function it(t){return"__private_"+rt+++"_"+t}function ot(t){return Object.entries(t).map(([t,e])=>({key:t,value:{stringValue:String(e)}}))}function st(t){if(Array.isArray(t))return{arrayValue:{values:t.map(t=>st(t))}};switch(typeof t){case"boolean":return{boolValue:Boolean(t)};case"number":return{doubleValue:Number(t)};default:return{stringValue:String(t)}}}const at=function(t,e,n){const r=[0];for(let i=0;i{switch(e.attributes={...nt(this,ut)[ut],...e.attributes},e.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:at,u=new Array(c.length+1).fill(0);t[r]||={name:r,unit:o||"1",histogram:{aggregationTemporality:1,dataPoints:[]}};for(let t=0;t0?l:0,bucketCounts:r>0?[1]:[]};t[n].exponentialHistogram.dataPoints.push({attributes:ot(null!=s?s:{}),startTimeUnixNano:o,timeUnixNano:o,count:1,sum:c,scale:u,zeroCount:d,positive:f,negative:m,min:c,max:c,zeroThreshold:0})}(t,e);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:ot(null!=s?s:{})})}(t,e);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:ot(null!=s?s:{})})}(t,e)}});const e=Object.values(t);0!==e.length&&(nt(this,ht)[ht]=[],await nt(this,ct)[ct].exportMetrics(e))}async exportLogs(){const t=nt(this,lt)[lt].map(t=>{const e={timeUnixNano:t.timeUnixNano,observedTimeUnixNano:t.timeUnixNano,attributes:(n={...nt(this,ut)[ut],...t.attributes},Object.entries(n).map(([t,e])=>({key:t,value:st(e)})))};var n;return t.body&&(e.body={stringValue:t.body}),e});0!==t.length&&(nt(this,lt)[lt]=[],await nt(this,ct)[ct].exportLogs(t))}}var mt=it("url"),ft=it("serviceName"),pt=it("logger"),gt=it("fetchFn");class vt{constructor(t,e,n){Object.defineProperty(this,mt,{writable:!0,value:void 0}),Object.defineProperty(this,ft,{writable:!0,value:void 0}),Object.defineProperty(this,pt,{writable:!0,value:void 0}),Object.defineProperty(this,gt,{writable:!0,value:void 0}),nt(this,mt)[mt]=t.replace(/\/v1\/(logs|metrics|traces)\/?$/,""),nt(this,ft)[ft]=e,nt(this,pt)[pt]=null==n?void 0:n.logger,nt(this,gt)[gt]=null==n?void 0:n.fetchFn}async exportMetrics(t){await this.exportBatches("/v1/metrics",[...t],t=>({resourceMetrics:[{resource:{attributes:[{key:"service.name",value:{stringValue:nt(this,ft)[ft]}}]},scopeMetrics:[{scope:{name:"open-telemetry-mini-client",version:"1.1.0",attributes:[]},metrics:t}]}]}))}async exportLogs(t){await this.exportBatches("/v1/logs",[...t],t=>({resourceLogs:[{resource:{attributes:[{key:"service.name",value:{stringValue:nt(this,ft)[ft]}}]},scopeLogs:[{scope:{name:"open-telemetry-mini-client",version:"1.1.0",attributes:[]},logRecords:t}]}]}))}async exportTo(t,e){var n;const r=JSON.stringify(t),i=(new TextEncoder).encode(r).length;if(i>65536)throw new wt(`Payload size ${i} exceeds 65536 bytes`);const o=await this.exporterFetch()(`${nt(this,mt)[mt]}${e}`,{method:"POST",keepalive:!0,headers:{"Content-Type":"application/json"},body:r});if(null===(n=nt(this,pt)[pt])||void 0===n||n.log({status:o.status}),!o.ok){if(400===o.status){const t=await o.text();throw new yt(`Invalid OpenTelemetry Data: ${t}`)}if(429===o.status||503===o.status){const e=await o.text(),n=o.headers.get("Retry-After"),r=n?{seconds:Number(n)}:void 0;throw new yt("Server did not accept data",{errorData:e,retryAfter:r,body:t})}throw new yt(`Server responded with ${o.status}`)}}exporterFetch(){return nt(this,gt)[gt]||fetch}async exportBatches(t,e,n){let r=e.length;for(;e.length>0;)try{const i=e.slice(0,r);await this.exportTo(n(i),t),e.splice(0,r)}catch(t){if(!(t instanceof wt&&r>1))throw t;r=Math.ceil(r/2)}}}class yt extends Error{constructor(t,e){super(t),this.metadata=void 0,this.name="OpenTelemetryClientError",this.metadata=e}}class wt extends Error{constructor(...t){super(...t),this.name="PayloadTooLargeError"}}function bt(t,e){var n=Ct();return bt=function(e,r){var i=n[e-=386];if(void 0===bt.PoahvG){bt.PZinPx=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.sampleRate))try{await this.otelClient.exportLogs()}catch(t){this.stdout&&console.log(`[SHS] Otel export logs failure: ${t}`)}}scheduleErrorFlush(){this.errorFlushTimeoutId&&clearTimeout(this.errorFlushTimeoutId),this.errorFlushTimeoutId=window.setTimeout(()=>{this.flushOtelLogs().catch(()=>{})},this.errorFlushDelay)}}function Tt(){const t=["C2nYB2XSx2fJDgL2Axr5","yNjVD3nLCKfqsq","y2XPy2TqB3nPDgLVBNm","BMf0DxjHBf9JBgLJA19Wyxr0zxjUCW","BwLU","y29VA2LL","mtG3oduXmMnzCenhsq","Bg9NtwvZC2fNzq","CgfYC2u","y3jLyxrLtgLUzwfYr3jHzgLLBNq","C3fYDa","ntvzuurjz3i","CNvUq2fUDMfZvgvZDa","yMX1zq","A2v5rxzLBNrZ","Ag9ZDa","qMvHy29UigzHAwXLzdOG","zMLSBfjLy3q","ChjVDg9JB2W","A2v5zg93BG","u2HPzNq","A2v5CW","D2vIzhjPDMvYx2rLDgvJDgvK","qwX0","ChvZAa","C2v0sxrLBq","Dg91y2HLCW","C2f2zvnLC3nPB25tAwDUywXZ","y2HHBMDL","yMvHy29Urw5KCg9PBNq","zMX1C2HpDgvStg9NCW","zhvYyxrPB24","BMf2AwDHDg9Y","y2XPzw50sgvPz2H0","yMvHy29UuMv0CNLmAw1PDa","BgfZDfbYB2nLC3nuAw1L","C2LNBMLMAwnHBNrFCgfNzv90Aw1L","mtiZmJCWmNbdt3bjBa","Dg91y2Hby3rPDML0Eq","CMv0CNLuAw1LB3v0swq","mJuWmJqXmgjLzuD2va","y2HLy2TwAwv3Cg9YDfjHDgLV","ywrKrxzLBNrmAxn0zw5LCG","C2vZC2LVBLn0B3jHz2u","Bw91C2vby3rPDML0Eq","yMvHy29Uu3rHDgu","CMv0CNLdB3vUDa","B250B3vJAhn0yxj0","z2v0rgLZDgfUy2u","C2nOzwr1BgvczwfJB25szxrYEq","yM90x3vZzxjFywDLBNq","Aw5UzxjizwLNAhq","CgX1z2LUCW","y2XLyxjuAw1LB3v0","AgvPz2H0","C2vUzejLywnVBG","zg9JDw1LBNrfBgvTzw50","y2XPy2S","mw5oBwX0wG","y2XPzw50wq","ntyWotu0ofj6vhjJCW","BgfZDfrVDwnOrxzLBNq","Ag9ZDg5HBwu","twv0yq","CMvK","w1niu10G","DxbKyxrLsw50zxj2ywW","Dg9W","zgvIDwC","nLn0D2DMsG","D2vIzhjPDMvY","C2vZC2LVBL9KDxjHDgLVBL9YzwfZB25HyMXL","Bg9NC1nHBxbSzvjHDgu","C2nYB2XSwq","zxHWB3j0v2L0AezLDgnO","C2fMzuv2zw50sgfUzgXLCG","A2v5qwn0AxzPDhK","ue9tva","CMvXDwvZDeLKBgvdywXSyMfJAW","Dg91y2HfDMvUDhm","x3nOC19ZDgf0zq","BgfUz3vHz2vZ","A2v5","u2HVCgLMEsbtDg9YzwzYB250","CMvHzhLtDgf0zq","D2LUzg93","CgvYzI1RAxqTAhvTyw4TC2LNBMfSCW","C2nYB2XS","CgfNzunVDw50","Bw9UAxrVCKjLAgf2Aw9Y","ChjVy2vZC0fUzfnLBMrtAwDUywXZ","y2fSy3vSyxrLq2XPy2TqCMvJAxnPB24","yxbWBgLJyxrPB24VANnVBG","Ahr0Chm6lY9VDgXWlwH0DhaTChjVzhvJDgLVBI5ZAg9WAwz5C3zJlMnVBq","tw9IAwXL","y2HLy2TbBMrtzw5Ku2LNBMfSCW","C3rYAw5NAwz5","C2nYB2XSqwn0AxzPDhK","z2v0q29UDgv4Da","BMf0DxjHBf9TB3vZzv9Hy3rPDML0Eq","Bg9JyxrPB24","CMvKDwnL","Aw5JBhvKzxm","z2v0vgLTzxPVBMvpzMzZzxq","y2fUy2vSswrSzunHBgXIywnR","zxHLyW","D2LKDgG","otu4nta5Ee9Jt1DQ","CMvTB3zLrxzLBNrmAxn0zw5LCG","q29UDhjVBa","zgv2AwnLugL4zwXsyxrPBW","l2fWAs9JB2XSzwn0","yNjVD3nLCL9LBNzPCM9UBwvUDf9UB3jTywW","C3rHDgu","zgvZDhjVEq","Dg9eyxrHvvjm","Aw5PDa","Dg91y2HFywn0AxzPDhK","otmXnJq3rMXtt1bw","zw52AxjVBM1LBNrdAgvJA2vK","CYbZAw5JzsbSyxn0ihn1y2nLC3nMDwWGC2vUza","zg93BG","zMLSBfrLEhq","icaOsw5PDgLHBcbZAwDUywWGC2v0kq","zM9UDa","B3jPz2LU","Dg91y2HTB3zL","z2v0qwjZB2X1DgvvCMW","BgfZDfn1y2nLC3nMDwXtzw5KvgLTzq","Bw92zq","y2fUDMfZx2zPBMDLCNbYAw50x25VCM1HBa","C3rHCNrZv2L0Aa","A2v5yM9HCMrFywn0AxzPDhK","y2XPzw50v2LKDgG","zxzLBNriyw5KBgvYCW","BgfZDfvWzgf0zvrPBwu","BgvMDa","y2XPy2Tby3rPDML0Eq","Bwf4u2LSzw5Jzu1Z","y2fUDMfZ","zMXVB3i","Aw50","DxnLCKfNzw50","BgfZDfnPz25HBhm","zg9JDw1LBNq","C3rHCNruAw1L","yxrHBJi","Ahr0Chm6lY8","CMvMzxjYzxi","Aw5JBhvKzq","CMvXDwvZDeLKBgvdywXSyMfJA0LK","y2HLy2TfBNzPCM9UBwvUDa","BgvUz3rO","A2v5yM9HCMrcDxjZDefJDgL2Axr5","DgvZDa","C2HVCeLK","mJeZntm4nwj1BKfUvq","xZb4ndaXndrJ","C2HPzNq","C2vZC2LVBKrHDge","BxvSDgLWBgvFCgfNzxnFDMLZAxrLza","Bw91C2vqB3nPDgLVBNm","zw52AxjVBM1LBNq","z2v0qM91BMrPBMDdBgLLBNrszwn0","re9nq29UDgvUDeXVywrLza","xZb4mMy2yZmX","AhjLzG","u2vUzgLUzYbWzxjPB2rPyYbIzwfJB24Glsa","Bg9N","rxzLBNqGAgfUzgXLCIbLCNjVCIbPBIa","C3rHCNq","C2nYB2XSrxzLBNrZ","A2v5yM9HCMrcDxjZDhm","Dw5KzwzPBMvK","C2L6zq","zMLSBfn0EwXL","DxbKyxrLu2vZC2LVBKrHDge","i2zMzG","ChjL","DgLTzvn0yw1W","DxbKyxrLsw50zxj2ywXjza","DgfYz2v0","ywjZ","yMfZzvvssq","zgLY","CM91BMq","Ahr0CdOVlW","yMLUza","BM93","Bg9HzgLUzW","y2XPzw50wa","y2f0y2G","Dg91y2HZDgfYDa","odbjDgTAsgu","Bg9HzfnLC3nPB25tAwDUywXZ","y3jLyxrLrwXLBwvUDa","C3rHDhvZ","CgvYAw9KAwm","qMvHy29UihnLBMqGzgvIB3vUy2vKicH0B28GC29VBIbZAw5JzsbSyxn0ihnLBMqP","zM9YrwfJAa","Bw91C2vTB3zL","z2v0sxrLBq","BwfW","Aw5UzxjxAwr0Aa","Dg91y2HLBMq","mtzWEcbbCMLHBa","y2HLy2TcCM93C2vYq29UC2LZDgvUy3K","C2v0vgLTzw91Da","ywrKq29SB3jtDg9W","DgHLBG","Bwf4","xZb4nJu4mtq0"];return(Tt=function(){return t})()}!function(t){const e=t();for(;;)try{if(724308===parseInt(Bt(260))/1*(-parseInt(Bt(239))/2)+parseInt(Bt(108))/3+parseInt(Bt(208))/4+-parseInt(Bt(146))/5+parseInt(Bt(271))/6*(parseInt(Bt(262))/7)+parseInt(Bt(183))/8*(-parseInt(Bt(309))/9)+-parseInt(Bt(242))/10*(-parseInt(Bt(213))/11))break;e.push(e.shift())}catch(t){e.push(e.shift())}}(Tt);const Lt=Bt(295),xt=Bt(288),Mt=Bt(313),Dt=Bt(282);function _t(){return{document:document,navigator:typeof navigator!==Bt(163)?{get webdriver(){return navigator[Bt(272)]},get userAgent(){return navigator[Bt(132)]},get languages(){return navigator[Bt(283)]},get plugins(){return navigator[Bt(254)]},sendBeacon:navigator[Bt(257)]?.[Bt(177)](navigator)}:{webdriver:void 0,userAgent:"",languages:[],plugins:[],sendBeacon:void 0},window:window,screen:screen,performance:typeof performance!==Bt(163)?performance:void 0}}function Bt(t,e){const n=Tt();return Bt=function(e,r){let i=n[e-=106];if(void 0===Bt.EqDwVV){Bt.yUCuoU=function(t){let e="",n="";for(let n,r,i=0,o=0;r=t.charAt(o++);~r&&(n=i%4?64*n+r:r,i++%4)?e+=String.fromCharCode(255&n>>(-2*i&6)):0)r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(r);for(let t=0,r=e.length;tt+e.s,0)/t[Bt(142)],n=t[Bt(303)]((t,n)=>t+(n.s-e)**2,0)/(t[Bt(142)]-1),r=Math[Bt(212)](n);return{speed:e,jitter:r}}function At(t,e,n,r,i,o,s,a,c,u,h,l,d){const m=Math[Bt(206)](1e3,t),f=Math[Bt(206)](1e3,n),p=Math[Bt(206)](1e3,o),g=Math[Bt(206)](1e3,a),v=Math[Bt(206)](1e3,s),y=Math[Bt(206)](1e3,c),w=[];if(e[Bt(142)]>=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[Bt(142)]<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}=zt(w);let L=0,x=0;if(r[Bt(142)]>1){const t=new Set(r[Bt(192)](t=>Math[Bt(130)](t.x/20)+","+Math[Bt(130)](t.y/20)))[Bt(164)];L=t>1?1:0,x=r[Bt(303)]((t,e)=>t+e[Bt(168)],0)/r[Bt(142)]}const M=i[Bt(303)]((t,e)=>(null===e[Bt(131)]||t[Bt(226)](e[Bt(131)]),t),[]),{rhythmConsistency:D,jitter:_}=function(t){if(t[Bt(142)]<2)return{rhythmConsistency:0,jitter:0};const e=t[Bt(303)]((t,e)=>t+e,0)/t[Bt(142)],n=t[Bt(303)]((t,n)=>(t??0)+((n??0)-e)**2,0)/t[Bt(142)],r=Math[Bt(212)](n);return{rhythmConsistency:0===r?1:Math[Bt(200)](0,1-r/e),jitter:r/e}}(M),B=M[Bt(142)]>0?M[Bt(303)]((t,e)=>t+e,0)/M[Bt(142)]:0,z=[];if(u[Bt(142)]>=3)for(let t=1;tu[t-1].p?Bt(111):"up";z[Bt(226)]({s:r,dir:i,t:u[t].t})}const{speed:A,jitter:E}=zt(z),P=function(t){if(t[Bt(142)]<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:k}=zt(h),j=function(t){if(t[Bt(142)]<2)return 0;let e=0;for(let n=1;n=500&&e++;return e}(h)),U=Math[Bt(130)]((d-l)/1e3);return{ma:m,ca:f,ka:p,sa:g,ta:y,kba:v,t:Math[Bt(206)](3600,U),nm:b?1:0,ms:Pt(C),mj:Pt(T),msp:Pt(S),vc:L,cp:Pt(x),rc:Pt(D),kj:Pt(_),ki:Pt(B),ss:Pt(A),sj:Pt(E),ssm:Pt(P),sp:I,ts:Pt(N),tj:Pt(k),tp:q,tsm:Pt(j)}}function Et(t,e){let n=0;return(...r)=>{const i=typeof performance!==Bt(163)?performance[Bt(178)]():Date[Bt(178)]();i-n>=e&&(n=i,t(...r))}}function Pt(t){return Math[Bt(175)](100*t)/100}function It(t){return{wd:t[Bt(224)],ua:t[Bt(252)],cf:t[Bt(120)],be:t[Bt(314)],nm:t[Bt(301)],nc:t[Bt(205)],ka:t[Bt(122)],sa:t[Bt(202)],ta:t[Bt(107)],pt:t[Bt(238)],mp:t[Bt(150)],sd:t[Bt(273)]}}class Nt{[Bt(155)];[Bt(315)];[Bt(203)];[Bt(147)];constructor(t,e,n=_t()){const r={shopId:0,updateInterval:5e3,debug:!1,beaconEndpoint:Mt,beaconRetryLimit:3,maxSilenceMs:18e5,exportWithFetch:!1,logsSampleRate:1};this[Bt(155)]={...r,...e},this[Bt(203)]=n,this[Bt(147)]=t,this[Bt(315)]={startTime:Date[Bt(178)](),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[Bt(184)]();this[Bt(315)][Bt(247)]={lastSignals:i,lastProcessTime:0,lastSuccessfulSendTime:0,retryCount:0}}[Bt(106)](){(async()=>{await this[Bt(141)](),await this[Bt(292)](!0),this[Bt(203)][Bt(287)][Bt(197)](()=>{this[Bt(291)]()},100);const t=()=>{const e=Date[Bt(178)](),n=e-(this[Bt(315)][Bt(125)]||e),r=Math[Bt(200)](0,this[Bt(155)][Bt(268)]-n),i=()=>{this[Bt(203)][Bt(287)][Bt(280)]?this[Bt(315)][Bt(140)]=this[Bt(203)][Bt(287)][Bt(280)](()=>{this[Bt(292)]()[Bt(199)](()=>this[Bt(147)][Bt(232)]())[Bt(199)](()=>{t()})},{timeout:2e3}):this[Bt(292)]()[Bt(199)](()=>this[Bt(147)][Bt(232)]())[Bt(199)](()=>{t()})};r>0?this[Bt(203)][Bt(287)][Bt(197)](i,r):i()};t()})()[Bt(181)](t=>{this[Bt(147)][Bt(201)](t,Bt(106))})}[Bt(316)](){this[Bt(315)][Bt(170)]&&this[Bt(203)][Bt(287)][Bt(255)](this[Bt(315)][Bt(170)]),this[Bt(315)][Bt(140)]&&this[Bt(203)][Bt(287)][Bt(306)]&&this[Bt(203)][Bt(287)][Bt(306)](this[Bt(315)][Bt(140)]),this[Bt(315)][Bt(124)]&&(this[Bt(203)][Bt(134)][Bt(310)](Bt(190),this[Bt(315)][Bt(124)][Bt(190)]),this[Bt(203)][Bt(134)][Bt(310)](Bt(259),this[Bt(315)][Bt(124)][Bt(259)]),this[Bt(203)][Bt(134)][Bt(310)](Bt(221),this[Bt(315)][Bt(124)][Bt(221)]),this[Bt(203)][Bt(134)][Bt(310)](Bt(289),this[Bt(315)][Bt(124)][Bt(289)]),Bt(249)in window&&this[Bt(315)][Bt(124)][Bt(182)]&&this[Bt(315)][Bt(124)][Bt(116)]&&this[Bt(315)][Bt(124)][Bt(194)]&&(this[Bt(203)][Bt(134)][Bt(310)](Bt(182),this[Bt(315)][Bt(124)][Bt(182)]),this[Bt(203)][Bt(134)][Bt(310)](Bt(116),this[Bt(315)][Bt(124)][Bt(116)]),this[Bt(203)][Bt(134)][Bt(310)](Bt(194),this[Bt(315)][Bt(124)][Bt(194)]))),this[Bt(315)][Bt(247)]?.[Bt(241)]&&this[Bt(203)][Bt(287)][Bt(255)](this[Bt(315)][Bt(247)][Bt(241)]),this[Bt(315)][Bt(247)]=void 0}[Bt(141)](){const t={wd:this[Bt(203)][Bt(234)][Bt(272)]?1:0,ua:/bot|crawler|spider|scraper/i[Bt(144)](this[Bt(203)][Bt(234)][Bt(132)])?0:1,cv:this[Bt(214)]()?1:0,br:this[Bt(196)]()?1:0};return this[Bt(315)][Bt(152)]=t,this[Bt(315)][Bt(109)]=!0,t}[Bt(214)](){try{const t=this[Bt(203)][Bt(134)][Bt(185)](Bt(129));t[Bt(308)]=200,t[Bt(256)]=50;const e=t[Bt(300)]("2d");if(null===e)return!1;const n=e[Bt(211)](0,0,200,0);n[Bt(198)](0,Bt(266)),n[Bt(198)](1,Bt(215)),e[Bt(165)]=n,e[Bt(219)](0,0,200,50),e[Bt(165)]=Bt(167),e[Bt(114)]=Bt(195),e[Bt(112)](Bt(285),33,30);const r=t[Bt(317)]();return Boolean(r&&r[Bt(142)]>50)}catch(t){return!1}}[Bt(196)](){let t=0;this[Bt(203)][Bt(234)][Bt(283)]&&this[Bt(203)][Bt(234)][Bt(283)][Bt(142)]>0&&t++,(this[Bt(203)][Bt(234)][Bt(254)]&&this[Bt(203)][Bt(234)][Bt(254)][Bt(142)]>0||this[Bt(203)][Bt(234)][Bt(132)][Bt(304)](Bt(296)))&&t++,this[Bt(243)]()&&t++,typeof this[Bt(203)][Bt(287)][Bt(312)]!==Bt(163)&&t++;try{const e=(new Date)[Bt(305)]();e>-840&&e<840&&t++}catch(t){}return t>=3}[Bt(243)](){const t=this[Bt(203)][Bt(287)][Bt(193)]||this[Bt(203)][Bt(134)][Bt(258)][Bt(123)],e=this[Bt(203)][Bt(287)][Bt(253)]||this[Bt(203)][Bt(134)][Bt(258)][Bt(235)];if(!t||!e)return!1;if(t<=2||e<=2)return!1;const n=t/e;return n>=.2&&n<=5}[Bt(277)](t,e){return n=>{try{t(n)}catch(t){this[Bt(147)][Bt(201)](t,Bt(159)+e)}}}[Bt(291)](){const t=Et(this[Bt(277)](t=>{this[Bt(315)][Bt(246)]++,this[Bt(315)][Bt(151)][Bt(142)]>=10&&this[Bt(315)][Bt(151)][Bt(148)](),this[Bt(315)][Bt(151)][Bt(226)]({x:t[Bt(180)],y:t[Bt(261)],t:t[Bt(169)]})},Bt(190)),100),e=this[Bt(277)](t=>{this[Bt(315)][Bt(127)]++,requestAnimationFrame(()=>setTimeout(()=>{this[Bt(315)][Bt(204)][Bt(142)]>=5&&this[Bt(315)][Bt(204)][Bt(148)](),this[Bt(315)][Bt(204)][Bt(226)]({x:t[Bt(180)],y:t[Bt(261)],t:t[Bt(169)],pre:this[Bt(293)](t)})},0))},Bt(259)),n=this[Bt(277)](t=>{this[Bt(315)][Bt(278)]++;const e=t[Bt(284)];if([Bt(222),Bt(311),Bt(225),Bt(265)][Bt(304)](e))return;const n=this[Bt(315)][Bt(216)][this[Bt(315)][Bt(216)][Bt(142)]-1],r=t[Bt(169)],i=n?r-n.t:null;this[Bt(315)][Bt(216)][Bt(142)]>=10&&this[Bt(315)][Bt(216)][Bt(148)](),this[Bt(315)][Bt(216)][Bt(226)]({_0x459aef:e,t:r,int:i}),null!==i&&i<100?(this[Bt(315)][Bt(162)][Bt(226)](i),this[Bt(315)][Bt(162)][Bt(142)]>=5&&(this[Bt(315)][Bt(143)]++,this[Bt(315)][Bt(162)]=[])):this[Bt(315)][Bt(162)]=[]},Bt(221)),r=Et(this[Bt(277)](t=>{this[Bt(315)][Bt(299)]++;const e=t[Bt(169)],n=window[Bt(275)];this[Bt(315)][Bt(161)][Bt(142)]>=10&&this[Bt(315)][Bt(161)][Bt(148)](),this[Bt(315)][Bt(161)][Bt(226)]({p:n,t:e})},Bt(289)),200),i=this[Bt(277)](t=>{t[Bt(228)]&&0!==t[Bt(228)][Bt(142)]&&(this[Bt(315)][Bt(240)]++,this[Bt(315)][Bt(281)][Bt(142)]>=10&&this[Bt(315)][Bt(281)][Bt(148)](),this[Bt(315)][Bt(263)]={x:t[Bt(228)][0][Bt(180)],y:t[Bt(228)][0][Bt(261)],t:t[Bt(169)],typ:Bt(160),s:0,d:0})},Bt(182)),o=Et(this[Bt(277)](t=>{if(!t[Bt(228)]||0===t[Bt(228)][Bt(142)])return;const e={x:t[Bt(228)][0][Bt(180)],y:t[Bt(228)][0][Bt(261)]};if(this[Bt(315)][Bt(263)]){const n=this[Bt(250)](this[Bt(315)][Bt(263)],e);this[Bt(315)][Bt(281)][Bt(142)]>=10&&this[Bt(315)][Bt(281)][Bt(148)]();const r={x:t[Bt(228)][0][Bt(180)],y:t[Bt(228)][0][Bt(261)],t:t[Bt(169)],typ:Bt(119),d:n,s:n/(t[Bt(169)]-this[Bt(315)][Bt(263)].t)};this[Bt(315)][Bt(281)][Bt(226)](r),this[Bt(315)][Bt(263)]=r}else{const e={x:t[Bt(228)][0][Bt(180)],y:t[Bt(228)][0][Bt(261)],t:t[Bt(169)],typ:Bt(119),s:0,d:0};this[Bt(315)][Bt(263)]=e}},Bt(116)),200),s=this[Bt(277)](t=>{this[Bt(315)][Bt(263)]=null},Bt(194));this[Bt(203)][Bt(134)][Bt(244)](Bt(190),t,{passive:!0}),this[Bt(203)][Bt(134)][Bt(244)](Bt(259),e,{passive:!0}),this[Bt(203)][Bt(134)][Bt(244)](Bt(221),n,{passive:!0}),this[Bt(203)][Bt(134)][Bt(244)](Bt(289),r,{passive:!0}),Bt(249)in window&&(this[Bt(203)][Bt(134)][Bt(244)](Bt(182),i,{passive:!0}),this[Bt(203)][Bt(134)][Bt(244)](Bt(116),o,{passive:!0}),this[Bt(203)][Bt(134)][Bt(244)](Bt(194),s,{passive:!0})),this[Bt(315)][Bt(124)]={mousemove:t,click:e,keydown:n,scroll:r,touchstart:i,touchmove:o,touchend:s}}async[Bt(292)](t=!1){this[Bt(166)](t),await this[Bt(297)](),this[Bt(315)][Bt(125)]=Date[Bt(178)]()}[Bt(166)](t=!1){const e=Date[Bt(178)]();let n=Math[Bt(130)]((e-this[Bt(315)][Bt(135)])/1e3);null!==this[Bt(315)][Bt(125)]&&(n=Math[Bt(130)]((e-this[Bt(315)][Bt(125)])/1e3)),this[Bt(315)][Bt(149)]?(this[Bt(315)][Bt(149)][Bt(290)]+=t?1:0,this[Bt(315)][Bt(149)][Bt(233)]+=n):this[Bt(315)][Bt(149)]={pageCount:1,sessionStart:this[Bt(315)][Bt(135)],duration:0}}[Bt(209)](t,e=!1){this[Bt(147)][Bt(158)](Bt(267)+t,e)}[Bt(184)](){try{if(this[Bt(203)][Bt(287)][Bt(245)]){const e=this[Bt(203)][Bt(287)][Bt(245)][Bt(191)](Dt);if(e){const n=JSON[Bt(210)](e);let r;return Bt(224)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}[Bt(229)](t){try{this[Bt(203)][Bt(287)][Bt(245)]&&this[Bt(203)][Bt(287)][Bt(245)][Bt(227)](Dt,JSON[Bt(298)](It(t)))}catch(t){}}[Bt(293)](t){const e=t[Bt(171)];if(!(e&&e instanceof Element&&e[Bt(153)]))return 0;const n=e[Bt(153)]();if(!n[Bt(308)]||!n[Bt(256)])return 0;const r=n[Bt(126)]+n[Bt(308)]/2,i=n[Bt(269)]+n[Bt(256)]/2,o=this[Bt(250)]({x:t[Bt(180)],y:t[Bt(261)]},{x:r,y:i}),s=Math[Bt(212)](n[Bt(308)]**2+n[Bt(256)]**2)/2;return s>0?Math[Bt(200)](0,1-o/s):0}[Bt(250)](t,e){return Math[Bt(212)]((e.x-t.x)**2+(e.y-t.y)**2)}[Bt(117)](t){if(t[Bt(121)](Bt(176))||t[Bt(121)](Bt(137)))return t;return""+(this[Bt(203)][Bt(287)][Bt(302)][Bt(115)]||this[Bt(203)][Bt(287)][Bt(302)][Bt(220)]+"//"+this[Bt(203)][Bt(287)][Bt(302)][Bt(217)])+t}async[Bt(257)](t,e){if(!this[Bt(315)][Bt(247)])return;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,It(t),e),r=JSON[Bt(298)](n),i=this[Bt(117)](this[Bt(155)][Bt(231)]);if(this[Bt(203)][Bt(234)][Bt(257)]&&!this[Bt(155)][Bt(276)])try{const t=new Blob([r],{type:Bt(294)});if(this[Bt(203)][Bt(234)][Bt(257)](i,t))return this[Bt(315)][Bt(247)][Bt(248)]=0,void(this[Bt(315)][Bt(247)][Bt(118)]=Date[Bt(178)]())}catch(t){}try{const t=await fetch(i,{method:Bt(279),headers:{"Content-Type":Bt(294)},body:r,credentials:Bt(139),keepalive:!0});if(!t.ok)throw new Error(Bt(218)+t[Bt(186)]);this[Bt(315)][Bt(247)][Bt(248)]=0,this[Bt(315)][Bt(247)][Bt(118)]=Date[Bt(178)]()}catch(n){this[Bt(251)](t,e)}}[Bt(251)](t,e){if(!this[Bt(315)][Bt(247)]||this[Bt(315)][Bt(247)][Bt(248)]>=this[Bt(155)][Bt(236)])return;const n=Math[Bt(206)](1e3*2**this[Bt(315)][Bt(247)][Bt(248)],3e4);this[Bt(315)][Bt(247)][Bt(248)]++,this[Bt(315)][Bt(247)][Bt(241)]=this[Bt(203)][Bt(287)][Bt(197)](()=>{this[Bt(315)][Bt(247)]&&this[Bt(257)](t,e)},n)}async[Bt(297)](){if(!this[Bt(315)][Bt(247)])return;const t=At(this[Bt(315)][Bt(246)],this[Bt(315)][Bt(151)],this[Bt(315)][Bt(127)],this[Bt(315)][Bt(204)],this[Bt(315)][Bt(216)],this[Bt(315)][Bt(278)],this[Bt(315)][Bt(143)],this[Bt(315)][Bt(299)],this[Bt(315)][Bt(240)],this[Bt(315)][Bt(161)],this[Bt(315)][Bt(281)],this[Bt(315)][Bt(135)],Date[Bt(178)]()),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[Bt(301)]=!0),e.ca>0&&1===e.vc&&(i[Bt(205)]=!0),e.ka>0&&(i[Bt(122)]=!0),e.sa>0&&(i[Bt(202)]=!0),e.ta>0&&(i[Bt(107)]=!0),e.t>30&&(i[Bt(238)]=!0),n&&(n[Bt(290)]>1&&(i[Bt(150)]=!0),n[Bt(233)]>60&&(i[Bt(273)]=!0)),r){const t=Object[Bt(223)](i);for(const e of t)i[e]=i[e]||r[e]}return i}(this[Bt(315)][Bt(152)],t,this[Bt(315)][Bt(149)],this[Bt(315)][Bt(247)][Bt(133)]),n=function(t,e){if(!e)return!0;const n=Object[Bt(223)](t);for(const r of n)if(t[r]!==e[r])return!0;return!1}(e,this[Bt(315)][Bt(247)][Bt(133)]),r=Date[Bt(178)]()-this[Bt(315)][Bt(247)][Bt(118)],i=r>=this[Bt(155)][Bt(128)];if(n||i){if(Date[Bt(178)]()-this[Bt(315)][Bt(247)][Bt(237)]<100)return void this[Bt(209)](Bt(188),!0);if(i&&!n&&this[Bt(209)](Bt(157)+Math[Bt(175)](r/1e3)+Bt(110),!0),n&&this[Bt(155)][Bt(270)]){if(this[Bt(315)][Bt(247)][Bt(133)]){Object[Bt(223)](e)[Bt(189)](t=>{this[Bt(315)][Bt(247)][Bt(133)][t],e[t]})}else this[Bt(209)](Bt(113));this[Bt(315)][Bt(149)]}this[Bt(315)][Bt(247)][Bt(133)]=(o=e,{...o}),this[Bt(315)][Bt(247)][Bt(237)]=Date[Bt(178)](),this[Bt(229)](e);const t=Bt(n?230:187);await this[Bt(257)](e,t)}else this[Bt(155)][Bt(270)];var o}}const kt=t=>{const e=/_shopify_s=([^;]*)/[Bt(307)](t[Bt(134)][Bt(207)]);return e?e[1]:void 0},jt=(t,e)=>{const n=kt(t),r=/_shopify_y=([^;]*)/[Bt(307)](t[Bt(134)][Bt(207)]),i=r?r[1]:void 0;return{libVersion:"2.0.1",shopId:e||"",hostname:t[Bt(287)]?.[Bt(302)]?.[Bt(264)]||"",url:t[Bt(287)]?.[Bt(302)]?.[Bt(156)]||"",referrer:t[Bt(134)]?.[Bt(138)]||"",baseURI:t[Bt(134)]?.[Bt(173)]||"",sessionToken:n||"",uniqueToken:i||""}},qt=(t,e=_t(),n=new vt(Lt,xt))=>{const r=new dt({exporter:n,attributes:jt(e,t?.[Bt(145)])}),i=kt(e),o=i?function(t){let e=0;for(let n=0,r=t.length;na[Bt(106)]()):a[Bt(106)](),a};class Ut{quietWindowStartCandidates=[];longAnimationFrameObserver=null;longAnimationFrames=[];constructor(){this.initializeLongAnimationFrameObserver()}getQuietWindowStartCandidates(){return[...this.quietWindowStartCandidates].sort((t,e)=>t.startTime-e.startTime)}getLongAnimationFrames(){if(!Ft()){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(Ft())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 Ht=null;function Ot(t){if(null===t||!Ft()&&!Boolean(window.ShopifyAnalytics?.performance?.getLongAnimationFrames))return Wt(),null;const e=Ht?Ht.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 Wt(),t;const r=Ht?Ht.getQuietWindowStartCandidates():[];let i=t;if(r.length>0)for(const e of r)if(e.startTime>=t){i=e.startTime;break}return Wt(),i}function Ft(){return PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")}function Wt(){Ht&&(Ht.destroy(),Ht=null)}const Rt=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"}),Zt=new RegExp(`^${window.location.origin}/((?:(?:[a-z]{2,3}|zh-hans|zh-hant)(?:-[a-zA-Z0-9]+)/)?cart/(add|change|update|clear))`),Vt=new RegExp("cart-performance:|add:|change:|clear:|note_update:");var Jt;function Xt({monorailRegion:t,schema:e,rawData:n}){const r=Date.now(),i={schema_id:e,payload:e===Jt.OnUnload?Kt(n):Yt(n),metadata:{event_created_at_ms:r,event_sent_at_ms:r}},o=Rt[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 Kt(t){const e=Gt(t,["domInteractive","domContentLoadedEventStart","domContentLoadedEventEnd","domComplete","firstPaint","visuallyReady","initiatorType","redirectCount","cartAjaxResourceTimings","cartPerformanceMetrics"]);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,other_metrics:JSON.stringify(e)}}function Yt(t){const e=Gt(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,other_interaction_metrics:JSON.stringify(e)}}function Gt(t,e){return e.reduce((e,n)=>{var r;return t[n]&&(e[(r=n,r.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`))]=t[n]||null),e},{})}!function(t){t.OnInteraction="perf_kit_on_interaction/3.1",t.OnUnload="perf_kit_on_unload/3.4"}(Jt||(Jt={}));const $t="xxxx-4xxx-xxxx-xxxxxxxxxxxx";function Qt(){let t="";try{const e=window.crypto,n=new Uint16Array(31);e.getRandomValues(n);let r=0;t=$t.replace(/[x]/g,t=>{const e=n[r]%16;return r++,("x"===t?e:3&e|8).toString(16)}).toUpperCase()}catch(e){t=$t.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 te=!0,ee=!1,ne=null,re=null,ie=!1;class oe{info;config;performanceMetrics;constructor(t){const e=/_shopify_s=([^;]*)/.exec(document.cookie),n=e?e[1]:void 0,r=/_shopify_y=([^;]*)/.exec(document.cookie),i=r?r[1]:void 0;this.config=t,this.info={perfKitInit:Date.now(),perfKitVersion:"3.0.3",url:window.location.href,referrer:document.referrer||void 0,microSessionId:Qt(),microSessionCount:0,sessionToken:n,uniqueToken:i},performance.setResourceTimingBufferSize(1e3),this.performanceMetrics=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 se(t){ne=new oe(t),Ht||(Ht=new Ut),t.spaMode&&(window.PerfKit={navigate:()=>{te?te=!1:ee||(ce(),ne=new oe(t),ee=!0)},setPageType:e=>{t.storefrontData.pageType=e},setConsent:t=>{re=t}}),t.shs&&!t.spaMode&&qt({debug:!1,shopId:t.storefrontData.shopId,exportWithFetch:t.shsExportWithFetch||!0,logsSampleRate:t.shsLogsSampleRate,...t.shsBeaconEndpoint&&{beaconEndpoint:t.shsBeaconEndpoint}})}const ae=new Set;function ce(){if(null!==ne){if(ue()&&ae.size>0){let t={};for(const e of ae)t={...t,...e};const e=t.firstContentfulPaint??null,n=Ot(e);null!==e&&null!==n&&(t.quietWindowStart=Math.round(n)),ae.clear(),ne.info.microSessionCount+=1;const r=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))})}(ne.config.resourceTimingSamplingRate),i=performance.getEntriesByType("resource").filter(t=>Zt.test(t.name)),o=performance.getEntriesByType("measure").filter(t=>Vt.test(t.name)).map(t=>{const e=t.toJSON();return e.name.startsWith("cart-performance:")||(e.name=`cart-performance:${e.name}`),e});Xt({monorailRegion:ne.config.monorailRegion,schema:Jt.OnUnload,rawData:{...ne.info,...ne.config.storefrontData,...ne.performanceMetrics,...t,resourceTiming:r,cartAjaxResourceTimings:i,cartPerformanceMetrics:o,paintTimingHidden:ie}})}}else console.debug("⛔️ Shopify/perf-kit is not initialized")}function ue(){return null!==re?re:et()}((e,r={})=>{const o=s(r=Object.assign({},r),t),a=new WeakMap;o.t=t=>{if(t?.sources?.length){const e=x(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=m("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())},d=f("layout-shift",c);d&&(i=h(e,o,L,n.reportAllChanges),r.onHidden(()=>{c(d.takeRecords()),i(!0)}),u(()=>{a.o=0,o=m("CLS",0),i=h(e,o,L,n.reportAllChanges),l(()=>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=x(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;ae.add({cumulativeLayoutShift:n,cumulativeLayoutShiftTarget:e.largestShiftTarget})}),((t,n={})=>{const r=s(n=Object.assign({},n),k),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=m("LCP");const o=s(e,k),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&&(I(n),removeEventListener(t.type,o,{capture:!0}))};for(const t of["keydown","click","visibilitychange"])addEventListener(t,o,{capture:!0});u(n=>{i=m("LCP"),r=h(t,i,j,e.reportAllChanges),l(()=>{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;ae.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;ae.add({firstContentfulPaint:Math.round(e)})}),((t,e={})=>{const r=s(e=Object.assign({},e),P);let o=[],a=[],c=0;const l=new WeakMap,d=new WeakMap;let p=!1;const g=()=>{p||(I(v),p=!0)},v=()=>{const t=r.l.map(t=>l.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)&&l.set(t,n),g()},r.p=t=>{if(!d.get(t)){const n=t.entries[0].target;if(n){const r=e.generateTarget?.(n)??i(n);d.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=l.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),h=r.h.get(e.interactionId),m={interactionTarget:d.get(h),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=h)}}const h=t.longAnimationFrameEntries.at(-1),l=h?h.startTime+h.duration:0;l>=e+n+r&&(c=t.nextPaintTime-l),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})(m),Object.assign(t,{attribution:m})};f("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=f("event",B,{type:"event",buffered:!0,durationThreshold:0}));let r,i=m("INP");const o=s(e,P),a=t=>{I(()=>{for(const e of t)o.u(e);const e=o.M();e&&e.T!==i.value&&(i.value=e.T,i.entries=e.entries,r())})},c=f("event",a,{durationThreshold:e.durationThreshold??40});r=h(t,i,N,e.reportAllChanges),c&&(c.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{a(c.takeRecords()),r(!0)}),u(()=>{o.v(),i=m("INP"),r=h(t,i,N,e.reportAllChanges)}))})})(e=>{const n=w(e);t(n)},e)})(function(t){const{attribution:e,value:n}=t;if(null===ne)return void console.debug("⛔️ Shopify/perf-kit is not initialized");if(!ue())return;ne.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)}:{};Xt({monorailRegion:ne.config.monorailRegion,schema:Jt.OnInteraction,rawData:{...ne.info,...ne.config.storefrontData,...ne.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=m("TTFB"),i=h(t,r,q,n.reportAllChanges);U(()=>{const o=e();o&&(r.value=Math.max(o.responseStart-d(),0),r.entries=[o],i(!0),u(()=>{r=m("TTFB",0),i=h(t,r,q,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;ae.add({timeToFirstByte:Math.round(e)})}),addEventListener("DOMContentLoaded",()=>{ie="hidden"===document.visibilityState}),addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&ce()}),function(){const{dataset:t}=document.currentScript;try{se(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},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)}}()}();