PageSourceSearch

https://www.coteathome.co.uk/cdn/shopifycloud/checkout-web/assets/c1/esnext-vendor.B9Da21W6.js

js coteathome.co.uk collected 2026-09-25 18:39:48 UTC 141,032 bytes, 7 lines download raw bytes

vendor: 6,604 bytes, line 1
1var Je,b,Do,Uo,oe,Tr,Fo,Ho,nn,_t,Be,jo,Kn,An,Cn,Bo,bt={},At=[],ys=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ze=Array.isArray;function z(e,t){for(var n in t)e[n]=t[n];return e}function Gn(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function te(e,t,n){var r,o,i,s={};for(i in t)i=="key"?r=t[i]:i=="ref"?o=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?Je.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return Ke(e,s,r,o,null)}function Ke(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++Do,__i:-1,__u:0};return o==null&&b.vnode!=null&&b.vnode(i),i}function Of(){return{current:null}}function L(e){return e.children}function B(e,t){this.props=e,this.context=t}function Te(e,t){if(t==null)return e.__?Te(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?Te(e):null}function gs(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,r=[],o=[],i=z({},t);i.__v=t.__v+1,b.vnode&&b.vnode(i),qn(e.__P,i,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,r,n??Te(t),!!(32&t.__u),o),i.__v=t.__v,i.__.__k[i.__i]=i,Vo(r,i,o),t.__e=t.__=null,i.__e!=n&&Ko(i)}}function Ko(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),Ko(e)}function Tn(e){(!e.__d&&(e.__d=!0)&&oe.push(e)&&!Ct.__r++||Tr!=b.debounceRendering)&&((Tr=b.debounceRendering)||Fo)(Ct)}function Ct(){try{for(var e,t=1;oe.length;)oe.length>t&&oe.sort(Ho),e=oe.shift(),t=oe.length,gs(e)}finally{oe.length=Ct.__r=0}}function Go(e,t,n,r,o,i,s,a,u,c,l){var h,f,d,v,_,y,p,m=r&&r.__k||At,g=t.length;for(u=Es(n,t,m,u,g),h=0;h<g;h++)(d=n.__k[h])!=null&&(f=d.__i!=-1&&m[d.__i]||bt,d.__i=h,y=qn(e,d,f,o,i,s,a,u,c,l),v=d.__e,d.ref&&f.ref!=d.ref&&(f.ref&&Wn(f.ref,null,d),l.push(d.ref,d.__c||v,d)),_==null&&v!=null&&(_=v),(p=!!(4&d.__u))||f.__k===d.__k?(u=qo(d,u,e,p),p&&f.__e&&(f.__e=null)):typeof d.type=="function"&&y!==void 0?u=y:v&&(u=v.nextSibling),d.__u&=-7);return n.__e=_,u}function Es(e,t,n,r,o){var i,s,a,u,c,l=n.length,h=l,f=0;for(e.__k=new Array(o),i=0;i<o;i++)(s=t[i])!=null&&typeof s!="boolean"&&typeof s!="function"?(typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?s=e.__k[i]=Ke(null,s,null,null,null):Ze(s)?s=e.__k[i]=Ke(L,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[i]=Ke(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[i]=s,u=i+f,s.__=e,s.__b=e.__b+1,a=null,(c=s.__i=ws(s,n,u,h))!=-1&&(h--,(a=n[c])&&(a.__u|=2)),a==null||a.__v==null?(c==-1&&(o>l?f--:o<l&&f++),typeof s.type!="function"&&(s.__u|=4)):c!=u&&(c==u-1?f--:c==u+1?f++:(c>u?f--:f++,s.__u|=4))):e.__k[i]=null;if(h)for(i=0;i<l;i++)(a=n[i])!=null&&(2&a.__u)==0&&(a.__e==r&&(r=Te(a)),Yo(a,a));return r}function qo(e,t,n,r){var o,i;if(typeof e.type=="function"){for(o=e.__k,i=0;o&&i<o.length;i++)o[i]&&(o[i].__=e,t=qo(o[i],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=Te(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Z(e,t){return t=t||[],e==null||typeof e=="boolean"||(Ze(e)?e.some(function(n){Z(n,t)}):t.push(e)),t}function ws(e,t,n,r){var o,i,s,a=e.key,u=e.type,c=t[n],l=c!=null&&(2&c.__u)==0;if(c===null&&a==null||l&&a==c.key&&u==c.type)return n;if(r>(l?1:0)){for(o=n-1,i=n+1;o>=0||i<t.length;)if((c=t[s=o>=0?o--:i++])!=null&&(2&c.__u)==0&&a==c.key&&u==c.type)return s}return-1}function $r(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||ys.test(t)?n:n+"px"}function it(e,t,n,r,o){var i,s;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||$r(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||$r(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(jo,"$1")),s=t.toLowerCase(),t=s in e||t=="onFocusOut"||t=="onFocusIn"?s.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n[Be]=r[Be]:(n[Be]=Kn,e.addEventListener(t,i?Cn:An,i)):e.removeEventListener(t,i?Cn:An,i);else{if(o=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function Pr(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t[_t]==null)t[_t]=Kn++;else if(t[_t]<n[Be])return;return n(b.event?b.event(t):t)}}}function qn(e,t,n,r,o,i,s,a,u,c){var l,h,f,d,v,_,y,p,m,g,E,S,w,T,O,G,I=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(u=!!(32&n.__u),i=[a=t.__e=n.__e]),(l=b.__b)&&l(t);e:if(typeof I=="function"){h=s.length;try{if(m=t.props,g=I.prototype&&I.prototype.render,E=(l=I.contextType)&&r[l.__c],S=l?E?E.props.value:l.__:r,n.__c?p=(f=t.__c=n.__c).__=f.__E:(g?t.__c=f=new I(m,S):(t.__c=f=new B(m,S),f.constructor=I,f.render=bs),E&&E.sub(f),f.state||(f.state={}),f.__n=r,d=f.__d=!0,f.__h=[],f._sb=[]),g&&f.__s==null&&(f.__s=f.state),g&&I.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=z({},f.__s)),z(f.__s,I.getDerivedStateFromProps(m,f.__s))),v=f.props,_=f.state,f.__v=t,d)g&&I.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),g&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(g&&I.getDerivedStateFromProps==null&&m!==v&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(m,S),t.__v==n.__v||!f.__e&&f.shouldComponentUpdate!=null&&f.shouldComponentUpdate(m,f.__s,S)===!1){t.__v!=n.__v&&(f.props=m,f.state=f.__s,f.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(q){q&&(q.__=t)}),At.push.apply(f.__h,f._sb),f._sb=[],f.__h.length&&s.push(f);break e}f.componentWillUpdate!=null&&f.componentWillUpdate(m,f.__s,S),g&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(v,_,y)})}if(f.context=S,f.props=m,f.__P=e,f.__e=!1,w=b.__r,T=0,g)f.state=f.__s,f.__d=!1,w&&w(t),l=f.render(f.props,f.state,f.context),At.push.apply(f.__h,f._sb),f._sb=[];else do f.__d=!1,w&&w(t),l=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++T<25);f.state=f.__s,f.getChildContext!=null&&(r=z(z({},r),f.getChildContext())),g&&!d&&f.getSnapshotBeforeUpdate!=null&&(y=f.getSnapshotBeforeUpdate(v,_)),O=l!=null&&l.type===L&&l.key==null?zo(l.props.children):l,a=Go(e,Ze(O)?O:[O],t,n,r,o,i,s,a,u,c),f.base
vendor: 4,836 bytes, line 1
1=t.__e,t.__u&=-161,f.__h.length&&s.push(f),p&&(f.__E=f.__=null)}catch(q){if(s.length=h,t.__v=null,u||i!=null){if(q.then){for(t.__u|=u?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;i!=null&&(i[i.indexOf(a)]=null),t.__e=a}else if(i!=null)for(G=i.length;G--;)Gn(i[G])}else t.__e=n.__e;t.__k==null&&(t.__k=n.__k||[]),q.then||Wo(t),b.__e(q,t,n)}}else i==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=Ss(n.__e,t,n,r,o,i,s,u,c);return(l=b.diffed)&&l(t),128&t.__u?void 0:a}function Wo(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(Wo))}function Vo(e,t,n){for(var r=0;r<n.length;r++)Wn(n[r],n[++r],n[++r]);b.__c&&b.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){b.__e(i,o.__v)}})}function zo(e){return typeof e!="object"||e==null||e.__b>0?e:Ze(e)?e.map(zo):e.constructor!==void 0?null:z({},e)}function Ss(e,t,n,r,o,i,s,a,u){var c,l,h,f,d,v,_,y=n.props||bt,p=t.props,m=t.type;if(m=="svg"?o="http://www.w3.org/2000/svg":m=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),i!=null){for(c=0;c<i.length;c++)if((d=i[c])&&"setAttribute"in d==!!m&&(m?d.localName==m:d.nodeType==3)){e=d,i[c]=null;break}}if(e==null){if(m==null)return document.createTextNode(p);e=document.createElementNS(o,m,p.is&&p),a&&(b.__m&&b.__m(t,i),a=!1),i=null}if(m==null)y===p||a&&e.data==p||(e.data=p);else{if(i=m=="textarea"&&p.defaultValue!=null?null:i&&Je.call(e.childNodes),!a&&i!=null)for(y={},c=0;c<e.attributes.length;c++)y[(d=e.attributes[c]).name]=d.value;for(c in y)d=y[c],c=="dangerouslySetInnerHTML"?h=d:c=="children"||c in p||c=="value"&&"defaultValue"in p||c=="checked"&&"defaultChecked"in p||it(e,c,null,d,o);for(c in p)d=p[c],c=="children"?f=d:c=="dangerouslySetInnerHTML"?l=d:c=="value"?v=d:c=="checked"?_=d:a&&typeof d!="function"||y[c]===d||it(e,c,d,y[c],o);if(l)a||h&&(l.__html==h.__html||l.__html==e.innerHTML)||(e.innerHTML=l.__html),t.__k=[];else if(h&&(e.innerHTML=""),Go(t.type=="template"?e.content:e,Ze(f)?f:[f],t,n,r,m=="foreignObject"?"http://www.w3.org/1999/xhtml":o,i,s,i?i[0]:n.__k&&Te(n,0),a,u),i!=null)for(c=i.length;c--;)Gn(i[c]);a&&m!="textarea"||(c="value",m=="progress"&&v==null?e.removeAttribute("value"):v!=null&&(v!==e[c]||m=="progress"&&!v||m=="option"&&v!=y[c])&&it(e,c,v,y[c],o),c="checked",_!=null&&_!=e[c]&&it(e,c,_,y[c],o))}return e}function Wn(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(o){b.__e(o,n)}}function Yo(e,t,n){var r,o;if(b.unmount&&b.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||Wn(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){b.__e(i,t)}r.base=r.__P=r.__n=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&Yo(r[o],t,n||typeof e.type!="function");n||Gn(e.__e),e.__c=e.__=e.__e=void 0}function bs(e,t,n){return this.constructor(e,n)}function Tt(e,t,n){var r,o,i,s;t==document&&(t=document.documentElement),b.__&&b.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,i=[],s=[],qn(t,e=(!r&&n||t).__k=te(L,null,[e]),o||bt,bt,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?Je.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r,s),Vo(i,e,s),e.props.children=null}function As(e,t){Tt(e,t,As)}function Cs(e,t,n){var r,o,i,s,a=z({},e.props);for(i in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)i=="key"?r=t[i]:i=="ref"?o=t[i]:a[i]=t[i]===void 0&&s!=null?s[i]:t[i];return arguments.length>2&&(a.children=arguments.length>3?Je.call(arguments,2):n),Ke(e.type,a,r||e.key,o||e.ref,null)}function Vn(e){function t(n){var r,o;return this.getChildContext||(r=new Set,(o={})[t.__c]=this,this.getChildContext=function(){return o},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(i){this.props.value!=i.value&&r.forEach(function(s){s.__e=!0,Tn(s)})},this.sub=function(i){r.add(i);var s=i.componentWillUnmount;i.componentWillUnmount=function(){r&&r.delete(i),s&&s.call(i)}}),n.children}return t.__c="__cC"+Bo++,t.__=e,t.Provider=t.__l=(t.Consumer=function(n,r){return n.children(r)}).contextType=t,t}Je=At.slice,b={__e:function(e,t,n,r){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(a){e=a}throw e}},Do=0,Uo=function(e){return e!=null&&e.constructor===void 0},B.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=z({},this.state),typeof e=="function"&&(e=e(z({},n),this.props)),e&&z(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Tn(this))},B.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Tn(this))},B.prototype.render=L,oe=[],Fo=typeof Promise=="function"?Promise.prototype.then.bind(Prom
1ise.resolve()):setTimeout,Ho=function(e,t){return e.__v.__b-t.__v.__b},Ct.__r=0,nn=Math.random().toString(8),_t="__d"+nn,Be="__a"+nn,jo=/(PointerCapture)$|Capture$/i,Kn=0,An=Pr(!1),Cn=Pr(!0),Bo=0;var ne,P,rn,Rr,$e=0,Xo=[],N=b,Nr=N.__b,Or=N.__r,kr=N.diffed,xr=N.__c,Mr=N.unmount,Ir=N.__;function ye(e,t){N.__h&&N.__h(P,e,$e||t),$e=0;var n=P.__H||(P.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function ze(e){return $e=1,Ts(Qo,e)}function Ts(e,t,n){var r=ye(ne++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Qo(void 0,t),function(a){var u=r.__N?r.__N[0]:r.__[0],c=r.t(u,a);u!==c&&(r.__N=[c,r.__[1]],r.__c.setState({}))}],r.__c=P,!P.__f)){var o=function(a,u,c){if(!r.__c.__H)return!0;var l=!1,h=r.__c.props!==a;if(r.__c.__H.__.some(function(d){if(d.__N){l=!0;var v=d.__[0];d.__=d.__N,d.__N=void 0,v!==d.__[0]&&(h=!0)}}),i){var f=i.call(this,a,u,c);return l?f||h:f}return!l||h};P.__f=!0;var i=P.shouldComponentUpdate,s=P.componentWillUpdate;P.componentWillUpdate=function(a,u,c){if(this.__e){var l=i;i=void 0,o(a,u,c),i=l}s&&s.call(this,a,u,c)},P.shouldComponentUpdate=o}return r.__N||r.__}function X(e,t){var n=ye(ne++,3);!N.__s&&Yn(n.__H,t)&&(n.__=e,n.u=t,P.__H.__h.push(n))}function Kt(e,t){var n=ye(ne++,4);!N.__s&&Yn(n.__H,t)&&(n.__=e,n.u=t,P.__h.push(n))}function Y(e){return $e=5,U(function(){return{current:e}},[])}function kf(e,t,n){$e=6,Kt(function(){if(typeof e=="function"){var r=e(t());return function(){e(null),r&&typeof r=="function"&&r()}}if(e)return e.current=t(),function(){return e.current=null}},n==null?n:n.concat(e))}function U(e,t){var n=ye(ne++,7);return Yn(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function _e(e,t){return $e=8,U(function(){return e},t)}function zn(e){var t=P.context[e.__c],n=ye(ne++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(P)),t.props.value):e.__}function xf(e,t){N.useDebugValue&&N.useDebugValue(t?t(e):e)}function Mf(e){var t=ye(ne++,10),n=ze();return t.__=e,P.componentDidCatch||(P.componentDidCatch=function(r,o){t.__&&t.__(r,o),n[1](r)}),[n[0],function(){n[1](void 0)}]}function If(){var e=ye(ne++,11);if(!e.__){for(var t=P.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function $s(){for(var e;e=Xo.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(mt),t.__h.some($n),t.__h=[]}catch(n){t.__h=[],N.__e(n,e.__v)}}}N.__b=function(e){P=null,Nr&&Nr(e)},N.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Ir&&Ir(e,t)},N.__r=function(e){Or&&Or(e),ne=0;var t=(P=e.__c).__H;t&&(rn===P?(t.__h=[],P.__h=[],t.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.some(mt),t.__h.some($n),t.__h=[],ne=0)),rn=P},N.diffed=function(e){kr&&kr(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Xo.push(t)!==1&&Rr===N.requestAnimationFrame||((Rr=N.requestAnimationFrame)||Ps)($s)),t.__H.__.some(function(n){n.u&&(n.__H=n.u,n.u=void 0)})),rn=P=null},N.__c=function(e,t){t.some(function(n){try{n.__h.some(mt),n.__h=n.__h.filter(function(r){return!r.__||$n(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],N.__e(r,n.__v)}}),xr&&xr(e,t)},N.unmount=function(e){Mr&&Mr(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(r){try{mt(r)}catch(o){t=o}}),n.__H=void 0,t&&N.__e(t,n.__v))};var Lr=typeof requestAnimationFrame=="function";function Ps(e){var t,n=function(){clearTimeout(r),Lr&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Lr&&(t=requestAnimationFrame(n))}function mt(e){var t=P,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),P=t}function $n(e){var t=P;e.__c=e.__(),P=t}function Yn(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Qo(e,t){return typeof t=="function"?t(e):t}var Rs=Symbol.for("preact-signals");function Gt(){if(ee>1)ee--;else{var e,t=!1;for((function(){var o=Pt;for(Pt=void 0;o!==void 0;){var i=o.S;if(i.v===o.v)for(var s=i.t;s!==void 0;s=s.x)s.i===o.i&&(s.i=i.i);o=o.o}})();Ge!==void 0;){var n=Ge;for(Ge=void 0,$t++;n!==void 0;){var r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&Zo(n))try{n.c()}catch(o){t||(e=o,t=!0)}n=r}}if($t=0,ee--,t)throw e}}function Xn(e){if(ee>0)return e();Pn=++Ns,ee++;try{return e()}finally{Gt()}}var D,R=void 0;function et(e){var t=R,n=D;R=void 0,D=void 0;try{return e()}finally{R=t,D=n}}var Ge=void 0,ee=0,$t=0,Ns=0,Pn=0,Pt=void 0,Rt=0;function Jo(e){if(R!==void 0){var t=e.n;if(t===void 0||t.t!==R)return t={i:0,S:e,p:R.s,n:void 0,t:R,e:void 0,x:void 0,r:t},R.s!==void 0&&(R.s.n=t),R.s=t,e.n=t,32&R.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=R.s,t.n=void 0,R.s.n=t,R.s=t),t}}function k(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}k.prototype.brand=Rs;k.prototype.h=function(){return!0};k.prototype.S=function(e){var t=this,n=this.t;n!==e&&e.e===void 0&&(e.x=n,this.t=e,n!==void 0?n.e=e:et(function(){var r;(r=t.W)==null||r.call(t)}))};k.prototype.U=function(e){var t=this;if(this.t!==void 0){var n=e.e,r=e.x;n!==void 0&&(n.x=r,e.e=void 0),r!==void 0&&(r.e=n,e.x=void 0),e===this.t&&(this.t=r,r===void 0&&et(function(){var o;(o=t.Z)==null||o.call(t)}))}};k.prototype.subscribe=function(e){var t=this;return se(function(){var n=t.value;et(function(){return e(n)})},{name:"sub"})};k.prototype.valueOf=function(){return this.value};k.prototype.toString=function(){return this.value+""};k.prototype.toJSON=function(){return this.value};k.prototype.peek=function(){var e=this;return et(function(){return e.value})};Object.defineProperty(k.prototype,"value",{get:function(){var e=Jo(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if($t>100)throw new Error("Cycle detected");(function(n){ee!==0&&$t===0&&n.l!==Pn&&(n.l=Pn,Pt={S:n,v:n.v,i:n.i,o:Pt})})(this),this.v=e,this.i++,Rt++,ee++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Gt()}}}});function ie(e,t){return new k(e,t)}function Zo(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function ei(e){for(var t=e.s;t!==void 0;t=t.n){var n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function ti(e){for(var t=e.s,n=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):n=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=n}function ge(e,t){k.call(this,void 0,t),this.x=e,this.s=void 0,this.g=Rt-1,this.f=4}ge.prototype=new k;ge.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Rt))return!0;
1if(this.g=Rt,this.f|=1,this.i>0&&!Zo(this))return this.f&=-2,!0;var e=R;try{ei(this),R=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(n){this.v=n,this.f|=16,this.i++}return R=e,ti(this),this.f&=-2,!0};ge.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}k.prototype.S.call(this,e)};ge.prototype.U=function(e){if(this.t!==void 0&&(k.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}};ge.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}};Object.defineProperty(ge.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=Jo(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function Rn(e,t){return new ge(e,t)}function ni(e){var t=e.m;if(e.m=void 0,typeof t=="function"){ee++;var n=R;R=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,Qn(e),r}finally{R=n,Gt()}}}function Qn(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,ni(e)}function Os(e){if(R!==this)throw new Error("Out-of-order effect");ti(this),R=e,this.f&=-2,8&this.f&&Qn(this),Gt()}function Re(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=t?.name,D&&D.push(this)}Re.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.m=t)}finally{e()}};Re.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,ni(this),ei(this),ee++;var e=R;return R=this,Os.bind(this,e)};Re.prototype.N=function(){2&this.f||(this.f|=2,this.u=Ge,Ge=this)};Re.prototype.d=function(){this.f|=8,1&this.f||Qn(this)};Re.prototype.dispose=function(){this.d()};function se(e,t){var n=new Re(e,t);try{n.c()}catch(o){throw n.d(),o}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}function ri(e){return function(){var t=arguments,n=this;return Xn(function(){return et(function(){return e.apply(n,[].slice.call(t))})})}}function ks(){var e=D;return D=[],function(){var t=D;return D&&e&&(e=e.concat(D)),D=e,t}}var oi=function(e){for(var t in e){var n=e[t];typeof n=="function"?e[t]=ri(n):typeof n=="object"&&n!==null&&!("brand"in n)&&oi(n)}};function Lf(e){return function(){var t,n,r=ks();try{n=e.apply(void 0,[].slice.call(arguments))}catch(o){throw D=void 0,o}finally{t=r()}return oi(n),n[Symbol.dispose]=ri(function(){if(t)for(var o=0;o<t.length;o++)t[o].dispose();t=void 0}),n}}var Jn,qt,st,xs=typeof window<"u"&&!!window.__PREACT_SIGNALS_DEVTOOLS__,ii=[],si=[];se(function(){Jn=this.N})();function Ne(e,t){b[e]=t.bind(null,b[e]||function(){})}function Nt(e){if(st){var t=st;st=void 0,t()}st=e&&e.S()}function ai(e){var t=this,n=e.data,r=Zn(n);r.name="ReactiveDom",r.value=n;var o=U(function(){for(var a=t,u=t.__v;u=u.__;)if(u.__c){u.__c.__$f|=4;break}var c=Rn(function(){var d=r.value.value;return d===0?0:d===!0?"":d||""}),l=Rn(function(){return!Array.isArray(c.value)&&!Uo(c.value)}),h=se(function(){if(this.N=ci,l.value){var d=c.value;a.__v&&a.__v.__e&&a.__v.__e.nodeType===3&&(a.__v.__e.data=d)}}),f=t.__$u.d;return t.__$u.d=function(){h(),f.call(this)},[l,c]},[]),i=o[0],s=o[1];return i.value?s.peek():s.value}ai.displayName="ReactiveTextNode";Object.defineProperties(k.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:ai},props:{configurable:!0,get:function(){var e=this;return{data:{get value(){return e.value}}}}},__b:{configurable:!0,value:1}});Ne("__b",function(e,t){if(typeof t.type=="string"){var n,r=t.props;for(var o in r)if(o!=="children"){var i=r[o];i instanceof k&&(n||(t.__np=n={}),n[o]=i,r[o]=i.peek())}}e(t)});Ne("__r",function(e,t){if(e(t),t.type!==L){Nt();var n,r=t.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=(function(o,i){var s;return se(function(){s=this},{name:i}),s.c=o,s})(function(){var o;xs&&((o=n.y)==null||o.call(n)),r.__$f|=1,r.setState({})},typeof t.type=="function"?t.type.displayName||t.type.name:""))),qt=r,Nt(n)}});Ne("__e",function(e,t,n,r){Nt(),qt=void 0,e(t,n,r)});Ne("diffed",function(e,t){Nt(),qt=void 0;var n;if(typeof t.type=="string"&&(n=t.__e)){var r=t.__np,o=t.props,i=n.U;if(i)for(var s in i){var a=i[s];a===void 0||r&&s in r||(a.d(),i[s]=void 0)}if(r){i||(i={},n.U=i);for(var u in r){var c=i[u],l=r[u];c===void 0?(c=Ms(n,u,l,o),i[u]=c):c.o(l,o)}}}e(t)});function Ms(e,t,n,r){var o=t in e&&e.ownerSVGElement===void 0,i=ie(n);return{o:function(s,a){i.value=s,r=a},d:se(function(){this.N=ci;var s=i.value.value;r[t]!==s&&(r[t]=s,o?e[t]=s:s!=null&&(s!==!1||t[4]==="-")?e.setAttribute(t,s):e.removeAttribute(t))})}}Ne("unmount",function(e,t){if(typeof t.type=="string"){var n=t.__e;if(n){var r=n.U;if(r){n.U=void 0;for(var o in r){var i=r[o];i&&i.d()}}}var s=t.__np;if(s){var a=t.props;for(var u in s)a[u]=s[u]}t.__np=void 0}else{var c=t.__c;if(c){var l=c.__$u;l&&(c.__$u=void 0,l.d())}}e(t)});Ne("__h",function(e,t,n,r){r<3&&(t.__$f|=2),e(t,n,r)});B.prototype.shouldComponentUpdate=function(e,t){if(this.__R)return!0;var n=this.__$u,r=n&&n.s!==void 0;for(var o in t)return!0;
1if(this.__f||typeof this.u=="boolean"&&this.u===!0){var i=2&this.__$f;if(!(r||i||4&this.__$f)||1&this.__$f)return!0}else if(!(r||4&this.__$f)||3&this.__$f)return!0;for(var s in e)if(s!=="__source"&&e[s]!==this.props[s])return!0;for(var a in this.props)if(!(a in e))return!0;return!1};function Zn(e,t){return U(function(){return ie(e,t)},[])}function Df(e,t){var n=Y(e);return n.current=e,qt.__$f|=4,U(function(){return Rn(function(){return n.current()},t)},[])}var Is=typeof requestAnimationFrame>"u"?setTimeout:function(e){var t=function(){clearTimeout(n),cancelAnimationFrame(r),e()},n=setTimeout(t,35),r=requestAnimationFrame(t)},Ls=function(e){queueMicrotask(function(){queueMicrotask(e)})};function Ds(){Xn(function(){for(var e;e=ii.shift();)Jn.call(e)})}function Us(){ii.push(this)===1&&(b.requestAnimationFrame||Is)(Ds)}function Fs(){Xn(function(){for(var e;e=si.shift();)Jn.call(e)})}function ci(){si.push(this)===1&&(b.requestAnimationFrame||Ls)(Fs)}function Uf(e,t){var n=Y(e);n.current=e,X(function(){return se(function(){return this.N=Us,n.current()},t)},[])}function Ff(e){var t=U(function(){return e()},[]);return X(function(){return t[Symbol.dispose]},[t]),t}class Ae extends TypeError{constructor(t){super(t),this.name="ConsentValidationError",Object.setPrototypeOf(this,Ae.prototype)}}const F={TRACKING_ACCEPTED:"trackingConsentAccepted",TRACKING_DECLINED:"trackingConsentDeclined",MARKETING_ACCEPTED:"firstPartyMarketingConsentAccepted",SALE_OF_DATA_ACCEPTED:"thirdPartyMarketingConsentAccepted",ANALYTICS_ACCEPTED:"analyticsConsentAccepted",PREFERENCES_ACCEPTED:"preferencesConsentAccepted",MARKETING_DECLINED:"firstPartyMarketingConsentDeclined",SALE_OF_DATA_DECLINED:"thirdPartyMarketingConsentDeclined",ANALYTICS_DECLINED:"analyticsConsentDeclined",PREFERENCES_DECLINED:"preferencesConsentDeclined",CONSENT_COLLECTED:"visitorConsentCollected"},Hs="2.1",js="3",on={ACCEPTED:"yes",DECLINED:"no",NO_VALUE:""},me={NO_VALUE:"",ACCEPTED:"1",DECLINED:"0"},$={PREFERENCES:"p",ANALYTICS:"a",MARKETING:"m",SALE_OF_DATA:"t"},x={MARKETING:"m",ANALYTICS:"a",PREFERENCES:"p",SALE_OF_DATA:"s"},J={MARKETING:"marketing",ANALYTICS:"analytics",PREFERENCES:"preferences",SALE_OF_DATA:"sale_of_data",EMAIL:"email"},re={HEADLESS_STOREFRONT:"headlessStorefront",ROOT_DOMAIN:"rootDomain",CHECKOUT_ROOT_DOMAIN:"checkoutRootDomain",STOREFRONT_ROOT_DOMAIN:"storefrontRootDomain",STOREFRONT_ACCESS_TOKEN:"storefrontAccessToken",IS_EXTENSION_TOKEN:"isExtensionToken",METAFIELDS:"metafields",CUSTOMER_ACCOUNT_REQUEST_INFO:"customerAccountRequestInfo"},K=()=>typeof window>"u",Ee=()=>typeof __CtaTestEnv__>"u"?!1:__CtaTestEnv__==="true";class Oe{}Oe.warn=e=>{Ee()||console.warn(e)};Oe.error=e=>{Ee()||console.error(e)};Oe.info=e=>{Ee()||console.info(e)};Oe.debug=e=>{Ee()||console.debug(e)};Oe.trace=e=>{Ee()||console.trace(e)};const ke=Oe;function Nn(e,t){if(e===null)return"null";if(Array.isArray(e))return`[${e.map(o=>Nn(o,!0)).join(",")}]`;if(typeof e=="object"){let n=[];for(const o in e)e.hasOwnProperty(o)&&e[o]!==void 0&&e[o]!==""&&n.push(`${o}:${Nn(e[o],!0)}`);const r=n.join(",");return t?`{${r}}`:r}return typeof e=="string"?JSON.stringify(e):`${e}`}function tt(e,...t){if(t.length===0)return e;const n=t[0];return e[n]||(e[n]={}),tt(e[n],...t.slice(1))}function Ye(e){try{return decodeURIComponent(e)}catch{return""}}function Wt(){if(!K())return window}function Bs(){try{return typeof PerformanceServerTiming<"u"}catch{return!1}}const On="_tracking_consent";function Ks(){try{return document.cookie}catch{return!1}}function ui(e,t=!1){const n=Ks()?document.cookie.split("; "):[];for(let r=0;r<n.length;r++){const[o,i]=n[r].split("=");if(e===Ye(o))return Ye(i)}if(t&&e==="_tracking_consent"&&!window.localStorage.getItem("tracking_consent_fetched"))return Ee()?void 0:(console.debug("_tracking_consent missing"),Gs(),window.localStorage.setItem("tracking_consent_fetched","true"),ui(e,!1))}function Gs(e="/"){const t=new XMLHttpRequest;t.open("HEAD",e,!1),t.withCredentials=!0,t.send()}function qs(){return ui(On)}function Dr(e){return e===encodeURIComponent(Ye(e))}function Ur(e,t,n,r){if(!Dr(r))throw new TypeError("Cookie value is not correctly URI encoded.");if(!Dr(e))throw new TypeError("Cookie name is not correctly URI encoded.");let o=`${e}=${r}`;o+=";
1 path=/",t&&(o+=`; domain=${t}`),o+=`; expires=${new Date(new Date().getTime()+n).toUTCString()}`,document.cookie=o}const Ws="customer_privacy_api_events/2.0";let Vt=class vt{constructor(){if(vt.instance)return vt.instance;vt.instance=this}produce(t,n){if(!K())try{const r={schema_id:Ws,payload:{shop_domain:window.location.host,method_name:t,call_details:n||null}},o={accept:"*/*","accept-language":"en-GB,en-US;q=0.9,en;q=0.8","content-type":"application/json; charset=utf-8","x-monorail-edge-event-created-at-ms":String(Date.now()),"x-monorail-edge-event-sent-at-ms":String(Date.now())};if(window.location.host.endsWith("spin.dev"))console.log("Monorail event from consent API:",o,r);else return fetch("https://monorail-edge.shopifysvc.com/v1/produce",{headers:o,body:JSON.stringify(r),method:"POST",mode:"cors",credentials:"omit"}).catch(()=>{})}catch{}}};Vt.instance=void 0;function ve(){var e,t;return K()?{}:((e=window.Shopify)===null||e===void 0||(t=e.customerPrivacy)===null||t===void 0?void 0:t.config)||{}}const Pe="_cmp";function Vs(e=Pe){let t;if(fi()?t=sn(()=>zs(e))||sn(()=>Fr(e)):t=sn(()=>Fr(e)),!t){if(e!==Pe)return;let n;try{n=sessionStorage.getItem("consentHeader")}catch{}return n||void 0}try{t=decodeURIComponent(t)}catch{}return t}function sn(e){try{return e()}catch{return}}function Fr(e=Pe){var t,n;if(!di()&&!Xs()){const s=new Vt;let a="failed_to_fetch";try{a=navigator.userAgent}catch{}s.produce("navigationServerTiming",JSON.stringify({failed:!0,userAgent:a,apiSupported:Bs()})),Ys()}const r=(t=performance)===null||t===void 0||(n=t.getEntriesByType)===null||n===void 0?void 0:n.call(t,"navigation");if(!r)return;const i=r.map(s=>li(s,e)).find(s=>s);if(i&&e===Pe)try{sessionStorage.setItem("consentHeader",i)}catch{}return i}const Hr={};function zs(e=Pe){var t,n;const r=(t=performance)===null||t===void 0||(n=t.getEntriesByType)===null||n===void 0?void 0:n.call(t,"resource");let o=Hr[e];for(let i=r.length-1;i>=0;i--){let s=li(r[i],e);if(s){o=s;break}}return Hr[e]=o,o}function li(e,t=Pe){var n,r;if(e)return(n=e.serverTiming)===null||n===void 0||(r=n.find(o=>o.name==t))===null||r===void 0?void 0:r.description}function fi(){var e,t;const n=Wt();return(n==null||(e=n.Shopify)===null||e===void 0||(t=e.customerPrivacy)===null||t===void 0?void 0:t.backendConsentEnabled)===!0||ve().asyncVisitorState===!0}function di(){var e,t;const n=Wt();return n==null||(e=n.Shopify)===null||e===void 0||(t=e.customerPrivacy)===null||t===void 0?void 0:t.serverTimingSupportVerified}function Ys(){if(di())return;const e=Wt();tt(e,"Shopify","customerPrivacy").serverTimingSupportVerified=!0}function Xs(){try{const t=performance.getEntriesByType("navigation")[0].serverTiming;return!(!t||t.length==0)}catch{return!1}}const Qs="_cs";function Js(){return new URLSearchParams(window.location.search).get(Qs)||void 0}function Zs(e){tt(window,"Shopify","customerPrivacy").cachedConsent=e}function ea(){var e,t;const n=(e=window.Shopify)===null||e===void 0||(t=e.customerPrivacy)===null||t===void 0?void 0:t.cachedConsent;return n?Ye(n):void 0}function ta(){var e,t;(e=window.Shopify)!==null&&e!==void 0&&(t=e.customerPrivacy)!==null&&t!==void 0&&t.cachedConsent&&(window.Shopify.customerPrivacy.cachedConsent=void 0)}let hi;function na(e){K()?hi=e:tt(window,"Shopify","customerPrivacy").injectedConsent=e}function jr(){if(K())return hi;{var e,t;const n=((e=window.Shopify)===null||e===void 0||(t=e.customerPrivacy)===null||t===void 0?void 0:t.injectedConsent)||ve().injectedConsent;return n?Ye(n):void 0}}function ra(){var e;if(!K())return(e=window.Shopify)===null||e===void 0?void 0:e.customerPrivacy}function oa(e){const t=ra();t&&(t.consentStatus=e)}function ia(e,t){e.granular_consent!==void 0&&pi(t)}function H(e,t){if(!K())try{document.dispatchEvent(new CustomEvent(e,{detail:t||{}}))}catch(n){console.error(`[Shopify Customer Privacy] Error in event listener for "${e}":`,n)}}function pi(e){oa("loaded");const t=e[$.MARKETING],n=e[$.SALE_OF_DATA],r=e[$.ANALYTICS],o=e[$.PREFERENCES];t===!0?H(F.MARKETING_ACCEPTED):t===!1&&H(F.MARKETING_DECLINED),n===!0?H(F.SALE_OF_DATA_ACCEPTED):n===!1&&H(F.SALE_OF_DATA_DECLINED),r===!0?H(F.ANALYTICS_ACCEPTED):r===!1&&H(F.ANALYTICS_DECLINED),o===!0?H(F.PREFERENCES_ACCEPTED):o===!1&&H(F.PREFERENCES_DECLINED);const i=sa(e);H(F.CONSENT_COLLECTED,i);const s=[r,o,t,n];s.every(a=>a===!0)&&H(F.TRACKING_ACCEPTED),s.every(a=>a===!1)&&H(F.TRACKING_DECLINED)}function sa(e){return{marketingAllowed:e[$.MARKETING],saleOfDataAllowed:e[$.SALE_OF_DATA],analyticsAllowed:e[$.ANALYTICS],preferencesAllowed:e[$.PREFERENCES],firstPartyMarketingAllowed:e[$.MARKETING],thirdPartyMarketingAllowed:e[$.SALE_OF_DATA]}}function Hf(e){na(e),K()||(ta(),pi({[$.PREFERENCES]:er(),[$.ANALYTICS]:Yt(),[$.MARKETING]:tr(),[$.SALE_OF_DATA]:nr()}))}function aa(){let e;if(K()?e=jr():e=ea()||jr()||Js()||qs()||Vs(),e!==void 0)return ua(e)}function we(){try{let e=aa();return e||void 0}catch{return}}function ca(){return{m:at(x.MARKETING),a:at(x.ANALYTICS),p:at(x.PREFERENCES),s:at(x.SALE_OF_DATA)}}function _i(e=null){return e===null&&(e=we()),e===void 0}function ua(e){if(e.slice(0,1)=="%")try{e=decodeURIComponent(e)}catch{}const t=e.slice(0,1);if(t=="{")return la(e);if(t=="3")return fa(e)}function la(e){var t;let n;try{n=JSON.parse(e)}catch{return}if(n.v===Hs&&(t=n.con)!==null&&t!==void 0&&t.CMP)return n}function fa(e){const t=e.slice(1).split("_"),[n,r,o,i,s]=t;let a;try{a=t[5]?JSON.parse(t.slice(5).join("_")):void 0}catch{}let u;if(s){const h=s.replace(/\*/g,"/").replace(/-/g,"+"),f=atob(h);let d="";for(let v=0;v<f.length;v++){const _=f.charCodeAt(v).toString(16);d+=_.length===1?"0"+_:_}u=[8,13,18,23].reduce((v,_)=>v.slice(0,_)+"-"+v.slice(_),d)}function c(h){const f=n.split(".")[0];return f.includes(h.toLowerCase())?me.DECLINED:f.includes(h.toUpperCase())?me.ACCEPTED:me.NO_VALUE}function l(h){return n.includes(h.replace("t","s").toUpperCase())}return{v:js,con:{CMP:{[x.ANALYTICS]:c(x.ANALYTICS),[x.PREFERENCES]:c(x.PREFERENCES),[x.MARKETING]:c(x.MARKETING),[x.SALE_OF_DATA]:c(x.SALE_OF_DATA)}},region:r||"",cus:a,purposes:{[$.ANALYTICS]:l($.ANALYTICS),[$.PREFERENCES]:l($.PREFERENCES),[$.MARKETING]:l($.MARKETING),[$.SALE_OF_DATA]:l($.SALE_OF_DATA)}
1,sale_of_data_region:i=="t",display_banner:o=="t",consent_id:u}}function da(e){switch(e){case me.ACCEPTED:return on.ACCEPTED;case me.DECLINED:return on.DECLINED;default:return on.NO_VALUE}}function ha(e){switch(e){case x.ANALYTICS:return J.ANALYTICS;case x.MARKETING:return J.MARKETING;case x.PREFERENCES:return J.PREFERENCES;case x.SALE_OF_DATA:return J.SALE_OF_DATA}}function at(e){const t=we();if(!t)return me.NO_VALUE;const n=t.con.CMP;return n?n[e]:me.NO_VALUE}function pa(){const e=we();return _i(e)?"":e.region||""}function _a(){const e=we();if(!(_i(e)||!e.cus))return Object.entries(e.cus).map(([t,n])=>({key:decodeURIComponent(t),value:decodeURIComponent(n)}))}function zt(e){const t=we();if(!t||!t.purposes)return!0;const n=t.purposes[e];return typeof n=="boolean"?n:!0}function er(){return zt($.PREFERENCES)}function Yt(){return zt($.ANALYTICS)}function tr(){return zt($.MARKETING)}function nr(){return zt($.SALE_OF_DATA)}function jf(){const e=we();return e&&typeof e.display_banner=="boolean"?e.display_banner:!1}function Bf(){const e=we();return e&&e.sale_of_data_region||!1}const ma="v0.2",va=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[0-9a-f]{4}-[0-9a-f]{12}$/,ya="00000000-0000-0000-0000-000000000000",ga="00000000-0000-0000-5000-000000000000";function Ea(e){return e?va.test(e.trim().toLowerCase()):!1}function Br(e,t){if(typeof e!="string"||!Ea(e))return;const n=e.trim();if(n===ya||n===ga)return;const r=t==null||typeof t=="string"&&t.trim()===""?NaN:Number(t);if(!(Number.isFinite(r)&&Date.now()>r))return n}const wa=365*24*60*60*1e3,Sa=1800*1e3;function Kr(e,t){const n=Wt();if(!n)return;const r=tt(n,"Shopify","customerPrivacy","cachedToken");if(t){const o=e==="_shopify_s"?Sa:wa;r[e]=t,r[e+"_expires_at"]=Date.now()+o}else delete r[e],delete r[e+"_expires_at"]}function ba(e,t){if(!e)return;const n=Aa(e);if(n.length)for(let r=0;r<n.length;r++){const o=n[r],i=o.getAttribute("href");if(!i)continue;const s=new URL(i,window.location.origin);s.searchParams.set("_cs",t);const a=mi(e)?s.toString():s.toString().replace(window.location.origin,"");o.setAttribute("href",a)}}function Aa(e){const t=new URL(e,window.location.origin),n=mi(e)?Gr(t):Gr(t).replace(window.location.origin,""),r=document.querySelectorAll(`a[href^="${n}"]`),o=document.querySelectorAll(`a[href*="${window.location.hostname}/customer_authentication"]`),i=new Set,s=[];for(let a=0;a<r.length;a++)i.has(r[a])||(i.add(r[a]),s.push(r[a]));for(let a=0;a<o.length;a++)i.has(o[a])||(i.add(o[a]),s.push(o[a]));return s}function Gr(e){return`${e.origin}${Ca(e.pathname)}`}function mi(e){return e.startsWith("http://")||e.startsWith("https://")}function Ca(e){return e.replace(/\/$/,"")}const Ta="Shopify-Storefront-Consent-Management";function $a(e){const t=e.granular_consent,n={visitorConsent:{marketing:t.marketing,analytics:t.analytics,preferences:t.preferences,saleOfData:t.sale_of_data,...t.metafields&&{metafields:t.metafields}},...t.email&&{visitorEmail:t.email},origReferrer:e.referrer,landingPage:e.landing_page};return{query:`query { consentManagement { cookies(${Nn(n)}) { trackingConsentCookie cookieDomain landingPageCookie origReferrerCookie shopifyUnique shopifyVisit } customerAccountUrl } }`,variables:{}}}function Pa(e){return e.granular_consent.checkoutRootDomain}function Ra(e){return e.granular_consent.headlessStorefront}function Na(e,t,n,r){const o=t.granular_consent;let i="",s={};if(o.customerAccountRequestInfo)i=o.customerAccountRequestInfo.url,s=o.customerAccountRequestInfo.headers;else{const c=ve(),l=o.storefrontAccessToken||c.storefrontAccessToken||ka();i=`${/^(localhost|127\.0\.0\.1)(:|$)/.test(e)?"http:":"https:"}//${e}/api/unstable/graphql.json`;const f=o.isExtensionToken?"Shopify-Storefront-Extension-Token":"x-shopify-storefront-access-token";s=l?{[f]:l}:{},n&&(s={...s,...n()})}const a={headers:{"content-type":"application/json",...ve().asyncConsent===!0&&new URL(i).origin===window.location.origin&&{[Ta]:"1"},...s,...Ee()?{"x-test-payload":JSON.stringify(t)}:{}},body:JSON.stringify($a(t)),method:"POST"};let u;try{u=fetch(i,a)}catch(c){u=Promise.reject(c)}return u.then(c=>{try{r?.(c)}catch{}if(c.ok)return c.json();{const l=new Error("Server error");throw l.cause={status:c.status},l}})}let xe;function Oa(e,t,n,r={}){const o=ve().consentDomain||Pa(t)||window.location.host,i=()=>Na(o,t,r.getVisitorTokenHeaders,r.onResponse).then(u=>{var c,l;const h=u==null||(c=u.data)===null||c===void 0?void 0:c.consentManagement;if(!h){var f;const m=((f=u?.errors)!==null&&f!==void 0?f:[]).map(g=>
1g?.message).filter(Boolean).join("; ");throw new Error(m?`GraphQL error: ${m}`:"GraphQL response missing consentManagement")}const d=h.cookies.cookieDomain,v=h.cookies.trackingConsentCookie,_=h.cookies.shopifyUnique,y=h.cookies.shopifyVisit,p=(l=h.customerAccountUrl)!==null&&l!==void 0?l:"";if(v&&Zs(v),Kr("_shopify_y",_),Kr("_shopify_s",y),Ra(t)&&!fi()){const g=t.granular_consent,E=d||g.checkoutRootDomain||window.location.hostname,S=g.storefrontRootDomain||d||window.location.hostname;Ur(On,E,31536e6,v),S!==E&&Ur(On,S,31536e6,v)}return r.emitEvents!==!1&&ia(t,{[$.PREFERENCES]:er(),[$.ANALYTICS]:Yt(),[$.MARKETING]:tr(),[$.SALE_OF_DATA]:nr()}),ba(p,v),n!==void 0&&n(null,u),u}).catch(u=>{var c;const l="Error while setting storefront API consent: "+u.message,h=(c=u.cause)===null||c===void 0?void 0:c.status,f={error:l};if(h!==void 0&&(f.statusCode=h),n!==void 0)n(f);else throw f});if(ve().asyncConsent!==!0)return i();const s=xe=xe?xe.then(i,i):i(),a=()=>{xe===s&&(xe=void 0)};return s.then(a,a),s}function ka(){try{const e=document.documentElement.querySelector("#shopify-features"),t="Could not find liquid access token";if(!e){ke.warn(t);return}const n=e.textContent;if(!n){ke.warn(t);return}let r;try{r=JSON.parse(n).accessToken}catch{ke.warn(t);return}if(!r){ke.warn(t);return}return r}catch{ke.warn("Could not find liquid access token");return}}const vi=[J.MARKETING,J.ANALYTICS,J.PREFERENCES,J.SALE_OF_DATA],xa=[...vi,J.EMAIL,re.ROOT_DOMAIN,re.CHECKOUT_ROOT_DOMAIN,re.STOREFRONT_ROOT_DOMAIN,re.STOREFRONT_ACCESS_TOKEN,re.HEADLESS_STOREFRONT,re.IS_EXTENSION_TOKEN,re.METAFIELDS,re.CUSTOMER_ACCOUNT_REQUEST_INFO],qr=vi.map(e=>`"${e}"`).join(", "),yt="https://shopify.dev/docs/api/customer-privacy";function Ma(e){if(typeof e!="boolean"&&typeof e!="object")throw new Ae(`setTrackingConsent received an invalid argument of type "${typeof e}". Expected an object with consent keys. Example: setTrackingConsent({ analytics: true, marketing: false }). See ${yt} for documentation.`);if(typeof e=="object"){const t=Object.keys(e);if(t.length===0)throw new Ae(`The submitted consent object is empty. Expected at least one consent key: ${qr}. Example: setTrackingConsent({ analytics: true, marketing: false }). See ${yt} for documentation.`);for(const n of t)if(!xa.includes(n))throw new Ae(`The submitted consent object contains an invalid key: "${n}". Valid keys are: ${qr}. Example: setTrackingConsent({ analytics: true, marketing: false }). See ${yt} for documentation.`)}}function Kf(e,t){if(K())throw new Error("setTrackingConsent is not supported in Node.js environments. This function requires browser APIs (XHR, cookies, window) and can only be called client-side.");const n=new Vt;if(Yt()&&n.produce("setTrackingConsent",ma),Ma(e),t!==void 0&&typeof t!="function")throw new Ae(`setTrackingConsent received an invalid callback of type "${typeof t}". The second argument must be a function if provided. Example: setTrackingConsent({ analytics: true }, (error, result) => { ... }). See ${yt} for documentation.`);const r=Ia(e.analytics),o=La(e.analytics);return Oa(ja,{granular_consent:e,...r!==null&&{referrer:r},...o!==null&&{landing_page:o}},t)}function Ia(e){if(!e)return null;try{return yi()?document.referrer:""}catch{return""}}function La(e){if(!e)return null;if(!yi())return"/";try{return window.location.pathname+window.location.search}catch{return"/"}}function Gf(){return pa()}function yi(){try{if(document.referrer==="")return!0;const e=document.createElement("a");return e.href=document.referrer,window.location.hostname!=e.hostname}catch{return!0}}function Da(){return Yt()}function Ua(){return er()}function Fa(){return tr()}function Ha(){return nr()}function qf(){return _a()}function ja(){const e={},t=ca();for(const n of Object.keys(t))e[ha(n)]=da(t[n]);return e}function Ba(){return Fa()}function Ka(){return Da()}function Ga(){return Ua()}function qa(){return Ha()}const Wa="query { consentManagement { cookies(visitorConsent:{}) { cookieDomain } } }",Va="unstable",za="X-Shopify-UniqueToken",Ya="X-Shopify-VisitToken",gi=.01;function Xa(e){return Math.random()<e}function Qa(){const e=ve().consentDomain||window.location.host;return{protocol:/^(localhost|127\.0\.0\.1)(:|$)/.test(e)?"http:":"https:",host:e}}function Ja(e,t,n){new Vt().produce("persistOutcome",JSON.stringify({ok:e,status:t,graphqlErrors:n,sampleRate:gi}))}async function Wr(e){try{var t;if(!Xa(gi))return;let n=null;if(e)try{const r=await e.json();n=Array.isArray(r?.errors)&&r.errors.length>0}catch{}Ja(!!(e!=null&&e.ok),(t=e?.status)!==null&&t!==void 0?t:null,n)}catch{}}function Wf(e,t){if(!K())try{const n=Br(e),r=Br(t);if(!n&&!r)return;const o=new URLSearchParams,i={"content-type":"application/json"};n&&(o.set("_y",n),i[za]=n),r&&(o.set("_s",r),i[Ya]=r);const{protocol:s,host:a}=Qa(),u=`${s}//${a}/api/${Va}/graphql.json?${o.toString()}`;let c;try{c=fetch(u,{headers:i,body:JSON.stringify({query:Wa,variables:{}}),method:"POST",mode:"cors",credentials:"include"})}catch(l){c=Promise.reject(l)}c.then(l=>Wr(l),()=>Wr(void 0))}catch{}}const rr="uc",Za=["ac","ah","ba","bin","c","cn","co","do","e","md","o","pc","sh","sim",rr],Ei="(?<language>[a-z]{2,3}|zh-hans|zh-hant)(?:-(?<region>[a-zA-Z0-9]+))?",ec=new RegExp(`^${Ei}$`),tc=`/(?<sourceId>[a-zA-Z0-9=\\-_]+)(?:/(?<locale>${Ei}))?(?:/(?<route>[^/]+))?`;function wi(e){return`(?<sourceType>${e.join("|")})${tc}`}const Si=wi(Za.filter(e=>e!==rr)),nc=wi([rr]),rc=new RegExp(`^/checkouts/${Si}/?$`),oc=new RegExp(`^/checkout/(?<shopId>[0-9]+)/${Si}/?$`),ic=new RegExp(`^/checkouts/${nc}/?$`),sc=new RegExp("^/checkout/(?<shopId>[0-9]+)/(?<sourceType>spe)(?:/(?<sourceId>[a-zA-Z0-9=\\-_]+)?)?(?:/(?<route>[^/]+)?)?/?$");function Vf(e,t){const n=ac(e.pathname,t);if(!n)return;
vendor: 7,133 bytes, line 1
1const{shopId:r,sourceType:o,sourceId:i,route:s,locale:a}=n.groups??{};let u;o==="o"&&!cc(i)&&(u=`gid://shopify/Order/${i}`);const c={type:o,id:u??i},l=r?{id:r}:void 0,h=e.searchParams.get("locale")??void 0;let f;return Vr(h)?f=h:Vr(a)&&(f=a),{shop:l,source:c,route:`/${s??""}`,locale:f,shopPaySimulated:c.type==="sim"&&e.searchParams.has("shop_pay_sim")}}function ac(e,{isShopPayActive:t,isShopPayExternal:n}){return t?n?e.match(sc):e.match(oc)??e.match(ic):e.match(rc)}function Vr(e){return e?ec.test(e):!1}function cc(e){return e?/^[a-f0-9]{32}$/i.test(e):!1}function bi(e,t){for(var n in t)e[n]=t[n];return e}function kn(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function Ai(e,t){var n=t(),r=ze({t:{__:n,u:t}}),o=r[0].t,i=r[1];return Kt(function(){o.__=n,o.u=t,an(o)&&i({t:o})},[e,n,t]),X(function(){return an(o)&&i({t:o}),e(function(){an(o)&&i({t:o})})},[e]),n}function an(e){try{return!((t=e.__)===(n=e.u())&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return!0}var t,n}function zr(e,t){this.props=e,this.context=t}function or(e,t){function n(o){var i=this.props.ref;return i!=o.ref&&i&&(typeof i=="function"?i(null):i.current=null),t?!t(this.props,o)||i!=o.ref:kn(this.props,o)}function r(o){return this.shouldComponentUpdate=n,te(e,o)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.__f=r.prototype.isReactComponent=!0,r.type=e,r}(zr.prototype=new B).isPureReactComponent=!0,zr.prototype.shouldComponentUpdate=function(e,t){return kn(this.props,e)||kn(this.state,t)};var Yr=b.__b;b.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Yr&&Yr(e)};var uc=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function zf(e){function t(n){var r=bi({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=uc,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Xr=function(e,t){return e==null?null:Z(Z(e).map(t))},Yf={map:Xr,forEach:Xr,count:function(e){return e?Z(e).length:0},only:function(e){var t=Z(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Z},lc=b.__e;b.__e=function(e,t,n,r){if(e.then){for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k||[]),o.__c(e,t)}lc(e,t,n,r)};var Qr=b.unmount;function Ci(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=bi({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return Ci(r,t,n)})),e}function Ti(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Ti(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function Ce(){this.__u=0,this.o=null,this.__b=null}function $i(e){var t=e.__&&e.__.__c;return t&&t.__a&&t.__a(e)}function ct(){this.i=null,this.l=null}b.unmount=function(e){var t=e.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Qr&&Qr(e)},(Ce.prototype=new B).__c=function(e,t){var n=t.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var o=$i(r.__v),i=!1,s=function(){i||r.__z||(i=!0,n.__R=null,o?o(u):u())};n.__R=s;var a=n.__P;n.__P=null;var u=function(){if(!--r.__u){if(r.state.__a){var c=r.state.__a;r.__v.__k[0]=Ti(c,c.__c.__P,c.__c.__O)}var l;for(r.setState({__a:r.__b=null});l=r.o.pop();)l.__P=a,l.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},Ce.prototype.componentWillUnmount=function(){this.o=[]},Ce.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Ci(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&te(L,null,e.fallback);return o&&(o.__u&=-33),[te(L,null,t.__a?null:e.children),o]};var Jr=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};function fc(e){return this.getChildContext=function(){return e.context},e.children}function dc(e){var t=this,n=e.h;if(t.componentWillUnmount=function(){Tt(null,t.v),t.v=null,t.h=null},t.h&&t.h!==n&&t.componentWillUnmount(),!t.v){for(var r=t.__v;r!==null&&!r.__m&&r.__!==null;)r=r.__;t.h=n,t.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:r.__m},contains:function(){return!0},namespaceURI:n.namespaceURI,insertBefore:function(o,i){this.childNodes.push(o),t.h.insertBefore(o,i)},removeChild:function(o){this.childNodes.splice(this.childNodes.indexOf(o)>>>1,1),t.h.removeChild(o)}}}Tt(te(fc,{context:t.context},e.__v),t.v)}function hc(e,t){var n=te(dc,{__v:e,h:t});return n.containerInfo=t,n}(ct.prototype=new B).__a=function(e){var t=this,n=$i(t.__v),r=t.l.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),Jr(t,e,r)):o()};n?n(i):i()}},ct.prototype.render=function(e){this.i=null,this.l=new Map;var t=Z(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},ct.prototype.componentDidUpdate=ct.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){Jr(e,n,t)})};var Pi=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,pc=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,_c=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,mc=/[A-Z0-9]/g,vc=typeof document<"u",yc=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};B.prototype.isReactComponent=!0,["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(B.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Zr=b.event;b.event=function(e){return Zr&&(e=Zr(e)),e.persist=function(){},e.isPropagationStopped=function(){return this.cancelBubble},e.isDefaultPrevented=function(){return this.defaultPrevented},e.nativeEvent=e};var gc={configurable:!0,get:function(){return this.class}},eo=b.vnode;b.vnode=function(e){typeof e.type=="string"&&(function(t){var n=t.props,r=t.type,o={},i=r.indexOf("-")==-1;for(var s in n){var a=n[s];if(!(s==="value"&&"defaultValue"in n&&a==null||vc&&s==="children"&&r==="noscript"||s==="class"||s==="className")){var u=s.toLowerCase();s==="defaultValue"&&"value"in n&&n.value==null?s="value":s==="download"&&a===!0?a="":u==="translate"&&a==="no"?a=!1:u[0]==="o"&&u[1]==="n"?u==="ondoubleclick"?s="ondblclick":u!=="onchange"||r!=="input"&&r!=="textarea"||yc(n.type)?u==="onfocus"?s="onfocusin":u==="onblur"?s="onfocusout":_c.test(s)&&(s=u):u=s="oninput":i&&pc.test(s)?s=s.replace(mc,"-$&").toLowerCase():a===null&&(a=void 0),u==="oninput"&&o[s=u]&&(s="oninputCapture"),o[s]=a}}r=="select"&&(o.multiple&&Array.isArray(o.value)&&(o.value=Z(n.children).forEac
1h(function(c){c.props.selected=o.value.indexOf(c.props.value)!=-1})),o.defaultValue!=null&&(o.value=Z(n.children).forEach(function(c){c.props.selected=o.multiple?o.defaultValue.indexOf(c.props.value)!=-1:o.defaultValue==c.props.value}))),n.class&&!n.className?(o.class=n.class,Object.defineProperty(o,"className",gc)):n.className&&(o.class=o.className=n.className),t.props=o})(e),e.$$typeof=Pi,eo&&eo(e)};var to=b.__r;b.__r=function(e){to&&to(e),e.__c};var no=b.diffed;b.diffed=function(e){no&&no(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value)};function Xt(e){return!!e&&e.$$typeof===Pi}function Ec(e){return Xt(e)?Cs.apply(null,arguments):e}function Xf(e){return!!e.__k&&(Tt(null,e),!0)}var wc=0;function A(e,t,n,r,o,i){t||(t={});var s,a,u=t;if("ref"in u)for(a in u={},t)a=="ref"?s=t[a]:u[a]=t[a];var c={type:e,props:u,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--wc,__i:-1,__u:0,__source:o,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(a in s)u[a]===void 0&&(u[a]=s[a]);return b.vnode&&b.vnode(c),c}class Ri extends Error{constructor(){super(...arguments),this.name="TypescriptAssertionError"}}function Qf(e){throw new Ri(`Received unexpected value ${JSON.stringify(e)} in an exhaustive switch/conditional block`)}function Jf(e){throw new Ri(`Received unexpected value ${JSON.stringify(e)} in an exhaustive switch/conditional block`)}const Zf=()=>e=>e;function ut({id:e},t){return`${e}${JSON.stringify(t?Sc(t):{})}`}function Sc(e){const t={};for(const n of Object.keys(e).sort((r,o)=>r.localeCompare(o)))t[n]=e[n];return t}function bc(e){var t=e.match(/^var\((.*)\)$/);return t?t[1]:e}function ed(e,t){var n={};{var r=e;for(var o in r){var i=r[o];i!=null&&(n[bc(o)]=i)}}return Object.defineProperty(n,"toString",{value:function(){return Object.keys(this).map(a=>"".concat(a,":").concat(this[a])).join(";")},writable:!1}),n}const Ni=10,ir=2;function Oi(e,t=ir){return Math.min(t**e,60)*1e3+Ac()}function*ro(e=ir,t=Ni){for(let n=1;n<=t;n++)yield Oi(n,e)}function Ac(){return Math.floor(Math.random()*100)}function td({initialDelay:e=ir,maxAttempts:t=Ni}={}){return U(()=>{let n=ro(e,t);return{next:()=>n.next(),reset:()=>{n=ro(e,t)}}},[e,t])}class Cc extends Error{constructor(){super(...arguments),this.name="RetryError"}}async function nd(e,{shouldRetry:t=Tc,maxAttempts:n=3,initialRetryDelay:r}={}){let o;for(let i=1;i<=n;i++){i>1&&await $c(Oi(i-1,r));try{return await e()}catch(s){if(o=s,!t(s))break;console.warn(`Failed to execute action on attempt ${i} of ${n}.`)}}throw o instanceof Error?o:new Cc("Failed to execute action after retrying.",{cause:o})}function Tc(e){return e!=null}function $c(e){return new Promise(t=>setTimeout(t,Math.max(e,0)))}var sr=function(e){return typeof e.children=="function"?e.children(e.v,e.i?e.i.value:void 0):e.children};sr.displayName="Item";function Pc(e){var t=typeof e.when=="function"?e.when():e.when.value;if(!t){var n=e.fallback;return typeof n=="function"?n():n||null}return te(sr,{v:t,children:e.children})}Pc.displayName="Show";function Rc(e){var t=U(function(){return new Map},[]),n=typeof e.each=="function"?e.each():e.each,r=n instanceof k?n.value:n;if(!r.length)return e.fallback||null;var o=new Set(t.keys()),i=r.map(function(s,a){o.delete(s);var u=t.get(s);if(u)u.i.peek()!==a&&(u.i.value=a);else{var c=ie(a),l=e.getKey?e.getKey(s,a):a;u={vnode:te(sr,{key:l,v:s,i:c,children:e.children}),i:c},t.set(s,u)}return u.vnode});return o.forEach(function(s){t.delete(s)}),te(L,null,i)}Rc.displayName="For";function rd(e){var t=Zn(e);return t.name="useLiveSignal",t.peek()!==e&&(t.value=e),t}function od(e){var t=Zn(e);return"current"in t||Object.defineProperty(t,"current",Nc),t}var Nc={configurable:!0,get:function(){return this.value},set:function(e){this.value=e}};function id({url:e,method:t="POST",credentials:n,headers:r,source:o,explicitSearchParams:i={},onResult:s,onError:a,fetch:u=globalThis.fetch}){return async c=>{const l=performance.now(),h=new Headers(typeof r=="function"?r(c):r);if(c.additionalHeaders)for(const[m,g]of Object.entries(c.additionalHeaders))h.set(m,g);const f=typeof t=="function"?t(c):t,d=(typeof o=="function"?o(c):o)??f!=="GET";h.has("Content-Type")||h.set("Content-Type","application/json"),h.has("Accept")||h.set("Accept","application/json"),h.set("Shopify-Checkout-Client","checkout-web/1.0");const v={method:f,headers:h,credentials:n,redirect:"manual"},_=new URL(typeof e=="function"?e(c):e);if(c.query.name&&_.searchParams.set("operationName",c.query.name),i&&Object.entries(i).forEac
1h(([m,g])=>{_.searchParams.set(m,g)}),f==="GET")c.variables&&JSON.stringify(c.variables)!=="{}"&&_.searchParams.set("variables",JSON.stringify(c.variables)),d?_.searchParams.set("query",c.query.source):_.searchParams.set("id",c.query.id),_.search.includes(";")&&(_.search=_.search.replace(/;/g,"%3B"));else{const m={variables:c.variables,operationName:c.query.name};d?m.query=c.query.source:m.id=c.query.id,v.body=JSON.stringify(m)}const y=new Request(_,v),p=await u(y).catch(m=>m);try{if(p instanceof Error)throw new kc(p);if(!p.ok)throw p.status===400?new xc(p,c.query.name):new xn(p,c.query.name);const m=p.headers.get("Content-Type")??"missing";if(!m.includes("application/json"))throw new io(p,m,(await p.text()).substring(0,200),c.query.name);let g;try{g=await p.json()}catch(O){throw new Mc(p,_.toString(),c.query.name,O)}const{data:E,errors:S}=g;let w;S!=null&&S.length>0?w={data:void 0,error:new oo(S)}:E==null?w={data:void 0,error:new oo([{name:"NoDataError",message:"No data returned by GraphQL"}],"GraphQLExecutionError::NoDataReturned")}:w={data:E,error:void 0};const T=performance.now();return s?.({...c,request:y,response:p,result:w,start:l,end:T,duration:T-l}),w}catch(m){const g=performance.now(),E=m instanceof xn||m instanceof io?m.response:void 0;throw a?.({...c,request:y,response:E,error:m,start:l,end:g,duration:g-l}),m}}}class oo extends Error{constructor(t,n){const r=JSON.stringify(t.map(({message:o})=>o),null,2);super(`GraphQL execution failed with errors: ${r}`),this.errors=t,this.name="GraphQLExecutionError",this.groupingHash=n??Ic(r)}}const Oc="GraphQL fetch failed with network failure:";class kc extends Error{constructor(t){super(`${Oc} ${t.message}`),this.error=t,this.name="GraphQLFetchNetworkError"}}class ar extends Error{constructor(t){super(t),this.message=t,this.name="GraphQLFetchHttpBaseError"}getGroupingHash(t){const n=t??"UNKNOWN NAME";return[this.name,n].join(":")}}class xn extends ar{constructor(t,n){super(`GraphQL query [${n??"UNKNOWN NAME"}] fetch failed with status: ${t.status}`),this.response=t,this.queryName=n,this.name="GraphQLFetchHttpStatusError",this.groupingHash=this.getGroupingHash(n)}}class xc extends xn{constructor(t,n){super(t,n),this.response=t,this.queryName=n,this.name="GraphQLFetchHttpBadRequestError",this.groupingHash=this.getGroupingHash(n)}}class io extends ar{constructor(t,n,r,o){super(`GraphQL UnsupportedContentType ${n}: ${r}`),this.response=t,this.contentType=n,this.contentPreview=r,this.queryName=o,this.name="GraphQLFetchHttpContentTypeError",this.groupingHash=this.getGroupingHash(o)}}class Mc extends ar{constructor(t,n,r,o){const i=o?` (${o.constructor.name}: ${o.message})`:"";super(`GraphQL JSON parse error for query [${r??"UNKNOWN NAME"}]: status ${t.status}, url ${n}${i}`),this.response=t,this.requestUrl=n,this.queryName=r,this.name="GraphQLFetchJsonParseError",this.groupingHash=this.getGroupingHash(r)}}function Ic(e){return[{pattern:/syntax error/i,hash:"graphql_parsing_error"},{pattern:/No operation named/i,hash:"graphql_missing_operation_error"},{pattern:/Variable.*geolocation\.countryCode/i,hash:"invalid_country_code_error"},{pattern:/Variable.*coordinates\.(latitude|longitude)/i,hash:"invalid_coordinates_error"},{pattern:/Variable.*was provided invalid value/i,hash:"invalid_variable_error"},{pattern:/Cannot target merchandise with stableId/i,hash:"merchandise_stable_id_error"},{pattern:/Cannot return null for non-nullable field CreditCard/i,hash:"credit_card_field_error"},{pattern:/doesn't exist on type/i,hash:"graphql_undefined_field_error"},{pattern:/isn't a defined input type/i,hash:"graphql_undefined_input_type_error"},{pattern:/could not be composed from extendedFields/i,hash:"address_composition_error"},{pattern:/Invalid query string parameter/i,hash:"invalid_query_string_parameter_error"},{pattern:/Cannot return null for non-nullable field/i,hash:"graphql_non_nullable_field_error"}].find(({pattern:r})=>r.test(e))?.hash??"generic_graphql_execution_error"}class Lc extends Error{constructor(){super(...arguments),this.name="CheckoutGraphQLError"}}function ue(e){return typeof e=="function"?e():e}function so(e){return e?Object.keys(e).sort().map(t=>`${t}=${e[t]}`).join("&"):""}class sd{constructor(t,n=new Map,{timing:r}={}){this.cache=n,this.timings=[],this.inflight=new Map,this.cacheWriteSequence=new Map,this.fetch=r?Dc(t,r.clientName,o=>this.timings.push(o)):t}read(t,n){return this.cache.get(typeof t=="string"?t:ut(t))}extract(){return Object.fromEntries(this.cache.entries())}mutate(t,{variables:n}={}){return this.run(t,{variables:n})}staticQuery(t,n={}){return this.internalQuery(t,n)}get reactiveEffectsEnabled(){return!0}query(t,n={}){const r=ie(void 0),o=ie(!1),i=ie(void 0),s=ie(!1);let a=0,u=Promise.resolve({}),c,l;const h=n.cache??!0,f=()=>{const p=(a??0)+1;return a=p,p},d=(p,m)=>{m===a&&(p.error?(i.value=p.error,r.value=void 0):(i.value=void 0,r.value=p.data),o.value=!1)},v=p=>{if(a===null)return Promise.resolve({});const m=f();l=so(p.additionalHeaders);const g=(n.getCacheKey??ut)(t,p.variables),E=!p.forceNetwork&&(p.cache??h)&&!this.inflight.has(g)&&this.cache.has(g),S=this.internalQuery(t,{variables:p.variables,cache:p.cache??h,getCacheKey:n.getCacheKey,additionalHeaders:p.additionalHeaders,forceNetwork:p.forceNetwork});return s.value=E,S instanceof Promise?(o.value=!0,S.then(w=>
1(d(w,m),w))):(d(S,m),Promise.resolve(S))};if(this.reactiveEffectsEnabled)c=se(()=>{if(ue(n.skip)??!1){f(),o.value=!1;return}const m=ue(n.variables),g=ue(n.additionalHeaders),E=so(g);u=v({variables:m,cache:h,additionalHeaders:g,forceNetwork:l!==void 0&&E!==l})});else if(!(ue(n.skip)??!1)){const p=(n.getCacheKey??ut)(t,ue(n.variables)),m=h?this.read(p):void 0;m==null?o.value=!0:(r.value=m,s.value=!0,u=Promise.resolve({data:m}))}const _=()=>{a!==null&&(a=null,c?.())};se(()=>()=>_());const y={data:r,loading:o,error:i,isFromCache:s,refetch(p){return u=v({variables:p?.variables??ue(n.variables),cache:!1,additionalHeaders:ue(n.additionalHeaders),forceNetwork:!p?.deduplicate}),y},[Symbol.dispose]:_,then(p,m){return u.then(p,m)}};return y}internalQuery(t,{cache:n=!0,variables:r,getCacheKey:o,skip:i=!1,additionalHeaders:s,forceNetwork:a=!1}={}){const c=(o??ut)(t,r);if(i)return{data:this.cache.get(c)};if(!a){if(this.inflight.has(c))return this.inflight.get(c);if(n&&this.cache.has(c))return{data:this.cache.get(c)}}const l=(this.cacheWriteSequence.get(c)??0)+1;this.cacheWriteSequence.set(c,l);const h=(async()=>{try{const f=await this.run(t,{variables:r},s);return!f.error&&this.cacheWriteSequence.get(c)===l&&this.cache.set(c,f.data),f}finally{this.cacheWriteSequence.get(c)===l&&this.inflight.delete(c)}})();return this.inflight.set(c,h),h}async run(t,{variables:n}={},r){try{const o=await this.fetch({query:t,variables:n??{},...r&&{additionalHeaders:r}}),{data:i,error:s}=o;return i?{data:i}:{error:s}}catch(o){return{error:o instanceof Error?o:new Lc}}}}function Dc(e,t,n){return async r=>{const o=performance.now();try{return await e(r)}finally{n({clientName:t,operationName:r.query.name??r.query.id,startedAt:o,duration:Math.max(0,performance.now()-o)})}}}const Uc=50;function Fc(e,t){const n=new WeakMap,r=new Map,o=[];return function(...s){if(typeof window>"u")return e.apply(this,s);const a=s.length===1&&typeof s[0]=="object"&&!t;let u;a?u=s[0]:t&&t instanceof Function?u=t(...s):u=s[0];const c=a?n:r;if(c.has(u))return c.get(u);const l=e.apply(this,s);if(a)n.set(u,l);else if(r.set(u,l),o.push(u),r.size>Uc){const h=o[0];r.delete(h),o.shift()}return l}}const ao={"America/Indiana":"America/Indiana/Indianapolis","America/Argentina":"America/Argentina/Buenos_Aires","Asia/Chongqing":"Asia/Shanghai","Asia/Istanbul":"Europe/Istanbul","Australia/ACT":"Australia/Sydney","Australia/LHI":"Australia/Lord_Howe","Australia/North":"Australia/Darwin","Australia/NSW":"Australia/Sydney","Australia/Queensland":"Australia/Brisbane","Australia/South":"Australia/Adelaide","Australia/Tasmania":"Australia/Hobart","Australia/Victoria":"Australia/Melbourne","Australia/West":"Australia/Perth","Brazil/Acre":"America/Rio_Branco","Brazil/DeNoronha":"America/Noronha","Brazil/East":"America/Sao_Paulo","Brazil/West":"America/Manaus","Canada/Atlantic":"America/Halifax","Canada/Central":"America/Winnipeg","Canada/Eastern":"America/Toronto","Canada/Mountain":"America/Edmonton","Canada/Newfoundland":"America/St_Johns","Canada/Pacific":"America/Vancouver","Canada/Saskatchewan":"America/Regina","Canada/Yukon":"America/Whitehorse","Chile/Continental":"America/Santiago","Chile/EasterIsland":"Pacific/Easter",Cuba:"America/Havana",Egypt:"Africa/Cairo",Eire:"Europe/Dublin","Europe/Kyiv"
1:"Europe/Kiev","Etc/Greenwich":"Etc/GMT","Etc/UCT":"UTC","Etc/Universal":"UTC","Etc/Zulu":"UTC",GB:"Europe/London","GB-Eire":"Europe/London","GMT+0":"Etc/GMT",GMT0:"Etc/GMT","GMT−0":"Etc/GMT",Greenwich:"Etc/GMT",Hongkong:"Asia/Hong_Kong",Iceland:"Atlantic/Reykjavik",Iran:"Asia/Tehran",Israel:"Asia/Jerusalem",Jamaica:"America/Jamaica",Japan:"Asia/Tokyo",Kwajalein:"Pacific/Kwajalein",Libya:"Africa/Tripoli","Mexico/BajaNorte":"America/Tijuana","Mexico/BajaSur":"America/Mazatlan","Mexico/General":"America/Mexico_City",Navajo:"America/Denver",NZ:"Pacific/Auckland","NZ-CHAT":"Pacific/Chatham",Poland:"Europe/Warsaw",Portugal:"Europe/Lisbon",PRC:"Asia/Shanghai",ROC:"Asia/Taipei",ROK:"Asia/Seoul",Singapore:"Asia/Singapore",Turkey:"Europe/Istanbul",UCT:"UTC",Universal:"UTC","US/Alaska":"America/Anchorage","US/Aleutian":"America/Adak","US/Arizona":"America/Phoenix","US/Central":"America/Chicago","US/Eastern":"America/New_York","US/East-Indiana":"America/Indiana/Indianapolis","US/Hawaii":"Pacific/Honolulu","US/Indiana-Starke":"America/Indiana/Knox","US/Michigan":"America/Detroit","US/Mountain":"America/Denver","US/Pacific":"America/Los_Angeles","US/Pacific-New":"America/Los_Angeles","US/Samoa":"Pacific/Pago_Pago","W-SU":"Europe/Moscow",Zulu:"UTC"};function Hc(e){return Object.keys(ao).some(t=>t===e)?ao[e]:e}const cn=new Map;function co(e,t){const n=t!=null&&t.timeZone?Hc(t.timeZone):void 0,r=Bc(e,{...t,timeZone:n});if(cn.has(r))return cn.get(r);const o=new Intl.DateTimeFormat(e,{...t,timeZone:n});return cn.set(r,o),o}const uo=Intl.DateTimeFormat("en",{hour:"numeric"}),lo=typeof uo.resolvedOptions>"u"?void 0:uo.resolvedOptions();function jc(e,t,n={}){if(lo!=null&&n.hour12===!1&&lo.hourCycle!=null&&(n.hour12=void 0,n.hourCycle="h23"),n.timeZone!=null&&n.timeZone==="Etc/GMT+12"){const o=new Date(e.valueOf()-432e5);return co(t,{...n,timeZone:"UTC"}
1).format(o)}return co(t,n).format(e)}function Bc(e,t={}){return`${Array.isArray(e)?e.sort().join("-"):e}-${JSON.stringify(t)}`}const Kc=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function Gc(e){const t=e.split("-")[0].toLowerCase();return t&&Kc.has(t)?"rtl":"ltr"}const qc=/[\p{Script=Adlam}\p{Script=Arabic}\p{Script=Hebrew}\p{Script=Mandaic}\p{Script=Nko}\p{Script=Samaritan}\p{Script=Syriac}\p{Script=Thaana}]/u;function ad(e){return qc.test(e)}const Wc=2;function Vc(e){return zc.get(e)??Wc}const zc=new Map([["BHD",3],["BIF",0],["BYR",0],["CLF",4],["CLP",0],["DJF",0],["GNF",0],["HUF",2],["IQD",3],["ISK",0],["JOD",3],["JPY",0],["KMF",0],["KRW",0],["KWD",3],["LYD",3],["MGA",2],["MRO",5],["OMR",3],["PYG",0],["RWF",0],["TND",3],["UGX",0],["VND",0],["VUV",0],["XAF",0],["XAG",0],["XAU",0],["XBA",0],["XBB",0],["XBC",0],["XBD",0],["XDR",0],["XOF",0],["XPD",0],["XPF",0],["XPT",0],["XTS",0]]);function Yc(e,t,{form:n,...r}={}){switch(n){case"auto":return Xc(t,r,e);case"explicit":return xi(t,r,e);case"name":return Jc(t,r,e);case"plain":return Qc(t,r,e);default:return cr(t,r,e)}}function Xc(e,t={},n){return t.currency==null||n.currency==null||t.currency===n.currency?cr(e,t,n):xi(e,t,n)}function ki(e){return e.replace(/\s*[A-Z]{3}\s*/g,"")}function cr(e,t={},n){const r=n.locale.split("-")[0]==="he",o=e<0||Object.is(e,-0),i=t.currency||n.currency||"",s=eu(i,n),a=Ii(n,t),u=n.numberFormatter({style:"currency",maximumFractionDigits:a,minimumFractionDigits:a,currencyDisplay:"code",...t}).format(t.spacedMinusSign&&!r?Math.abs(e):e),c=ki(u),l=s.prefixed&&/^[A-Za-z]+$/.test(s.symbol)?" ":"",h=s.prefixed?`${s.symbol}${l}${c}`:`${c} ${s.symbol}`,f=t.spacedMinusSign?"− ":"-";return o&&r?h.replace("−","-").replace("-",f):o?`${f}${h.replace("-","").replace("−","")}`:h}function Qc(e,t={},n){const r=ur(n,t),o=n.numberFormatter({style:"currency",useGrouping:!1,maximumFractionDigits:r,minimumFractionDigits:r,currencyDisplay:"code",...t}).format(e);return ki(o)}function xi(e,t={},n){const r=cr(e,t,n),o=t.currency||n.currency||"";return Zc(o,r)?r:`${r} ${o}`}function Jc(e,t={},n){const r=t.currency||n.currency,o=Ii(n,t);return n.numberFormatter({maximumFractionDigits:o,minimumFractionDigits:o,...t,style:"currency",currency:r,currencyDisplay:"name"}).format(e)}const Mi={SRD:{symbol:"SRD",prefixed:!0,explicit:!0},TRY:{symbol:"TL",prefixed:!1,explicit:!0},CHF:{symbol:"CHF",explicit:!0},KGS:{symbol:"лв",prefixed:!0}};function Zc(e,t){return Mi[e]?.explicit===!0||t!=null&&t.includes(e)}function eu(e,t){const n=e||t.currency,r=Mi[n];if(r?.prefixed!==void 0)return{symbol:r.symbol,prefixed:r.prefixed};const o=n.substring(0,2),i=ur(t),s=t.numberFormatter({currency:n,style:"currency",currencyDisplay:"narrowSymbol",maximumFractionDigits:i,minimumFractionDigits:i}).format(0).replace(/[\u200E\u200F]/g,""),a=t.numberFormatter({currency:n,style:"currency",currencyDisplay:"code",maximumFractionDigits:i,minimumFractionDigits:i}).format(0).replace(/[\u200E\u200F]/g,"");if(r&&s!==a)return{symbol:r.symbol,prefixed:a.startsWith(n)};if(s===a){const h=a.replace(n,"").trim();return{symbol:a.replace(h,"").trimStart(),prefixed:a.startsWith(n)}}const u=a.replace(n,"").trim(),c=s.replace(u,"").trimStart(),l=s.startsWith(c);return{symbol:c.replace(o,""),prefixed:l}}function Ii(e,t={}){return(t.currency||e.currency||"").toUpperCase()==="IQD"&&t.precision===void 0&&t.minimumFractionDigits===void 0&&t.maximumFractionDigits===void 0?0:ur(e,t)}function ur(e,t={}){let n=t.precision;if(n===void 0){const r=t.currency||e.currency||"";n=Vc(r.toUpperCase())}return n}const Li=(e,t)=>e&&t?`${t}${e}`:"",un=(e,t,n)=>e?Li(n,t):n||"",tu=(e,t,n)=>e?Li(n,t):t?`${t}様`:"",nu=new Map([["ko",un],["ja",tu],["zh-CN",un],["zh-TW",un]]);function ru(e,t,n,r){const o=e.includes("-")&&e!=="zh-CN"&&e!=="zh-TW"?e.split("-")[0].toLowerCase():e,i=!!(r&&t&&n),s=nu.get(o);return s?s(i,n,t):i?`${t} ${n}`:t||""}const ou=new RegExp("^(?<language>[a-z]{2,3})(?:-(?<region>[a-zA-Z0-9]+))?$");class iu{constructor(t,n){this.language=t,this.region=n}toString(){return this.region?`${this.language}-${this.region}`:this.language}}function su(e){if(!e)return null;const t=e.match(ou);return t?new iu(t.groups?.language,t.groups?.region):null}const Di="latn",fo=`-u-nu-${Di}`;function ho(e){try{const t=new Intl.Locale(e);return new Intl.Locale(t.baseName,{numberingSystem:Di}).toString()}catch{return au(e)}}function au(e){return e.includes("-u-nu-")?e.replace(/-u-nu-[a-z0-9]+/i,fo):`${e}${fo}`}const Ot="count",Mn="scope",gt=".";function cd(e){const t=new Map;return Ui(e,(n,r)=>t.set(n,r)),t}function Ui(e,t,n){Object.keys(e).forEach(r=>{const o=e[r],i=n?`${n}.${r}`:r;
1o!=null&&(typeof o=="string"?t(i,o):Ui(o,t,i))})}function Fi(e,t,n){Object.keys(e).forEach(r=>{const o=e[r],i=n?`${n}.${r}`:r;o!=null&&(t(i,o),typeof o!="string"&&Fi(o,t,i))})}function cu(e){const t=new Map;return Fi(e,(n,r)=>t.set(n,r)),t}function uu(){return`${lt()}-${lt()}-${lt()}-${lt()}`}function lt(){return Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)}class nt extends Error{constructor(t,n){super(`The value for "${t}" was not a string. Found ${JSON.stringify(n)} instead.`),this.name="TranslationNotStringError"}}class Xe extends Error{constructor(t,n,r){super(`The key "${n}" is not a valid replacement for "${t}".`),this.rawTranslation=r,this.name="MissingReplacementError"}}const kt=/(%{([^}]*)})|({{([^}]*)}})/g,lu=/((?:%{([^}]*)}|{{([^}]*)}})[….,!?;:)'"’”]?)/g,fu=/(href="%{([^}]*)}")|(href="{{([^}]*)}}")/g,du={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Hi="data-replacement-index";function po(e){return String(e).replace(/[&<>"']/g,t=>du[t])}const hu=["…",".",",","!","?",";",":",")","'",'"',"’","”"];function pu(e,t,n,r){let o=t.endsWith("_html")?!0:void 0,i=!1;typeof r=="object"&&(o=r.dangerouslySetInnerHTML??o,i=r.noWrapElementReplacements??!1);try{if(typeof n=="object"&&Object.keys(n).length){const s=mu(e,t,n);return wu(e,s.translation,s.replacements,s.key,o,i)}else return o?Eu(e,t):_u(e,t)}catch(s){if(s instanceof Xe)return s.rawTranslation;if(s instanceof Error)return e.onError?.(s),`I18n Error: ${s.message}`}}function _u(e,t){const n=e.translations.get(t);if(n&&typeof n=="string")return n;throw new nt(t,n)}function mu(e,t,n){let r;return Tu(n)?r=yu(e,t,n):$u(n)?r=gu(e,t,n):r=vu(e,t,n),{translation:r.translation,replacements:r.replacements,key:r.key}}function vu(e,t,n){const r=e.translations.get(t);if(typeof r!="string")throw new nt(t,r);return{translation:r,key:t,replacements:n}}function yu(e,t,n){const r=n[Mn],o=t+gt+r,i=e.translations.get(o),s=typeof i=="string"?i:i?.[r];if(typeof s!="string")throw new nt(o,s);return{translation:s,key:o,replacements:n}}function gu(e,t,n){const r=n[Ot],o=e.pluralRules(e.locale).select(r),i=e.pluralRules(e.locale).resolvedOptions().pluralCategories,s=e.numberFormatter().format(r),a=t+gt+o;let u=e.translations.get(a);if(u||i.includes("other")&&e.translations.has(`${t}${gt}other`)&&(u=e.translations.get(`${t}${gt}other`)),typeof u!="string")throw new nt(a,u);return{translation:u,key:a,replacements:{...n,[Ot]:s}}}function Eu(e,t){const n=e.translations.get(t);if(typeof n!="string")throw new nt(t,n);return A(ji,{translation:n})}function wu(e,t,n,r,o,i){return o?A(Pu,{i18n:e,rawTranslation:t,replacements:n,translationKey:r,noWrapElementReplacements:i}):Cu(n)?Su(t,n,r):bu(t,n,r,i)}function Su(e,t,n){return e.replace(kt,r=>{let o;if(r.slice(0,1)==="%"?o=r.substring(2,r.length-1).trim():o=r.substring(2,r.length-2).trim(),o in t)return t[o];throw new Xe(n,o,e)})}function bu(e,t,n,r){const o=e.split(r?lu:kt).filter(s=>!!s),i={nextExtryIsReplacementKey:!1,matchIndex:0,splitTranslationWithReplacements:[],previousEntry:""};return o.reduce((s,a)=>{if(s.nextExtryIsReplacementKey){const u=a.trim();if(!(u in t))throw new Xe(n,u,e);const c=s.matchIndex+1,l=Au(t[u],s.previousEntry,c,r);return{nextExtryIsReplacementKey:!1,matchIndex:c,splitTranslationWithReplacements:[...s.splitTranslationWithReplacements,l],previousEntry:a}}return a.match(kt)?{...s,nextExtryIsReplacementKey:!0,previousEntry:a}:{...s,nextExtryIsReplacementKey:!1,splitTranslationWithReplacements:[...s.splitTranslationWithReplacements,a],previousEntry:a}},i).splitTranslationWithReplacements}function Au(e,t,n,r){const o=t.slice(-1),i=r&&hu.includes(o);if(!Xt(e))return i?`${e}${o}`:e;const s=Ec(e,{key:n});return i?A("span",{style:{whiteSpace:"nowrap"},children:[s,o]}):s}function Cu(e){return Object.values(e).every(t=>!Xt(t))}function Tu(e){return Mn in e&&typeof e[Mn]=="string"}function $u(e){return Ot in e&&typeof e[Ot]=="number"}function Pu({i18n:e,rawTranslation:t,replacements:n,translationKey:r,noWrapElementReplacements:o}){const i=[];let s=t;try{s=t.replace(fu,a=>{const u=a.startsWith('href="%')?a.substring(8,a.length-2).trim():a.substring(8,a.length-3).trim();if(u in n)return`href="${po(n[u])}"`;throw new Xe(r,u,t)}).replace(kt,a=>{const u=a.slice(0,1)==="%"?a.substring(2,a.length-1):a.substring(2,a.length-2).trim();if(u in n){if(!Xt(n[u]))return po(n[u]);i.push(n[u]);const c=o?' style="white-space: nowrap;"':"";return`<span ${Hi}="${i.length-1}"${c}></span>`}throw new Xe(r,u,t)})}catch(a){a instanceof Error&&e.onError?.(a)}return A(ji,{translation:s,portals:i})}function ji({translation:e,portals:t=[]}){const n=Y(null),[r,o]=ze([]);return Kt(()=>{const i=n.current;o(i?Array.from(i.querySelectorAll(`[${Hi}]`)):[])},[e]),A(L,{children:[A("span",{ref:n,dangerouslySetInnerHTML:{__html:e}}),t.map((i,s)=>{const a=r[s];return a?hc(i,a):null})]})}const Ru="USD",_o="en";class ud{constructor(t,n){this.pluralRules=Fc(Ou,(o,i={})=>`${o}${JSON.stringify(i)}`),this.numberFormats=new Map,this.translations=cu(n),this.locale=Nu(t.locale),this.localeDirection=t.direction??Gc(this.locale),this.currency=t.currency&&xu(t.currency)?t.currency:Ru;const r=t.fallbackTimeZone&&mo(t.fallbackTimeZone)?t.fallbackTimeZone:void 0;
1this.timeZone=mo(t.timeZone)?t.timeZone:r,this.onError=t.onError,this.uuid=t.uuid??uu,this.formattingLocale=ho(this.locale)}numberFormatter(t={}){const n=ku(this.formattingLocale,t);if(this.numberFormats.has(n))return this.numberFormats.get(n);let r;try{const c=new Intl.NumberFormat(this.formattingLocale,t);return this.numberFormats.set(n,c),c}catch(c){r=c}const{currencyDisplay:o,...i}=t,s=lr(this.locale),a=s?ho(s):void 0,u=[];o&&u.push({locale:this.formattingLocale,options:i}),a&&a!==this.formattingLocale&&(u.push({locale:a,options:t}),o&&u.push({locale:a,options:i}));for(const{locale:c,options:l}of u)try{const h=new Intl.NumberFormat(c,l);return this.numberFormats.set(n,h),h}catch(h){r=h;continue}throw r}formatCurrency(t,n){return Yc(this,t,n)}formatDate(t,n){return jc(t,this.formattingLocale,{timeZone:this.timeZone,...n})}formatName(t,n,r){return ru(this.locale,t,n,r)}translate(t,n,r){return pu(this,t,n,r)}}function Nu(e=_o){return su(e)?.toString()??lr(e)??_o}function lr(e){if(e)return e.match(/^([a-z]{2,3})(?:[-_].*)?$/i)?.[1]}function Ou(e,t={}){try{return new Intl.PluralRules(e,t)}catch(n){const r=lr(e);if(!r)throw n;return new Intl.PluralRules(r,t)}}function ku(e,t={}){return`${e}${JSON.stringify(t)}`}function mo(e){try{if(new Intl.DateTimeFormat(void 0,{timeZone:e}))return!0}catch{return!1}return!1}function xu(e){try{return new Intl.NumberFormat(void 0,{style:"currency",currency:e}).format(123),!0}catch{return!1}}function Mu(...e){const t={};return e.forEach(n=>{Object.keys(n).forEach(r=>{t[r]?typeof n[r]=="string"?t[r]=n[r]:t[r]=Mu(t[r],n[r]):t[r]=n[r]})}),t}function C(e,t){if(!{}.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var Iu=0;function Q(e){return"__private_"+Iu+++"_"+e}function Qt(e){return Object.entries(e).map(([t,n])=>({key:t,value:{stringValue:String(n)}}))}function Lu(e){return Object.entries(e).map(([t,n])=>({key:t,value:Bi(n)}))}function Bi(e){if(Array.isArray(e))return{arrayValue:{values:e.map(t=>Bi(t))}};switch(typeof e){case"boolean":return{boolValue:!!e};case"number":return{doubleValue:Number(e)};default:return{stringValue:String(e)}}}const fr=1,Du=Uu(5,2,12);function ln(e){return typeof e=="number"&&Number.isFinite(e)}function fn(e,t,n){const r=n===null?"null":typeof n;throw new Error(`[OpenTelemetry] Invalid ${e} "${t}": value must be a finite number, got ${r}`)}function Uu(e,t,n){const r=[0];for(let o=0;o<n;o++){const i=Math.floor(e*t**o);r.push(i)}return r}var le=Q("exporter"),j=Q("attributes"),M=Q("metrics"),fe=Q("logs");class ld{constructor({exporter:t,attributes:n}){Object.defineProperty(this,le,{writable:!0,value:void 0}),Object.defineProperty(this,j,{writable:!0,value:void 0}),Object.defineProperty(this,M,{writable:!0,value:[]}),Object.defineProperty(this,fe,{writable:!0,value:[]}),C(this,le)[le]=t,C(this,j)[j]=n??{}}addAttributes(t){C(this,j)[j]={...C(this,j)[j],...t}}histogram({name:t,value:n,unit:r,description:o,bounds:i,attributes:s,scale:a,requiresKeepalive:u}){ln(n)||fn("histogram",t,n);const c=Date.now()*1e6;i?C(this,M)[M].push({name:t,type:"histogram",value:n,unit:r,description:o,timeUnixNano:c,attributes:s,bounds:i,requiresKeepalive:u}):C(this,M)[M].push({name:t,type:"exponential_histogram",value:n,unit:r,description:o,timeUnixNano:c,attributes:s,scale:a,requiresKeepalive:u})}counter({name:t,value:n,unit:r,description:o,attributes:i,requiresKeepalive:s}){ln(n)||fn("counter",t,n);const a=Date.now()*1e6;C(this,M)[M].push({name:t,type:"counter",value:n,unit:r,description:o,timeUnixNano:a,attributes:i,requiresKeepalive:s})}gauge({name:t,value:n,unit:r,description:o,attributes:i,requiresKeepalive:s}){ln(n)||fn("gauge",t,n);const a=Date.now()*1e6;C(this,M)[M].push({name:t,type:"gauge",value:n,unit:r,description:o,timeUnixNano:a,attributes:i,requiresKeepalive:s})}log({body:t,attributes:n,requiresKeepalive:r}){const o=Date.now()*1e6;C(this,fe)[fe].push({timeUnixNano:o,body:t,attributes:n,requiresKeepalive:r})}async exportMetrics(){C(this,M)[M].forEach(n=>{n.attributes={...C(this,j)[j],...n.attributes}});const t=C(this,M)[M];C(this,M)[M]=[],await this.exportByKeepalive(t,(n,r)=>C(this,le)[le].exportMetrics(this.aggregateMetrics(n),r))}async exportLogs(){const t=C(this,fe)[fe];C(this,fe)[fe]=[],await this.exportByKeepalive(t,(n,r)=>C(this,le)[le].exportLogs(this.formatLogs(n),r))}aggregateMetrics(t){const n={};return t.forEach(r=>{switch(r.type){case"histogram":Fu(n,r);break;case"exponential_histogram":Hu(n,r);break;case"counter":ju(n,r);break;case"gauge":Bu(n,r);break}}),Object.values(n)}async exportByKeepalive(t,n){if(t.length===0)return;const r=[],o=[];t.forEach(s=>{var a;
1((a=s.requiresKeepalive)!==null&&a!==void 0?a:!0)?r.push(s):o.push(s)});const i=[r.length>0?n(r,{keepalive:!0}):void 0,o.length>0?n(o,{keepalive:!1}):void 0].filter(s=>s!==void 0);await Promise.all(i)}formatLogs(t){return t.map(n=>{const r={timeUnixNano:n.timeUnixNano,observedTimeUnixNano:n.timeUnixNano,attributes:Lu({...C(this,j)[j],...n.attributes})};return n.body&&(r.body={stringValue:n.body}),r})}}function Fu(e,t){var n;const{name:r,value:o,unit:i,description:s,timeUnixNano:a,attributes:u}=t,c=(n=t.bounds)!==null&&n!==void 0?n:Du,l=new Array(c.length+1).fill(0);e[r]||={name:r,unit:i||"1",description:s,histogram:{aggregationTemporality:fr,dataPoints:[]}};for(let h=0;h<l.length;h++){const f=c[h];if(f===void 0)l[h]=1;else if(o<=f){l[h]=1;break}}e[r].histogram.dataPoints.push({startTimeUnixNano:a,timeUnixNano:a,count:1,sum:o,min:o,max:o,bucketCounts:l,explicitBounds:c,attributes:Qt(u??{})})}function Hu(e,t){const{name:n,value:r,unit:o,description:i,timeUnixNano:s,attributes:a,scale:u}=t;e[n]||={name:n,unit:o||"1",description:i,exponentialHistogram:{aggregationTemporality:fr,dataPoints:[]}};const c=r<=0?0:r,l=u||3,h=2**l/Math.log(2),f=Math.ceil(Math.log(r)*h)-1,d=r<=0?1:0,v={offset:0,bucketCounts:[]},_={offset:r>0?f:0,bucketCounts:r>0?[1]:[]};e[n].exponentialHistogram.dataPoints.push({attributes:Qt(a??{}),startTimeUnixNano:s,timeUnixNano:s,count:1,sum:c,scale:l,zeroCount:d,positive:_,negative:v,min:c,max:c,zeroThreshold:0})}function ju(e,t){const{name:n,value:r,unit:o,description:i,timeUnixNano:s,attributes:a}=t;e[n]||={name:n,unit:o||"1",description:i,sum:{aggregationTemporality:fr,isMonotonic:!0,dataPoints:[]}},e[n].sum.dataPoints.push({startTimeUnixNano:s,timeUnixNano:s,asDouble:r,attributes:Qt(a??{})})}function Bu(e,t){const{name:n,value:r,unit:o,description:i,timeUnixNano:s,attributes:a}=t;e[n]||={name:n,unit:o||"1",description:i,gauge:{dataPoints:[]}},e[n].gauge.dataPoints.push({startTimeUnixNano:s,timeUnixNano:s,asDouble:r,attributes:Qt(a??{})})}const Ku=50*1024;var Me=Q("url"),de=Q("serviceName"),Ie=Q("logger"),Le=Q("fetchFn"),he=Q("maxPayloadSizeBytes"),pe=Q("retry");class fd{constructor(t,n,r){var o;Object.defineProperty(this,Me,{writable:!0,value:void 0}),Object.defineProperty(this,de,{writable:!0,value:void 0}),Object.defineProperty(this,Ie,{writable:!0,value:void 0}),Object.defineProperty(this,Le,{writable:!0,value:void 0}),Object.defineProperty(this,he,{writable:!0,value:void 0}),Object.defineProperty(this,pe,{writable:!0,value:void 0}),C(this,Me)[Me]=t.replace(/\/v1\/(logs|metrics|traces)\/?$/,""),C(this,de)[de]=n,C(this,Ie)[Ie]=r?.logger,C(this,Le)[Le]=r?.fetchFn,C(this,he)[he]=(o=r?.maxPayloadSizeBytes)!==null&&o!==void 0?o:Ku,C(this,pe)[pe]=r?.retry}async exportMetrics(t,n){var r;const o=(r=n?.keepalive)!==null&&r!==void 0?r:!0;await this.exportBatches("/v1/metrics",[...t],i=>({resourceMetrics:[{resource:{attributes:[{key:"service.name",value:{stringValue:C(this,de)[de]}}]},scopeMetrics:[{scope:{name:"open-telemetry-mini-client",version:"1.1.0",attributes:[]},metrics:i}]}]}),o,{splitEntry:Gu,describeEntry:i=>({metricName:i.name,dataPointCount:Ki(i)})})}async exportLogs(t,n){var r;const o=(r=n?.keepalive)!==null&&r!==void 0?r:!0;await this.exportBatches("/v1/logs",[...t],i=>({resourceLogs:[{resource:{attributes:[{key:"service.name",value:{stringValue:C(this,de)[de]}}]},scopeLogs:[{scope:{name:"open-telemetry-mini-client",version:"1.1.0",attributes:[]},logRecords:i}]}]}),o)}async exportTo(t,n,r){await this.exportSerializedWithRetry(this.serializeBody(t),n,r)}serializeBody(t){const n=JSON.stringify(t),r=new TextEncoder().encode(n).length;if(r>C(this,he)[he])throw new yo(r,C(this,he)[he]);return{body:t,jsonBody:n}}async exportSerializedTo({body:t,jsonBody:n},r,o){var i;const s=await this.exporterFetch()(`${C(this,Me)[Me]}${r}`,{method:"POST",keepalive:o,headers:{"Content-Type":"application/json"},body:n});if((i=C(this,Ie)[Ie])===null||i===void 0||i.log({status:s.status}),!s.ok){if(s.status===400){const a=await s.text();throw new dn(`Invalid OpenTelemetry Data: ${a}`)}if(s.status===429||s.status===503){const a=await s.text(),u=s.headers.get("Retry-After"),c=u?{seconds:Number(u)}:void 0;throw new dn("Server did not accept data",{errorData:a,retryAfter:c,body:t})}if(s.status===401||s.status===403){const a=await s.text();throw new qu(`Authentication failed: ${s.status} ${s.status===401?"Unauthorized":"Forbidden"}`,{errorData:a,body:t})}throw new dn(`Server responded with ${s.status}`)}}async exportSerializedWithRetry(t,n,r){const o=()=>this.exportSerializedTo(t,n,r);await(C(this,pe)[pe]?C(this,pe)[pe](o):o())}exporterFetch(){return C(this,Le)[Le]||fetch}async exportBatches(t,n,r,o,i){const s=this.serializedBatches(n,r,i);for(const a of s)await this.exportSerializedWithRetry(a,t,o)}serializedBatches(t,n,r){if(t.length===0)return[];try{return[this.serializeBody(n(t))]}catch(s){var o;if(!(s instanceof yo))throw s;if(t.length>1){const c=Math.ceil(t.length/2);return[...this.serializedBatches(t.slice(0,c),n,r),...this.serializedBatches(t.slice(c),n,r)]}const a=t[0];if(a===void 0)throw s;const u=r==null||(o=r.splitEntry)===null||o===void 0?void 0:o.call(r,a);if(!u){var i;throw s.metricDetails=r==null||(i=r.describeEntry)===null||i===void 0?void 0:i.call(r,a),s}return[...this.serializedBatches([u[0]],n,r),...this.serializedBatches([u[1]],n,r)]}}}function Gu(e){const t=Ki(e);if(t<=1)return;const n=Math.ceil(t/2);return[vo(e,0,n),vo(e,n,t)]}function vo(e,t,n){switch(!0){case"exponentialHistogram"in e:return{...e,exponentialHistogram:{...e.exponentialHistogram,dataPoints:e.exponentialHistogram.dataPoints.slice(t,n)}};case"histogram"in e:return{...e,histogram:{...e.histogram,dataPoints:e.histogram.dataPoints.slice(t,n)}};case"gauge"in e:return{...e,gauge:{...e.gauge,dataPoints:e.gauge.dataPoints.slice(t,n)}};case"sum"in e:return{...e,sum:{...e.sum,dataPoints:e.sum.dataPoints.slice(t,n)}};default:return Gi(e)}}function Ki(e){switch(!0){case"exponentialHistogram"in e:return e.exponentialHistogram.dataPoints.length;case"histogram"in e:return e.histogram.dataPoints.length;case"gauge"in e:return e.gauge.dataPoints.length;case"sum"in e:return e.sum.dataPoints.length;default:return Gi(e)}}function Gi(e){throw new Error(`Unhandled metric type: ${JSON.stringify(e)}`)}
1class dn extends Error{constructor(t,n){super(t),this.metadata=void 0,this.name="OpenTelemetryClientError",this.metadata=n}}class yo extends Error{constructor(t,n){const r=typeof t=="number"&&n!==void 0;super(r?`Payload size ${t} exceeds ${n} bytes`:String(t)),this.name="PayloadTooLargeError",this.payloadSizeBytes=void 0,this.payloadSizeLimitBytes=void 0,this.metricDetails=void 0,r&&(this.payloadSizeBytes=t,this.payloadSizeLimitBytes=n)}}class qu extends Error{constructor(t,n){super(t),this.name="AuthenticationFailedError",this.metadata=void 0,this.name="AuthenticationFailedError",this.metadata=n}}function Wu(e){return qi(e).map(t=>t instanceof Error?t:new Wi(`[${typeof t}] ${Vu(t).slice(0,10240)}`))}function qi(e,t=0){return t>=20?[e,"Truncated cause stack"]:e instanceof Error&&e.cause?[e,...qi(e.cause,t+1)]:[e]}function Vu(e){if(typeof e=="function")return`${e.name||"anonymous"}`;if(typeof e!="string")try{return JSON.stringify(e)??typeof e}catch{}return`${e}`}var Wi=class extends Error{name="BugsnagInvalidError"},Vi=/^\s*at .*(\S+:\d+|\(native\))/m,zu=/^(eval@)?(\[native code])?$/;function Yu(e){return e.stack?e.stack.match(Vi)?Xu(e):Qu(e):[]}function zi(e){if(e.indexOf(":")===-1)return[e];let t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));return[t[1],t[2]?Number(t[2]):void 0,t[3]?Number(t[3]):void 0]}function Xu(e){return e.stack.split(`
2`).filter(t=>!!t.match(Vi)).map(t=>{let n=t.replace(/^\s+/,"").replace(/^.*?\s+/,""),r=n.match(/ (\(.+\)$)/);n=r?n.replace(r[0],""):n;let o=zi(r?r[1]:n),i=r&&n||void 0,s=["eval","<anonymous>"].indexOf(o[0])>-1?void 0:o[0];return{method:i,file:s,lineNumber:o[1],columnNumber:o[2]}})}function Qu(e){return e.stack.split(`
3`).filter(t=>!t.match(zu)).map(t=>{if(t.indexOf("@")===-1&&t.indexOf(":")===-1)return{method:t};let n=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=t.match(n),o=r&&r[1]?r[1]:void 0,i=zi(t.replace(n,""));return{method:o,file:i[0],lineNumber:i[1],columnNumber:i[2]}})}var hn="5",hd=class{breadcrumbs=[];apiKey;plugins;appId;appType;appVersion;releaseStage;locale;userAgent;metadata;persistedMetadata;onError;onPostErrorListeners=[];endpoints;session;constructor(t){this.apiKey=t.apiKey,this.appType=t.appType,this.appId=t.appId,this.appVersion=t.appVersion,this.releaseStage=t.releaseStage,this.locale=t.locale,this.userAgent=t.userAgent,this.metadata=t.metadata,this.onError=t.onError,this.persistedMetadata={},this.endpoints=t.endpoints??{notify:"https://error-analytics-production.shopifysvc.com",sessions:"https://error-analytics-sessions-production.shopifysvc.com/observeonly"},this.plugins=t.plugins??[],this.plugins.forEach(n=>n.load(this)),this.leaveBreadcrumb("Bugsnag started",void 0,"state"),(t.withSessionTracking??!0)&&(this.session={id:this.getRandomUUID(),startedAt:new Date().toISOString(),events:{handled:0,unhandled:0}},this.startSession())}addMetadata(t){for(let n of Object.keys(t))this.persistedMetadata[n]=t[n]}getSessionId(){return this.session?.id}leaveBreadcrumb(t,n,r="manual"){this.breadcrumbs.push({name:t,metaData:n,type:r,timestamp:new Date().toISOString()})}notify(t,{errorClass:n,severity:r,severityType:o,handled:i=!0,metadata:s,context:a,groupingHash:u}={}){let c=Wu(t),l={...this.metadata,...this.persistedMetadata,...s},h=this.buildBugsnagEvent(c,{errorClass:n,severityType:o,handled:i,severity:r,metadata:l,context:a,groupingHash:u});if((this.onError?.(h,t)??!0)&&this.releaseStage!=="development"){this.updateAndAppendSessionInformation(h);let f=this.sendToBugsnag(h);return this.onPostErrorListeners.forEach(d=>d(h,t)),f}return Promise.resolve()}addOnPostError(t){this.onPostErrorListeners.push(t)}updateAndAppendSessionInformation(t){this.session&&(t.unhandled?this.session.events.unhandled++:this.session.events.handled++,t.session=this.session)}buildBugsnagEvent(t,{errorClass:n,severity:r="error",severityType:o="handledException",handled:i,metadata:s={},context:a,groupingHash:u}){let c=new Date().toISOString(),{breadcrumbs:l,appId:h,appType:f,appVersion:d,releaseStage:v,locale:_,userAgent:y}=this,p=t.map((m,g)=>({errorClass:g===0?n??m.name:m.name,stacktrace:Ju(h,m),message:m.message,type:"browserjs"}));return{payloadVersion:hn,exceptions:p,severity:r,severityReason:{type:o}
3,unhandled:!i,app:{id:h,type:f,version:d,releaseStage:v},device:{time:c,locale:_,userAgent:y},breadcrumbs:l,context:a,metaData:s,groupingHash:u}}async startSession(){if(this.releaseStage==="development"){console.log("Skipping error logging session tracking in development mode");return}let{apiKey:t}=this,n={notifier:{name:"Bugsnag JavaScript",version:"7.22.2",url:"https://github.com/bugsnag/bugsnag-js"},app:{version:this.appVersion,releaseStage:this.releaseStage,type:this.appType},device:{id:this.appId,locale:this.locale,userAgent:this.userAgent},sessions:[this.session]};try{await fetch(this.endpoints.sessions,{method:"POST",headers:{"Content-Type":"application/json","Bugsnag-Api-Key":t,"Bugsnag-Payload-Version":hn,"Bugsnag-Sent-At":this.session?.startedAt??new Date().toISOString()},body:JSON.stringify(xt(n))})}catch(r){console.warn("[bugsnag-light] failed to start session"),console.warn(r)}}async sendToBugsnag(t){let{apiKey:n}=this,r={apiKey:n,notifier:{name:"Bugsnag JavaScript",version:"7.22.2",url:"https://github.com/bugsnag/bugsnag-js"},events:[t]};try{await fetch(this.endpoints.notify,{method:"POST",headers:{"Content-Type":"application/json","Bugsnag-Api-Key":n,"Bugsnag-Payload-Version":hn,"Bugsnag-Sent-At":t.device.time},body:JSON.stringify(xt(r))})}catch(o){console.warn("[bugsnag-light] failed to send an event"),console.warn(o)}}getRandomUUID(){try{return crypto.randomUUID()}catch{return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let n=Math.random()*16|0;return(t==="x"?n:n&3|8).toString(16)})}}};function Ju(e,t){let n=Yu(t).map(r=>{let o=r.file?.includes(e);return{method:r.method??"",file:r.file??"",lineNumber:r.lineNumber??0,columnNumber:r.columnNumber,inProject:o}});if(t instanceof Wi){let r=n.findIndex(o=>o.method.endsWith("notify"));r>-1&&(n=n.slice(r+1))}return n}var Zu=50;function xt(e,t=new Set,n=0){if(e===null||typeof e!="object")return e;if(n>=Zu)return"[MaxDepth]";if(t.has(e))return"[Circular]";let r=new Set(t);if(r.add(e),Array.isArray(e))return e.map(i=>xt(i,r,n+1));let o={};for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(o[i]=xt(e[i],r,n+1));return o}var Yi=class Xi extends Error{reason;constructor(t,n){super(t,n),this.name="BreadcrumbsPluginFetchError",Object.setPrototypeOf(this,Xi.prototype)}};function _d(e,{metadata:t}={}){let n=window.onerror;window.onerror=(r,o,i,s,a)=>{a&&e.notify(a,{severityType:"unhandledException",handled:!1,metadata:t}),typeof n=="function"&&n.apply(window.onerror,[r,o,i,s,a])}}function md(e,{metadata:t}={}){window.addEventListener("unhandledrejection",n=>{n.reason&&n.reason instanceof Error&&n.reason.stack&&!(n.reason instanceof Yi)&&e.notify(n.reason,{severityType:"unhandledPromiseRejection",handled:!1,metadata:t})})}var vd={load(e){e.addOnPostError(t=>{e.leaveBreadcrumb(t.exceptions[0].errorClass,{errorClass:t.exceptions[0].errorClass,errorMessage:t.exceptions[0].message,severity:t.severity},"error")})}};function Qi(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var yd={load(e){"addEventListener"in self&&self.addEventListener("click",t=>{let n="[hidden]";try{let o=el(t.target)?t.target:null;n=o?Ji(o):"(Non-Element Target)"}catch{}let r=tl();e.leaveBreadcrumb("UI click",{targetSelector:n,targetFrame:r},"user")},!0)}};function el(e){return Qi(e)&&e.nodeType===Node.ELEMENT_NODE}function tl(){try{return window.self===window.top?"in-top-window":"in-same-origin-iframe"}catch{return"in-cross-origin-iframe"}}function Ji(e){let t=e.tagName;if(e.id&&(t+=`#${e.id}`),e.className?.length&&(t+=`.${e.className.replace(/ /g,".")}`),!self.document.querySelectorAll)return t;try{if(self.document.querySelectorAll(t).length===1)return t}catch{return t}if(e.parentNode&&e.parentNode.childNodes.length>1){let n=Array.from(e.parentNode.children).indexOf(e)+1;t+=`:nth-child(${n})`}return self.document.querySelectorAll(t).length===1?t:e.parentElement?`${Ji(e.parentElement)} > ${t}`:t}var gd={load(e){let t=["log","debug","info","warn","error"].filter(n=>typeof console<"u"&&typeof console[n]=="function");for(let n of t){let r=console[n];console[n]=(...o)=>{e.leaveBreadcrumb("Console output",o.reduce((i,s,a)=>{let u="[Unknown value]";
3try{u=String(s)}catch{}if(u==="[object Object]")try{u=JSON.stringify(s)}catch{}return i[`[${a}]`]=u,i},{severity:n}),"log"),r.apply(console,o)}}}},Ed={load(e){if(!("addEventListener"in self))return;let t=r=>()=>e.leaveBreadcrumb(r,void 0,"navigation");self.addEventListener("pagehide",t("Page hidden"),!0),self.addEventListener("pageshow",t("Page shown"),!0),self.addEventListener("load",()=>{self.addEventListener("popstate",t("Navigated back"),!0)},!0),self.document?.addEventListener("DOMContentLoaded",t("DOMContentLoaded"),!0),self.location&&self.addEventListener("hashchange",r=>e.leaveBreadcrumb("Hash changed",{from:r.oldURL&&In(r.oldURL),to:In(r.oldURL?r.newURL:self.location.href),state:r.oldURL&&Zi(self)},"navigation"),!0);let n=e.leaveBreadcrumb.bind(e);self.history&&self instanceof Window&&(typeof self.history.replaceState=="function"&&go({fn:"replaceState",target:self.history,leaveBreadcrumb:n,win:self}),typeof self.history.pushState=="function"&&go({fn:"pushState",target:self.history,leaveBreadcrumb:n,win:self}))}};function In(e){try{let t=new URL(e);return`${t.pathname}${t.search}${t.hash}`}catch{return e}}function Zi(e){try{return e.history.state}catch{return{}}}function go({fn:e,leaveBreadcrumb:t,target:n,win:r}){let o=n[e];n[e]=(i,s,a)=>{t(`History ${e}`,nl({win:r,state:i,title:s,url:a}),"navigation"),o.apply(n,[i,s,a])}}function nl({win:e,state:t,title:n,url:r}){let o=In(e.location.href);return{title:n,state:t,prevState:Zi(e),to:r||o,from:o}}var wd={load(e){if(!("fetch"in self))return;let t=self.fetch;self.fetch=function(n,r){let o="GET",i;rl(n)?(i=n.url,o=n.method):i=n.toString(),r&&typeof r.method=="string"&&r.method.length&&(o=r.method);let s=e.leaveBreadcrumb.bind(e);return new Promise((a,u)=>{t(n,r).then(c=>{let l=c.headers?.get("x-request-id");Eo({message:`fetch() ${c.status>=400?"failed":"succeeded"}`,url:i,leaveBreadcrumb:s,breadcrumbMetadata:{request:`${o} ${i}`,status:c.status,...l&&{requestId:l}}}),a(c)}).catch(c=>{Eo({message:"fetch() error",url:i,leaveBreadcrumb:s,breadcrumbMetadata:{error:c?.message,request:`${o} ${i}`}}),u(new Yi(c?.message,{cause:c}))})})}}};function rl(e){return e instanceof Request||Qi(e)&&"url"in e}function Eo({message:e,url:t,leaveBreadcrumb:n,breadcrumbMetadata:r}){t.startsWith("https://notify.bugsnag")||n(e,r,"request")}var Ln,es=-1,rt=function(e){addEventListener("pageshow",(function(t){t.persisted&&(es=t.timeStamp,e(t))}),!0)},ts=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},dr=function(){var e=ts();return e&&e.activationStart||0},ae=function(e,t){var n=ts(),r="navigate";return es>=0?r="back-forward-cache":n&&(document.prerendering||dr()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t===void 0?-1:t,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},ot=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(o){Promise.resolve().then((function(){t(o.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}},ce=function(e,t,n,r){var o,i;return function(s){t.value>=0&&(s||r)&&((i=t.value-(o||0))||o===void 0)&&(o=t.value,t.delta=i,t.rating=(function(a,u){return a>u[1]?"poor":a>u[0]?"needs-improvement":"good"})(t.value,n),e(t))}},hr=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},Jt=function(e){document.addEventListener("visibilitychange",(function(){document.visibilityState==="hidden"&&e()}))},pr=function(e){var t=!1;return function(){t||(e(),t=!0)}},be=-1,wo=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},Mt=function(e){document.visibilityState==="hidden"&&be>-1&&(be=e.type==="visibilitychange"?e.timeStamp:0,ol())},So=function(){addEventListener("visibilitychange",Mt,!0),addEventListener("prerenderingchange",Mt,!0)},ol=function(){removeEventListener("visibilitychange",Mt,!0),removeEventListener("prerenderingchange",Mt,!0)},ns=function(){return be<0&&(be=wo(),So(),rt((function(){setTimeout((function(){be=wo(),So()}),0)}))),{get firstHiddenTime(){return be}}},_r=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},bo=[1800,3e3],il=function(e,t){t=t||{},_r((function(){var n,r=ns(),o=ae("FCP"),i=ot("paint",(function(s){s.forEac
3h((function(a){a.name==="first-contentful-paint"&&(i.disconnect(),a.startTime<r.firstHiddenTime&&(o.value=Math.max(a.startTime-dr(),0),o.entries.push(a),n(!0)))}))}));i&&(n=ce(e,o,bo,t.reportAllChanges),rt((function(s){o=ae("FCP"),n=ce(e,o,bo,t.reportAllChanges),hr((function(){o.value=performance.now()-s.timeStamp,n(!0)}))})))}))},Ao=[.1,.25],Sd=function(e,t){t=t||{},il(pr((function(){var n,r=ae("CLS",0),o=0,i=[],s=function(u){u.forEach((function(c){if(!c.hadRecentInput){var l=i[0],h=i[i.length-1];o&&c.startTime-h.startTime<1e3&&c.startTime-l.startTime<5e3?(o+=c.value,i.push(c)):(o=c.value,i=[c])}})),o>r.value&&(r.value=o,r.entries=i,n())},a=ot("layout-shift",s);a&&(n=ce(e,r,Ao,t.reportAllChanges),Jt((function(){s(a.takeRecords()),n(!0)})),rt((function(){o=0,r=ae("CLS",0),n=ce(e,r,Ao,t.reportAllChanges),hr((function(){return n()}))})),setTimeout(n,0))})))},rs=0,pn=1/0,ft=0,sl=function(e){e.forEach((function(t){t.interactionId&&(pn=Math.min(pn,t.interactionId),ft=Math.max(ft,t.interactionId),rs=ft?(ft-pn)/7+1:0)}))},os=function(){return Ln?rs:performance.interactionCount||0},al=function(){"interactionCount"in performance||Ln||(Ln=ot("event",sl,{type:"event",buffered:!0,durationThreshold:0}))},W=[],Et=new Map,is=0,cl=function(){var e=Math.min(W.length-1,Math.floor((os()-is)/50));return W[e]},ul=[],ll=function(e){if(ul.forEach((function(o){return o(e)})),e.interactionId||e.entryType==="first-input"){var t=W[W.length-1],n=Et.get(e.interactionId);if(n||W.length<10||e.duration>t.latency){if(n)e.duration>n.latency?(n.entries=[e],n.latency=e.duration):e.duration===n.latency&&e.startTime===n.entries[0].startTime&&n.entries.push(e);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};Et.set(r.id,r),W.push(r)}W.sort((function(o,i){return i.latency-o.latency})),W.length>10&&W.splice(10).forEach((function(o){return Et.delete(o.id)}))}}},ss=function(e){var t=self.requestIdleCallback||self.setTimeout,n=-1;return e=pr(e),document.visibilityState==="hidden"?e():(n=t(e),Jt(e)),n},Co=[200,500],bd=function(e,t){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(t=t||{},_r((function(){var n;al();var r,o=ae("INP"),i=function(a){ss((function(){a.forEach(ll);var u=cl();u&&u.latency!==o.value&&(o.value=u.latency,o.entries=u.entries,r())}))},s=ot("event",i,{durationThreshold:(n=t.durationThreshold)!==null&&n!==void 0?n:40});r=ce(e,o,Co,t.reportAllChanges),s&&(s.observe({type:"first-input",buffered:!0}),Jt((function(){i(s.takeRecords()),r(!0)})),rt((function(){is=os(),W.length=0,Et.clear(),o=ae("INP"),r=ce(e,o,Co,t.reportAllChanges)})))})))},To=[2500,4e3],_n={},Ad=function(e,t){t=t||{},_r((function(){var n,r=ns(),o=ae("LCP"),i=function(u){t.reportAllChanges||(u=u.slice(-1)),u.forEach((function(c){c.startTime<r.firstHiddenTime&&(o.value=Math.max(c.startTime-dr(),0),o.entries=[c],n())}))},s=ot("largest-contentful-paint",i);if(s){n=ce(e,o,To,t.reportAllChanges);var a=pr((function(){_n[o.id]||(i(s.takeRecords()),s.disconnect(),_n[o.id]=!0,n(!0))}));["keydown","click"].forEach((function(u){addEventListener(u,(function(){return ss(a)}),{once:!0,capture:!0})})),Jt(a),rt((function(u){o=ae("LCP"),n=ce(e,o,To,t.reportAllChanges),hr((function(){o.value=performance.now()-u.timeStamp,_n[o.id]=!0,n(!0)}))}))}}))};class fl{constructor(t){this.to=t}}class dl extends Error{constructor(){super(...arguments),this.name="NavigationError"}}function Dn(e,t,n,r){Object.defineProperty(e,"state",{value:t,writable:!1});const o=yr(e,r);Object.defineProperty(e,"prefix",{value:o,writable:!1});const i=Fn(e.pathname.replace(o??"",""));return Object.defineProperty(e,"normalizedPath",{value:i,writable:!1}),Object.defineProperty(e,"key",{value:n,writable:!1}),e}function wt(e,t){if(e instanceof URL){if(e.origin!==t.origin)throw new dl(`You can’t perform a client side navigation to ${e.href} from ${t.href}`);return new URL(e.href)}else if(typeof e=="object"){const{pathname:n,search:r,hash:o}=e,i=n??t.pathname,s=hl(r),a=St("#",o);return new URL($o(`${i}${s}${a}`,t.prefix),t.href)}else if(typeof e=="function")return wt(e(t),t);return new URL($o(e,t.prefix),mr(t.href))}function $o(e,t){return t&&e.indexOf("/")===0?`${mr(t)}${e.slice(1)}`:e}function hl(e){return e==null?"":typeof e=="string"?St("?",e):e instanceof URLSearchParams?St("?",e.toString()):St("?",Object.keys(e).reduce((t,n)=>`${t}${n}=${encodeURIComponent(e[n])}`,""))}function St(e,t=""){return t.length===0||t[0]===e?t:`${e}${t}`}function Un(){return`${String(Date.now())}${Math.random()}`}function mr(e){return e.length===0?"/":e[e.length-1]==="/"?e:`${e}/`}function V(e){return e.length===1?e:e[e.length-1]==="/"?e.slice(0,-1):e}function pl(e){return e[0]==="/"?e.slice(1):e}function Fn(e){return e[0]==="/"?V(e):`/${V(e)}`}function vr(e,t,n,r){const o=_l(e,t,r);if(n==null)return{matched:V(o.remainderAbsolute)};if(typeof n=="function")return n(e)?{matched:V(o.remainderAbsolute)}:void 0;if(typeof n=="string"){const i=V(n);return i==="/"?o.remainderAbsolute==="/"?{matched:i,nextMatchedPathPrefix:i}:void 0:i[0]==="/"?o.remainderAbsolute.startsWith(i)?{matched:i,nextMatchedPathPrefix:i}:void 0:o.remainderRelative.startsWith(i)?{matched:i,nextMatchedPathPrefix:`${o.previousMatchedPathPrefix}${Fn(i)}`}:void 0}else if(n instanceof RegExp){const i=o.remainderRelative.match(n);if(i!=null&&i.index===0)return{matched:V(i[0]),nextMatchedPathPrefix:`${o.previousMatchedPathPrefix}${Fn(i[0])}`};const s=o.remainderAbsolute.match(n);if(s==null||s.index!==0)return;const a=V(s[0]);return{matched:a,nextMatchedPathPrefix:a}}}function _l(e,t,n=""){const r=yr(e,t)??"",o=n?`${r}${n}`:r,i=pl(V(e.pathname.replace(o,"")));return{previousMatchedPathPrefix:n,remainderRelative:i,remainderAbsolute:`${mr(n)}${i}`}}function Cd(e,t){return yr(e,t)!=null}function yr(e,t){if(!t)return;if(typeof t=="string")return e.pathname.indexOf(t)===0?V(t):void 0;const r=new RegExp(t.source).exec(e.pathname);return r!=null&&r.index===0?V(r[0]):void 0}const Hn="_key";class Td{#e;#t;#i=new Set;#s=new Set;#n=!1;#r;#o;constructor(t,{prefix:n,state:r}={}){this.prefix=n,this.#e=ie(t?Dn(t,r??{},Un(),n):mn(n)),this.currentUrl=this.#e,this.#t=[this.#e.value.key],typeof window<"u"&&window.addEventListener("popstate",this.#u)}
3currentUrlMatches(t){return vr(this.#e.value,this.prefix,t)!=null}navigate(t,{state:n={},replace:r=!1}={}){const o=this.#e.value,i=wt(t,o);for(const d of this.#s)d(o,i);const s=Un(),a=Dn(i,n,s,this.prefix),u={...n,[Hn]:s},c=()=>{this.#n=!0,this.navigate(a,{replace:r})};if(!this.#n&&this.#c(a,c))return;this.#n=!1;const l=ml(a);try{history[r?"replaceState":"pushState"](u,"",l)}catch{window.location[r?"replace":"assign"](l);return}const h=this.#t.lastIndexOf(o.key);r?this.#t.splice(h,1,s):this.#t.splice(h+1,this.#t.length-h-1,s);const f=mn(this.prefix,s);this.#e.value=f,this.#a(o,f)}redirect(t){if(t==null)return;const n=this.#e.value,r=wt(t,n);if(typeof window>"u")throw new fl(r);const o=n.key;if(this.#r!=null){this.#r.to=r,this.#r.fromNavigationKey=o;return}this.#r={to:r,fromNavigationKey:o},window.requestAnimationFrame(()=>{const i=this.#r;this.#r=void 0,!(i==null||this.#e.value.key!==i.fromNavigationKey)&&this.navigate(i.to,{replace:!0})})}beforeNavigate(t){return this.#s.add(t),()=>{this.#s.delete(t)}}block(t=()=>!0){return this.#i.add(t),()=>{this.#i.delete(t)}}go(t){window.history.go(t)}back(t=-1){this.go(t)}forward(t=1){this.go(t)}resolve(t){return wt(t,this.#e.value)}#u=()=>{const t=this.#e.value;if(t.pathname===window.location.pathname&&window.location.hash?.slice(1))return;const n=this.#t[0],r=mn(this.prefix,n),o=this.#t.lastIndexOf(window.history.state?.[Hn]??n),s=this.#t.lastIndexOf(t.key)-o,a=()=>{s&&(this.#n=!0,this.go(s))};if(!this.#n&&this.#c(r,a,!0)){this.#n=!0,this.go(-s);return}this.#n=!1,this.#e.value=r,this.#a(t,r)};#a(t,n){t.pathname===n.pathname||typeof window>"u"||(this.#o!=null&&window.cancelAnimationFrame(this.#o),this.#o=window.requestAnimationFrame(()=>{this.#o=void 0,document.body.focus()}))}#c(t,n,r=!1){return[...this.#i].some(o=>o(t,n,r))}}function mn(e,t){const{[Hn]:n,...r}=window.history.state??{};return Dn(new URL(window.location.href),r,n??t??Un(),e)}function ml(e){return`${e.pathname}${e.search}${e.hash}`}const as="http://localhost:8082",cs="https://monorail-edge.shopifysvc.com",vl="/unstable/produce_batch",us="/v1/produce";function yl(e){return`https://${new URL(e).hostname}`}function ls(e){return e.schemaId!==void 0}class gl{constructor(t){this.producer=t}do(t,n){return ls(t)?this.producer.produce(t):this.producer.produceBatch(t)}}function fs(){if(typeof crypto<"u"&&crypto&&typeof crypto.randomUUID=="function")return crypto.randomUUID();const e=new Array(36);for(let t=0;t<36;t++)e[t]=Math.floor(Math.random()*16);return e[14]=4,e[19]=e[19]&=-5,e[19]=e[19]|=8,e[8]=e[13]=e[18]=e[23]="-",e.map(t=>t.toString(16)).join("")}function Qe(e,t=!0){return e&&Object.keys(e).length&&t?Object.keys(e).map(n=>({[El(n)]:e[n]})).reduce((n,r)=>({...n,...r})):e}function El(e){return e.split(/(?=[A-Z])/).join("_").toLowerCase()}function wl(e){return e.events.map(t=>{let n=!0,r=!0;return t&&t.options&&Object.prototype.hasOwnProperty.call(t.options,"convertEventCase")&&(n=!!t.options.convertEventCase),t&&t.options&&Object.prototype.hasOwnProperty.call(t.options,"convertMetaDataCase")&&(r=!!t.options.convertMetaDataCase),{schema_id:t.schemaId,payload:Qe(t.payload,n),...t.metadata&&{metadata:Qe(t.metadata,r)}}})}class qe extends Error{name="MonorailUnableToProduceError";constructor(t){super(`Error producing to the Monorail Edge. Response received: ${JSON.stringify(t)}`),this.response=t,Object.setPrototypeOf(this,qe.prototype)}}class It extends Error{name="MonorailInterceptedProduceError";constructor(t){super(`Response not from Monorail Edge. Response received: ${JSON.stringify(t)}`),this.response=t,Object.setPrototypeOf(this,It.prototype)}}class gr extends Error{name="MonorailBatchProduceError";constructor(t){super(`Error producing to the Monorail Edge. Response received: ${JSON.stringify(t)}`),Object.setPrototypeOf(this,gr.prototype),this.response=t}}class Lt extends Error{name="MonorailRequestError";constructor(t,n){super(`Error completing request. A network failure may have prevented the request from completing. Error: ${t}. Schemas: ${Array.from(new Set(n)).join(", ")}`),Object.setPrototypeOf(this,Lt.prototype)}}
3class Dt extends Error{name="MonorailResponseReadError";constructor(t,n){super(`Error reading response from Monorail Edge. Status: ${n||"unknown"}. Error: ${t?.message||"Unknown error"}`),this.error=t,this.status=n,Object.setPrototypeOf(this,Dt.prototype)}}class We{static withEndpoint(t){return new We(yl(t))}constructor(t=as,n={}){if(this.edgeDomain=t,this.optionsOrKeepalive=n,typeof n=="boolean"){this.keepalive=n,this.detectInterceptedErrorEnabled=!1;return}this.keepalive=n.keepalive??!1,this.detectInterceptedErrorEnabled=n.detectInterceptedErrorEnabled??!1}async produceBatch(t){const n={events:wl(t),metadata:Qe(t.metadata)};let r;try{r=await fetch(this.produceBatchEndpoint(),{method:"post",headers:ds(t.metadata),body:JSON.stringify(n),keepalive:t.options?.keepalive??this.resolveKeepaliveFromEvents(t.events)})}catch(i){throw new Lt(i,t.events.map(s=>s.schemaId))}if(r.status===207){const i=await r.json();throw new gr(i)}let o;try{o=await r.text()}catch(i){throw new Dt(i,r.status)}if(!r.ok)throw!!!r.headers.get("x-request-id")&&this.detectInterceptedErrorEnabled?new It({status:r.status,message:o}):new qe({status:r.status,message:o});return{status:r.status}}async produce(t){let n=!0;t&&t.options&&Object.prototype.hasOwnProperty.call(t.options,"convertEventCase")&&(n=!!t.options.convertEventCase);let r;try{r=await Sl({endpoint:this.produceEndpoint(),keepalive:t.options?.keepalive??this.keepalive,event:{...t,payload:Qe(t.payload,n)}})}catch(i){throw new Lt(i,[t.schemaId])}if(!r)throw new qe({message:"No response from edge"});let o;try{o=await r.text()}catch(i){throw new Dt(i,r.status)}if(!r.ok)throw!!!r.headers.get("x-request-id")&&this.detectInterceptedErrorEnabled?new It({status:r.status,message:o}):new qe({status:r.status,message:o});return{status:r.status}}resolveKeepaliveFromEvents(t){for(const n of t)if(n.options?.keepalive===!0)return!0;return this.keepalive}produceBatchEndpoint(){return this.edgeDomain+vl}produceEndpoint(){return this.edgeDomain+us}}function ds(e){const t={"Content-Type":"application/json; charset=utf-8","X-Monorail-Edge-Event-Created-At-Ms":(e&&e.eventCreatedAtMs||Date.now()).toString(),"X-Monorail-Edge-Event-Sent-At-Ms":Date.now().toString(),"X-Monorail-Edge-Client-Message-Id":(e&&e.clientMessageId||fs()).toString()};return e&&e.userAgent&&(t["User-Agent"]=e.userAgent),e&&e.remoteIp&&(t["X-Forwarded-For"]=e.remoteIp),e&&e.deviceInstallId&&(t["X-Monorail-Edge-Device-Install-Id"]=e.deviceInstallId),e&&e.client&&(t["X-Monorail-Edge-Client"]=e.client),e&&e.clientOs&&(t["X-Monorail-Edge-Client-OS"]=e.clientOs),t}async function Sl({endpoint:e,event:t,keepalive:n}){const r=t.metadata?{clientMessageId:t.metadata?.clientMessageId,eventCreatedAtMs:t.metadata?.eventCreatedAtMs,consent:t.metadata?.consent,consent_provider:t.metadata?.consent_provider,consent_version:t.metadata?.consent_version}:void 0;return fetch(e??cs+us,{method:"post",headers:ds(t.metadata),body:JSON.stringify({schema_id:t.schemaId,payload:t.payload,metadata:r&&Qe(r,!0)}),keepalive:n})}class Er{static printWelcomeMessage(t){console.log(`%c👋 from Monorail%c
4
5We've noticed that you're${t?"":" not"} running in debug mode. As such, we will ${t?"produce":"not produce"} Monorail events to the console. 
6
7If you want Monorail events to ${t?"stop":"start"} appearing here, %cset debugMode=${(!t).toString()}%c, for the Monorail Log Producer in your code.`,"font-size: large;","font-size: normal;","font-weight: bold;","font-weight: normal;")}constructor(t){this.sendToConsole=t,t&&Er.printWelcomeMessage(t)}async produce(t){return this.sendToConsole&&console.log("Monorail event produced",t),new Promise(n=>{n(t)})}produceBatch(t){return this.sendToConsole&&console.log("Monorail Batch event produced",t),new Promise(n=>{n(t)})}}class je{static createLogProducer(t){return new je(new Er(t.debugMode),t.middleware||[])}static createHttpProducerWithEndpoint(t,n=[]){return new je(We.withEndpoint(t),n)}static createHttpProducer(t){return new je(t.production?new We(cs,t.options):new We(as,t.options),t.middleware||[])}static buildMiddlewareChain(t,n=0){return n===t.length?this.identityFn:r=>t[n].do(r,this.buildMiddlewareChain(t,n+1))}constructor(t,n){this.producer=t,this.middleware=n,this.executeChain=je.buildMiddlewareChain(this.middleware.concat(new gl(t)))}produce(t){return t.metadata={eventCreatedAtMs:Date.now(),clientMessageId:fs(),...t.metadata},this.executeChain(t)}produceBatch(t){return this.executeChain(t)}}class bl{constructor(t){this.version=t.version}}class $d{eventsAwaitingConsent=[];constructor(t,n=()=>!1){if(!t?.provider)throw new wr("ConsentTrackingMiddleware requires an instance of ConsentTrackingProvider");this.isStrictlyNecessary=n,this.provider=t.provider}
7async do(t,n){if(ls(t)){const r=await this.provider.annotateEvent(t);return this.isConsentGivenForEmission(r)?(await this.processBufferedEvents(n),n(r)):this.isStrictlyNecessary(r)?n(r):(this.eventsAwaitingConsent.push(t),Promise.resolve({status:0,message:"Consent not granted and event not marked strictly necessary, event not sent"}))}else{if(this.isConsentGivenForEmission(await this.provider.annotateEvent(t.events[0]))){await this.processBufferedEvents(n);const i=await Promise.all(t.events.map(s=>this.provider.annotateEvent(s)));return n({...t,events:i})}const o=t.events.filter(i=>this.isStrictlyNecessary(i)?!0:(this.eventsAwaitingConsent.push(i),!1));if(o.length>0){const i=await Promise.all(o.map(s=>this.provider.annotateEvent(s)));return n({...t,events:i})}return Promise.resolve({status:0,message:"Consent not granted for any event, and no event marked strictly necessary, event batch not sent"})}}isConsentGivenForEmission(t){const n=t.metadata?.consent,r=this.provider.getRequiredConsentForEmission();return!!(Array.isArray(n)&&n.some(o=>r.includes(o)))}async processBufferedEvents(t){if(this.eventsAwaitingConsent.length===0)return;const n=this.eventsAwaitingConsent;this.eventsAwaitingConsent=[];const r=await Promise.all(n.map(o=>this.provider.annotateEvent(o)));await t({events:r})}}class wr extends Error{constructor(t){super(t),Object.setPrototypeOf(this,wr.prototype)}}const Al="__default",Po="__quiltRouterScroll",Cl={};function Tl(e){return typeof window.requestIdleCallback=="function"?window.requestIdleCallback(e):window.setTimeout(e,0)}function $l(e){e!=null&&(typeof window.cancelIdleCallback=="function"?window.cancelIdleCallback(e):typeof e=="number"&&window.clearTimeout(e))}const Pl=typeof window>"u"?()=>{}:Kt;function Rl(e,{id:t=Al,manual:n=!1,include:r=Nl,persist:o="sessionStorage"}={}){const i=e.currentUrl.value,s=Y(null),a=Y(),u=Y(),c=U(()=>o==="memory"?Cl:(()=>{try{return JSON.parse(sessionStorage.getItem(Po)??"{}")}catch{return{}}})(),[o]),l=_e(()=>{const h=s.current??document.documentElement;if(!r(i))return Ol;let f=c[i.key];if(f){const _=f[t];_==null?(f[t]=0,d(0)):d(_)}else f={[t]:0},c[i.key]=f,d(0);return v(),()=>{f[t]=h.scrollTop,v(),u.current!=null&&(window.cancelAnimationFrame(u.current),u.current=void 0)};function d(_){u.current=window.requestAnimationFrame(()=>{h.scrollTop=_,u.current=void 0})}function v(){o==="sessionStorage"&&($l(a.current),a.current=Tl(()=>{try{sessionStorage.setItem(Po,JSON.stringify(c))}catch{}}))}},[i.normalizedPath]);return Pl(()=>{if(!n)return l()},[l]),{ref:s,restore:l}}function Nl(){return!0}function Ol(){}function kl(e){const t=e.currentUrl.value;X(()=>{if(typeof window>"u")return;const n=t.hash;if(!n||n.length<=1)return;const r=n.substring(1),o=document.getElementById(r);o&&window.requestAnimationFrame(()=>{o.scrollIntoView()})},[t.hash])}const hs=Vn(null);class xl extends Error{constructor(){super(...arguments),this.name="PrefetcherError"}}function Ml(e){let t=0;const n=new Set,r=new Set;return{registerRoutes(a){const u=new Set,c=new Set;function l(h,f=[]){const{children:d,match:v,renderPrefetch:_}=h,y=v?[...f,v]:f;if(_!=null){const p=y.map(Il).join(",");if(c.has(p))throw new xl(`Duplicate prefetch registration for match chain "${p}"`);c.add(p);const m={id:s(),matches:y,render:_};u.add(m),r.add(m)}if(d!=null)for(const p of d)l(p,y)}for(const h of a)l(h);return u.size>0&&i(),()=>{if(u.size!==0){for(const h of u)r.delete(h);u.clear(),i()}}},getMatches:o,listenForMatch(a,u){function c(){u(o(a))}return n.add(c),()=>{n.delete(c)}}};function o(a){const u=[];for(const c of r){const l=Ll(a,e,c.matches);typeof l=="string"&&u.push({id:c.id,matched:l,render:c.render})}return u}function i(){for(const a of n)a()}function s(){return`Prefetch${t++}`}}function Il(e){return e==null?"":typeof e=="string"?e:e instanceof RegExp?e.source:e.toString()}function Ll(e,t,n){if(n.length===0)return"";let r,o="";for(const i of n){const s=vr(e,t.prefix,i,r);if(s==null)return!1;r=s.nextMatchedPathPrefix??r,o=s.matched}return o}function De({event:e,handler:t,...n}){return Dl(e,t,n),null}function Dl(e,t,{target:n,once:r,passive:o,capture:i}={}){X(()=>{const s=n||window,a=Hl(),u=Fl(),c=r&&!a?Ul(s,e,t):t;return a||u?(s.addEventListener(e,c,{once:r,passive:o,capture:i}),()=>{s.removeEventListener(e,c,{capture:i})}):(s.addEventListener(e,c,i),()=>{s.removeEventListener(e,c,i)})},[e,t,n,r,o,i])}function Ul(e,t,n){return function(o){n(o),e.removeEventListener(t,n)}}let Ue=null;function Fl(){if(Ue!==null)return Ue;try{const e=Object.defineProperty({},"passive",{get(){Ue=!0}});document.addEventListener("test",Ut,e)}catch{Ue=!1}return document.removeEventListener("test",Ut),Ue}let Fe=null;function Hl(){if(Fe!==null)return Fe;try{const e=Object.defineProperty({},"once",{get(){Fe=!0}});document.addEventListener("test",Ut,e)}catch{Fe=!1}return document.removeEventListener("test",Ut),Fe}function Ut(){}const jl=150,Bl=or(function({router:t,children:n}){const r=U(()=>Ml(t),[t]),[o,i]=ze(null),[s,a]=ze([]),u=Y(null),c=Y(null),{current:l}=Y(Kl());X(()=>
7{if(o!=null)return r.listenForMatch(o,a)},[r,o]);const h=()=>{u.current!=null&&(window.clearTimeout(u.current),u.current=null,c.current=null)},f=_e(({target:p})=>{if(p==null)return;const m=dt(p);if(m!=null){if(u.current){if(He(m,c.current))return;h()}c.current=m,u.current=window.setTimeout(()=>{h(),i(m),a(r.getMatches(m))},jl)}},[r]),d=_e(({target:p,relatedTarget:m})=>{if(p==null){h();return}if(o==null&&u.current==null)return;const g=dt(p),E=m&&dt(m);u.current!=null&&He(g,c.current)&&!He(E,c.current)&&h(),He(g,o)&&!He(E,o)&&(i(null),a([]))},[o]),v=_e(({target:p})=>{if(h(),p==null)return;const m=dt(p);m!=null&&(i(m),a(r.getMatches(m)))},[r]),_=o?A("div",{style:{visibility:"hidden"},children:s.map(({id:p,matched:m,render:g})=>A("div",{children:g({url:o,matched:m})},p))}):null,y=l?A(L,{children:[A(De,{passive:!0,event:"mouseover",handler:f}),A(De,{passive:!0,event:"focusin",handler:f}),A(De,{passive:!0,event:"mouseout",handler:d}),A(De,{passive:!0,event:"focusout",handler:d})]}):null;return A(L,{children:[A(hs.Provider,{value:r,children:n}),A(De,{passive:!0,event:"mousedown",handler:v}),y,_]})});function Kl(){return typeof navigator>"u"||!("connection"in navigator)||!navigator.connection?.saveData}function He(e,t){return e==null&&e===t||e!=null&&t!=null&&e.href===t.href}function dt(e){if(!(e instanceof HTMLElement))return;const t=e.closest("[href], [data-href]");if(t==null||!(t instanceof HTMLElement))return;const n=t.getAttribute("href")||t.getAttribute("data-href");try{return n?new URL(n,window.location.href):void 0}catch{return}}const Pd=or(function({children:t,router:n}){return A(Bl,{router:n,children:[t,A(Gl,{router:n}),A(ql,{router:n})]})});function Gl({router:e}){return Rl(e),null}function ql({router:e}){return kl(e),null}const Wl={}.hasOwnProperty;function Vl(...e){let t="";for(const n of e)n&&(t=ps(t,zl(n)));return t}function zl(e){if(typeof e=="string")return e;if(typeof e!="object")return"";if(Array.isArray(e))return Vl(...e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();let t="";for(const n in e)Wl.call(e,n)&&e[n]&&(t=ps(t,n));return t}function ps(e,t){return t?e?`${e} ${t}`:t:e}function Rd(e,t){const n=typeof t=="number"?String(t):`${t[0].toUpperCase()}${t.substring(1)}`;return`${e}${n}`}const Yl=Vn(null);function Xl(e,t,n){zn(Yl)?.perform(e,t,n)}const Ql=Vn(null);function vn(e,{scripts:t,styles:n,suspense:r,cacheErrors:o=!0}={}){const{id:i}=e,s=_e(()=>e.resolve({cacheErrors:o}),[e,o]),{snapshot:a,subscribe:u}=U(()=>({snapshot(){return e.resolved},subscribe(l){return e.subscribe(l)}}),[e]),c=Ai(u,a);if(Jl(i,{scripts:t,styles:n}),r&&c==null)throw typeof window>"u"?new Promise(l=>{setTimeout(()=>{l(s())},10)}):new Promise(l=>{setTimeout(async()=>{l(await s())},0)});return c instanceof Error?{id:i,resolved:null,error:c,loading:!1,load:s}:{id:i,resolved:c,error:null,loading:c==null,load:s}}function Jl(e,{scripts:t,styles:n}={}){const r=zn(Ql);Xl(()=>{r&&e&&r.markAsUsed(e,{scripts:t,styles:n})},r?.serverAction)}function Zl({id:e,load:t}){let n,r,o=!0;const i=e?.(),s=new Set;return{get id(){return i},get resolved(){return n},resolve:async c=>{const l=c?.cacheErrors??!0;return r?o||=l:(o=l,r=a()),r},subscribe(c){return s.add(c),()=>{s.delete(c)}}};async function a(){let c=!1;try{return n=ef(await t()),c=!0,u(),n}catch(l){const h=l instanceof Error?l:void 0;return o&&(n=h,u()),h}finally{c||(r=void 0,o=!0)}}function u(){for(const c of s)c(n)}}function ef(e){if(e==null)return null;const t=typeof e=="object"&&"default"in e?e.default:e;return t??null}function tf({name:e,fallback:t,children:n}){const r=U(()=>e?rf(e):void 0,[e]);return r===void 0?A(Ce,{fallback:t,children:n}):A(nf,{namespace:r,fallback:t,children:n},r)}class nf extends B{render(){const t=this.__v;return t&&(this.mask??=[this.props.namespace,0],t.__m=this.mask),A(Ce,{fallback:this.props.fallback,children:this.props.children})}}function rf(e){return`S${of(e)}`}function of(e){return e.length===0?"0":Array.from(e,t=>t.codePointAt(0).toString(36)).join("_")}function Nd({id:e,load:t,displayName:n,suspense:r=!0,suspenseName:o,renderLoading:i=sf,renderError:s=uf,useError:a,usePreload:u,usePrefetch:c}){const l=Zl({id:e,load:t}),h=n??cf(l.id),f="immediate",d="immediate";function v(w){const{resolved:T,load:O,loading:G,error:I}=vn(l,{scripts:f,styles:d,suspense:r});if(a?.(I,w),I)return A(L,{children:s(I)});let q=null;const Cr=T?A(T,{...w}):null;return r?Cr:(G?q=i(w):q=Cr,A(L,{children:[q,G&&A(lf,{load:O})]}))}function _(w){if(!r)return A(v,{...w});const T=i(w)??null,O=typeof o=="function"?o(w):o;
7return O===void 0?A(Ce,{fallback:T,children:A(v,{...w})}):A(tf,{name:O,fallback:T,children:A(v,{...w})})}v.displayName=`Suspender(${h})`,_.displayName=`Async(${h})`;function y(w){const{load:T}=vn(l,{styles:"eventually",scripts:"eventually",cacheErrors:!1}),O=u?.(w);return _e(()=>(T(),O?.()??Ro),[T,O])}function p(w){const{load:T}=vn(l,{styles:"soon",scripts:"soon",cacheErrors:!1}),O=c?.(w);return _e(()=>(T(),O?.()??Ro),[T,O])}function m(w){const T=y(w);return X(()=>T(),[T]),null}m.displayName=`Async.Preload(${n})`;function g(w){const T=p(w);return X(()=>T(),[T]),null}g.displayName=`Async.Prefetch(${n})`;function E(){const w=Ai(l.subscribe,()=>l.resolved);return w instanceof Error?"failed":w==null?"loading":"loaded"}const S=_;return Reflect.defineProperty(S,"load",{value:()=>l.resolve(),writable:!1}),Reflect.defineProperty(S,"preload",{value:()=>l.resolve({cacheErrors:!1}),writable:!1}),Reflect.defineProperty(S,"Preload",{value:m,writable:!1}),Reflect.defineProperty(S,"Prefetch",{value:g,writable:!1}),Reflect.defineProperty(S,"usePreload",{value:y,writable:!1}),Reflect.defineProperty(S,"usePrefetch",{value:p,writable:!1}),Reflect.defineProperty(S,"useLoadState",{value:E,writable:!1}),S}function Ro(){}function sf(){return null}const No="Component",af=/([^/]*)\.\w+$/;function cf(e){return e?af.exec(e)?.[1]??No:No}function uf(e){return null}function lf({load:e}){return X(()=>{e()},[e]),null}const Zt=Symbol.for("RemoteUi::Retain"),en=Symbol.for("RemoteUi::Release"),Ft=Symbol.for("RemoteUi::RetainedBy");class _s{constructor(){this.memoryManaged=new Set}add(t){this.memoryManaged.add(t),t[Ft].add(this),t[Zt]()}release(){for(const t of this.memoryManaged)t[Ft].delete(this),t[en]();this.memoryManaged.clear()}}function Sr(e){return!!(e&&e[Zt]&&e[en])}function yn(e,{deep:t=!0}={}){return jn(e,t,new Map)}function jn(e,t,n){const r=n.get(e);if(r!=null)return r;const o=Sr(e);if(o&&e[Zt](),n.set(e,o),t){if(Array.isArray(e)){const i=e.reduce((s,a)=>jn(a,t,n)||s,o);return n.set(e,i),i}if(Ht(e)){const i=Object.keys(e).reduce((s,a)=>jn(e[a],t,n)||s,o);return n.set(e,i),i}}return n.set(e,o),o}function Oo(e,{deep:t=!0}={}){return Bn(e,t,new Map)}function Bn(e,t,n){const r=n.get(e);if(r!=null)return r;const o=Sr(e);if(o&&e[en](),n.set(e,o),t){if(Array.isArray(e)){const i=e.reduce((s,a)=>Bn(a,t,n)||s,o);return n.set(e,i),i}if(Ht(e)){const i=Object.keys(e).reduce((s,a)=>Bn(e[a],t,n)||s,o);return n.set(e,i),i}}return o}function Ht(e){if(e==null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t==null||t===Object.prototype}const ht="_@f",gn="_@fn";function ff(e){const t=typeof self<"u"&&self.name||globalThis.location?.origin||"unknown",n=e.uuid();let r=null;const o=new Map,i=new Map,s=new Map,a=new Map;return{encode:u,decode:c,async call(l,h){const f=new _s,d=i.get(l);if(d==null){const v=a.get(l)||"unknown",_=new Error(`[${t}] You attempted to call a function that was already released. (function: ${v}, endpoint: ${n}${r!=null?`, endpoint terminated ${Date.now()-r}ms ago`:""})`);throw _.name="RemoteFunctionReleasedError",_}try{const v=Sr(d)?[f,...d[Ft]]:[f];return await d(...c(h,v))}finally{f.release()}},release(l){const h=i.get(l);h&&(i.delete(l),o.delete(h),a.set(l,h.name||"unknown"))},terminate(){r=Date.now(),o.clear(),i.clear(),s.clear(),a.clear()}};function u(l,h=new Map){if(l==null)return[l];const f=h.get(l);if(f)return f;if(typeof l=="object"){if(Array.isArray(l)){h.set(l,[void 0]);const v=[],y=[l.map(p=>{const[m,g=[]]=u(p,h);return v.push(...g),m}),v];return h.set(l,y),y}if(Ht(l)){h.set(l,[void 0]);const v=[],y=[Object.keys(l).reduce((p,m)=>{const[g,E=[]]=u(l[m],h);return v.push(...E),{...p,[m]:g}},{}),v];return h.set(l,y),y}}if(typeof l=="function"){if(o.has(l)){const y=o.get(l),p=[{[ht]:y}];return h.set(l,p),p}const v=e.uuid();o.set(l,v),i.set(v,l);const _=[{[ht]:v,[gn]:l.name||String(l).slice(0,100)}];return h.set(l,_),_}const d=[l];return h.set(l,d),d}function c(l,h){if(typeof l=="object"){if(l==null)return l;if(Array.isArray(l))return l.map(f=>c(f,h));if(ht in l){const f=l[ht];if(s.has(f))return s.get(f);let d=0,v=!1,_=null;const y=()=>{d-=1,d===0&&(v=!0,_=Date.now(),s.delete(f),e.release(f))},p=()=>{d+=1},m=new Set(h),g=gn in l&&l[gn]||"unknown",E=(...S)=>{if(v){const w=new Error(`[${t}] You attempted to call a function that was already released. (function: ${g}, endpoint: ${n}${_!=null?`, released ${Date.now()-_}ms ago`:""}, retained by ${m.size})`);throw w.name="RemoteFunctionReleasedError",w}if(!s.has(f)){const w=new Error(`[${t}] You attempted to call a function that was already revoked. (function: ${g}, endpoint: ${n}${r!=null?`, endpoint terminated ${Date.now()-r}ms ago`:""}, retained by ${m.size})`);throw w.name="RemoteFunctionRevokedError",w}return e.call(f,S)};Object.defineProperties(E,{[en]:{value:y,writable:!1},[Zt]:{value:p,writable:!1},[Ft]:{value:m,writable:!1}});for(const S of m)S.add(E);return s.set(f,E),E}if(Ht(l))return Object.keys(l).reduce((f,d)=>({...f,[d]:c(l[d],h)}),{})}return l}}const ko=0,En=1,xo=2,Mo=3,Io=5,wn=6;
7class Lo extends Error{constructor(t){const{callId:n,error:r,result:o}=t,i=r?` Error: ${String(r)}`:"",s=o==null?"":` Result: ${JSON.stringify(o)}`;super(`No resolver found for call ID: ${n}${i}${s}`),this.callId=void 0,this.error=void 0,this.result=void 0,this.groupingHash="RemoteUI::MissingResolverError",this.name="MissingResolverError",this.callId=n,this.error=r,this.result=o}}function df(e,{uuid:t=hf,createEncoder:n=ff,callable:r}={}){let o=!1,i=e;const s=new Map,a=new Map,u=pf(f,r),c=n({uuid:t,release(_){l(Mo,[_])},call(_,y,p){const m=t(),g=d(m,p),[E,S]=c.encode(y);return l(Io,[m,_,E],S),g}});return i.addEventListener("message",h),{call:u,replace(_){const y=i;i=_,y.removeEventListener("message",h),_.addEventListener("message",h)},expose(_){for(const y of Object.keys(_)){const p=_[y];typeof p=="function"?s.set(y,p):s.delete(y)}},callable(..._){if(r!=null)for(const y of _)Object.defineProperty(u,y,{value:f(y),writable:!1,configurable:!0,enumerable:!0})},terminate(){l(xo,void 0),v(),i.terminate&&i.terminate()}};function l(_,y,p){o||i.postMessage(y?[_,y]:[_],p)}async function h(_){if(o)return;const{data:y}=_;if(_f(y))switch(y[0]){case xo:{v();break}case ko:{const p=new _s,[m,g,E]=y[1],S=s.get(g);try{if(S==null)throw new Error(`No '${g}' method is exposed on this endpoint`);const[w,T]=c.encode(await S(...c.decode(E,[p])));l(En,[m,void 0,w],T)}catch(w){const{name:T,message:O,stack:G}=w;throw l(En,[m,{name:T,message:O,stack:G}]),w}finally{p.release()}break}case En:{const[p,m,g]=y[1],E=a.get(p);if(E==null)throw new Lo({callId:p,error:m,result:g});E(...y[1]),a.delete(p);break}case Mo:{const[p]=y[1];c.release(p);break}case wn:{const[p,m,g]=y[1],E=a.get(p);if(E==null)throw new Lo({callId:p,error:m,result:g});E(...y[1]),a.delete(p);break}case Io:{const[p,m,g]=y[1];try{const E=await c.call(m,g),[S,w]=c.encode(E);l(wn,[p,void 0,S],w)}catch(E){const{name:S,message:w,stack:T}=E;throw l(wn,[p,{name:S,message:w,stack:T}]),E}break}}}function f(_){return(...y)=>{if(o)return Promise.reject(new Error("You attempted to call a function on a terminated web worker."));if(typeof _!="string"&&typeof _!="number")return Promise.reject(new Error(`Can’t call a symbol method on a remote endpoint: ${_.toString()}`));const p=t(),m=d(p),[g,E]=c.encode(y);return l(ko,[p,_,g],E),m}}function d(_,y){return new Promise((p,m)=>{a.set(_,(g,E,S)=>{if(E==null)p(S&&c.decode(S,y));else{const w=new Error;Object.assign(w,E),m(w)}})})}function v(){var _;o=!0,s.clear(),a.clear(),(_=c.terminate)===null||_===void 0||_.call(c),i.removeEventListener("message",h)}}function hf(){return`${pt()}-${pt()}-${pt()}-${pt()}`}function pt(){return Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)}function pf(e,t){let n;if(t==null){if(typeof Proxy!="function")throw new Error("You must pass an array of callable methods in environments without Proxies.");const r=new Map;n=new Proxy({},{get(o,i){if(r.has(i))return r.get(i);const s=e(i);return r.set(i,s),s}})}else{n={};for(const r of t)Object.defineProperty(n,r,{value:e(r),writable:!1,configurable:!0,enumerable:!0})}return n}function _f(e){return Array.isArray(e)&&typeof e[0]=="number"&&(e[1]==null||Array.isArray(e[1]))}function Od(e){return{postMessage:(...t)=>e.postMessage(...t),addEventListener:(...t)=>e.addEventListener(...t),removeEventListener:(...t)=>e.removeEventListener(...t),terminate(){e.close()}}}const jt="remote-ui::ready";function kd(e,{terminate:t=!0,targetOrigin:n="*"}={}){var r;if(typeof window>"u")throw new Error("You can only run fromIframe() in a browser context, but no window was found.");const o=new WeakMap;let i;function s(u){u.source===e.contentWindow&&u.data===jt&&(window.removeEventListener("message",s),i())}(r=e.contentWindow)===null||r===void 0||r.postMessage(jt,n);const a=new Promise(u=>{i=u,window.addEventListener("message",s)});return{async postMessage(u,c){var l;await a,(l=e.contentWindow)===null||l===void 0||l.postMessage(u,n,c)},addEventListener(u,c){const l=h=>{h.source===e.contentWindow&&c(h)};o.set(c,l),self.addEventListener(u,l)},removeEventListener(u,c){const l=o.get(c);l!=null&&(o.delete(c),self.removeEventListener(u,l))},terminate(){window.removeEventListener("message",s),t&&e.remove()}}}function xd({targetOrigin:e="*"}={}){if(typeof self>"u"||self.parent==null)throw new Error("This does not appear to be a child iframe, because there is no parent window.");const{parent:t}=self,n=()=>t.postMessage(jt,e);window.addEventListener("message",o=>{o.source!==t||document.readyState!=="complete"||o.data===jt&&n()}),document.readyState==="complete"?n():document.addEventListener("readystatechange",()=>{document.readyState==="complete"&&n()});const r=new WeakMap;return{postMessage(o,i){t.postMessage(o,e,i)},addEventListener(o,i){const s=a=>{a.source===t&&i(a)};r.set(i,s),self.addEventListener(o,s)},removeEventListener(o,i){const s=r.get(i);s!=null&&(r.delete(i),self.removeEventListener(o,s))}}}function Md({children:e,router:t,href:n,onClick:r,...o}
7){const i=s=>{r?.(s),!(s.defaultPrevented||s.shiftKey||s.ctrlKey||s.metaKey)&&(s.preventDefault(),t.navigate(n))};return A("a",{href:t.resolve(n).href,onClick:i,...o,children:e})}function Id(e,t){return mf(t),A(vf,{routes:t,router:e})}function mf(e){const t=zn(hs)??void 0;X(()=>{if(t!=null)return t.registerRoutes(e)},[t,e])}const vf=or(function e({routes:t,router:n,parentMatchedPath:r}){let o;for(const d of t){const v=vr(n.currentUrl.value,n.prefix,d.match,r);if(v!=null){o={...v,route:d};break}}if(o==null)return null;const{route:i,nextMatchedPathPrefix:s,matched:a}=o,{render:u,redirect:c,children:l}=i,h=s??r;let f=null;return u?f=u({url:n.currentUrl.value,matched:a,children:l&&A(e,{routes:l,router:n,parentMatchedPath:h})}):l?f=A(e,{routes:l,router:n,parentMatchedPath:h}):c&&n.redirect(c),f});function yf(e){return typeof window>"u"||typeof e!="string"?void 0:new URL(e,window.location.href)}function gf(e){const t=URL.createObjectURL(new Blob([`importScripts(${JSON.stringify(e.href)})`])),n=new Worker(t),r=n.terminate.bind(n);return n.terminate=()=>{URL.revokeObjectURL(t),r()},n}const br=new WeakMap;function Ld(e){const t=yf(e);function n({createMessenger:r=gf,...o}={}){if(t){const i=df(r(t),o),{call:s}=i;return br.set(s,i),s}if(typeof e=="function")return new Proxy({},{get(i,s){return async(...a)=>(await e())[s](...a)}});if(typeof window>"u")return new Proxy({},{get(i,s){return()=>{throw new Error("You can’t call a method on a worker on the server.")}}});throw new Error("Could not create a suitable fallback")}return Reflect.defineProperty(n,"url",{value:t}),n}function Dd(e,t){const n=ms(e);return n?.expose(t),n!=null}function Ud(e){const t=ms(e);return t?.terminate(),br.delete(e),t!=null}function ms(e){return br.get(e)}const Ef=0,wf=1,Sf=2,bf=3,Af=4,Cf=0,Bt=1,Fd=2,vs=3;function Tf(e){return e!=null&&e.kind===vs}const Se=Symbol("RootId");function $f({mount:e,insertChild:t,removeChild:n,updateProps:r,updateText:o}
7){const i=new Map([[Ef,e],[Sf,n],[wf,t],[Af,r],[bf,o]]);return(s,...a)=>i.get(s)(...a)}function Hd(){const e=new Set,t=new Map,n=new Map;let r=null,o="unmounted";const i={id:Se,kind:Cf,children:[],version:0},s=new Map([[Se,i]]),a=$f({mount:d=>{const v=s.get(Se),_=d.map(y=>Ve(y,Sn));v.version+=1,v.children=_,o="mounted";for(const y of _)yn(y),h(y);l(v).then(()=>{c("mount")})},insertChild:(d,v,_,y)=>{const p=s.get(d??Se),{children:m}=p;let g,E;if(d===y?g=p:y!==!1&&(g=s.get(y??Se)),g){const S=_.id,w=g.children,T=w.findIndex(G=>G.id===S),[O]=w.splice(T,1);E=O,d!==y&&(g.version+=1,l(g))}else E=Ve(_,Sn),yn(E),h(E);v===m.length?m.push(E):m.splice(v,0,E),p.version+=1,l(p)},removeChild:(d,v)=>{const _=s.get(d??Se),{children:y}=_,[p]=y.splice(v,1);p&&(_.version+=1,f(p),l(_).then(()=>{Oo(p)}))},updateProps:(d,v)=>{const _=s.get(d),y={..._.props};yn(v),Object.keys(v).forEach(p=>{const m=v[p],g=y[p];if(bn(g)&&f(g),Ar(m)){const E=Ve(m,Sn);h(E)}}),Object.assign(_.props,v),_.version+=1,l(_).then(()=>{for(const p of Object.keys(v))Oo(y[p])})},updateText:(d,v)=>{const _=s.get(d);_.text=v,_.version+=1,l(_)}});return{get state(){return o},receive:a,attached:{root:i,get({id:d}){var v;return(v=s.get(d))!==null&&v!==void 0?v:null},subscribe({id:d},v){let _=n.get(d);return _==null&&(_=new Set,n.set(d,_)),_.add(v),()=>{const y=n.get(d);y&&(y.delete(v),y.size===0&&n.delete(d))}}},flush:u,on(d,v){let _=t.get(d);return _==null&&(_=new Set,t.set(d,_)),_.add(v),()=>{const y=t.get(d);y&&(y.delete(v),y.size===0&&t.delete(d))}}};function u(){var d;return(d=r)!==null&&d!==void 0?d:Promise.resolve()}function c(d){const v=t.get(d);if(v)for(const _ of v)_()}function l(d){var v;return r=(v=r)!==null&&v!==void 0?v:new Promise(_=>{setTimeout(()=>{const y=[...e];r=null,e.clear();for(const p of y){const m=n.get(p.id);if(m)for(const g of m)g(p)}_()},0)}),e.add(d),r}function h(d){if(s.set(d.id,d),d.kind===Bt&&"props"in d){const{props:v={}}=d;Object.keys(v).forEach(_=>{const y=v[_];bn(y)&&h(y)})}if("children"in d)for(const v of d.children)h(v)}
7function f(d){if(s.delete(d.id),d.kind===Bt&&"props"in d){const{props:v={}}=d;Object.keys(v).forEach(_=>{const y=v[_];bn(y)&&f(y)})}if("children"in d)for(const v of d.children)f(v)}}function Sn(e){return e.version=0,e}function Ve(e,t){if((e.kind===vs||e.kind===Bt)&&e.children.forEach(n=>Ve(n,t)),e.kind===Bt&&"props"in e){const{props:n}=e;for(const r of Object.keys(n)){const o=n[r];Ar(o)&&(n[r]=Ve(o,t))}}return t(e)}function Ar(e){return Tf(e)&&"id"in e&&"children"in e}function bn(e){return Ar(e)&&"version"in e}function Pf(e){typeof window>"u"||(typeof window.requestIdleCallback=="function"?window.requestIdleCallback(e):window.setTimeout(e,0))}function jd(e){const t=Y(!1);t.current||(t.current=!0,Pf(()=>{Promise.resolve(e()).catch(()=>{})}))}function Rf(){const e=[];return Ka()&&e.push("analytics"),Ba()&&e.push("marketing"),qa()&&e.push("sale_of_data"),Ga()&&e.push("preferences"),e}function Nf(e,t){if(t==="v1"){const n=Rf();return{...e,metadata:{...e?.metadata,consent:n,consent_provider:"consent-tracking-api",consent_version:t}}}else throw new tn(t||"unknown")}class Bd extends bl{async annotateEvent(t){return Promise.resolve(Nf(t,this.version))}getRequiredConsentForEmission(){if(this.version==="v1")return["anal
7ytics","marketing"];throw new tn(this.version||"unknown")}}class tn extends Error{constructor(t){super(`Version ${t} is not supported by the consent-tracking-api provider`),this.name="MonorailConsentTrackingApiProviderVersionError",Object.setPrototypeOf(this,tn.prototype)}}export{Ec as $,Y as A,Ef as B,Bt as C,zf as D,Fd as E,ed as F,et as G,io as H,Mc as I,oo as J,vs as K,kc as L,xn as M,Ts as N,eu as O,xf as P,or as Q,yn as R,L as S,U as T,Jf as U,$c as V,Rd as W,Vn as X,Yf as Y,Xt as Z,Kt as _,Qf as a,Sd as a$,td as a0,Ai as a1,B as a2,Ld as a3,Oo as a4,Dd as a5,Ud as a6,od as a7,df as a8,kd as a9,jd as aA,ad as aB,Br as aC,F as aD,qa as aE,Ga as aF,Ba as aG,Ka as aH,Gf as aI,Bf as aJ,jf as aK,ja as aL,qf as aM,Kf as aN,Hf as aO,sd as aP,id as aQ,Mu as aR,vd as aS,yd as aT,gd as aU,Ed as aV,wd as aW,_d as aX,md as aY,bd as aZ,Ad as a_,fd as aa,ld as ab,cd as ac,xd as ad,If as ae,Uo as af,ut as ag,Sc as ah,hc as ai,dn as aj,hd as ak,Mf as al,Bd as am,$d as an,Dt as ao,Lt as ap,qe as aq,je as ar,Cs as as,Tt as at,te as au,kf as av,Pf as aw,bn as ax,Hd as ay,ud as az,Zf as b,Td as b0,bl as b1,Vf as b2,Lf as b3,Ff as b4,Of as b5,b as b6,Od as b7,Ce as b8,Oc as b9,Md as ba,Cd as bb,Pd as bc,Zc as bd,Id as be,Xf as bf,As as bg,Wf as bh,Vc as c,Nd as d,Zn as e,Df as f,Vl as g,X as h,Pc as i,se as j,ze as k,rd as l,k as m,Xn as n,Rn as o,Uf as p,_e as q,nd as r,Rc as s,Af as t,A as u,bf as v,Sf as w,zn as x,ie as y,wf as z};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.