straumur-web-component 2.0.0-alpha.21 → 2.0.0-alpha.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +16 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -8
- package/dist/index.d.ts +20 -8
- package/dist/index.js +19 -18
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -15
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
"use strict";var StraumurWeb=(()=>{var Pn=Object.defineProperty;var jc=Object.getOwnPropertyDescriptor;var $c=Object.getOwnPropertyNames;var Wc=Object.prototype.hasOwnProperty;var Zc=(t,e)=>{for(var r in e)Pn(t,r,{get:e[r],enumerable:!0})},qc=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of $c(e))!Wc.call(t,n)&&n!==r&&Pn(t,n,{get:()=>e[n],enumerable:!(o=jc(e,n))||o.enumerable});return t};var Xc=t=>qc(Pn({},"__esModule",{value:!0}),t);var Hp={};Zc(Hp,{StraumurCheckout:()=>zc});var no,B,Wa,Jc,Pt,za,Za,qa,Xa,Dn,Rn,Tn,Ja,yr={},Qa=[],Qc=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,ao=Array.isArray;function $e(t,e){for(var r in e)t[r]=e[r];return t}function wn(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function i(t,e,r){var o,n,a,s={};for(a in e)a=="key"?o=e[a]:a=="ref"?n=e[a]:s[a]=e[a];if(arguments.length>2&&(s.children=arguments.length>3?no.call(arguments,2):r),typeof t=="function"&&t.defaultProps!=null)for(a in t.defaultProps)s[a]===void 0&&(s[a]=t.defaultProps[a]);return to(t,s,o,n,null)}function to(t,e,r,o,n){var a={type:t,props:e,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:n??++Wa,__i:-1,__u:0};return n==null&&B.vnode!=null&&B.vnode(a),a}function ie(t){return t.children}function ro(t,e){this.props=t,this.context=e}function Gt(t,e){if(e==null)return t.__?Gt(t.__,t.__i+1):null;for(var r;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null)return r.__e;return typeof t.type=="function"?Gt(t):null}function es(t){var e,r;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null){t.__e=t.__c.base=r.__e;break}return es(t)}}function An(t){(!t.__d&&(t.__d=!0)&&Pt.push(t)&&!oo.__r++||za!=B.debounceRendering)&&((za=B.debounceRendering)||Za)(oo)}function oo(){for(var t,e,r,o,n,a,s,l=1;Pt.length;)Pt.length>l&&Pt.sort(qa),t=Pt.shift(),l=Pt.length,t.__d&&(r=void 0,o=void 0,n=(o=(e=t).__v).__e,a=[],s=[],e.__P&&((r=$e({},o)).__v=o.__v+1,B.vnode&&B.vnode(r),In(e.__P,r,o,e.__n,e.__P.namespaceURI,32&o.__u?[n]:null,a,n??Gt(o),!!(32&o.__u),s),r.__v=o.__v,r.__.__k[r.__i]=r,os(a,r,s),o.__e=o.__=null,r.__e!=n&&es(r)));oo.__r=0}function ts(t,e,r,o,n,a,s,l,c,u,p){var d,h,m,y,b,C,f,g=o&&o.__k||Qa,k=e.length;for(c=eu(r,e,g,c,k),d=0;d<k;d++)(m=r.__k[d])!=null&&(h=m.__i==-1?yr:g[m.__i]||yr,m.__i=d,C=In(t,m,h,n,a,s,l,c,u,p),y=m.__e,m.ref&&h.ref!=m.ref&&(h.ref&&kn(h.ref,null,m),p.push(m.ref,m.__c||y,m)),b==null&&y!=null&&(b=y),(f=!!(4&m.__u))||h.__k===m.__k?c=rs(m,c,t,f):typeof m.type=="function"&&C!==void 0?c=C:y&&(c=y.nextSibling),m.__u&=-7);return r.__e=b,c}function eu(t,e,r,o,n){var a,s,l,c,u,p=r.length,d=p,h=0;for(t.__k=new Array(n),a=0;a<n;a++)(s=e[a])!=null&&typeof s!="boolean"&&typeof s!="function"?(typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?s=t.__k[a]=to(null,s,null,null,null):ao(s)?s=t.__k[a]=to(ie,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=t.__k[a]=to(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):t.__k[a]=s,c=a+h,s.__=t,s.__b=t.__b+1,l=null,(u=s.__i=tu(s,r,c,d))!=-1&&(d--,(l=r[u])&&(l.__u|=2)),l==null||l.__v==null?(u==-1&&(n>p?h--:n<p&&h++),typeof s.type!="function"&&(s.__u|=4)):u!=c&&(u==c-1?h--:u==c+1?h++:(u>c?h--:h++,s.__u|=4))):t.__k[a]=null;if(d)for(a=0;a<p;a++)(l=r[a])!=null&&(2&l.__u)==0&&(l.__e==o&&(o=Gt(l)),as(l,l));return o}function rs(t,e,r,o){var n,a;if(typeof t.type=="function"){for(n=t.__k,a=0;n&&a<n.length;a++)n[a]&&(n[a].__=t,e=rs(n[a],e,r,o));return e}t.__e!=e&&(o&&(e&&t.type&&!e.parentNode&&(e=Gt(t)),r.insertBefore(t.__e,e||null)),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function tu(t,e,r,o){var n,a,s,l=t.key,c=t.type,u=e[r],p=u!=null&&(2&u.__u)==0;if(u===null&&l==null||p&&l==u.key&&c==u.type)return r;if(o>(p?1:0)){for(n=r-1,a=r+1;n>=0||a<e.length;)if((u=e[s=n>=0?n--:a++])!=null&&(2&u.__u)==0&&l==u.key&&c==u.type)return s}return-1}function ja(t,e,r){e[0]=="-"?t.setProperty(e,r??""):t[e]=r==null?"":typeof r!="number"||Qc.test(e)?r:r+"px"}function eo(t,e,r,o,n){var a,s;e:if(e=="style")if(typeof r=="string")t.style.cssText=r;else{if(typeof o=="string"&&(t.style.cssText=o=""),o)for(e in o)r&&e in r||ja(t.style,e,"");if(r)for(e in r)o&&r[e]==o[e]||ja(t.style,e,r[e])}else if(e[0]=="o"&&e[1]=="n")a=e!=(e=e.replace(Xa,"$1")),s=e.toLowerCase(),e=s in t||e=="onFocusOut"||e=="onFocusIn"?s.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+a]=r,r?o?r.u=o.u:(r.u=Dn,t.addEventListener(e,a?Tn:Rn,a)):t.removeEventListener(e,a?Tn:Rn,a);else{if(n=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&r==1?"":r))}}function $a(t){return function(e){if(this.l){var r=this.l[e.type+t];if(e.t==null)e.t=Dn++;else if(e.t<r.u)return;return r(B.event?B.event(e):e)}}}function In(t,e,r,o,n,a,s,l,c,u){var p,d,h,m,y,b,C,f,g,k,E,H,Y,$,ee,M,F,L=e.type;if(e.constructor!==void 0)return null;128&r.__u&&(c=!!(32&r.__u),a=[l=e.__e=r.__e]),(p=B.__b)&&p(e);e:if(typeof L=="function")try{if(f=e.props,g="prototype"in L&&L.prototype.render,k=(p=L.contextType)&&o[p.__c],E=p?k?k.props.value:p.__:o,r.__c?C=(d=e.__c=r.__c).__=d.__E:(g?e.__c=d=new L(f,E):(e.__c=d=new ro(f,E),d.constructor=L,d.render=ou),k&&k.sub(d),d.state||(d.state={}),d.__n=o,h=d.__d=!0,d.__h=[],d._sb=[]),g&&d.__s==null&&(d.__s=d.state),g&&L.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=$e({},d.__s)),$e(d.__s,L.getDerivedStateFromProps(f,d.__s))),m=d.props,y=d.state,d.__v=e,h)g&&L.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),g&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(g&&L.getDerivedStateFromProps==null&&f!==m&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(f,E),e.__v==r.__v||!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(f,d.__s,E)===!1){for(e.__v!=r.__v&&(d.props=f,d.state=d.__s,d.__d=!1),e.__e=r.__e,e.__k=r.__k,e.__k.some(function(te){te&&(te.__=e)}),H=0;H<d._sb.length;H++)d.__h.push(d._sb[H]);d._sb=[],d.__h.length&&s.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(f,d.__s,E),g&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(m,y,b)})}if(d.context=E,d.props=f,d.__P=t,d.__e=!1,Y=B.__r,$=0,g){for(d.state=d.__s,d.__d=!1,Y&&Y(e),p=d.render(d.props,d.state,d.context),ee=0;ee<d._sb.length;ee++)d.__h.push(d._sb[ee]);d._sb=[]}else do d.__d=!1,Y&&Y(e),p=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++$<25);d.state=d.__s,d.getChildContext!=null&&(o=$e($e({},o),d.getChildContext())),g&&!h&&d.getSnapshotBeforeUpdate!=null&&(b=d.getSnapshotBeforeUpdate(m,y)),M=p,p!=null&&p.type===ie&&p.key==null&&(M=ns(p.props.children)),l=ts(t,ao(M)?M:[M],e,r,o,n,a,s,l,c,u),d.base=e.__e,e.__u&=-161,d.__h.length&&s.push(d),C&&(d.__E=d.__=null)}catch(te){if(e.__v=null,c||a!=null)if(te.then){for(e.__u|=c?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;a[a.indexOf(l)]=null,e.__e=l}else{for(F=a.length;F--;)wn(a[F]);xn(e)}else e.__e=r.__e,e.__k=r.__k,te.then||xn(e);B.__e(te,e,r)}else a==null&&e.__v==r.__v?(e.__k=r.__k,e.__e=r.__e):l=e.__e=ru(r.__e,e,r,o,n,a,s,c,u);return(p=B.diffed)&&p(e),128&e.__u?void 0:l}function xn(t){t&&t.__c&&(t.__c.__e=!0),t&&t.__k&&t.__k.forEach(xn)}function os(t,e,r){for(var o=0;o<r.length;o++)kn(r[o],r[++o],r[++o]);B.__c&&B.__c(e,t),t.some(function(n){try{t=n.__h,n.__h=[],t.some(function(a){a.call(n)})}catch(a){B.__e(a,n.__v)}})}function ns(t){return typeof t!="object"||t==null||t.__b&&t.__b>0?t:ao(t)?t.map(ns):$e({},t)}function ru(t,e,r,o,n,a,s,l,c){var u,p,d,h,m,y,b,C=r.props||yr,f=e.props,g=e.type;if(g=="svg"?n="http://www.w3.org/2000/svg":g=="math"?n="http://www.w3.org/1998/Math/MathML":n||(n="http://www.w3.org/1999/xhtml"),a!=null){for(u=0;u<a.length;u++)if((m=a[u])&&"setAttribute"in m==!!g&&(g?m.localName==g:m.nodeType==3)){t=m,a[u]=null;break}}if(t==null){if(g==null)return document.createTextNode(f);t=document.createElementNS(n,g,f.is&&f),l&&(B.__m&&B.__m(e,a),l=!1),a=null}if(g==null)C===f||l&&t.data==f||(t.data=f);else{if(a=a&&no.call(t.childNodes),!l&&a!=null)for(C={},u=0;u<t.attributes.length;u++)C[(m=t.attributes[u]).name]=m.value;for(u in C)if(m=C[u],u!="children"){if(u=="dangerouslySetInnerHTML")d=m;else if(!(u in f)){if(u=="value"&&"defaultValue"in f||u=="checked"&&"defaultChecked"in f)continue;eo(t,u,null,m,n)}}for(u in f)m=f[u],u=="children"?h=m:u=="dangerouslySetInnerHTML"?p=m:u=="value"?y=m:u=="checked"?b=m:l&&typeof m!="function"||C[u]===m||eo(t,u,m,C[u],n);if(p)l||d&&(p.__html==d.__html||p.__html==t.innerHTML)||(t.innerHTML=p.__html),e.__k=[];else if(d&&(t.innerHTML=""),ts(e.type=="template"?t.content:t,ao(h)?h:[h],e,r,o,g=="foreignObject"?"http://www.w3.org/1999/xhtml":n,a,s,a?a[0]:r.__k&&Gt(r,0),l,c),a!=null)for(u=a.length;u--;)wn(a[u]);l||(u="value",g=="progress"&&y==null?t.removeAttribute("value"):y!=null&&(y!==t[u]||g=="progress"&&!y||g=="option"&&y!=C[u])&&eo(t,u,y,C[u],n),u="checked",b!=null&&b!=t[u]&&eo(t,u,b,C[u],n))}return t}function kn(t,e,r){try{if(typeof t=="function"){var o=typeof t.__u=="function";o&&t.__u(),o&&e==null||(t.__u=t(e))}else t.current=e}catch(n){B.__e(n,r)}}function as(t,e,r){var o,n;if(B.unmount&&B.unmount(t),(o=t.ref)&&(o.current&&o.current!=t.__e||kn(o,null,e)),(o=t.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(a){B.__e(a,e)}o.base=o.__P=null}if(o=t.__k)for(n=0;n<o.length;n++)o[n]&&as(o[n],e,r||typeof t.type!="function");r||wn(t.__e),t.__c=t.__=t.__e=void 0}function ou(t,e,r){return this.constructor(t,r)}function zt(t,e,r){var o,n,a,s;e==document&&(e=document.documentElement),B.__&&B.__(t,e),n=(o=typeof r=="function")?null:r&&r.__k||e.__k,a=[],s=[],In(e,t=(!o&&r||e).__k=i(ie,null,[t]),n||yr,yr,e.namespaceURI,!o&&r?[r]:n?null:e.firstChild?no.call(e.childNodes):null,a,!o&&r?r:n?n.__e:e.firstChild,o,s),os(a,t,s)}function so(t){function e(r){var o,n;return this.getChildContext||(o=new Set,(n={})[e.__c]=this,this.getChildContext=function(){return n},this.componentWillUnmount=function(){o=null},this.shouldComponentUpdate=function(a){this.props.value!=a.value&&o.forEach(function(s){s.__e=!0,An(s)})},this.sub=function(a){o.add(a);var s=a.componentWillUnmount;a.componentWillUnmount=function(){o&&o.delete(a),s&&s.call(a)}}),r.children}return e.__c="__cC"+Ja++,e.__=t,e.Provider=e.__l=(e.Consumer=function(r,o){return r.children(o)}).contextType=e,e}no=Qa.slice,B={__e:function(t,e,r,o){for(var n,a,s;e=e.__;)if((n=e.__c)&&!n.__)try{if((a=n.constructor)&&a.getDerivedStateFromError!=null&&(n.setState(a.getDerivedStateFromError(t)),s=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(t,o||{}),s=n.__d),s)return n.__E=n}catch(l){t=l}throw t}},Wa=0,Jc=function(t){return t!=null&&t.constructor===void 0},ro.prototype.setState=function(t,e){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=$e({},this.state),typeof t=="function"&&(t=t($e({},r),this.props)),t&&$e(r,t),t!=null&&this.__v&&(e&&this._sb.push(e),An(this))},ro.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),An(this))},ro.prototype.render=ie,Pt=[],Za=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,qa=function(t,e){return t.__v.__b-e.__v.__b},oo.__r=0,Xa=/(PointerCapture)$|Capture$/i,Dn=0,Rn=$a(!1),Tn=$a(!0),Ja=0;function O(t,{insertAt:e}={}){if(!t||typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",e==="top"&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}O(`:root{--straumur__color-primary: #002649;--straumur__color-secondary: #72889d;--straumur__color-secondary-gamma: #eef0f2;--straumur__color-blue-beta: #bce6f3;--straumur__color-blue-gamma: #eff8fa;--straumur__color-neon-green-zeta: #88a64e;--straumur__color-red-beta: #d96666;--straumur__color-red-gamma: #fff8f5;--straumur__color-gray-epsilon: #e7e7e7;--straumur__color-cosmos-blue-delta: #cdd8e2;--straumur__color-cosmos-blue-gamma: #e6ebef;--straumur__color-white: #ffffff;--straumur__color-transparent: transparent;--straumur__color-brand-chip: #ffffff;--straumur__color-on-primary: var(--straumur__color-white);--straumur__color-text: #00112c;--straumur__color-border: #dbdee2;--straumur__color-warning-text: #775d00;--straumur__color-warning-bg: #fff7db;--straumur__color-danger-text: #d03e00;--straumur__color-success: #1f9d57;--straumur__border-radius-xxs: 4px;--straumur__border-radius-xs: 6px;--straumur__border-radius-s: 8px;--straumur__border-radius-md: 10px;--straumur__border-radius-lg: 12px;--straumur__border-radius-xlg: 14px;--straumur__border-radius-xxlg: 16px;--straumur__space-xxs: 4px;--straumur__space-xs: 6px;--straumur__space-s: 8px;--straumur__space-md: 10px;--straumur__space-lg: 12px;--straumur__space-xlg: 14px;--straumur__space-xxlg: 16px;--straumur__space-3xlg: 18px;--straumur__space-4xlg: 20px;--straumur__space-5xlg: 24px;--straumur__space-6xlg: 32px;--straumur__space-7xlg: 40px;--straumur__space-8xlg: 48px;--apple-pay-button-width: 100%;--apple-pay-button-height: 48px;--apple-pay-button-border-radius: var(--straumur__border-radius-lg)}.straumur__root-component{font-family:AkzidenzGroteskPro,sans-serif;color:var(--straumur__color-text);min-width:320px;container:straumur / inline-size;-webkit-tap-highlight-color:transparent}.straumur__root-component[data-theme=dark]{--straumur__color-primary: #e8edf2;--straumur__color-secondary: #9aa7b5;--straumur__color-secondary-gamma: #2a313b;--straumur__color-blue-beta: #24506b;--straumur__color-blue-gamma: #1b2733;--straumur__color-neon-green-zeta: #9cbf5e;--straumur__color-red-beta: #e08a8a;--straumur__color-red-gamma: #2e2020;--straumur__color-gray-epsilon: #3a424d;--straumur__color-cosmos-blue-delta: #3a424d;--straumur__color-cosmos-blue-gamma: #262d36;--straumur__color-white: #0d0f13;--straumur__color-text: #e8edf2;--straumur__color-border: #3a424d;--straumur__color-warning-text: #e6c766;--straumur__color-warning-bg: #2f2a17;--straumur__color-danger-text: #f0895f;--straumur__color-success: #3fd98a}.straumur__component *{font-family:inherit}.straumur__render-brand-icons__overflow{color:var(--straumur__color-secondary)}.straumur__brand-chip{display:inline-flex;background:var(--straumur__color-brand-chip);border:1px solid var(--straumur__color-border);border-radius:var(--straumur__border-radius-xxs);overflow:hidden}.straumur__component{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--straumur__space-5xlg);padding:var(--straumur__space-6xlg);width:100%;min-height:300px;background-color:var(--straumur__color-white);border-radius:var(--straumur__border-radius-xxlg)}.straumur__result-message{max-width:320px;margin:0;padding:0 var(--straumur__space-4xlg);text-align:center;font-size:16px;line-height:24px;color:var(--straumur__color-text)}.js-iframe{border:none;color-scheme:auto;height:100%;overflow:hidden;width:100%}.adyen-checkout__threeds2__challenge.adyen-checkout__threeds2__challenge--05{background-color:transparent;display:block;height:inherit;min-height:400px;overflow:hidden;position:relative;width:100%}
|
|
2
|
-
`);var nu=()=>({STAGING_BASE_URL:"https://checkout-api.staging.straumur.is/api/v1/embeddedcheckout",PRODUCTION_BASE_URL:"https://greidslugatt.straumur.is/api/v1/embeddedcheckout",GET_PAYMENT_METHODS_URL:"payment-methods",POST_PAYMENT_URL:"payment",POST_DETAILS_URL:"details",POST_DISABLE_TOKEN_URL:"disable-token"}),Rt=nu();function io(t){switch(t){case"test":return Rt.STAGING_BASE_URL;case"live":return Rt.PRODUCTION_BASE_URL;default:throw new Error(`Unknown environment: ${t}`)}}function ss(t,e){return fetch(`${io(t)}/${Rt.GET_PAYMENT_METHODS_URL}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}function is(t,e){return fetch(`${io(t)}/${Rt.POST_PAYMENT_URL}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}function ls(t,e){return fetch(`${io(t)}/${Rt.POST_DETAILS_URL}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}function ds(t,e){return fetch(`${io(t)}/${Rt.POST_DISABLE_TOKEN_URL}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}var lo={"en-US":{"cards.title":"Card payment","cards.cardNumber":"Card number","cards.expiryDate":"Expiry date","cards.securityCode3Digits":"Security code","cards.securityCode3DigitsOptional":"Security code (optional)","cards.securityCode3DigitsInfo":"3-digit on the back of the card","cards.securityCode4DigitsInfo":"4-digit on the back of the card","cards.storePaymentMethod":"Store payment information","cards.saveCardDetails":"Save card details","googlePay.title":"Google Pay","applePay.title":"Apple Pay","kortalan.title":"Kortal\xE1n","kortalan.payButton":"Continue to Kortal\xE1n","stored-cards.expiryDate":"Expiry date","stored-cards.securityCode3Digits":"Security code","stored-cards.securityCode3DigitsOptional":"Security code (optional)","stored-cards.securityCode3DigitsInfo":"3-digit on the back of the card","stored-cards.securityCode4DigitsInfo":"4-digit on the back of the card","stored-cards.removeStoredCard":"Remove","stored-cards.removeStoredCardQuestion":"Remove stored payment method?","stored-cards.removeStoredCardQuestionYesRemove":"Yes, remove","stored-cards.removeStoredCardQuestionCancel":"Cancel","stored-cards.saveCardDetails":"Save card details","success.paymentAuthorized":"Payment authorized","error.unknownError":"Unknown error occurred","error.failedToInitializeStraumurWebComponent":"Failed to initialize Straumur Web component","error.failedToInitializePaymentMethods":"Failed to initialize payment methods","error.failedToSubmitPayment":"Failed to submit payment","error.paymentFailed":"Payment failed","error.paymentUnsuccessful":"Payment unsuccessful","error.failedToSubmitPaymentDetails":"Failed to submit payment details","error.paymentDetailsFailed":"Payment details failed","error.googlePayNotAvailable":"Google Pay not available","error.applePayNotAvailable":"Apple Pay not available","error.failedToSubmitRemoveStoredPaymentCard":"Failed to remove stored payment card","error.failedToRemoveStoredPaymentCard":"Stored payment card was not removed"},"is-IS":{"cards.title":"Grei\xF0a me\xF0 korti","cards.cardNumber":"Kortan\xFAmer","cards.expiryDate":"Gildisdagur","cards.securityCode3Digits":"\xD6ryggisk\xF3\xF0i","cards.securityCode3DigitsOptional":"\xD6ryggisk\xF3\xF0i (valkv\xE6tt)","cards.securityCode3DigitsInfo":"3 t\xF6lustafir aftan \xE1 kortinu","cards.securityCode4DigitsInfo":"4 t\xF6lustafir aftan \xE1 kortinu","cards.storePaymentMethod":"Vista grei\xF0sluuppl\xFDsingar","cards.saveCardDetails":"Vista kortauppl\xFDsingar","googlePay.title":"Google Pay","applePay.title":"Apple Pay","kortalan.title":"Kortal\xE1n","kortalan.payButton":"\xC1fram \xED Kortal\xE1n","stored-cards.expiryDate":"Gildisdagur","stored-cards.securityCode3Digits":"\xD6ryggisk\xF3\xF0i","stored-cards.securityCode3DigitsOptional":"\xD6ryggisk\xF3\xF0i (valkv\xE6tt)","stored-cards.securityCode3DigitsInfo":"3 t\xF6lustafir aftan \xE1 kortinu","stored-cards.securityCode4DigitsInfo":"4 t\xF6lustafir aftan \xE1 kortinu","stored-cards.removeStoredCard":"Fjarl\xE6gja","stored-cards.removeStoredCardQuestion":"Fjarl\xE6gja geymdan grei\xF0slum\xE1ta?","stored-cards.removeStoredCardQuestionYesRemove":"J\xE1, fjarl\xE6gja","stored-cards.removeStoredCardQuestionCancel":"H\xE6tta vi\xF0","stored-cards.saveCardDetails":"Vista kortauppl\xFDsingar","success.paymentAuthorized":"Grei\xF0sla sam\xFEykkt","error.unknownError":"\xD3\xFEekkt villa kom upp","error.failedToInitializeStraumurWebComponent":"Mist\xF3kst a\xF0 s\xE6kja Straumur Web hluta","error.failedToInitializePaymentMethods":"Mist\xF3kst a\xF0 s\xE6kja grei\xF0slum\xE1ta","error.failedToSubmitPayment":"Mist\xF3kst a\xF0 senda grei\xF0slu","error.paymentFailed":"Grei\xF0sla mist\xF3kst","error.paymentUnsuccessful":"Grei\xF0sla ekki tekin","error.failedToSubmitPaymentDetails":"Mist\xF3kst a\xF0 senda grei\xF0sluuppl\xFDsingar","error.paymentDetailsFailed":"Mist\xF3kst a\xF0 s\xE6kja grei\xF0sluuppl\xFDsingar","error.googlePayNotAvailable":"Google Pay ekki \xED bo\xF0i","error.applePayNotAvailable":"Apple Pay ekki \xED bo\xF0i","error.failedToSubmitRemoveStoredPaymentCard":"Mist\xF3kst a\xF0 fjarl\xE6gja geymdan grei\xF0slum\xE1ta","error.failedToRemoveStoredPaymentCard":"Geymdur grei\xF0slum\xE1ti var ekki fjarl\xE6g\xF0ur"}};function cs(t){return typeof t=="string"&&(t in lo["en-US"]||t in lo["is-IS"])}async function us(t,e){try{let r=await ss(t,{sessionId:e});if(!r.ok){let n=r.headers.get("content-type"),a="error.failedToInitializePaymentMethods";if(n&&n.includes("application/json")){let s=(await r.json()).errorMessage;cs(s)&&(a=s)}return{resultCode:"Error",error:a}}return{resultCode:"Success",...await r.json()}}catch{return{resultCode:"Error",error:"error.failedToInitializePaymentMethods"}}}function co(t){switch(t){case"en":case"en-US":return"en-US";default:return"is-IS"}}var Tt,G,Nn,ps,gr=0,vs=[],oe=B,ms=oe.__b,hs=oe.__r,fs=oe.diffed,_s=oe.__c,ys=oe.unmount,gs=oe.__;function Cr(t,e){oe.__h&&oe.__h(G,t,gr||e),gr=0;var r=G.__H||(G.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({}),r.__[t]}function T(t){return gr=1,au(Ss,t)}function au(t,e,r){var o=Cr(Tt++,2);if(o.t=t,!o.__c&&(o.__=[r?r(e):Ss(void 0,e),function(l){var c=o.__N?o.__N[0]:o.__[0],u=o.t(c,l);c!==u&&(o.__N=[u,o.__[1]],o.__c.setState({}))}],o.__c=G,!G.__f)){var n=function(l,c,u){if(!o.__c.__H)return!0;var p=o.__c.__H.__.filter(function(h){return!!h.__c});if(p.every(function(h){return!h.__N}))return!a||a.call(this,l,c,u);var d=o.__c.props!==l;return p.forEach(function(h){if(h.__N){var m=h.__[0];h.__=h.__N,h.__N=void 0,m!==h.__[0]&&(d=!0)}}),a&&a.call(this,l,c,u)||d};G.__f=!0;var a=G.shouldComponentUpdate,s=G.componentWillUpdate;G.componentWillUpdate=function(l,c,u){if(this.__e){var p=a;a=void 0,n(l,c,u),a=p}s&&s.call(this,l,c,u)},G.shouldComponentUpdate=n}return o.__N||o.__}function ne(t,e){var r=Cr(Tt++,3);!oe.__s&&Mn(r.__H,e)&&(r.__=t,r.u=e,G.__H.__h.push(r))}function bs(t,e){var r=Cr(Tt++,4);!oe.__s&&Mn(r.__H,e)&&(r.__=t,r.u=e,G.__h.push(r))}function pe(t){return gr=5,Es(function(){return{current:t}},[])}function Es(t,e){var r=Cr(Tt++,7);return Mn(r.__H,e)&&(r.__=t(),r.__H=e,r.__h=t),r.__}function vr(t,e){return gr=8,Es(function(){return t},e)}function po(t){var e=G.context[t.__c],r=Cr(Tt++,9);return r.c=t,e?(r.__==null&&(r.__=!0,e.sub(G)),e.props.value):t.__}function su(){for(var t;t=vs.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(uo),t.__H.__h.forEach(On),t.__H.__h=[]}catch(e){t.__H.__h=[],oe.__e(e,t.__v)}}oe.__b=function(t){G=null,ms&&ms(t)},oe.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),gs&&gs(t,e)},oe.__r=function(t){hs&&hs(t),Tt=0;var e=(G=t.__c).__H;e&&(Nn===G?(e.__h=[],G.__h=[],e.__.forEach(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(e.__h.forEach(uo),e.__h.forEach(On),e.__h=[],Tt=0)),Nn=G},oe.diffed=function(t){fs&&fs(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(vs.push(e)!==1&&ps===oe.requestAnimationFrame||((ps=oe.requestAnimationFrame)||iu)(su)),e.__H.__.forEach(function(r){r.u&&(r.__H=r.u),r.u=void 0})),Nn=G=null},oe.__c=function(t,e){e.some(function(r){try{r.__h.forEach(uo),r.__h=r.__h.filter(function(o){return!o.__||On(o)})}catch(o){e.some(function(n){n.__h&&(n.__h=[])}),e=[],oe.__e(o,r.__v)}}),_s&&_s(t,e)},oe.unmount=function(t){ys&&ys(t);var e,r=t.__c;r&&r.__H&&(r.__H.__.forEach(function(o){try{uo(o)}catch(n){e=n}}),r.__H=void 0,e&&oe.__e(e,r.__v))};var Cs=typeof requestAnimationFrame=="function";function iu(t){var e,r=function(){clearTimeout(o),Cs&&cancelAnimationFrame(e),setTimeout(t)},o=setTimeout(r,35);Cs&&(e=requestAnimationFrame(r))}function uo(t){var e=G,r=t.__c;typeof r=="function"&&(t.__c=void 0,r()),G=e}function On(t){var e=G;t.__c=t.__(),G=e}function Mn(t,e){return!t||t.length!==e.length||e.some(function(r,o){return r!==t[o]})}function Ss(t,e){return typeof e=="function"?e(t):e}O(`.straumur__card-component--brands{display:flex;margin-left:auto;align-items:center;gap:var(--straumur__space-xxs)}.straumur__card-component__expandable{background:var(--straumur__color-white)}.straumur__card-component__loading-text{display:flex;justify-content:center}.straumur__card-component__form{display:flex;padding-top:var(--straumur__space-xxlg);flex-direction:column;gap:var(--straumur__space-5xlg)}.straumur__card-component__form--wrapper{display:flex;flex-direction:column;justify-items:start;position:relative;width:100%}.straumur__card-component__form--wrapper--error{color:var(--straumur__color-red-beta);font-size:12px}.straumur__card-component__form--wrapper--label{transform:translate(var(--straumur__space-md)) translateY(-50%);z-index:1;background:linear-gradient(to top,var(--straumur__color-secondary-gamma) 53%,var(--straumur__color-transparent) 50%);position:absolute;font-weight:500;font-size:14px;padding:0 var(--straumur__space-xxs)}.straumur__card-component__form--wrapper--label--error{color:var(--straumur__color-red-beta);background:linear-gradient(to top,var(--straumur__color-red-gamma) 53%,var(--straumur__color-transparent) 50%)}.straumur__card-component__form--wrapper--label--info{position:absolute;top:33%;right:var(--straumur__space-md)}.straumur__card-component__form--wrapper--input{background:var(--straumur__color-secondary-gamma);color:var(--straumur__color-text);display:block;font-family:inherit;border:1px solid var(--straumur__color-transparent);border-radius:var(--straumur__border-radius-s);font-size:16px;height:48px;outline:none;padding-left:var(--straumur__space-lg);transition:border .2s ease-out,box-shadow .2s ease-out}.straumur__card-component__form--wrapper--input:hover{border:1px solid var(--straumur__color-cosmos-blue-delta)}.straumur__card-component__form--wrapper--input--error{background:var(--straumur__color-red-gamma);border:1px solid var(--straumur__color-red-beta)}.straumur__card-component__form--wrapper--input--error:hover{border:1px solid var(--straumur__color-red-beta)}.straumur__card-component__form--field-wrapper{display:flex;width:100%;gap:var(--straumur__space-lg)}.straumur__card-component__submit-button{background:var(--straumur__color-primary);border:none;border-radius:var(--straumur__border-radius-s);color:var(--straumur__color-on-primary);cursor:pointer;font-size:16px;height:40px;outline:none;padding:0 var(--straumur__space-xxlg);transition:background .2s ease-out;width:100%}.straumur__card-component__submit-button:hover{background:var(--straumur__color-primary);border:1px solid var(--straumur__color-border)}.straumur__card-component__submit-button:disabled{background:var(--straumur__color-gray-epsilon);color:var(--straumur__color-secondary);border:1px solid var(--straumur__color-border);cursor:not-allowed}.straumur__card-component__form--wrapper--label-checkbox{height:38px;display:flex;align-items:center;padding:8px;gap:var(--straumur__space-s);border-radius:var(--straumur__border-radius-s);cursor:pointer;user-select:none;transition:background-color .25s ease-in-out}.straumur__card-component__form--wrapper--label-checkbox:hover{background-color:var(--straumur__color-blue-gamma)}.straumur__card-component__form--wrapper--label-checkbox:hover .straumur__card-component__form--wrapper--label-checkbox--checkmark{border:1px solid var(--straumur__color-cosmos-blue-delta)}.straumur__card-component__form--wrapper--label-checkbox--checkmark{height:var(--straumur__space-5xlg);width:var(--straumur__space-5xlg);background-color:var(--straumur__color-secondary-gamma);border-radius:var(--straumur__border-radius-xxs);flex-shrink:0;border:1px solid var(--straumur__color-transparent);transition:all .2s ease-in}.straumur__card-component__form--wrapper--label-checkbox:hover .straumur__card-component__form--wrapper--label-checkbox--checkmark.straumur__card-component__form--wrapper--label-checkbox--checkmark--checked{border:1px solid var(--straumur__color-transparent)}.straumur__card-component__form--wrapper--label-checkbox--checkmark--checked{background-color:var(--straumur__color-primary)}.straumur__card-component__form--wrapper--label-checkbox--checkmark--icon{height:100%;display:flex;justify-content:center;align-items:center;font-size:9px;opacity:0;visibility:hidden;transition:all .2s ease-in}.straumur__card-component__form--wrapper--label-checkbox--checkmark--icon--checked{opacity:1;visibility:visible}.straumur__card-component__form--wrapper--label-checkbox--checkbox{display:none}.js-iframe{border:none;color-scheme:auto;height:100%;overflow:hidden;width:100%}.straumur__card-component__dual-branding{display:grid;grid-template-columns:1fr 1fr;gap:var(--straumur__space-lg)}.straumur__card-component__dual-branding--logo{display:flex;align-items:center;padding:var(--straumur__space-xs);border:1px solid var(--straumur__color-secondary-gamma);border-radius:var(--straumur__border-radius-s)}.straumur__card-component__dual-branding--logo--item{display:flex;pointer-events:none}.straumur__card-component__dual-branding--logo--selected{border:1px solid var(--straumur__color-cosmos-blue-delta);justify-content:space-between}
|
|
3
|
-
`);var Ps=so(void 0),lu={card:!1,storedcard:!1,googlepay:!1,applepay:!1,kortalan:!1},Rs=({children:t,initialValue:e,initialStoredPaymentMethodId:r=null,isSolePaymentMethod:o,hasCard:n,hasGooglePay:a,hasApplePay:s,hasKortalan:l,hasStoredPaymentMethods:c,onSubmitApiReady:u})=>{let[p,d]=T(e),h=pe(null),m=vr(ae=>{h.current=ae},[]),y=vr(ae=>{h.current===ae&&(h.current=null)},[]),b=vr(()=>{let ae=h.current;return ae?(ae(),!0):!1},[]);bs(()=>{u?.({triggerSubmit:b})},[]);let[C,f]=T(r),[g,k]=T(!1),[E,H]=T(lu),[Y,$]=T({}),[ee,M]=T(null),[F,L]=T(null),te=(ae,ze)=>{H(je=>({...je,[ae]:ze}))},Se=(ae,ze)=>{$(je=>({...je,[ae]:ze}))},St=vr(ae=>g&&p!==ae,[g,p]),ot=ae=>{L(ae)},Kt=ae=>{M(ae)};return i(Ps.Provider,{value:{activePaymentMethod:p,setActivePaymentMethod:d,activeStoredPaymentMethodId:C,setActiveStoredPaymentMethodId:f,isPaymentMethodInitialized:E,updatePaymentMethodInitialization:te,isStoredCardInitialized:Y,updateStoredCardInitialization:Se,handleSuccess:Kt,success:ee,handleError:ot,error:F,threeDSecureActive:g,setThreeDSecureActive:k,isObscuredByThreeDS:St,isSolePaymentMethod:o,hasCard:n,hasGooglePay:a,hasApplePay:s,hasKortalan:l,hasStoredPaymentMethods:c,registerSubmitHandler:m,unregisterSubmitHandler:y}},t)},Z=()=>{let t=po(Ps);if(t===void 0)throw new Error("usePaymentMethodGroup must be used within a PaymentMethodGroup");return t};var Ts=so(void 0),As=({children:t,i18nService:e,onLanguageChange:r})=>{let o=n=>{e.setLanguage(n),r?.(n)};return i(Ts.Provider,{value:{i18n:e,changeLanguage:o}},t)},ye=()=>{let t=po(Ts);if(!t)throw new Error("useI18n must be used within an I18nProvider");return t};var du=()=>i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"26",viewBox:"0 0 24 24",fill:"none"},i("path",{d:"M24 11H0V7H24V11Z",fill:"currentColor"}),i("path",{opacity:"0.4",d:"M21.3333 3C22.8042 3 24 4.19375 24 5.66667V7H0V5.66667C0 4.19375 1.19375 3 2.66667 3H21.3333ZM24 19C24 20.4708 22.8042 21.6667 21.3333 21.6667H2.66667C1.19375 21.6667 0 20.4708 0 19V11H24V19ZM4.66667 16.3333C4.3 16.3333 4 16.6333 4 17C4 17.3667 4.3 17.6667 4.66667 17.6667H7.33333C7.7 17.6667 8 17.3667 8 17C8 16.6333 7.7 16.3333 7.33333 16.3333H4.66667ZM10 17.6667H15.3333C15.7 17.6667 16 17.3667 16 17C16 16.6333 15.7 16.3333 15.3333 16.3333H10C9.63333 16.3333 9.33333 16.6333 9.33333 17C9.33333 17.3667 9.63333 17.6667 10 17.6667Z",fill:"currentColor"})),xs=du;var cu=({opacity:t=1,reversed:e=!1})=>i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"19.5",viewBox:"0 0 40 26",opacity:t},!e&&i("path",{fill:"#fff",d:"M0 0h40v26H0z"}),i("path",{fill:"#F06022",d:"M16.13 19.29h7.74V6.7h-7.74v12.58z"}),i("path",{fill:"#EA1D25",d:"M16.93 13A7.93 7.93 0 0 1 20 6.71a8.02 8.02 0 0 0-10.65.65 7.96 7.96 0 0 0 0 11.28 8.02 8.02 0 0 0 10.65.65A8.02 8.02 0 0 1 16.93 13"}),i("path",{fill:"#F79D1D",d:"M33 13c0 2.12-.84 4.15-2.34 5.65a8.1 8.1 0 0 1-10.66.64A8.05 8.05 0 0 0 23.07 13 7.96 7.96 0 0 0 20 6.71a8.02 8.02 0 0 1 10.66.64A7.93 7.93 0 0 1 33 13"})),Ds=cu;var uu=({opacity:t=1,reversed:e=!1})=>i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"19.5",fill:"none",viewBox:"0 0 40 26",opacity:t},!e&&i("path",{fill:"#fff",d:"M0 0h40v26H0z"}),i("path",{fill:e?"#fff":"#1434CB",d:"m15.9 7.7-4.43 10.6h-2.9l-2.2-8.47c-.13-.52-.25-.71-.65-.93C5.05 8.55 3.96 8.2 3 8l.07-.32h4.67c.6 0 1.13.4 1.27 1.09l1.15 6.14 2.86-7.23h2.89Zm11.39 7.15c0-2.8-3.88-2.96-3.85-4.21 0-.38.37-.79 1.16-.9a5.2 5.2 0 0 1 2.71.48l.48-2.25a7.4 7.4 0 0 0-2.57-.47c-2.71 0-4.62 1.44-4.64 3.51-.02 1.53 1.36 2.38 2.4 2.9 1.08.51 1.44.85 1.43 1.31 0 .71-.85 1.03-1.64 1.04-1.39.02-2.19-.37-2.82-.67l-.5 2.33c.64.29 1.82.55 3.05.56 2.89 0 4.78-1.42 4.79-3.63Zm7.17 3.46H37L34.78 7.7h-2.34c-.53 0-.98.3-1.17.78l-4.12 9.84h2.88l.57-1.58h3.53l.33 1.58Zm-3.07-3.76 1.45-3.99.83 4H31.4ZM19.83 7.7l-2.27 10.62h-2.74L17.09 7.7h2.74Z"})),ws=uu;var pu=({opacity:t=1,reversed:e=!1})=>i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"19.5",fill:"none",viewBox:"0 0 40 26",opacity:t},!e&&i("path",{fill:"#fff",d:"M0 0h40v26H0z"}),i("path",{fill:"#7773B4",d:"M16.13 19.29h7.74V6.7h-7.74v12.58z"}),i("path",{fill:"#EA1D25",d:"M16.93 13A7.93 7.93 0 0 1 20 6.71a8.02 8.02 0 0 0-10.65.65 7.96 7.96 0 0 0 0 11.28 8.02 8.02 0 0 0 10.65.65A8.02 8.02 0 0 1 16.93 13"}),i("path",{fill:"#139FDA",d:"M33 13c0 2.12-.84 4.15-2.34 5.65a8.1 8.1 0 0 1-10.66.64A8.05 8.05 0 0 0 23.07 13 7.96 7.96 0 0 0 20 6.71a8.02 8.02 0 0 1 10.66.64A7.93 7.93 0 0 1 33 13"})),Is=pu;var mu=({opacity:t=1})=>i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 40 26",width:"30",height:"19.5",opacity:t},i("path",{fill:"#016FD0",d:"M0 26h40V0H0v26z"}),i("path",{fill:"#fff","fill-rule":"evenodd",d:"M30.69 13.63v1.64h-4.17v1.14h4.07v1.64h-4.07v1.12h4.17v1.66l3.38-3.6-3.38-3.6zm-1.1-6.14-1.4-3.19h-4l-4.1 9.32h3.33v8.27l10.28.01 1.61-1.8 1.63 1.8H40v-2.63l-1.92-2.06L40 15.16v-2.59l-1.93.01V7.6l-1.81 4.98H34.5l-1.86-5v5h-4.2l-.6-1.46h-3.3l-.6 1.46h-2.22l3.23-7.27V5.3h2.55l3.19 7.21V5.3l3.1.01 1.6 4.47 1.62-4.48H40v-1h-3.77l-.85 2.39-.85-2.39h-4.94v3.19zm-5.06 6.11v7.27h6.16v-.01h2.54l2.1-2.32 2.12 2.32H40v-.1l-3.34-3.53L40 13.65v-.05h-2.52l-2.1 2.3-2.08-2.3h-8.77zm.7-4.11.96-2.31.97 2.31h-1.93z"})),ks=mu;var hu=({opacity:t=1})=>i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"19.5",fill:"none",viewBox:"0 0 40 26",opacity:t},i("g",{"clip-path":"url(#a)"},i("path",{fill:"#fff",d:"M0 0h40v26H0V0Z"}),i("path",{fill:"#fff",d:"M36.6 20.66a5.22 5.22 0 0 1-5.22 5.22H3V5.22A5.22 5.22 0 0 1 8.22 0H36.6v20.66Z"}),i("path",{fill:"url(#b)",d:"M27.36 15.36h2.15l.27-.02a.96.96 0 0 0 .76-.96 1 1 0 0 0-.76-.97c-.06-.02-.19-.02-.27-.02h-2.15v1.97Z"}),i("path",{fill:"url(#c)",d:"M29.27 1.75a3.74 3.74 0 0 0-3.74 3.73v3.89h5.28c.12 0 .26 0 .37.02 1.19.06 2.07.67 2.07 1.74 0 .84-.6 1.56-1.7 1.7v.05c1.2.08 2.13.76 2.13 1.8 0 1.13-1.03 1.87-2.38 1.87h-5.8v7.6H31a3.74 3.74 0 0 0 3.73-3.74V1.75h-5.46Z"}),i("path",{fill:"url(#d)",d:"M30.27 11.38c0-.5-.35-.82-.76-.89l-.2-.02h-1.95v1.81h1.95c.06 0 .18 0 .2-.02a.87.87 0 0 0 .76-.88Z"}),i("path",{fill:"url(#e)",d:"M8.6 1.75a3.74 3.74 0 0 0-3.73 3.73v9.22a7.4 7.4 0 0 0 3.22.85c1.3 0 2-.78 2-1.85V9.34h3.2v4.34c0 1.68-1.05 3.06-4.6 3.06-2.16 0-3.84-.47-3.84-.47v7.86h5.48a3.74 3.74 0 0 0 3.74-3.74V1.75H8.6Z"}),i("path",{fill:"url(#f)",d:"M18.94 1.75a3.74 3.74 0 0 0-3.74 3.73v4.9c.94-.8 2.59-1.32 5.24-1.2 1.41.06 2.93.45 2.93.45v1.58a7.1 7.1 0 0 0-2.83-.82c-2.01-.14-3.23.84-3.23 2.57 0 1.74 1.22 2.73 3.23 2.57a7.46 7.46 0 0 0 2.83-.82v1.58s-1.5.39-2.93.45c-2.65.12-4.3-.4-5.24-1.2v8.63h5.48a3.74 3.74 0 0 0 3.74-3.74V1.75h-5.48Z"})),i("defs",null,i("linearGradient",{id:"b",x1:"25.52",x2:"34.75",y1:"14.38",y2:"14.38",gradientUnits:"userSpaceOnUse"},i("stop",{offset:"0","stop-color":"#007940"}),i("stop",{offset:".23","stop-color":"#00873F"}),i("stop",{offset:".74","stop-color":"#40A737"}),i("stop",{offset:"1","stop-color":"#5CB531"})),i("linearGradient",{id:"c",x1:"25.52",x2:"34.75",y1:"12.94",y2:"12.94",gradientUnits:"userSpaceOnUse"},i("stop",{offset:"0","stop-color":"#007940"}),i("stop",{offset:".23","stop-color":"#00873F"}),i("stop",{offset:".74","stop-color":"#40A737"}),i("stop",{offset:"1","stop-color":"#5CB531"})),i("linearGradient",{id:"d",x1:"25.52",x2:"34.75",y1:"11.37",y2:"11.37",gradientUnits:"userSpaceOnUse"},i("stop",{offset:"0","stop-color":"#007940"}),i("stop",{offset:".23","stop-color":"#00873F"}),i("stop",{offset:".74","stop-color":"#40A737"}),i("stop",{offset:"1","stop-color":"#5CB531"})),i("linearGradient",{id:"e",x1:"4.86",x2:"14.24",y1:"12.94",y2:"12.94",gradientUnits:"userSpaceOnUse"},i("stop",{offset:"0","stop-color":"#1F286F"}),i("stop",{offset:".48","stop-color":"#004E94"}),i("stop",{offset:".83","stop-color":"#0066B1"}),i("stop",{offset:"1","stop-color":"#006FBC"})),i("linearGradient",{id:"f",x1:"15.15",x2:"24.25",y1:"12.94",y2:"12.94",gradientUnits:"userSpaceOnUse"},i("stop",{offset:"0","stop-color":"#6C2C2F"}),i("stop",{offset:".17","stop-color":"#882730"}),i("stop",{offset:".57","stop-color":"#BE1833"}),i("stop",{offset:".86","stop-color":"#DC0436"}),i("stop",{offset:"1","stop-color":"#E60039"})),i("clipPath",{id:"a"},i("path",{fill:"#fff",d:"M0 0h40v26H0z"})))),Ns=hu;var fu=({opacity:t=1})=>i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 40 26",width:"30",height:"19.5",opacity:t},i("path",{fill:"#fff",d:"M0 0h40v26H0z"}),i("g",{fill:"#1a1918"},i("path",{d:"M5.96 15.58c0-.56-.3-.52-.58-.53v-.16H7.2a2.28 2.28 0 0 1 2.5 2.2c0 .61-.36 2.17-2.57 2.17H5.38v-.16c.38-.04.56-.05.58-.48zm.61 2.94c0 .49.35.54.65.54a1.75 1.75 0 0 0 1.8-1.95 1.88 1.88 0 0 0-1.96-2.02c-.26 0-.37.02-.49.02zm3.36.58h.12c.17 0 .3 0 .3-.2v-1.7c0-.28-.1-.32-.33-.44v-.1l.67-.23a.22.22 0 0 1 .11-.03c.03 0 .05.04.05.09v2.4c0 .21.13.21.3.21h.11v.16H9.93zm.67-3.67a.3.3 0 0 1 0-.61.3.3 0 0 1 .3.3.31.31 0 0 1-.3.31zm1.26 1.8c0-.23-.07-.3-.36-.41v-.12a8.44 8.44 0 0 0 .82-.3c.02 0 .04.01.04.06v.4a1.83 1.83 0 0 1 1.08-.46c.53 0 .72.39.72.88v1.61c0 .21.14.21.31.21h.12v.16h-1.34v-.16h.11c.18 0 .3 0 .3-.2v-1.63c0-.36-.22-.53-.57-.53a1.66 1.66 0 0 0-.73.3v1.85c0 .21.14.21.31.21h.12v.16h-1.34v-.16h.1c.18 0 .3 0 .3-.2v-1.67m3.21.3a1.55 1.55 0 0 0 0 .37 1.05 1.05 0 0 0 .92 1.08 1.2 1.2 0 0 0 .85-.42l.08.09a1.47 1.47 0 0 1-1.15.7 1.26 1.26 0 0 1-1.2-1.36c0-1.23.83-1.6 1.27-1.6a1 1 0 0 1 1.05 1 .74.74 0 0 1 0 .1l-.06.04zm1.11-.2c.16 0 .18-.08.18-.16a.53.53 0 0 0-.55-.57c-.38 0-.64.28-.72.73zm.86 1.77h.17c.17 0 .3 0 .3-.2v-1.77c0-.2-.23-.23-.33-.28v-.1c.46-.19.7-.35.77-.35.03 0 .05.02.05.08v.56H18c.16-.24.42-.64.8-.64a.34.34 0 0 1 .36.33.3.3 0 0 1-.3.32c-.19 0-.19-.15-.4-.15a.53.53 0 0 0-.46.52v1.47c0 .21.12.21.3.21h.35v.16h-.88a26 26 0 0 0-.74 0zm2.41-.7a.83.83 0 0 0 .78.76.44.44 0 0 0 .51-.45c0-.74-1.36-.5-1.36-1.5a.86.86 0 0 1 .97-.81 1.64 1.64 0 0 1 .71.18l.04.64h-.14a.64.64 0 0 0-.68-.62.44.44 0 0 0-.49.41c0 .74 1.45.51 1.45 1.5 0 .4-.33.85-1.07.85a1.64 1.64 0 0 1-.77-.22l-.07-.72.12-.03m7.44-2.37h-.15A1.2 1.2 0 0 0 25.39 15a1.79 1.79 0 0 0-1.77 2 2.04 2.04 0 0 0 1.87 2.17 1.27 1.27 0 0 0 1.25-1.09l.15.04-.15.91a3.5 3.5 0 0 1-1.38.34A2.23 2.23 0 0 1 22.97 17a2.3 2.3 0 0 1 2.37-2.2 4.5 4.5 0 0 1 1.48.33l.06.9m.22 3.07h.13c.17 0 .3 0 .3-.2v-3.5c0-.4-.1-.42-.34-.49v-.1a3.96 3.96 0 0 0 .65-.27.66.66 0 0 1 .14-.07c.03 0 .05.04.05.1v4.32c0 .21.13.21.3.21h.12v.16H27.1zm4.02-.18c0 .11.07.12.18.12h.25v.12a6.33 6.33 0 0 0-.9.2l-.03-.02v-.5a1.69 1.69 0 0 1-1.11.52.68.68 0 0 1-.69-.75v-1.6c0-.17-.02-.32-.37-.35v-.12l.8-.05c.07 0 .07.05.07.18v1.62c0 .19 0 .73.55.73a1.4 1.4 0 0 0 .75-.38v-1.7c0-.12-.3-.18-.52-.25v-.11c.56-.04.91-.09.97-.09.05 0 .05.05.05.11zm1.25-2.07a1.58 1.58 0 0 1 .93-.45 1.22 1.22 0 0 1 1.16 1.31 1.58 1.58 0 0 1-1.5 1.65 1.84 1.84 0 0 1-.86-.22l-.19.14-.13-.07a7.37 7.37 0 0 0 .09-1.11v-2.7c0-.4-.1-.42-.33-.49v-.1a3.93 3.93 0 0 0 .64-.27.67.67 0 0 1 .14-.07c.04 0 .05.04.05.1zm0 1.7a.67.67 0 0 0 .64.64c.67 0 .95-.65.95-1.21a1.2 1.2 0 0 0-1-1.24.96.96 0 0 0-.6.3v1.51zM5.38 22.91h.04c.13 0 .26-.02.26-.2v-1.78c0-.18-.13-.2-.26-.2h-.04v-.1l.5.01.54-.01v.1h-.05c-.12 0-.25.02-.25.2v1.79c0 .17.13.19.25.19h.05v.1L5.88 23l-.5.01z"}),i("path",{d:"M6.42 23.03 5.88 23l-.5.02h-.02v-.14h.06c.13 0 .24 0 .24-.17v-1.8c0-.16-.11-.17-.24-.17h-.06v-.13h1.07v.13h-.06c-.13 0-.24.01-.24.18v1.79c0 .16.11.17.24.17h.06v.14zM6.4 23v-.08h-.03c-.12 0-.27-.02-.27-.2v-1.8c0-.18.15-.2.27-.2h.03v-.07h-1v.07h.03c.13 0 .27.02.27.2v1.8c0 .18-.14.2-.27.2H5.4V23l.49-.02.52.02zm2.35-.66h.01v-1.29a.28.28 0 0 0-.3-.32H8.4v-.1l.48.01.42-.01v.1h-.06c-.14 0-.3.03-.3.44v1.55a2.27 2.27 0 0 0 .02.34h-.13L7.07 21.1v1.41c0 .3.06.4.32.4h.06v.1L7 23l-.47.01v-.1h.05c.24 0 .3-.16.3-.43v-1.44a.3.3 0 0 0-.3-.3h-.05v-.11l.4.01.3-.01 1.51 1.71"}),i("path",{d:"M8.95 23.08h-.14l-1.73-1.94v1.37c0 .3.05.38.3.38h.08v.14h-.01L7 23l-.47.02h-.01v-.14h.06c.23 0 .3-.14.3-.41v-1.44a.3.3 0 0 0-.3-.3h-.06v-.12h.72l1.5 1.69v-1.26c0-.27-.19-.3-.29-.3h-.09v-.13h.94v.13h-.07c-.14 0-.28.01-.28.42v1.55a2.27 2.27 0 0 0 .02.34v.02zm-.13-.03h.11a2.3 2.3 0 0 1-.01-.33v-1.55c0-.41.17-.45.31-.45h.04v-.07H8.4v.07h.06a.3.3 0 0 1 .32.33v1.3h-.02v.01l-1.52-1.71h-.68v.07h.03a.32.32 0 0 1 .32.32v1.44c0 .27-.07.44-.32.45h-.03V23l.45-.02.42.02v-.07H7.4c-.27 0-.34-.12-.34-.42v-1.44l1.77 1.98zm-.07-.71.01-.01v.01zm0 0v-.01zM9.8 20.8c-.26 0-.27.06-.32.31h-.1l.04-.29a2.04 2.04 0 0 0 .02-.29h.08c.03.1.11.1.2.1h1.76c.1 0 .18 0 .18-.1h.09l-.04.28v.28l-.11.04c0-.13-.02-.33-.25-.33h-.56v1.82c0 .26.12.29.28.29h.07v.1l-.56-.01-.57.01v-.1h.06c.19 0 .28-.02.28-.29V20.8z"}),i("path",{d:"m11.14 23.03-.56-.02-.57.02h-.02v-.14h.08c.19 0 .26 0 .27-.27v-1.8H9.8v-.03h.57v1.83c0 .28-.11.3-.3.3h-.05V23l.56-.02.54.02v-.07h-.05c-.16 0-.3-.05-.3-.31v-1.83h.58c.23 0 .26.2.26.32l.08-.03a3.96 3.96 0 0 1 .04-.53h-.05c-.02.1-.11.1-.2.1H9.71c-.08 0-.17 0-.2-.1h-.06a2.04 2.04 0 0 1-.02.27c0 .1-.02.19-.04.28h.08c.04-.24.07-.32.33-.31v.03c-.26 0-.25.04-.3.3h-.14v-.01l.04-.3a1.93 1.93 0 0 0 .02-.28v-.01h.11c.03.1.09.1.18.1h1.77c.1 0 .16 0 .17-.1v-.01h.02l.1.02-.01.01-.04.28v.28h-.01l-.12.05v-.02c-.01-.13-.03-.31-.24-.31h-.55v1.8c0 .25.11.27.27.27h.08v.14zm.71-.12h.05c.12 0 .25-.02.25-.2v-1.78c0-.18-.13-.2-.25-.2h-.05v-.1l.85.01.87-.01.01.52-.1.03c-.02-.22-.06-.4-.42-.4h-.47v.9h.4c.2 0 .25-.12.27-.3h.1v.78l-.1.02c-.02-.2-.03-.33-.26-.33h-.4v.79c0 .22.19.22.4.22.41 0 .6-.03.7-.41l.1.02a7.7 7.7 0 0 0-.12.54l-.92-.01-.9.01v-.1"}),i("path",{d:"m13.68 23.03-.92-.02-.9.02h-.02v-.14h.06c.13 0 .24 0 .24-.17v-1.8c0-.16-.11-.17-.24-.17h-.06v-.13h1.75v.01a4.18 4.18 0 0 0 0 .52v.01l-.13.04v-.02c-.02-.22-.05-.38-.4-.38h-.46v.86h.4c.2 0 .23-.1.25-.29v-.01h.13v.01a8.08 8.08 0 0 0 0 .8h-.01l-.12.03v-.02c-.02-.2-.03-.32-.25-.32h-.4v.78c0 .2.18.2.4.2.42 0 .58-.02.68-.4v-.01h.02l.1.03v.01a7.8 7.8 0 0 0-.11.54v.02zm-.02-.03.11-.52-.06-.02c-.1.39-.3.42-.7.42-.22 0-.43 0-.44-.24v-.8H13c.24-.01.26.13.28.33l.07-.02a7.25 7.25 0 0 1 0-.76h-.07c-.02.18-.08.3-.29.3h-.42v-.92h.5c.35 0 .4.18.42.4l.07-.03a5.76 5.76 0 0 1 0-.5l-.86.02-.83-.01v.07h.03c.12 0 .27.02.27.2v1.8c0 .18-.15.2-.27.2h-.03V23l.89-.02zm.59-2c0-.26-.14-.27-.24-.27h-.06v-.1l.53.01.54-.01c.43 0 .81.12.81.6a.64.64 0 0 1-.47.6l.58.87a.38.38 0 0 0 .33.21v.1l-.33-.01-.32.01a9.45 9.45 0 0 1-.7-1.1h-.23v.73c0 .26.12.27.28.27h.06v.1l-.59-.01-.5.01v-.1h.07c.13 0 .24-.06.24-.18v-1.74zm.44.78h.16c.34 0 .53-.13.53-.53a.47.47 0 0 0-.5-.5 1.65 1.65 0 0 0-.2.02v1.01z"}),i("path",{d:"m16.27 23.03-.33-.02c-.1 0-.21.02-.33.01a9.54 9.54 0 0 1-.7-1.1h-.2v.72c0 .25.1.25.26.25h.07v.14h-.01l-.59-.02-.5.02v-.14H14c.12 0 .22-.05.23-.16v-1.74c0-.24-.13-.24-.23-.24h-.08v-.13h1.09c.43 0 .83.11.83.61a.65.65 0 0 1-.47.6l.57.87a.37.37 0 0 0 .32.2h.02v.13zm-1.58-1.14h.23a10.55 10.55 0 0 0 .7 1.1h.64v-.07a.39.39 0 0 1-.33-.2l-.6-.9h.02a.63.63 0 0 0 .47-.59c0-.47-.37-.58-.8-.58h-1.06v.07h.05c.1 0 .26.02.26.27v1.74c0 .13-.13.2-.26.2h-.05V23l.48-.02.57.02v-.07h-.04c-.16 0-.3-.02-.3-.3v-.74zm0-.1h-.02v-1.04h.01a1.63 1.63 0 0 1 .2-.01.48.48 0 0 1 .51.51c0 .4-.2.55-.54.55zm.16-.02c.34 0 .51-.12.51-.52a.45.45 0 0 0-.48-.48 1.33 1.33 0 0 0-.18.01v.99zm3.73.57h.01v-1.29a.28.28 0 0 0-.3-.32h-.07v-.1l.48.01.42-.01v.1h-.06c-.14 0-.3.03-.3.44v1.55a2.27 2.27 0 0 0 .02.34h-.13L16.9 21.1v1.41c0 .3.06.4.32.4h.06v.1l-.44-.01-.47.01v-.1h.05c.24 0 .3-.16.3-.43v-1.44a.3.3 0 0 0-.3-.3h-.05v-.11l.4.01.3-.01z"}),i("path",{d:"M18.78 23.08h-.14l-1.73-1.94v1.37c0 .3.05.38.3.38h.08v.14h-.01l-.44-.02-.47.02h-.01v-.14h.06c.23 0 .3-.14.3-.41v-1.44a.3.3 0 0 0-.3-.3h-.06v-.12h.71l1.5 1.69v-1.26c0-.27-.18-.3-.28-.3h-.09v-.13h.93v.13h-.07c-.14 0-.28.01-.28.42v1.55a2.15 2.15 0 0 0 .02.34v.02zm-.13-.03h.11a2.34 2.34 0 0 1-.01-.33v-1.55c0-.41.17-.45.31-.45h.04v-.07h-.87v.07h.06a.3.3 0 0 1 .32.33v1.3h-.02v.01l-1.52-1.71h-.68v.07h.03a.32.32 0 0 1 .32.32v1.44c0 .27-.07.44-.32.45h-.03V23l.45-.02.42.02v-.07h-.04c-.27 0-.34-.12-.34-.42v-1.44zm-.07-.71.01-.01v.01zm0 0v-.01zm1.08.18a1.38 1.38 0 0 0-.07.27c0 .1.14.12.25.12h.04v.1a7.72 7.72 0 0 0-.78 0v-.1h.02a.3.3 0 0 0 .3-.22l.54-1.57a2.87 2.87 0 0 0 .13-.42 1.73 1.73 0 0 0 .3-.15.08.08 0 0 1 .04 0 .02.02 0 0 1 .02 0l.03.1.63 1.78.12.34a.22.22 0 0 0 .23.14h.02v.1a9.66 9.66 0 0 0-.98 0v-.1h.03c.08 0 .22-.01.22-.1a1.1 1.1 0 0 0-.07-.25l-.14-.4h-.77l-.1.36zm.5-1.5-.32.96h.63l-.31-.97z"}),i("path",{d:"M21.48 23.03 21 23l-.51.02h-.02v-.14h.05c.08 0 .2-.01.2-.08a1.1 1.1 0 0 0-.07-.24l-.13-.39h-.75l-.1.35a1.41 1.41 0 0 0-.08.26c0 .08.13.1.24.1h.06v.14h-.02l-.41-.02-.37.02h-.01v-.14h.03a.3.3 0 0 0 .28-.2l.55-1.57a4.05 4.05 0 0 0 .13-.44 1.75 1.75 0 0 0 .31-.14.09.09 0 0 1 .03-.01.04.04 0 0 1 .04.02l.03.09.63 1.78c.04.12.08.25.13.35a.2.2 0 0 0 .2.12h.04v.14h-.01zM20.5 23l.5-.02.45.02v-.07a.23.23 0 0 1-.24-.15c-.05-.1-.09-.23-.13-.35l-.62-1.78-.03-.09h-.02a.08.08 0 0 0-.01 0 1.26 1.26 0 0 1-.3.14 2.83 2.83 0 0 1-.13.43l-.55 1.56a.32.32 0 0 1-.3.24h-.01V23l.35-.02.4.02v-.07h-.03c-.1 0-.26-.02-.27-.14a1.35 1.35 0 0 1 .08-.27h.01-.01l.11-.36h.8l.13.4a1.04 1.04 0 0 1 .07.25c0 .1-.15.11-.23.12h-.02zm-.7-1 .33-1h.03l.32 1zm.05-.04h.6l-.3-.91zm.28-.94h.01zm1.5-.22c-.26 0-.27.06-.32.31h-.1l.04-.29a2.1 2.1 0 0 0 .02-.29h.08c.03.1.11.1.2.1h1.76c.1 0 .18 0 .19-.1h.08l-.04.28v.28l-.1.04c-.02-.13-.03-.33-.26-.33h-.56v1.82c0 .26.12.29.28.29h.07v.1L22.4 23l-.57.01v-.1h.06c.19 0 .29-.02.29-.29V20.8h-.56"}),i("path",{d:"M22.97 23.03 22.4 23l-.57.02h-.02v-.14h.08c.19 0 .27 0 .27-.27v-1.8h-.54v-.03h.57v1.83c0 .28-.11.3-.3.3h-.05V23l.56-.02.54.02v-.07h-.05c-.16 0-.3-.05-.3-.31v-1.83h.58c.23 0 .26.2.26.32l.08-.03v-.27l.04-.26h-.05c-.02.1-.11.1-.2.1h-1.77c-.08 0-.17 0-.2-.1h-.06a2 2 0 0 1-.02.27c0 .1-.02.19-.04.28h.08c.04-.24.07-.32.33-.31v.03c-.26 0-.25.04-.3.3h-.14v-.01l.04-.29a1.98 1.98 0 0 0 .02-.29v-.01h.11c.03.1.1.1.18.1h1.77c.1 0 .17 0 .17-.1v-.01h.02l.1.02v.01l-.05.28v.28h-.01l-.12.05v-.02c-.01-.13-.03-.31-.24-.31h-.54v1.8c0 .25.1.27.26.27h.08v.14h-.01m.74-.12h.05c.12 0 .25-.02.25-.2v-1.78c0-.18-.13-.2-.25-.2h-.05v-.1l.5.01.54-.01v.1h-.05c-.12 0-.25.02-.25.2v1.79c0 .17.13.19.25.19h.05v.1L24.2 23l-.5.01z"}),i("path",{d:"M24.74 23.03 24.2 23l-.5.02h-.01v-.14h.06c.12 0 .24 0 .24-.17v-1.8c0-.16-.12-.17-.24-.17h-.06v-.13h1.07v.13h-.07c-.12 0-.23.01-.23.18v1.79c0 .16.1.17.23.17h.07v.14zm-.01-.03v-.07h-.04c-.12 0-.26-.03-.26-.21v-1.8c0-.18.14-.2.26-.2h.04v-.07H23.7v.07h.04c.12 0 .27.02.27.2v1.8c0 .18-.15.2-.27.2h-.03V23l.48-.02.53.02zm1.37-2.42a1.2 1.2 0 0 1 1.3 1.18 1.25 1.25 0 0 1-1.28 1.3 1.2 1.2 0 0 1-1.28-1.22 1.24 1.24 0 0 1 1.26-1.26m.05 2.33c.66 0 .78-.58.78-1.08s-.27-1.1-.84-1.1c-.6 0-.77.53-.77.99 0 .6.28 1.2.83 1.2"}),i("path",{d:"M24.83 21.84a1.26 1.26 0 0 1 1.27-1.28v.03a1.23 1.23 0 0 0-1.24 1.25 1.19 1.19 0 0 0 1.26 1.2 1.24 1.24 0 0 0 1.27-1.28 1.18 1.18 0 0 0-1.3-1.17v-.03a1.21 1.21 0 0 1 1.33 1.2 1.27 1.27 0 0 1-1.3 1.32 1.22 1.22 0 0 1-1.3-1.24m.48-.12c0-.46.18-1 .8-1 .57 0 .84.61.84 1.11s-.12 1.1-.79 1.1v-.03c.65 0 .76-.57.76-1.07s-.26-1.08-.82-1.09c-.58 0-.75.52-.76.98 0 .6.28 1.18.82 1.18v.03c-.56 0-.84-.6-.85-1.21m4.4.62v-1.29a.28.28 0 0 0-.3-.32h-.07v-.1l.48.01.42-.01v.1h-.05c-.15 0-.3.03-.3.44v1.55a2.2 2.2 0 0 0 .01.34h-.12L28 21.1v1.41c0 .3.06.4.32.4h.06v.1l-.44-.01-.46.01v-.1h.05c.23 0 .3-.16.3-.43v-1.44a.3.3 0 0 0-.3-.3h-.05v-.11l.39.01.3-.01 1.52 1.71"}),i("path",{d:"M29.9 23.08h-.15l-1.72-1.94v1.37c0 .3.05.38.3.38h.07v.14h-.01l-.44-.02-.46.02h-.02v-.14h.07c.22 0 .28-.14.29-.41v-1.44a.3.3 0 0 0-.3-.3h-.06v-.12h.72l1.5 1.69v-1.26c0-.27-.18-.3-.28-.3h-.1v-.13h.94v.13h-.06c-.14 0-.29.01-.3.42v1.55a2.26 2.26 0 0 0 .03.34v.02zm-.13-.03h.1a2.42 2.42 0 0 1-.01-.33v-1.55c0-.41.17-.45.32-.45h.03v-.07h-.86v.07h.06a.3.3 0 0 1 .3.33v1.3l-.01.01-1.52-1.71h-.68v.07h.03a.32.32 0 0 1 .33.32v1.44c0 .27-.08.44-.32.45h-.04V23l.45-.02.43.02v-.07h-.05c-.27 0-.33-.12-.33-.42v-1.44zm-.07-.71v-.01zm-.01 0v-.01zm1.09.18a1.43 1.43 0 0 0-.08.27c0 .1.14.12.26.12h.03v.1a7.71 7.71 0 0 0-.78 0v-.1h.02a.3.3 0 0 0 .3-.22l.55-1.57a2.79 2.79 0 0 0 .12-.42 1.75 1.75 0 0 0 .31-.15.07.07 0 0 1 .03 0 .02.02 0 0 1 .02 0l.03.1.63 1.78c.04.11.08.24.13.34a.22.22 0 0 0 .22.14h.02v.1a9.66 9.66 0 0 0-.98 0v-.1h.04c.08 0 .2-.01.2-.1a1.1 1.1 0 0 0-.06-.25l-.13-.4h-.78zm.5-1.5h-.01l-.32.96h.64l-.32-.97z"}),i("path",{d:"m32.59 23.03-.47-.02-.5.02h-.02v-.14h.05c.08 0 .2-.01.2-.08a1.06 1.06 0 0 0-.07-.24l-.13-.39h-.76l-.1.35a1.44 1.44 0 0 0-.07.26c0 .08.12.1.24.1H31v.14h-.02l-.4-.02-.38.02h-.01v-.14h.03a.3.3 0 0 0 .29-.2l.54-1.57a4.27 4.27 0 0 0 .14-.44 1.85 1.85 0 0 0 .3-.14.08.08 0 0 1 .04 0 .04.04 0 0 1 .04.01l.03.09.62 1.78c.04.12.08.25.13.35a.2.2 0 0 0 .2.12h.04v.14h-.01zm-.97-.03.5-.02.46.02v-.08h-.01a.23.23 0 0 1-.24-.14l-.12-.35-.63-1.78a3.61 3.61 0 0 1-.03-.09h-.01a.06.06 0 0 0-.02 0 1.3 1.3 0 0 1-.3.14 2.94 2.94 0 0 1-.13.43l-.55 1.56a.32.32 0 0 1-.3.24h-.01V23l.35-.02.4.02v-.07h-.02c-.11 0-.27-.02-.27-.14a1.42 1.42 0 0 1 .07-.27h.02-.02l.11-.36h.8l.13.4a1.07 1.07 0 0 1 .07.25c0 .1-.15.11-.22.12h-.03zm-.7-1 .34-1h.02l.33 1zm.05-.04h.6l-.3-.91zm2.48.72c0 .13.1.18.2.19a2.47 2.47 0 0 0 .45 0 .48.48 0 0 0 .33-.2.78.78 0 0 0 .1-.24h.1l-.12.58-.9-.01-.9.01v-.1h.05c.12 0 .25-.02.25-.23v-1.75c0-.18-.13-.2-.25-.2h-.05v-.1l.54.01.51-.01v.1h-.08c-.13 0-.23 0-.23.19z"}),i("path",{d:"m34.5 23.03-.9-.02-.9.02v-.14h.06c.12 0 .24 0 .24-.2v-1.76c0-.17-.12-.18-.24-.18h-.07v-.13h1.09v.13h-.1c-.13 0-.21 0-.22.17v1.76c0 .13.09.16.2.17l.18.01a2.46 2.46 0 0 0 .26-.01.48.48 0 0 0 .32-.18.77.77 0 0 0 .1-.24v-.01h.13v.02l-.13.58zm0-.03.11-.55h-.07a.77.77 0 0 1-.1.24.5.5 0 0 1-.34.19 2.6 2.6 0 0 1-.26.01h-.19c-.11-.02-.22-.07-.22-.21v-1.76c0-.2.12-.2.25-.2h.07v-.07h-1.03v.07h.04c.12 0 .27.02.27.2v1.76c0 .22-.15.24-.27.24h-.04V23l.89-.02.88.02zm.1-2.47a.36.36 0 1 1-.37.36.35.35 0 0 1 .36-.36zm0 .66a.3.3 0 1 0-.3-.3.29.29 0 0 0 .3.3zm-.19-.1v-.02c.05-.01.05 0 .05-.04v-.26c0-.04 0-.05-.05-.05v-.02h.19c.06 0 .12.03.12.1a.11.11 0 0 1-.09.1l.06.09a.38.38 0 0 0 .08.08v.01h-.07c-.03 0-.06-.07-.13-.16h-.04v.12c0 .02.01.02.06.03v.01zm.12-.2h.05c.04 0 .06-.03.06-.09s-.03-.08-.07-.08h-.04z"})),i("path",{fill:"#fff",d:"M13.33 8.58a5.77 5.77 0 1 1 5.76 5.78 5.77 5.77 0 0 1-5.76-5.78"}),i("path",{fill:"#154a78",d:"M22.58 8.47a3.48 3.48 0 0 0-2.23-3.24v6.48a3.48 3.48 0 0 0 2.23-3.24zm-4.7 3.24V5.23a3.47 3.47 0 0 0 0 6.48zM19.1 3a5.48 5.48 0 1 0 5.47 5.48A5.47 5.47 0 0 0 19.11 3zm0 11.48a5.99 5.99 0 0 1-6.03-5.94A5.9 5.9 0 0 1 19.1 2.5h1.55a6.1 6.1 0 0 1 6.24 6.03 6.22 6.22 0 0 1-6.24 5.94z"})),Os=fu;var _u=({opacity:t=1,reversed:e=!1})=>i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"19.5",fill:"none",viewBox:"0 0 40 26",opacity:t},!e&&i("path",{fill:"#fff",d:"M0 0h40v26H0z"}),i("g",{"clip-path":"url(#a)"},i("g",{"clip-path":"url(#b)"},i("path",{fill:e?"#fff":"#000",d:"M3.5 19.56a1.6 1.6 0 0 1 1.54-1.6h.06a1.52 1.52 0 0 1 1.42.77l-.43.25a1.02 1.02 0 0 0-.99-.59 1.13 1.13 0 0 0-1.14 1.11v.03a1.05 1.05 0 0 0 .99 1.14h.1a.94.94 0 0 0 1.04-.83H5.01v-.43h1.51v1.66h-.46v-.49l.03-.12a1.08 1.08 0 0 1-1.08.64 1.49 1.49 0 0 1-1.51-1.48v-.06Zm3.58-1.79h.46v3.33h-.46v-3.33Zm.92 2.2a1.2 1.2 0 1 1 .74 1.11A1.19 1.19 0 0 1 8 19.96Zm1.91 0a.74.74 0 1 0-1.48.06.72.72 0 0 0 .74.7.74.74 0 0 0 .74-.77Zm1.36.8v.33h-.46v-3.36h.46v1.4a.98.98 0 0 1 .77-.38 1.19 1.19 0 0 1 0 2.38.9.9 0 0 1-.77-.37Zm1.48-.8a.75.75 0 1 0-1.5-.04v.03a.76.76 0 1 0 1.5 0Zm.8.55c0-.46.28-.65.9-.74.43-.06.58-.1.58-.25s-.12-.37-.46-.37a.54.54 0 0 0-.58.43l-.44-.18a1.01 1.01 0 0 1 1.02-.65c.59 0 .96.3.96.86v1.48h-.43v-.33a.75.75 0 0 1-.74.4c-.5 0-.8-.28-.8-.65Zm1.33.06a.5.5 0 0 0 .19-.4v-.19c0 .1-.16.13-.5.16-.4.06-.55.15-.55.34 0 .15.15.28.37.28.18 0 .35-.07.49-.19Zm1.14-2.8h.46v3.32h-.46v-3.33Zm2.04.24h.5l1.53 2.34v-2.34h.47v3.12h-.47l-1.57-2.41v2.4h-.46v-3.11Zm2.96 1.94a1.18 1.18 0 0 1 1.17-1.2h.03a1.14 1.14 0 0 1 1.17 1.11v.25h-1.94a.77.77 0 0 0 .96.58c.2-.05.37-.17.49-.34l.37.22a1.18 1.18 0 0 1-1.05.56 1.15 1.15 0 0 1-1.2-1.11v-.07Zm.46-.21h1.45a.67.67 0 0 0-.7-.56.7.7 0 0 0-.75.56Zm2.56.61v-1.14h-.46v-.4h.46v-.5l.46-.3v.8h.62v.4h-.65v1.14c0 .25.13.37.31.37.12 0 .24-.03.34-.09v.43a.82.82 0 0 1-.37.1c-.46 0-.71-.25-.71-.8Zm1.36-1.54h.46l.52 1.67.62-1.67h.43l.62 1.67.55-1.67h.47l-.8 2.28h-.44l-.61-1.66-.65 1.7h-.46l-.71-2.32Zm3.88 1.14a1.2 1.2 0 1 1 .74 1.12 1.19 1.19 0 0 1-.74-1.12Zm1.92 0a.74.74 0 1 0-1.48.07.72.72 0 0 0 .74.7.74.74 0 0 0 .74-.77Zm.89-1.14h.46v.4a.72.72 0 0 1 .65-.4h.19v.46h-.28c-.37 0-.56.16-.56.6v1.22h-.46v-2.28Zm2.59 1.24-.4.43v.58h-.46v-3.3h.46V20l1.08-1.17h.55l-.89.96.92 1.32h-.52l-.74-1.04ZM5.2 10.16H3.72v5.18H5.2c.66.03 1.32-.18 1.85-.59a2.56 2.56 0 0 0 .92-1.97c0-1.54-1.14-2.62-2.77-2.62Zm1.2 3.88c-.3.28-.74.4-1.39.4h-.28v-3.39h.28a1.88 1.88 0 0 1 1.39.43 1.73 1.73 0 0 1 .55 1.3c0 .48-.2.93-.55 1.26Zm2.03-3.88h1.02v5.18H8.43v-5.18Zm3.49 2c-.62-.22-.77-.37-.77-.65 0-.34.3-.58.74-.58a.97.97 0 0 1 .8.43l.53-.68a2.32 2.32 0 0 0-1.52-.59 1.52 1.52 0 0 0-1.6 1.42v.06c0 .71.34 1.08 1.26 1.42.25.08.49.18.71.31a.64.64 0 0 1 .31.53.75.75 0 0 1-.74.74h-.03a1.29 1.29 0 0 1-1.1-.68l-.66.61a2 2 0 0 0 1.8 1 1.68 1.68 0 0 0 1.78-1.7c-.03-.87-.37-1.24-1.51-1.64Zm1.82.59a2.66 2.66 0 0 0 2.65 2.68h.06c.44 0 .88-.1 1.27-.3v-1.18a1.54 1.54 0 0 1-1.2.55 1.69 1.69 0 0 1-1.73-1.63v-.15a1.72 1.72 0 0 1 1.66-1.8h.03a1.64 1.64 0 0 1 1.27.6v-1.15c-.38-.2-.8-.31-1.23-.3a2.69 2.69 0 0 0-2.78 2.68Zm11.97.9-1.4-3.5h-1.07l2.19 5.31h.52l2.25-5.3h-1.1l-1.4 3.48Zm2.96 1.69h2.83v-.87h-1.85v-1.41h1.8v-.87h-1.8v-1.14h1.85v-.9h-2.83v5.19Zm6.84-3.64c0-.96-.68-1.51-1.82-1.51h-1.48v5.18h1.02v-2.1h.12l1.4 2.07h1.23l-1.64-2.2a1.36 1.36 0 0 0 1.17-1.44Zm-2.03.86h-.31V11h.3c.62 0 .96.28.96.77.03.52-.3.8-.95.8Zm2.84-2.13c0-.09-.07-.15-.19-.15h-.15v.46h.12v-.15l.12.18h.13l-.13-.21c.06 0 .1-.06.1-.13Zm-.19.07-.03-.13h.03c.06 0 .1.03.1.06-.04.07-.07.07-.1.07Z"})),i("path",{fill:e?"#fff":"#000",d:"M36.16 10.13a.4.4 0 0 0-.4.4.4.4 0 1 0 .8 0 .4.4 0 0 0-.4-.4Zm0 .74a.32.32 0 0 1-.34-.31.32.32 0 0 1 .65-.03.34.34 0 0 1-.3.34Z"}),i("path",{fill:"url(#c)",d:"M18.06 12.75a2.75 2.75 0 1 0 5.49 0 2.75 2.75 0 0 0-5.5 0Z"}),i("path",{fill:"url(#d)",d:"M18.06 12.75a2.75 2.75 0 1 0 5.49 0 2.75 2.75 0 0 0-5.5 0Z"}),i("mask",{id:"e",width:"6",height:"6",x:"18",y:"10",maskUnits:"userSpaceOnUse",style:"mask-type:luminance"},i("path",{fill:"#fff",d:"M18.06 12.75a2.74 2.74 0 1 0 5.49 0 2.74 2.74 0 0 0-5.5 0Z"})),i("g",{mask:"url(#e)"},i("path",{fill:"url(#f)",d:"M17.75 12.87a3.36 3.36 0 1 0 6.72 0 3.36 3.36 0 0 0-6.72 0Z"}))),i("g",{"clip-path":"url(#g)"},i("g",{"clip-path":"url(#h)"},i("path",{fill:e?"#fff":"#000",d:"M3.5 19.56a1.6 1.6 0 0 1 1.54-1.6h.06a1.52 1.52 0 0 1 1.42.77l-.43.25a1.02 1.02 0 0 0-.99-.59 1.13 1.13 0 0 0-1.14 1.11v.03a1.05 1.05 0 0 0 .99 1.14h.1a.94.94 0 0 0 1.04-.83H5.01v-.43h1.51v1.66h-.46v-.49l.03-.12a1.08 1.08 0 0 1-1.08.64 1.49 1.49 0 0 1-1.51-1.48v-.06Zm3.58-1.79h.46v3.33h-.46v-3.33Zm.92 2.2a1.2 1.2 0 1 1 .74 1.11A1.19 1.19 0 0 1 8 19.96Zm1.91 0a.74.74 0 1 0-1.48.06.72.72 0 0 0 .74.7.74.74 0 0 0 .74-.77Zm1.36.8v.33h-.46v-3.36h.46v1.4a.98.98 0 0 1 .77-.38 1.19 1.19 0 0 1 0 2.38.9.9 0 0 1-.77-.37Zm1.48-.8a.75.75 0 1 0-1.5-.04v.03a.76.76 0 1 0 1.5 0Zm.8.55c0-.46.28-.65.9-.74.43-.06.58-.1.58-.25s-.12-.37-.46-.37a.54.54 0 0 0-.58.43l-.44-.18a1.01 1.01 0 0 1 1.02-.65c.59 0 .96.3.96.86v1.48h-.43v-.33a.75.75 0 0 1-.74.4c-.5 0-.8-.28-.8-.65Zm1.33.06a.5.5 0 0 0 .19-.4v-.19c0 .1-.16.13-.5.16-.4.06-.55.15-.55.34 0 .15.15.28.37.28.18 0 .35-.07.49-.19Zm1.14-2.8h.46v3.32h-.46v-3.33Zm2.04.24h.5l1.53 2.34v-2.34h.47v3.12h-.47l-1.57-2.41v2.4h-.46v-3.11Zm2.96 1.94a1.18 1.18 0 0 1 1.17-1.2h.03a1.14 1.14 0 0 1 1.17 1.11v.25h-1.94a.77.77 0 0 0 .96.58c.2-.05.37-.17.49-.34l.37.22a1.18 1.18 0 0 1-1.05.56 1.15 1.15 0 0 1-1.2-1.11v-.07Zm.46-.21h1.45a.67.67 0 0 0-.7-.56.7.7 0 0 0-.75.56Zm2.56.61v-1.14h-.46v-.4h.46v-.5l.46-.3v.8h.62v.4h-.65v1.14c0 .25.13.37.31.37.12 0 .24-.03.34-.09v.43a.82.82 0 0 1-.37.1c-.46 0-.71-.25-.71-.8Zm1.36-1.54h.46l.52 1.67.62-1.67h.43l.62 1.67.55-1.67h.47l-.8 2.28h-.44l-.61-1.66-.65 1.7h-.46l-.71-2.32Zm3.88 1.14a1.2 1.2 0 1 1 .74 1.12 1.19 1.19 0 0 1-.74-1.12Zm1.92 0a.74.74 0 1 0-1.48.07.72.72 0 0 0 .74.7.74.74 0 0 0 .74-.77Zm.89-1.14h.46v.4a.72.72 0 0 1 .65-.4h.19v.46h-.28c-.37 0-.56.16-.56.6v1.22h-.46v-2.28Zm2.59 1.24-.4.43v.58h-.46v-3.3h.46V20l1.08-1.17h.55l-.89.96.92 1.32h-.52l-.74-1.04ZM5.2 10.16H3.72v5.18H5.2c.66.03 1.32-.18 1.85-.59a2.56 2.56 0 0 0 .92-1.97c0-1.54-1.14-2.62-2.77-2.62Zm1.2 3.88c-.3.28-.74.4-1.39.4h-.28v-3.39h.28a1.88 1.88 0 0 1 1.39.43 1.73 1.73 0 0 1 .55 1.3c0 .48-.2.93-.55 1.26Zm2.03-3.88h1.02v5.18H8.43v-5.18Zm3.49 2c-.62-.22-.77-.37-.77-.65 0-.34.3-.58.74-.58a.97.97 0 0 1 .8.43l.53-.68a2.32 2.32 0 0 0-1.52-.59 1.52 1.52 0 0 0-1.6 1.42v.06c0 .71.34 1.08 1.26 1.42.25.08.49.18.71.31a.64.64 0 0 1 .31.53.75.75 0 0 1-.74.74h-.03a1.29 1.29 0 0 1-1.1-.68l-.66.61a2 2 0 0 0 1.8 1 1.68 1.68 0 0 0 1.78-1.7c-.03-.87-.37-1.24-1.51-1.64Zm1.82.59a2.66 2.66 0 0 0 2.65 2.68h.06c.44 0 .88-.1 1.27-.3v-1.18a1.54 1.54 0 0 1-1.2.55 1.69 1.69 0 0 1-1.73-1.63v-.15a1.72 1.72 0 0 1 1.66-1.8h.03a1.64 1.64 0 0 1 1.27.6v-1.15c-.38-.2-.8-.31-1.23-.3a2.69 2.69 0 0 0-2.78 2.68Zm11.97.9-1.4-3.5h-1.07l2.19 5.31h.52l2.25-5.3h-1.1l-1.4 3.48Zm2.96 1.69h2.83v-.87h-1.85v-1.41h1.8v-.87h-1.8v-1.14h1.85v-.9h-2.83v5.19Zm6.84-3.64c0-.96-.68-1.51-1.82-1.51h-1.48v5.18h1.02v-2.1h.12l1.4 2.07h1.23l-1.64-2.2a1.36 1.36 0 0 0 1.17-1.44Zm-2.03.86h-.31V11h.3c.62 0 .96.28.96.77.03.52-.3.8-.95.8Zm2.84-2.13c0-.09-.07-.15-.19-.15h-.15v.46h.12v-.15l.12.18h.13l-.13-.21c.06 0 .1-.06.1-.13Zm-.19.07-.03-.13h.03c.06 0 .1.03.1.06-.04.07-.07.07-.1.07Z"})),i("path",{fill:e?"#fff":"#000",d:"M36.16 10.13a.4.4 0 0 0-.4.4.4.4 0 1 0 .8 0 .4.4 0 0 0-.4-.4Zm0 .74a.32.32 0 0 1-.34-.31.32.32 0 0 1 .65-.03.34.34 0 0 1-.3.34Z"}),i("path",{fill:"url(#i)",d:"M18.06 12.75a2.75 2.75 0 1 0 5.49 0 2.75 2.75 0 0 0-5.5 0Z"}),i("path",{fill:"url(#j)",d:"M18.06 12.75a2.75 2.75 0 1 0 5.49 0 2.75 2.75 0 0 0-5.5 0Z"}),i("mask",{id:"k",width:"6",height:"6",x:"18",y:"10",maskUnits:"userSpaceOnUse",style:"mask-type:luminance"},i("path",{fill:"#fff",d:"M18.06 12.75a2.74 2.74 0 1 0 5.49 0 2.74 2.74 0 0 0-5.5 0Z"})),i("g",{mask:"url(#k)"},i("path",{fill:"url(#l)",d:"M17.75 12.87a3.36 3.36 0 1 0 6.72 0 3.36 3.36 0 0 0-6.72 0Z"}))),i("defs",null,i("linearGradient",{id:"c",x1:"22.25",x2:"19.35",y1:"15.06",y2:"10.42",gradientUnits:"userSpaceOnUse"},i("stop",{offset:"0","stop-color":"#F59F00"}),i("stop",{offset:".19","stop-color":"#F49B00"}),i("stop",{offset:".37","stop-color":"#F29101"}),i("stop",{offset:".5","stop-color":"#F08302"}),i("stop",{offset:".6","stop-color":"#EE7905"}),i("stop",{offset:".76","stop-color":"#EC7008"}),i("stop",{offset:"1","stop-color":"#EC6D09"})),i("linearGradient",{id:"d",x1:"22.25",x2:"19.35",y1:"15.06",y2:"10.42",gradientUnits:"userSpaceOnUse"},i("stop",{offset:"0","stop-color":"#F3941E","stop-opacity":"0"}),i("stop",{offset:".04","stop-color":"#F48C1C","stop-opacity":".08"}),i("stop",{offset:".2","stop-color":"#F77314","stop-opacity":".32"}),i("stop",{offset:".35","stop-color":"#F95D0E","stop-opacity":".53"}),i("stop",{offset:".5","stop-color":"#FB4B09","stop-opacity":".7"}),i("stop",{offset:".64","stop-color":"#FD3D05","stop-opacity":".83"}),i("stop",{offset:".77","stop-color":"#FE3302","stop-opacity":".92"}),i("stop",{offset:".9","stop-color":"#FF2D01","stop-opacity":".98"}),i("stop",{offset:"1","stop-color":"#FF2B00"})),i("radialGradient",{id:"f",cx:"0",cy:"0",r:"1",gradientTransform:"rotate(4.24 -167.26 291.02) scale(3.3208)",gradientUnits:"userSpaceOnUse"},i("stop",{offset:"0","stop-color":"#F3941E","stop-opacity":"0"}),i("stop",{offset:".45","stop-color":"#EA8D1D","stop-opacity":".05"}),i("stop",{offset:".66","stop-color":"#CA7618","stop-opacity":".2"}),i("stop",{offset:".83","stop-color":"#924D10","stop-opacity":".48"}),i("stop",{offset:".96","stop-color":"#441304","stop-opacity":".87"}),i("stop",{offset:".99","stop-color":"#2F0401","stop-opacity":".97"})),i("linearGradient",{id:"i",x1:"22.25",x2:"19.35",y1:"15.06",y2:"10.42",gradientUnits:"userSpaceOnUse"},i("stop",{offset:"0","stop-color":"#F59F00"}),i("stop",{offset:".19","stop-color":"#F49B00"}),i("stop",{offset:".37","stop-color":"#F29101"}),i("stop",{offset:".5","stop-color":"#F08302"}),i("stop",{offset:".6","stop-color":"#EE7905"}),i("stop",{offset:".76","stop-color":"#EC7008"}),i("stop",{offset:"1","stop-color":"#EC6D09"})),i("linearGradient",{id:"j",x1:"22.25",x2:"19.35",y1:"15.06",y2:"10.42",gradientUnits:"userSpaceOnUse"},i("stop",{offset:"0","stop-color":"#F3941E","stop-opacity":"0"}),i("stop",{offset:".04","stop-color":"#F48C1C","stop-opacity":".08"}),i("stop",{offset:".2","stop-color":"#F77314","stop-opacity":".32"}),i("stop",{offset:".35","stop-color":"#F95D0E","stop-opacity":".53"}),i("stop",{offset:".5","stop-color":"#FB4B09","stop-opacity":".7"}),i("stop",{offset:".64","stop-color":"#FD3D05","stop-opacity":".83"}),i("stop",{offset:".77","stop-color":"#FE3302","stop-opacity":".92"}),i("stop",{offset:".9","stop-color":"#FF2D01","stop-opacity":".98"}),i("stop",{offset:"1","stop-color":"#FF2B00"})),i("radialGradient",{id:"l",cx:"0",cy:"0",r:"1",gradientTransform:"rotate(4.24 -167.26 291.02) scale(3.3208)",gradientUnits:"userSpaceOnUse"},i("stop",{offset:"0","stop-color":"#F3941E","stop-opacity":"0"}),i("stop",{offset:".45","stop-color":"#EA8D1D","stop-opacity":".05"}),i("stop",{offset:".66","stop-color":"#CA7618","stop-opacity":".2"}),i("stop",{offset:".83","stop-color":"#924D10","stop-opacity":".48"}),i("stop",{offset:".96","stop-color":"#441304","stop-opacity":".87"}),i("stop",{offset:".99","stop-color":"#2F0401","stop-opacity":".97"})),i("clipPath",{id:"a"},i("path",{fill:"#fff",d:"M0 0h33v5.55H0z",transform:"translate(3.5 10)"})),i("clipPath",{id:"b"},i("path",{fill:"#fff",d:"M0 0h33v5.86H0z",transform:"translate(3.5 10)"})),i("clipPath",{id:"g"},i("path",{fill:"#fff",d:"M0 0h33v5.55H0z",transform:"translate(3.5 10)"})),i("clipPath",{id:"h"},i("path",{fill:"#fff",d:"M0 0h33v5.86H0z",transform:"translate(3.5 10)"})))),Ms=_u;var yu=({opacity:t=1})=>i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 40 26",width:"30",height:"19.5",opacity:t},i("rect",{width:"45.3",height:"27",x:"-3.3",y:"-.79",fill:"#fff",rx:"2.82"}),i("path",{fill:"#01798a",d:"M27.27-.79a4.06 4.06 0 0 0-3.6 2.8l-4.96 23.42a2.14 2.14 0 0 0 2 2.8h18.35a2.81 2.81 0 0 0 2.8-2.82V1.15A2.25 2.25 0 0 0 40-.8"}),i("rect",{width:"20.38",height:"29.02",x:"-4",y:"-.79",fill:"#dc1f2b",rx:"2.82"}),i("path",{fill:"#1a4580",d:"M24.37 2.02a3.98 3.98 0 0 1 3.48-2.8H14.18a3.97 3.97 0 0 0-3.5 2.8l-4.85 23.4a2.13 2.13 0 0 0 1.94 2.81h13.7a2.13 2.13 0 0 1-1.94-2.8z"}),i("path",{fill:"#fff",d:"M16.63 15.04h.18a.32.32 0 0 0 .32-.17l.46-.7h1.24l-.26.47h1.49l-.2.7H18.1a.82.82 0 0 1-.75.44h-.92zm-.2 1h3.25l-.21.77h-1.3l-.2.74h1.27l-.21.77h-1.27l-.3 1.09c-.07.18.02.26.29.24h1.03l-.19.71H16.6q-.57 0-.39-.65l.38-1.4h-.81l.2-.76h.82l.2-.74h-.78l.2-.76zm5.19-1.87-.06.45a2.37 2.37 0 0 1 1.18-.47h2.05l-.78 2.88q-.1.5-.84.5h-2.34l-.54 2.01c-.03.11.01.17.13.17h.46l-.17.62h-1.17q-.67 0-.56-.4l1.54-5.76zm1.74.81h-1.84l-.22.78a1.52 1.52 0 0 1 .82-.23h1.1zm-.67 1.8c.14.02.22-.03.22-.16l.12-.4h-1.84l-.16.57zm-1.24.93h1.06l-.02.47h.29c.14 0 .2-.05.2-.14l.1-.3h.87l-.11.44a.76.76 0 0 1-.8.57h-.56v.8c-.01.12.1.18.33.18h.53l-.17.63H21.9c-.36.02-.53-.15-.53-.52zM8.6 10.34a2.62 2.62 0 0 1-1 1.64 3.24 3.24 0 0 1-1.98.58 2.16 2.16 0 0 1-1.68-.59 1.54 1.54 0 0 1-.37-1.06 2.86 2.86 0 0 1 .06-.57l.87-4.2h1.3l-.85 4.15a1.35 1.35 0 0 0-.04.32.82.82 0 0 0 .16.52.89.89 0 0 0 .75.3 1.56 1.56 0 0 0 1-.3 1.37 1.37 0 0 0 .5-.84l.84-4.15h1.3zm5.47-1.65h1.02l-.8 3.74h-1.02zm.32-1.37h1.03l-.2.91H14.2l.19-.9M16 12.15a1.39 1.39 0 0 1-.41-1.05 2.45 2.45 0 0 1 .01-.25l.04-.27a2.55 2.55 0 0 1 .78-1.45 2.07 2.07 0 0 1 1.43-.54 1.5 1.5 0 0 1 1.1.39 1.4 1.4 0 0 1 .4 1.06 2.59 2.59 0 0 1-.02.26l-.05.28a2.48 2.48 0 0 1-.77 1.42 2.08 2.08 0 0 1-1.43.53 1.5 1.5 0 0 1-1.09-.38m1.95-.74a1.84 1.84 0 0 0 .38-.9.58.58 0 0 0 .03-.19 1.74 1.74 0 0 0 .01-.17.76.76 0 0 0-.17-.54.64.64 0 0 0-.5-.2.89.89 0 0 0-.7.3 1.9 1.9 0 0 0-.38.92l-.03.18a1.36 1.36 0 0 0-.01.17.75.75 0 0 0 .17.54.64.64 0 0 0 .5.18.9.9 0 0 0 .7-.3m8.02 3.67.25-.87h1.24l-.05.32a3.1 3.1 0 0 1 1.09-.32h1.54l-.25.87h-.24l-1.16 4.12h.24l-.23.82h-.24l-.1.36h-1.2l.1-.36h-2.38l.23-.82h.24l1.16-4.12zm1.34 0L27 16.2a5.13 5.13 0 0 1 1-.27c.1-.4.24-.85.24-.85zm-.46 1.64-.32 1.17a3.44 3.44 0 0 1 1.01-.33l.24-.84zm.23 2.48.24-.84h-.93l-.24.84zm3.01-5.05h1.17l.05.44c0 .11.06.16.2.16h.2l-.2.74h-.87c-.32.02-.5-.1-.5-.38zm-.34 1.59h3.79l-.23.79h-1.2l-.2.74h1.2l-.23.79h-1.34l-.3.46h.65l.16.93c.01.09.1.13.23.13h.2l-.2.77h-.73c-.37.02-.57-.1-.58-.38l-.18-.85-.6.9a.65.65 0 0 1-.65.36h-1.1l.22-.77h.34a.46.46 0 0 0 .36-.19l.94-1.36h-1.2l.22-.8h1.3l.21-.73h-1.3l.22-.8zM9.8 8.69h.92l-.1.54.12-.16a1.43 1.43 0 0 1 1.1-.48 1 1 0 0 1 .83.34 1.15 1.15 0 0 1 .14.95l-.5 2.56h-.95l.46-2.32a.74.74 0 0 0-.04-.53.44.44 0 0 0-.4-.17.88.88 0 0 0-.62.23 1.14 1.14 0 0 0-.34.63L10 12.44h-.94zm10.55 0h.92l-.1.54.13-.16a1.43 1.43 0 0 1 1.08-.48.99.99 0 0 1 .85.34 1.14 1.14 0 0 1 .13.95l-.5 2.56h-.95l.46-2.32a.75.75 0 0 0-.04-.53.45.45 0 0 0-.4-.17.89.89 0 0 0-.62.23 1.12 1.12 0 0 0-.33.63l-.43 2.16h-.94zm4.55-2.33h2.67a1.8 1.8 0 0 1 1.19.35 1.25 1.25 0 0 1 .4 1v.02a3.77 3.77 0 0 1-.06.59 2.38 2.38 0 0 1-.81 1.4 2.29 2.29 0 0 1-1.5.52h-1.44l-.44 2.2h-1.24zm.67 2.82h1.19a1.14 1.14 0 0 0 .73-.21 1.14 1.14 0 0 0 .36-.67l.03-.15v-.13a.52.52 0 0 0-.22-.47 1.35 1.35 0 0 0-.72-.15h-1zm9.15 3.98a5.91 5.91 0 0 1-.98 1.56 1.99 1.99 0 0 1-1.7.71l.08-.64c.89-.27 1.36-1.51 1.64-2.06l-.33-4.03.68-.01h.58l.06 2.53 1.07-2.53h1.09zM31.68 9l-.43.3a1.35 1.35 0 0 0-1.66-.21c-1.08.5-1.98 4.4 1 3.11l.17.2 1.17.04.77-3.54zm-.66 1.92c-.2.56-.61.94-.94.83-.33-.1-.45-.64-.26-1.2.19-.57.61-.94.94-.83.33.1.45.64.26 1.2"})),Fs=yu;O(`.straumur__tooltip__content{position:absolute;z-index:50;padding:var(--straumur__space-s);border-radius:var(--straumur__border-radius-s);right:40%;width:max-content;color:var(--straumur__color-white);background-color:var(--straumur__color-primary);box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d}.straumur__tooltip__content--bottom{top:100%}.straumur__tooltip__content--top{bottom:100%}
|
|
4
|
-
`);var jt=({children:t,content:e,placement:r="bottom"})=>{let[o,n]=T(!1),a=pe(null);return i("div",{style:{position:"relative"}},i("div",{ref:a,onMouseEnter:()=>{n(!0)},onMouseLeave:()=>{n(!1)}},t),o&&a&&i("div",{className:`straumur__tooltip__content straumur__tooltip__content--${r}`},e))};function Fn(t){let e=()=>window.matchMedia(t).matches,[r,o]=T(e);return ne(()=>{let n=window.matchMedia(t),a=s=>o(s.matches);return o(n.matches),n.addEventListener("change",a),()=>{n.removeEventListener("change",a)}},[t]),r}var Ls=["visa","mc","maestro","amex","jcb","cup"],Bs=t=>{let e=Ls.indexOf(t);return e===-1?Ls.length:e};function ho({brands:t,brandHidden:e=[],limit:r=4,theme:o="light"}){let n=Fn("(max-width: 380px)"),s=Fn("(max-width: 335px)")?1:n?2:r,l=t.filter(c=>!e.some(u=>u.brand===c.brand)).sort((c,u)=>Bs(c.brand)-Bs(u.brand));return i(ie,null,l.map(({brand:c},u)=>u>=Math.min(r,s)?u===Math.min(r,s)?i(jt,{content:i("span",{style:{display:"flex",gap:"4px",overflow:"visible"}},l.slice(Math.min(r,s)).map(({brand:p})=>i(mo,{key:p,brand:p,theme:o})))},i("span",{key:c,className:"straumur__render-brand-icons__overflow"},"+",l.length-Math.min(r,s))):null:i(mo,{key:c,brand:c,theme:o})))}var Ln=(t,e)=>e?i("span",{className:"straumur__brand-chip"},t):t,mo=({brand:t,theme:e="light",defaultToBrandName:r=!0})=>{let o=e==="dark";switch(t){case"visa":return i(ws,{reversed:o});case"mc":return i(Ds,{reversed:o});case"maestro":return i(Is,{reversed:o});case"discover":return i(Ms,{reversed:o});case"amex":return i(ks,null);case"jcb":return Ln(i(Ns,null),o);case"diners":return Ln(i(Os,null),o);case"cup":return Ln(i(Fs,null),o);default:return r?i("span",null,t):i(ie,null)}};var go,z,Ys,At,Us,Ks,Bn,Kn,Un,Vn,Gs,br={},zs=[],gu=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Co=Array.isArray;function nt(t,e){for(var r in e)t[r]=e[r];return t}function js(t){var e=t.parentNode;e&&e.removeChild(t)}function _(t,e,r){var o,n,a,s={};for(a in e)a=="key"?o=e[a]:a=="ref"?n=e[a]:s[a]=e[a];if(arguments.length>2&&(s.children=arguments.length>3?go.call(arguments,2):r),typeof t=="function"&&t.defaultProps!=null)for(a in t.defaultProps)s[a]===void 0&&(s[a]=t.defaultProps[a]);return _o(t,s,o,n,null)}function _o(t,e,r,o,n){var a={type:t,props:e,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:n??++Ys,__i:-1,__u:0};return n==null&&z.vnode!=null&&z.vnode(a),a}function at(t){return t.children}function U(t,e){this.props=t,this.context=e}function xt(t,e){if(e==null)return t.__?xt(t.__,t.__i+1):null;for(var r;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null)return r.__e;return typeof t.type=="function"?xt(t):null}function $s(t){var e,r;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null){t.__e=t.__c.base=r.__e;break}return $s(t)}}function Hn(t){(!t.__d&&(t.__d=!0)&&At.push(t)&&!yo.__r++||Us!==z.debounceRendering)&&((Us=z.debounceRendering)||Ks)(yo)}function yo(){var t,e,r,o,n,a,s,l;for(At.sort(Bn);t=At.shift();)t.__d&&(e=At.length,o=void 0,a=(n=(r=t).__v).__e,s=[],l=[],r.__P&&((o=nt({},n)).__v=n.__v+1,z.vnode&&z.vnode(o),zn(r.__P,o,n,r.__n,r.__P.namespaceURI,32&n.__u?[a]:null,s,a??xt(n),!!(32&n.__u),l),o.__v=n.__v,o.__.__k[o.__i]=o,qs(s,o,l),o.__e!=a&&$s(o)),At.length>e&&At.sort(Bn));yo.__r=0}function Ws(t,e,r,o,n,a,s,l,c,u,p){var d,h,m,y,b,C=o&&o.__k||zs,f=e.length;for(r.__d=c,Cu(r,e,C),c=r.__d,d=0;d<f;d++)(m=r.__k[d])!=null&&typeof m!="boolean"&&typeof m!="function"&&(h=m.__i===-1?br:C[m.__i]||br,m.__i=d,zn(t,m,h,n,a,s,l,c,u,p),y=m.__e,m.ref&&h.ref!=m.ref&&(h.ref&&jn(h.ref,null,m),p.push(m.ref,m.__c||y,m)),b==null&&y!=null&&(b=y),65536&m.__u||h.__k===m.__k?(c&&typeof m.type=="string"&&!t.contains(c)&&(c=xt(h)),c=Zs(m,c,t)):typeof m.type=="function"&&m.__d!==void 0?c=m.__d:y&&(c=y.nextSibling),m.__d=void 0,m.__u&=-196609);r.__d=c,r.__e=b}function Cu(t,e,r){var o,n,a,s,l,c=e.length,u=r.length,p=u,d=0;for(t.__k=[],o=0;o<c;o++)s=o+d,(n=t.__k[o]=(n=e[o])==null||typeof n=="boolean"||typeof n=="function"?null:typeof n=="string"||typeof n=="number"||typeof n=="bigint"||n.constructor==String?_o(null,n,null,null,null):Co(n)?_o(at,{children:n},null,null,null):n.constructor===void 0&&n.__b>0?_o(n.type,n.props,n.key,n.ref?n.ref:null,n.__v):n)!=null?(n.__=t,n.__b=t.__b+1,l=vu(n,r,s,p),n.__i=l,a=null,l!==-1&&(p--,(a=r[l])&&(a.__u|=131072)),a==null||a.__v===null?(l==-1&&d--,typeof n.type!="function"&&(n.__u|=65536)):l!==s&&(l==s-1?d=l-s:l==s+1?d++:l>s?p>c-s?d+=l-s:d--:l<s&&d++,l!==o+d&&(n.__u|=65536))):(a=r[s])&&a.key==null&&a.__e&&!(131072&a.__u)&&(a.__e==t.__d&&(t.__d=xt(a)),Yn(a,a,!1),r[s]=null,p--);if(p)for(o=0;o<u;o++)(a=r[o])!=null&&!(131072&a.__u)&&(a.__e==t.__d&&(t.__d=xt(a)),Yn(a,a))}function Zs(t,e,r){var o,n;if(typeof t.type=="function"){for(o=t.__k,n=0;o&&n<o.length;n++)o[n]&&(o[n].__=t,e=Zs(o[n],e,r));return e}t.__e!=e&&(r.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType===8);return e}function Gn(t,e){return e=e||[],t==null||typeof t=="boolean"||(Co(t)?t.some(function(r){Gn(r,e)}):e.push(t)),e}function vu(t,e,r,o){var n=t.key,a=t.type,s=r-1,l=r+1,c=e[r];if(c===null||c&&n==c.key&&a===c.type&&!(131072&c.__u))return r;if(o>(c==null||131072&c.__u?0:1))for(;s>=0||l<e.length;){if(s>=0){if((c=e[s])&&!(131072&c.__u)&&n==c.key&&a===c.type)return s;s--}if(l<e.length){if((c=e[l])&&!(131072&c.__u)&&n==c.key&&a===c.type)return l;l++}}return-1}function Vs(t,e,r){e[0]==="-"?t.setProperty(e,r??""):t[e]=r==null?"":typeof r!="number"||gu.test(e)?r:r+"px"}function fo(t,e,r,o,n){var a;e:if(e==="style")if(typeof r=="string")t.style.cssText=r;else{if(typeof o=="string"&&(t.style.cssText=o=""),o)for(e in o)r&&e in r||Vs(t.style,e,"");if(r)for(e in r)o&&r[e]===o[e]||Vs(t.style,e,r[e])}else if(e[0]==="o"&&e[1]==="n")a=e!==(e=e.replace(/(PointerCapture)$|Capture$/i,"$1")),e=e.toLowerCase()in t||e==="onFocusOut"||e==="onFocusIn"?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+a]=r,r?o?r.u=o.u:(r.u=Kn,t.addEventListener(e,a?Vn:Un,a)):t.removeEventListener(e,a?Vn:Un,a);else{if(n=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&e[4]!=="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&r==1?"":r))}}function Hs(t){return function(e){if(this.l){var r=this.l[e.type+t];if(e.t==null)e.t=Kn++;else if(e.t<r.u)return;return r(z.event?z.event(e):e)}}}function zn(t,e,r,o,n,a,s,l,c,u){var p,d,h,m,y,b,C,f,g,k,E,H,Y,$,ee,M,F=e.type;if(e.constructor!==void 0)return null;128&r.__u&&(c=!!(32&r.__u),a=[l=e.__e=r.__e]),(p=z.__b)&&p(e);e:if(typeof F=="function")try{if(f=e.props,g="prototype"in F&&F.prototype.render,k=(p=F.contextType)&&o[p.__c],E=p?k?k.props.value:p.__:o,r.__c?C=(d=e.__c=r.__c).__=d.__E:(g?e.__c=d=new F(f,E):(e.__c=d=new U(f,E),d.constructor=F,d.render=Eu),k&&k.sub(d),d.props=f,d.state||(d.state={}),d.context=E,d.__n=o,h=d.__d=!0,d.__h=[],d._sb=[]),g&&d.__s==null&&(d.__s=d.state),g&&F.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=nt({},d.__s)),nt(d.__s,F.getDerivedStateFromProps(f,d.__s))),m=d.props,y=d.state,d.__v=e,h)g&&F.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),g&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(g&&F.getDerivedStateFromProps==null&&f!==m&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(f,E),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(f,d.__s,E)===!1||e.__v===r.__v)){for(e.__v!==r.__v&&(d.props=f,d.state=d.__s,d.__d=!1),e.__e=r.__e,e.__k=r.__k,e.__k.forEach(function(L){L&&(L.__=e)}),H=0;H<d._sb.length;H++)d.__h.push(d._sb[H]);d._sb=[],d.__h.length&&s.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(f,d.__s,E),g&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(m,y,b)})}if(d.context=E,d.props=f,d.__P=t,d.__e=!1,Y=z.__r,$=0,g){for(d.state=d.__s,d.__d=!1,Y&&Y(e),p=d.render(d.props,d.state,d.context),ee=0;ee<d._sb.length;ee++)d.__h.push(d._sb[ee]);d._sb=[]}else do d.__d=!1,Y&&Y(e),p=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++$<25);d.state=d.__s,d.getChildContext!=null&&(o=nt(nt({},o),d.getChildContext())),g&&!h&&d.getSnapshotBeforeUpdate!=null&&(b=d.getSnapshotBeforeUpdate(m,y)),Ws(t,Co(M=p!=null&&p.type===at&&p.key==null?p.props.children:p)?M:[M],e,r,o,n,a,s,l,c,u),d.base=e.__e,e.__u&=-161,d.__h.length&&s.push(d),C&&(d.__E=d.__=null)}catch(L){e.__v=null,c||a!=null?(e.__e=l,e.__u|=c?160:32,a[a.indexOf(l)]=null):(e.__e=r.__e,e.__k=r.__k),z.__e(L,e,r)}else a==null&&e.__v===r.__v?(e.__k=r.__k,e.__e=r.__e):e.__e=bu(r.__e,e,r,o,n,a,s,c,u);(p=z.diffed)&&p(e)}function qs(t,e,r){e.__d=void 0;for(var o=0;o<r.length;o++)jn(r[o],r[++o],r[++o]);z.__c&&z.__c(e,t),t.some(function(n){try{t=n.__h,n.__h=[],t.some(function(a){a.call(n)})}catch(a){z.__e(a,n.__v)}})}function bu(t,e,r,o,n,a,s,l,c){var u,p,d,h,m,y,b,C=r.props,f=e.props,g=e.type;if(g==="svg"?n="http://www.w3.org/2000/svg":g==="math"?n="http://www.w3.org/1998/Math/MathML":n||(n="http://www.w3.org/1999/xhtml"),a!=null){for(u=0;u<a.length;u++)if((m=a[u])&&"setAttribute"in m==!!g&&(g?m.localName===g:m.nodeType===3)){t=m,a[u]=null;break}}if(t==null){if(g===null)return document.createTextNode(f);t=document.createElementNS(n,g,f.is&&f),a=null,l=!1}if(g===null)C===f||l&&t.data===f||(t.data=f);else{if(a=a&&go.call(t.childNodes),C=r.props||br,!l&&a!=null)for(C={},u=0;u<t.attributes.length;u++)C[(m=t.attributes[u]).name]=m.value;for(u in C)if(m=C[u],u!="children"){if(u=="dangerouslySetInnerHTML")d=m;else if(u!=="key"&&!(u in f)){if(u=="value"&&"defaultValue"in f||u=="checked"&&"defaultChecked"in f)continue;fo(t,u,null,m,n)}}for(u in f)m=f[u],u=="children"?h=m:u=="dangerouslySetInnerHTML"?p=m:u=="value"?y=m:u=="checked"?b=m:u==="key"||l&&typeof m!="function"||C[u]===m||fo(t,u,m,C[u],n);if(p)l||d&&(p.__html===d.__html||p.__html===t.innerHTML)||(t.innerHTML=p.__html),e.__k=[];else if(d&&(t.innerHTML=""),Ws(t,Co(h)?h:[h],e,r,o,g==="foreignObject"?"http://www.w3.org/1999/xhtml":n,a,s,a?a[0]:r.__k&&xt(r,0),l,c),a!=null)for(u=a.length;u--;)a[u]!=null&&js(a[u]);l||(u="value",y!==void 0&&(y!==t[u]||g==="progress"&&!y||g==="option"&&y!==C[u])&&fo(t,u,y,C[u],n),u="checked",b!==void 0&&b!==t[u]&&fo(t,u,b,C[u],n))}return t}function jn(t,e,r){try{typeof t=="function"?t(e):t.current=e}catch(o){z.__e(o,r)}}function Yn(t,e,r){var o,n;if(z.unmount&&z.unmount(t),(o=t.ref)&&(o.current&&o.current!==t.__e||jn(o,null,e)),(o=t.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(a){z.__e(a,e)}o.base=o.__P=null}if(o=t.__k)for(n=0;n<o.length;n++)o[n]&&Yn(o[n],e,r||typeof t.type!="function");r||t.__e==null||js(t.__e),t.__c=t.__=t.__e=t.__d=void 0}function Eu(t,e,r){return this.constructor(t,r)}function $n(t,e,r){var o,n,a;z.__&&z.__(t,e),o=e.__k,n=[],a=[],zn(e,t=e.__k=_(at,null,[t]),o||br,br,e.namespaceURI,o?null:e.firstChild?go.call(e.childNodes):null,n,o?o.__e:e.firstChild,!1,a),qs(n,t,a)}function Xs(t,e){var r={__c:e="__cC"+Gs++,__:t,Consumer:function(o,n){return o.children(n)},Provider:function(o){var n,a;return this.getChildContext||(n=[],(a={})[e]=this,this.getChildContext=function(){return a},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&n.some(function(l){l.__e=!0,Hn(l)})},this.sub=function(s){n.push(s);var l=s.componentWillUnmount;s.componentWillUnmount=function(){n&&n.splice(n.indexOf(s),1),l&&l.call(s)}}),o.children}};return r.Provider.__=r.Consumer.contextType=r}go=zs.slice,z={__e:function(t,e,r,o){for(var n,a,s;e=e.__;)if((n=e.__c)&&!n.__)try{if((a=n.constructor)&&a.getDerivedStateFromError!=null&&(n.setState(a.getDerivedStateFromError(t)),s=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(t,o||{}),s=n.__d),s)return n.__E=n}catch(l){t=l}throw t}},Ys=0,U.prototype.setState=function(t,e){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=nt({},this.state),typeof t=="function"&&(t=t(nt({},r),this.props)),t&&nt(r,t),t!=null&&this.__v&&(e&&this._sb.push(e),Hn(this))},U.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Hn(this))},U.prototype.render=at,At=[],Ks=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Bn=function(t,e){return t.__v.__b-e.__v.__b},yo.__r=0,Kn=0,Un=Hs(!1),Vn=Hs(!0),Gs=0;var $t,W,Wn,Js,Er=0,si=[],le=z,Qs=le.__b,ei=le.__r,ti=le.diffed,ri=le.__c,oi=le.unmount,ni=le.__;function bo(t,e){le.__h&&le.__h(W,t,Er||e),Er=0;var r=W.__H||(W.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({}),r.__[t]}function ge(t){return Er=1,Su(ci,t)}function Su(t,e,r){var o=bo($t++,2);if(o.t=t,!o.__c&&(o.__=[r?r(e):ci(void 0,e),function(l){var c=o.__N?o.__N[0]:o.__[0],u=o.t(c,l);c!==u&&(o.__N=[u,o.__[1]],o.__c.setState({}))}],o.__c=W,!W.u)){var n=function(l,c,u){if(!o.__c.__H)return!0;var p=o.__c.__H.__.filter(function(h){return!!h.__c});if(p.every(function(h){return!h.__N}))return!a||a.call(this,l,c,u);var d=!1;return p.forEach(function(h){if(h.__N){var m=h.__[0];h.__=h.__N,h.__N=void 0,m!==h.__[0]&&(d=!0)}}),!(!d&&o.__c.props===l)&&(!a||a.call(this,l,c,u))};W.u=!0;var a=W.shouldComponentUpdate,s=W.componentWillUpdate;W.componentWillUpdate=function(l,c,u){if(this.__e){var p=a;a=void 0,n(l,c,u),a=p}s&&s.call(this,l,c,u)},W.shouldComponentUpdate=n}return o.__N||o.__}function We(t,e){var r=bo($t++,3);!le.__s&&di(r.__H,e)&&(r.__=t,r.i=e,W.__H.__h.push(r))}function st(t){return Er=5,Eo(function(){return{current:t}},[])}function Eo(t,e){var r=bo($t++,7);return di(r.__H,e)&&(r.__=t(),r.__H=e,r.__h=t),r.__}function ii(t,e){return Er=8,Eo(function(){return t},e)}function li(t){var e=W.context[t.__c],r=bo($t++,9);return r.c=t,e?(r.__==null&&(r.__=!0,e.sub(W)),e.props.value):t.__}function Pu(){for(var t;t=si.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(vo),t.__H.__h.forEach(Zn),t.__H.__h=[]}catch(e){t.__H.__h=[],le.__e(e,t.__v)}}le.__b=function(t){W=null,Qs&&Qs(t)},le.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),ni&&ni(t,e)},le.__r=function(t){ei&&ei(t),$t=0;var e=(W=t.__c).__H;e&&(Wn===W?(e.__h=[],W.__h=[],e.__.forEach(function(r){r.__N&&(r.__=r.__N),r.i=r.__N=void 0})):(e.__h.forEach(vo),e.__h.forEach(Zn),e.__h=[],$t=0)),Wn=W},le.diffed=function(t){ti&&ti(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(si.push(e)!==1&&Js===le.requestAnimationFrame||((Js=le.requestAnimationFrame)||Ru)(Pu)),e.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.i=void 0})),Wn=W=null},le.__c=function(t,e){e.some(function(r){try{r.__h.forEach(vo),r.__h=r.__h.filter(function(o){return!o.__||Zn(o)})}catch(o){e.some(function(n){n.__h&&(n.__h=[])}),e=[],le.__e(o,r.__v)}}),ri&&ri(t,e)},le.unmount=function(t){oi&&oi(t);var e,r=t.__c;r&&r.__H&&(r.__H.__.forEach(function(o){try{vo(o)}catch(n){e=n}}),r.__H=void 0,e&&le.__e(e,r.__v))};var ai=typeof requestAnimationFrame=="function";function Ru(t){var e,r=function(){clearTimeout(o),ai&&cancelAnimationFrame(e),setTimeout(t)},o=setTimeout(r,100);ai&&(e=requestAnimationFrame(r))}function vo(t){var e=W,r=t.__c;typeof r=="function"&&(t.__c=void 0,r()),W=e}function Zn(t){var e=W;t.__c=t.__(),W=e}function di(t,e){return!t||t.length!==e.length||e.some(function(r,o){return r!==t[o]})}function ci(t,e){return typeof e=="function"?e(t):e}var ui="encrypted",x="encryptedCardNumber",D="encryptedExpiryDate",I="encryptedExpiryMonth",R="encryptedExpiryYear",A="encryptedSecurityCode",fe="encryptedPassword",Sr="encryptedSecurityCode3digits",Pr="encryptedSecurityCode4digits",Rr="giftcard",pi="6.0.0",Dt=["amex","mc","visa"],mi=[Rr],Tu=[x,D,I,R,A,fe],So=Tu,hi=["bcmc"],fi="required",Po="optional",Ro="hidden",Me=fi,Tr=Po,Ar=Ro,xe=fi,xr=Po,wt=Ro,_i="data-cse",yi="data-info",gi="data-uid",Ci=["accel","pulse","star","nyce"];var It={[x]:"cardNumber",[D]:"expiryDate",[A]:"securityCode",[I]:"expiryMonth",[R]:"expiryYear",[fe]:"password",[Sr]:"securityCodeThreeDigits",[Pr]:"securityCodeFourDigits"},vi=6e3;var De=(t,e)=>e.split(".").reduce((r,o)=>r&&r[o]?r[o]:void 0,t);var Ze="field.error.required";var To="invalid.format.expects",bi="creditCard.holderName.invalid",Ei="creditCard.taxNumber.invalid",Si="boleto.socialSecurityNumber.invalid",kt=(function(t){return t.CC_NUM="cc.num",t.CC_DAT="cc.dat",t.CC_MTH="cc.mth",t.CC_YR="cc.yr",t.CC_CVC="cc.cvc",t.KCP_PWD="kcp.pwd",t})({}),Wt=(function(t){return t.ERROR_MSG_INCOMPLETE_FIELD="err.gen.9100",t.ERROR_MSG_INVALID_FIELD="err.gen.9101",t.ERROR_MSG_LUHN_CHECK_FAILED="cc.num.902",t.ERROR_MSG_EMPTY_PAN="cc.num.900",t.ERROR_MSG_UNSUPPORTED_CARD_ENTERED="cc.num.903",t.ERROR_MSG_INCORRECTLY_FILLED_PAN="cc.num.901",t.ERROR_MSG_CARD_TOO_OLD="cc.dat.912",t.ERROR_MSG_CARD_TOO_FAR_IN_FUTURE="cc.dat.913",t.ERROR_MSG_CARD_EXPIRES_TOO_SOON="cc.dat.914",t.ERROR_MSG_EMPTY_DATE="cc.dat.910",t.ERROR_MSG_INCORRECTLY_FILLED__DATE="cc.dat.911",t.ERROR_MSG_EMPTY_YEAR="cc.yr.917",t.ERROR_MSG_INCORRECTLY_FILLED_YEAR="cc.yr.918",t.ERROR_MSG_EMPTY_MONTH="cc.mth.915",t.ERROR_MSG_EMPTY_CVC="cc.cvc.920",t.ERROR_MSG_INCORRECTLY_FILLED_CVC="cc.cvc.921",t.ERROR_MSG_EMPTY_KCP_PWD="kcp.pwd.940",t.ERROR_MSG_INCORRECTLY_FILLED_KCP_PWD="kcp.pwd.941",t})({}),Pi={[x]:"cc.num.900",[D]:"cc.dat.910",[I]:"cc.mth.915",[R]:"cc.yr.917",[A]:"cc.cvc.920",[fe]:"kcp.pwd.940"};var Ri=t=>t?Array.prototype.slice.call(t.querySelectorAll('[data-cse*="encrypted"]')).map(e=>e.getAttribute("data-cse")):[],Ti=(t,e)=>(e===D?(t[I]=!1,t[R]=!1):t[e]=!1,t),Ai=(t,e)=>(r,o)=>{let n=e.valid[o]!==!0?((a,s)=>s!==1||a!==I&&a!==R?a:D)(o,t):null;return n=((a,s,l)=>{let{isFieldOfType:c,fieldIsValid:u}=l.reduce((m,y)=>(m.isFieldOfType||(m.isFieldOfType=a===y,m.fieldIsValid=!s.errors[y]),m),{isFieldOfType:!1,fieldIsValid:!1}),p=a===A?"cvcPolicy":"expiryDatePolicy",d=p==="cvcPolicy"?Tr:xr,h=p==="cvcPolicy"?Ar:wt;return(s[p]===d||s[p]===h)&&u&&c?null:a})(n,e,[A,D,I,R]),n&&!r.includes(n)&&r.push(n),r},xi=(t,e,r)=>({rootNode:e,fieldType:t,error:De(r,`errors.${t}`)||Pi[t],type:"card"});function w(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ao=class{constructor(e){w(this,"callbacks",void 0),w(this,"config",void 0),w(this,"props",void 0),w(this,"state",void 0),w(this,"validateForm",void 0),w(this,"handleBrandFromBinLookup",void 0),w(this,"callbacksHandler",void 0),w(this,"configHandler",void 0),w(this,"createCardSecuredFields",void 0),w(this,"createNonCardSecuredFields",void 0),w(this,"createSecuredFields",void 0),w(this,"destroySecuredFields",void 0),w(this,"handleIOSTouchEvents",void 0),w(this,"destroyTouchendListener",void 0),w(this,"destroyTouchstartListener",void 0),w(this,"handleBinValue",void 0),w(this,"handleEncryption",void 0),w(this,"handleFocus",void 0),w(this,"handleIframeConfigFeedback",void 0),w(this,"handleValidation",void 0),w(this,"handleSFShiftTab",void 0),w(this,"handleShiftTab",void 0),w(this,"isConfigured",void 0),w(this,"postMessageToAllIframes",void 0),w(this,"processAutoComplete",void 0),w(this,"processBrand",void 0),w(this,"sendBrandToCardSF",void 0),w(this,"sendExpiryDatePolicyToSF",void 0),w(this,"setFocusOnFrame",void 0),w(this,"setupSecuredField",void 0),w(this,"touchendListener",void 0),w(this,"touchstartListener",void 0),w(this,"hasGenuineTouchEvents",void 0),w(this,"encryptedAttrName",void 0),w(this,"hasRedundantCVCField",void 0),w(this,"isSingleBrandedCard",void 0),w(this,"securityCode",void 0),this.props=e,this.state={},this.config={},this.callbacks={}}};var Di=Object.prototype.toString;function Dr(t){return typeof t=="object"&&t!==null&&Object.prototype.toString.call(t)==="[object Array]"}function Ce(t){return t!=null}function wr(t){return t!==!1&&Ce(t)}function qn(t){return!!t&&typeof t=="object"}function wi(t){return!wr(t)||!(!(typeof(e=t)=="number"||qn(e)&&Di.call(e)==="[object Number]")||t!==0&&!Number.isNaN(t))||!(!Dr(t)&&!(function(r){return typeof r=="string"||qn(r)&&Di.call(r)==="[object String]"})(t)||t.length!==0)||!(!qn(t)||Object.keys(t).length!==0);var e}function Nt(...t){let e=Dr(t[0])?t[0]:t;return{from:r=>e.map(o=>o in r?{[o]:r[o]}:{}).reduce((o,n)=>({...o,...n}),{})}}function Ii(...t){let e=Dr(t[0])?t[0]:t;return{from:r=>Nt(...Object.keys(r).filter(o=>!e.includes(o))).from(r)}}var ki=t=>Dr(t)&&t.length?t:Dt;var Ir=typeof window<"u"&&window.console&&window.console.error&&window.console.error.bind(window.console);typeof window<"u"&&window.console&&window.console.info&&window.console.info.bind(window.console);var xo=typeof window<"u"&&window.console&&window.console.log&&window.console.log.bind(window.console),Pe=typeof window<"u"&&window.console&&window.console.warn&&window.console.warn.bind(window.console);function Ni(t){this.config.cardGroupTypes=ki(t.cardGroupTypes);let e=t.loadingContext;if(!e)return void Pe("WARNING Config :: no loadingContext has been specified!");var r;this.config.loadingContext=(r=e).charAt(r.length-1)==="/"?e:`${e}/`,this.config.isCreditCardType=mi.includes(t.type)===!1,this.config.iframeUIConfig=t.iframeUIConfig??{},this.config.autoFocus=!(t.autoFocus===!1||t.autoFocus==="false"),this.config.showWarnings=t.showWarnings===!0||t.showWarnings==="true",this.config.trimTrailingSeparator=!(t.trimTrailingSeparator===!1||t.trimTrailingSeparator==="false"),this.config.keypadFix=!(t.keypadFix===!1||t.keypadFix==="false"),this.config.legacyInputMode=t.legacyInputMode||null,this.config.minimumExpiryDate=t.minimumExpiryDate||null,this.config.sfLogAtStart=window._b$dl===!0;let o=this.config.isCreditCardType?"card":t.type,n=btoa(window.location.origin),a=`${o}${!this.config.loadingContext.includes("live")&&t.forceCompat?"Compat":""}`;this.config.iframeSrc=`${this.config.loadingContext}securedfields/${t.clientKey}/${pi}/securedFields.html?type=${a}&d=${n}`}var Ee=()=>{};function Oi(t={}){this.callbacks.onLoad=t.onLoad?t.onLoad:Ee,this.callbacks.onConfigSuccess=t.onConfigSuccess?t.onConfigSuccess:Ee,this.callbacks.onFieldValid=t.onFieldValid?t.onFieldValid:Ee,this.callbacks.onAllValid=t.onAllValid?t.onAllValid:Ee,this.callbacks.onBrand=t.onBrand?t.onBrand:Ee,this.callbacks.onError=t.onError?t.onError:Ee,this.callbacks.onFocus=t.onFocus?t.onFocus:Ee,this.callbacks.onBinValue=t.onBinValue?t.onBinValue:Ee,this.callbacks.onAutoComplete=t.onAutoComplete?t.onAutoComplete:Ee,this.callbacks.onAdditionalSFConfig=t.onAdditionalSFConfig?t.onAdditionalSFConfig:Ee,this.callbacks.onAdditionalSFRemoved=t.onAdditionalSFRemoved?t.onAdditionalSFRemoved:Ee,this.callbacks.onTouchstartIOS=t.onTouchstartIOS?t.onTouchstartIOS:Ee,this.callbacks.onKeyPressed=t.onKeyPressed?t.onKeyPressed:Ee}var Mi=({fieldType:t,encryptedFieldName:e,uuid:r,isValid:o,txVariant:n,rootNode:a})=>({fieldType:t,encryptedFieldName:e,uid:r,valid:o,type:n,rootNode:a}),Fi=({fieldType:t,txVariant:e,rootNode:r})=>{let o=t===D,n=[],a=["encryptedExpiryMonth","encryptedExpiryYear"],s,l,c,u,p=o?2:1;for(s=0;s<p;s+=1){c=o?a[s]:t,l=`${e}-encrypted-${c}`,u=o?c:t;let d=Mi({fieldType:t,encryptedFieldName:u,uuid:l,isValid:!1,txVariant:e,rootNode:r});n.push(d)}return n},Li=({fieldType:t,txVariant:e,rootNode:r,encryptedObjArr:o})=>{let n,a,s,l,c,u=[];for(n=0;n<o.length;n+=1){s=o[n],l=s.encryptedFieldName,a=`${e}-encrypted-${l}`,c=s.blob;let p=Mi({fieldType:t,encryptedFieldName:l,uuid:a,isValid:!0,txVariant:e,rootNode:r});p.blob=c,u.push(p)}return u};function S(t={},e){return Object.prototype.hasOwnProperty.call(t,e)}var Do=(t,e,r,o,n)=>{if(!S(t,"error"))return null;let a=e,s={rootNode:o,fieldType:t.fieldType,error:null,type:null},l=t.error!=="";return l||a.hasError?(s.error=l?t.error:"",s.type=r,a.hasError=l,a.errorType=s.error,n(s),s):null};function Bi(t){let e,r=t.fieldType;if(this.state.type==="card"&&S(t,"cvcPolicy")&&Ce(t.cvcPolicy)&&S(this.state.securedFields,A)&&(this.state.securedFields[A].cvcPolicy=t.cvcPolicy),Do(t,this.state.securedFields[r],this.state.type,this.props.rootNode,this.callbacks.onError),this.state.securedFields[r].isEncrypted){e=Fi({fieldType:r,txVariant:this.state.type,rootNode:this.props.rootNode}),r===x&&(e[0].endDigits="");for(let o=0,n=e.length;o<n;o+=1)this.callbacks.onFieldValid(e[o]);this.state.securedFields[r].isEncrypted=!1}this.validateForm(),S(t,"brand")&&this.processBrand(t)}var de=(t,e,r)=>{if(e){let o=JSON.stringify(t);e.postMessage(o,r)}};function ce(t,e){return t.securedFields[e]?.iframeContentWindow||null}function Ui(t){let e=t.fieldType,r,o;this.config.autoFocus&&(t.type!=="year"&&e!==R||this.setFocusOnFrame(A),e===I&&this.setFocusOnFrame(R));let n=t[e];this.state.securedFields[e].isEncrypted=!0,Do({error:"",fieldType:e},this.state.securedFields[e],this.state.type,this.props.rootNode,this.callbacks.onError);let a=Li({fieldType:e,txVariant:this.state.type,rootNode:this.props.rootNode,encryptedObjArr:n});if(e===I&&S(this.state.securedFields,R)){let s={txVariant:this.state.type,code:t.code,blob:n[0].blob,fieldType:R,numKey:this.state.securedFields[R].numKey};de(s,ce(this.state,R),this.config.loadingContext)}for(e===x&&wr(t.endDigits)&&(a[0].endDigits=t.endDigits),e===x&&wr(t.issuerBin)&&(a[0].issuerBin=+t.issuerBin),e===D&&wr(t.expiryDate)&&(a[1].expiryDate=t.expiryDate),r=0,o=a.length;r<o;r+=1)this.callbacks.onFieldValid(a[r]);this.validateForm()}var wo=(t,e)=>{let r=[];return t&&typeof t.querySelectorAll=="function"&&(r=[].slice.call(t.querySelectorAll(e))),r},we=(t,e)=>{if(t)return t.querySelector(e)},kr=(t,e)=>{if(t)return t.getAttribute(e)},Vi=t=>{for(;t.firstChild;)t.removeChild(t.firstChild)};var Xn,P={__NO_BRAND:"noBrand",cards:[]};P.cards.push({cardType:"mc",startingRules:[51,52,53,54,55,22,23,24,25,26,27],permittedLengths:[16],pattern:/^(5[1-5][0-9]{0,14}|2[2-7][0-9]{0,14})$/,securityCode:"CVC"}),P.cards.push({cardType:"visadankort",startingRules:[4571],permittedLengths:[16],pattern:/^(4571)[0-9]{0,12}$/}),P.cards.push({cardType:"visa",startingRules:[4],permittedLengths:[13,16,19],pattern:/^4[0-9]{0,18}$/,securityCode:"CVV"}),P.cards.push({cardType:"amex",startingRules:[34,37],permittedLengths:[15],pattern:/^3[47][0-9]{0,13}$/,securityCode:"CID"}),P.cards.push({cardType:"diners",startingRules:[36],permittedLengths:[14,15,16,17,18,19],pattern:/^(36)[0-9]{0,12}$/}),P.cards.push({cardType:"maestrouk",startingRules:[6759],permittedLengths:[16,18,19],pattern:/^(6759)[0-9]{0,15}$/}),P.cards.push({cardType:"solo",startingRules:[6767],permittedLengths:[16,18,19],pattern:/^(6767)[0-9]{0,15}$/}),P.cards.push({cardType:"laser",startingRules:[6304,6706,677117,677120],permittedLengths:[16,17,18,19],pattern:/^(6304|6706|6709|6771)[0-9]{0,15}$/,cvcPolicy:"optional"}),P.cards.push({cardType:"discover",startingRules:[6011,644,645,646,647,648,649,65],permittedLengths:[16,17,18,19],pattern:/^(6011[0-9]{0,12}|(644|645|646|647|648|649)[0-9]{0,13}|65[0-9]{0,14})$/}),P.cards.push({cardType:"jcb",startingRules:[3528,3529,353,354,355,356,357,358],permittedLengths:[16,19],pattern:/^(352[8,9]{1}[0-9]{0,15}|35[4-8]{1}[0-9]{0,16})$/,securityCode:"CAV"}),P.cards.push({cardType:"bcmc",startingRules:[6703,479658,606005],permittedLengths:[16,17,18,19],pattern:/^((6703)[0-9]{0,15}|(479658|606005)[0-9]{0,13})$/,cvcPolicy:"hidden"}),P.cards.push({cardType:"bijcard",startingRules:[5100081],permittedLengths:[16],pattern:/^(5100081)[0-9]{0,9}$/}),P.cards.push({cardType:"dankort",startingRules:[5019],permittedLengths:[16],pattern:/^(5019)[0-9]{0,12}$/}),P.cards.push({cardType:"hipercard",startingRules:[606282],permittedLengths:[16],pattern:/^(606282)[0-9]{0,10}$/}),P.cards.push({cardType:"cup",startingRules:[62,81],permittedLengths:[14,15,16,17,18,19],pattern:/^(62|81)[0-9]{0,17}$/}),P.cards.push({cardType:"maestro",startingRules:[50,56,57,58,6],permittedLengths:[16,17,18,19],pattern:/^(5[0|6-8][0-9]{0,17}|6[0-9]{0,18})$/,cvcPolicy:"optional"}),P.cards.push({cardType:"elo",startingRules:[506699,50670,50671,50672,50673,50674,50675,50676,506770,506771,506772,506773,506774,506775,506776,506777,506778,401178,438935,451416,457631,457632,504175,627780,636297,636368],permittedLengths:[16],pattern:/^((((506699)|(506770)|(506771)|(506772)|(506773)|(506774)|(506775)|(506776)|(506777)|(506778)|(401178)|(438935)|(451416)|(457631)|(457632)|(504175)|(627780)|(636368)|(636297))[0-9]{0,10})|((50676)|(50675)|(50674)|(50673)|(50672)|(50671)|(50670))[0-9]{0,11})$/}),P.cards.push({cardType:"uatp",startingRules:[1],permittedLengths:[15],pattern:/^1[0-9]{0,14}$/,cvcPolicy:"optional"}),P.cards.push({cardType:"cartebancaire",startingRules:[4,5,6],permittedLengths:[16],pattern:/^[4-6][0-9]{0,15}$/}),P.cards.push({cardType:"visaalphabankbonus",startingRules:[450903],permittedLengths:[16],pattern:/^(450903)[0-9]{0,10}$/}),P.cards.push({cardType:"mcalphabankbonus",startingRules:[510099],permittedLengths:[16],pattern:/^(510099)[0-9]{0,10}$/}),P.cards.push({cardType:"hiper",startingRules:[637095,637568,637599,637609,637612],permittedLengths:[16],pattern:/^(637095|637568|637599|637609|637612)[0-9]{0,10}$/}),P.cards.push({cardType:"oasis",startingRules:[982616],permittedLengths:[16],pattern:/^(982616)[0-9]{0,10}$/,cvcPolicy:"optional"}),P.cards.push({cardType:"karenmillen",startingRules:[98261465],permittedLengths:[16],pattern:/^(98261465)[0-9]{0,8}$/,cvcPolicy:"optional"}),P.cards.push({cardType:"warehouse",startingRules:[982633],permittedLengths:[16],pattern:/^(982633)[0-9]{0,10}$/,cvcPolicy:"optional"}),P.cards.push({cardType:"mir",startingRules:[220],permittedLengths:[16,17,18,19],pattern:/^(220)[0-9]{0,16}$/}),P.cards.push({cardType:"codensa",startingRules:[590712],permittedLengths:[16],pattern:/^(590712)[0-9]{0,10}$/}),P.cards.push({cardType:"naranja",startingRules:[377798,377799,402917,402918,527571,527572,589562],permittedLengths:[16,17,18,19],pattern:/^(37|40|5[28])([279])\d*$/}),P.cards.push({cardType:"cabal",startingRules:[589657,600691,603522,6042,6043,636908],permittedLengths:[16,17,18,19],pattern:/^(58|6[03])([03469])\d*$/}),P.cards.push({cardType:"shopping",startingRules:[2799,589407,603488],permittedLengths:[16,17,18,19],pattern:/^(27|58|60)([39])\d*$/}),P.cards.push({cardType:"argencard",startingRules:[501],permittedLengths:[16,17,18,19],pattern:/^(50)(1)\d*$/}),P.cards.push({cardType:"troy",startingRules:[9792],permittedLengths:[16],pattern:/^(97)(9)\d*$/}),P.cards.push({cardType:"forbrugsforeningen",startingRules:[600722],permittedLengths:[16],pattern:/^(60)(0)\d*$/}),P.cards.push({cardType:"vpay",startingRules:[401,408,413,434,435,437,439,441,442,443,444,446,447,455,458,460,461,463,466,471,479,482,483,487],permittedLengths:[13,14,15,16,17,18,19],pattern:/^(40[1,8]|413|43[4,5]|44[1,2,3,4,6,7]|45[5,8]|46[0,1,3,6]|47[1,9]|48[2,3,7])[0-9]{0,16}$/}),P.cards.push({cardType:"rupay",startingRules:[508528],permittedLengths:[16],pattern:/^(100003|508(2|[5-9])|60(69|[7-8])|652(1[5-9]|[2-5][0-9]|8[5-9])|65300[3-4]|8172([0-1]|[3-5]|7|9)|817(3[3-8]|40[6-9]|410)|35380([0-2]|[5-6]|9))[0-9]{0,12}$/}),P.cards.push({cardType:"ticket",expiryDatePolicy:"hidden"});var Zt={detectCard:(t,e)=>{let r,o,n;if(e){if(r=P.cards.filter(a=>e.includes(a.cardType)).filter(a=>S(a,"pattern")&&t.match(a.pattern)),r.length){if(r.length===1)return r[0];for(o=0,n=r.length;o<n;o+=1)if(!r[o].longestRule){let a=r[o].startingRules.reduce((s,l)=>s>l?s:l);r[o].longestRule=String(a).length}return r.reduce((a,s)=>a.longestRule>=s.longestRule?a:s)}return{cardType:P.__NO_BRAND}}return{cardType:P.__NO_BRAND}},detectCardLength:(t,e)=>{let r,o,n=0,a=!1,s=e,l=t.cardType!==P.__NO_BRAND?t.permittedLengths[t.permittedLengths.length-1]:0;if(l&&s>l&&(n=s.length-l,n>0&&(s=s.substring(0,s.length-n),o=s)),t.permittedLengths.forEach(c=>{s.length===c&&(a=!0)}),s.length===l){let c=Math.floor(s.length/4);r=l+(s.length%4>0?c:c-1),t.cardType.toLowerCase()==="amex"&&(r=l+2)}return{shortenedNewValue:o,maxLength:r,reachedValidLength:a}},getShortestPermittedCardLength:()=>{if(!Xn){let t=[];P.cards.forEach(e=>{t=t.concat(e.permittedLengths??[])}),Xn=Math.min.apply(null,t)}return Xn},getCardByBrand:t=>P.cards.filter(e=>e.cardType===t)[0],isGenericCardType:t=>{if(!t)throw new Error("Error: isGenericCardType: type param has not been specified");return t==="card"||t==="scheme"},__NO_BRAND:P.__NO_BRAND,allCards:P.cards};function Hi({src:t,title:e="iframe element",policy:r="origin"}){let o=document.createElement("iframe");o.setAttribute("src",t),o.classList.add("js-iframe"),e===""||e.trim().length===0||e==="none"?o.setAttribute("role","presentation"):o.setAttribute("title",e),o.setAttribute("allowtransparency","true"),o.setAttribute("referrerpolicy",r);let n=document.createTextNode("<p>Your browser does not support iframes.</p>");return o.appendChild(n),o}var qe=(t,e,r,o=!1)=>!(!t||typeof t.addEventListener!="function")&&(t.addEventListener(e,r,o),!0),it=(t,e,r,o=!1)=>!(!t||typeof t.removeEventListener!="function")&&(t.removeEventListener(e,r,o),!0);var Yi=(t,e,r)=>{let o=t.origin,n=e.indexOf("/checkoutshopper/"),a=n>-1?e.substring(0,n):e,s=a.length-1;return a.charAt(s)==="/"&&(a=a.substring(0,s)),o===a||(r&&Pe(`WARNING postMessageValidation: postMessage listener for iframe::origin mismatch!
|
|
5
|
-
Received message with origin:`,o,"but the only allowed origin for messages to CSF is",a,"### event.data=",t.data),!1)}
|
|
6
|
-
About to set up securedField:`,a),await this.setupSecuredField(a,e,r).catch(s=>{window._b$dl&&console.log("Secured fields setup failure. e=",s)}),window._b$dl&&console.log("Finished setting up securedField:",a)}if(window._b$dl&&console.log("Finished setting up all securedFields"),this.isSingleBrandedCard){let n={type:this.state.type,rootNode:this.props.rootNode,brand:o,cvcPolicy:e,expiryDatePolicy:r,cvcText:this.securityCode};setTimeout(()=>{this.callbacks.onBrand(n)},0)}}function
|
|
7
|
-
iframe load count=${this.state.iframeCount}. Expected count:${this.state.numIframes}`);if(l.loadToConfigTimeout=setTimeout(()=>{n({type:s.fieldType,failReason:"sf took too long to config"})},vi),this.state.iframeCount===this.state.originalNumIframes){let c={iframesLoaded:!0};this.callbacks.onLoad(c)}}).onConfig(c=>{this.handleIframeConfigFeedback(c),clearTimeout(l.loadToConfigTimeout),l.loadToConfigTimeout=null,o(c)}).onFocus(c=>{this.handleFocus(c)}).onBinValue(c=>{this.handleBinValue(c)}).onTouchstart(c=>{this.props.shouldDisableIOSArrowKeys&&(this.hasGenuineTouchEvents||c.hasGenuineTouchEvents)&&this.callbacks.onTouchstartIOS({fieldType:c.fieldType}),(c.hasGenuineTouchEvents||this.hasGenuineTouchEvents)&&this.postMessageToAllIframes({fieldType:c.fieldType,fieldClick:!0})}).onShiftTab(c=>{this.handleSFShiftTab(c.fieldType)}).onEncryption(c=>{this.handleEncryption(c)}).onValidation(c=>{this.handleValidation(c)}).onAutoComplete(c=>{this.processAutoComplete(c)}).onKeyPressed(c=>{let{numKey:u,...p}=c;this.callbacks.onKeyPressed(p)});this.state.securedFields[a]=l})}var ku=typeof navigator<"u"&&(function(){let t=navigator.userAgent,e=t.indexOf("MSIE ");if(e>0)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);if(t.indexOf("Trident/")>0){let o=t.indexOf("rv:");return parseInt(t.substring(o+3,t.indexOf(".",o)),10)}let r=t.indexOf("Edge/");return r>0&&parseInt(t.substring(r+5,t.indexOf(".",r)),10)})(),Ie={__IS_IE:ku,__IS_IOS:typeof navigator<"u"&&/iphone|ipod|ipad/i.test(navigator.userAgent),__IS_FIREFOX:typeof navigator<"u"&&/(firefox)/i.test(navigator.userAgent)};var qt={touchendListener:function(t){let e=t.target;if(e instanceof HTMLInputElement||HTMLTextAreaElement&&e instanceof HTMLTextAreaElement){let o=e.value,n="selectionStart"in(r=e)?r.selectionStart:0,a=!1;n===o.length&&(n-=1,a=!0),e.value=o;try{e.setSelectionRange&&(e.focus(),e.setSelectionRange(n,n),a&&(n+=1,setTimeout(()=>{e.setSelectionRange(n,n)},0)))}catch{}}else if(this.config.keypadFix){let o=this.props.rootNode,n=document.createElement("input");n.style.width="1px",n.style.height="1px",n.style.opacity="0",n.style.fontSize="18px",o.appendChild(n),n.focus(),o.removeChild(n)}var r;this.destroyTouchendListener(),this.state.registerFieldForIos=!1,this.postMessageToAllIframes({fieldType:"webInternalElement",fieldClick:!0})},touchstartListener:function(t){this.hasGenuineTouchEvents=!0;let e=t.target;if(e instanceof HTMLInputElement||e instanceof HTMLSpanElement){this.postMessageToAllIframes({fieldType:"webInternalElement",checkoutTouchEvent:!0});let r=e.getAttribute("name")??e.getAttribute("data-id");this.callbacks.onTouchstartIOS?.({fieldType:"webInternalElement",name:r})}},handleTouchend:function(){let t=we(document,"body");t.style.cursor="pointer",qe(t,"touchend",this.touchendListener),this.state.registerFieldForIos=!0},destroyTouchendListener:function(){if(!Ie.__IS_IOS)return!1;let t=we(document,"body");return t.style.cursor="auto",it(t,"touchend",this.touchendListener),!0},destroyTouchstartListener:function(){return!!Ie.__IS_IOS&&(it(document,"touchstart",this.touchstartListener),!0)}};var lt=(t,e,r)=>((o,n=!0)=>{let a=Array.prototype.slice.call(wo(document,"*[data-cse], a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), object, embed, *[tabindex], *[contenteditable]")),s=[];a.forEach(c=>{let u=c.getAttribute("tabindex"),p=!u||parseInt(u,10)>=0,d=c.getBoundingClientRect(),h=d.width>0&&d.height>0;p&&h&&s.push(c)});let l=((c,u)=>{for(let p=0;p<c.length;p+=1)if(u(c[p]))return p;return-1})(s,c=>c===o||o.contains(c));return s[l+(n?-1:1)]})(we(e,`[data-cse=${t}]`),r),tl=t=>{t&&(t.focus(),t.blur(),t.focus())};function rl(t,e,r,o){let n,a;switch(t){case x:n=lt(x,e);break;case D:case I:a=x;break;case R:a=I;break;case A:o===1?n=lt(A,e):a=r?R:D}return{fieldToFocus:a,additionalField:n}}function ol(t,e){let r,o;switch(t){case x:r=lt(x,e);break;case A:o=x}return{fieldToFocus:o,additionalField:r}}function nl(t,e,r){let o,n;switch(t){case x:o=lt(x,e);break;case D:case I:n=x;break;case R:n=I;break;case A:n=r?R:D;break;case fe:o=lt(t,e)}return{fieldToFocus:n,additionalField:o}}var ra={handleShiftTab:function(t){let e;this.state.type==="giftcard"?e=ol(t,this.props.rootNode):e=this.state.isKCP?nl(t,this.props.rootNode,this.state.hasSeparateDateFields):rl(t,this.props.rootNode,this.state.hasSeparateDateFields,this.state.numIframes);let r=e.fieldToFocus,o=e.additionalField;r?this.setFocusOnFrame(r,!1):o&&tl(o)},handleSFShiftTab:function(t){(Ie.__IS_FIREFOX||Ie.__IS_IE&&Ie.__IS_IE<=11)&&this.handleShiftTab(t)}};function al(t){if(S(this.state.securedFields,x)){let e={txVariant:this.state.type,...t,fieldType:x,numKey:this.state.securedFields[x].numKey};de(e,ce(this.state,x),this.config.loadingContext)}}function sl(t){(S(this.state.securedFields,I)&&S(this.state.securedFields,R)?[I,R]:[D]).forEach(e=>{let r={txVariant:this.state.type,...t,fieldType:e,numKey:this.state.securedFields[e].numKey};de(r,ce(this.state,e),this.config.loadingContext)})}function il(t,e){let r=this.state.type==="card";if(!t||!Object.keys(t).length)return r?(this.sendBrandToCardSF({brand:"reset"}),this.sendExpiryDatePolicyToSF({expiryDatePolicy:xe})):e&&this.processBrand({...e,fieldType:x}),void(this.state.type==="card"&&S(this.state.securedFields,D)&&(this.state.securedFields[D].expiryDatePolicy=xe));let o=t.supportedBrands[0],n=o.brand,a=o.expiryDatePolicy??(o.showExpiryDate===!0?xe:wt),s={brand:n,cvcPolicy:o.cvcPolicy,expiryDatePolicy:a,cvcText:"Security code",showSocialSecurityNumber:o.showSocialSecurityNumber??!1,fieldType:x};if(this.processBrand(s),r){let l={brand:n,enableLuhnCheck:t.supportedBrands[0].enableLuhnCheck!==!1,...o?.panLength&&!t.isDualBrandSelection&&{panLength:o?.panLength}};this.sendBrandToCardSF(l),this.sendExpiryDatePolicyToSF({expiryDatePolicy:a})}S(this.state.securedFields,A)&&(this.state.securedFields[A].cvcPolicy=o.cvcPolicy),S(this.state.securedFields,D)?this.state.securedFields[D].expiryDatePolicy=a:S(this.state.securedFields,I)&&S(this.state.securedFields,R)&&(this.state.securedFields[I].expiryDatePolicy=a,this.state.securedFields[R].expiryDatePolicy=a),this.validateForm()}function ll({csfState:t,csfConfig:e},r,o){if(!S(t.securedFields,r))return;let n={txVariant:t.type,fieldType:r,focus:!0,numKey:t.securedFields[r].numKey};de(n,ce(t,r),e.loadingContext)}function dl({csfState:t,csfConfig:e},r){let o=Object.keys(r||{});return o.length?(Object.keys(t.securedFields).forEach(n=>{let a={txVariant:t.type,fieldType:n,numKey:t.securedFields[n].numKey};o.forEach(s=>{a[s]=r[s]}),de(a,ce(t,n),e.loadingContext)}),!0):!1}function cl({csfState:t,csfConfig:e,csfProps:r,csfCallbacks:o},n){if(n.fieldType===x){let l={brand:n.brand,cvcPolicy:n.cvcPolicy,expiryDatePolicy:n.expiryDatePolicy,showSocialSecurityNumber:n.showSocialSecurityNumber},c=(a=l,s=t.brand,!Jn(a,s));if(!c)return null;let u=t.type==="card"||t.type==="bcmc";if(u&&c&&(t.brand=l,S(t.securedFields,A))){let d={txVariant:t.type,brand:l.brand,fieldType:A,cvcPolicy:n.cvcPolicy,numKey:t.securedFields[A].numKey};de(d,ce(t,A),e.loadingContext)}let p=u?Nt(["brand","cvcPolicy","cvcText","expiryDatePolicy","showSocialSecurityNumber"]).from(n):null;if(p&&p.brand){let d=p;d.type=t.type,d.rootNode=r.rootNode,o.onBrand(d)}return!0}var a,s;return!1}function ul({csfState:t,csfConfig:e,csfCallbacks:r},o){if(o.name==="cc-name"){let n={...o};delete n.numKey;let a=n;return r.onAutoComplete(a),!0}if(o.name==="cc-exp"){let n=o.value.replace(/[^0-9]/gi,"/").split("/");if(n.length!==2)return!1;n[0].length===1&&(n[0]=`0${n[0]}`);let a=n[0],s=n[1];if(!((s?.length===4||s?.length===2)&&!isNaN(parseInt(s))))return!1;let l=s.slice(-2),c=`${a}/${l}`;if(S(t.securedFields,D)){let u={txVariant:t.type,fieldType:D,autoComplete:c,numKey:t.securedFields[D].numKey};return de(u,ce(t,D),e.loadingContext),!0}if(S(t.securedFields,I)){let u={txVariant:t.type,fieldType:I,autoComplete:a,numKey:t.securedFields[I].numKey};de(u,ce(t,I),e.loadingContext)}return S(t.securedFields,R)&&setTimeout(()=>{let u={txVariant:t.type,fieldType:R,autoComplete:l,numKey:t.securedFields[R].numKey};de(u,ce(t,R),e.loadingContext)},0),!0}return!1}function pl({csfState:t,csfProps:e,csfCallbacks:r},o,n){let a={...n};delete a.numKey,a.rootNode=e.rootNode,a.type=t.type;let s=a.fieldType;a.focus?t.currentFocusObject!==s&&(t.currentFocusObject=s,Ie.__IS_IOS&&!t.registerFieldForIos&&o()):t.currentFocusObject===s&&(t.currentFocusObject=null);let l=a;l.currentFocusObject=t.currentFocusObject,r.onFocus(l)}function ml({csfState:t,csfCallbacks:e},r,o){if(t.iframeConfigCount+=1,window._b$dl&&console.log("### handleIframeConfigFeedback::csfState.iframeConfigCount:: ",t.iframeConfigCount,"who=",o.fieldType),t.isConfigured){let n={additionalIframeConfigured:!0,fieldType:o.fieldType,type:t.type};e.onAdditionalSFConfig(n)}else if(t.iframeConfigCount===t.originalNumIframes)return r(),!0;return!1}function hl({csfState:t,csfConfig:e,csfProps:r,csfCallbacks:o},n){t.isConfigured=!0;let a={iframesConfigured:!0,type:t.type,rootNode:r.rootNode};if(o.onConfigSuccess(a),t.numIframes===1&&e.isCreditCardType){if(t.type==="card")return Ir("ERROR: Payment method with a single secured field - but 'brands' has not been set to an array containing the specific card brand"),!1;let s=Zt.getCardByBrand(t.type);s&&(s.cvcPolicy??Me)!==Me&&n()}return!0}function fl({csfState:t,csfProps:e,csfCallbacks:r}){let o=(s=>{let l=Object.keys(s);for(let c=0,u=l.length;c<u;c+=1)if(!s[l[c]].isValid)return!1;return!0})(t.securedFields),n=o!==t.allValid;if(t.allValid=o,!o&&!n)return;let a={allValid:o,type:t.type,rootNode:e.rootNode};r.onAllValid(a)}function _l({csfState:t,csfCallbacks:e},r){let{binValue:o,encryptedBin:n,uuid:a}=r,s={binValue:o,type:t.type};n&&(s.encryptedBin=n,s.uuid=a),e.onBinValue(s)}function yl(){this.postMessageToAllIframes({destroy:!0}),Object.keys(this.state.securedFields).forEach(t=>{let e=this.state.securedFields[t];e&&e.destroy(),this.state.securedFields[t]=null}),this.destroyTouchendListener(),this.destroyTouchstartListener(),this.state.securedFields={}}var Mr=(t="You cannot use secured fields")=>{Pe(`${t} - they are not yet configured. Use the 'onConfigSuccess' callback to know when this has happened.`)},No=class extends Ao{init(){this.configHandler(this.props),this.callbacksHandler(this.props.callbacks);let e=this.createSecuredFields();this.state.numIframes=this.state.originalNumIframes=e,this.state.isKCP=!!this.props.isKCP,Ie.__IS_IOS&&this.props.shouldDisableIOSArrowKeys&&(this.hasGenuineTouchEvents=!1,qe(document,"touchstart",this.touchstartListener))}createReturnObject(){return{updateStyles:e=>{this.state.isConfigured?this.postMessageToAllIframes({styleObject:e}):Pe("You cannot update the secured fields styling - they are not yet configured. Use the 'onConfigSuccess' callback to know when this has happened.")},setFocusOnFrame:e=>{this.state.isConfigured?this.setFocusOnFrame(e):Mr("You cannot set focus on any secured field")},isValidated:(e,r)=>{if(this.state.isConfigured){if(S(this.state.securedFields,e)){this.state.securedFields[e].hasError=!0,this.state.securedFields[e].errorType===""&&(this.state.securedFields[e].errorType="isValidated");let o={txVariant:this.state.type,fieldType:e,externalValidation:!0,code:r,numKey:this.state.securedFields[e].numKey};de(o,ce(this.state,e),this.config.loadingContext)}}else Mr("You cannot set validated on any secured field")},hasUnsupportedCard:(e,r)=>{if(this.state.isConfigured){if(S(this.state.securedFields,e)){this.state.securedFields[e].hasError=!!r,this.state.securedFields[e].errorType=r;let o={txVariant:this.state.type,fieldType:e,unsupportedCard:!!r,code:r,numKey:this.state.securedFields[e].numKey};de(o,ce(this.state,e),this.config.loadingContext)}}else Mr("You cannot set hasUnsupportedCard on any secured field")},destroy:()=>{this.state.isConfigured?this.destroySecuredFields():Mr("You cannot destroy secured fields")},brandsFromBinLookup:(e,r)=>{if(!this.config.isCreditCardType)return null;this.state.isConfigured?this.handleBrandFromBinLookup(e,r):Mr("You cannot set pass brands to secured fields")},addSecuredField:e=>{let r=we(this.props.rootNode,`[data-cse="${e}"]`);r&&(this.state.numIframes+=1,this.setupSecuredField(r))},removeSecuredField:e=>{if(this.state.securedFields[e]){this.state.securedFields[e].destroy(),delete this.state.securedFields[e],this.state.numIframes-=1,this.state.iframeCount-=1;let r={additionalIframeRemoved:!0,fieldType:e,type:this.state.type};this.callbacks.onAdditionalSFRemoved(r)}},setKCPStatus:e=>{this.state.isKCP=e},sfIsOptionalOrHidden:e=>this.state.securedFields[e].isOptionalOrHidden()}}constructor(e){super(e),this.state={type:this.props.type,brand:this.props.type!=="card"?{brand:this.props.type,cvcPolicy:"required"}:{brand:null,cvcPolicy:"required"},allValid:void 0,numIframes:0,originalNumIframes:0,iframeCount:0,iframeConfigCount:0,isConfigured:!1,hasSeparateDateFields:!1,currentFocusObject:null,registerFieldForIos:!1,securedFields:{},isKCP:!1};let r={csfState:this.state,csfConfig:this.config,csfProps:this.props,csfCallbacks:this.callbacks};this.configHandler=Ni,this.callbacksHandler=Oi,this.validateForm=Fe(fl,r),this.isConfigured=Fe(hl,r,this.validateForm),this.handleIframeConfigFeedback=Fe(ml,r,this.isConfigured),this.processBrand=Fe(cl,r),this.handleValidation=Bi,this.handleEncryption=Ui,this.createSecuredFields=Xi,this.createNonCardSecuredFields=Ji,this.createCardSecuredFields=Qi,this.setupSecuredField=el,this.postMessageToAllIframes=Fe(dl,r),this.handleIOSTouchEvents=qt.handleTouchend.bind(this),this.touchendListener=qt.touchendListener.bind(this),this.destroyTouchendListener=qt.destroyTouchendListener.bind(this),this.touchstartListener=qt.touchstartListener.bind(this),this.destroyTouchstartListener=qt.destroyTouchstartListener.bind(this),this.setFocusOnFrame=Fe(ll,r),this.handleFocus=Fe(pl,r,this.handleIOSTouchEvents),this.handleSFShiftTab=ra.handleSFShiftTab,this.handleShiftTab=ra.handleShiftTab,this.destroySecuredFields=yl,this.processAutoComplete=Fe(ul,r),this.handleBinValue=Fe(_l,r),this.handleBrandFromBinLookup=il,this.sendBrandToCardSF=al,this.sendExpiryDatePolicyToSF=sl,this.init()}};var gl=t=>{if(!t)throw new Error("No securedFields configuration object defined");let e={...t};try{let o=Zt.isGenericCardType(e.type);e.type=o?"card":e.type}catch{e.type="card"}if(!S(e,"rootNode"))return Ir('ERROR: SecuredFields configuration object is missing a "rootNode" property');if(wi(e.clientKey))return Pe('WARNING: AdyenCheckout configuration object is missing a "clientKey" property.');let r=Nu(e.rootNode);return r?(e.rootNode=r,new No(e).createReturnObject()):Ir(`ERROR: SecuredFields cannot find a valid rootNode element for ${e.type}`)},Nu=t=>{let e;return typeof t=="object"&&(e=t),typeof t!="string"||(e=we(document,t),e)?e:null};var Cl=t=>t.replace(/([a-z])([A-Z])/g,"$1_$2").toLowerCase();var Oo=(t,e)=>{let r=t==="card"?"nocard":t||"nocard",o={type:r,extension:"svg"};return e.getImage(o)(r)},vl=t=>{let e=Cl(t);return So.includes(t)&&(e=e.substring(ui.length+1)),e};function Mo(t,e,r,o){return(e!==Po&&e!==Ro||r[t]!==0)&&o[t]}var Re={handleFocus:function(t){this.numCharsInField[t.fieldType]=t.numChars,this.props.onFocus(t)},handleOnAllValid:function(t){return!this.state.detectedUnsupportedBrands&&(this.setState({isSfpValid:t.allValid},()=>{this.props.onChange(this.state,{event:"handleOnAllValid"}),this.props.onAllValid(t)}),!0)},handleOnAutoComplete:function(t){this.setState({autoCompleteName:t.value},()=>{this.props.onChange(this.state,{event:"handleOnAutoComplete",fieldType:t.fieldType}),this.setState({autoCompleteName:null})}),this.props.onAutoComplete(t)},handleOnFieldValid:function(t){return(!this.state.detectedUnsupportedBrands||t.fieldType!==x)&&(this.setState(e=>({data:{...e.data,[t.encryptedFieldName]:t.blob},valid:{...e.valid,[t.encryptedFieldName]:t.valid},errors:{...e.errors,[t.fieldType]:e.errors[t.fieldType]??!1}}),()=>{this.props.onChange(this.state,{event:"handleOnFieldValid",fieldType:t.fieldType}),this.props.onFieldValid(t)}),!0)},handleOnLoad:function(t){clearTimeout(this.csfLoadFailTimeout),this.csfLoadFailTimeout=null,this.props.onLoad(t),this.csfConfigFailTimeout=setTimeout(()=>{this.state.status!=="ready"&&(this.setState({status:"csfConfigFailure"}),this.props.onError(new v("ERROR","secured fields have failed to configure")))},this.csfConfigFailTimeoutMS)},handleOnConfigSuccess:function(t){clearTimeout(this.csfConfigFailTimeout),this.csfConfigFailTimeout=null,this.setState({status:"ready"},()=>{this.props.onConfigSuccess(t)})},handleOnBrand:function(t){this.setState(e=>{let r=Mo(A,t.cvcPolicy,this.numCharsInField,e.errors),o=this.numDateFields===1?Mo(D,t.expiryDatePolicy,this.numCharsInField,e.errors):null,n=this.numDateFields===2?Mo(I,t.expiryDatePolicy,this.numCharsInField,e.errors):null,a=this.numDateFields===2?Mo(R,t.expiryDatePolicy,this.numCharsInField,e.errors):null;return{brand:t.brand,cvcPolicy:t.cvcPolicy??Me,showSocialSecurityNumber:t.showSocialSecurityNumber,errors:{...e.errors,...Ce(r)&&{[A]:r},...Ce(o)&&{[D]:o},...Ce(n)&&{[I]:n},...Ce(a)&&{[R]:a}},expiryDatePolicy:t.expiryDatePolicy??xe}},()=>{this.props.onChange(this.state,{event:"handleOnBrand"});let e=this.props.brandsConfiguration[t.brand]?.icon??Oo(t.brand,this.props.resources);this.props.onBrand({...t,brandImageUrl:e})})},handleOnError:function(t,e=null){let r=t.error;return this.setState(o=>({errors:{...o.errors,[t.fieldType]:r||!1},...e&&{data:{...o.data,[x]:void 0}},...e&&{valid:{...o.valid,[x]:!1}},...e&&{isSfpValid:!1}}),()=>{this.props.onChange(this.state,{event:"handleOnError",fieldType:t.fieldType})}),!0},handleOnNoDataRequired:function(){this.setState({status:"ready"},()=>this.props.onChange({isSfpValid:!0}))},handleOnTouchstartIOS:function(t){this.props.disableIOSArrowKeys?.(t)},handleKeyPressed:function(t){if(t.action==="enterKeyPressed"){let e=new KeyboardEvent("keypress",{bubbles:!0,cancelable:!0,key:"Enter",code:"Enter"});this.props.handleKeyPress?.(e)}}};var bl={type:"card",keypadFix:!0,rootNode:null,loadingContext:null,brands:[],showWarnings:!1,autoFocus:!0,trimTrailingSeparator:!0,onChange:()=>{},onLoad:()=>{},onConfigSuccess:()=>{},onAllValid:()=>{},onFieldValid:()=>{},onBrand:()=>{},onError:()=>{},onBinValue:()=>{},onFocus:()=>{},onAutoComplete:()=>{},handleKeyPress:()=>{},styles:{}};function j(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Fr=class extends U{componentDidMount(){this.props.rootNode&&this.setRootNode(this.props.rootNode);let e=Ri(this.rootNode),r=e.reduce(Ti,{});this.setState({valid:r}),e.forEach(o=>{this.numCharsInField[o]=0}),this.numDateFields=e.filter(o=>o.match(/Expiry/)).length,e.length?(this.destroy(),this.initializeCSF(this.rootNode)):this.handleOnNoDataRequired()}componentDidUpdate(){this.checkForKCPFields(),this.props.onStateUpdate?.(this.state)}componentWillUnmount(){this.csf=null,clearTimeout(this.csfLoadFailTimeout),clearTimeout(this.csfConfigFailTimeout)}initializeCSF(e){let r=this.props.loadingContext,o={rootNode:e,type:this.props.type,clientKey:this.props.clientKey,cardGroupTypes:this.props.brands,autoFocus:this.props.autoFocus,trimTrailingSeparator:this.props.trimTrailingSeparator,loadingContext:r,keypadFix:this.props.keypadFix,showWarnings:this.props.showWarnings,iframeUIConfig:{sfStyles:this.props.styles},i18n:this.props.i18n,callbacks:{onLoad:this.handleOnLoad,onConfigSuccess:this.handleOnConfigSuccess,onFieldValid:this.handleOnFieldValid,onAllValid:this.handleOnAllValid,onBrand:this.handleOnBrand,onError:this.handleOnError,onFocus:this.handleFocus,onBinValue:this.props.onBinValue,onAutoComplete:this.handleOnAutoComplete,onAdditionalSFConfig:this.props.onAdditionalSFConfig,onAdditionalSFRemoved:this.props.onAdditionalSFRemoved,onTouchstartIOS:this.handleOnTouchstartIOS,onKeyPressed:this.handleKeyPressed},isKCP:this.state.hasKoreanFields,legacyInputMode:this.props.legacyInputMode,minimumExpiryDate:this.props.minimumExpiryDate,implementationType:this.props.implementationType||"components",forceCompat:this.props.forceCompat,maskSecurityCode:this.props.maskSecurityCode,exposeExpiryDate:this.props.exposeExpiryDate,shouldDisableIOSArrowKeys:!!this.props.disableIOSArrowKeys,placeholders:this.props.placeholders??{},showContextualElement:this.props.showContextualElement};this.csf=gl(o),this.csfLoadFailTimeout=setTimeout(()=>{this.state.status!=="ready"&&(this.setState({status:"csfLoadFailure"}),this.props.onError(new v("ERROR","secured field iframes have failed to load")))},this.csfLoadFailTimeoutMS)}checkForKCPFields(){let e=!1;if(this.props.koreanAuthenticationRequired&&(e=this.issuingCountryCode?this.issuingCountryCode==="kr":this.props.countryCode==="kr"),this.state.hasKoreanFields&&!e){let r=o=>({data:{...o.data,[fe]:void 0},valid:{...o.valid,[fe]:!1},errors:{...o.errors,[fe]:!1},hasKoreanFields:!1});this.setState(r,()=>{this.props.onChange(this.state)}),this.csf.removeSecuredField(fe),this.csf.setKCPStatus(!1)}if(!this.state.hasKoreanFields&&e){let r=o=>({valid:{...o.valid,[fe]:!1},hasKoreanFields:!0,isSfpValid:!1});this.setState(r,()=>{this.props.onChange(this.state)}),this.csf.addSecuredField(fe),this.csf.setKCPStatus(!0)}}getChildContext(){return{i18n:this.props.i18n}}handleUnsupportedCard(e){let r=!!e.error;return r&&this.setState({detectedUnsupportedBrands:e.detectedBrands}),e.rootNode=this.rootNode,this.handleOnError(e,r),this.csf&&this.csf.hasUnsupportedCard(x,e.error),r}setFocusOn(e){this.csf&&this.csf.setFocusOnFrame(e)}updateStyles(e){this.csf&&this.csf.updateStyles(e)}sfIsOptionalOrHidden(e){return this.csf.sfIsOptionalOrHidden(e)}destroy(){this.csf&&this.csf.destroy()}showValidation(){let{numDateFields:e,state:r}=this;Object.keys(r.valid).reduce(Ai(e,r),[]).forEach(o=>{let n=xi(o,this.rootNode,r);this.handleOnError(n,!!r.detectedUnsupportedBrands),this.csf&&this.csf.isValidated&&this.csf.isValidated(o,n.error)})}mapErrorsToValidationRuleResult(){return Object.keys(this.state.errors).reduce((e,r)=>{let o=this.state.errors[r];return e[r]=o?{isValid:!1,errorMessage:$i(o,Wt),errorI18n:this.props.i18n.get(o),error:o,rootNode:this.rootNode,...this.state.detectedUnsupportedBrands&&{detectedBrands:this.state.detectedUnsupportedBrands}}:null,e},{})}processBinLookupResponse(e,r){if(this.state.detectedUnsupportedBrands&&(this.setState(a=>({errors:{...a.errors,[x]:!1},detectedUnsupportedBrands:null})),this.csf&&e)){let a={type:"card",fieldType:"encryptedCardNumber",error:""};this.handleUnsupportedCard(a)}this.issuingCountryCode=e?.issuingCountryCode?.toLowerCase();let o=r?.brand,n=o&&hi.includes(r.brand);n&&this.setState(r,()=>{this.props.onChange(this.state)}),this.csf&&this.csf.brandsFromBinLookup(e,n?r:null)}render(e,r){return e.render({setRootNode:this.setRootNode,setFocusOn:this.setFocusOn},r)}constructor(e){super(e),j(this,"csfLoadFailTimeout",void 0),j(this,"csfLoadFailTimeoutMS",void 0),j(this,"csfConfigFailTimeout",void 0),j(this,"csfConfigFailTimeoutMS",void 0),j(this,"numCharsInField",void 0),j(this,"rootNode",void 0),j(this,"numDateFields",void 0),j(this,"csf",void 0),j(this,"handleOnLoad",void 0),j(this,"handleOnConfigSuccess",void 0),j(this,"handleOnFieldValid",void 0),j(this,"handleOnAllValid",void 0),j(this,"handleOnBrand",void 0),j(this,"handleFocus",void 0),j(this,"handleOnError",void 0),j(this,"handleOnAutoComplete",void 0),j(this,"handleOnNoDataRequired",void 0),j(this,"handleOnTouchstartIOS",void 0),j(this,"handleKeyPressed",void 0),j(this,"state",void 0),j(this,"props",void 0),j(this,"issuingCountryCode",void 0),j(this,"setRootNode",o=>{this.rootNode=o});let r={status:"loading",brand:e.type,errors:{},valid:{},data:{},cvcPolicy:Me,expiryDatePolicy:xe,isSfpValid:!1,hasKoreanFields:e.hasKoreanFields};this.state=r,this.csfLoadFailTimeout=null,this.csfLoadFailTimeoutMS=3e4,this.csfConfigFailTimeout=null,this.csfConfigFailTimeoutMS=15e3,this.numCharsInField={},this.handleOnLoad=Re.handleOnLoad.bind(this),this.handleOnConfigSuccess=Re.handleOnConfigSuccess.bind(this),this.handleOnFieldValid=Re.handleOnFieldValid.bind(this),this.handleOnAllValid=Re.handleOnAllValid.bind(this),this.handleOnBrand=Re.handleOnBrand.bind(this),this.handleFocus=Re.handleFocus.bind(this),this.handleOnError=Re.handleOnError.bind(this),this.handleOnNoDataRequired=Re.handleOnNoDataRequired.bind(this),this.handleOnAutoComplete=Re.handleOnAutoComplete.bind(this),this.handleOnTouchstartIOS=Re.handleOnTouchstartIOS.bind(this),this.handleKeyPressed=Re.handleKeyPressed.bind(this),this.processBinLookupResponse=this.processBinLookupResponse.bind(this),this.setFocusOn=this.setFocusOn.bind(this),this.updateStyles=this.updateStyles.bind(this),this.handleUnsupportedCard=this.handleUnsupportedCard.bind(this),this.showValidation=this.showValidation.bind(this),this.destroy=this.destroy.bind(this)}};j(Fr,"defaultProps",bl);function El(t,e){let[r,o]=t;return{dualBrandSelectElements:[{id:r.brand,brandObject:r},{id:o.brand,brandObject:o}],selectedBrandValue:e?r.brand:"",leadBrand:r}}var Sl=Xs(void 0),Xt=({i18n:t,loadingContext:e,resources:r,analytics:o,children:n})=>(We(()=>{t&&e&&r||console.warn(`CoreProvider - WARNING core provider is missing:${t?"":"i18n"} ${e?"":"loadingContext"} ${r?"":"resources"}`)},[t,e,r]),_(Sl.Provider,{value:{i18n:t,loadingContext:e,resources:r,analytics:o}},Gn(n))),dt=()=>{let t=li(Sl);if(t===void 0)throw new Error('"useCoreContext" must be used within a CoreProvider');return t};function Pl(){let{resources:t}=dt();return ii(e=>t?.getImage(e),[])}var Fo="threeDS2Fingerprint",Ot="3DS2Fingerprint_Error",Lo="callSubmit3DS2Fingerprint_Response",Bo="threeDS2Challenge",Te="3DS2Challenge_Error",Ae="threeDS2",ct="3DS2",Xe='Missing "token" property from threeDS2 action';var Mt="timeout",Rl={result:{transStatus:"U"},type:"challengeResult",errorCode:Mt},Tl={result:{threeDSCompInd:"N"},type:"fingerPrintResult",errorCode:Mt},oa={"01":["250px","400px"],"02":["390px","400px"],"03":["500px","600px"],"04":["600px","400px"],"05":["100%","100%"]};var Jt=(t,e=!1)=>{let r;try{r=new URL(t)}catch{return!1}return e&&r.protocol==="http:"||r.protocol==="https:"};var Al=(t,e,r)=>e.some(o=>t.includes(o[r]));var xl=["cartebancaire","bcmc","dankort"];var Ou=(t,e)=>t.reduce((r,o)=>r||e.includes(o.brand),!1),Dl=t=>t.map(e=>({...e})),Mu=(t,e="mc",r="visa")=>{let o=Dl(t);return o[0].brand!==e&&o[0].brand!==r&&o.reverse(),o.length=1,o};function wl(t,e,r,o={}){let{type:n,cvcPolicy:a}=t,{sfp:s}=e,{dualBrandSelectElements:l,setDualBrandSelectElements:c,setSelectedBrandValue:u,issuingCountryCode:p,setIssuingCountryCode:d}=r;return{processBinLookup:(h,m)=>{let y=h?.issuingCountryCode?h.issuingCountryCode.toLowerCase():null;if(d(y),!h||!Object.keys(h).length){c([]),u("");let b=m&&n!=="card"?n:null;return s.current.processBinLookupResponse(h,{brand:b,cvcPolicy:a}),void(o.current=0)}if(h.supportedBrands?.length){let b=Ou(h.supportedBrands,Ci),C=b?Mu(h.supportedBrands):Dl(h.supportedBrands);if(C.length>1){let f=Al(xl,C,"brand"),g=El(C,f);c(g.dualBrandSelectElements),u(g.selectedBrandValue),s.current.processBinLookupResponse({issuingCountryCode:h.issuingCountryCode,supportedBrands:[g.leadBrand]}),g.leadBrand.panLength>0&&(o.current=g.leadBrand.panLength)}else c([]),u(""),b||u(C[0].brand),s.current.processBinLookupResponse({issuingCountryCode:h.issuingCountryCode,supportedBrands:C}),C[0].panLength>0&&(o.current=C[0].panLength)}},handleDualBrandSelection:h=>{let m=h;if(h instanceof Event){let b=h.target;m=b.getAttribute("data-value")||b.getAttribute("value")}let y=[];m&&(y=l.reduce((b,C)=>(C.brandObject.brand===m&&b.push(C.brandObject),b),[]),y.length&&(u(m),s.current.processBinLookupResponse({issuingCountryCode:p,supportedBrands:y,isDualBrandSelection:!0})))}}}function Il(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var na={exports:{}};var kl;function Nl(){return kl||(kl=1,t=na,(function(){var e={}.hasOwnProperty;function r(){for(var a="",s=0;s<arguments.length;s++){var l=arguments[s];l&&(a=n(a,o(l)))}return a}function o(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return r.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var s="";for(var l in a)e.call(a,l)&&a[l]&&(s=n(s,l));return s}function n(a,s){return s?a?a+" "+s:a+s:a}t.exports?(r.default=r,t.exports=r):window.classNames=r})()),na.exports;var t}var Le=Il(Nl());var Ft=({inline:t=!1,size:e="large"})=>_("div",{"data-testid":"spinner",className:"adyen-checkout__spinner__wrapper "+(t?"adyen-checkout__spinner__wrapper--inline":"")},_("div",{className:`adyen-checkout__spinner adyen-checkout__spinner--${e}`}));function Qt(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let e=16*Math.random()|0;return(t=="x"?e:3&e|8).toString(16)})}function Ol(t){let{backgroundUrl:e="",className:r="",classNameModifiers:o=[],src:n="",alt:a="",showOnError:s=!1}=t,[l,c]=ge(!1),u=st(null),p=()=>{c(!0)},d=Le([r],"adyen-checkout__image",{"adyen-checkout__image--loaded":l},...o.map(h=>`adyen-checkout__image--${h}`));return We(()=>{let h=e?new Image:u.current;h.src=e||n,h.onload=p,c(!!h.complete)},[]),e?_("div",{"data-testid":"background",style:{backgroundUrl:e},...t,className:d}):_("img",{...t,alt:a,ref:u,className:d,onError:()=>{c(s)}})}function sa(t){let e=t.replace("_","-"),r=new RegExp("([a-z]{2})([-])([A-Z]{2})");if(r.test(e))return e;let[o,n]=e.split("-");if(o.length!==2)throw new v("IMPLEMENTATION_ERROR",`Locale '${t}' does not match the expected format`);if(!n)return o.toLowerCase();let a=[o.toLowerCase(),n.toUpperCase()].join("-");if(r.test(a))return a;throw new v("IMPLEMENTATION_ERROR",`Locale '${t}' does not match the expected format`)}function Ml(t={}){return Object.keys(t).reduce((e,r)=>(e[sa(r)]=t[r],e),{})}var aa=(t,e)=>t.replace(/%{(\w+)}/g,(r,o)=>e[o]||""),Fl=(t,e,r={values:{},count:0})=>{let o=`${e}__plural`,n=a=>`${e}__${a}`;return Object.prototype.hasOwnProperty.call(t,n(r.count))?aa(t[n(r.count)],r.values):Object.prototype.hasOwnProperty.call(t,o)&&r.count>1?aa(t[o],r.values):Object.prototype.hasOwnProperty.call(t,e)?aa(t[e],r.values):null};var Ll="https://checkoutshopper-live.adyen.com/checkoutshopper/",Uo="6.25.0";var Bl=["amount","secondaryAmount","countryCode","environment","_environmentUrls","loadingContext","i18n","modules","order","session","clientKey","showPayButton","redirectFromTopWhenInIframe","onPaymentCompleted","onPaymentFailed","beforeRedirect","beforeSubmit","onSubmit","onActionHandled","onAdditionalDetails","onChange","onEnterKeyPressed","onError","onBalanceCheck","onOrderCancel","onOrderRequest","onOrderUpdated","onPaymentMethodsRequest"];function Ul(t,e){let{headers:r=[],errorLevel:o="warn",errorCode:n,loadingContext:a=Ll,method:s="GET",path:l,timeout:c=6e4}=t,u={method:s,mode:"cors",cache:"default",credentials:"same-origin",headers:{Accept:"application/json, text/plain, */*","Content-Type":s==="POST"?"application/json":"text/plain",...r},redirect:"follow",referrerPolicy:"no-referrer-when-downgrade",...AbortSignal?.timeout&&{signal:AbortSignal?.timeout(c)},...e&&{body:JSON.stringify(e)}},p=`${a}${l}`;return fetch(p,u).then(async d=>{let h=await d.json();if(d.ok)return h;if((function(m){return m&&m.errorCode&&m.errorType&&m.message&&m.status})(h))return void ia({message:h.message,level:o,cause:h,code:n});ia({message:t.errorMessage||`Service at ${p} is not available`,level:o,cause:h,code:n})}).catch(d=>{if(d instanceof v)throw d;ia({message:t.errorMessage||`Call to ${p} failed. Error= ${d}`,level:o,cause:d,code:n})})}function ia({message:t,level:e,cause:r,code:o}){switch(e){case"silent":break;case"info":case"warn":case"error":console[e](t);break;default:throw new v("NETWORK_ERROR",t,{cause:r,code:o})}}function la(t,e){return Ul({...t,method:"GET"},e)}function q(t,e){return Ul({...t,method:"POST"},e)}var Vl=(t,e=300)=>{let r;return function(...o){clearTimeout(r),r=setTimeout(()=>t.apply(this,o),e)}};function da(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Lr=class extends U{render(){let{classNameModifiers:e=[],disabled:r,href:o,icon:n,onClickCompletedIcon:a,inline:s,label:l,ariaLabel:c,ariaDescribedBy:u,status:p,variant:d,buttonRef:h,onClickCompletedLabel:m,onMouseEnter:y,onMouseLeave:b,onFocus:C,onBlur:f,onKeyDown:g,onKeyPress:k}=this.props,{completed:E}=this.state,{i18n:H}=dt(),Y=a||n?_("img",{className:"adyen-checkout__button__icon",src:this.state.completed?a??n:n,alt:"","aria-hidden":"true"}):"",$=[...e,...d!=="primary"?[d]:[],...s?["inline"]:[],...E?["completed"]:[],...p==="loading"||p==="redirect"?["loading"]:[]],ee=Le(["adyen-checkout__button",...$.map(L=>`adyen-checkout__button--${L}`)]),M={loading:_("span",{className:"adyen-checkout__button__content"},_(Ft,{size:"medium",inline:!0}),_("span",{className:"adyen-checkout__button__text--sr-only"},H.get("loading"))),redirect:_("span",{className:"adyen-checkout__button__content"},_(Ft,{size:"medium",inline:!0}),H.get("payButton.redirecting")),default:_("span",{className:"adyen-checkout__button__content"},Y,_("span",{className:"adyen-checkout__button__text"},this.state.completed?m??l:l))},F=M[p]||M.default;return o?_("a",{className:ee,href:o,disabled:r,target:this.props.target,rel:this.props.rel},F):_("button",{ref:h,className:ee,type:"button",disabled:r,onClick:this.onClick,"aria-label":c,"aria-describedby":u,onMouseEnter:y,onMouseLeave:b,onKeyDown:g,onFocus:C,onBlur:f,onKeyPress:k},F,p!=="loading"&&p!=="redirect"&&this.props.children)}constructor(...e){super(...e),da(this,"onClick",r=>{r.preventDefault(),this.props.disabled||this.props.onClick?.(r,{complete:this.complete})}),da(this,"complete",(r=1e3)=>{this.setState({completed:!0}),setTimeout(()=>{this.setState({completed:!1})},r)})}};da(Lr,"defaultProps",{status:"default",variant:"primary",disabled:!1,label:"",inline:!1,target:"_self"});var ca="v3/analytics",Hl=1e4;var ke={log:"log",error:"error",info:"info"},X={network:"Network",apiError:"ApiError",sdkError:"SdkError",redirect:"Redirect"},Yl={redirect:"600"},Kl="action",ua="submit",Vo="selected",Be="rendered";var Gl="validationError",zl="focus",jl="unfocus";var Ho="instant_payment_button";var V=(function(t){return t.ACTION_IS_MISSING_PAYMENT_DATA="700",t.ACTION_IS_MISSING_TOKEN="701",t.TOKEN_IS_MISSING_THREEDSMETHODURL="702",t.TOKEN_IS_MISSING_OTHER_PROPS="703",t.TOKEN_DECODE_OR_PARSING_FAILED="704",t.THREEDS2_TIMEOUT="705",t.TOKEN_IS_MISSING_ACSURL="800",t.NO_TRANSSTATUS="801",t.NO_DETAILS_FOR_FRICTIONLESS_OR_REFUSED="802",t.NO_COMPONENT_FOR_ACTION="803",t.NO_ACTION_FOR_CHALLENGE="804",t.CHALLENGE_RESOLVED_WITHOUT_RESULT_PROP="805",t})({}),Ue=(function(t){return t.FINGERPRINT_DATA_SENT="fingerprintDataSentWeb",t.FINGERPRINT_IFRAME_LOADED="fingerprintIframeLoaded",t.FINGERPRINT_COMPLETED="fingerprintCompleted",t.CHALLENGE_DATA_SENT="challengeDataSentWeb",t.CHALLENGE_IFRAME_LOADED="challengeIframeLoaded",t.CHALLENGE_COMPLETED="challengeCompleted",t})({}),pa={[bi]:"925",[Ei]:"942",[Si]:"926",[`${Ze}.country`]:"930",[`${Ze}.street`]:"931",[`${Ze}.house_number_or_name`]:"932",[`${Ze}.postal_code`]:"933",[`${Ze}.city`]:"935",[`${Ze}.state_or_province`]:"936",[`${To}.postal_code`]:"934"},Yo=["cart","minicart","pdp","checkout"],$l=["applicationInfo","checkoutAttemptId"],Wl="fetch-checkoutAttemptId-failed",Ko={all:"all",initial:"initial"};var Zl=t=>t.replace(/[^0-9]/g,"");var ql=()=>Date.now(),Xl=(t,e)=>{if(t===Ze||t===To)return pa[`${t}.${e}`]??t;let r=pa[t]??t;return isNaN(Number(r))&&(r=Zl(r)),r},Jl=t=>t?Object.keys(t).reduce((e,r)=>($l.includes(r)&&(e[r]=t[r]),e),{}):{};function ma(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ut=class{constructor(){ma(this,"timestamp",void 0),ma(this,"id",void 0),ma(this,"component",void 0),this.id=Qt(),this.timestamp=String(ql())}};function Ne(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Br=(function(t){return t.clicked="clicked",t.rendered="rendered",t.sdkDownloadInitiated="sdkDownloadInitiated",t.sdkDownloadFailed="sdkDownloadFailed",t.sdkDownloadAborted="sdkDownloadAborted",t.sdkDownloadCompleted="sdkDownloadCompleted",t.Initialized="initialized",t.LookupStarted="lookupStarted",t.LookupUserNotFound="lookupUserNotFound",t.OtpStarted="otpStarted",t.OtpSucceeded="otpSucceeded",t.OtpCanceled="otpCanceled",t.OtpFailed="otpFailed",t.AddressSelectorClicked="addressSelectorClicked",t.AddressSelectorClosed="addressSelectorClosed",t.AddressChanged="addressChanged",t})({}),ue=class extends ut{getEventCategory(){return ke.info}constructor(e){return super(),Ne(this,"type",void 0),Ne(this,"target",void 0),Ne(this,"issuer",void 0),Ne(this,"isExpress",void 0),Ne(this,"expressPage",void 0),Ne(this,"isStoredPaymentMethod",void 0),Ne(this,"brand",void 0),Ne(this,"validationErrorCode",void 0),Ne(this,"validationErrorMessage",void 0),Ne(this,"configData",void 0),Ne(this,"cdnUrl",void 0),this.component=e.component,this.type=e.type,this.target=e.target,this.issuer=e.issuer,this.isExpress=e.isExpress,this.isStoredPaymentMethod=e.isStoredPaymentMethod,this.isExpress=e.isExpress,this.expressPage=e.expressPage,this.brand=e.brand,this.validationErrorCode=e.validationErrorCode,this.validationErrorMessage=e.validationErrorMessage,this.configData=e.configData,this.cdnUrl=e.cdnUrl,this.type===Gl&&(this.validationErrorCode=Xl(this.validationErrorCode,this.target)),this}};function pt(){let t=De(window,"screen.colorDepth")||"",e=De(window,"screen.height")||"",r=De(window,"screen.width")||"",o=De(window,"navigator.userAgent")||"";return{acceptHeader:"*/*",colorDepth:t,language:De(window,"navigator.language")||"en",javaEnabled:!1,screenHeight:e,screenWidth:r,userAgent:o,timeZoneOffset:new Date().getTimezoneOffset()}}var Ql=t=>{let e=null;return r=>{if(t.props.doBinLookup!==!1){if(r.encryptedBin&&t.props.clientKey)e=r.uuid,q({loadingContext:t.props.loadingContext,path:`v3/bin/binLookup?token=${t.props.clientKey}`},{type:t.props.brand,supportedBrands:t.props.brands||Dt,encryptedBin:r.encryptedBin,requestId:r.uuid}).then(o=>{if(o?.requestId===e)if(o.brands?.length){let n=o.brands.reduce((a,s)=>(a.detectedBrands.push(s.brand),a.paymentMethodVariants.push(s.paymentMethodVariant),s.supported===!0&&a.supportedBrands.push(s),a),{supportedBrands:[],detectedBrands:[],paymentMethodVariants:[]});if(n.supportedBrands.length)return t.processBinLookupResponse({issuingCountryCode:o.issuingCountryCode,supportedBrands:n.supportedBrands,...o.showSocialSecurityNumber?{showSocialSecurityNumber:o.showSocialSecurityNumber}:{}}),void t.onBinLookup({type:r.type,detectedBrands:n.detectedBrands,supportedBrands:n.supportedBrands.map(a=>a.brand),paymentMethodVariants:n.paymentMethodVariants,supportedBrandsRaw:n.supportedBrands,brands:t.props.brands||Dt,issuingCountryCode:o.issuingCountryCode});if(n.detectedBrands.length){let a={type:"card",fieldType:"encryptedCardNumber",error:Wt.ERROR_MSG_UNSUPPORTED_CARD_ENTERED,detectedBrands:n.detectedBrands};return t.handleUnsupportedCard(a),void t.onBinLookup({type:r.type,detectedBrands:n.detectedBrands,supportedBrands:null,paymentMethodVariants:n.paymentMethodVariants,brands:t.props.brands||Dt})}}else t.onBinLookup({type:r.type,detectedBrands:null,supportedBrands:null,paymentMethodVariants:null,brands:t.props.brands||Dt}),t.processBinLookupResponse({},!0);else o?.requestId||t.props.onError(o||{errorType:"binLookup",message:"unknownError"})});else if(e){t.processBinLookupResponse(null,!0),e=null;let o={type:"card",fieldType:"encryptedCardNumber",error:""};t.handleUnsupportedCard(o),t.onBinLookup({isReset:!0})}t.props.onBinValue&&t.props.onBinValue(r)}else t.props.onBinValue&&t.props.onBinValue(r)}};function ve(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var mt=class t{removeScript(){this.script?.parentNode?.removeChild(this.script),this.script=null}loadScript(){return new Promise((e,r)=>{let o=document.querySelector(this.node);if(!o)return void r(new v("SCRIPT_ERROR",`Unable to find script container node: ${this.node}`));let n=()=>{this.script&&(this.script.removeEventListener("load",a),this.script.removeEventListener("error",s))},a=()=>{this.script.setAttribute("data-script-loaded","true"),n(),e()},s=l=>{n(),r(new v("SCRIPT_ERROR",`Unable to load script ${this.src}.${l?.message&&`Message: ${l.message}`}`,{cause:l?.error||l}))};if(this.script=o.querySelector(`script[src="${this.src}"]`),this.script?.getAttribute("data-script-loaded"))e();else{if(this.script)return this.script.addEventListener("load",a),void this.script.addEventListener("error",s);this.script=document.createElement("script"),Object.assign(this.script,this.attributes),Object.assign(this.script.dataset,this.dataAttributes),this.script.src=this.src,this.script.async=!0,this.script.addEventListener("load",a),this.script.addEventListener("error",s),o.appendChild(this.script)}})}trackEvent(e){let r=new ue({type:e,component:this.component,cdnUrl:this.baseUrl});this.analytics?.sendAnalytics(r)}constructor({src:e,component:r,node:o="body",attributes:n,dataAttributes:a,analytics:s}){ve(this,"src",void 0),ve(this,"component",void 0),ve(this,"node",void 0),ve(this,"attributes",void 0),ve(this,"dataAttributes",void 0),ve(this,"analytics",void 0),ve(this,"baseUrl",void 0),ve(this,"script",void 0),ve(this,"loadPromise",null),ve(this,"rejectLoadPromise",null),ve(this,"load",()=>(this.loadPromise!==null||(this.loadPromise=new Promise((l,c)=>{this.rejectLoadPromise=c;let u=0;this.trackEvent(Br.sdkDownloadInitiated);let p=async()=>{try{u++,await this.loadScript(),this.trackEvent(Br.sdkDownloadCompleted),l()}catch(d){if(this.loadPromise===null)return;this.trackEvent(Br.sdkDownloadFailed),this.removeScript(),u<t.MAX_NUMBER_OF_RETRIES?setTimeout(()=>{p()},t.RETRY_DELAY):(this.trackEvent(Br.sdkDownloadAborted),this.loadPromise=null,this.rejectLoadPromise=null,c(d))}};p()})),this.loadPromise)),ve(this,"remove",()=>{this.rejectLoadPromise?.(new v("CANCEL","Script loading cancelled.")),this.removeScript(),this.loadPromise=null}),this.src=e,this.component=r,this.node=o,this.attributes=n,this.dataAttributes=a,this.analytics=s,this.baseUrl=(function(l){let c=new URL(l);return c.origin+c.pathname})(this.src)}};ve(mt,"RETRY_DELAY",1e3),ve(mt,"MAX_NUMBER_OF_RETRIES",3);var Lu=(t,e)=>e?.value&&e?.currency?t.amount(e.value,e.currency,{currencyDisplay:e.currencyDisplay||"symbol"}):"",ed=(t,e)=>`${t.get("payButton")} ${Lu(t,e)}`,td=(t,e)=>{let r=e&&e?.value&&e?.currency?t.amount(e.value,e.currency,{currencyDisplay:e.currencyDisplay||"symbol"}):"";return`${r.length?"/ ":""}${r}`};var rd=({label:t})=>_("span",{className:"checkout-secondary-button__text"},t);var od=({amount:t,secondaryAmount:e,classNameModifiers:r=[],label:o,...n})=>{let{i18n:a}=dt(),s=t&&{}.hasOwnProperty.call(t,"value")&&t.value===0,l=s?a.get("confirmPreauthorization"):ed(a,t),c=t&&typeof t.value=="number"&&!!t.currency,u=e&&Object.keys(e).length>0,p=!s&&!o&&c&&u?td(a,e):null;return _(Lr,{...n,disabled:n.disabled||n.status==="loading",classNameModifiers:[...r,"pay"],label:o||l},p&&_(rd,{label:p}))};function nd(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Je=class extends U{iframeOnLoad(){this.props.callback&&typeof this.props.callback=="function"&&this.props.callback(this.iframeEl.contentWindow)}componentDidMount(){this.iframeEl.addEventListener?this.iframeEl.addEventListener("load",this.iframeOnLoad.bind(this),!1):this.iframeEl.attachEvent?this.iframeEl.attachEvent("onload",this.iframeOnLoad.bind(this)):this.iframeEl.onload=this.iframeOnLoad.bind(this)}componentWillUnmount(){this.iframeEl.removeEventListener?this.iframeEl.removeEventListener("load",this.iframeOnLoad.bind(this),!1):this.iframeEl.detachEvent?this.iframeEl.detachEvent("onload",this.iframeOnLoad.bind(this)):this.iframeEl.onload=null}render({name:e,src:r,width:o,height:n,minWidth:a,minHeight:s,allow:l,title:c,classNameModifiers:u}){let p=u.filter(d=>!!d);return _("iframe",{ref:d=>{this.iframeEl=d},allow:l,className:Le("adyen-checkout__iframe",`adyen-checkout__iframe--${e}`,p.length&&u.map(d=>`adyen-checkout__iframe--${e}-${d}`)),name:e,src:r,width:o,height:n,frameBorder:"0",title:c,referrerpolicy:"origin","min-width":a,"min-height":s})}constructor(...e){super(...e),nd(this,"iframeEl",void 0)}};nd(Je,"defaultProps",{width:"0",height:"0",minWidth:"0",minHeight:"0",src:null,allow:null,title:"components iframe",classNameModifiers:[]});var J=(function(t){return t.address="address",t.bankTransfer_IBAN="bankTransfer_IBAN",t.bankTransfer_BE="bankTransfer_BE",t.bankTransfer_NL="bankTransfer_NL",t.bankTransfer_PL="bankTransfer_PL",t.bankTransfer_FR="bankTransfer_FR",t.bankTransfer_CH="bankTransfer_CH",t.bankTransfer_IE="bankTransfer_IE",t.bankTransfer_GB="bankTransfer_GB",t.bankTransfer_DE="bankTransfer_DE",t.bankTransfer_AE="bankTransfer_AE",t.bankTransfer_AT="bankTransfer_AT",t.bankTransfer_AU="bankTransfer_AU",t.bankTransfer_BG="bankTransfer_BG",t.bankTransfer_CA="bankTransfer_CA",t.bankTransfer_EE="bankTransfer_EE",t.bankTransfer_ES="bankTransfer_ES",t.bankTransfer_FI="bankTransfer_FI",t.bankTransfer_HK="bankTransfer_HK",t.bankTransfer_HU="bankTransfer_HU",t.bankTransfer_IT="bankTransfer_IT",t.bankTransfer_JP="bankTransfer_JP",t.bankTransfer_LU="bankTransfer_LU",t.bankTransfer_NZ="bankTransfer_NZ",t.bankTransfer_PT="bankTransfer_PT",t.bankTransfer_SG="bankTransfer_SG",t.bankTransfer_SK="bankTransfer_SK",t.bankTransfer_US="bankTransfer_US",t.donation="donation",t.personal_details="personal_details",t.dropin="dropin",t.bcmc="bcmc",t.card="card",t.scheme="scheme",t.storedCard="storedCard",t.customCard="customcard",t.threeDS2Challenge="threeDS2Challenge",t.threeDS2Fingerprint="threeDS2Fingerprint",t.threeDS2DeviceFingerprint="threeDS2DeviceFingerprint",t.ach="ach",t.directdebit_GB="directdebit_GB",t.sepadirectdebit="sepadirectdebit",t.eft_directdebit_CA="eft_directdebit_CA",t.affirm="affirm",t.afterpay="afterpay",t.afterpay_default="afterpay_default",t.afterpay_b2b="afterpay_b2b",t.atome="atome",t.facilypay_3x="facilypay_3x",t.facilypay_4x="facilypay_4x",t.facilypay_6x="facilypay_6x",t.facilypay_10x="facilypay_10x",t.facilypay_12x="facilypay_12x",t.ratepay="ratepay",t.ratepay_directdebit="ratepay_directdebit",t.amazonpay="amazonpay",t.applepay="applepay",t.cashapp="cashapp",t.clicktopay="clicktopay",t.googlepay="googlepay",t.paypal="paypal",t.fastlane="fastlane",t.paywithgoogle="paywithgoogle",t.boletobancario="boletobancario",t.boletobancario_itau="boletobancario_itau",t.boletobancario_santander="boletobancario_santander",t.primeiropay_boleto="primeiropay_boleto",t.doku="doku",t.doku_alfamart="doku_alfamart",t.doku_permata_lite_atm="doku_permata_lite_atm",t.doku_indomaret="doku_indomaret",t.doku_atm_mandiri_va="doku_atm_mandiri_va",t.doku_sinarmas_va="doku_sinarmas_va",t.doku_mandiri_va="doku_mandiri_va",t.doku_cimb_va="doku_cimb_va",t.doku_danamon_va="doku_danamon_va",t.doku_bri_va="doku_bri_va",t.doku_bni_va="doku_bni_va",t.doku_bca_va="doku_bca_va",t.doku_wallet="doku_wallet",t.oxxo="oxxo",t.billdesk_online="billdesk_online",t.billdesk_wallet="billdesk_wallet",t.dotpay="dotpay",t.eps="eps",t.molpay_ebanking_fpx_MY="molpay_ebanking_fpx_MY",t.molpay_ebanking_TH="molpay_ebanking_TH",t.molpay_ebanking_VN="molpay_ebanking_VN",t.onlineBanking_CZ="onlineBanking_CZ",t.onlinebanking_IN="onlinebanking_IN",t.onlineBanking_PL="onlineBanking_PL",t.onlineBanking_SK="onlineBanking_SK",t.paybybank="paybybank",t.payu_IN_cashcard="payu_IN_cashcard",t.payu_IN_nb="payu_IN_nb",t.wallet_IN="wallet_IN",t.dragonpay="dragonpay",t.dragonpay_ebanking="dragonpay_ebanking",t.dragonpay_otc_banking="dragonpay_otc_banking",t.dragonpay_otc_non_banking="dragonpay_otc_non_banking",t.dragonpay_otc_philippines="dragonpay_otc_philippines",t.econtext="econtext",t.econtext_atm="econtext_atm",t.econtext_online="econtext_online",t.econtext_seven_eleven="econtext_seven_eleven",t.econtext_stores="econtext_stores",t.giropay="giropay",t.multibanco="multibanco",t.redirect="redirect",t.twint="twint",t.vipps="vipps",t.trustly="trustly",t.paybybank_AIS_DD="paybybank_AIS_DD",t.riverty="riverty",t.paybybank_pix="paybybank_pix",t.klarna="klarna",t.klarna_account="klarna_account",t.klarna_paynow="klarna_paynow",t.klarna_b2b="klarna_b2b",t.bcmc_mobile="bcmc_mobile",t.bcmc_mobile_QR="bcmc_mobile_QR",t.pix="pix",t.swish="swish",t.wechatpay="wechatpay",t.wechatpayQR="wechatpayQR",t.promptpay="promptpay",t.paynow="paynow",t.duitnow="duitnow",t.blik="blik",t.mbway="mbway",t.ancv="ancv",t.payto="payto",t.upi="upi",t.upi_qr="upi_qr",t.upi_collect="upi_collect",t.upi_intent="upi_intent",t.giftcard="giftcard",t.mealVoucher_FR="mealVoucher_FR",t.mealVoucher_FR_natixis="mealVoucher_FR_natixis",t.mealVoucher_FR_sodexo="mealVoucher_FR_sodexo",t.mealVoucher_FR_groupeup="mealVoucher_FR_groupeup",t})({});function Lt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Qe=class{buildElementProps(e){this.props=this.formatProps({...this.constructor.defaultProps,...e})}formatProps(e){return e}formatData(){return{}}setUpAnalytics(e){return null}submitAnalytics(e){return null}handleKeyPress(e){return null}setState(e){this.state={...this.state,...e}}get data(){let e=De(this.props,"modules.risk.data"),r=De(this.props,"modules.analytics.getCheckoutAttemptId")?.()??Wl,o=this.state.order||this.props.order,n=this.formatData();return n.paymentMethod&&r&&(n.paymentMethod.checkoutAttemptId=r),{...e&&{riskData:{clientData:e}},...o&&{order:{orderData:o.orderData,pspReference:o.pspReference}},...n,clientStateDataIndicator:!0}}activate(){}render(){throw new Error("Payment method cannot be rendered.")}mount(e){let r=typeof e=="string"?document.querySelector(e):e;if(!r)throw new Error("Component could not mount. Root node was not found.");let o=!this._node;return this._node&&this.unmount(),this._node=r,qe(this._node,"keypress",this.handleKeyPress,!1),this._component=this.render(),$n(this._component,r),o&&this.props.modules&&this.props.modules.analytics&&this.setUpAnalytics({containerWidth:r&&r.offsetWidth,component:this.props.isDropin?"dropin":this.constructor.analyticsType??this.constructor.type,flavor:this.props.isDropin?"dropin":"components"}).then(()=>{if(!this.props.isDropin){let n=new ue({type:Be});this.submitAnalytics(n)}}),this}update(e){return this.props=this.formatProps({...this.props,...e}),this.state={},this.unmount().mount(this._node)}unmount(){return it(this._node,"keypress",this.handleKeyPress),this._node&&$n(null,this._node),this}remove(){this.unmount(),this.core&&this.core.remove(this)}constructor(e,r){if(Lt(this,"_id",`${this.constructor.type}-${Qt()}`),Lt(this,"core",void 0),Lt(this,"props",void 0),Lt(this,"state",{}),Lt(this,"_component",void 0),Lt(this,"_node",null),!(function(n){return!!n&&typeof n.initialize=="function"&&typeof n.createFromAction=="function"})(e))throw new v("IMPLEMENTATION_ERROR",`Trying to initialise the component '${this.constructor.type}' without a reference to an instance of AdyenCheckout`);this.core=e,this.buildElementProps(r),this.handleKeyPress=this.handleKeyPress.bind(this)}};Lt(Qe,"defaultProps",{});var Bu=["action","resultCode","sessionData","order","sessionResult","donationToken","error"];function et(t){let e=[],r=Object.keys(t).reduce((o,n)=>(Bu.includes(n)?o[n]=t[n]:e.push(n),o),{});return e.length&&console.warn(`The following properties should not be passed to the client: ${e.join(", ")}`),r}function er(t){t&&(delete t.order,delete t.action,t.donationToken&&t.donationToken.length!==0||delete t.donationToken)}function tt(t){return["Cancelled","Error","Refused"].includes(t.resultCode)?Promise.reject(t):Promise.resolve(t)}function Go(t){return t?typeof t.activePaymentMethod=="object"&&typeof t.closeActivePaymentMethod=="function":!1}function ad(t,e){return t==="FI"&&e?{openFirstPaymentMethod:!1,openFirstStoredPaymentMethod:!1}:{}}var ht=class extends Error{constructor(e){super(e)}};function Ur(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var me=class extends ut{getEventCategory(){return ke.log}constructor(e){return super(),Ur(this,"type",void 0),Ur(this,"message",void 0),Ur(this,"subType",void 0),Ur(this,"result",void 0),Ur(this,"target",void 0),this.type=e.type,this.message=e.message,this.subType=e.subType,this.result=e.result,this.target=e.target,this.component=e.component,this}};function ha(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Q=class extends ut{getEventCategory(){return ke.error}constructor(e){return super(),ha(this,"code",void 0),ha(this,"errorType",void 0),ha(this,"message",void 0),this.code=e.code,this.errorType=e.errorType,this.message=e.message,this.component=e.component,this}};function Oe(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var he=class extends Qe{get analytics(){return this.core.modules.analytics}buildElementProps(e){let r={showPayButton:!0,...this.core.getCorePropsForComponent(),...e?.isStoredPaymentMethod?{}:this.getPaymentMethodFromPaymentMethodsResponse(e?.type),...e},o=Go(this);this.props=this.formatProps({...this.constructor.defaultProps,...ad(this.core.options.countryCode,o),...r})}getPaymentMethodFromPaymentMethodsResponse(e){return this.core.paymentMethodsResponse?.find(e||this.constructor.type)}storeElementRefOnCore(e){e?.isDropin||this.core.storeElementReference(this)}isAvailable(){return Promise.resolve()}setState(e){this.state={...this.state,...e},this.onChange()}showValidation(){return this.componentRef&&this.componentRef.showValidation&&this.componentRef.showValidation(),this}setElementStatus(e,r){return this.elementRef?.setStatus(e,r),this}setStatus(e,r){return this.componentRef?.setStatus&&this.componentRef.setStatus(e,r),this}onChange(){this.props.onChange?.({data:this.data,isValid:this.isValid,errors:this.state.errors,valid:this.state.valid},this.elementRef)}setUpAnalytics(e){let r=this.props.session?.id;return this.props.modules.analytics.setUp({...e,...r&&{sessionId:r}})}submitAnalytics(e){try{e.component=this.getComponent(e),this.props.modules.analytics.sendAnalytics(e)}catch(r){console.warn("Failed to submit the analytics event. Error:",r)}}getComponent({component:e}){return e||(this.constructor.analyticsType?this.constructor.analyticsType:this.constructor.type==="scheme"||this.constructor.type==="bcmc"?this.constructor.type:this.type)}submit(){this.isValid?this.makePaymentsCall().then(et).then(tt).then(this.handleResponse).catch(e=>{e instanceof ht?this.setElementStatus("ready"):this.handleFailedResult(e)}):this.showValidation()}makePaymentsCall(){if(this.setElementStatus("loading"),this.props.onSubmit)return this.submitUsingAdvancedFlow();if(this.core.session)return(this.props.beforeSubmit?new Promise((e,r)=>this.props.beforeSubmit(this.data,this.elementRef,{resolve:e,reject:()=>r(new ht("beforeSubmitRejected"))})):Promise.resolve(this.data)).then(this.submitUsingSessionsFlow);this.handleError(new v("IMPLEMENTATION_ERROR",'It can not perform /payments call. Callback "onSubmit" is missing or Checkout session is not available'))}async submitUsingAdvancedFlow(){return new Promise((e,r)=>{let o=new me({type:ua,message:"Shopper clicked pay"});this.submitAnalytics(o),this.props.onSubmit({data:this.data,isValid:this.isValid},this.elementRef,{resolve:e,reject:r})})}async submitUsingSessionsFlow(e){let r=new me({type:ua,message:"Shopper clicked pay"});this.submitAnalytics(r);try{return await this.core.session.submitPayment(e)}catch(o){return o instanceof v?this.handleError(o):this.handleError(new v("ERROR","Error when making /payments call",{cause:o})),Promise.reject(o)}}onComplete(e){this.handleAdditionalDetails(e)}handleAdditionalDetails(e){this.makeAdditionalDetailsCall(e).then(et).then(tt).then(this.handleResponse).catch(this.handleFailedResult)}makeAdditionalDetailsCall(e){return this.props.onAdditionalDetails?new Promise((r,o)=>{this.props.onAdditionalDetails(e,this.elementRef,{resolve:r,reject:o})}):this.core.session?this.submitAdditionalDetailsUsingSessionsFlow(e.data):void this.handleError(new v("IMPLEMENTATION_ERROR",'It can not perform /payments/details call. Callback "onAdditionalDetails" is missing or Checkout session is not available'))}async submitAdditionalDetailsUsingSessionsFlow(e){try{return await this.core.session.submitDetails(e)}catch(r){return r instanceof v?this.handleError(r):this.handleError(new v("ERROR","Error when making /details call",{cause:r})),Promise.reject(r)}}handleAction(e,r={}){if(!e||!e.type)throw S(e,"action")&&S(e,"resultCode")?new Error('handleAction::Invalid Action - the passed action object itself has an "action" property and a "resultCode": have you passed in the whole response object by mistake?'):new Error('handleAction::Invalid Action - the passed action object does not have a "type" property');let o=this.core.createFromAction(e,{...this.elementRef.props,...r});return o?(this.unmount(),o.mount(this._node)):null}onActionHandled(e){this.props?.onActionHandled?.({originalAction:this.props.originalAction,...e})}handleResponse(e){e.action?this.elementRef.handleAction(e.action):e.order?.remainingAmount?.value>0?this.handleOrder(e):this.handleSuccessResult(e)}handleKeyPress(e){e.key!=="Enter"&&e.code!=="Enter"||(e.preventDefault(),this.onEnterKeyPressed(document?.activeElement,this))}onEnterKeyPressed(e,r){this.props.onEnterKeyPressed?this.props.onEnterKeyPressed(e,r):(e.blur(),this.submit())}updateParent(e={}){return this.elementRef.core.update(e)}get isValid(){return!1}get icon(){let e=this.props.paymentMethodType||this.type;return this.props.icon??this.resources.getImage()(e)}get displayName(){let e=this.core.paymentMethodsResponse?.paymentMethods?.find(r=>r.type===this.type);return this.props.name||e?.name||this.type}get accessibleName(){return this.displayName}get additionalInfo(){return null}get type(){return this.props.type||this.constructor.type}async handleAdvanceFlowPaymentMethodsUpdate(e,r){return new Promise((o,n)=>{if(!this.props.onPaymentMethodsRequest)return o();this.props.onPaymentMethodsRequest({...e&&{order:{orderData:e.orderData,pspReference:e.pspReference}},locale:this.core.options.locale},{resolve:o,reject:n})}).catch(o=>{this.handleError(new v("IMPLEMENTATION_ERROR","Something failed during payment methods update or onPaymentMethodsRequest was not implemented",{cause:o}))}).then(o=>this.core.update({...o&&{paymentMethodsResponse:o},order:e,amount:e?e.remainingAmount:r}))}constructor(e,r){super(e,r),Oe(this,"componentRef",void 0),Oe(this,"resources",void 0),Oe(this,"elementRef",void 0),Oe(this,"handleError",o=>{if(this.setElementStatus("ready"),o.name===ea&&o.options.code){let n=new Q({errorType:X.apiError,code:o.options.code});this.submitAnalytics(n)}this.props.onError&&this.props.onError(o,this.elementRef)}),Oe(this,"handleOrder",o=>{let{order:n}=o;(this.core.session?this.core.update({order:n}):this.handleAdvanceFlowPaymentMethodsUpdate(n)).then(()=>{this.props.onOrderUpdated?.({order:n})})}),Oe(this,"handleFailedResult",o=>{Go(this.elementRef)&&this.elementRef.displayFinalAnimation("error"),er(o),this.props.onPaymentFailed?.(o,this.elementRef)}),Oe(this,"handleSuccessResult",o=>{Go(this.elementRef)&&this.elementRef.displayFinalAnimation("success"),er(o),this.props.onPaymentCompleted?.(o,this.elementRef)}),Oe(this,"setComponentRef",o=>{this.componentRef=o}),Oe(this,"payButton",o=>_(od,{...o,amount:this.props.amount,secondaryAmount:this.props.secondaryAmount,onClick:this.submit})),this.core.register(this.constructor),this.submit=this.submit.bind(this),this.setState=this.setState.bind(this),this.onComplete=this.onComplete.bind(this),this.handleAction=this.handleAction.bind(this),this.handleOrder=this.handleOrder.bind(this),this.handleAdditionalDetails=this.handleAdditionalDetails.bind(this),this.handleResponse=this.handleResponse.bind(this),this.setElementStatus=this.setElementStatus.bind(this),this.submitAnalytics=this.submitAnalytics.bind(this),this.makePaymentsCall=this.makePaymentsCall.bind(this),this.makeAdditionalDetailsCall=this.makeAdditionalDetailsCall.bind(this),this.submitUsingSessionsFlow=this.submitUsingSessionsFlow.bind(this),this.elementRef=r&&r.elementRef||this,this.resources=this.props.modules?this.props.modules.resources:void 0,this.storeElementRefOnCore(this.props),this.onEnterKeyPressed=this.onEnterKeyPressed.bind(this),this.onActionHandled=this.onActionHandled.bind(this)}};Oe(he,"type",void 0),Oe(he,"txVariants",[]);function fa(t){let e=st(null),[r,o]=ge({}),[n,a]=ge({}),[s,l]=ge({}),[c,u]=ge(!1),[p,d]=ge(null),[h,m]=ge([]),[y,b]=ge(""),C=Eo(()=>wl(t,{sfp:e},{dualBrandSelectElements:h,setDualBrandSelectElements:m,setSelectedBrandValue:b,issuingCountryCode:p,setIssuingCountryCode:d}),[h,p]);return this.processBinLookupResponse=(f,g)=>{C.processBinLookup(f,g)},this.dualBrandingChangeHandler=C.handleDualBrandSelection,We(()=>(this.setFocusOn=e.current.setFocusOn,this.updateStyles=e.current.updateStyles,this.showValidation=e.current.showValidation,this.handleUnsupportedCard=e.current.handleUnsupportedCard,()=>{e.current.destroy()}),[]),We(()=>{let f=e.current.mapErrorsToValidationRuleResult(),g={...r,...f};if(t.onChange({data:s,valid:n,errors:g,isValid:c,selectedBrandValue:y}),Object.keys(g).length){let k=Object.entries(g).map(([E,H])=>({fieldType:E,...H||{error:"",rootNode:this.props.rootNode}}));this.props.onValidationError?.(k)}},[s,n,r,y]),_(Fr,{ref:e,...Uu(t),type:t.brand,onChange:f=>{l({...s,...f.data}),o({...r,...f.errors}),a({...n,...f.valid}),u(f.isSfpValid)},render:()=>null})}fa.defaultProps={onChange:()=>{},onError:()=>{},onValidationError:()=>{}};var Uu=t=>({autoFocus:t.autoFocus,brands:t.brands,brandsConfiguration:t.brandsConfiguration,clientKey:t.clientKey,forceCompat:t.forceCompat,i18n:t.i18n,implementationType:t.implementationType,keypadFix:t.keypadFix,legacyInputMode:t.legacyInputMode,loadingContext:t.loadingContext,minimumExpiryDate:t.minimumExpiryDate,onAdditionalSFConfig:t.onAdditionalSFConfig,onAdditionalSFRemoved:t.onAdditionalSFRemoved,onAllValid:t.onAllValid,onAutoComplete:t.onAutoComplete,onBinValue:t.onBinValue,onBrand:t.onBrand,onConfigSuccess:t.onConfigSuccess,handleKeyPress:t.handleKeyPress,onError:t.onError,onFieldValid:t.onFieldValid,onFocus:t.onFocus,onLoad:t.onLoad,rootNode:t.rootNode,showWarnings:t.showWarnings,styles:t.styles,trimTrailingSeparator:t.trimTrailingSeparator,resources:t.resources,maskSecurityCode:t.maskSecurityCode,placeholders:t.placeholders});function Bt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ve=class extends he{formatProps(e){return{...e,type:J.customCard}}formatData(){let e=this.state.selectedBrandValue;return{paymentMethod:{type:"scheme",...this.state.data,...e&&{brand:e}},browserInfo:this.browserInfo,origin:!!window&&window.location.origin}}updateStyles(e){return this.componentRef?.updateStyles&&this.componentRef.updateStyles(e),this}setFocusOn(e){return this.componentRef?.setFocusOn&&this.componentRef.setFocusOn(e),this}processBinLookupResponse(e){return this.componentRef?.processBinLookupResponse&&this.componentRef.processBinLookupResponse(e),this}dualBrandingChangeHandler(e){return this.componentRef?.dualBrandingChangeHandler&&this.componentRef.dualBrandingChangeHandler(e),this}handleUnsupportedCard(e){return this.componentRef?.handleUnsupportedCard&&this.componentRef.handleUnsupportedCard(e),this}onBinLookup(e){let r={...e};r.rootNode=this._node,r.isReset||(r.supportedBrandsRaw=e.supportedBrandsRaw?.map(o=>(o.brandImageUrl=this.props.brandsConfiguration[o.brand]?.icon??Oo(o.brand,this.resources),o))),this.props.onBinLookup(r)}get isValid(){return!!this.state.isValid}get browserInfo(){return pt()}render(){return _(Xt,{i18n:this.props.i18n,loadingContext:this.props.loadingContext,resources:this.resources},_(fa,{ref:e=>{this.componentRef=e},...this.props,...this.state,handleKeyPress:this.handleKeyPress,rootNode:this._node,onChange:this.setState,onBinValue:this.onBinValue,implementationType:"custom",resources:this.resources,brand:this.brand,onFocus:this.onFocus}))}constructor(...e){super(...e),Bt(this,"brand",J.card),Bt(this,"onBinValue",Ql(this)),Bt(this,"onFocus",r=>{let o=new ue({type:r.focus===!0?zl:jl,target:vl(r.fieldType)});this.submitAnalytics(o),this.props.onFocus?.(r)}),Bt(this,"onEnterKeyPressed",(r,o)=>{this.props.onEnterKeyPressed?.(r,o)})}};Bt(Ve,"type",J.customCard),Bt(Ve,"analyticsType","custom-scheme"),Bt(Ve,"defaultProps",{onBinLookup:()=>{},brandsConfiguration:{}});var tr=class extends U{componentDidMount(){this.formEl.submit(),this.props.onFormSubmit(`${this.props.inputName} sent`)}render({name:e,action:r,target:o,inputName:n,inputValue:a}){return _("form",{ref:s=>{this.formEl=s},method:"POST",className:Le(["adyen-checkout__threeds2__form",`adyen-checkout__threeds2__form--${e}`]),name:e,action:r,target:o,style:{display:"none"}},_("input",{name:n,value:a}))}constructor(...e){var r,o,n;super(...e),n=void 0,(o="formEl")in(r=this)?Object.defineProperty(r,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[o]=n}};var rr=(t,e,r,o)=>n=>{let a={};if((n.origin||n.originalEvent?.origin)!==t)return"Message was not sent from the expected domain";if(typeof n.data!="string")return"Event data was not of type string";if(!n.data.length)return"Invalid event data string";try{let s=JSON.parse(n.data);if(!S(s,"type")||s.type!==o)return"Event data was not of expected type";e(s)}catch{return a.type=`${o}-JSON-parse-error`,a.comment="failed to JSON parse event.data",a.extraInfo=`event.data = ${n.data}`,a.eventDataRaw=n.data,console.debug("get-process-message-handler::CATCH::Un-parseable JSON:: parseErrorObj=",a),!1}return!0};var Vr=t=>{let e=/^(?:([A-Za-z]+):)?(\/{0,3})([0-9.\-A-Za-z]+)(?::(\d+))?(?:\/([^?#]*))?(?:\?([^#]*))?(?:#(.*))?$/.exec(t);if(!e)return null;let[,r,o,n,a]=e;return r&&o&&n?`${r}:${o}${n}${a?`:${a}`:""}`:null};var Vu="not base64",Hu="malformed URI sequence",ft={decode:t=>{if(!ft.isBase64(t))return{success:!1,error:Vu};try{return{success:!0,data:(e=t,decodeURIComponent(Array.prototype.map.call(window.atob(e),r=>`%${`00${r.charCodeAt(0).toString(16)}`.slice(-2)}`).join("")))}}catch{return{success:!1,error:Hu}}var e},encode:t=>window.btoa(t),isBase64:t=>{if(!t||t.length%4)return!1;try{return window.btoa(window.atob(t))===t}catch{return!1}}};var or=t=>"success"in t&&!t.success,sd=t=>{let e=ft.decode(t);if(e.success)try{return JSON.parse(e.data)}catch{return{success:!1,error:"Could not JSON parse token"}}return e},zo=t=>{if(!t||!Object.keys(t).length)throw new Error("No (populated) data object to encode");return ft.encode(JSON.stringify(t))},id=t=>{let e=t.length===1?`0${t}`:t;return Object.prototype.hasOwnProperty.call(oa,e)?e:"02"},Yu=t=>oa[id(t)],ld=({token:t,size:e})=>{let r=sd(t);if(or(r))return r;let{acsTransID:o,acsURL:n,messageVersion:a,threeDSNotificationURL:s,threeDSServerTransID:l}=r,c=Vr(s);return{acsURL:n,cReqData:{acsTransID:o,messageVersion:a,threeDSServerTransID:l,messageType:"CReq",challengeWindowSize:id(e)},iframeSizeArr:Yu(e),postMessageDomain:c}},dd=({token:t,notificationURL:e})=>{let r=sd(t);if(or(r))return r;let{threeDSMethodNotificationURL:o,threeDSMethodUrl:n,threeDSServerTransID:a}=r,s=e||o;return{threeDSServerTransID:a,threeDSMethodURL:n,threeDSMethodNotificationURL:s,postMessageDomain:Vr(s)}},cd=(t,e,r)=>({data:{[t]:zo({threeDSCompInd:e.threeDSCompInd}),paymentData:r}}),ud=(t,e,r)=>({data:{details:{"threeds2.fingerprint":zo(e)},paymentData:r}}),pd=(t,e,r)=>({data:{details:{[t]:zo({transStatus:e,authorisationToken:r})}}}),md=(t,e,r)=>({data:{details:{"threeds2.challengeResult":zo({transStatus:e})},paymentData:r}}),jo=t=>{let e=window.btoa(t).split("=")[0];return e=e.replace(/\+/g,"-"),e=e.replace(/\//g,"_"),e},Ku=["elementRef"],Gu=["createFromAction","onAdditionalDetails"],hd=(t,e)=>{if(t==="fingerprint"){let r=e.elementRef?Ku:Gu,o=Nt(r).from(e);return o.showSpinner=!e.isDropin,o.statusType="loading",o}return{statusType:"custom",i18n:e.i18n,elementRef:e.elementRef}};var nr=(t,e,r)=>{let o;return{promise:new Promise((n,a)=>{o=setTimeout(()=>{a(r)},t),e.then(s=>{clearTimeout(o),n(s)}).catch(s=>{clearTimeout(o),a(s)})}),cancel:()=>{clearTimeout(o)}}};function ya(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var fd="threeDSIframe",$o=class extends U{get3DS2ChallengePromise(){return new Promise((e,r)=>{this.processMessageHandler=rr(this.props.postMessageDomain,e,r,"challengeResult"),window.addEventListener("message",this.processMessageHandler)})}componentDidMount(){this.challengePromise=nr(6e5,this.get3DS2ChallengePromise(),Rl),this.challengePromise.promise.then(e=>{window.removeEventListener("message",this.processMessageHandler),this.props.onCompleteChallenge(e)}).catch(e=>{window.removeEventListener("message",this.processMessageHandler),this.props.onErrorChallenge(e)})}componentWillUnmount(){this.challengePromise&&this.challengePromise.cancel(),window.removeEventListener("message",this.processMessageHandler)}render({acsURL:e,cReqData:r,iframeSizeArr:o,onFormSubmit:n},{base64URLencodedData:a,status:s}){let[l,c]=o;return _("div",{className:Le(["adyen-checkout__threeds2__challenge",`adyen-checkout__threeds2__challenge--${r.challengeWindowSize}`])},s!=="iframeLoaded"&&_(Ft,null),_(Je,{name:fd,width:l,height:c,callback:this.iframeCallback}),_(tr,{name:"cReqForm",action:e,target:fd,inputName:"creq",inputValue:a,onFormSubmit:n}))}constructor(e){super(e),ya(this,"processMessageHandler",void 0),ya(this,"challengePromise",void 0),ya(this,"iframeCallback",()=>{this.setState({status:"iframeLoaded"}),this.state.status==="init"&&this.props.onActionHandled?.({componentType:"3DS2Challenge",actionDescription:`${ct} challenge iframe loaded`})});let r=JSON.stringify(this.props.cReqData),o=jo(r);this.state={base64URLencodedData:o,status:"init"}}};function _d(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Hr=class extends U{componentDidMount(){if(or(this.state.challengeData)){let e=this.state.challengeData.error,r=e.indexOf(Xe)>-1?V.ACTION_IS_MISSING_TOKEN:V.TOKEN_DECODE_OR_PARSING_FAILED;this.setError({errorInfo:e.indexOf(Xe)>-1?`${V.ACTION_IS_MISSING_TOKEN}: ${this.props.i18n.get("err.gen.9102")}`:`${V.TOKEN_DECODE_OR_PARSING_FAILED}: ${this.props.i18n.get("err.gen.9102")}`},!0);let o=new Q({code:r,errorType:X.apiError,message:`${Te}: ${e}`});this.props.onSubmitAnalytics(o),console.debug("### PrepareChallenge3DS2::exiting:: no challengeData")}else{let e=this.props.environment==="test"&&this.props._environmentUrls?.api?.includes("http://localhost:8080"),{acsURL:r}=this.state.challengeData;if(!Jt(r,e)){this.setError({errorInfo:`${V.TOKEN_IS_MISSING_ACSURL}: ${this.props.i18n.get("err.gen.9102")}`},!0);let s=new Q({code:V.TOKEN_IS_MISSING_ACSURL,errorType:X.apiError,message:`${Te}: Decoded token is missing a valid acsURL property`});return this.props.onSubmitAnalytics(s),void console.debug("### PrepareChallenge3DS2::exiting:: no valid acsURL")}let{acsTransID:o,messageVersion:n,threeDSServerTransID:a}=this.state.challengeData.cReqData;if(!o||!n||!a){this.setError({errorInfo:`${V.TOKEN_IS_MISSING_OTHER_PROPS}: ${this.props.i18n.get("err.gen.9102")}`},!0);let s=new Q({code:V.TOKEN_IS_MISSING_OTHER_PROPS,errorType:X.apiError,message:`${Te}: Decoded token is missing one or more of the following properties (acsTransID | messageVersion | threeDSServerTransID)`});return this.props.onSubmitAnalytics(s),void console.debug("### PrepareChallenge3DS2::exiting:: missing one or more of the following properties (acsTransID | messageVersion | threeDSServerTransID)")}this.setState({status:"performingChallenge"})}}setStatusComplete(e,r=null){this.setState({status:"complete"},()=>{let o=(this.props.isMDFlow?md:pd)(this.props.dataKey,e.transStatus,this.props.paymentData),n;r&&console.debug("### PrepareChallenge3DS2::errorCodeObject::",r);let a=r||e;if(a.errorCode){let l={code:a.errorCode==="timeout"?V.THREEDS2_TIMEOUT:V.NO_TRANSSTATUS,errorType:a.errorCode==="timeout"?X.network:X.apiError};n=new Q({message:a.message,...l}),this.props.onSubmitAnalytics(n)}let s;switch(e?.transStatus){case"Y":s="success";break;case"N":s="failed";break;case"U":s=r?"timeout":"cancelled"}e?.errorCode&&(s="noTransStatus"),n=new me({type:Ae,message:`${ct} challenge has completed`,subType:Ue.CHALLENGE_COMPLETED,result:s}),this.props.onSubmitAnalytics(n),this.props.onComplete(o)})}setError(e,r){this.setState({status:"error",errorInfo:e.errorInfo}),r&&this.props.onError(new v(Or,e.errorInfo,{cause:e.errorObj}))}render(e,{challengeData:r}){let o=Pl();return this.state.status==="performingChallenge"?_($o,{onCompleteChallenge:n=>{let a=null;if(S(n.result,"errorCode")&&n.result.errorCode.length&&(a={errorCode:n.result.errorCode,message:`${Te}: ${n.result.errorDescription?n.result.errorDescription:"no transStatus could be retrieved"}`},this.props.isMDFlow&&this.props.onError(new v(Or,`${Te}: ${n.result.errorDescription?n.result.errorDescription:"no transStatus could be retrieved"}`,{cause:n.result.errorCode}))),!n.result){this.setError({errorInfo:`${Te}: ${this.props.i18n.get("3ds.chal.805",{values:{result:'"result"'}})}`,errorObj:n},!0);let s=new Q({code:V.CHALLENGE_RESOLVED_WITHOUT_RESULT_PROP,errorType:X.apiError,message:`${Te}: challenge resolved without a "result" object`});return this.props.onSubmitAnalytics(s),void console.debug('### PrepareChallenge3DS2::exiting:: challenge resolved without a "result" object')}this.setStatusComplete(n.result,a)},onErrorChallenge:n=>{if(S(n,"errorCode")){let a={errorCode:n.errorCode,message:`${Bo}: ${n.errorCode}`};return this.props.isMDFlow&&this.props.onError(new v(Or,`${Te}: '3DS2 challenge timed out'`,{cause:n.errorCode})),void this.setStatusComplete(n.result,a)}},...r,onActionHandled:this.props.onActionHandled,onFormSubmit:this.onFormSubmit}):this.state.status==="error"?_("div",{className:"adyen-checkout__threeds2-challenge-error"},_(Ol,{className:"adyen-checkout__status__icon adyen-checkout__status__icon--error",src:o({imageFolder:"components/"})("error"),alt:""}),_("div",{className:"adyen-checkout__status__text"},this.state.errorInfo?this.state.errorInfo:this.props.i18n.get("error.message.unknown"))):null}constructor(e){if(super(e),_d(this,"onFormSubmit",r=>{let o=new me({type:Ae,message:r,subType:Ue.CHALLENGE_DATA_SENT});this.props.onSubmitAnalytics(o)}),this.props.token){let r=ld({token:this.props.token,size:this.props.challengeWindowSize||this.props.size});this.state={status:"init",challengeData:r}}else this.state={challengeData:{success:!1,error:Xe}},console.debug(`${Te}: ${Xe}`)}};_d(Hr,"defaultProps",{onComplete:()=>{},onError:()=>{},isMDFlow:!1});function Wo(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ar=class extends he{onComplete(e){this.props.onComplete?this.props.onComplete(e,this.elementRef):super.onComplete(e),this.unmount()}render(){if(!Ce(this.props.paymentData)){let e=S(this.props,"isMDFlow")?"paymentData":"authorisationToken";this.props.onError(new v(Nr,`No ${e} received. 3DS2 Challenge cannot proceed`));let r=new Q({code:V.ACTION_IS_MISSING_PAYMENT_DATA,errorType:X.apiError,message:`${Te}: Missing 'paymentData' property from threeDS2 action`});return this.submitAnalytics(r),null}return _(Xt,{i18n:this.props.i18n,loadingContext:this.props.loadingContext,resources:this.resources},_(Hr,{...this.props,onComplete:this.onComplete,onSubmitAnalytics:this.submitAnalytics,isMDFlow:this.props.paymentData.length<15,onActionHandled:this.onActionHandled}))}constructor(...e){super(...e),Wo(this,"submitAnalytics",r=>{r instanceof ue&&r.type===Be||super.submitAnalytics(r)}),Wo(this,"onActionHandled",r=>{let o=new me({type:Ae,message:r.actionDescription,subType:Ue.CHALLENGE_IFRAME_LOADED});this.submitAnalytics(o),super.onActionHandled(r)})}};Wo(ar,"type",J.threeDS2Challenge),Wo(ar,"defaultProps",{dataKey:"threeDSResult",size:"02",type:Bo});function ga(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var yd="threeDSMethodIframe",Yr=class extends U{get3DS2MethodPromise(){return new Promise((e,r)=>{this.processMessageHandler=rr(this.props.postMessageDomain,e,r,"fingerPrintResult"),window.addEventListener("message",this.processMessageHandler)})}componentDidMount(){this.fingerPrintPromise=nr(1e4,this.get3DS2MethodPromise(),Tl),this.fingerPrintPromise.promise.then(e=>{window.removeEventListener("message",this.processMessageHandler),this.props.onCompleteFingerprint(e)}).catch(e=>{window.removeEventListener("message",this.processMessageHandler),this.props.onErrorFingerprint(e)})}componentWillUnmount(){this.fingerPrintPromise&&this.fingerPrintPromise.cancel(),window.removeEventListener("message",this.processMessageHandler)}render({threeDSMethodURL:e,onActionHandled:r,onFormSubmit:o},{base64URLencodedData:n}){return _("div",{className:"adyen-checkout__3ds2-device-fingerprint"},this.props.showSpinner&&_(Ft,null),_("div",{style:{display:"none"}},_(Je,{name:yd,callback:()=>{r?.({componentType:"3DS2Fingerprint",actionDescription:`${ct} fingerprint iframe loaded`})}}),_(tr,{name:"threeDSMethodForm",action:e,target:yd,inputName:"threeDSMethodData",inputValue:n,onFormSubmit:o})))}constructor(e){super(e),ga(this,"processMessageHandler",void 0),ga(this,"fingerPrintPromise",void 0);let{threeDSServerTransID:r,threeDSMethodNotificationURL:o}=this.props,n=JSON.stringify({threeDSServerTransID:r,threeDSMethodNotificationURL:o}),a=jo(n);this.state={base64URLencodedData:a}}};ga(Yr,"defaultProps",{showSpinner:!0});function Ca(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var sr=class extends U{componentDidMount(){if(or(this.state.fingerPrintData)){let e=this.state.fingerPrintData.error,r=e.indexOf(Xe)>-1?V.ACTION_IS_MISSING_TOKEN:V.TOKEN_DECODE_OR_PARSING_FAILED;this.setStatusComplete({threeDSCompInd:"N"},{errorCode:r,message:`${Ot}: ${e}`}),console.debug("### PrepareFingerprint3DS2:: token does not exist or could not be base64 decoded &/or JSON.parsed")}else{let e=this.props.environment==="test"&&this.props._environmentUrls?.api?.includes("http://localhost:8080"),{threeDSMethodURL:r,threeDSMethodNotificationURL:o,postMessageDomain:n,threeDSServerTransID:a}=this.state.fingerPrintData;if(!Jt(r,e))return this.setStatusComplete({threeDSCompInd:"U"},{errorCode:V.TOKEN_IS_MISSING_THREEDSMETHODURL,message:`${Ot}: Decoded token is missing a valid threeDSMethodURL property`}),void console.debug("### PrepareFingerprint3DS2::exiting:: no valid threeDSMethodURL");let s=Jt(o,e),l=Jt(n,e),c=a?.length;if(!s||!l||!c)return this.setStatusComplete({threeDSCompInd:"N"},{errorCode:V.TOKEN_IS_MISSING_OTHER_PROPS,message:`${Ot}: Decoded token is missing one or more of the following properties (threeDSMethodNotificationURL | postMessageDomain | threeDSServerTransID)`}),void console.debug("### PrepareFingerprint3DS2::exiting:: Decoded token is missing one or more of the following properties (threeDSMethodNotificationURL | postMessageDomain | threeDSServerTransID)");this.setState({status:"retrievingFingerPrint"})}}setStatusComplete(e,r=null){this.setState({status:"complete"},()=>{let o=(this.props.isMDFlow?ud:cd)(this.props.dataKey,e,this.props.paymentData),n,a=r||e;if(a.errorCode){let l={code:a.errorCode===Mt?V.THREEDS2_TIMEOUT:a.errorCode,errorType:a.errorCode===Mt?X.network:X.apiError};n=new Q({message:a.message,...l}),this.props.onSubmitAnalytics(n)}let s;switch(e?.threeDSCompInd){case"Y":s="success";break;case"N":s=r?r.errorCode===Mt?Mt:"failedInternal":"failed";break;case"U":s="noThreeDSMethodURL"}n=new me({type:Ae,message:`${ct} fingerprinting has completed`,subType:Ue.FINGERPRINT_COMPLETED,result:s}),this.props.onSubmitAnalytics(n),this.props.onComplete(o)})}render({showSpinner:e},{status:r,fingerPrintData:o}){return r==="retrievingFingerPrint"?_(Yr,{onCompleteFingerprint:n=>{this.setStatusComplete(n.result)},onErrorFingerprint:n=>{let a={errorCode:n.errorCode,message:`${Fo}: ${n.errorCode}`};this.setStatusComplete(n.result,a)},showSpinner:e,...o,onActionHandled:this.props.onActionHandled,onFormSubmit:this.onFormSubmit}):null}constructor(e){super(e),Ca(this,"onFormSubmit",n=>{let a=new me({type:Ae,message:n,subType:Ue.FINGERPRINT_DATA_SENT});this.props.onSubmitAnalytics(a)});let{token:r,notificationURL:o}=this.props;if(r){let n=dd({token:r,notificationURL:o});this.state={status:"init",fingerPrintData:n}}else this.state={fingerPrintData:{success:!1,error:Xe}},console.debug(`${Ot}: ${Xe}`)}};Ca(sr,"type","scheme"),Ca(sr,"defaultProps",{onComplete:()=>{},onError:()=>{},paymentData:"",showSpinner:!0,isMDFlow:!1});var _t={makePayments:"620",submitPaymentDetails:"621",submitThreeDS2Fingerprint:"622",createOrder:"623"};function gd({data:t}){q({path:`v1/submitThreeDS2Fingerprint?token=${this.props.clientKey}`,loadingContext:this.props.loadingContext,errorLevel:"fatal",errorCode:_t.submitThreeDS2Fingerprint},{...t}).then(e=>{let r;if(e.type==="completed"){let{details:n}=e;return e.details?this.onComplete({data:{details:n}}):(console.debug('Handled Error::callSubmit3DS2Fingerprint::FAILED:: no details object in a response indicating either a "frictionless" flow, or a "refused" response. resData=',e),r=new Q({code:V.NO_DETAILS_FOR_FRICTIONLESS_OR_REFUSED,errorType:X.apiError,message:`${Lo}: no details object in a response indicating either a "frictionless" flow, or a "refused" response`}),void this.submitAnalytics(r))}if(!e.action)return console.debug('Handled Error::callSubmit3DS2Fingerprint::FAILED:: no action object in a response indicating a "challenge". resData=',e),r=new Q({code:V.NO_ACTION_FOR_CHALLENGE,errorType:X.apiError,message:`${Lo}: no action object in a response indicating a "challenge" flow`}),void this.submitAnalytics(r);let o=this.props.elementRef??this;return o?e.action?.type==="threeDS2"?o.handleAction(e.action,Nt("challengeWindowSize").from(this.props)):e.action?.type==="redirect"?o.handleAction(e.action):void 0:(console.debug("Handled Error::callSubmit3DS2Fingerprint::FAILED:: no actionHandler"),r=new Q({code:V.NO_COMPONENT_FOR_ACTION,errorType:X.sdkError,message:`${Lo}: no component defined to handle the action response`}),void this.submitAnalytics(r))}).catch(e=>{this.handleError(e)})}function Kr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ir=class extends he{onComplete(e){this.props.onComplete?this.props.onComplete(e,this.elementRef):super.onComplete(e),this.unmount()}render(){if(!Ce(this.props.paymentData)){this.props.onError(new v(Nr,"No paymentData received. 3DS2 Fingerprint cannot proceed"));let e=new Q({code:V.ACTION_IS_MISSING_PAYMENT_DATA,errorType:X.apiError,message:`${Ot}: Missing 'paymentData' property from threeDS2 action`});return this.submitAnalytics(e),null}return _(sr,{...this.props,onComplete:this.props.isMDFlow?this.onComplete:this.callSubmit3DS2Fingerprint,onSubmitAnalytics:this.submitAnalytics,isMDFlow:this.props.paymentData.length<15,onActionHandled:this.onActionHandled})}constructor(...e){super(...e),Kr(this,"callSubmit3DS2Fingerprint",gd.bind(this)),Kr(this,"submitAnalytics",r=>{r instanceof ue&&r.type===Be||super.submitAnalytics(r)}),Kr(this,"onActionHandled",r=>{let o=new me({type:Ae,message:r.actionDescription,subType:Ue.FINGERPRINT_IFRAME_LOADED});this.submitAnalytics(o),super.onActionHandled(r)})}};Kr(ir,"type",J.threeDS2Fingerprint),Kr(ir,"defaultProps",{dataKey:"fingerprintResult",type:Fo});function Cd({label:t=null,icon:e=null,payButton:r,onSubmit:o,amount:n=null,name:a,showPayButton:s,...l}){let{i18n:c}=dt(),[u,p]=ge("ready");if(this.setStatus=d=>{p(d)},s)return _(at,null,r({...l,status:u,icon:e,classNameModifiers:["standalone"],label:t||(n&&{}.hasOwnProperty.call(n,"value")&&n.value===0?`${c.get("preauthorizeWith")} ${a}`:`${c.get("continueTo")} ${a}`),onClick:o}))}var vd={IDR:1,JPY:1,KRW:1,VND:1,BYR:1,CVE:1,DJF:1,GHC:1,GNF:1,KMF:1,PYG:1,RWF:1,UGX:1,VUV:1,XAF:1,XOF:1,XPF:1,MRO:10,BHD:1e3,IQD:1e3,JOD:1e3,KWD:1e3,OMR:1e3,LYD:1e3,TND:1e3};var va={RSD:{minimumFractionDigits:2},AFN:{minimumFractionDigits:2},ALL:{minimumFractionDigits:2},IRR:{minimumFractionDigits:2},LAK:{minimumFractionDigits:2},LBP:{minimumFractionDigits:2},MMK:{minimumFractionDigits:2},SOS:{minimumFractionDigits:2},SYP:{minimumFractionDigits:2},YER:{minimumFractionDigits:2},IQD:{minimumFractionDigits:3}};var $u=t=>vd[t]||100,Gr=(t,e)=>{let r=$u(e);return parseInt(String(t),10)/r},bd=(t,e,r,o={})=>{let n=t.toString(),a=Gr(n,r),s=e.replace("_","-"),l={style:"currency",currency:r,currencyDisplay:"symbol",...va[r]?{...o,...va[r]}:o};try{return a.toLocaleString(s,l)}catch{return n}};var Ed=({buttonStyle:t,buttonType:e,buttonLocale:r,onClick:o})=>_("apple-pay-button",{"data-testid":"apple-pay-button",buttonstyle:t,type:e,locale:r,onclick:o});function Sd(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Zo=class{begin(){return this.session.begin()}onvalidatemerchant(e,r){return new Promise((o,n)=>r(o,n,e.validationURL)).then(o=>{this.session.completeMerchantValidation(o)}).catch(o=>{console.error(o),this.session.abort(),this.options.onError(o)})}onpaymentauthorized(e,r){return new Promise((o,n)=>r(o,n,e)).then(o=>{this.session.completePayment(o)}).catch(o=>{this.session.completePayment(o)})}onpaymentmethodselected(e,r){return new Promise((o,n)=>r(o,n,e)).then(o=>{this.session.completePaymentMethodSelection(o)}).catch(o=>{this.session.completePaymentMethodSelection(o)})}onshippingcontactselected(e,r){return new Promise((o,n)=>r(o,n,e)).then(o=>{this.session.completeShippingContactSelection(o)}).catch(o=>{this.session.completeShippingContactSelection(o)})}onshippingmethodselected(e,r){return new Promise((o,n)=>r(o,n,e)).then(o=>{this.session.completeShippingMethodSelection(o)}).catch(o=>{this.session.completeShippingMethodSelection(o)})}oncancel(e,r){r(e)}constructor(e,r){Sd(this,"session",void 0),Sd(this,"options",void 0),this.options=r,this.session=new ApplePaySession(r.version,e),this.session.onvalidatemerchant=o=>{this.onvalidatemerchant(o,r.onValidateMerchant)},this.session.onpaymentauthorized=o=>{this.onpaymentauthorized(o,r.onPaymentAuthorized)},this.session.oncancel=o=>{this.oncancel(o,r.onCancel)},typeof r.onPaymentMethodSelected=="function"&&(this.session.onpaymentmethodselected=o=>{this.onpaymentmethodselected(o,r.onPaymentMethodSelected)}),typeof r.onShippingContactSelected=="function"&&(this.session.onshippingcontactselected=o=>{this.onshippingcontactselected(o,r.onShippingContactSelected)}),typeof r.onShippingMethodSelected=="function"&&(this.session.onshippingmethodselected=o=>{this.onshippingmethodselected(o,r.onShippingMethodSelected)})}};var Pd={isExpress:!1,amount:{currency:"USD",value:0},totalPriceStatus:"final",initiative:"web",merchantCapabilities:["supports3DS"],supportedNetworks:["amex","discover","masterCard","visa"],buttonType:"plain",buttonColor:"black",onClick:t=>t()};var Rd=t=>{let{countryCode:e,companyName:r,amount:o,...n}=t,a=(s=>String(Gr(s.value,s.currency)))(o);return e||console.warn("Apple Pay - Make sure to set the countryCode in the AdyenCheckout configuration or in the Checkout Session creation"),{countryCode:e,currencyCode:o.currency,total:{label:n.totalPriceLabel,amount:a,type:n.totalPriceStatus},lineItems:n.lineItems,shippingContactEditingMode:n.shippingContactEditingMode,shippingMethods:n.shippingMethods,shippingType:n.shippingType,recurringPaymentRequest:n.recurringPaymentRequest,merchantCapabilities:n.merchantCapabilities,supportedCountries:n.supportedCountries,supportedNetworks:n.supportedNetworks,requiredShippingContactFields:n.requiredShippingContactFields,requiredBillingContactFields:n.requiredBillingContactFields,billingContact:n.billingContact,shippingContact:n.shippingContact,applicationData:n.applicationData}};function Td(t){try{for(let e=t;e>0;e--)if(ApplePaySession?.supportsVersion(e))return e}catch(e){console.warn(e)}return null}function ba(t,e){if(t)return{city:t.locality,country:t.countryCode,houseNumberOrName:"ZZ",postalCode:t.postalCode,street:t.addressLines?.join(" ").trim(),...t.administrativeArea&&{stateOrProvince:t.administrativeArea},...e&&{firstName:t.givenName,lastName:t.familyName}}}function Ad(t){let e={mc:"masterCard",amex:"amex",visa:"visa",elodebit:"elo",elo:"elo",interac:"interac",discover:"discover",jcb:"jcb",electron:"electron",maestro:"maestro",girocard:"girocard",cartebancaire:"cartesBancaires",eftpos_australia:"eftpos"};return t.reduce((r,o)=>(e[o]&&!r.includes(e[o])&&r.push(e[o]),r),[])}function xd(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Wu="https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js",qo=class{async load(){try{let e=new mt({src:Wu,component:"applepay",attributes:{crossOrigin:"anonymous"},analytics:this.analytics});return this.sdkLoadingPromise=e.load(),await this.sdkLoadingPromise,window?.ApplePaySession}catch(e){throw new v("SCRIPT_ERROR","ApplePaySDK failed to load",{cause:e})}}isSdkLoaded(){return this.sdkLoadingPromise===void 0?Promise.reject():this.sdkLoadingPromise}constructor({analytics:e}){xd(this,"sdkLoadingPromise",void 0),xd(this,"analytics",void 0),this.analytics=e}};var Dd=()=>{if(typeof window>"u")return!1;try{return window.self!==window.top}catch{return!0}};function zr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ut=class t extends he{formatProps(e){let r=e.brands?.length?Ad(e.brands):e.supportedNetworks;return{...e,configuration:e.configuration,supportedNetworks:r,buttonLocale:e.buttonLocale??e.i18n?.locale,totalPriceLabel:e.totalPriceLabel||e.configuration?.merchantName,renderApplePayCodeAs:e.renderApplePayCodeAs??(Dd()?"window":"modal")}}formatData(){let{applePayToken:e,billingAddress:r,deliveryAddress:o}=this.state,{isExpress:n}=this.props;return{paymentMethod:{type:t.type,applePayToken:e,...n&&{subtype:"express"}},...r&&{billingAddress:r},...o&&{deliveryAddress:o}}}submitAnalytics(e){if(e instanceof ue&&e.type===Be){let{isExpress:r,expressPage:o}=this.props,n=o&&Yo.includes(o);typeof r=="boolean"&&(e.isExpress=r),r===!0&&n&&(e.expressPage=o)}super.submitAnalytics(e)}get isValid(){return!0}async applePayCapabilities(e){let r=e||this.props.configuration.merchantId;try{return await this.sdkLoader.isSdkLoaded(),await ApplePaySession?.applePayCapabilities(r)}catch(o){throw new v("ERROR","Apple Pay: Error when requesting applePayCapabilities()",{cause:o})}}async isAvailable(){if(window.location.protocol!=="https:")return Promise.reject(new v("IMPLEMENTATION_ERROR","Trying to start an Apple Pay session from an insecure document"));try{return await this.sdkLoader.isSdkLoaded(),ApplePaySession?.canMakePayments()?Promise.resolve():Promise.reject(new v("ERROR","Apple Pay is not available on this device"))}catch(e){return Promise.reject(new v("ERROR","Apple Pay SDK failed to load",{cause:e}))}}defineApplePayVersionNumber(){window.location.protocol==="https:"&&(this.applePayVersionNumber=this.props.version||Td(14))}configureApplePayWebOptions(){if(window.ApplePayWebOptions){let{renderApplePayCodeAs:e,onApplePayCodeClose:r}=this.props;window.ApplePayWebOptions.set({renderApplePayCodeAs:e,...r&&{onApplePayCodeClose:r}})}}startSession(){let{onValidateMerchant:e,onPaymentMethodSelected:r,onShippingMethodSelected:o,onShippingContactSelected:n}=this.props,a=Rd({companyName:this.props.configuration.merchantName,countryCode:this.core.options.countryCode,...this.props}),s=new Zo(a,{version:this.applePayVersionNumber,onError:l=>{this.handleError(new v("ERROR","ApplePay - Something went wrong on ApplePayService",{cause:l}))},onCancel:l=>{this.handleError(new v("CANCEL","ApplePay UI dismissed",{cause:l}))},onPaymentMethodSelected:r,onShippingMethodSelected:o,onShippingContactSelected:n,onValidateMerchant:e||this.validateMerchant,onPaymentAuthorized:(l,c,u)=>{let p=ba(u.payment.billingContact),d=ba(u.payment.shippingContact,!0);this.setState({applePayToken:btoa(JSON.stringify(u.payment.token.paymentData)),authorizedEvent:u,...p&&{billingAddress:p},...d&&{deliveryAddress:d}}),this.handleAuthorization().then(this.makePaymentsCall).then(et).then(tt).then(this.collectOrderTrackingDetailsIfNeeded).then(({paymentResponse:h,orderDetails:m})=>(l({status:ApplePaySession.STATUS_SUCCESS,...m&&{orderDetails:m}}),h)).then(h=>{this.handleResponse(h)}).catch(h=>{let m=h?.error?.applePayError;c({status:ApplePaySession.STATUS_FAILURE,errors:m?Array.isArray(m)?m:[m]:void 0});let y={...h,error:{applePayError:m}};this.handleFailedResult(y)})}});return new Promise((l,c)=>this.props.onClick(l,c)).then(()=>{s.begin()}).catch(()=>({}))}async handleAuthorization(){return new Promise((e,r)=>{this.props.onAuthorized||e();let{authorizedEvent:o,billingAddress:n,deliveryAddress:a}=this.state;this.props.onAuthorized({authorizedEvent:o,...n&&{billingAddress:n},...a&&{deliveryAddress:a}},{resolve:e,reject:r})}).catch(e=>{let r={error:{applePayError:e}};return Promise.reject(r)})}async collectOrderTrackingDetailsIfNeeded(e){return new Promise((r,o)=>{if(!this.props.onOrderTrackingRequest)return r();this.props.onOrderTrackingRequest(r,o)}).then(r=>({paymentResponse:e,...r&&{orderDetails:r}})).catch(()=>({paymentResponse:e}))}async validateMerchant(e,r){let{hostname:o}=window.location,{clientKey:n,configuration:a,loadingContext:s,initiative:l,domainName:c}=this.props,{merchantName:u,merchantId:p}=a,d={loadingContext:s,path:`v1/applePay/sessions?clientKey=${n}`},h={displayName:u,domainName:c||o,initiative:l,merchantIdentifier:p};try{let m=await q(d,h),y=ft.decode(m.data);y.success?e(JSON.parse(y.data)):r("Could not decode Apple Pay session")}catch{r("Could not get Apple Pay session")}}render(){return this.props.showPayButton?_(Ed,{buttonStyle:this.props.buttonColor,buttonType:this.props.buttonType,buttonLocale:this.props.buttonLocale,onClick:this.submit}):null}constructor(e,r){super(e,r),zr(this,"sdkLoader",void 0),zr(this,"applePayVersionNumber",void 0),zr(this,"submit",()=>{if(this.props.isInstantPayment){let s=new ue({type:Vo,target:Ho});this.submitAnalytics(s)}this.startSession()});let{isExpress:o,onShippingContactSelected:n,onShippingMethodSelected:a}=this.props;if(o===!1&&(n||a))throw new v("IMPLEMENTATION_ERROR",'ApplePay - You must set "isExpress" flag to "true" in order to use "onShippingContactSelected" and/or "onShippingMethodSelected" callbacks');this.startSession=this.startSession.bind(this),this.submit=this.submit.bind(this),this.validateMerchant=this.validateMerchant.bind(this),this.collectOrderTrackingDetailsIfNeeded=this.collectOrderTrackingDetailsIfNeeded.bind(this),this.handleAuthorization=this.handleAuthorization.bind(this),this.defineApplePayVersionNumber=this.defineApplePayVersionNumber.bind(this),this.configureApplePayWebOptions=this.configureApplePayWebOptions.bind(this),this.sdkLoader=new qo({analytics:this.analytics}),this.sdkLoader.load().then(this.defineApplePayVersionNumber).then(this.configureApplePayWebOptions).catch(s=>{this.handleError(s)})}};zr(Ut,"type",J.applepay),zr(Ut,"defaultProps",Pd);var yt={API_VERSION:2,API_VERSION_MINOR:0,GATEWAY:"adyen",URL:"https://pay.google.com/gp/p/js/pay.js"};function wd({allowedAuthMethods:t,allowedCardNetworks:e,existingPaymentMethodRequired:r=!1}){return{apiVersion:yt.API_VERSION,apiVersionMinor:yt.API_VERSION_MINOR,allowedPaymentMethods:[{type:"CARD",parameters:{allowedAuthMethods:t,allowedCardNetworks:e},tokenizationSpecification:{type:"PAYMENT_GATEWAY",parameters:{}}}],existingPaymentMethodRequired:r}}function Zu({amount:t,countryCode:e="US",totalPriceStatus:r="FINAL",...o}){let n=String(Gr(t.value,t.currency));return{countryCode:e,currencyCode:t.currency,totalPrice:n,totalPriceStatus:r,...o.transactionInfo}}function Ea({configuration:t,...e},r){return{apiVersion:yt.API_VERSION,apiVersionMinor:yt.API_VERSION_MINOR,transactionInfo:Zu({countryCode:r,...e}),merchantInfo:{merchantId:t.merchantId,merchantName:t.merchantName,...t.merchantOrigin?{merchantOrigin:t.merchantOrigin}:{},...t.authJwt?{authJwt:t.authJwt}:{}},allowedPaymentMethods:[{type:"CARD",tokenizationSpecification:{type:"PAYMENT_GATEWAY",parameters:{gateway:yt.GATEWAY,gatewayMerchantId:t.gatewayMerchantId}},parameters:{allowedAuthMethods:e.allowedAuthMethods,allowedCardNetworks:e.allowedCardNetworks,assuranceDetailsRequired:e.assuranceDetailsRequired,allowPrepaidCards:e.allowPrepaidCards,allowCreditCards:e.allowCreditCards,billingAddressRequired:e.billingAddressRequired,billingAddressParameters:e.billingAddressParameters}}],emailRequired:e.emailRequired,shippingAddressRequired:e.shippingAddressRequired,shippingAddressParameters:e.shippingAddressParameters,shippingOptionRequired:e.shippingOptionRequired,shippingOptionParameters:e.shippingOptionParameters,callbackIntents:e.callbackIntents}}function Id(t="TEST"){switch(t.toLowerCase()){case"production":case"live":case"live-au":case"live-apse":case"live-us":case"live-in":return"PRODUCTION";default:return"TEST"}}function Sa(t,e){if(t)return{postalCode:t.postalCode,country:t.countryCode,street:[t.address1,t.address2,t.address3].join(" ").trim(),houseNumberOrName:"ZZ",city:t.locality||"",...t.administrativeArea&&{stateOrProvince:t.administrativeArea},...e&&{firstName:t.name}}}var qu=["en","ar","bg","ca","cs","da","de","el","es","et","fi","fr","hr","id","it","ja","ko","ms","nl","no","pl","pt","ru","sk","sl","sr","sv","th","tr","uk","zh"];function kd(t=""){let e=t.toLowerCase().substring(0,2);return qu.includes(e)?e:null}function Nd(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Xo=class{async getGooglePaymentsClient(e){return window.google?.payments||await new mt({src:yt.URL,component:"googlepay",analytics:this.analytics}).load(),new google.payments.api.PaymentsClient(e)}isReadyToPay(e){return this.paymentsClient?this.paymentsClient.then(r=>r.isReadyToPay(wd(e))):Promise.reject(new Error("Google Pay is not available"))}prefetchPaymentData(e,r){if(!this.paymentsClient)throw new Error("Google Pay is not available");let o=Ea(e,r);this.paymentsClient.then(n=>n.prefetchPaymentData(o))}initiatePayment(e,r){if(!this.paymentsClient)throw new Error("Google Pay is not available");let o=Ea(e,r);return this.paymentsClient.then(n=>n.loadPaymentData(o))}constructor(e,r,o){Nd(this,"analytics",void 0),Nd(this,"paymentsClient",void 0);let n=Id(e);this.analytics=r,this.paymentsClient=this.getGooglePaymentsClient({environment:n,paymentDataCallbacks:o})}};var Od=t=>{let e=st(void 0);return We(()=>{let{onClick:r,buttonRadius:o,buttonColor:n,buttonType:a,buttonLocale:s,buttonSizeMode:l,buttonRootNode:c,paymentsClient:u}=t;u.then(p=>p.createButton({onClick:r,buttonType:a,buttonColor:n,buttonLocale:s,buttonSizeMode:l,buttonRootNode:c,...o!==void 0&&{buttonRadius:o}})).then(p=>{e.current&&e.current.appendChild(p)})},[t.buttonColor,t.buttonType,t.buttonLocale,t.buttonSizeMode,t.buttonRootNode,t.paymentsClient]),_("div",{"data-testid":"googlepay-button-container",className:"adyen-checkout__paywithgoogle",ref:e})};var Md={isExpress:!1,existingPaymentMethodRequired:!1,buttonColor:"default",buttonType:"buy",buttonSizeMode:"fill",configuration:{gatewayMerchantId:"",merchantId:"",merchantName:""},amount:{value:0,currency:"USD"},totalPriceStatus:"FINAL",onClick:t=>t(),allowedAuthMethods:["PAN_ONLY","CRYPTOGRAM_3DS"],allowCreditCards:!0,allowPrepaidCards:!0,billingAddressRequired:!1,billingAddressParameters:void 0,assuranceDetailsRequired:!1,emailRequired:!1,shippingAddressRequired:!1,shippingAddressParameters:void 0,shippingOptionRequired:!1,shippingOptionParameters:void 0,callbackIntents:[]};var Xu=Object.freeze({mc:"MASTERCARD",amex:"AMEX",visa:"VISA",elodebit:"ELO_DEBIT",elo:"ELO",interac:"INTERAC",discover:"DISCOVER",jcb:"JCB",electron:"ELECTRON",maestro:"MAESTRO"});function Fd(t){let e=t.map(r=>Xu[r]).filter(r=>!!r);return[...new Set(e)]}function gt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ju=["AMEX","DISCOVER","JCB","MASTERCARD","VISA"],Ct=class extends he{getPaymentMethodFromPaymentMethodsResponse(e){return this.core.paymentMethodsResponse.find(e||this.constructor.type)||this.core.paymentMethodsResponse.find(J.paywithgoogle)}formatProps(e){let r=e.buttonSizeMode??(e.isDropin?"fill":"static"),o=kd(e.buttonLocale??e.i18n?.locale),n=[...e.callbackIntents,"PAYMENT_AUTHORIZATION"],a=this.createAllowedCardNetworksValues({allowedCardNetworks:e.allowedCardNetworks,brands:e.brands});return{...e,allowedCardNetworks:a,configuration:e.configuration,buttonSizeMode:r,buttonLocale:o,callbackIntents:n}}formatData(){let{googlePayCardNetwork:e,googlePayToken:r,billingAddress:o,deliveryAddress:n}=this.state,{isExpress:a}=this.props;return{paymentMethod:{type:this.type,googlePayCardNetwork:e,googlePayToken:r,...a&&{subtype:"express"}},browserInfo:this.browserInfo,origin:!!window&&window.location.origin,...o&&{billingAddress:o},...n&&{deliveryAddress:n}}}createAllowedCardNetworksValues({allowedCardNetworks:e,brands:r}){return e?.length>0?e:r?.length>0?Fd(r):Ju}submitAnalytics(e){if(e instanceof ue&&e.type===Be){let{isExpress:r,expressPage:o}=this.props,n=o&&Yo.includes(o);typeof r=="boolean"&&(e.isExpress=r),r===!0&&n&&(e.expressPage=o)}super.submitAnalytics(e)}showGooglePayPaymentSheet(){this.googlePay.initiatePayment(this.props,this.core.options.countryCode).catch(e=>{this.handleError(new v(e.statusCode==="CANCELED"?"CANCEL":"ERROR",e.toString(),{cause:e}))})}async handleAuthorization(){return new Promise((e,r)=>{this.props.onAuthorized||e();let{authorizedEvent:o,billingAddress:n,deliveryAddress:a}=this.state;this.props.onAuthorized({authorizedEvent:o,...n&&{billingAddress:n},...a&&{deliveryAddress:a}},{resolve:e,reject:r})}).catch(e=>{let r={error:{googlePayError:e}};return Promise.reject(r)})}get isValid(){return!0}async isAvailable(){return this.isReadyToPay().then(e=>{if(!e.result)throw new v("ERROR","GooglePay is not available");if(e.paymentMethodPresent===!1)throw new v("ERROR","GooglePay - No paymentMethodPresent");return Promise.resolve()}).catch(e=>Promise.reject(e))}get browserInfo(){return pt()}get icon(){return this.props.icon??this.resources.getImage()("googlepay")}render(){return this.props.showPayButton?_(Od,{buttonColor:this.props.buttonColor,buttonType:this.props.buttonType,buttonSizeMode:this.props.buttonSizeMode,buttonLocale:this.props.buttonLocale,buttonRootNode:this.props.buttonRootNode,buttonRadius:this.props.buttonRadius,paymentsClient:this.googlePay.paymentsClient,onClick:this.submit}):null}constructor(e,r){super(e,r),gt(this,"googlePay",void 0),gt(this,"submit",()=>{if(this.props.isInstantPayment){let a=new ue({type:Vo,target:Ho});this.submitAnalytics(a)}new Promise((a,s)=>this.props.onClick(a,s)).then(this.showGooglePayPaymentSheet).catch(()=>{})}),gt(this,"onPaymentAuthorized",async a=>{let s=Sa(a.paymentMethodData.info.billingAddress),l=Sa(a.shippingAddress,!0);return this.setState({authorizedEvent:a,googlePayToken:a.paymentMethodData.tokenizationData.token,googlePayCardNetwork:a.paymentMethodData.info.cardNetwork,...s&&{billingAddress:s},...l&&{deliveryAddress:l}}),new Promise(c=>{this.handleAuthorization().then(this.makePaymentsCall).then(et).then(tt).then(u=>(c({transactionState:"SUCCESS"}),u)).then(u=>{this.handleResponse(u)}).catch(u=>{this.setElementStatus("ready");let p=u?.error?.googlePayError,d=this.props.i18n.get("error.subtitle.payment"),h=typeof p=="string"?{intent:"PAYMENT_AUTHORIZATION",reason:"OTHER_ERROR",message:p||d}:{intent:p?.intent||"PAYMENT_AUTHORIZATION",reason:p?.reason||"OTHER_ERROR",message:p?.message||d};c({transactionState:"ERROR",error:h});let m={...u,error:{googlePayError:h}};this.handleFailedResult(m)})})}),gt(this,"isReadyToPay",()=>this.googlePay.isReadyToPay(this.props)),gt(this,"prefetch",()=>this.googlePay.prefetchPaymentData(this.props,this.core.options.countryCode)),this.handleAuthorization=this.handleAuthorization.bind(this),this.showGooglePayPaymentSheet=this.showGooglePayPaymentSheet.bind(this);let{isExpress:o,paymentDataCallbacks:n}=this.props;if(o===!1&&n?.onPaymentDataChanged)throw new v("IMPLEMENTATION_ERROR",'GooglePay - You must set "isExpress" flag to "true" in order to use "onPaymentDataChanged" callback');if(!this.props.configuration.merchantId)throw new v("IMPLEMENTATION_ERROR","GooglePay - Missing merchantId. Please ensure that it is correctly configured in your customer area.");this.googlePay=new Xo(this.props.environment,this.analytics,{...o&&n?.onPaymentDataChanged&&{onPaymentDataChanged:n.onPaymentDataChanged},onPaymentAuthorized:this.onPaymentAuthorized})}};gt(Ct,"type",J.googlepay),gt(Ct,"txVariants",[J.googlepay,J.paywithgoogle]),gt(Ct,"defaultProps",Md);var Pa=()=>{try{if(window.parent.location.href)return window.location!==window.parent.location}catch{return!1}};function Ld(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var jr=class extends U{componentDidMount(){new Promise((e,r)=>{this.props.beforeRedirect(e,r,{url:this.props.url,method:this.props.method,...this.props.data?{data:this.props.data}:{}})}).then(()=>{this.props.onActionHandled?.({componentType:this.props.paymentMethodType,actionDescription:"performing-redirect"}),this.postForm?this.postForm.submit():this.props.redirectFromTopWhenInIframe&&Pa()?window.top.location.assign?.(this.props.url):window.location.assign(this.props.url)}).catch(()=>{this.props.onRedirectError()})}render({url:e,method:r,data:o={}}){return r==="POST"?_("form",{method:"post","data-testid":"redirect-shopper-form",action:e,style:{display:"none"},ref:n=>{this.postForm=n},...this.props.redirectFromTopWhenInIframe&&Pa()&&{target:"_top"}},Object.keys(o).map(n=>_("input",{type:"hidden",name:n,key:n,value:o[n]}))):null}constructor(...e){super(...e),Ld(this,"postForm",void 0)}};Ld(jr,"defaultProps",{beforeRedirect:t=>t(),onRedirectError:()=>{},method:"GET"});function Ra(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var vt=class extends he{formatData(){return{paymentMethod:{type:this.type},browserInfo:this.browserInfo}}get isValid(){return!0}get browserInfo(){return pt()}render(){return this.props.url&&this.props.method?_(jr,{url:this.props.url,...this.props,onActionHandled:this.onActionHandled,onRedirectError:this.handleRedirectError}):this.props.showPayButton?_(Xt,{i18n:this.props.i18n,loadingContext:this.props.loadingContext,resources:this.resources},_(Cd,{...this.props,showPayButton:this.props.showPayButton,name:this.displayName,onSubmit:this.submit,payButton:this.payButton,ref:e=>{this.componentRef=e}})):null}constructor(...e){super(...e),Ra(this,"handleRedirectError",()=>{let r=new Q({component:this.props.paymentMethodType,errorType:X.redirect,code:Yl.redirect});super.submitAnalytics(r)})}};Ra(vt,"type",J.redirect),Ra(vt,"defaultProps",{type:vt.type});var Bd={test:"https://checkoutshopper-test.adyen.com/checkoutshopper/",live:"https://checkoutshopper-live.adyen.com/checkoutshopper/","live-us":"https://checkoutshopper-live-us.adyen.com/checkoutshopper/","live-au":"https://checkoutshopper-live-au.adyen.com/checkoutshopper/","live-apse":"https://checkoutshopper-live-apse.adyen.com/checkoutshopper/","live-in":"https://checkoutshopper-live-in.adyen.com/checkoutshopper/",fallback:"https://checkoutshopper-live.adyen.com/checkoutshopper/"},Ta={test:"https://checkoutshopper-test.cdn.adyen.com/checkoutshopper/",live:"https://checkoutshopper-live.cdn.adyen.com/checkoutshopper/","live-us":"https://checkoutshopper-live-us.cdn.adyen.com/checkoutshopper/","live-au":"https://checkoutshopper-live-au.cdn.adyen.com/checkoutshopper/","live-apse":"https://checkoutshopper-live-apse.cdn.adyen.com/checkoutshopper/","live-in":"https://checkoutshopper-live-in.cdn.adyen.com/checkoutshopper/",fallback:"https://checkoutshopper-live.cdn.adyen.com/checkoutshopper/"},Ud={test:"https://checkoutanalytics-test.adyen.com/checkoutanalytics/",live:"https://checkoutanalytics-live.adyen.com/checkoutanalytics/","live-us":"https://checkoutanalytics-live-us.adyen.com/checkoutanalytics/","live-au":"https://checkoutanalytics-live-au.adyen.com/checkoutanalytics/","live-apse":"https://checkoutanalytics-live-apse.adyen.com/checkoutanalytics/","live-in":"https://checkoutanalytics-live-in.adyen.com/checkoutanalytics/",fallback:"https://checkoutanalytics-live.adyen.com/checkoutanalytics/"};var Jo=(t,e,r)=>r||e[t?.toLowerCase()]||e.fallback,Vd=(t,e)=>({apiUrl:Jo(t,Bd,e?.api),analyticsUrl:Jo(t,Ud,e?.analytics),cdnImagesUrl:Jo(t,Ta,e?.cdn?.images),cdnTranslationsUrl:Jo(t,Ta,e?.cdn?.translations)});function Hd(t){return Object.keys(t).reduce((e,r)=>(Bl.includes(r)&&(e[r]=t[r]),e),{})}function Yd(t){let e=(r=>r)(["session","environment","_environmentUrls","showPayButton","clientKey","locale","translations","paymentMethodsResponse","amount","secondaryAmount","countryCode","allowPaymentMethods","removePaymentMethods","srConfig","analytics","risk","order","exposeLibraryMetadata","beforeRedirect","beforeSubmit","onPaymentCompleted","onPaymentFailed","onSubmit","onAdditionalDetails","onActionHandled","onChange","onError","onBalanceCheck","onOrderRequest","onPaymentMethodsRequest","onOrderCancel","onOrderUpdated","loadingContext","onEnterKeyPressed","afterAdditionalDetails"]);Object.keys(t).forEach(r=>{e.includes(r)||console.warn(`AdyenCheckout - Configuration property "${r}" is not a valid AdyenCheckout property. If it is a payment method configuration, make sure to pass it directly to the Component. If you are using Drop-in, make sure to pass it to "paymentMethodsConfiguration" object`)})}var Qu='WARNING: Failed to retrieve "checkoutAttemptId". Consequently, analytics will not be available for this payment. The payment process, however, will not be affected.',Kd=({analyticsContext:t,clientKey:e,locale:r,analyticsPath:o})=>{let n=null,a={errorLevel:"fatal",loadingContext:t,path:`${o}?clientKey=${e}`,errorMessage:Qu};return s=>{if(n!==null)return n;let l={version:Uo,buildType:"esm",channel:"Web",platform:"Web",locale:r,referrer:window.location.href,screenWidth:window.screen.width,...s};return n=q(a,l).then(c=>{if(c?.checkoutAttemptId)return c.checkoutAttemptId;throw new v("NETWORK_ERROR","Analytics: Attempt ID request was successfully but no ID was returned")}),n}};var Gd=({analyticsContext:t,clientKey:e,analyticsPath:r})=>{let o={channel:"Web",platform:"Web",info:[],errors:[],logs:[]};return{add:(n,a)=>{o[n].push(a)},run:n=>{let a=(s=>o.info.length||o.logs.length||o.errors.length?q({errorLevel:"silent",loadingContext:t,path:`${r}/${s}?clientKey=${e}`},o).then(()=>{}).catch(()=>{console.debug("### EventsQueue:::: send has failed")}):Promise.resolve(null))(n);return o.info=[],o.errors=[],o.logs=[],a},getQueue:()=>o}};function Qo(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var xa=class{get length(){return Object.keys(this.storage).length}key(e){return Object.keys(this.storage)[e]}getItem(e){return this.storage[e]||null}setItem(e,r){return this.storage[e]=r}removeItem(e){delete this.storage[e]}clear(){this.storage={}}constructor(){Qo(this,"storage",void 0),this.storage={}}},lr=class{get(){try{return JSON.parse(this.storage.getItem(this.key))}catch{return null}}set(e){this.storage.setItem(this.key,JSON.stringify(e))}remove(){this.storage.removeItem(this.key)}clear(){this.storage.clear()}keyByIndex(e){return this.storage.key(e)}get length(){return this.storage.length}constructor(e,r){Qo(this,"prefix","adyen-checkout__"),Qo(this,"key",void 0),Qo(this,"storage",void 0);try{if(this.storage=r?window[r]:window.localStorage,!this.storage)throw new Error("storage does not exist")}catch{this.storage=new xa}this.key=this.prefix+e}};var $r=null,Da=null,zd=({locale:t,clientKey:e,analytics:r,analyticsContext:o})=>{let n={enabled:!0,...r},a=n.enabled?Ko.all:Ko.initial,s=Kd({analyticsContext:o,clientKey:e,locale:t,analyticsPath:ca}),l=new lr("checkout-attempt-id","sessionStorage"),c=Gd({analyticsContext:o,clientKey:e,analyticsPath:ca}),u=()=>$r?c.run($r):Promise.resolve(null);return{setUp:async p=>{try{let d={checkoutStage:"checkout",...p},h=l.get(),m=(function(g){if(!g?.timestamp)return!1;let k=Date.now()-9e5;return g.timestamp>k})(h),{payload:y}=n,b=Jl(n.analyticsData),C=m?h.id:b?.checkoutAttemptId,f={...d,...y,...b,...C&&{checkoutAttemptId:C},level:a};$r=await s(f),l.set({id:$r,timestamp:m?h.timestamp:Date.now()})}catch(d){console.warn(d)}},getCheckoutAttemptId:()=>$r,getEventsQueue:()=>c,getEnabled:()=>n.enabled,flush:()=>{u()},sendAnalytics:p=>a!==Ko.all?!1:(((d,h)=>{let m=d===ke.info?d:`${d}s`;c.add(`${m}`,h),d===ke.info&&(clearTimeout(Da),Da=setTimeout(()=>{u()},Hl)),d!==ke.log&&d!==ke.error||(clearTimeout(Da),Vl(u)())})(p.getEventCategory(),p),!0)}};function Vt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var en=class{get(e,r){let o=Fl(this.translations,e,r);return o!==null?o:e}amount(e,r,o){return bd(e,this.locale,r,o)}date(e,r={}){if(e===void 0)return"";let o={year:"numeric",month:"2-digit",day:"2-digit",...r};return new Date(e).toLocaleDateString(this.locale,o)}dateTime(e){return e===void 0?"":this.timeAndDateFormatter.format(new Date(e))}constructor(e){Vt(this,"locale",void 0),Vt(this,"languageCode",void 0),Vt(this,"translations",void 0),Vt(this,"customTranslations",void 0),Vt(this,"timeFormatOptions",{hour:"numeric",minute:"numeric"}),Vt(this,"timeAndDateFormatOptions",{year:"numeric",month:"2-digit",day:"2-digit",...this.timeFormatOptions}),Vt(this,"timeAndDateFormatter",void 0);let{locale:r,translations:o,customTranslations:n}=e;if(!r)throw new v("IMPLEMENTATION_ERROR",'Language: "locale" property is not defined');this.locale=r,this.languageCode=this.locale.split("-")[0],this.customTranslations=n||{},this.timeAndDateFormatter=Intl.DateTimeFormat(this.locale,this.timeAndDateFormatOptions),this.translations={...o,...!!this.customTranslations[this.locale]&&this.customTranslations[this.locale]}}};var jd="1.0.0",$d="1.0.0",Ht="deviceFingerprint";var Wd={result:{type:Ht,value:"df-timedOut"},errorCode:"timeout"},Zd={UNKNOWN:"unknownError"},wa={timeout:"iframe loading timed out",wrongOrigin:"Result did not come from the expected origin",wrongDataType:"Result data was not of the expected type",missingProperty:"Result data did not contain the expected properties",unknownError:"An unknown error occurred"};function Ia(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var tn=class extends U{getDfpPromise(){return new Promise((e,r)=>{this.processMessageHandler=rr(this.postMessageDomain,e,r,Ht),window.addEventListener("message",this.processMessageHandler)})}componentDidMount(){this.deviceFingerPrintPromise=nr(2e4,this.getDfpPromise(),Wd),this.deviceFingerPrintPromise.promise.then(e=>{this.props.onCompleteFingerprint(e),window.removeEventListener("message",this.processMessageHandler)}).catch(e=>{this.props.onErrorFingerprint(e),window.removeEventListener("message",this.processMessageHandler)})}render({dfpURL:e}){return _("div",{className:"adyen-checkout-risk__device-fingerprint"},_(Je,{name:"dfIframe",src:e,allow:"geolocation; microphone; camera;",title:"devicefingerprinting iframe"}))}constructor(e){super(e),Ia(this,"postMessageDomain",void 0),Ia(this,"processMessageHandler",void 0),Ia(this,"deviceFingerPrintPromise",void 0),this.postMessageDomain=Vr(this.props.loadingContext)||this.props.loadingContext}};var qd=t=>({errorCode:t,message:wa[t]||wa[Zd.UNKNOWN],type:Ht});var Wr=class extends U{setStatusComplete(e){this.setState({status:"complete"},()=>{this.props.onComplete(e)})}render({loadingContext:e},{dfpURL:r}){return this.state.status==="retrievingFingerPrint"?_("div",{className:"adyen-checkout-risk__device-fingerprint--wrapper",style:{position:"absolute",width:0,height:0}},_(tn,{loadingContext:e,dfpURL:r,onCompleteFingerprint:o=>{this.setStatusComplete(o)},onErrorFingerprint:o=>{this.props.onError(qd(o.errorCode)),this.setStatusComplete(o.result)}})):null}constructor(e){super(e),e.clientKey&&(this.state={status:"retrievingFingerPrint",dfpURL:`${this.props.loadingContext}assets/html/${e.clientKey}/dfp.${$d}.html`})}},ka,Na,Oa;Oa={onComplete:()=>{},onError:()=>{}},(Na="defaultProps")in(ka=Wr)?Object.defineProperty(ka,Na,{value:Oa,enumerable:!0,configurable:!0,writable:!0}):ka[Na]=Oa;function dr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var cr=class t extends Qe{formatProps(e){return{...e,risk:{...t.defaultProps.risk,...e.risk}}}get isValid(){return this.state.isValid}get data(){if(this.isValid){let e={version:jd,...this.state.data};return ft.encode(JSON.stringify(e))}return!1}get enabled(){return this.props.risk.enabled}componentWillUnmount(){this.cleanUp()}render(){return _(Wr,{...this.props,loadingContext:this.props.loadingContext,onComplete:this.onComplete,onError:this.onError})}constructor(e,r){super(e,r),dr(this,"nodeRiskContainer",null),dr(this,"onComplete",n=>{let a={...this.state.data,[n.type]:n.value,persistentCookie:n.persistentCookie,components:n.components};this.setState({data:a,isValid:!0}),this.props.risk.onComplete(this.data),this.cleanUp()}),dr(this,"onError",n=>{this.props.risk.onError(n),this.cleanUp()}),dr(this,"cleanUp",()=>{this.nodeRiskContainer&&this.nodeRiskContainer.parentNode&&this.nodeRiskContainer.parentNode.removeChild(this.nodeRiskContainer)});let o={[Ht]:null};this.setState({data:o}),this.props.risk.enabled===!0&&(document.querySelector(this.props.risk.node)?(this.nodeRiskContainer=document.createElement("div"),document.querySelector(this.props.risk.node).appendChild(this.nodeRiskContainer),this.mount(this.nodeRiskContainer)):this.onError({message:"RiskModule node was not found"}))}};dr(cr,"type","risk"),dr(cr,"defaultProps",{risk:{enabled:!0,onComplete:()=>{},onError:()=>{},node:"body"}});function Ma(t){return!this.length||this.indexOf(t.type)>-1}function Fa(t){return!this.length||this.indexOf(t.type)<0}function Xd(t){return!!t&&!!t.supportedShopperInteractions&&t.supportedShopperInteractions.includes("Ecommerce")}var tp=["scheme","blik","twint","ach","cashapp","paybybank_AIS_DD","payto","paybybank_pix","eft_directdebit_CA"];function Jd(t){return!!t&&!!t.type&&tp.includes(t.type)}var rp=t=>({...t,storedPaymentMethodId:t.id,isStoredPaymentMethod:!0}),Qd=(t,{allowPaymentMethods:e=[],removePaymentMethods:r=[]})=>t?t.filter(Ma,e).filter(Fa,r):[],ec=(t,{allowPaymentMethods:e=[],removePaymentMethods:r=[]})=>t?t.filter(Jd).filter(Ma,e).filter(Fa,r).filter(Xd).map(rp):[],tc=t=>{if(typeof t=="string")throw new Error('paymentMethodsResponse was provided but of an incorrect type (should be an object but a string was provided).Try JSON.parse("{...}") your paymentMethodsResponse.');if(t instanceof Array)throw new Error("paymentMethodsResponse was provided but of an incorrect type (should be an object but an array was provided).Please check you are passing the whole response.");!t||t?.paymentMethods?.length||t?.storedPaymentMethods?.length||console.warn("paymentMethodsResponse was provided but no payment methods were found.")};function rc(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var rn=class{mapCreatedComponentType(e){return e==="card"?"scheme":e}has(e){return!!this.paymentMethods.find(r=>r.type===this.mapCreatedComponentType(e))}find(e){return this.paymentMethods.find(r=>r.type===this.mapCreatedComponentType(e))}constructor(e,r={}){rc(this,"paymentMethods",[]),rc(this,"storedPaymentMethods",[]),tc(e),this.paymentMethods=e?Qd(e.paymentMethods,r):[],this.storedPaymentMethods=e?ec(e.storedPaymentMethods,r):[]}};var La=(t,e,r,o)=>{let n=e.getComponent(r);if(!n)throw Error(`Action Element of type ${r} not found in the registry`);return new n(t,{...o,id:`${r}-${Qt()}`})},Zr=t=>(e,r,o,n)=>{let a={...n,...o,onError:n.onError,statusType:t,originalAction:o};return La(e,r,o.paymentMethodType,a)},oc={redirect:(t,e,r,o)=>{let n={...o,...r,statusType:"redirect",originalAction:r};return La(t,e,"redirect",n)},threeDS2:(t,e,r,o)=>{let n=r.subtype==="fingerprint"?"threeDS2DeviceFingerprint":"threeDS2Challenge",a=r.subtype==="fingerprint"||o.isMDFlow?r.paymentData:r.authorisationToken,s={core:t,token:r.token,paymentData:a,onActionHandled:o.onActionHandled,onComplete:o.onComplete,onError:o.onError,isDropin:!!o.isDropin,loadingContext:o.loadingContext,clientKey:o.clientKey,paymentMethodType:o.paymentMethodType,challengeWindowSize:o.challengeWindowSize,isMDFlow:o.isMDFlow,modules:{analytics:o.modules?.analytics,resources:o.modules?.resources},...hd(r.subtype,o)};return La(t,e,n,s)},voucher:Zr("custom"),qrCode:Zr("custom"),await:Zr("custom"),bankTransfer:Zr("custom"),sdk:Zr("custom")};function nc(t,e,r,o={}){let n=oc[r.type];if(n&&typeof n=="function")return n(t,e,r,o);throw new Error("Invalid Action")}function ac(t,e){let r=`${"v1"}/sessions/${e.id}/payments?clientKey=${e.clientKey}`,o={sessionData:e.data,...t};return q({loadingContext:e.loadingContext,path:r,errorLevel:"fatal",errorCode:_t.makePayments},o)}function sc(t,e){let r=`${"v1"}/sessions/${e.id}/paymentDetails?clientKey=${e.clientKey}`,o={...e.data&&{sessionData:e.data},...t};return q({loadingContext:e.loadingContext,path:r,errorLevel:"fatal",errorCode:_t.submitPaymentDetails},o)}function ic(t,e){let r=`${"v1"}/sessions/${t.id}/setup?clientKey=${t.clientKey}`,o={browserInfo:e.browserInfo,sessionData:t.data,...e.order?{order:{orderData:e.order.orderData,pspReference:e.order.pspReference}}:{}};return q({loadingContext:t.loadingContext,path:r,errorLevel:"fatal"},o)}function lc(t,e){let r=`${"v1"}/sessions/${e.id}/paymentMethodBalance?clientKey=${e.clientKey}`,o={sessionData:e.data,...t};return q({loadingContext:e.loadingContext,path:r,errorLevel:"fatal"},o)}function dc(t){let e=`${"v1"}/sessions/${t.id}/orders?clientKey=${t.clientKey}`,r={sessionData:t.data};return q({loadingContext:t.loadingContext,path:e,errorLevel:"fatal",errorCode:_t.createOrder},r)}function cc(t){if(!t||!t.id)throw new v("IMPLEMENTATION_ERROR","Invalid session");let{shopperLocale:e,shopperEmail:r,telephoneNumber:o,id:n}=t;return{id:n,...t.sessionData?{sessionData:t.sessionData}:{},...e&&{shopperLocale:e},...r&&{shopperEmail:r},...o&&{telephoneNumber:o}}}function uc(t,e){let r=`${"v1"}/sessions/${e.id}/orders/cancel?clientKey=${e.clientKey}`,o={sessionData:e.data,order:t};return q({loadingContext:e.loadingContext,path:r,errorLevel:"fatal"},o)}function qr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var on=class{get shopperLocale(){return this.session.shopperLocale}get id(){return this.session.id}get data(){return this.session.sessionData}updateSessionData(e){this.session.sessionData=e,this.storeSession()}setupSession(e){let r={...e,browserInfo:pt()};return ic(this,r).then(o=>(o.configuration&&(this.configuration={...o.configuration}),o.sessionData&&this.updateSessionData(o.sessionData),o))}submitPayment(e){return ac(e,this).then(r=>(r.sessionData&&this.updateSessionData(r.sessionData),r))}submitDetails(e){return sc(e,this).then(r=>(r.sessionData&&this.updateSessionData(r.sessionData),r))}checkBalance(e){return lc(e,this).then(r=>(r.sessionData&&this.updateSessionData(r.sessionData),r))}createOrder(){return dc(this).then(e=>(e.sessionData&&this.updateSessionData(e.sessionData),e))}cancelOrder(e){return uc(e.order,this).then(r=>(r.sessionData&&this.updateSessionData(r.sessionData),r))}getStoredSession(){let e=this.storage.get();return this.id===e?.id?e:this.session}storeSession(){this.storage.set({id:this.session.id,sessionData:this.session.sessionData})}removeStoredSession(){this.storage.remove()}constructor(e,r,o){qr(this,"session",void 0),qr(this,"storage",void 0),qr(this,"clientKey",void 0),qr(this,"loadingContext",void 0),qr(this,"configuration",void 0);let n=cc(e);if(!r)throw new Error("No clientKey available");if(!o)throw new Error("No loadingContext available");this.storage=new lr("session","localStorage"),this.clientKey=r,this.loadingContext=o,this.session=n,this.session.sessionData?this.storeSession():this.session=this.getStoredSession()}};function Ba(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var nn=class{getImage(e={}){return this.getImageUrl({...e,resourceContext:this.resourceContext})}constructor(e){if(Ba(this,"resourceContext",void 0),Ba(this,"returnImage",({name:r,resourceContext:o,imageFolder:n="",parentFolder:a="",extension:s,size:l="",subFolder:c=""})=>`${o}images/${n}${c}${a}${r}${l}.${s}`),Ba(this,"getImageUrl",({resourceContext:r,extension:o="svg",...n})=>a=>{let s={extension:o,resourceContext:r,imageFolder:"logos/",parentFolder:"",name:a,...n};return this.returnImage(s)}),!e)throw new v("IMPLEMENTATION_ERROR",'Resources module: "environmentsUrls.cdn" is not a valid URL');this.resourceContext=e}};function pc({setComponentRef:t}){let e=st({});Object.keys(e.current).length||t?.(e.current);let[r,o]=ge(null);return e.current.setMessages=n=>{o(n)},r?_(at,null,r.map(n=>_("div",{key:n,className:"adyen-checkout-sr-panel__msg"},n))):null}function He(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ur=class extends Qe{get enabled(){return this._enabled}get moveFocus(){return this._moveFocus}setAriaProps(e){let r=document.querySelector('[class^="adyen-checkout-sr-panel"]');for(let[o,n]of Object.entries(e))r.setAttribute(o,n);this.props={...this.props,ariaAttributes:{...this.props.ariaAttributes,...e}}}render(){return this.props.enabled?_("div",{className:this.showPanel?"adyen-checkout-sr-panel":"adyen-checkout-sr-panel--sr-only",role:"log",...this.props.ariaAttributes},_(pc,{setComponentRef:this.setComponentRef})):null}constructor(e,r){if(super(e,r),He(this,"srPanelContainer",null),He(this,"id",void 0),He(this,"showPanel",void 0),He(this,"_enabled",void 0),He(this,"_moveFocus",void 0),He(this,"componentRef",void 0),He(this,"setComponentRef",o=>{this.componentRef=o}),He(this,"setMessages",o=>{if(!this.props.enabled)return;let n=null;o&&(n=Array.isArray(o)?o:[o]),this.componentRef.setMessages(n)}),this.id=this.props.id,this.showPanel=!1,this._enabled=!1,this._moveFocus=this.props.moveFocus??!0,this.props.enabled){this._enabled=!0;let o=document.querySelector(this.props.node);if(!o)throw new Error("Component could not mount. Root node was not found.");{let n=document.getElementById(this.id);n&&o.removeChild(n),this.srPanelContainer=document.createElement("div"),this.srPanelContainer.className="sr-panel-holder",this.srPanelContainer.id=this.id,o.appendChild(this.srPanelContainer),this.mount(this.srPanelContainer)}}}};He(ur,"type","srPanel"),He(ur,"defaultProps",{enabled:!0,node:"body",showPanel:!1,id:"ariaLiveSRPanel",ariaAttributes:{"aria-relevant":"all","aria-live":"polite","aria-atomic":"true"}});function mc(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var op={[J.redirect]:vt,[J.threeDS2Challenge]:ar,[J.threeDS2DeviceFingerprint]:ir},pr=new class{add(...t){this.componentsMap={...this.componentsMap,...this.createComponentsMap(t)}}getComponent(t){return this.componentsMap[t]||(this.supportedTxVariants.has(t)?void 0:vt)}createComponentsMap(t){return t.reduce((e,r)=>{var o;return typeof(o=r).type=="string"&&o.type?(r.type==="dropin"||[r.type,...r.txVariants].filter(n=>n).forEach(n=>{e={...e,[n]:r}}),e):(console.error("CoreRegistry: Attempt to register Class failed. The Class is not a valid UIElement"),e)},{})}constructor(){mc(this,"componentsMap",op),mc(this,"supportedTxVariants",new Set(Object.values(J)))}};var hc="en-US";async function fc(t,e,r){try{return await la({loadingContext:t,errorLevel:"fatal",errorMessage:`Translations: Failed to fetch translations for locale "${r}"`,path:`sdk/${e}/translations/${r}.json`})}catch{return await la({loadingContext:t,errorLevel:"fatal",errorMessage:`Translations: Couldn't fetch translation for locale "${r}" nor the fallback translation "en-US"`,path:`sdk/${e}/translations/en-US.json`})}}var _c={exposeLibraryMetadata:!0,showPayButton:!0};function _e(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Et=class t{static setBundleType(e){t.metadata.bundleType=e}static register(...e){pr.add(...e)}register(...e){pr.add(...e)}getComponent(e){return pr.getComponent(e)}async initialize(){return await this.initializeCore(),this.validateCoreConfiguration(),await this.createCoreModules(),this}async initializeCore(){return this.session?this.session.setupSession(this.options).then(e=>{let{amount:r,shopperLocale:o,countryCode:n,paymentMethods:a,...s}=e;return this.setOptions({...s,amount:this.options.order?this.options.order.remainingAmount:r,locale:this.options.locale||o,countryCode:this.options.countryCode||n}),this.createPaymentMethodsList(a),this}).catch(e=>(this.options.onError&&this.options.onError(e),Promise.reject(e))):(this.createPaymentMethodsList(),Promise.resolve(this))}async fetchLocaleTranslations(){try{return await fc(this.cdnTranslationsUrl,t.metadata.version,this.options.locale)}catch(e){e instanceof v?this.options.onError?.(e):this.options.onError?.(new v("ERROR","Failed to fetch translation",{cause:e}))}}validateCoreConfiguration(){if(this.options.paymentMethodsConfiguration&&console.warn('WARNING: "paymentMethodsConfiguration" is supported only by Drop-in.'),!this.options.countryCode)throw new v(ta,"You must specify a countryCode when initializing checkout.");this.options.locale||this.setOptions({locale:hc}),this.options.locale=sa(this.options.locale),this.options.translations=Ml(this.options.translations)}submitDetails(e){let r=null;this.options.onAdditionalDetails&&(r=new Promise((o,n)=>{this.options.onAdditionalDetails({data:e},void 0,{resolve:o,reject:n})})),this.session&&(r=this.session.submitDetails(e).catch(o=>(this.options.onError?.(o),Promise.reject(o)))),r?r.then(et).then(tt).then(this.afterAdditionalDetails).then(o=>{er(o),this.options.onPaymentCompleted?.(o)}).catch(o=>{o instanceof ht||(er(o),this.options.onPaymentFailed?.(o))}):this.options.onError?.(new v("IMPLEMENTATION_ERROR",'It can not submit the details. The callback "onAdditionalDetails" or the Session is not setup correctly.'))}createFromAction(e,r={}){if(!e||!e.type)throw S(e,"action")&&S(e,"resultCode")?new Error('createFromAction::Invalid Action - the passed action object itself has an "action" property and a "resultCode": have you passed in the whole response object by mistake?'):new Error('createFromAction::Invalid Action - the passed action object does not have a "type" property');if(e.type){let o=e.type===Ae?`${e.type}${e.subtype}`:e.paymentMethodType,n=new me({type:Kl,subType:e.type,message:`${o} action was handled by the SDK`,component:o});this.modules.analytics.sendAnalytics(n);let a={...this.getCorePropsForComponent(),...r};return nc(this,pr,e,a)}return this.handleCreateError()}getCorePropsForComponent(){return{...Hd(this.options),core:this,i18n:this.modules.i18n,modules:this.modules,session:this.session,loadingContext:this.loadingContext,cdnContext:this.cdnImagesUrl,createFromAction:this.createFromAction}}storeElementReference(e){e&&this.components.push(e)}handleCreateError(e){let r=e?`${e?.name??"The passed payment method"} is not a valid Checkout Component. What was passed as a txVariant was: ${JSON.stringify(e)}. Check if this payment method is configured in the Backoffice or if the txVariant is a valid one`:"No Payment Method component was passed";throw new Error(r)}createPaymentMethodsList(e){this.paymentMethodsResponse=new rn(this.options.paymentMethodsResponse||e,this.options)}async createCoreModules(){if(this.modules)return;let e=await this.fetchLocaleTranslations();this.modules=Object.freeze({risk:new cr(this,{...this.options,loadingContext:this.loadingContext}),analytics:zd({analyticsContext:this.analyticsContext,clientKey:this.options.clientKey,locale:this.options.locale,analytics:this.options.analytics}),resources:new nn(this.cdnImagesUrl),i18n:new en({locale:this.options.locale,translations:e,customTranslations:this.options.translations}),srPanel:new ur(this,{...this.options.srConfig})})}constructor(e){_e(this,"session",void 0),_e(this,"paymentMethodsResponse",void 0),_e(this,"modules",void 0),_e(this,"options",void 0),_e(this,"analyticsContext",void 0),_e(this,"loadingContext",void 0),_e(this,"cdnImagesUrl",void 0),_e(this,"cdnTranslationsUrl",void 0),_e(this,"components",[]),_e(this,"afterAdditionalDetails",l=>{if(this.options.afterAdditionalDetails&&l?.action){let c=this.createFromAction(l.action);return this.options.afterAdditionalDetails(c),Promise.reject(new ht("Handled by afterAdditionalDetails"))}return Promise.resolve(l)}),_e(this,"update",(l={})=>(this.setOptions(l),this.initialize().then(()=>(this.components.forEach(c=>{let u={...l,...this.session&&{session:this.session}};c.update(u)}),this)))),_e(this,"remove",l=>(this.components=this.components.filter(c=>c._id!==l._id),l.unmount(),this)),_e(this,"setOptions",l=>{this.options={...this.options,...l,locale:l?.locale||this.options?.locale}}),Yd(e),this.createFromAction=this.createFromAction.bind(this),this.setOptions({..._c,...e});let{apiUrl:r,analyticsUrl:o,cdnImagesUrl:n,cdnTranslationsUrl:a}=Vd(this.options.environment,this.options._environmentUrls);this.loadingContext=r,this.analyticsContext=o,this.cdnImagesUrl=n,this.cdnTranslationsUrl=a,this.session=this.options.session&&new on(this.options.session,this.options.clientKey,this.loadingContext);let s=this.options.clientKey?.substring(0,4);if((s==="test"||s==="live")&&!this.loadingContext.includes(s))throw new v("IMPLEMENTATION_ERROR",`Error: you are using a ${s} clientKey against the ${this.options._environmentUrls?.api||this.options.environment} environment`);s==="pub."&&console.debug(`The value you are passing as your "clientKey" looks like an originKey (${this.options.clientKey?.substring(0,12)}..). Although this is supported it is not the recommended way to integrate. To generate a clientKey, see the documentation (https://docs.adyen.com/development-resources/client-side-authentication/migrate-from-origin-key-to-client-key/) for more details.`),this.options.exposeLibraryMetadata&&(window.AdyenWebMetadata=t.metadata)}};_e(Et,"metadata",{version:Uo,bundleType:"esm"}),_e(Et,"registry",pr);async function rt(t){return await new Et(t).initialize()}rt.register=(...t)=>{Et.register(...t)},rt.setBundleType=t=>{Et.setBundleType(t)};var np=()=>i("svg",{width:"21",height:"20",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("g",{"clip-path":"url(#clip0_10626_39119)"},i("path",{d:"M10.6641 7.5C11.3543 7.5 11.9141 6.94023 11.9141 6.25C11.9141 5.55977 11.3543 5 10.6641 5C9.97383 5 9.41406 5.55859 9.41406 6.25C9.41406 6.94141 9.97266 7.5 10.6641 7.5ZM12.2266 13.125H11.6016V9.6875C11.6016 9.17188 11.1836 8.75 10.6641 8.75H9.41406C8.89844 8.75 8.47656 9.17188 8.47656 9.6875C8.47656 10.2031 8.89844 10.625 9.41406 10.625H9.72656V13.125H9.10156C8.58594 13.125 8.16406 13.5469 8.16406 14.0625C8.16406 14.5781 8.58594 15 9.10156 15H12.2266C12.7441 15 13.1641 14.5801 13.1641 14.0625C13.1641 13.5449 12.7461 13.125 12.2266 13.125Z",fill:"currentColor"}),i("path",{opacity:"0.4",d:"M10.6641 0C5.14062 0 0.664062 4.47656 0.664062 10C0.664062 15.5234 5.14062 20 10.6641 20C16.1875 20 20.6641 15.5234 20.6641 10C20.6641 4.47656 16.1875 0 10.6641 0ZM10.6641 5C11.3543 5 11.9141 5.55977 11.9141 6.25C11.9141 6.94023 11.3543 7.5 10.6641 7.5C9.97383 7.5 9.41406 6.94141 9.41406 6.25C9.41406 5.55859 9.97266 5 10.6641 5ZM12.2266 15H9.10156C8.58594 15 8.16406 14.582 8.16406 14.0625C8.16406 13.543 8.58398 13.125 9.10156 13.125H9.72656V10.625H9.41406C8.89648 10.625 8.47656 10.2051 8.47656 9.6875C8.47656 9.16992 8.89844 8.75 9.41406 8.75H10.6641C11.1816 8.75 11.6016 9.16992 11.6016 9.6875V13.125H12.2266C12.7441 13.125 13.1641 13.5449 13.1641 14.0625C13.1641 14.5801 12.7461 15 12.2266 15Z",fill:"currentColor"})),i("defs",null,i("clipPath",{id:"clip0_10626_39119"},i("rect",{width:"20",height:"20",fill:"white",transform:"translate(0.664062)"})))),an=np;var ap=()=>i("svg",{width:"40",height:"40",viewBox:"0 0 40 40",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor"},i("g",{fill:"none","fill-rule":"evenodd"},i("g",{transform:"translate(2 2)","stroke-width":"4"},i("circle",{"stroke-opacity":".3",cx:"18",cy:"18",r:"18"}),i("path",{d:"M36 18c0-9.94-8.06-18-18-18"},i("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"}))))),Ye=ap;var sp=({color:t="var(--straumur__color-primary)"})=>i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"13",viewBox:"0 0 16 13",fill:"none"},i("path",{d:"M2 7L6 11L14 2",stroke:t,"stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"})),sn=sp;function yc({brand:t,brandName:e,isSelected:r,onBrandClick:o}){let n=a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),a.currentTarget.click())};return i("span",{className:"straumur__card-component__dual-branding--logo"+(r?" straumur__card-component__dual-branding--logo--selected":""),title:t,"data-value":t,onClick:o,onKeyDown:n,role:"radio","aria-checked":r,"aria-label":e??t,tabIndex:0},i("div",{className:"straumur__card-component__dual-branding--logo--item"},i(mo,{brand:t,defaultToBrandName:!1}),"\xA0",e??""),r&&i(sn,{color:"var(--straumur__color-neon-green-zeta)"}))}function gc({dualBrandConfiguration:t,selectedBrand:e,onBrandClick:r}){return i("div",{className:"straumur__card-component__dual-branding",role:"radiogroup","aria-label":"Card brand"},i(yc,{brand:t.brand1,brandName:t.brand1Name,isSelected:e===t.brand1,onBrandClick:r}),i(yc,{brand:t.brand2,brandName:t.brand2Name,isSelected:e===t.brand2,onBrandClick:r}))}var ip=["AuthenticationFinished","AuthenticationNotRequired","Authorised","Cancelled","ChallengeShopper","Error","IdentifyShopper","PartiallyAuthorised","Pending","PresentToShopper","Received","RedirectShopper","Refused"];function Ua(t){return t&&ip.includes(t)?t:"Error"}var be=class extends Error{messageKey;messageText;constructor(e,r){super(r??e),this.messageKey=e,this.messageText=r}};function Yt(t,e){return t instanceof be?t.messageText?{text:t.messageText}:{key:t.messageKey}:{key:e}}function Cc(t,e){return{async submitPayment(r){let o={...r,sessionId:e},n=await is(t,o);if(!n.ok)throw new be("error.failedToSubmitPayment");let a=await n.json();if(!a.resultCode)throw new be("error.paymentFailed");return{resultCode:a.resultCode,action:a.action}},async submitAdditionalDetails(r){let o={...r,sessionId:e},n=await ls(t,o);if(!n.ok)throw new be("error.failedToSubmitPaymentDetails");let a=await n.json();if(!a.resultCode)throw new be("error.paymentDetailsFailed");return{resultCode:a.resultCode,action:a.action}},async disableToken(r){let n=await ds(t,{storedPaymentMethodId:r,sessionId:e});if(!n.ok)throw new be("error.failedToSubmitRemoveStoredPaymentCard");if(!(await n.json()).success)throw new be("error.failedToRemoveStoredPaymentCard")}}}function vc(t){function e(n,a,s,l){let c=u=>s(u instanceof be?u:new be(l));try{Promise.resolve(n(a,s)).catch(c)}catch(u){c(u)}}let r={submitPayment(n){return new Promise((a,s)=>{e((l,c)=>t.onSubmit({data:n},{resolve:l,reject:u=>c(new be("error.failedToSubmitPayment",u))}),a,s,"error.failedToSubmitPayment")})},submitAdditionalDetails(n){return new Promise((a,s)=>{e((l,c)=>t.onAdditionalDetails({data:n},{resolve:l,reject:u=>c(new be("error.failedToSubmitPaymentDetails",u))}),a,s,"error.failedToSubmitPaymentDetails")})},beforeSubmit:t.onBeforeSubmit},{onDisableToken:o}=t;return o&&(r.disableToken=n=>new Promise((a,s)=>{e((l,c)=>o({storedPaymentMethodId:n},{resolve:()=>l(),reject:()=>c(new be("error.failedToRemoveStoredPaymentCard"))}),a,s,"error.failedToSubmitRemoveStoredPaymentCard")})),r}async function Xr(t){let{beforeSubmit:e}=t;return!e||await e()}async function ln(t,e){e()&&await Xr(t)&&e()?.submit()}function Va(t){return(e,r)=>{let{beforeSubmit:o}=t;if(!o){e();return}let n=o();if(n instanceof Promise){n.then(a=>a?e():r()).catch(()=>r());return}if(n){e();return}r()}}var lp=["Refused","Cancelled","Error"];function mr(t,e){let{configuration:r,handleSuccess:o,handleError:n,failureMessage:a}=e;t==="Authorised"?o({key:"success.paymentAuthorized"}):n(a?{text:a}:{key:"error.paymentUnsuccessful"}),lp.includes(t)?r.onPaymentFailed?.({resultCode:t}):r.onPaymentCompleted?.({resultCode:t})}function hr(t){let{configuration:e,handleSuccess:r,handleError:o,setThreeDSecureActive:n,enrichSubmitData:a,onSubmitStart:s,dispatchResultFromAdditionalDetails:l}=t,c;function u(y){mr(y,{configuration:e,handleSuccess:r,handleError:o,failureMessage:c})}async function p(y,b,C){s?.();let{paymentFlow:f}=e;if(!await Xr(f)){C.reject();return}try{let g=a?a(y.data):y.data,{resultCode:k,action:E,errorMessage:H}=await f.submitPayment(g);c=H,(k==="ChallengeShopper"||k==="IdentifyShopper")&&n(!0),C.resolve({resultCode:k,action:E})}catch(g){C.reject(),o(Yt(g,"error.failedToSubmitPayment"))}}async function d(y,b,C){try{let{resultCode:f,action:g,errorMessage:k}=await e.paymentFlow.submitAdditionalDetails(y.data);c=k,C.resolve({resultCode:f,action:g}),l&&u(f)}catch(f){C.reject(),o(Yt(f,"error.failedToSubmitPaymentDetails")),l&&e.onPaymentFailed?.({resultCode:"Error"})}}function h(y,b){u(Ua(y.resultCode))}function m(y,b){u(y?Ua(y.resultCode):"Error")}return{handleOnSubmit:p,handleOnSubmitAdditionalData:d,handlePaymentCompleted:h,handlePaymentFailed:m}}function fr(t,e,r){ne(()=>{e()&&r()},[t])}function dn(t,e){ne(()=>{e&&t.current?.focus()},[e,t])}var bc="(prefers-color-scheme: dark)";function dp(){return typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia(bc).matches:!1}function Ke(t){let[e,r]=T(dp);return ne(()=>{if(t!=="system"||typeof window>"u"||typeof window.matchMedia!="function")return;let o=window.matchMedia(bc),n=a=>r(a.matches);return r(o.matches),o.addEventListener("change",n),()=>o.removeEventListener("change",n)},[t]),t==="system"?e?"dark":"light":t}function cn(t){return t==="dark"?{base:{color:"#e8edf2"},placeholder:{color:"#aab4bf"},error:{color:"#e08a8a"}}:{base:{color:"#00112c"},placeholder:{color:"#72889d"},error:{color:"#d96666"}}}function cp({configuration:t,paymentMethods:e,onBrandHidden:r}){let o=pe(null),n=pe(),a=pe(),{i18n:s}=ye(),[l,c]=T(!0),[u,p]=T("required"),[d,h]=T(!1),[m,y]=T(!1),[b,C]=T(null),[f,g]=T(null),k=pe(!1),[E,H]=T({encryptedCardNumber:{visible:!1},encryptedExpiryDate:{visible:!1},encryptedSecurityCode:{visible:!1}}),{activePaymentMethod:Y,isPaymentMethodInitialized:$,updatePaymentMethodInitialization:ee,handleSuccess:M,handleError:F,setThreeDSecureActive:L,threeDSecureActive:te,isObscuredByThreeDS:Se,hasCard:St,registerSubmitHandler:ot,unregisterSubmitHandler:Kt}=Z(),ae=Ke(t.theme);async function ze(){await ln(t.paymentFlow,()=>a.current)}ne(()=>{if(!(Y==="card"&&$.card&&!te)){t.onCardValidityChanged?.(!1,!1);return}return ot(ze),t.onCardValidityChanged?.(!1,!0),()=>{Kt(ze),t.onCardValidityChanged?.(!1,!1)}},[Y,$.card,te,ot,Kt]);let je=e.paymentMethods?.paymentMethods?.find(N=>N.type==="scheme")?.brands??[],{handleOnSubmit:Cn,handleOnSubmitAdditionalData:Jr,handlePaymentCompleted:vn,handlePaymentFailed:bn}=hr({configuration:t,handleSuccess:M,handleError:F,setThreeDSecureActive:L,enrichSubmitData:N=>({...N,storePaymentMethod:k.current})});function En(N,re){F({key:"error.unknownError"})}let Qr=async()=>{a.current?.remove(),n.current=await rt({clientKey:e.clientKey,environment:t.environment,locale:t.locale,countryCode:t.countryCode,paymentMethodsResponse:e.paymentMethods,amount:{value:e.minorUnitsAmount,currency:e.currency},onSubmit:Cn,onAdditionalDetails:Jr,onError:En,onPaymentCompleted:vn,onPaymentFailed:bn}),a.current=new Ve(n.current,{brands:je,placeholders:t.placeholders,styles:cn(ae),challengeWindowSize:"05",onBinLookup:N=>{N.supportedBrandsRaw&&N.supportedBrandsRaw.length>1&&(y(!0),C({brand1:N.supportedBrandsRaw[0].brand,brand1Name:N.supportedBrandsRaw[0].localeBrand,brand1ImageUrl:N.supportedBrandsRaw[0].brandImageUrl,brand2:N.supportedBrandsRaw[1].brand,brand2Name:N.supportedBrandsRaw[1].localeBrand,brand2ImageUrl:N.supportedBrandsRaw[1].brandImageUrl}))},onBrand:N=>{if(p(N.cvcPolicy),N.brand==="card"){r([]),g(null);return}let re=je.filter(se=>se!==N.brand).map(se=>({brand:se}));r(re),je.filter(se=>se===N.brand).map(se=>({brand:se})).length===1&&g(N.brand)},onConfigSuccess(){ee("card",!0)},onValidationError:N=>{let re={encryptedCardNumber:{visible:!1,message:void 0},encryptedExpiryDate:{visible:!1,message:void 0},encryptedSecurityCode:{visible:!1,message:void 0}};N.filter(se=>se.error).forEach(se=>{re[se.fieldType].visible=!0,re[se.fieldType].message=se.errorI18n}),H(re)},onAllValid:N=>{c(!N.allValid),t.onCardValidityChanged?.(N.allValid,!0)}}),o.current&&a.current.mount(o.current)};ne(()=>{St&&Y==="card"&&!$.card&&Qr()},[t,Y]),fr(t,()=>!!(a.current&&$.card),()=>{Qr(),H({encryptedCardNumber:{visible:!1,message:void 0},encryptedExpiryDate:{visible:!1,message:void 0},encryptedSecurityCode:{visible:!1,message:void 0}})}),ne(()=>{k.current=d},[d]);function Ga(N){a.current.dualBrandingChangeHandler(N)}function Sn(N){h(N.currentTarget.checked)}return dn(o,te&&Y==="card"),!St||Se("card")||e.paymentMethods?.paymentMethods?.length===0?null:i("div",{className:"straumur__card-component__expandable",ref:o,tabIndex:-1,style:{height:te?"600px":"auto",minWidth:te?"350px":"auto"}},!$.card&&i("div",{className:"straumur__card-component__loading-text"},i(Ye,null)),i("div",{className:"straumur__card-component__form",style:{opacity:$.card&&!te?1:0,position:$.card&&!te?"relative":"absolute",transition:"opacity 0.3s ease-in-out"}},i("div",{className:"straumur__card-component__form--wrapper"},i("label",{className:`straumur__card-component__form--wrapper--label ${E.encryptedCardNumber.visible?"straumur__card-component__form--wrapper--label--error":""}`},s.t("cards.cardNumber")),i("span",{className:`straumur__card-component__form--wrapper--input ${E.encryptedCardNumber.visible?"straumur__card-component__form--wrapper--input--error":""}`,"data-cse":"encryptedCardNumber",role:"group","aria-label":s.t("cards.cardNumber")}),E.encryptedCardNumber.visible&&i("span",{className:"straumur__card-component__form--wrapper--error"},E.encryptedCardNumber.message)),i("div",{className:"straumur__card-component__form--field-wrapper"},i("div",{className:"straumur__card-component__form--wrapper"},i("label",{className:`straumur__card-component__form--wrapper--label ${E.encryptedExpiryDate.visible?"straumur__card-component__form--wrapper--label--error":""}`},s.t("cards.expiryDate")),i("span",{className:`straumur__card-component__form--wrapper--input ${E.encryptedExpiryDate.visible?"straumur__card-component__form--wrapper--input--error":""}`,"data-cse":"encryptedExpiryDate",role:"group","aria-label":s.t("cards.expiryDate")}),E.encryptedExpiryDate.visible&&i("span",{className:"straumur__card-component__form--wrapper--error"},E.encryptedExpiryDate.message)),i("div",{className:"straumur__card-component__form--wrapper"},(u==="optional"||u==="required")&&i(ie,null,i("label",{className:`straumur__card-component__form--wrapper--label ${E.encryptedSecurityCode.visible?"straumur__card-component__form--wrapper--label--error":""}`},u==="optional"?s.t("cards.securityCode3DigitsOptional"):s.t("cards.securityCode3Digits")),i("span",{className:`straumur__card-component__form--wrapper--input ${E.encryptedSecurityCode.visible?"straumur__card-component__form--wrapper--input--error":""}`,"data-cse":"encryptedSecurityCode",role:"group","aria-label":s.t("cards.securityCode3Digits")}),E.encryptedSecurityCode.visible&&i("span",{className:"straumur__card-component__form--wrapper--error"},E.encryptedSecurityCode.message),i("div",{className:"straumur__card-component__form--wrapper--label--info"},i(jt,{content:i("span",null,s.t("cards.securityCode3DigitsInfo")),placement:"top"},i(an,null)))))),m&&b&&i(gc,{dualBrandConfiguration:b,selectedBrand:f,onBrandClick:Ga}),e.enableStoreDetails==="AskForConsent"&&i("label",{className:"straumur__card-component__form--wrapper--label-checkbox"},i("div",{className:`straumur__card-component__form--wrapper--label-checkbox--checkmark ${d?"straumur__card-component__form--wrapper--label-checkbox--checkmark--checked":""}`},i("div",{className:`straumur__card-component__form--wrapper--label-checkbox--checkmark--icon ${d?"straumur__card-component__form--wrapper--label-checkbox--checkmark--icon--checked":""}`},i(sn,{color:"var(--straumur__color-on-primary)"}))),i("input",{type:"checkbox",className:"straumur__card-component__form--wrapper--label-checkbox--checkbox",checked:d,onChange:Sn}),s.t("cards.storePaymentMethod")),!t.hideSubmitButton&&i("button",{className:"straumur__card-component__submit-button",disabled:l,onClick:ze},e.minorUnitsAmount===0?s.t("cards.saveCardDetails"):e.formattedAmount)))}var Ec=cp;O(`.straumur__payment-method-item{position:relative;cursor:pointer;background:var(--straumur__color-white);border-radius:var(--straumur__border-radius-lg);transition:all .3s ease;padding:var(--straumur__space-xxlg) var(--straumur__space-5xlg)}.straumur__payment-method-item--sole{cursor:default}.straumur__payment-method-item:has(.straumur__payment-method-item__radio-selector:checked){cursor:default}.straumur__payment-method-item__radio-selector{position:absolute;opacity:0;cursor:pointer}.straumur__payment-method-item__content{display:flex;align-items:center;gap:var(--straumur__space-lg);transition:background-color .3s ease}.straumur__payment-method-item__radio-selector:checked+.straumur__payment-method-item__content{padding-bottom:var(--straumur__space-xxlg)}.straumur__payment-method-item__content--expanded{padding-bottom:var(--straumur__space-xxlg)}.straumur__payment-method-item--circle{width:var(--straumur__space-5xlg);height:var(--straumur__space-5xlg);border:1px solid var(--straumur__color-cosmos-blue-gamma);background:var(--straumur__color-secondary-gamma);border-radius:50%;position:relative;transition:all .3s ease;flex-shrink:0}.straumur__payment-method-item__content:hover .straumur__payment-method-item--circle{border:1px solid var(--straumur__color-cosmos-blue-delta)}.straumur__payment-method-item--circle:after{content:"";position:absolute;width:100%;height:100%;border-radius:50%;top:50%;left:50%;transform:translate(-50%,-50%) scale(0);transition:transform .2s ease}.straumur__payment-method-item__radio-selector:checked+.straumur__payment-method-item__content .straumur__payment-method-item--circle{background:var(--straumur__color-primary);border-color:var(--straumur__color-transparent)}.straumur__payment-method-item__radio-selector:checked+.straumur__payment-method-item__content .straumur__payment-method-item--circle:after{transform:translate(-50%,-50%) scale(1);background:var(--straumur__color-on-primary);height:var(--straumur__space-md);width:var(--straumur__space-md)}.straumur__payment-method-item--title{color:var(--straumur__color-text);font-size:16px;user-select:none}.straumur__payment-method-item__expandable{background:var(--straumur__color-white);max-height:0;overflow:hidden;transition:all .3s ease;opacity:0}.straumur__payment-method-item__radio-selector:checked~.straumur__payment-method-item__expandable{max-height:600px;opacity:1}.straumur__payment-method-item__expandable--visible{max-height:600px;opacity:1}
|
|
8
|
-
`);function
|
|
9
|
-
`);var
|
|
10
|
-
`);var
|
|
11
|
-
`);function
|
|
12
|
-
`);var
|
|
13
|
-
`);var
|
|
14
|
-
`);function
|
|
15
|
-
`);
|
|
16
|
-
`);var
|
|
17
|
-
`);var
|
|
18
|
-
`);
|
|
1
|
+
"use strict";var StraumurWeb=(()=>{var xn=Object.defineProperty;var qc=Object.getOwnPropertyDescriptor;var Xc=Object.getOwnPropertyNames;var Jc=Object.prototype.hasOwnProperty;var Qc=(t,e)=>{for(var r in e)xn(t,r,{get:e[r],enumerable:!0})},eu=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Xc(e))!Jc.call(t,n)&&n!==r&&xn(t,n,{get:()=>e[n],enumerable:!(o=qc(e,n))||o.enumerable});return t};var tu=t=>eu(xn({},"__esModule",{value:!0}),t);var Wp={};Qc(Wp,{StraumurCheckout:()=>Zc});var io,V,Ja,ru,At,Za,Qa,es,ts,Nn,Dn,wn,rs,vr={},os=[],ou=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,lo=Array.isArray;function We(t,e){for(var r in e)t[r]=e[r];return t}function On(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function i(t,e,r){var o,n,a,s={};for(a in e)a=="key"?o=e[a]:a=="ref"?n=e[a]:s[a]=e[a];if(arguments.length>2&&(s.children=arguments.length>3?io.call(arguments,2):r),typeof t=="function"&&t.defaultProps!=null)for(a in t.defaultProps)s[a]===void 0&&(s[a]=t.defaultProps[a]);return no(t,s,o,n,null)}function no(t,e,r,o,n){var a={type:t,props:e,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:n??++Ja,__i:-1,__u:0};return n==null&&V.vnode!=null&&V.vnode(a),a}function ie(t){return t.children}function ao(t,e){this.props=t,this.context=e}function $t(t,e){if(e==null)return t.__?$t(t.__,t.__i+1):null;for(var r;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null)return r.__e;return typeof t.type=="function"?$t(t):null}function ns(t){var e,r;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null){t.__e=t.__c.base=r.__e;break}return ns(t)}}function In(t){(!t.__d&&(t.__d=!0)&&At.push(t)&&!so.__r++||Za!=V.debounceRendering)&&((Za=V.debounceRendering)||Qa)(so)}function so(){for(var t,e,r,o,n,a,s,l=1;At.length;)At.length>l&&At.sort(es),t=At.shift(),l=At.length,t.__d&&(r=void 0,o=void 0,n=(o=(e=t).__v).__e,a=[],s=[],e.__P&&((r=We({},o)).__v=o.__v+1,V.vnode&&V.vnode(r),Mn(e.__P,r,o,e.__n,e.__P.namespaceURI,32&o.__u?[n]:null,a,n??$t(o),!!(32&o.__u),s),r.__v=o.__v,r.__.__k[r.__i]=r,is(a,r,s),o.__e=o.__=null,r.__e!=n&&ns(r)));so.__r=0}function as(t,e,r,o,n,a,s,l,c,u,p){var d,h,m,C,g,v,f,y=o&&o.__k||os,I=e.length;for(c=nu(r,e,y,c,I),d=0;d<I;d++)(m=r.__k[d])!=null&&(h=m.__i==-1?vr:y[m.__i]||vr,m.__i=d,v=Mn(t,m,h,n,a,s,l,c,u,p),C=m.__e,m.ref&&h.ref!=m.ref&&(h.ref&&Fn(h.ref,null,m),p.push(m.ref,m.__c||C,m)),g==null&&C!=null&&(g=C),(f=!!(4&m.__u))||h.__k===m.__k?c=ss(m,c,t,f):typeof m.type=="function"&&v!==void 0?c=v:C&&(c=C.nextSibling),m.__u&=-7);return r.__e=g,c}function nu(t,e,r,o,n){var a,s,l,c,u,p=r.length,d=p,h=0;for(t.__k=new Array(n),a=0;a<n;a++)(s=e[a])!=null&&typeof s!="boolean"&&typeof s!="function"?(typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?s=t.__k[a]=no(null,s,null,null,null):lo(s)?s=t.__k[a]=no(ie,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=t.__k[a]=no(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):t.__k[a]=s,c=a+h,s.__=t,s.__b=t.__b+1,l=null,(u=s.__i=au(s,r,c,d))!=-1&&(d--,(l=r[u])&&(l.__u|=2)),l==null||l.__v==null?(u==-1&&(n>p?h--:n<p&&h++),typeof s.type!="function"&&(s.__u|=4)):u!=c&&(u==c-1?h--:u==c+1?h++:(u>c?h--:h++,s.__u|=4))):t.__k[a]=null;if(d)for(a=0;a<p;a++)(l=r[a])!=null&&(2&l.__u)==0&&(l.__e==o&&(o=$t(l)),ds(l,l));return o}function ss(t,e,r,o){var n,a;if(typeof t.type=="function"){for(n=t.__k,a=0;n&&a<n.length;a++)n[a]&&(n[a].__=t,e=ss(n[a],e,r,o));return e}t.__e!=e&&(o&&(e&&t.type&&!e.parentNode&&(e=$t(t)),r.insertBefore(t.__e,e||null)),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function au(t,e,r,o){var n,a,s,l=t.key,c=t.type,u=e[r],p=u!=null&&(2&u.__u)==0;if(u===null&&l==null||p&&l==u.key&&c==u.type)return r;if(o>(p?1:0)){for(n=r-1,a=r+1;n>=0||a<e.length;)if((u=e[s=n>=0?n--:a++])!=null&&(2&u.__u)==0&&l==u.key&&c==u.type)return s}return-1}function qa(t,e,r){e[0]=="-"?t.setProperty(e,r??""):t[e]=r==null?"":typeof r!="number"||ou.test(e)?r:r+"px"}function oo(t,e,r,o,n){var a,s;e:if(e=="style")if(typeof r=="string")t.style.cssText=r;else{if(typeof o=="string"&&(t.style.cssText=o=""),o)for(e in o)r&&e in r||qa(t.style,e,"");if(r)for(e in r)o&&r[e]==o[e]||qa(t.style,e,r[e])}else if(e[0]=="o"&&e[1]=="n")a=e!=(e=e.replace(ts,"$1")),s=e.toLowerCase(),e=s in t||e=="onFocusOut"||e=="onFocusIn"?s.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+a]=r,r?o?r.u=o.u:(r.u=Nn,t.addEventListener(e,a?wn:Dn,a)):t.removeEventListener(e,a?wn:Dn,a);else{if(n=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&r==1?"":r))}}function Xa(t){return function(e){if(this.l){var r=this.l[e.type+t];if(e.t==null)e.t=Nn++;else if(e.t<r.u)return;return r(V.event?V.event(e):e)}}}function Mn(t,e,r,o,n,a,s,l,c,u){var p,d,h,m,C,g,v,f,y,I,E,K,F,W,ne,L,B,U=e.type;if(e.constructor!==void 0)return null;128&r.__u&&(c=!!(32&r.__u),a=[l=e.__e=r.__e]),(p=V.__b)&&p(e);e:if(typeof U=="function")try{if(f=e.props,y="prototype"in U&&U.prototype.render,I=(p=U.contextType)&&o[p.__c],E=p?I?I.props.value:p.__:o,r.__c?v=(d=e.__c=r.__c).__=d.__E:(y?e.__c=d=new U(f,E):(e.__c=d=new ao(f,E),d.constructor=U,d.render=iu),I&&I.sub(d),d.state||(d.state={}),d.__n=o,h=d.__d=!0,d.__h=[],d._sb=[]),y&&d.__s==null&&(d.__s=d.state),y&&U.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=We({},d.__s)),We(d.__s,U.getDerivedStateFromProps(f,d.__s))),m=d.props,C=d.state,d.__v=e,h)y&&U.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),y&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(y&&U.getDerivedStateFromProps==null&&f!==m&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(f,E),e.__v==r.__v||!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(f,d.__s,E)===!1){for(e.__v!=r.__v&&(d.props=f,d.state=d.__s,d.__d=!1),e.__e=r.__e,e.__k=r.__k,e.__k.some(function(q){q&&(q.__=e)}),K=0;K<d._sb.length;K++)d.__h.push(d._sb[K]);d._sb=[],d.__h.length&&s.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(f,d.__s,E),y&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(m,C,g)})}if(d.context=E,d.props=f,d.__P=t,d.__e=!1,F=V.__r,W=0,y){for(d.state=d.__s,d.__d=!1,F&&F(e),p=d.render(d.props,d.state,d.context),ne=0;ne<d._sb.length;ne++)d.__h.push(d._sb[ne]);d._sb=[]}else do d.__d=!1,F&&F(e),p=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++W<25);d.state=d.__s,d.getChildContext!=null&&(o=We(We({},o),d.getChildContext())),y&&!h&&d.getSnapshotBeforeUpdate!=null&&(g=d.getSnapshotBeforeUpdate(m,C)),L=p,p!=null&&p.type===ie&&p.key==null&&(L=ls(p.props.children)),l=as(t,lo(L)?L:[L],e,r,o,n,a,s,l,c,u),d.base=e.__e,e.__u&=-161,d.__h.length&&s.push(d),v&&(d.__E=d.__=null)}catch(q){if(e.__v=null,c||a!=null)if(q.then){for(e.__u|=c?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;a[a.indexOf(l)]=null,e.__e=l}else{for(B=a.length;B--;)On(a[B]);kn(e)}else e.__e=r.__e,e.__k=r.__k,q.then||kn(e);V.__e(q,e,r)}else a==null&&e.__v==r.__v?(e.__k=r.__k,e.__e=r.__e):l=e.__e=su(r.__e,e,r,o,n,a,s,c,u);return(p=V.diffed)&&p(e),128&e.__u?void 0:l}function kn(t){t&&t.__c&&(t.__c.__e=!0),t&&t.__k&&t.__k.forEach(kn)}function is(t,e,r){for(var o=0;o<r.length;o++)Fn(r[o],r[++o],r[++o]);V.__c&&V.__c(e,t),t.some(function(n){try{t=n.__h,n.__h=[],t.some(function(a){a.call(n)})}catch(a){V.__e(a,n.__v)}})}function ls(t){return typeof t!="object"||t==null||t.__b&&t.__b>0?t:lo(t)?t.map(ls):We({},t)}function su(t,e,r,o,n,a,s,l,c){var u,p,d,h,m,C,g,v=r.props||vr,f=e.props,y=e.type;if(y=="svg"?n="http://www.w3.org/2000/svg":y=="math"?n="http://www.w3.org/1998/Math/MathML":n||(n="http://www.w3.org/1999/xhtml"),a!=null){for(u=0;u<a.length;u++)if((m=a[u])&&"setAttribute"in m==!!y&&(y?m.localName==y:m.nodeType==3)){t=m,a[u]=null;break}}if(t==null){if(y==null)return document.createTextNode(f);t=document.createElementNS(n,y,f.is&&f),l&&(V.__m&&V.__m(e,a),l=!1),a=null}if(y==null)v===f||l&&t.data==f||(t.data=f);else{if(a=a&&io.call(t.childNodes),!l&&a!=null)for(v={},u=0;u<t.attributes.length;u++)v[(m=t.attributes[u]).name]=m.value;for(u in v)if(m=v[u],u!="children"){if(u=="dangerouslySetInnerHTML")d=m;else if(!(u in f)){if(u=="value"&&"defaultValue"in f||u=="checked"&&"defaultChecked"in f)continue;oo(t,u,null,m,n)}}for(u in f)m=f[u],u=="children"?h=m:u=="dangerouslySetInnerHTML"?p=m:u=="value"?C=m:u=="checked"?g=m:l&&typeof m!="function"||v[u]===m||oo(t,u,m,v[u],n);if(p)l||d&&(p.__html==d.__html||p.__html==t.innerHTML)||(t.innerHTML=p.__html),e.__k=[];else if(d&&(t.innerHTML=""),as(e.type=="template"?t.content:t,lo(h)?h:[h],e,r,o,y=="foreignObject"?"http://www.w3.org/1999/xhtml":n,a,s,a?a[0]:r.__k&&$t(r,0),l,c),a!=null)for(u=a.length;u--;)On(a[u]);l||(u="value",y=="progress"&&C==null?t.removeAttribute("value"):C!=null&&(C!==t[u]||y=="progress"&&!C||y=="option"&&C!=v[u])&&oo(t,u,C,v[u],n),u="checked",g!=null&&g!=t[u]&&oo(t,u,g,v[u],n))}return t}function Fn(t,e,r){try{if(typeof t=="function"){var o=typeof t.__u=="function";o&&t.__u(),o&&e==null||(t.__u=t(e))}else t.current=e}catch(n){V.__e(n,r)}}function ds(t,e,r){var o,n;if(V.unmount&&V.unmount(t),(o=t.ref)&&(o.current&&o.current!=t.__e||Fn(o,null,e)),(o=t.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(a){V.__e(a,e)}o.base=o.__P=null}if(o=t.__k)for(n=0;n<o.length;n++)o[n]&&ds(o[n],e,r||typeof t.type!="function");r||On(t.__e),t.__c=t.__=t.__e=void 0}function iu(t,e,r){return this.constructor(t,r)}function Wt(t,e,r){var o,n,a,s;e==document&&(e=document.documentElement),V.__&&V.__(t,e),n=(o=typeof r=="function")?null:r&&r.__k||e.__k,a=[],s=[],Mn(e,t=(!o&&r||e).__k=i(ie,null,[t]),n||vr,vr,e.namespaceURI,!o&&r?[r]:n?null:e.firstChild?io.call(e.childNodes):null,a,!o&&r?r:n?n.__e:e.firstChild,o,s),is(a,t,s)}function co(t){function e(r){var o,n;return this.getChildContext||(o=new Set,(n={})[e.__c]=this,this.getChildContext=function(){return n},this.componentWillUnmount=function(){o=null},this.shouldComponentUpdate=function(a){this.props.value!=a.value&&o.forEach(function(s){s.__e=!0,In(s)})},this.sub=function(a){o.add(a);var s=a.componentWillUnmount;a.componentWillUnmount=function(){o&&o.delete(a),s&&s.call(a)}}),r.children}return e.__c="__cC"+rs++,e.__=t,e.Provider=e.__l=(e.Consumer=function(r,o){return r.children(o)}).contextType=e,e}io=os.slice,V={__e:function(t,e,r,o){for(var n,a,s;e=e.__;)if((n=e.__c)&&!n.__)try{if((a=n.constructor)&&a.getDerivedStateFromError!=null&&(n.setState(a.getDerivedStateFromError(t)),s=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(t,o||{}),s=n.__d),s)return n.__E=n}catch(l){t=l}throw t}},Ja=0,ru=function(t){return t!=null&&t.constructor===void 0},ao.prototype.setState=function(t,e){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=We({},this.state),typeof t=="function"&&(t=t(We({},r),this.props)),t&&We(r,t),t!=null&&this.__v&&(e&&this._sb.push(e),In(this))},ao.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),In(this))},ao.prototype.render=ie,At=[],Qa=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,es=function(t,e){return t.__v.__b-e.__v.__b},so.__r=0,ts=/(PointerCapture)$|Capture$/i,Nn=0,Dn=Xa(!1),wn=Xa(!0),rs=0;function N(t,{insertAt:e}={}){if(!t||typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",e==="top"&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}N(`:root{--straumur__color-primary: #002649;--straumur__color-secondary: #72889d;--straumur__color-secondary-gamma: #eef0f2;--straumur__color-blue-beta: #bce6f3;--straumur__color-blue-gamma: #eff8fa;--straumur__color-neon-green-zeta: #88a64e;--straumur__color-red-beta: #d96666;--straumur__color-red-gamma: #fff8f5;--straumur__color-gray-epsilon: #e7e7e7;--straumur__color-cosmos-blue-delta: #cdd8e2;--straumur__color-cosmos-blue-gamma: #e6ebef;--straumur__color-white: #ffffff;--straumur__color-transparent: transparent;--straumur__color-brand-chip: #ffffff;--straumur__color-on-primary: var(--straumur__color-white);--straumur__color-text: #00112c;--straumur__color-border: #dbdee2;--straumur__color-warning-text: #775d00;--straumur__color-warning-bg: #fff7db;--straumur__color-danger-text: #d03e00;--straumur__color-success: #1f9d57;--straumur__border-radius-xxs: 4px;--straumur__border-radius-xs: 6px;--straumur__border-radius-s: 8px;--straumur__border-radius-md: 10px;--straumur__border-radius-lg: 12px;--straumur__border-radius-xlg: 14px;--straumur__border-radius-xxlg: 16px;--straumur__space-xxs: 4px;--straumur__space-xs: 6px;--straumur__space-s: 8px;--straumur__space-md: 10px;--straumur__space-lg: 12px;--straumur__space-xlg: 14px;--straumur__space-xxlg: 16px;--straumur__space-3xlg: 18px;--straumur__space-4xlg: 20px;--straumur__space-5xlg: 24px;--straumur__space-6xlg: 32px;--straumur__space-7xlg: 40px;--straumur__space-8xlg: 48px;--apple-pay-button-width: 100%;--apple-pay-button-height: 48px;--apple-pay-button-border-radius: var(--straumur__border-radius-lg)}.straumur__root-component{font-family:AkzidenzGroteskPro,sans-serif;color:var(--straumur__color-text);min-width:320px;container:straumur / inline-size;-webkit-tap-highlight-color:transparent}.straumur__root-component[data-theme=dark]{--straumur__color-primary: #e8edf2;--straumur__color-secondary: #9aa7b5;--straumur__color-secondary-gamma: #2a313b;--straumur__color-blue-beta: #24506b;--straumur__color-blue-gamma: #1b2733;--straumur__color-neon-green-zeta: #9cbf5e;--straumur__color-red-beta: #e08a8a;--straumur__color-red-gamma: #2e2020;--straumur__color-gray-epsilon: #3a424d;--straumur__color-cosmos-blue-delta: #3a424d;--straumur__color-cosmos-blue-gamma: #262d36;--straumur__color-white: #0d0f13;--straumur__color-text: #e8edf2;--straumur__color-border: #3a424d;--straumur__color-warning-text: #e6c766;--straumur__color-warning-bg: #2f2a17;--straumur__color-danger-text: #f0895f;--straumur__color-success: #3fd98a}.straumur__component *{font-family:inherit}.straumur__render-brand-icons__overflow{color:var(--straumur__color-secondary)}.straumur__brand-chip{display:inline-flex;background:var(--straumur__color-brand-chip);border:1px solid var(--straumur__color-border);border-radius:var(--straumur__border-radius-xxs);overflow:hidden}.straumur__component{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--straumur__space-5xlg);padding:var(--straumur__space-6xlg);width:100%;min-height:300px;background-color:var(--straumur__color-white);border-radius:var(--straumur__border-radius-xxlg)}.straumur__result-message{max-width:320px;margin:0;padding:0 var(--straumur__space-4xlg);text-align:center;font-size:16px;line-height:24px;color:var(--straumur__color-text)}.js-iframe{border:none;color-scheme:auto;height:100%;overflow:hidden;width:100%}.adyen-checkout__threeds2__challenge.adyen-checkout__threeds2__challenge--05{background-color:transparent;display:block;height:inherit;min-height:400px;overflow:hidden;position:relative;width:100%}
|
|
2
|
+
`);var lu=()=>({STAGING_BASE_URL:"https://checkout-api.staging.straumur.is/api/v1/embeddedcheckout",PRODUCTION_BASE_URL:"https://greidslugatt.straumur.is/api/v1/embeddedcheckout",GET_PAYMENT_METHODS_URL:"payment-methods",POST_PAYMENT_URL:"payment",POST_DETAILS_URL:"details",POST_DISABLE_TOKEN_URL:"disable-token"}),xt=lu();function uo(t){switch(t){case"test":return xt.STAGING_BASE_URL;case"live":return xt.PRODUCTION_BASE_URL;default:throw new Error(`Unknown environment: ${t}`)}}function cs(t,e){return fetch(`${uo(t)}/${xt.GET_PAYMENT_METHODS_URL}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}function us(t,e){return fetch(`${uo(t)}/${xt.POST_PAYMENT_URL}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}function ps(t,e){return fetch(`${uo(t)}/${xt.POST_DETAILS_URL}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}function ms(t,e){return fetch(`${uo(t)}/${xt.POST_DISABLE_TOKEN_URL}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}var po={"en-US":{"cards.title":"Card payment","cards.cardNumber":"Card number","cards.expiryDate":"Expiry date","cards.securityCode3Digits":"Security code","cards.securityCode3DigitsOptional":"Security code (optional)","cards.securityCode3DigitsInfo":"3-digit on the back of the card","cards.securityCode4DigitsInfo":"4-digit on the back of the card","cards.storePaymentMethod":"Store payment information","cards.saveCardDetails":"Save card details","googlePay.title":"Google Pay","applePay.title":"Apple Pay","kortalan.title":"Kortal\xE1n","kortalan.payButton":"Continue to Kortal\xE1n","stored-cards.expiryDate":"Expiry date","stored-cards.securityCode3Digits":"Security code","stored-cards.securityCode3DigitsOptional":"Security code (optional)","stored-cards.securityCode3DigitsInfo":"3-digit on the back of the card","stored-cards.securityCode4DigitsInfo":"4-digit on the back of the card","stored-cards.removeStoredCard":"Remove","stored-cards.removeStoredCardQuestion":"Remove stored payment method?","stored-cards.removeStoredCardQuestionYesRemove":"Yes, remove","stored-cards.removeStoredCardQuestionCancel":"Cancel","stored-cards.saveCardDetails":"Save card details","success.paymentAuthorized":"Payment authorized","error.unknownError":"Unknown error occurred","error.failedToInitializeStraumurWebComponent":"Failed to initialize Straumur Web component","error.failedToInitializePaymentMethods":"Failed to initialize payment methods","error.failedToSubmitPayment":"Failed to submit payment","error.paymentFailed":"Payment failed","error.paymentUnsuccessful":"Payment unsuccessful","error.failedToSubmitPaymentDetails":"Failed to submit payment details","error.paymentDetailsFailed":"Payment details failed","error.googlePayNotAvailable":"Google Pay not available","error.applePayNotAvailable":"Apple Pay not available","error.failedToSubmitRemoveStoredPaymentCard":"Failed to remove stored payment card","error.failedToRemoveStoredPaymentCard":"Stored payment card was not removed"},"is-IS":{"cards.title":"Grei\xF0a me\xF0 korti","cards.cardNumber":"Kortan\xFAmer","cards.expiryDate":"Gildisdagur","cards.securityCode3Digits":"\xD6ryggisk\xF3\xF0i","cards.securityCode3DigitsOptional":"\xD6ryggisk\xF3\xF0i (valkv\xE6tt)","cards.securityCode3DigitsInfo":"3 t\xF6lustafir aftan \xE1 kortinu","cards.securityCode4DigitsInfo":"4 t\xF6lustafir aftan \xE1 kortinu","cards.storePaymentMethod":"Vista grei\xF0sluuppl\xFDsingar","cards.saveCardDetails":"Vista kortauppl\xFDsingar","googlePay.title":"Google Pay","applePay.title":"Apple Pay","kortalan.title":"Kortal\xE1n","kortalan.payButton":"\xC1fram \xED Kortal\xE1n","stored-cards.expiryDate":"Gildisdagur","stored-cards.securityCode3Digits":"\xD6ryggisk\xF3\xF0i","stored-cards.securityCode3DigitsOptional":"\xD6ryggisk\xF3\xF0i (valkv\xE6tt)","stored-cards.securityCode3DigitsInfo":"3 t\xF6lustafir aftan \xE1 kortinu","stored-cards.securityCode4DigitsInfo":"4 t\xF6lustafir aftan \xE1 kortinu","stored-cards.removeStoredCard":"Fjarl\xE6gja","stored-cards.removeStoredCardQuestion":"Fjarl\xE6gja geymdan grei\xF0slum\xE1ta?","stored-cards.removeStoredCardQuestionYesRemove":"J\xE1, fjarl\xE6gja","stored-cards.removeStoredCardQuestionCancel":"H\xE6tta vi\xF0","stored-cards.saveCardDetails":"Vista kortauppl\xFDsingar","success.paymentAuthorized":"Grei\xF0sla sam\xFEykkt","error.unknownError":"\xD3\xFEekkt villa kom upp","error.failedToInitializeStraumurWebComponent":"Mist\xF3kst a\xF0 s\xE6kja Straumur Web hluta","error.failedToInitializePaymentMethods":"Mist\xF3kst a\xF0 s\xE6kja grei\xF0slum\xE1ta","error.failedToSubmitPayment":"Mist\xF3kst a\xF0 senda grei\xF0slu","error.paymentFailed":"Grei\xF0sla mist\xF3kst","error.paymentUnsuccessful":"Grei\xF0sla ekki tekin","error.failedToSubmitPaymentDetails":"Mist\xF3kst a\xF0 senda grei\xF0sluuppl\xFDsingar","error.paymentDetailsFailed":"Mist\xF3kst a\xF0 s\xE6kja grei\xF0sluuppl\xFDsingar","error.googlePayNotAvailable":"Google Pay ekki \xED bo\xF0i","error.applePayNotAvailable":"Apple Pay ekki \xED bo\xF0i","error.failedToSubmitRemoveStoredPaymentCard":"Mist\xF3kst a\xF0 fjarl\xE6gja geymdan grei\xF0slum\xE1ta","error.failedToRemoveStoredPaymentCard":"Geymdur grei\xF0slum\xE1ti var ekki fjarl\xE6g\xF0ur"}};function hs(t){return typeof t=="string"&&(t in po["en-US"]||t in po["is-IS"])}async function fs(t,e){try{let r=await cs(t,{sessionId:e});if(!r.ok){let n=r.headers.get("content-type"),a="error.failedToInitializePaymentMethods";if(n&&n.includes("application/json")){let s=(await r.json()).errorMessage;hs(s)&&(a=s)}return{resultCode:"Error",error:a}}return{resultCode:"Success",...await r.json()}}catch{return{resultCode:"Error",error:"error.failedToInitializePaymentMethods"}}}function mo(t){switch(t){case"en":case"en-US":return"en-US";default:return"is-IS"}}var Dt,z,Ln,_s,br=0,Ps=[],re=V,ys=re.__b,gs=re.__r,Cs=re.diffed,vs=re.__c,bs=re.unmount,Es=re.__;function Er(t,e){re.__h&&re.__h(z,t,br||e),br=0;var r=z.__H||(z.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({}),r.__[t]}function R(t){return br=1,du(As,t)}function du(t,e,r){var o=Er(Dt++,2);if(o.t=t,!o.__c&&(o.__=[r?r(e):As(void 0,e),function(l){var c=o.__N?o.__N[0]:o.__[0],u=o.t(c,l);c!==u&&(o.__N=[u,o.__[1]],o.__c.setState({}))}],o.__c=z,!z.__f)){var n=function(l,c,u){if(!o.__c.__H)return!0;var p=o.__c.__H.__.filter(function(h){return!!h.__c});if(p.every(function(h){return!h.__N}))return!a||a.call(this,l,c,u);var d=o.__c.props!==l;return p.forEach(function(h){if(h.__N){var m=h.__[0];h.__=h.__N,h.__N=void 0,m!==h.__[0]&&(d=!0)}}),a&&a.call(this,l,c,u)||d};z.__f=!0;var a=z.shouldComponentUpdate,s=z.componentWillUpdate;z.componentWillUpdate=function(l,c,u){if(this.__e){var p=a;a=void 0,n(l,c,u),a=p}s&&s.call(this,l,c,u)},z.shouldComponentUpdate=n}return o.__N||o.__}function oe(t,e){var r=Er(Dt++,3);!re.__s&&Un(r.__H,e)&&(r.__=t,r.u=e,z.__H.__h.push(r))}function Rs(t,e){var r=Er(Dt++,4);!re.__s&&Un(r.__H,e)&&(r.__=t,r.u=e,z.__h.push(r))}function pe(t){return br=5,Ts(function(){return{current:t}},[])}function Ts(t,e){var r=Er(Dt++,7);return Un(r.__H,e)&&(r.__=t(),r.__H=e,r.__h=t),r.__}function Sr(t,e){return br=8,Ts(function(){return t},e)}function fo(t){var e=z.context[t.__c],r=Er(Dt++,9);return r.c=t,e?(r.__==null&&(r.__=!0,e.sub(z)),e.props.value):t.__}function cu(){for(var t;t=Ps.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(ho),t.__H.__h.forEach(Bn),t.__H.__h=[]}catch(e){t.__H.__h=[],re.__e(e,t.__v)}}re.__b=function(t){z=null,ys&&ys(t)},re.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Es&&Es(t,e)},re.__r=function(t){gs&&gs(t),Dt=0;var e=(z=t.__c).__H;e&&(Ln===z?(e.__h=[],z.__h=[],e.__.forEach(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(e.__h.forEach(ho),e.__h.forEach(Bn),e.__h=[],Dt=0)),Ln=z},re.diffed=function(t){Cs&&Cs(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Ps.push(e)!==1&&_s===re.requestAnimationFrame||((_s=re.requestAnimationFrame)||uu)(cu)),e.__H.__.forEach(function(r){r.u&&(r.__H=r.u),r.u=void 0})),Ln=z=null},re.__c=function(t,e){e.some(function(r){try{r.__h.forEach(ho),r.__h=r.__h.filter(function(o){return!o.__||Bn(o)})}catch(o){e.some(function(n){n.__h&&(n.__h=[])}),e=[],re.__e(o,r.__v)}}),vs&&vs(t,e)},re.unmount=function(t){bs&&bs(t);var e,r=t.__c;r&&r.__H&&(r.__H.__.forEach(function(o){try{ho(o)}catch(n){e=n}}),r.__H=void 0,e&&re.__e(e,r.__v))};var Ss=typeof requestAnimationFrame=="function";function uu(t){var e,r=function(){clearTimeout(o),Ss&&cancelAnimationFrame(e),setTimeout(t)},o=setTimeout(r,35);Ss&&(e=requestAnimationFrame(r))}function ho(t){var e=z,r=t.__c;typeof r=="function"&&(t.__c=void 0,r()),z=e}function Bn(t){var e=z;t.__c=t.__(),z=e}function Un(t,e){return!t||t.length!==e.length||e.some(function(r,o){return r!==t[o]})}function As(t,e){return typeof e=="function"?e(t):e}N(`.straumur__card-component--brands{display:flex;margin-left:auto;align-items:center;gap:var(--straumur__space-xxs)}.straumur__card-component__expandable{background:var(--straumur__color-white)}.straumur__card-component__loading-text{display:flex;justify-content:center}.straumur__card-component__form{display:flex;padding-top:var(--straumur__space-xxlg);flex-direction:column;gap:var(--straumur__space-5xlg)}.straumur__card-component__form--wrapper{display:flex;flex-direction:column;justify-items:start;position:relative;width:100%}.straumur__card-component__form--wrapper--error{color:var(--straumur__color-red-beta);font-size:12px}.straumur__card-component__form--wrapper--label{transform:translate(var(--straumur__space-md)) translateY(-50%);z-index:1;background:linear-gradient(to top,var(--straumur__color-secondary-gamma) 53%,var(--straumur__color-transparent) 50%);position:absolute;font-weight:500;font-size:14px;padding:0 var(--straumur__space-xxs)}.straumur__card-component__form--wrapper--label--error{color:var(--straumur__color-red-beta);background:linear-gradient(to top,var(--straumur__color-red-gamma) 53%,var(--straumur__color-transparent) 50%)}.straumur__card-component__form--wrapper--label--info{position:absolute;top:33%;right:var(--straumur__space-md)}.straumur__card-component__form--wrapper--input{background:var(--straumur__color-secondary-gamma);color:var(--straumur__color-text);display:block;font-family:inherit;border:1px solid var(--straumur__color-transparent);border-radius:var(--straumur__border-radius-s);font-size:16px;height:48px;outline:none;padding-left:var(--straumur__space-lg);transition:border .2s ease-out,box-shadow .2s ease-out}.straumur__card-component__form--wrapper--input:hover{border:1px solid var(--straumur__color-cosmos-blue-delta)}.straumur__card-component__form--wrapper--input--error{background:var(--straumur__color-red-gamma);border:1px solid var(--straumur__color-red-beta)}.straumur__card-component__form--wrapper--input--error:hover{border:1px solid var(--straumur__color-red-beta)}.straumur__card-component__form--field-wrapper{display:flex;width:100%;gap:var(--straumur__space-lg)}.straumur__card-component__submit-button{background:var(--straumur__color-primary);border:none;border-radius:var(--straumur__border-radius-s);color:var(--straumur__color-on-primary);cursor:pointer;font-size:16px;height:40px;outline:none;padding:0 var(--straumur__space-xxlg);transition:background .2s ease-out;width:100%}.straumur__card-component__submit-button:hover{background:var(--straumur__color-primary);border:1px solid var(--straumur__color-border)}.straumur__card-component__submit-button:disabled{background:var(--straumur__color-gray-epsilon);color:var(--straumur__color-secondary);border:1px solid var(--straumur__color-border);cursor:not-allowed}.straumur__card-component__form--wrapper--label-checkbox{height:38px;display:flex;align-items:center;padding:8px;gap:var(--straumur__space-s);border-radius:var(--straumur__border-radius-s);cursor:pointer;user-select:none;transition:background-color .25s ease-in-out}.straumur__card-component__form--wrapper--label-checkbox:hover{background-color:var(--straumur__color-blue-gamma)}.straumur__card-component__form--wrapper--label-checkbox:hover .straumur__card-component__form--wrapper--label-checkbox--checkmark{border:1px solid var(--straumur__color-cosmos-blue-delta)}.straumur__card-component__form--wrapper--label-checkbox--checkmark{height:var(--straumur__space-5xlg);width:var(--straumur__space-5xlg);background-color:var(--straumur__color-secondary-gamma);border-radius:var(--straumur__border-radius-xxs);flex-shrink:0;border:1px solid var(--straumur__color-transparent);transition:all .2s ease-in}.straumur__card-component__form--wrapper--label-checkbox:hover .straumur__card-component__form--wrapper--label-checkbox--checkmark.straumur__card-component__form--wrapper--label-checkbox--checkmark--checked{border:1px solid var(--straumur__color-transparent)}.straumur__card-component__form--wrapper--label-checkbox--checkmark--checked{background-color:var(--straumur__color-primary)}.straumur__card-component__form--wrapper--label-checkbox--checkmark--icon{height:100%;display:flex;justify-content:center;align-items:center;font-size:9px;opacity:0;visibility:hidden;transition:all .2s ease-in}.straumur__card-component__form--wrapper--label-checkbox--checkmark--icon--checked{opacity:1;visibility:visible}.straumur__card-component__form--wrapper--label-checkbox--checkbox{display:none}.js-iframe{border:none;color-scheme:auto;height:100%;overflow:hidden;width:100%}.straumur__card-component__dual-branding{display:grid;grid-template-columns:1fr 1fr;gap:var(--straumur__space-lg)}.straumur__card-component__dual-branding--logo{display:flex;align-items:center;padding:var(--straumur__space-xs);border:1px solid var(--straumur__color-secondary-gamma);border-radius:var(--straumur__border-radius-s)}.straumur__card-component__dual-branding--logo--item{display:flex;pointer-events:none}.straumur__card-component__dual-branding--logo--selected{border:1px solid var(--straumur__color-cosmos-blue-delta);justify-content:space-between}
|
|
3
|
+
`);var xs=co(void 0),pu={card:!1,storedcard:!1,googlepay:!1,applepay:!1,kortalan:!1},Ds=({children:t,initialValue:e,initialStoredPaymentMethodId:r=null,isSolePaymentMethod:o,hasCard:n,hasGooglePay:a,hasApplePay:s,hasKortalan:l,hasStoredPaymentMethods:c,onSubmitApiReady:u})=>{let[p,d]=R(e),h=pe(null),m=Sr(ae=>{h.current=ae},[]),C=Sr(ae=>{h.current===ae&&(h.current=null)},[]),g=Sr(()=>{let ae=h.current;return ae?(ae(),!0):!1},[]);Rs(()=>{u?.({triggerSubmit:g})},[]);let[v,f]=R(r),[y,I]=R(!1),[E,K]=R(!1),[F,W]=R(pu),[ne,L]=R({}),[B,U]=R(null),[q,Me]=R(null),nt=(ae,je)=>{W($e=>({...$e,[ae]:je}))},Se=(ae,je)=>{L($e=>({...$e,[ae]:je}))},Tt=Sr(ae=>y&&p!==ae,[y,p]),at=ae=>{Me(ae)},jt=ae=>{U(ae)};return i(xs.Provider,{value:{activePaymentMethod:p,setActivePaymentMethod:d,activeStoredPaymentMethodId:v,setActiveStoredPaymentMethodId:f,isPaymentMethodInitialized:F,updatePaymentMethodInitialization:nt,isStoredCardInitialized:ne,updateStoredCardInitialization:Se,handleSuccess:jt,success:B,handleError:at,error:q,threeDSecureActive:y,setThreeDSecureActive:I,paymentInProgress:E,setPaymentInProgress:K,isObscuredByThreeDS:Tt,isSolePaymentMethod:o,hasCard:n,hasGooglePay:a,hasApplePay:s,hasKortalan:l,hasStoredPaymentMethods:c,registerSubmitHandler:m,unregisterSubmitHandler:C}},t)},M=()=>{let t=fo(xs);if(t===void 0)throw new Error("usePaymentMethodGroup must be used within a PaymentMethodGroup");return t};var ws=co(void 0),Is=({children:t,i18nService:e,onLanguageChange:r})=>{let o=n=>{e.setLanguage(n),r?.(n)};return i(ws.Provider,{value:{i18n:e,changeLanguage:o}},t)},he=()=>{let t=fo(ws);if(!t)throw new Error("useI18n must be used within an I18nProvider");return t};var mu=()=>i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"26",viewBox:"0 0 24 24",fill:"none"},i("path",{d:"M24 11H0V7H24V11Z",fill:"currentColor"}),i("path",{opacity:"0.4",d:"M21.3333 3C22.8042 3 24 4.19375 24 5.66667V7H0V5.66667C0 4.19375 1.19375 3 2.66667 3H21.3333ZM24 19C24 20.4708 22.8042 21.6667 21.3333 21.6667H2.66667C1.19375 21.6667 0 20.4708 0 19V11H24V19ZM4.66667 16.3333C4.3 16.3333 4 16.6333 4 17C4 17.3667 4.3 17.6667 4.66667 17.6667H7.33333C7.7 17.6667 8 17.3667 8 17C8 16.6333 7.7 16.3333 7.33333 16.3333H4.66667ZM10 17.6667H15.3333C15.7 17.6667 16 17.3667 16 17C16 16.6333 15.7 16.3333 15.3333 16.3333H10C9.63333 16.3333 9.33333 16.6333 9.33333 17C9.33333 17.3667 9.63333 17.6667 10 17.6667Z",fill:"currentColor"})),ks=mu;var hu=({opacity:t=1,reversed:e=!1})=>i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"19.5",viewBox:"0 0 40 26",opacity:t},!e&&i("path",{fill:"#fff",d:"M0 0h40v26H0z"}),i("path",{fill:"#F06022",d:"M16.13 19.29h7.74V6.7h-7.74v12.58z"}),i("path",{fill:"#EA1D25",d:"M16.93 13A7.93 7.93 0 0 1 20 6.71a8.02 8.02 0 0 0-10.65.65 7.96 7.96 0 0 0 0 11.28 8.02 8.02 0 0 0 10.65.65A8.02 8.02 0 0 1 16.93 13"}),i("path",{fill:"#F79D1D",d:"M33 13c0 2.12-.84 4.15-2.34 5.65a8.1 8.1 0 0 1-10.66.64A8.05 8.05 0 0 0 23.07 13 7.96 7.96 0 0 0 20 6.71a8.02 8.02 0 0 1 10.66.64A7.93 7.93 0 0 1 33 13"})),Ns=hu;var fu=({opacity:t=1,reversed:e=!1})=>i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"19.5",fill:"none",viewBox:"0 0 40 26",opacity:t},!e&&i("path",{fill:"#fff",d:"M0 0h40v26H0z"}),i("path",{fill:e?"#fff":"#1434CB",d:"m15.9 7.7-4.43 10.6h-2.9l-2.2-8.47c-.13-.52-.25-.71-.65-.93C5.05 8.55 3.96 8.2 3 8l.07-.32h4.67c.6 0 1.13.4 1.27 1.09l1.15 6.14 2.86-7.23h2.89Zm11.39 7.15c0-2.8-3.88-2.96-3.85-4.21 0-.38.37-.79 1.16-.9a5.2 5.2 0 0 1 2.71.48l.48-2.25a7.4 7.4 0 0 0-2.57-.47c-2.71 0-4.62 1.44-4.64 3.51-.02 1.53 1.36 2.38 2.4 2.9 1.08.51 1.44.85 1.43 1.31 0 .71-.85 1.03-1.64 1.04-1.39.02-2.19-.37-2.82-.67l-.5 2.33c.64.29 1.82.55 3.05.56 2.89 0 4.78-1.42 4.79-3.63Zm7.17 3.46H37L34.78 7.7h-2.34c-.53 0-.98.3-1.17.78l-4.12 9.84h2.88l.57-1.58h3.53l.33 1.58Zm-3.07-3.76 1.45-3.99.83 4H31.4ZM19.83 7.7l-2.27 10.62h-2.74L17.09 7.7h2.74Z"})),Os=fu;var _u=({opacity:t=1,reversed:e=!1})=>i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"19.5",fill:"none",viewBox:"0 0 40 26",opacity:t},!e&&i("path",{fill:"#fff",d:"M0 0h40v26H0z"}),i("path",{fill:"#7773B4",d:"M16.13 19.29h7.74V6.7h-7.74v12.58z"}),i("path",{fill:"#EA1D25",d:"M16.93 13A7.93 7.93 0 0 1 20 6.71a8.02 8.02 0 0 0-10.65.65 7.96 7.96 0 0 0 0 11.28 8.02 8.02 0 0 0 10.65.65A8.02 8.02 0 0 1 16.93 13"}),i("path",{fill:"#139FDA",d:"M33 13c0 2.12-.84 4.15-2.34 5.65a8.1 8.1 0 0 1-10.66.64A8.05 8.05 0 0 0 23.07 13 7.96 7.96 0 0 0 20 6.71a8.02 8.02 0 0 1 10.66.64A7.93 7.93 0 0 1 33 13"})),Ms=_u;var yu=({opacity:t=1})=>i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 40 26",width:"30",height:"19.5",opacity:t},i("path",{fill:"#016FD0",d:"M0 26h40V0H0v26z"}),i("path",{fill:"#fff","fill-rule":"evenodd",d:"M30.69 13.63v1.64h-4.17v1.14h4.07v1.64h-4.07v1.12h4.17v1.66l3.38-3.6-3.38-3.6zm-1.1-6.14-1.4-3.19h-4l-4.1 9.32h3.33v8.27l10.28.01 1.61-1.8 1.63 1.8H40v-2.63l-1.92-2.06L40 15.16v-2.59l-1.93.01V7.6l-1.81 4.98H34.5l-1.86-5v5h-4.2l-.6-1.46h-3.3l-.6 1.46h-2.22l3.23-7.27V5.3h2.55l3.19 7.21V5.3l3.1.01 1.6 4.47 1.62-4.48H40v-1h-3.77l-.85 2.39-.85-2.39h-4.94v3.19zm-5.06 6.11v7.27h6.16v-.01h2.54l2.1-2.32 2.12 2.32H40v-.1l-3.34-3.53L40 13.65v-.05h-2.52l-2.1 2.3-2.08-2.3h-8.77zm.7-4.11.96-2.31.97 2.31h-1.93z"})),Fs=yu;var gu=({opacity:t=1})=>i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"19.5",fill:"none",viewBox:"0 0 40 26",opacity:t},i("g",{"clip-path":"url(#a)"},i("path",{fill:"#fff",d:"M0 0h40v26H0V0Z"}),i("path",{fill:"#fff",d:"M36.6 20.66a5.22 5.22 0 0 1-5.22 5.22H3V5.22A5.22 5.22 0 0 1 8.22 0H36.6v20.66Z"}),i("path",{fill:"url(#b)",d:"M27.36 15.36h2.15l.27-.02a.96.96 0 0 0 .76-.96 1 1 0 0 0-.76-.97c-.06-.02-.19-.02-.27-.02h-2.15v1.97Z"}),i("path",{fill:"url(#c)",d:"M29.27 1.75a3.74 3.74 0 0 0-3.74 3.73v3.89h5.28c.12 0 .26 0 .37.02 1.19.06 2.07.67 2.07 1.74 0 .84-.6 1.56-1.7 1.7v.05c1.2.08 2.13.76 2.13 1.8 0 1.13-1.03 1.87-2.38 1.87h-5.8v7.6H31a3.74 3.74 0 0 0 3.73-3.74V1.75h-5.46Z"}),i("path",{fill:"url(#d)",d:"M30.27 11.38c0-.5-.35-.82-.76-.89l-.2-.02h-1.95v1.81h1.95c.06 0 .18 0 .2-.02a.87.87 0 0 0 .76-.88Z"}),i("path",{fill:"url(#e)",d:"M8.6 1.75a3.74 3.74 0 0 0-3.73 3.73v9.22a7.4 7.4 0 0 0 3.22.85c1.3 0 2-.78 2-1.85V9.34h3.2v4.34c0 1.68-1.05 3.06-4.6 3.06-2.16 0-3.84-.47-3.84-.47v7.86h5.48a3.74 3.74 0 0 0 3.74-3.74V1.75H8.6Z"}),i("path",{fill:"url(#f)",d:"M18.94 1.75a3.74 3.74 0 0 0-3.74 3.73v4.9c.94-.8 2.59-1.32 5.24-1.2 1.41.06 2.93.45 2.93.45v1.58a7.1 7.1 0 0 0-2.83-.82c-2.01-.14-3.23.84-3.23 2.57 0 1.74 1.22 2.73 3.23 2.57a7.46 7.46 0 0 0 2.83-.82v1.58s-1.5.39-2.93.45c-2.65.12-4.3-.4-5.24-1.2v8.63h5.48a3.74 3.74 0 0 0 3.74-3.74V1.75h-5.48Z"})),i("defs",null,i("linearGradient",{id:"b",x1:"25.52",x2:"34.75",y1:"14.38",y2:"14.38",gradientUnits:"userSpaceOnUse"},i("stop",{offset:"0","stop-color":"#007940"}),i("stop",{offset:".23","stop-color":"#00873F"}),i("stop",{offset:".74","stop-color":"#40A737"}),i("stop",{offset:"1","stop-color":"#5CB531"})),i("linearGradient",{id:"c",x1:"25.52",x2:"34.75",y1:"12.94",y2:"12.94",gradientUnits:"userSpaceOnUse"},i("stop",{offset:"0","stop-color":"#007940"}),i("stop",{offset:".23","stop-color":"#00873F"}),i("stop",{offset:".74","stop-color":"#40A737"}),i("stop",{offset:"1","stop-color":"#5CB531"})),i("linearGradient",{id:"d",x1:"25.52",x2:"34.75",y1:"11.37",y2:"11.37",gradientUnits:"userSpaceOnUse"},i("stop",{offset:"0","stop-color":"#007940"}),i("stop",{offset:".23","stop-color":"#00873F"}),i("stop",{offset:".74","stop-color":"#40A737"}),i("stop",{offset:"1","stop-color":"#5CB531"})),i("linearGradient",{id:"e",x1:"4.86",x2:"14.24",y1:"12.94",y2:"12.94",gradientUnits:"userSpaceOnUse"},i("stop",{offset:"0","stop-color":"#1F286F"}),i("stop",{offset:".48","stop-color":"#004E94"}),i("stop",{offset:".83","stop-color":"#0066B1"}),i("stop",{offset:"1","stop-color":"#006FBC"})),i("linearGradient",{id:"f",x1:"15.15",x2:"24.25",y1:"12.94",y2:"12.94",gradientUnits:"userSpaceOnUse"},i("stop",{offset:"0","stop-color":"#6C2C2F"}),i("stop",{offset:".17","stop-color":"#882730"}),i("stop",{offset:".57","stop-color":"#BE1833"}),i("stop",{offset:".86","stop-color":"#DC0436"}),i("stop",{offset:"1","stop-color":"#E60039"})),i("clipPath",{id:"a"},i("path",{fill:"#fff",d:"M0 0h40v26H0z"})))),Ls=gu;var Cu=({opacity:t=1})=>i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 40 26",width:"30",height:"19.5",opacity:t},i("path",{fill:"#fff",d:"M0 0h40v26H0z"}),i("g",{fill:"#1a1918"},i("path",{d:"M5.96 15.58c0-.56-.3-.52-.58-.53v-.16H7.2a2.28 2.28 0 0 1 2.5 2.2c0 .61-.36 2.17-2.57 2.17H5.38v-.16c.38-.04.56-.05.58-.48zm.61 2.94c0 .49.35.54.65.54a1.75 1.75 0 0 0 1.8-1.95 1.88 1.88 0 0 0-1.96-2.02c-.26 0-.37.02-.49.02zm3.36.58h.12c.17 0 .3 0 .3-.2v-1.7c0-.28-.1-.32-.33-.44v-.1l.67-.23a.22.22 0 0 1 .11-.03c.03 0 .05.04.05.09v2.4c0 .21.13.21.3.21h.11v.16H9.93zm.67-3.67a.3.3 0 0 1 0-.61.3.3 0 0 1 .3.3.31.31 0 0 1-.3.31zm1.26 1.8c0-.23-.07-.3-.36-.41v-.12a8.44 8.44 0 0 0 .82-.3c.02 0 .04.01.04.06v.4a1.83 1.83 0 0 1 1.08-.46c.53 0 .72.39.72.88v1.61c0 .21.14.21.31.21h.12v.16h-1.34v-.16h.11c.18 0 .3 0 .3-.2v-1.63c0-.36-.22-.53-.57-.53a1.66 1.66 0 0 0-.73.3v1.85c0 .21.14.21.31.21h.12v.16h-1.34v-.16h.1c.18 0 .3 0 .3-.2v-1.67m3.21.3a1.55 1.55 0 0 0 0 .37 1.05 1.05 0 0 0 .92 1.08 1.2 1.2 0 0 0 .85-.42l.08.09a1.47 1.47 0 0 1-1.15.7 1.26 1.26 0 0 1-1.2-1.36c0-1.23.83-1.6 1.27-1.6a1 1 0 0 1 1.05 1 .74.74 0 0 1 0 .1l-.06.04zm1.11-.2c.16 0 .18-.08.18-.16a.53.53 0 0 0-.55-.57c-.38 0-.64.28-.72.73zm.86 1.77h.17c.17 0 .3 0 .3-.2v-1.77c0-.2-.23-.23-.33-.28v-.1c.46-.19.7-.35.77-.35.03 0 .05.02.05.08v.56H18c.16-.24.42-.64.8-.64a.34.34 0 0 1 .36.33.3.3 0 0 1-.3.32c-.19 0-.19-.15-.4-.15a.53.53 0 0 0-.46.52v1.47c0 .21.12.21.3.21h.35v.16h-.88a26 26 0 0 0-.74 0zm2.41-.7a.83.83 0 0 0 .78.76.44.44 0 0 0 .51-.45c0-.74-1.36-.5-1.36-1.5a.86.86 0 0 1 .97-.81 1.64 1.64 0 0 1 .71.18l.04.64h-.14a.64.64 0 0 0-.68-.62.44.44 0 0 0-.49.41c0 .74 1.45.51 1.45 1.5 0 .4-.33.85-1.07.85a1.64 1.64 0 0 1-.77-.22l-.07-.72.12-.03m7.44-2.37h-.15A1.2 1.2 0 0 0 25.39 15a1.79 1.79 0 0 0-1.77 2 2.04 2.04 0 0 0 1.87 2.17 1.27 1.27 0 0 0 1.25-1.09l.15.04-.15.91a3.5 3.5 0 0 1-1.38.34A2.23 2.23 0 0 1 22.97 17a2.3 2.3 0 0 1 2.37-2.2 4.5 4.5 0 0 1 1.48.33l.06.9m.22 3.07h.13c.17 0 .3 0 .3-.2v-3.5c0-.4-.1-.42-.34-.49v-.1a3.96 3.96 0 0 0 .65-.27.66.66 0 0 1 .14-.07c.03 0 .05.04.05.1v4.32c0 .21.13.21.3.21h.12v.16H27.1zm4.02-.18c0 .11.07.12.18.12h.25v.12a6.33 6.33 0 0 0-.9.2l-.03-.02v-.5a1.69 1.69 0 0 1-1.11.52.68.68 0 0 1-.69-.75v-1.6c0-.17-.02-.32-.37-.35v-.12l.8-.05c.07 0 .07.05.07.18v1.62c0 .19 0 .73.55.73a1.4 1.4 0 0 0 .75-.38v-1.7c0-.12-.3-.18-.52-.25v-.11c.56-.04.91-.09.97-.09.05 0 .05.05.05.11zm1.25-2.07a1.58 1.58 0 0 1 .93-.45 1.22 1.22 0 0 1 1.16 1.31 1.58 1.58 0 0 1-1.5 1.65 1.84 1.84 0 0 1-.86-.22l-.19.14-.13-.07a7.37 7.37 0 0 0 .09-1.11v-2.7c0-.4-.1-.42-.33-.49v-.1a3.93 3.93 0 0 0 .64-.27.67.67 0 0 1 .14-.07c.04 0 .05.04.05.1zm0 1.7a.67.67 0 0 0 .64.64c.67 0 .95-.65.95-1.21a1.2 1.2 0 0 0-1-1.24.96.96 0 0 0-.6.3v1.51zM5.38 22.91h.04c.13 0 .26-.02.26-.2v-1.78c0-.18-.13-.2-.26-.2h-.04v-.1l.5.01.54-.01v.1h-.05c-.12 0-.25.02-.25.2v1.79c0 .17.13.19.25.19h.05v.1L5.88 23l-.5.01z"}),i("path",{d:"M6.42 23.03 5.88 23l-.5.02h-.02v-.14h.06c.13 0 .24 0 .24-.17v-1.8c0-.16-.11-.17-.24-.17h-.06v-.13h1.07v.13h-.06c-.13 0-.24.01-.24.18v1.79c0 .16.11.17.24.17h.06v.14zM6.4 23v-.08h-.03c-.12 0-.27-.02-.27-.2v-1.8c0-.18.15-.2.27-.2h.03v-.07h-1v.07h.03c.13 0 .27.02.27.2v1.8c0 .18-.14.2-.27.2H5.4V23l.49-.02.52.02zm2.35-.66h.01v-1.29a.28.28 0 0 0-.3-.32H8.4v-.1l.48.01.42-.01v.1h-.06c-.14 0-.3.03-.3.44v1.55a2.27 2.27 0 0 0 .02.34h-.13L7.07 21.1v1.41c0 .3.06.4.32.4h.06v.1L7 23l-.47.01v-.1h.05c.24 0 .3-.16.3-.43v-1.44a.3.3 0 0 0-.3-.3h-.05v-.11l.4.01.3-.01 1.51 1.71"}),i("path",{d:"M8.95 23.08h-.14l-1.73-1.94v1.37c0 .3.05.38.3.38h.08v.14h-.01L7 23l-.47.02h-.01v-.14h.06c.23 0 .3-.14.3-.41v-1.44a.3.3 0 0 0-.3-.3h-.06v-.12h.72l1.5 1.69v-1.26c0-.27-.19-.3-.29-.3h-.09v-.13h.94v.13h-.07c-.14 0-.28.01-.28.42v1.55a2.27 2.27 0 0 0 .02.34v.02zm-.13-.03h.11a2.3 2.3 0 0 1-.01-.33v-1.55c0-.41.17-.45.31-.45h.04v-.07H8.4v.07h.06a.3.3 0 0 1 .32.33v1.3h-.02v.01l-1.52-1.71h-.68v.07h.03a.32.32 0 0 1 .32.32v1.44c0 .27-.07.44-.32.45h-.03V23l.45-.02.42.02v-.07H7.4c-.27 0-.34-.12-.34-.42v-1.44l1.77 1.98zm-.07-.71.01-.01v.01zm0 0v-.01zM9.8 20.8c-.26 0-.27.06-.32.31h-.1l.04-.29a2.04 2.04 0 0 0 .02-.29h.08c.03.1.11.1.2.1h1.76c.1 0 .18 0 .18-.1h.09l-.04.28v.28l-.11.04c0-.13-.02-.33-.25-.33h-.56v1.82c0 .26.12.29.28.29h.07v.1l-.56-.01-.57.01v-.1h.06c.19 0 .28-.02.28-.29V20.8z"}),i("path",{d:"m11.14 23.03-.56-.02-.57.02h-.02v-.14h.08c.19 0 .26 0 .27-.27v-1.8H9.8v-.03h.57v1.83c0 .28-.11.3-.3.3h-.05V23l.56-.02.54.02v-.07h-.05c-.16 0-.3-.05-.3-.31v-1.83h.58c.23 0 .26.2.26.32l.08-.03a3.96 3.96 0 0 1 .04-.53h-.05c-.02.1-.11.1-.2.1H9.71c-.08 0-.17 0-.2-.1h-.06a2.04 2.04 0 0 1-.02.27c0 .1-.02.19-.04.28h.08c.04-.24.07-.32.33-.31v.03c-.26 0-.25.04-.3.3h-.14v-.01l.04-.3a1.93 1.93 0 0 0 .02-.28v-.01h.11c.03.1.09.1.18.1h1.77c.1 0 .16 0 .17-.1v-.01h.02l.1.02-.01.01-.04.28v.28h-.01l-.12.05v-.02c-.01-.13-.03-.31-.24-.31h-.55v1.8c0 .25.11.27.27.27h.08v.14zm.71-.12h.05c.12 0 .25-.02.25-.2v-1.78c0-.18-.13-.2-.25-.2h-.05v-.1l.85.01.87-.01.01.52-.1.03c-.02-.22-.06-.4-.42-.4h-.47v.9h.4c.2 0 .25-.12.27-.3h.1v.78l-.1.02c-.02-.2-.03-.33-.26-.33h-.4v.79c0 .22.19.22.4.22.41 0 .6-.03.7-.41l.1.02a7.7 7.7 0 0 0-.12.54l-.92-.01-.9.01v-.1"}),i("path",{d:"m13.68 23.03-.92-.02-.9.02h-.02v-.14h.06c.13 0 .24 0 .24-.17v-1.8c0-.16-.11-.17-.24-.17h-.06v-.13h1.75v.01a4.18 4.18 0 0 0 0 .52v.01l-.13.04v-.02c-.02-.22-.05-.38-.4-.38h-.46v.86h.4c.2 0 .23-.1.25-.29v-.01h.13v.01a8.08 8.08 0 0 0 0 .8h-.01l-.12.03v-.02c-.02-.2-.03-.32-.25-.32h-.4v.78c0 .2.18.2.4.2.42 0 .58-.02.68-.4v-.01h.02l.1.03v.01a7.8 7.8 0 0 0-.11.54v.02zm-.02-.03.11-.52-.06-.02c-.1.39-.3.42-.7.42-.22 0-.43 0-.44-.24v-.8H13c.24-.01.26.13.28.33l.07-.02a7.25 7.25 0 0 1 0-.76h-.07c-.02.18-.08.3-.29.3h-.42v-.92h.5c.35 0 .4.18.42.4l.07-.03a5.76 5.76 0 0 1 0-.5l-.86.02-.83-.01v.07h.03c.12 0 .27.02.27.2v1.8c0 .18-.15.2-.27.2h-.03V23l.89-.02zm.59-2c0-.26-.14-.27-.24-.27h-.06v-.1l.53.01.54-.01c.43 0 .81.12.81.6a.64.64 0 0 1-.47.6l.58.87a.38.38 0 0 0 .33.21v.1l-.33-.01-.32.01a9.45 9.45 0 0 1-.7-1.1h-.23v.73c0 .26.12.27.28.27h.06v.1l-.59-.01-.5.01v-.1h.07c.13 0 .24-.06.24-.18v-1.74zm.44.78h.16c.34 0 .53-.13.53-.53a.47.47 0 0 0-.5-.5 1.65 1.65 0 0 0-.2.02v1.01z"}),i("path",{d:"m16.27 23.03-.33-.02c-.1 0-.21.02-.33.01a9.54 9.54 0 0 1-.7-1.1h-.2v.72c0 .25.1.25.26.25h.07v.14h-.01l-.59-.02-.5.02v-.14H14c.12 0 .22-.05.23-.16v-1.74c0-.24-.13-.24-.23-.24h-.08v-.13h1.09c.43 0 .83.11.83.61a.65.65 0 0 1-.47.6l.57.87a.37.37 0 0 0 .32.2h.02v.13zm-1.58-1.14h.23a10.55 10.55 0 0 0 .7 1.1h.64v-.07a.39.39 0 0 1-.33-.2l-.6-.9h.02a.63.63 0 0 0 .47-.59c0-.47-.37-.58-.8-.58h-1.06v.07h.05c.1 0 .26.02.26.27v1.74c0 .13-.13.2-.26.2h-.05V23l.48-.02.57.02v-.07h-.04c-.16 0-.3-.02-.3-.3v-.74zm0-.1h-.02v-1.04h.01a1.63 1.63 0 0 1 .2-.01.48.48 0 0 1 .51.51c0 .4-.2.55-.54.55zm.16-.02c.34 0 .51-.12.51-.52a.45.45 0 0 0-.48-.48 1.33 1.33 0 0 0-.18.01v.99zm3.73.57h.01v-1.29a.28.28 0 0 0-.3-.32h-.07v-.1l.48.01.42-.01v.1h-.06c-.14 0-.3.03-.3.44v1.55a2.27 2.27 0 0 0 .02.34h-.13L16.9 21.1v1.41c0 .3.06.4.32.4h.06v.1l-.44-.01-.47.01v-.1h.05c.24 0 .3-.16.3-.43v-1.44a.3.3 0 0 0-.3-.3h-.05v-.11l.4.01.3-.01z"}),i("path",{d:"M18.78 23.08h-.14l-1.73-1.94v1.37c0 .3.05.38.3.38h.08v.14h-.01l-.44-.02-.47.02h-.01v-.14h.06c.23 0 .3-.14.3-.41v-1.44a.3.3 0 0 0-.3-.3h-.06v-.12h.71l1.5 1.69v-1.26c0-.27-.18-.3-.28-.3h-.09v-.13h.93v.13h-.07c-.14 0-.28.01-.28.42v1.55a2.15 2.15 0 0 0 .02.34v.02zm-.13-.03h.11a2.34 2.34 0 0 1-.01-.33v-1.55c0-.41.17-.45.31-.45h.04v-.07h-.87v.07h.06a.3.3 0 0 1 .32.33v1.3h-.02v.01l-1.52-1.71h-.68v.07h.03a.32.32 0 0 1 .32.32v1.44c0 .27-.07.44-.32.45h-.03V23l.45-.02.42.02v-.07h-.04c-.27 0-.34-.12-.34-.42v-1.44zm-.07-.71.01-.01v.01zm0 0v-.01zm1.08.18a1.38 1.38 0 0 0-.07.27c0 .1.14.12.25.12h.04v.1a7.72 7.72 0 0 0-.78 0v-.1h.02a.3.3 0 0 0 .3-.22l.54-1.57a2.87 2.87 0 0 0 .13-.42 1.73 1.73 0 0 0 .3-.15.08.08 0 0 1 .04 0 .02.02 0 0 1 .02 0l.03.1.63 1.78.12.34a.22.22 0 0 0 .23.14h.02v.1a9.66 9.66 0 0 0-.98 0v-.1h.03c.08 0 .22-.01.22-.1a1.1 1.1 0 0 0-.07-.25l-.14-.4h-.77l-.1.36zm.5-1.5-.32.96h.63l-.31-.97z"}),i("path",{d:"M21.48 23.03 21 23l-.51.02h-.02v-.14h.05c.08 0 .2-.01.2-.08a1.1 1.1 0 0 0-.07-.24l-.13-.39h-.75l-.1.35a1.41 1.41 0 0 0-.08.26c0 .08.13.1.24.1h.06v.14h-.02l-.41-.02-.37.02h-.01v-.14h.03a.3.3 0 0 0 .28-.2l.55-1.57a4.05 4.05 0 0 0 .13-.44 1.75 1.75 0 0 0 .31-.14.09.09 0 0 1 .03-.01.04.04 0 0 1 .04.02l.03.09.63 1.78c.04.12.08.25.13.35a.2.2 0 0 0 .2.12h.04v.14h-.01zM20.5 23l.5-.02.45.02v-.07a.23.23 0 0 1-.24-.15c-.05-.1-.09-.23-.13-.35l-.62-1.78-.03-.09h-.02a.08.08 0 0 0-.01 0 1.26 1.26 0 0 1-.3.14 2.83 2.83 0 0 1-.13.43l-.55 1.56a.32.32 0 0 1-.3.24h-.01V23l.35-.02.4.02v-.07h-.03c-.1 0-.26-.02-.27-.14a1.35 1.35 0 0 1 .08-.27h.01-.01l.11-.36h.8l.13.4a1.04 1.04 0 0 1 .07.25c0 .1-.15.11-.23.12h-.02zm-.7-1 .33-1h.03l.32 1zm.05-.04h.6l-.3-.91zm.28-.94h.01zm1.5-.22c-.26 0-.27.06-.32.31h-.1l.04-.29a2.1 2.1 0 0 0 .02-.29h.08c.03.1.11.1.2.1h1.76c.1 0 .18 0 .19-.1h.08l-.04.28v.28l-.1.04c-.02-.13-.03-.33-.26-.33h-.56v1.82c0 .26.12.29.28.29h.07v.1L22.4 23l-.57.01v-.1h.06c.19 0 .29-.02.29-.29V20.8h-.56"}),i("path",{d:"M22.97 23.03 22.4 23l-.57.02h-.02v-.14h.08c.19 0 .27 0 .27-.27v-1.8h-.54v-.03h.57v1.83c0 .28-.11.3-.3.3h-.05V23l.56-.02.54.02v-.07h-.05c-.16 0-.3-.05-.3-.31v-1.83h.58c.23 0 .26.2.26.32l.08-.03v-.27l.04-.26h-.05c-.02.1-.11.1-.2.1h-1.77c-.08 0-.17 0-.2-.1h-.06a2 2 0 0 1-.02.27c0 .1-.02.19-.04.28h.08c.04-.24.07-.32.33-.31v.03c-.26 0-.25.04-.3.3h-.14v-.01l.04-.29a1.98 1.98 0 0 0 .02-.29v-.01h.11c.03.1.1.1.18.1h1.77c.1 0 .17 0 .17-.1v-.01h.02l.1.02v.01l-.05.28v.28h-.01l-.12.05v-.02c-.01-.13-.03-.31-.24-.31h-.54v1.8c0 .25.1.27.26.27h.08v.14h-.01m.74-.12h.05c.12 0 .25-.02.25-.2v-1.78c0-.18-.13-.2-.25-.2h-.05v-.1l.5.01.54-.01v.1h-.05c-.12 0-.25.02-.25.2v1.79c0 .17.13.19.25.19h.05v.1L24.2 23l-.5.01z"}),i("path",{d:"M24.74 23.03 24.2 23l-.5.02h-.01v-.14h.06c.12 0 .24 0 .24-.17v-1.8c0-.16-.12-.17-.24-.17h-.06v-.13h1.07v.13h-.07c-.12 0-.23.01-.23.18v1.79c0 .16.1.17.23.17h.07v.14zm-.01-.03v-.07h-.04c-.12 0-.26-.03-.26-.21v-1.8c0-.18.14-.2.26-.2h.04v-.07H23.7v.07h.04c.12 0 .27.02.27.2v1.8c0 .18-.15.2-.27.2h-.03V23l.48-.02.53.02zm1.37-2.42a1.2 1.2 0 0 1 1.3 1.18 1.25 1.25 0 0 1-1.28 1.3 1.2 1.2 0 0 1-1.28-1.22 1.24 1.24 0 0 1 1.26-1.26m.05 2.33c.66 0 .78-.58.78-1.08s-.27-1.1-.84-1.1c-.6 0-.77.53-.77.99 0 .6.28 1.2.83 1.2"}),i("path",{d:"M24.83 21.84a1.26 1.26 0 0 1 1.27-1.28v.03a1.23 1.23 0 0 0-1.24 1.25 1.19 1.19 0 0 0 1.26 1.2 1.24 1.24 0 0 0 1.27-1.28 1.18 1.18 0 0 0-1.3-1.17v-.03a1.21 1.21 0 0 1 1.33 1.2 1.27 1.27 0 0 1-1.3 1.32 1.22 1.22 0 0 1-1.3-1.24m.48-.12c0-.46.18-1 .8-1 .57 0 .84.61.84 1.11s-.12 1.1-.79 1.1v-.03c.65 0 .76-.57.76-1.07s-.26-1.08-.82-1.09c-.58 0-.75.52-.76.98 0 .6.28 1.18.82 1.18v.03c-.56 0-.84-.6-.85-1.21m4.4.62v-1.29a.28.28 0 0 0-.3-.32h-.07v-.1l.48.01.42-.01v.1h-.05c-.15 0-.3.03-.3.44v1.55a2.2 2.2 0 0 0 .01.34h-.12L28 21.1v1.41c0 .3.06.4.32.4h.06v.1l-.44-.01-.46.01v-.1h.05c.23 0 .3-.16.3-.43v-1.44a.3.3 0 0 0-.3-.3h-.05v-.11l.39.01.3-.01 1.52 1.71"}),i("path",{d:"M29.9 23.08h-.15l-1.72-1.94v1.37c0 .3.05.38.3.38h.07v.14h-.01l-.44-.02-.46.02h-.02v-.14h.07c.22 0 .28-.14.29-.41v-1.44a.3.3 0 0 0-.3-.3h-.06v-.12h.72l1.5 1.69v-1.26c0-.27-.18-.3-.28-.3h-.1v-.13h.94v.13h-.06c-.14 0-.29.01-.3.42v1.55a2.26 2.26 0 0 0 .03.34v.02zm-.13-.03h.1a2.42 2.42 0 0 1-.01-.33v-1.55c0-.41.17-.45.32-.45h.03v-.07h-.86v.07h.06a.3.3 0 0 1 .3.33v1.3l-.01.01-1.52-1.71h-.68v.07h.03a.32.32 0 0 1 .33.32v1.44c0 .27-.08.44-.32.45h-.04V23l.45-.02.43.02v-.07h-.05c-.27 0-.33-.12-.33-.42v-1.44zm-.07-.71v-.01zm-.01 0v-.01zm1.09.18a1.43 1.43 0 0 0-.08.27c0 .1.14.12.26.12h.03v.1a7.71 7.71 0 0 0-.78 0v-.1h.02a.3.3 0 0 0 .3-.22l.55-1.57a2.79 2.79 0 0 0 .12-.42 1.75 1.75 0 0 0 .31-.15.07.07 0 0 1 .03 0 .02.02 0 0 1 .02 0l.03.1.63 1.78c.04.11.08.24.13.34a.22.22 0 0 0 .22.14h.02v.1a9.66 9.66 0 0 0-.98 0v-.1h.04c.08 0 .2-.01.2-.1a1.1 1.1 0 0 0-.06-.25l-.13-.4h-.78zm.5-1.5h-.01l-.32.96h.64l-.32-.97z"}),i("path",{d:"m32.59 23.03-.47-.02-.5.02h-.02v-.14h.05c.08 0 .2-.01.2-.08a1.06 1.06 0 0 0-.07-.24l-.13-.39h-.76l-.1.35a1.44 1.44 0 0 0-.07.26c0 .08.12.1.24.1H31v.14h-.02l-.4-.02-.38.02h-.01v-.14h.03a.3.3 0 0 0 .29-.2l.54-1.57a4.27 4.27 0 0 0 .14-.44 1.85 1.85 0 0 0 .3-.14.08.08 0 0 1 .04 0 .04.04 0 0 1 .04.01l.03.09.62 1.78c.04.12.08.25.13.35a.2.2 0 0 0 .2.12h.04v.14h-.01zm-.97-.03.5-.02.46.02v-.08h-.01a.23.23 0 0 1-.24-.14l-.12-.35-.63-1.78a3.61 3.61 0 0 1-.03-.09h-.01a.06.06 0 0 0-.02 0 1.3 1.3 0 0 1-.3.14 2.94 2.94 0 0 1-.13.43l-.55 1.56a.32.32 0 0 1-.3.24h-.01V23l.35-.02.4.02v-.07h-.02c-.11 0-.27-.02-.27-.14a1.42 1.42 0 0 1 .07-.27h.02-.02l.11-.36h.8l.13.4a1.07 1.07 0 0 1 .07.25c0 .1-.15.11-.22.12h-.03zm-.7-1 .34-1h.02l.33 1zm.05-.04h.6l-.3-.91zm2.48.72c0 .13.1.18.2.19a2.47 2.47 0 0 0 .45 0 .48.48 0 0 0 .33-.2.78.78 0 0 0 .1-.24h.1l-.12.58-.9-.01-.9.01v-.1h.05c.12 0 .25-.02.25-.23v-1.75c0-.18-.13-.2-.25-.2h-.05v-.1l.54.01.51-.01v.1h-.08c-.13 0-.23 0-.23.19z"}),i("path",{d:"m34.5 23.03-.9-.02-.9.02v-.14h.06c.12 0 .24 0 .24-.2v-1.76c0-.17-.12-.18-.24-.18h-.07v-.13h1.09v.13h-.1c-.13 0-.21 0-.22.17v1.76c0 .13.09.16.2.17l.18.01a2.46 2.46 0 0 0 .26-.01.48.48 0 0 0 .32-.18.77.77 0 0 0 .1-.24v-.01h.13v.02l-.13.58zm0-.03.11-.55h-.07a.77.77 0 0 1-.1.24.5.5 0 0 1-.34.19 2.6 2.6 0 0 1-.26.01h-.19c-.11-.02-.22-.07-.22-.21v-1.76c0-.2.12-.2.25-.2h.07v-.07h-1.03v.07h.04c.12 0 .27.02.27.2v1.76c0 .22-.15.24-.27.24h-.04V23l.89-.02.88.02zm.1-2.47a.36.36 0 1 1-.37.36.35.35 0 0 1 .36-.36zm0 .66a.3.3 0 1 0-.3-.3.29.29 0 0 0 .3.3zm-.19-.1v-.02c.05-.01.05 0 .05-.04v-.26c0-.04 0-.05-.05-.05v-.02h.19c.06 0 .12.03.12.1a.11.11 0 0 1-.09.1l.06.09a.38.38 0 0 0 .08.08v.01h-.07c-.03 0-.06-.07-.13-.16h-.04v.12c0 .02.01.02.06.03v.01zm.12-.2h.05c.04 0 .06-.03.06-.09s-.03-.08-.07-.08h-.04z"})),i("path",{fill:"#fff",d:"M13.33 8.58a5.77 5.77 0 1 1 5.76 5.78 5.77 5.77 0 0 1-5.76-5.78"}),i("path",{fill:"#154a78",d:"M22.58 8.47a3.48 3.48 0 0 0-2.23-3.24v6.48a3.48 3.48 0 0 0 2.23-3.24zm-4.7 3.24V5.23a3.47 3.47 0 0 0 0 6.48zM19.1 3a5.48 5.48 0 1 0 5.47 5.48A5.47 5.47 0 0 0 19.11 3zm0 11.48a5.99 5.99 0 0 1-6.03-5.94A5.9 5.9 0 0 1 19.1 2.5h1.55a6.1 6.1 0 0 1 6.24 6.03 6.22 6.22 0 0 1-6.24 5.94z"})),Bs=Cu;var vu=({opacity:t=1,reversed:e=!1})=>i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"19.5",fill:"none",viewBox:"0 0 40 26",opacity:t},!e&&i("path",{fill:"#fff",d:"M0 0h40v26H0z"}),i("g",{"clip-path":"url(#a)"},i("g",{"clip-path":"url(#b)"},i("path",{fill:e?"#fff":"#000",d:"M3.5 19.56a1.6 1.6 0 0 1 1.54-1.6h.06a1.52 1.52 0 0 1 1.42.77l-.43.25a1.02 1.02 0 0 0-.99-.59 1.13 1.13 0 0 0-1.14 1.11v.03a1.05 1.05 0 0 0 .99 1.14h.1a.94.94 0 0 0 1.04-.83H5.01v-.43h1.51v1.66h-.46v-.49l.03-.12a1.08 1.08 0 0 1-1.08.64 1.49 1.49 0 0 1-1.51-1.48v-.06Zm3.58-1.79h.46v3.33h-.46v-3.33Zm.92 2.2a1.2 1.2 0 1 1 .74 1.11A1.19 1.19 0 0 1 8 19.96Zm1.91 0a.74.74 0 1 0-1.48.06.72.72 0 0 0 .74.7.74.74 0 0 0 .74-.77Zm1.36.8v.33h-.46v-3.36h.46v1.4a.98.98 0 0 1 .77-.38 1.19 1.19 0 0 1 0 2.38.9.9 0 0 1-.77-.37Zm1.48-.8a.75.75 0 1 0-1.5-.04v.03a.76.76 0 1 0 1.5 0Zm.8.55c0-.46.28-.65.9-.74.43-.06.58-.1.58-.25s-.12-.37-.46-.37a.54.54 0 0 0-.58.43l-.44-.18a1.01 1.01 0 0 1 1.02-.65c.59 0 .96.3.96.86v1.48h-.43v-.33a.75.75 0 0 1-.74.4c-.5 0-.8-.28-.8-.65Zm1.33.06a.5.5 0 0 0 .19-.4v-.19c0 .1-.16.13-.5.16-.4.06-.55.15-.55.34 0 .15.15.28.37.28.18 0 .35-.07.49-.19Zm1.14-2.8h.46v3.32h-.46v-3.33Zm2.04.24h.5l1.53 2.34v-2.34h.47v3.12h-.47l-1.57-2.41v2.4h-.46v-3.11Zm2.96 1.94a1.18 1.18 0 0 1 1.17-1.2h.03a1.14 1.14 0 0 1 1.17 1.11v.25h-1.94a.77.77 0 0 0 .96.58c.2-.05.37-.17.49-.34l.37.22a1.18 1.18 0 0 1-1.05.56 1.15 1.15 0 0 1-1.2-1.11v-.07Zm.46-.21h1.45a.67.67 0 0 0-.7-.56.7.7 0 0 0-.75.56Zm2.56.61v-1.14h-.46v-.4h.46v-.5l.46-.3v.8h.62v.4h-.65v1.14c0 .25.13.37.31.37.12 0 .24-.03.34-.09v.43a.82.82 0 0 1-.37.1c-.46 0-.71-.25-.71-.8Zm1.36-1.54h.46l.52 1.67.62-1.67h.43l.62 1.67.55-1.67h.47l-.8 2.28h-.44l-.61-1.66-.65 1.7h-.46l-.71-2.32Zm3.88 1.14a1.2 1.2 0 1 1 .74 1.12 1.19 1.19 0 0 1-.74-1.12Zm1.92 0a.74.74 0 1 0-1.48.07.72.72 0 0 0 .74.7.74.74 0 0 0 .74-.77Zm.89-1.14h.46v.4a.72.72 0 0 1 .65-.4h.19v.46h-.28c-.37 0-.56.16-.56.6v1.22h-.46v-2.28Zm2.59 1.24-.4.43v.58h-.46v-3.3h.46V20l1.08-1.17h.55l-.89.96.92 1.32h-.52l-.74-1.04ZM5.2 10.16H3.72v5.18H5.2c.66.03 1.32-.18 1.85-.59a2.56 2.56 0 0 0 .92-1.97c0-1.54-1.14-2.62-2.77-2.62Zm1.2 3.88c-.3.28-.74.4-1.39.4h-.28v-3.39h.28a1.88 1.88 0 0 1 1.39.43 1.73 1.73 0 0 1 .55 1.3c0 .48-.2.93-.55 1.26Zm2.03-3.88h1.02v5.18H8.43v-5.18Zm3.49 2c-.62-.22-.77-.37-.77-.65 0-.34.3-.58.74-.58a.97.97 0 0 1 .8.43l.53-.68a2.32 2.32 0 0 0-1.52-.59 1.52 1.52 0 0 0-1.6 1.42v.06c0 .71.34 1.08 1.26 1.42.25.08.49.18.71.31a.64.64 0 0 1 .31.53.75.75 0 0 1-.74.74h-.03a1.29 1.29 0 0 1-1.1-.68l-.66.61a2 2 0 0 0 1.8 1 1.68 1.68 0 0 0 1.78-1.7c-.03-.87-.37-1.24-1.51-1.64Zm1.82.59a2.66 2.66 0 0 0 2.65 2.68h.06c.44 0 .88-.1 1.27-.3v-1.18a1.54 1.54 0 0 1-1.2.55 1.69 1.69 0 0 1-1.73-1.63v-.15a1.72 1.72 0 0 1 1.66-1.8h.03a1.64 1.64 0 0 1 1.27.6v-1.15c-.38-.2-.8-.31-1.23-.3a2.69 2.69 0 0 0-2.78 2.68Zm11.97.9-1.4-3.5h-1.07l2.19 5.31h.52l2.25-5.3h-1.1l-1.4 3.48Zm2.96 1.69h2.83v-.87h-1.85v-1.41h1.8v-.87h-1.8v-1.14h1.85v-.9h-2.83v5.19Zm6.84-3.64c0-.96-.68-1.51-1.82-1.51h-1.48v5.18h1.02v-2.1h.12l1.4 2.07h1.23l-1.64-2.2a1.36 1.36 0 0 0 1.17-1.44Zm-2.03.86h-.31V11h.3c.62 0 .96.28.96.77.03.52-.3.8-.95.8Zm2.84-2.13c0-.09-.07-.15-.19-.15h-.15v.46h.12v-.15l.12.18h.13l-.13-.21c.06 0 .1-.06.1-.13Zm-.19.07-.03-.13h.03c.06 0 .1.03.1.06-.04.07-.07.07-.1.07Z"})),i("path",{fill:e?"#fff":"#000",d:"M36.16 10.13a.4.4 0 0 0-.4.4.4.4 0 1 0 .8 0 .4.4 0 0 0-.4-.4Zm0 .74a.32.32 0 0 1-.34-.31.32.32 0 0 1 .65-.03.34.34 0 0 1-.3.34Z"}),i("path",{fill:"url(#c)",d:"M18.06 12.75a2.75 2.75 0 1 0 5.49 0 2.75 2.75 0 0 0-5.5 0Z"}),i("path",{fill:"url(#d)",d:"M18.06 12.75a2.75 2.75 0 1 0 5.49 0 2.75 2.75 0 0 0-5.5 0Z"}),i("mask",{id:"e",width:"6",height:"6",x:"18",y:"10",maskUnits:"userSpaceOnUse",style:"mask-type:luminance"},i("path",{fill:"#fff",d:"M18.06 12.75a2.74 2.74 0 1 0 5.49 0 2.74 2.74 0 0 0-5.5 0Z"})),i("g",{mask:"url(#e)"},i("path",{fill:"url(#f)",d:"M17.75 12.87a3.36 3.36 0 1 0 6.72 0 3.36 3.36 0 0 0-6.72 0Z"}))),i("g",{"clip-path":"url(#g)"},i("g",{"clip-path":"url(#h)"},i("path",{fill:e?"#fff":"#000",d:"M3.5 19.56a1.6 1.6 0 0 1 1.54-1.6h.06a1.52 1.52 0 0 1 1.42.77l-.43.25a1.02 1.02 0 0 0-.99-.59 1.13 1.13 0 0 0-1.14 1.11v.03a1.05 1.05 0 0 0 .99 1.14h.1a.94.94 0 0 0 1.04-.83H5.01v-.43h1.51v1.66h-.46v-.49l.03-.12a1.08 1.08 0 0 1-1.08.64 1.49 1.49 0 0 1-1.51-1.48v-.06Zm3.58-1.79h.46v3.33h-.46v-3.33Zm.92 2.2a1.2 1.2 0 1 1 .74 1.11A1.19 1.19 0 0 1 8 19.96Zm1.91 0a.74.74 0 1 0-1.48.06.72.72 0 0 0 .74.7.74.74 0 0 0 .74-.77Zm1.36.8v.33h-.46v-3.36h.46v1.4a.98.98 0 0 1 .77-.38 1.19 1.19 0 0 1 0 2.38.9.9 0 0 1-.77-.37Zm1.48-.8a.75.75 0 1 0-1.5-.04v.03a.76.76 0 1 0 1.5 0Zm.8.55c0-.46.28-.65.9-.74.43-.06.58-.1.58-.25s-.12-.37-.46-.37a.54.54 0 0 0-.58.43l-.44-.18a1.01 1.01 0 0 1 1.02-.65c.59 0 .96.3.96.86v1.48h-.43v-.33a.75.75 0 0 1-.74.4c-.5 0-.8-.28-.8-.65Zm1.33.06a.5.5 0 0 0 .19-.4v-.19c0 .1-.16.13-.5.16-.4.06-.55.15-.55.34 0 .15.15.28.37.28.18 0 .35-.07.49-.19Zm1.14-2.8h.46v3.32h-.46v-3.33Zm2.04.24h.5l1.53 2.34v-2.34h.47v3.12h-.47l-1.57-2.41v2.4h-.46v-3.11Zm2.96 1.94a1.18 1.18 0 0 1 1.17-1.2h.03a1.14 1.14 0 0 1 1.17 1.11v.25h-1.94a.77.77 0 0 0 .96.58c.2-.05.37-.17.49-.34l.37.22a1.18 1.18 0 0 1-1.05.56 1.15 1.15 0 0 1-1.2-1.11v-.07Zm.46-.21h1.45a.67.67 0 0 0-.7-.56.7.7 0 0 0-.75.56Zm2.56.61v-1.14h-.46v-.4h.46v-.5l.46-.3v.8h.62v.4h-.65v1.14c0 .25.13.37.31.37.12 0 .24-.03.34-.09v.43a.82.82 0 0 1-.37.1c-.46 0-.71-.25-.71-.8Zm1.36-1.54h.46l.52 1.67.62-1.67h.43l.62 1.67.55-1.67h.47l-.8 2.28h-.44l-.61-1.66-.65 1.7h-.46l-.71-2.32Zm3.88 1.14a1.2 1.2 0 1 1 .74 1.12 1.19 1.19 0 0 1-.74-1.12Zm1.92 0a.74.74 0 1 0-1.48.07.72.72 0 0 0 .74.7.74.74 0 0 0 .74-.77Zm.89-1.14h.46v.4a.72.72 0 0 1 .65-.4h.19v.46h-.28c-.37 0-.56.16-.56.6v1.22h-.46v-2.28Zm2.59 1.24-.4.43v.58h-.46v-3.3h.46V20l1.08-1.17h.55l-.89.96.92 1.32h-.52l-.74-1.04ZM5.2 10.16H3.72v5.18H5.2c.66.03 1.32-.18 1.85-.59a2.56 2.56 0 0 0 .92-1.97c0-1.54-1.14-2.62-2.77-2.62Zm1.2 3.88c-.3.28-.74.4-1.39.4h-.28v-3.39h.28a1.88 1.88 0 0 1 1.39.43 1.73 1.73 0 0 1 .55 1.3c0 .48-.2.93-.55 1.26Zm2.03-3.88h1.02v5.18H8.43v-5.18Zm3.49 2c-.62-.22-.77-.37-.77-.65 0-.34.3-.58.74-.58a.97.97 0 0 1 .8.43l.53-.68a2.32 2.32 0 0 0-1.52-.59 1.52 1.52 0 0 0-1.6 1.42v.06c0 .71.34 1.08 1.26 1.42.25.08.49.18.71.31a.64.64 0 0 1 .31.53.75.75 0 0 1-.74.74h-.03a1.29 1.29 0 0 1-1.1-.68l-.66.61a2 2 0 0 0 1.8 1 1.68 1.68 0 0 0 1.78-1.7c-.03-.87-.37-1.24-1.51-1.64Zm1.82.59a2.66 2.66 0 0 0 2.65 2.68h.06c.44 0 .88-.1 1.27-.3v-1.18a1.54 1.54 0 0 1-1.2.55 1.69 1.69 0 0 1-1.73-1.63v-.15a1.72 1.72 0 0 1 1.66-1.8h.03a1.64 1.64 0 0 1 1.27.6v-1.15c-.38-.2-.8-.31-1.23-.3a2.69 2.69 0 0 0-2.78 2.68Zm11.97.9-1.4-3.5h-1.07l2.19 5.31h.52l2.25-5.3h-1.1l-1.4 3.48Zm2.96 1.69h2.83v-.87h-1.85v-1.41h1.8v-.87h-1.8v-1.14h1.85v-.9h-2.83v5.19Zm6.84-3.64c0-.96-.68-1.51-1.82-1.51h-1.48v5.18h1.02v-2.1h.12l1.4 2.07h1.23l-1.64-2.2a1.36 1.36 0 0 0 1.17-1.44Zm-2.03.86h-.31V11h.3c.62 0 .96.28.96.77.03.52-.3.8-.95.8Zm2.84-2.13c0-.09-.07-.15-.19-.15h-.15v.46h.12v-.15l.12.18h.13l-.13-.21c.06 0 .1-.06.1-.13Zm-.19.07-.03-.13h.03c.06 0 .1.03.1.06-.04.07-.07.07-.1.07Z"})),i("path",{fill:e?"#fff":"#000",d:"M36.16 10.13a.4.4 0 0 0-.4.4.4.4 0 1 0 .8 0 .4.4 0 0 0-.4-.4Zm0 .74a.32.32 0 0 1-.34-.31.32.32 0 0 1 .65-.03.34.34 0 0 1-.3.34Z"}),i("path",{fill:"url(#i)",d:"M18.06 12.75a2.75 2.75 0 1 0 5.49 0 2.75 2.75 0 0 0-5.5 0Z"}),i("path",{fill:"url(#j)",d:"M18.06 12.75a2.75 2.75 0 1 0 5.49 0 2.75 2.75 0 0 0-5.5 0Z"}),i("mask",{id:"k",width:"6",height:"6",x:"18",y:"10",maskUnits:"userSpaceOnUse",style:"mask-type:luminance"},i("path",{fill:"#fff",d:"M18.06 12.75a2.74 2.74 0 1 0 5.49 0 2.74 2.74 0 0 0-5.5 0Z"})),i("g",{mask:"url(#k)"},i("path",{fill:"url(#l)",d:"M17.75 12.87a3.36 3.36 0 1 0 6.72 0 3.36 3.36 0 0 0-6.72 0Z"}))),i("defs",null,i("linearGradient",{id:"c",x1:"22.25",x2:"19.35",y1:"15.06",y2:"10.42",gradientUnits:"userSpaceOnUse"},i("stop",{offset:"0","stop-color":"#F59F00"}),i("stop",{offset:".19","stop-color":"#F49B00"}),i("stop",{offset:".37","stop-color":"#F29101"}),i("stop",{offset:".5","stop-color":"#F08302"}),i("stop",{offset:".6","stop-color":"#EE7905"}),i("stop",{offset:".76","stop-color":"#EC7008"}),i("stop",{offset:"1","stop-color":"#EC6D09"})),i("linearGradient",{id:"d",x1:"22.25",x2:"19.35",y1:"15.06",y2:"10.42",gradientUnits:"userSpaceOnUse"},i("stop",{offset:"0","stop-color":"#F3941E","stop-opacity":"0"}),i("stop",{offset:".04","stop-color":"#F48C1C","stop-opacity":".08"}),i("stop",{offset:".2","stop-color":"#F77314","stop-opacity":".32"}),i("stop",{offset:".35","stop-color":"#F95D0E","stop-opacity":".53"}),i("stop",{offset:".5","stop-color":"#FB4B09","stop-opacity":".7"}),i("stop",{offset:".64","stop-color":"#FD3D05","stop-opacity":".83"}),i("stop",{offset:".77","stop-color":"#FE3302","stop-opacity":".92"}),i("stop",{offset:".9","stop-color":"#FF2D01","stop-opacity":".98"}),i("stop",{offset:"1","stop-color":"#FF2B00"})),i("radialGradient",{id:"f",cx:"0",cy:"0",r:"1",gradientTransform:"rotate(4.24 -167.26 291.02) scale(3.3208)",gradientUnits:"userSpaceOnUse"},i("stop",{offset:"0","stop-color":"#F3941E","stop-opacity":"0"}),i("stop",{offset:".45","stop-color":"#EA8D1D","stop-opacity":".05"}),i("stop",{offset:".66","stop-color":"#CA7618","stop-opacity":".2"}),i("stop",{offset:".83","stop-color":"#924D10","stop-opacity":".48"}),i("stop",{offset:".96","stop-color":"#441304","stop-opacity":".87"}),i("stop",{offset:".99","stop-color":"#2F0401","stop-opacity":".97"})),i("linearGradient",{id:"i",x1:"22.25",x2:"19.35",y1:"15.06",y2:"10.42",gradientUnits:"userSpaceOnUse"},i("stop",{offset:"0","stop-color":"#F59F00"}),i("stop",{offset:".19","stop-color":"#F49B00"}),i("stop",{offset:".37","stop-color":"#F29101"}),i("stop",{offset:".5","stop-color":"#F08302"}),i("stop",{offset:".6","stop-color":"#EE7905"}),i("stop",{offset:".76","stop-color":"#EC7008"}),i("stop",{offset:"1","stop-color":"#EC6D09"})),i("linearGradient",{id:"j",x1:"22.25",x2:"19.35",y1:"15.06",y2:"10.42",gradientUnits:"userSpaceOnUse"},i("stop",{offset:"0","stop-color":"#F3941E","stop-opacity":"0"}),i("stop",{offset:".04","stop-color":"#F48C1C","stop-opacity":".08"}),i("stop",{offset:".2","stop-color":"#F77314","stop-opacity":".32"}),i("stop",{offset:".35","stop-color":"#F95D0E","stop-opacity":".53"}),i("stop",{offset:".5","stop-color":"#FB4B09","stop-opacity":".7"}),i("stop",{offset:".64","stop-color":"#FD3D05","stop-opacity":".83"}),i("stop",{offset:".77","stop-color":"#FE3302","stop-opacity":".92"}),i("stop",{offset:".9","stop-color":"#FF2D01","stop-opacity":".98"}),i("stop",{offset:"1","stop-color":"#FF2B00"})),i("radialGradient",{id:"l",cx:"0",cy:"0",r:"1",gradientTransform:"rotate(4.24 -167.26 291.02) scale(3.3208)",gradientUnits:"userSpaceOnUse"},i("stop",{offset:"0","stop-color":"#F3941E","stop-opacity":"0"}),i("stop",{offset:".45","stop-color":"#EA8D1D","stop-opacity":".05"}),i("stop",{offset:".66","stop-color":"#CA7618","stop-opacity":".2"}),i("stop",{offset:".83","stop-color":"#924D10","stop-opacity":".48"}),i("stop",{offset:".96","stop-color":"#441304","stop-opacity":".87"}),i("stop",{offset:".99","stop-color":"#2F0401","stop-opacity":".97"})),i("clipPath",{id:"a"},i("path",{fill:"#fff",d:"M0 0h33v5.55H0z",transform:"translate(3.5 10)"})),i("clipPath",{id:"b"},i("path",{fill:"#fff",d:"M0 0h33v5.86H0z",transform:"translate(3.5 10)"})),i("clipPath",{id:"g"},i("path",{fill:"#fff",d:"M0 0h33v5.55H0z",transform:"translate(3.5 10)"})),i("clipPath",{id:"h"},i("path",{fill:"#fff",d:"M0 0h33v5.86H0z",transform:"translate(3.5 10)"})))),Us=vu;var bu=({opacity:t=1})=>i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 40 26",width:"30",height:"19.5",opacity:t},i("rect",{width:"45.3",height:"27",x:"-3.3",y:"-.79",fill:"#fff",rx:"2.82"}),i("path",{fill:"#01798a",d:"M27.27-.79a4.06 4.06 0 0 0-3.6 2.8l-4.96 23.42a2.14 2.14 0 0 0 2 2.8h18.35a2.81 2.81 0 0 0 2.8-2.82V1.15A2.25 2.25 0 0 0 40-.8"}),i("rect",{width:"20.38",height:"29.02",x:"-4",y:"-.79",fill:"#dc1f2b",rx:"2.82"}),i("path",{fill:"#1a4580",d:"M24.37 2.02a3.98 3.98 0 0 1 3.48-2.8H14.18a3.97 3.97 0 0 0-3.5 2.8l-4.85 23.4a2.13 2.13 0 0 0 1.94 2.81h13.7a2.13 2.13 0 0 1-1.94-2.8z"}),i("path",{fill:"#fff",d:"M16.63 15.04h.18a.32.32 0 0 0 .32-.17l.46-.7h1.24l-.26.47h1.49l-.2.7H18.1a.82.82 0 0 1-.75.44h-.92zm-.2 1h3.25l-.21.77h-1.3l-.2.74h1.27l-.21.77h-1.27l-.3 1.09c-.07.18.02.26.29.24h1.03l-.19.71H16.6q-.57 0-.39-.65l.38-1.4h-.81l.2-.76h.82l.2-.74h-.78l.2-.76zm5.19-1.87-.06.45a2.37 2.37 0 0 1 1.18-.47h2.05l-.78 2.88q-.1.5-.84.5h-2.34l-.54 2.01c-.03.11.01.17.13.17h.46l-.17.62h-1.17q-.67 0-.56-.4l1.54-5.76zm1.74.81h-1.84l-.22.78a1.52 1.52 0 0 1 .82-.23h1.1zm-.67 1.8c.14.02.22-.03.22-.16l.12-.4h-1.84l-.16.57zm-1.24.93h1.06l-.02.47h.29c.14 0 .2-.05.2-.14l.1-.3h.87l-.11.44a.76.76 0 0 1-.8.57h-.56v.8c-.01.12.1.18.33.18h.53l-.17.63H21.9c-.36.02-.53-.15-.53-.52zM8.6 10.34a2.62 2.62 0 0 1-1 1.64 3.24 3.24 0 0 1-1.98.58 2.16 2.16 0 0 1-1.68-.59 1.54 1.54 0 0 1-.37-1.06 2.86 2.86 0 0 1 .06-.57l.87-4.2h1.3l-.85 4.15a1.35 1.35 0 0 0-.04.32.82.82 0 0 0 .16.52.89.89 0 0 0 .75.3 1.56 1.56 0 0 0 1-.3 1.37 1.37 0 0 0 .5-.84l.84-4.15h1.3zm5.47-1.65h1.02l-.8 3.74h-1.02zm.32-1.37h1.03l-.2.91H14.2l.19-.9M16 12.15a1.39 1.39 0 0 1-.41-1.05 2.45 2.45 0 0 1 .01-.25l.04-.27a2.55 2.55 0 0 1 .78-1.45 2.07 2.07 0 0 1 1.43-.54 1.5 1.5 0 0 1 1.1.39 1.4 1.4 0 0 1 .4 1.06 2.59 2.59 0 0 1-.02.26l-.05.28a2.48 2.48 0 0 1-.77 1.42 2.08 2.08 0 0 1-1.43.53 1.5 1.5 0 0 1-1.09-.38m1.95-.74a1.84 1.84 0 0 0 .38-.9.58.58 0 0 0 .03-.19 1.74 1.74 0 0 0 .01-.17.76.76 0 0 0-.17-.54.64.64 0 0 0-.5-.2.89.89 0 0 0-.7.3 1.9 1.9 0 0 0-.38.92l-.03.18a1.36 1.36 0 0 0-.01.17.75.75 0 0 0 .17.54.64.64 0 0 0 .5.18.9.9 0 0 0 .7-.3m8.02 3.67.25-.87h1.24l-.05.32a3.1 3.1 0 0 1 1.09-.32h1.54l-.25.87h-.24l-1.16 4.12h.24l-.23.82h-.24l-.1.36h-1.2l.1-.36h-2.38l.23-.82h.24l1.16-4.12zm1.34 0L27 16.2a5.13 5.13 0 0 1 1-.27c.1-.4.24-.85.24-.85zm-.46 1.64-.32 1.17a3.44 3.44 0 0 1 1.01-.33l.24-.84zm.23 2.48.24-.84h-.93l-.24.84zm3.01-5.05h1.17l.05.44c0 .11.06.16.2.16h.2l-.2.74h-.87c-.32.02-.5-.1-.5-.38zm-.34 1.59h3.79l-.23.79h-1.2l-.2.74h1.2l-.23.79h-1.34l-.3.46h.65l.16.93c.01.09.1.13.23.13h.2l-.2.77h-.73c-.37.02-.57-.1-.58-.38l-.18-.85-.6.9a.65.65 0 0 1-.65.36h-1.1l.22-.77h.34a.46.46 0 0 0 .36-.19l.94-1.36h-1.2l.22-.8h1.3l.21-.73h-1.3l.22-.8zM9.8 8.69h.92l-.1.54.12-.16a1.43 1.43 0 0 1 1.1-.48 1 1 0 0 1 .83.34 1.15 1.15 0 0 1 .14.95l-.5 2.56h-.95l.46-2.32a.74.74 0 0 0-.04-.53.44.44 0 0 0-.4-.17.88.88 0 0 0-.62.23 1.14 1.14 0 0 0-.34.63L10 12.44h-.94zm10.55 0h.92l-.1.54.13-.16a1.43 1.43 0 0 1 1.08-.48.99.99 0 0 1 .85.34 1.14 1.14 0 0 1 .13.95l-.5 2.56h-.95l.46-2.32a.75.75 0 0 0-.04-.53.45.45 0 0 0-.4-.17.89.89 0 0 0-.62.23 1.12 1.12 0 0 0-.33.63l-.43 2.16h-.94zm4.55-2.33h2.67a1.8 1.8 0 0 1 1.19.35 1.25 1.25 0 0 1 .4 1v.02a3.77 3.77 0 0 1-.06.59 2.38 2.38 0 0 1-.81 1.4 2.29 2.29 0 0 1-1.5.52h-1.44l-.44 2.2h-1.24zm.67 2.82h1.19a1.14 1.14 0 0 0 .73-.21 1.14 1.14 0 0 0 .36-.67l.03-.15v-.13a.52.52 0 0 0-.22-.47 1.35 1.35 0 0 0-.72-.15h-1zm9.15 3.98a5.91 5.91 0 0 1-.98 1.56 1.99 1.99 0 0 1-1.7.71l.08-.64c.89-.27 1.36-1.51 1.64-2.06l-.33-4.03.68-.01h.58l.06 2.53 1.07-2.53h1.09zM31.68 9l-.43.3a1.35 1.35 0 0 0-1.66-.21c-1.08.5-1.98 4.4 1 3.11l.17.2 1.17.04.77-3.54zm-.66 1.92c-.2.56-.61.94-.94.83-.33-.1-.45-.64-.26-1.2.19-.57.61-.94.94-.83.33.1.45.64.26 1.2"})),Vs=bu;N(`.straumur__tooltip__content{position:absolute;z-index:50;padding:var(--straumur__space-s);border-radius:var(--straumur__border-radius-s);right:40%;width:max-content;color:var(--straumur__color-white);background-color:var(--straumur__color-primary);box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d}.straumur__tooltip__content--bottom{top:100%}.straumur__tooltip__content--top{bottom:100%}
|
|
4
|
+
`);var Zt=({children:t,content:e,placement:r="bottom"})=>{let[o,n]=R(!1),a=pe(null);return i("div",{style:{position:"relative"}},i("div",{ref:a,onMouseEnter:()=>{n(!0)},onMouseLeave:()=>{n(!1)}},t),o&&a&&i("div",{className:`straumur__tooltip__content straumur__tooltip__content--${r}`},e))};function Vn(t){let e=()=>window.matchMedia(t).matches,[r,o]=R(e);return oe(()=>{let n=window.matchMedia(t),a=s=>o(s.matches);return o(n.matches),n.addEventListener("change",a),()=>{n.removeEventListener("change",a)}},[t]),r}var Hs=["visa","mc","maestro","amex","jcb","cup"],Ys=t=>{let e=Hs.indexOf(t);return e===-1?Hs.length:e};function yo({brands:t,brandHidden:e=[],limit:r=4,theme:o="light"}){let n=Vn("(max-width: 380px)"),s=Vn("(max-width: 335px)")?1:n?2:r,l=t.filter(c=>!e.some(u=>u.brand===c.brand)).sort((c,u)=>Ys(c.brand)-Ys(u.brand));return i(ie,null,l.map(({brand:c},u)=>u>=Math.min(r,s)?u===Math.min(r,s)?i(Zt,{content:i("span",{style:{display:"flex",gap:"4px",overflow:"visible"}},l.slice(Math.min(r,s)).map(({brand:p})=>i(_o,{key:p,brand:p,theme:o})))},i("span",{key:c,className:"straumur__render-brand-icons__overflow"},"+",l.length-Math.min(r,s))):null:i(_o,{key:c,brand:c,theme:o})))}var Hn=(t,e)=>e?i("span",{className:"straumur__brand-chip"},t):t,_o=({brand:t,theme:e="light",defaultToBrandName:r=!0})=>{let o=e==="dark";switch(t){case"visa":return i(Os,{reversed:o});case"mc":return i(Ns,{reversed:o});case"maestro":return i(Ms,{reversed:o});case"discover":return i(Us,{reversed:o});case"amex":return i(Fs,null);case"jcb":return Hn(i(Ls,null),o);case"diners":return Hn(i(Bs,null),o);case"cup":return Hn(i(Vs,null),o);default:return r?i("span",null,t):i(ie,null)}};var bo,j,js,wt,Ks,$s,Yn,$n,Kn,Gn,Ws,Pr={},Zs=[],Eu=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Eo=Array.isArray;function st(t,e){for(var r in e)t[r]=e[r];return t}function qs(t){var e=t.parentNode;e&&e.removeChild(t)}function _(t,e,r){var o,n,a,s={};for(a in e)a=="key"?o=e[a]:a=="ref"?n=e[a]:s[a]=e[a];if(arguments.length>2&&(s.children=arguments.length>3?bo.call(arguments,2):r),typeof t=="function"&&t.defaultProps!=null)for(a in t.defaultProps)s[a]===void 0&&(s[a]=t.defaultProps[a]);return Co(t,s,o,n,null)}function Co(t,e,r,o,n){var a={type:t,props:e,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:n??++js,__i:-1,__u:0};return n==null&&j.vnode!=null&&j.vnode(a),a}function it(t){return t.children}function H(t,e){this.props=t,this.context=e}function It(t,e){if(e==null)return t.__?It(t.__,t.__i+1):null;for(var r;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null)return r.__e;return typeof t.type=="function"?It(t):null}function Xs(t){var e,r;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null){t.__e=t.__c.base=r.__e;break}return Xs(t)}}function zn(t){(!t.__d&&(t.__d=!0)&&wt.push(t)&&!vo.__r++||Ks!==j.debounceRendering)&&((Ks=j.debounceRendering)||$s)(vo)}function vo(){var t,e,r,o,n,a,s,l;for(wt.sort(Yn);t=wt.shift();)t.__d&&(e=wt.length,o=void 0,a=(n=(r=t).__v).__e,s=[],l=[],r.__P&&((o=st({},n)).__v=n.__v+1,j.vnode&&j.vnode(o),Zn(r.__P,o,n,r.__n,r.__P.namespaceURI,32&n.__u?[a]:null,s,a??It(n),!!(32&n.__u),l),o.__v=n.__v,o.__.__k[o.__i]=o,ei(s,o,l),o.__e!=a&&Xs(o)),wt.length>e&&wt.sort(Yn));vo.__r=0}function Js(t,e,r,o,n,a,s,l,c,u,p){var d,h,m,C,g,v=o&&o.__k||Zs,f=e.length;for(r.__d=c,Su(r,e,v),c=r.__d,d=0;d<f;d++)(m=r.__k[d])!=null&&typeof m!="boolean"&&typeof m!="function"&&(h=m.__i===-1?Pr:v[m.__i]||Pr,m.__i=d,Zn(t,m,h,n,a,s,l,c,u,p),C=m.__e,m.ref&&h.ref!=m.ref&&(h.ref&&qn(h.ref,null,m),p.push(m.ref,m.__c||C,m)),g==null&&C!=null&&(g=C),65536&m.__u||h.__k===m.__k?(c&&typeof m.type=="string"&&!t.contains(c)&&(c=It(h)),c=Qs(m,c,t)):typeof m.type=="function"&&m.__d!==void 0?c=m.__d:C&&(c=C.nextSibling),m.__d=void 0,m.__u&=-196609);r.__d=c,r.__e=g}function Su(t,e,r){var o,n,a,s,l,c=e.length,u=r.length,p=u,d=0;for(t.__k=[],o=0;o<c;o++)s=o+d,(n=t.__k[o]=(n=e[o])==null||typeof n=="boolean"||typeof n=="function"?null:typeof n=="string"||typeof n=="number"||typeof n=="bigint"||n.constructor==String?Co(null,n,null,null,null):Eo(n)?Co(it,{children:n},null,null,null):n.constructor===void 0&&n.__b>0?Co(n.type,n.props,n.key,n.ref?n.ref:null,n.__v):n)!=null?(n.__=t,n.__b=t.__b+1,l=Pu(n,r,s,p),n.__i=l,a=null,l!==-1&&(p--,(a=r[l])&&(a.__u|=131072)),a==null||a.__v===null?(l==-1&&d--,typeof n.type!="function"&&(n.__u|=65536)):l!==s&&(l==s-1?d=l-s:l==s+1?d++:l>s?p>c-s?d+=l-s:d--:l<s&&d++,l!==o+d&&(n.__u|=65536))):(a=r[s])&&a.key==null&&a.__e&&!(131072&a.__u)&&(a.__e==t.__d&&(t.__d=It(a)),jn(a,a,!1),r[s]=null,p--);if(p)for(o=0;o<u;o++)(a=r[o])!=null&&!(131072&a.__u)&&(a.__e==t.__d&&(t.__d=It(a)),jn(a,a))}function Qs(t,e,r){var o,n;if(typeof t.type=="function"){for(o=t.__k,n=0;o&&n<o.length;n++)o[n]&&(o[n].__=t,e=Qs(o[n],e,r));return e}t.__e!=e&&(r.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType===8);return e}function Wn(t,e){return e=e||[],t==null||typeof t=="boolean"||(Eo(t)?t.some(function(r){Wn(r,e)}):e.push(t)),e}function Pu(t,e,r,o){var n=t.key,a=t.type,s=r-1,l=r+1,c=e[r];if(c===null||c&&n==c.key&&a===c.type&&!(131072&c.__u))return r;if(o>(c==null||131072&c.__u?0:1))for(;s>=0||l<e.length;){if(s>=0){if((c=e[s])&&!(131072&c.__u)&&n==c.key&&a===c.type)return s;s--}if(l<e.length){if((c=e[l])&&!(131072&c.__u)&&n==c.key&&a===c.type)return l;l++}}return-1}function Gs(t,e,r){e[0]==="-"?t.setProperty(e,r??""):t[e]=r==null?"":typeof r!="number"||Eu.test(e)?r:r+"px"}function go(t,e,r,o,n){var a;e:if(e==="style")if(typeof r=="string")t.style.cssText=r;else{if(typeof o=="string"&&(t.style.cssText=o=""),o)for(e in o)r&&e in r||Gs(t.style,e,"");if(r)for(e in r)o&&r[e]===o[e]||Gs(t.style,e,r[e])}else if(e[0]==="o"&&e[1]==="n")a=e!==(e=e.replace(/(PointerCapture)$|Capture$/i,"$1")),e=e.toLowerCase()in t||e==="onFocusOut"||e==="onFocusIn"?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+a]=r,r?o?r.u=o.u:(r.u=$n,t.addEventListener(e,a?Gn:Kn,a)):t.removeEventListener(e,a?Gn:Kn,a);else{if(n=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&e[4]!=="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&r==1?"":r))}}function zs(t){return function(e){if(this.l){var r=this.l[e.type+t];if(e.t==null)e.t=$n++;else if(e.t<r.u)return;return r(j.event?j.event(e):e)}}}function Zn(t,e,r,o,n,a,s,l,c,u){var p,d,h,m,C,g,v,f,y,I,E,K,F,W,ne,L,B=e.type;if(e.constructor!==void 0)return null;128&r.__u&&(c=!!(32&r.__u),a=[l=e.__e=r.__e]),(p=j.__b)&&p(e);e:if(typeof B=="function")try{if(f=e.props,y="prototype"in B&&B.prototype.render,I=(p=B.contextType)&&o[p.__c],E=p?I?I.props.value:p.__:o,r.__c?v=(d=e.__c=r.__c).__=d.__E:(y?e.__c=d=new B(f,E):(e.__c=d=new H(f,E),d.constructor=B,d.render=Tu),I&&I.sub(d),d.props=f,d.state||(d.state={}),d.context=E,d.__n=o,h=d.__d=!0,d.__h=[],d._sb=[]),y&&d.__s==null&&(d.__s=d.state),y&&B.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=st({},d.__s)),st(d.__s,B.getDerivedStateFromProps(f,d.__s))),m=d.props,C=d.state,d.__v=e,h)y&&B.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),y&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(y&&B.getDerivedStateFromProps==null&&f!==m&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(f,E),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(f,d.__s,E)===!1||e.__v===r.__v)){for(e.__v!==r.__v&&(d.props=f,d.state=d.__s,d.__d=!1),e.__e=r.__e,e.__k=r.__k,e.__k.forEach(function(U){U&&(U.__=e)}),K=0;K<d._sb.length;K++)d.__h.push(d._sb[K]);d._sb=[],d.__h.length&&s.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(f,d.__s,E),y&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(m,C,g)})}if(d.context=E,d.props=f,d.__P=t,d.__e=!1,F=j.__r,W=0,y){for(d.state=d.__s,d.__d=!1,F&&F(e),p=d.render(d.props,d.state,d.context),ne=0;ne<d._sb.length;ne++)d.__h.push(d._sb[ne]);d._sb=[]}else do d.__d=!1,F&&F(e),p=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++W<25);d.state=d.__s,d.getChildContext!=null&&(o=st(st({},o),d.getChildContext())),y&&!h&&d.getSnapshotBeforeUpdate!=null&&(g=d.getSnapshotBeforeUpdate(m,C)),Js(t,Eo(L=p!=null&&p.type===it&&p.key==null?p.props.children:p)?L:[L],e,r,o,n,a,s,l,c,u),d.base=e.__e,e.__u&=-161,d.__h.length&&s.push(d),v&&(d.__E=d.__=null)}catch(U){e.__v=null,c||a!=null?(e.__e=l,e.__u|=c?160:32,a[a.indexOf(l)]=null):(e.__e=r.__e,e.__k=r.__k),j.__e(U,e,r)}else a==null&&e.__v===r.__v?(e.__k=r.__k,e.__e=r.__e):e.__e=Ru(r.__e,e,r,o,n,a,s,c,u);(p=j.diffed)&&p(e)}function ei(t,e,r){e.__d=void 0;for(var o=0;o<r.length;o++)qn(r[o],r[++o],r[++o]);j.__c&&j.__c(e,t),t.some(function(n){try{t=n.__h,n.__h=[],t.some(function(a){a.call(n)})}catch(a){j.__e(a,n.__v)}})}function Ru(t,e,r,o,n,a,s,l,c){var u,p,d,h,m,C,g,v=r.props,f=e.props,y=e.type;if(y==="svg"?n="http://www.w3.org/2000/svg":y==="math"?n="http://www.w3.org/1998/Math/MathML":n||(n="http://www.w3.org/1999/xhtml"),a!=null){for(u=0;u<a.length;u++)if((m=a[u])&&"setAttribute"in m==!!y&&(y?m.localName===y:m.nodeType===3)){t=m,a[u]=null;break}}if(t==null){if(y===null)return document.createTextNode(f);t=document.createElementNS(n,y,f.is&&f),a=null,l=!1}if(y===null)v===f||l&&t.data===f||(t.data=f);else{if(a=a&&bo.call(t.childNodes),v=r.props||Pr,!l&&a!=null)for(v={},u=0;u<t.attributes.length;u++)v[(m=t.attributes[u]).name]=m.value;for(u in v)if(m=v[u],u!="children"){if(u=="dangerouslySetInnerHTML")d=m;else if(u!=="key"&&!(u in f)){if(u=="value"&&"defaultValue"in f||u=="checked"&&"defaultChecked"in f)continue;go(t,u,null,m,n)}}for(u in f)m=f[u],u=="children"?h=m:u=="dangerouslySetInnerHTML"?p=m:u=="value"?C=m:u=="checked"?g=m:u==="key"||l&&typeof m!="function"||v[u]===m||go(t,u,m,v[u],n);if(p)l||d&&(p.__html===d.__html||p.__html===t.innerHTML)||(t.innerHTML=p.__html),e.__k=[];else if(d&&(t.innerHTML=""),Js(t,Eo(h)?h:[h],e,r,o,y==="foreignObject"?"http://www.w3.org/1999/xhtml":n,a,s,a?a[0]:r.__k&&It(r,0),l,c),a!=null)for(u=a.length;u--;)a[u]!=null&&qs(a[u]);l||(u="value",C!==void 0&&(C!==t[u]||y==="progress"&&!C||y==="option"&&C!==v[u])&&go(t,u,C,v[u],n),u="checked",g!==void 0&&g!==t[u]&&go(t,u,g,v[u],n))}return t}function qn(t,e,r){try{typeof t=="function"?t(e):t.current=e}catch(o){j.__e(o,r)}}function jn(t,e,r){var o,n;if(j.unmount&&j.unmount(t),(o=t.ref)&&(o.current&&o.current!==t.__e||qn(o,null,e)),(o=t.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(a){j.__e(a,e)}o.base=o.__P=null}if(o=t.__k)for(n=0;n<o.length;n++)o[n]&&jn(o[n],e,r||typeof t.type!="function");r||t.__e==null||qs(t.__e),t.__c=t.__=t.__e=t.__d=void 0}function Tu(t,e,r){return this.constructor(t,r)}function Xn(t,e,r){var o,n,a;j.__&&j.__(t,e),o=e.__k,n=[],a=[],Zn(e,t=e.__k=_(it,null,[t]),o||Pr,Pr,e.namespaceURI,o?null:e.firstChild?bo.call(e.childNodes):null,n,o?o.__e:e.firstChild,!1,a),ei(n,t,a)}function ti(t,e){var r={__c:e="__cC"+Ws++,__:t,Consumer:function(o,n){return o.children(n)},Provider:function(o){var n,a;return this.getChildContext||(n=[],(a={})[e]=this,this.getChildContext=function(){return a},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&n.some(function(l){l.__e=!0,zn(l)})},this.sub=function(s){n.push(s);var l=s.componentWillUnmount;s.componentWillUnmount=function(){n&&n.splice(n.indexOf(s),1),l&&l.call(s)}}),o.children}};return r.Provider.__=r.Consumer.contextType=r}bo=Zs.slice,j={__e:function(t,e,r,o){for(var n,a,s;e=e.__;)if((n=e.__c)&&!n.__)try{if((a=n.constructor)&&a.getDerivedStateFromError!=null&&(n.setState(a.getDerivedStateFromError(t)),s=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(t,o||{}),s=n.__d),s)return n.__E=n}catch(l){t=l}throw t}},js=0,H.prototype.setState=function(t,e){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=st({},this.state),typeof t=="function"&&(t=t(st({},r),this.props)),t&&st(r,t),t!=null&&this.__v&&(e&&this._sb.push(e),zn(this))},H.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),zn(this))},H.prototype.render=it,wt=[],$s=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Yn=function(t,e){return t.__v.__b-e.__v.__b},vo.__r=0,$n=0,Kn=zs(!1),Gn=zs(!0),Ws=0;var qt,Z,Jn,ri,Rr=0,ci=[],le=j,oi=le.__b,ni=le.__r,ai=le.diffed,si=le.__c,ii=le.unmount,li=le.__;function Po(t,e){le.__h&&le.__h(Z,t,Rr||e),Rr=0;var r=Z.__H||(Z.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({}),r.__[t]}function ge(t){return Rr=1,Au(hi,t)}function Au(t,e,r){var o=Po(qt++,2);if(o.t=t,!o.__c&&(o.__=[r?r(e):hi(void 0,e),function(l){var c=o.__N?o.__N[0]:o.__[0],u=o.t(c,l);c!==u&&(o.__N=[u,o.__[1]],o.__c.setState({}))}],o.__c=Z,!Z.u)){var n=function(l,c,u){if(!o.__c.__H)return!0;var p=o.__c.__H.__.filter(function(h){return!!h.__c});if(p.every(function(h){return!h.__N}))return!a||a.call(this,l,c,u);var d=!1;return p.forEach(function(h){if(h.__N){var m=h.__[0];h.__=h.__N,h.__N=void 0,m!==h.__[0]&&(d=!0)}}),!(!d&&o.__c.props===l)&&(!a||a.call(this,l,c,u))};Z.u=!0;var a=Z.shouldComponentUpdate,s=Z.componentWillUpdate;Z.componentWillUpdate=function(l,c,u){if(this.__e){var p=a;a=void 0,n(l,c,u),a=p}s&&s.call(this,l,c,u)},Z.shouldComponentUpdate=n}return o.__N||o.__}function Ze(t,e){var r=Po(qt++,3);!le.__s&&mi(r.__H,e)&&(r.__=t,r.i=e,Z.__H.__h.push(r))}function lt(t){return Rr=5,Ro(function(){return{current:t}},[])}function Ro(t,e){var r=Po(qt++,7);return mi(r.__H,e)&&(r.__=t(),r.__H=e,r.__h=t),r.__}function ui(t,e){return Rr=8,Ro(function(){return t},e)}function pi(t){var e=Z.context[t.__c],r=Po(qt++,9);return r.c=t,e?(r.__==null&&(r.__=!0,e.sub(Z)),e.props.value):t.__}function xu(){for(var t;t=ci.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(So),t.__H.__h.forEach(Qn),t.__H.__h=[]}catch(e){t.__H.__h=[],le.__e(e,t.__v)}}le.__b=function(t){Z=null,oi&&oi(t)},le.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),li&&li(t,e)},le.__r=function(t){ni&&ni(t),qt=0;var e=(Z=t.__c).__H;e&&(Jn===Z?(e.__h=[],Z.__h=[],e.__.forEach(function(r){r.__N&&(r.__=r.__N),r.i=r.__N=void 0})):(e.__h.forEach(So),e.__h.forEach(Qn),e.__h=[],qt=0)),Jn=Z},le.diffed=function(t){ai&&ai(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(ci.push(e)!==1&&ri===le.requestAnimationFrame||((ri=le.requestAnimationFrame)||Du)(xu)),e.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.i=void 0})),Jn=Z=null},le.__c=function(t,e){e.some(function(r){try{r.__h.forEach(So),r.__h=r.__h.filter(function(o){return!o.__||Qn(o)})}catch(o){e.some(function(n){n.__h&&(n.__h=[])}),e=[],le.__e(o,r.__v)}}),si&&si(t,e)},le.unmount=function(t){ii&&ii(t);var e,r=t.__c;r&&r.__H&&(r.__H.__.forEach(function(o){try{So(o)}catch(n){e=n}}),r.__H=void 0,e&&le.__e(e,r.__v))};var di=typeof requestAnimationFrame=="function";function Du(t){var e,r=function(){clearTimeout(o),di&&cancelAnimationFrame(e),setTimeout(t)},o=setTimeout(r,100);di&&(e=requestAnimationFrame(r))}function So(t){var e=Z,r=t.__c;typeof r=="function"&&(t.__c=void 0,r()),Z=e}function Qn(t){var e=Z;t.__c=t.__(),Z=e}function mi(t,e){return!t||t.length!==e.length||e.some(function(r,o){return r!==t[o]})}function hi(t,e){return typeof e=="function"?e(t):e}var fi="encrypted",x="encryptedCardNumber",D="encryptedExpiryDate",k="encryptedExpiryMonth",T="encryptedExpiryYear",A="encryptedSecurityCode",_e="encryptedPassword",Tr="encryptedSecurityCode3digits",Ar="encryptedSecurityCode4digits",xr="giftcard",_i="6.0.0",kt=["amex","mc","visa"],yi=[xr],wu=[x,D,k,T,A,_e],To=wu,gi=["bcmc"],Ci="required",Ao="optional",xo="hidden",Fe=Ci,Dr=Ao,wr=xo,xe=Ci,Ir=Ao,Nt=xo,vi="data-cse",bi="data-info",Ei="data-uid",Si=["accel","pulse","star","nyce"];var Ot={[x]:"cardNumber",[D]:"expiryDate",[A]:"securityCode",[k]:"expiryMonth",[T]:"expiryYear",[_e]:"password",[Tr]:"securityCodeThreeDigits",[Ar]:"securityCodeFourDigits"},Pi=6e3;var De=(t,e)=>e.split(".").reduce((r,o)=>r&&r[o]?r[o]:void 0,t);var qe="field.error.required";var Do="invalid.format.expects",Ri="creditCard.holderName.invalid",Ti="creditCard.taxNumber.invalid",Ai="boleto.socialSecurityNumber.invalid",Mt=(function(t){return t.CC_NUM="cc.num",t.CC_DAT="cc.dat",t.CC_MTH="cc.mth",t.CC_YR="cc.yr",t.CC_CVC="cc.cvc",t.KCP_PWD="kcp.pwd",t})({}),Xt=(function(t){return t.ERROR_MSG_INCOMPLETE_FIELD="err.gen.9100",t.ERROR_MSG_INVALID_FIELD="err.gen.9101",t.ERROR_MSG_LUHN_CHECK_FAILED="cc.num.902",t.ERROR_MSG_EMPTY_PAN="cc.num.900",t.ERROR_MSG_UNSUPPORTED_CARD_ENTERED="cc.num.903",t.ERROR_MSG_INCORRECTLY_FILLED_PAN="cc.num.901",t.ERROR_MSG_CARD_TOO_OLD="cc.dat.912",t.ERROR_MSG_CARD_TOO_FAR_IN_FUTURE="cc.dat.913",t.ERROR_MSG_CARD_EXPIRES_TOO_SOON="cc.dat.914",t.ERROR_MSG_EMPTY_DATE="cc.dat.910",t.ERROR_MSG_INCORRECTLY_FILLED__DATE="cc.dat.911",t.ERROR_MSG_EMPTY_YEAR="cc.yr.917",t.ERROR_MSG_INCORRECTLY_FILLED_YEAR="cc.yr.918",t.ERROR_MSG_EMPTY_MONTH="cc.mth.915",t.ERROR_MSG_EMPTY_CVC="cc.cvc.920",t.ERROR_MSG_INCORRECTLY_FILLED_CVC="cc.cvc.921",t.ERROR_MSG_EMPTY_KCP_PWD="kcp.pwd.940",t.ERROR_MSG_INCORRECTLY_FILLED_KCP_PWD="kcp.pwd.941",t})({}),xi={[x]:"cc.num.900",[D]:"cc.dat.910",[k]:"cc.mth.915",[T]:"cc.yr.917",[A]:"cc.cvc.920",[_e]:"kcp.pwd.940"};var Di=t=>t?Array.prototype.slice.call(t.querySelectorAll('[data-cse*="encrypted"]')).map(e=>e.getAttribute("data-cse")):[],wi=(t,e)=>(e===D?(t[k]=!1,t[T]=!1):t[e]=!1,t),Ii=(t,e)=>(r,o)=>{let n=e.valid[o]!==!0?((a,s)=>s!==1||a!==k&&a!==T?a:D)(o,t):null;return n=((a,s,l)=>{let{isFieldOfType:c,fieldIsValid:u}=l.reduce((m,C)=>(m.isFieldOfType||(m.isFieldOfType=a===C,m.fieldIsValid=!s.errors[C]),m),{isFieldOfType:!1,fieldIsValid:!1}),p=a===A?"cvcPolicy":"expiryDatePolicy",d=p==="cvcPolicy"?Dr:Ir,h=p==="cvcPolicy"?wr:Nt;return(s[p]===d||s[p]===h)&&u&&c?null:a})(n,e,[A,D,k,T]),n&&!r.includes(n)&&r.push(n),r},ki=(t,e,r)=>({rootNode:e,fieldType:t,error:De(r,`errors.${t}`)||xi[t],type:"card"});function w(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var wo=class{constructor(e){w(this,"callbacks",void 0),w(this,"config",void 0),w(this,"props",void 0),w(this,"state",void 0),w(this,"validateForm",void 0),w(this,"handleBrandFromBinLookup",void 0),w(this,"callbacksHandler",void 0),w(this,"configHandler",void 0),w(this,"createCardSecuredFields",void 0),w(this,"createNonCardSecuredFields",void 0),w(this,"createSecuredFields",void 0),w(this,"destroySecuredFields",void 0),w(this,"handleIOSTouchEvents",void 0),w(this,"destroyTouchendListener",void 0),w(this,"destroyTouchstartListener",void 0),w(this,"handleBinValue",void 0),w(this,"handleEncryption",void 0),w(this,"handleFocus",void 0),w(this,"handleIframeConfigFeedback",void 0),w(this,"handleValidation",void 0),w(this,"handleSFShiftTab",void 0),w(this,"handleShiftTab",void 0),w(this,"isConfigured",void 0),w(this,"postMessageToAllIframes",void 0),w(this,"processAutoComplete",void 0),w(this,"processBrand",void 0),w(this,"sendBrandToCardSF",void 0),w(this,"sendExpiryDatePolicyToSF",void 0),w(this,"setFocusOnFrame",void 0),w(this,"setupSecuredField",void 0),w(this,"touchendListener",void 0),w(this,"touchstartListener",void 0),w(this,"hasGenuineTouchEvents",void 0),w(this,"encryptedAttrName",void 0),w(this,"hasRedundantCVCField",void 0),w(this,"isSingleBrandedCard",void 0),w(this,"securityCode",void 0),this.props=e,this.state={},this.config={},this.callbacks={}}};var Ni=Object.prototype.toString;function kr(t){return typeof t=="object"&&t!==null&&Object.prototype.toString.call(t)==="[object Array]"}function Ce(t){return t!=null}function Nr(t){return t!==!1&&Ce(t)}function ea(t){return!!t&&typeof t=="object"}function Oi(t){return!Nr(t)||!(!(typeof(e=t)=="number"||ea(e)&&Ni.call(e)==="[object Number]")||t!==0&&!Number.isNaN(t))||!(!kr(t)&&!(function(r){return typeof r=="string"||ea(r)&&Ni.call(r)==="[object String]"})(t)||t.length!==0)||!(!ea(t)||Object.keys(t).length!==0);var e}function Ft(...t){let e=kr(t[0])?t[0]:t;return{from:r=>e.map(o=>o in r?{[o]:r[o]}:{}).reduce((o,n)=>({...o,...n}),{})}}function Mi(...t){let e=kr(t[0])?t[0]:t;return{from:r=>Ft(...Object.keys(r).filter(o=>!e.includes(o))).from(r)}}var Fi=t=>kr(t)&&t.length?t:kt;var Or=typeof window<"u"&&window.console&&window.console.error&&window.console.error.bind(window.console);typeof window<"u"&&window.console&&window.console.info&&window.console.info.bind(window.console);var Io=typeof window<"u"&&window.console&&window.console.log&&window.console.log.bind(window.console),Pe=typeof window<"u"&&window.console&&window.console.warn&&window.console.warn.bind(window.console);function Li(t){this.config.cardGroupTypes=Fi(t.cardGroupTypes);let e=t.loadingContext;if(!e)return void Pe("WARNING Config :: no loadingContext has been specified!");var r;this.config.loadingContext=(r=e).charAt(r.length-1)==="/"?e:`${e}/`,this.config.isCreditCardType=yi.includes(t.type)===!1,this.config.iframeUIConfig=t.iframeUIConfig??{},this.config.autoFocus=!(t.autoFocus===!1||t.autoFocus==="false"),this.config.showWarnings=t.showWarnings===!0||t.showWarnings==="true",this.config.trimTrailingSeparator=!(t.trimTrailingSeparator===!1||t.trimTrailingSeparator==="false"),this.config.keypadFix=!(t.keypadFix===!1||t.keypadFix==="false"),this.config.legacyInputMode=t.legacyInputMode||null,this.config.minimumExpiryDate=t.minimumExpiryDate||null,this.config.sfLogAtStart=window._b$dl===!0;let o=this.config.isCreditCardType?"card":t.type,n=btoa(window.location.origin),a=`${o}${!this.config.loadingContext.includes("live")&&t.forceCompat?"Compat":""}`;this.config.iframeSrc=`${this.config.loadingContext}securedfields/${t.clientKey}/${_i}/securedFields.html?type=${a}&d=${n}`}var Ee=()=>{};function Bi(t={}){this.callbacks.onLoad=t.onLoad?t.onLoad:Ee,this.callbacks.onConfigSuccess=t.onConfigSuccess?t.onConfigSuccess:Ee,this.callbacks.onFieldValid=t.onFieldValid?t.onFieldValid:Ee,this.callbacks.onAllValid=t.onAllValid?t.onAllValid:Ee,this.callbacks.onBrand=t.onBrand?t.onBrand:Ee,this.callbacks.onError=t.onError?t.onError:Ee,this.callbacks.onFocus=t.onFocus?t.onFocus:Ee,this.callbacks.onBinValue=t.onBinValue?t.onBinValue:Ee,this.callbacks.onAutoComplete=t.onAutoComplete?t.onAutoComplete:Ee,this.callbacks.onAdditionalSFConfig=t.onAdditionalSFConfig?t.onAdditionalSFConfig:Ee,this.callbacks.onAdditionalSFRemoved=t.onAdditionalSFRemoved?t.onAdditionalSFRemoved:Ee,this.callbacks.onTouchstartIOS=t.onTouchstartIOS?t.onTouchstartIOS:Ee,this.callbacks.onKeyPressed=t.onKeyPressed?t.onKeyPressed:Ee}var Ui=({fieldType:t,encryptedFieldName:e,uuid:r,isValid:o,txVariant:n,rootNode:a})=>({fieldType:t,encryptedFieldName:e,uid:r,valid:o,type:n,rootNode:a}),Vi=({fieldType:t,txVariant:e,rootNode:r})=>{let o=t===D,n=[],a=["encryptedExpiryMonth","encryptedExpiryYear"],s,l,c,u,p=o?2:1;for(s=0;s<p;s+=1){c=o?a[s]:t,l=`${e}-encrypted-${c}`,u=o?c:t;let d=Ui({fieldType:t,encryptedFieldName:u,uuid:l,isValid:!1,txVariant:e,rootNode:r});n.push(d)}return n},Hi=({fieldType:t,txVariant:e,rootNode:r,encryptedObjArr:o})=>{let n,a,s,l,c,u=[];for(n=0;n<o.length;n+=1){s=o[n],l=s.encryptedFieldName,a=`${e}-encrypted-${l}`,c=s.blob;let p=Ui({fieldType:t,encryptedFieldName:l,uuid:a,isValid:!0,txVariant:e,rootNode:r});p.blob=c,u.push(p)}return u};function S(t={},e){return Object.prototype.hasOwnProperty.call(t,e)}var ko=(t,e,r,o,n)=>{if(!S(t,"error"))return null;let a=e,s={rootNode:o,fieldType:t.fieldType,error:null,type:null},l=t.error!=="";return l||a.hasError?(s.error=l?t.error:"",s.type=r,a.hasError=l,a.errorType=s.error,n(s),s):null};function Yi(t){let e,r=t.fieldType;if(this.state.type==="card"&&S(t,"cvcPolicy")&&Ce(t.cvcPolicy)&&S(this.state.securedFields,A)&&(this.state.securedFields[A].cvcPolicy=t.cvcPolicy),ko(t,this.state.securedFields[r],this.state.type,this.props.rootNode,this.callbacks.onError),this.state.securedFields[r].isEncrypted){e=Vi({fieldType:r,txVariant:this.state.type,rootNode:this.props.rootNode}),r===x&&(e[0].endDigits="");for(let o=0,n=e.length;o<n;o+=1)this.callbacks.onFieldValid(e[o]);this.state.securedFields[r].isEncrypted=!1}this.validateForm(),S(t,"brand")&&this.processBrand(t)}var de=(t,e,r)=>{if(e){let o=JSON.stringify(t);e.postMessage(o,r)}};function ce(t,e){return t.securedFields[e]?.iframeContentWindow||null}function Ki(t){let e=t.fieldType,r,o;this.config.autoFocus&&(t.type!=="year"&&e!==T||this.setFocusOnFrame(A),e===k&&this.setFocusOnFrame(T));let n=t[e];this.state.securedFields[e].isEncrypted=!0,ko({error:"",fieldType:e},this.state.securedFields[e],this.state.type,this.props.rootNode,this.callbacks.onError);let a=Hi({fieldType:e,txVariant:this.state.type,rootNode:this.props.rootNode,encryptedObjArr:n});if(e===k&&S(this.state.securedFields,T)){let s={txVariant:this.state.type,code:t.code,blob:n[0].blob,fieldType:T,numKey:this.state.securedFields[T].numKey};de(s,ce(this.state,T),this.config.loadingContext)}for(e===x&&Nr(t.endDigits)&&(a[0].endDigits=t.endDigits),e===x&&Nr(t.issuerBin)&&(a[0].issuerBin=+t.issuerBin),e===D&&Nr(t.expiryDate)&&(a[1].expiryDate=t.expiryDate),r=0,o=a.length;r<o;r+=1)this.callbacks.onFieldValid(a[r]);this.validateForm()}var No=(t,e)=>{let r=[];return t&&typeof t.querySelectorAll=="function"&&(r=[].slice.call(t.querySelectorAll(e))),r},we=(t,e)=>{if(t)return t.querySelector(e)},Mr=(t,e)=>{if(t)return t.getAttribute(e)},Gi=t=>{for(;t.firstChild;)t.removeChild(t.firstChild)};var ta,P={__NO_BRAND:"noBrand",cards:[]};P.cards.push({cardType:"mc",startingRules:[51,52,53,54,55,22,23,24,25,26,27],permittedLengths:[16],pattern:/^(5[1-5][0-9]{0,14}|2[2-7][0-9]{0,14})$/,securityCode:"CVC"}),P.cards.push({cardType:"visadankort",startingRules:[4571],permittedLengths:[16],pattern:/^(4571)[0-9]{0,12}$/}),P.cards.push({cardType:"visa",startingRules:[4],permittedLengths:[13,16,19],pattern:/^4[0-9]{0,18}$/,securityCode:"CVV"}),P.cards.push({cardType:"amex",startingRules:[34,37],permittedLengths:[15],pattern:/^3[47][0-9]{0,13}$/,securityCode:"CID"}),P.cards.push({cardType:"diners",startingRules:[36],permittedLengths:[14,15,16,17,18,19],pattern:/^(36)[0-9]{0,12}$/}),P.cards.push({cardType:"maestrouk",startingRules:[6759],permittedLengths:[16,18,19],pattern:/^(6759)[0-9]{0,15}$/}),P.cards.push({cardType:"solo",startingRules:[6767],permittedLengths:[16,18,19],pattern:/^(6767)[0-9]{0,15}$/}),P.cards.push({cardType:"laser",startingRules:[6304,6706,677117,677120],permittedLengths:[16,17,18,19],pattern:/^(6304|6706|6709|6771)[0-9]{0,15}$/,cvcPolicy:"optional"}),P.cards.push({cardType:"discover",startingRules:[6011,644,645,646,647,648,649,65],permittedLengths:[16,17,18,19],pattern:/^(6011[0-9]{0,12}|(644|645|646|647|648|649)[0-9]{0,13}|65[0-9]{0,14})$/}),P.cards.push({cardType:"jcb",startingRules:[3528,3529,353,354,355,356,357,358],permittedLengths:[16,19],pattern:/^(352[8,9]{1}[0-9]{0,15}|35[4-8]{1}[0-9]{0,16})$/,securityCode:"CAV"}),P.cards.push({cardType:"bcmc",startingRules:[6703,479658,606005],permittedLengths:[16,17,18,19],pattern:/^((6703)[0-9]{0,15}|(479658|606005)[0-9]{0,13})$/,cvcPolicy:"hidden"}),P.cards.push({cardType:"bijcard",startingRules:[5100081],permittedLengths:[16],pattern:/^(5100081)[0-9]{0,9}$/}),P.cards.push({cardType:"dankort",startingRules:[5019],permittedLengths:[16],pattern:/^(5019)[0-9]{0,12}$/}),P.cards.push({cardType:"hipercard",startingRules:[606282],permittedLengths:[16],pattern:/^(606282)[0-9]{0,10}$/}),P.cards.push({cardType:"cup",startingRules:[62,81],permittedLengths:[14,15,16,17,18,19],pattern:/^(62|81)[0-9]{0,17}$/}),P.cards.push({cardType:"maestro",startingRules:[50,56,57,58,6],permittedLengths:[16,17,18,19],pattern:/^(5[0|6-8][0-9]{0,17}|6[0-9]{0,18})$/,cvcPolicy:"optional"}),P.cards.push({cardType:"elo",startingRules:[506699,50670,50671,50672,50673,50674,50675,50676,506770,506771,506772,506773,506774,506775,506776,506777,506778,401178,438935,451416,457631,457632,504175,627780,636297,636368],permittedLengths:[16],pattern:/^((((506699)|(506770)|(506771)|(506772)|(506773)|(506774)|(506775)|(506776)|(506777)|(506778)|(401178)|(438935)|(451416)|(457631)|(457632)|(504175)|(627780)|(636368)|(636297))[0-9]{0,10})|((50676)|(50675)|(50674)|(50673)|(50672)|(50671)|(50670))[0-9]{0,11})$/}),P.cards.push({cardType:"uatp",startingRules:[1],permittedLengths:[15],pattern:/^1[0-9]{0,14}$/,cvcPolicy:"optional"}),P.cards.push({cardType:"cartebancaire",startingRules:[4,5,6],permittedLengths:[16],pattern:/^[4-6][0-9]{0,15}$/}),P.cards.push({cardType:"visaalphabankbonus",startingRules:[450903],permittedLengths:[16],pattern:/^(450903)[0-9]{0,10}$/}),P.cards.push({cardType:"mcalphabankbonus",startingRules:[510099],permittedLengths:[16],pattern:/^(510099)[0-9]{0,10}$/}),P.cards.push({cardType:"hiper",startingRules:[637095,637568,637599,637609,637612],permittedLengths:[16],pattern:/^(637095|637568|637599|637609|637612)[0-9]{0,10}$/}),P.cards.push({cardType:"oasis",startingRules:[982616],permittedLengths:[16],pattern:/^(982616)[0-9]{0,10}$/,cvcPolicy:"optional"}),P.cards.push({cardType:"karenmillen",startingRules:[98261465],permittedLengths:[16],pattern:/^(98261465)[0-9]{0,8}$/,cvcPolicy:"optional"}),P.cards.push({cardType:"warehouse",startingRules:[982633],permittedLengths:[16],pattern:/^(982633)[0-9]{0,10}$/,cvcPolicy:"optional"}),P.cards.push({cardType:"mir",startingRules:[220],permittedLengths:[16,17,18,19],pattern:/^(220)[0-9]{0,16}$/}),P.cards.push({cardType:"codensa",startingRules:[590712],permittedLengths:[16],pattern:/^(590712)[0-9]{0,10}$/}),P.cards.push({cardType:"naranja",startingRules:[377798,377799,402917,402918,527571,527572,589562],permittedLengths:[16,17,18,19],pattern:/^(37|40|5[28])([279])\d*$/}),P.cards.push({cardType:"cabal",startingRules:[589657,600691,603522,6042,6043,636908],permittedLengths:[16,17,18,19],pattern:/^(58|6[03])([03469])\d*$/}),P.cards.push({cardType:"shopping",startingRules:[2799,589407,603488],permittedLengths:[16,17,18,19],pattern:/^(27|58|60)([39])\d*$/}),P.cards.push({cardType:"argencard",startingRules:[501],permittedLengths:[16,17,18,19],pattern:/^(50)(1)\d*$/}),P.cards.push({cardType:"troy",startingRules:[9792],permittedLengths:[16],pattern:/^(97)(9)\d*$/}),P.cards.push({cardType:"forbrugsforeningen",startingRules:[600722],permittedLengths:[16],pattern:/^(60)(0)\d*$/}),P.cards.push({cardType:"vpay",startingRules:[401,408,413,434,435,437,439,441,442,443,444,446,447,455,458,460,461,463,466,471,479,482,483,487],permittedLengths:[13,14,15,16,17,18,19],pattern:/^(40[1,8]|413|43[4,5]|44[1,2,3,4,6,7]|45[5,8]|46[0,1,3,6]|47[1,9]|48[2,3,7])[0-9]{0,16}$/}),P.cards.push({cardType:"rupay",startingRules:[508528],permittedLengths:[16],pattern:/^(100003|508(2|[5-9])|60(69|[7-8])|652(1[5-9]|[2-5][0-9]|8[5-9])|65300[3-4]|8172([0-1]|[3-5]|7|9)|817(3[3-8]|40[6-9]|410)|35380([0-2]|[5-6]|9))[0-9]{0,12}$/}),P.cards.push({cardType:"ticket",expiryDatePolicy:"hidden"});var Jt={detectCard:(t,e)=>{let r,o,n;if(e){if(r=P.cards.filter(a=>e.includes(a.cardType)).filter(a=>S(a,"pattern")&&t.match(a.pattern)),r.length){if(r.length===1)return r[0];for(o=0,n=r.length;o<n;o+=1)if(!r[o].longestRule){let a=r[o].startingRules.reduce((s,l)=>s>l?s:l);r[o].longestRule=String(a).length}return r.reduce((a,s)=>a.longestRule>=s.longestRule?a:s)}return{cardType:P.__NO_BRAND}}return{cardType:P.__NO_BRAND}},detectCardLength:(t,e)=>{let r,o,n=0,a=!1,s=e,l=t.cardType!==P.__NO_BRAND?t.permittedLengths[t.permittedLengths.length-1]:0;if(l&&s>l&&(n=s.length-l,n>0&&(s=s.substring(0,s.length-n),o=s)),t.permittedLengths.forEach(c=>{s.length===c&&(a=!0)}),s.length===l){let c=Math.floor(s.length/4);r=l+(s.length%4>0?c:c-1),t.cardType.toLowerCase()==="amex"&&(r=l+2)}return{shortenedNewValue:o,maxLength:r,reachedValidLength:a}},getShortestPermittedCardLength:()=>{if(!ta){let t=[];P.cards.forEach(e=>{t=t.concat(e.permittedLengths??[])}),ta=Math.min.apply(null,t)}return ta},getCardByBrand:t=>P.cards.filter(e=>e.cardType===t)[0],isGenericCardType:t=>{if(!t)throw new Error("Error: isGenericCardType: type param has not been specified");return t==="card"||t==="scheme"},__NO_BRAND:P.__NO_BRAND,allCards:P.cards};function zi({src:t,title:e="iframe element",policy:r="origin"}){let o=document.createElement("iframe");o.setAttribute("src",t),o.classList.add("js-iframe"),e===""||e.trim().length===0||e==="none"?o.setAttribute("role","presentation"):o.setAttribute("title",e),o.setAttribute("allowtransparency","true"),o.setAttribute("referrerpolicy",r);let n=document.createTextNode("<p>Your browser does not support iframes.</p>");return o.appendChild(n),o}var Xe=(t,e,r,o=!1)=>!(!t||typeof t.addEventListener!="function")&&(t.addEventListener(e,r,o),!0),dt=(t,e,r,o=!1)=>!(!t||typeof t.removeEventListener!="function")&&(t.removeEventListener(e,r,o),!0);var ji=(t,e,r)=>{let o=t.origin,n=e.indexOf("/checkoutshopper/"),a=n>-1?e.substring(0,n):e,s=a.length-1;return a.charAt(s)==="/"&&(a=a.substring(0,s)),o===a||(r&&Pe(`WARNING postMessageValidation: postMessage listener for iframe::origin mismatch!
|
|
5
|
+
Received message with origin:`,o,"but the only allowed origin for messages to CSF is",a,"### event.data=",t.data),!1)},$i=t=>t.data&&t.data.type&&typeof t.data.type=="string"&&t.data.type.indexOf("webpack")>-1,Wi=t=>t.data&&typeof t.data=="string"&&t.data.indexOf("cvox")>-1;function Zi(){if(!window.crypto)return 4294967296*Math.random()|0;let t=new Uint32Array(1);return window.crypto.getRandomValues(t),t[0]}function ra(t,e){let r=typeof t;return t&&e&&r==="object"&&r===typeof e?Object.keys(t).length===Object.keys(e).length&&Object.keys(t).every(o=>ra(t[o],e[o])):t===e}function Le(...t){let e=t,r=e.shift();return function(...o){return r.apply(this,e.concat(o))}}function G(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Oo=class{constructor(){G(this,"sfConfig",void 0),G(this,"loadingContext",void 0),G(this,"holderEl",void 0),G(this,"iframeRef",void 0),G(this,"loadToConfigTimeout",void 0),G(this,"_isValid",void 0),G(this,"_iframeContentWindow",void 0),G(this,"_numKey",void 0),G(this,"_isEncrypted",void 0),G(this,"_hasError",void 0),G(this,"_errorType",void 0),G(this,"_cvcPolicy",void 0),G(this,"_expiryDatePolicy",void 0),G(this,"_iframeOnLoadListener",void 0),G(this,"_postMessageListener",void 0),G(this,"onIframeLoadedCallback",void 0),G(this,"onConfigCallback",void 0),G(this,"onEncryptionCallback",void 0),G(this,"onValidationCallback",void 0),G(this,"onFocusCallback",void 0),G(this,"onBinValueCallback",void 0),G(this,"onTouchstartCallback",void 0),G(this,"onShiftTabCallback",void 0),G(this,"onAutoCompleteCallback",void 0),G(this,"onKeyPressedCallback",void 0),this.sfConfig={}}};var Iu=(t,e)=>Object.values(Xt).reduce((r,o)=>(o.includes(e)&&(r[o]=t.get(o)),r),{}),qi=(t,e,r)=>{let o={...t},n=ku(r);return o.error=Iu(e,n),o},Xi=(t,e)=>{let r=t;for(let[o,n]of Object.entries(e))if(n===t){r=o;break}return r?.toLowerCase().replace(/[_.\s]/g,"-")},ku=t=>{let e;switch(t){case x:e=Mt.CC_NUM;break;case D:e=Mt.CC_DAT;break;case k:e=Mt.CC_MTH;break;case T:e=Mt.CC_YR;break;case A:e=Mt.CC_CVC;break;case _e:e=Mt.KCP_PWD}return e};var Ji=(t,e,r,o)=>{let n={...t},a={};switch(r){case"ach":case xr:break;default:if(o===A)a[Tr]=e.get("creditCard.securityCode.contextualText.3digits"),a[Ar]=e.get("creditCard.securityCode.contextualText.4digits");else{let s=`creditCard.${Ot[o]}.contextualText`,l=e.get(s);l!==s&&(a[o]=l)}}return Object.keys(a).length&&(n.contextualTexts=a),n};function Qi(t,e,r,o){let n=["ach","giftcard"].includes(t)?t:"creditCard",a=r.get(`${n}.${e}.aria.iframeTitle`),s=r.get(`${n}.${Ot[e]}.label`),l=r.locale,c=qi({iframeTitle:a,label:s},r,e);return o&&(c=Ji(c,r,t,e)),{...l&&{lang:l},[e]:c}}function el(t,e,r){return t===xr?{[e]:r[Ot[e]]??""}:e===A?{[Tr]:r.securityCodeThreeDigits??"",[Ar]:r.securityCodeFourDigits??""}:{[e]:r[Ot[e]]??""}}var Mo=class extends Oo{init(e,r,o,n){let a=Qi(this.sfConfig.txVariant,this.sfConfig.fieldType,e,n);this.sfConfig.iframeUIConfig.ariaConfig=a,this.sfConfig.iframeUIConfig.placeholders=el(this.sfConfig.txVariant,this.sfConfig.fieldType,o);let s={src:r,title:a[this.sfConfig.fieldType].iframeTitle,policy:"origin"},l=zi(s);this.holderEl.appendChild(l);let c=we(this.holderEl,".js-iframe");return c&&(this.iframeContentWindow=c.contentWindow,this.iframeOnLoadListener=this.iframeOnLoadListenerFn,Xe(c,"load",this.iframeOnLoadListener,!1)),this.iframeRef=c,this}iframeOnLoadListenerFn(){this.postMessageListener=this.postMessageListenerFn,Xe(window,"message",this.postMessageListener,!1);let e={...this.sfConfig,numKey:this.numKey};window._b$dl&&console.log("### SecuredField:::: onIframeLoaded:: created configObj=",e),de(e,this.iframeContentWindow,this.loadingContext),this.onIframeLoadedCallback()}postMessageListenerFn(e){if(!ji(e,this.loadingContext,this.sfConfig.showWarnings))return;let r;try{r=JSON.parse(e.data)}catch{return $i(e)?void(this.sfConfig.showWarnings&&Io("### SecuredField::postMessageListenerFn:: PARSE FAIL - WEBPACK")):Wi(e)?void(this.sfConfig.showWarnings&&Io("### SecuredField::postMessageListenerFn:: PARSE FAIL - CHROMEVOX")):void(this.sfConfig.showWarnings&&Io("### SecuredField::postMessageListenerFn:: PARSE FAIL - UNKNOWN REASON: event.data=",e.data))}if(S(r,"action")&&S(r,"numKey"))if(this.numKey===r.numKey)switch(r.action){case"encryption":this.isValid=!0,this.onEncryptionCallback(r);break;case"config":window._b$dl&&console.log("### SecuredField::postMessageListenerFn:: configured - calling onConfigCallback",r.fieldType),this.onConfigCallback(r);break;case"focus":this.onFocusCallback(r);break;case"binValue":this.onBinValueCallback(r);break;case"touch":this.onTouchstartCallback(r);break;case"shifttab":this.onShiftTabCallback(r);break;case"autoComplete":this.onAutoCompleteCallback(r);break;case"enterKeyPressed":this.onKeyPressedCallback(r);break;default:this.isValid=!1,this.onValidationCallback(r)}else this.sfConfig.showWarnings&&Pe("WARNING SecuredField :: postMessage listener for iframe :: data mismatch! (Probably a message from an unrelated securedField)");else this.sfConfig.showWarnings&&Pe("WARNING SecuredField :: postMessage listener for iframe :: data mismatch!")}destroy(){dt(window,"message",this.postMessageListener,!1),dt(this.iframeRef,"load",this.iframeOnLoadListener,!1),this.iframeContentWindow=null,Gi(this.holderEl)}isOptionalOrHidden(){if(this.sfConfig.fieldType===D||this.sfConfig.fieldType===k||this.sfConfig.fieldType===T)switch(this.expiryDatePolicy){case Nt:return!0;case Ir:return!this.hasError;default:return!1}if(this.sfConfig.fieldType===A)switch(this.cvcPolicy){case wr:return!0;case Dr:return!this.hasError;default:return!1}return!1}onIframeLoaded(e){return this.onIframeLoadedCallback=e,this}onEncryption(e){return this.onEncryptionCallback=e,this}onValidation(e){return this.onValidationCallback=e,this}onConfig(e){return this.onConfigCallback=e,this}onFocus(e){return this.onFocusCallback=e,this}onBinValue(e){return this.onBinValueCallback=e,this}onTouchstart(e){return this.onTouchstartCallback=e,this}onShiftTab(e){return this.onShiftTabCallback=e,this}onAutoComplete(e){return this.onAutoCompleteCallback=e,this}onKeyPressed(e){return this.onKeyPressedCallback=e,this}get errorType(){return this._errorType}set errorType(e){this._errorType=e}get hasError(){return this._hasError}set hasError(e){this._hasError=e}get isValid(){if(this.sfConfig.fieldType===A)switch(this.cvcPolicy){case wr:return!0;case Dr:return!this.hasError;default:return this._isValid}if(this.sfConfig.fieldType===D||this.sfConfig.fieldType===k||this.sfConfig.fieldType===T)switch(this.expiryDatePolicy){case Nt:return!0;case Ir:return!this.hasError;default:return this._isValid}return this._isValid}set isValid(e){this._isValid=e}get cvcPolicy(){return this._cvcPolicy}set cvcPolicy(e){this.sfConfig.fieldType===A&&e!==this.cvcPolicy&&(this._cvcPolicy=e,this.hasError&&this.errorType==="isValidated"&&(this.hasError=!1))}get expiryDatePolicy(){return this._expiryDatePolicy}set expiryDatePolicy(e){this.sfConfig.fieldType!==D&&this.sfConfig.fieldType!==k&&this.sfConfig.fieldType!==T||e!==this.expiryDatePolicy&&(this._expiryDatePolicy=e,this.hasError&&this.errorType==="isValidated"&&(this.hasError=!1))}get iframeContentWindow(){return this._iframeContentWindow}set iframeContentWindow(e){this._iframeContentWindow=e}get isEncrypted(){return this._isEncrypted}set isEncrypted(e){this._isEncrypted=e}get numKey(){return this._numKey}set numKey(e){this._numKey=e}get iframeOnLoadListener(){return this._iframeOnLoadListener}set iframeOnLoadListener(e){this._iframeOnLoadListener=e.bind(this)}get postMessageListener(){return this._postMessageListener}set postMessageListener(e){this._postMessageListener=e.bind(this)}constructor(e,r){super();let o=Mi(["loadingContext","holderEl","iframeSrc","showContextualElement","placeholders"]).from(e);this.sfConfig={...o,iframeUIConfig:{...o.iframeUIConfig}};let{iframeSrc:n,placeholders:a,showContextualElement:s}=e;return this.loadingContext=e.loadingContext,this.holderEl=e.holderEl,this.isValid=!1,this.iframeContentWindow=null,this.numKey=Zi(),this.isEncrypted=!1,this.hasError=!1,this.errorType="",this.cvcPolicy=e.cvcPolicy,this.expiryDatePolicy=e.expiryDatePolicy,this.init(r,n,a,s)}};function oa(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var na="NETWORK_ERROR",Nu="CANCEL",aa="IMPLEMENTATION_ERROR",Fr="API_ERROR",Lr="ERROR",Ou="SCRIPT_ERROR",Mu="SDK_ERROR",b=class t extends Error{constructor(e,r,o){super(r),oa(this,"cause",void 0),oa(this,"options",void 0),this.name=t.errorTypes[e],this.options=o||{},this.cause=this.options.cause}};oa(b,"errorTypes",{NETWORK_ERROR:na,CANCEL:Nu,IMPLEMENTATION_ERROR:aa,API_ERROR:Fr,ERROR:Lr,SCRIPT_ERROR:Ou,SDK_ERROR:Mu});function tl(){this.encryptedAttrName=vi;let t=No(this.props.rootNode,`[${this.encryptedAttrName}]`).filter(o=>{let n=Mr(o,this.encryptedAttrName),a=To.includes(n);return a||console.warn(`WARNING: '${n}' is not a valid type for the '${this.encryptedAttrName}' attribute. A SecuredField will not be created for this element.`),a}),e=Fe,r=xe;return this.config.isCreditCardType?(this.isSingleBrandedCard=!1,this.securityCode="",this.createCardSecuredFields(t,e,r),t.length):(this.createNonCardSecuredFields(t),t.length)}async function rl(t){for(let e=0;e<t.length;e++){let r=t[e];await this.setupSecuredField(r).catch(o=>{window._b$dl&&console.log("Secured fields setup failure. e=",o)})}}async function ol(t,e,r){let o=this.state.type;if(o==="card"&&this.config.cardGroupTypes.length===1&&(o=this.config.cardGroupTypes[0],this.state.type=o),this.isSingleBrandedCard=o!=="card",this.isSingleBrandedCard){let n=Jt.getCardByBrand(o);Ce(n)?(e=n.cvcPolicy||Fe,r=n.expiryDatePolicy||xe,this.securityCode=n.securityCode):this.state.type="unrecognised-single-brand"}for(let n=0;n<t.length;n++){let a=t[n];window._b$dl&&console.log(`
|
|
6
|
+
About to set up securedField:`,a),await this.setupSecuredField(a,e,r).catch(s=>{window._b$dl&&console.log("Secured fields setup failure. e=",s)}),window._b$dl&&console.log("Finished setting up securedField:",a)}if(window._b$dl&&console.log("Finished setting up all securedFields"),this.isSingleBrandedCard){let n={type:this.state.type,rootNode:this.props.rootNode,brand:o,cvcPolicy:e,expiryDatePolicy:r,cvcText:this.securityCode};setTimeout(()=>{this.callbacks.onBrand(n)},0)}}function nl(t,e,r){return new Promise((o,n)=>{let a=Mr(t,this.encryptedAttrName);a===T&&(this.state.hasSeparateDateFields=!0);let s={fieldType:a,extraFieldData:Mr(t,bi),uid:Mr(t,Ei),cvcPolicy:e,holderEl:t,expiryDatePolicy:r,txVariant:this.state.type,cardGroupTypes:this.config.cardGroupTypes,iframeUIConfig:this.config.iframeUIConfig,sfLogAtStart:this.config.sfLogAtStart,trimTrailingSeparator:this.config.trimTrailingSeparator,isCreditCardType:this.config.isCreditCardType,iframeSrc:this.config.iframeSrc,loadingContext:this.config.loadingContext,showWarnings:this.config.showWarnings,legacyInputMode:this.config.legacyInputMode,minimumExpiryDate:this.config.minimumExpiryDate,maskSecurityCode:this.props.maskSecurityCode,exposeExpiryDate:this.props.exposeExpiryDate,disableIOSArrowKeys:this.props.shouldDisableIOSArrowKeys,implementationType:this.props.implementationType,showContextualElement:this.props.showContextualElement,placeholders:this.props.placeholders},l=new Mo(s,this.props.i18n).onIframeLoaded(()=>{if(this.state.iframeCount+=1,window._b$dl&&console.log("### createSecuredFields::onIframeLoaded:: this.state.iframeCount=",this.state.iframeCount),this.state.iframeCount>this.state.numIframes)throw this.destroySecuredFields(),new b("ERROR",`One or more securedFields has just loaded new content. This should never happen. securedFields have been removed.
|
|
7
|
+
iframe load count=${this.state.iframeCount}. Expected count:${this.state.numIframes}`);if(l.loadToConfigTimeout=setTimeout(()=>{n({type:s.fieldType,failReason:"sf took too long to config"})},Pi),this.state.iframeCount===this.state.originalNumIframes){let c={iframesLoaded:!0};this.callbacks.onLoad(c)}}).onConfig(c=>{this.handleIframeConfigFeedback(c),clearTimeout(l.loadToConfigTimeout),l.loadToConfigTimeout=null,o(c)}).onFocus(c=>{this.handleFocus(c)}).onBinValue(c=>{this.handleBinValue(c)}).onTouchstart(c=>{this.props.shouldDisableIOSArrowKeys&&(this.hasGenuineTouchEvents||c.hasGenuineTouchEvents)&&this.callbacks.onTouchstartIOS({fieldType:c.fieldType}),(c.hasGenuineTouchEvents||this.hasGenuineTouchEvents)&&this.postMessageToAllIframes({fieldType:c.fieldType,fieldClick:!0})}).onShiftTab(c=>{this.handleSFShiftTab(c.fieldType)}).onEncryption(c=>{this.handleEncryption(c)}).onValidation(c=>{this.handleValidation(c)}).onAutoComplete(c=>{this.processAutoComplete(c)}).onKeyPressed(c=>{let{numKey:u,...p}=c;this.callbacks.onKeyPressed(p)});this.state.securedFields[a]=l})}var Fu=typeof navigator<"u"&&(function(){let t=navigator.userAgent,e=t.indexOf("MSIE ");if(e>0)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);if(t.indexOf("Trident/")>0){let o=t.indexOf("rv:");return parseInt(t.substring(o+3,t.indexOf(".",o)),10)}let r=t.indexOf("Edge/");return r>0&&parseInt(t.substring(r+5,t.indexOf(".",r)),10)})(),Ie={__IS_IE:Fu,__IS_IOS:typeof navigator<"u"&&/iphone|ipod|ipad/i.test(navigator.userAgent),__IS_FIREFOX:typeof navigator<"u"&&/(firefox)/i.test(navigator.userAgent)};var Qt={touchendListener:function(t){let e=t.target;if(e instanceof HTMLInputElement||HTMLTextAreaElement&&e instanceof HTMLTextAreaElement){let o=e.value,n="selectionStart"in(r=e)?r.selectionStart:0,a=!1;n===o.length&&(n-=1,a=!0),e.value=o;try{e.setSelectionRange&&(e.focus(),e.setSelectionRange(n,n),a&&(n+=1,setTimeout(()=>{e.setSelectionRange(n,n)},0)))}catch{}}else if(this.config.keypadFix){let o=this.props.rootNode,n=document.createElement("input");n.style.width="1px",n.style.height="1px",n.style.opacity="0",n.style.fontSize="18px",o.appendChild(n),n.focus(),o.removeChild(n)}var r;this.destroyTouchendListener(),this.state.registerFieldForIos=!1,this.postMessageToAllIframes({fieldType:"webInternalElement",fieldClick:!0})},touchstartListener:function(t){this.hasGenuineTouchEvents=!0;let e=t.target;if(e instanceof HTMLInputElement||e instanceof HTMLSpanElement){this.postMessageToAllIframes({fieldType:"webInternalElement",checkoutTouchEvent:!0});let r=e.getAttribute("name")??e.getAttribute("data-id");this.callbacks.onTouchstartIOS?.({fieldType:"webInternalElement",name:r})}},handleTouchend:function(){let t=we(document,"body");t.style.cursor="pointer",Xe(t,"touchend",this.touchendListener),this.state.registerFieldForIos=!0},destroyTouchendListener:function(){if(!Ie.__IS_IOS)return!1;let t=we(document,"body");return t.style.cursor="auto",dt(t,"touchend",this.touchendListener),!0},destroyTouchstartListener:function(){return!!Ie.__IS_IOS&&(dt(document,"touchstart",this.touchstartListener),!0)}};var ct=(t,e,r)=>((o,n=!0)=>{let a=Array.prototype.slice.call(No(document,"*[data-cse], a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), object, embed, *[tabindex], *[contenteditable]")),s=[];a.forEach(c=>{let u=c.getAttribute("tabindex"),p=!u||parseInt(u,10)>=0,d=c.getBoundingClientRect(),h=d.width>0&&d.height>0;p&&h&&s.push(c)});let l=((c,u)=>{for(let p=0;p<c.length;p+=1)if(u(c[p]))return p;return-1})(s,c=>c===o||o.contains(c));return s[l+(n?-1:1)]})(we(e,`[data-cse=${t}]`),r),al=t=>{t&&(t.focus(),t.blur(),t.focus())};function sl(t,e,r,o){let n,a;switch(t){case x:n=ct(x,e);break;case D:case k:a=x;break;case T:a=k;break;case A:o===1?n=ct(A,e):a=r?T:D}return{fieldToFocus:a,additionalField:n}}function il(t,e){let r,o;switch(t){case x:r=ct(x,e);break;case A:o=x}return{fieldToFocus:o,additionalField:r}}function ll(t,e,r){let o,n;switch(t){case x:o=ct(x,e);break;case D:case k:n=x;break;case T:n=k;break;case A:n=r?T:D;break;case _e:o=ct(t,e)}return{fieldToFocus:n,additionalField:o}}var sa={handleShiftTab:function(t){let e;this.state.type==="giftcard"?e=il(t,this.props.rootNode):e=this.state.isKCP?ll(t,this.props.rootNode,this.state.hasSeparateDateFields):sl(t,this.props.rootNode,this.state.hasSeparateDateFields,this.state.numIframes);let r=e.fieldToFocus,o=e.additionalField;r?this.setFocusOnFrame(r,!1):o&&al(o)},handleSFShiftTab:function(t){(Ie.__IS_FIREFOX||Ie.__IS_IE&&Ie.__IS_IE<=11)&&this.handleShiftTab(t)}};function dl(t){if(S(this.state.securedFields,x)){let e={txVariant:this.state.type,...t,fieldType:x,numKey:this.state.securedFields[x].numKey};de(e,ce(this.state,x),this.config.loadingContext)}}function cl(t){(S(this.state.securedFields,k)&&S(this.state.securedFields,T)?[k,T]:[D]).forEach(e=>{let r={txVariant:this.state.type,...t,fieldType:e,numKey:this.state.securedFields[e].numKey};de(r,ce(this.state,e),this.config.loadingContext)})}function ul(t,e){let r=this.state.type==="card";if(!t||!Object.keys(t).length)return r?(this.sendBrandToCardSF({brand:"reset"}),this.sendExpiryDatePolicyToSF({expiryDatePolicy:xe})):e&&this.processBrand({...e,fieldType:x}),void(this.state.type==="card"&&S(this.state.securedFields,D)&&(this.state.securedFields[D].expiryDatePolicy=xe));let o=t.supportedBrands[0],n=o.brand,a=o.expiryDatePolicy??(o.showExpiryDate===!0?xe:Nt),s={brand:n,cvcPolicy:o.cvcPolicy,expiryDatePolicy:a,cvcText:"Security code",showSocialSecurityNumber:o.showSocialSecurityNumber??!1,fieldType:x};if(this.processBrand(s),r){let l={brand:n,enableLuhnCheck:t.supportedBrands[0].enableLuhnCheck!==!1,...o?.panLength&&!t.isDualBrandSelection&&{panLength:o?.panLength}};this.sendBrandToCardSF(l),this.sendExpiryDatePolicyToSF({expiryDatePolicy:a})}S(this.state.securedFields,A)&&(this.state.securedFields[A].cvcPolicy=o.cvcPolicy),S(this.state.securedFields,D)?this.state.securedFields[D].expiryDatePolicy=a:S(this.state.securedFields,k)&&S(this.state.securedFields,T)&&(this.state.securedFields[k].expiryDatePolicy=a,this.state.securedFields[T].expiryDatePolicy=a),this.validateForm()}function pl({csfState:t,csfConfig:e},r,o){if(!S(t.securedFields,r))return;let n={txVariant:t.type,fieldType:r,focus:!0,numKey:t.securedFields[r].numKey};de(n,ce(t,r),e.loadingContext)}function ml({csfState:t,csfConfig:e},r){let o=Object.keys(r||{});return o.length?(Object.keys(t.securedFields).forEach(n=>{let a={txVariant:t.type,fieldType:n,numKey:t.securedFields[n].numKey};o.forEach(s=>{a[s]=r[s]}),de(a,ce(t,n),e.loadingContext)}),!0):!1}function hl({csfState:t,csfConfig:e,csfProps:r,csfCallbacks:o},n){if(n.fieldType===x){let l={brand:n.brand,cvcPolicy:n.cvcPolicy,expiryDatePolicy:n.expiryDatePolicy,showSocialSecurityNumber:n.showSocialSecurityNumber},c=(a=l,s=t.brand,!ra(a,s));if(!c)return null;let u=t.type==="card"||t.type==="bcmc";if(u&&c&&(t.brand=l,S(t.securedFields,A))){let d={txVariant:t.type,brand:l.brand,fieldType:A,cvcPolicy:n.cvcPolicy,numKey:t.securedFields[A].numKey};de(d,ce(t,A),e.loadingContext)}let p=u?Ft(["brand","cvcPolicy","cvcText","expiryDatePolicy","showSocialSecurityNumber"]).from(n):null;if(p&&p.brand){let d=p;d.type=t.type,d.rootNode=r.rootNode,o.onBrand(d)}return!0}var a,s;return!1}function fl({csfState:t,csfConfig:e,csfCallbacks:r},o){if(o.name==="cc-name"){let n={...o};delete n.numKey;let a=n;return r.onAutoComplete(a),!0}if(o.name==="cc-exp"){let n=o.value.replace(/[^0-9]/gi,"/").split("/");if(n.length!==2)return!1;n[0].length===1&&(n[0]=`0${n[0]}`);let a=n[0],s=n[1];if(!((s?.length===4||s?.length===2)&&!isNaN(parseInt(s))))return!1;let l=s.slice(-2),c=`${a}/${l}`;if(S(t.securedFields,D)){let u={txVariant:t.type,fieldType:D,autoComplete:c,numKey:t.securedFields[D].numKey};return de(u,ce(t,D),e.loadingContext),!0}if(S(t.securedFields,k)){let u={txVariant:t.type,fieldType:k,autoComplete:a,numKey:t.securedFields[k].numKey};de(u,ce(t,k),e.loadingContext)}return S(t.securedFields,T)&&setTimeout(()=>{let u={txVariant:t.type,fieldType:T,autoComplete:l,numKey:t.securedFields[T].numKey};de(u,ce(t,T),e.loadingContext)},0),!0}return!1}function _l({csfState:t,csfProps:e,csfCallbacks:r},o,n){let a={...n};delete a.numKey,a.rootNode=e.rootNode,a.type=t.type;let s=a.fieldType;a.focus?t.currentFocusObject!==s&&(t.currentFocusObject=s,Ie.__IS_IOS&&!t.registerFieldForIos&&o()):t.currentFocusObject===s&&(t.currentFocusObject=null);let l=a;l.currentFocusObject=t.currentFocusObject,r.onFocus(l)}function yl({csfState:t,csfCallbacks:e},r,o){if(t.iframeConfigCount+=1,window._b$dl&&console.log("### handleIframeConfigFeedback::csfState.iframeConfigCount:: ",t.iframeConfigCount,"who=",o.fieldType),t.isConfigured){let n={additionalIframeConfigured:!0,fieldType:o.fieldType,type:t.type};e.onAdditionalSFConfig(n)}else if(t.iframeConfigCount===t.originalNumIframes)return r(),!0;return!1}function gl({csfState:t,csfConfig:e,csfProps:r,csfCallbacks:o},n){t.isConfigured=!0;let a={iframesConfigured:!0,type:t.type,rootNode:r.rootNode};if(o.onConfigSuccess(a),t.numIframes===1&&e.isCreditCardType){if(t.type==="card")return Or("ERROR: Payment method with a single secured field - but 'brands' has not been set to an array containing the specific card brand"),!1;let s=Jt.getCardByBrand(t.type);s&&(s.cvcPolicy??Fe)!==Fe&&n()}return!0}function Cl({csfState:t,csfProps:e,csfCallbacks:r}){let o=(s=>{let l=Object.keys(s);for(let c=0,u=l.length;c<u;c+=1)if(!s[l[c]].isValid)return!1;return!0})(t.securedFields),n=o!==t.allValid;if(t.allValid=o,!o&&!n)return;let a={allValid:o,type:t.type,rootNode:e.rootNode};r.onAllValid(a)}function vl({csfState:t,csfCallbacks:e},r){let{binValue:o,encryptedBin:n,uuid:a}=r,s={binValue:o,type:t.type};n&&(s.encryptedBin=n,s.uuid=a),e.onBinValue(s)}function bl(){this.postMessageToAllIframes({destroy:!0}),Object.keys(this.state.securedFields).forEach(t=>{let e=this.state.securedFields[t];e&&e.destroy(),this.state.securedFields[t]=null}),this.destroyTouchendListener(),this.destroyTouchstartListener(),this.state.securedFields={}}var Br=(t="You cannot use secured fields")=>{Pe(`${t} - they are not yet configured. Use the 'onConfigSuccess' callback to know when this has happened.`)},Fo=class extends wo{init(){this.configHandler(this.props),this.callbacksHandler(this.props.callbacks);let e=this.createSecuredFields();this.state.numIframes=this.state.originalNumIframes=e,this.state.isKCP=!!this.props.isKCP,Ie.__IS_IOS&&this.props.shouldDisableIOSArrowKeys&&(this.hasGenuineTouchEvents=!1,Xe(document,"touchstart",this.touchstartListener))}createReturnObject(){return{updateStyles:e=>{this.state.isConfigured?this.postMessageToAllIframes({styleObject:e}):Pe("You cannot update the secured fields styling - they are not yet configured. Use the 'onConfigSuccess' callback to know when this has happened.")},setFocusOnFrame:e=>{this.state.isConfigured?this.setFocusOnFrame(e):Br("You cannot set focus on any secured field")},isValidated:(e,r)=>{if(this.state.isConfigured){if(S(this.state.securedFields,e)){this.state.securedFields[e].hasError=!0,this.state.securedFields[e].errorType===""&&(this.state.securedFields[e].errorType="isValidated");let o={txVariant:this.state.type,fieldType:e,externalValidation:!0,code:r,numKey:this.state.securedFields[e].numKey};de(o,ce(this.state,e),this.config.loadingContext)}}else Br("You cannot set validated on any secured field")},hasUnsupportedCard:(e,r)=>{if(this.state.isConfigured){if(S(this.state.securedFields,e)){this.state.securedFields[e].hasError=!!r,this.state.securedFields[e].errorType=r;let o={txVariant:this.state.type,fieldType:e,unsupportedCard:!!r,code:r,numKey:this.state.securedFields[e].numKey};de(o,ce(this.state,e),this.config.loadingContext)}}else Br("You cannot set hasUnsupportedCard on any secured field")},destroy:()=>{this.state.isConfigured?this.destroySecuredFields():Br("You cannot destroy secured fields")},brandsFromBinLookup:(e,r)=>{if(!this.config.isCreditCardType)return null;this.state.isConfigured?this.handleBrandFromBinLookup(e,r):Br("You cannot set pass brands to secured fields")},addSecuredField:e=>{let r=we(this.props.rootNode,`[data-cse="${e}"]`);r&&(this.state.numIframes+=1,this.setupSecuredField(r))},removeSecuredField:e=>{if(this.state.securedFields[e]){this.state.securedFields[e].destroy(),delete this.state.securedFields[e],this.state.numIframes-=1,this.state.iframeCount-=1;let r={additionalIframeRemoved:!0,fieldType:e,type:this.state.type};this.callbacks.onAdditionalSFRemoved(r)}},setKCPStatus:e=>{this.state.isKCP=e},sfIsOptionalOrHidden:e=>this.state.securedFields[e].isOptionalOrHidden()}}constructor(e){super(e),this.state={type:this.props.type,brand:this.props.type!=="card"?{brand:this.props.type,cvcPolicy:"required"}:{brand:null,cvcPolicy:"required"},allValid:void 0,numIframes:0,originalNumIframes:0,iframeCount:0,iframeConfigCount:0,isConfigured:!1,hasSeparateDateFields:!1,currentFocusObject:null,registerFieldForIos:!1,securedFields:{},isKCP:!1};let r={csfState:this.state,csfConfig:this.config,csfProps:this.props,csfCallbacks:this.callbacks};this.configHandler=Li,this.callbacksHandler=Bi,this.validateForm=Le(Cl,r),this.isConfigured=Le(gl,r,this.validateForm),this.handleIframeConfigFeedback=Le(yl,r,this.isConfigured),this.processBrand=Le(hl,r),this.handleValidation=Yi,this.handleEncryption=Ki,this.createSecuredFields=tl,this.createNonCardSecuredFields=rl,this.createCardSecuredFields=ol,this.setupSecuredField=nl,this.postMessageToAllIframes=Le(ml,r),this.handleIOSTouchEvents=Qt.handleTouchend.bind(this),this.touchendListener=Qt.touchendListener.bind(this),this.destroyTouchendListener=Qt.destroyTouchendListener.bind(this),this.touchstartListener=Qt.touchstartListener.bind(this),this.destroyTouchstartListener=Qt.destroyTouchstartListener.bind(this),this.setFocusOnFrame=Le(pl,r),this.handleFocus=Le(_l,r,this.handleIOSTouchEvents),this.handleSFShiftTab=sa.handleSFShiftTab,this.handleShiftTab=sa.handleShiftTab,this.destroySecuredFields=bl,this.processAutoComplete=Le(fl,r),this.handleBinValue=Le(vl,r),this.handleBrandFromBinLookup=ul,this.sendBrandToCardSF=dl,this.sendExpiryDatePolicyToSF=cl,this.init()}};var El=t=>{if(!t)throw new Error("No securedFields configuration object defined");let e={...t};try{let o=Jt.isGenericCardType(e.type);e.type=o?"card":e.type}catch{e.type="card"}if(!S(e,"rootNode"))return Or('ERROR: SecuredFields configuration object is missing a "rootNode" property');if(Oi(e.clientKey))return Pe('WARNING: AdyenCheckout configuration object is missing a "clientKey" property.');let r=Lu(e.rootNode);return r?(e.rootNode=r,new Fo(e).createReturnObject()):Or(`ERROR: SecuredFields cannot find a valid rootNode element for ${e.type}`)},Lu=t=>{let e;return typeof t=="object"&&(e=t),typeof t!="string"||(e=we(document,t),e)?e:null};var Sl=t=>t.replace(/([a-z])([A-Z])/g,"$1_$2").toLowerCase();var Lo=(t,e)=>{let r=t==="card"?"nocard":t||"nocard",o={type:r,extension:"svg"};return e.getImage(o)(r)},Pl=t=>{let e=Sl(t);return To.includes(t)&&(e=e.substring(fi.length+1)),e};function Bo(t,e,r,o){return(e!==Ao&&e!==xo||r[t]!==0)&&o[t]}var Re={handleFocus:function(t){this.numCharsInField[t.fieldType]=t.numChars,this.props.onFocus(t)},handleOnAllValid:function(t){return!this.state.detectedUnsupportedBrands&&(this.setState({isSfpValid:t.allValid},()=>{this.props.onChange(this.state,{event:"handleOnAllValid"}),this.props.onAllValid(t)}),!0)},handleOnAutoComplete:function(t){this.setState({autoCompleteName:t.value},()=>{this.props.onChange(this.state,{event:"handleOnAutoComplete",fieldType:t.fieldType}),this.setState({autoCompleteName:null})}),this.props.onAutoComplete(t)},handleOnFieldValid:function(t){return(!this.state.detectedUnsupportedBrands||t.fieldType!==x)&&(this.setState(e=>({data:{...e.data,[t.encryptedFieldName]:t.blob},valid:{...e.valid,[t.encryptedFieldName]:t.valid},errors:{...e.errors,[t.fieldType]:e.errors[t.fieldType]??!1}}),()=>{this.props.onChange(this.state,{event:"handleOnFieldValid",fieldType:t.fieldType}),this.props.onFieldValid(t)}),!0)},handleOnLoad:function(t){clearTimeout(this.csfLoadFailTimeout),this.csfLoadFailTimeout=null,this.props.onLoad(t),this.csfConfigFailTimeout=setTimeout(()=>{this.state.status!=="ready"&&(this.setState({status:"csfConfigFailure"}),this.props.onError(new b("ERROR","secured fields have failed to configure")))},this.csfConfigFailTimeoutMS)},handleOnConfigSuccess:function(t){clearTimeout(this.csfConfigFailTimeout),this.csfConfigFailTimeout=null,this.setState({status:"ready"},()=>{this.props.onConfigSuccess(t)})},handleOnBrand:function(t){this.setState(e=>{let r=Bo(A,t.cvcPolicy,this.numCharsInField,e.errors),o=this.numDateFields===1?Bo(D,t.expiryDatePolicy,this.numCharsInField,e.errors):null,n=this.numDateFields===2?Bo(k,t.expiryDatePolicy,this.numCharsInField,e.errors):null,a=this.numDateFields===2?Bo(T,t.expiryDatePolicy,this.numCharsInField,e.errors):null;return{brand:t.brand,cvcPolicy:t.cvcPolicy??Fe,showSocialSecurityNumber:t.showSocialSecurityNumber,errors:{...e.errors,...Ce(r)&&{[A]:r},...Ce(o)&&{[D]:o},...Ce(n)&&{[k]:n},...Ce(a)&&{[T]:a}},expiryDatePolicy:t.expiryDatePolicy??xe}},()=>{this.props.onChange(this.state,{event:"handleOnBrand"});let e=this.props.brandsConfiguration[t.brand]?.icon??Lo(t.brand,this.props.resources);this.props.onBrand({...t,brandImageUrl:e})})},handleOnError:function(t,e=null){let r=t.error;return this.setState(o=>({errors:{...o.errors,[t.fieldType]:r||!1},...e&&{data:{...o.data,[x]:void 0}},...e&&{valid:{...o.valid,[x]:!1}},...e&&{isSfpValid:!1}}),()=>{this.props.onChange(this.state,{event:"handleOnError",fieldType:t.fieldType})}),!0},handleOnNoDataRequired:function(){this.setState({status:"ready"},()=>this.props.onChange({isSfpValid:!0}))},handleOnTouchstartIOS:function(t){this.props.disableIOSArrowKeys?.(t)},handleKeyPressed:function(t){if(t.action==="enterKeyPressed"){let e=new KeyboardEvent("keypress",{bubbles:!0,cancelable:!0,key:"Enter",code:"Enter"});this.props.handleKeyPress?.(e)}}};var Rl={type:"card",keypadFix:!0,rootNode:null,loadingContext:null,brands:[],showWarnings:!1,autoFocus:!0,trimTrailingSeparator:!0,onChange:()=>{},onLoad:()=>{},onConfigSuccess:()=>{},onAllValid:()=>{},onFieldValid:()=>{},onBrand:()=>{},onError:()=>{},onBinValue:()=>{},onFocus:()=>{},onAutoComplete:()=>{},handleKeyPress:()=>{},styles:{}};function $(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ur=class extends H{componentDidMount(){this.props.rootNode&&this.setRootNode(this.props.rootNode);let e=Di(this.rootNode),r=e.reduce(wi,{});this.setState({valid:r}),e.forEach(o=>{this.numCharsInField[o]=0}),this.numDateFields=e.filter(o=>o.match(/Expiry/)).length,e.length?(this.destroy(),this.initializeCSF(this.rootNode)):this.handleOnNoDataRequired()}componentDidUpdate(){this.checkForKCPFields(),this.props.onStateUpdate?.(this.state)}componentWillUnmount(){this.csf=null,clearTimeout(this.csfLoadFailTimeout),clearTimeout(this.csfConfigFailTimeout)}initializeCSF(e){let r=this.props.loadingContext,o={rootNode:e,type:this.props.type,clientKey:this.props.clientKey,cardGroupTypes:this.props.brands,autoFocus:this.props.autoFocus,trimTrailingSeparator:this.props.trimTrailingSeparator,loadingContext:r,keypadFix:this.props.keypadFix,showWarnings:this.props.showWarnings,iframeUIConfig:{sfStyles:this.props.styles},i18n:this.props.i18n,callbacks:{onLoad:this.handleOnLoad,onConfigSuccess:this.handleOnConfigSuccess,onFieldValid:this.handleOnFieldValid,onAllValid:this.handleOnAllValid,onBrand:this.handleOnBrand,onError:this.handleOnError,onFocus:this.handleFocus,onBinValue:this.props.onBinValue,onAutoComplete:this.handleOnAutoComplete,onAdditionalSFConfig:this.props.onAdditionalSFConfig,onAdditionalSFRemoved:this.props.onAdditionalSFRemoved,onTouchstartIOS:this.handleOnTouchstartIOS,onKeyPressed:this.handleKeyPressed},isKCP:this.state.hasKoreanFields,legacyInputMode:this.props.legacyInputMode,minimumExpiryDate:this.props.minimumExpiryDate,implementationType:this.props.implementationType||"components",forceCompat:this.props.forceCompat,maskSecurityCode:this.props.maskSecurityCode,exposeExpiryDate:this.props.exposeExpiryDate,shouldDisableIOSArrowKeys:!!this.props.disableIOSArrowKeys,placeholders:this.props.placeholders??{},showContextualElement:this.props.showContextualElement};this.csf=El(o),this.csfLoadFailTimeout=setTimeout(()=>{this.state.status!=="ready"&&(this.setState({status:"csfLoadFailure"}),this.props.onError(new b("ERROR","secured field iframes have failed to load")))},this.csfLoadFailTimeoutMS)}checkForKCPFields(){let e=!1;if(this.props.koreanAuthenticationRequired&&(e=this.issuingCountryCode?this.issuingCountryCode==="kr":this.props.countryCode==="kr"),this.state.hasKoreanFields&&!e){let r=o=>({data:{...o.data,[_e]:void 0},valid:{...o.valid,[_e]:!1},errors:{...o.errors,[_e]:!1},hasKoreanFields:!1});this.setState(r,()=>{this.props.onChange(this.state)}),this.csf.removeSecuredField(_e),this.csf.setKCPStatus(!1)}if(!this.state.hasKoreanFields&&e){let r=o=>({valid:{...o.valid,[_e]:!1},hasKoreanFields:!0,isSfpValid:!1});this.setState(r,()=>{this.props.onChange(this.state)}),this.csf.addSecuredField(_e),this.csf.setKCPStatus(!0)}}getChildContext(){return{i18n:this.props.i18n}}handleUnsupportedCard(e){let r=!!e.error;return r&&this.setState({detectedUnsupportedBrands:e.detectedBrands}),e.rootNode=this.rootNode,this.handleOnError(e,r),this.csf&&this.csf.hasUnsupportedCard(x,e.error),r}setFocusOn(e){this.csf&&this.csf.setFocusOnFrame(e)}updateStyles(e){this.csf&&this.csf.updateStyles(e)}sfIsOptionalOrHidden(e){return this.csf.sfIsOptionalOrHidden(e)}destroy(){this.csf&&this.csf.destroy()}showValidation(){let{numDateFields:e,state:r}=this;Object.keys(r.valid).reduce(Ii(e,r),[]).forEach(o=>{let n=ki(o,this.rootNode,r);this.handleOnError(n,!!r.detectedUnsupportedBrands),this.csf&&this.csf.isValidated&&this.csf.isValidated(o,n.error)})}mapErrorsToValidationRuleResult(){return Object.keys(this.state.errors).reduce((e,r)=>{let o=this.state.errors[r];return e[r]=o?{isValid:!1,errorMessage:Xi(o,Xt),errorI18n:this.props.i18n.get(o),error:o,rootNode:this.rootNode,...this.state.detectedUnsupportedBrands&&{detectedBrands:this.state.detectedUnsupportedBrands}}:null,e},{})}processBinLookupResponse(e,r){if(this.state.detectedUnsupportedBrands&&(this.setState(a=>({errors:{...a.errors,[x]:!1},detectedUnsupportedBrands:null})),this.csf&&e)){let a={type:"card",fieldType:"encryptedCardNumber",error:""};this.handleUnsupportedCard(a)}this.issuingCountryCode=e?.issuingCountryCode?.toLowerCase();let o=r?.brand,n=o&&gi.includes(r.brand);n&&this.setState(r,()=>{this.props.onChange(this.state)}),this.csf&&this.csf.brandsFromBinLookup(e,n?r:null)}render(e,r){return e.render({setRootNode:this.setRootNode,setFocusOn:this.setFocusOn},r)}constructor(e){super(e),$(this,"csfLoadFailTimeout",void 0),$(this,"csfLoadFailTimeoutMS",void 0),$(this,"csfConfigFailTimeout",void 0),$(this,"csfConfigFailTimeoutMS",void 0),$(this,"numCharsInField",void 0),$(this,"rootNode",void 0),$(this,"numDateFields",void 0),$(this,"csf",void 0),$(this,"handleOnLoad",void 0),$(this,"handleOnConfigSuccess",void 0),$(this,"handleOnFieldValid",void 0),$(this,"handleOnAllValid",void 0),$(this,"handleOnBrand",void 0),$(this,"handleFocus",void 0),$(this,"handleOnError",void 0),$(this,"handleOnAutoComplete",void 0),$(this,"handleOnNoDataRequired",void 0),$(this,"handleOnTouchstartIOS",void 0),$(this,"handleKeyPressed",void 0),$(this,"state",void 0),$(this,"props",void 0),$(this,"issuingCountryCode",void 0),$(this,"setRootNode",o=>{this.rootNode=o});let r={status:"loading",brand:e.type,errors:{},valid:{},data:{},cvcPolicy:Fe,expiryDatePolicy:xe,isSfpValid:!1,hasKoreanFields:e.hasKoreanFields};this.state=r,this.csfLoadFailTimeout=null,this.csfLoadFailTimeoutMS=3e4,this.csfConfigFailTimeout=null,this.csfConfigFailTimeoutMS=15e3,this.numCharsInField={},this.handleOnLoad=Re.handleOnLoad.bind(this),this.handleOnConfigSuccess=Re.handleOnConfigSuccess.bind(this),this.handleOnFieldValid=Re.handleOnFieldValid.bind(this),this.handleOnAllValid=Re.handleOnAllValid.bind(this),this.handleOnBrand=Re.handleOnBrand.bind(this),this.handleFocus=Re.handleFocus.bind(this),this.handleOnError=Re.handleOnError.bind(this),this.handleOnNoDataRequired=Re.handleOnNoDataRequired.bind(this),this.handleOnAutoComplete=Re.handleOnAutoComplete.bind(this),this.handleOnTouchstartIOS=Re.handleOnTouchstartIOS.bind(this),this.handleKeyPressed=Re.handleKeyPressed.bind(this),this.processBinLookupResponse=this.processBinLookupResponse.bind(this),this.setFocusOn=this.setFocusOn.bind(this),this.updateStyles=this.updateStyles.bind(this),this.handleUnsupportedCard=this.handleUnsupportedCard.bind(this),this.showValidation=this.showValidation.bind(this),this.destroy=this.destroy.bind(this)}};$(Ur,"defaultProps",Rl);function Tl(t,e){let[r,o]=t;return{dualBrandSelectElements:[{id:r.brand,brandObject:r},{id:o.brand,brandObject:o}],selectedBrandValue:e?r.brand:"",leadBrand:r}}var Al=ti(void 0),er=({i18n:t,loadingContext:e,resources:r,analytics:o,children:n})=>(Ze(()=>{t&&e&&r||console.warn(`CoreProvider - WARNING core provider is missing:${t?"":"i18n"} ${e?"":"loadingContext"} ${r?"":"resources"}`)},[t,e,r]),_(Al.Provider,{value:{i18n:t,loadingContext:e,resources:r,analytics:o}},Wn(n))),ut=()=>{let t=pi(Al);if(t===void 0)throw new Error('"useCoreContext" must be used within a CoreProvider');return t};function xl(){let{resources:t}=ut();return ui(e=>t?.getImage(e),[])}var Uo="threeDS2Fingerprint",Lt="3DS2Fingerprint_Error",Vo="callSubmit3DS2Fingerprint_Response",Ho="threeDS2Challenge",Te="3DS2Challenge_Error",Ae="threeDS2",pt="3DS2",Je='Missing "token" property from threeDS2 action';var Bt="timeout",Dl={result:{transStatus:"U"},type:"challengeResult",errorCode:Bt},wl={result:{threeDSCompInd:"N"},type:"fingerPrintResult",errorCode:Bt},ia={"01":["250px","400px"],"02":["390px","400px"],"03":["500px","600px"],"04":["600px","400px"],"05":["100%","100%"]};var tr=(t,e=!1)=>{let r;try{r=new URL(t)}catch{return!1}return e&&r.protocol==="http:"||r.protocol==="https:"};var Il=(t,e,r)=>e.some(o=>t.includes(o[r]));var kl=["cartebancaire","bcmc","dankort"];var Bu=(t,e)=>t.reduce((r,o)=>r||e.includes(o.brand),!1),Nl=t=>t.map(e=>({...e})),Uu=(t,e="mc",r="visa")=>{let o=Nl(t);return o[0].brand!==e&&o[0].brand!==r&&o.reverse(),o.length=1,o};function Ol(t,e,r,o={}){let{type:n,cvcPolicy:a}=t,{sfp:s}=e,{dualBrandSelectElements:l,setDualBrandSelectElements:c,setSelectedBrandValue:u,issuingCountryCode:p,setIssuingCountryCode:d}=r;return{processBinLookup:(h,m)=>{let C=h?.issuingCountryCode?h.issuingCountryCode.toLowerCase():null;if(d(C),!h||!Object.keys(h).length){c([]),u("");let g=m&&n!=="card"?n:null;return s.current.processBinLookupResponse(h,{brand:g,cvcPolicy:a}),void(o.current=0)}if(h.supportedBrands?.length){let g=Bu(h.supportedBrands,Si),v=g?Uu(h.supportedBrands):Nl(h.supportedBrands);if(v.length>1){let f=Il(kl,v,"brand"),y=Tl(v,f);c(y.dualBrandSelectElements),u(y.selectedBrandValue),s.current.processBinLookupResponse({issuingCountryCode:h.issuingCountryCode,supportedBrands:[y.leadBrand]}),y.leadBrand.panLength>0&&(o.current=y.leadBrand.panLength)}else c([]),u(""),g||u(v[0].brand),s.current.processBinLookupResponse({issuingCountryCode:h.issuingCountryCode,supportedBrands:v}),v[0].panLength>0&&(o.current=v[0].panLength)}},handleDualBrandSelection:h=>{let m=h;if(h instanceof Event){let g=h.target;m=g.getAttribute("data-value")||g.getAttribute("value")}let C=[];m&&(C=l.reduce((g,v)=>(v.brandObject.brand===m&&g.push(v.brandObject),g),[]),C.length&&(u(m),s.current.processBinLookupResponse({issuingCountryCode:p,supportedBrands:C,isDualBrandSelection:!0})))}}}function Ml(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var la={exports:{}};var Fl;function Ll(){return Fl||(Fl=1,t=la,(function(){var e={}.hasOwnProperty;function r(){for(var a="",s=0;s<arguments.length;s++){var l=arguments[s];l&&(a=n(a,o(l)))}return a}function o(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return r.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var s="";for(var l in a)e.call(a,l)&&a[l]&&(s=n(s,l));return s}function n(a,s){return s?a?a+" "+s:a+s:a}t.exports?(r.default=r,t.exports=r):window.classNames=r})()),la.exports;var t}var Be=Ml(Ll());var Ut=({inline:t=!1,size:e="large"})=>_("div",{"data-testid":"spinner",className:"adyen-checkout__spinner__wrapper "+(t?"adyen-checkout__spinner__wrapper--inline":"")},_("div",{className:`adyen-checkout__spinner adyen-checkout__spinner--${e}`}));function rr(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let e=16*Math.random()|0;return(t=="x"?e:3&e|8).toString(16)})}function Bl(t){let{backgroundUrl:e="",className:r="",classNameModifiers:o=[],src:n="",alt:a="",showOnError:s=!1}=t,[l,c]=ge(!1),u=lt(null),p=()=>{c(!0)},d=Be([r],"adyen-checkout__image",{"adyen-checkout__image--loaded":l},...o.map(h=>`adyen-checkout__image--${h}`));return Ze(()=>{let h=e?new Image:u.current;h.src=e||n,h.onload=p,c(!!h.complete)},[]),e?_("div",{"data-testid":"background",style:{backgroundUrl:e},...t,className:d}):_("img",{...t,alt:a,ref:u,className:d,onError:()=>{c(s)}})}function ca(t){let e=t.replace("_","-"),r=new RegExp("([a-z]{2})([-])([A-Z]{2})");if(r.test(e))return e;let[o,n]=e.split("-");if(o.length!==2)throw new b("IMPLEMENTATION_ERROR",`Locale '${t}' does not match the expected format`);if(!n)return o.toLowerCase();let a=[o.toLowerCase(),n.toUpperCase()].join("-");if(r.test(a))return a;throw new b("IMPLEMENTATION_ERROR",`Locale '${t}' does not match the expected format`)}function Ul(t={}){return Object.keys(t).reduce((e,r)=>(e[ca(r)]=t[r],e),{})}var da=(t,e)=>t.replace(/%{(\w+)}/g,(r,o)=>e[o]||""),Vl=(t,e,r={values:{},count:0})=>{let o=`${e}__plural`,n=a=>`${e}__${a}`;return Object.prototype.hasOwnProperty.call(t,n(r.count))?da(t[n(r.count)],r.values):Object.prototype.hasOwnProperty.call(t,o)&&r.count>1?da(t[o],r.values):Object.prototype.hasOwnProperty.call(t,e)?da(t[e],r.values):null};var Hl="https://checkoutshopper-live.adyen.com/checkoutshopper/",Yo="6.25.0";var Yl=["amount","secondaryAmount","countryCode","environment","_environmentUrls","loadingContext","i18n","modules","order","session","clientKey","showPayButton","redirectFromTopWhenInIframe","onPaymentCompleted","onPaymentFailed","beforeRedirect","beforeSubmit","onSubmit","onActionHandled","onAdditionalDetails","onChange","onEnterKeyPressed","onError","onBalanceCheck","onOrderCancel","onOrderRequest","onOrderUpdated","onPaymentMethodsRequest"];function Kl(t,e){let{headers:r=[],errorLevel:o="warn",errorCode:n,loadingContext:a=Hl,method:s="GET",path:l,timeout:c=6e4}=t,u={method:s,mode:"cors",cache:"default",credentials:"same-origin",headers:{Accept:"application/json, text/plain, */*","Content-Type":s==="POST"?"application/json":"text/plain",...r},redirect:"follow",referrerPolicy:"no-referrer-when-downgrade",...AbortSignal?.timeout&&{signal:AbortSignal?.timeout(c)},...e&&{body:JSON.stringify(e)}},p=`${a}${l}`;return fetch(p,u).then(async d=>{let h=await d.json();if(d.ok)return h;if((function(m){return m&&m.errorCode&&m.errorType&&m.message&&m.status})(h))return void ua({message:h.message,level:o,cause:h,code:n});ua({message:t.errorMessage||`Service at ${p} is not available`,level:o,cause:h,code:n})}).catch(d=>{if(d instanceof b)throw d;ua({message:t.errorMessage||`Call to ${p} failed. Error= ${d}`,level:o,cause:d,code:n})})}function ua({message:t,level:e,cause:r,code:o}){switch(e){case"silent":break;case"info":case"warn":case"error":console[e](t);break;default:throw new b("NETWORK_ERROR",t,{cause:r,code:o})}}function pa(t,e){return Kl({...t,method:"GET"},e)}function X(t,e){return Kl({...t,method:"POST"},e)}var Gl=(t,e=300)=>{let r;return function(...o){clearTimeout(r),r=setTimeout(()=>t.apply(this,o),e)}};function ma(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Vr=class extends H{render(){let{classNameModifiers:e=[],disabled:r,href:o,icon:n,onClickCompletedIcon:a,inline:s,label:l,ariaLabel:c,ariaDescribedBy:u,status:p,variant:d,buttonRef:h,onClickCompletedLabel:m,onMouseEnter:C,onMouseLeave:g,onFocus:v,onBlur:f,onKeyDown:y,onKeyPress:I}=this.props,{completed:E}=this.state,{i18n:K}=ut(),F=a||n?_("img",{className:"adyen-checkout__button__icon",src:this.state.completed?a??n:n,alt:"","aria-hidden":"true"}):"",W=[...e,...d!=="primary"?[d]:[],...s?["inline"]:[],...E?["completed"]:[],...p==="loading"||p==="redirect"?["loading"]:[]],ne=Be(["adyen-checkout__button",...W.map(U=>`adyen-checkout__button--${U}`)]),L={loading:_("span",{className:"adyen-checkout__button__content"},_(Ut,{size:"medium",inline:!0}),_("span",{className:"adyen-checkout__button__text--sr-only"},K.get("loading"))),redirect:_("span",{className:"adyen-checkout__button__content"},_(Ut,{size:"medium",inline:!0}),K.get("payButton.redirecting")),default:_("span",{className:"adyen-checkout__button__content"},F,_("span",{className:"adyen-checkout__button__text"},this.state.completed?m??l:l))},B=L[p]||L.default;return o?_("a",{className:ne,href:o,disabled:r,target:this.props.target,rel:this.props.rel},B):_("button",{ref:h,className:ne,type:"button",disabled:r,onClick:this.onClick,"aria-label":c,"aria-describedby":u,onMouseEnter:C,onMouseLeave:g,onKeyDown:y,onFocus:v,onBlur:f,onKeyPress:I},B,p!=="loading"&&p!=="redirect"&&this.props.children)}constructor(...e){super(...e),ma(this,"onClick",r=>{r.preventDefault(),this.props.disabled||this.props.onClick?.(r,{complete:this.complete})}),ma(this,"complete",(r=1e3)=>{this.setState({completed:!0}),setTimeout(()=>{this.setState({completed:!1})},r)})}};ma(Vr,"defaultProps",{status:"default",variant:"primary",disabled:!1,label:"",inline:!1,target:"_self"});var ha="v3/analytics",zl=1e4;var ke={log:"log",error:"error",info:"info"},J={network:"Network",apiError:"ApiError",sdkError:"SdkError",redirect:"Redirect"},jl={redirect:"600"},$l="action",fa="submit",Ko="selected",Ue="rendered";var Wl="validationError",Zl="focus",ql="unfocus";var Go="instant_payment_button";var Y=(function(t){return t.ACTION_IS_MISSING_PAYMENT_DATA="700",t.ACTION_IS_MISSING_TOKEN="701",t.TOKEN_IS_MISSING_THREEDSMETHODURL="702",t.TOKEN_IS_MISSING_OTHER_PROPS="703",t.TOKEN_DECODE_OR_PARSING_FAILED="704",t.THREEDS2_TIMEOUT="705",t.TOKEN_IS_MISSING_ACSURL="800",t.NO_TRANSSTATUS="801",t.NO_DETAILS_FOR_FRICTIONLESS_OR_REFUSED="802",t.NO_COMPONENT_FOR_ACTION="803",t.NO_ACTION_FOR_CHALLENGE="804",t.CHALLENGE_RESOLVED_WITHOUT_RESULT_PROP="805",t})({}),Ve=(function(t){return t.FINGERPRINT_DATA_SENT="fingerprintDataSentWeb",t.FINGERPRINT_IFRAME_LOADED="fingerprintIframeLoaded",t.FINGERPRINT_COMPLETED="fingerprintCompleted",t.CHALLENGE_DATA_SENT="challengeDataSentWeb",t.CHALLENGE_IFRAME_LOADED="challengeIframeLoaded",t.CHALLENGE_COMPLETED="challengeCompleted",t})({}),_a={[Ri]:"925",[Ti]:"942",[Ai]:"926",[`${qe}.country`]:"930",[`${qe}.street`]:"931",[`${qe}.house_number_or_name`]:"932",[`${qe}.postal_code`]:"933",[`${qe}.city`]:"935",[`${qe}.state_or_province`]:"936",[`${Do}.postal_code`]:"934"},zo=["cart","minicart","pdp","checkout"],Xl=["applicationInfo","checkoutAttemptId"],Jl="fetch-checkoutAttemptId-failed",jo={all:"all",initial:"initial"};var Ql=t=>t.replace(/[^0-9]/g,"");var ed=()=>Date.now(),td=(t,e)=>{if(t===qe||t===Do)return _a[`${t}.${e}`]??t;let r=_a[t]??t;return isNaN(Number(r))&&(r=Ql(r)),r},rd=t=>t?Object.keys(t).reduce((e,r)=>(Xl.includes(r)&&(e[r]=t[r]),e),{}):{};function ya(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var mt=class{constructor(){ya(this,"timestamp",void 0),ya(this,"id",void 0),ya(this,"component",void 0),this.id=rr(),this.timestamp=String(ed())}};function Ne(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Hr=(function(t){return t.clicked="clicked",t.rendered="rendered",t.sdkDownloadInitiated="sdkDownloadInitiated",t.sdkDownloadFailed="sdkDownloadFailed",t.sdkDownloadAborted="sdkDownloadAborted",t.sdkDownloadCompleted="sdkDownloadCompleted",t.Initialized="initialized",t.LookupStarted="lookupStarted",t.LookupUserNotFound="lookupUserNotFound",t.OtpStarted="otpStarted",t.OtpSucceeded="otpSucceeded",t.OtpCanceled="otpCanceled",t.OtpFailed="otpFailed",t.AddressSelectorClicked="addressSelectorClicked",t.AddressSelectorClosed="addressSelectorClosed",t.AddressChanged="addressChanged",t})({}),ue=class extends mt{getEventCategory(){return ke.info}constructor(e){return super(),Ne(this,"type",void 0),Ne(this,"target",void 0),Ne(this,"issuer",void 0),Ne(this,"isExpress",void 0),Ne(this,"expressPage",void 0),Ne(this,"isStoredPaymentMethod",void 0),Ne(this,"brand",void 0),Ne(this,"validationErrorCode",void 0),Ne(this,"validationErrorMessage",void 0),Ne(this,"configData",void 0),Ne(this,"cdnUrl",void 0),this.component=e.component,this.type=e.type,this.target=e.target,this.issuer=e.issuer,this.isExpress=e.isExpress,this.isStoredPaymentMethod=e.isStoredPaymentMethod,this.isExpress=e.isExpress,this.expressPage=e.expressPage,this.brand=e.brand,this.validationErrorCode=e.validationErrorCode,this.validationErrorMessage=e.validationErrorMessage,this.configData=e.configData,this.cdnUrl=e.cdnUrl,this.type===Wl&&(this.validationErrorCode=td(this.validationErrorCode,this.target)),this}};function ht(){let t=De(window,"screen.colorDepth")||"",e=De(window,"screen.height")||"",r=De(window,"screen.width")||"",o=De(window,"navigator.userAgent")||"";return{acceptHeader:"*/*",colorDepth:t,language:De(window,"navigator.language")||"en",javaEnabled:!1,screenHeight:e,screenWidth:r,userAgent:o,timeZoneOffset:new Date().getTimezoneOffset()}}var od=t=>{let e=null;return r=>{if(t.props.doBinLookup!==!1){if(r.encryptedBin&&t.props.clientKey)e=r.uuid,X({loadingContext:t.props.loadingContext,path:`v3/bin/binLookup?token=${t.props.clientKey}`},{type:t.props.brand,supportedBrands:t.props.brands||kt,encryptedBin:r.encryptedBin,requestId:r.uuid}).then(o=>{if(o?.requestId===e)if(o.brands?.length){let n=o.brands.reduce((a,s)=>(a.detectedBrands.push(s.brand),a.paymentMethodVariants.push(s.paymentMethodVariant),s.supported===!0&&a.supportedBrands.push(s),a),{supportedBrands:[],detectedBrands:[],paymentMethodVariants:[]});if(n.supportedBrands.length)return t.processBinLookupResponse({issuingCountryCode:o.issuingCountryCode,supportedBrands:n.supportedBrands,...o.showSocialSecurityNumber?{showSocialSecurityNumber:o.showSocialSecurityNumber}:{}}),void t.onBinLookup({type:r.type,detectedBrands:n.detectedBrands,supportedBrands:n.supportedBrands.map(a=>a.brand),paymentMethodVariants:n.paymentMethodVariants,supportedBrandsRaw:n.supportedBrands,brands:t.props.brands||kt,issuingCountryCode:o.issuingCountryCode});if(n.detectedBrands.length){let a={type:"card",fieldType:"encryptedCardNumber",error:Xt.ERROR_MSG_UNSUPPORTED_CARD_ENTERED,detectedBrands:n.detectedBrands};return t.handleUnsupportedCard(a),void t.onBinLookup({type:r.type,detectedBrands:n.detectedBrands,supportedBrands:null,paymentMethodVariants:n.paymentMethodVariants,brands:t.props.brands||kt})}}else t.onBinLookup({type:r.type,detectedBrands:null,supportedBrands:null,paymentMethodVariants:null,brands:t.props.brands||kt}),t.processBinLookupResponse({},!0);else o?.requestId||t.props.onError(o||{errorType:"binLookup",message:"unknownError"})});else if(e){t.processBinLookupResponse(null,!0),e=null;let o={type:"card",fieldType:"encryptedCardNumber",error:""};t.handleUnsupportedCard(o),t.onBinLookup({isReset:!0})}t.props.onBinValue&&t.props.onBinValue(r)}else t.props.onBinValue&&t.props.onBinValue(r)}};function ve(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ft=class t{removeScript(){this.script?.parentNode?.removeChild(this.script),this.script=null}loadScript(){return new Promise((e,r)=>{let o=document.querySelector(this.node);if(!o)return void r(new b("SCRIPT_ERROR",`Unable to find script container node: ${this.node}`));let n=()=>{this.script&&(this.script.removeEventListener("load",a),this.script.removeEventListener("error",s))},a=()=>{this.script.setAttribute("data-script-loaded","true"),n(),e()},s=l=>{n(),r(new b("SCRIPT_ERROR",`Unable to load script ${this.src}.${l?.message&&`Message: ${l.message}`}`,{cause:l?.error||l}))};if(this.script=o.querySelector(`script[src="${this.src}"]`),this.script?.getAttribute("data-script-loaded"))e();else{if(this.script)return this.script.addEventListener("load",a),void this.script.addEventListener("error",s);this.script=document.createElement("script"),Object.assign(this.script,this.attributes),Object.assign(this.script.dataset,this.dataAttributes),this.script.src=this.src,this.script.async=!0,this.script.addEventListener("load",a),this.script.addEventListener("error",s),o.appendChild(this.script)}})}trackEvent(e){let r=new ue({type:e,component:this.component,cdnUrl:this.baseUrl});this.analytics?.sendAnalytics(r)}constructor({src:e,component:r,node:o="body",attributes:n,dataAttributes:a,analytics:s}){ve(this,"src",void 0),ve(this,"component",void 0),ve(this,"node",void 0),ve(this,"attributes",void 0),ve(this,"dataAttributes",void 0),ve(this,"analytics",void 0),ve(this,"baseUrl",void 0),ve(this,"script",void 0),ve(this,"loadPromise",null),ve(this,"rejectLoadPromise",null),ve(this,"load",()=>(this.loadPromise!==null||(this.loadPromise=new Promise((l,c)=>{this.rejectLoadPromise=c;let u=0;this.trackEvent(Hr.sdkDownloadInitiated);let p=async()=>{try{u++,await this.loadScript(),this.trackEvent(Hr.sdkDownloadCompleted),l()}catch(d){if(this.loadPromise===null)return;this.trackEvent(Hr.sdkDownloadFailed),this.removeScript(),u<t.MAX_NUMBER_OF_RETRIES?setTimeout(()=>{p()},t.RETRY_DELAY):(this.trackEvent(Hr.sdkDownloadAborted),this.loadPromise=null,this.rejectLoadPromise=null,c(d))}};p()})),this.loadPromise)),ve(this,"remove",()=>{this.rejectLoadPromise?.(new b("CANCEL","Script loading cancelled.")),this.removeScript(),this.loadPromise=null}),this.src=e,this.component=r,this.node=o,this.attributes=n,this.dataAttributes=a,this.analytics=s,this.baseUrl=(function(l){let c=new URL(l);return c.origin+c.pathname})(this.src)}};ve(ft,"RETRY_DELAY",1e3),ve(ft,"MAX_NUMBER_OF_RETRIES",3);var Hu=(t,e)=>e?.value&&e?.currency?t.amount(e.value,e.currency,{currencyDisplay:e.currencyDisplay||"symbol"}):"",nd=(t,e)=>`${t.get("payButton")} ${Hu(t,e)}`,ad=(t,e)=>{let r=e&&e?.value&&e?.currency?t.amount(e.value,e.currency,{currencyDisplay:e.currencyDisplay||"symbol"}):"";return`${r.length?"/ ":""}${r}`};var sd=({label:t})=>_("span",{className:"checkout-secondary-button__text"},t);var id=({amount:t,secondaryAmount:e,classNameModifiers:r=[],label:o,...n})=>{let{i18n:a}=ut(),s=t&&{}.hasOwnProperty.call(t,"value")&&t.value===0,l=s?a.get("confirmPreauthorization"):nd(a,t),c=t&&typeof t.value=="number"&&!!t.currency,u=e&&Object.keys(e).length>0,p=!s&&!o&&c&&u?ad(a,e):null;return _(Vr,{...n,disabled:n.disabled||n.status==="loading",classNameModifiers:[...r,"pay"],label:o||l},p&&_(sd,{label:p}))};function ld(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Qe=class extends H{iframeOnLoad(){this.props.callback&&typeof this.props.callback=="function"&&this.props.callback(this.iframeEl.contentWindow)}componentDidMount(){this.iframeEl.addEventListener?this.iframeEl.addEventListener("load",this.iframeOnLoad.bind(this),!1):this.iframeEl.attachEvent?this.iframeEl.attachEvent("onload",this.iframeOnLoad.bind(this)):this.iframeEl.onload=this.iframeOnLoad.bind(this)}componentWillUnmount(){this.iframeEl.removeEventListener?this.iframeEl.removeEventListener("load",this.iframeOnLoad.bind(this),!1):this.iframeEl.detachEvent?this.iframeEl.detachEvent("onload",this.iframeOnLoad.bind(this)):this.iframeEl.onload=null}render({name:e,src:r,width:o,height:n,minWidth:a,minHeight:s,allow:l,title:c,classNameModifiers:u}){let p=u.filter(d=>!!d);return _("iframe",{ref:d=>{this.iframeEl=d},allow:l,className:Be("adyen-checkout__iframe",`adyen-checkout__iframe--${e}`,p.length&&u.map(d=>`adyen-checkout__iframe--${e}-${d}`)),name:e,src:r,width:o,height:n,frameBorder:"0",title:c,referrerpolicy:"origin","min-width":a,"min-height":s})}constructor(...e){super(...e),ld(this,"iframeEl",void 0)}};ld(Qe,"defaultProps",{width:"0",height:"0",minWidth:"0",minHeight:"0",src:null,allow:null,title:"components iframe",classNameModifiers:[]});var Q=(function(t){return t.address="address",t.bankTransfer_IBAN="bankTransfer_IBAN",t.bankTransfer_BE="bankTransfer_BE",t.bankTransfer_NL="bankTransfer_NL",t.bankTransfer_PL="bankTransfer_PL",t.bankTransfer_FR="bankTransfer_FR",t.bankTransfer_CH="bankTransfer_CH",t.bankTransfer_IE="bankTransfer_IE",t.bankTransfer_GB="bankTransfer_GB",t.bankTransfer_DE="bankTransfer_DE",t.bankTransfer_AE="bankTransfer_AE",t.bankTransfer_AT="bankTransfer_AT",t.bankTransfer_AU="bankTransfer_AU",t.bankTransfer_BG="bankTransfer_BG",t.bankTransfer_CA="bankTransfer_CA",t.bankTransfer_EE="bankTransfer_EE",t.bankTransfer_ES="bankTransfer_ES",t.bankTransfer_FI="bankTransfer_FI",t.bankTransfer_HK="bankTransfer_HK",t.bankTransfer_HU="bankTransfer_HU",t.bankTransfer_IT="bankTransfer_IT",t.bankTransfer_JP="bankTransfer_JP",t.bankTransfer_LU="bankTransfer_LU",t.bankTransfer_NZ="bankTransfer_NZ",t.bankTransfer_PT="bankTransfer_PT",t.bankTransfer_SG="bankTransfer_SG",t.bankTransfer_SK="bankTransfer_SK",t.bankTransfer_US="bankTransfer_US",t.donation="donation",t.personal_details="personal_details",t.dropin="dropin",t.bcmc="bcmc",t.card="card",t.scheme="scheme",t.storedCard="storedCard",t.customCard="customcard",t.threeDS2Challenge="threeDS2Challenge",t.threeDS2Fingerprint="threeDS2Fingerprint",t.threeDS2DeviceFingerprint="threeDS2DeviceFingerprint",t.ach="ach",t.directdebit_GB="directdebit_GB",t.sepadirectdebit="sepadirectdebit",t.eft_directdebit_CA="eft_directdebit_CA",t.affirm="affirm",t.afterpay="afterpay",t.afterpay_default="afterpay_default",t.afterpay_b2b="afterpay_b2b",t.atome="atome",t.facilypay_3x="facilypay_3x",t.facilypay_4x="facilypay_4x",t.facilypay_6x="facilypay_6x",t.facilypay_10x="facilypay_10x",t.facilypay_12x="facilypay_12x",t.ratepay="ratepay",t.ratepay_directdebit="ratepay_directdebit",t.amazonpay="amazonpay",t.applepay="applepay",t.cashapp="cashapp",t.clicktopay="clicktopay",t.googlepay="googlepay",t.paypal="paypal",t.fastlane="fastlane",t.paywithgoogle="paywithgoogle",t.boletobancario="boletobancario",t.boletobancario_itau="boletobancario_itau",t.boletobancario_santander="boletobancario_santander",t.primeiropay_boleto="primeiropay_boleto",t.doku="doku",t.doku_alfamart="doku_alfamart",t.doku_permata_lite_atm="doku_permata_lite_atm",t.doku_indomaret="doku_indomaret",t.doku_atm_mandiri_va="doku_atm_mandiri_va",t.doku_sinarmas_va="doku_sinarmas_va",t.doku_mandiri_va="doku_mandiri_va",t.doku_cimb_va="doku_cimb_va",t.doku_danamon_va="doku_danamon_va",t.doku_bri_va="doku_bri_va",t.doku_bni_va="doku_bni_va",t.doku_bca_va="doku_bca_va",t.doku_wallet="doku_wallet",t.oxxo="oxxo",t.billdesk_online="billdesk_online",t.billdesk_wallet="billdesk_wallet",t.dotpay="dotpay",t.eps="eps",t.molpay_ebanking_fpx_MY="molpay_ebanking_fpx_MY",t.molpay_ebanking_TH="molpay_ebanking_TH",t.molpay_ebanking_VN="molpay_ebanking_VN",t.onlineBanking_CZ="onlineBanking_CZ",t.onlinebanking_IN="onlinebanking_IN",t.onlineBanking_PL="onlineBanking_PL",t.onlineBanking_SK="onlineBanking_SK",t.paybybank="paybybank",t.payu_IN_cashcard="payu_IN_cashcard",t.payu_IN_nb="payu_IN_nb",t.wallet_IN="wallet_IN",t.dragonpay="dragonpay",t.dragonpay_ebanking="dragonpay_ebanking",t.dragonpay_otc_banking="dragonpay_otc_banking",t.dragonpay_otc_non_banking="dragonpay_otc_non_banking",t.dragonpay_otc_philippines="dragonpay_otc_philippines",t.econtext="econtext",t.econtext_atm="econtext_atm",t.econtext_online="econtext_online",t.econtext_seven_eleven="econtext_seven_eleven",t.econtext_stores="econtext_stores",t.giropay="giropay",t.multibanco="multibanco",t.redirect="redirect",t.twint="twint",t.vipps="vipps",t.trustly="trustly",t.paybybank_AIS_DD="paybybank_AIS_DD",t.riverty="riverty",t.paybybank_pix="paybybank_pix",t.klarna="klarna",t.klarna_account="klarna_account",t.klarna_paynow="klarna_paynow",t.klarna_b2b="klarna_b2b",t.bcmc_mobile="bcmc_mobile",t.bcmc_mobile_QR="bcmc_mobile_QR",t.pix="pix",t.swish="swish",t.wechatpay="wechatpay",t.wechatpayQR="wechatpayQR",t.promptpay="promptpay",t.paynow="paynow",t.duitnow="duitnow",t.blik="blik",t.mbway="mbway",t.ancv="ancv",t.payto="payto",t.upi="upi",t.upi_qr="upi_qr",t.upi_collect="upi_collect",t.upi_intent="upi_intent",t.giftcard="giftcard",t.mealVoucher_FR="mealVoucher_FR",t.mealVoucher_FR_natixis="mealVoucher_FR_natixis",t.mealVoucher_FR_sodexo="mealVoucher_FR_sodexo",t.mealVoucher_FR_groupeup="mealVoucher_FR_groupeup",t})({});function Vt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var et=class{buildElementProps(e){this.props=this.formatProps({...this.constructor.defaultProps,...e})}formatProps(e){return e}formatData(){return{}}setUpAnalytics(e){return null}submitAnalytics(e){return null}handleKeyPress(e){return null}setState(e){this.state={...this.state,...e}}get data(){let e=De(this.props,"modules.risk.data"),r=De(this.props,"modules.analytics.getCheckoutAttemptId")?.()??Jl,o=this.state.order||this.props.order,n=this.formatData();return n.paymentMethod&&r&&(n.paymentMethod.checkoutAttemptId=r),{...e&&{riskData:{clientData:e}},...o&&{order:{orderData:o.orderData,pspReference:o.pspReference}},...n,clientStateDataIndicator:!0}}activate(){}render(){throw new Error("Payment method cannot be rendered.")}mount(e){let r=typeof e=="string"?document.querySelector(e):e;if(!r)throw new Error("Component could not mount. Root node was not found.");let o=!this._node;return this._node&&this.unmount(),this._node=r,Xe(this._node,"keypress",this.handleKeyPress,!1),this._component=this.render(),Xn(this._component,r),o&&this.props.modules&&this.props.modules.analytics&&this.setUpAnalytics({containerWidth:r&&r.offsetWidth,component:this.props.isDropin?"dropin":this.constructor.analyticsType??this.constructor.type,flavor:this.props.isDropin?"dropin":"components"}).then(()=>{if(!this.props.isDropin){let n=new ue({type:Ue});this.submitAnalytics(n)}}),this}update(e){return this.props=this.formatProps({...this.props,...e}),this.state={},this.unmount().mount(this._node)}unmount(){return dt(this._node,"keypress",this.handleKeyPress),this._node&&Xn(null,this._node),this}remove(){this.unmount(),this.core&&this.core.remove(this)}constructor(e,r){if(Vt(this,"_id",`${this.constructor.type}-${rr()}`),Vt(this,"core",void 0),Vt(this,"props",void 0),Vt(this,"state",{}),Vt(this,"_component",void 0),Vt(this,"_node",null),!(function(n){return!!n&&typeof n.initialize=="function"&&typeof n.createFromAction=="function"})(e))throw new b("IMPLEMENTATION_ERROR",`Trying to initialise the component '${this.constructor.type}' without a reference to an instance of AdyenCheckout`);this.core=e,this.buildElementProps(r),this.handleKeyPress=this.handleKeyPress.bind(this)}};Vt(et,"defaultProps",{});var Yu=["action","resultCode","sessionData","order","sessionResult","donationToken","error"];function tt(t){let e=[],r=Object.keys(t).reduce((o,n)=>(Yu.includes(n)?o[n]=t[n]:e.push(n),o),{});return e.length&&console.warn(`The following properties should not be passed to the client: ${e.join(", ")}`),r}function or(t){t&&(delete t.order,delete t.action,t.donationToken&&t.donationToken.length!==0||delete t.donationToken)}function rt(t){return["Cancelled","Error","Refused"].includes(t.resultCode)?Promise.reject(t):Promise.resolve(t)}function $o(t){return t?typeof t.activePaymentMethod=="object"&&typeof t.closeActivePaymentMethod=="function":!1}function dd(t,e){return t==="FI"&&e?{openFirstPaymentMethod:!1,openFirstStoredPaymentMethod:!1}:{}}var _t=class extends Error{constructor(e){super(e)}};function Yr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var me=class extends mt{getEventCategory(){return ke.log}constructor(e){return super(),Yr(this,"type",void 0),Yr(this,"message",void 0),Yr(this,"subType",void 0),Yr(this,"result",void 0),Yr(this,"target",void 0),this.type=e.type,this.message=e.message,this.subType=e.subType,this.result=e.result,this.target=e.target,this.component=e.component,this}};function ga(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ee=class extends mt{getEventCategory(){return ke.error}constructor(e){return super(),ga(this,"code",void 0),ga(this,"errorType",void 0),ga(this,"message",void 0),this.code=e.code,this.errorType=e.errorType,this.message=e.message,this.component=e.component,this}};function Oe(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var fe=class extends et{get analytics(){return this.core.modules.analytics}buildElementProps(e){let r={showPayButton:!0,...this.core.getCorePropsForComponent(),...e?.isStoredPaymentMethod?{}:this.getPaymentMethodFromPaymentMethodsResponse(e?.type),...e},o=$o(this);this.props=this.formatProps({...this.constructor.defaultProps,...dd(this.core.options.countryCode,o),...r})}getPaymentMethodFromPaymentMethodsResponse(e){return this.core.paymentMethodsResponse?.find(e||this.constructor.type)}storeElementRefOnCore(e){e?.isDropin||this.core.storeElementReference(this)}isAvailable(){return Promise.resolve()}setState(e){this.state={...this.state,...e},this.onChange()}showValidation(){return this.componentRef&&this.componentRef.showValidation&&this.componentRef.showValidation(),this}setElementStatus(e,r){return this.elementRef?.setStatus(e,r),this}setStatus(e,r){return this.componentRef?.setStatus&&this.componentRef.setStatus(e,r),this}onChange(){this.props.onChange?.({data:this.data,isValid:this.isValid,errors:this.state.errors,valid:this.state.valid},this.elementRef)}setUpAnalytics(e){let r=this.props.session?.id;return this.props.modules.analytics.setUp({...e,...r&&{sessionId:r}})}submitAnalytics(e){try{e.component=this.getComponent(e),this.props.modules.analytics.sendAnalytics(e)}catch(r){console.warn("Failed to submit the analytics event. Error:",r)}}getComponent({component:e}){return e||(this.constructor.analyticsType?this.constructor.analyticsType:this.constructor.type==="scheme"||this.constructor.type==="bcmc"?this.constructor.type:this.type)}submit(){this.isValid?this.makePaymentsCall().then(tt).then(rt).then(this.handleResponse).catch(e=>{e instanceof _t?this.setElementStatus("ready"):this.handleFailedResult(e)}):this.showValidation()}makePaymentsCall(){if(this.setElementStatus("loading"),this.props.onSubmit)return this.submitUsingAdvancedFlow();if(this.core.session)return(this.props.beforeSubmit?new Promise((e,r)=>this.props.beforeSubmit(this.data,this.elementRef,{resolve:e,reject:()=>r(new _t("beforeSubmitRejected"))})):Promise.resolve(this.data)).then(this.submitUsingSessionsFlow);this.handleError(new b("IMPLEMENTATION_ERROR",'It can not perform /payments call. Callback "onSubmit" is missing or Checkout session is not available'))}async submitUsingAdvancedFlow(){return new Promise((e,r)=>{let o=new me({type:fa,message:"Shopper clicked pay"});this.submitAnalytics(o),this.props.onSubmit({data:this.data,isValid:this.isValid},this.elementRef,{resolve:e,reject:r})})}async submitUsingSessionsFlow(e){let r=new me({type:fa,message:"Shopper clicked pay"});this.submitAnalytics(r);try{return await this.core.session.submitPayment(e)}catch(o){return o instanceof b?this.handleError(o):this.handleError(new b("ERROR","Error when making /payments call",{cause:o})),Promise.reject(o)}}onComplete(e){this.handleAdditionalDetails(e)}handleAdditionalDetails(e){this.makeAdditionalDetailsCall(e).then(tt).then(rt).then(this.handleResponse).catch(this.handleFailedResult)}makeAdditionalDetailsCall(e){return this.props.onAdditionalDetails?new Promise((r,o)=>{this.props.onAdditionalDetails(e,this.elementRef,{resolve:r,reject:o})}):this.core.session?this.submitAdditionalDetailsUsingSessionsFlow(e.data):void this.handleError(new b("IMPLEMENTATION_ERROR",'It can not perform /payments/details call. Callback "onAdditionalDetails" is missing or Checkout session is not available'))}async submitAdditionalDetailsUsingSessionsFlow(e){try{return await this.core.session.submitDetails(e)}catch(r){return r instanceof b?this.handleError(r):this.handleError(new b("ERROR","Error when making /details call",{cause:r})),Promise.reject(r)}}handleAction(e,r={}){if(!e||!e.type)throw S(e,"action")&&S(e,"resultCode")?new Error('handleAction::Invalid Action - the passed action object itself has an "action" property and a "resultCode": have you passed in the whole response object by mistake?'):new Error('handleAction::Invalid Action - the passed action object does not have a "type" property');let o=this.core.createFromAction(e,{...this.elementRef.props,...r});return o?(this.unmount(),o.mount(this._node)):null}onActionHandled(e){this.props?.onActionHandled?.({originalAction:this.props.originalAction,...e})}handleResponse(e){e.action?this.elementRef.handleAction(e.action):e.order?.remainingAmount?.value>0?this.handleOrder(e):this.handleSuccessResult(e)}handleKeyPress(e){e.key!=="Enter"&&e.code!=="Enter"||(e.preventDefault(),this.onEnterKeyPressed(document?.activeElement,this))}onEnterKeyPressed(e,r){this.props.onEnterKeyPressed?this.props.onEnterKeyPressed(e,r):(e.blur(),this.submit())}updateParent(e={}){return this.elementRef.core.update(e)}get isValid(){return!1}get icon(){let e=this.props.paymentMethodType||this.type;return this.props.icon??this.resources.getImage()(e)}get displayName(){let e=this.core.paymentMethodsResponse?.paymentMethods?.find(r=>r.type===this.type);return this.props.name||e?.name||this.type}get accessibleName(){return this.displayName}get additionalInfo(){return null}get type(){return this.props.type||this.constructor.type}async handleAdvanceFlowPaymentMethodsUpdate(e,r){return new Promise((o,n)=>{if(!this.props.onPaymentMethodsRequest)return o();this.props.onPaymentMethodsRequest({...e&&{order:{orderData:e.orderData,pspReference:e.pspReference}},locale:this.core.options.locale},{resolve:o,reject:n})}).catch(o=>{this.handleError(new b("IMPLEMENTATION_ERROR","Something failed during payment methods update or onPaymentMethodsRequest was not implemented",{cause:o}))}).then(o=>this.core.update({...o&&{paymentMethodsResponse:o},order:e,amount:e?e.remainingAmount:r}))}constructor(e,r){super(e,r),Oe(this,"componentRef",void 0),Oe(this,"resources",void 0),Oe(this,"elementRef",void 0),Oe(this,"handleError",o=>{if(this.setElementStatus("ready"),o.name===na&&o.options.code){let n=new ee({errorType:J.apiError,code:o.options.code});this.submitAnalytics(n)}this.props.onError&&this.props.onError(o,this.elementRef)}),Oe(this,"handleOrder",o=>{let{order:n}=o;(this.core.session?this.core.update({order:n}):this.handleAdvanceFlowPaymentMethodsUpdate(n)).then(()=>{this.props.onOrderUpdated?.({order:n})})}),Oe(this,"handleFailedResult",o=>{$o(this.elementRef)&&this.elementRef.displayFinalAnimation("error"),or(o),this.props.onPaymentFailed?.(o,this.elementRef)}),Oe(this,"handleSuccessResult",o=>{$o(this.elementRef)&&this.elementRef.displayFinalAnimation("success"),or(o),this.props.onPaymentCompleted?.(o,this.elementRef)}),Oe(this,"setComponentRef",o=>{this.componentRef=o}),Oe(this,"payButton",o=>_(id,{...o,amount:this.props.amount,secondaryAmount:this.props.secondaryAmount,onClick:this.submit})),this.core.register(this.constructor),this.submit=this.submit.bind(this),this.setState=this.setState.bind(this),this.onComplete=this.onComplete.bind(this),this.handleAction=this.handleAction.bind(this),this.handleOrder=this.handleOrder.bind(this),this.handleAdditionalDetails=this.handleAdditionalDetails.bind(this),this.handleResponse=this.handleResponse.bind(this),this.setElementStatus=this.setElementStatus.bind(this),this.submitAnalytics=this.submitAnalytics.bind(this),this.makePaymentsCall=this.makePaymentsCall.bind(this),this.makeAdditionalDetailsCall=this.makeAdditionalDetailsCall.bind(this),this.submitUsingSessionsFlow=this.submitUsingSessionsFlow.bind(this),this.elementRef=r&&r.elementRef||this,this.resources=this.props.modules?this.props.modules.resources:void 0,this.storeElementRefOnCore(this.props),this.onEnterKeyPressed=this.onEnterKeyPressed.bind(this),this.onActionHandled=this.onActionHandled.bind(this)}};Oe(fe,"type",void 0),Oe(fe,"txVariants",[]);function Ca(t){let e=lt(null),[r,o]=ge({}),[n,a]=ge({}),[s,l]=ge({}),[c,u]=ge(!1),[p,d]=ge(null),[h,m]=ge([]),[C,g]=ge(""),v=Ro(()=>Ol(t,{sfp:e},{dualBrandSelectElements:h,setDualBrandSelectElements:m,setSelectedBrandValue:g,issuingCountryCode:p,setIssuingCountryCode:d}),[h,p]);return this.processBinLookupResponse=(f,y)=>{v.processBinLookup(f,y)},this.dualBrandingChangeHandler=v.handleDualBrandSelection,Ze(()=>(this.setFocusOn=e.current.setFocusOn,this.updateStyles=e.current.updateStyles,this.showValidation=e.current.showValidation,this.handleUnsupportedCard=e.current.handleUnsupportedCard,()=>{e.current.destroy()}),[]),Ze(()=>{let f=e.current.mapErrorsToValidationRuleResult(),y={...r,...f};if(t.onChange({data:s,valid:n,errors:y,isValid:c,selectedBrandValue:C}),Object.keys(y).length){let I=Object.entries(y).map(([E,K])=>({fieldType:E,...K||{error:"",rootNode:this.props.rootNode}}));this.props.onValidationError?.(I)}},[s,n,r,C]),_(Ur,{ref:e,...Ku(t),type:t.brand,onChange:f=>{l({...s,...f.data}),o({...r,...f.errors}),a({...n,...f.valid}),u(f.isSfpValid)},render:()=>null})}Ca.defaultProps={onChange:()=>{},onError:()=>{},onValidationError:()=>{}};var Ku=t=>({autoFocus:t.autoFocus,brands:t.brands,brandsConfiguration:t.brandsConfiguration,clientKey:t.clientKey,forceCompat:t.forceCompat,i18n:t.i18n,implementationType:t.implementationType,keypadFix:t.keypadFix,legacyInputMode:t.legacyInputMode,loadingContext:t.loadingContext,minimumExpiryDate:t.minimumExpiryDate,onAdditionalSFConfig:t.onAdditionalSFConfig,onAdditionalSFRemoved:t.onAdditionalSFRemoved,onAllValid:t.onAllValid,onAutoComplete:t.onAutoComplete,onBinValue:t.onBinValue,onBrand:t.onBrand,onConfigSuccess:t.onConfigSuccess,handleKeyPress:t.handleKeyPress,onError:t.onError,onFieldValid:t.onFieldValid,onFocus:t.onFocus,onLoad:t.onLoad,rootNode:t.rootNode,showWarnings:t.showWarnings,styles:t.styles,trimTrailingSeparator:t.trimTrailingSeparator,resources:t.resources,maskSecurityCode:t.maskSecurityCode,placeholders:t.placeholders});function Ht(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var He=class extends fe{formatProps(e){return{...e,type:Q.customCard}}formatData(){let e=this.state.selectedBrandValue;return{paymentMethod:{type:"scheme",...this.state.data,...e&&{brand:e}},browserInfo:this.browserInfo,origin:!!window&&window.location.origin}}updateStyles(e){return this.componentRef?.updateStyles&&this.componentRef.updateStyles(e),this}setFocusOn(e){return this.componentRef?.setFocusOn&&this.componentRef.setFocusOn(e),this}processBinLookupResponse(e){return this.componentRef?.processBinLookupResponse&&this.componentRef.processBinLookupResponse(e),this}dualBrandingChangeHandler(e){return this.componentRef?.dualBrandingChangeHandler&&this.componentRef.dualBrandingChangeHandler(e),this}handleUnsupportedCard(e){return this.componentRef?.handleUnsupportedCard&&this.componentRef.handleUnsupportedCard(e),this}onBinLookup(e){let r={...e};r.rootNode=this._node,r.isReset||(r.supportedBrandsRaw=e.supportedBrandsRaw?.map(o=>(o.brandImageUrl=this.props.brandsConfiguration[o.brand]?.icon??Lo(o.brand,this.resources),o))),this.props.onBinLookup(r)}get isValid(){return!!this.state.isValid}get browserInfo(){return ht()}render(){return _(er,{i18n:this.props.i18n,loadingContext:this.props.loadingContext,resources:this.resources},_(Ca,{ref:e=>{this.componentRef=e},...this.props,...this.state,handleKeyPress:this.handleKeyPress,rootNode:this._node,onChange:this.setState,onBinValue:this.onBinValue,implementationType:"custom",resources:this.resources,brand:this.brand,onFocus:this.onFocus}))}constructor(...e){super(...e),Ht(this,"brand",Q.card),Ht(this,"onBinValue",od(this)),Ht(this,"onFocus",r=>{let o=new ue({type:r.focus===!0?Zl:ql,target:Pl(r.fieldType)});this.submitAnalytics(o),this.props.onFocus?.(r)}),Ht(this,"onEnterKeyPressed",(r,o)=>{this.props.onEnterKeyPressed?.(r,o)})}};Ht(He,"type",Q.customCard),Ht(He,"analyticsType","custom-scheme"),Ht(He,"defaultProps",{onBinLookup:()=>{},brandsConfiguration:{}});var nr=class extends H{componentDidMount(){this.formEl.submit(),this.props.onFormSubmit(`${this.props.inputName} sent`)}render({name:e,action:r,target:o,inputName:n,inputValue:a}){return _("form",{ref:s=>{this.formEl=s},method:"POST",className:Be(["adyen-checkout__threeds2__form",`adyen-checkout__threeds2__form--${e}`]),name:e,action:r,target:o,style:{display:"none"}},_("input",{name:n,value:a}))}constructor(...e){var r,o,n;super(...e),n=void 0,(o="formEl")in(r=this)?Object.defineProperty(r,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[o]=n}};var ar=(t,e,r,o)=>n=>{let a={};if((n.origin||n.originalEvent?.origin)!==t)return"Message was not sent from the expected domain";if(typeof n.data!="string")return"Event data was not of type string";if(!n.data.length)return"Invalid event data string";try{let s=JSON.parse(n.data);if(!S(s,"type")||s.type!==o)return"Event data was not of expected type";e(s)}catch{return a.type=`${o}-JSON-parse-error`,a.comment="failed to JSON parse event.data",a.extraInfo=`event.data = ${n.data}`,a.eventDataRaw=n.data,console.debug("get-process-message-handler::CATCH::Un-parseable JSON:: parseErrorObj=",a),!1}return!0};var Kr=t=>{let e=/^(?:([A-Za-z]+):)?(\/{0,3})([0-9.\-A-Za-z]+)(?::(\d+))?(?:\/([^?#]*))?(?:\?([^#]*))?(?:#(.*))?$/.exec(t);if(!e)return null;let[,r,o,n,a]=e;return r&&o&&n?`${r}:${o}${n}${a?`:${a}`:""}`:null};var Gu="not base64",zu="malformed URI sequence",yt={decode:t=>{if(!yt.isBase64(t))return{success:!1,error:Gu};try{return{success:!0,data:(e=t,decodeURIComponent(Array.prototype.map.call(window.atob(e),r=>`%${`00${r.charCodeAt(0).toString(16)}`.slice(-2)}`).join("")))}}catch{return{success:!1,error:zu}}var e},encode:t=>window.btoa(t),isBase64:t=>{if(!t||t.length%4)return!1;try{return window.btoa(window.atob(t))===t}catch{return!1}}};var sr=t=>"success"in t&&!t.success,cd=t=>{let e=yt.decode(t);if(e.success)try{return JSON.parse(e.data)}catch{return{success:!1,error:"Could not JSON parse token"}}return e},Wo=t=>{if(!t||!Object.keys(t).length)throw new Error("No (populated) data object to encode");return yt.encode(JSON.stringify(t))},ud=t=>{let e=t.length===1?`0${t}`:t;return Object.prototype.hasOwnProperty.call(ia,e)?e:"02"},ju=t=>ia[ud(t)],pd=({token:t,size:e})=>{let r=cd(t);if(sr(r))return r;let{acsTransID:o,acsURL:n,messageVersion:a,threeDSNotificationURL:s,threeDSServerTransID:l}=r,c=Kr(s);return{acsURL:n,cReqData:{acsTransID:o,messageVersion:a,threeDSServerTransID:l,messageType:"CReq",challengeWindowSize:ud(e)},iframeSizeArr:ju(e),postMessageDomain:c}},md=({token:t,notificationURL:e})=>{let r=cd(t);if(sr(r))return r;let{threeDSMethodNotificationURL:o,threeDSMethodUrl:n,threeDSServerTransID:a}=r,s=e||o;return{threeDSServerTransID:a,threeDSMethodURL:n,threeDSMethodNotificationURL:s,postMessageDomain:Kr(s)}},hd=(t,e,r)=>({data:{[t]:Wo({threeDSCompInd:e.threeDSCompInd}),paymentData:r}}),fd=(t,e,r)=>({data:{details:{"threeds2.fingerprint":Wo(e)},paymentData:r}}),_d=(t,e,r)=>({data:{details:{[t]:Wo({transStatus:e,authorisationToken:r})}}}),yd=(t,e,r)=>({data:{details:{"threeds2.challengeResult":Wo({transStatus:e})},paymentData:r}}),Zo=t=>{let e=window.btoa(t).split("=")[0];return e=e.replace(/\+/g,"-"),e=e.replace(/\//g,"_"),e},$u=["elementRef"],Wu=["createFromAction","onAdditionalDetails"],gd=(t,e)=>{if(t==="fingerprint"){let r=e.elementRef?$u:Wu,o=Ft(r).from(e);return o.showSpinner=!e.isDropin,o.statusType="loading",o}return{statusType:"custom",i18n:e.i18n,elementRef:e.elementRef}};var ir=(t,e,r)=>{let o;return{promise:new Promise((n,a)=>{o=setTimeout(()=>{a(r)},t),e.then(s=>{clearTimeout(o),n(s)}).catch(s=>{clearTimeout(o),a(s)})}),cancel:()=>{clearTimeout(o)}}};function ba(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Cd="threeDSIframe",qo=class extends H{get3DS2ChallengePromise(){return new Promise((e,r)=>{this.processMessageHandler=ar(this.props.postMessageDomain,e,r,"challengeResult"),window.addEventListener("message",this.processMessageHandler)})}componentDidMount(){this.challengePromise=ir(6e5,this.get3DS2ChallengePromise(),Dl),this.challengePromise.promise.then(e=>{window.removeEventListener("message",this.processMessageHandler),this.props.onCompleteChallenge(e)}).catch(e=>{window.removeEventListener("message",this.processMessageHandler),this.props.onErrorChallenge(e)})}componentWillUnmount(){this.challengePromise&&this.challengePromise.cancel(),window.removeEventListener("message",this.processMessageHandler)}render({acsURL:e,cReqData:r,iframeSizeArr:o,onFormSubmit:n},{base64URLencodedData:a,status:s}){let[l,c]=o;return _("div",{className:Be(["adyen-checkout__threeds2__challenge",`adyen-checkout__threeds2__challenge--${r.challengeWindowSize}`])},s!=="iframeLoaded"&&_(Ut,null),_(Qe,{name:Cd,width:l,height:c,callback:this.iframeCallback}),_(nr,{name:"cReqForm",action:e,target:Cd,inputName:"creq",inputValue:a,onFormSubmit:n}))}constructor(e){super(e),ba(this,"processMessageHandler",void 0),ba(this,"challengePromise",void 0),ba(this,"iframeCallback",()=>{this.setState({status:"iframeLoaded"}),this.state.status==="init"&&this.props.onActionHandled?.({componentType:"3DS2Challenge",actionDescription:`${pt} challenge iframe loaded`})});let r=JSON.stringify(this.props.cReqData),o=Zo(r);this.state={base64URLencodedData:o,status:"init"}}};function vd(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Gr=class extends H{componentDidMount(){if(sr(this.state.challengeData)){let e=this.state.challengeData.error,r=e.indexOf(Je)>-1?Y.ACTION_IS_MISSING_TOKEN:Y.TOKEN_DECODE_OR_PARSING_FAILED;this.setError({errorInfo:e.indexOf(Je)>-1?`${Y.ACTION_IS_MISSING_TOKEN}: ${this.props.i18n.get("err.gen.9102")}`:`${Y.TOKEN_DECODE_OR_PARSING_FAILED}: ${this.props.i18n.get("err.gen.9102")}`},!0);let o=new ee({code:r,errorType:J.apiError,message:`${Te}: ${e}`});this.props.onSubmitAnalytics(o),console.debug("### PrepareChallenge3DS2::exiting:: no challengeData")}else{let e=this.props.environment==="test"&&this.props._environmentUrls?.api?.includes("http://localhost:8080"),{acsURL:r}=this.state.challengeData;if(!tr(r,e)){this.setError({errorInfo:`${Y.TOKEN_IS_MISSING_ACSURL}: ${this.props.i18n.get("err.gen.9102")}`},!0);let s=new ee({code:Y.TOKEN_IS_MISSING_ACSURL,errorType:J.apiError,message:`${Te}: Decoded token is missing a valid acsURL property`});return this.props.onSubmitAnalytics(s),void console.debug("### PrepareChallenge3DS2::exiting:: no valid acsURL")}let{acsTransID:o,messageVersion:n,threeDSServerTransID:a}=this.state.challengeData.cReqData;if(!o||!n||!a){this.setError({errorInfo:`${Y.TOKEN_IS_MISSING_OTHER_PROPS}: ${this.props.i18n.get("err.gen.9102")}`},!0);let s=new ee({code:Y.TOKEN_IS_MISSING_OTHER_PROPS,errorType:J.apiError,message:`${Te}: Decoded token is missing one or more of the following properties (acsTransID | messageVersion | threeDSServerTransID)`});return this.props.onSubmitAnalytics(s),void console.debug("### PrepareChallenge3DS2::exiting:: missing one or more of the following properties (acsTransID | messageVersion | threeDSServerTransID)")}this.setState({status:"performingChallenge"})}}setStatusComplete(e,r=null){this.setState({status:"complete"},()=>{let o=(this.props.isMDFlow?yd:_d)(this.props.dataKey,e.transStatus,this.props.paymentData),n;r&&console.debug("### PrepareChallenge3DS2::errorCodeObject::",r);let a=r||e;if(a.errorCode){let l={code:a.errorCode==="timeout"?Y.THREEDS2_TIMEOUT:Y.NO_TRANSSTATUS,errorType:a.errorCode==="timeout"?J.network:J.apiError};n=new ee({message:a.message,...l}),this.props.onSubmitAnalytics(n)}let s;switch(e?.transStatus){case"Y":s="success";break;case"N":s="failed";break;case"U":s=r?"timeout":"cancelled"}e?.errorCode&&(s="noTransStatus"),n=new me({type:Ae,message:`${pt} challenge has completed`,subType:Ve.CHALLENGE_COMPLETED,result:s}),this.props.onSubmitAnalytics(n),this.props.onComplete(o)})}setError(e,r){this.setState({status:"error",errorInfo:e.errorInfo}),r&&this.props.onError(new b(Lr,e.errorInfo,{cause:e.errorObj}))}render(e,{challengeData:r}){let o=xl();return this.state.status==="performingChallenge"?_(qo,{onCompleteChallenge:n=>{let a=null;if(S(n.result,"errorCode")&&n.result.errorCode.length&&(a={errorCode:n.result.errorCode,message:`${Te}: ${n.result.errorDescription?n.result.errorDescription:"no transStatus could be retrieved"}`},this.props.isMDFlow&&this.props.onError(new b(Lr,`${Te}: ${n.result.errorDescription?n.result.errorDescription:"no transStatus could be retrieved"}`,{cause:n.result.errorCode}))),!n.result){this.setError({errorInfo:`${Te}: ${this.props.i18n.get("3ds.chal.805",{values:{result:'"result"'}})}`,errorObj:n},!0);let s=new ee({code:Y.CHALLENGE_RESOLVED_WITHOUT_RESULT_PROP,errorType:J.apiError,message:`${Te}: challenge resolved without a "result" object`});return this.props.onSubmitAnalytics(s),void console.debug('### PrepareChallenge3DS2::exiting:: challenge resolved without a "result" object')}this.setStatusComplete(n.result,a)},onErrorChallenge:n=>{if(S(n,"errorCode")){let a={errorCode:n.errorCode,message:`${Ho}: ${n.errorCode}`};return this.props.isMDFlow&&this.props.onError(new b(Lr,`${Te}: '3DS2 challenge timed out'`,{cause:n.errorCode})),void this.setStatusComplete(n.result,a)}},...r,onActionHandled:this.props.onActionHandled,onFormSubmit:this.onFormSubmit}):this.state.status==="error"?_("div",{className:"adyen-checkout__threeds2-challenge-error"},_(Bl,{className:"adyen-checkout__status__icon adyen-checkout__status__icon--error",src:o({imageFolder:"components/"})("error"),alt:""}),_("div",{className:"adyen-checkout__status__text"},this.state.errorInfo?this.state.errorInfo:this.props.i18n.get("error.message.unknown"))):null}constructor(e){if(super(e),vd(this,"onFormSubmit",r=>{let o=new me({type:Ae,message:r,subType:Ve.CHALLENGE_DATA_SENT});this.props.onSubmitAnalytics(o)}),this.props.token){let r=pd({token:this.props.token,size:this.props.challengeWindowSize||this.props.size});this.state={status:"init",challengeData:r}}else this.state={challengeData:{success:!1,error:Je}},console.debug(`${Te}: ${Je}`)}};vd(Gr,"defaultProps",{onComplete:()=>{},onError:()=>{},isMDFlow:!1});function Xo(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var lr=class extends fe{onComplete(e){this.props.onComplete?this.props.onComplete(e,this.elementRef):super.onComplete(e),this.unmount()}render(){if(!Ce(this.props.paymentData)){let e=S(this.props,"isMDFlow")?"paymentData":"authorisationToken";this.props.onError(new b(Fr,`No ${e} received. 3DS2 Challenge cannot proceed`));let r=new ee({code:Y.ACTION_IS_MISSING_PAYMENT_DATA,errorType:J.apiError,message:`${Te}: Missing 'paymentData' property from threeDS2 action`});return this.submitAnalytics(r),null}return _(er,{i18n:this.props.i18n,loadingContext:this.props.loadingContext,resources:this.resources},_(Gr,{...this.props,onComplete:this.onComplete,onSubmitAnalytics:this.submitAnalytics,isMDFlow:this.props.paymentData.length<15,onActionHandled:this.onActionHandled}))}constructor(...e){super(...e),Xo(this,"submitAnalytics",r=>{r instanceof ue&&r.type===Ue||super.submitAnalytics(r)}),Xo(this,"onActionHandled",r=>{let o=new me({type:Ae,message:r.actionDescription,subType:Ve.CHALLENGE_IFRAME_LOADED});this.submitAnalytics(o),super.onActionHandled(r)})}};Xo(lr,"type",Q.threeDS2Challenge),Xo(lr,"defaultProps",{dataKey:"threeDSResult",size:"02",type:Ho});function Ea(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var bd="threeDSMethodIframe",zr=class extends H{get3DS2MethodPromise(){return new Promise((e,r)=>{this.processMessageHandler=ar(this.props.postMessageDomain,e,r,"fingerPrintResult"),window.addEventListener("message",this.processMessageHandler)})}componentDidMount(){this.fingerPrintPromise=ir(1e4,this.get3DS2MethodPromise(),wl),this.fingerPrintPromise.promise.then(e=>{window.removeEventListener("message",this.processMessageHandler),this.props.onCompleteFingerprint(e)}).catch(e=>{window.removeEventListener("message",this.processMessageHandler),this.props.onErrorFingerprint(e)})}componentWillUnmount(){this.fingerPrintPromise&&this.fingerPrintPromise.cancel(),window.removeEventListener("message",this.processMessageHandler)}render({threeDSMethodURL:e,onActionHandled:r,onFormSubmit:o},{base64URLencodedData:n}){return _("div",{className:"adyen-checkout__3ds2-device-fingerprint"},this.props.showSpinner&&_(Ut,null),_("div",{style:{display:"none"}},_(Qe,{name:bd,callback:()=>{r?.({componentType:"3DS2Fingerprint",actionDescription:`${pt} fingerprint iframe loaded`})}}),_(nr,{name:"threeDSMethodForm",action:e,target:bd,inputName:"threeDSMethodData",inputValue:n,onFormSubmit:o})))}constructor(e){super(e),Ea(this,"processMessageHandler",void 0),Ea(this,"fingerPrintPromise",void 0);let{threeDSServerTransID:r,threeDSMethodNotificationURL:o}=this.props,n=JSON.stringify({threeDSServerTransID:r,threeDSMethodNotificationURL:o}),a=Zo(n);this.state={base64URLencodedData:a}}};Ea(zr,"defaultProps",{showSpinner:!0});function Sa(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var dr=class extends H{componentDidMount(){if(sr(this.state.fingerPrintData)){let e=this.state.fingerPrintData.error,r=e.indexOf(Je)>-1?Y.ACTION_IS_MISSING_TOKEN:Y.TOKEN_DECODE_OR_PARSING_FAILED;this.setStatusComplete({threeDSCompInd:"N"},{errorCode:r,message:`${Lt}: ${e}`}),console.debug("### PrepareFingerprint3DS2:: token does not exist or could not be base64 decoded &/or JSON.parsed")}else{let e=this.props.environment==="test"&&this.props._environmentUrls?.api?.includes("http://localhost:8080"),{threeDSMethodURL:r,threeDSMethodNotificationURL:o,postMessageDomain:n,threeDSServerTransID:a}=this.state.fingerPrintData;if(!tr(r,e))return this.setStatusComplete({threeDSCompInd:"U"},{errorCode:Y.TOKEN_IS_MISSING_THREEDSMETHODURL,message:`${Lt}: Decoded token is missing a valid threeDSMethodURL property`}),void console.debug("### PrepareFingerprint3DS2::exiting:: no valid threeDSMethodURL");let s=tr(o,e),l=tr(n,e),c=a?.length;if(!s||!l||!c)return this.setStatusComplete({threeDSCompInd:"N"},{errorCode:Y.TOKEN_IS_MISSING_OTHER_PROPS,message:`${Lt}: Decoded token is missing one or more of the following properties (threeDSMethodNotificationURL | postMessageDomain | threeDSServerTransID)`}),void console.debug("### PrepareFingerprint3DS2::exiting:: Decoded token is missing one or more of the following properties (threeDSMethodNotificationURL | postMessageDomain | threeDSServerTransID)");this.setState({status:"retrievingFingerPrint"})}}setStatusComplete(e,r=null){this.setState({status:"complete"},()=>{let o=(this.props.isMDFlow?fd:hd)(this.props.dataKey,e,this.props.paymentData),n,a=r||e;if(a.errorCode){let l={code:a.errorCode===Bt?Y.THREEDS2_TIMEOUT:a.errorCode,errorType:a.errorCode===Bt?J.network:J.apiError};n=new ee({message:a.message,...l}),this.props.onSubmitAnalytics(n)}let s;switch(e?.threeDSCompInd){case"Y":s="success";break;case"N":s=r?r.errorCode===Bt?Bt:"failedInternal":"failed";break;case"U":s="noThreeDSMethodURL"}n=new me({type:Ae,message:`${pt} fingerprinting has completed`,subType:Ve.FINGERPRINT_COMPLETED,result:s}),this.props.onSubmitAnalytics(n),this.props.onComplete(o)})}render({showSpinner:e},{status:r,fingerPrintData:o}){return r==="retrievingFingerPrint"?_(zr,{onCompleteFingerprint:n=>{this.setStatusComplete(n.result)},onErrorFingerprint:n=>{let a={errorCode:n.errorCode,message:`${Uo}: ${n.errorCode}`};this.setStatusComplete(n.result,a)},showSpinner:e,...o,onActionHandled:this.props.onActionHandled,onFormSubmit:this.onFormSubmit}):null}constructor(e){super(e),Sa(this,"onFormSubmit",n=>{let a=new me({type:Ae,message:n,subType:Ve.FINGERPRINT_DATA_SENT});this.props.onSubmitAnalytics(a)});let{token:r,notificationURL:o}=this.props;if(r){let n=md({token:r,notificationURL:o});this.state={status:"init",fingerPrintData:n}}else this.state={fingerPrintData:{success:!1,error:Je}},console.debug(`${Lt}: ${Je}`)}};Sa(dr,"type","scheme"),Sa(dr,"defaultProps",{onComplete:()=>{},onError:()=>{},paymentData:"",showSpinner:!0,isMDFlow:!1});var gt={makePayments:"620",submitPaymentDetails:"621",submitThreeDS2Fingerprint:"622",createOrder:"623"};function Ed({data:t}){X({path:`v1/submitThreeDS2Fingerprint?token=${this.props.clientKey}`,loadingContext:this.props.loadingContext,errorLevel:"fatal",errorCode:gt.submitThreeDS2Fingerprint},{...t}).then(e=>{let r;if(e.type==="completed"){let{details:n}=e;return e.details?this.onComplete({data:{details:n}}):(console.debug('Handled Error::callSubmit3DS2Fingerprint::FAILED:: no details object in a response indicating either a "frictionless" flow, or a "refused" response. resData=',e),r=new ee({code:Y.NO_DETAILS_FOR_FRICTIONLESS_OR_REFUSED,errorType:J.apiError,message:`${Vo}: no details object in a response indicating either a "frictionless" flow, or a "refused" response`}),void this.submitAnalytics(r))}if(!e.action)return console.debug('Handled Error::callSubmit3DS2Fingerprint::FAILED:: no action object in a response indicating a "challenge". resData=',e),r=new ee({code:Y.NO_ACTION_FOR_CHALLENGE,errorType:J.apiError,message:`${Vo}: no action object in a response indicating a "challenge" flow`}),void this.submitAnalytics(r);let o=this.props.elementRef??this;return o?e.action?.type==="threeDS2"?o.handleAction(e.action,Ft("challengeWindowSize").from(this.props)):e.action?.type==="redirect"?o.handleAction(e.action):void 0:(console.debug("Handled Error::callSubmit3DS2Fingerprint::FAILED:: no actionHandler"),r=new ee({code:Y.NO_COMPONENT_FOR_ACTION,errorType:J.sdkError,message:`${Vo}: no component defined to handle the action response`}),void this.submitAnalytics(r))}).catch(e=>{this.handleError(e)})}function jr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var cr=class extends fe{onComplete(e){this.props.onComplete?this.props.onComplete(e,this.elementRef):super.onComplete(e),this.unmount()}render(){if(!Ce(this.props.paymentData)){this.props.onError(new b(Fr,"No paymentData received. 3DS2 Fingerprint cannot proceed"));let e=new ee({code:Y.ACTION_IS_MISSING_PAYMENT_DATA,errorType:J.apiError,message:`${Lt}: Missing 'paymentData' property from threeDS2 action`});return this.submitAnalytics(e),null}return _(dr,{...this.props,onComplete:this.props.isMDFlow?this.onComplete:this.callSubmit3DS2Fingerprint,onSubmitAnalytics:this.submitAnalytics,isMDFlow:this.props.paymentData.length<15,onActionHandled:this.onActionHandled})}constructor(...e){super(...e),jr(this,"callSubmit3DS2Fingerprint",Ed.bind(this)),jr(this,"submitAnalytics",r=>{r instanceof ue&&r.type===Ue||super.submitAnalytics(r)}),jr(this,"onActionHandled",r=>{let o=new me({type:Ae,message:r.actionDescription,subType:Ve.FINGERPRINT_IFRAME_LOADED});this.submitAnalytics(o),super.onActionHandled(r)})}};jr(cr,"type",Q.threeDS2Fingerprint),jr(cr,"defaultProps",{dataKey:"fingerprintResult",type:Uo});function Sd({label:t=null,icon:e=null,payButton:r,onSubmit:o,amount:n=null,name:a,showPayButton:s,...l}){let{i18n:c}=ut(),[u,p]=ge("ready");if(this.setStatus=d=>{p(d)},s)return _(it,null,r({...l,status:u,icon:e,classNameModifiers:["standalone"],label:t||(n&&{}.hasOwnProperty.call(n,"value")&&n.value===0?`${c.get("preauthorizeWith")} ${a}`:`${c.get("continueTo")} ${a}`),onClick:o}))}var Pd={IDR:1,JPY:1,KRW:1,VND:1,BYR:1,CVE:1,DJF:1,GHC:1,GNF:1,KMF:1,PYG:1,RWF:1,UGX:1,VUV:1,XAF:1,XOF:1,XPF:1,MRO:10,BHD:1e3,IQD:1e3,JOD:1e3,KWD:1e3,OMR:1e3,LYD:1e3,TND:1e3};var Pa={RSD:{minimumFractionDigits:2},AFN:{minimumFractionDigits:2},ALL:{minimumFractionDigits:2},IRR:{minimumFractionDigits:2},LAK:{minimumFractionDigits:2},LBP:{minimumFractionDigits:2},MMK:{minimumFractionDigits:2},SOS:{minimumFractionDigits:2},SYP:{minimumFractionDigits:2},YER:{minimumFractionDigits:2},IQD:{minimumFractionDigits:3}};var Xu=t=>Pd[t]||100,$r=(t,e)=>{let r=Xu(e);return parseInt(String(t),10)/r},Rd=(t,e,r,o={})=>{let n=t.toString(),a=$r(n,r),s=e.replace("_","-"),l={style:"currency",currency:r,currencyDisplay:"symbol",...Pa[r]?{...o,...Pa[r]}:o};try{return a.toLocaleString(s,l)}catch{return n}};var Td=({buttonStyle:t,buttonType:e,buttonLocale:r,onClick:o})=>_("apple-pay-button",{"data-testid":"apple-pay-button",buttonstyle:t,type:e,locale:r,onclick:o});function Ad(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Jo=class{begin(){return this.session.begin()}onvalidatemerchant(e,r){return new Promise((o,n)=>r(o,n,e.validationURL)).then(o=>{this.session.completeMerchantValidation(o)}).catch(o=>{console.error(o),this.session.abort(),this.options.onError(o)})}onpaymentauthorized(e,r){return new Promise((o,n)=>r(o,n,e)).then(o=>{this.session.completePayment(o)}).catch(o=>{this.session.completePayment(o)})}onpaymentmethodselected(e,r){return new Promise((o,n)=>r(o,n,e)).then(o=>{this.session.completePaymentMethodSelection(o)}).catch(o=>{this.session.completePaymentMethodSelection(o)})}onshippingcontactselected(e,r){return new Promise((o,n)=>r(o,n,e)).then(o=>{this.session.completeShippingContactSelection(o)}).catch(o=>{this.session.completeShippingContactSelection(o)})}onshippingmethodselected(e,r){return new Promise((o,n)=>r(o,n,e)).then(o=>{this.session.completeShippingMethodSelection(o)}).catch(o=>{this.session.completeShippingMethodSelection(o)})}oncancel(e,r){r(e)}constructor(e,r){Ad(this,"session",void 0),Ad(this,"options",void 0),this.options=r,this.session=new ApplePaySession(r.version,e),this.session.onvalidatemerchant=o=>{this.onvalidatemerchant(o,r.onValidateMerchant)},this.session.onpaymentauthorized=o=>{this.onpaymentauthorized(o,r.onPaymentAuthorized)},this.session.oncancel=o=>{this.oncancel(o,r.onCancel)},typeof r.onPaymentMethodSelected=="function"&&(this.session.onpaymentmethodselected=o=>{this.onpaymentmethodselected(o,r.onPaymentMethodSelected)}),typeof r.onShippingContactSelected=="function"&&(this.session.onshippingcontactselected=o=>{this.onshippingcontactselected(o,r.onShippingContactSelected)}),typeof r.onShippingMethodSelected=="function"&&(this.session.onshippingmethodselected=o=>{this.onshippingmethodselected(o,r.onShippingMethodSelected)})}};var xd={isExpress:!1,amount:{currency:"USD",value:0},totalPriceStatus:"final",initiative:"web",merchantCapabilities:["supports3DS"],supportedNetworks:["amex","discover","masterCard","visa"],buttonType:"plain",buttonColor:"black",onClick:t=>t()};var Dd=t=>{let{countryCode:e,companyName:r,amount:o,...n}=t,a=(s=>String($r(s.value,s.currency)))(o);return e||console.warn("Apple Pay - Make sure to set the countryCode in the AdyenCheckout configuration or in the Checkout Session creation"),{countryCode:e,currencyCode:o.currency,total:{label:n.totalPriceLabel,amount:a,type:n.totalPriceStatus},lineItems:n.lineItems,shippingContactEditingMode:n.shippingContactEditingMode,shippingMethods:n.shippingMethods,shippingType:n.shippingType,recurringPaymentRequest:n.recurringPaymentRequest,merchantCapabilities:n.merchantCapabilities,supportedCountries:n.supportedCountries,supportedNetworks:n.supportedNetworks,requiredShippingContactFields:n.requiredShippingContactFields,requiredBillingContactFields:n.requiredBillingContactFields,billingContact:n.billingContact,shippingContact:n.shippingContact,applicationData:n.applicationData}};function wd(t){try{for(let e=t;e>0;e--)if(ApplePaySession?.supportsVersion(e))return e}catch(e){console.warn(e)}return null}function Ra(t,e){if(t)return{city:t.locality,country:t.countryCode,houseNumberOrName:"ZZ",postalCode:t.postalCode,street:t.addressLines?.join(" ").trim(),...t.administrativeArea&&{stateOrProvince:t.administrativeArea},...e&&{firstName:t.givenName,lastName:t.familyName}}}function Id(t){let e={mc:"masterCard",amex:"amex",visa:"visa",elodebit:"elo",elo:"elo",interac:"interac",discover:"discover",jcb:"jcb",electron:"electron",maestro:"maestro",girocard:"girocard",cartebancaire:"cartesBancaires",eftpos_australia:"eftpos"};return t.reduce((r,o)=>(e[o]&&!r.includes(e[o])&&r.push(e[o]),r),[])}function kd(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ju="https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js",Qo=class{async load(){try{let e=new ft({src:Ju,component:"applepay",attributes:{crossOrigin:"anonymous"},analytics:this.analytics});return this.sdkLoadingPromise=e.load(),await this.sdkLoadingPromise,window?.ApplePaySession}catch(e){throw new b("SCRIPT_ERROR","ApplePaySDK failed to load",{cause:e})}}isSdkLoaded(){return this.sdkLoadingPromise===void 0?Promise.reject():this.sdkLoadingPromise}constructor({analytics:e}){kd(this,"sdkLoadingPromise",void 0),kd(this,"analytics",void 0),this.analytics=e}};var Nd=()=>{if(typeof window>"u")return!1;try{return window.self!==window.top}catch{return!0}};function Wr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Yt=class t extends fe{formatProps(e){let r=e.brands?.length?Id(e.brands):e.supportedNetworks;return{...e,configuration:e.configuration,supportedNetworks:r,buttonLocale:e.buttonLocale??e.i18n?.locale,totalPriceLabel:e.totalPriceLabel||e.configuration?.merchantName,renderApplePayCodeAs:e.renderApplePayCodeAs??(Nd()?"window":"modal")}}formatData(){let{applePayToken:e,billingAddress:r,deliveryAddress:o}=this.state,{isExpress:n}=this.props;return{paymentMethod:{type:t.type,applePayToken:e,...n&&{subtype:"express"}},...r&&{billingAddress:r},...o&&{deliveryAddress:o}}}submitAnalytics(e){if(e instanceof ue&&e.type===Ue){let{isExpress:r,expressPage:o}=this.props,n=o&&zo.includes(o);typeof r=="boolean"&&(e.isExpress=r),r===!0&&n&&(e.expressPage=o)}super.submitAnalytics(e)}get isValid(){return!0}async applePayCapabilities(e){let r=e||this.props.configuration.merchantId;try{return await this.sdkLoader.isSdkLoaded(),await ApplePaySession?.applePayCapabilities(r)}catch(o){throw new b("ERROR","Apple Pay: Error when requesting applePayCapabilities()",{cause:o})}}async isAvailable(){if(window.location.protocol!=="https:")return Promise.reject(new b("IMPLEMENTATION_ERROR","Trying to start an Apple Pay session from an insecure document"));try{return await this.sdkLoader.isSdkLoaded(),ApplePaySession?.canMakePayments()?Promise.resolve():Promise.reject(new b("ERROR","Apple Pay is not available on this device"))}catch(e){return Promise.reject(new b("ERROR","Apple Pay SDK failed to load",{cause:e}))}}defineApplePayVersionNumber(){window.location.protocol==="https:"&&(this.applePayVersionNumber=this.props.version||wd(14))}configureApplePayWebOptions(){if(window.ApplePayWebOptions){let{renderApplePayCodeAs:e,onApplePayCodeClose:r}=this.props;window.ApplePayWebOptions.set({renderApplePayCodeAs:e,...r&&{onApplePayCodeClose:r}})}}startSession(){let{onValidateMerchant:e,onPaymentMethodSelected:r,onShippingMethodSelected:o,onShippingContactSelected:n}=this.props,a=Dd({companyName:this.props.configuration.merchantName,countryCode:this.core.options.countryCode,...this.props}),s=new Jo(a,{version:this.applePayVersionNumber,onError:l=>{this.handleError(new b("ERROR","ApplePay - Something went wrong on ApplePayService",{cause:l}))},onCancel:l=>{this.handleError(new b("CANCEL","ApplePay UI dismissed",{cause:l}))},onPaymentMethodSelected:r,onShippingMethodSelected:o,onShippingContactSelected:n,onValidateMerchant:e||this.validateMerchant,onPaymentAuthorized:(l,c,u)=>{let p=Ra(u.payment.billingContact),d=Ra(u.payment.shippingContact,!0);this.setState({applePayToken:btoa(JSON.stringify(u.payment.token.paymentData)),authorizedEvent:u,...p&&{billingAddress:p},...d&&{deliveryAddress:d}}),this.handleAuthorization().then(this.makePaymentsCall).then(tt).then(rt).then(this.collectOrderTrackingDetailsIfNeeded).then(({paymentResponse:h,orderDetails:m})=>(l({status:ApplePaySession.STATUS_SUCCESS,...m&&{orderDetails:m}}),h)).then(h=>{this.handleResponse(h)}).catch(h=>{let m=h?.error?.applePayError;c({status:ApplePaySession.STATUS_FAILURE,errors:m?Array.isArray(m)?m:[m]:void 0});let C={...h,error:{applePayError:m}};this.handleFailedResult(C)})}});return new Promise((l,c)=>this.props.onClick(l,c)).then(()=>{s.begin()}).catch(()=>({}))}async handleAuthorization(){return new Promise((e,r)=>{this.props.onAuthorized||e();let{authorizedEvent:o,billingAddress:n,deliveryAddress:a}=this.state;this.props.onAuthorized({authorizedEvent:o,...n&&{billingAddress:n},...a&&{deliveryAddress:a}},{resolve:e,reject:r})}).catch(e=>{let r={error:{applePayError:e}};return Promise.reject(r)})}async collectOrderTrackingDetailsIfNeeded(e){return new Promise((r,o)=>{if(!this.props.onOrderTrackingRequest)return r();this.props.onOrderTrackingRequest(r,o)}).then(r=>({paymentResponse:e,...r&&{orderDetails:r}})).catch(()=>({paymentResponse:e}))}async validateMerchant(e,r){let{hostname:o}=window.location,{clientKey:n,configuration:a,loadingContext:s,initiative:l,domainName:c}=this.props,{merchantName:u,merchantId:p}=a,d={loadingContext:s,path:`v1/applePay/sessions?clientKey=${n}`},h={displayName:u,domainName:c||o,initiative:l,merchantIdentifier:p};try{let m=await X(d,h),C=yt.decode(m.data);C.success?e(JSON.parse(C.data)):r("Could not decode Apple Pay session")}catch{r("Could not get Apple Pay session")}}render(){return this.props.showPayButton?_(Td,{buttonStyle:this.props.buttonColor,buttonType:this.props.buttonType,buttonLocale:this.props.buttonLocale,onClick:this.submit}):null}constructor(e,r){super(e,r),Wr(this,"sdkLoader",void 0),Wr(this,"applePayVersionNumber",void 0),Wr(this,"submit",()=>{if(this.props.isInstantPayment){let s=new ue({type:Ko,target:Go});this.submitAnalytics(s)}this.startSession()});let{isExpress:o,onShippingContactSelected:n,onShippingMethodSelected:a}=this.props;if(o===!1&&(n||a))throw new b("IMPLEMENTATION_ERROR",'ApplePay - You must set "isExpress" flag to "true" in order to use "onShippingContactSelected" and/or "onShippingMethodSelected" callbacks');this.startSession=this.startSession.bind(this),this.submit=this.submit.bind(this),this.validateMerchant=this.validateMerchant.bind(this),this.collectOrderTrackingDetailsIfNeeded=this.collectOrderTrackingDetailsIfNeeded.bind(this),this.handleAuthorization=this.handleAuthorization.bind(this),this.defineApplePayVersionNumber=this.defineApplePayVersionNumber.bind(this),this.configureApplePayWebOptions=this.configureApplePayWebOptions.bind(this),this.sdkLoader=new Qo({analytics:this.analytics}),this.sdkLoader.load().then(this.defineApplePayVersionNumber).then(this.configureApplePayWebOptions).catch(s=>{this.handleError(s)})}};Wr(Yt,"type",Q.applepay),Wr(Yt,"defaultProps",xd);var Ct={API_VERSION:2,API_VERSION_MINOR:0,GATEWAY:"adyen",URL:"https://pay.google.com/gp/p/js/pay.js"};function Od({allowedAuthMethods:t,allowedCardNetworks:e,existingPaymentMethodRequired:r=!1}){return{apiVersion:Ct.API_VERSION,apiVersionMinor:Ct.API_VERSION_MINOR,allowedPaymentMethods:[{type:"CARD",parameters:{allowedAuthMethods:t,allowedCardNetworks:e},tokenizationSpecification:{type:"PAYMENT_GATEWAY",parameters:{}}}],existingPaymentMethodRequired:r}}function Qu({amount:t,countryCode:e="US",totalPriceStatus:r="FINAL",...o}){let n=String($r(t.value,t.currency));return{countryCode:e,currencyCode:t.currency,totalPrice:n,totalPriceStatus:r,...o.transactionInfo}}function Ta({configuration:t,...e},r){return{apiVersion:Ct.API_VERSION,apiVersionMinor:Ct.API_VERSION_MINOR,transactionInfo:Qu({countryCode:r,...e}),merchantInfo:{merchantId:t.merchantId,merchantName:t.merchantName,...t.merchantOrigin?{merchantOrigin:t.merchantOrigin}:{},...t.authJwt?{authJwt:t.authJwt}:{}},allowedPaymentMethods:[{type:"CARD",tokenizationSpecification:{type:"PAYMENT_GATEWAY",parameters:{gateway:Ct.GATEWAY,gatewayMerchantId:t.gatewayMerchantId}},parameters:{allowedAuthMethods:e.allowedAuthMethods,allowedCardNetworks:e.allowedCardNetworks,assuranceDetailsRequired:e.assuranceDetailsRequired,allowPrepaidCards:e.allowPrepaidCards,allowCreditCards:e.allowCreditCards,billingAddressRequired:e.billingAddressRequired,billingAddressParameters:e.billingAddressParameters}}],emailRequired:e.emailRequired,shippingAddressRequired:e.shippingAddressRequired,shippingAddressParameters:e.shippingAddressParameters,shippingOptionRequired:e.shippingOptionRequired,shippingOptionParameters:e.shippingOptionParameters,callbackIntents:e.callbackIntents}}function Md(t="TEST"){switch(t.toLowerCase()){case"production":case"live":case"live-au":case"live-apse":case"live-us":case"live-in":return"PRODUCTION";default:return"TEST"}}function Aa(t,e){if(t)return{postalCode:t.postalCode,country:t.countryCode,street:[t.address1,t.address2,t.address3].join(" ").trim(),houseNumberOrName:"ZZ",city:t.locality||"",...t.administrativeArea&&{stateOrProvince:t.administrativeArea},...e&&{firstName:t.name}}}var ep=["en","ar","bg","ca","cs","da","de","el","es","et","fi","fr","hr","id","it","ja","ko","ms","nl","no","pl","pt","ru","sk","sl","sr","sv","th","tr","uk","zh"];function Fd(t=""){let e=t.toLowerCase().substring(0,2);return ep.includes(e)?e:null}function Ld(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var en=class{async getGooglePaymentsClient(e){return window.google?.payments||await new ft({src:Ct.URL,component:"googlepay",analytics:this.analytics}).load(),new google.payments.api.PaymentsClient(e)}isReadyToPay(e){return this.paymentsClient?this.paymentsClient.then(r=>r.isReadyToPay(Od(e))):Promise.reject(new Error("Google Pay is not available"))}prefetchPaymentData(e,r){if(!this.paymentsClient)throw new Error("Google Pay is not available");let o=Ta(e,r);this.paymentsClient.then(n=>n.prefetchPaymentData(o))}initiatePayment(e,r){if(!this.paymentsClient)throw new Error("Google Pay is not available");let o=Ta(e,r);return this.paymentsClient.then(n=>n.loadPaymentData(o))}constructor(e,r,o){Ld(this,"analytics",void 0),Ld(this,"paymentsClient",void 0);let n=Md(e);this.analytics=r,this.paymentsClient=this.getGooglePaymentsClient({environment:n,paymentDataCallbacks:o})}};var Bd=t=>{let e=lt(void 0);return Ze(()=>{let{onClick:r,buttonRadius:o,buttonColor:n,buttonType:a,buttonLocale:s,buttonSizeMode:l,buttonRootNode:c,paymentsClient:u}=t;u.then(p=>p.createButton({onClick:r,buttonType:a,buttonColor:n,buttonLocale:s,buttonSizeMode:l,buttonRootNode:c,...o!==void 0&&{buttonRadius:o}})).then(p=>{e.current&&e.current.appendChild(p)})},[t.buttonColor,t.buttonType,t.buttonLocale,t.buttonSizeMode,t.buttonRootNode,t.paymentsClient]),_("div",{"data-testid":"googlepay-button-container",className:"adyen-checkout__paywithgoogle",ref:e})};var Ud={isExpress:!1,existingPaymentMethodRequired:!1,buttonColor:"default",buttonType:"buy",buttonSizeMode:"fill",configuration:{gatewayMerchantId:"",merchantId:"",merchantName:""},amount:{value:0,currency:"USD"},totalPriceStatus:"FINAL",onClick:t=>t(),allowedAuthMethods:["PAN_ONLY","CRYPTOGRAM_3DS"],allowCreditCards:!0,allowPrepaidCards:!0,billingAddressRequired:!1,billingAddressParameters:void 0,assuranceDetailsRequired:!1,emailRequired:!1,shippingAddressRequired:!1,shippingAddressParameters:void 0,shippingOptionRequired:!1,shippingOptionParameters:void 0,callbackIntents:[]};var tp=Object.freeze({mc:"MASTERCARD",amex:"AMEX",visa:"VISA",elodebit:"ELO_DEBIT",elo:"ELO",interac:"INTERAC",discover:"DISCOVER",jcb:"JCB",electron:"ELECTRON",maestro:"MAESTRO"});function Vd(t){let e=t.map(r=>tp[r]).filter(r=>!!r);return[...new Set(e)]}function vt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var rp=["AMEX","DISCOVER","JCB","MASTERCARD","VISA"],bt=class extends fe{getPaymentMethodFromPaymentMethodsResponse(e){return this.core.paymentMethodsResponse.find(e||this.constructor.type)||this.core.paymentMethodsResponse.find(Q.paywithgoogle)}formatProps(e){let r=e.buttonSizeMode??(e.isDropin?"fill":"static"),o=Fd(e.buttonLocale??e.i18n?.locale),n=[...e.callbackIntents,"PAYMENT_AUTHORIZATION"],a=this.createAllowedCardNetworksValues({allowedCardNetworks:e.allowedCardNetworks,brands:e.brands});return{...e,allowedCardNetworks:a,configuration:e.configuration,buttonSizeMode:r,buttonLocale:o,callbackIntents:n}}formatData(){let{googlePayCardNetwork:e,googlePayToken:r,billingAddress:o,deliveryAddress:n}=this.state,{isExpress:a}=this.props;return{paymentMethod:{type:this.type,googlePayCardNetwork:e,googlePayToken:r,...a&&{subtype:"express"}},browserInfo:this.browserInfo,origin:!!window&&window.location.origin,...o&&{billingAddress:o},...n&&{deliveryAddress:n}}}createAllowedCardNetworksValues({allowedCardNetworks:e,brands:r}){return e?.length>0?e:r?.length>0?Vd(r):rp}submitAnalytics(e){if(e instanceof ue&&e.type===Ue){let{isExpress:r,expressPage:o}=this.props,n=o&&zo.includes(o);typeof r=="boolean"&&(e.isExpress=r),r===!0&&n&&(e.expressPage=o)}super.submitAnalytics(e)}showGooglePayPaymentSheet(){this.googlePay.initiatePayment(this.props,this.core.options.countryCode).catch(e=>{this.handleError(new b(e.statusCode==="CANCELED"?"CANCEL":"ERROR",e.toString(),{cause:e}))})}async handleAuthorization(){return new Promise((e,r)=>{this.props.onAuthorized||e();let{authorizedEvent:o,billingAddress:n,deliveryAddress:a}=this.state;this.props.onAuthorized({authorizedEvent:o,...n&&{billingAddress:n},...a&&{deliveryAddress:a}},{resolve:e,reject:r})}).catch(e=>{let r={error:{googlePayError:e}};return Promise.reject(r)})}get isValid(){return!0}async isAvailable(){return this.isReadyToPay().then(e=>{if(!e.result)throw new b("ERROR","GooglePay is not available");if(e.paymentMethodPresent===!1)throw new b("ERROR","GooglePay - No paymentMethodPresent");return Promise.resolve()}).catch(e=>Promise.reject(e))}get browserInfo(){return ht()}get icon(){return this.props.icon??this.resources.getImage()("googlepay")}render(){return this.props.showPayButton?_(Bd,{buttonColor:this.props.buttonColor,buttonType:this.props.buttonType,buttonSizeMode:this.props.buttonSizeMode,buttonLocale:this.props.buttonLocale,buttonRootNode:this.props.buttonRootNode,buttonRadius:this.props.buttonRadius,paymentsClient:this.googlePay.paymentsClient,onClick:this.submit}):null}constructor(e,r){super(e,r),vt(this,"googlePay",void 0),vt(this,"submit",()=>{if(this.props.isInstantPayment){let a=new ue({type:Ko,target:Go});this.submitAnalytics(a)}new Promise((a,s)=>this.props.onClick(a,s)).then(this.showGooglePayPaymentSheet).catch(()=>{})}),vt(this,"onPaymentAuthorized",async a=>{let s=Aa(a.paymentMethodData.info.billingAddress),l=Aa(a.shippingAddress,!0);return this.setState({authorizedEvent:a,googlePayToken:a.paymentMethodData.tokenizationData.token,googlePayCardNetwork:a.paymentMethodData.info.cardNetwork,...s&&{billingAddress:s},...l&&{deliveryAddress:l}}),new Promise(c=>{this.handleAuthorization().then(this.makePaymentsCall).then(tt).then(rt).then(u=>(c({transactionState:"SUCCESS"}),u)).then(u=>{this.handleResponse(u)}).catch(u=>{this.setElementStatus("ready");let p=u?.error?.googlePayError,d=this.props.i18n.get("error.subtitle.payment"),h=typeof p=="string"?{intent:"PAYMENT_AUTHORIZATION",reason:"OTHER_ERROR",message:p||d}:{intent:p?.intent||"PAYMENT_AUTHORIZATION",reason:p?.reason||"OTHER_ERROR",message:p?.message||d};c({transactionState:"ERROR",error:h});let m={...u,error:{googlePayError:h}};this.handleFailedResult(m)})})}),vt(this,"isReadyToPay",()=>this.googlePay.isReadyToPay(this.props)),vt(this,"prefetch",()=>this.googlePay.prefetchPaymentData(this.props,this.core.options.countryCode)),this.handleAuthorization=this.handleAuthorization.bind(this),this.showGooglePayPaymentSheet=this.showGooglePayPaymentSheet.bind(this);let{isExpress:o,paymentDataCallbacks:n}=this.props;if(o===!1&&n?.onPaymentDataChanged)throw new b("IMPLEMENTATION_ERROR",'GooglePay - You must set "isExpress" flag to "true" in order to use "onPaymentDataChanged" callback');if(!this.props.configuration.merchantId)throw new b("IMPLEMENTATION_ERROR","GooglePay - Missing merchantId. Please ensure that it is correctly configured in your customer area.");this.googlePay=new en(this.props.environment,this.analytics,{...o&&n?.onPaymentDataChanged&&{onPaymentDataChanged:n.onPaymentDataChanged},onPaymentAuthorized:this.onPaymentAuthorized})}};vt(bt,"type",Q.googlepay),vt(bt,"txVariants",[Q.googlepay,Q.paywithgoogle]),vt(bt,"defaultProps",Ud);var xa=()=>{try{if(window.parent.location.href)return window.location!==window.parent.location}catch{return!1}};function Hd(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Zr=class extends H{componentDidMount(){new Promise((e,r)=>{this.props.beforeRedirect(e,r,{url:this.props.url,method:this.props.method,...this.props.data?{data:this.props.data}:{}})}).then(()=>{this.props.onActionHandled?.({componentType:this.props.paymentMethodType,actionDescription:"performing-redirect"}),this.postForm?this.postForm.submit():this.props.redirectFromTopWhenInIframe&&xa()?window.top.location.assign?.(this.props.url):window.location.assign(this.props.url)}).catch(()=>{this.props.onRedirectError()})}render({url:e,method:r,data:o={}}){return r==="POST"?_("form",{method:"post","data-testid":"redirect-shopper-form",action:e,style:{display:"none"},ref:n=>{this.postForm=n},...this.props.redirectFromTopWhenInIframe&&xa()&&{target:"_top"}},Object.keys(o).map(n=>_("input",{type:"hidden",name:n,key:n,value:o[n]}))):null}constructor(...e){super(...e),Hd(this,"postForm",void 0)}};Hd(Zr,"defaultProps",{beforeRedirect:t=>t(),onRedirectError:()=>{},method:"GET"});function Da(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Et=class extends fe{formatData(){return{paymentMethod:{type:this.type},browserInfo:this.browserInfo}}get isValid(){return!0}get browserInfo(){return ht()}render(){return this.props.url&&this.props.method?_(Zr,{url:this.props.url,...this.props,onActionHandled:this.onActionHandled,onRedirectError:this.handleRedirectError}):this.props.showPayButton?_(er,{i18n:this.props.i18n,loadingContext:this.props.loadingContext,resources:this.resources},_(Sd,{...this.props,showPayButton:this.props.showPayButton,name:this.displayName,onSubmit:this.submit,payButton:this.payButton,ref:e=>{this.componentRef=e}})):null}constructor(...e){super(...e),Da(this,"handleRedirectError",()=>{let r=new ee({component:this.props.paymentMethodType,errorType:J.redirect,code:jl.redirect});super.submitAnalytics(r)})}};Da(Et,"type",Q.redirect),Da(Et,"defaultProps",{type:Et.type});var Yd={test:"https://checkoutshopper-test.adyen.com/checkoutshopper/",live:"https://checkoutshopper-live.adyen.com/checkoutshopper/","live-us":"https://checkoutshopper-live-us.adyen.com/checkoutshopper/","live-au":"https://checkoutshopper-live-au.adyen.com/checkoutshopper/","live-apse":"https://checkoutshopper-live-apse.adyen.com/checkoutshopper/","live-in":"https://checkoutshopper-live-in.adyen.com/checkoutshopper/",fallback:"https://checkoutshopper-live.adyen.com/checkoutshopper/"},wa={test:"https://checkoutshopper-test.cdn.adyen.com/checkoutshopper/",live:"https://checkoutshopper-live.cdn.adyen.com/checkoutshopper/","live-us":"https://checkoutshopper-live-us.cdn.adyen.com/checkoutshopper/","live-au":"https://checkoutshopper-live-au.cdn.adyen.com/checkoutshopper/","live-apse":"https://checkoutshopper-live-apse.cdn.adyen.com/checkoutshopper/","live-in":"https://checkoutshopper-live-in.cdn.adyen.com/checkoutshopper/",fallback:"https://checkoutshopper-live.cdn.adyen.com/checkoutshopper/"},Kd={test:"https://checkoutanalytics-test.adyen.com/checkoutanalytics/",live:"https://checkoutanalytics-live.adyen.com/checkoutanalytics/","live-us":"https://checkoutanalytics-live-us.adyen.com/checkoutanalytics/","live-au":"https://checkoutanalytics-live-au.adyen.com/checkoutanalytics/","live-apse":"https://checkoutanalytics-live-apse.adyen.com/checkoutanalytics/","live-in":"https://checkoutanalytics-live-in.adyen.com/checkoutanalytics/",fallback:"https://checkoutanalytics-live.adyen.com/checkoutanalytics/"};var tn=(t,e,r)=>r||e[t?.toLowerCase()]||e.fallback,Gd=(t,e)=>({apiUrl:tn(t,Yd,e?.api),analyticsUrl:tn(t,Kd,e?.analytics),cdnImagesUrl:tn(t,wa,e?.cdn?.images),cdnTranslationsUrl:tn(t,wa,e?.cdn?.translations)});function zd(t){return Object.keys(t).reduce((e,r)=>(Yl.includes(r)&&(e[r]=t[r]),e),{})}function jd(t){let e=(r=>r)(["session","environment","_environmentUrls","showPayButton","clientKey","locale","translations","paymentMethodsResponse","amount","secondaryAmount","countryCode","allowPaymentMethods","removePaymentMethods","srConfig","analytics","risk","order","exposeLibraryMetadata","beforeRedirect","beforeSubmit","onPaymentCompleted","onPaymentFailed","onSubmit","onAdditionalDetails","onActionHandled","onChange","onError","onBalanceCheck","onOrderRequest","onPaymentMethodsRequest","onOrderCancel","onOrderUpdated","loadingContext","onEnterKeyPressed","afterAdditionalDetails"]);Object.keys(t).forEach(r=>{e.includes(r)||console.warn(`AdyenCheckout - Configuration property "${r}" is not a valid AdyenCheckout property. If it is a payment method configuration, make sure to pass it directly to the Component. If you are using Drop-in, make sure to pass it to "paymentMethodsConfiguration" object`)})}var op='WARNING: Failed to retrieve "checkoutAttemptId". Consequently, analytics will not be available for this payment. The payment process, however, will not be affected.',$d=({analyticsContext:t,clientKey:e,locale:r,analyticsPath:o})=>{let n=null,a={errorLevel:"fatal",loadingContext:t,path:`${o}?clientKey=${e}`,errorMessage:op};return s=>{if(n!==null)return n;let l={version:Yo,buildType:"esm",channel:"Web",platform:"Web",locale:r,referrer:window.location.href,screenWidth:window.screen.width,...s};return n=X(a,l).then(c=>{if(c?.checkoutAttemptId)return c.checkoutAttemptId;throw new b("NETWORK_ERROR","Analytics: Attempt ID request was successfully but no ID was returned")}),n}};var Wd=({analyticsContext:t,clientKey:e,analyticsPath:r})=>{let o={channel:"Web",platform:"Web",info:[],errors:[],logs:[]};return{add:(n,a)=>{o[n].push(a)},run:n=>{let a=(s=>o.info.length||o.logs.length||o.errors.length?X({errorLevel:"silent",loadingContext:t,path:`${r}/${s}?clientKey=${e}`},o).then(()=>{}).catch(()=>{console.debug("### EventsQueue:::: send has failed")}):Promise.resolve(null))(n);return o.info=[],o.errors=[],o.logs=[],a},getQueue:()=>o}};function rn(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ka=class{get length(){return Object.keys(this.storage).length}key(e){return Object.keys(this.storage)[e]}getItem(e){return this.storage[e]||null}setItem(e,r){return this.storage[e]=r}removeItem(e){delete this.storage[e]}clear(){this.storage={}}constructor(){rn(this,"storage",void 0),this.storage={}}},ur=class{get(){try{return JSON.parse(this.storage.getItem(this.key))}catch{return null}}set(e){this.storage.setItem(this.key,JSON.stringify(e))}remove(){this.storage.removeItem(this.key)}clear(){this.storage.clear()}keyByIndex(e){return this.storage.key(e)}get length(){return this.storage.length}constructor(e,r){rn(this,"prefix","adyen-checkout__"),rn(this,"key",void 0),rn(this,"storage",void 0);try{if(this.storage=r?window[r]:window.localStorage,!this.storage)throw new Error("storage does not exist")}catch{this.storage=new ka}this.key=this.prefix+e}};var qr=null,Na=null,Zd=({locale:t,clientKey:e,analytics:r,analyticsContext:o})=>{let n={enabled:!0,...r},a=n.enabled?jo.all:jo.initial,s=$d({analyticsContext:o,clientKey:e,locale:t,analyticsPath:ha}),l=new ur("checkout-attempt-id","sessionStorage"),c=Wd({analyticsContext:o,clientKey:e,analyticsPath:ha}),u=()=>qr?c.run(qr):Promise.resolve(null);return{setUp:async p=>{try{let d={checkoutStage:"checkout",...p},h=l.get(),m=(function(y){if(!y?.timestamp)return!1;let I=Date.now()-9e5;return y.timestamp>I})(h),{payload:C}=n,g=rd(n.analyticsData),v=m?h.id:g?.checkoutAttemptId,f={...d,...C,...g,...v&&{checkoutAttemptId:v},level:a};qr=await s(f),l.set({id:qr,timestamp:m?h.timestamp:Date.now()})}catch(d){console.warn(d)}},getCheckoutAttemptId:()=>qr,getEventsQueue:()=>c,getEnabled:()=>n.enabled,flush:()=>{u()},sendAnalytics:p=>a!==jo.all?!1:(((d,h)=>{let m=d===ke.info?d:`${d}s`;c.add(`${m}`,h),d===ke.info&&(clearTimeout(Na),Na=setTimeout(()=>{u()},zl)),d!==ke.log&&d!==ke.error||(clearTimeout(Na),Gl(u)())})(p.getEventCategory(),p),!0)}};function Kt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var on=class{get(e,r){let o=Vl(this.translations,e,r);return o!==null?o:e}amount(e,r,o){return Rd(e,this.locale,r,o)}date(e,r={}){if(e===void 0)return"";let o={year:"numeric",month:"2-digit",day:"2-digit",...r};return new Date(e).toLocaleDateString(this.locale,o)}dateTime(e){return e===void 0?"":this.timeAndDateFormatter.format(new Date(e))}constructor(e){Kt(this,"locale",void 0),Kt(this,"languageCode",void 0),Kt(this,"translations",void 0),Kt(this,"customTranslations",void 0),Kt(this,"timeFormatOptions",{hour:"numeric",minute:"numeric"}),Kt(this,"timeAndDateFormatOptions",{year:"numeric",month:"2-digit",day:"2-digit",...this.timeFormatOptions}),Kt(this,"timeAndDateFormatter",void 0);let{locale:r,translations:o,customTranslations:n}=e;if(!r)throw new b("IMPLEMENTATION_ERROR",'Language: "locale" property is not defined');this.locale=r,this.languageCode=this.locale.split("-")[0],this.customTranslations=n||{},this.timeAndDateFormatter=Intl.DateTimeFormat(this.locale,this.timeAndDateFormatOptions),this.translations={...o,...!!this.customTranslations[this.locale]&&this.customTranslations[this.locale]}}};var qd="1.0.0",Xd="1.0.0",Gt="deviceFingerprint";var Jd={result:{type:Gt,value:"df-timedOut"},errorCode:"timeout"},Qd={UNKNOWN:"unknownError"},Oa={timeout:"iframe loading timed out",wrongOrigin:"Result did not come from the expected origin",wrongDataType:"Result data was not of the expected type",missingProperty:"Result data did not contain the expected properties",unknownError:"An unknown error occurred"};function Ma(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var nn=class extends H{getDfpPromise(){return new Promise((e,r)=>{this.processMessageHandler=ar(this.postMessageDomain,e,r,Gt),window.addEventListener("message",this.processMessageHandler)})}componentDidMount(){this.deviceFingerPrintPromise=ir(2e4,this.getDfpPromise(),Jd),this.deviceFingerPrintPromise.promise.then(e=>{this.props.onCompleteFingerprint(e),window.removeEventListener("message",this.processMessageHandler)}).catch(e=>{this.props.onErrorFingerprint(e),window.removeEventListener("message",this.processMessageHandler)})}render({dfpURL:e}){return _("div",{className:"adyen-checkout-risk__device-fingerprint"},_(Qe,{name:"dfIframe",src:e,allow:"geolocation; microphone; camera;",title:"devicefingerprinting iframe"}))}constructor(e){super(e),Ma(this,"postMessageDomain",void 0),Ma(this,"processMessageHandler",void 0),Ma(this,"deviceFingerPrintPromise",void 0),this.postMessageDomain=Kr(this.props.loadingContext)||this.props.loadingContext}};var ec=t=>({errorCode:t,message:Oa[t]||Oa[Qd.UNKNOWN],type:Gt});var Xr=class extends H{setStatusComplete(e){this.setState({status:"complete"},()=>{this.props.onComplete(e)})}render({loadingContext:e},{dfpURL:r}){return this.state.status==="retrievingFingerPrint"?_("div",{className:"adyen-checkout-risk__device-fingerprint--wrapper",style:{position:"absolute",width:0,height:0}},_(nn,{loadingContext:e,dfpURL:r,onCompleteFingerprint:o=>{this.setStatusComplete(o)},onErrorFingerprint:o=>{this.props.onError(ec(o.errorCode)),this.setStatusComplete(o.result)}})):null}constructor(e){super(e),e.clientKey&&(this.state={status:"retrievingFingerPrint",dfpURL:`${this.props.loadingContext}assets/html/${e.clientKey}/dfp.${Xd}.html`})}},Fa,La,Ba;Ba={onComplete:()=>{},onError:()=>{}},(La="defaultProps")in(Fa=Xr)?Object.defineProperty(Fa,La,{value:Ba,enumerable:!0,configurable:!0,writable:!0}):Fa[La]=Ba;function pr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var mr=class t extends et{formatProps(e){return{...e,risk:{...t.defaultProps.risk,...e.risk}}}get isValid(){return this.state.isValid}get data(){if(this.isValid){let e={version:qd,...this.state.data};return yt.encode(JSON.stringify(e))}return!1}get enabled(){return this.props.risk.enabled}componentWillUnmount(){this.cleanUp()}render(){return _(Xr,{...this.props,loadingContext:this.props.loadingContext,onComplete:this.onComplete,onError:this.onError})}constructor(e,r){super(e,r),pr(this,"nodeRiskContainer",null),pr(this,"onComplete",n=>{let a={...this.state.data,[n.type]:n.value,persistentCookie:n.persistentCookie,components:n.components};this.setState({data:a,isValid:!0}),this.props.risk.onComplete(this.data),this.cleanUp()}),pr(this,"onError",n=>{this.props.risk.onError(n),this.cleanUp()}),pr(this,"cleanUp",()=>{this.nodeRiskContainer&&this.nodeRiskContainer.parentNode&&this.nodeRiskContainer.parentNode.removeChild(this.nodeRiskContainer)});let o={[Gt]:null};this.setState({data:o}),this.props.risk.enabled===!0&&(document.querySelector(this.props.risk.node)?(this.nodeRiskContainer=document.createElement("div"),document.querySelector(this.props.risk.node).appendChild(this.nodeRiskContainer),this.mount(this.nodeRiskContainer)):this.onError({message:"RiskModule node was not found"}))}};pr(mr,"type","risk"),pr(mr,"defaultProps",{risk:{enabled:!0,onComplete:()=>{},onError:()=>{},node:"body"}});function Ua(t){return!this.length||this.indexOf(t.type)>-1}function Va(t){return!this.length||this.indexOf(t.type)<0}function tc(t){return!!t&&!!t.supportedShopperInteractions&&t.supportedShopperInteractions.includes("Ecommerce")}var ap=["scheme","blik","twint","ach","cashapp","paybybank_AIS_DD","payto","paybybank_pix","eft_directdebit_CA"];function rc(t){return!!t&&!!t.type&&ap.includes(t.type)}var sp=t=>({...t,storedPaymentMethodId:t.id,isStoredPaymentMethod:!0}),oc=(t,{allowPaymentMethods:e=[],removePaymentMethods:r=[]})=>t?t.filter(Ua,e).filter(Va,r):[],nc=(t,{allowPaymentMethods:e=[],removePaymentMethods:r=[]})=>t?t.filter(rc).filter(Ua,e).filter(Va,r).filter(tc).map(sp):[],ac=t=>{if(typeof t=="string")throw new Error('paymentMethodsResponse was provided but of an incorrect type (should be an object but a string was provided).Try JSON.parse("{...}") your paymentMethodsResponse.');if(t instanceof Array)throw new Error("paymentMethodsResponse was provided but of an incorrect type (should be an object but an array was provided).Please check you are passing the whole response.");!t||t?.paymentMethods?.length||t?.storedPaymentMethods?.length||console.warn("paymentMethodsResponse was provided but no payment methods were found.")};function sc(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var an=class{mapCreatedComponentType(e){return e==="card"?"scheme":e}has(e){return!!this.paymentMethods.find(r=>r.type===this.mapCreatedComponentType(e))}find(e){return this.paymentMethods.find(r=>r.type===this.mapCreatedComponentType(e))}constructor(e,r={}){sc(this,"paymentMethods",[]),sc(this,"storedPaymentMethods",[]),ac(e),this.paymentMethods=e?oc(e.paymentMethods,r):[],this.storedPaymentMethods=e?nc(e.storedPaymentMethods,r):[]}};var Ha=(t,e,r,o)=>{let n=e.getComponent(r);if(!n)throw Error(`Action Element of type ${r} not found in the registry`);return new n(t,{...o,id:`${r}-${rr()}`})},Jr=t=>(e,r,o,n)=>{let a={...n,...o,onError:n.onError,statusType:t,originalAction:o};return Ha(e,r,o.paymentMethodType,a)},ic={redirect:(t,e,r,o)=>{let n={...o,...r,statusType:"redirect",originalAction:r};return Ha(t,e,"redirect",n)},threeDS2:(t,e,r,o)=>{let n=r.subtype==="fingerprint"?"threeDS2DeviceFingerprint":"threeDS2Challenge",a=r.subtype==="fingerprint"||o.isMDFlow?r.paymentData:r.authorisationToken,s={core:t,token:r.token,paymentData:a,onActionHandled:o.onActionHandled,onComplete:o.onComplete,onError:o.onError,isDropin:!!o.isDropin,loadingContext:o.loadingContext,clientKey:o.clientKey,paymentMethodType:o.paymentMethodType,challengeWindowSize:o.challengeWindowSize,isMDFlow:o.isMDFlow,modules:{analytics:o.modules?.analytics,resources:o.modules?.resources},...gd(r.subtype,o)};return Ha(t,e,n,s)},voucher:Jr("custom"),qrCode:Jr("custom"),await:Jr("custom"),bankTransfer:Jr("custom"),sdk:Jr("custom")};function lc(t,e,r,o={}){let n=ic[r.type];if(n&&typeof n=="function")return n(t,e,r,o);throw new Error("Invalid Action")}function dc(t,e){let r=`${"v1"}/sessions/${e.id}/payments?clientKey=${e.clientKey}`,o={sessionData:e.data,...t};return X({loadingContext:e.loadingContext,path:r,errorLevel:"fatal",errorCode:gt.makePayments},o)}function cc(t,e){let r=`${"v1"}/sessions/${e.id}/paymentDetails?clientKey=${e.clientKey}`,o={...e.data&&{sessionData:e.data},...t};return X({loadingContext:e.loadingContext,path:r,errorLevel:"fatal",errorCode:gt.submitPaymentDetails},o)}function uc(t,e){let r=`${"v1"}/sessions/${t.id}/setup?clientKey=${t.clientKey}`,o={browserInfo:e.browserInfo,sessionData:t.data,...e.order?{order:{orderData:e.order.orderData,pspReference:e.order.pspReference}}:{}};return X({loadingContext:t.loadingContext,path:r,errorLevel:"fatal"},o)}function pc(t,e){let r=`${"v1"}/sessions/${e.id}/paymentMethodBalance?clientKey=${e.clientKey}`,o={sessionData:e.data,...t};return X({loadingContext:e.loadingContext,path:r,errorLevel:"fatal"},o)}function mc(t){let e=`${"v1"}/sessions/${t.id}/orders?clientKey=${t.clientKey}`,r={sessionData:t.data};return X({loadingContext:t.loadingContext,path:e,errorLevel:"fatal",errorCode:gt.createOrder},r)}function hc(t){if(!t||!t.id)throw new b("IMPLEMENTATION_ERROR","Invalid session");let{shopperLocale:e,shopperEmail:r,telephoneNumber:o,id:n}=t;return{id:n,...t.sessionData?{sessionData:t.sessionData}:{},...e&&{shopperLocale:e},...r&&{shopperEmail:r},...o&&{telephoneNumber:o}}}function fc(t,e){let r=`${"v1"}/sessions/${e.id}/orders/cancel?clientKey=${e.clientKey}`,o={sessionData:e.data,order:t};return X({loadingContext:e.loadingContext,path:r,errorLevel:"fatal"},o)}function Qr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var sn=class{get shopperLocale(){return this.session.shopperLocale}get id(){return this.session.id}get data(){return this.session.sessionData}updateSessionData(e){this.session.sessionData=e,this.storeSession()}setupSession(e){let r={...e,browserInfo:ht()};return uc(this,r).then(o=>(o.configuration&&(this.configuration={...o.configuration}),o.sessionData&&this.updateSessionData(o.sessionData),o))}submitPayment(e){return dc(e,this).then(r=>(r.sessionData&&this.updateSessionData(r.sessionData),r))}submitDetails(e){return cc(e,this).then(r=>(r.sessionData&&this.updateSessionData(r.sessionData),r))}checkBalance(e){return pc(e,this).then(r=>(r.sessionData&&this.updateSessionData(r.sessionData),r))}createOrder(){return mc(this).then(e=>(e.sessionData&&this.updateSessionData(e.sessionData),e))}cancelOrder(e){return fc(e.order,this).then(r=>(r.sessionData&&this.updateSessionData(r.sessionData),r))}getStoredSession(){let e=this.storage.get();return this.id===e?.id?e:this.session}storeSession(){this.storage.set({id:this.session.id,sessionData:this.session.sessionData})}removeStoredSession(){this.storage.remove()}constructor(e,r,o){Qr(this,"session",void 0),Qr(this,"storage",void 0),Qr(this,"clientKey",void 0),Qr(this,"loadingContext",void 0),Qr(this,"configuration",void 0);let n=hc(e);if(!r)throw new Error("No clientKey available");if(!o)throw new Error("No loadingContext available");this.storage=new ur("session","localStorage"),this.clientKey=r,this.loadingContext=o,this.session=n,this.session.sessionData?this.storeSession():this.session=this.getStoredSession()}};function Ya(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ln=class{getImage(e={}){return this.getImageUrl({...e,resourceContext:this.resourceContext})}constructor(e){if(Ya(this,"resourceContext",void 0),Ya(this,"returnImage",({name:r,resourceContext:o,imageFolder:n="",parentFolder:a="",extension:s,size:l="",subFolder:c=""})=>`${o}images/${n}${c}${a}${r}${l}.${s}`),Ya(this,"getImageUrl",({resourceContext:r,extension:o="svg",...n})=>a=>{let s={extension:o,resourceContext:r,imageFolder:"logos/",parentFolder:"",name:a,...n};return this.returnImage(s)}),!e)throw new b("IMPLEMENTATION_ERROR",'Resources module: "environmentsUrls.cdn" is not a valid URL');this.resourceContext=e}};function _c({setComponentRef:t}){let e=lt({});Object.keys(e.current).length||t?.(e.current);let[r,o]=ge(null);return e.current.setMessages=n=>{o(n)},r?_(it,null,r.map(n=>_("div",{key:n,className:"adyen-checkout-sr-panel__msg"},n))):null}function Ye(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var hr=class extends et{get enabled(){return this._enabled}get moveFocus(){return this._moveFocus}setAriaProps(e){let r=document.querySelector('[class^="adyen-checkout-sr-panel"]');for(let[o,n]of Object.entries(e))r.setAttribute(o,n);this.props={...this.props,ariaAttributes:{...this.props.ariaAttributes,...e}}}render(){return this.props.enabled?_("div",{className:this.showPanel?"adyen-checkout-sr-panel":"adyen-checkout-sr-panel--sr-only",role:"log",...this.props.ariaAttributes},_(_c,{setComponentRef:this.setComponentRef})):null}constructor(e,r){if(super(e,r),Ye(this,"srPanelContainer",null),Ye(this,"id",void 0),Ye(this,"showPanel",void 0),Ye(this,"_enabled",void 0),Ye(this,"_moveFocus",void 0),Ye(this,"componentRef",void 0),Ye(this,"setComponentRef",o=>{this.componentRef=o}),Ye(this,"setMessages",o=>{if(!this.props.enabled)return;let n=null;o&&(n=Array.isArray(o)?o:[o]),this.componentRef.setMessages(n)}),this.id=this.props.id,this.showPanel=!1,this._enabled=!1,this._moveFocus=this.props.moveFocus??!0,this.props.enabled){this._enabled=!0;let o=document.querySelector(this.props.node);if(!o)throw new Error("Component could not mount. Root node was not found.");{let n=document.getElementById(this.id);n&&o.removeChild(n),this.srPanelContainer=document.createElement("div"),this.srPanelContainer.className="sr-panel-holder",this.srPanelContainer.id=this.id,o.appendChild(this.srPanelContainer),this.mount(this.srPanelContainer)}}}};Ye(hr,"type","srPanel"),Ye(hr,"defaultProps",{enabled:!0,node:"body",showPanel:!1,id:"ariaLiveSRPanel",ariaAttributes:{"aria-relevant":"all","aria-live":"polite","aria-atomic":"true"}});function yc(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ip={[Q.redirect]:Et,[Q.threeDS2Challenge]:lr,[Q.threeDS2DeviceFingerprint]:cr},fr=new class{add(...t){this.componentsMap={...this.componentsMap,...this.createComponentsMap(t)}}getComponent(t){return this.componentsMap[t]||(this.supportedTxVariants.has(t)?void 0:Et)}createComponentsMap(t){return t.reduce((e,r)=>{var o;return typeof(o=r).type=="string"&&o.type?(r.type==="dropin"||[r.type,...r.txVariants].filter(n=>n).forEach(n=>{e={...e,[n]:r}}),e):(console.error("CoreRegistry: Attempt to register Class failed. The Class is not a valid UIElement"),e)},{})}constructor(){yc(this,"componentsMap",ip),yc(this,"supportedTxVariants",new Set(Object.values(Q)))}};var gc="en-US";async function Cc(t,e,r){try{return await pa({loadingContext:t,errorLevel:"fatal",errorMessage:`Translations: Failed to fetch translations for locale "${r}"`,path:`sdk/${e}/translations/${r}.json`})}catch{return await pa({loadingContext:t,errorLevel:"fatal",errorMessage:`Translations: Couldn't fetch translation for locale "${r}" nor the fallback translation "en-US"`,path:`sdk/${e}/translations/en-US.json`})}}var vc={exposeLibraryMetadata:!0,showPayButton:!0};function ye(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Pt=class t{static setBundleType(e){t.metadata.bundleType=e}static register(...e){fr.add(...e)}register(...e){fr.add(...e)}getComponent(e){return fr.getComponent(e)}async initialize(){return await this.initializeCore(),this.validateCoreConfiguration(),await this.createCoreModules(),this}async initializeCore(){return this.session?this.session.setupSession(this.options).then(e=>{let{amount:r,shopperLocale:o,countryCode:n,paymentMethods:a,...s}=e;return this.setOptions({...s,amount:this.options.order?this.options.order.remainingAmount:r,locale:this.options.locale||o,countryCode:this.options.countryCode||n}),this.createPaymentMethodsList(a),this}).catch(e=>(this.options.onError&&this.options.onError(e),Promise.reject(e))):(this.createPaymentMethodsList(),Promise.resolve(this))}async fetchLocaleTranslations(){try{return await Cc(this.cdnTranslationsUrl,t.metadata.version,this.options.locale)}catch(e){e instanceof b?this.options.onError?.(e):this.options.onError?.(new b("ERROR","Failed to fetch translation",{cause:e}))}}validateCoreConfiguration(){if(this.options.paymentMethodsConfiguration&&console.warn('WARNING: "paymentMethodsConfiguration" is supported only by Drop-in.'),!this.options.countryCode)throw new b(aa,"You must specify a countryCode when initializing checkout.");this.options.locale||this.setOptions({locale:gc}),this.options.locale=ca(this.options.locale),this.options.translations=Ul(this.options.translations)}submitDetails(e){let r=null;this.options.onAdditionalDetails&&(r=new Promise((o,n)=>{this.options.onAdditionalDetails({data:e},void 0,{resolve:o,reject:n})})),this.session&&(r=this.session.submitDetails(e).catch(o=>(this.options.onError?.(o),Promise.reject(o)))),r?r.then(tt).then(rt).then(this.afterAdditionalDetails).then(o=>{or(o),this.options.onPaymentCompleted?.(o)}).catch(o=>{o instanceof _t||(or(o),this.options.onPaymentFailed?.(o))}):this.options.onError?.(new b("IMPLEMENTATION_ERROR",'It can not submit the details. The callback "onAdditionalDetails" or the Session is not setup correctly.'))}createFromAction(e,r={}){if(!e||!e.type)throw S(e,"action")&&S(e,"resultCode")?new Error('createFromAction::Invalid Action - the passed action object itself has an "action" property and a "resultCode": have you passed in the whole response object by mistake?'):new Error('createFromAction::Invalid Action - the passed action object does not have a "type" property');if(e.type){let o=e.type===Ae?`${e.type}${e.subtype}`:e.paymentMethodType,n=new me({type:$l,subType:e.type,message:`${o} action was handled by the SDK`,component:o});this.modules.analytics.sendAnalytics(n);let a={...this.getCorePropsForComponent(),...r};return lc(this,fr,e,a)}return this.handleCreateError()}getCorePropsForComponent(){return{...zd(this.options),core:this,i18n:this.modules.i18n,modules:this.modules,session:this.session,loadingContext:this.loadingContext,cdnContext:this.cdnImagesUrl,createFromAction:this.createFromAction}}storeElementReference(e){e&&this.components.push(e)}handleCreateError(e){let r=e?`${e?.name??"The passed payment method"} is not a valid Checkout Component. What was passed as a txVariant was: ${JSON.stringify(e)}. Check if this payment method is configured in the Backoffice or if the txVariant is a valid one`:"No Payment Method component was passed";throw new Error(r)}createPaymentMethodsList(e){this.paymentMethodsResponse=new an(this.options.paymentMethodsResponse||e,this.options)}async createCoreModules(){if(this.modules)return;let e=await this.fetchLocaleTranslations();this.modules=Object.freeze({risk:new mr(this,{...this.options,loadingContext:this.loadingContext}),analytics:Zd({analyticsContext:this.analyticsContext,clientKey:this.options.clientKey,locale:this.options.locale,analytics:this.options.analytics}),resources:new ln(this.cdnImagesUrl),i18n:new on({locale:this.options.locale,translations:e,customTranslations:this.options.translations}),srPanel:new hr(this,{...this.options.srConfig})})}constructor(e){ye(this,"session",void 0),ye(this,"paymentMethodsResponse",void 0),ye(this,"modules",void 0),ye(this,"options",void 0),ye(this,"analyticsContext",void 0),ye(this,"loadingContext",void 0),ye(this,"cdnImagesUrl",void 0),ye(this,"cdnTranslationsUrl",void 0),ye(this,"components",[]),ye(this,"afterAdditionalDetails",l=>{if(this.options.afterAdditionalDetails&&l?.action){let c=this.createFromAction(l.action);return this.options.afterAdditionalDetails(c),Promise.reject(new _t("Handled by afterAdditionalDetails"))}return Promise.resolve(l)}),ye(this,"update",(l={})=>(this.setOptions(l),this.initialize().then(()=>(this.components.forEach(c=>{let u={...l,...this.session&&{session:this.session}};c.update(u)}),this)))),ye(this,"remove",l=>(this.components=this.components.filter(c=>c._id!==l._id),l.unmount(),this)),ye(this,"setOptions",l=>{this.options={...this.options,...l,locale:l?.locale||this.options?.locale}}),jd(e),this.createFromAction=this.createFromAction.bind(this),this.setOptions({...vc,...e});let{apiUrl:r,analyticsUrl:o,cdnImagesUrl:n,cdnTranslationsUrl:a}=Gd(this.options.environment,this.options._environmentUrls);this.loadingContext=r,this.analyticsContext=o,this.cdnImagesUrl=n,this.cdnTranslationsUrl=a,this.session=this.options.session&&new sn(this.options.session,this.options.clientKey,this.loadingContext);let s=this.options.clientKey?.substring(0,4);if((s==="test"||s==="live")&&!this.loadingContext.includes(s))throw new b("IMPLEMENTATION_ERROR",`Error: you are using a ${s} clientKey against the ${this.options._environmentUrls?.api||this.options.environment} environment`);s==="pub."&&console.debug(`The value you are passing as your "clientKey" looks like an originKey (${this.options.clientKey?.substring(0,12)}..). Although this is supported it is not the recommended way to integrate. To generate a clientKey, see the documentation (https://docs.adyen.com/development-resources/client-side-authentication/migrate-from-origin-key-to-client-key/) for more details.`),this.options.exposeLibraryMetadata&&(window.AdyenWebMetadata=t.metadata)}};ye(Pt,"metadata",{version:Yo,bundleType:"esm"}),ye(Pt,"registry",fr);async function ot(t){return await new Pt(t).initialize()}ot.register=(...t)=>{Pt.register(...t)},ot.setBundleType=t=>{Pt.setBundleType(t)};var lp=()=>i("svg",{width:"21",height:"20",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("g",{"clip-path":"url(#clip0_10626_39119)"},i("path",{d:"M10.6641 7.5C11.3543 7.5 11.9141 6.94023 11.9141 6.25C11.9141 5.55977 11.3543 5 10.6641 5C9.97383 5 9.41406 5.55859 9.41406 6.25C9.41406 6.94141 9.97266 7.5 10.6641 7.5ZM12.2266 13.125H11.6016V9.6875C11.6016 9.17188 11.1836 8.75 10.6641 8.75H9.41406C8.89844 8.75 8.47656 9.17188 8.47656 9.6875C8.47656 10.2031 8.89844 10.625 9.41406 10.625H9.72656V13.125H9.10156C8.58594 13.125 8.16406 13.5469 8.16406 14.0625C8.16406 14.5781 8.58594 15 9.10156 15H12.2266C12.7441 15 13.1641 14.5801 13.1641 14.0625C13.1641 13.5449 12.7461 13.125 12.2266 13.125Z",fill:"currentColor"}),i("path",{opacity:"0.4",d:"M10.6641 0C5.14062 0 0.664062 4.47656 0.664062 10C0.664062 15.5234 5.14062 20 10.6641 20C16.1875 20 20.6641 15.5234 20.6641 10C20.6641 4.47656 16.1875 0 10.6641 0ZM10.6641 5C11.3543 5 11.9141 5.55977 11.9141 6.25C11.9141 6.94023 11.3543 7.5 10.6641 7.5C9.97383 7.5 9.41406 6.94141 9.41406 6.25C9.41406 5.55859 9.97266 5 10.6641 5ZM12.2266 15H9.10156C8.58594 15 8.16406 14.582 8.16406 14.0625C8.16406 13.543 8.58398 13.125 9.10156 13.125H9.72656V10.625H9.41406C8.89648 10.625 8.47656 10.2051 8.47656 9.6875C8.47656 9.16992 8.89844 8.75 9.41406 8.75H10.6641C11.1816 8.75 11.6016 9.16992 11.6016 9.6875V13.125H12.2266C12.7441 13.125 13.1641 13.5449 13.1641 14.0625C13.1641 14.5801 12.7461 15 12.2266 15Z",fill:"currentColor"})),i("defs",null,i("clipPath",{id:"clip0_10626_39119"},i("rect",{width:"20",height:"20",fill:"white",transform:"translate(0.664062)"})))),dn=lp;var dp=()=>i("svg",{width:"40",height:"40",viewBox:"0 0 40 40",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor"},i("g",{fill:"none","fill-rule":"evenodd"},i("g",{transform:"translate(2 2)","stroke-width":"4"},i("circle",{"stroke-opacity":".3",cx:"18",cy:"18",r:"18"}),i("path",{d:"M36 18c0-9.94-8.06-18-18-18"},i("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"}))))),Ke=dp;var cp=({color:t="var(--straumur__color-primary)"})=>i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"13",viewBox:"0 0 16 13",fill:"none"},i("path",{d:"M2 7L6 11L14 2",stroke:t,"stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"})),cn=cp;function bc({brand:t,brandName:e,isSelected:r,onBrandClick:o}){let n=a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),a.currentTarget.click())};return i("span",{className:"straumur__card-component__dual-branding--logo"+(r?" straumur__card-component__dual-branding--logo--selected":""),title:t,"data-value":t,onClick:o,onKeyDown:n,role:"radio","aria-checked":r,"aria-label":e??t,tabIndex:0},i("div",{className:"straumur__card-component__dual-branding--logo--item"},i(_o,{brand:t,defaultToBrandName:!1}),"\xA0",e??""),r&&i(cn,{color:"var(--straumur__color-neon-green-zeta)"}))}function Ec({dualBrandConfiguration:t,selectedBrand:e,onBrandClick:r}){return i("div",{className:"straumur__card-component__dual-branding",role:"radiogroup","aria-label":"Card brand"},i(bc,{brand:t.brand1,brandName:t.brand1Name,isSelected:e===t.brand1,onBrandClick:r}),i(bc,{brand:t.brand2,brandName:t.brand2Name,isSelected:e===t.brand2,onBrandClick:r}))}var up=["AuthenticationFinished","AuthenticationNotRequired","Authorised","Cancelled","ChallengeShopper","Error","IdentifyShopper","PartiallyAuthorised","Pending","PresentToShopper","Received","RedirectShopper","Refused"];function Ka(t){return t&&up.includes(t)?t:"Error"}var be=class extends Error{messageKey;messageText;constructor(e,r){super(r??e),this.messageKey=e,this.messageText=r}};function zt(t,e){return t instanceof be?t.messageText?{text:t.messageText}:{key:t.messageKey}:{key:e}}function Sc(t,e){let r;return{async submitPayment(o){let n={...o,sessionId:e},a=await us(t,n);if(!a.ok)throw new be("error.failedToSubmitPayment");let s=await a.json();if(r=s.paymentCheckoutReference??r,!s.resultCode)throw new be("error.paymentFailed");return{resultCode:s.resultCode,action:s.action}},async submitAdditionalDetails(o){let n={...o,paymentCheckoutReference:o.paymentCheckoutReference??r,sessionId:e},a=await ps(t,n);if(!a.ok)throw new be("error.failedToSubmitPaymentDetails");let s=await a.json();if(!s.resultCode)throw new be("error.paymentDetailsFailed");return{resultCode:s.resultCode,action:s.action}},async disableToken(o){let a=await ms(t,{storedPaymentMethodId:o,sessionId:e});if(!a.ok)throw new be("error.failedToSubmitRemoveStoredPaymentCard");if(!(await a.json()).success)throw new be("error.failedToRemoveStoredPaymentCard")}}}function Pc(t){function e(a,s,l,c){let u=p=>l(p instanceof be?p:new be(c));try{Promise.resolve(a(s,l)).catch(u)}catch(p){u(p)}}let r,o={submitPayment(a){return new Promise((s,l)=>{e((c,u)=>t.onSubmit({data:a},{resolve:p=>{r=p.paymentCheckoutReference??r,c(p)},reject:p=>u(new be("error.failedToSubmitPayment",p))}),s,l,"error.failedToSubmitPayment")})},submitAdditionalDetails(a){return new Promise((s,l)=>{e((c,u)=>t.onAdditionalDetails({data:{...a,paymentCheckoutReference:a.paymentCheckoutReference??r}},{resolve:c,reject:p=>u(new be("error.failedToSubmitPaymentDetails",p))}),s,l,"error.failedToSubmitPaymentDetails")})},beforeSubmit:t.onBeforeSubmit},{onDisableToken:n}=t;return n&&(o.disableToken=a=>new Promise((s,l)=>{e((c,u)=>n({storedPaymentMethodId:a},{resolve:()=>c(),reject:()=>u(new be("error.failedToRemoveStoredPaymentCard"))}),s,l,"error.failedToSubmitRemoveStoredPaymentCard")})),o}async function eo(t){let{beforeSubmit:e}=t;return!e||await e()}async function un(t,e){e()&&await eo(t)&&e()?.submit()}function Ga(t){return(e,r)=>{let{beforeSubmit:o}=t;if(!o){e();return}let n=o();if(n instanceof Promise){n.then(a=>a?e():r()).catch(()=>r());return}if(n){e();return}r()}}var pp=["Refused","Cancelled","Error"];function _r(t,e){let{configuration:r,handleSuccess:o,handleError:n,failureMessage:a}=e;t==="Authorised"?o({key:"success.paymentAuthorized"}):n(a?{text:a}:{key:"error.paymentUnsuccessful"}),pp.includes(t)?r.onPaymentFailed?.({resultCode:t}):r.onPaymentCompleted?.({resultCode:t})}function yr(t){let{configuration:e,handleSuccess:r,handleError:o,setThreeDSecureActive:n,setPaymentInProgress:a,enrichSubmitData:s,onSubmitStart:l,dispatchResultFromAdditionalDetails:c}=t,u;function p(g){_r(g,{configuration:e,handleSuccess:r,handleError:o,failureMessage:u})}async function d(g,v,f){l?.();let{paymentFlow:y}=e;if(!await eo(y)){f.reject();return}a?.(!0);try{let I=s?s(g.data):g.data,{resultCode:E,action:K,errorMessage:F}=await y.submitPayment(I);u=F,(E==="ChallengeShopper"||E==="IdentifyShopper")&&n(!0),f.resolve({resultCode:E,action:K})}catch(I){a?.(!1),f.reject(),o(zt(I,"error.failedToSubmitPayment"))}}async function h(g,v,f){try{let{resultCode:y,action:I,errorMessage:E}=await e.paymentFlow.submitAdditionalDetails(g.data);u=E,f.resolve({resultCode:y,action:I}),c&&p(y)}catch(y){f.reject(),o(zt(y,"error.failedToSubmitPaymentDetails")),c&&e.onPaymentFailed?.({resultCode:"Error"})}}function m(g,v){p(Ka(g.resultCode))}function C(g,v){p(g?Ka(g.resultCode):"Error")}return{handleOnSubmit:d,handleOnSubmitAdditionalData:h,handlePaymentCompleted:m,handlePaymentFailed:C}}function gr(t,e,r){oe(()=>{e()&&r()},[t])}function pn(t,e){oe(()=>{e&&t.current?.focus()},[e,t])}var Rc="(prefers-color-scheme: dark)";function mp(){return typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia(Rc).matches:!1}function Ge(t){let[e,r]=R(mp);return oe(()=>{if(t!=="system"||typeof window>"u"||typeof window.matchMedia!="function")return;let o=window.matchMedia(Rc),n=a=>r(a.matches);return r(o.matches),o.addEventListener("change",n),()=>o.removeEventListener("change",n)},[t]),t==="system"?e?"dark":"light":t}function mn(t){return t==="dark"?{base:{color:"#e8edf2"},placeholder:{color:"#aab4bf"},error:{color:"#e08a8a"}}:{base:{color:"#00112c"},placeholder:{color:"#72889d"},error:{color:"#d96666"}}}function hp({configuration:t,paymentMethods:e,onBrandHidden:r}){let o=pe(null),n=pe(),a=pe(),{i18n:s}=he(),[l,c]=R(!0),[u,p]=R("required"),[d,h]=R(!1),[m,C]=R(!1),[g,v]=R(null),[f,y]=R(null),I=pe(!1),[E,K]=R({encryptedCardNumber:{visible:!1},encryptedExpiryDate:{visible:!1},encryptedSecurityCode:{visible:!1}}),{activePaymentMethod:F,isPaymentMethodInitialized:W,updatePaymentMethodInitialization:ne,handleSuccess:L,handleError:B,setThreeDSecureActive:U,threeDSecureActive:q,paymentInProgress:Me,setPaymentInProgress:nt,isObscuredByThreeDS:Se,hasCard:Tt,registerSubmitHandler:at,unregisterSubmitHandler:jt}=M(),ae=Ge(t.theme);async function je(){await un(t.paymentFlow,()=>a.current)}oe(()=>{if(!(F==="card"&&W.card&&!q)){t.onCardValidityChanged?.(!1,!1);return}return at(je),t.onCardValidityChanged?.(!1,!0),()=>{jt(je),t.onCardValidityChanged?.(!1,!1)}},[F,W.card,q,at,jt]);let $e=e.paymentMethods?.paymentMethods?.find(O=>O.type==="scheme")?.brands??[],{handleOnSubmit:Sn,handleOnSubmitAdditionalData:to,handlePaymentCompleted:Pn,handlePaymentFailed:Rn}=yr({configuration:t,handleSuccess:L,handleError:B,setThreeDSecureActive:U,setPaymentInProgress:nt,enrichSubmitData:O=>({...O,storePaymentMethod:I.current})});function Tn(O,te){B({key:"error.unknownError"})}let ro=async()=>{a.current?.remove(),n.current=await ot({clientKey:e.clientKey,environment:t.environment,locale:t.locale,countryCode:t.countryCode,paymentMethodsResponse:e.paymentMethods,amount:{value:e.minorUnitsAmount,currency:e.currency},onSubmit:Sn,onAdditionalDetails:to,onError:Tn,onPaymentCompleted:Pn,onPaymentFailed:Rn}),a.current=new He(n.current,{brands:$e,placeholders:t.placeholders,styles:mn(ae),challengeWindowSize:"05",onBinLookup:O=>{O.supportedBrandsRaw&&O.supportedBrandsRaw.length>1&&(C(!0),v({brand1:O.supportedBrandsRaw[0].brand,brand1Name:O.supportedBrandsRaw[0].localeBrand,brand1ImageUrl:O.supportedBrandsRaw[0].brandImageUrl,brand2:O.supportedBrandsRaw[1].brand,brand2Name:O.supportedBrandsRaw[1].localeBrand,brand2ImageUrl:O.supportedBrandsRaw[1].brandImageUrl}))},onBrand:O=>{if(p(O.cvcPolicy),O.brand==="card"){r([]),y(null);return}let te=$e.filter(se=>se!==O.brand).map(se=>({brand:se}));r(te),$e.filter(se=>se===O.brand).map(se=>({brand:se})).length===1&&y(O.brand)},onConfigSuccess(){ne("card",!0)},onValidationError:O=>{let te={encryptedCardNumber:{visible:!1,message:void 0},encryptedExpiryDate:{visible:!1,message:void 0},encryptedSecurityCode:{visible:!1,message:void 0}};O.filter(se=>se.error).forEach(se=>{te[se.fieldType].visible=!0,te[se.fieldType].message=se.errorI18n}),K(te)},onAllValid:O=>{c(!O.allValid),t.onCardValidityChanged?.(O.allValid,!0)}}),o.current&&a.current.mount(o.current)};oe(()=>{Tt&&F==="card"&&!W.card&&ro()},[t,F]),gr(t,()=>!!(a.current&&W.card),()=>{ro(),K({encryptedCardNumber:{visible:!1,message:void 0},encryptedExpiryDate:{visible:!1,message:void 0},encryptedSecurityCode:{visible:!1,message:void 0}})}),oe(()=>{I.current=d},[d]);function Wa(O){a.current.dualBrandingChangeHandler(O)}function An(O){h(O.currentTarget.checked)}return pn(o,q&&F==="card"),!Tt||Se("card")||e.paymentMethods?.paymentMethods?.length===0?null:i("div",{className:"straumur__card-component__expandable",ref:o,tabIndex:-1,style:{height:q?"600px":"auto",minWidth:q?"350px":"auto"}},!W.card&&i("div",{className:"straumur__card-component__loading-text"},i(Ke,null)),i("div",{className:"straumur__card-component__form",style:{opacity:W.card&&!q?1:0,position:W.card&&!q?"relative":"absolute",transition:"opacity 0.3s ease-in-out"}},i("div",{className:"straumur__card-component__form--wrapper"},i("label",{className:`straumur__card-component__form--wrapper--label ${E.encryptedCardNumber.visible?"straumur__card-component__form--wrapper--label--error":""}`},s.t("cards.cardNumber")),i("span",{className:`straumur__card-component__form--wrapper--input ${E.encryptedCardNumber.visible?"straumur__card-component__form--wrapper--input--error":""}`,"data-cse":"encryptedCardNumber",role:"group","aria-label":s.t("cards.cardNumber")}),E.encryptedCardNumber.visible&&i("span",{className:"straumur__card-component__form--wrapper--error"},E.encryptedCardNumber.message)),i("div",{className:"straumur__card-component__form--field-wrapper"},i("div",{className:"straumur__card-component__form--wrapper"},i("label",{className:`straumur__card-component__form--wrapper--label ${E.encryptedExpiryDate.visible?"straumur__card-component__form--wrapper--label--error":""}`},s.t("cards.expiryDate")),i("span",{className:`straumur__card-component__form--wrapper--input ${E.encryptedExpiryDate.visible?"straumur__card-component__form--wrapper--input--error":""}`,"data-cse":"encryptedExpiryDate",role:"group","aria-label":s.t("cards.expiryDate")}),E.encryptedExpiryDate.visible&&i("span",{className:"straumur__card-component__form--wrapper--error"},E.encryptedExpiryDate.message)),i("div",{className:"straumur__card-component__form--wrapper"},(u==="optional"||u==="required")&&i(ie,null,i("label",{className:`straumur__card-component__form--wrapper--label ${E.encryptedSecurityCode.visible?"straumur__card-component__form--wrapper--label--error":""}`},u==="optional"?s.t("cards.securityCode3DigitsOptional"):s.t("cards.securityCode3Digits")),i("span",{className:`straumur__card-component__form--wrapper--input ${E.encryptedSecurityCode.visible?"straumur__card-component__form--wrapper--input--error":""}`,"data-cse":"encryptedSecurityCode",role:"group","aria-label":s.t("cards.securityCode3Digits")}),E.encryptedSecurityCode.visible&&i("span",{className:"straumur__card-component__form--wrapper--error"},E.encryptedSecurityCode.message),i("div",{className:"straumur__card-component__form--wrapper--label--info"},i(Zt,{content:i("span",null,s.t("cards.securityCode3DigitsInfo")),placement:"top"},i(dn,null)))))),m&&g&&i(Ec,{dualBrandConfiguration:g,selectedBrand:f,onBrandClick:Wa}),e.enableStoreDetails==="AskForConsent"&&i("label",{className:"straumur__card-component__form--wrapper--label-checkbox"},i("div",{className:`straumur__card-component__form--wrapper--label-checkbox--checkmark ${d?"straumur__card-component__form--wrapper--label-checkbox--checkmark--checked":""}`},i("div",{className:`straumur__card-component__form--wrapper--label-checkbox--checkmark--icon ${d?"straumur__card-component__form--wrapper--label-checkbox--checkmark--icon--checked":""}`},i(cn,{color:"var(--straumur__color-on-primary)"}))),i("input",{type:"checkbox",className:"straumur__card-component__form--wrapper--label-checkbox--checkbox",checked:d,onChange:An}),s.t("cards.storePaymentMethod")),!t.hideSubmitButton&&i("button",{className:"straumur__card-component__submit-button",disabled:l||Me,onClick:je},e.minorUnitsAmount===0?s.t("cards.saveCardDetails"):e.formattedAmount)))}var Tc=hp;N(`.straumur__payment-method-item{position:relative;cursor:pointer;background:var(--straumur__color-white);border-radius:var(--straumur__border-radius-lg);transition:all .3s ease;padding:var(--straumur__space-xxlg) var(--straumur__space-5xlg)}.straumur__payment-method-item--sole{cursor:default}.straumur__payment-method-item:has(.straumur__payment-method-item__radio-selector:checked){cursor:default}.straumur__payment-method-item__radio-selector{position:absolute;opacity:0;cursor:pointer}.straumur__payment-method-item__content{display:flex;align-items:center;gap:var(--straumur__space-lg);transition:background-color .3s ease}.straumur__payment-method-item__radio-selector:checked+.straumur__payment-method-item__content{padding-bottom:var(--straumur__space-xxlg)}.straumur__payment-method-item__content--expanded{padding-bottom:var(--straumur__space-xxlg)}.straumur__payment-method-item--circle{width:var(--straumur__space-5xlg);height:var(--straumur__space-5xlg);border:1px solid var(--straumur__color-cosmos-blue-gamma);background:var(--straumur__color-secondary-gamma);border-radius:50%;position:relative;transition:all .3s ease;flex-shrink:0}.straumur__payment-method-item__content:hover .straumur__payment-method-item--circle{border:1px solid var(--straumur__color-cosmos-blue-delta)}.straumur__payment-method-item--circle:after{content:"";position:absolute;width:100%;height:100%;border-radius:50%;top:50%;left:50%;transform:translate(-50%,-50%) scale(0);transition:transform .2s ease}.straumur__payment-method-item__radio-selector:checked+.straumur__payment-method-item__content .straumur__payment-method-item--circle{background:var(--straumur__color-primary);border-color:var(--straumur__color-transparent)}.straumur__payment-method-item__radio-selector:checked+.straumur__payment-method-item__content .straumur__payment-method-item--circle:after{transform:translate(-50%,-50%) scale(1);background:var(--straumur__color-on-primary);height:var(--straumur__space-md);width:var(--straumur__space-md)}.straumur__payment-method-item--title{color:var(--straumur__color-text);font-size:16px;user-select:none}.straumur__payment-method-item__expandable{background:var(--straumur__color-white);max-height:0;overflow:hidden;transition:all .3s ease;opacity:0}.straumur__payment-method-item__radio-selector:checked~.straumur__payment-method-item__expandable{max-height:600px;opacity:1}.straumur__payment-method-item__expandable--visible{max-height:600px;opacity:1}
|
|
8
|
+
`);function fp({icon:t,title:e,isActive:r,isSole:o,onChange:n,children:a,headerRight:s,confirmSection:l}){let{paymentInProgress:c}=M();return i("label",{className:`straumur__payment-method-item${o?" straumur__payment-method-item--sole":""}`},!o&&i("input",{type:"radio",className:"straumur__payment-method-item__radio-selector",checked:r,onChange:n,disabled:c}),i("span",{className:`straumur__payment-method-item__content${o?" straumur__payment-method-item__content--expanded":""}`},!o&&i("span",{className:"straumur__payment-method-item--circle"}),t,i("span",{className:"straumur__payment-method-item--title"},e),s),l,i("div",{className:`straumur__payment-method-item__expandable${o?" straumur__payment-method-item__expandable--visible":""}`},a))}var ze=fp;function _p({configuration:t,paymentMethods:e}){let{i18n:r}=he(),[o,n]=R([]),a=Ge(t.theme),{activePaymentMethod:s,setActivePaymentMethod:l,isObscuredByThreeDS:c,isSolePaymentMethod:u,hasCard:p}=M();if(!p||c("card"))return null;let h=e.paymentMethods.paymentMethods.find(m=>m.type==="scheme").brands.map(m=>({brand:m,brandFullName:m}));return i(ze,{icon:i(ks,null),title:r.t("cards.title"),isActive:s==="card",isSole:u,onChange:()=>l("card"),headerRight:i("span",{className:"straumur__card-component--brands"},i(yo,{brands:h,brandHidden:o,theme:a}))},i(Tc,{configuration:t,paymentMethods:e,onBrandHidden:n}))}var Ac=_p;N(`.adyen-checkout__paywithgoogle{height:var(--straumur__space-8xlg)}
|
|
9
|
+
`);var yp=()=>i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"26",fill:"none",viewBox:"0 0 40 26"},i("path",{fill:"#fff",d:"M29.13 2.41H10.87C5.17 2.41.5 7.18.5 13.01a10.5 10.5 0 0 0 10.37 10.58h18.26c5.7 0 10.37-4.76 10.37-10.59 0-5.82-4.67-10.59-10.37-10.59Z"}),i("path",{fill:"#3C4043",d:"M29.13 3.27c1.28 0 2.52.26 3.7.77a9.6 9.6 0 0 1 5.08 5.19 9.78 9.78 0 0 1 0 7.55 9.83 9.83 0 0 1-5.08 5.18 9.26 9.26 0 0 1-3.7.77H10.87a9.24 9.24 0 0 1-3.7-.77 9.6 9.6 0 0 1-5.08-5.18 9.78 9.78 0 0 1 0-7.55 9.83 9.83 0 0 1 5.08-5.19 9.24 9.24 0 0 1 3.7-.77h18.26Zm0-.86H10.87C5.17 2.41.5 7.18.5 13.01a10.5 10.5 0 0 0 10.37 10.58h18.26c5.7 0 10.37-4.76 10.37-10.59 0-5.82-4.67-10.59-10.37-10.59Z"}),i("path",{fill:"#3C4043",d:"M19.1 13.75v3.2h-1v-7.9h2.64c.67 0 1.24.23 1.7.68.49.46.72 1.01.72 1.67a2.2 2.2 0 0 1-.71 1.68c-.46.45-1.03.67-1.7.67H19.1Zm0-3.73v2.76h1.66c.4 0 .73-.14.99-.4.26-.28.4-.6.4-.98 0-.36-.14-.68-.4-.95a1.28 1.28 0 0 0-.99-.42H19.1Zm6.67 1.35c.73 0 1.31.2 1.74.6.42.4.64.95.64 1.65v3.34h-.95v-.76h-.04a1.9 1.9 0 0 1-1.65.93 2.1 2.1 0 0 1-1.46-.53c-.4-.35-.6-.8-.6-1.32 0-.56.21-1 .63-1.34.41-.33.97-.5 1.66-.5.59 0 1.07.12 1.45.34v-.23c0-.36-.13-.65-.4-.9a1.4 1.4 0 0 0-.97-.37c-.56 0-1 .24-1.32.72l-.88-.56a2.42 2.42 0 0 1 2.15-1.07Zm-1.29 3.92c0 .27.11.5.33.67.22.17.48.26.78.26.42 0 .79-.16 1.12-.48.32-.31.49-.68.49-1.11a2.02 2.02 0 0 0-1.3-.38c-.4 0-.74.1-1.01.3a.9.9 0 0 0-.4.74Zm9.08-3.75-3.32 7.8h-1.02l1.23-2.73-2.19-5.07h1.09l1.57 3.89h.02l1.54-3.89h1.08Z"}),i("path",{fill:"#4285F4",d:"M15.14 13.1c0-.32-.03-.64-.09-.95h-4.17v1.75h2.4a2.1 2.1 0 0 1-.89 1.4v1.14h1.43a4.49 4.49 0 0 0 1.32-3.33Z"}),i("path",{fill:"#34A853",d:"M12.4 15.3a2.66 2.66 0 0 1-4-1.44H6.9v1.18a4.43 4.43 0 0 0 6.91 1.4l-1.43-1.13Z"}),i("path",{fill:"#FABB05",d:"M8.25 13c0-.3.05-.59.14-.86v-1.17H6.9a4.59 4.59 0 0 0 0 4.07l1.48-1.17a2.79 2.79 0 0 1-.14-.86Z"}),i("path",{fill:"#E94235",d:"M10.88 10.27c.66 0 1.24.23 1.7.68l1.27-1.3a4.22 4.22 0 0 0-2.97-1.18 4.44 4.44 0 0 0-3.97 2.5l1.48 1.17a2.66 2.66 0 0 1 2.5-1.87Z"})),xc=yp;N(`.straumur__google-pay-button__loading{display:flex;justify-content:center}
|
|
10
|
+
`);var Dc="CANCEL";function wc(t,e){return(e??(t==="dark"?"dark":"white"))==="dark"?"black":"white"}function Ic(t,e){return(e??(t==="dark"?"dark":"light"))==="dark"?"black":"white-outline"}var gp={applepay:{loadingClassName:"straumur__apple-pay-button__loading",createElement(t,{configuration:e,paymentMethods:r,walletConfig:o,handleOnSubmit:n,resolvedTheme:a}){let s={amount:{value:r.minorUnitsAmount,currency:r.currency},environment:e.environment,onSubmit:n,onClick:Ga(e.paymentFlow),buttonColor:Ic(a,e.applePayButtonTheme),configuration:{...o,merchantName:r.merchantName}};return new Yt(t,s)}},googlepay:{loadingClassName:"straumur__google-pay-button__loading",createElement(t,{configuration:e,paymentMethods:r,walletConfig:o,handleOnSubmit:n,resolvedTheme:a}){let s={amount:{value:r.minorUnitsAmount,currency:r.currency},challengeWindowSize:"05",countryCode:e.countryCode,environment:e.environment,onSubmit:n,onClick:Ga(e.paymentFlow),buttonColor:wc(a,e.googlePayButtonTheme),buttonType:"plain",buttonSizeMode:"fill",buttonRadius:12,configuration:{...o,merchantName:r.merchantName}};return new bt(t,s)}}};function Cp({method:t,configuration:e,paymentMethods:r,isInstantPayment:o,onUnavailable:n}){let a=gp[t],s=Ge(e.theme),l=pe(null),c=pe(),u=pe(),{isPaymentMethodInitialized:p,updatePaymentMethodInitialization:d,handleSuccess:h,handleError:m,setThreeDSecureActive:C,threeDSecureActive:g,paymentInProgress:v,setPaymentInProgress:f,isObscuredByThreeDS:y,setActivePaymentMethod:I,activePaymentMethod:E}=M(),{handleOnSubmit:K,handleOnSubmitAdditionalData:F,handlePaymentCompleted:W,handlePaymentFailed:ne}=yr({configuration:e,handleSuccess:h,handleError:m,setThreeDSecureActive:C,setPaymentInProgress:f,onSubmitStart:()=>{o&&I(t)}});function L(q,Me){q.name!==Dc&&m({key:"error.unknownError"})}function B(){d(t,!0),E===t&&I(null),n?.()}let U=async()=>{c.current=await ot({clientKey:r.clientKey,environment:e.environment,locale:e.locale,countryCode:e.countryCode,paymentMethodsResponse:r.paymentMethods,amount:{value:r.minorUnitsAmount,currency:r.currency},onError:L,onAdditionalDetails:F,onPaymentCompleted:W,onPaymentFailed:ne});let Me=r.paymentMethods.paymentMethods?.find(nt=>nt.type===t)?.configuration;if(!Me){B();return}u.current=a.createElement(c.current,{configuration:e,paymentMethods:r,walletConfig:Me,handleOnSubmit:K,resolvedTheme:s}),u.current.isAvailable().then(()=>{u.current.mount(l.current),d(t,!0)}).catch(()=>{B()})};return oe(()=>{p[t]||U()},[e]),gr(e,()=>!!(u.current&&p[t]),()=>{u.current.remove(),U()}),y(t)?null:i(ie,null,p[t]===!1&&i("div",{className:a.loadingClassName},i(Ke,null)),i("div",{ref:l,style:{height:g?void 0:"48px",width:g?"100%":void 0,position:p[t]?"static":"absolute",pointerEvents:v&&!g?"none":void 0,opacity:v&&!g?.5:void 0}}))}var hn=Cp;function vp(t){return i(hn,{method:"googlepay",...t})}var fn=vp;function bp({configuration:t,paymentMethods:e}){let{i18n:r}=he(),{activePaymentMethod:o,setActivePaymentMethod:n,isObscuredByThreeDS:a,isSolePaymentMethod:s,hasGooglePay:l}=M(),[c,u]=R(!1);return!l||c||t.instantPayments&&t.instantPayments.some(p=>p==="googlepay")||a("googlepay")?null:i(ze,{icon:i(xc,null),title:r.t("googlePay.title"),isActive:o==="googlepay",isSole:s,onChange:()=>n("googlepay")},i(fn,{configuration:t,paymentMethods:e,isInstantPayment:!1,onUnavailable:()=>u(!0)}))}var kc=bp;N("");var Ep=()=>i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"26",fill:"none",viewBox:"0 0 40 26"},i("path",{fill:"#000",d:"M36.42 0H3.58a69.25 69.25 0 0 0-.75 0c-.25.01-.5.03-.76.07a2.51 2.51 0 0 0-1.32.7A2.43 2.43 0 0 0 .07 2.1 5.14 5.14 0 0 0 0 3.22v19.91c.01.25.03.51.07.76a2.6 2.6 0 0 0 .68 1.35 2.39 2.39 0 0 0 1.32.69 4.98 4.98 0 0 0 1.1.07h34a5 5 0 0 0 .76-.07 2.5 2.5 0 0 0 1.32-.7 2.44 2.44 0 0 0 .68-1.34 5.13 5.13 0 0 0 .07-1.11V2.87a6.5 6.5 0 0 0-.07-.76 2.58 2.58 0 0 0-.68-1.35 2.4 2.4 0 0 0-1.32-.69 4.96 4.96 0 0 0-1.1-.07h-.41Z"}),i("path",{fill:"#fff",d:"M36.42.87h.73c.2 0 .42.02.62.06a1.67 1.67 0 0 1 .88.44 1.58 1.58 0 0 1 .44.89 4.38 4.38 0 0 1 .06.97v19.55a14.67 14.67 0 0 1-.06.96 1.7 1.7 0 0 1-.44.89 1.54 1.54 0 0 1-.87.44 4.27 4.27 0 0 1-.96.06H2.85a3.7 3.7 0 0 1-.63-.06 1.66 1.66 0 0 1-.87-.45 1.56 1.56 0 0 1-.44-.88 4.35 4.35 0 0 1-.06-.97V2.9c.01-.2.02-.42.06-.63.03-.18.08-.34.16-.49A1.56 1.56 0 0 1 2.22.93a4.2 4.2 0 0 1 .96-.06h33.24"}),i("path",{fill:"#000",d:"M10.92 8.61c.34-.43.57-1 .51-1.59a2.21 2.21 0 0 0-1.99 2.3c.56.04 1.12-.3 1.48-.7Zm.51.81c-.82-.05-1.52.46-1.9.46-.4 0-1-.43-1.64-.42-.84 0-1.62.48-2.05 1.24-.88 1.52-.23 3.76.62 5 .42.6.92 1.27 1.58 1.25.62-.02.86-.4 1.62-.4.75 0 .97.4 1.63.39.69-.01 1.11-.61 1.53-1.22.47-.7.67-1.37.68-1.4-.01-.02-1.32-.52-1.33-2.02-.01-1.26 1.03-1.85 1.07-1.9a2.34 2.34 0 0 0-1.81-.98Zm7.11-1.7a2.87 2.87 0 0 1 3.02 3c0 1.8-1.27 3.03-3.06 3.03h-1.97v3.12h-1.42V7.72h3.43Zm-2 4.83h1.62c1.24 0 1.94-.66 1.94-1.82 0-1.15-.7-1.81-1.93-1.81h-1.64v3.63Zm5.39 2.43c0-1.17.9-1.89 2.48-1.98l1.83-.1v-.52c0-.74-.5-1.18-1.34-1.18-.8 0-1.3.38-1.41.97h-1.3c.08-1.2 1.1-2.09 2.76-2.09 1.62 0 2.65.86 2.65 2.2v4.6h-1.31v-1.1h-.04a2.38 2.38 0 0 1-2.1 1.2c-1.3 0-2.22-.8-2.22-2Zm4.3-.6v-.53l-1.64.1c-.82.06-1.28.42-1.28.99 0 .58.48.96 1.22.96.96 0 1.7-.66 1.7-1.52Zm2.61 4.95v-1.11c.1.03.33.03.44.03.64 0 .98-.27 1.19-.96l.12-.4-2.41-6.69h1.48l1.7 5.43h.02l1.69-5.43h1.44l-2.5 7.02c-.57 1.62-1.23 2.14-2.61 2.14a5.3 5.3 0 0 1-.56-.03Z"})),Nc=Ep;N(`.straumur__apple-pay-button__loading{display:flex;justify-content:center}
|
|
11
|
+
`);function Sp(t){return i(hn,{method:"applepay",...t})}var _n=Sp;function Pp({configuration:t,paymentMethods:e}){let{i18n:r}=he(),{activePaymentMethod:o,setActivePaymentMethod:n,isObscuredByThreeDS:a,isSolePaymentMethod:s,hasApplePay:l}=M(),[c,u]=R(!1);return!l||c||t.instantPayments&&t.instantPayments.some(p=>p==="applepay")||a("applepay")?null:i(ze,{icon:i(Nc,null),title:r.t("applePay.title"),isActive:o==="applepay",isSole:s,onChange:()=>n("applepay")},i(_n,{configuration:t,paymentMethods:e,isInstantPayment:!1,onUnavailable:()=>u(!0)}))}var Oc=Pp;N(`.straumur__kortalan-component__submit-button{background:var(--straumur__color-primary);border:none;border-radius:var(--straumur__border-radius-s);color:var(--straumur__color-on-primary);cursor:pointer;font-size:16px;height:40px;outline:none;padding:0 var(--straumur__space-xxlg);transition:background .2s ease-out;width:100%}.straumur__kortalan-component__submit-button:hover{background:var(--straumur__color-primary);border:1px solid var(--straumur__color-border)}.straumur__kortalan-component__submit-button:disabled{background:var(--straumur__color-gray-epsilon);color:var(--straumur__color-secondary);border:1px solid var(--straumur__color-border);cursor:not-allowed}
|
|
12
|
+
`);var Rp=()=>i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"26",fill:"none",viewBox:"0 0 40 26"},i("rect",{x:"0.5",y:"0.5",width:"39",height:"25",rx:"6",fill:"none",stroke:"currentColor",opacity:"0.35"}),i("path",{fill:"currentColor",d:"M11 7h2.2v5.1L18 7h2.7l-4.7 5.1L21 19h-2.8l-3.7-5.2-1.3 1.4V19H11V7Z"}),i("path",{fill:"currentColor",d:"M23 7h2.2v10h4.6v2H23V7Z"})),yn=Rp;var Rt="kortalan";function Tp(t){if(t&&typeof t=="object"&&"type"in t&&"url"in t){let e=t;if(e.type==="redirect"&&typeof e.url=="string")return e.url}return null}function gn(t){let{handleSuccess:e,handleError:r,setPaymentInProgress:o}=M(),[n,a]=R(!1);return{pay:async()=>{if(!n){a(!0);try{if(!await eo(t.paymentFlow)){a(!1);return}o(!0);let{resultCode:l,action:c,errorMessage:u}=await t.paymentFlow.submitPayment({clientStateDataIndicator:!1,paymentMethod:{type:Rt}}),p=Tp(c);if(p){window.location.assign(p);return}_r(l,{configuration:t,handleSuccess:e,handleError:r,failureMessage:u}),o(!1),a(!1)}catch(l){r(zt(l,"error.failedToSubmitPayment")),o(!1),a(!1)}}},isSubmitting:n}}function Ap({configuration:t}){let{i18n:e}=he(),{activePaymentMethod:r,setActivePaymentMethod:o,isObscuredByThreeDS:n,isSolePaymentMethod:a,hasKortalan:s,paymentInProgress:l}=M(),{pay:c,isSubmitting:u}=gn(t);return!s||t.instantPayments?.some(p=>p===Rt)||n(Rt)?null:i(ze,{icon:i(yn,null),title:e.t("kortalan.title"),isActive:r===Rt,isSole:a,onChange:()=>o(Rt)},i("button",{className:"straumur__kortalan-component__submit-button",disabled:u||l,onClick:()=>{c()}},e.t("kortalan.payButton")))}var Mc=Ap;N(`.straumur__stored-card-component__remove-stored-card-button{margin-left:auto}.straumur__stored-card-component__remove-stored-card-button--text{color:var(--straumur__color-danger-text);text-decoration:none;background:none;border:none;cursor:pointer;transition:all .2s ease}.straumur__stored-card-component__remove-stored-card-button--text:disabled{cursor:not-allowed;color:var(--straumur__color-secondary)}.straumur__stored-card-component__confirm-remove-stored-card{background-color:var(--straumur__color-warning-bg);border-radius:var(--straumur__border-radius-s);max-height:0;overflow:hidden;transition:all .3s ease;opacity:0}.straumur__stored-card-component__confirm-remove-stored-card--expanded{padding:var(--straumur__space-xxlg);max-height:600px;opacity:1}.straumur__stored-card-component__confirm-remove-stored-card--header{display:flex;align-items:center;gap:var(--straumur__space-lg);color:var(--straumur__color-text);padding-bottom:var(--straumur__space-xxlg)}.straumur__stored-card-component__confirm-remove-stored-card--actions{display:flex;gap:var(--straumur__space-lg);justify-content:end}.straumur__stored-card-component__confirm-remove-stored-card--actions--button{color:var(--straumur__color-warning-text);background:none;border:none;cursor:pointer;text-decoration:none;font-weight:700}.straumur__stored-card-component__loading-text{display:flex;justify-content:center}.straumur__stored-card-component__form{display:flex;padding-top:var(--straumur__space-xxlg);flex-direction:column;gap:var(--straumur__space-5xlg)}.straumur__stored-card-component__form--wrapper{display:flex;flex-direction:column;justify-items:start;position:relative;width:100%}.straumur__stored-card-component__form--wrapper--error{color:var(--straumur__color-red-beta);font-size:12px}.straumur__stored-card-component__form--wrapper--label{transform:translate(10px) translateY(-50%);z-index:1;background:linear-gradient(to top,var(--straumur__color-secondary-gamma) 53%,var(--straumur__color-transparent) 50%);position:absolute;font-weight:500;font-size:14px;padding:0 var(--straumur__space-xxs)}.straumur__stored-card-component__form--wrapper--label--readonly{background:linear-gradient(to top,var(--straumur__color-gray-epsilon) 53%,var(--straumur__color-transparent) 50%)}.straumur__stored-card-component__form--wrapper--label--error{color:var(--straumur__color-red-beta);background:linear-gradient(to top,var(--straumur__color-red-gamma) 53%,var(--straumur__color-transparent) 50%);font-size:13px;font-weight:500}.straumur__stored-card-component__form--wrapper--label--info{position:absolute;top:33%;right:var(--straumur__space-md)}.straumur__stored-card-component__form--wrapper--input{background:var(--straumur__color-secondary-gamma);color:var(--straumur__color-text);display:flex;align-items:center;border:1px solid var(--straumur__color-transparent);border-radius:var(--straumur__border-radius-s);font-size:16px;height:48px;outline:none;padding-left:var(--straumur__space-lg);transition:border .2s ease-out,box-shadow .2s ease-out;position:relative}.straumur__stored-card-component__form--wrapper--input--readonly{background-color:var(--straumur__color-gray-epsilon)}.straumur__stored-card-component__form--wrapper--input:hover{border:1px solid var(--straumur__color-cosmos-blue-delta)}.straumur__stored-card-component__form--wrapper--input--readonly:hover{border:1px solid var(--straumur__color-transparent)}.straumur__stored-card-component__form--wrapper--input--error{background:var(--straumur__color-red-gamma);border:1px solid var(--straumur__color-red-beta)}.straumur__stored-card-component__form--wrapper--input--error:hover{border:1px solid var(--straumur__color-red-beta)}.straumur__stored-card-component__form--field-wrapper{display:flex;width:100%;gap:var(--straumur__space-lg)}.straumur__stored-card-component__submit-button{background:var(--straumur__color-primary);border:none;border-radius:var(--straumur__border-radius-s);color:var(--straumur__color-on-primary);cursor:pointer;font-size:16px;height:40px;outline:none;padding:0 var(--straumur__space-xxlg);transition:background .2s ease-out;width:100%}.straumur__stored-card-component__submit-button:hover{background:var(--straumur__color-primary);border:1px solid var(--straumur__color-border)}.straumur__stored-card-component__submit-button:disabled{background:var(--straumur__color-gray-epsilon);color:var(--straumur__color-secondary);border:1px solid var(--straumur__color-border);cursor:not-allowed}
|
|
13
|
+
`);var xp=()=>i("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("g",{"clip-path":"url(#clip0_10650_34968)"},i("path",{d:"M12.0011 15C12.6245 15 13.1261 14.4984 13.1261 13.875V7.875C13.1261 7.25391 12.6222 6.75 12.0433 6.75C11.4644 6.75 10.8761 7.25625 10.8761 7.875V13.875C10.8761 14.4984 11.3823 15 12.0011 15ZM12.0011 16.5516C11.1873 16.5516 10.5273 17.2116 10.5273 18.0253C10.5292 18.8391 11.1855 19.5 12.0011 19.5C12.8167 19.5 13.4748 18.84 13.4748 18.0262C13.473 17.2125 12.8167 16.5516 12.0011 16.5516Z",fill:"#DFAE00"}),i("path",{opacity:"0.4",d:"M23.7312 19.5469L13.7328 2.48438C12.9673 1.17188 11.0356 1.17188 10.2649 2.48438L0.271188 19.5469C-0.49803 20.8547 0.460048 22.5 2.00181 22.5H21.9987C23.5343 22.5 24.4953 20.8594 23.7312 19.5469ZM10.8734 7.875C10.8734 7.25391 11.3773 6.75 11.9984 6.75C12.6195 6.75 13.1234 7.25625 13.1234 7.875V13.875C13.1234 14.4961 12.6195 15 12.0406 15C11.4617 15 10.8734 14.4984 10.8734 13.875V7.875ZM11.9984 19.5C11.1846 19.5 10.5246 18.84 10.5246 18.0262C10.5246 17.2125 11.1842 16.5525 11.9984 16.5525C12.8126 16.5525 13.4721 17.2125 13.4721 18.0262C13.4703 18.8391 12.814 19.5 11.9984 19.5Z",fill:"#DFAE00"})),i("defs",null,i("clipPath",{id:"clip0_10650_34968"},i("rect",{width:"24",height:"24",fill:"white"})))),Fc=xp;function Dp({configuration:t,paymentMethods:e,storedPaymentMethod:r,onStoredCardRemoved:o}){let n=pe(null),a=pe(),s=pe(),{i18n:l}=he(),[c,u]=R(!0),[p,d]=R("required"),[h,m]=R(!1),[C,g]=R({encryptedSecurityCode:{visible:!1}}),{activePaymentMethod:v,setActivePaymentMethod:f,activeStoredPaymentMethodId:y,setActiveStoredPaymentMethodId:I,isStoredCardInitialized:E,updateStoredCardInitialization:K,handleSuccess:F,handleError:W,setThreeDSecureActive:ne,threeDSecureActive:L,paymentInProgress:B,setPaymentInProgress:U,isSolePaymentMethod:q,registerSubmitHandler:Me,unregisterSubmitHandler:nt}=M(),Se=q?v==="storedcard":v==="storedcard"&&y===r.id,Tt=Ge(t.theme);async function at(){await un(t.paymentFlow,()=>s.current)}oe(()=>{if(!(Se&&E[r.id]&&!L)){t.onCardValidityChanged?.(!1,!1);return}return Me(at),t.onCardValidityChanged?.(!1,!0),()=>{nt(at),t.onCardValidityChanged?.(!1,!1)}},[Se,E[r.id],L,Me,nt]);let{handleOnSubmit:jt,handleOnSubmitAdditionalData:ae,handlePaymentCompleted:je,handlePaymentFailed:$e}=yr({configuration:t,handleSuccess:F,handleError:W,setThreeDSecureActive:ne,setPaymentInProgress:U,enrichSubmitData:te=>({...te,paymentMethod:{...te.paymentMethod,storedPaymentMethodId:r.id}})});function Sn(te,se){W({key:"error.unknownError"})}let to=async()=>{a.current=await ot({clientKey:e.clientKey,environment:t.environment,locale:t.locale,countryCode:t.countryCode,amount:{value:e.minorUnitsAmount,currency:e.currency},paymentMethodsResponse:e.paymentMethods,onError:Sn,onAdditionalDetails:ae,onPaymentCompleted:je,onPaymentFailed:$e}),s.current=new He(a.current,{brands:[r.brand],styles:mn(Tt),onSubmit:jt,onConfigSuccess(){K(r.id,!0)},onBrand:te=>{d(te.cvcPolicy)},onValidationError:te=>{let se={encryptedSecurityCode:{visible:!1,message:void 0}};te.filter(Cr=>Cr.error).forEach(Cr=>{se[Cr.fieldType].visible=!0,se[Cr.fieldType].message=Cr.errorI18n}),g(se)},onAllValid:te=>{u(!te.allValid),t.onCardValidityChanged?.(te.allValid,!0)},placeholders:t.placeholders,challengeWindowSize:"05"}),n.current&&s.current.mount(n.current)};if(oe(()=>{Se&&!E[r.id]&&to()},[t,Se]),gr(t,()=>!!(s.current&&E[y]),()=>{to(),g({encryptedSecurityCode:{visible:!1,message:void 0}})}),oe(()=>{m(!1)},[v,y]),pn(n,L&&Se),L&&!Se)return null;function Pn(){f("storedcard"),I(r.id)}function Rn(){m(!0)}function Tn(){m(!1)}async function ro(){let{disableToken:te}=t.paymentFlow;if(te)try{await te(r.id),o(r.id)}catch(se){W(zt(se,"error.failedToSubmitRemoveStoredPaymentCard"))}}let An=t.paymentFlow.disableToken!==void 0&&Se&&E[r.id]?i("div",{className:"straumur__stored-card-component__remove-stored-card-button"},i("button",{onClick:Rn,className:"straumur__stored-card-component__remove-stored-card-button--text",disabled:h},l.t("stored-cards.removeStoredCard"))):null,O=i("div",{className:`straumur__stored-card-component__confirm-remove-stored-card ${h?"straumur__stored-card-component__confirm-remove-stored-card--expanded":""}`},i("div",{className:"straumur__stored-card-component__confirm-remove-stored-card--header"},i(Fc,null),i("span",{className:"straumur__stored-card-component__confirm-remove-stored-card--header--title"},l.t("stored-cards.removeStoredCardQuestion"))),i("div",{className:"straumur__stored-card-component__confirm-remove-stored-card--actions"},i("button",{className:"straumur__stored-card-component__confirm-remove-stored-card--actions--button",onClick:ro},l.t("stored-cards.removeStoredCardQuestionYesRemove")),i("button",{className:"straumur__stored-card-component__confirm-remove-stored-card--actions--button",onClick:Tn},l.t("stored-cards.removeStoredCardQuestionCancel"))));return i(ze,{icon:i(yo,{brands:[{brand:r.brand,brandFullName:r.name}],theme:Tt}),title:`\u2022\u2022\u2022\u2022 ${r.lastFour}`,isActive:Se,isSole:q,onChange:Pn,headerRight:An,confirmSection:O},i("div",{ref:n,tabIndex:-1,style:{height:L?"600px":"auto",minWidth:L?"350px":"auto"}},!E[r.id]&&i("div",{className:"straumur__stored-card-component__loading-text"},i(Ke,null)),i("div",{className:"straumur__stored-card-component__form",style:{opacity:E[r.id]&&!L?1:0,position:E[r.id]&&!L?"relative":"absolute",transition:"opacity 0.3s ease-in-out"}},i("div",{className:"straumur__stored-card-component__form--field-wrapper"},i("div",{className:"straumur__stored-card-component__form--wrapper"},i("label",{className:"straumur__stored-card-component__form--wrapper--label straumur__stored-card-component__form--wrapper--label--readonly"},l.t("stored-cards.expiryDate")),i("span",{className:"straumur__stored-card-component__form--wrapper--input straumur__stored-card-component__form--wrapper--input--readonly"},r.expiryMonth,"/",r.expiryYear)),i("div",{className:"straumur__stored-card-component__form--wrapper"},(p==="optional"||p==="required")&&i(ie,null,i("label",{className:`straumur__stored-card-component__form--wrapper--label ${C.encryptedSecurityCode.visible?"straumur__stored-card-component__form--wrapper--label--error":""}`},p==="optional"?l.t("stored-cards.securityCode3DigitsOptional"):l.t("stored-cards.securityCode3Digits")),i("span",{className:`straumur__stored-card-component__form--wrapper--input ${C.encryptedSecurityCode.visible?"straumur__stored-card-component__form--wrapper--input--error":""}`,"data-cse":"encryptedSecurityCode",role:"group","aria-label":l.t("stored-cards.securityCode3Digits")},i("div",{className:"straumur__stored-card-component__form--wrapper--label--info"},i(Zt,{content:l.t("stored-cards.securityCode3DigitsInfo"),placement:"top"},i(dn,null))))),C.encryptedSecurityCode.visible&&i("span",{className:"straumur__stored-card-component__form--wrapper--error"},C.encryptedSecurityCode.message))),!t.hideSubmitButton&&i("button",{className:"straumur__stored-card-component__submit-button",disabled:c||B,onClick:at},e.minorUnitsAmount===0?l.t("stored-cards.saveCardDetails"):e.formattedAmount))))}var Lc=Dp;function wp({configuration:t,paymentMethods:e}){let[r,o]=R(e.paymentMethods.storedPaymentMethods??[]),{isObscuredByThreeDS:n,hasStoredPaymentMethods:a}=M();if(!a||n("storedcard"))return null;function s(l){o(c=>c.filter(u=>u.id!==l))}return i(ie,null,r?.map(l=>i(Lc,{key:l.id,configuration:t,storedPaymentMethod:l,paymentMethods:e,onStoredCardRemoved:s})))}var Bc=wp;N(`.straumur__payment-method-group{display:flex;flex-direction:column;gap:var(--straumur__space-xxlg);width:100%;position:relative}
|
|
14
|
+
`);function Ip({children:t,initialValue:e,initialStoredPaymentMethodId:r,isSolePaymentMethod:o,hasCard:n,hasGooglePay:a,hasApplePay:s,hasKortalan:l,hasStoredPaymentMethods:c,onSubmitApiReady:u}){return i(Ds,{initialValue:e,initialStoredPaymentMethodId:r,isSolePaymentMethod:o,hasCard:n,hasGooglePay:a,hasApplePay:s,hasKortalan:l,hasStoredPaymentMethods:c,onSubmitApiReady:u},i("div",{className:"straumur__payment-method-group"},t))}var Uc=Ip;N(`.straumur__result-component{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--straumur__space-5xlg);padding:var(--straumur__space-6xlg);width:100%;min-height:300px;background-color:var(--straumur__color-white);border-radius:var(--straumur__border-radius-xxlg)}
|
|
15
|
+
`);N(`.straumur__result-icon{display:block}.straumur__result-icon__ring,.straumur__result-icon__check,.straumur__result-icon__x,.straumur__result-icon__halo,.straumur__result-icon__cross{transform-box:fill-box;transform-origin:center}.straumur__result-icon__ring{fill:none;stroke-width:5;stroke-linecap:round;stroke-dasharray:100;stroke-dashoffset:100;animation:straumur-result-draw .6s cubic-bezier(.65,0,.35,1) forwards}.straumur__result-icon__halo{opacity:0;animation:straumur-result-halo .9s .45s ease-out}.straumur__result-icon__check{fill:none;stroke-width:7;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:100;stroke-dashoffset:100;animation:straumur-result-draw .4s .55s cubic-bezier(.65,0,.35,1) forwards,straumur-result-pop .45s .9s ease-out}.straumur__result-icon__x{fill:none;stroke-width:7;stroke-linecap:round;stroke-dasharray:100;stroke-dashoffset:100;animation:straumur-result-draw .3s cubic-bezier(.65,0,.35,1) forwards}.straumur__result-icon__x--1{animation-delay:.6s}.straumur__result-icon__x--2{animation-delay:.82s}.straumur__result-icon__cross{animation:straumur-result-shake .4s 1.15s ease-in-out}.straumur__result-icon--success .straumur__result-icon__ring,.straumur__result-icon--success .straumur__result-icon__check{stroke:var(--straumur__color-success)}.straumur__result-icon--success .straumur__result-icon__halo{fill:var(--straumur__color-success)}.straumur__result-icon--failure .straumur__result-icon__ring,.straumur__result-icon--failure .straumur__result-icon__x{stroke:var(--straumur__color-danger-text)}.straumur__result-icon--failure .straumur__result-icon__halo{fill:var(--straumur__color-danger-text)}@keyframes straumur-result-draw{to{stroke-dashoffset:0}}@keyframes straumur-result-pop{0%{transform:scale(1)}45%{transform:scale(1.12)}to{transform:scale(1)}}@keyframes straumur-result-halo{0%{opacity:.35;transform:scale(.55)}to{opacity:0;transform:scale(1.35)}}@keyframes straumur-result-shake{0%,to{transform:translate(0)}25%{transform:translate(-3px)}75%{transform:translate(3px)}}@media(prefers-reduced-motion:reduce){.straumur__result-icon__ring,.straumur__result-icon__check,.straumur__result-icon__x,.straumur__result-icon__halo,.straumur__result-icon__cross{animation:none}.straumur__result-icon__ring,.straumur__result-icon__check,.straumur__result-icon__x{stroke-dashoffset:0}.straumur__result-icon__halo{opacity:0}}
|
|
16
|
+
`);var kp=()=>i("svg",{className:"straumur__result-icon straumur__result-icon--success",xmlns:"http://www.w3.org/2000/svg",width:"120",height:"120",viewBox:"0 0 120 120",role:"img"},i("circle",{className:"straumur__result-icon__halo",cx:"60",cy:"60",r:"52"}),i("circle",{className:"straumur__result-icon__ring",cx:"60",cy:"60",r:"50",pathLength:"100"}),i("path",{className:"straumur__result-icon__check",d:"M37 62 L53 78 L84 44",pathLength:"100"})),Cn=kp;var Np=()=>i("svg",{className:"straumur__result-icon straumur__result-icon--failure",xmlns:"http://www.w3.org/2000/svg",width:"120",height:"120",viewBox:"0 0 120 120",role:"img"},i("circle",{className:"straumur__result-icon__halo",cx:"60",cy:"60",r:"52"}),i("circle",{className:"straumur__result-icon__ring",cx:"60",cy:"60",r:"50",pathLength:"100"}),i("g",{className:"straumur__result-icon__cross"},i("line",{className:"straumur__result-icon__x straumur__result-icon__x--1",x1:"42",y1:"42",x2:"78",y2:"78",pathLength:"100"}),i("line",{className:"straumur__result-icon__x straumur__result-icon__x--2",x1:"78",y1:"42",x2:"42",y2:"78",pathLength:"100"}))),vn=Np;function Op(){let{error:t,success:e}=M(),{i18n:r}=he();if(!t&&!e)return null;let o=n=>"key"in n?r.t(n.key):n.text;return i("div",{className:"straumur__result-component"},t&&i(ie,null,i("span",{"aria-hidden":"true"},i(vn,null)),i("p",{className:"straumur__result-component__error--message straumur__result-message",role:"alert"},o(t))),e&&i(ie,null,i("span",{"aria-hidden":"true"},i(Cn,null)),i("p",{className:"straumur__result-component__success--message straumur__result-message",role:"status"},o(e))))}var Vc=Op;N(`.straumur__master-loader{display:flex;align-items:center;justify-content:center;width:100%;min-height:240px}.straumur__methods{display:flex;flex-direction:column;gap:var(--straumur__space-xxlg)}.straumur__methods--loading{position:absolute;top:0;left:0;width:100%;opacity:0;pointer-events:none}
|
|
17
|
+
`);var Mp=4e3;function Fp({children:t}){let{error:e,success:r,hasGooglePay:o,hasApplePay:n,isPaymentMethodInitialized:a,isStoredCardInitialized:s,activePaymentMethod:l,activeStoredPaymentMethodId:c}=M(),[u,p]=R(!1),d=(!o||a.googlepay)&&(!n||a.applepay),h=!0;l==="card"?h=a.card:l==="storedcard"&&(h=c?!!s[c]:!0);let m=d&&h;return oe(()=>{m&&p(!0)},[m]),oe(()=>{let C=setTimeout(()=>p(!0),Mp);return()=>clearTimeout(C)},[]),e||r?null:i(ie,null,!u&&i("div",{className:"straumur__master-loader",role:"status"},i(Ke,null)),i("div",{className:`straumur__methods${u?"":" straumur__methods--loading"}`},t))}var Hc=Fp;N(`.instant-payments{display:grid;gap:var(--straumur__space-lg);grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.instant-payments--single{grid-template-columns:1fr}.instant-payments__full{grid-column:1 / -1}@container straumur (max-width: 499px){.instant-payments{grid-template-columns:1fr}}
|
|
18
|
+
`);N(`.straumur__kortalan-instant-button{display:flex;align-items:center;justify-content:center;gap:var(--straumur__space-s);width:100%;height:var(--apple-pay-button-height);border:none;border-radius:var(--straumur__border-radius-lg);background:var(--straumur__color-primary);color:var(--straumur__color-on-primary);cursor:pointer;font-size:16px;padding:0 var(--straumur__space-xxlg);transition:opacity .2s ease-out}.straumur__kortalan-instant-button svg{height:20px;width:auto}.straumur__kortalan-instant-button:hover:not(:disabled){opacity:.9}.straumur__kortalan-instant-button:disabled{opacity:.5;cursor:not-allowed}
|
|
19
|
+
`);function Lp({configuration:t}){let{i18n:e}=he(),{isObscuredByThreeDS:r,paymentInProgress:o}=M(),{pay:n,isSubmitting:a}=gn(t);return r(Rt)?null:i("button",{className:"straumur__kortalan-instant-button",disabled:a||o,onClick:()=>{n()}},i(yn,null),i("span",null,e.t("kortalan.payButton")))}var Yc=Lp;var Bp=["kortalan","googlepay","applepay"],Up=["googlepay","applepay"];function Vp({configuration:t,paymentMethods:e}){let{hasGooglePay:r,hasApplePay:o,hasKortalan:n,threeDSecureActive:a}=M(),[s,l]=R(new Set),c=g=>{l(v=>new Set(v).add(g))};if(!t.instantPayments)return null;let u=g=>g==="googlepay"?r:g==="applepay"?o:n,p=new Set(t.instantPayments),d=Bp.filter(g=>p.has(g)).filter(u),h=d.filter(g=>!s.has(g));if(d.length===0)return null;let C=h.filter(g=>Up.includes(g)).length>1&&!a;return i("div",{className:`straumur__instant-payments instant-payments ${C?"straumur__instant-payments--multiple instant-payments--multiple":"straumur__instant-payments--single instant-payments--single"}`,style:{display:h.length===0?"none":void 0}},h.map(g=>g==="googlepay"?i(fn,{key:g,configuration:t,paymentMethods:e,isInstantPayment:!0,onUnavailable:()=>c("googlepay")}):g==="applepay"?i(_n,{key:g,configuration:t,paymentMethods:e,isInstantPayment:!0,onUnavailable:()=>c("applepay")}):g==="kortalan"?i("div",{key:g,className:"straumur__instant-payments__full instant-payments__full"},i(Yc,{configuration:t})):null))}var Kc=Vp;var za=["instantpayments","storedcard","card","kortalan","googlepay","applepay"],Hp=new Set(za);function Gc(t){if(!t)return[...za];let e=new Set,r=[];for(let o of t)Hp.has(o)&&!e.has(o)&&(e.add(o),r.push(o));for(let o of za)e.has(o)||r.push(o);return r}function Yp(t,e,r,o,n,a,s){let l=e&&!a?.some(d=>d==="googlepay"),c=r&&!a?.some(d=>d==="applepay"),u=o&&!a?.some(d=>d==="kortalan");return n+(t?1:0)+(l?1:0)+(c?1:0)+(u?1:0)===1?n===1?{initialPaymentMethod:"storedcard",isSolePaymentMethod:!0}:t?{initialPaymentMethod:"card",isSolePaymentMethod:!0}:l?{initialPaymentMethod:"googlepay",isSolePaymentMethod:!0}:c?{initialPaymentMethod:"applepay",isSolePaymentMethod:!0}:u?{initialPaymentMethod:"kortalan",isSolePaymentMethod:!0}:{initialPaymentMethod:null,isSolePaymentMethod:!1}:s==="card"&&t?{initialPaymentMethod:"card",isSolePaymentMethod:!1}:s==="googlepay"&&l?{initialPaymentMethod:"googlepay",isSolePaymentMethod:!1}:s==="applepay"&&c?{initialPaymentMethod:"applepay",isSolePaymentMethod:!1}:s==="firstStoredCard"&&n>0?{initialPaymentMethod:"storedcard",isSolePaymentMethod:!1}:{initialPaymentMethod:null,isSolePaymentMethod:!1}}function Kp({configuration:t,paymentMethods:e,onSubmitApiReady:r}){let o=e.paymentMethods.paymentMethods??[],n=e.paymentMethods.storedPaymentMethods??[],a=f=>!t.allowedPaymentMethods||t.allowedPaymentMethods.includes(f),s=o.some(f=>f.type==="scheme")&&a("card"),l=o.some(f=>f.type==="googlepay")&&a("googlepay"),c=o.some(f=>f.type==="applepay")&&a("applepay"),u=o.some(f=>f.type==="kortalan")&&a("kortalan"),p=a("storedcard")?n.length:0,d=p>0,{initialPaymentMethod:h,isSolePaymentMethod:m}=Yp(s,l,c,u,p,t.instantPayments,t.openDefaultPaymentMethod),C=h==="storedcard"&&!m?n[0]?.id??null:null,g={instantpayments:i(Kc,{key:"instantpayments",configuration:t,paymentMethods:e}),storedcard:i(Bc,{key:"storedcard",configuration:t,paymentMethods:e}),card:i(Ac,{key:"card",configuration:t,paymentMethods:e}),kortalan:i(Mc,{key:"kortalan",configuration:t,paymentMethods:e}),googlepay:i(kc,{key:"googlepay",configuration:t,paymentMethods:e}),applepay:i(Oc,{key:"applepay",configuration:t,paymentMethods:e})},v=Gc(t.orderPaymentMethods);return i(Uc,{initialValue:h,initialStoredPaymentMethodId:C,isSolePaymentMethod:m,hasCard:s,hasGooglePay:l,hasApplePay:c,hasKortalan:u,hasStoredPaymentMethods:d,onSubmitApiReady:r},i(Hc,null,v.map(f=>g[f])),i(Vc,null))}var zc=Kp;var bn=class{constructor(e,r){this.language=e;this.customLocalizations=r}t(e){return this.customLocalizations?.[this.language]?.[e]||po[this.language][e]||e}setLanguage(e){this.language=e}updateCustomLocalizations(e){this.customLocalizations=e}};function En({children:t,theme:e="light"}){let r=Ge(e);return i("div",{className:"straumur__root-component","data-theme":r},t)}function jc({theme:t}){return i(En,{theme:t},i("div",{className:"straumur__component"},i(Ke,null)))}function ja({variant:t,message:e,i18n:r,theme:o}){return i(En,{theme:o},i("div",{className:"straumur__component"},i("span",{"aria-hidden":"true"},t==="success"?i(Cn,null):i(vn,null)),i("p",{className:"straumur__result-message",role:t==="success"?"status":"alert"},"key"in e?r.t(e.key):e.text)))}function $c(t,e){return{resultCode:"Success",clientKey:t.clientKey,paymentMethods:t.paymentMethods,minorUnitsAmount:t.amount.value,currency:t.amount.currency,amount:t.amount.value/100,formattedAmount:t.formattedAmount,merchantName:t.merchantName,enableStoreDetails:t.enableStoreDetails,locale:e}}var Gp="IS";function zp(t){return typeof t.sessionId=="string"&&t.sessionId.length>0}function jp(t){return typeof t=="object"?{theme:t.theme??"light",googlePayButtonTheme:t.googlePayButtonTheme,applePayButtonTheme:t.applePayButtonTheme}:{theme:t??"light"}}function $p(t){return typeof t.clientKey=="string"&&t.clientKey.length>0&&typeof t.countryCode=="string"&&t.countryCode.length>0&&typeof t.paymentMethods=="object"&&t.paymentMethods!==null&&typeof t.amount=="object"&&t.amount!==null&&typeof t.amount.value=="number"&&typeof t.amount.currency=="string"&&typeof t.onSubmit=="function"&&typeof t.onAdditionalDetails=="function"}function Wc(t){let e=t,r=mo(e.locale),o=zp(e),n=jp(e.theme),a={mode:o?"session":"advanced",sessionId:e.sessionId,environment:e.environment,countryCode:o?Gp:e.countryCode,paymentFlow:o?Sc(e.environment,e.sessionId):Pc(e),onPaymentCompleted:e.onPaymentCompleted,onPaymentFailed:e.onPaymentFailed,placeholders:e.placeholders,locale:r,customLocalizations:e.localizations,instantPayments:e.instantPayments,hideSubmitButton:e.hideSubmitButton,onCardValidityChanged:e.onCardValidityChanged,allowedPaymentMethods:e.allowedPaymentMethods,orderPaymentMethods:e.orderPaymentMethods,openDefaultPaymentMethod:e.openDefaultPaymentMethod,theme:n.theme,googlePayButtonTheme:n.googlePayButtonTheme,applePayButtonTheme:n.applePayButtonTheme};return o?{configuration:a,advancedConfiguration:null,paymentMethods:null,initializationFailed:!1}:$p(e)?{configuration:a,advancedConfiguration:e,paymentMethods:$c(e,r),initializationFailed:!1}:{configuration:a,advancedConfiguration:null,paymentMethods:null,initializationFailed:!0}}var $a=class{configuration;paymentMethods=null;mountElement=null;i18n;submitApi=null;initializationFailed=!1;constructor(e){let r=Wc(e);this.configuration=r.configuration,this.paymentMethods=r.paymentMethods,this.initializationFailed=r.initializationFailed,this.i18n=new bn(this.configuration.locale,this.configuration.customLocalizations)}async mount(e){try{if(this.mountElement=typeof e=="string"?document.querySelector(e):e,!this.mountElement)return;if(this.initializationFailed){this.handleError({key:"error.failedToInitializeStraumurWebComponent"});return}if(this.configuration.mode==="advanced"){this.renderComponent();return}Wt(i(jc,{theme:this.configuration.theme}),this.mountElement);let r=await fs(this.configuration.environment,this.configuration.sessionId);if(r.resultCode==="Error"){this.handleError({key:r.error});return}this.paymentMethods=r,this.renderComponent()}catch(r){console.error("[StraumurCheckout] mount() failed:",r)}}renderComponent(){this.mountElement&&Wt(i(En,{theme:this.configuration.theme},i(Is,{i18nService:this.i18n,onLanguageChange:e=>{this.configuration.locale=e,this.renderComponent()}},i(zc,{configuration:this.configuration,paymentMethods:this.paymentMethods,onSubmitApiReady:e=>{this.submitApi=e}}))),this.mountElement)}handleSuccess(e){this.mountElement&&Wt(i(ja,{variant:"success",message:e,i18n:this.i18n,theme:this.configuration.theme}),this.mountElement)}handleError(e){this.mountElement&&Wt(i(ja,{variant:"failure",message:e,i18n:this.i18n,theme:this.configuration.theme}),this.mountElement)}async submitDetails(e,r,o){try{if(o&&(this.mountElement=typeof o=="string"?document.querySelector(o):o),this.initializationFailed){this.handleError({key:"error.failedToInitializeStraumurWebComponent"});return}let{resultCode:n,errorMessage:a}=await this.configuration.paymentFlow.submitAdditionalDetails({paymentCheckoutReference:r,details:{redirectResult:e}});_r(n,{configuration:this.configuration,handleSuccess:s=>this.handleSuccess(s),handleError:s=>this.handleError(s),failureMessage:a})}catch(n){console.error("[StraumurCheckout] submitDetails() failed:",n),this.handleError({key:"error.failedToSubmitPaymentDetails"}),this.configuration.onPaymentFailed?.({resultCode:"Error"})}}updateConfig(e){let{locale:r,...o}=e;this.configuration={...this.configuration,...o,...r?{locale:mo(r)}:{}},r&&this.i18n.setLanguage(this.configuration.locale),e.customLocalizations&&this.i18n.updateCustomLocalizations(e.customLocalizations),this.mountElement&&this.renderComponent()}setLanguage(e){this.updateConfig({locale:e})}destroy(){this.mountElement&&(Wt(null,this.mountElement),this.mountElement=null),this.submitApi=null}submitCard(){if(!this.mountElement)return console.warn("[StraumurCheckout] submitCard() called before the component was mounted."),!1;if(!this.submitApi)return console.warn("[StraumurCheckout] submitCard() called but the component is not ready yet."),!1;let e=this.submitApi.triggerSubmit();return e||console.warn("[StraumurCheckout] submitCard() called but no card-type payment method is currently active and initialized."),e}},Zc=$a;return tu(Wp);})();
|
|
19
20
|
/*! Bundled license information:
|
|
20
21
|
|
|
21
22
|
@adyen/adyen-web/dist/es/external/classnames/index.js:
|