document.widgetServerBaseUrl = "https://widget.sezzle.com";
document.SezzleDynamicModalURL =  "https://dynamic-modal.sezzle.com";
document.sezzleButtonVersion = "sezzle-widget.js";
document.sezzleCssVersionOverride = "sezzle-styles-global.css";
document.sezzleDefaultModalVersion = "sezzle-modal.html";
document.sezzleModalAvailableLanguages = "en,fr,es";

document.isSezzlePayIn5 = true;

// Sezzle's merchant widget config override
document.sezzleConfig = {
"configGroups": [{
"targetXPath": ".product__info-container/.price--on-sale/.price__sale/.price-item--sale",
"renderToPath": "../../../..",
"urlMatch": "product",
"relatedElementActions": [{
"relatedPath": "../..",
"initialAction": function(r,w){
if(getComputedStyle(r).display === "none"){
w.style.display = "none"
}
if(w.nextElementSibling && w.nextElementSibling.className.indexOf("sezzle-shopify-info-button") > -1){
w.nextElementSibling.style.display = "none"
}
}
}]
},{
"targetXPath": ".product__info-container/.price__regular/.price-item--regular",
"renderToPath": "../../../..",
"urlMatch": "product",
"relatedElementActions": [{
"relatedPath": "../../../../..",
"initialAction": function(r,w){
if(r.querySelector(".price--on-sale")){
w.style.display = "none"
}
var allwidgets = document.getElementsByClassName("sezzle-shopify-info-button");
for (let i = 0; i < allwidgets.length; i++){
let widgetIndex = allwidgets[i].className.split("sezzlewidgetindex-")[1].split(" ")[0];
if(!document.querySelector('[data-sezzleindex="'+widgetIndex+'"]')) {
allwidgets[i].style.display = "none"
}
}
}
}]
},{
"targetXPath": ".totals__subtotal-value",
"urlMatch": "cart",
"alignment": "right",
"alignmentSwitchMinWidth": 768,
"alignmentSwitchType": "center"
},{
"targetXPath": ".totals__total-value",
"urlMatch": "cart",
"alignment": "right",
"alignmentSwitchMinWidth": 768,
"alignmentSwitchType": "center"
}]
}

if (document.sezzleConfig){
   document.sezzleConfig.merchantID = 'c4978686-3199-4929-96b2-c8a62ed28b3f';

   // Sezzle's merchant payment settings override

   // Sezzle's merchant local config override
   try {document.sezzleConfig = Object.assign(document.localSezzleConfig, document.sezzleConfig); } catch(e) {}
 }
