\n':os;t.innerHTML=e,this.attachShadow({mode:"open"}).append(t.content.cloneNode(!0))}static get observedAttributes(){return[ls,us,ds,eo,Co,ps,fs,gs]}connectedCallback(){var t;this.s_za=this.shadowRoot.querySelector(".sda-overlay"),this.s_Aa=this.shadowRoot.querySelector(".sda-modal"),this.s_Aa.style.overflow="hidden",this.s_ya=this.s_za.querySelector(".focus-trap--start"),this.s_wa=this.s_za.querySelector(".focus-trap--end"),this.s_pa=Boolean(this.getAttribute(cs)),null===(t=this.s_Aa)||void 0===t||t.classList.toggle(cs,this.s_pa),this.s_Ba=this.shadowRoot.querySelector(".sda-modal-close-button"),this.s_Ca=[this.s_Ba,this.s_za],this.s_za.addEventListener("click",this.s_Da.bind(this)),this.s_Ea||(this.s_Ea=this.s_Fa.bind(this),window.addEventListener("keydown",this.s_Ea))}disconnectedCallback(){var t;this.s_Ea&&window.removeEventListener("keydown",this.s_Ea),null===(t=this.s_Ga)||void 0===t||t.call(this)}attributeChangedCallback(t,e,n){var i,o;switch(t){case ls:this.s_na=Boolean(n);break;case cs:this.s_pa=Boolean(n),null===(i=this.s_Aa)||void 0===i||i.classList.toggle(cs,this.s_pa);break;case us:this.s_Aa.setAttribute("aria-label",n||"");break;case ds:{const t=this.getAttribute(ds);null!==t&&""!==t&&(this.s_Ha=document.querySelector(t));break}case Co:{const t=this.getAttribute(Co),e=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelector(".sda-shop-logo");e.innerHTML="shop-pay"===t?'':'';break}case ps:{const t=this.hasAttribute(ps);this.s_za.style.backgroundColor=t?"rgba(0, 0, 0, 0.18)":"rgba(0, 0, 0, 0.5)";break}case fs:{const t=this.getAttribute(fs);if(!t)break;this.s_Ia=t;break}case gs:this.s_ta=this.getAttribute(gs)||Un.Default}}setMonorailTracker(t){this.s_Ja=t}open(){return O(this,void 0,void 0,(function*(){if(this.s_ma)return;this.s_oa=!0,this.s_ma=!0,this.s_Ka=yield this.s_La();const t=Object.assign({},rs(this.s_Ka));this.s_Aa.style.opacity="0";const e=this.s_Ma();this.s_za.classList.remove("sda-hidden"),this.s_za.animate(this.s_Ka===Vn.Corner?[{boxShadow:"inset 0 0 #000",opacity:0},{boxShadow:"inset 0 70px #000",opacity:1}]:[{opacity:0},{opacity:1}],t),this.s_Na(!0,t);const{cleanup:n,updatePosition:i}=Hn({anchorElement:this.s_Ha,floatingElement:this.s_Aa,overlayElement:this.s_za,behavior:this.s_Ka},e,this.s_Ia);this.s_Ga=n;const o=yield i();if(this.s_ra=document.documentElement.style.overflow,document.documentElement.style.overflow="hidden",this.s_Ka===Vn.Dynamic&&null!==o){const{staticSide:t,middlewareData:e}=o,{arrow:n}=e;"left"!==t&&"right"!==t||(this.s_Aa.style.transformOrigin=`${t} ${null==n?void 0:n.y}px`),"top"!==t&&"bottom"!==t||(this.s_Aa.style.transformOrigin=`${null==n?void 0:n.x}px ${t}`)}this.s_Ja?this.s_Ja.trackShopPayModalStateChange({currentState:xe.Shown}):ue.notify(new Error("Monorail tracker not set in sheet modal"));try{const n=this.s_Aa.animate(Object.keys(e).length?[{opacity:0},{opacity:1}]:function(t){return t===Vn.Dynamic?[{transform:"scale(0)",opacity:0},{transform:"scale(1)",opacity:1}]:[{transform:ss(t),opacity:0},{transform:"none",opacity:1}]}(this.s_Ka),Object.assign({},function(t,e){return t===Vn.Corner?Object.assign(Object.assign({},e),{easing:"cubic-bezier(0,.95,.21,1.1)",delay:e.duration?400:0,duration:e.duration?550:0}):e}(this.s_Ka,t)));return yield n.finished,n}finally{this.s_oa=!1,this.s_Aa.style.opacity="1",this.s_Oa(),this.s_Pa()}}))}close(){var t;return O(this,void 0,void 0,(function*(){if(this.s_na||!this.s_ma)return Promise.resolve();this.s_oa=!0,this.s_Qa();const e=Object.assign(Object.assign({},rs(this.s_Ka)),{duration:200});var n;this.s_Na(!1,e),this.s_Aa.animate((n=this.s_Ka,n===Vn.Dynamic?[{transform:"scale(1)",opacity:1},{transform:"scale(0)",opacity:0}]:[{transform:"translate(0, 0)",opacity:1},{transform:ss(n),opacity:0}]),e).finished.finally((()=>this.s_Aa.style.display="none"));const i=this.s_za.animate(function(t){return t===Vn.Corner?[{boxShadow:"inset 0 70px #000",opacity:1},{boxShadow:"inset 0 0 #000",opacity:0}]:[{opacity:1},{opacity:0}]}(this.s_Ka),Object.assign({},e));this.s_Ja?this.s_Ja.trackShopPayModalStateChange({currentState:xe.Hidden}):ue.notify(new Error("Monorail tracker not set in sheet modal"));try{yield i.finished}finally{this.s_Ra(),null===(t=this.s_Ga)||void 0===t||t.call(this),document.documentElement.style.overflow=this.s_ra}return i}))}onContentLoaded(){this.s_Aa.style.overflow="visible"}setCloseButtonVisibility(t){this.s_Ba.style.display=t?"":"none"}removeDisplayElements(){var t;this.setCloseButtonVisibility(!1),this.s_Aa.style.cssText="border-radius: 0; padding: 0;";(null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".sda-shop-logo")).style.display="none";this.shadowRoot.querySelector(".sda-landing").style.width="100%"}s_Ma(){const t=getComputedStyle(this.s_Aa);return t.getPropertyValue("--sda-modal-top")&&(t.getPropertyValue("--sda-modal-right")||t.getPropertyValue("--sda-modal-left"))?{top:t.getPropertyValue("--sda-modal-top"),right:t.getPropertyValue("--sda-modal-right")||"auto",bottom:t.getPropertyValue("--sda-modal-bottom")||"auto",left:t.getPropertyValue("--sda-modal-left")||"auto"}:{}}s_La(){return O(this,void 0,void 0,(function*(){return Mt().width<=ns||this.s_pa?Vn.Mobile:this.s_Ha?Vn.Dynamic:this.s_qa&&this.s_ta===Un.Corner?Vn.Corner:Vn.Center}))}s_Ra(){this.s_oa=!1,this.s_ma=!1,this.s_Aa.style.display="",this.s_za.classList.add("sda-hidden")}s_Fa(t){hs.includes(t.key)&&this.s_Sa(t,"keyboard")}s_Da(t){this.s_Ca.includes(t.target)&&this.s_Sa(t,t.target===this.s_Ba?"closeButton":"overlay")}s_Sa(t,e){!this.s_ma||this.s_na||this.s_oa||(t.stopPropagation(),this.dispatchCustomEvent("modalcloserequest",e))}s_Oa(){const t=new IntersectionObserver((e=>{for(const t of e){t.boundingClientRect.top<0&&window.scrollTo({top:0,left:0})}t.disconnect()}));t.observe(this.s_Aa)}s_Pa(){var t;const e=[this.s_Ba,...as(this.s_Aa.querySelector("slot"))];this.s_va=e[0],this.s_xa=e[e.length-1];const n=this.getRootNode();(null===(t=n.activeElement)||void 0===t?void 0:t.closest("shop-sheet-modal"))&&n.activeElement.closest("shop-sheet-modal")===this||this.s_Aa.focus(),this.s_za.addEventListener("focus",this.s_ua,!0)}s_Qa(){this.s_va=void 0,this.s_xa=void 0,this.s_za.removeEventListener("focus",this.s_ua,!0)}s_Na(t,e){const n=this.s_Ka===Vn.Corner?"70px":"";if(!n)return;t&&(this.s_sa=document.documentElement.style.paddingTop);const i=t?n:this.s_sa,o=[{paddingTop:this.s_sa||"0"}];t?o.push({paddingTop:n}):o.unshift({paddingTop:n}),document.documentElement.animate(o,e).finished.finally((()=>{document.documentElement.style.paddingTop=i}))}}function bs(){return document.createElement("shop-sheet-modal")}var _s,ys,ws,xs,ks,Cs,Os,Ss,Ts,Es,js,As,$s;customElements.get("shop-sheet-modal")||customElements.define("shop-sheet-modal",vs);class Is{constructor(t){_s.add(this),ys.set(this,void 0),ws.set(this,"en"),B(this,ys,t,"f")}static getDefaultLanguage(){return"en"}get locale(){return z(this,ws,"f")}set locale(t){Is.allowedLocales.includes(t)&&B(this,ws,t,"f")}translate(t,e={}){const n=t.split(".");let i=z(this,ys,"f")[z(this,ws,"f")];try{for(const t of n)switch(typeof i){case"object":i=i[t];break;case"string":case"undefined":throw new ReferenceError}if(void 0===i)throw new ReferenceError;return z(this,_s,"m",xs).call(this,i,e)&&(i=i[z(this,_s,"m",ks).call(this,i,e.count)]),z(this,_s,"m",Cs).call(this,i,e)}catch(n){return e.defaultValue?e.defaultValue:t}}isEnglish(){return"en"===z(this,ws,"f")}}ys=new WeakMap,ws=new WeakMap,_s=new WeakSet,xs=function(t,e={}){return"string"!=typeof t&&"undefined"!==e.count},ks=function(t,e){let n=1===e?"one":"other";return 0===e&&"string"!=typeof t&&"undefined"!==t.zero&&(n="zero"),n},Cs=function(t,e={}){const n=t.match(/\{.+?\}/g);return n?n.reduce(((n,i)=>{const o=i.replace(/\{(.*)\}/,"$1");return e[o]?n.replace(i,e[o]):(ue.notify(new Error(`i18n: Missing translation key '${o}' for '${t}'`)),n)}),t):t},Is.allowedLocales=["en","bg-BG","cs","da","de","el","es","fi","fr","hi","hr-HR","hu","id","it","ja","ko","lt-LT","ms","nb","nl","pl","pt-BR","pt-PT","ro-RO","ru","sk-SK","sl-SI","sv","th","tr","vi","zh-CN","zh-TW"],function(t){t.Source="src",t.Initial="initial"}(Os||(Os={})),function(t){t.Email="email",t.Phone="phone",t.PhoneOwnershipVerified="phone_ownership_verified"}(Ss||(Ss={})),function(t){t.Follow="follow",t.Default="default",t.Custom="custom",t.Prequal="prequal",t.PopUp="pop_up",t.CheckoutSheet="checkout_sheet"}(Ts||(Ts={})),function(t){t.Start="start",t.SignUp="signup",t.Verify="verify",t.Captcha="captcha",t.OneClick="one-click"}(Es||(Es={})),function(t){t.ApiUnavailable="api_unavailable",t.InvalidApiKey="invalid_api_key",t.ServerError="server_error",t.UserBlocked="user_blocked",t.NoDiscountReceived="no_discount_received",t.InvalidAnalyticsContext="invalid_analytics_context",t.InstallmentsIneligible="installments_ineligible",t.CaptchaChallenge="captcha_challenge"}(js||(js={})),function(t){t.Init="init",t.Restart="restart",t.UserMatched="user_matched",t.UserNotMatched="user_not_matched",t.VerificationStepChanged="verification_step_changed",t.CustomizationValidityChanged="customization_validity_changed",t.PopUpOpened="pop_up_opened"}(As||(As={})),function(t){t.Start="start",t.SignUp="signup",t.EmailVerification="email_verification",t.PhoneVerification="phone_verification",t.WebAuthnVerification="webauthn_verification",t.PopUpOpened="pop_up_opened",t.OneClick="one_click",t.PersonalizeConsent="personalize_consent"}($s||($s={}));const Ns="setheight";var Ls,Ms,Ps,Rs,Ds,Fs,Vs,Us,zs,Bs,Ws,Hs,qs,Gs,Ks,Zs,Xs;!function(t){t.Interest="interest",t.SplitPay="split_pay",t.ZeroPercent="zero_percent"}(Ls||(Ls={})),function(t){t.Cart="cart",t.Product="product",t.Checkout="checkout"}(Ms||(Ms={})),function(t){t.IntroPageLoaded="prequal_intro_page_loaded",t.AuthorizeLoaded="prequal_authorize_loaded",t.BuyerFormOverlayLoaded="prequal_buyer_form_overlay_loaded",t.ResultsPageLoading="prequal_results_page_loading",t.ResultsPageLoaded="prequal_results_page_loaded",t.ContinueToCheckoutClicked="prequal_continue_to_checkout_clicked"}(Ps||(Ps={})),function(t){t.PayInFour="pay_in_4",t.AsLowAs="as_low_as",t.PayInFourAsLowAs="pay_in_4_or_as_low_as"}(Rs||(Rs={})),function(t){t.Standard="standard",t.CustomizedByMerchant="customized_by_merchant"}(Ds||(Ds={})),function(t){t.SplitPay="split_pay",t.ZeroInterest="zero_interest",t.InterestOnly="interest_only",t.ZeroInterestOnly="zero_interest_only",t.Adaptive="adaptive",t.Ineligible="ineligible"}(Fs||(Fs={})),function(t){t.Close="close",t.ContinueToCheckout="continue_to_checkout",t.CloseAuth="close_auth_modal"}(Vs||(Vs={})),function(t){t.SplitPay="split_pay",t.Monthly="monthly"}(Us||(Us={})),function(t){t.SignIn="sign_in",t.SignUp="sign_up"}(zs||(zs={}));class Js extends Lo{constructor(){super(...arguments),this.s_Ta=Gn.getInstance(),this.s_Ua=_t()}subscribeToHub(t,e){this.s_Ta.subscribe(t,this.s_Ua,e)}unsubscribeAllFromHub(){this.s_Ta.unsubscribeAll(this.s_Ua)}unsubscribeFromHub(t){this.s_Ta.unsubscribe(t,this.s_Ua)}publishToHub(t,e){this.s_Ta.publish(t,this.s_Ua,e),t===qn.UserSessionCreate&&(this.dispatchCustomEvent(qn.UserSessionCreate,e),this.s_Va(e))}s_Va(t){const{avatar:e,initial:n}=t,i=document.createElement("shop-user-avatar");i.setAttribute(Os.Source,e||""),i.setAttribute(Os.Initial,n),this.dispatchCustomEvent("storefront:signincompleted",{avatar:i})}}function Ys(t,e){return void 0===e?null:{[t]:e?"true":"false"}}function Qs(t,e){var n,i;const o=null!==(i=null===(n=e.parentElement)||void 0===n?void 0:n.offsetWidth)&&void 0!==i?i:0;return Math.min(o,t)||t}const tr="shop-status-indicator";var er;!function(t){t.Branded="branded",t.Regular="regular",t.Large="large"}(er||(er={}));class nr extends HTMLElement{constructor(){super(),Bs.add(this),Ws.set(this,void 0),Hs.set(this,void 0),qs.set(this,void 0);const t=document.createElement("template");t.innerHTML=`\n \n `,B(this,Ws,this.attachShadow({mode:"open"}),"f"),z(this,Ws,"f").appendChild(t.content.cloneNode(!0)),B(this,qs,er.Regular,"f")}connectedCallback(){z(this,Hs,"f")||(B(this,Hs,document.createElement("div"),"f"),z(this,Hs,"f").setAttribute("class",tr),z(this,Ws,"f").appendChild(z(this,Hs,"f"))),B(this,qs,this.getAttribute("loader")||er.Regular,"f")}setStatus(t){switch(t.status){case"loading":z(this,Bs,"m",Zs).call(this,t.message);break;case"success":case"error":z(this,Bs,"m",Xs).call(this,t)}}}function ir(t=er.Regular){const e=document.createElement("shop-status-indicator");return e.setAttribute("loader",t),e}Ws=new WeakMap,Hs=new WeakMap,qs=new WeakMap,Bs=new WeakSet,Gs=function(t){z(this,Hs,"f").innerHTML="",z(this,Hs,"f").appendChild(t)},Ks=function(t=""){const e=[tr,t||`${tr}-regular`].join(" ");z(this,Hs,"f").setAttribute("class",e)},Zs=function(t){const e="branded"===z(this,qs,"f")?"white":"brand",n="large"===z(this,qs,"f")?function(){const t=document.createElement("large-spinner");return t.setAttribute("role","img"),t.setAttribute("size","64"),t}():function(){const t=document.createElement("animated-shop-logo");return t.setAttribute("role","img"),t.setAttribute("size","22"),t}();n.setAttribute("color",e),void 0!==t&&n.setAttribute("label",t);const i=`${tr}-${z(this,qs,"f")}`;z(this,Bs,"m",Gs).call(this,n),z(this,Bs,"m",Ks).call(this,i)},Xs=function({status:t,message:e}){if(void 0!==e){const t=document.createElement("span");t.setAttribute("class",`${tr}-message`),t.textContent=e,z(this,Bs,"m",Gs).call(this,t)}z(this,Bs,"m",Ks).call(this,`${tr}-${t}`)},customElements.get("shop-status-indicator")||customElements.define("shop-status-indicator",nr);var or=Xt((function(t,e){
/*! @license DOMPurify 3.0.8 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.8/LICENSE */
t.exports=function(){const{entries:t,setPrototypeOf:e,isFrozen:n,getPrototypeOf:i,getOwnPropertyDescriptor:o}=Object;let{freeze:s,seal:r,create:a}=Object,{apply:l,construct:c}="undefined"!=typeof Reflect&&Reflect;s||(s=function(t){return t}),r||(r=function(t){return t}),l||(l=function(t,e,n){return t.apply(e,n)}),c||(c=function(t,e){return new t(...e)});const u=w(Array.prototype.forEach),h=w(Array.prototype.pop),d=w(Array.prototype.push),p=w(String.prototype.toLowerCase),f=w(String.prototype.toString),m=w(String.prototype.match),g=w(String.prototype.replace),v=w(String.prototype.indexOf),b=w(String.prototype.trim),_=w(RegExp.prototype.test),y=x(TypeError);function w(t){return function(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o2&&void 0!==arguments[2]?arguments[2]:p;e&&e(t,null);let s=i.length;for(;s--;){let e=i[s];if("string"==typeof e){const t=o(e);t!==e&&(n(i)||(i[s]=t),e=t)}t[e]=!0}return t}function C(t){for(let e=0;e/gm),V=r(/\${[\w\W]*}/gm),U=r(/^data-[\-\w.\u00B7-\uFFFF]/),z=r(/^aria-[\-\w]+$/),B=r(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),W=r(/^(?:\w+script|data):/i),H=r(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),q=r(/^html$/i);var G=Object.freeze({__proto__:null,MUSTACHE_EXPR:D,ERB_EXPR:F,TMPLIT_EXPR:V,DATA_ATTR:U,ARIA_ATTR:z,IS_ALLOWED_URI:B,IS_SCRIPT_OR_DATA:W,ATTR_WHITESPACE:H,DOCTYPE_NAME:q});const K=function(){return"undefined"==typeof window?null:window},Z=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let n=null;const i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(n=e.getAttribute(i));const o="dompurify"+(n?"#"+n:"");try{return t.createPolicy(o,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+o+" could not be created."),null}};function X(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:K();const n=t=>X(t);if(n.version="3.0.8",n.removed=[],!e||!e.document||9!==e.document.nodeType)return n.isSupported=!1,n;let{document:i}=e;const o=i,r=o.currentScript,{DocumentFragment:l,HTMLTemplateElement:c,Node:w,Element:x,NodeFilter:C,NamedNodeMap:D=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:F,DOMParser:V,trustedTypes:U}=e,z=x.prototype,W=S(z,"cloneNode"),H=S(z,"nextSibling"),J=S(z,"childNodes"),Y=S(z,"parentNode");if("function"==typeof c){const t=i.createElement("template");t.content&&t.content.ownerDocument&&(i=t.content.ownerDocument)}let Q,tt="";const{implementation:et,createNodeIterator:nt,createDocumentFragment:it,getElementsByTagName:ot}=i,{importNode:st}=o;let rt={};n.isSupported="function"==typeof t&&"function"==typeof Y&&et&&void 0!==et.createHTMLDocument;const{MUSTACHE_EXPR:at,ERB_EXPR:lt,TMPLIT_EXPR:ct,DATA_ATTR:ut,ARIA_ATTR:ht,IS_SCRIPT_OR_DATA:dt,ATTR_WHITESPACE:pt}=G;let{IS_ALLOWED_URI:ft}=G,mt=null;const gt=k({},[...T,...E,...j,...$,...N]);let vt=null;const bt=k({},[...L,...M,...P,...R]);let _t=Object.seal(a(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),yt=null,wt=null,xt=!0,kt=!0,Ct=!1,Ot=!0,St=!1,Tt=!1,Et=!1,jt=!1,At=!1,$t=!1,It=!1,Nt=!0,Lt=!1;const Mt="user-content-";let Pt=!0,Rt=!1,Dt={},Ft=null;const Vt=k({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ut=null;const zt=k({},["audio","video","img","source","image","track"]);let Bt=null;const Wt=k({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ht="http://www.w3.org/1998/Math/MathML",qt="http://www.w3.org/2000/svg",Gt="http://www.w3.org/1999/xhtml";let Kt=Gt,Zt=!1,Xt=null;const Jt=k({},[Ht,qt,Gt],f);let Yt=null;const Qt=["application/xhtml+xml","text/html"],te="text/html";let ee=null,ne=null;const ie=i.createElement("form"),oe=function(t){return t instanceof RegExp||t instanceof Function},se=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ne||ne!==t){if(t&&"object"==typeof t||(t={}),t=O(t),Yt=-1===Qt.indexOf(t.PARSER_MEDIA_TYPE)?te:t.PARSER_MEDIA_TYPE,ee="application/xhtml+xml"===Yt?f:p,mt="ALLOWED_TAGS"in t?k({},t.ALLOWED_TAGS,ee):gt,vt="ALLOWED_ATTR"in t?k({},t.ALLOWED_ATTR,ee):bt,Xt="ALLOWED_NAMESPACES"in t?k({},t.ALLOWED_NAMESPACES,f):Jt,Bt="ADD_URI_SAFE_ATTR"in t?k(O(Wt),t.ADD_URI_SAFE_ATTR,ee):Wt,Ut="ADD_DATA_URI_TAGS"in t?k(O(zt),t.ADD_DATA_URI_TAGS,ee):zt,Ft="FORBID_CONTENTS"in t?k({},t.FORBID_CONTENTS,ee):Vt,yt="FORBID_TAGS"in t?k({},t.FORBID_TAGS,ee):{},wt="FORBID_ATTR"in t?k({},t.FORBID_ATTR,ee):{},Dt="USE_PROFILES"in t&&t.USE_PROFILES,xt=!1!==t.ALLOW_ARIA_ATTR,kt=!1!==t.ALLOW_DATA_ATTR,Ct=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Ot=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,St=t.SAFE_FOR_TEMPLATES||!1,Tt=t.WHOLE_DOCUMENT||!1,At=t.RETURN_DOM||!1,$t=t.RETURN_DOM_FRAGMENT||!1,It=t.RETURN_TRUSTED_TYPE||!1,jt=t.FORCE_BODY||!1,Nt=!1!==t.SANITIZE_DOM,Lt=t.SANITIZE_NAMED_PROPS||!1,Pt=!1!==t.KEEP_CONTENT,Rt=t.IN_PLACE||!1,ft=t.ALLOWED_URI_REGEXP||B,Kt=t.NAMESPACE||Gt,_t=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&oe(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(_t.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&oe(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(_t.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(_t.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),St&&(kt=!1),$t&&(At=!0),Dt&&(mt=k({},N),vt=[],!0===Dt.html&&(k(mt,T),k(vt,L)),!0===Dt.svg&&(k(mt,E),k(vt,M),k(vt,R)),!0===Dt.svgFilters&&(k(mt,j),k(vt,M),k(vt,R)),!0===Dt.mathMl&&(k(mt,$),k(vt,P),k(vt,R))),t.ADD_TAGS&&(mt===gt&&(mt=O(mt)),k(mt,t.ADD_TAGS,ee)),t.ADD_ATTR&&(vt===bt&&(vt=O(vt)),k(vt,t.ADD_ATTR,ee)),t.ADD_URI_SAFE_ATTR&&k(Bt,t.ADD_URI_SAFE_ATTR,ee),t.FORBID_CONTENTS&&(Ft===Vt&&(Ft=O(Ft)),k(Ft,t.FORBID_CONTENTS,ee)),Pt&&(mt["#text"]=!0),Tt&&k(mt,["html","head","body"]),mt.table&&(k(mt,["tbody"]),delete yt.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw y('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw y('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Q=t.TRUSTED_TYPES_POLICY,tt=Q.createHTML("")}else void 0===Q&&(Q=Z(U,r)),null!==Q&&"string"==typeof tt&&(tt=Q.createHTML(""));s&&s(t),ne=t}},re=k({},["mi","mo","mn","ms","mtext"]),ae=k({},["foreignobject","desc","title","annotation-xml"]),le=k({},["title","style","font","a","script"]),ce=k({},[...E,...j,...A]),ue=k({},[...$,...I]),he=function(t){let e=Y(t);e&&e.tagName||(e={namespaceURI:Kt,tagName:"template"});const n=p(t.tagName),i=p(e.tagName);return!!Xt[t.namespaceURI]&&(t.namespaceURI===qt?e.namespaceURI===Gt?"svg"===n:e.namespaceURI===Ht?"svg"===n&&("annotation-xml"===i||re[i]):Boolean(ce[n]):t.namespaceURI===Ht?e.namespaceURI===Gt?"math"===n:e.namespaceURI===qt?"math"===n&&ae[i]:Boolean(ue[n]):t.namespaceURI===Gt?!(e.namespaceURI===qt&&!ae[i])&&!(e.namespaceURI===Ht&&!re[i])&&!ue[n]&&(le[n]||!ce[n]):!("application/xhtml+xml"!==Yt||!Xt[t.namespaceURI]))},de=function(t){d(n.removed,{element:t});try{t.parentNode.removeChild(t)}catch(e){t.remove()}},pe=function(t,e){try{d(n.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){d(n.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!vt[t])if(At||$t)try{de(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},fe=function(t){let e=null,n=null;if(jt)t=""+t;else{const e=m(t,/^[\r\n\t ]+/);n=e&&e[0]}"application/xhtml+xml"===Yt&&Kt===Gt&&(t=''+t+"");const o=Q?Q.createHTML(t):t;if(Kt===Gt)try{e=(new V).parseFromString(o,Yt)}catch(t){}if(!e||!e.documentElement){e=et.createDocument(Kt,"template",null);try{e.documentElement.innerHTML=Zt?tt:o}catch(t){}}const s=e.body||e.documentElement;return t&&n&&s.insertBefore(i.createTextNode(n),s.childNodes[0]||null),Kt===Gt?ot.call(e,Tt?"html":"body")[0]:Tt?e.documentElement:s},me=function(t){return nt.call(t.ownerDocument||t,t,C.SHOW_ELEMENT|C.SHOW_COMMENT|C.SHOW_TEXT,null)},ge=function(t){return t instanceof F&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof D)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},ve=function(t){return"function"==typeof w&&t instanceof w},be=function(t,e,i){rt[t]&&u(rt[t],(t=>{t.call(n,e,i,ne)}))},_e=function(t){let e=null;if(be("beforeSanitizeElements",t,null),ge(t))return de(t),!0;const i=ee(t.nodeName);if(be("uponSanitizeElement",t,{tagName:i,allowedTags:mt}),t.hasChildNodes()&&!ve(t.firstElementChild)&&_(/<[/\w]/g,t.innerHTML)&&_(/<[/\w]/g,t.textContent))return de(t),!0;if(!mt[i]||yt[i]){if(!yt[i]&&we(i)){if(_t.tagNameCheck instanceof RegExp&&_(_t.tagNameCheck,i))return!1;if(_t.tagNameCheck instanceof Function&&_t.tagNameCheck(i))return!1}if(Pt&&!Ft[i]){const e=Y(t)||t.parentNode,n=J(t)||t.childNodes;if(n&&e)for(let i=n.length-1;i>=0;--i)e.insertBefore(W(n[i],!0),H(t))}return de(t),!0}return t instanceof x&&!he(t)?(de(t),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!_(/<\/no(script|embed|frames)/i,t.innerHTML)?(St&&3===t.nodeType&&(e=t.textContent,u([at,lt,ct],(t=>{e=g(e,t," ")})),t.textContent!==e&&(d(n.removed,{element:t.cloneNode()}),t.textContent=e)),be("afterSanitizeElements",t,null),!1):(de(t),!0)},ye=function(t,e,n){if(Nt&&("id"===e||"name"===e)&&(n in i||n in ie))return!1;if(kt&&!wt[e]&&_(ut,e));else if(xt&&_(ht,e));else if(!vt[e]||wt[e]){if(!(we(t)&&(_t.tagNameCheck instanceof RegExp&&_(_t.tagNameCheck,t)||_t.tagNameCheck instanceof Function&&_t.tagNameCheck(t))&&(_t.attributeNameCheck instanceof RegExp&&_(_t.attributeNameCheck,e)||_t.attributeNameCheck instanceof Function&&_t.attributeNameCheck(e))||"is"===e&&_t.allowCustomizedBuiltInElements&&(_t.tagNameCheck instanceof RegExp&&_(_t.tagNameCheck,n)||_t.tagNameCheck instanceof Function&&_t.tagNameCheck(n))))return!1}else if(Bt[e]);else if(_(ft,g(n,pt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==v(n,"data:")||!Ut[t])if(Ct&&!_(dt,g(n,pt,"")));else if(n)return!1;return!0},we=function(t){return t.indexOf("-")>0},xe=function(t){be("beforeSanitizeAttributes",t,null);const{attributes:e}=t;if(!e)return;const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:vt};let o=e.length;for(;o--;){const s=e[o],{name:r,namespaceURI:a,value:l}=s,c=ee(r);let d="value"===r?l:b(l);if(i.attrName=c,i.attrValue=d,i.keepAttr=!0,i.forceKeepAttr=void 0,be("uponSanitizeAttribute",t,i),d=i.attrValue,i.forceKeepAttr)continue;if(pe(r,t),!i.keepAttr)continue;if(!Ot&&_(/\/>/i,d)){pe(r,t);continue}St&&u([at,lt,ct],(t=>{d=g(d,t," ")}));const p=ee(t.nodeName);if(ye(p,c,d)){if(!Lt||"id"!==c&&"name"!==c||(pe(r,t),d=Mt+d),Q&&"object"==typeof U&&"function"==typeof U.getAttributeType)if(a);else switch(U.getAttributeType(p,c)){case"TrustedHTML":d=Q.createHTML(d);break;case"TrustedScriptURL":d=Q.createScriptURL(d)}try{a?t.setAttributeNS(a,r,d):t.setAttribute(r,d),h(n.removed)}catch(t){}}}be("afterSanitizeAttributes",t,null)},ke=function t(e){let n=null;const i=me(e);for(be("beforeSanitizeShadowDOM",e,null);n=i.nextNode();)be("uponSanitizeShadowNode",n,null),_e(n)||(n.content instanceof l&&t(n.content),xe(n));be("afterSanitizeShadowDOM",e,null)};return n.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,s=null,r=null,a=null;if(Zt=!t,Zt&&(t="\x3c!--\x3e"),"string"!=typeof t&&!ve(t)){if("function"!=typeof t.toString)throw y("toString is not a function");if("string"!=typeof(t=t.toString()))throw y("dirty is not a string, aborting")}if(!n.isSupported)return t;if(Et||se(e),n.removed=[],"string"==typeof t&&(Rt=!1),Rt){if(t.nodeName){const e=ee(t.nodeName);if(!mt[e]||yt[e])throw y("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof w)i=fe("\x3c!----\x3e"),s=i.ownerDocument.importNode(t,!0),1===s.nodeType&&"BODY"===s.nodeName||"HTML"===s.nodeName?i=s:i.appendChild(s);else{if(!At&&!St&&!Tt&&-1===t.indexOf("<"))return Q&&It?Q.createHTML(t):t;if(i=fe(t),!i)return At?null:It?tt:""}i&&jt&&de(i.firstChild);const c=me(Rt?t:i);for(;r=c.nextNode();)_e(r)||(r.content instanceof l&&ke(r.content),xe(r));if(Rt)return t;if(At){if($t)for(a=it.call(i.ownerDocument);i.firstChild;)a.appendChild(i.firstChild);else a=i;return(vt.shadowroot||vt.shadowrootmode)&&(a=st.call(o,a,!0)),a}let h=Tt?i.outerHTML:i.innerHTML;return Tt&&mt["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&_(q,i.ownerDocument.doctype.name)&&(h="\n"+h),St&&u([at,lt,ct],(t=>{h=g(h,t," ")})),Q&&It?Q.createHTML(h):h},n.setConfig=function(){se(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Et=!0},n.clearConfig=function(){ne=null,Et=!1},n.isValidAttribute=function(t,e,n){ne||se({});const i=ee(t),o=ee(e);return ye(i,o,n)},n.addHook=function(t,e){"function"==typeof e&&(rt[t]=rt[t]||[],d(rt[t],e))},n.removeHook=function(t){if(rt[t])return h(rt[t])},n.removeHooks=function(t){rt[t]&&(rt[t]=[])},n.removeAllHooks=function(){rt={}},n}var J=X();return J}()}));const sr="",rr=(t,e)=>`${e}`,ar=(t,e,n)=>`\n\n\n
\n
${t}
\n
\n \n
\n
\n \n
\n
\n`;class lr extends Ai{constructor({elementName:t,analyticsTraceId:e}){super({elementName:t,analyticsTraceId:e,flow:"follow"})}trackFollowButtonPageImpression(t){this.trackPageImpression({page:t?ye.ComponentLoadedFollowing:ye.ComponentLoadedNotFollowing})}trackFollowButtonInViewport(){this.trackPageImpression({page:ye.FollowButtonShownInViewport})}trackFollowingGetAppButtonPageImpression(){this.trackPageImpression({page:ye.FollowingGetShopAppCta})}trackFollowButtonClicked(){this.trackShopPayLoginWithShopSdkUserAction({userAction:we.FollowOnShopClicked})}trackFollowingGetAppButtonClicked(){this.trackShopPayLoginWithShopSdkUserAction({userAction:we.FollowingGetShopAppClick})}}class cr extends Ai{constructor({elementName:n,analyticsTraceId:i,analyticsContext:o=t.Default,flowVersion:s="unspecified",checkoutVersion:r,checkoutToken:a,shopId:l,shopPermanentDomain:c}){super({elementName:n,analyticsTraceId:i,flow:e[o],flowVersion:s,checkoutVersion:r,checkoutToken:a,shopId:l,shopPermanentDomain:c}),this.s_Wa=!1}trackLoginDefaultButtonClicked(){this.trackShopPayLoginWithShopSdkUserAction({userAction:we.ContinueWithShopClicked})}trackEmailEnteredAction(){this.s_Wa||(this.s_Wa=!0,this.trackShopPayLoginWithShopSdkUserAction({userAction:we.EmailEntered}))}}class ur extends cr{constructor({elementName:e,flowVersion:n,analyticsTraceId:i}){super({elementName:e,analyticsTraceId:i,analyticsContext:t.ClassicCustomerAccounts,flowVersion:n})}trackClassicCustomerAccountsLoginPageImpression(){this.trackPageImpression({page:ye.ClassicCustomerAccountLogin})}trackClassicCustomerAccountsCreateAccountPageImpression(){this.trackPageImpression({page:ye.ClassicCustomerAccountCreateAccount})}trackClassicCustomerAccountsAccountPageImpression(){this.trackPageImpression({page:ye.ClassicCustomerAccount})}trackClassicCustomerAccountsContinueWithShopPageImpression(){this.trackPageImpression({page:ye.ContinueWithShop})}trackClassicCustomerAccountsCreateAccountAction(){this.trackShopPayLoginWithShopSdkUserAction({userAction:we.CreateAccountLinkClicked})}}const hr=window.location.origin,dr=()=>hr,pr=({version:t,apiKey:e,analyticsTraceId:n,analyticsContext:i,isCompactLayout:o,isFullView:s,flow:r,flowVersion:a,emailVerificationRequired:l,signUpEnabled:c,oauthParams:u,avoidPayAltDomain:h,avoidSdkSession:d,hideCopy:p,modalCustomized:f,popupWindowParams:m,consentChallenge:g,checkoutVersion:v,checkoutToken:b,transactionParams:_,shopId:y,requireVerification:w})=>"1"===t?function(t){return Boolean(void 0!==t&&"clientId"in t&&(null==t?void 0:t.clientId))}(u)?(({oauthParams:t,analyticsTraceId:e,analyticsContext:n,isCompactLayout:i,isFullView:o,flow:s,flowVersion:r,emailVerificationRequired:a,signUpEnabled:l,avoidPayAltDomain:c,hideCopy:u,modalCustomized:h,apiKey:d,popupWindowParams:p,consentChallenge:f,checkoutVersion:m,checkoutToken:g,transactionParams:v,shopId:b,requireVerification:_})=>{const{clientId:y,redirectType:w}=t,x=t.scope||"openid email",k=t.responseType||"id_token",C=t.responseMode||"web_message",O=t.redirectUri||window.location.origin,{popUpName:S,popUpFeatures:T}=p||{},E=new URLSearchParams(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({target_origin:window.location.origin,response_mode:C,response_type:k,scope:x,version:"1",client_id:y},w&&{redirect_type:w}),{redirect_uri:O,locale:"en"}),e&&{analytics_trace_id:e}),n&&{analytics_context:n}),Ys("compact_layout",i)),d&&{apiKey:d}),s&&{flow:s}),r&&{flow_version:r}),t.codeChallenge&&{code_challenge:t.codeChallenge}),t.codeChallengeMethod&&{code_challenge_method:t.codeChallengeMethod}),t.state&&{state:t.state}),m&&{checkout_version:m}),g&&{checkout_token:g}),v&&{transaction_params:v}),b&&{shop_id:b}),Ys("full_view",o)),Ys("email_verification_required",a)),Ys("sign_up_enabled",l)),Ys("hide_copy",u)),Ys("customize-modal",h)),Ys("consent_challenge",f)),Ys("require_verification",_)),"pop_up"===w?{pop_up_name:S,pop_up_features:T}:{}));return`${ri}${c?"/pay/sdk-authorize":"/pay/sdk-session"}?${E}`})({popupWindowParams:m,oauthParams:u,analyticsTraceId:n,analyticsContext:i,isCompactLayout:o,isFullView:s,flow:r,flowVersion:a,emailVerificationRequired:l,signUpEnabled:c,avoidPayAltDomain:h,hideCopy:p,modalCustomized:f,apiKey:e,consentChallenge:g,checkoutVersion:v,checkoutToken:b,transactionParams:_,shopId:y,requireVerification:w}):"":(({analyticsTraceId:t,analyticsContext:e,isCompactLayout:n,isFullView:i,flow:o,flowVersion:s,emailVerificationRequired:r,signUpEnabled:a,avoidSdkSession:l,hideCopy:c,modalCustomized:u,apiKey:h,consentChallenge:d,checkoutVersion:p,checkoutToken:f,transactionParams:m,shopId:g,requireVerification:v,oauthParams:b})=>{const _=new URLSearchParams(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({target_origin:window.location.origin,api_key:null!=h?h:"123",locale:"en"},t&&{analytics_trace_id:t}),e&&{analytics_context:e}),Ys("compact_layout",n)),o&&{flow:o}),s&&{flow_version:s}),p&&{checkout_version:p}),f&&{checkout_token:f}),m&&{transaction_params:m}),g&&{shop_id:g}),Ys("full_view",i)),Ys("email_verification_required",r)),Ys("sign_up_enabled",a)),Ys("avoid_sdk_session",l)),Ys("hide_copy",c)),Ys("customize-modal",u)),Ys("consent_challenge",d)),Ys("require_verification",v)),(null==b?void 0:b.responseType)&&{response_type:b.responseType}),(null==b?void 0:b.redirectType)&&{redirect_type:b.redirectType}));return`${hr}/services/login_with_shop/authorize?${_}`})({analyticsTraceId:n,analyticsContext:i,isCompactLayout:o,isFullView:s,flow:r,flowVersion:a,emailVerificationRequired:l,signUpEnabled:c,avoidSdkSession:d,hideCopy:p,modalCustomized:f,apiKey:e,consentChallenge:g,checkoutVersion:v,checkoutToken:b,transactionParams:_,shopId:y,requireVerification:w,oauthParams:u});function fr(t,e,n){return function(t,e){return Object.values(e).includes(t)}(t,e)?t:n}var mr,gr;const vr={[Ts.Follow]:"shop-follow-button",[Ts.Default]:"shop-login-default",[Ts.Prequal]:"shop-login-default",[Ts.PopUp]:"shop-login-default",[Ts.CheckoutSheet]:null,[Ts.Custom]:"shop-login-default"},br={[Ki]:!1,[Zi]:!1,[Xi]:!1,[Qi]:!1,[to]:"",[uo]:!1,[ho]:!1,[fo]:"unspecified",[mo]:"",[vo]:!1,[Gi]:!1,[Oo]:!1,[Eo]:!1};class _r extends Lo{constructor(){super(...arguments),mr.set(this,void 0),gr.set(this,void 0)}static get observedAttributes(){return[Bi,Wi,fo,qi,Ki,Zi,Xi,Qi,no,io,Yi,Ji,to,Ji,oo,so,ro,ao,lo,co,mo,go,vo,bo,_o,yo,wo,xo,ko,Co,Oo,eo,So,$o,Io,To,No,jo,Ao,Eo,uo,ho]}get clientId(){return this.s_Xa(Bi)}set clientId(t){this.updateAttribute(Bi,t)}set redirectUri(t){this.updateAttribute(Ji,t)}get version(){return this.s_Xa(Wi)}set version(t){this.updateAttribute(Wi,t)}get email(){return this.s_Xa(mo)}set email(t){this.updateAttribute(mo,t)}set firstName(t){this.updateAttribute(jo,t)}set lastName(t){this.updateAttribute(Ao,t)}set popUpName(t){this.updateAttribute(xo,t)}set popUpFeatures(t){this.updateAttribute(ko,t)}connectedCallback(){var t;B(this,mr,fr(this.getAttribute(Hi),Ts,Ts.Default),"f"),B(this,gr,this.s_Ya({actionType:z(this,mr,"f"),attributes:this.s_Za()}),"f"),this.shadowRoot||this.attachShadow({mode:"open"}),z(this,gr,"f")&&(this.shadowRoot.innerHTML="",null===(t=this.shadowRoot)||void 0===t||t.appendChild(z(this,gr,"f")))}disconnectedCallback(){}attributeChangedCallback(t,e,n){var i,o;const s=n||this.s_Xa(t);"boolean"==typeof s?this.updateAttribute(t,s?"":void 0):this.updateAttribute(t,s||void 0),null===n?null===(i=z(this,gr,"f"))||void 0===i||i.removeAttribute(t):null===(o=z(this,gr,"f"))||void 0===o||o.setAttribute(t,n)}requestShow(t){z(this,gr,"f")&&"requestShow"in z(this,gr,"f")&&z(this,gr,"f").requestShow(t)}listenToInput(t){z(this,gr,"f")&&"listenToInput"in z(this,gr,"f")&&z(this,gr,"f").listenToInput(t)}stopListeningToInput(){z(this,gr,"f")&&"stopListeningToInput"in z(this,gr,"f")&&z(this,gr,"f").stopListeningToInput()}dispatchCustomEvent(t,e){super.dispatchCustomEvent(t,e)}s_Ya({actionType:t,attributes:e}){const n=vr[t];if(!n)return;const i=document.createElement(n);return i?(Object.entries(e).forEach((([t,e])=>{e&&i.setAttribute(t,String(e))})),i):void 0}s_Za(){return _r.observedAttributes.reduce(((t,e)=>Object.assign(Object.assign({},t),{[e]:this.s_Xa(e)})),Object.assign(Object.assign({},br),{[po]:this.s_Xa(Hi)}))}s_Xa(t){switch(t){case Hi:case po:return fr(this.getAttribute(Hi),Ts,Ts.Default);case Ki:case Zi:case Xi:case Qi:case uo:case ho:case vo:case Gi:case Oo:case Eo:case no:return this.getBooleanAttribute(t);case to:case mo:return this.getAttribute(t)||"";case fo:return this.getAttribute(t)||"unspecified";case eo:return this.getAttribute(t)||Ft();default:return this.getAttribute(t)||void 0}}}function yr(){de("shop-login-button",_r)}var wr,xr,kr,Cr,Or,Sr;mr=new WeakMap,gr=new WeakMap;class Tr{constructor(t,e){wr.set(this,void 0),xr.set(this,void 0),t&&(B(this,wr,t,"f"),B(this,xr,(t=>{e(t.target.value)}),"f"),z(this,wr,"f").addEventListener("input",z(this,xr,"f")))}destroy(){z(this,wr,"f")&&z(this,xr,"f")&&z(this,wr,"f").removeEventListener("input",z(this,xr,"f"))}}function Er(t){if(!t)return;const e=parseInt(t,10);return isNaN(e)?void 0:e}wr=new WeakMap,xr=new WeakMap;class jr extends HTMLElement{constructor(){super(),kr.add(this),Cr.set(this,null),Or.set(this,null),customElements.get("shop-logo")||customElements.define("shop-logo",ts)}connectedCallback(){return O(this,void 0,void 0,(function*(){yield z(this,kr,"m",Sr).call(this);const t=document.createElement("template");if(t.innerHTML=`\n \n \n `,B(this,Cr,this.attachShadow({mode:"open"}),"f"),z(this,Cr,"f").appendChild(t.content.cloneNode(!0)),z(this,Or,"f")){const t=z(this,Or,"f").translate("login_with_shop.login",{shop:Ar("white")});z(this,Cr,"f").querySelector('slot[name="login-text"]').innerHTML=t}}))}setFocused(){var t,e;null===(e=null===(t=z(this,Cr,"f"))||void 0===t?void 0:t.querySelector("button"))||void 0===e||e.focus()}}function Ar(t){return``}Cr=new WeakMap,Or=new WeakMap,kr=new WeakSet,Sr=function(){return O(this,void 0,void 0,(function*(){try{B(this,Or,new Is({["en"]:{follow_on_shop:{follow:"Follow on {shop}",following:"Following on {shop}",auth_modal:{title:"Follow on Shop",description:"Stay in the know—never miss a sale, restock, or order update."},following_modal:{title:"Visit {store} on Shop",subtitle:"Everything you need to shop, track, and pay—all in one place.",qr_header:"Scan to visit {store} on the Shop app",qr_alt_text:"Shop app QR code",continue:"Continue"},completed:{title:"You're following {store}",subtitle:"We've sent you an email with a link to download the Shop app."},personalization_consent:{title:"To follow on Shop, sync your shopping activity"}},login_with_shop:{login:"Sign in with {shop}",auth_modal:{login_title:"Sign in with Shop",login_title_with_store:"Sign in to {store} with Shop",login_description:"The easiest and most secure way to sign in to {store}—no password needed.",signup_title:"Create an account",signup_description:"Enter your phone number to create a Shop account.",login_sms_title:"Confirm it's you",login_sms_description:"Enter the code sent to {phoneNumber}",login_email_title:"Confirm it’s you",login_email_description:"Enter the code sent to your email, {email}",login_email_footer:"By continuing, your email address will be shared with {store}.",login_webauthn_title:"Confirm it’s you",login_webauthn_description:"Sign in with a passkey to securely use your saved information.",login_webauthn_footer:"By continuing, your email address will be shared with {store}."}},verified_email_auth:{auth_modal:{login_title:"Log in or sign up",signup_title:"Continue with Shop",signup_description:"Create a Shop account to sign in to {clientName}–no passwords needed"}},legal:{terms_of_service:"terms of service",privacy_policy:"privacy policy",terms:"terms",client:"See {clientName}’s {termsOfService} and {privacyPolicy}.",shop:"By continuing, you agree to Shop’s {termsOfService} and acknowledge the {privacyPolicy}.",authorized_scopes:{email:"By continuing, your email address will be shared with {store}.",email_name:"By continuing, your name and email address will be shared with {store}."}},checkout_modal:{auth_modal:{login_sms_description:"Enter the code sent to {phoneNumber} to securely use your saved information.",login_email_description:"Enter the code sent to your email, {email} to securely use your saved information."}},customer_accounts:{remember_me:"Save my info securely with Shop to sign in faster everywhere",sign_up_page:{auth_modal:{login_title:"Continue with Shop",login_description:"Use your Shop account to sign in everywhere—no password needed.",login_sms_description:"Use your Shop account to sign in everywhere—no password needed.\r\n\r\nConfirm it's you, enter the code sent to {phoneNumber}",login_email_description:"Use your Shop account to sign in everywhere—no password needed.\r\n\r\nConfirm it's you, enter the code sent to your email, {email}",login_webauthn_title:"Continue with Shop",login_webauthn_description:"Sign in with a passkey to securely use your saved information."}}},payment_request:{auth_modal:{login_title:"Check out with Shop Pay",login_description:"Use your saved information to check out securely at {store}.",login_sms_title:"Confirm it's you",login_sms_description:"Enter the code sent to {phoneNumber} to securely use your saved information.",login_email_title:"Confirm it’s you",login_email_description:"Enter the code sent to your email, {email} to securely use your saved information."}}}}),"f")}catch(t){t instanceof Error&&ue.notify(t)}return null}))},customElements.get("login-with-shop-button")||customElements.define("login-with-shop-button",jr);function $r(t){if(!or.isSupported)throw new Error("Sanitization of custom modal text is not supported in this browser.");return or.sanitize(t,{ALLOWED_TAGS:[]})}const Ir={step:$s.Start,configurable:!1,headerVisible:!1,headerDividerVisible:!1,headerTemplate:"",descriptionTemplate:"",userNameKnown:!1,sessionDetected:!1,templateVariables:{clientName:"the store",store:"the store"}};function Nr(t,e){switch(t.type){case As.Init:return t.payload.personalizeConsentChallenge?Object.assign(Object.assign({},e),{step:$s.PersonalizeConsent,headerVisible:!0,headerDividerVisible:!1,userNameKnown:t.payload.userNameKnown||!1,templateVariables:Object.assign(Object.assign(Object.assign({},e.templateVariables),t.payload),{store:t.payload.clientName}),headerTemplate:"login_with_shop.auth_modal.login_title_with_store",descriptionTemplate:"",sessionDetected:t.payload.userFound}):Object.assign(Object.assign({},e),{configurable:!0,headerVisible:!0,headerDividerVisible:t.payload.userFound,step:t.payload.userFound?$s.OneClick:$s.Start,userNameKnown:t.payload.userNameKnown||!1,templateVariables:Object.assign(Object.assign(Object.assign({},e.templateVariables),t.payload),{store:t.payload.clientName}),headerTemplate:"login_with_shop.auth_modal.login_title",descriptionTemplate:"login_with_shop.auth_modal.login_description",sessionDetected:t.payload.userFound});case As.PopUpOpened:return Object.assign(Object.assign({},e),{step:$s.PopUpOpened});case As.Restart:return Object.assign(Object.assign({},e),{configurable:!0,headerDividerVisible:!1,step:$s.Start,userNameKnown:!1,headerTemplate:"login_with_shop.auth_modal.login_title",descriptionTemplate:"login_with_shop.auth_modal.login_description",sessionDetected:!1,templateVariables:Object.assign(Object.assign({},e.templateVariables),{email:"",phoneNumber:"",userFound:!1,userNameKnown:!1})});case As.UserMatched:return t.payload.personalizeConsentChallenge?Object.assign(Object.assign({},e),{step:$s.PersonalizeConsent,userNameKnown:t.payload.hasName||!1,headerVisible:!0,headerDividerVisible:!1,headerTemplate:"login_with_shop.auth_modal.login_title_with_store",descriptionTemplate:"",sessionDetected:t.payload.userCookieExists}):t.payload.userCookieExists?Object.assign(Object.assign({},e),{configurable:!0,headerDividerVisible:!0,step:$s.OneClick,userNameKnown:t.payload.hasName||!1,sessionDetected:!0}):Object.assign(Object.assign({},e),{userNameKnown:t.payload.hasName||!1,sessionDetected:!1});case As.UserNotMatched:return Object.assign(Object.assign({},e),{step:$s.SignUp,headerDividerVisible:!0,userNameKnown:!1,configurable:!1,headerTemplate:"login_with_shop.auth_modal.signup_title",descriptionTemplate:"login_with_shop.auth_modal.signup_description",sessionDetected:!1});case As.VerificationStepChanged:{const{step:n,phone:i="",email:o=""}=t.payload;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),{step:Lr(n),configurable:!1,headerDividerVisible:!0,templateVariables:Object.assign(Object.assign({},e.templateVariables),{phoneNumber:i.replaceAll(" "," "),email:o}),legalTextVariant:"authorize"}),"email"===n&&{headerTemplate:"login_with_shop.auth_modal.login_email_title",descriptionTemplate:"login_with_shop.auth_modal.login_email_description"}),"sms"===n&&{headerTemplate:"login_with_shop.auth_modal.login_sms_title",descriptionTemplate:"login_with_shop.auth_modal.login_sms_description"}),"one_click"===n&&{headerTemplate:"login_with_shop.auth_modal.login_title",descriptionTemplate:"login_with_shop.auth_modal.login_description"}),"webauthn"===n&&{headerTemplate:"login_with_shop.auth_modal.login_webauthn_title",descriptionTemplate:"login_with_shop.auth_modal.login_webauthn_description",legalTextVariant:"generic",legalTextTemplate:"login_with_shop.auth_modal.login_webauthn_footer",headerDividerVisible:!1})}}return e}function Lr(t){switch(t){case"one_click":return $s.OneClick;case"email":return $s.EmailVerification;case"webauthn":return $s.WebAuthnVerification;default:return $s.PhoneVerification}}class Mr{constructor(e,n){this.s_ab=!1,this.s_bb=t.Default,this.s_ha="unspecified",this.s_cb=Ss.Phone,this.s_db=Ir,this.s_eb=e,({onOpen:this.s_fb,onClose:this.s_gb}=n)}setCompact(t){this.s_ab=Boolean(t)}init(){var t,e,r,a;Pe(((t="")=>`\n\n \n \n
\n \n
\n
\n \n
\n \n \n
\n
\n
\n \n
\n \n`)(this.getModalAttributes()),"shop-login-default-landing",this.s_eb),this.s_hb=this.s_eb.querySelector("shop-sheet-modal"),this.s_ib=this.s_eb.querySelector(`.${s}`),this.s_jb=this.s_eb.querySelector(`.${u}`),this.s_kb=this.s_eb.querySelector(`.${h}`),this.s_lb=this.s_eb.querySelector(`.${i}`),this.s_hb.addEventListener("modalcloserequest",(t=>{this.closeAuthorizeModal(t.detail)})),this.s_ab&&(this.s_hb.setAttribute(ms,""),this.s_lb.classList.add(o),null===(e=null===(t=this.s_ib)||void 0===t?void 0:t.parentNode)||void 0===e||e.removeChild(this.s_ib),null===(a=null===(r=this.s_jb)||void 0===r?void 0:r.parentNode)||void 0===a||a.removeChild(this.s_jb)),Rt(this.s_lb,"allow","publickey-credentials-get *")}setModalAnalyticsTraceId(t){this.s_hb.setAttribute(eo,t)}setModalPositionVariant(t){this.s_hb.setAttribute(gs,t)}showModal(){return O(this,void 0,void 0,(function*(){(yield this.s_hb.open())&&this.s_fb(),this.refreshHeaderIframeHeight()}))}openAuthorizeModal(){var t;return O(this,void 0,void 0,(function*(){this.showModal(),null===(t=this.s_Ja)||void 0===t||t.trackPageImpression({page:ye.AuthorizeModal})}))}closeAuthorizeModal(t){var e;return O(this,void 0,void 0,(function*(){if(this.s_hb){(yield this.s_hb.close())&&this.s_gb(t)}null===(e=this.s_mb)||void 0===e||e.setFocused()}))}setContinueButtonVisible(t){var e,n;if(!t)return null===(e=this.s_mb)||void 0===e||e.remove(),void(this.s_mb=void 0);this.s_mb||(this.s_mb=document.createElement("login-with-shop-button"),null===(n=this.s_mb)||void 0===n||n.addEventListener("click",(()=>{var t;null===(t=this.s_Ja)||void 0===t||t.trackLoginDefaultButtonClicked(),this.openAuthorizeModal()})),this.s_eb.appendChild(this.s_mb))}setMonorailTracker(t){var e,n;this.s_Ja=t,null===(n=(e=this.s_hb).setMonorailTracker)||void 0===n||n.call(e,t)}setAnalyticsContext(t){this.s_bb=t}setFlowVersion(t){this.s_ha=t}setAuthenticationLevel(t){this.s_cb=t}onContentLoaded(){this.s_hb.onContentLoaded()}setFlow(t){this.s_ea=t}getIframe(){return this.s_lb}setAnchorSelector(t){this.s_hb.setAttribute(go,t)}setBrand(t){t&&this.s_hb.setAttribute("modal-brand",t)}resizeIframe(t,e){this.s_lb&&(this.s_lb.style.height=`${t}px`,this.s_lb.style.width=`${Qs(e,this.s_lb)}px`)}render(){const{configurable:t,headerVisible:e,headerDividerVisible:n}=this.s_db;this.setHeaderVisible(e),this.setHeaderDividerVisible(n),t&&this.s_nb&&this.updateHeaderLogo(this.s_nb),this.renderHeaderTemplate(),this.renderHeaderDescriptionTemplate(),this.renderFooterContent(),this.refreshHeaderIframeHeight()}dispatch(e){switch(this.s_bb){case t.CheckoutExtension:case t.Default:this.s_db=this.s_cb===Ss.Phone?Nr(e,this.s_db):function(t,e){const n=Nr(t,e);switch(n.step){case $s.Start:return Object.assign(Object.assign({},n),{headerTemplate:"verified_email_auth.auth_modal.login_title",descriptionTemplate:""});case $s.SignUp:return Object.assign(Object.assign({},n),{headerTemplate:"verified_email_auth.auth_modal.signup_title",descriptionTemplate:"verified_email_auth.auth_modal.signup_description"});case $s.PhoneVerification:return Object.assign(Object.assign({},n),{headerTemplate:"login_with_shop.auth_modal.login_sms_title",descriptionTemplate:"login_with_shop.auth_modal.login_sms_description"});case $s.EmailVerification:return Object.assign(Object.assign({},n),{headerTemplate:"login_with_shop.auth_modal.login_email_title",descriptionTemplate:"login_with_shop.auth_modal.login_email_description"})}return n}(e,this.s_db);break;case t.ClassicCustomerAccounts:this.s_db="sign_up"===this.s_ha?function(t,e){const n=Nr(t,e);switch(n.step){case $s.Start:case $s.OneClick:return Object.assign(Object.assign({},n),{headerTemplate:"customer_accounts.sign_up_page.auth_modal.login_title",descriptionTemplate:"customer_accounts.sign_up_page.auth_modal.login_description"});case $s.PhoneVerification:return Object.assign(Object.assign({},n),{headerTemplate:"customer_accounts.sign_up_page.auth_modal.login_title",descriptionTemplate:"customer_accounts.sign_up_page.auth_modal.login_sms_description"});case $s.EmailVerification:return Object.assign(Object.assign({},n),{headerTemplate:"customer_accounts.sign_up_page.auth_modal.login_title",descriptionTemplate:"customer_accounts.sign_up_page.auth_modal.login_email_description"});case $s.WebAuthnVerification:return Object.assign(Object.assign({},n),{headerTemplate:"customer_accounts.sign_up_page.auth_modal.login_title",descriptionTemplate:"login_with_shop.auth_modal.login_webauthn_description"})}return n}(e,this.s_db):Nr(e,this.s_db);break;case t.CheckoutModal:this.s_db=function(t,e){const n=Nr(t,e);switch(n.step){case $s.PhoneVerification:return Object.assign(Object.assign({},n),{descriptionTemplate:"checkout_modal.auth_modal.login_sms_description"});case $s.EmailVerification:return Object.assign(Object.assign({},n),{descriptionTemplate:"checkout_modal.auth_modal.login_email_description"})}return n}(e,this.s_db);break;case t.PaymentRequest:this.s_db=function(t,e){const n=Nr(t,e);switch(n.step){case $s.PopUpOpened:case $s.OneClick:return Object.assign(Object.assign({},n),{headerTemplate:"payment_request.auth_modal.login_title",descriptionTemplate:"payment_request.auth_modal.login_description"});case $s.PhoneVerification:return Object.assign(Object.assign({},n),{headerTemplate:"payment_request.auth_modal.login_sms_title",descriptionTemplate:"payment_request.auth_modal.login_sms_description"});case $s.EmailVerification:return Object.assign(Object.assign({},n),{headerTemplate:"payment_request.auth_modal.login_email_title",descriptionTemplate:"payment_request.auth_modal.login_email_description"})}return n}(e,this.s_db);break;default:this.s_db=Ir}this.s_ab||this.render()}updateHeaderLogo(t){var e,n;if(!this.s_ob){this.s_ob=document.createElement("img");const t=null===(e=this.s_pb)||void 0===e?void 0:e.firstChild;t&&(null===(n=this.s_pb)||void 0===n||n.insertBefore(this.s_ob,t))}this.s_ob.src=t,this.s_ob.style.maxHeight="64px",this.s_ob.style.width="auto"}renderHeaderTemplate(){var t;const{configurable:e,headerTemplate:n,templateVariables:i}=this.s_db;let o="";e&&this.s_qb?o=this.s_qb.replaceAll(f,i.clientName):n&&(o=(null===(t=this.s_rb)||void 0===t?void 0:t.translate(n,i))||""),"string"==typeof o&&(this.s_sb.textContent=o)}renderHeaderDescriptionTemplate(){var t,e;const{configurable:n,descriptionTemplate:i,templateVariables:o}=this.s_db;let s="";n&&this.s_tb?s=null===(t=this.s_tb)||void 0===t?void 0:t.replaceAll(f,o.clientName):i&&(s=(null===(e=this.s_rb)||void 0===e?void 0:e.translate(i,o))||""),"string"==typeof s&&(this.s_ub.textContent=s)}renderFooterContent(){if(!this.s_rb)return;const{step:e,templateVariables:n,userNameKnown:i,sessionDetected:o}=this.s_db,{clientName:s,privacyPolicyUrl:r,termsOfServiceUrl:a}=n;let l="";switch(e){case $s.PersonalizeConsent:case $s.EmailVerification:case $s.PhoneVerification:case $s.WebAuthnVerification:case $s.OneClick:{if(e===$s.PersonalizeConsent&&!o)break;if(this.s_bb===t.PaymentRequest)break;const c=this.s_rb.translate(i?"legal.authorized_scopes.email_name":"legal.authorized_scopes.email",n);if(!r||!a){l=c;break}l=`${c} ${this.s_rb.translate("legal.client",{clientName:s,privacyPolicy:`${this.s_rb.translate("legal.privacy_policy")}`,termsOfService:`${this.s_rb.translate("legal.terms")}`})}`;break}case $s.SignUp:{const t=`${this.s_rb.translate("legal.terms_of_service")}`,e=`${this.s_rb.translate("legal.privacy_policy")}`;l=this.s_rb.translate("legal.shop",{clientName:s,termsOfService:t,privacyPolicy:e});break}}this.s_kb.innerHTML=l,this.setFooterVisible(Boolean(l))}setHeaderVisible(t){var e;if(this.s_ib.classList.toggle(d,!t),!this.s_vb){this.s_vb=this.s_eb.querySelector(`.${s}-container`);const t=null===(e=this.s_vb.contentDocument)||void 0===e?void 0:e.querySelector("body");t.innerHTML=p,this.s_pb=document.createElement("div"),this.s_pb.classList.add(r),this.s_sb=document.createElement("h2"),this.s_sb.classList.add(a),this.s_ub=document.createElement("div"),this.s_ub.classList.add(l),this.s_pb.appendChild(this.s_sb),this.s_pb.appendChild(this.s_ub),"pop_up"===this.s_ea&&(this.s_pb.style.display="flex",this.s_pb.style.flexDirection="column"),t.appendChild(this.s_pb),window.ResizeObserver?(this.s_wb=new ResizeObserver((()=>{this.refreshHeaderIframeHeight()})),this.s_wb.observe(this.s_pb)):this.refreshHeaderIframeHeight()}}refreshHeaderIframeHeight(){var t,e,n,i;const o=null===(e=null===(t=this.s_vb)||void 0===t?void 0:t.contentDocument)||void 0===e?void 0:e.querySelector("body"),s=`${null===(n=this.s_pb)||void 0===n?void 0:n.getBoundingClientRect().height}px`;null==o||o.setAttribute("height",s),null===(i=this.s_vb)||void 0===i||i.setAttribute("height",s)}setHeaderDividerVisible(t){this.s_ib.classList.toggle(c,t)}setFooterVisible(t){this.s_jb.classList.toggle(d,!t)}setCloseButtonVisible(t){this.s_hb.setCloseButtonVisibility(t)}setCustomizedModalContent({modalTitle:t,modalDescription:e,modalLogo:n}){t&&(this.s_qb=$r(t)),e&&(this.s_tb=$r(e)),n&&(this.s_nb=$r(n))}getCustomizedModalContent(){return{modalTitle:this.s_qb,modalDescription:this.s_tb,modalLogo:this.s_nb}}setTranslations(t){this.s_rb=t}isModalCustomized(){return Boolean(this.s_qb||this.s_tb||this.s_nb)}getModalAttributes(){var t,e;const n=null!==(e=null===(t=this.s_hb)||void 0===t?void 0:t.getAttributeNames())&&void 0!==e?e:[];return this.s_ab&&!n.includes(ms)?n.push(ms):!this.s_ab&&n.includes(ms)&&n.splice(n.indexOf(ms),1),n.map((t=>{var e;const n=null===(e=this.s_hb)||void 0===e?void 0:e.getAttribute(t);return n?`${t}="${n}"`:t})).join(" ")}}const Pr=[t.Default,t.CheckoutExtension,t.CheckoutModal,t.ClassicCustomerAccounts,t.PaymentRequest];var Rr,Dr,Fr,Vr,Ur,zr,Br,Wr,Hr,qr,Gr,Kr,Zr,Xr,Jr,Yr,Qr,ta,ea;const na=[js.CaptchaChallenge];class ia extends Js{constructor(){super(),Rr.add(this),Dr.set(this,Ft()),Fr.set(this,""),Vr.set(this,"2"),Ur.set(this,window.location.origin),zr.set(this,new cr({elementName:"shop-login-default",analyticsTraceId:z(this,Dr,"f")})),Br.set(this,void 0),Wr.set(this,void 0),Hr.set(this,void 0),qr.set(this,void 0),Gr.set(this,null),this.s_xb=!1,this.s_yb=!1,this.s_zb=!1,this.s_bb=t.Default,this.s_Ab=!1,this.s_Bb=!1,this.s_ea=Ts.Default,this.s_ha="unspecified",this.s_Cb=!1,this.s_Db="",this.s_Eb=!1,this.s_Fb=!1,this.s_Gb=!1,this.s_Hb="",this.s_Ib=!1,this.s_Jb=!1,this.s_Kb=!1,this.s_Lb=!0,Kr.set(this,(()=>{this.s_Mb(!0)})),Zr.set(this,(()=>{var t;this.dispatchCustomEvent("modalclosed"),null===(t=this.s_Nb)||void 0===t||t.postMessage({type:"sheetmodalclosed"}),Zn()})),Xr.set(this,(()=>{var t;this.dispatchCustomEvent("modalopened"),null===(t=this.s_Nb)||void 0===t||t.postMessage({type:"sheetmodalopened"})})),Jr.set(this,(t=>{var e,n;const i=this.s_Eb&&g(this.s_bb);var o;return this.s_Gb=!i&&(o=this.s_bb,Pr.includes(o)),!(!t&&this.s_Fb===i)&&(this.s_Fb=i,null===(e=this.s_Ob)||void 0===e||e.setCompact(this.s_Fb),null===(n=this.s_Ob)||void 0===n||n.init(),!0)})),customElements.get("shop-sheet-modal")||customElements.define("shop-sheet-modal",vs),this.s_eb=this.attachShadow({mode:"open"}),this.s_bb=this.getAttribute(to)||t.Default,this.s_Ob=new Mr(this.s_eb,{onOpen:z(this,Xr,"f"),onClose:z(this,Zr,"f")}),this.s_Eb=this.getBooleanAttribute(no),z(this,Jr,"f").call(this,!0),this.s_Pb=Bt((({email:t,firstName:e,lastName:n})=>{this.s_Qb({email:t,firstName:e,lastName:n}),Ie(t)&&z(this,zr,"f").trackEmailEnteredAction()}),200),this.s_Rb=()=>{},this.s_Sb=new Promise((t=>{this.s_Rb=t}))}static get observedAttributes(){return[go,Bi,Wi,qi,Ki,Zi,Xi,Qi,Yi,Ji,to,eo,no,io,oo,so,ro,ao,lo,co,uo,ho,po,fo,mo,bo,_o,yo,wo,xo,ko,Co,Oo,So,$o,Io,To,No,jo,Ao,Eo]}attributeChangedCallback(e,n,i){var o,s,r,a,l,c,u,h,d,p;const f=Boolean(null!==i);switch(e){case Wi:B(this,Vr,i,"f"),this.s_Mb();break;case Bi:B(this,Fr,i||"","f"),this.s_Mb();break;case oo:this.s_Tb=i||"",this.s_Mb();break;case so:this.s_Ub=i||"",this.s_Mb();break;case ro:this.s_Vb=i||"",this.s_Mb();break;case ao:this.s_Wb=i||"",this.s_Mb();break;case lo:this.s_db=i||"",this.s_Mb();break;case co:this.s_Xb=i||"",this.s_Mb();break;case qi:B(this,Ur,i||window.location.origin,"f"),ui(z(this,Ur,"f"));break;case Ki:this.s_xb=f,this.s_Mb();break;case Zi:this.s_Cb=f,null===(o=this.s_Ob)||void 0===o||o.setContinueButtonVisible(f),this.s_Mb();break;case uo:this.s_Ab=f,this.s_Mb();break;case ho:this.s_Bb=f,this.s_Mb();break;case po:this.s_ea=i||Ts.Default,null===(s=this.s_Ob)||void 0===s||s.setFlow(this.s_ea),this.s_Mb();break;case fo:this.s_ha=i||"unspecified",null===(r=this.s_Ob)||void 0===r||r.setFlowVersion(this.s_ha),this.s_Yb(),this.s_Mb();break;case Xi:this.s_yb=f,this.s_Mb();break;case Qi:this.s_zb=f;break;case Yi:B(this,Br,"pop_up"===i||"iframe"===i?i:"top_frame","f"),this.s_Mb();break;case Ji:B(this,Wr,i||void 0,"f"),this.s_Mb();break;case to:this.s_bb=i||t.Default,null===(a=this.s_Ob)||void 0===a||a.setAnalyticsContext(this.s_bb),z(this,Jr,"f").call(this),this.s_Yb(),this.s_Mb();break;case eo:B(this,Dr,i||Ft(),"f"),this.s_Yb(),this.s_Mb();break;case no:this.s_Eb=f,z(this,Jr,"f").call(this)&&this.s_Mb(!0);break;case io:null===(l=this.s_Ob)||void 0===l||l.setModalPositionVariant(i||Un.Default);break;case mo:this.s_Zb(i||"");break;case go:this.s_Db=i||"",null===(c=this.s_Ob)||void 0===c||c.setAnchorSelector(i||"");break;case bo:null===(u=this.s_Ob)||void 0===u||u.setCustomizedModalContent({modalTitle:i||void 0}),this.s_Mb();break;case _o:null===(h=this.s_Ob)||void 0===h||h.setCustomizedModalContent({modalDescription:i||void 0}),this.s_Mb();break;case yo:null===(d=this.s_Ob)||void 0===d||d.setCustomizedModalContent({modalLogo:i||void 0}),this.s_Mb();break;case wo:this.s_I=i||void 0,this.s_Mb();break;case xo:B(this,Hr,i||void 0,"f"),this.s_Mb();break;case ko:B(this,qr,i||void 0,"f"),this.s_Mb();break;case Co:null===(p=this.s_Ob)||void 0===p||p.setBrand(i||void 0);break;case Oo:this.s_ac=f,this.s_Mb();break;case So:this.s_ia=i||void 0,this.s_Mb(),this.s_Yb();break;case $o:this.s_ja=i||void 0,this.s_Mb(),this.s_Yb();break;case Io:this.s_bc=i||void 0,this.s_Mb();break;case To:this.s_ka=i||void 0,this.s_Mb(),this.s_Yb();break;case No:this.s_Z=i||void 0,this.s_Yb();break;case jo:this.s_cc=i||void 0;break;case Ao:this.s_dc=i||void 0;break;case Eo:this.s_Kb=f,this.s_Mb()}}connectedCallback(){return O(this,void 0,void 0,(function*(){this.subscribeToHub(qn.UserStatusIdentity,z(this,Kr,"f")),this.s_Jb=this.getBooleanAttribute(Gi),this.s_Cb=this.getBooleanAttribute(Zi),this.s_Ob.setContinueButtonVisible(!this.s_Cb),this.s_I=this.getAttribute(wo)||void 0;try{!function({modalTitle:t,modalDescription:e,modalLogo:n},i){if(Boolean(t||e||n)&&!i)throw new Error("An API key must be provided if the modal content is customized");if(t&&t.length>150)throw new Error(`${bo} cannot exceed 150 characters.`);if(e&&e.length>300)throw new Error(`${_o} cannot exceed 300 characters.`);if(n)try{new URL(n)}catch(t){throw new Error(`${yo} must be a valid URL`)}}(this.s_Ob.getCustomizedModalContent(),this.s_I),yield z(this,Rr,"m",Yr).call(this),yield this.s_ec(),ui(z(this,Ur,"f"))}catch(t){t instanceof Error&&(ke(`Invalid config. ${t.message}`),this.s_fc("invalid_config",js.ApiUnavailable))}}))}s_ec(){var t,e;return O(this,void 0,void 0,(function*(){if(!this.s_Ob)return;this.s_Ob.setModalAnalyticsTraceId(z(this,Dr,"f")),this.s_Ob.setMonorailTracker(z(this,zr,"f")),this.s_Ob.setAnchorSelector(this.s_Db),this.s_lb=this.s_Ob.getIframe(),this.s_Mb();const n=(null===(t=this.ownerDocument)||void 0===t?void 0:t.defaultView)||void 0;this.s_gc=new Xn(new Ce(this.s_lb),[ri,ai,z(this,Ur,"f")],z(this,Rr,"m",ea).bind(this),n),this.s_Nb=new di(this.s_lb);const{userFound:i}=yield this.s_gc.waitForMessage("loaded");this.s_Rb({userFound:i}),this.dispatchCustomEvent("iframeloaded"),z(this,zr,"f").trackShopPayModalStateChange({currentState:xe.Loaded}),z(this,Rr,"m",ta).call(this),i&&this.s_zb&&(null===(e=this.s_hc)||void 0===e||e.abort(),this.s_Ob.openAuthorizeModal())}))}s_Zb(t){this.s_Hb=t,Ie(this.s_Hb)?this.s_Pb({email:this.s_Hb,firstName:this.s_cc,lastName:this.s_dc}):this.s_Pb({email:""})}disconnectedCallback(){var t;this.unsubscribeAllFromHub(),null===(t=this.s_gc)||void 0===t||t.destroy(),this.stopListeningToInput()}setShouldListenToResizeMessage(t){this.s_Lb=t}requestShow(t){var e;return O(this,void 0,void 0,(function*(){yield this.s_Sb,this.s_Ib?ue.notify(new Error("requestShow called when the modal is not closed")):(t&&this.s_Qb({email:t,firstName:this.s_cc,lastName:this.s_dc}),yield this.s_Sb,null===(e=this.s_Ob)||void 0===e||e.openAuthorizeModal())}))}listenToInput(t){this.stopListeningToInput();const e=Bt((t=>{Ie(t)?(this.s_Qb({email:t}),z(this,zr,"f").trackEmailEnteredAction()):this.s_Qb({email:""})}),200);e(t.value),this.s_ic=new Tr(t,e)}getIframe(){var t;return null===(t=this.s_Ob)||void 0===t?void 0:t.getIframe()}ensureIframeIsLoaded(){return this.s_Sb.then((()=>{}))}stopListeningToInput(){var t;null===(t=this.s_ic)||void 0===t||t.destroy()}s_Qb({email:t,firstName:e="",lastName:n=""}){var i,o;return O(this,void 0,void 0,(function*(){if(!this.s_Ib){this.s_hc&&!(null===(i=this.s_hc)||void 0===i?void 0:i.signal.aborted)&&this.s_hc.abort(),this.s_hc=new AbortController;try{const{userFound:i}=yield this.s_Sb;if(i&&this.s_zb)return;this.s_Nb.postMessage({type:"namesubmitted",firstName:e,lastName:n}),this.s_Nb.postMessage({type:"emailsubmitted",email:t,hideChange:t.length>0});const s=this.s_gc.waitForMessage("shop_user_matched",this.s_hc.signal),r=new Promise(((t,e)=>{const n=()=>O(this,void 0,void 0,(function*(){try{const{code:e}=yield this.s_gc.waitForMessage("error",this.s_hc.signal);e===js.CaptchaChallenge?t(void 0):n()}catch(t){e(t)}}));n()}));yield Promise.race([s,r]),null===(o=this.s_Ob)||void 0===o||o.openAuthorizeModal(),this.s_hc.abort()}catch(t){}}}))}s_Mb(t){var e,n;const i=null===(e=this.s_Ob)||void 0===e?void 0:e.getIframe();if(i){const e={clientId:z(this,Fr,"f"),responseType:this.s_Tb,responseMode:this.s_Ub,redirectType:z(this,Br,"f"),redirectUri:z(this,Wr,"f"),codeChallenge:this.s_Vb,codeChallengeMethod:this.s_Wb,state:this.s_db,scope:this.s_Xb},o=null===(n=this.s_Ob)||void 0===n?void 0:n.isModalCustomized(),s=pr(Object.assign(Object.assign({version:z(this,Vr,"f"),analyticsTraceId:z(this,Dr,"f"),analyticsContext:this.s_bb,isCompactLayout:this.s_Fb,flow:this.s_ea,flowVersion:this.s_ha,emailVerificationRequired:this.s_xb,signUpEnabled:!this.s_yb,oauthParams:e,avoidPayAltDomain:this.s_Ab,avoidSdkSession:this.s_Bb,hideCopy:this.s_Gb},o&&{modalCustomized:o}),{apiKey:this.s_I,popupWindowParams:{popUpName:z(this,Hr,"f"),popUpFeatures:z(this,qr,"f")},consentChallenge:this.s_ac,checkoutVersion:this.s_ia,checkoutToken:this.s_ja,transactionParams:this.s_bc,shopId:this.s_ka,requireVerification:this.s_Kb}));if(!s)return;this.s_jc&&clearTimeout(this.s_jc),this.s_jc=setTimeout((()=>{z(this,Rr,"m",Qr).call(this),Dt(i,s,t),ue.leaveBreadcrumb("Iframe url updated",{authorizeUrl:s},"state")}),0)}}s_Yb(){var t;B(this,zr,new cr({elementName:"shop-login-default",analyticsTraceId:z(this,Dr,"f"),analyticsContext:this.s_bb,flowVersion:this.s_ha,shopId:Er(this.s_ka),shopPermanentDomain:this.s_Z,checkoutVersion:this.s_ia,checkoutToken:this.s_ja}),"f"),null===(t=this.s_Ob)||void 0===t||t.setMonorailTracker(z(this,zr,"f"))}s_kc(t,e,n,i,o,s,r,a){var l,c;return O(this,void 0,void 0,(function*(){t&&o&&(yield Se(z(this,Ur,"f"),ue.notify),this.publishToHub(qn.UserSessionCreate,{email:r||e,initial:r||(null==e?void 0:e[0])||"",avatar:a})),this.s_Jb||null===(l=this.s_Ob)||void 0===l||l.closeAuthorizeModal(),null===(c=this.s_gc)||void 0===c||c.destroy(),this.stopListeningToInput(),this.dispatchCustomEvent("completed",{loggedIn:t,email:e,customerAccessToken:n,customerAccessTokenExpiresAt:i,shopPayInstallmentsOnboarded:s}),this.s_lc()}))}s_mc(t){return O(this,void 0,void 0,(function*(){if(t.flow===Ts.Prequal)this.dispatchCustomEvent("prequal_flow_side_effect",{shopPayInstallmentsOnboarded:t.shopPayInstallmentsOnboarded})}))}s_lc(){if("pop_up"!==z(this,Br,"f")&&z(this,Wr,"f"))try{let t=z(this,Wr,"f");if(z(this,Dr,"f")){const e={analytics_trace_id:z(this,Dr,"f")},n=new URLSearchParams(e);t=t.concat(`?${n.toString()}`)}else ue.notify(new Error("Missing analytics trace ID when redirecting to account page"));window.location.assign(t)}catch(t){t instanceof Error&&ue.notify(t)}}s_fc(t,e){this.dispatchCustomEvent("error",{message:t,code:e}),na.includes(e)?si(Qn.HandleSilentError,1,{component:"shop-login-default",errorCode:e}):ue.notify(new Error(`Authorize Error: ${t} (${e}).`)),z(this,Rr,"m",ta).call(this)}s_nc(t){var e;t.didOpen&&(null===(e=this.s_Ob)||void 0===e||e.dispatch({type:As.PopUpOpened,payload:t})),this.dispatchCustomEvent("popuploading",t)}s_oc(t){var e,n,i;null===(e=this.s_Ob)||void 0===e||e.setAuthenticationLevel((null==t?void 0:t.authenticationLevelRequired)||Ss.Phone),null===(n=this.s_Ob)||void 0===n||n.dispatch({type:As.Init,payload:t}),null===(i=this.s_Ob)||void 0===i||i.onContentLoaded()}s_pc({hasName:t=!1,userCookieExists:e=!1,personalizeConsentChallenge:n=!1}){var i;null===(i=this.s_Ob)||void 0===i||i.dispatch({type:As.UserMatched,payload:{hasName:t,userCookieExists:e,personalizeConsentChallenge:n}}),this.dispatchCustomEvent("shopusermatched")}s_qc(){var t;null===(t=this.s_Ob)||void 0===t||t.dispatch({type:As.UserNotMatched}),this.dispatchCustomEvent("shopusernotmatched")}s_rc(){var t;null===(t=this.s_Ob)||void 0===t||t.dispatch({type:As.Restart}),this.dispatchCustomEvent("restarted")}s_sc(t){var e;null===(e=this.s_Ob)||void 0===e||e.dispatch({type:As.VerificationStepChanged,payload:t})}}function oa(){de("shop-login-default",ia)}Dr=new WeakMap,Fr=new WeakMap,Vr=new WeakMap,Ur=new WeakMap,zr=new WeakMap,Br=new WeakMap,Wr=new WeakMap,Hr=new WeakMap,qr=new WeakMap,Gr=new WeakMap,Kr=new WeakMap,Zr=new WeakMap,Xr=new WeakMap,Jr=new WeakMap,Rr=new WeakSet,Yr=function(){var t;return O(this,void 0,void 0,(function*(){try{B(this,Gr,new Is({["en"]:{follow_on_shop:{follow:"Follow on {shop}",following:"Following on {shop}",auth_modal:{title:"Follow on Shop",description:"Stay in the know—never miss a sale, restock, or order update."},following_modal:{title:"Visit {store} on Shop",subtitle:"Everything you need to shop, track, and pay—all in one place.",qr_header:"Scan to visit {store} on the Shop app",qr_alt_text:"Shop app QR code",continue:"Continue"},completed:{title:"You're following {store}",subtitle:"We've sent you an email with a link to download the Shop app."},personalization_consent:{title:"To follow on Shop, sync your shopping activity"}},login_with_shop:{login:"Sign in with {shop}",auth_modal:{login_title:"Sign in with Shop",login_title_with_store:"Sign in to {store} with Shop",login_description:"The easiest and most secure way to sign in to {store}—no password needed.",signup_title:"Create an account",signup_description:"Enter your phone number to create a Shop account.",login_sms_title:"Confirm it's you",login_sms_description:"Enter the code sent to {phoneNumber}",login_email_title:"Confirm it’s you",login_email_description:"Enter the code sent to your email, {email}",login_email_footer:"By continuing, your email address will be shared with {store}.",login_webauthn_title:"Confirm it’s you",login_webauthn_description:"Sign in with a passkey to securely use your saved information.",login_webauthn_footer:"By continuing, your email address will be shared with {store}."}},verified_email_auth:{auth_modal:{login_title:"Log in or sign up",signup_title:"Continue with Shop",signup_description:"Create a Shop account to sign in to {clientName}–no passwords needed"}},legal:{terms_of_service:"terms of service",privacy_policy:"privacy policy",terms:"terms",client:"See {clientName}’s {termsOfService} and {privacyPolicy}.",shop:"By continuing, you agree to Shop’s {termsOfService} and acknowledge the {privacyPolicy}.",authorized_scopes:{email:"By continuing, your email address will be shared with {store}.",email_name:"By continuing, your name and email address will be shared with {store}."}},checkout_modal:{auth_modal:{login_sms_description:"Enter the code sent to {phoneNumber} to securely use your saved information.",login_email_description:"Enter the code sent to your email, {email} to securely use your saved information."}},customer_accounts:{remember_me:"Save my info securely with Shop to sign in faster everywhere",sign_up_page:{auth_modal:{login_title:"Continue with Shop",login_description:"Use your Shop account to sign in everywhere—no password needed.",login_sms_description:"Use your Shop account to sign in everywhere—no password needed.\r\n\r\nConfirm it's you, enter the code sent to {phoneNumber}",login_email_description:"Use your Shop account to sign in everywhere—no password needed.\r\n\r\nConfirm it's you, enter the code sent to your email, {email}",login_webauthn_title:"Continue with Shop",login_webauthn_description:"Sign in with a passkey to securely use your saved information."}}},payment_request:{auth_modal:{login_title:"Check out with Shop Pay",login_description:"Use your saved information to check out securely at {store}.",login_sms_title:"Confirm it's you",login_sms_description:"Enter the code sent to {phoneNumber} to securely use your saved information.",login_email_title:"Confirm it’s you",login_email_description:"Enter the code sent to your email, {email} to securely use your saved information."}}}}),"f"),null===(t=this.s_Ob)||void 0===t||t.setTranslations(z(this,Gr,"f"))}catch(t){t instanceof Error&&ue.notify(t)}return null}))},Qr=function(){z(this,Rr,"m",ta).call(this),this.s_tc=setTimeout((()=>{const t=zi.temporarilyUnavailable;this.dispatchCustomEvent("error",{message:t.message,code:t.code}),z(this,Rr,"m",ta).call(this)}),1e4)},ta=function(){this.s_tc&&(clearTimeout(this.s_tc),this.s_tc=void 0)},ea=function(t){var e,n;switch(t.type){case"loaded":this.s_oc(t);break;case"resize_iframe":if(!this.s_Lb)return;null===(e=this.s_Ob)||void 0===e||e.resizeIframe(t.height,Qs(t.width,this.s_Ob.getIframe()));break;case"completed":this.s_kc(t.loggedIn,t.email,t.customerAccessToken,t.customerAccessTokenExpiresAt,t.shouldFinalizeLogin,t.shopPayInstallmentsOnboarded,t.givenNameFirstInitial,t.avatar);break;case"error":this.s_fc(t.message,t.code);break;case"close_requested":null===(n=this.s_Ob)||void 0===n||n.closeAuthorizeModal();break;case"shop_user_matched":this.s_pc(t);break;case"pop_up_opened":this.s_nc(t);break;case"shop_user_not_matched":this.s_qc();break;case"email_change_requested":this.s_rc();break;case"verification_step_changed":this.s_sc(t);break;case"custom_flow_side_effect":this.s_mc(t)}};class sa extends HTMLElement{static get observedAttributes(){return["disabled","hide-logo","href"]}constructor(){super(),customElements.get("shop-pay-logo")||customElements.define("shop-pay-logo",Vi),this.attachShadow({mode:"open"})}connectedCallback(){this.s_uc()}attributeChangedCallback(){this.s_uc()}s_uc(){const t=this.shadowRoot;if(!t)return;const e=!this.hasAttribute("hide-logo");t.innerHTML=(t=>`\n\n\n\n Buy with Shop Pay\n \n \n ${t?'\n \n':""}\n\n`)(e);const n=t.querySelector("#shop-pay-button-link"),i=this.hasAttribute("disabled"),o=this.getAttribute("href");return n?i?(n.classList.toggle("disabled",!0),void n.setAttribute("href","#")):void n.setAttribute("href",o||"#"):void 0}}var ra;function aa(t){return O(this,void 0,void 0,(function*(){try{const e=yield fetch(`https://${t}/cart.js`);return yield e.json()}catch(e){return ke(`Failed to fetch cart token for ${t} due to error: ${e}`),{token:"",currency:"",items:[]}}}))}function la({storeUrl:t,variants:e,paymentOption:n,source:i,sourceToken:o,redirectSource:s,channel:r}){const a=Ut(t);if(!a||!e.length)return"#";const l=e.map((t=>`${t.id}:${t.quantity}`)).join(","),c=new URL(`https://${a}/cart/${l}`),u=new URLSearchParams(c.search);return u.append("payment",n||ra.ShopPay),i&&u.append("source",i),o&&u.append("source_token",o),s&&u.append("redirect_source",s),r&&u.append("channel",r),`${c.href}?${u}`}function ca(t){return t.split(",").map((t=>{const[e,n]=t.split(":"),i=Number(null!=n?n:1),o=isNaN(i)?1:i;return{id:Number(e),quantity:o}}))}function ua(t){const e=document.cookie.split("; ");for(const n of e){const[e,i]=n.split("=");if(e===t)return i}}!function(t){t.ShopPay="shop_pay",t.ShopPayInstallments="shop_pay_installments"}(ra||(ra={}));class ha extends HTMLElement{constructor(){super(),this.s_vc=()=>O(this,void 0,void 0,(function*(){const t=this.getAttribute("store-url");if(!t)return;const e=this.getAttribute("payment-option"),n=this.getAttribute("source"),i=this.getAttribute("source-token"),o=this.getAttribute("cart"),s=this.getAttribute("channel"),r=Ut(t),a=yield function(t,e){return O(this,void 0,void 0,(function*(){if(!t)return null;let n,i;e?(n=JSON.parse(decodeURIComponent(e)),i=yield da(t)):[n,i]=yield Promise.all([aa(t),da(t)]);const o=n.items.some((t=>void 0!==t.selling_plan_allocation&&void 0!==t.selling_plan_allocation.selling_plan&&!t.selling_plan_allocation.selling_plan.fixed_selling_plan));try{const e=yield fetch(`https://${t}/wallets/checkouts.json`,{method:"POST",headers:{"Content-Type":"application/json",authorization:`Basic ${i}`},body:JSON.stringify({checkout:{cart_token:n.token,presentment_currency:n.currency,has_selling_plans:o,secret:!0,wallet_name:"ShopifyPay",page_type:"cart_page"}})});return(yield e.json()).checkout.shop_pay_configuration.transaction_url}catch(e){return ke(`Failed to fetch transaction url for ${t} due to error: ${e}`),null}}))}(r,o);if(a){const t=function(t,e,n,i,o){const s=new URLSearchParams;s.append("redirect_source","direct_checkout_cart"),s.append("pre_select_installments",String(e===ra.ShopPayInstallments));const r=ua("_checkout_queue_token"),a=ua("_shopify_sa_p");return void 0!==r&&s.append("checkout_queue_token",r),void 0!==a&&"utm_source=shop_app"===decodeURIComponent(a)&&s.append("referrer","shop_app"),null!==n&&s.append("source",n),null!==i&&s.append("source_token",i),null!==o&&s.append("channel",o),`${t.href}&${s}`}(new URL(a),e,n,i,s);window.location.assign(t)}})),this.s_Ja=new Ai({elementName:"shop-pay-button"}),customElements.get("shop-pay-button-base")||customElements.define("shop-pay-button-base",sa),this.attachShadow({mode:"open"})}static get observedAttributes(){return["button-text","cart","channel","disabled","payment-option","source","source-token","store-url","variants"]}connectedCallback(){this.s_Ja.trackElementImpression();const t=this.shadowRoot;t&&(t.innerHTML="",this.s_uc())}attributeChangedCallback(){this.s_uc()}s_wc(t=null){var e;const n=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector("shop-pay-button-base");n&&(n.onclick=t)}s_xc(t){var e;const n=this.getAttribute("store-url");if(!n)return;const i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector("shop-pay-button-base");if(!i)return;const o=this.getAttribute("payment-option"),s=this.getAttribute("source"),r=this.getAttribute("source-token"),a=this.getAttribute("redirect-source"),l=this.getAttribute("channel"),c=la({storeUrl:n,variants:ca(t),paymentOption:o,source:s,sourceToken:r,redirectSource:a,channel:l});this.s_wc(),Rt(i,"href",c)}s_uc(){var t;const e=this.shadowRoot,n=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector("shop-pay-button-base");if(!n||!e)return;const i=this.getAttribute("button-text");i?(n.innerHTML=i||"",Rt(n,"hide-logo","")):n.removeAttribute("hide-logo");if(this.hasAttribute("disabled"))return void Rt(n,"disabled","true");const o=this.getAttribute("variants");o?this.s_xc(o):this.s_wc(this.s_vc)}}function da(t){return O(this,void 0,void 0,(function*(){try{const e=yield fetch(`https://${t}/payments/config.json`),n=yield e.json();return window.btoa(encodeURIComponent(n.paymentInstruments.accessToken))}catch(e){return ke(`Failed to fetch authorization token for ${t} due to error: ${e}`),""}}))}function pa(){de("shop-pay-button",ha)}export{eo as $,Wi as A,ue as B,Js as C,cr as D,Ee as E,Qs as F,zi as G,he as H,Ce as I,ve as J,se as K,Mr as L,_e as M,sa as N,Ai as O,ri as P,Is as Q,Fi as R,js as S,Qn as T,Pi as U,Rt as V,Lo as W,_r as X,xo as Y,ko as Z,O as _,hi as a,re as a$,So as a0,to as a1,Si as a2,Kn as a3,yr as a4,oa as a5,Ys as a6,Zo as a7,Ho as a8,Ii as a9,pa as aA,Ms as aB,Us as aC,Ls as aD,Vs as aE,Fs as aF,Ns as aG,Ti as aH,Ot as aI,Vi as aJ,_t as aK,Rs as aL,Ds as aM,la as aN,ca as aO,ra as aP,dr as aQ,Ps as aR,Ut as aS,aa as aT,Pt as aU,Oe as aV,Wt as aW,ur as aX,zs as aY,zt as aZ,Ie as a_,Pe as aa,we as ab,ye as ac,er as ad,ir as ae,or as af,Vt as ag,di as ah,qt as ai,Se as aj,w as ak,Zn as al,Mi as am,bs as an,Es as ao,ts as ap,Qo as aq,lr as ar,Bi as as,qi as at,vo as au,sr as av,Ht as aw,li as ax,rr as ay,ar as az,ai as b,Le as b0,Ne as b1,St as b2,Nt as b3,oe as b4,Tr as b5,Kt as b6,Tt as b7,be as b8,Lt as b9,$t as ba,It as bb,Bt as bc,Gt as bd,Me as be,go as bf,t as c,de as d,z as e,Ts as f,Ft as g,vs as h,fo as i,To as j,B as k,qn as l,ke as m,Un as n,Xn as o,$i as p,pr as q,Er as r,Ui as s,si as t,Dt as u,ui as v,Ss as w,As as x,je as y,Ae as z};
//# sourceMappingURL=chunk.common_a0168284.esm.js.map