1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2496],{62496:(e,t,n)=>{function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach(function(t){!function(e,t,n){var r;(t="symbol"==typeof(r=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"))?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||c(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){if(e){if("string"==typeof e)return r(e,t);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}n.d(t,{DodoPayments:()=>x});var s={test:"https://test.checkout.dodopayments.com",live:"https://checkout.dodopayments.com"},d="1.1.0",u={test:"https://sdk-v2.custom.hs.dodopayments.com",live:"https://sdk-v2.hs.dodopayments.com"},h={test:"https://api.custom.hs.dodopayments.com",live:"https://api.hs.dodopayments.com"},p=new Set(["checkout.opened","checkout.payment_page_opened","checkout.customer_details_submitted","checkout.closed","checkout.error","checkout.redirect","checkout.resize","checkout.breakdown","checkout.link_expired","checkout.status","checkout.redirect_requested","checkout.pay_button_clicked","checkout.keys_provided","checkout.form_ready"]);function m(e,t){return!!document.querySelector('link[rel="'.concat(e,'"][href="').concat(t,'"]'))}function f(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!m("preconnect",e)&&document.head){var n=document.createElement("link");n.rel="preconnect",n.href=e,t&&(n.crossOrigin="anonymous"),document.head.appendChild(n)}}function y(e){if(!m("dns-prefetch",e)&&document.head){var t=document.createElement("link");t.rel="dns-prefetch",t.href=e,document.head.appendChild(t)}}function v(e){return"string"==typeof e&&e.trim()?e.trim():void 0}function w(e){if(!e||"object"!==l(e))return{};var t={},n=null!=(i=v(e.merchantName))?i:v(e.merchant_name);n&&(t.merchantName=n);var r=null!=(a=v(e.applePayButtonType))?a:v(e.apple_pay_button_type);r&&(t.applePayButtonType=r);var o=null!=(s=e.applePayLineItems)?s:e.apple_pay_line_items;if(Array.isArray(o)&&o.length>0){var i,a,s,d,u,h=[],p=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=c(e))){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}(o);try{for(p.s();!(u=p.n()).done;){var m=u.value;if(m&&"object"===l(m)){var f=v(m.label);if(f){var y=v(m.amount);h.push(y?{label:f,amount:y}:{label:f})}}}}catch(e){p.e(e)}finally{p.f()}h.length===o.length&&(t.applePayLineItems=h)}var w=null!=(d=e.applePayRecurring)?d:e.apple_pay_recurring;if(w&&"object"===l(w)){var g,k=v(w.label),b=null!=(g=v(w.managementUrl))?g:v(w.management_url);if(k&&b){var E,I,P,R={label:k,managementUrl:b},_=v(w.description);_&&(R.description=_);var T=null!=(E=v(w.billingAgreement))?E:v(w.billing_agreement);T&&(R.billingAgreement=T);var D=null!=(I=v(w.intervalUnit))?I:v(w.interval_unit);D&&(R.intervalUnit=D);var U=null!=(P=w.intervalCount)?P:w.interval_count;"number"==typeof U&&Number.isFinite(U)&&U>0&&(R.intervalCount=U),t.applePayRecurring=R}}return t}var g={};function k(e){if(!e.mode)throw Error("Checkout mode is required");if(!Object.keys(s).includes(e.mode))throw Error("Invalid checkout mode");if(e.displayType&&!["overlay","inline"].includes(e.displayType))throw Error("Invalid display type. Must be 'overlay' or 'inline'")}function b(e){try{var t=new URL(e);if("https:"!==t.protocol&&"http:"!==t.protocol)throw Error("Invalid redirect URL protocol");if(e.length>2048)throw Error("Redirect URL exceeds maximum length")}catch(e){throw Error("Invalid redirect URL format")}}var E=null;function I(){var e;if(null!=(e=E)&&e.wrapperDiv){var t=E.walletElementContainer,n=t&&"hidden"
1!==t.style.visibility?t.offsetHeight||44:0;E.wrapperDiv.style.height="".concat(E.lastCheckoutIframeHeight+n,"px")}}function P(e){if(E&&e.origin===E.allowedOrigin)try{var t=e.data;if(!t||!t.event_type)return;if(!p.has(t.event_type))return void console.warn("Received message with invalid event_type: ".concat(t.event_type));if(R(t.event_type,t.data||{}),"checkout.closed"===t.event_type&&setTimeout(function(){return _(!1)},100),"checkout.redirect"===t.event_type){var n,r=null==(n=t.data)||null==(n=n.message)?void 0:n.redirect_to;if(r)try{b(r),window.location.href=r}catch(e){console.error("Invalid redirect URL:",e),R("checkout.error",{message:"Invalid redirect URL"})}}if(t.event_type,"checkout.keys_provided"===t.event_type&&"inline"===E.config.displayType){var o,a,l=null==(o=t.data)?void 0:o.message;if(!l||"string"!=typeof l.publishable_key||"string"!=typeof l.client_secret_key)return console.error("Invalid keys_provided payload:",l),void R("checkout.error",{message:"Wallet initialization failed - invalid key data"});(null!=(a=E.dodoScriptPromise)?a:Promise.resolve()).then(function(){try{!function(e,t,n,r){if(!E)throw Error("Checkout not initialized");var o=window.DodoCheckoutWebSDK;if(!o)throw Error("Dodo SDK not loaded");var a,l,c,s,p=E.config.mode,m=h[p],f="".concat(u[p],"/").concat(d);try{var y=o.loadDodoPayments(e,{apiUrl:m,baseUrl:f});E.dodoInstance=y;var v=(l=w(r),c=i(i({},g),l),s={},c.merchantName&&(s.merchantName=c.merchantName),c.applePayButtonType&&(s.applePayButtonType=c.applePayButtonType),null!=(a=c.applePayLineItems)&&a.length&&(s.applePayLineItems=c.applePayLineItems),c.applePayRecurring&&(s.applePayRecurring=c.applePayRecurring),s),k=y.elements(i({clientSecret:t,appearance:{theme:"default"},walletReturnUrl:n||window.location.href,wallets:{applePay:"auto",googlePay:"never"},allowedPaymentMethods:["apple_pay"],displaySavedPaymentMethods:!1},v)).create("wallet");E.walletElement=k,k.on("paymentresult",function(e){if(e.paymentIntent){R("checkout.status",{status:e.paymentIntent.status,paymentIntent:e.paymentIntent});var t=n||e.paymentIntent.return_url;if(t){try{b(t)}catch(e){return console.error("Invalid wallet return URL:",t),void R("checkout.error",{message:"Invalid wallet return URL"})}try{window.top.location.replace(t)}catch(e){window.location.replace(t)}}}else{var r,o=null==(r=e.error)?void 0:r.code;if(o&&["apple_pay_cancelled","apple_pay_validation_failed"].includes(o))return;e.error&&(console.error("Wallet payment error:",e.error),R("checkout.error",{message:"Wallet payment failed"}))}});var P=E.walletElementContainer;if(P){if(k.on("ready",function(){var e;if(null!=(e=E)&&e.walletElementContainer){var t=E.walletElementContainer;t.style.visibility="visible",t.style.height="auto",t.style.overflow="visible"}I()}),k.on("loaderror",function(){var e;if(null!=(e=E)&&e.walletElementContainer){var t=E.walletElementContainer;t.style.visibility="hidden",t.style.height="0",t.style.overflow="hidden"}I()}),"undefined"!=typeof ResizeObserver){var _=new ResizeObserver(function(){return I()});_.observe(P),E.walletResizeObserver=_}k.mount("#".concat(P.id))}}catch(e){throw console.error("Failed to initialize Dodo wallet:",e),E.walletElementContainer&&(E.walletElementContainer.style.display="none"),e}}(l.publishable_key,l.client_secret_key,l.return_url,l.apple_pay_branding)}catch(e){console.error("Error initializing Dodo wallet:",e),R("checkout.error",{message:"Failed to initialize wallet"})}},function(){})}}catch(e){console.error("Error processing checkout message:",e),R("checkout.error",{message:"Failed to process message"})}}function R(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(E)if(p.has(e)){var r=i(i({},n),{},{products:E.currentProducts,timestamp:Date.now()});if(E.config.onEvent)try{E.config.onEvent({event_type:e,data:r})}catch(t){console.error("Error in onEvent handler for ".concat(e,":"),t)}null!=(t=E.eventListeners[e])&&t.length&&E.eventListeners[e].forEach(function(t){try{t(r)}catch(t){console.error("Error in ".concat(e," event handler:"),t)}})}else console.warn("Attempted to emit invalid event type: ".concat(e))}function _(){var e,t,n,r=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(null!=(e=E)&&e.container||null!=(t=E)&&t.iframe||null!=(n=E)&&n.wrapperDiv)try{if(E.container?(E.container.remove(),E.container=null):E.wrapperDiv?
1(E.wrapperDiv.remove(),E.wrapperDiv=null):E.iframe&&E.iframe.remove(),E.iframe=null,E.currentProducts=[],E.iframeResizerInstance&&E.iframeResizerInstance.length>0&&(E.iframeResizerInstance.forEach(function(e){e.iFrameResizer.close()}),E.iframeResizerInstance=null),E.walletResizeObserver&&(E.walletResizeObserver.disconnect(),E.walletResizeObserver=null),E.walletElement){try{E.walletElement.destroy()}catch(e){console.error("Error destroying wallet element:",e)}E.walletElement=null}E.walletElementContainer&&(E.walletElementContainer.remove(),E.walletElementContainer=null),E.dodoInstance=null,E.dodoScriptPromise=null,E.lastCheckoutIframeHeight=0,document.body.style.overflow="",document.body.style.contain="",r&&R("checkout.closed",{message:"Checkout closed manually"})}catch(e){throw console.error("Error closing checkout:",e),R("checkout.error",{message:"Failed to close checkout"}),e}}var T="[dodo-iframe-resize]",D="__dodoIframeResize__",U=null;function L(e,t){var n=Date.now(),r=function(){void 0!==window.DodoCheckoutWebSDK?e():Date.now()-n>1e4?t(Error("Dodo SDK script loaded but window.DodoCheckoutWebSDK not available")):setTimeout(r,50)};r()}function C(e,t,n){t&&Object.entries(t).forEach(function(t){var r=a(t,2),o=r[0],i=r[1];i&&e.searchParams.append("".concat(n,"_").concat(o),String(i))})}function A(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"overlay",r=arguments.length>2?arguments[2]:void 0;if(!e||"string"!=typeof e)throw Error("URL must be a non-empty string");if(e.trim()!==e)throw Error("URL cannot have leading or trailing whitespace");try{t=new URL(e.trim())}catch(e){throw Error("Invalid URL format")}if("https:"!==t.protocol&&"http:"!==t.protocol)throw Error("URL must use HTTP or HTTPS protocol");var o=["test.checkout.dodopayments.com","checkout.dodopayments.com"];if(!o.includes(t.hostname))throw Error("URL must be a Dodo Payments checkout domain. Expected: ".concat(o.join(" or ")));var i="inline"===n?"inline":"overlay",a=t.pathname.split("/").filter(function(e){return e.length>0});if(0===a.length)throw Error("URL must contain a session ID or payment link ID");
1if("session"===a[0]){if(2!==a.length)throw Error("Session URL must have exactly 2 path segments: /session/sessionId");var l=a[1];if(!l.startsWith("cks_"))throw Error("Session ID must start with 'cks_' prefix");if(25!==l.length)throw Error("Session ID must be exactly 25 characters including 'cks_' prefix");if(!/^cks_[a-zA-Z0-9_-]{21}$/.test(l))throw Error("Session ID contains invalid characters. Only alphanumeric, underscore, and dash allowed after 'cks_' prefix");t.pathname="/".concat(i,"/session/").concat(l)}else if(1===a.length){var c=a[0];if(8!==c.length)throw Error("Payment link ID must be exactly 8 characters");if(!/^[a-zA-Z0-9_-]{8}$/.test(c))throw Error("Payment link ID contains invalid characters. Only alphanumeric, underscore, and dash allowed");t.pathname="/".concat(i,"/").concat(c)}else{if("overlay"!==a[0]&&"inline"!==a[0])throw Error("Invalid URL format. Expected formats:\n - /session/cks_sessionId (25 chars total)\n - /paymentLinkId (8 chars)\n - /overlay/id or /inline/id (already processed)\n \n Got: /".concat(a.join("/")));var s=a[0];if(2===a.length){var d=a[1];if(8!==d.length||!/^[a-zA-Z0-9_-]{8}$/.test(d))throw Error("Invalid payment link ID in ".concat(s," URL"))}else{if(3!==a.length||"session"!==a[1])throw Error("".concat(s," URL must have format: /").concat(s,"/paymentLinkId or /").concat(s,"/session/sessionId"));var u=a[2];if(!u.startsWith("cks_")||25!==u.length||!/^cks_[a-zA-Z0-9_-]{21}$/.test(u))throw Error("Invalid session ID in ".concat(s," URL"))}}if(r){if(void 0!==r.showTimer&&t.searchParams.append("showTimer",String(r.showTimer)),void 0!==r.showSecurityBadge&&t.searchParams.append("showSecurityBadge",String(r.showSecurityBadge)),void 0!==r.manualRedirect&&t.searchParams.append("manualRedirect",String(r.manualRedirect)),void 0!==r.themeConfig){console.warn("â ï¸ DEPRECATION WARNING: 'themeConfig' option is deprecated and will be removed in v2.0.0. Please configure theme in your checkout session instead.");var h=r.themeConfig;C(t,h.light,"theme"),C(t,h.dark,"theme_dark"),h.radius&&t.searchParams.append("theme_radius",h.radius)}void 0!==r.payButtonText&&t.searchParams.append("payButtonText",r.payButtonText),void 0!==r.fontSize&&t.searchParams.append("fontSize",r.fontSize),void 0!==r.fontWeight&&t.searchParams.append("fontWeight",r.fontWeight),"inline"===n&&!0===r.applePayOnly&&t.searchParams.append("headless","true")}var p=t.toString();if(!p.includes("/".concat(i,"/")))throw Error("Internal error: Failed to build overlay URL");return p}var x={Initialize:function(e){if(k(e),e.theme&&console.warn("â ï¸ DEPRECATION WARNING: 'theme' option is deprecated and will be removed in v2.0.0. Please configure theme in your checkout session instead."),e.linkType&&"session"!==e.linkType&&console.warn("â ï¸ DEPRECATION WARNING: 'linkType' option with value '"+e.linkType+"' is deprecated and will be removed in v2.0.0. Please use 'session' linkType with checkoutUrl instead."),U){if(!U)throw Error("Checkout not initialized");k(e),e.theme&&console.warn("â ï¸ DEPRECATION WARNING: 'theme' option is deprecated and will be removed in v2.0.0. Please configure theme in your checkout session instead."),e.linkType&&"session"!==e.linkType&&console.warn("â ï¸ DEPRECATION WARNING: 'linkType' option with value '"+e.linkType+"' is deprecated and will be removed in v2.0.0. Please use 'session' linkType with checkoutUrl instead.");var t=e.onEvent||U.config.onEvent;U.config=i(i({linkType:"session"},e),{},{onEvent:t}),U.baseUrl!==s[e.mode]&&(U.baseUrl=s[e.mode],U.allowedOrigin=new URL(U.baseUrl).origin)}else{var n=s[e.mode],r=new URL(n).origin;E=U={iframe:null,container:null,config:i({linkType:"session"},e),currentProducts:[],baseUrl:n,allowedOrigin:r,iframeId:"dodo-checkout-iframe",eventListeners:{},dodoInstance:null,walletElement:null,walletElementContainer:null,walletResizeObserver:null,lastCheckoutIframeHeight:0,dodoScriptPromise:null,wrapperDiv:null,iframeResizerInstance:null},window.addEventListener("message",P),function(e){var t=e.mode,n=e.displayType;try{var r=new URL(s[t]);if(f(r.origin),y(r.origin),"inline"===n){var o=new URL(u[t]),i=new URL(h[t]);f(o.origin,!1),y(o.origin),f(i.origin),y(i.origin)}}catch(e){console.warn("Failed to inject resource hints:",e)}}
1({mode:e.mode,displayType:e.displayType}),"inline"===e.displayType&&function(e){var t="".concat(u[e],"/").concat(d,"/sdk.js");if(!m("preload",t)&&!document.querySelector('script[src="'.concat(t,'"]'))&&document.head){var n=document.createElement("link");n.rel="preload",n.as="script",n.href=t,document.head.appendChild(n)}}(e.mode)}},Checkout:{open:function(e){!function(e){var t,n=e.products,r=e.paymentLink,o=e.queryParams,i=e.redirectUrl,c=e.checkoutUrl,s=e.elementId,h=e.options;if(n&&n.length>0&&console.warn("â ï¸ DEPRECATION WARNING: 'products' option is deprecated and will be removed in v2.0.0. Please use 'checkoutUrl' with session linkType instead."),r&&console.warn("â ï¸ DEPRECATION WARNING: 'paymentLink' option is deprecated and will be removed in v2.0.0. Please use 'checkoutUrl' with session linkType instead."),o&&console.warn("â ï¸ DEPRECATION WARNING: 'queryParams' option is deprecated and will be removed in v2.0.0. Please include query parameters in your 'checkoutUrl' instead."),i&&console.warn("â ï¸ DEPRECATION WARNING: 'redirectUrl' option is deprecated and will be removed in v2.0.0. Please include redirect URL in your checkout session configuration instead."),r&&(!function(e){try{var t=new URL(e);if("https:"!==t.protocol&&"http:"!==t.protocol)throw Error("Invalid payment URL protocol");if(e.length>2048)throw Error("Payment URL exceeds maximum length")}catch(e){throw Error("Invalid payment URL format")}}(r),t=r.slice(-8)),!U)throw Error("Checkout not initialized");if(function(e,t){if("inline"===t&&!e.elementId)throw Error("elementId is required for inline checkout display type");if(e.elementId&&"string"!=typeof e.elementId)throw Error("elementId must be a string")}(e,U.config.displayType),U.iframe||U.container)console.warn("Checkout is already open");else{if(g=w(h),i&&b(i),c&&function(e){try{var t=new URL(e);if("https:"!==t.protocol&&"http:"!==t.protocol)throw Error("Invalid checkout URL protocol");if(e.length>2048)throw Error("Checkout URL exceeds maximum length");if("test.checkout.dodopayments.com"===t.hostname||"checkout.dodopayments.com"===t.hostname){var n=t.pathname.split("/").filter(function(e){return e.length>0});if(0===n.length)throw Error("Checkout URL must contain a session ID or payment link ID");if("session"===n[0]){if(2!==n.length)throw Error("Session URL must have format: /session/cks_sessionId");var r=n[1];if(!r.startsWith("cks_"))throw Error("Session ID must start with 'cks_' prefix");if(25!==r.length)throw Error("Session ID must be exactly 25 characters including 'cks_' prefix");if(!/^cks_[a-zA-Z0-9_-]+$/.test(r))throw Error("Session ID contains invalid characters")}else if(1===n.length){var o=n[0];if(8!==o.length)throw Error("Payment link ID must be exactly 8 characters");if(!/^[a-zA-Z0-9_-]+$/.test(o))throw Error("Payment link ID contains invalid characters")}else{if("overlay"!==n[0])throw Error("Invalid checkout URL format. Expected /session/cks_id or /paymentLinkId");if(2===n.length){var i=n[1];if(8!==i.length||!/^[a-zA-Z0-9_-]{8}$/.test(i))throw Error("Invalid payment link ID in overlay URL")}else{if(3!==n.length||"session"!==n[1])throw Error("Invalid overlay URL format. Expected /overlay/paymentLinkId or /overlay/session/sessionId");var a=n[2];if(!a.startsWith("cks_")||25!==a.length||!/^cks_[a-zA-Z0-9_-]{21}$/.test(a))throw Error("Invalid session ID in overlay URL")}}}}catch(e){if(e instanceof Error)throw e;throw Error("Invalid checkout URL format")}}(c),"session"===U.config.linkType){if(!c)throw Error("checkoutUrl is required for session checkout")}else if("static"===U.config.linkType){if(console.warn("â ï¸ DEPRECATION WARNING: 'static' linkType is deprecated and will be removed in v2.0.0. Please migrate to 'session' linkType with checkoutUrl."),null==n||!n.length)throw Error("Products are required for static checkout");if(n.length>1)throw Error("Only one product is supported for checkout at the moment");var p=n[0].productId;if(!p||"string"!=typeof p)throw Error("Invalid product ID");if(p.length>50)throw Error("Product ID exceeds maximum length");if(!/^[a-zA-Z0-9_-]+$/.test(p))throw Error("Product ID contains invali
1d characters")}else if("dynamic"===U.config.linkType&&(console.warn("â ï¸ DEPRECATION WARNING: 'dynamic' linkType is deprecated and will be removed in v2.0.0. Please migrate to 'session' linkType with checkoutUrl."),!t))throw Error("Payment link ID is required for dynamic checkout");t&&function(e){if(!e||"string"!=typeof e)throw Error("Invalid payment link ID");if(e.length>10)throw Error("Payment link ID exceeds maximum length");if(!/^[a-zA-Z0-9_-]+$/.test(e))throw Error("Payment link ID contains invalid characters")}(t),U.currentProducts=n||[];try{!function(e,t,n,r,o,i,c){if(U){var s,h=U.config.displayType||"overlay";if("session"===U.config.linkType&&o){var p=A(o,h,c);s=new URL(p)}else if("static"===U.config.linkType&&null!=e&&e[0])s=function(e,t,n){if(!U)throw Error("Checkout not initialized");if(!U.config.displayType)throw Error("Display type not specified");var r="inline"===U.config.displayType?"inline":"overlay",o=new URL("".concat(U.baseUrl,"/").concat(r,"/buy/").concat(e.productId),window.location.origin);return t&&Object.entries(t).forEach(function(e){var t=a(e,2),n=t[0],r=t[1];o.searchParams.append(n,r)}),n&&o.searchParams.append("redirect_url",n),o.searchParams.append("quantity",e.quantity.toString()),U.config.theme&&console.warn("â ï¸ DEPRECATION WARNING: Using 'theme' in static checkout is deprecated and will be removed in v2.0.0. Please configure theme in your checkout session instead."),o.searchParams.append("theme",U.config.theme||"light"),o}(e[0],n,r);else{if("dynamic"!==U.config.linkType||!t)throw Error("Invalid checkout configuration");s=function(e){if(!U)throw Error("Checkout not initialized");if(!U.config.displayType)throw Error("Display type not specified");var t="inline"===U.config.displayType?"inline":"overlay",n=new URL("".concat(U.baseUrl,"/").concat(t,"/").concat(e),window.location.origin);return U.config.theme&&console.warn("â ï¸ DEPRECATION WARNING: Using 'theme' in dynamic checkout is deprecated and will be removed in v2.0.0. Please configure theme in your checkout session instead."),n.searchParams.append("theme",U.config.theme||"light"),n}(t)}var m=document.createElement("iframe");if(m.id=U.iframeId,m.src=s.toString(),m.setAttribute("allowtransparency","true"),m.setAttribute("frameBorder","0"),m.allow="payment keyboard-map *",m.setAttribute("sandbox","allow-same-origin allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox"),m.setAttribute("referrerpolicy","strict-origin-when-cross-origin"),m.setAttribute("fetchpriority","high"),"inline"===h){var f=i?document.getElementById(i):null;if(!f)throw Error('Target element with ID "'.concat(i,'" not found for inline checkout.'));var y=function(){if(!U)return Promise.reject(Error("Checkout not initialized"));var e="".concat(u[U.config.mode],"/").concat(d,"/sdk.js"),t=document.querySelector('script[src="'.concat(e,'"]'));if(t)return new Promise(function(e,n){t.addEventListener("error",function(){return n(Error("Failed to load Dodo SDK script"))}),L(e,n)});if(!document.head)return Promise.reject(Error("Document head not found, cannot inject Dodo SDK script"));var n=document.createElement("script");return n.async=!0,n.src=e,new Promise(function(e,t){n.onload=function(){return L(e,t)},n.onerror=function(){t(Error("Failed to load Dodo SDK script"))},document.head.appendChild(n)})}();U.dodoScriptPromise=y,y.catch(function(e){var t;console.error("Failed to inject Dodo SDK:",e),null!=(t=U)&&t.walletElementContainer&&(U.walletElementContainer.style.display="none"),R("checkout.error",{message:"Wallet initialization failed"})});var v=document.createElement("div");v.id="dodo-wallet-".concat(Date.now()),v.style.cssText="\n width: 100%;\n max-width: 500px;\n margin: 0 auto;\n padding-left: 5px;\n padding-right: 5px;\n box-sizing: border-box;\n line-height: 0;\n visibility: hidden; height: 0; overflow: hidden;",U.walletElementContainer=v;var w=document.createElement("div");w.style.cssText="\n display: flex;\n flex-direction: column;\n height: 0px;\n overflow-y: auto;\n transition: height 0.2s ease-out;\n ",U.wrapperDiv=w,m.style.cssText="\n width: 100%;\n height: 100%;\n border: none;\n background: transparent;\n overflow: hidden;\n transition: height 0.2s ease-out;\n ",w.appendChild(v),w.appendChild(m),f.appendChild(w),U.iframe=m,U.container=null;var g={license:"GPLv3",checkOrigin:[U.allowedOrigin],direction:"vertical",log:!1,warningTimeout:15e3,onResized:function(e){U&&(U.lastCheckoutIframeHeight=e.height,I())}};U.iframeResizerInstance=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"undefined"==typeof window?[]:(e=arguments.length>1?arguments[1]:void 0,("string"==typeof e?Array.from(document.querySelectorAll(e)):e instanceof HTMLIFrameElement?[e]:Array.isArray(e)?e:e&&"number"==typeof e.length?Array.from(e):[]).filter(function(e){return e instanceof HTMLIFrameElement})).map(function(e){var n,r,o,i,a,c,s,d,u,h,p,m,f,y,v,w,g,k,b;return e[D]&&e[D].close(),a=null!=(n=t.direction)?n:"vertical",c=null!=(r=t.offsetSize)?r:0,s=null!=(o=t.warningTimeout)?o:5e3,d="vertical"===a||"both"===a,u="horizontal"===a||"both"===a,h=function(){for(var e,n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];
1t.log&&(e=console).log.apply(e,["[iframe-resize:parent]"].concat(r))},p=!1,m=!0,f=NaN,y=NaN,e.style.border=e.style.border||"none",v=function(){if(!e.src)return"*";try{return new URL(e.src,window.location.href).origin}catch(e){return"*"}}(),w=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v,r=e.contentWindow;r&&r.postMessage(t,n)},g=function(){w({kind:T,type:"parent-ping"})},k=function(n){if(n.source===e.contentWindow){var r,o,a,s,v,g,k=n.data;if(k&&"object"===l(k)&&k.kind===T)if(function(e,t,n){if(!1===t)return!0;if(Array.isArray(t))return!!t.includes("*")||t.includes(e);if(""===e||"null"===e)return!n;if(!n)return!0;try{return e===new URL(n,window.location.href).origin}catch(e){return!0}}(n.origin,t.checkOrigin,e.src))switch(k.type){case"child-ready":w({kind:T,type:"parent-ack"}),p||(p=!0,i&&(clearTimeout(i),i=void 0),h("Child connected"),null==(r=t.onReady)||r.call(t,e));break;case"size":i&&(clearTimeout(i),i=void 0),function(n,r){var o=!1;if(d&&Number.isFinite(n)&&n!==f&&(e.style.height="".concat(n,"px"),f=n,o=!0),u&&Number.isFinite(r)&&r!==y&&(e.style.width="".concat(r,"px"),y=r,o=!0),o||m){var i,a=m?"init":"resize";m=!1,null==(i=t.onResized)||i.call(t,{iframe:e,height:n,width:r,type:a})}}(d?(null!=(o=k.height)?o:0)+c:null!=(a=k.height)?a:0,u?(null!=(s=k.width)?s:0)+c:null!=(v=k.width)?v:0);break;case"message":null==(g=t.onMessage)||g.call(t,{iframe:e,message:k.message})}else h("Ignored message from disallowed origin:",n.origin)}},window.addEventListener("message",k),g(),e.addEventListener("load",g),s>0&&(i=setTimeout(function(){p||console.warn("[iframe-resize:parent] No message received from iframe (".concat(e.id||e.src||"unknown",") within ").concat(s,"ms. Is the child script running inside it?"))},s)),b={resize:g,sendMessage:function(e,t){w({kind:T,type:"message",message:e},t)},close:function(){i&&clearTimeout(i),window.removeEventListener("message",k),e.removeEventListener("load",g),delete e[D],delete e.iFrameResizer,h("Closed")}},e[D]={close:b.close},e.iFrameResizer=b,e})}(g,m)}else{var k=document.createElement("div");k.style.cssText="z-index: 6859456; position: fixed; top: 0px; display: block; left: 0px; height: 100%; width: 100%; max-height: 100dvh; backface-visibility: hidden; overflow-y: visible;",k.id="dodo-checkout-outer-div";var b=document.createElement("div");b.style.cssText="min-height: 100%; transition: 0.3s ease-out; position: fixed; top: 0px; left: 0px; width: 100%; height: 100%; background: transparent;",b.id="dodo-checkout-inner-div",m.style.cssText="\n width: 100dvw;\n height: 100dvh;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border: none;\n background: transparent;\n z-index: 1000;\n",b.appendChild(m),k.appendChild(b),document.body.style.overflow="hidden",document.body.style.contain="initial",document.body.appendChild(k),U.iframe=m,U.container=k}}}(n,t,o,i,c,s,h)}catch(e){throw console.error("Error creating checkout:",e),R("checkout.error",{message:"Failed to create checkout"}),e}}}(e)},close:_,isOpen:function(){var e,t;return!!(null!=(e=U)&&e.iframe||null!=(t=U)&&t.container)},buildUrl:A}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.