!function(){"use strict";const e=(e,t)=>{};function t(e,t){var n;if(!window.customElements)return;customElements.get(e)||(null===(n=Reflect.defineProperty)||void 0===n||n.call(Reflect,t,"componentVersion",{value:"vanilla"}),customElements.define(e,t))}function n(e){var t,n;return Boolean(null===(n=null===(t=window.Shopify)||void 0===t?void 0:t.SignInWithShop)||void 0===n?void 0:n[`${e}Called`])}function i(e){window.Shopify||(window.Shopify={}),window.Shopify.SignInWithShop||(window.Shopify.SignInWithShop={}),window.Shopify.SignInWithShop[`${e}Called`]=!0}function a(e,t,n,i){return new(n||(n=Promise))((function(a,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function r(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,r)}l((i=i.apply(e,t||[])).next())}))}function o(e,t,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)}function s(e,t,n,i,a){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?a.call(e,n):a?a.value=n:t.set(e,n),n}"function"==typeof SuppressedError&&SuppressedError;class r{constructor(e){this.emailInput=e,this.passwordInput=this.findPasswordInput()}start(){var e;this.emailInput.addEventListener("input",this.trackEmailChange.bind(this)),null===(e=this.passwordInput)||void 0===e||e.addEventListener("input",this.trackPasswordChange.bind(this))}stop(){var e;this.emailInput.removeEventListener("input",this.trackEmailChange),null===(e=this.passwordInput)||void 0===e||e.removeEventListener("input",this.trackPasswordChange)}isFilledWithPasswordManager(){if(void 0!==this.emailLastUpdated&&void 0!==this.passwordLastUpdated){return Math.abs(this.emailLastUpdated-this.passwordLastUpdated)<100}}trackEmailChange(e){this.emailLastUpdated=e.timeStamp}trackPasswordChange(e){this.passwordLastUpdated=e.timeStamp}findPasswordInput(){var e;return null===(e=this.emailInput.form)||void 0===e?void 0:e.querySelector('input[type="password"]')}}function l(e){const t=e?"sessionStorage":"localStorage";try{const e=window[t],n="__storage_test__";return e.setItem(n,n),e.removeItem(n),!0}catch(e){return!1}}const c={following:"shop_followed",modalDismissed:"sign_in_with_shop_modal_dismissed"};class p{constructor(e,t){this.key=e,this.defaultValue=t,this.namespacedKey=`signInWithShop:${e}`,this.currentValue=this.initAndBackfillCurrentValue()}get value(){return this.currentValue}set(e){this.currentValue=e,function(e,t,{session:n}={}){!!l(n)&&window[n?"sessionStorage":"localStorage"].setItem(e,t)}(this.namespacedKey,JSON.stringify(this.currentValue))}initAndBackfillCurrentValue(){const e=function(e,{session:t}={}){return l(t)?window[t?"sessionStorage":"localStorage"].getItem(e):null}(this.namespacedKey);if(!e){const e=function(e){try{const t=new RegExp(`(${e})=([^;]+)`).exec(document.cookie);return t?t[2]:null}catch(e){return null}}(c[this.key]);if("string"==typeof e){const t="true"===e;return this.set(t),t}return this.defaultValue}try{return JSON.parse(e)}catch(e){return this.defaultValue}}}var d,u;class m{constructor(e,t){d.set(this,void 0),u.set(this,void 0),e&&(s(this,d,e,"f"),s(this,u,(e=>{t(e.target.value)}),"f"),o(this,d,"f").addEventListener("input",o(this,u,"f")))}destroy(){o(this,d,"f")&&o(this,u,"f")&&o(this,d,"f").removeEventListener("input",o(this,u,"f"))}}d=new WeakMap,u=new WeakMap;const h="1.0.32",_="form[data-login-with-shop-sign-in]",g="form[data-login-with-shop-sign-up]",f='input[name="customer[email]"',b='input[name="customer[first_name]"',y='input[name="customer[last_name]"',v=`${_} input[type="email"],${_} ${f}`,k=`${g} input[type="email"],${g} ${f}`,w="2147483647";function P(e=window.location.origin,t){const n=`${e}/services/login_with_shop/finalize`;return fetch(n).catch(t)}const S=[];for(let e=0;e<256;++e)S.push((e+256).toString(16).slice(1));let z;const j=new Uint8Array(16);var C={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function x(e,t,n){if(C.randomUUID&&!t&&!e)return C.randomUUID();const i=(e=e||{}).random??e.rng?.()??function(){if(!z){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");z=crypto.getRandomValues.bind(crypto)}return z(j)}();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=15&i[6]|64,i[8]=63&i[8]|128,function(e,t=0){return(S[e[t+0]]+S[e[t+1]]+S[e[t+2]]+S[e[t+3]]+"-"+S[e[t+4]]+S[e[t+5]]+"-"+S[e[t+6]]+S[e[t+7]]+"-"+S[e[t+8]]+S[e[t+9]]+"-"+S[e[t+10]]+S[e[t+11]]+S[e[t+12]]+S[e[t+13]]+S[e[t+14]]+S[e[t+15]]).toLowerCase()}(i)}const L=()=>({width:window.innerWidth||document.documentElement.clientWidth,height:window.innerHeight||document.documentElement.clientHeight});function A({url:e,width:t,height:n,windowName:i,onClose:a}){const o={left:void 0===window.screenLeft?window.screenX:window.screenLeft,top:void 0===window.screenTop?window.screenY:window.screenTop},s=L(),r=s.width||screen.width,l=s.height||screen.height,c=screen.width&&window.screen.availWidth?screen.width/window.screen.availWidth:1,p=(r-t)/2/c+o.left,d=(l-n)/2/c+o.top,u=window.open(e,i,`scrollbars=yes,width=${t},height=${n},top=${d},left=${p}`);if(!u)return null;if(u.focus(),a){const e=setInterval((()=>{u.closed&&(a(),clearInterval(e))}),1e3)}return u}function T(e,t,n,i){(i||e.getAttribute(t)!==n)&&!0!==e[t]&&e.setAttribute(t,n)}function E(e,t,n){const i=n.includes(t);e&&!i?n.push(t):!e&&i&&n.splice(n.indexOf(t),1)}function I(){return x()}function M(){return a(this,arguments,void 0,(function*(e=location.origin){const t=fetch(`${e}/meta.json`);try{const e=yield t;return yield e.json()}catch(e){return null}}))}function O(e){try{return new URL(e).hostname}catch(t){return console.error(`[Shop Pay] Store URL (${e}) is not valid`,t),null}}function N(e,t){let n;return(...i)=>{clearTimeout(n),n=setTimeout((()=>{e(...i)}),t)}}function q(){if(!function(){const e=window.navigator.userAgent,t=Boolean(e.match(/iPad/i))||Boolean(e.match(/iPhone/i)),n=Boolean(e.match(/WebKit/i));return t&&n&&!e.match(/CriOS/i)}())return;const e="shop-pay-safari-unzoom",t=document.getElementById(e);if(t)return t.focus();const n=document.createElement("input");n.id=e,n.style.fontSize="16px",n.style.width="1px",n.style.height="1px",n.style.position="fixed",n.style.bottom="-1000px",n.style.right="-1000px",n.style.transform="translate(1000px, 1000px)",n.setAttribute("aria-hidden","true"),document.body.appendChild(n),n.focus({preventScroll:!0})}function R(e){return null===e||""===e.trim()}function D(){var e;const t=null===(e=document.querySelector("script#shop-js-features"))||void 0===e?void 0:e.innerHTML;return t?JSON.parse(t):{}}function B(){var e;const t=null===(e=document.querySelector("script#shop-js-analytics"))||void 0===e?void 0:e.innerHTML;return t?JSON.parse(t):{}}const F=/^[^@]+@[^@]+\.[^@]{2,}$/i;function V(e){return!!e&&RegExp(F).test(e)}function $({selector:e,onElementFound:t}){const n=new WeakSet,i=new MutationObserver((e=>{let t=!1;for(const n of e)if(n.addedNodes.length>0){t=!0;break}t&&o()}));function o(){document.querySelectorAll(e).forEach((e=>{n.has(e)||(t(e),n.add(e))}))}return function(){a(this,void 0,void 0,(function*(){yield function(){if(document.body)return Promise.resolve();return new Promise((e=>{window.addEventListener("DOMContentLoaded",(()=>e()))}))}(),o(),i.observe(document.body||document.documentElement,{childList:!0,subtree:!0})}))}(),i}function W({onVisible:e,onFallback:t}){const n=new IntersectionObserver((a=>{for(const o of a){const{target:a,isIntersecting:s}=o;s&&(i(a)?e(a):t(a),n.unobserve(a))}}),{threshold:1});function i(e){let t=e;for(;t;){if(!["","1"].includes(getComputedStyle(t).opacity))return!1;t=t.parentElement}return!0}return n}function U(e,t=!0){return Boolean(e)}function H(e,t,n){const i=n.querySelector(`#${t}`),a=null==i?void 0:i.parentElement,o=null!=a?a:document.createElement("div");o.innerHTML=e,o.style.display="none","innerHTML"in n&&(n.innerHTML=""),n.prepend(o);const s=n.querySelector(`#${t}`).content;n.appendChild(s.cloneNode(!0))}const K=Math.min,Z=Math.max,G=Math.round,J=Math.floor,Y=e=>({x:e,y:e}),Q={left:"right",right:"left",bottom:"top",top:"bottom"},X={start:"end",end:"start"};function ee(e,t,n){return Z(e,K(t,n))}function te(e,t){return"function"==typeof e?e(t):e}function ne(e){return e.split("-")[0]}function ie(e){return e.split("-")[1]}function ae(e){return"x"===e?"y":"x"}function oe(e){return"y"===e?"height":"width"}function se(e){return["top","bottom"].includes(ne(e))?"y":"x"}function re(e){return ae(se(e))}function le(e){return e.replace(/start|end/g,(e=>X[e]))}function ce(e){return e.replace(/left|right|bottom|top/g,(e=>Q[e]))}function pe(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function de(e){const{x:t,y:n,width:i,height:a}=e;return{width:i,height:a,top:n,left:t,right:t+i,bottom:n+a,x:t,y:n}}function ue(e,t,n){let{reference:i,floating:a}=e;const o=se(t),s=re(t),r=oe(s),l=ne(t),c="y"===o,p=i.x+i.width/2-a.width/2,d=i.y+i.height/2-a.height/2,u=i[r]/2-a[r]/2;let m;switch(l){case"top":m={x:p,y:i.y-a.height};break;case"bottom":m={x:p,y:i.y+i.height};break;case"right":m={x:i.x+i.width,y:d};break;case"left":m={x:i.x-a.width,y:d};break;default:m={x:i.x,y:i.y}}switch(ie(t)){case"start":m[s]-=u*(n&&c?-1:1);break;case"end":m[s]+=u*(n&&c?-1:1)}return m}async function me(e,t){var n;void 0===t&&(t={});const{x:i,y:a,platform:o,rects:s,elements:r,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:p="viewport",elementContext:d="floating",altBoundary:u=!1,padding:m=0}=te(t,e),h=pe(m),_=r[u?"floating"===d?"reference":"floating":d],g=de(await o.getClippingRect({element:null==(n=await(null==o.isElement?void 0:o.isElement(_)))||n?_:_.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(r.floating)),boundary:c,rootBoundary:p,strategy:l})),f="floating"===d?{x:i,y:a,width:s.floating.width,height:s.floating.height}:s.reference,b=await(null==o.getOffsetParent?void 0:o.getOffsetParent(r.floating)),y=await(null==o.isElement?void 0:o.isElement(b))&&await(null==o.getScale?void 0:o.getScale(b))||{x:1,y:1},v=de(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:r,rect:f,offsetParent:b,strategy:l}):f);return{top:(g.top-v.top+h.top)/y.y,bottom:(v.bottom-g.bottom+h.bottom)/y.y,left:(g.left-v.left+h.left)/y.x,right:(v.right-g.right+h.right)/y.x}}function he(){return"undefined"!=typeof window}function _e(e){return be(e)?(e.nodeName||"").toLowerCase():"#document"}function ge(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function fe(e){var t;return null==(t=(be(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function be(e){return!!he()&&(e instanceof Node||e instanceof ge(e).Node)}function ye(e){return!!he()&&(e instanceof Element||e instanceof ge(e).Element)}function ve(e){return!!he()&&(e instanceof HTMLElement||e instanceof ge(e).HTMLElement)}function ke(e){return!(!he()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof ge(e).ShadowRoot)}function we(e){const{overflow:t,overflowX:n,overflowY:i,display:a}=xe(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!["inline","contents"].includes(a)}function Pe(e){return["table","td","th"].includes(_e(e))}function Se(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function ze(e){const t=je(),n=ye(e)?xe(e):e;return["transform","translate","scale","rotate","perspective"].some((e=>!!n[e]&&"none"!==n[e]))||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","translate","scale","rotate","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function je(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Ce(e){return["html","body","#document"].includes(_e(e))}function xe(e){return ge(e).getComputedStyle(e)}function Le(e){return ye(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ae(e){if("html"===_e(e))return e;const t=e.assignedSlot||e.parentNode||ke(e)&&e.host||fe(e);return ke(t)?t.host:t}function Te(e){const t=Ae(e);return Ce(t)?e.ownerDocument?e.ownerDocument.body:e.body:ve(t)&&we(t)?t:Te(t)}function Ee(e,t,n){var i;void 0===t&&(t=[]),void 0===n&&(n=!0);const a=Te(e),o=a===(null==(i=e.ownerDocument)?void 0:i.body),s=ge(a);if(o){const e=Ie(s);return t.concat(s,s.visualViewport||[],we(a)?a:[],e&&n?Ee(e):[])}return t.concat(a,Ee(a,[],n))}function Ie(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Me(e){const t=xe(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const a=ve(e),o=a?e.offsetWidth:n,s=a?e.offsetHeight:i,r=G(n)!==o||G(i)!==s;return r&&(n=o,i=s),{width:n,height:i,$:r}}function Oe(e){return ye(e)?e:e.contextElement}function Ne(e){const t=Oe(e);if(!ve(t))return Y(1);const n=t.getBoundingClientRect(),{width:i,height:a,$:o}=Me(t);let s=(o?G(n.width):n.width)/i,r=(o?G(n.height):n.height)/a;return s&&Number.isFinite(s)||(s=1),r&&Number.isFinite(r)||(r=1),{x:s,y:r}}const qe=Y(0);function Re(e){const t=ge(e);return je()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:qe}function De(e,t,n,i){void 0===t&&(t=!1),void 0===n&&(n=!1);const a=e.getBoundingClientRect(),o=Oe(e);let s=Y(1);t&&(i?ye(i)&&(s=Ne(i)):s=Ne(e));const r=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==ge(e))&&t}(o,n,i)?Re(o):Y(0);let l=(a.left+r.x)/s.x,c=(a.top+r.y)/s.y,p=a.width/s.x,d=a.height/s.y;if(o){const e=ge(o),t=i&&ye(i)?ge(i):i;let n=e,a=Ie(n);for(;a&&i&&t!==n;){const e=Ne(a),t=a.getBoundingClientRect(),i=xe(a),o=t.left+(a.clientLeft+parseFloat(i.paddingLeft))*e.x,s=t.top+(a.clientTop+parseFloat(i.paddingTop))*e.y;l*=e.x,c*=e.y,p*=e.x,d*=e.y,l+=o,c+=s,n=ge(a),a=Ie(n)}}return de({width:p,height:d,x:l,y:c})}function Be(e,t){const n=Le(e).scrollLeft;return t?t.left+n:De(fe(e)).left+n}function Fe(e,t,n){void 0===n&&(n=!1);const i=e.getBoundingClientRect();return{x:i.left+t.scrollLeft-(n?0:Be(e,i)),y:i.top+t.scrollTop}}function Ve(e,t,n){let i;if("viewport"===t)i=function(e,t){const n=ge(e),i=fe(e),a=n.visualViewport;let o=i.clientWidth,s=i.clientHeight,r=0,l=0;if(a){o=a.width,s=a.height;const e=je();(!e||e&&"fixed"===t)&&(r=a.offsetLeft,l=a.offsetTop)}return{width:o,height:s,x:r,y:l}}(e,n);else if("document"===t)i=function(e){const t=fe(e),n=Le(e),i=e.ownerDocument.body,a=Z(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),o=Z(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let s=-n.scrollLeft+Be(e);const r=-n.scrollTop;return"rtl"===xe(i).direction&&(s+=Z(t.clientWidth,i.clientWidth)-a),{width:a,height:o,x:s,y:r}}(fe(e));else if(ye(t))i=function(e,t){const n=De(e,!0,"fixed"===t),i=n.top+e.clientTop,a=n.left+e.clientLeft,o=ve(e)?Ne(e):Y(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:a*o.x,y:i*o.y}}(t,n);else{const n=Re(e);i={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return de(i)}function $e(e,t){const n=Ae(e);return!(n===t||!ye(n)||Ce(n))&&("fixed"===xe(n).position||$e(n,t))}function We(e,t,n){const i=ve(t),a=fe(t),o="fixed"===n,s=De(e,!0,o,t);let r={scrollLeft:0,scrollTop:0};const l=Y(0);if(i||!i&&!o)if(("body"!==_e(t)||we(a))&&(r=Le(t)),i){const e=De(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else a&&(l.x=Be(a));const c=!a||i||o?Y(0):Fe(a,r);return{x:s.left+r.scrollLeft-l.x-c.x,y:s.top+r.scrollTop-l.y-c.y,width:s.width,height:s.height}}function Ue(e){return"static"===xe(e).position}function He(e,t){if(!ve(e)||"fixed"===xe(e).position)return null;if(t)return t(e);let n=e.offsetParent;return fe(e)===n&&(n=n.ownerDocument.body),n}function Ke(e,t){const n=ge(e);if(Se(e))return n;if(!ve(e)){let t=Ae(e);for(;t&&!Ce(t);){if(ye(t)&&!Ue(t))return t;t=Ae(t)}return n}let i=He(e,t);for(;i&&Pe(i)&&Ue(i);)i=He(i,t);return i&&Ce(i)&&Ue(i)&&!ze(i)?n:i||function(e){let t=Ae(e);for(;ve(t)&&!Ce(t);){if(ze(t))return t;if(Se(t))return null;t=Ae(t)}return null}(e)||n}const Ze={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:i,strategy:a}=e;const o="fixed"===a,s=fe(i),r=!!t&&Se(t.floating);if(i===s||r&&o)return n;let l={scrollLeft:0,scrollTop:0},c=Y(1);const p=Y(0),d=ve(i);if((d||!d&&!o)&&(("body"!==_e(i)||we(s))&&(l=Le(i)),ve(i))){const e=De(i);c=Ne(i),p.x=e.x+i.clientLeft,p.y=e.y+i.clientTop}const u=!s||d||o?Y(0):Fe(s,l,!0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+p.x+u.x,y:n.y*c.y-l.scrollTop*c.y+p.y+u.y}},getDocumentElement:fe,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:i,strategy:a}=e;const o="clippingAncestors"===n?Se(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let i=Ee(e,[],!1).filter((e=>ye(e)&&"body"!==_e(e))),a=null;const o="fixed"===xe(e).position;let s=o?Ae(e):e;for(;ye(s)&&!Ce(s);){const t=xe(s),n=ze(s);n||"fixed"!==t.position||(a=null),(o?!n&&!a:!n&&"static"===t.position&&a&&["absolute","fixed"].includes(a.position)||we(s)&&!n&&$e(e,s))?i=i.filter((e=>e!==s)):a=t,s=Ae(s)}return t.set(e,i),i}(t,this._c):[].concat(n),s=[...o,i],r=s[0],l=s.reduce(((e,n)=>{const i=Ve(t,n,a);return e.top=Z(i.top,e.top),e.right=K(i.right,e.right),e.bottom=K(i.bottom,e.bottom),e.left=Z(i.left,e.left),e}),Ve(t,r,a));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:Ke,getElementRects:async function(e){const t=this.getOffsetParent||Ke,n=this.getDimensions,i=await n(e.floating);return{reference:We(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Me(e);return{width:t,height:n}},getScale:Ne,isElement:ye,isRTL:function(e){return"rtl"===xe(e).direction}};function Ge(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Je(e,t,n,i){void 0===i&&(i={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:r="function"==typeof IntersectionObserver,animationFrame:l=!1}=i,c=Oe(e),p=a||o?[...c?Ee(c):[],...Ee(t)]:[];p.forEach((e=>{a&&e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)}));const d=c&&r?function(e,t){let n,i=null;const a=fe(e);function o(){var e;clearTimeout(n),null==(e=i)||e.disconnect(),i=null}return function s(r,l){void 0===r&&(r=!1),void 0===l&&(l=1),o();const c=e.getBoundingClientRect(),{left:p,top:d,width:u,height:m}=c;if(r||t(),!u||!m)return;const h={rootMargin:-J(d)+"px "+-J(a.clientWidth-(p+u))+"px "+-J(a.clientHeight-(d+m))+"px "+-J(p)+"px",threshold:Z(0,K(1,l))||1};let _=!0;function g(t){const i=t[0].intersectionRatio;if(i!==l){if(!_)return s();i?s(!1,i):n=setTimeout((()=>{s(!1,1e-7)}),1e3)}1!==i||Ge(c,e.getBoundingClientRect())||s(),_=!1}try{i=new IntersectionObserver(g,{...h,root:a.ownerDocument})}catch(e){i=new IntersectionObserver(g,h)}i.observe(e)}(!0),o}(c,n):null;let u,m=-1,h=null;s&&(h=new ResizeObserver((e=>{let[i]=e;i&&i.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),c&&!l&&h.observe(c),h.observe(t));let _=l?De(e):null;return l&&function t(){const i=De(e);_&&!Ge(_,i)&&n();_=i,u=requestAnimationFrame(t)}(),n(),()=>{var e;p.forEach((e=>{a&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(u)}}const Ye=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:a,y:o,placement:s,middlewareData:r}=t,l=await async function(e,t){const{placement:n,platform:i,elements:a}=e,o=await(null==i.isRTL?void 0:i.isRTL(a.floating)),s=ne(n),r=ie(n),l="y"===se(n),c=["left","top"].includes(s)?-1:1,p=o&&l?-1:1,d=te(t,e);let{mainAxis:u,crossAxis:m,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return r&&"number"==typeof h&&(m="end"===r?-1*h:h),l?{x:m*p,y:u*c}:{x:u*c,y:m*p}}(t,e);return s===(null==(n=r.offset)?void 0:n.placement)&&null!=(i=r.arrow)&&i.alignmentOffset?{}:{x:a+l.x,y:o+l.y,data:{...l,placement:s}}}}},Qe=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:r={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=te(e,t),c={x:n,y:i},p=await me(t,l),d=se(ne(a)),u=ae(d);let m=c[u],h=c[d];if(o){const e="y"===u?"bottom":"right";m=ee(m+p["y"===u?"top":"left"],m,m-p[e])}if(s){const e="y"===d?"bottom":"right";h=ee(h+p["y"===d?"top":"left"],h,h-p[e])}const _=r.fn({...t,[u]:m,[d]:h});return{..._,data:{x:_.x-n,y:_.y-i}}}}},Xe=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:a,middlewareData:o,rects:s,initialPlacement:r,platform:l,elements:c}=t,{mainAxis:p=!0,crossAxis:d=!0,fallbackPlacements:u,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:_=!0,...g}=te(e,t);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const f=ne(a),b=se(r),y=ne(r)===r,v=await(null==l.isRTL?void 0:l.isRTL(c.floating)),k=u||(y||!_?[ce(r)]:function(e){const t=ce(e);return[le(e),t,le(t)]}(r)),w="none"!==h;!u&&w&&k.push(...function(e,t,n,i){const a=ie(e);let o=function(e,t,n){const i=["left","right"],a=["right","left"],o=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?a:i:t?i:a;case"left":case"right":return t?o:s;default:return[]}}(ne(e),"start"===n,i);return a&&(o=o.map((e=>e+"-"+a)),t&&(o=o.concat(o.map(le)))),o}(r,_,h,v));const P=[r,...k],S=await me(t,g),z=[];let j=(null==(i=o.flip)?void 0:i.overflows)||[];if(p&&z.push(S[f]),d){const e=function(e,t,n){void 0===n&&(n=!1);const i=ie(e),a=re(e),o=oe(a);let s="x"===a?i===(n?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=ce(s)),[s,ce(s)]}(a,s,v);z.push(S[e[0]],S[e[1]])}if(j=[...j,{placement:a,overflows:z}],!z.every((e=>e<=0))){var C,x;const e=((null==(C=o.flip)?void 0:C.index)||0)+1,t=P[e];if(t)return{data:{index:e,overflows:j},reset:{placement:t}};let n=null==(x=j.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:x.placement;if(!n)switch(m){case"bestFit":{var L;const e=null==(L=j.filter((e=>{if(w){const t=se(e.placement);return t===b||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:L[0];e&&(n=e);break}case"initialPlacement":n=r}if(a!==n)return{reset:{placement:n}}}return{}}}},et=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:i,placement:a,rects:o,platform:s,elements:r,middlewareData:l}=t,{element:c,padding:p=0}=te(e,t)||{};if(null==c)return{};const d=pe(p),u={x:n,y:i},m=re(a),h=oe(m),_=await s.getDimensions(c),g="y"===m,f=g?"top":"left",b=g?"bottom":"right",y=g?"clientHeight":"clientWidth",v=o.reference[h]+o.reference[m]-u[m]-o.floating[h],k=u[m]-o.reference[m],w=await(null==s.getOffsetParent?void 0:s.getOffsetParent(c));let P=w?w[y]:0;P&&await(null==s.isElement?void 0:s.isElement(w))||(P=r.floating[y]||o.floating[h]);const S=v/2-k/2,z=P/2-_[h]/2-1,j=K(d[f],z),C=K(d[b],z),x=j,L=P-_[h]-C,A=P/2-_[h]/2+S,T=ee(x,A,L),E=!l.arrow&&null!=ie(a)&&A!==T&&o.reference[h]/2-(An&&(m=n)}if(c){var f,b;const e="y"===u?"width":"height",t=["top","left"].includes(ne(a)),n=o.reference[d]-o.floating[e]+(t&&(null==(f=s.offset)?void 0:f[d])||0)+(t?0:g.crossAxis),i=o.reference[d]+o.reference[e]+(t?0:(null==(b=s.offset)?void 0:b[d])||0)-(t?g.crossAxis:0);hi&&(h=i)}return{[u]:m,[d]:h}}}},nt=(e,t,n)=>{const i=new Map,a={platform:Ze,...n},o={...a.platform,_c:i};return(async(e,t,n)=>{const{placement:i="bottom",strategy:a="absolute",middleware:o=[],platform:s}=n,r=o.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:p,y:d}=ue(c,i,l),u=i,m={},h=0;for(let n=0;n\n.sda-overlay {\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n background-color: rgba(0, 0, 0, 0.5);\n z-index: ${w} !important;\n will-change: opacity, transform;\n}\n\n.sda-modal {\n background-color: #fff;\n min-width: 340px;\n border-radius: 20px;\n padding: 0;\n will-change: opacity, transform, overflow;\n}\n\n.sda-modal:focus {\n outline: 0;\n}\n\n.sda-modal.disable-popup {\n ${ot}\n}\n\n.${it} {\n padding: 16px 16px 8px;\n display: flex;\n align-items: center;\n}\n\n.${it} shop-logo {\n flex: 1 0 1px;\n display: flex;\n line-height: 18px;\n}\n\n.sda-modal-close-button {\n border: none;\n border-radius: 50%;\n position: relative;\n padding: 0;\n cursor: pointer;\n display: flex;\n}\n\n.sda-modal-close-button:focus,\n.sda-modal-close-button:hover {\n color: #E3E3E3;\n outline: none;\n\n --icon-color: #E3E3E3;\n}\n\n.sda-modal-close-button:before {\n position: absolute;\n content: '';\n top: 1px;\n left: 1px;\n right: 1px;\n bottom: 1px;\n border-radius: 50%;\n background-color: #707070;\n}\n.sda-modal-close-button shop-close-icon {\n pointer-events: none;\n z-index: 1;\n}\n\n.${it}.${at} {\n display: block;\n padding: 0;\n height: 0;\n}\n\n.${it}.${at} shop-logo {\n display: none;\n}\n\n.${it}.${at} .sda-modal-close-button {\n position: absolute;\n top: 26px;\n right: 16px;\n}\n\n.sda-landing {\n width: 340px;\n margin: auto;\n}\n\n.sda-hidden {\n height: 0 !important;\n border: 0;\n padding: 0;\n margin: 0;\n visibility: hidden;\n overflow: hidden;\n}\n\n.focus-trap {\n border: 0;\n clip: rect(0, 0, 0, 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n\n@media (forced-colors: active) {\n .sda-modal {\n border: 1px solid;\n }\n}\n\n.arrow {\n position: absolute;\n background-color: #fff;\n width: 24px;\n height: 24px;\n transform: rotate(45deg);\n z-index: -1;\n}\n\n@media screen and (max-width: 448px) {\n .sda-landing {\n width: 100%;\n }\n\n .sda-modal {\n position: absolute;\n ${ot}\n min-width: 340px;\n max-width: unset;\n box-sizing: border-box;\n }\n\n .arrow {\n display: none;\n }\n}\n\n@media screen and (min-width: 449px) {\n .sda-overlay {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n\n .sda-modal {\n position: absolute;\n bottom: unset !important;\n right: unset !important;\n margin: 0 auto !important;\n max-width: 400px;\n box-sizing: border-box;\n }\n}\n\n\n
\n \n \n \n
\n`;var rt;!function(e){e.Dynamic="DYNAMIC",e.Mobile="MOBILE",e.Center="CENTER"}(rt||(rt={}));const lt=new Map([["top","bottom"],["top-end","bottom"],["top-start","bottom"],["right","left"],["right-end","left"],["right-start","left"],["bottom","top"],["bottom-end","top"],["bottom-start","top"],["left","right"],["left-end","right"],["left-start","right"]]),ct={[rt.Dynamic]:(e,t,n,i)=>{let o=e.querySelector(".arrow");return e.style.position="absolute",null===o&&(o=document.createElement("div"),o.className="arrow",e.appendChild(o)),{config:{placement:null!=i?i:"right",middleware:[Ye(22),i?void 0:Qe({limiter:tt({offset:64})}),Xe({fallbackPlacements:i?[]:["left","top","bottom"]}),et({element:o,padding:32}),{name:"center",fn(){return a(this,void 0,void 0,(function*(){return{data:{center:window.matchMedia("screen and (((min-width: 401px) and (max-width: 999px)) or (max-height: 750px))").matches}}}))}}]},fn:({x:t,y:n,placement:i,strategy:a,middlewareData:s})=>{const{center:r}=s;if(r.center)return null!==o&&(o.style.display="none"),Object.assign(e.style,{top:(window.innerHeight-e.offsetHeight)/2+"px",left:(window.innerWidth-e.offsetWidth)/2+"px",bottom:"",right:""}),null;Object.assign(e.style,{left:`${t}px`,top:`${n}px`,right:"",bottom:""});const{arrow:l}=s,c=lt.get(i);return null!==o&&Object.assign(o.style,{left:void 0===(null==l?void 0:l.x)?"":`${null==l?void 0:l.x}px`,top:void 0===(null==l?void 0:l.y)?"":`${null==l?void 0:l.y}px`,right:"",bottom:"",display:"",[c]:"-12px"}),{x:t,y:n,strategy:a,placement:i,staticSide:c,middlewareData:s}}}},[rt.Center]:(e,t,n={})=>({config:{},fn:()=>{const i=e.querySelector(".arrow");null!==i&&(i.style.display="none");const a=Object.keys(n).length>0;return a&&Object.assign(e.style,n,{position:"absolute"}),t.classList.toggle("centered",!a),null}}),[rt.Mobile]:e=>({config:{},fn:()=>(Object.assign(e.style,{top:"auto !important",right:"0 !important",bottom:"0 !important",left:"auto"}),null)})},pt={cleanup:()=>{},updatePosition:()=>a(void 0,void 0,void 0,(function*(){return Promise.resolve(null)}))};var dt;!function(e){e.UserStatusIdentity="userstatuschange:identity",e.UserStatusScope="userstatuschange:scope",e.UserSessionCreate="usersession:create"}(dt||(dt={}));const ut=(()=>{class e{constructor(){this._topics={}}subscribe(e,t,n){this._topics[e]=[...this._topics[e]||[],{publisherId:t,callback:n}]}unsubscribe(e,t){this._topics[e]=(this._topics[e]||[]).filter((e=>e.publisherId!==t))}unsubscribeAll(e){Object.keys(this._topics).forEach((t=>{this.unsubscribe(t,e)}))}publish(e,t,n){var i;null===(i=this._topics[e])||void 0===i||i.forEach((e=>{e.publisherId!==t&&e.callback(n)}))}}let t;return{getInstance:()=>(t||(t=new e),t)}})();class mt extends Error{constructor(e,t=I()){super(e),this.analyticsTraceId=t,this.name="MonorailProducerError",this.code="monorail_producer_error"}}class ht extends Error{constructor(e,t=I()){super(e),this.analyticsTraceId=t,this.name="AbortSignalReceivedError",this.code="abort_signal_received_error"}}function _t(){var e;null===(e=document.querySelector("com-1password-notification"))||void 0===e||e.remove()}function gt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ft(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function bt(e){for(var t=1;te.toString(16))).join("")}function zt(e){if(e.metadata||e.consent)return bt(bt({},e.metadata),e.consent&&{consent:e.consent,consent_provider:e.consent_provider,consent_version:e.consent_version})}function jt(e,t=!0){return e&&Object.keys(e).length&&t?Object.keys(e).map((t=>({[Ct(t)]:e[t]}))).reduce(((e,t)=>bt(bt({},e),t))):e}function Ct(e){return e.split(/(?=[A-Z])/).join("_").toLowerCase()}function xt(e){return e.events.map((e=>{let t=!0,n=!0;e&&e.options&&Object.prototype.hasOwnProperty.call(e.options,"convertEventCase")&&(t=Boolean(e.options.convertEventCase)),e&&e.options&&Object.prototype.hasOwnProperty.call(e.options,"convertMetaDataCase")&&(n=Boolean(e.options.convertMetaDataCase));const i=zt(e);return bt({schema_id:e.schemaId,payload:jt(e.payload,t)},i&&{metadata:jt(i,n)})}))}class Lt extends Error{constructor(e){super(`Error producing to the Monorail Edge. Response received: ${JSON.stringify(e)}`),gt(this,"name","MonorailUnableToProduceError"),this.response=e,Object.setPrototypeOf(this,Lt.prototype)}}class At extends Error{constructor(e){super(`Response not from Monorail Edge. Response received: ${JSON.stringify(e)}`),gt(this,"name","MonorailInterceptedProduceError"),this.response=e,Object.setPrototypeOf(this,At.prototype)}}class Tt extends Error{constructor(e){super(`Error producing to the Monorail Edge. Response received: ${JSON.stringify(e)}`),gt(this,"name","MonorailBatchProduceError"),Object.setPrototypeOf(this,Tt.prototype),this.response=e}}class Et extends Error{constructor(e,t){super(`Error completing request. A network failure may have prevented the request from completing. Error: ${e}. Schemas: ${Array.from(new Set(t)).join(", ")}`),gt(this,"name","MonorailRequestError"),Object.setPrototypeOf(this,Et.prototype)}}class It{static withEndpoint(e){return new It(`https://${new URL(e).hostname}`)}constructor(e=yt,t={}){var n,i;if(this.edgeDomain=e,this.optionsOrKeepalive=t,"boolean"==typeof t)return this.keepalive=t,void(this.detectInterceptedErrorEnabled=!1);this.keepalive=null!==(n=t.keepalive)&&void 0!==n&&n,this.detectInterceptedErrorEnabled=null!==(i=t.detectInterceptedErrorEnabled)&&void 0!==i&&i}async produceBatch(e){const t={events:xt(e),metadata:jt(e.metadata)};let n;try{n=await fetch(this.produceBatchEndpoint(),{method:"post",headers:Mt(e.metadata),body:JSON.stringify(t),keepalive:this.keepalive})}catch(t){throw new Et(t,e.events.map((e=>e.schemaId)))}if(207===n.status){const e=await n.json();throw new Tt(e)}if(!n.ok){if(!Boolean(n.headers.get("x-request-id"))&&this.detectInterceptedErrorEnabled)throw new At({status:n.status,message:await n.text()});throw new Lt({status:n.status,message:await n.text()})}return{status:n.status}}async produce(e){let t,n=!0;e&&e.options&&Object.prototype.hasOwnProperty.call(e.options,"convertEventCase")&&(n=Boolean(e.options.convertEventCase));try{t=await async function({endpoint:e,event:t,keepalive:n}){var i,a;const o=t.metadata?{clientMessageId:null===(i=t.metadata)||void 0===i?void 0:i.clientMessageId,eventCreatedAtMs:null===(a=t.metadata)||void 0===a?void 0:a.eventCreatedAtMs}:{},s=zt(bt(bt({},t),{},{metadata:o}));return fetch(null!=e?e:vt+kt,{method:"post",headers:Mt(t.metadata),body:JSON.stringify(bt({schema_id:t.schemaId,payload:t.payload},s&&{metadata:jt(s,!0)})),keepalive:n})}({endpoint:this.produceEndpoint(),keepalive:this.keepalive,event:bt(bt({},e),{},{payload:jt(e.payload,n)})})}catch(t){throw new Et(t,[e.schemaId])}if(!t)throw new Lt({message:"No response from edge"});if(!t.ok){if(!Boolean(t.headers.get("x-request-id"))&&this.detectInterceptedErrorEnabled)throw new At({status:t.status,message:await t.text()});throw new Lt({status:t.status,message:await t.text()})}return{status:t.status}}produceBatchEndpoint(){return this.edgeDomain+"/unstable/produce_batch"}produceEndpoint(){return this.edgeDomain+kt}}function Mt(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||St()).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}class Ot{static printWelcomeMessage(e){console.log(`%c👋 from Monorail%c\n\nWe've noticed that you're${e?"":" not"} running in debug mode. As such, we will ${e?"produce":"not produce"} Monorail events to the console. \n\nIf you want Monorail events to ${e?"stop":"start"} appearing here, %cset debugMode=${(!e).toString()}%c, for the Monorail Log Producer in your code.`,"font-size: large;","font-size: normal;","font-weight: bold;","font-weight: normal;")}constructor(e){this.sendToConsole=e,e&&Ot.printWelcomeMessage(e)}async produce(e){return this.sendToConsole&&console.log("Monorail event produced",e),new Promise((t=>{t(e)}))}produceBatch(e){return this.sendToConsole&&console.log("Monorail Batch event produced",e),new Promise((t=>{t(e)}))}}class Nt{static createLogProducer(e){return new Nt(new Ot(e.debugMode),e.middleware||[])}static createHttpProducerWithEndpoint(e,t=[]){return new Nt(It.withEndpoint(e),t)}static createHttpProducer(e){return new Nt(e.production?new It(vt,e.options):new It(yt,e.options),e.middleware||[])}static buildMiddlewareChain(e,t=0){return t===e.length?this.identityFn:n=>e[t].do(n,this.buildMiddlewareChain(e,t+1))}constructor(e,t){this.producer=e,this.middleware=t,this.executeChain=Nt.buildMiddlewareChain(this.middleware.concat(new Pt(e)))}produce(e){return e.metadata=bt({eventCreatedAtMs:Date.now(),clientMessageId:St()},e.metadata),this.executeChain(e)}produceBatch(e){return this.executeChain(e)}}class qt{constructor(e){this.version=e.version}}class Rt{constructor(e){if((null==e?void 0:e.provider)instanceof qt==!1)throw new Dt("ConsentTrackingMiddleware requires an instance of ConsentTrackingProvider");this.provider=e.provider}async do(e,t){if(wt(e))return t(await this.provider.annotateEvent(e));const n=await Promise.all(e.events.map((e=>this.provider.annotateEvent(e))));return t(bt(bt({},e),{},{events:n}))}}class Dt extends Error{constructor(e){super(e),Object.setPrototypeOf(this,Dt.prototype)}}var Bt,Ft,Vt;!function(e){e.Histogram="Histogram",e.Counter="Counter",e.UpDownCounter="UpDownCounter"}(Bt||(Bt={})),function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"}(Ft||(Ft={})),function(e){e.InvalidStorefrontOrigin="shop_js_invalid_storefront_origin",e.RequestShowCalledBeforeIframeLoaded="shop_js_request_show_called_before_iframe_loaded",e.HandleSilentError="shop_js_handle_silent_error",e.MonorailProducerError="shop_js_monorail_producer_error"}(Vt||(Vt={})),Vt.InvalidStorefrontOrigin,Bt.Counter,Ft.INT,Vt.RequestShowCalledBeforeIframeLoaded,Bt.Counter,Ft.INT,Vt.HandleSilentError,Bt.Counter,Ft.INT,Vt.MonorailProducerError,Bt.Counter,Ft.INT;function $t(...e){return a(this,void 0,void 0,(function*(){var t;if(!window.ShopifyAnalytics&&!window.analytics)return{};let n;Boolean(null===(t=window.trekkie)||void 0===t?void 0:t.ready)?n=Wt():(window.trekkie=window.trekkie||[],n=new Promise((e=>{window.trekkie.push(["ready",()=>{e(Wt())}])})));const i=yield n;return e.reduce(((e,t)=>{const n=i[t];return void 0!==n&&(e[t]=n),e}),{})}))}function Wt(){let e;const t=Promise.race([new Promise((t=>e=setTimeout((()=>t({})),1e4))),new Promise((e=>{var t,n,i;const a=(null===(n=null===(t=window.ShopifyAnalytics)||void 0===t?void 0:t.lib)||void 0===n?void 0:n.ready)||(null===(i=window.analytics)||void 0===i?void 0:i.ready);null==a||a((()=>{var t,n,i;const a=(null===(n=null===(t=window.ShopifyAnalytics)||void 0===t?void 0:t.lib)||void 0===n?void 0:n.trekkie)||(null===(i=window.analytics)||void 0===i?void 0:i.trekkie);e(a.defaultAttributes)}))}))]);return t.finally((()=>clearTimeout(e)))}var Ut,Ht,Kt,Zt;!function(e){e.UiImpression="shop_js_ui_impression/1.1",e.InstallmentsModalOpened="shop_pay_installments_dynamic_modal_impression/1.0",e.InstallmentsModalUserAction="shop_pay_installments_dynamic_modal_user_actions/1.0",e.InstallmentsBannerImpression="shop_pay_installments_banner_ui_impression/3.0",e.InstallmentsPrequalPopupPageImpression="shop_pay_installments_prequal_popup_page_impression/3.0",e.InstallmentsBannerPrequalInteraction="shop_pay_installments_banner_prequal_interaction/3.0",e.InstallmentsInvalidMetadata="shop_pay_installments_banner_invalid_metadata/1.0",e.ShopLoginFirstTimeRender="shop_js_ui_shop_login_first_time_render/1.0",e.ShopifyLoginWithShopSdkDiscountStatus="shopify_pay_login_with_shop_sdk_discount_status/2.0",e.LoginWithShopSdkPageImpression="shopify_pay_login_with_shop_sdk_page_impressions/3.3",e.LoginWithShopSdkUserAction="shopify_pay_login_with_shop_sdk_user_actions/2.2",e.LoginWithShopSdkErrorEvents="shopify_pay_login_with_shop_sdk_error_events/1.0",e.ShopifyPayModalStateChange="shopify_pay_modal_state_change/1.3",e.LoginWithShopModalStateChange="shop_identity_modal_state_change/1.4",e.LoginWithShopFeatureInitialize="shopify_pay_login_with_shop_sdk_feature_initialize/1.1"}(Ut||(Ut={})),function(e){e.AuthorizeModal="AUTHORIZE_MODAL",e.AuthorizeModalInViewport="AUTHORIZE_MODAL_IN_VIEWPORT",e.ClassicCustomerAccount="CLASSIC_CUSTOMER_ACCOUNTS_ACCOUNT_PAGE",e.ClassicCustomerAccountCreateAccount="CLASSIC_CUSTOMER_ACCOUNTS_CREATE_ACCOUNT_PAGE",e.ClassicCustomerAccountLogin="CLASSIC_CUSTOMER_ACCOUNTS_LOGIN_PAGE",e.ComponentLoadedFollowing="COMPONENT_LOADED_FOLLOWING",e.ComponentLoadedNotFollowing="COMPONENT_LOADED_NOT_FOLLOWING",e.ContinueWithShop="CONTINUE_WITH_SHOP_PAGE",e.DiscountSaved="DISCOUNT_SAVE_CONFIRMATION_PAGE",e.DiscountShown="DISCOUNT_SHOWN",e.FollowButtonShownInViewport="FOLLOW_BUTTON_SHOWN_IN_VIEWPORT",e.FollowingGetShopAppCta="FOLLOWING_GET_SHOP_APP_CTA",e.PartnerEmailInputShown="PARTNER_EMAIL_INPUT_SHOWN",e.PhoneConsent="TEXT_MARKETING_SIGN_UP",e.PhoneConsentConfirmed="TEXT_MARKETING_CONFIRMED_PAGE",e.PhoneConsentDeclined="TEXT_MARKETING_DECLINED_PAGE",e.SdkLoaded="SDK_HAS_LOADED_INITIAL_PAGE",e.SignInWithShopButton="SIGN_IN_WITH_SHOP_BUTTON"}(Ht||(Ht={})),function(e){e.CreateAccountLinkClicked="CREATE_ACCOUNT_CLICK",e.EmailEntered="EMAIL_ENTERED",e.FollowOnShopClicked="FOLLOW_ON_SHOP_CLICKED",e.FollowingGetShopAppClick="FOLLOWING_GET_SHOP_APP_CLICK",e.PasswordManagerAutofillDetected="PASSWORD_MANAGER_AUTOFILL_DETECTED",e.PhoneConsentDeclined="DO_NOT_SHARE_PHONE_CLICK",e.PhoneConsentProvided="SHARE_PHONE_CLICK",e.SignInWithShopClicked="SIGN_IN_WITH_SHOP_BUTTON_CLICK",e.ThirdPartyFormSubmission="3RD_PARTY_EMAIL_CAPTURE_FORM_SUBMISSION_CLICK",e.FedCmCancelled="FEDCM_CANCELLED",e.FedCmCompleted="FEDCM_COMPLETED"}(Kt||(Kt={})),function(e){e.Loaded="loaded",e.Shown="shown",e.Hidden="hidden"}(Zt||(Zt={}));const Gt="",Jt="1",Yt="0",Qt="p",Xt="a",en="m",tn="t",nn="m",an="a",on="p",sn="s";function rn(e,t=!1){const n=document.cookie?document.cookie.split("; "):[];for(let t=0;te.charCodeAt(0).toString(16).padStart(2,"0"))).join("");l=[8,13,18,23].reduce(((e,t)=>e.slice(0,t)+"-"+e.slice(t)),t)}function c(e){const t=n.split(".")[0];return t.includes(e.toLowerCase())?Yt:t.includes(e.toUpperCase())?Jt:Gt}function p(e){return n.includes(e.replace("t","s").toUpperCase())}return{v:"3",con:{CMP:{[an]:c(an),[on]:c(on),[nn]:c(nn),[sn]:c(sn)}},region:i||"",cus:r,purposes:{[Xt]:p(Xt),[Qt]:p(Qt),[en]:p(en),[tn]:p(tn)},sale_of_data_region:"t"==o,display_banner:"t"==a,consent_id:l}}(e);return}(e)}function cn(e){const t=ln();if(!t||!t.purposes)return!0;const n=t.purposes[e];return"boolean"!=typeof n||n}function pn(){return cn(Xt)}function dn(){return cn(Qt)}function un(){return cn(en)}function mn(){return cn(tn)}function hn(){const e=[];return pn()&&e.push("analytics"),un()&&e.push("marketing"),mn()&&e.push("sale_of_data"),dn()&&e.push("preferences"),e}class _n extends qt{async annotateEvent(e){return Promise.resolve(function(e,t){if("v1"===t)return{...e,consent:hn(),consent_provider:"consent-tracking-api",consent_version:t};throw new gn(t||"unknown")}(e,this.version))}}class gn extends Error{constructor(e){super(`Version ${e} is not supported by the consent-tracking-api provider`),this.name="MonorailConsentTrackingApiProviderVersionError",Object.setPrototypeOf(this,gn.prototype)}}const fn={errorParsingCreatedAtMs:"Error parsing: X-Monorail-Edge-Event-Created-At-Ms",emptyeEventCreatedAtMs:"event_created_at_ms metadata field cannot be empty",noPermissionToGetURL:"Your client does not have permission to get URL",noResponseFromEdge:"No response from edge",incorrectContentType:"Incorrect Content-Type. Expected: application/json or text/plain",blockedRequest:"Blocked Request",failedToReadRequestBody:"Failed to read request body",methodNotAllowed:"Method Not Allowed",schemaValidationError:"Schema validation error"};function bn(){const e=new _n({version:"v1"});return[new Rt({provider:e})]}const yn=bn(),vn=Nt.createHttpProducer({production:!0,middleware:yn});let kn=class{constructor({elementName:e,analyticsTraceId:t,flow:n="",flowVersion:i="unspecified",shopId:a,shopPermanentDomain:o,checkoutVersion:s,checkoutToken:r}){var l;this._shopPermanentDomain="",this._impressionTracked=!1,this._shopLoginFirstTimeRenderTracked={},this._pageImpressionTracked={AUTHORIZE_MODAL:!1,AUTHORIZE_MODAL_IN_VIEWPORT:!1,CLASSIC_CUSTOMER_ACCOUNTS_ACCOUNT_PAGE:!1,CLASSIC_CUSTOMER_ACCOUNTS_CREATE_ACCOUNT_PAGE:!1,CLASSIC_CUSTOMER_ACCOUNTS_LOGIN_PAGE:!1,COMPONENT_LOADED_FOLLOWING:!1,COMPONENT_LOADED_NOT_FOLLOWING:!1,CONTINUE_WITH_SHOP_PAGE:!1,DISCOUNT_SAVE_CONFIRMATION_PAGE:!1,DISCOUNT_SHOWN:!1,FOLLOWING_GET_SHOP_APP_CTA:!1,FOLLOW_BUTTON_SHOWN_IN_VIEWPORT:!1,PARTNER_EMAIL_INPUT_SHOWN:!1,SDK_HAS_LOADED_INITIAL_PAGE:!1,SIGN_IN_WITH_SHOP_BUTTON:!1,TEXT_MARKETING_SIGN_UP:!1,TEXT_MARKETING_CONFIRMED_PAGE:!1,TEXT_MARKETING_DECLINED_PAGE:!1},this._elementName=e,this._flow=n,this._analyticsTraceId=t,this._initTimestamp=(new Date).getTime(),this._flowVersion=i,this._checkoutVersion=s,this._checkoutToken=r,this._shopId=a,this._shopPermanentDomain=o||(null===(l=window.Shopify)||void 0===l?void 0:l.shop)||"",this._shopModalPreviousState=void 0}get analyticsTraceId(){return this._analyticsTraceId}trackElementImpression(e){return a(this,void 0,void 0,(function*(){if(this._impressionTracked)return;this._impressionTracked=!0;const t=yield $t("uniqToken","visitToken","microSessionId","microSessionCount","shopId","themeId","themeCityHash","contentLanguage","referer"),n=Object.assign(Object.assign({},t),{elementType:e,elementName:this._elementName,shopJsVersion:h});wn({schemaId:Ut.UiImpression,payload:n},t,(()=>{this._impressionTracked=!1}))}))}trackPageImpression(e){return a(this,arguments,void 0,(function*({shopAccountUuid:e,apiKey:t,page:n,allowDuplicates:i=!1}){var a;if(!i&&this._pageImpressionTracked[n])return;this._pageImpressionTracked[n]=!0;const o=yield $t("uniqToken","visitToken","isPersistentCookie","path","customerId"),s=B(),r=null!==(a=null==s?void 0:s.pageType)&&void 0!==a?a:"",l=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},o),{analyticsTraceId:this._analyticsTraceId,flow:this._flow,flowVersion:this._flowVersion,pageName:n,sdkVersion:h,shopPermanentDomain:this._shopPermanentDomain,storefrontPageType:r}),t&&{apiKey:t}),e&&{shopAccountUuid:e}),this._checkoutToken&&{checkoutToken:this._checkoutToken});wn({schemaId:Ut.LoginWithShopSdkPageImpression,payload:l},o,(()=>{this._pageImpressionTracked[n]=!1}))}))}trackShopLoginFirstTimeRender(){return a(this,arguments,void 0,(function*(e=this._flowVersion,t=this._initTimestamp){if(this._shopLoginFirstTimeRenderTracked[e])return;this._shopLoginFirstTimeRenderTracked[e]=!0;const n=(new Date).getTime()-t,i=yield $t("shopId"),a=Object.assign(Object.assign({analyticsTraceId:this._analyticsTraceId,duration:n},i),{shopLoginVersion:e,url:window.location.href,userAgent:navigator.userAgent});wn({schemaId:Ut.ShopLoginFirstTimeRender,payload:a},i,(()=>{this._shopLoginFirstTimeRenderTracked[e]=!1}))}))}trackShopPayLoginWithShopSdkUserAction({apiKey:e,userAction:t}){const n=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e&&{apiKey:e}),{flow:this._flow,flowVersion:this._flowVersion,sdkVersion:h,analyticsTraceId:this._analyticsTraceId}),this._checkoutVersion&&{checkoutVersion:this._checkoutVersion}),this._shopId&&{shopId:this._shopId}),{shopPermanentDomain:this._shopPermanentDomain,userAction:t});wn({schemaId:Ut.LoginWithShopSdkUserAction,payload:n})}trackShopPayLoginWithSdkErrorEvents({apiKey:e,errorCode:t,errorMessage:n}){const i={apiKey:e,flow:this._flow,flowVersion:this._flowVersion,sdkVersion:h,analyticsTraceId:this._analyticsTraceId,shopPermanentDomain:this._shopPermanentDomain,errorCode:t,errorMessage:n};wn({schemaId:Ut.LoginWithShopSdkErrorEvents,payload:i})}trackShopPayModalStateChange({currentState:e,reason:t,dismissMethod:n}){var i,a;if(this._checkoutToken){const t={checkoutToken:this._checkoutToken,checkoutVersion:this._checkoutVersion,shopId:this._shopId,shopifyDomain:this._shopPermanentDomain,previousState:"",currentState:e,analyticsTraceId:this._analyticsTraceId,clientTimestampMs:(new Date).getTime(),zoom:`${null===(i=window.visualViewport)||void 0===i?void 0:i.scale}`};wn({schemaId:Ut.ShopifyPayModalStateChange,payload:t})}this._flow&&this._flowVersion&&(wn({schemaId:Ut.LoginWithShopModalStateChange,payload:{currentState:e,previousState:this._shopModalPreviousState,reason:t,dismissMethod:n,flow:this._flow,flowVersion:this._flowVersion,analyticsTraceId:this._analyticsTraceId,zoom:`${null===(a=window.visualViewport)||void 0===a?void 0:a.scale}`}}),this._shopModalPreviousState=e)}trackFeatureInitialization(e){return a(this,arguments,void 0,(function*({apiKey:e,source:t}){var n;const i=yield $t("uniqToken","visitToken","isPersistentCookie","path","customerId"),a=B(),o=null!==(n=null==a?void 0:a.pageType)&&void 0!==n?n:"",s=Object.assign(Object.assign(Object.assign(Object.assign({},i),{analyticsTraceId:this._analyticsTraceId,flow:this._flow,flowVersion:this._flowVersion,sdkVersion:h,shopPermanentDomain:this._shopPermanentDomain,source:t,storefrontPageType:o}),e&&{apiKey:e}),this._checkoutToken&&{checkoutToken:this._checkoutToken});wn({schemaId:Ut.LoginWithShopFeatureInitialize,payload:s},i)}))}};function wn(e,t,n){!t||Object.keys(t).length?(e.payload=Object.assign(e.payload,t),vn.produce(e).catch((e=>{if(null==n||n(e),function(e){var t;return!(e instanceof Et||(null===(t=null==e?void 0:e.message)||void 0===t?void 0:t.includes("Invalid agent:")))}(e)){!function(e){const t=Object.entries(fn).find((([t,n])=>e.message.includes(n)));null==t||t[0]}(e instanceof Error?e:new mt(String(e))),Vt.MonorailProducerError}}))):null==n||n({message:"trekkie attributes are empty"})}const Pn=448,Sn="\n bottom: 0;\n top: auto !important;\n left: 0 !important;\n right: 0 !important;\n border-radius: 32px 32px 0 0;\n",zn=`\n\n\n
\n \n \n \n
\n`,jn="";class Cn extends kn{constructor({elementName:e,analyticsTraceId:t}){super({elementName:e,analyticsTraceId:t,flow:"follow"})}trackFollowButtonPageImpression(e){this.trackPageImpression({page:e?Ht.ComponentLoadedFollowing:Ht.ComponentLoadedNotFollowing})}trackFollowButtonInViewport(){this.trackPageImpression({page:Ht.FollowButtonShownInViewport})}trackFollowingGetAppButtonPageImpression(){this.trackPageImpression({page:Ht.FollowingGetShopAppCta})}trackFollowButtonClicked(){this.trackShopPayLoginWithShopSdkUserAction({userAction:Kt.FollowOnShopClicked})}trackFollowingGetAppButtonClicked(){this.trackShopPayLoginWithShopSdkUserAction({userAction:Kt.FollowingGetShopAppClick})}}var xn;!function(e){e.Default="loginWithShop",e.CheckoutModal="loginWithShopCheckoutModal",e.ClassicCustomerAccounts="loginWithShopClassicCustomerAccounts",e.Prequal="loginWithShopPrequal",e.Web="loginWithShopShopWeb",e.SelfServe="loginWithShopSelfServe",e.CheckoutExtension="loginWithShopCheckoutExtension",e.PaymentRequest="loginWithShopPaymentRequest"}(xn||(xn={}));const Ln={[xn.Default]:"default",[xn.SelfServe]:"self_serve_customer_accounts",[xn.ClassicCustomerAccounts]:"classic_customer_accounts",[xn.Prequal]:"shop_pay_installments_prequal",[xn.PaymentRequest]:"payment_request",[xn.CheckoutExtension]:"default",[xn.CheckoutModal]:"checkout_modal",[xn.Web]:""},An="shop-login-default",Tn=`${An}-iframe`,En=`${An}-iframe-compact`,In=`${An}-header`,Mn=`${In}-contents-container`,On=`${In}-title`,Nn=`${In}-description`,qn=`${In}-divider`,Rn=`${An}-footer`,Dn=`${Rn}-content`,Bn=`${An}-hidden`,Fn="20px",Vn=`\n \n`;class $n extends kn{constructor({elementName:e,analyticsTraceId:t,analyticsContext:n=xn.Default,flowVersion:i="unspecified",checkoutVersion:a,checkoutToken:o,shopId:s,shopPermanentDomain:r}){super({elementName:e,analyticsTraceId:t,flow:Ln[n],flowVersion:i,checkoutVersion:a,checkoutToken:o,shopId:s,shopPermanentDomain:r}),this._emailEnteredUserActionTracked=!1,this._passwordManagerAutofillDetected=!1}trackLoginDefaultButtonClicked(){this.trackShopPayLoginWithShopSdkUserAction({userAction:Kt.SignInWithShopClicked})}trackEmailEnteredAction(){this._emailEnteredUserActionTracked||(this._emailEnteredUserActionTracked=!0,this.trackShopPayLoginWithShopSdkUserAction({userAction:Kt.EmailEntered}))}trackPasswordManagerAutofillDetected(){this._passwordManagerAutofillDetected||(this._passwordManagerAutofillDetected=!0,this.trackShopPayLoginWithShopSdkUserAction({userAction:Kt.PasswordManagerAutofillDetected}))}trackFedCMCancelledUserAction(){this.trackShopPayLoginWithShopSdkUserAction({userAction:Kt.FedCmCancelled})}trackFedCMCompletedUserAction(){this.trackShopPayLoginWithShopSdkUserAction({userAction:Kt.FedCmCompleted})}}class Wn extends $n{constructor({elementName:e,flowVersion:t,analyticsTraceId:n}){super({elementName:e,analyticsTraceId:n,analyticsContext:xn.ClassicCustomerAccounts,flowVersion:t})}trackClassicCustomerAccountsLoginPageImpression(){this.trackPageImpression({page:Ht.ClassicCustomerAccountLogin})}trackClassicCustomerAccountsCreateAccountPageImpression(){this.trackPageImpression({page:Ht.ClassicCustomerAccountCreateAccount})}trackClassicCustomerAccountsAccountPageImpression(){this.trackPageImpression({page:Ht.ClassicCustomerAccount})}trackClassicCustomerAccountsContinueWithShopPageImpression(){this.trackPageImpression({page:Ht.ContinueWithShop})}trackClassicCustomerAccountsCreateAccountAction(){this.trackShopPayLoginWithShopSdkUserAction({userAction:Kt.CreateAccountLinkClicked})}}var Un,Hn,Kn,Zn,Gn,Jn,Yn;!function(e){e.Source="src",e.Initial="initial"}(Un||(Un={})),function(e){e.Email="email",e.Phone="phone",e.PhoneOwnershipVerified="phone_ownership_verified"}(Hn||(Hn={})),function(e){e.Follow="follow",e.Default="default",e.Custom="custom",e.Prequal="prequal",e.PopUp="pop_up"}(Kn||(Kn={})),function(e){e.Start="start",e.SignUp="signup",e.Verify="verify",e.Captcha="captcha",e.OneClick="one-click"}(Zn||(Zn={})),function(e){e.ApiUnavailable="api_unavailable",e.InvalidApiKey="invalid_api_key",e.ServerError="server_error",e.UserBlocked="user_blocked",e.NoDiscountReceived="no_discount_received",e.InvalidAnalyticsContext="invalid_analytics_context",e.InstallmentsIneligible="installments_ineligible",e.CaptchaChallenge="captcha_challenge",e.RetriableServerError="retriable_server_error"}(Gn||(Gn={})),function(e){e.Init="init",e.Restart="restart",e.UserMatched="user_matched",e.UserNotMatched="user_not_matched",e.VerificationStepChanged="verification_step_changed",e.CustomizationValidityChanged="customization_validity_changed",e.PopUpOpened="pop_up_opened"}(Jn||(Jn={})),function(e){e.Start="start",e.SignUp="signup",e.EmailVerification="email_verification",e.PhoneVerification="phone_verification",e.WebAuthnVerification="webauthn_verification",e.PopUpOpened="pop_up_opened",e.OneClick="one_click",e.PersonalizeConsent="personalize_consent"}(Yn||(Yn={}));const Qn="setheight";var Xn,ei,ti,ni,ii,ai,oi,si,ri;!function(e){e.Interest="interest",e.SplitPay="split_pay",e.ZeroPercent="zero_percent"}(Xn||(Xn={})),function(e){e.Cart="cart",e.Product="product",e.Checkout="checkout"}(ei||(ei={})),function(e){e.IntroPageLoaded="prequal_intro_page_loaded",e.AuthorizeLoaded="prequal_authorize_loaded",e.BuyerFormOverlayLoaded="prequal_buyer_form_overlay_loaded",e.ResultsPageLoading="prequal_results_page_loading",e.ResultsPageLoaded="prequal_results_page_loaded",e.ContinueToCheckoutClicked="prequal_continue_to_checkout_clicked"}(ti||(ti={})),function(e){e.PayInFour="pay_in_4",e.AsLowAs="as_low_as",e.PayInFourAsLowAs="pay_in_4_or_as_low_as"}(ni||(ni={})),function(e){e.Standard="standard",e.CustomizedByMerchant="customized_by_merchant"}(ii||(ii={})),function(e){e.SplitPay="split_pay",e.ZeroInterest="zero_interest",e.InterestOnly="interest_only",e.ZeroInterestOnly="zero_interest_only",e.Adaptive="adaptive",e.Ineligible="ineligible"}(ai||(ai={})),function(e){e.Close="close",e.ContinueToCheckout="continue_to_checkout",e.CloseAuth="close_auth_modal"}(oi||(oi={})),function(e){e.SplitPay="split_pay",e.Monthly="monthly"}(si||(si={})),function(e){e.SignIn="sign_in",e.SignUp="sign_up"}(ri||(ri={}));class li extends Error{constructor(){super("FedCM is not supported")}}class ci extends Error{constructor(){super("FedCM was cancelled")}}const pi=e=>a(void 0,void 0,void 0,(function*(){if(!("IdentityCredential"in window))throw new li;const{mediation:t="optional",analyticsTraceId:n,monorailTracker:i}=e,o=yield function(e){return a(this,void 0,void 0,(function*(){let t="/services/login_with_shop/fedcm/provider";e&&(t+=`?analytics_trace_id=${encodeURIComponent(e)}`);const n=yield fetch(t,{method:"GET"}),i=yield n.json();return{configURL:i.configURL,clientId:i.clientId,nonce:i.nonce,state:i.state}}))}(n),s=yield function(e,t){return navigator.credentials.get({identity:{providers:[t]},mediation:e})}(t,o);if(!s)throw null==i||i.trackFedCMCancelledUserAction(),new ci;return function(e,t,n){return a(this,void 0,void 0,(function*(){const i=yield fetch("/services/login_with_shop/fedcm/callback",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({raw_id_token:e,state:t}).toString()});return null==n||n.trackFedCMCompletedUserAction(),i}))}(s.token,o.state,i)}));function di(){return a(this,arguments,void 0,(function*(e=!1){if(!n("initCustomerAccounts")){i("initCustomerAccounts");try{if(("/"===(t=window.location.pathname)?t:t.endsWith("/")?t.slice(0,-1):t).endsWith("/account"))return void function(){const e=(t="analytics_trace_id",new URLSearchParams(window.location.search).get(t));var t;if(e){new Wn({elementName:"shop-login-button",flowVersion:ri.SignIn,analyticsTraceId:e}).trackClassicCustomerAccountsAccountPageImpression()}}();!function(e=!1){const t=I(),n=new Wn({elementName:"shop-login-button",flowVersion:ri.SignIn,analyticsTraceId:t}),i=new WeakMap;let a=null;e&&d();const o=W({onVisible:t=>c({input:t,autoOpen:!e}),onFallback:e=>{e.addEventListener("focus",s,{once:!0}),n.trackShopPayLoginWithSdkErrorEvents({apiKey:"",errorCode:"fallback_to_focus_event",errorMessage:"Fallback to focus event for classic customer accounts"})}});function s(t){c({input:t.target,autoOpen:!e})}function l(e,t){var n,i;const a=null===(n=e.elements.namedItem("checkout_url"))||void 0===n?void 0:n.value,o=null===(i=e.elements.namedItem("return_url"))||void 0===i?void 0:i.value,s=new URLSearchParams(Object.assign(Object.assign({analytics_trace_id:t},a&&{checkout_url:a}),o&&{return_url:o}));return`${window.location.origin}/account/redirect?${s.toString()}`}function c({input:e,autoOpen:o}){var s,c;const d=e.form;if(!d)return;i.has(e)&&(null===(s=i.get(e))||void 0===s||s.destroy(),i.delete(e));const u=document.createElement("input");u.type="hidden",u.name="login_with_shop[analytics_trace_id]",u.value=t,d.appendChild(u);const h=new p("modalDismissed",!1);a||(a=function({analyticsTraceId:e,autoOpen:t}){let n,i=!1;n=document.querySelector("shop-login-button:not([action])"),n||(n=document.createElement("shop-login-button"),n.setAttribute("hide-button","true"),i=!0);n.setAttribute("client-id",""),n.setAttribute("action","default"),n.setAttribute("version","2"),n.setAttribute("flow-version",ri.SignIn),n.setAttribute("analytics-context",xn.ClassicCustomerAccounts),n.setAttribute("analytics-trace-id",e),n.setAttribute("disable-sign-up","true"),t&&n.setAttribute("auto-open","true");n.setAttribute("consent-challenge",""),Object.entries(D()).forEach((([e,t])=>{const i=e.replace(/_/g,"-");n.setAttribute(i,t)})),i&&document.body.appendChild(n);return n}({analyticsTraceId:t,autoOpen:o}),n.trackClassicCustomerAccountsLoginPageImpression(),a.addEventListener("completed",(()=>{const e=l(d,t);window.location.assign(e)})),a.addEventListener("modalclosed",(()=>{h.set(!0)})));const _=new r(e);_.start(),null===(c=a.setPasswordManagerDetection)||void 0===c||c.call(a,_),a.email=e.value,i.set(e,new m(e,(e=>{a.email=e})))}function d(){const e=document.querySelector("#customer_login");e&&pi({mediation:"required",analyticsTraceId:t,monorailTracker:n}).then((n=>u(n,e,t))).catch((e=>h(e)))}function u(e,t,n){if(200!==e.status)return;if(!t)return;const i=l(t,n);window.location.assign(i)}function h(e){e instanceof li||e instanceof ci||"NetworkError"===e.name&&e.message}$({selector:v,onElementFound:e=>o.observe(e)})}(e)}catch(e){if(e instanceof ui){new Wn({elementName:"shop-login-button",flowVersion:ri.SignIn,analyticsTraceId:e.analyticsTraceId}).trackShopPayLoginWithSdkErrorEvents({apiKey:"",errorCode:e.code,errorMessage:e.message})}}var t}}))}class ui extends Error{constructor(e,t=I()){super(e),this.analyticsTraceId=t,this.name="InitCustomerAccountsError",this.code="init_customer_accounts_error"}}function mi(){return a(this,void 0,void 0,(function*(){if(!n("initCustomerAccountsSignUp")){i("initCustomerAccountsSignUp");try{!function(){const e=I(),t=new Wn({elementName:"shop-login-button",flowVersion:ri.SignUp,analyticsTraceId:e}),n=new WeakMap;let i=null;const a=W({onVisible:r,onFallback:e=>{e.addEventListener("focus",o,{once:!0}),t.trackShopPayLoginWithSdkErrorEvents({apiKey:"",errorCode:"fallback_to_focus_event",errorMessage:"Fallback to focus event for classic customer accounts"})}});function o(e){r(e.target)}function s(e,t){var n,i;const a=null===(n=e.elements.namedItem("checkout_url"))||void 0===n?void 0:n.value,o=null===(i=e.elements.namedItem("return_url"))||void 0===i?void 0:i.value,s=new URLSearchParams(Object.assign(Object.assign({analytics_trace_id:t},a&&{checkout_url:a}),o&&{return_url:o}));return`${window.location.origin}/account/redirect?${s.toString()}`}function r(a){var o;const r=a.form;if(!r)return;n.has(a)&&(null===(o=n.get(a))||void 0===o||o.destroy(),n.delete(a));const l=document.createElement("input");l.type="hidden",l.name="login_with_shop[analytics_trace_id]",l.value=e,r.appendChild(l),i||(i=function(e){const t=new p("modalDismissed",!1),n=null===document.querySelector(v),i=t.value,a=n&&!i,o=document.createElement("shop-login-button");o.setAttribute("client-id",""),o.setAttribute("action","default"),o.setAttribute("version","2"),o.setAttribute("flow-version",ri.SignUp),o.setAttribute("analytics-context",xn.ClassicCustomerAccounts),o.setAttribute("analytics-trace-id",e),o.setAttribute("hide-button","true"),o.setAttribute("disable-sign-up","true"),a&&o.setAttribute("auto-open","true");return document.body.appendChild(o),o}(e),t.trackClassicCustomerAccountsCreateAccountPageImpression(),i.addEventListener("completed",(()=>{const t=s(r,e);window.location.assign(t)})));const c=r.querySelector(b),d=r.querySelector(y);i.firstName=null==c?void 0:c.value,i.lastName=null==d?void 0:d.value,i.email=a.value,n.set(a,new m(a,(e=>{i.firstName=null==c?void 0:c.value,i.lastName=null==d?void 0:d.value,i.email=e})))}$({selector:k,onElementFound:e=>a.observe(e)})}()}catch(e){}}}))}function hi(e){const t=N((()=>function({shopLoginButton:e,emailInput:t,emailLookupStarted:n,emailLookupEnded:i}){if(!V(t.value))return;n();const a=new Promise((t=>{const n=()=>t();e.addEventListener("shopusernotmatched",(()=>{n()}),{once:!0}),e.addEventListener("shopusermatched",(()=>{n()}),{once:!0})}));(function(e,t){let n;const i=new Promise((e=>{n=setTimeout((()=>{e()}),t)}));return Promise.race([e,i]).finally((()=>{clearTimeout(n)}))})(a,1500).then((()=>i())).catch((()=>i()))}(e)),300);e.emailInput.addEventListener("input",(()=>{const n=e.emailInput.value;e.emailChanged({email:n,emailIsValid:V(n)}),t()})),t()}class _i{constructor(e,t,n,i=window){this._subscribers=new Set,this._eventSource=e,this._subscribers.add(n),this._eventListener=e=>{this._eventSource&&this._eventSource.isSourceOf(e)&&(t.some((t=>function(e,t){try{const n=new URL(e).host.split(".").reverse(),i=new URL(t).host.split(".").reverse();for(let e=0;e{const o=()=>{a(new ht("Abort signal received"))};(null==t?void 0:t.aborted)&&o(),n=n=>{n.type===e&&(null==t||t.removeEventListener("abort",o),i(n))},this._subscribers.add(n),null==t||t.addEventListener("abort",o)})).finally((()=>{this._subscribers.delete(n)}))}_notify(e){this._subscribers.forEach((t=>t(e)))}}const gi="https://shop.app",fi="https://pay.shopify.com",bi="https://shop.app";var yi;function vi(e){let t;try{const n=new URL(e);"localhost"!==n.hostname&&"127.0.0.1"!==n.hostname||"https:"===n.protocol?"https:"!==n.protocol?t=yi.NotUsingHttps:"/"!==n.pathname?t=yi.HasPath:n.hash?t=yi.HasHash:n.search&&(t=yi.HasSearch):t=yi.UsingLocalhost}catch(e){t=yi.InvalidUrl}finally{t&&(console.error(`[shop-js] Invalid storefront origin: ${e}`),Vt.InvalidStorefrontOrigin)}return void 0===t}!function(e){e.UsingLocalhost="using_localhost",e.NotUsingHttps="not_using_https",e.HasPath="has_path",e.HasHash="has_hash",e.HasSearch="has_search",e.InvalidUrl="invalid_url"}(yi||(yi={}));class ki{constructor(e,t){this._eventDestination=e,this._eventOrigins=t}postMessage(e){const t=this._eventDestination instanceof HTMLIFrameElement?this._eventDestination.contentWindow:this._eventDestination;this._eventOrigins.forEach((n=>{null==t||t.postMessage(e,n)}))}set eventDestination(e){e&&this._eventDestination!==e&&(this._eventDestination=e)}}class wi extends ki{constructor(e){super(e,[gi,fi])}}class Pi{constructor(e){this._source=e}isSourceOf(e){return e.source===this._source.contentWindow}}class Si{constructor(e){this._source=e}isSourceOf(e){return e.source===this._source}}function zi(e){const t=document.createElement("iframe");return t.src=function(e){const t=new URLSearchParams({client_id:e.clientId,response_mode:e.responseMode||"",redirect_type:e.redirectType||"",response_type:e.responseType||"",redirect_uri:e.redirectUri||"",code_challenge:e.codeChallenge||"",code_challenge_method:e.codeChallengeMethod||"",analytics_trace_id:e.analyticsTraceId||"",analytics_context:e.analyticsContext||"",scope:e.scope||"",state:e.state||"",flow:e.flow,version:"1"});return`${fi}/pay/shop-auth-input?${t}`}(e),t.setAttribute("style","border: none; margin-top: 0.75rem;"),t.setAttribute("allow","publickey-credentials-get *"),t.tabIndex=0,t.width="100%",t.height="0",t}function ji({loader:e,target:t,targetWrapper:n,attributes:i,analyticsTraceId:a,analyticsContext:o,flow:s,hiddenClassName:r,onLoaded:l}){var c,p;if(!U(t)||!U(n))return;const d=zi(Object.assign(Object.assign({},i),{analyticsTraceId:a,analyticsContext:o,version:"1",flow:s}));d.classList.add(r),d.id="shop-login-email-input-iframe",null===(c=n.parentNode)||void 0===c||c.insertBefore(d,n);const u=new _i(new Pi(d),[gi,fi,null===(p=null===window||void 0===window?void 0:window.location)||void 0===p?void 0:p.origin],(function(n){const i=(e=>{const t=e.replace("shopify_pay:","");try{return JSON.parse(t)}catch(e){return{}}})(n);switch(i.action){case"loaded":!function(){if(!e||"shop-loading"===(null==e?void 0:e.getAttribute("data-status")))return d.classList.remove(r),null==e||e.dispatchEvent(new Event("shopinputloaded")),void l();u.destroy(),d.remove(),null==t||t.removeEventListener("change",m)}();break;case"error":o=i.message,null==e||e.dispatchEvent(new CustomEvent("processingerror",{detail:{message:o}}));break;case"enterPressed":!function(){null==t||t.form;t.form.requestSubmit()}();break;case"processing":null==e||e.dispatchEvent(new Event("processing"));break;case"resized":a=i.height,d.height=a;break;case"changed":!function(e){if(!U(t))return;t.value!==e&&(t.value=e,t.dispatchEvent(new Event("input")))}(i.value);break;case"loggedIn":u.destroy()}var a;var o})),m=e=>{const t=e.target;null==h||h.postMessage({type:"emailsubmitted",email:t.value})},h=new ki(d,[gi,fi]);t.addEventListener("change",m)}const Ci={code:"temporarily_unavailable",message:"Shop login is temporarily unavailable"},xi="client-id",Li="version",Ai="action",Ti="storefront-origin",Ei="keep-modal-open",Ii="hide-button",Mi="disable-sign-up",Oi="redirect-uri",Ni="ux-mode",qi="redirect-type",Ri="auto-open",Di="analytics-context",Bi="analytics-trace-id",Fi="compact",Vi="response-type",$i="response-mode",Wi="code-challenge",Ui="code-challenge-method",Hi="state",Ki="scope",Zi="avoid-pay-alt-domain",Gi="avoid-sdk-session",Ji="flow",Yi="flow-version",Qi="email",Xi="anchor-to",ea="dev-mode",ta="modal-title",na="modal-description",ia="modal-logo-src",aa="api-key",oa="pop-up-name",sa="pop-up-features",ra="modal-brand",la="consent-challenge",ca="checkout-redirect-url",pa="checkout-version",da="shop-id",ua="require-verification",ma="first-name",ha="last-name",_a="checkout-token",ga="transaction-params",fa="shop-permanent-domain",ba="source",ya={clientId:"",redirectType:"top_frame",responseType:"code",responseMode:"query",scope:"openid email pay:session_token profile",redirectUri:"",codeChallenge:"",codeChallengeMethod:"",state:""};function va(e){return a(this,arguments,void 0,(function*({loaderSelector:e,inputSelector:t,inputWrapperSelector:n,attributes:i,unixTimestamp:o,hiddenClassName:s}){var r;const l=I(),c=Kn.Default,p=new kn({elementName:"new-customer-accounts-passkeys",analyticsTraceId:l}),d=Object.assign(Object.assign({},ya),i);p.trackShopLoginFirstTimeRender("sdk-rendered",o);const u=document.createElement("shop-login-button");u.setAttribute("id","hidden-button-identity"),u.setAttribute("version","1"),u.setAttribute("response-type",d.responseType),u.setAttribute("response-mode",d.responseMode),u.setAttribute("redirect-type","top_frame"),u.setAttribute("scope",d.scope),u.setAttribute("action","default"),u.setAttribute("analytics-context",xn.SelfServe),u.setAttribute("analytics-trace-id",l),u.setAttribute("flow",c),u.setAttribute("hide-button",""),u.setAttribute("disable-sign-up",""),u.setAttribute("auto-open",""),u.setAttribute("consent-challenge",""),u.setAttribute("client-id",d.clientId),u.setAttribute("redirect-uri",d.redirectUri),u.setAttribute("state",d.state),u.setAttribute("code-challenge",d.codeChallenge),u.setAttribute("code-challenge-method",d.codeChallengeMethod);const m=yield function(){return a(this,void 0,void 0,(function*(){var e,t;return null===(t=null===(e=null===window||void 0===window?void 0:window.PublicKeyCredential)||void 0===e?void 0:e.isConditionalMediationAvailable)||void 0===t?void 0:t.call(e)}))}(),h=document.querySelector(e),_=document.querySelector(t),g=document.querySelector(n);return m?ji({loader:h,target:_,targetWrapper:g,attributes:d,analyticsTraceId:l,analyticsContext:xn.SelfServe,flow:c,hiddenClassName:s,onLoaded:()=>{p.trackShopLoginFirstTimeRender("iframed-input-rendered",o),document.getElementById("shop-login-email-input-iframe")&&u.setAttribute(Xi,"#shop-login-email-input-iframe")}}):null==h||h.dispatchEvent(new Event("inputwillnotload")),u.setAttribute(Xi,"div.next-input.combined-input-wrapper.type-ahead-wrapper"),Object.entries(D()).forEach((([e,t])=>{u.setAttribute(e,t)})),null===(r=g.parentNode)||void 0===r||r.insertBefore(u,g),u.listenToInput(_),u}))}function ka(e){console.error(`[shop-js] ${e}`)}const wa={brand:"#5a31f4",white:"#fff",black:"#000",warning:"#d02e11",close:"#707070",foregroundSecondary:"#3F454D",backgroundSubdued:"#F2F3F5",backgroundError:"#FFECE9",backgroundFaint:"#F2F4F5",error:"#D02E11"};function Pa(e){let t=0,n=0,i=0;return 4===e.length?(t=Number(`0x${e[1]}${e[1]}`),n=Number(`0x${e[2]}${e[2]}`),i=Number(`0x${e[3]}${e[3]}`)):7===e.length&&(t=Number(`0x${e[1]}${e[2]}`),n=Number(`0x${e[3]}${e[4]}`),i=Number(`0x${e[5]}${e[6]}`)),[t,n,i]}function Sa(e){const t=e.match(/\d+/g)||[],[n=0,i=0,a=0]=t.map((e=>Number(e)));return[n,i,a]}function za(e){const t=[90,49,244],n=[255,255,255];let i=[255,255,255];return e.startsWith("#")?i=Pa(e):e.startsWith("rgb(")&&(i=Sa(e)),xa(i,t)>xa(i,n)?t:n}function ja(e,t){return xa(e.startsWith("#")?Pa(e):Sa(e),t.startsWith("#")?Pa(t):Sa(t))}function Ca(e,t,n){const i=[e,t,n].map((function(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}));return.2126*i[0]+.7152*i[1]+.0722*i[2]}function xa(e,t){const n=Ca(e[0],e[1],e[2]),i=Ca(t[0],t[1],t[2]);return(Math.max(n,i)+.05)/(Math.min(n,i)+.05)}function La(e){var t;const n=null===(t=window.getComputedStyle(e).getPropertyValue("--color-background"))||void 0===t?void 0:t.trim();if(n)return n;for(const t of function*(e){let t=e;for(;t;){if(t.parentElement)t=t.parentElement;else if(t instanceof ShadowRoot)t=t.host;else{if(!(t instanceof Element))break;{const e=t.getRootNode();if(!(e instanceof ShadowRoot))break;t=e.host}}if(yield t,t===document.body)break}}(e)){const e=window.getComputedStyle(t).getPropertyValue("background-color");if(e&&"rgba(0, 0, 0, 0)"!==e)return e}return"#ffffff"}class Aa extends HTMLElement{constructor(){super();const e=document.createElement("template"),t=this.getAttribute("size")||"",n=this.getAttribute("background-color")||"#FFF";e.innerHTML=function(e,t){const n="large"===e?"shop-pay-logo-large":"shop-pay-logo",[i,a,o]=za(t),s=`rgb(${i}, ${a}, ${o})`;return`\n \n \n `}(t,n),this.attachShadow({mode:"open"}).appendChild(e.content.cloneNode(!0))}}class Ta extends HTMLElement{constructor(){super()}updateAttribute(e,t){this.getAttribute(e)!==t&&(t?this.setAttribute(e,t):this.removeAttribute(e))}getBooleanAttribute(e){const t=this.getAttribute(e);return null!=t}dispatchCustomEvent(e,t){const n=new CustomEvent(e,{bubbles:"error"!==e,cancelable:!1,composed:!0,detail:t});this.dispatchEvent(n)}}var Ea,Ia,Ma,Oa;class Na extends HTMLElement{constructor(){super(),Ea.set(this,void 0),s(this,Ea,this.attachShadow({mode:"open"}),"f")}connectedCallback(){const e=document.createElement("template"),t=this.getAttribute("size")||"",n=this.getAttribute("color")||"",i=this.getAttribute("label")||"";e.innerHTML=function(e,t="brand",n){return`\n \n \n ${n}\n