(()=>{"use strict";var e,t,n={509:(e,t,n)=>{function r(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 o(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{E:()=>i});const i=e=>{const t=function(e){for(var t=1;tvoid 0===t[e]?delete t[e]:{})),t}},738:(e,t,n)=>{n.d(t,{A:()=>S});var r={};n.r(r),n.d(r,{ALL:()=>a,DEBUG:()=>c,ERROR:()=>d,FATAL:()=>f,INFO:()=>l,OFF:()=>p,TRACE:()=>s,WARN:()=>u});const o={create:function(e,t){(new e.Image).src=t}},i={create:function(e,t,n){e.navigator.sendBeacon(t,JSON.stringify(n))}};var a=0,s=0,c=1,l=2,u=3,d=4,f=5,p=6,b=Object.assign||function(e){for(var t=1;t{try{const e=window.navigator.userAgent,t=[/selenium/i,/spider\b/i,/headless/i,/phantomjs/i,/bot\b/i],n=e.toLowerCase();if(!n||""===n.trim())return!0;for(const e of t)if(e.test(n))return!0;return!1}catch(e){return!1}};function g(e){return h()?function(e){return console.info("[Tracking (disabled)] Setting up fake instance with config",e),{event:(t,n,r={},o=l)=>{e.logLevel&&e.logLevel>o||console.info("[Tracking (disabled)]",t,n,r,o,{config:e})},setLogLevel(t){console.info("[Tracking (disabled)] Setting up fake instance logLevel to",t),e.logLevel=t},getConfig:()=>e}}(e):function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;if("object"!==(void 0===e?"undefined":m(e))||!e)throw new TypeError("expected configuration object");var n=e.baseUrl,r=void 0===n?"https://eu.klarnaevt.com":n,h=e.client,g=e.clientVersion,y=e.sessionId,O=e.commonData,w=void 0===O?{}:O,I=e.instanceId,S=void 0===I?Math.floor(9e3*Math.random())+1e3:I,E=e.logLevel||a;if("string"!=typeof h)throw new TypeError("expected `client` in the configuration object");if("string"!=typeof g)throw new TypeError("expected `clientVersion` in the configuration object");if("string"!=typeof y)throw new TypeError("expected `sessionId` in the configuration object");if("number"!=typeof E||Ep)throw new TypeError("invalid `logLevel` ("+E+")");function T(e){return Object.keys(e).sort().map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])})).join("&")}function k(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments[2];if(!(E>(arguments.length>3&&void 0!==arguments[3]?arguments[3]:a))){if(!e)throw new TypeError("expected `name` as first parameter");var c=function(e,t){return""+r+v+h+"/"+g+"/"+e+"?"+T(t)}(e,n=b({},w,n,{iid:S,sid:y,timestamp:n.timestamp||(new Date).getTime()}));try{i.create(t,c,s)}catch(e){s&&(c+="&"+T(s)),o.create(t,c)}}}return{event:k,trace:function(e,t,n){k(e,t,n,s)},debug:function(e,t,n){k(e,t,n,c)},info:function(e,t,n){k(e,t,n,l)},warn:function(e,t,n){k(e,t,n,u)},error:function(e,t,n){k(e,t,n,d)},fatal:function(e,t,n){k(e,t,n,f)},setLogLevel:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a;if("number"!=typeof e||ep)throw new TypeError("invalid `logLevel` ("+e+")");E=e},getConfig:function(){return{baseUrl:r,client:h,clientVersion:g,sessionId:y,instanceId:S,logLevel:E}}}}(e)}function y(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 O(e){for(var t=1;t{a(n,r={},o={})=>e(n,r,o,t);return{configure:({options:t,data:r={},instanceId:o})=>{n=r,I[e]||(I[e]=g(E(O(O({},t),{},{instanceId:o}))))},event:o,trace:i(o,s),debug:i(o,c),info:i(o,l),warn:i(o,u),error:i(o,d),fatal:i(o,f),setLogLevel(n="ALL"){try{const o=n.toUpperCase();t=o in r?r[o]:a,I[e]&&I[e].setLogLevel(t)}catch(e){}},removeInstance(){I[e]&&delete I[e]}}}const E=({client:e="sdk",clientVersion:t="",sessionId:n="",instanceId:r,baseUrl:o=""})=>({client:e,clientVersion:t,environment:"production",sessionId:n,instanceId:r,baseUrl:o})},1331:(e,t,n)=>{n.d(t,{n:()=>a,s:()=>s});var r=n(4074);const o="__klarna_sdk_";let i=function(e){return e.localStorage="localStorage",e.sessionStorage="sessionStorage",e.klarnaIframeStorage="klarnaIframeStorage",e}({});const a=e=>{try{return function(e,t=window){if(null==t||!t.localStorage)throw new Error(`client does not support ${i.localStorage}`);const n=()=>JSON.parse(t.localStorage.getItem(e)||"{}"),r={get:e=>{const t=n(),o=null==t?void 0:t[e];if(!o)return null;const i=null==t?void 0:t.ttl;return i&&i{const i=n();return null===o?delete i[r]:i[r]=o,t.localStorage.setItem(e,JSON.stringify(i))},remove:e=>r.set(e,null),flush:()=>t.localStorage.removeItem(e)};return r}(`${o}${e}`)}catch(e){return void(0,r.G)("Storage type: localStorage not supported")}},s=e=>{try{return function(e,t=window){if(null==t||!t.sessionStorage)throw new Error(`client does not support ${i.sessionStorage}`);const n=()=>JSON.parse(t.sessionStorage.getItem(e)||"{}"),r={get:e=>{const t=n();return(null==t?void 0:t[e])||null},set:(r,o)=>{const i=n();return null===o?delete i[r]:i[r]=o,t.sessionStorage.setItem(e,JSON.stringify(i))},remove:e=>r.set(e,null),flush:()=>t.sessionStorage.removeItem(e)};return r}(`${o}${e}`)}catch(e){return void(0,r.G)("Storage type: sessionStorage not supported")}}},3056:(e,t,n)=>{n.d(t,{A:()=>c});const r={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let o;const i=new Uint8Array(16);function a(){if(!o&&(o="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!o))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return o(i)}const s=[];for(let e=0;e<256;++e)s.push((e+256).toString(16).slice(1));const c=function(e,t,n){if(r.randomUUID&&!t&&!e)return r.randomUUID();const o=(e=e||{}).random||(e.rng||a)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=o[e];return t}return function(e,t=0){return s[e[t+0]]+s[e[t+1]]+s[e[t+2]]+s[e[t+3]]+"-"+s[e[t+4]]+s[e[t+5]]+"-"+s[e[t+6]]+s[e[t+7]]+"-"+s[e[t+8]]+s[e[t+9]]+"-"+s[e[t+10]]+s[e[t+11]]+s[e[t+12]]+s[e[t+13]]+s[e[t+14]]+s[e[t+15]]}(o)}},3223:(e,t,n)=>{n.d(t,{N:()=>l});var r=n(509),o=n(7459),i=n(3398),a=n(4656);const s=({environment:e,locale:t,currency:n})=>{const r=(0,o.Y)({locale:t}),s=(0,a.J)({currency:n,locale:r});return(0,i.L)()?"na"===s?"https://frontend-event-router-us.staging.c2c.klarna.net":`https://frontend-event-router-${s}.staging.c2c.klarna.net`:"playground"===e?`https://${s}.playground.klarnaevt.com`:`https://${s}.klarnaevt.com`};var c=n(738);const l=({config:e,trackerClient:t,extraTrackingData:n,locale:o})=>{const{version:i,environment:a,sessionId:l}=e,u=(0,c.A)(t),d=(0,r.E)({clientId:null==n?void 0:n.clientId,accountId:null==n?void 0:n.accountId,additionalIdentifier:null==n?void 0:n.additionalIdentifier,sdk:"websdk",aId:null==n?void 0:n.aId,merchantUrl:(()=>{try{if("undefined"!=typeof window&&window.location)return window.location.hostname}catch(e){}return""})()});return u.configure({options:{client:t,clientVersion:i,sessionId:l,baseUrl:s({environment:a,locale:o})},data:d}),u}},3308:(e,t,n)=>{n.d(t,{J:()=>o});var r=n(4984);const o=(e,t=r.dI)=>{if(!e)return!1;const[n="",o=""]=e.split("-");if(!o||!n)return!1;const i=o.toUpperCase(),a=n.toLowerCase();return!!t[i]&&t[i].includes(a)}},3398:(e,t,n)=>{n.d(t,{L:()=>r});const r=()=>!1},4074:(e,t,n)=>{n.d(t,{G:()=>o});var r=n(8392);function o(e){const t="string"==typeof e?new Error(e):e;(0,r.Nj)().report(t)}},4367:(e,t,n)=>{n.d(t,{vV:()=>u,JE:()=>d});var r=n(8016),o=n(8334),i=n(5298),a=n(738);const s="Klarna Web SDK:",c="color: black; background-color: #FFB3C7; padding: 2px;",l=(0,r.h)();function u(e,t=!0){console.error(`%c${s} ${e}`,c),t&&(0,a.A)(i.T.websdk).event("metric_merchant_error",{message:e,browserName:l})}function d(e){console.warn(`%c${s} ${e}`,c),(0,o.s)(o.$.MERCHANT_WARN)&&(0,a.A)(i.T.websdk).event("metric_merchant_warn",{message:e})}},4656:(e,t,n)=>{n.d(t,{J:()=>i});const r={USD:"na",CAD:"na",MXN:"na",EUR:"eu",CZK:"eu",DKK:"eu",HUF:"eu",NOK:"eu",PLN:"eu",RON:"eu",SEK:"eu",CHF:"eu",GBP:"eu",AUD:"oc",NZD:"oc",JPY:"oc"};var o=n(6336);const i=({paymentRequestId:e,currency:t,locale:n})=>{if(e&&e.split(":").length>=3){const t=e.split(":")[2].substring(0,2);return"us"===t?"na":"ap"===t?"oc":t}return t?(e=>r[e]||"eu")(t):(0,o.b)(n)}},4984:(e,t,n)=>{n.d(t,{Je:()=>a,Qy:()=>b,RO:()=>l,SQ:()=>s,UT:()=>u,V_:()=>i,dI:()=>o,qh:()=>p,s$:()=>f,sK:()=>c,u_:()=>d});var r=n(6994);const o={AU:["en"],NZ:["en"],AT:["en","de"],BE:["nl","en","fr"],CH:["en","de","it","fr"],CZ:["en","cs"],DE:["de","en"],DK:["da","en"],ES:["es","en"],FI:["fi","sv","en"],FR:["fr","en"],GB:["en"],GR:["en","el"],IE:["en"],IT:["en","it"],NL:["nl","en"],NO:["no","nb","en"],PL:["en","pl"],PT:["en","pt"],RO:["en","ro"],SE:["sv","en"],CA:["en","fr"],MX:["es","en"],US:["en","es"],HU:["en","hu"],SK:["en","sk"]},i=["top-strip-promotion-standard","credit-promotion-standard","credit-promotion-small","info-page-standard","info-page-auto-size"],a={[r.iC.FOOTER_PROMOTION_AUTO_SIZE]:"static",[r.iC.SIDEBAR_PROMOTION_AUTO_SIZE]:"static",[r.iC.CHECKOUT]:"json",[r.iC.CREDIT_PROMOTION_AUTO_SIZE]:"json",[r.iC.CREDIT_PROMOTION_BADGE]:"json",[r.iC.CREDIT_PROMOTION_STANDARD]:"json",[r.iC.CREDIT_PROMOTION_SMALL]:"json",[r.iC.TOP_STRIP_PROMOTION_BADGE]:"json",[r.iC.HOMEPAGE_PROMOTION_TALL]:"json",[r.iC.HOMEPAGE_PROMOTION_WIDE]:"json",[r.iC.HOMEPAGE_PROMOTION_BOX]:"json",[r.iC.TOP_STRIP_PROMOTION_AUTO_SIZE]:"json",[r.iC.TOP_STRIP_PROMOTION_STANDARD]:"json",[r.iC.INFO_PAGE]:"json",[r.iC.CUSTOM_TYPE_0]:"json",[r.iC.CUSTOM_TYPE_1]:"json",[r.iC.CUSTOM_TYPE_1_335_AUTO]:"json",[r.iC.PRODUCT]:"json",[r.iC.HEADER]:"json",[r.iC.CART]:"json",[r.iC.CREDIT_PROMOTION_INLINE]:"html",[r.iC.CUSTOM_TYPE_2_INLINE]:"html",[r.iC.CUSTOM_TYPE_3_INLINE]:"html",[r.iC.CUSTOM_TYPE_0_INLINE]:"html",[r.iC.CUSTOM_TYPE_3_335_AUTO]:"html"},s=["default","dark","custom","light"],c={production:{oc:"https://osm.klarnaservices.com",eu:"https://osm.klarnaservices.com",na:"https://osm.klarnaservices.com"},playground:{oc:"https://oc-assets.playground.klarnaservices.com",eu:"https://eu-assets.playground.klarnaservices.com",na:"https://na-assets.playground.klarnaservices.com"},staging:{oc:"https://s3.int.klarna.net/pre-purchase/library/global",eu:"https://s3.int.klarna.net/pre-purchase/library/global",na:"https://s3.int.klarna.net/pre-purchase/library/global"},development:{oc:"https://oc-assets.klarnaservices.com",eu:"https://eu-assets.klarnaservices.com",na:"https://na-assets.klarnaservices.com"}},l="/messaging",u="/s",d="/i",f="web",p={IMPRESSIONS:50,AGR_IMPRESSIONS:10,PERFORMANCE:5,STYLING_ISSUES:2,LEGACY_RENDERING:1},b=["2353e544-2ff2-59c2-b212-1bf4f3464e4c","8881c1ea-b112-5bac-af6e-8d7673373121","69ae9909-fa83-5679-9b79-e3152d192025","8a9301af-27eb-579f-9680-ce15f71b6b0a","1e91f355-200d-5918-9a94-e89ab9989159","55253bbc-5618-57c1-9537-dcb976a96121","90182b69-f31b-5041-8277-82b3a07eae17","5c1f8dc6-5298-5c13-abef-6a253ea06ea5","da5a1c6d-c02c-514c-b40d-73b0d676d464","67a23d03-8270-5475-a8a0-babe4ba86687","4f39e2bc-5713-52f1-8c90-570f7ddd4781","5c067b36-6a15-5c22-9fba-1402e1393748","a9e8fb36-aa4e-589d-bd62-7c8c99e46092","cce1bc9a-2ba6-59ab-88ea-ba0b767aab8b","e8880bde-72dd-5de0-8876-4dc28a556ff9","a9c619b7-b577-54d7-aa7b-adeadc7fc5ee","ce4123ca-9676-51b5-8db5-76d854d54c88","723d3bf3-0a90-5aae-8140-310d9fa478bd","78384c12-9830-508f-9046-f45b93ede7a1","52de8130-3107-59f9-aaa1-5a90bf0cdf13","ecb0e555-fd5f-554e-966a-bf58f1f72a8e","c6406cbf-893d-59c1-816d-086e9ca7c5c7","76424947-b4c8-5f11-9125-46bff698a0f8","58a92553-dc92-5af4-af7e-65693266e81c","a84c8537-64a5-5f76-a0ff-6d9b934088ec","601ee633-997e-5b4e-867a-a5a13c4c5f63","c782324b-2ee6-5130-9606-c7f112a0fe23","78bdf5e2-8292-54ee-9e27-dea8fb4aacf6","fc432336-af8d-571e-8a4c-15d0efcf7f67","663643dc-79c8-5ecd-ba91-86403fef3965","67472e2d-1d9a-5311-87ef-9e93ea03f399","fce97b2a-8c6a-5ba5-a107-948485bc2e83","0b42169a-608f-5c81-b17a-29900c8c66a4","ca810ec7-49ec-5b63-9183-accae4bf3307","c68e9833-599c-5e14-bc57-f78c822b12ad","bfd35799-3d4c-5582-b71b-c3e963568427","1a13d8c3-3c33-51ee-a722-e45955c20fa6","d3e8cc9b-a1ad-51b9-96a7-05fe230edce3","49a82178-2eba-54ce-b8c1-2531a004a138","71d3225b-aa87-5f0e-9904-876af56d6c66","e4708f00-bd5a-5e18-bd66-f4621c238887","f6186bbc-da96-57ed-affd-c0978a613268","991fe595-2850-5cbc-adba-989fc270713f","3a543f47-e295-5ea0-93ab-61dfb0dae37a","addb8461-59ed-5e10-b577-9abcbd197d84","6ca24f4c-0c64-5517-adb2-fd5eda9701aa","738bf438-6a08-50db-92e1-acfdc06706c2","9ce697be-c972-53b9-88bb-cac352b69f47","a897c548-029d-5d34-9b59-813ceb9d7264","c7a1c0da-0b49-5732-913b-0a47a3e1a60e","9ee94060-75f8-5f0e-99bb-3954fcf3a62f","db8aa4d5-8069-5218-933c-de7e3b494f89","a264dbba-6c2d-59b9-9167-c3f4a9791f21","008032f1-657e-5cca-a105-f3edd2bbe84f","af16f814-4a20-5c20-ad2d-942ad93f3590","e36cb7cd-c699-555c-a80d-0fcd56d7f303","ba76a301-1323-5e62-aac3-6b3ce95623ee","0904ad5a-0fb5-5069-bca9-12dbae8d8e5d","6b01ee08-344c-5e9b-ae46-b31a477259f0","f53b110c-50fa-5540-8225-bad651221124","23aec4ae-cd98-5f0a-b4d5-0df5c4a223c6","17e2e730-3d33-585a-b9e7-c5a75e966127","203b5252-c6b6-56a1-8e9d-d0caafebb88c","63ae67c6-ab0e-575e-9f1c-712b9027cc6c","a17591c7-36f9-526b-92a5-f2ff0449a3fc","9766ad09-9605-58a9-aed8-0cd3011da25e","fd6d2432-21c6-5928-86ad-eb0566325c12","32198a5b-390c-59f6-b1b8-b318f945a14f","d8a32f56-c17e-5e88-bc50-b9b35b9ced2d","6600934b-c14a-54d5-a447-6dc4b146f321","7cfbaac4-729a-5930-ba1a-ad3504155e8e","f46705b8-e9e5-5070-80c6-389dcc32f0d4","6d98ac83-11a1-584b-9aa4-e4374ea442e6","19cf327c-7c49-5b82-853b-83d93c0fa116"]},5298:(e,t,n)=>{n.d(t,{T:()=>r});let r=function(e){return e.websdk="websdk",e.osm="osm-client-script",e.identitySdk="sign-in-with-klarna",e}({})},5871:(e,t,n)=>{n.d(t,{N:()=>i});var r=n(4367);const o={africa:"eu",america:"na",antarctica:"na",arctic:"na",asia:"oc",atlantic:"na",australia:"oc",europe:"eu",indian:"oc",pacific:"na"},i=()=>{const e=Intl.DateTimeFormat().resolvedOptions().timeZone;if(e){const t=e.split("/")[0].toLowerCase();if(t in o)return o[t]}return(0,r.JE)("Provided region is not supported - defaulting region to eu"),"eu"}},6336:(e,t,n)=>{n.d(t,{b:()=>s});var r=n(3308),o=n(4367),i=n(5871);const a={at:"eu",au:"oc",be:"eu",ca:"na",ch:"eu",cz:"eu",de:"eu",dk:"eu",es:"eu",fi:"eu",fr:"eu",gb:"eu",gr:"eu",ie:"eu",it:"eu",mx:"na",nl:"eu",no:"eu",nz:"oc",pl:"eu",pt:"eu",ro:"eu",se:"eu",sk:"eu",us:"na",hu:"eu"},s=e=>{if(e&&(e=e.replace("_","-")),e&&(0,r.J)(e)){const t=e.split("-")[1].toLowerCase();if(t in a)return a[t]}const t=(0,i.N)();return(0,o.JE)(`Provided locale is not supported - defaulting region to ${t}`),t}},6806:(e,t,n)=>{n.d(t,{i:()=>o});const r=["https://s3.int.klarna.net","https://js.klarna.com","https://x.klarnacdn.net","https://x.nonprod.us1.js.klarna.net","https://osm.klarnaservices.com","https://eu-assets.playground.klarnaservices.com","https://na-assets.playground.klarnaservices.com","https://ap-assets.playground.klarnaservices.com","https://oc-assets.playground.klarnaservices.com"],o=e=>r.some((t=>e.startsWith(t)))},6994:(e,t,n)=>{n.d(t,{D3:()=>r,Id:()=>a,Lj:()=>o,O4:()=>s,i$:()=>c,iC:()=>i});let r=function(e){return e.PAYMENT_BUTTON="klarna-payment-button",e.IDENTITY_BUTTON="klarna-identity-button",e.PLACEMENT="klarna-placement",e}({}),o=function(e){return e.CHECKOUT="checkout",e.CONTINUE="continue",e.CONNECT="connect",e.DONATE="donate",e.SIGNIN="signin",e.SIGNUP="signup",e.SUBSCRIBE="subscribe",e.PAY="pay",e}({}),i=function(e){return e.CHECKOUT="checkout",e.CUSTOM_TYPE_0="custom-type0",e.CUSTOM_TYPE_1="custom-type1",e.CUSTOM_TYPE_0_INLINE="custom-type0-inline",e.CUSTOM_TYPE_2_INLINE="custom-type2-inline",e.CUSTOM_TYPE_3_INLINE="custom-type3-inline",e.CUSTOM_TYPE_1_335_AUTO="custom-type1-335-auto",e.CUSTOM_TYPE_3_335_AUTO="custom-type3-335-auto",e.TOP_STRIP_PROMOTION_AUTO_SIZE="top-strip-promotion-auto-size",e.TOP_STRIP_PROMOTION_STANDARD="top-strip-promotion-standard",e.TOP_STRIP_PROMOTION_BADGE="top-strip-promotion-badge",e.CREDIT_PROMOTION_SMALL="credit-promotion-small",e.CREDIT_PROMOTION_STANDARD="credit-promotion-standard",e.CREDIT_PROMOTION_INLINE="credit-promotion-inline",e.CREDIT_PROMOTION_AUTO_SIZE="credit-promotion-auto-size",e.CREDIT_PROMOTION_BADGE="credit-promotion-badge",e.SIDEBAR_PROMOTION_AUTO_SIZE="sidebar-promotion-auto-size",e.FOOTER_PROMOTION_AUTO_SIZE="footer-promotion-auto-size",e.INFO_PAGE="info-page",e.HOMEPAGE_PROMOTION_TALL="homepage-promotion-tall",e.HOMEPAGE_PROMOTION_WIDE="homepage-promotion-wide",e.HOMEPAGE_PROMOTION_BOX="homepage-promotion-box",e.PRODUCT="product",e.HEADER="header",e.CART="cart",e}({});const a={production:"https://js.klarna.com",playground:"https://js.playground.klarna.com",staging:"https://x.nonprod.us1.js.klarna.net",development:"https://x.nonprod.us1.js.klarna.net"};let s=function(e){return e.LIVE="live",e.TEST="test",e}({});const c=/((prequalification|pre-qualification)\s?[^}]*)\//gi},7459:(e,t,n)=>{n.d(t,{Y:()=>s});var r=n(4984),o=n(3308),i=n(5871);const a={eu:"en-GB",na:"en-US",oc:"en-AU"},s=({locale:e="",win:t=window,allowFallback:n=!0}={})=>{var s;e&&(e=e.replace("_","-"));const c=e.split("-");if(e=c.length>1?`${c[0].toLowerCase()}-${c[1].toUpperCase()}`:"",(0,o.J)(e))return e;if(!n)throw new Error("Invalid locale provided and allowFallback is disabled.");const l=null===(s=t.navigator)||void 0===s?void 0:s.language;if((e=>{if(!e)return!1;const[t="",n=""]=e.split("-");if(!t)return!1;const o=t.toLowerCase();if(n){const e=n.toUpperCase(),t=r.dI[e];return!!t&&t.includes(o)}return Object.values(r.dI).flat().includes(o)})(l))return l;const u=(0,i.N)();return a[u]}},7971:(e,t,n)=>{n.d(t,{A:()=>s,v:()=>a});var r=n(8334),o=n(1331);const i="version",a=()=>{try{const e=(0,o.n)(i);return null==e?void 0:e.get("rolloutVariant")}catch(e){return"none"}},s=e=>{if(!e)throw new Error("Missing runtime config");try{var t,n;const a=(0,o.n)(i);e.lib.defaultVersion!==(null===(t=e.lib)||void 0===t?void 0:t.canaryVersion)&&"true"!==(null===(n=e.lib)||void 0===n?void 0:n.flushVersion)||(null==a||a.remove("version"),null==a||a.remove("rolloutVariant"),null==a||a.remove("ttl"));const s=null==a?void 0:a.get("version");if(s)return s;{const t=(({defaultVersion:e,canaryVersion:t,canaryWeight:n=0})=>{const a=(0,o.n)(i),s=Date.now()+864e5;return null==a||a.set("ttl",s.toString()),(0,r.s)(100*n)?(0,r.s)(50)?(null==a||a.set("rolloutVariant","canary"),null==a||a.set("version",t),t):(null==a||a.set("rolloutVariant","control"),null==a||a.set("version",e),e):(null==a||a.set("rolloutVariant","none"),null==a||a.set("version",e),e)})(e.lib);if(t)return t;throw new Error("Failed to set rollout and version")}}catch(t){if(e.lib.defaultVersion)return e.lib.defaultVersion;throw new Error(`Failed to get version: ${t.message}`)}}},8016:(e,t,n)=>{n.d(t,{h:()=>b});var r=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o{try{var e;const n=null===(e=t?f(t):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new c:"undefined"!=typeof navigator?f(navigator.userAgent):"undefined"!=typeof process&&process.version?new i(process.version.slice(1)):null)||void 0===e?void 0:e.name;return n&&p.includes(n)?n:"unknown"}catch(e){return"unknown"}var t}},8334:(e,t,n)=>{n.d(t,{$:()=>r,s:()=>o});const r={INIT:5,SDK_LOAD_TIME_EVENT:5,MERCHANT_WARN:5,ENTRY:5},o=e=>100*Math.random(){function r(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 o(e){for(var t=1;tD,r$:()=>M}),function(e){e.fatal="fatal",e.error="error",e.warning="warning",e.log="log",e.info="info",e.debug="debug",e.critical="critical"}(a||(a={}));const s=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,c=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,l=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,u="?",d=/^(?:(\w+):)\/\/(?:([\w-]+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/;function f(e){return(e&&e.message||"No error message").split("\n").filter((e=>!!e))[0]}function p(e){try{const t=function(e){if(!e.stack)return null;const t=[],n=e.stack.split("\n");let r,o;for(let i=0;i{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})),sdk:{name:"micro-sentry.javascript.core",version:"0.0.0"},timestamp:Date.now()/1e3,environment:this.environment}}}function m(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 v(e){for(var t=1;te,beforeBreadcrumb:o=e=>e,blacklistUrls:i=[],ignoreErrors:a=[],release:s,maxBreadcrumbs:c=y}=this.options||{}||[];this.plugins=n.map((e=>new e(this))),this.beforeSend=r,this.beforeBreadcrumb=o,this.blacklistUrls=i,this.ignoreErrors=a,this.release=s,this.maxBreadcrumbs=c>=0?c:y}get state(){return this._state}clearState(){this._state={}}setTags(e){return this.setKeyState("tags",v({},e)),this}setTag(e,t){return this.extendState({tags:{[e]:t}}),this}setExtra(e,t){return this.extendState({extra:{[e]:t}}),this}setExtras(e){return this.setKeyState("extra",v({},e)),this}setUser(e){return this.setKeyState("user",e?v({},e):void 0),this}clone(){const e=new w(v(v({},this.options),{},{plugins:[]}));return e.extendState(this.state),e}withScope(e){const t=this.clone();e(t),t.destroy(),this.setBreadcrumbs(void 0)}addBreadcrumb(e){const t=this.beforeBreadcrumb(e);t&&(this.extendState({[this.breadcrumbsKeyName]:[v({timestamp:Date.now()/1e3},t)]}),this.trimBreadcrumbs())}setBreadcrumbs(e){this.setKeyState(this.breadcrumbsKeyName,e),this.trimBreadcrumbs()}captureMessage(e,t){this.send(v(v({},this.getRequestBlank()),{},{message:e,level:t}))}destroy(){this.destroyed=!0,this.plugins.forEach((e=>{e.destroy&&e.destroy()}))}isIgnoredError(e){return!!this.ignoreErrors.length&&this.getPossibleEventMessages(e).some((e=>this.ignoreErrors.some((t=>g(e,t)))))}extractQueryString(e){let t=e;if(t){t.startsWith("/")&&(t=`http://prefix${t}`);try{const e=new URL(t).search.slice(1);return e.length?e:void 0}catch(e){return}}}getRequestBlank(){const e=this.window.location.toString();return v(v({request:{url:e,query_string:this.extractQueryString(e),headers:{"User-Agent":this.window.navigator.userAgent}}},super.getRequestBlank()),{},{sdk:{name:"micro-sentry.javascript.browser",version:"0.0.0"}},this.state)}send(e){if(this.destroyed||this.isDeniedUrl(e)||this.isIgnoredError(e))return;const t=this.beforeSend(v({release:this.release},e));t&&(super.send(t),this.setBreadcrumbs(void 0))}getPossibleEventMessages(e){if(e.message)return[e.message];if(e.exception)try{const{type:t="",value:n=""}=e.exception.values&&e.exception.values[0]||{};return[`${n}`,`${t}: ${n}`]}catch(e){return[]}return[]}isDeniedUrl(e){if(!this.blacklistUrls.length)return!1;const t=this.getEventFilterUrl(e);return!!t&&this.blacklistUrls.some((e=>g(t,e)))}getEventFilterUrl(e){try{if(e.exception){const t=e.exception.values&&e.exception.values[0].stacktrace&&e.exception.values[0].stacktrace.frames;return t&&t[t.length-1].filename||null}return null}catch(e){return null}}extendState(e){this._state=Object.keys(e).reduce(((t,n)=>{const r=this._state[n],o=Array.isArray(r)?r:null,i=e[n],a=Array.isArray(i)?i:null;return v(v({},t),{},{[n]:o||a?[...o||[],...a||[]]:v(v({},"string"!=typeof r?r:{}),"string"!=typeof i?i:{})})}),this._state)}setKeyState(e,t){this._state[e]=t}getKeyState(e){return this._state[e]}trimBreadcrumbs(){var e;const t=this.getKeyState(this.breadcrumbsKeyName);t&&(null!==(e=t.length)&&void 0!==e?e:0)>this.maxBreadcrumbs&&this.setKeyState(this.breadcrumbsKeyName,this.maxBreadcrumbs>0?t.slice(-this.maxBreadcrumbs):[])}}let I=function(e){return e.SENTRY_NOT_CONFIGURED="sentry_not_configured",e}({});var S=n(3398),E=n(5298),T=n(738);const k=[],_=e=>{var t;let n=!1;return null===(t=e.exception)||void 0===t||null===(t=t.values)||void 0===t||t.forEach((({value:e})=>{k.forEach((t=>{t&&e.includes(t)&&(n=!0)}))})),n?null:e};var P=function(e){return e.sessionStorageNotSupported="sessionStorage-not-supported",e.localStorageNotSupported="localStorage-not-supported",e.dynamicImportFailed="dynamic-import-failed",e.multipleCustomElementsWithSameTagName="multiple-custom-elements-same-tag-name",e.unexpectedTokenMethodParamsList="unexpected-token-method-params-list",e.missingColonAfterPropertyId="missing-colon-after-property-id",e.unexpectedTokenEqual="unexpected-token-equal",e.expectedExpressionGotEqual="expected-expression-got-equal",e.performanceNotDefined="performance-is-not-defined",e.undefinedIsNotAnObjectRenderOptions="undefined-is-not-an-object-render-options",e.renderOptionsIsUndefined="render-options-is-undefined",e.nullIsNotAnObjectParentNodeInsertBefore="null-is-not-an-object-parent-node-insert-before",e.failedToFetchOSMAPI="failed-to-fetch-osm-api",e.cannotReadPropertiesOfNull="cannot-read-properties-of-null",e.failedToExecuteInvokeOnCreateHTMLCallback="failed-to-execute-invoke-on-create-html-callback",e.performanceMarkIsNotAFunction="performance-mark-is-not-a-function",e.backendBridgeInitFailed="backend-bridge-init-failed",e.globalThisIsNotDefined="globalThisIsNotDefined",e.identityNaClientIdsNotFound="identity-na-client-ids-not-found",e.chunkLoadErrorObjectNotExtensible="chunk-load-error-object-not-extensible",e.runtimeConfigFetchRequestAborted="runtime-config-fetch-request-aborted",e.runtimeConfigFetchRequestAbortedPlayground="runtime-config-fetch-request-aborted-playground",e}(P||{}),N=n(6806),j=n(8334);const C=["Unexpected token '","Storage type: ","Failed to fetch dynamically imported module","Missing runtime config","Failed to execute 'define","Importing a module script failed.","NetworkError when attempting to fetch resource","Loading chunk"],x=e=>{var t;let n=!0;return null===(t=e.exception)||void 0===t||null===(t=t.values)||void 0===t||t.forEach((({value:e})=>{C.forEach((t=>{e.includes(t)&&(n=(0,j.s)(5))}))})),n?e:null};let A;const R={report:()=>{},setTags:()=>{},setTag:()=>{},setExtras:()=>{},setExtra:()=>{}},D=()=>A||(((e,t,n=E.T.websdk)=>{const r=(0,T.A)(n);try{r.event("error",{message:t,name_1:e})}catch(e){}})(I.SENTRY_NOT_CONFIGURED,"Sentry client not initialized"),R),M=e=>{var t,n,r,o,i,a;return(0,S.L)()?A=R:A||(A=(e=>new w({dsn:"https://6fdc8e6e634d4a998b6f0dbfd7b025e1@o24547.ingest.sentry.io/4505471301713920",release:e.version,environment:e.environment,ignoreErrors:["validation_errors",/^The data-purchase-amount of .+? in .+? is invalid$/],beforeSend:e=>{var t;null===(t=e.exception)||void 0===t||null===(t=t.values)||void 0===t||t.forEach((({value:t})=>{e.fingerprint=(e=>{var t,n,r,o,i,a,s,c,l,u,d,f,p,b,m,v,h,g,y,O;switch(e){case"Storage type: sessionStorage not supported":return[P.sessionStorageNotSupported];case"Storage type: localStorage not supported":return[P.localStorageNotSupported];case"Cannot define multiple custom elements with the same tag name":return[P.multipleCustomElementsWithSameTagName];case"Unexpected token ';'. Expected an opening '(' before a method's parameter list.":return[P.unexpectedTokenMethodParamsList];case null===(t=e.match(/Failed to fetch dynamically imported module/))||void 0===t?void 0:t.input:return[P.dynamicImportFailed];case null===(n=e.match("missing : after property id"))||void 0===n?void 0:n.input:return[P.missingColonAfterPropertyId];case null===(r=e.match("Unexpected token '='"))||void 0===r?void 0:r.input:return[P.unexpectedTokenEqual];case null===(o=e.match("expected expression, got '='"))||void 0===o?void 0:o.input:return[P.expectedExpressionGotEqual];case null===(i=e.match(/error loading dynamically imported module/))||void 0===i?void 0:i.input:return[P.dynamicImportFailed];case null===(a=e.match(/performance is not defined/))||void 0===a?void 0:a.input:return[P.performanceNotDefined];case null===(s=e.match(/performance?.mark is not a function/))||void 0===s?void 0:s.input:return[P.performanceMarkIsNotAFunction];case null===(c=e.match(/undefined is not an object (evaluating 'this.renderOptions.renderBefore')/))||void 0===c?void 0:c.input:return[P.undefinedIsNotAnObjectRenderOptions];case null===(l=e.match(/this.renderOptions is undefined/))||void 0===l?void 0:l.input:return[P.renderOptionsIsUndefined];case null===(u=e.match(/Cannot read properties of null (reading 'insertBefore')/))||void 0===u?void 0:u.input:return[P.cannotReadPropertiesOfNull];case null===(d=e.match(/null is not an object (evaluating 'this._$AA.parentNode.insertBefore')/))||void 0===d?void 0:d.input:return[P.nullIsNotAnObjectParentNodeInsertBefore];case null===(f=e.match(/Failed to execute 'invoke' on 'CreateHTMLCallback': The provided callback is no longer runnable./))||void 0===f?void 0:f.input:return[P.failedToExecuteInvokeOnCreateHTMLCallback];case null===(p=e.match("Failed to fetch: GET https://js.klarna.com/na/cma/"))||void 0===p?void 0:p.input:return[P.failedToFetchOSMAPI];case null===(b=e.match("BackendBridge: init failed"))||void 0===b?void 0:b.input:return[P.backendBridgeInitFailed];case null===(m=e.match("globalThis is not defined"))||void 0===m?void 0:m.input:return[P.globalThisIsNotDefined];case null===(v=e.match("Identity naClientIds list not found"))||void 0===v?void 0:v.input:return[P.identityNaClientIdsNotFound];case null===(h=e.match("Cannot add property timelineEnd, object is not extensible"))||void 0===h?void 0:h.input:return[P.chunkLoadErrorObjectNotExtensible];case null===(g=e.match("Fetch request to https://js.klarna.com/web-sdk/config/runtime-config.json was aborted due to timeout"))||void 0===g?void 0:g.input:case null===(y=e.match("Fetch request to https://na-library.klarnaservices.com/config/runtime-config.json was aborted due to timeout"))||void 0===y?void 0:y.input:return[P.runtimeConfigFetchRequestAborted];case null===(O=e.match("Fetch request to https://js.klarna.com/web-sdk/config/runtime-config-playground.json was aborted due to timeout"))||void 0===O?void 0:O.input:return[P.runtimeConfigFetchRequestAbortedPlayground]}})(t)}));const n=(e=>{var t;let n=!0;return null===(t=e.exception)||void 0===t||null===(t=t.values)||void 0===t||t.forEach((({stacktrace:e})=>{var t;null==e||null===(t=e.frames)||void 0===t||t.forEach((({filename:e})=>{n=!(0,N.i)(e)}))})),n?null:e})(e);return n?(r=x,o=_,e=>r(o(e)))(n):null;var r,o},blacklistUrls:[/pagead\/js/i,/graph\.facebook\.com/i,/connect\.facebook\.net\/en_US\/all\.js/i,/extensions\//i,/^chrome:\/\//i,/metrics\.itunes\.apple\.com\.edgesuite\.net\//i]}))(e)),e.tags&&Object.entries(e.tags).forEach((([e,t])=>{t&&A.setTag(e,t.toString())})),A.setExtras({connectionType:null!==(t=null===(n=navigator)||void 0===n||null===(n=n.connection)||void 0===n?void 0:n.effectiveType)&&void 0!==t?t:"unknown",downlink:null!==(r=null===(o=navigator)||void 0===o||null===(o=o.connection)||void 0===o?void 0:o.downlink)&&void 0!==r?r:"unknown",rtt:null!==(i=null===(a=navigator)||void 0===a||null===(a=a.connection)||void 0===a?void 0:a.downlink)&&void 0!==i?i:"unknown"}),A}},9604:(e,t,n)=>{function r(e=""){const t=e.replace(/-/g,"").toLowerCase();return/^[0-9a-f]{32}$/i.test(t)}n.d(t,{f:()=>r})}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={exports:{}};return n[e].call(i.exports,i,i.exports,o),i.exports}o.m=n,o.amdO={},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce(((t,n)=>(o.f[n](e,t),t)),[])),o.u=e=>"1.0.21/"+({1249:"sdk",4328:"klarna-test-drive-badge"}[e]||e)+".chunk.js",o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="@klarna-web-sdk/lib:",o.l=(n,r,i,a)=>{if(e[n])e[n].push(r);else{var s,c;if(void 0!==i)for(var l=document.getElementsByTagName("script"),u=0;u{s.onerror=s.onload=null,clearTimeout(p);var o=e[n];if(delete e[n],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach((e=>e(r))),t)return t(r)},p=setTimeout(f.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=f.bind(null,s.onerror),s.onload=f.bind(null,s.onload),c&&document.head.appendChild(s)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.p="https://na-library.klarnaservices.com/",(()=>{var e={4396:0};o.f.j=(t,n)=>{var r=o.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var i=new Promise(((n,o)=>r=e[t]=[n,o]));n.push(r[2]=i);var a=o.p+o.u(t),s=new Error;o.l(a,(n=>{if(o.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var i=n&&("load"===n.type?"missing":n.type),a=n&&n.target&&n.target.src;s.message="Loading chunk "+t+" failed.\n("+i+": "+a+")",s.name="ChunkLoadError",s.type=i,s.request=a,r[1](s)}}),"chunk-"+t,t)}};var t=(t,n)=>{var r,i,[a,s,c]=n,l=0;if(a.some((t=>0!==e[t]))){for(r in s)o.o(s,r)&&(o.m[r]=s[r]);c&&c(o)}for(t&&t(n);lsetTimeout((()=>{e.abort()}),t))(c,r);try{const e=yield fetch(i,{signal:l});if(clearTimeout(u),!e.ok)throw new Error(`Failed to fetch configuration. Server responded with status ${e.status}: ${e.statusText}`);return yield e.json()}catch(o){return"AbortError"===o.name?((0,a.s)(a.$.ENTRY)&&(0,s.vV)(`Fetch request to ${i} was aborted due to timeout`),w):((0,a.s)(a.$.ENTRY)&&(0,s.vV)(`Attempt ${n} failed to fetch runtime configuration from ${i}. Error: ${null==o?void 0:o.message}`),n>0?I(e,t,n-1,r):((0,a.s)(a.$.ENTRY)&&(0,s.vV)(`Failed to fetch runtime configuration after multiple attempts from ${i}, relying on the FALLBACK_CONFIG instead. Error: ${null==o?void 0:o.message}`),w))}finally{clearTimeout(u)}},function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){O(i,r,o,a,s,"next",e)}function s(e){O(i,r,o,a,s,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}(),S=I;function E(){const e=new CustomEvent("OSM:refresh");return document.dispatchEvent(e),null}const T=[];class k extends Array{constructor(...e){var t,n,r;super(...e),t=this,r=E,(n=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(n="refresh"))in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r}pop(){return T.pop()}push(e){return T.push(e),T.length}}function _(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 P(e){for(var t=1;t{var t,n,r;return null!==(t=null==e?void 0:e.currentScript)&&void 0!==t?t:null==e||null===(n=e.scripts)||void 0===n?void 0:n[(null==e||null===(r=e.scripts)||void 0===r?void 0:r.length)-1]})(),{accountId:i,clientId:c,clientKey:l,clientToken:u,environment:d,version:f,additionalIdentifier:p,clientInstanceName:b,locale:m,shoppingSessionId:v}=(null==o?void 0:o.dataset)||{},h=c||l,g=(0,y.A)();let O,w;try{O=x({version:null!=f?f:"1.0.21",environment:d,sessionId:g,additionalIdentifier:p,clientId:h,accountId:i,clientInstanceName:b,locale:m})}catch(e){console.warn("Failed to setup Klarna Web SDK tracker",e),O={event:e=>{console.warn("Fallback tracker event:",e)}}}if((0,a.s)(a.$.SDK_LOAD_TIME_EVENT)&&(w=Date.now(),O.event("klarna_sdk_load_start")),b&&!/^[a-z0-9]+$/.test(b))throw(0,a.s)(a.$.ENTRY)&&(0,s.vV)("Invalid clientInstanceName attribute. Only lowercase letters from a-z and numbers are allowed."),new Error("Invalid clientInstanceName attribute. Only lowercase letters from a-z and numbers are allowed.");let I="KlarnaWebSDKScriptLoaded";b&&(I=`KlarnaWebSDKScript${b}Loaded`),e[I]||(e[I]=0),e[I]++,e[I]>1&&!b&&console.warn("\n Another Klarna Web SDK was already included into the page, \n please consider using data-client-instance-name attribute\n on klarna.js script tag to avoid conflicts.\n ");const S=new URL(null==o?void 0:o.src),T=null==S||null===(t=S.searchParams)||void 0===t?void 0:t.get("ready"),_=null!==(n=null!==(r=T&&e[T])&&void 0!==r?r:e[`KlarnaSDKCallback_${b}`])&&void 0!==n?n:e.KlarnaSDKCallback;let P="KlarnaSDKCallbackTriggered";if(T?P=`${T}Triggered`:b&&(P=`KlarnaSDKCallback${b}Triggered`),h||u){const{isWebSDKAvailable:t}=((e=window)=>{const t=!!e.Klarna,n=!!(e=>e.Klarna&&e.Klarna.Credit&&e.Klarna.DirectBankTransfer&&e.Klarna.DirectDebit&&e.Klarna.Payments)(e),r=!!(e=>e.Klarna&&e.Klarna.Identity&&e.Klarna.Messaging&&e.Klarna.OnsiteMessaging&&e.Klarna.Payment)(e);return{isKlarnaNamespaceAvailable:t,isKPLibAvailable:n,isWebSDKAvailable:r}})(e);if((e=>{e.KlarnaOnsiteService=new k,e.kudt=e.KlarnaOnsiteService,e.OnsiteMessaging={refresh:E,eventListeners:{},on:()=>{}}})(e),t||e[I]>1)return void(e[P]||"function"!=typeof _||(e[P]=!0,_(e.Klarna)));const n=yield R({accountId:i,clientId:h,clientToken:u,version:f,environment:d,clientInstanceName:b,additionalIdentifier:p,locale:m,shoppingSessionId:v,sessionId:g},w);e.Klarna=Object.assign(n,e.Klarna),e[P]||"function"!=typeof _||(e[P]=!0,_(e.Klarna))}else try{const t=({accountId:e,clientId:t,clientToken:n,version:r,environment:o,clientInstanceName:i,additionalIdentifier:a,locale:s})=>R({accountId:e,clientId:t,clientToken:n,version:r,environment:o,clientInstanceName:i,additionalIdentifier:a,locale:s,shoppingSessionId:v,sessionId:g},w);e.Klarna.init=t,e[P]||"function"!=typeof _||(e[P]=!0,_(new Proxy({init:t},{get:function(e,t,n){if("init"===t)return Reflect.get(e,t,n);throw new Error("Klarna SDK is not initialized. Please call window.Klarna.init() with your credentials first.")}})))}catch(e){throw new Error("Klarna Web SDK init failed")}})),A.apply(this,arguments)}const R=function(){var e=C((function*({accountId:e,clientId:t,clientToken:n,version:r,environment:i,additionalIdentifier:b,clientInstanceName:m="default",locale:y,sessionId:O},w){if(!t&&!n)throw new Error("Missing `client-id` attribute that is required for the SDK to work");y&&!(0,p.J)(y)&&((0,s.JE)("Invalid `locale` attribute. Please provide a valid locale."),y="");const[I,E]=function(e){const t=/^klarna_(test|live)_(api)_[A-Za-z0-9_-]+={0,2}$/.test(e),n=/^klarna_(test|live)_(client)_[A-Za-z0-9_-]+={0,2}$/.test(e);return t?[!1,"API_KEY"]:n?[!0,""]:[!1,"INVALID_FORMAT"]}(t);if(t&&!I&&!(0,c.f)(t))throw"API_KEY"===E?new Error("Invalid `client-id` attribute. An API key was passed but is not allowed in the `client-id` attribute. Please revoke your API key immediately as it may have been leaked if it was deployed to a public environment."):new Error('Invalid `client-id` attribute. Expected format: "klarna___" or an UUID for legacy OSM integrations.');let T=r,k={lib:{defaultVersion:""},identity:{naClientIds:[],nonPKCEClientIds:[]},lastUpdated:""},_="https://na-library.klarnaservices.com/";const N=(0,l.E)({accountId:e,clientId:t,clientToken:n,clientInstanceName:m,additionalIdentifier:b}),[j,C]=null!=t&&t.includes("_")?t.split("_"):[];if((0,f.L)())i="staging";else if((0,c.f)(t)||!t&&n){var x;i="playground"===(null===(x=i)||void 0===x?void 0:x.toLowerCase())?"playground":"production"}else i=(null==C?void 0:C.toLowerCase())===u.O4.TEST?"playground":"production";const A=P(P({},N),{},{product:"entrypoint klarna.js",sessionId:O});(0,h.r$)({environment:i,version:"1.0.21",tags:A}),"playground"===i&&(_=_.replace("js.","js.playground."));try{var R;v("klarna_js_fetch_runtime_config",w),k=null!==(R=yield S(_,i))&&void 0!==R?R:k,T?(k.lib.defaultVersion=T,_+=`v1/${T}/`):(T=(0,d.A)(k),_+=`v1/${T}/`);const e=`${_}sdk.js`;v("klarna_js_fetch_sdk",w);const{default:t}=yield import(e);return new t(P(P({},N),{},{baseUrl:_,version:T,environment:i,sessionId:O,runtimeConfig:k,clientInstanceName:m,locale:y}),w).getPublicAPI()}catch(e){try{(0,a.s)(a.$.ENTRY)&&(0,s.vV)("Failed to load SDK. Loading fallback version "+e);const{default:t}=yield Promise.all([o.e(8765),o.e(1249)]).then(o.bind(o,4567));return new t(P(P({},N),{},{baseUrl:"https://na-library.klarnaservices.com/1.0.21/",version:"1.0.21",environment:i,sessionId:O,runtimeConfig:k,clientInstanceName:m,locale:y}),w).getPublicAPI()}catch(e){throw(0,a.s)(a.$.ENTRY)&&(0,s.vV)("Failed to load SDK: "+e.message),(0,g.G)(e),new Error("Failed to load SDK")}}}));return function(){return e.apply(this,arguments)}}();(function(){return A.apply(this,arguments)})().catch((()=>{console.log("Failed to setup SDK...")}))})();