(function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(`.sezzle-shopify-info-button{background:0 0;border:none;margin:0;padding:0;display:block;overflow:hidden}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper{box-sizing:border-box;width:100%;color:inherit;background:0 0;border:none;padding:0;display:block}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper:focus{outline:5px auto}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper.sezzle-left{text-align:left;float:left}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper.sezzle-center{text-align:center;float:none}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper.sezzle-right{text-align:right;float:right}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text{width:unset;vertical-align:baseline;word-wrap:normal;color:inherit;background:0 0;border:0;margin:auto;padding:0;font-family:inherit;font-size:14px;font-weight:500;line-height:18px}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text.sezzle-left{text-align:left;margin:0}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text.sezzle-center{text-align:center}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text.sezzle-right{float:right;text-align:right}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text sup{vertical-align:super;font-size:.5em}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text .sezzle-payment-amount{zoom:1;float:none;vertical-align:baseline;background:0 0;border:0;margin:0;padding:0;font-size:1.2em;font-weight:900}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text .sezzle-logo{box-sizing:border-box;opacity:1;float:none;vertical-align:baseline;background:0 0;border:0;width:auto;height:18px;margin:0 0 -5px;padding:0;display:inline-block}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text .sezzle-info-icon{width:auto;box-shadow:none;vertical-align:baseline;line-height:initial;font-size:inherit;color:inherit;cursor:pointer;background:0 0;border:none;margin:0;padding:0 0 0 3px;display:contents;position:absolute}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text .sezzle-info-link{cursor:pointer;background:0 0;border:none;padding:0;text-decoration:underline;display:inline}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text .sezzle-giveaway-timer,.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text .sezzle-giveaway-award{font-weight:700}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text .sezzle-ap-logo{vertical-align:middle;border:0;height:45px;margin:-5px;padding:0;display:inline}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text button.ap-modal-info-link{width:auto;box-shadow:none;vertical-align:middle;line-height:inherit;font-size:inherit;color:inherit;cursor:pointer;background:0 0;border:none;margin:0;padding:0;display:inline}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text .sezzle-klarna-logo{vertical-align:middle;border:0;height:25px;margin:0;padding:0;display:inline}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text button.klarna-modal-info-link{width:auto;box-shadow:none;vertical-align:middle;line-height:inherit;font-size:inherit;color:inherit;cursor:pointer;background:0 0;border:none;margin:0;padding:0;display:inline}.sezzle-hidden{visibility:hidden;display:none}.sezzle-checkout-modal-lightbox{z-index:99999998;width:100vw;height:100vh;color:unset;background-color:#051f3491;display:none;position:fixed;top:0;left:0;overflow:hidden auto}/*$vite$:1*/`)),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
(function(){var Bt=Object.create,nt=Object.defineProperty,Ht=Object.getOwnPropertyDescriptor,jt=Object.getOwnPropertyNames,Rt=Object.getPrototypeOf,Yt=Object.prototype.hasOwnProperty,Le=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),Xt=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(var a=jt(t),l=0,o=a.length,u;l<o;l++)u=a[l],!Yt.call(e,u)&&u!==n&&nt(e,u,{get:(p=>t[p]).bind(null,u),enumerable:!(i=Ht(t,u))||i.enumerable});return e},qe=(e,t,n)=>(n=e!=null?Bt(Rt(e)):{},Xt(t||!e||!e.__esModule?nt(n,"default",{value:e,enumerable:!0}):n,e)),Kt=document.widgetServerBaseUrl?`${document.widgetServerBaseUrl}/v1/event/log`:"http://widget.sezzle.com/v1/event/log",Vt="sezzle-shopify-info-button",B=class{static httpRequestWrapper(e,t,n=null){return new Promise((i,a)=>{const l=new XMLHttpRequest;l.open(e,t,!0),n!==null&&l.setRequestHeader("Content-Type","application/json"),l.onload=function(){this.status>=200&&this.status<300?i(l.response):a(new Error(`An error occurred when calling ${t}. Status code: ${this.status} Response text: ${l.responseText}`))},l.onerror=function(o){let u="";o instanceof ErrorEvent?u=`An error occurred when calling ${t}. Error message: ${o.message} Filename: ${o.filename} Line#: ${o.lineno}`:u=`An error occurred when calling ${t}. Error type: ${o.type}`,a(new Error(u))},n===null?l.send():l.send(JSON.stringify(n))})}static getCookie(e){let t;try{t=`${document.cookie}`}catch{return}if(!t)return;const n=t.split(`${e}=`);if(n.length===2)return n.pop().split(";").shift()}static isWidgetDuplicateFound(){return document.querySelectorAll(`.${Vt}:not([style*='display: none'])`).length>1}static sendEvents(e){this.httpRequestWrapper("post",Kt,e)}static breakXPath(e){return e.split("/").filter(t=>t!=="")}static getWidgetBaseUrl(){return document.widgetServerBaseUrl||"https://widget.sezzle.com"}static getDynamicModalURL(){return document.SezzleDynamicModalURL||"https://dynamic-modal.sezzle.com"}static predictBackgroundTheme(){let e=window.getComputedStyle(document.body).getPropertyValue("background-color");if(e==="transparent"||e==="rgba(0, 0, 0, 0)")return"light";let t,n,i;e.match(/^rgb/)?(e=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/),t=e[1],n=e[2],i=e[3]):(e=+`0x${e.slice(1).replace(e.length<5&&/./g,"$&$&")}`,t=e>>16,n=e>>8&255,i=e&255);const a=t*.2126+n*.7152+i*.0722,l=(Math.max(t,n,i)+Math.min(t,n,i))/2;return Math.sqrt(.299*(t*t)+.587*(n*n)+.114*(i*i))<=180&&a<=180&&l<=180?"dark":"light"}static matchAll(e,t){let n;const i=[];for(;n=e.exec(t);)i.push(n[0]);return i}static waitForBodyToBeReady(){return new Promise(e=>{document.body&&e();const t=new MutationObserver(()=>{document.body&&(t.disconnect(),e())});t.observe(document.documentElement,{childList:!0})})}};function Jt(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ee(e,t){Jt(e,t),t.add(e)}function d(e,t,n){if(typeof e=="function"?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var te=new WeakSet,Zt=class{constructor(e,t,n){ee(this,te),this.basicWidgetConfig=e,this.propsNotInConfigGroup=["merchantID","minPrice","maxPrice","apModalHTML","klarnaModalHTML","language","apDualInstall","klarnaDualInstall","isLongTermOnly"],this.widgetConfig={config:null,configGroups:null,merchantID:null,minPrice:null,maxPrice:null,apModalHTML:null,klarnaModalHTML:null,fingerprint:null,apDualInstall:null,klarnaDualInstall:null,isLongTermOnly:null,mutationObserverConfig:{attributes:!0,childList:!0,characterData:!0},apiEndpoints:{dynamicModalURL:B.getDynamicModalURL(),sezzleAssetsCDN:"https://media.sezzle.com/shopify-app/assets/",cssForMerchantURL:`${B.getWidgetBaseUrl()}/v1/css/price-widget?uuid=${e.merchantID}`},observeElements:null},this.widgetEventLogger=n,d(te,this,Gt).call(this),this.language=t,this.language.setLanguage(this.widgetConfig.config.language)}get getSezzleConfig(){return this.widgetConfig}async setAPModalHTML(){if(!this.widgetConfig.apDualInstall)return;const e=`https://media.sezzle.com/afterpay/modal/${this.language.getLanguage()}.html`;await B.httpRequestWrapper("GET",e).then(t=>{this.widgetConfig.apModalHTML=t}).catch(t=>{this.widgetEventLogger.logEvent("error",t.message)})}async setKlarnaModalHTML(){if(!this.widgetConfig.klarnaDualInstall)return;const e=`https://media.sezzle.com/klarna/modal/${this.language.getLanguage()}.html`;await B.httpRequestWrapper("GET",e).then(t=>{this.widgetConfig.klarnaModalHTML=t}).catch(t=>{this.widgetEventLogger.logEvent("error",t.message)})}};function Gt(){d(te,this,Qt).call(this),d(te,this,nn).call(this),d(te,this,rn).call(this),d(te,this,an).call(this)}function Qt(){if(Array.isArray(this.basicWidgetConfig.configGroups)){if(!this.basicWidgetConfig.configGroups.length)throw new Error("options.configGroups must have at least one config object")}else throw new Error("options.configGroups is not an array");const e=["targetXPath"];this.basicWidgetConfig.configGroups.forEach(t=>{e.forEach(n=>{if(!t.hasOwnProperty(n))throw new Error(`${n} must be specified in all configs in options.configGroups`)})}),d(te,this,en).call(this),d(te,this,tn).call(this)}function en(){const e={targetXPath:"string",renderToPath:"string",urlMatch:"string"};this.basicWidgetConfig.configGroups.forEach(t=>{Object.keys(e).forEach(n=>{if(t.hasOwnProperty(n)&&typeof t[n]!=typeof e[n])throw new Error(`${n} must be of type ${e[n]}`)})})}function tn(){this.basicWidgetConfig.configGroups.forEach(e=>{Object.keys(e).forEach(t=>{if(this.propsNotInConfigGroup.indexOf(t)>=0)throw new Error(`${t} is not a property of a configGroup. Specify this key at the outermost layer`)})})}function nn(){this.basicWidgetConfig.configGroups=this.basicWidgetConfig.configGroups.filter(e=>!e.urlMatch||RegExp(e.urlMatch,"i").test(window.location.href))}function rn(){const e={config:this.basicWidgetConfig,merchantID:this.basicWidgetConfig.merchantID||"",minPrice:this.basicWidgetConfig.minPrice||0,maxPrice:this.basicWidgetConfig.maxPrice||25e4,observeElements:this.basicWidgetConfig.observeElements||[],apDualInstall:this.basicWidgetConfig.apDualInstall||!1,klarnaDualInstall:this.basicWidgetConfig.klarnaDualInstall||!1,isLongTermOnly:this.basicWidgetConfig.isLongTermOnly||!1};this.widgetConfig={...this.widgetConfig,...e}}function on(e){const t={};switch(t.xpath=B.breakXPath(e.targetXPath),t.rendertopath=e.renderToPath||this.basicWidgetConfig.defaultConfig&&this.basicWidgetConfig.defaultConfig.renderToPath||"..",t.relatedElementActions=e.relatedElementActions||this.basicWidgetConfig.defaultConfig&&this.basicWidgetConfig.defaultConfig.relatedElementActions||[],t.ignoredPriceElements=e.ignoredPriceElements||this.basicWidgetConfig.defaultConfig&&this.basicWidgetConfig.defaultConfig.ignoredPriceElements||[],typeof t.ignoredPriceElements=="string"?t.ignoredPriceElements=[B.breakXPath(t.ignoredPriceElements.trim())]:t.ignoredPriceElements=t.ignoredPriceElements.map(n=>B.breakXPath(n.trim())),t.alignment=e.alignment||this.basicWidgetConfig.defaultConfig&&this.basicWidgetConfig.defaultConfig.alignment||"auto",t.alignmentSwitchMinWidth=e.alignmentSwitchMinWidth||this.basicWidgetConfig.defaultConfig&&this.basicWidgetConfig.defaultConfig.alignmentSwitchMinWidth,t.alignmentSwitchType=e.alignmentSwitchType||this.basicWidgetConfig.defaultConfig&&this.basicWidgetConfig.defaultConfig.alignmentSwitchType,t.containerStyle=e.containerStyle||this.basicWidgetConfig.defaultConfig&&this.basicWidgetConfig.defaultConfig.containerStyle||{},t.textStyle=e.textStyle||this.basicWidgetConfig.defaultConfig&&this.basicWidgetConfig.defaultConfig.textStyle||{},t.logoStyle=e.logoStyle||this.basicWidgetConfig.defaultConfig&&this.basicWidgetConfig.defaultConfig.logoStyle||{},t.theme=e.theme||this.basicWidgetConfig.defaultConfig&&this.basicWidgetConfig.defaultConfig.theme||"",t.theme){case"dark":t.imageURL="https://media.sezzle.com/branding/2.0/Sezzle_Logo_FullColor_WhiteWM.svg",t.imageClassName="szl-dark-image";break;case"light":t.imageURL="https://media.sezzle.com/branding/2.0/Sezzle_Logo_FullColor.svg",t.imageClassName="szl-light-image";break;case"white-flat":t.imageURL="https://media.sezzle.com/branding/2.0/Sezzle_Logo_WhiteAlt.svg",t.imageClassName="szl-dark-image";break;case"black-flat":t.imageURL="https://media.sezzle.com/branding/2.0/Sezzle_Logo_BlackAlt.svg",t.imageClassName="szl-light-image";break;default:B.predictBackgroundTheme()==="dark"?(t.imageURL="https://media.sezzle.com/branding/2.0/Sezzle_Logo_FullColor_WhiteWM.svg",t.imageClassName="szl-dark-image"):(t.imageURL="https://media.sezzle.com/branding/2.0/Sezzle_Logo_FullColor.svg",t.imageClassName="szl-light-image");break}return t.hideClasses=e.hideClasses||this.basicWidgetConfig.defaultConfig&&this.basicWidgetConfig.defaultConfig.hideClasses||[],typeof t.hideClasses=="string"?t.hideClasses=[B.breakXPath(t.hideClasses.trim())]:t.hideClasses=t.hideClasses.map(n=>B.breakXPath(n.trim())),t.ignoredFormattedPriceText=e.ignoredFormattedPriceText||this.basicWidgetConfig.defaultConfig&&this.basicWidgetConfig.defaultConfig.ignoredFormattedPriceText||["Subtotal","Total:","Sold Out"],Array.isArray(t.ignoredFormattedPriceText)||(t.ignoredFormattedPriceText=[t.ignoredFormattedPriceText]),t.widgetIsFirstChild=!1,t}function an(){this.widgetConfig.configGroups=[],this.basicWidgetConfig.configGroups.forEach(e=>{this.widgetConfig.configGroups.push(d(te,this,on).call(this,e))})}var sn=class{constructor(e){this.config=e}getElementsByXPath(e,t=0,n=null){if(!e.length)return[];if(t===e.length)return n||[];n===null&&(n=[document]);let i=[];const a=Array.prototype.slice.call(n);for(let l=0;l<a.length;l++){const o=a[l];if(e[t]==="..")i.push(o.parentElement);else if(e[t][0]==="#")i.push(o.getElementById(e[t].substr(1)));else if(e[t][0]===".")e[t].trim().length===1&&i.push(o),Array.prototype.forEach.call(o.getElementsByClassName(e[t].substr(1)),u=>{i.push(u)});else if(e[t].indexOf("child")===0){const u=e[t].split("-")[1],p=o.childNodes[u];if(typeof p<"u")if(p.nodeName==="#text"){const C=document.createElement("span");C.appendChild(document.createTextNode(p.nodeValue)),o.replaceChild(C,p),i.push(C)}else i.push(p);else i.push(o)}else{const u=e[t].split("-");let p=0;u.length>1&&u[u.length-1]>=0&&(p=parseInt(u[u.length-1],10));const C=e[t].replace(`-${p}`,"");Array.prototype.forEach.call(o.getElementsByTagName(C),(x,L)=>{L===p&&i.push(x)})}}return i=i.filter(l=>l!==null),this.getElementsByXPath(e,t+1,i)}getElementToRender(e,t=0){const n=document.querySelector("#sezzle-widget-v2-render-reference");if(n)return n;let i=null;if(this.config.configGroups[t].rendertopath!==null){const a=B.breakXPath(this.config.configGroups[t].rendertopath);i=e;for(let l=0;l<a.length;l++){const o=a[l];if(i===null)break;if(o===".")continue;if(o==="..")i=i.parentElement;else if(o[0]===".")i=i.getElementsByClassName(o.substr(1)).length?i.getElementsByClassName(o.substr(1))[0]:null;else if(o[0]==="#")i=document.getElementById(o.substr(1));else if(o==="::first-child")i=i.children.length>0?i.firstElementChild:null,this.config.configGroups[t].widgetIsFirstChild=!0;else{let u=0;o.split("-").length>1&&o.split("-")[1]>=0&&(u=parseInt(o.split("-")[1],10)),i=i.getElementsByTagName(o.split("-")[0]).length>u?i.getElementsByTagName(o.split("-")[0])[u]:null}}}return i||e.parentElement}getPriceText(e,t){if(!t||t.length===0||(t.forEach(i=>{this.getElementsByXPath(i,0,[e]).forEach(a=>{a.classList.add("sezzle-ignored-price-element")})}),!e.getElementsByClassName("sezzle-ignored-price-element").length))return e.textContent;const n=e.cloneNode(!0);return Array.prototype.forEach.call(n.getElementsByTagName("*"),i=>{Array.prototype.slice.call(i.classList).indexOf("sezzle-ignored-price-element")!==-1&&n.removeChild(i)}),Array.prototype.forEach.call(e.getElementsByClassName("sezzle-ignored-price-element"),i=>{i.classList.remove("sezzle-ignored-price-element")}),n.textContent}startObserve(e,t){const n=new MutationObserver(t);return n.observe(e,this.config.mutationObserverConfig),n}observeRelatedElements(e,t,n){n&&n.forEach(i=>{if(typeof i.relatedPath=="string"&&(typeof i.action=="function"||typeof i.initialAction=="function")){const a=this.getElementsByXPath(B.breakXPath(i.relatedPath),0,[e]);a.length>0&&(typeof i.action=="function"&&this.startObserve(a[0],l=>{i.action(l,t)}),typeof i.initialAction=="function"&&i.initialAction(a[0],t))}})}hideSezzleHideElements(e){this.config.configGroups[e].hideClasses.forEach(t=>{this.getElementsByXPath(t).forEach(n=>{n.classList.contains("sezzle-hidden")||n.classList.add("sezzle-hidden")})})}},ln=["en","fr","es"],cn={languages:ln},P=new WeakSet,un=class{constructor(e,t,n,i,a,l){ee(this,P),this.widgetConfig=e,this.widgetEventLogger=t,this.scrollDistance=0,this.modalNode=null,this.sezzleElement=null,this.promotion=i,this.giveaway=n,this.priceProcessor=a,this.languageConfig=l,this.messageEventHandler=this.messageEventHandler.bind(this),this.modalIframe=null,this.activeTab=1,this.pi5MinPriceInCents=5e3}addClickEventForModal(e){this.sezzleElement=e.widget,d(P,this,fn).call(this,e),d(P,this,gn).call(this,e),d(P,this,pn).call(this),d(P,this,yn).call(this)}renderModals(){d(P,this,vn).call(this),d(P,this,zn).call(this),d(P,this,bn).call(this)}messageEventHandler(e){const{origin:t,data:n}=e;t==this.widgetConfig.apiEndpoints.dynamicModalURL&&n=="close-modal"&&(d(P,this,Ue).call(this),window.removeEventListener("message",this.messageEventHandler))}};async function dn(){if(window.ModalUI)return;cn.languages.indexOf(this.languageConfig.language)>-1?document.modalLanguage=this.languageConfig.language:document.modalLanguage="en";const e=`${this.widgetConfig.apiEndpoints.sezzleAssetsCDN}sezzle-modal.html`,t=await B.httpRequestWrapper("GET",e);this.modalNode.innerHTML=t,d(P,this,wn).call(this),d(P,this,Ue).call(this)}function rt(e,t){if(e.preventDefault(),d(P,this,Pn).call(this,t),e.target.id="sezzle-modal-return",!e.target.classList.contains("no-sezzle-info")){let n;const i=document.getElementsByClassName("sezzle-checkout-modal-lightbox");if(Array.prototype.forEach.call(i,a=>{a.classList.contains("close-sezzle-modal")&&(n=a)}),n){d(P,this,ce).call(this,!0),n.style.display="block",n.getElementsByClassName("close-sezzle-modal")[0].focus();const a=n.getElementsByClassName("sezzle-modal");a.length&&(a[0].className="sezzle-modal"),d(P,this,hn).call(this),this.widgetEventLogger.logEvent("onclick")}}}function hn(){let e=Array.prototype.slice.call(document.querySelector(".sezzle-modal-content").childNodes);e.unshift(document.querySelector("button.close-sezzle-modal"));const t=e[0],n=e[e.length-1];let i={};document.addEventListener("keydown",a=>{if((a.key==="Shift"||a.key==="Control")&&(a.stopImmediatePropagation(),i[a.key]=!0),document.addEventListener("keyup",l=>{delete i[l.key]}),i.Control&&!i.Shift&&a.key==="Tab"&&document.activeElement===n)t.focus();else if(i.Shift&&a.key==="Tab"&&document.activeElement===t)n.focus();else if(a.key==="Escape"){const l=document.getElementsByClassName("sezzle-checkout-modal-lightbox");for(let u=0;u<l.length;u++)l[u].style.display="none",d(P,this,ce).call(this,!1);const o=document.querySelector("#sezzle-modal-return");o?(o.focus(),o.removeAttribute("id")):document.querySelector(".sezzle-checkout-button-wrapper").querySelector(".sezzle-info-icon")?document.querySelector(".sezzle-checkout-button-wrapper").querySelector(".sezzle-info-icon").focus():document.querySelector(".sezzle-checkout-button-wrapper").focus()}})}function mn(){const e=this.modalNode.getElementsByClassName("arrow");for(let t=0;t<e.length;t++)e[t].addEventListener("click",n=>{let i=n.currentTarget;if(i.className.indexOf("disabled")===-1){i.className.indexOf("arrow-right")>-1?(this.activeTab++,i.parentElement.firstElementChild.className="arrow arrow-left",this.activeTab===3&&(i.className="arrow arrow-right disabled")):(this.activeTab--,i.parentElement.lastElementChild.className="arrow arrow-right",this.activeTab===1&&(i.className="arrow arrow-left disabled"));let a=i.parentElement.parentElement.parentElement;a.querySelector(".carousel").className="carousel position-"+this.activeTab;let l=a.querySelector(".carousel-dots").children;for(let o=0;o<l.length;o++)this.activeTab-1===o?l[o].className="dot active":l[o].className="dot"}})}function Ue(){Array.prototype.forEach.call(document.querySelectorAll(".close-sezzle-modal, .close-btn"),t=>{t.addEventListener("click",n=>{d(P,this,ce).call(this,!1),this.modalNode.style.display="none",this.modalNode.getElementsByClassName("sezzle-modal")[0].className="sezzle-modal sezzle-checkout-modal-hidden";const i=document.querySelector("#sezzle-modal-return")||document.querySelector(".sezzle-checkout-button-wrapper");i&&(i.focus(),i.removeAttribute("id"))})});let e=document.getElementsByClassName("sezzle-modal")[0];e||(e=document.getElementsByClassName("sezzle-checkout-modal-lightbox")[0]),e.addEventListener("click",t=>t.stopPropagation())}function gn(e){e.widget.addEventListener("keydown",t=>{(t.key==="Enter"||t.key===" ")&&d(P,this,rt).call(this,t,e)})}function fn(e){e.widget.addEventListener("click",t=>{d(P,this,rt).call(this,t,e)})}function pn(){if(!this.widgetConfig.apModalHTML)return;const e=this.sezzleElement.getElementsByClassName("ap-modal-info-link");Array.prototype.forEach.call(e,t=>{t.addEventListener("click",n=>{n.target.id="sezzle-modal-return",d(P,this,ce).call(this,!0),document.querySelector(".sezzle-ap-modal").style.display="block",document.querySelector(".sezzle-ap-modal").focus(),this.widgetEventLogger.logEvent("onclick-ap")})})}function yn(){if(!this.widgetConfig.klarnaModalHTML)return;const e=this.sezzleElement.getElementsByClassName("klarna-modal-info-link");Array.prototype.forEach.call(e,t=>{t.addEventListener("click",n=>{n.target.id="sezzle-modal-return",d(P,this,ce).call(this,!0),document.querySelector(".sezzle-klarna-modal").style.display="block",document.querySelector(".sezzle-klarna-modal").focus(),this.widgetEventLogger.logEvent("onclick-klarna")})})}function ce(e){const t=document.body;if(e)this.scrollDistance=window.pageYOffset||(document.documentElement.clientHeight?document.documentElement.scrollTop:document.body.scrollTop)||0,t.classList.add("sezzle-modal-open"),t.style.top=`${this.scrollDistance*-1}px`;else{t.classList.remove("sezzle-modal-open"),window.scrollTo(0,this.scrollDistance),t.style.top=0;const n=document.querySelector(".sezzle-checkout-modal-lightbox");n&&(n.scrollTop=0)}}function vn(){try{const e=document.getElementsByClassName("sezzle-checkout-modal-lightbox");e.length?this.modalNode=e[0]:(this.modalNode=document.createElement("section"),this.modalNode.className="sezzle-checkout-modal-lightbox close-sezzle-modal",this.modalNode.style.display="none",this.modalNode.role="dialog",this.modalNode.ariaLabel=this.languageConfig.translations.sezzleInformation,this.modalNode.style.maxHeight="100%",this.modalNode.lang=this.languageConfig.language,document.querySelector("body").appendChild(this.modalNode)),d(P,this,dn).call(this)}catch(e){this.widgetEventLogger.logEvent("error",e.message)}}function zn(){if(document.querySelector(".ap-modal-info-link")){const e=document.createElement("section");e.className="sezzle-checkout-modal-lightbox sezzle-ap-modal",e.style="position: center",e.style.display="none",e.role="dialog",e.ariaLabel=`${this.languageConfig.translations.clickToLearnMore} Afterpay`,e.name=`${this.languageConfig.translations.clickToLearnMore} Afterpay`,e.innerHTML=this.widgetConfig.apModalHTML||"",document.querySelector("body").appendChild(e),document.querySelector("#afterpay-modal-close-button")?.addEventListener("click",t=>{d(P,this,ce).call(this,!1),e.style.display="none";const n=document.querySelector("#sezzle-modal-return");n?(n.focus(),n.removeAttribute("id")):document.querySelector(".ap-modal-info-link")?document.querySelector(".sezzle-checkout-button-wrapper").querySelector(".ap-modal-info-link").focus():document.querySelector(".sezzle-checkout-button-wrapper").focus(),t.stopPropagation()})}}function bn(){if(document.querySelector(".klarna-modal-info-link")){const e=document.createElement("section");e.className="sezzle-checkout-modal-lightbox sezzle-klarna-modal",e.style="position: center",e.style.display="none",e.role="dialog",e.ariaLabel=`${this.languageConfig.translations.clickToLearnMore} Klarna`,e.name=`${this.languageConfig.translations.clickToLearnMore} Klarna`,e.innerHTML=this.widgetConfig.klarnaModalHTML||"",document.querySelector("body").appendChild(e),document.querySelector("button#payment-calculator-interstitial-default__nav-bar__right-icon")?.addEventListener("click",t=>{d(P,this,ce).call(this,!1),e.style.display="none";const n=document.querySelector("#sezzle-modal-return");n?(n.focus(),n.removeAttribute("id")):document.querySelector(".klarna-modal-info-link")?document.querySelector(".sezzle-checkout-button-wrapper").querySelector(".klarna-modal-info-link").focus():document.querySelector(".sezzle-checkout-button-wrapper").focus(),t.stopPropagation()})}}function wn(){const e=document.head,t=document.createElement("script");t.innerHTML=this.modalNode.querySelector("script").innerHTML,e.appendChild(t)}function it(e,t){for(let n=0;n<e.length;n++)e[n].textContent=t}function Cn(e,t){const n=this.priceProcessor.convertToNumber(e.target.value),i=document.isSezzlePayIn5&&n.prices[0].value>=this.pi5MinPriceInCents/100,a=this.priceProcessor.getFormattedShortTermPaymentInfo(n,i),l=t.getElementsByClassName("4-pay-installment"),o=t.getElementsByClassName("5-pay-installment");d(P,this,it).call(this,l,a.pi4InstallmentAmount),d(P,this,it).call(this,o,a.pi5InstallmentAmount);const u=t.getElementsByClassName("5-pay-installment-card");u.length&&(i?u[0].style.display="flex":u[0].style.display="none")}function Sn(e,t,n){const i=e.querySelector(".sezzle-lt-payments")||e.querySelector(".payment-cards-monthly");if(!i)return;const a=this.priceProcessor.longTermPaymentConfig,l=n*100,o=a&&l>=a.minPrice&&l<=a.maxPrice,u=e.querySelector(".lt-terms");if(!o){i.style.display="none",u&&(u.style.display="none");return}i.style.display="",u&&(u.style.display="");const p=this.priceProcessor.getFormattedLongTermPaymentInfo(t),C=i.querySelectorAll(".monthly-installment-card");p.paymentTerms.forEach((x,L)=>{if(!C[L])return;const T=C[L];T.setAttribute("data-months",x.durationInMonths),T.querySelector(".monthly-amount").textContent=x.monthlyPayment;const _=T.querySelector(".pill"),S=_.textContent.replace(/^\d+\s*/,"");_.textContent=`${x.durationInMonths} ${S}`,T.querySelector(".monthly-apr").textContent=`${x.apr}%`,T.querySelector(".monthly-interest").textContent=x.totalInterest,T.querySelector(".monthly-total").textContent=x.totalAmount})}function Tn(e,t){const n=e.target;n.value.length>9&&(n.value=n.value.substring(0,9));const i=this.priceProcessor.convertToNumber(n.value),a=i&&i.prices&&i.prices.length>0?i.prices[0].value:0,l=this.priceProcessor.getCurrency(n.value);if(n.value===l||!i||!i.prices||i.prices.length===0){n.classList.add("input-amount-error");return}const o=this.priceProcessor.longTermPaymentConfig,u=this.widgetConfig.isLongTermOnly,p=u&&o?o.minPrice/100:this.widgetConfig.minPrice/100;let C;if(o&&o.maxPrice?C=o.maxPrice/100:C=this.widgetConfig.maxPrice/100,a<p||a>C){n.classList.add("input-amount-error");return}else n.classList.remove("input-amount-error");const x=this.widgetConfig.maxPrice/100,L=t.querySelector(".payment-cards-biweekly");!u&&L&&a<=x?(L.style.display="block",d(P,this,Cn).call(this,e,t)):L&&(L.style.display="none"),d(P,this,Sn).call(this,t,i,a)}function En(){const e=document.querySelector("#sezzle-modal-core-content"),t=e?.querySelector(".input-amount");t&&t.addEventListener("input",n=>{d(P,this,Tn).call(this,n,e)})}function Pn(e){const t=this.priceProcessor.getParsedPrice(e.priceElement,e.configGroup.ignoredPriceElements,e.configGroup.ignoredFormattedPriceText);if(!t)return this.widgetEventLogger.logEvent("warning",`Cannot render modal. Failed to parse price for the element ${e.id||e.className}`),null;const n=this.priceProcessor.getProductPriceEligibility(t);document.isLongTermOnly=this.widgetConfig.isLongTermOnly||!1;const i=!this.widgetConfig.isLongTermOnly&&!n.isPriceGreaterThanMaxPrice;document.modalMultiPlan=this.priceProcessor.getFormattedShortTermPaymentInfo(t,n.is5PayEligible,i),this.priceProcessor.longTermPaymentConfig?(document.longTermPayment=this.priceProcessor.getFormattedLongTermPaymentInfo(t),document.longTermPayment.isEligible=n.isLongTermPaymentEligible):document.longTermPayment=null,d(P,this,$n).call(this)}function _n(){const e=document.querySelector("#sezzle-modal-core-content");if(!e)return;const t=e.querySelector(".accordion-toggle"),n=e.querySelector(".features-drawer");if(!t||!n)return;const i=t.querySelector(".accordion-icon-expand"),a=t.querySelector(".accordion-icon-collapse");n.style.display="none",t.addEventListener("click",()=>{const l=t.getAttribute("aria-expanded")==="true";t.setAttribute("aria-expanded",String(!l)),t.setAttribute("aria-label",l?t.dataset.labelExpand:t.dataset.labelCollapse),n.style.display=l?"none":"",n.setAttribute("aria-hidden",String(l)),i&&(i.style.display=l?"":"none"),a&&(a.style.display=l?"none":"")})}function $n(){window.ModalUI?window.ModalUI.load():this.widgetEventLogger.logEvent("error","ModalUI is undefined. Problem adding modal script to the document"),d(P,this,Ue).call(this),d(P,this,En).call(this),d(P,this,mn).call(this),d(P,this,_n).call(this)}function Te(e){"@babel/helpers - typeof";return Te=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Te(e)}function Ln(e,t){if(Te(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t||"default");if(Te(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Mn(e){var t=Ln(e,"string");return Te(t)=="symbol"?t:t+""}function ne(e,t,n){return(t=Mn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ee=new WeakSet,Me=class ae{constructor(t){if(ee(this,Ee),ne(this,"merchantUUID",void 0),ne(this,"events",void 0),ne(this,"sentEvents",void 0),ne(this,"currentWidgetType",void 0),!ae.initializing)throw new Error("Use static initializer to initialize the logger");this.merchantUUID=t,this.events=[],this.sentEvents=[],this.currentWidgetType=null}setWidgetContext(t,n){const i=new Set(["widget","promo","dualInstall","giveaway"]);this.currentWidgetType=t?t+(i.has(t)&&n!==null?`-${n}`:""):""}logEvent(t,n){const i={name:t,description:n||"",createdAt:new Date().toJSON()},a=i.name.startsWith("onclick");!a&&d(Ee,this,kn).call(this,i.name,i.description)||(this.events.push(i),a&&(d(Ee,this,ot).call(this),this.events=[]))}forceSendEvents(){d(Ee,this,ot).call(this),this.events=[]}static NewWidgetEventLogger(t){return ae.widgetEventLogger||(ae.initializing=!0,ae.widgetEventLogger=new ae(t)),ae.widgetEventLogger}static destruct(){ae.widgetEventLogger=null}};function kn(e,t){return this.events.some(n=>n.name===e&&n.description===t)}function Dn(e,t){return this.sentEvents.some(n=>n.name===e&&n.description===t)}function ot(){try{const e=[];this.events.forEach(t=>{d(Ee,this,Dn).call(this,t.name,t.description)||(e.push({event_name:t.name,description:t.description,widget_type:this.currentWidgetType||"",merchant_uuid:this.merchantUUID??"",merchant_site:window.location.hostname,created_at:t.createdAt,theme:{name:window?.Shopify?.theme?.name||"",id:window?.Shopify?.theme?.theme_store_id||0,role:window?.Shopify?.theme?.role||"",block_type:document.querySelector("#sezzle-widget-v2-render-reference")?"app":"embed"}}),t.name.startsWith("onclick")||this.sentEvents.push(t))}),e.length>0&&B.sendEvents(e)}catch(e){console.log(e)}}ne(Me,"initializing",void 0),ne(Me,"widgetEventLogger",void 0);var xn=class{constructor(){this.promoTranslations={main:{reward:{is_new_user_only:{true:{threshold:{true:{promocode:{true:[{en:" and get {money} back on first Sezzle order of {threshold} or more using promo code {promocode}"},{fr:" et recevez {money} en retour sur la premier achat Sezzle de {threshold} ou plus en utilisant le code promo {promocode}"},{es:" y recibe {money} de vuelta en el primera compra de Sezzle de {threshold} o más usando el código promocional {promocode}"}],false:[{en:" and get {money} back on first Sezzle order of {threshold} or more"},{fr:" et recevez {money} en retour sur la premier achat Sezzle de {threshold} ou plus"},{es:" y recibe {money} de vuelta en el primera compra de Sezzle de {threshold} o más"}]}},false:{promocode:{true:[{en:" and get {money} back on first Sezzle order using promo code {promocode}"},{fr:" et recevez {money} en retour sur la premier achat Sezzle en utilisant le code promo {promocode}"},{es:" y recibe {money} de vuelta en el primera compra de Sezzle usando el código promocional {promocode}"}],false:[{en:" and get {money} back on first Sezzle order"},{fr:" et recevez {money} en retour sur la premier achat Sezzle"},{es:" y recibe {money} de vuelta en el primera compra de Sezzle"}]}}}},false:{threshold:{true:{promocode:{true:[{en:" and get {money} back on purchases of {threshold} or more using promo code {promocode}"},{fr:" et recevez {money} en retour sur les achats de {threshold} ou plus en utilisant le code promo {promocode}"},{es:" y recibe {money} de vuelta en compras de {threshold} o más usando el código promocional {promocode}"}],false:[{en:" and get {money} back on purchases of {threshold} or more"},{fr:" et recevez {money} en retour sur les achats de {threshold} ou plus"},{es:" y recibe {money} de vuelta en compras de {threshold} o más"}]}},false:{promocode:{true:[{en:" and get {money} back using promo code {promocode}"},{fr:" et recevez {money} en retour en utilisant le code promo {promocode}"},{es:" y recibe {money} de vuelta usando el código promocional {promocode}"}],false:[{en:" and get {money} back"},{fr:" et recevez {money} en retour"},{es:" y recibe {money} de vuelta"}]}}}}}},discount:{is_new_user_only:{true:{threshold:{true:{promocode:{true:[{en:" and get {money} off first Sezzle order of {threshold} or more using promo code {promocode}"},{fr:" et recevez {money} de réduction sur la premier achat Sezzle ou plus en utilisant le code promo {promocode}"},{es:" y recibe {money} de descuento en el primera compra de Sezzle de {threshold} o más usando el código promocional {promocode}"}],false:[{en:" and get {money} off first Sezzle order of {threshold} or more"},{fr:" et recevez {money} de réduction sur la premier achat Sezzle de {threshold} ou plus"},{es:" y recibe {money} de descuento en el primera compra de Sezzle de {threshold} o más"}]}},false:{promocode:{true:[{en:" and get {money} off first Sezzle order using promo code {promocode}"},{fr:" et recevez {money} de réduction sur la premier achat Sezzle en utilisant le code promo {promocode}"},{es:" y recibe {money} de descuento en el primera compra de Sezzle usando el código promocional {promocode}"}],false:[{en:" and get {money} off first Sezzle order"},{fr:" et recevez {money} de réduction sur la premier achat Sezzle"},{es:" y recibe {money} de descuento en el primera compra de Sezzle"}]}}}},false:{threshold:{true:{promocode:{true:[{en:" and get {money} off on purchases of {threshold} or more using promo code {promocode}"},{fr:" et recevez {money} de réduction sur la premier achat Sezzle de {threshold} ou plus en utilisant le code promo {promocode}"},{es:" y recibe {money} de descuento en el primera compra de Sezzle de {threshold} o más usando el código promocional {promocode}"}],false:[{en:" and get {money} off on purchases of {threshold} or more"},{fr:" et recevez {money} de réduction sur la premier achat Sezzle de {threshold} ou plus"},{es:" y recibe {money} de descuento en el primera compra de Sezzle de {threshold} o más"}]}},false:{promocode:{true:[{en:" and get {money} off using promo code {promocode}"},{fr:" et recevez {money} de réduction en utilisant le code promo {promocode}"},{es:" y recibe {money} de descuento usando el código promocional {promocode}"}],false:[{en:" and get {money} off"},{fr:" et recevez {money} de réduction"},{es:" y recibe {money} de descuento"}]}}}}}}}}}getMainViewTranslationTextByLanguage(e,t,n,i,a,l){const o=this.promoTranslations.main[e].is_new_user_only[t].threshold[n].promocode[i];if(o){let u=o.find(p=>p[`${a}`]);return u?u[`${a}`]:(u=o.find(p=>p[`${l}`]),u[`${l}`])}return""}getModalViewTranslationTextByLanguage(e,t){const n=this.promoTranslations.modal;if(n){let i=n.find(a=>a[`${e}`]);return i?i[`${e}`]:(i=n.find(a=>a[`${t}`]),i[`${t}`])}return""}},On=class Fe{constructor(t,n){this.promoConfig=t,this.promoConfig&&(this.promoInitiative={name:this.promoConfig.promo_initiative_name,link:this.promoConfig.promo_initiative_link}),this.language=n.language,this.defaultLanguage=n.defaultLanguage,this.promoTranslations=new xn}getPromotionString(){return this.promoConfig?Fe.getPromotionString(this.promoConfig,this.language,this.defaultLanguage,this.promoTranslations):""}static getPromotionString(t,n,i,a){const l=In[t.type],o=!!t.spend_award_threshold_in_cents,u=t.is_new_user_only?t.is_new_user_only:!1,p=!!t.promo_code;let C=a.getMainViewTranslationTextByLanguage(l,u,o,p,n,i);return C=C.replace("{money}",Fe.format(n,t.currency_code,t.spend_award_in_cents)),o&&(C=C.replace("{threshold}",Fe.format(n,t.currency_code,t.spend_award_threshold_in_cents))),p&&(C=C.replace("{promocode}",t.promo_code)),C}static format(t,n,i){const a=new Intl.NumberFormat(t,{style:"currency",currency:n,minimumFractionDigits:0,maximumFractionDigits:0}),l=new Intl.NumberFormat(t,{style:"currency",currency:n,minimumFractionDigits:2}),o=parseInt(i)/100;return o%1===0?a.format(o):l.format(o)}},In={1:"reward",2:"discount"},Nn=Le(((e,t)=>{(function(n,i){typeof e=="object"&&typeof t<"u"?t.exports=i():typeof define=="function"&&define.amd?define(i):(n=typeof globalThis<"u"?globalThis:n||self).dayjs=i()})(e,(function(){"use strict";var n=1e3,i=6e4,a=36e5,l="millisecond",o="second",u="minute",p="hour",C="day",x="week",L="month",T="quarter",_="year",S="date",y="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,I=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,W={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(b){var f=["th","st","nd","rd"],h=b%100;return"["+b+(f[(h-20)%10]||f[h]||f[0])+"]"}},O=function(b,f,h){var v=String(b);return!v||v.length>=f?b:""+Array(f+1-v.length).join(h)+b},F={s:O,z:function(b){var f=-b.utcOffset(),h=Math.abs(f),v=Math.floor(h/60),m=h%60;return(f<=0?"+":"-")+O(v,2,"0")+":"+O(m,2,"0")},m:function b(f,h){if(f.date()<h.date())return-b(h,f);var v=12*(h.year()-f.year())+(h.month()-f.month()),m=f.clone().add(v,L),w=h-m<0,g=f.clone().add(v+(w?-1:1),L);return+(-(v+(h-m)/(w?m-g:g-m))||0)},a:function(b){return b<0?Math.ceil(b)||0:Math.floor(b)},p:function(b){return{M:L,y:_,w:x,d:C,D:S,h:p,m:u,s:o,ms:l,Q:T}[b]||String(b||"").toLowerCase().replace(/s$/,"")},u:function(b){return b===void 0}},H="en",q={};q[H]=W;var R="$isDayjsObject",J=function(b){return b instanceof de||!(!b||!b[R])},Y=function b(f,h,v){var m;if(!f)return H;if(typeof f=="string"){var w=f.toLowerCase();q[w]&&(m=w),h&&(q[w]=h,m=w);var g=f.split("-");if(!m&&g.length>1)return b(g[0])}else{var k=f.name;q[k]=f,m=k}return!v&&m&&(H=m),m||!v&&H},M=function(b,f){if(J(b))return b.clone();var h=typeof f=="object"?f:{};return h.date=b,h.args=arguments,new de(h)},E=F;E.l=Y,E.i=J,E.w=function(b,f){return M(b,{locale:f.$L,utc:f.$u,x:f.$x,$offset:f.$offset})};var de=(function(){function b(h){this.$L=Y(h.locale,null,!0),this.parse(h),this.$x=this.$x||h.x||{},this[R]=!0}var f=b.prototype;return f.parse=function(h){this.$d=(function(v){var m=v.date,w=v.utc;if(m===null)return new Date(NaN);if(E.u(m))return new Date;if(m instanceof Date)return new Date(m);if(typeof m=="string"&&!/Z$/i.test(m)){var g=m.match($);if(g){var k=g[2]-1||0,A=(g[7]||"0").substring(0,3);return w?new Date(Date.UTC(g[1],k,g[3]||1,g[4]||0,g[5]||0,g[6]||0,A)):new Date(g[1],k,g[3]||1,g[4]||0,g[5]||0,g[6]||0,A)}}return new Date(m)})(h),this.init()},f.init=function(){var h=this.$d;this.$y=h.getFullYear(),this.$M=h.getMonth(),this.$D=h.getDate(),this.$W=h.getDay(),this.$H=h.getHours(),this.$m=h.getMinutes(),this.$s=h.getSeconds(),this.$ms=h.getMilliseconds()},f.$utils=function(){return E},f.isValid=function(){return this.$d.toString()!==y},f.isSame=function(h,v){var m=M(h);return this.startOf(v)<=m&&m<=this.endOf(v)},f.isAfter=function(h,v){return M(h)<this.startOf(v)},f.isBefore=function(h,v){return this.endOf(v)<M(h)},f.$g=function(h,v,m){return E.u(h)?this[v]:this.set(m,h)},f.unix=function(){return Math.floor(this.valueOf()/1e3)},f.valueOf=function(){return this.$d.getTime()},f.startOf=function(h,v){var m=this,w=!!E.u(v)||v,g=E.p(h),k=function(ie,X){var Q=E.w(m.$u?Date.UTC(m.$y,X,ie):new Date(m.$y,X,ie),m);return w?Q:Q.endOf(C)},A=function(ie,X){return E.w(m.toDate()[ie].apply(m.toDate("s"),(w?[0,0,0,0]:[23,59,59,999]).slice(X)),m)},D=this.$W,U=this.$M,K=this.$D,se="set"+(this.$u?"UTC":"");switch(g){case _:return w?k(1,0):k(31,11);case L:return w?k(1,U):k(0,U+1);case x:var re=this.$locale().weekStart||0,he=(D<re?D+7:D)-re;return k(w?K-he:K+(6-he),U);case C:case S:return A(se+"Hours",0);case p:return A(se+"Minutes",1);case u:return A(se+"Seconds",2);case o:return A(se+"Milliseconds",3);default:return this.clone()}},f.endOf=function(h){return this.startOf(h,!1)},f.$set=function(h,v){var m,w=E.p(h),g="set"+(this.$u?"UTC":""),k=(m={},m[C]=g+"Date",m[S]=g+"Date",m[L]=g+"Month",m[_]=g+"FullYear",m[p]=g+"Hours",m[u]=g+"Minutes",m[o]=g+"Seconds",m[l]=g+"Milliseconds",m)[w],A=w===C?this.$D+(v-this.$W):v;if(w===L||w===_){var D=this.clone().set(S,1);D.$d[k](A),D.init(),this.$d=D.set(S,Math.min(this.$D,D.daysInMonth())).$d}else k&&this.$d[k](A);return this.init(),this},f.set=function(h,v){return this.clone().$set(h,v)},f.get=function(h){return this[E.p(h)]()},f.add=function(h,v){var m,w=this;h=Number(h);var g=E.p(v),k=function(U){var K=M(w);return E.w(K.date(K.date()+Math.round(U*h)),w)};if(g===L)return this.set(L,this.$M+h);if(g===_)return this.set(_,this.$y+h);if(g===C)return k(1);if(g===x)return k(7);var A=(m={},m[u]=i,m[p]=a,m[o]=n,m)[g]||1,D=this.$d.getTime()+h*A;return E.w(D,this)},f.subtract=function(h,v){return this.add(-1*h,v)},f.format=function(h){var v=this,m=this.$locale();if(!this.isValid())return m.invalidDate||y;var w=h||"YYYY-MM-DDTHH:mm:ssZ",g=E.z(this),k=this.$H,A=this.$m,D=this.$M,U=m.weekdays,K=m.months,se=m.meridiem,re=function(X,Q,me,ze){return X&&(X[Q]||X(v,w))||me[Q].slice(0,ze)},he=function(X){return E.s(k%12||12,X,"0")},ie=se||function(X,Q,me){var ze=X<12?"AM":"PM";return me?ze.toLowerCase():ze};return w.replace(I,(function(X,Q){return Q||(function(me){switch(me){case"YY":return String(v.$y).slice(-2);case"YYYY":return E.s(v.$y,4,"0");case"M":return D+1;case"MM":return E.s(D+1,2,"0");case"MMM":return re(m.monthsShort,D,K,3);case"MMMM":return re(K,D);case"D":return v.$D;case"DD":return E.s(v.$D,2,"0");case"d":return String(v.$W);case"dd":return re(m.weekdaysMin,v.$W,U,2);case"ddd":return re(m.weekdaysShort,v.$W,U,3);case"dddd":return U[v.$W];case"H":return String(k);case"HH":return E.s(k,2,"0");case"h":return he(1);case"hh":return he(2);case"a":return ie(k,A,!0);case"A":return ie(k,A,!1);case"m":return String(A);case"mm":return E.s(A,2,"0");case"s":return String(v.$s);case"ss":return E.s(v.$s,2,"0");case"SSS":return E.s(v.$ms,3,"0");case"Z":return g}return null})(X)||g.replace(":","")}))},f.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},f.diff=function(h,v,m){var w,g=this,k=E.p(v),A=M(h),D=(A.utcOffset()-this.utcOffset())*i,U=this-A,K=function(){return E.m(g,A)};switch(k){case _:w=K()/12;break;case L:w=K();break;case T:w=K()/3;break;case x:w=(U-D)/6048e5;break;case C:w=(U-D)/864e5;break;case p:w=U/a;break;case u:w=U/i;break;case o:w=U/n;break;default:w=U}return m?w:E.a(w)},f.daysInMonth=function(){return this.endOf(L).$D},f.$locale=function(){return q[this.$L]},f.locale=function(h,v){if(!h)return this.$L;var m=this.clone(),w=Y(h,v,!0);return w&&(m.$L=w),m},f.clone=function(){return E.w(this.$d,this)},f.toDate=function(){return new Date(this.valueOf())},f.toJSON=function(){return this.isValid()?this.toISOString():null},f.toISOString=function(){return this.$d.toISOString()},f.toString=function(){return this.$d.toUTCString()},b})(),Pe=de.prototype;return M.prototype=Pe,[["$ms",l],["$s",o],["$m",u],["$H",p],["$W",C],["$M",L],["$y",_],["$D",S]].forEach((function(b){Pe[b[1]]=function(f){return this.$g(f,b[0],b[1])}})),M.extend=function(b,f){return b.$i||(b(f,de,M),b.$i=!0),M},M.locale=Y,M.isDayjs=J,M.unix=function(b){return M(1e3*b)},M.en=q[H],M.Ls=q,M.p={},M}))})),An=Le(((e,t)=>{(function(n,i){typeof e=="object"&&typeof t<"u"?t.exports=i():typeof define=="function"&&define.amd?define(i):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_plugin_utc=i()})(e,(function(){"use strict";var n="minute",i=/[+-]\d\d(?::?\d\d)?/g,a=/([+-]|\d\d)/g;return function(l,o,u){var p=o.prototype;u.utc=function(y){return new o({date:y,utc:!0,args:arguments})},p.utc=function(y){var $=u(this.toDate(),{locale:this.$L,utc:!0});return y?$.add(this.utcOffset(),n):$},p.local=function(){return u(this.toDate(),{locale:this.$L,utc:!1})};var C=p.parse;p.parse=function(y){y.utc&&(this.$u=!0),this.$utils().u(y.$offset)||(this.$offset=y.$offset),C.call(this,y)};var x=p.init;p.init=function(){if(this.$u){var y=this.$d;this.$y=y.getUTCFullYear(),this.$M=y.getUTCMonth(),this.$D=y.getUTCDate(),this.$W=y.getUTCDay(),this.$H=y.getUTCHours(),this.$m=y.getUTCMinutes(),this.$s=y.getUTCSeconds(),this.$ms=y.getUTCMilliseconds()}else x.call(this)};var L=p.utcOffset;p.utcOffset=function(y,$){var I=this.$utils().u;if(I(y))return this.$u?0:I(this.$offset)?L.call(this):this.$offset;if(typeof y=="string"&&(y=(function(H){H===void 0&&(H="");var q=H.match(i);if(!q)return null;var R=(""+q[0]).match(a)||["-",0,0],J=R[0],Y=60*+R[1]+ +R[2];return Y===0?0:J==="+"?Y:-Y})(y),y===null))return this;var W=Math.abs(y)<=16?60*y:y;if(W===0)return this.utc($);var O=this.clone();if($)return O.$offset=W,O.$u=!1,O;var F=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(O=this.local().add(W+F,n)).$offset=W,O.$x.$localOffset=F,O};var T=p.format;p.format=function(y){var $=y||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return T.call(this,$)},p.valueOf=function(){var y=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*y},p.isUTC=function(){return!!this.$u},p.toISOString=function(){return this.toDate().toISOString()},p.toString=function(){return this.toDate().toUTCString()};var _=p.toDate;p.toDate=function(y){return y==="s"&&this.$offset?u(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():_.call(this)};var S=p.diff;p.diff=function(y,$,I){if(y&&this.$u===y.$u)return S.call(this,y,$,I);var W=this.local(),O=u(y).local();return S.call(W,O,$,I)}}}))})),Wn=Le(((e,t)=>{(function(n,i){typeof e=="object"&&typeof t<"u"?t.exports=i():typeof define=="function"&&define.amd?define(i):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_plugin_timezone=i()})(e,(function(){"use strict";var n={year:0,month:1,day:2,hour:3,minute:4,second:5},i={};return function(a,l,o){var u,p=function(T,_,S){S===void 0&&(S={});var y=new Date(T);return(function($,I){I===void 0&&(I={});var W=I.timeZoneName||"short",O=$+"|"+W,F=i[O];return F||(F=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:$,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:W}),i[O]=F),F})(_,S).formatToParts(y)},C=function(T,_){for(var S=p(T,_),y=[],$=0;$<S.length;$+=1){var I=S[$],W=I.type,O=I.value,F=n[W];F>=0&&(y[F]=parseInt(O,10))}var H=y[3],q=H===24?0:H,R=y[0]+"-"+y[1]+"-"+y[2]+" "+q+":"+y[4]+":"+y[5]+":000",J=+T;return(o.utc(R).valueOf()-(J-=J%1e3))/6e4},x=l.prototype;x.tz=function(T,_){T===void 0&&(T=u);var S,y=this.utcOffset(),$=this.toDate(),I=$.toLocaleString("en-US",{timeZone:T}),W=Math.round(($-new Date(I))/1e3/60),O=15*-Math.round($.getTimezoneOffset()/15)-W;if(!Number(O))S=this.utcOffset(0,_);else if(S=o(I,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(O,!0),_){var F=S.utcOffset();S=S.add(y-F,"minute")}return S.$x.$timezone=T,S},x.offsetName=function(T){var _=this.$x.$timezone||o.tz.guess(),S=p(this.valueOf(),_,{timeZoneName:T}).find((function(y){return y.type.toLowerCase()==="timezonename"}));return S&&S.value};var L=x.startOf;x.startOf=function(T,_){if(!this.$x||!this.$x.$timezone)return L.call(this,T,_);var S=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return L.call(S,T,_).tz(this.$x.$timezone,!0)},o.tz=function(T,_,S){var y=S&&_,$=S||_||u,I=C(+o(),$);if(typeof T!="string")return o(T).tz($);var W=(function(q,R,J){var Y=q-60*R*1e3,M=C(Y,J);if(R===M)return[Y,R];var E=C(Y-=60*(M-R)*1e3,J);return M===E?[Y,M]:[q-60*Math.min(M,E)*1e3,Math.max(M,E)]})(o.utc(T,y).valueOf(),I,$),O=W[0],F=W[1],H=o(O).utcOffset(F);return H.$x.$timezone=$,H},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(T){u=T}}}))})),ye=qe(Nn()),Fn=qe(An()),qn=qe(Wn());ye.default.extend(Fn.default),ye.default.extend(qn.default);var Un=class{constructor(e){this.giveawayConfig=e}getTimeLeftInDay(){ye.default.tz.setDefault("America/Chicago");const e=ye.default.tz(),t=ye.default.tz().endOf("day").diff(e,"seconds");return ye.default.tz.setDefault(),new Date(t*1e3).toISOString().substring(11,19)}},ue=new WeakSet,at=class{constructor(e){ee(this,ue),this.terms=e||[{price:1e3,options:[[48,8.99],[36,7.99],[3,0]]},{price:500,options:[[24,7.99],[12,6.99],[3,0]]},{price:250,options:[[12,6.99],[9,5.99],[3,0]]},{price:100,options:[[9,5.99],[6,5.99],[3,0]]}]}getPaymentInfo(e){if(!e||e<=0)throw new Error("Unable to calculate Long Term payments: product price is undefined or non-positive");const t=d(ue,this,lt).call(this,e),n={productPrice:e,paymentTerms:[]};return n.paymentTerms=t.map(i=>{const a=i[0],l=i[1],o=d(ue,this,st).call(this,e,a,l),u=d(ue,this,Hn).call(this,o*a);return{durationInMonths:a,apr:l,monthlyPayment:o,totalAmount:u,totalInterest:u-e}}),n.paymentTerms.sort((i,a)=>i.monthlyPayment-a.monthlyPayment),n}calculateLowestAvailablePayment(e){if(!e||e<=0)throw new Error("Unable to calculate lowest Long Term payment: product price is undefined or non-positive");const t=d(ue,this,Bn).call(this,e);return d(ue,this,st).call(this,e,t[0],t[1])}};function st(e,t,n){if(n>0){const i=n/100/12,a=Math.pow(1+i,t);return e*i*a/(a-1)}else return e/t}function Bn(e){return d(ue,this,lt).call(this,e)[0]}function lt(e){for(const t of this.terms)if(e>t.price)return t.options;return this.terms[this.terms.length-1].options}function Hn(e){return Math.round(e*100)/100}var ve=new WeakSet,jn=class{constructor(e,t,n,i,a){ee(this,ve),this.sezzleDOMFunctions=n,this.widgetEventLogger=i,this.widgetConfig=e,this.longTermPaymentConfig=t,this.language=a,this.placeholder="{price}",this.numberOfDecimals=2,this.pi5MinPriceInCents=5e3,this.thousandDelimiter=/\B(?=(\d{3})+(?!\d))/g,this.naFormat=/^\d{1,3}(,\d{3})+(\.\d+)?$/,this.euFormat=/^\d{1,3}(\.\d{3})+(,\d+)?$/,this.euFormatWithSpace=/^\d{1,3}(\s\d{3})+,\d+$/,this.naFormatWithSpace=/^\d{1,3}(\s\d{3})+\.\d+$/,this.unknownFormatWithSpace=/^\d{1,3}(\s\d{3})+$/,this.euDecimalsNoThousandDelimiterFormat=/(^\d+((,\d{1,2})|(,\d{4,}))$)|(^\d{4,},\d+$)/}getParsedPrice(e,t,n){let i=this.sezzleDOMFunctions.getPriceText(e,t);return i?(i=d(ve,this,Rn).call(this,i,n),this.convertToNumber(i)):(this.widgetEventLogger.logEvent("warning","No price text after ignored price elements."),null)}convertToNumber(e){const t=new RegExp(/\d+((\.|,|\s)\d+)*/g),n=B.matchAll(t,e);if(n.length===0||n.length>2)return this.widgetEventLogger.logEvent("warning",`priceText ${n} contains unexpected number of values`),null;const i={formatter:e.replace(t,this.placeholder),prices:[],currency:this.getCurrency(e)};return i.prices=n.map(a=>{let l=a,o;return this.naFormat.test(a)&&(l=a.replaceAll(",",""),o=this.naFormat),this.euFormat.test(a)&&(l=a.replaceAll(".","").replaceAll(",","."),o=this.euFormat),this.naFormatWithSpace.test(a)&&(l=a.replace(/\s/g,""),o=this.naFormatWithSpace),this.euFormatWithSpace.test(a)&&(l=a.replace(/\s/g,"").replaceAll(",","."),o=this.euFormatWithSpace),this.unknownFormatWithSpace.test(a)&&(l=a.replace(/\s/g,""),o=this.unknownFormatWithSpace),this.euDecimalsNoThousandDelimiterFormat.test(a)&&(l=a.replaceAll(",","."),o=this.euDecimalsNoThousandDelimiterFormat),parseFloat(l)===NaN&&this.widgetEventLogger.logEvent("warning",`parsed price element text ${l} is not a number`),{value:parseFloat(l),format:o}}),i}getCurrency(e){if(!e)return"";const t=e.match(/\p{Sc}/gu);return t?t[0]:"$"}getFormattedWidgetPrice(e,t,n){if(!e.prices||e.prices.length===0)throw new Error("Cannot get formatted widget price: no product prices are provided");let i=e.formatter;for(const a of e.prices){let l,o;if(t)l=new at(this.longTermPaymentConfig.paymentTerms).calculateLowestAvailablePayment(a.value).toFixed(this.numberOfDecimals);else{const u=n?5:4;l=(a.value/u).toFixed(this.numberOfDecimals)}o=d(ve,this,ct).call(this,l,a.format),i=i.replace(this.placeholder,o)}return i}getFormattedMinPrice(e){const t=e.prices[0].format,n=e.formatter,i=d(ve,this,ct).call(this,this.widgetConfig.minPrice/100,t),a=d(ve,this,Xn).call(this,n);return a?n.split(a)[0].replace(this.placeholder,i).trim():n.replace(this.placeholder,i)}getProductPriceEligibility(e){const t=this.getProductPriceInCents(e);return{isPriceLessThanMinPrice:t<this.widgetConfig.minPrice,isPriceGreaterThanMaxPrice:t>this.widgetConfig.maxPrice,is5PayEligible:document.isSezzlePayIn5&&t>=this.pi5MinPriceInCents,isLongTermPaymentEligible:!!(this.longTermPaymentConfig&&t>=this.longTermPaymentConfig.minPrice&&t<=this.longTermPaymentConfig.maxPrice)}}getFormattedLongTermPaymentInfo(e){if(!e.currency)throw new Error("Cannot get formatted long term payment info: the currency symbol is not provided");const t=e.prices[0].value,n=new at(this.longTermPaymentConfig.paymentTerms).getPaymentInfo(t),i=Number(this.longTermPaymentConfig.minAPR)>0?this.longTermPaymentConfig.minAPR:"9.99",a=Number(this.longTermPaymentConfig.minTermMonths)>0?this.longTermPaymentConfig.minTermMonths:3,l={productPrice:e.currency+n.productPrice.toFixed(this.numberOfDecimals).replace(this.thousandDelimiter,","),minAPR:i,maxAPR:Number(this.longTermPaymentConfig.maxAPR)>Number(i)?this.longTermPaymentConfig.maxAPR:"34.99",minTermMonths:a,maxTermMonths:Number(this.longTermPaymentConfig.maxTermMonths)>Number(a)?this.longTermPaymentConfig.maxTermMonths:48,paymentTerms:[]};return l.paymentTerms=n.paymentTerms.map(o=>({durationInMonths:o.durationInMonths,apr:o.apr,monthlyPayment:e.currency+o.monthlyPayment.toFixed(this.numberOfDecimals).replace(this.thousandDelimiter,","),totalAmount:e.currency+o.totalAmount.toFixed(this.numberOfDecimals).replace(this.thousandDelimiter,","),totalInterest:e.currency+o.totalInterest.toFixed(this.numberOfDecimals).replace(this.thousandDelimiter,",")})),l}getFormattedShortTermPaymentInfo(e,t,n=!0){if(!e.currency)throw new Error("Cannot get formatted short term payment info: the currency symbol is not provided");const i=e.prices[0].value;return{productPrice:e.currency+i.toFixed(this.numberOfDecimals).replace(this.thousandDelimiter,","),pi4InstallmentAmount:n?e.currency+(i/4).toFixed(this.numberOfDecimals).replace(this.thousandDelimiter,","):"",pi5InstallmentAmount:t?e.currency+(i/5).toFixed(this.numberOfDecimals).replace(this.thousandDelimiter,","):""}}getProductPriceInCents(e){if(!e.prices||e.prices.length===0)throw new Error("Cannot get formatted widget price: no product prices are provided");return e.prices[0].value*100}};function Rn(e,t){return e=e.replace(`
`,"").replace(/\u00a0/g," ").trim(),t&&t.forEach(n=>{const i=new RegExp(n,"ig");e=e.replace(i,"")}),e}function Yn(){const e=this.language&&typeof this.language.getLanguage=="function"?this.language.getLanguage():null;if(!e)return",";try{return new Intl.NumberFormat(e).formatToParts(1.1).find(t=>t.type==="decimal")?.value??","}catch{return","}}function ct(e,t){switch(t){case this.naFormat:return e.toString().replace(this.thousandDelimiter,",");case this.euFormat:return e.toString().replace(".",",").replace(this.thousandDelimiter,".");case this.euFormatWithSpace:return e.toString().replace(".",",").replace(this.thousandDelimiter," ");case this.naFormatWithSpace:return e.toString().replace(this.thousandDelimiter," ");case this.unknownFormatWithSpace:return d(ve,this,Yn).call(this)===","?e.toString().replace(".",",").replace(this.thousandDelimiter," "):e.toString().replace(this.thousandDelimiter," ");case this.euDecimalsNoThousandDelimiterFormat:return e.toString().replace(".",",");default:return e.toString()}}function Xn(e){const t=["–","-"];let n="";return t.forEach(i=>{e.includes(i)&&(n=i)}),n}var ke,ut=new WeakSet,De=class Ut{constructor(t){ee(this,ut),this.widgetEventLogger=t}logCompetitorEvents(){for(const t in Ut.competitorWidgets)d(ut,this,Kn).call(this,t)&&this.widgetEventLogger.logEvent("competitor-widget",t)}};ke=De;function Kn(e){for(const t of ke.competitorWidgets[e].tagNames)if(document.getElementsByTagName(t).length)return!0;for(const t of ke.competitorWidgets[e].ids)if(document.getElementById(t))return!0;for(const t of ke.competitorWidgets[e].classes)if(document.getElementsByClassName(t).length)return!0}ne(De,"competitorWidgets",{klarna:{tagNames:["klarna-placement"],ids:[],classes:[]},afterpay:{tagNames:["afterpay-placement"],ids:[],classes:["afterpay-paragraph"]},shoppay:{tagNames:["shopify-payment-terms","shop-pay-installments-banner"],ids:["shopify-installments"],classes:["shopify-installments"]},affirm:{tagNames:[],ids:["afffirm-promo-box"],classes:["affirm-as-low-as"]},paypal:{tagNames:[],ids:["paypal-commerce-proddetails-messaging-banner","paypal_message","paypal_message_container"],classes:["paypal-message","paypal-message-container"]},quadpay:{tagNames:["quadpay-widget"],ids:["qp-container"],classes:["qp-widget-container","qp-container"]},zip:{tagNames:["quadpay-widget-v3"],ids:["qp-container"],classes:["qp-container"]}});var dt=Le(((e,t)=>{var n=200,i="__lodash_hash_undefined__",a=9007199254740991,l="[object Arguments]",o="[object Array]",u="[object Boolean]",p="[object Date]",C="[object Error]",x="[object Function]",L="[object GeneratorFunction]",T="[object Map]",_="[object Number]",S="[object Object]",y="[object Promise]",$="[object RegExp]",I="[object Set]",W="[object String]",O="[object Symbol]",F="[object WeakMap]",H="[object ArrayBuffer]",q="[object DataView]",R="[object Float32Array]",J="[object Float64Array]",Y="[object Int8Array]",M="[object Int16Array]",E="[object Int32Array]",de="[object Uint8Array]",Pe="[object Uint8ClampedArray]",b="[object Uint16Array]",f="[object Uint32Array]",h=/[\\^$.*+?()[\]{}|]/g,v=/\w*$/,m=/^\[object .+?Constructor\]$/,w=/^(?:0|[1-9]\d*)$/,g={};g[l]=g[o]=g[H]=g[q]=g[u]=g[p]=g[R]=g[J]=g[Y]=g[M]=g[E]=g[T]=g[_]=g[S]=g[$]=g[I]=g[W]=g[O]=g[de]=g[Pe]=g[b]=g[f]=!0,g[C]=g[x]=g[F]=!1;var k=typeof global=="object"&&global&&global.Object===Object&&global,A=typeof self=="object"&&self&&self.Object===Object&&self,D=k||A||Function("return this")(),U=typeof e=="object"&&e&&!e.nodeType&&e,K=U&&typeof t=="object"&&t&&!t.nodeType&&t,se=K&&K.exports===U;function re(r,s){return r.set(s[0],s[1]),r}function he(r,s){return r.add(s),r}function ie(r,s){for(var c=-1,z=r?r.length:0;++c<z&&s(r[c],c,r)!==!1;);return r}function X(r,s){for(var c=-1,z=s.length,j=r.length;++c<z;)r[j+c]=s[c];return r}function Q(r,s,c,z){var j=-1,V=r?r.length:0;for(z&&V&&(c=r[++j]);++j<V;)c=s(c,r[j],j,r);return c}function me(r,s){for(var c=-1,z=Array(r);++c<r;)z[c]=s(c);return z}function ze(r,s){return r?.[s]}function zt(r){var s=!1;if(r!=null&&typeof r.toString!="function")try{s=!!(r+"")}catch{}return s}function bt(r){var s=-1,c=Array(r.size);return r.forEach(function(z,j){c[++s]=[j,z]}),c}function Re(r,s){return function(c){return r(s(c))}}function wt(r){var s=-1,c=Array(r.size);return r.forEach(function(z){c[++s]=z}),c}var Yr=Array.prototype,Xr=Function.prototype,xe=Object.prototype,Ye=D["__core-js_shared__"],Ct=(function(){var r=/[^.]+$/.exec(Ye&&Ye.keys&&Ye.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})(),St=Xr.toString,le=xe.hasOwnProperty,Oe=xe.toString,Kr=RegExp("^"+St.call(le).replace(h,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Tt=se?D.Buffer:void 0,Et=D.Symbol,Pt=D.Uint8Array,Vr=Re(Object.getPrototypeOf,Object),Jr=Object.create,Zr=xe.propertyIsEnumerable,Gr=Yr.splice,_t=Object.getOwnPropertySymbols,Qr=Tt?Tt.isBuffer:void 0,ei=Re(Object.keys,Object),Xe=Ce(D,"DataView"),_e=Ce(D,"Map"),Ke=Ce(D,"Promise"),Ve=Ce(D,"Set"),Je=Ce(D,"WeakMap"),$e=Ce(Object,"create"),ti=pe(Xe),ni=pe(_e),ri=pe(Ke),ii=pe(Ve),oi=pe(Je),$t=Et?Et.prototype:void 0,Lt=$t?$t.valueOf:void 0;function ge(r){var s=-1,c=r?r.length:0;for(this.clear();++s<c;){var z=r[s];this.set(z[0],z[1])}}function ai(){this.__data__=$e?$e(null):{}}function si(r){return this.has(r)&&delete this.__data__[r]}function li(r){var s=this.__data__;if($e){var c=s[r];return c===i?void 0:c}return le.call(s,r)?s[r]:void 0}function ci(r){var s=this.__data__;return $e?s[r]!==void 0:le.call(s,r)}function ui(r,s){var c=this.__data__;return c[r]=$e&&s===void 0?i:s,this}ge.prototype.clear=ai,ge.prototype.delete=si,ge.prototype.get=li,ge.prototype.has=ci,ge.prototype.set=ui;function oe(r){var s=-1,c=r?r.length:0;for(this.clear();++s<c;){var z=r[s];this.set(z[0],z[1])}}function di(){this.__data__=[]}function hi(r){var s=this.__data__,c=Ie(s,r);return c<0?!1:(c==s.length-1?s.pop():Gr.call(s,c,1),!0)}function mi(r){var s=this.__data__,c=Ie(s,r);return c<0?void 0:s[c][1]}function gi(r){return Ie(this.__data__,r)>-1}function fi(r,s){var c=this.__data__,z=Ie(c,r);return z<0?c.push([r,s]):c[z][1]=s,this}oe.prototype.clear=di,oe.prototype.delete=hi,oe.prototype.get=mi,oe.prototype.has=gi,oe.prototype.set=fi;function be(r){var s=-1,c=r?r.length:0;for(this.clear();++s<c;){var z=r[s];this.set(z[0],z[1])}}function pi(){this.__data__={hash:new ge,map:new(_e||oe),string:new ge}}function yi(r){return Ne(this,r).delete(r)}function vi(r){return Ne(this,r).get(r)}function zi(r){return Ne(this,r).has(r)}function bi(r,s){return Ne(this,r).set(r,s),this}be.prototype.clear=pi,be.prototype.delete=yi,be.prototype.get=vi,be.prototype.has=zi,be.prototype.set=bi;function we(r){this.__data__=new oe(r)}function wi(){this.__data__=new oe}function Ci(r){return this.__data__.delete(r)}function Si(r){return this.__data__.get(r)}function Ti(r){return this.__data__.has(r)}function Ei(r,s){var c=this.__data__;if(c instanceof oe){var z=c.__data__;if(!_e||z.length<n-1)return z.push([r,s]),this;c=this.__data__=new be(z)}return c.set(r,s),this}we.prototype.clear=wi,we.prototype.delete=Ci,we.prototype.get=Si,we.prototype.has=Ti,we.prototype.set=Ei;function Pi(r,s){var c=Qe(r)||Ji(r)?me(r.length,String):[],z=c.length,j=!!z;for(var V in r)(s||le.call(r,V))&&!(j&&(V=="length"||Yi(V,z)))&&c.push(V);return c}function Mt(r,s,c){var z=r[s];(!(le.call(r,s)&&Ot(z,c))||c===void 0&&!(s in r))&&(r[s]=c)}function Ie(r,s){for(var c=r.length;c--;)if(Ot(r[c][0],s))return c;return-1}function _i(r,s){return r&&kt(s,et(s),r)}function Ze(r,s,c,z,j,V,G){var Z;if(z&&(Z=V?z(r,j,V,G):z(r)),Z!==void 0)return Z;if(!Ae(r))return r;var At=Qe(r);if(At){if(Z=Hi(r),!s)return qi(r,Z)}else{var Se=fe(r),Wt=Se==x||Se==L;if(Gi(r))return xi(r,s);if(Se==S||Se==l||Wt&&!V){if(zt(r))return V?r:{};if(Z=ji(Wt?{}:r),!s)return Ui(r,_i(Z,r))}else{if(!g[Se])return V?r:{};Z=Ri(r,Se,Ze,s)}}G||(G=new we);var Ft=G.get(r);if(Ft)return Ft;if(G.set(r,Z),!At)var qt=c?Bi(r):et(r);return ie(qt||r,function(tt,We){qt&&(We=tt,tt=r[We]),Mt(Z,We,Ze(tt,s,c,z,We,r,G))}),Z}function $i(r){return Ae(r)?Jr(r):{}}function Li(r,s,c){var z=s(r);return Qe(r)?z:X(z,c(r))}function Mi(r){return Oe.call(r)}function ki(r){return!Ae(r)||Ki(r)?!1:(Nt(r)||zt(r)?Kr:m).test(pe(r))}function Di(r){if(!xt(r))return ei(r);var s=[];for(var c in Object(r))le.call(r,c)&&c!="constructor"&&s.push(c);return s}function xi(r,s){if(s)return r.slice();var c=new r.constructor(r.length);return r.copy(c),c}function Ge(r){var s=new r.constructor(r.byteLength);return new Pt(s).set(new Pt(r)),s}function Oi(r,s){var c=s?Ge(r.buffer):r.buffer;return new r.constructor(c,r.byteOffset,r.byteLength)}function Ii(r,s,c){return Q(s?c(bt(r),!0):bt(r),re,new r.constructor)}function Ni(r){var s=new r.constructor(r.source,v.exec(r));return s.lastIndex=r.lastIndex,s}function Ai(r,s,c){return Q(s?c(wt(r),!0):wt(r),he,new r.constructor)}function Wi(r){return Lt?Object(Lt.call(r)):{}}function Fi(r,s){var c=s?Ge(r.buffer):r.buffer;return new r.constructor(c,r.byteOffset,r.length)}function qi(r,s){var c=-1,z=r.length;for(s||(s=Array(z));++c<z;)s[c]=r[c];return s}function kt(r,s,c,z){c||(c={});for(var j=-1,V=s.length;++j<V;){var G=s[j],Z=z?z(c[G],r[G],G,c,r):void 0;Mt(c,G,Z===void 0?r[G]:Z)}return c}function Ui(r,s){return kt(r,Dt(r),s)}function Bi(r){return Li(r,et,Dt)}function Ne(r,s){var c=r.__data__;return Xi(s)?c[typeof s=="string"?"string":"hash"]:c.map}function Ce(r,s){var c=ze(r,s);return ki(c)?c:void 0}var Dt=_t?Re(_t,Object):to,fe=Mi;(Xe&&fe(new Xe(new ArrayBuffer(1)))!=q||_e&&fe(new _e)!=T||Ke&&fe(Ke.resolve())!=y||Ve&&fe(new Ve)!=I||Je&&fe(new Je)!=F)&&(fe=function(r){var s=Oe.call(r),c=s==S?r.constructor:void 0,z=c?pe(c):void 0;if(z)switch(z){case ti:return q;case ni:return T;case ri:return y;case ii:return I;case oi:return F}return s});function Hi(r){var s=r.length,c=r.constructor(s);return s&&typeof r[0]=="string"&&le.call(r,"index")&&(c.index=r.index,c.input=r.input),c}function ji(r){return typeof r.constructor=="function"&&!xt(r)?$i(Vr(r)):{}}function Ri(r,s,c,z){var j=r.constructor;switch(s){case H:return Ge(r);case u:case p:return new j(+r);case q:return Oi(r,z);case R:case J:case Y:case M:case E:case de:case Pe:case b:case f:return Fi(r,z);case T:return Ii(r,z,c);case _:case W:return new j(r);case $:return Ni(r);case I:return Ai(r,z,c);case O:return Wi(r)}}function Yi(r,s){return s=s??a,!!s&&(typeof r=="number"||w.test(r))&&r>-1&&r%1==0&&r<s}function Xi(r){var s=typeof r;return s=="string"||s=="number"||s=="symbol"||s=="boolean"?r!=="__proto__":r===null}function Ki(r){return!!Ct&&Ct in r}function xt(r){var s=r&&r.constructor;return r===(typeof s=="function"&&s.prototype||xe)}function pe(r){if(r!=null){try{return St.call(r)}catch{}try{return r+""}catch{}}return""}function Vi(r){return Ze(r,!0,!0)}function Ot(r,s){return r===s||r!==r&&s!==s}function Ji(r){return Zi(r)&&le.call(r,"callee")&&(!Zr.call(r,"callee")||Oe.call(r)==l)}var Qe=Array.isArray;function It(r){return r!=null&&Qi(r.length)&&!Nt(r)}function Zi(r){return eo(r)&&It(r)}var Gi=Qr||no;function Nt(r){var s=Ae(r)?Oe.call(r):"";return s==x||s==L}function Qi(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=a}function Ae(r){var s=typeof r;return!!r&&(s=="object"||s=="function")}function eo(r){return!!r&&typeof r=="object"}function et(r){return It(r)?Pi(r):Di(r)}function to(){return[]}function no(){return!1}t.exports=Vi})),Be,Vn=dt(),N=new WeakSet,He=class{constructor(e,t,n){ee(this,N),ne(this,"intervalInMs",void 0),this.intervalInMs=2e3,this.widgetConfig=e,this.widgetEventLogger=t,this.competitor=new De(this.widgetEventLogger),this.sezzleDOMFunctions=new sn(e),this.language=n,this.promotion=new On(document.sezzlePromotion,this.language),this.giveaway=new Un(document.giveawayConfig),this.priceProcessor=new jn(e,document.longTermPaymentConfig,this.sezzleDOMFunctions,this.widgetEventLogger,this.language),this.modal=new un(e,t,this.giveaway,this.promotion,this.priceProcessor,this.language)}initializeRendering(){d(N,this,ar).call(this,this.widgetConfig.observeElements),d(N,this,ht).call(this,[]),this.modal.renderModals()}};Be=He;function ht(e){e=e.filter(n=>n.widget!=null),this.widgetConfig.configGroups.forEach((n,i)=>{this.sezzleDOMFunctions.getElementsByXPath(n.xpath).forEach(a=>{if(!a.hasAttribute("data-sezzleindex")){const l=d(N,this,Zn).call(this,a,i,n);if(l){this.widgetEventLogger.logEvent("onload");try{const o={priceElement:a,observer:this.sezzleDOMFunctions.startObserve(a,u=>{d(N,this,Jn).call(this,u,n,this.priceProcessor)}),widget:l,configGroup:n};e.push(o),this.modal.addClickEventForModal(o),this.sezzleDOMFunctions.observeRelatedElements(o.priceElement,o.widget,o.configGroup.relatedElementActions)}catch(o){this.widgetEventLogger.logEvent("warning",`The widget has been rendered, but an error occurred when running additional instructions: ${o.message}`)}}}})}),e.forEach(n=>{document.body.contains(n.priceElement)||(n.observer!==null&&n.observer.disconnect(),n.widget.remove(),n.widget=null)});for(let n=0,i=this.widgetConfig.configGroups.length;n<i;n++)this.sezzleDOMFunctions.hideSezzleHideElements(n);setTimeout(()=>{d(N,this,ht).call(this,e),this.competitor.logCompetitorEvents(),this.widgetEventLogger.forceSendEvents()},this.intervalInMs);const t=document.querySelector(".sezzle-");t!==null&&(t.classList.contains("sezzle-hidden")||t.classList.add("sezzle-hidden"))}function Jn(e,t,n){e.filter(i=>i.type==="childList").forEach(i=>{const a=i.target.dataset.sezzleindex,l=document.querySelector(`.sezzleindex-${a}`);if(l){const o=l.parentElement,u=o.parentElement.parentElement;try{u.classList.remove("sezzle-hidden");const p=n.getParsedPrice(i.target,t.ignoredPriceElements,t.ignoredFormattedPriceText),C=n.getProductPriceEligibility(p);(C.isPriceGreaterThanMaxPrice&&!C.isLongTermPaymentEligible||!C.isLongTermPaymentEligible&&this.widgetConfig.config.isLongTermOnly)&&u.classList.add("sezzle-hidden"),o.innerHTML=d(N,this,mt).call(this,t,a,C,p).innerHTML}catch(p){u.classList.add("sezzle-hidden"),this.widgetEventLogger.logEvent("warning",p.message)}}})}function je(e){return e&&Object.keys(e).length===0&&e.constructor===Object}function Zn(e,t=0,n){try{if(e.classList.contains("sezzle-ignored-price-element"))return null;const i=this.priceProcessor.getParsedPrice(e,n.ignoredPriceElements,n.ignoredFormattedPriceText);if(!i)return this.widgetEventLogger.logEvent("warning",`Cannot render widget. Failed to parse price for the element ${e.id||e.className}`),null;const a=this.priceProcessor.getProductPriceEligibility(i);if(a.isPriceGreaterThanMaxPrice&&!a.isLongTermPaymentEligible||!a.isLongTermPaymentEligible&&this.widgetConfig.config.isLongTermOnly)return null;const l=this.sezzleDOMFunctions.getElementToRender(e,t);e.dataset.sezzleindex=t,n.alignment==="auto"&&(n.alignment=d(N,this,Qn).call(this,e));const o=document.createElement("div");o.className=`sezzle-shopify-info-button sezzlewidgetindex-${t}`,d(N,this,gt).call(this,o),d(N,this,je).call(this,n.containerStyle)||d(N,this,er).call(this,o,n);const u=document.createElement("div");u.ariaHasPopup="dialog",u.role="button",u.className="sezzle-checkout-button-wrapper sezzle-modal-link",u.tabIndex=0,u.style.cursor="pointer",d(N,this,gt).call(this,u),d(N,this,ft).call(this,u,n);const p=d(N,this,mt).call(this,n,t,a,i);return u.appendChild(p),o.appendChild(u),n.widgetIsFirstChild?d(N,this,or).call(this,o,l):d(N,this,ir).call(this,o,l),o}catch(i){return this.widgetEventLogger.logEvent("error",`An exception occurred when rendering a widget: ${i.message}`),null}}function mt(e,t,n,i){const a=document.createElement("div");return a.className="sezzle-button-text",a.style.fontSize="14px",a.style.lineHeight="18px",d(N,this,je).call(this,e.textStyle)||d(N,this,tr).call(this,a,e),d(N,this,ft).call(this,a,e),d(N,this,nr).call(this,a,e),d(N,this,Gn).call(this,e,n).forEach(l=>{switch(l){case"sup":{const o=document.createElement("sup");o.textContent="1",a.appendChild(o);break}case"price":{const o=document.createElement("span");o.className=`sezzle-payment-amount sezzle-button-text sezzleindex-${t}`;const u=this.priceProcessor.getFormattedWidgetPrice(i,n.isLongTermPaymentEligible,n.is5PayEligible),p=document.createTextNode(u);o.appendChild(p),a.appendChild(o);break}case"logo":{const o=document.createElement("img");o.className=`sezzle-logo ${e.imageClassName}`,o.src=e.imageURL,o.alt="Sezzle",o.width=72,o.height=18,o.style.height="18px",o.style.width="72px",a.appendChild(o),d(N,this,je).call(this,e.logoStyle)||d(N,this,rr).call(this,o,e);break}case"info":{const o=document.createElement("div");o.ariaLabel=`${this.language.translations.clickToLearnMore} Sezzle`,o.name=`${this.language.translations.clickToLearnMore} Sezzle`,o.className="sezzle-info-icon sezzle-modal-link",o.innerHTML="&#9432",o.style=`font-size: ${e.textStyle.fontSize}px`,a.appendChild(o);break}case"afterpay-logo":{const o=document.createElement("img");o.className="sezzle-ap-logo ap-modal-info-link no-sezzle-info",o.src="https://media.sezzle.com/sezzle-credit-website-assets/ap-badge-black-on-mint.svg",o.alt=`${this.language.translations.clickToLearnMore} Afterpay`,a.appendChild(o);break}case"klarna-logo":{const o=document.createElement("img");o.className="sezzle-klarna-logo klarna-modal-info-link no-sezzle-info",o.src="https://x.klarnacdn.net/payment-method/assets/badges/generic/klarna.svg",o.alt=`${this.language.translations.clickToLearnMore} Klarna`,a.appendChild(o);break}case"line-break":{const o=document.createElement("br");a.appendChild(o);break}case"min-price":{const o=document.createElement("span");o.className=`sezzle-payment-amount sezzle-button-text sezzleindex-${t}`;const u=this.priceProcessor.getFormattedMinPrice(i),p=document.createTextNode(u);o.appendChild(p),a.appendChild(o);break}case"timer":{const o=document.createElement("span");o.className="sezzle-giveaway-timer",o.textContent=this.giveaway.getTimeLeftInDay(),a.appendChild(o),setInterval(()=>{o.textContent=this.giveaway.getTimeLeftInDay()},1e3);break}case"award":{const o=document.createElement("span");o.className="sezzle-giveaway-award",o.textContent=`$${document.giveawayConfig.award}`,a.appendChild(o);break}default:{const o=document.createTextNode(l);a.appendChild(o);break}}}),a}function Gn(e,t){let n,i;if(t.isLongTermPaymentEligible)n=this.language.translations.longTerm,i="longTerm";else if(document.giveawayConfig)n=this.language.translations.giveaway,i="giveaway";else if(document.sezzlePromotion){n=this.language.translations.promo,i="promo";const l=this.promotion.getPromotionString();n=n.replace("{promotext}",l)}else(this.widgetConfig.apDualInstall||this.widgetConfig.klarnaDualInstall)&&t.is5PayEligible?(n=this.language.translations.dualInstall,i="dualInstall"):(n=this.language.translations.widget,i="widget");if(t.isPriceLessThanMinPrice){const l=this.language.translations.thresholdPrice;n=n.replace("{thresholdPriceText}",l)}else{if(this.widgetConfig.apDualInstall){const l=this.language.translations.apDualInstall;n=n.replace("{apDualInstallText}",l)}if(this.widgetConfig.klarnaDualInstall){const l=this.language.translations.klarnaDualInstall;n=n.replace("{klarnaDualInstallText}",l)}}const a=t.is5PayEligible?5:4;return n=n.replace("{numberOfPayments}",a),n=n.replace("{apDualInstallText}",""),n=n.replace("{klarnaDualInstallText}",""),n=n.replace("{thresholdPriceText}",""),this.widgetEventLogger.setWidgetContext(i,a),n.split("%%")}function Qn(e){if(!e)return"left";const t=window.getComputedStyle(e).textAlign;return t==="start"||t==="justify"?"left":t==="end"?"right":t}function gt(e){return e.className+=` sezzle-${this.widgetConfig.merchantID}`,e}function er(e,t){Object.keys(t.containerStyle).forEach(n=>{e.style[n]=t.containerStyle[n]})}function ft(e,t){let n="";if(typeof matchMedia<"u"&&t.alignmentSwitchMinWidth&&t.alignmentSwitchType){const a=`(min-width: ${t.alignmentSwitchMinWidth}px)`;window.matchMedia(a).matches||(n=t.alignmentSwitchType)}const i=n||t.alignment||"auto";e.className+=` sezzle-${i}`}function tr(e,t){Object.keys(t.textStyle).forEach(n=>{e.style[n]=t.textStyle[n]})}function nr(e,t){switch(t.theme){case"dark":case"white-flat":e.className+=" szl-dark";break;default:e.className+=" szl-light";break}}function rr(e,t){Object.keys(t.logoStyle).forEach(n=>{e.style[n]=t.logoStyle[n]})}function ir(e,t){t.parentNode.insertBefore(e,t.nextSibling)}function or(e,t){for(t.parentElement.insertBefore(e,t);e.previousSibling;)e.parentElement.insertBefore(e,e.previousSibling)}function ar(e){Be.isEventListenerAdded||!Array.isArray(e)||e.length==0||(e.forEach(t=>{const n=document.querySelectorAll(t.element);n.length>0&&n.forEach(i=>{i.addEventListener(t.eventType,()=>{const a=document.querySelector("[data-sezzleindex]");a&&a.removeAttribute("data-sezzleindex");const l=document.querySelector(".sezzle-shopify-info-button");l&&l.remove();const o=Me.NewWidgetEventLogger(document.sezzleConfig.merchantID);new vt(Vn(document.sezzleConfig),o).init()})})}),Be.isEventListenerAdded=!0)}ne(He,"isEventListenerAdded",!1);var sr=" or %%afterpay-logo%%",lr="Click to learn more about",cr="Buy now, pay later with %%logo%%{apDualInstallText}{klarnaDualInstallText}{thresholdPriceText}",ur="or {numberOfPayments} payments of %%price%% with %%logo%%{thresholdPriceText} within %%timer%% to win %%award%% %%info%%",dr=" or %%klarna-logo%%",hr="or monthly payments as low as %%price%% with %%logo%% %%info%%",mr="or {numberOfPayments} payments of %%price%% with %%logo%%{thresholdPriceText}{promotext} %%info%%",gr="Sezzle Information",fr=" for orders over %%min-price%%",pr="or {numberOfPayments} payments of %%price%% with %%logo%%{apDualInstallText}{klarnaDualInstallText}{thresholdPriceText} %%info%%",yr={apDualInstall:sr,clickToLearnMore:lr,dualInstall:cr,giveaway:ur,klarnaDualInstall:dr,longTerm:hr,promo:mr,sezzleInformation:gr,thresholdPrice:fr,widget:pr},vr=" ou %%afterpay-logo%%",zr="Cliquez pour en savoir plus sur",br="Achetez maintenant, payez plus tard avec %%logo%%{apDualInstallText}{klarnaDualInstallText}{thresholdPriceText}",wr="ou {numberOfPayments} paiements de %%price%% avec %%logo%%{thresholdPriceText} dans les %%timer%% pour gagner %%award%% %%info%%",Cr=" ou %%klarna-logo%%",Sr="ou des paiements mensuels aussi bas que %%price%% avec %%logo%% %%info%%",Tr="ou {numberOfPayments} paiements de %%price%% avec %%logo%%{thresholdPriceText}{promotext} %%info%%",Er="Informations Sezzle",Pr=" pour les achats de plus de %%min-price%%",_r="ou {numberOfPayments} paiements de %%price%% avec %%logo%%{apDualInstallText}{klarnaDualInstallText}{thresholdPriceText} %%info%%",$r={apDualInstall:vr,clickToLearnMore:zr,dualInstall:br,giveaway:wr,klarnaDualInstall:Cr,longTerm:Sr,promo:Tr,sezzleInformation:Er,thresholdPrice:Pr,widget:_r},Lr=" o %%afterpay-logo%%",Mr="Haga clic para obtener más información sobre",kr="Compra ahora, paga después con %%logo%%{apDualInstallText}{klarnaDualInstallText}{thresholdPriceText}",Dr="o {numberOfPayments} pagos de %%price%% con %%logo%%{thresholdPriceText} dentro de %%timer%% para ganar %%award%% %%info%%",xr=" o %%klarna-logo%%",Or="o pagos mensuales tan bajos como %%price%% con %%logo%% %%info%%",Ir="o {numberOfPayments} pagos de %%price%% con %%logo%%{thresholdPriceText}{promotext} %%info%%",Nr="Información de Sezzle",Ar=" por compras superiores a %%min-price%%",Wr="o {numberOfPayments} pagos de %%price%% con %%logo%%{apDualInstallText}{klarnaDualInstallText}{thresholdPriceText} %%info%%",Fr={apDualInstall:Lr,clickToLearnMore:Mr,dualInstall:kr,giveaway:Dr,klarnaDualInstall:xr,longTerm:Or,promo:Ir,sezzleInformation:Nr,thresholdPrice:Ar,widget:Wr},pt=new WeakSet,qr=class{constructor(){ee(this,pt),this.defaultLanguage="en",this.translationsMap={en:yr,fr:$r,es:Fr},this.translations=null,this.language=null}getTranslations(){return this.translationsMap[this.language]}setLanguage(e){let t;typeof e=="function"?t=e():t=e,(!t||typeof t!="string")&&(t=document.querySelector("html").lang);const n=t.substring(0,2).toLowerCase();d(pt,this,Ur).call(this,n)?this.language=n:this.language=this.defaultLanguage,this.translations=this.getTranslations()}getLanguage(){return this.language||this.defaultLanguage}};function Ur(e){let t=0;return Object.getOwnPropertyNames(this.translationsMap).forEach(n=>{n===e&&t++}),t>0}var yt=new WeakSet,vt=class{constructor(e,t){ee(this,yt),this.basicWidgetConfiguration=e,this.widgetEventLogger=t,this.competitor=new De(this.widgetEventLogger)}async init(){try{this.widgetEventLogger.logEvent("request");const e=B.getCookie("shopify_pay_redirect");e&&this.widgetEventLogger.logEvent(`shopify-pay-redirect-${e}`);const t=new qr,n=new Zt(this.basicWidgetConfiguration,t,this.widgetEventLogger);await n.setAPModalHTML(),await n.setKlarnaModalHTML();const i=n.getSezzleConfig;i.configGroups.length>0&&await d(yt,this,Br).call(this,i,t)}catch(e){this.widgetEventLogger.logEvent("error",e.message)}this.widgetEventLogger.forceSendEvents()}};async function Br(e,t){new He(e,this.widgetEventLogger,t).initializeRendering(),B.isWidgetDuplicateFound()&&this.widgetEventLogger.logEvent("duplicate-widget"),this.competitor.logCompetitorEvents()}var Hr=dt();function jr(){const e=Hr(document.sezzleConfig),t=e?.merchantID,n=Me.NewWidgetEventLogger(t||"");if(!Rr(t)){if(!e){n.logEvent("request"),n.logEvent("error","No sezzleConfig is found in the document. Check that at least a default or a custom override config is presented for the merchant"),n.forceSendEvents();return}t||n.logEvent("warning","Merchant UUID is not provided"),B.waitForBodyToBeReady().then(()=>{new vt(e,n).init()})}}function Rr(e){return e?(document.sezzleJSMerchantUUIDs||(document.sezzleJSMerchantUUIDs=[]),document.sezzleJSMerchantUUIDs.includes(e)?!0:(document.sezzleJSMerchantUUIDs.push(e),!1)):!1}jr()})();
