straumur-web-component 2.0.0-alpha.2 → 2.0.0-alpha.4
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 +8 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var StraumurWeb=(()=>{var bn=Object.defineProperty;var Mc=Object.getOwnPropertyDescriptor;var Fc=Object.getOwnPropertyNames;var Lc=Object.prototype.hasOwnProperty;var Bc=(t,e)=>{for(var o in e)bn(t,o,{get:e[o],enumerable:!0})},Uc=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Fc(e))!Lc.call(t,n)&&n!==o&&bn(t,n,{get:()=>e[n],enumerable:!(r=Mc(e,n))||r.enumerable});return t};var Vc=t=>Uc(bn({},"__esModule",{value:!0}),t);var Pu={};Bc(Pu,{StraumurCheckout:()=>Oc});var rr,B,Ga,Hc,Et,Ya,ja,$a,Wa,Tn,En,Sn,Za,_o={},qa=[],Yc=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,nr=Array.isArray;function ze(t,e){for(var o in e)t[o]=e[o];return t}function An(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function i(t,e,o){var r,n,a,s={};for(a in e)a=="key"?r=e[a]:a=="ref"?n=e[a]:s[a]=e[a];if(arguments.length>2&&(s.children=arguments.length>3?rr.call(arguments,2):o),typeof t=="function"&&t.defaultProps!=null)for(a in t.defaultProps)s[a]===void 0&&(s[a]=t.defaultProps[a]);return er(t,s,r,n,null)}function er(t,e,o,r,n){var a={type:t,props:e,key:o,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:n??++Ga,__i:-1,__u:0};return n==null&&B.vnode!=null&&B.vnode(a),a}function ne(t){return t.children}function tr(t,e){this.props=t,this.context=e}function Ht(t,e){if(e==null)return t.__?Ht(t.__,t.__i+1):null;for(var o;e<t.__k.length;e++)if((o=t.__k[e])!=null&&o.__e!=null)return o.__e;return typeof t.type=="function"?Ht(t):null}function Xa(t){var e,o;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((o=t.__k[e])!=null&&o.__e!=null){t.__e=t.__c.base=o.__e;break}return Xa(t)}}function Pn(t){(!t.__d&&(t.__d=!0)&&Et.push(t)&&!or.__r++||Ya!=B.debounceRendering)&&((Ya=B.debounceRendering)||ja)(or)}function or(){for(var t,e,o,r,n,a,s,d=1;Et.length;)Et.length>d&&Et.sort($a),t=Et.shift(),d=Et.length,t.__d&&(o=void 0,r=void 0,n=(r=(e=t).__v).__e,a=[],s=[],e.__P&&((o=ze({},r)).__v=r.__v+1,B.vnode&&B.vnode(o),Dn(e.__P,o,r,e.__n,e.__P.namespaceURI,32&r.__u?[n]:null,a,n??Ht(r),!!(32&r.__u),s),o.__v=r.__v,o.__.__k[o.__i]=o,es(a,o,s),r.__e=r.__=null,o.__e!=n&&Xa(o)));or.__r=0}function Ja(t,e,o,r,n,a,s,d,c,p,u){var l,h,m,g,b,C,y,_=r&&r.__k||qa,k=e.length;for(c=zc(o,e,_,c,k),l=0;l<k;l++)(m=o.__k[l])!=null&&(h=m.__i==-1?_o:_[m.__i]||_o,m.__i=l,C=Dn(t,m,h,n,a,s,d,c,p,u),g=m.__e,m.ref&&h.ref!=m.ref&&(h.ref&&wn(h.ref,null,m),u.push(m.ref,m.__c||g,m)),b==null&&g!=null&&(b=g),(y=!!(4&m.__u))||h.__k===m.__k?c=Qa(m,c,t,y):typeof m.type=="function"&&C!==void 0?c=C:g&&(c=g.nextSibling),m.__u&=-7);return o.__e=b,c}function zc(t,e,o,r,n){var a,s,d,c,p,u=o.length,l=u,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]=er(null,s,null,null,null):nr(s)?s=t.__k[a]=er(ne,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=t.__k[a]=er(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,d=null,(p=s.__i=Kc(s,o,c,l))!=-1&&(l--,(d=o[p])&&(d.__u|=2)),d==null||d.__v==null?(p==-1&&(n>u?h--:n<u&&h++),typeof s.type!="function"&&(s.__u|=4)):p!=c&&(p==c-1?h--:p==c+1?h++:(p>c?h--:h++,s.__u|=4))):t.__k[a]=null;if(l)for(a=0;a<u;a++)(d=o[a])!=null&&(2&d.__u)==0&&(d.__e==r&&(r=Ht(d)),os(d,d));return r}function Qa(t,e,o,r){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=Qa(n[a],e,o,r));return e}t.__e!=e&&(r&&(e&&t.type&&!e.parentNode&&(e=Ht(t)),o.insertBefore(t.__e,e||null)),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function Kc(t,e,o,r){var n,a,s,d=t.key,c=t.type,p=e[o],u=p!=null&&(2&p.__u)==0;if(p===null&&d==null||u&&d==p.key&&c==p.type)return o;if(r>(u?1:0)){for(n=o-1,a=o+1;n>=0||a<e.length;)if((p=e[s=n>=0?n--:a++])!=null&&(2&p.__u)==0&&d==p.key&&c==p.type)return s}return-1}function za(t,e,o){e[0]=="-"?t.setProperty(e,o??""):t[e]=o==null?"":typeof o!="number"||Yc.test(e)?o:o+"px"}function Qo(t,e,o,r,n){var a,s;e:if(e=="style")if(typeof o=="string")t.style.cssText=o;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)o&&e in o||za(t.style,e,"");if(o)for(e in o)r&&o[e]==r[e]||za(t.style,e,o[e])}else if(e[0]=="o"&&e[1]=="n")a=e!=(e=e.replace(Wa,"$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]=o,o?r?o.u=r.u:(o.u=Tn,t.addEventListener(e,a?Sn:En,a)):t.removeEventListener(e,a?Sn:En,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]=o??"";break e}catch{}typeof o=="function"||(o==null||o===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&o==1?"":o))}}function Ka(t){return function(e){if(this.l){var o=this.l[e.type+t];if(e.t==null)e.t=Tn++;else if(e.t<o.u)return;return o(B.event?B.event(e):e)}}}function Dn(t,e,o,r,n,a,s,d,c,p){var u,l,h,m,g,b,C,y,_,k,E,H,M,K,ee,F,O,L=e.type;if(e.constructor!==void 0)return null;128&o.__u&&(c=!!(32&o.__u),a=[d=e.__e=o.__e]),(u=B.__b)&&u(e);e:if(typeof L=="function")try{if(y=e.props,_="prototype"in L&&L.prototype.render,k=(u=L.contextType)&&r[u.__c],E=u?k?k.props.value:u.__:r,o.__c?C=(l=e.__c=o.__c).__=l.__E:(_?e.__c=l=new L(y,E):(e.__c=l=new tr(y,E),l.constructor=L,l.render=jc),k&&k.sub(l),l.state||(l.state={}),l.__n=r,h=l.__d=!0,l.__h=[],l._sb=[]),_&&l.__s==null&&(l.__s=l.state),_&&L.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=ze({},l.__s)),ze(l.__s,L.getDerivedStateFromProps(y,l.__s))),m=l.props,g=l.state,l.__v=e,h)_&&L.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),_&&l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(_&&L.getDerivedStateFromProps==null&&y!==m&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(y,E),e.__v==o.__v||!l.__e&&l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(y,l.__s,E)===!1){for(e.__v!=o.__v&&(l.props=y,l.state=l.__s,l.__d=!1),e.__e=o.__e,e.__k=o.__k,e.__k.some(function(pe){pe&&(pe.__=e)}),H=0;H<l._sb.length;H++)l.__h.push(l._sb[H]);l._sb=[],l.__h.length&&s.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(y,l.__s,E),_&&l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(m,g,b)})}if(l.context=E,l.props=y,l.__P=t,l.__e=!1,M=B.__r,K=0,_){for(l.state=l.__s,l.__d=!1,M&&M(e),u=l.render(l.props,l.state,l.context),ee=0;ee<l._sb.length;ee++)l.__h.push(l._sb[ee]);l._sb=[]}else do l.__d=!1,M&&M(e),u=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++K<25);l.state=l.__s,l.getChildContext!=null&&(r=ze(ze({},r),l.getChildContext())),_&&!h&&l.getSnapshotBeforeUpdate!=null&&(b=l.getSnapshotBeforeUpdate(m,g)),F=u,u!=null&&u.type===ne&&u.key==null&&(F=ts(u.props.children)),d=Ja(t,nr(F)?F:[F],e,o,r,n,a,s,d,c,p),l.base=e.__e,e.__u&=-161,l.__h.length&&s.push(l),C&&(l.__E=l.__=null)}catch(pe){if(e.__v=null,c||a!=null)if(pe.then){for(e.__u|=c?160:128;d&&d.nodeType==8&&d.nextSibling;)d=d.nextSibling;a[a.indexOf(d)]=null,e.__e=d}else{for(O=a.length;O--;)An(a[O]);Rn(e)}else e.__e=o.__e,e.__k=o.__k,pe.then||Rn(e);B.__e(pe,e,o)}else a==null&&e.__v==o.__v?(e.__k=o.__k,e.__e=o.__e):d=e.__e=Gc(o.__e,e,o,r,n,a,s,c,p);return(u=B.diffed)&&u(e),128&e.__u?void 0:d}function Rn(t){t&&t.__c&&(t.__c.__e=!0),t&&t.__k&&t.__k.forEach(Rn)}function es(t,e,o){for(var r=0;r<o.length;r++)wn(o[r],o[++r],o[++r]);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 ts(t){return typeof t!="object"||t==null||t.__b&&t.__b>0?t:nr(t)?t.map(ts):ze({},t)}function Gc(t,e,o,r,n,a,s,d,c){var p,u,l,h,m,g,b,C=o.props||_o,y=e.props,_=e.type;if(_=="svg"?n="http://www.w3.org/2000/svg":_=="math"?n="http://www.w3.org/1998/Math/MathML":n||(n="http://www.w3.org/1999/xhtml"),a!=null){for(p=0;p<a.length;p++)if((m=a[p])&&"setAttribute"in m==!!_&&(_?m.localName==_:m.nodeType==3)){t=m,a[p]=null;break}}if(t==null){if(_==null)return document.createTextNode(y);t=document.createElementNS(n,_,y.is&&y),d&&(B.__m&&B.__m(e,a),d=!1),a=null}if(_==null)C===y||d&&t.data==y||(t.data=y);else{if(a=a&&rr.call(t.childNodes),!d&&a!=null)for(C={},p=0;p<t.attributes.length;p++)C[(m=t.attributes[p]).name]=m.value;for(p in C)if(m=C[p],p!="children"){if(p=="dangerouslySetInnerHTML")l=m;else if(!(p in y)){if(p=="value"&&"defaultValue"in y||p=="checked"&&"defaultChecked"in y)continue;Qo(t,p,null,m,n)}}for(p in y)m=y[p],p=="children"?h=m:p=="dangerouslySetInnerHTML"?u=m:p=="value"?g=m:p=="checked"?b=m:d&&typeof m!="function"||C[p]===m||Qo(t,p,m,C[p],n);if(u)d||l&&(u.__html==l.__html||u.__html==t.innerHTML)||(t.innerHTML=u.__html),e.__k=[];else if(l&&(t.innerHTML=""),Ja(e.type=="template"?t.content:t,nr(h)?h:[h],e,o,r,_=="foreignObject"?"http://www.w3.org/1999/xhtml":n,a,s,a?a[0]:o.__k&&Ht(o,0),d,c),a!=null)for(p=a.length;p--;)An(a[p]);d||(p="value",_=="progress"&&g==null?t.removeAttribute("value"):g!=null&&(g!==t[p]||_=="progress"&&!g||_=="option"&&g!=C[p])&&Qo(t,p,g,C[p],n),p="checked",b!=null&&b!=t[p]&&Qo(t,p,b,C[p],n))}return t}function wn(t,e,o){try{if(typeof t=="function"){var r=typeof t.__u=="function";r&&t.__u(),r&&e==null||(t.__u=t(e))}else t.current=e}catch(n){B.__e(n,o)}}function os(t,e,o){var r,n;if(B.unmount&&B.unmount(t),(r=t.ref)&&(r.current&&r.current!=t.__e||wn(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(a){B.__e(a,e)}r.base=r.__P=null}if(r=t.__k)for(n=0;n<r.length;n++)r[n]&&os(r[n],e,o||typeof t.type!="function");o||An(t.__e),t.__c=t.__=t.__e=void 0}function jc(t,e,o){return this.constructor(t,o)}function Yt(t,e,o){var r,n,a,s;e==document&&(e=document.documentElement),B.__&&B.__(t,e),n=(r=typeof o=="function")?null:o&&o.__k||e.__k,a=[],s=[],Dn(e,t=(!r&&o||e).__k=i(ne,null,[t]),n||_o,_o,e.namespaceURI,!r&&o?[o]:n?null:e.firstChild?rr.call(e.childNodes):null,a,!r&&o?o:n?n.__e:e.firstChild,r,s),es(a,t,s)}function ar(t){function e(o){var r,n;return this.getChildContext||(r=new Set,(n={})[e.__c]=this,this.getChildContext=function(){return n},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(a){this.props.value!=a.value&&r.forEach(function(s){s.__e=!0,Pn(s)})},this.sub=function(a){r.add(a);var s=a.componentWillUnmount;a.componentWillUnmount=function(){r&&r.delete(a),s&&s.call(a)}}),o.children}return e.__c="__cC"+Za++,e.__=t,e.Provider=e.__l=(e.Consumer=function(o,r){return o.children(r)}).contextType=e,e}rr=qa.slice,B={__e:function(t,e,o,r){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,r||{}),s=n.__d),s)return n.__E=n}catch(d){t=d}throw t}},Ga=0,Hc=function(t){return t!=null&&t.constructor===void 0},tr.prototype.setState=function(t,e){var o;o=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=ze({},this.state),typeof t=="function"&&(t=t(ze({},o),this.props)),t&&ze(o,t),t!=null&&this.__v&&(e&&this._sb.push(e),Pn(this))},tr.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Pn(this))},tr.prototype.render=ne,Et=[],ja=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,$a=function(t,e){return t.__v.__b-e.__v.__b},or.__r=0,Wa=/(PointerCapture)$|Capture$/i,Tn=0,En=Ka(!1),Sn=Ka(!0),Za=0;function Y(t,{insertAt:e}={}){if(!t||typeof document>"u")return;let o=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",e==="top"&&o.firstChild?o.insertBefore(r,o.firstChild):o.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}Y(`: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-text: #00112c;--straumur__color-border: #dbdee2;--straumur__color-warning-text: #775d00;--straumur__color-warning-bg: #fff7db;--straumur__color-danger-text: #d03e00;--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-s)}.straumur__root-component{font-family:AkzidenzGroteskPro,sans-serif;color:var(--straumur__color-text);max-width:676px;min-width:320px;container:straumur / inline-size}.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: #1e232b;--straumur__color-text: #e8edf2;--straumur__color-border: #3a424d;--straumur__color-warning-text: #e6c766;--straumur__color-warning-bg: #2f2a17;--straumur__color-danger-text: #f0895f}.straumur__component *{font-family:inherit}.straumur__render-brand-icons__overflow{color:var(--straumur__color-secondary)}.straumur__component{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;min-height:300px;background-color:var(--straumur__color-white);border-radius:var(--straumur__border-radius-xxlg)}.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%}
|
|
1
|
+
"use strict";var StraumurWeb=(()=>{var bn=Object.defineProperty;var Mc=Object.getOwnPropertyDescriptor;var Fc=Object.getOwnPropertyNames;var Lc=Object.prototype.hasOwnProperty;var Bc=(t,e)=>{for(var o in e)bn(t,o,{get:e[o],enumerable:!0})},Uc=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Fc(e))!Lc.call(t,n)&&n!==o&&bn(t,n,{get:()=>e[n],enumerable:!(r=Mc(e,n))||r.enumerable});return t};var Vc=t=>Uc(bn({},"__esModule",{value:!0}),t);var Pu={};Bc(Pu,{StraumurCheckout:()=>Oc});var rr,B,Ga,Hc,Et,Ya,ja,$a,Wa,Tn,En,Sn,Za,_o={},qa=[],Yc=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,nr=Array.isArray;function ze(t,e){for(var o in e)t[o]=e[o];return t}function An(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function i(t,e,o){var r,n,a,s={};for(a in e)a=="key"?r=e[a]:a=="ref"?n=e[a]:s[a]=e[a];if(arguments.length>2&&(s.children=arguments.length>3?rr.call(arguments,2):o),typeof t=="function"&&t.defaultProps!=null)for(a in t.defaultProps)s[a]===void 0&&(s[a]=t.defaultProps[a]);return er(t,s,r,n,null)}function er(t,e,o,r,n){var a={type:t,props:e,key:o,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:n??++Ga,__i:-1,__u:0};return n==null&&B.vnode!=null&&B.vnode(a),a}function ne(t){return t.children}function tr(t,e){this.props=t,this.context=e}function Ht(t,e){if(e==null)return t.__?Ht(t.__,t.__i+1):null;for(var o;e<t.__k.length;e++)if((o=t.__k[e])!=null&&o.__e!=null)return o.__e;return typeof t.type=="function"?Ht(t):null}function Xa(t){var e,o;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((o=t.__k[e])!=null&&o.__e!=null){t.__e=t.__c.base=o.__e;break}return Xa(t)}}function Pn(t){(!t.__d&&(t.__d=!0)&&Et.push(t)&&!or.__r++||Ya!=B.debounceRendering)&&((Ya=B.debounceRendering)||ja)(or)}function or(){for(var t,e,o,r,n,a,s,d=1;Et.length;)Et.length>d&&Et.sort($a),t=Et.shift(),d=Et.length,t.__d&&(o=void 0,r=void 0,n=(r=(e=t).__v).__e,a=[],s=[],e.__P&&((o=ze({},r)).__v=r.__v+1,B.vnode&&B.vnode(o),Dn(e.__P,o,r,e.__n,e.__P.namespaceURI,32&r.__u?[n]:null,a,n??Ht(r),!!(32&r.__u),s),o.__v=r.__v,o.__.__k[o.__i]=o,es(a,o,s),r.__e=r.__=null,o.__e!=n&&Xa(o)));or.__r=0}function Ja(t,e,o,r,n,a,s,d,c,p,u){var l,h,m,g,b,C,y,_=r&&r.__k||qa,k=e.length;for(c=zc(o,e,_,c,k),l=0;l<k;l++)(m=o.__k[l])!=null&&(h=m.__i==-1?_o:_[m.__i]||_o,m.__i=l,C=Dn(t,m,h,n,a,s,d,c,p,u),g=m.__e,m.ref&&h.ref!=m.ref&&(h.ref&&wn(h.ref,null,m),u.push(m.ref,m.__c||g,m)),b==null&&g!=null&&(b=g),(y=!!(4&m.__u))||h.__k===m.__k?c=Qa(m,c,t,y):typeof m.type=="function"&&C!==void 0?c=C:g&&(c=g.nextSibling),m.__u&=-7);return o.__e=b,c}function zc(t,e,o,r,n){var a,s,d,c,p,u=o.length,l=u,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]=er(null,s,null,null,null):nr(s)?s=t.__k[a]=er(ne,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=t.__k[a]=er(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,d=null,(p=s.__i=Kc(s,o,c,l))!=-1&&(l--,(d=o[p])&&(d.__u|=2)),d==null||d.__v==null?(p==-1&&(n>u?h--:n<u&&h++),typeof s.type!="function"&&(s.__u|=4)):p!=c&&(p==c-1?h--:p==c+1?h++:(p>c?h--:h++,s.__u|=4))):t.__k[a]=null;if(l)for(a=0;a<u;a++)(d=o[a])!=null&&(2&d.__u)==0&&(d.__e==r&&(r=Ht(d)),os(d,d));return r}function Qa(t,e,o,r){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=Qa(n[a],e,o,r));return e}t.__e!=e&&(r&&(e&&t.type&&!e.parentNode&&(e=Ht(t)),o.insertBefore(t.__e,e||null)),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function Kc(t,e,o,r){var n,a,s,d=t.key,c=t.type,p=e[o],u=p!=null&&(2&p.__u)==0;if(p===null&&d==null||u&&d==p.key&&c==p.type)return o;if(r>(u?1:0)){for(n=o-1,a=o+1;n>=0||a<e.length;)if((p=e[s=n>=0?n--:a++])!=null&&(2&p.__u)==0&&d==p.key&&c==p.type)return s}return-1}function za(t,e,o){e[0]=="-"?t.setProperty(e,o??""):t[e]=o==null?"":typeof o!="number"||Yc.test(e)?o:o+"px"}function Qo(t,e,o,r,n){var a,s;e:if(e=="style")if(typeof o=="string")t.style.cssText=o;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)o&&e in o||za(t.style,e,"");if(o)for(e in o)r&&o[e]==r[e]||za(t.style,e,o[e])}else if(e[0]=="o"&&e[1]=="n")a=e!=(e=e.replace(Wa,"$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]=o,o?r?o.u=r.u:(o.u=Tn,t.addEventListener(e,a?Sn:En,a)):t.removeEventListener(e,a?Sn:En,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]=o??"";break e}catch{}typeof o=="function"||(o==null||o===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&o==1?"":o))}}function Ka(t){return function(e){if(this.l){var o=this.l[e.type+t];if(e.t==null)e.t=Tn++;else if(e.t<o.u)return;return o(B.event?B.event(e):e)}}}function Dn(t,e,o,r,n,a,s,d,c,p){var u,l,h,m,g,b,C,y,_,k,E,H,M,K,ee,F,O,L=e.type;if(e.constructor!==void 0)return null;128&o.__u&&(c=!!(32&o.__u),a=[d=e.__e=o.__e]),(u=B.__b)&&u(e);e:if(typeof L=="function")try{if(y=e.props,_="prototype"in L&&L.prototype.render,k=(u=L.contextType)&&r[u.__c],E=u?k?k.props.value:u.__:r,o.__c?C=(l=e.__c=o.__c).__=l.__E:(_?e.__c=l=new L(y,E):(e.__c=l=new tr(y,E),l.constructor=L,l.render=jc),k&&k.sub(l),l.state||(l.state={}),l.__n=r,h=l.__d=!0,l.__h=[],l._sb=[]),_&&l.__s==null&&(l.__s=l.state),_&&L.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=ze({},l.__s)),ze(l.__s,L.getDerivedStateFromProps(y,l.__s))),m=l.props,g=l.state,l.__v=e,h)_&&L.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),_&&l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(_&&L.getDerivedStateFromProps==null&&y!==m&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(y,E),e.__v==o.__v||!l.__e&&l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(y,l.__s,E)===!1){for(e.__v!=o.__v&&(l.props=y,l.state=l.__s,l.__d=!1),e.__e=o.__e,e.__k=o.__k,e.__k.some(function(pe){pe&&(pe.__=e)}),H=0;H<l._sb.length;H++)l.__h.push(l._sb[H]);l._sb=[],l.__h.length&&s.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(y,l.__s,E),_&&l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(m,g,b)})}if(l.context=E,l.props=y,l.__P=t,l.__e=!1,M=B.__r,K=0,_){for(l.state=l.__s,l.__d=!1,M&&M(e),u=l.render(l.props,l.state,l.context),ee=0;ee<l._sb.length;ee++)l.__h.push(l._sb[ee]);l._sb=[]}else do l.__d=!1,M&&M(e),u=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++K<25);l.state=l.__s,l.getChildContext!=null&&(r=ze(ze({},r),l.getChildContext())),_&&!h&&l.getSnapshotBeforeUpdate!=null&&(b=l.getSnapshotBeforeUpdate(m,g)),F=u,u!=null&&u.type===ne&&u.key==null&&(F=ts(u.props.children)),d=Ja(t,nr(F)?F:[F],e,o,r,n,a,s,d,c,p),l.base=e.__e,e.__u&=-161,l.__h.length&&s.push(l),C&&(l.__E=l.__=null)}catch(pe){if(e.__v=null,c||a!=null)if(pe.then){for(e.__u|=c?160:128;d&&d.nodeType==8&&d.nextSibling;)d=d.nextSibling;a[a.indexOf(d)]=null,e.__e=d}else{for(O=a.length;O--;)An(a[O]);Rn(e)}else e.__e=o.__e,e.__k=o.__k,pe.then||Rn(e);B.__e(pe,e,o)}else a==null&&e.__v==o.__v?(e.__k=o.__k,e.__e=o.__e):d=e.__e=Gc(o.__e,e,o,r,n,a,s,c,p);return(u=B.diffed)&&u(e),128&e.__u?void 0:d}function Rn(t){t&&t.__c&&(t.__c.__e=!0),t&&t.__k&&t.__k.forEach(Rn)}function es(t,e,o){for(var r=0;r<o.length;r++)wn(o[r],o[++r],o[++r]);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 ts(t){return typeof t!="object"||t==null||t.__b&&t.__b>0?t:nr(t)?t.map(ts):ze({},t)}function Gc(t,e,o,r,n,a,s,d,c){var p,u,l,h,m,g,b,C=o.props||_o,y=e.props,_=e.type;if(_=="svg"?n="http://www.w3.org/2000/svg":_=="math"?n="http://www.w3.org/1998/Math/MathML":n||(n="http://www.w3.org/1999/xhtml"),a!=null){for(p=0;p<a.length;p++)if((m=a[p])&&"setAttribute"in m==!!_&&(_?m.localName==_:m.nodeType==3)){t=m,a[p]=null;break}}if(t==null){if(_==null)return document.createTextNode(y);t=document.createElementNS(n,_,y.is&&y),d&&(B.__m&&B.__m(e,a),d=!1),a=null}if(_==null)C===y||d&&t.data==y||(t.data=y);else{if(a=a&&rr.call(t.childNodes),!d&&a!=null)for(C={},p=0;p<t.attributes.length;p++)C[(m=t.attributes[p]).name]=m.value;for(p in C)if(m=C[p],p!="children"){if(p=="dangerouslySetInnerHTML")l=m;else if(!(p in y)){if(p=="value"&&"defaultValue"in y||p=="checked"&&"defaultChecked"in y)continue;Qo(t,p,null,m,n)}}for(p in y)m=y[p],p=="children"?h=m:p=="dangerouslySetInnerHTML"?u=m:p=="value"?g=m:p=="checked"?b=m:d&&typeof m!="function"||C[p]===m||Qo(t,p,m,C[p],n);if(u)d||l&&(u.__html==l.__html||u.__html==t.innerHTML)||(t.innerHTML=u.__html),e.__k=[];else if(l&&(t.innerHTML=""),Ja(e.type=="template"?t.content:t,nr(h)?h:[h],e,o,r,_=="foreignObject"?"http://www.w3.org/1999/xhtml":n,a,s,a?a[0]:o.__k&&Ht(o,0),d,c),a!=null)for(p=a.length;p--;)An(a[p]);d||(p="value",_=="progress"&&g==null?t.removeAttribute("value"):g!=null&&(g!==t[p]||_=="progress"&&!g||_=="option"&&g!=C[p])&&Qo(t,p,g,C[p],n),p="checked",b!=null&&b!=t[p]&&Qo(t,p,b,C[p],n))}return t}function wn(t,e,o){try{if(typeof t=="function"){var r=typeof t.__u=="function";r&&t.__u(),r&&e==null||(t.__u=t(e))}else t.current=e}catch(n){B.__e(n,o)}}function os(t,e,o){var r,n;if(B.unmount&&B.unmount(t),(r=t.ref)&&(r.current&&r.current!=t.__e||wn(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(a){B.__e(a,e)}r.base=r.__P=null}if(r=t.__k)for(n=0;n<r.length;n++)r[n]&&os(r[n],e,o||typeof t.type!="function");o||An(t.__e),t.__c=t.__=t.__e=void 0}function jc(t,e,o){return this.constructor(t,o)}function Yt(t,e,o){var r,n,a,s;e==document&&(e=document.documentElement),B.__&&B.__(t,e),n=(r=typeof o=="function")?null:o&&o.__k||e.__k,a=[],s=[],Dn(e,t=(!r&&o||e).__k=i(ne,null,[t]),n||_o,_o,e.namespaceURI,!r&&o?[o]:n?null:e.firstChild?rr.call(e.childNodes):null,a,!r&&o?o:n?n.__e:e.firstChild,r,s),es(a,t,s)}function ar(t){function e(o){var r,n;return this.getChildContext||(r=new Set,(n={})[e.__c]=this,this.getChildContext=function(){return n},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(a){this.props.value!=a.value&&r.forEach(function(s){s.__e=!0,Pn(s)})},this.sub=function(a){r.add(a);var s=a.componentWillUnmount;a.componentWillUnmount=function(){r&&r.delete(a),s&&s.call(a)}}),o.children}return e.__c="__cC"+Za++,e.__=t,e.Provider=e.__l=(e.Consumer=function(o,r){return o.children(r)}).contextType=e,e}rr=qa.slice,B={__e:function(t,e,o,r){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,r||{}),s=n.__d),s)return n.__E=n}catch(d){t=d}throw t}},Ga=0,Hc=function(t){return t!=null&&t.constructor===void 0},tr.prototype.setState=function(t,e){var o;o=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=ze({},this.state),typeof t=="function"&&(t=t(ze({},o),this.props)),t&&ze(o,t),t!=null&&this.__v&&(e&&this._sb.push(e),Pn(this))},tr.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Pn(this))},tr.prototype.render=ne,Et=[],ja=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,$a=function(t,e){return t.__v.__b-e.__v.__b},or.__r=0,Wa=/(PointerCapture)$|Capture$/i,Tn=0,En=Ka(!1),Sn=Ka(!0),Za=0;function Y(t,{insertAt:e}={}){if(!t||typeof document>"u")return;let o=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",e==="top"&&o.firstChild?o.insertBefore(r,o.firstChild):o.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}Y(`: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-text: #00112c;--straumur__color-border: #dbdee2;--straumur__color-warning-text: #775d00;--straumur__color-warning-bg: #fff7db;--straumur__color-danger-text: #d03e00;--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);max-width:676px;min-width:320px;container:straumur / inline-size}.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: #1e232b;--straumur__color-text: #e8edf2;--straumur__color-border: #3a424d;--straumur__color-warning-text: #e6c766;--straumur__color-warning-bg: #2f2a17;--straumur__color-danger-text: #f0895f}.straumur__component *{font-family:inherit}.straumur__render-brand-icons__overflow{color:var(--straumur__color-secondary)}.straumur__component{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;min-height:300px;background-color:var(--straumur__color-white);border-radius:var(--straumur__border-radius-xxlg)}.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
2
|
`);var $c=()=>({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"}),St=$c();function sr(t){switch(t){case"test":return St.STAGING_BASE_URL;case"live":return St.PRODUCTION_BASE_URL;default:throw new Error(`Unknown environment: ${t}`)}}function rs(t,e){return fetch(`${sr(t)}/${St.GET_PAYMENT_METHODS_URL}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}function ns(t,e){return fetch(`${sr(t)}/${St.POST_PAYMENT_URL}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}function as(t,e){return fetch(`${sr(t)}/${St.POST_DETAILS_URL}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}function ss(t,e){return fetch(`${sr(t)}/${St.POST_DISABLE_TOKEN_URL}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}var ir={"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","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","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 is(t){return typeof t=="string"&&(t in ir["en-US"]||t in ir["is-IS"])}async function xn(t,e){try{let o=await rs(t,{sessionId:e});if(!o.ok){let n=o.headers.get("content-type"),a="error.failedToInitializePaymentMethods";if(n&&n.includes("application/json")){let s=(await o.json()).errorMessage;is(s)&&(a=s)}return{resultCode:"Error",error:a}}return{resultCode:"Success",...await o.json()}}catch{return{resultCode:"Error",error:"error.failedToInitializePaymentMethods"}}}function lr(t){switch(t){case"en":case"en-US":return"en-US";default:return"is-IS"}}var Pt,G,In,ls,yo=0,_s=[],oe=B,ds=oe.__b,cs=oe.__r,ps=oe.diffed,us=oe.__c,ms=oe.unmount,hs=oe.__;function go(t,e){oe.__h&&oe.__h(G,t,yo||e),yo=0;var o=G.__H||(G.__H={__:[],__h:[]});return t>=o.__.length&&o.__.push({}),o.__[t]}function w(t){return yo=1,Wc(Cs,t)}function Wc(t,e,o){var r=go(Pt++,2);if(r.t=t,!r.__c&&(r.__=[o?o(e):Cs(void 0,e),function(d){var c=r.__N?r.__N[0]:r.__[0],p=r.t(c,d);c!==p&&(r.__N=[p,r.__[1]],r.__c.setState({}))}],r.__c=G,!G.__f)){var n=function(d,c,p){if(!r.__c.__H)return!0;var u=r.__c.__H.__.filter(function(h){return!!h.__c});if(u.every(function(h){return!h.__N}))return!a||a.call(this,d,c,p);var l=r.__c.props!==d;return u.forEach(function(h){if(h.__N){var m=h.__[0];h.__=h.__N,h.__N=void 0,m!==h.__[0]&&(l=!0)}}),a&&a.call(this,d,c,p)||l};G.__f=!0;var a=G.shouldComponentUpdate,s=G.componentWillUpdate;G.componentWillUpdate=function(d,c,p){if(this.__e){var u=a;a=void 0,n(d,c,p),a=u}s&&s.call(this,d,c,p)},G.shouldComponentUpdate=n}return r.__N||r.__}function le(t,e){var o=go(Pt++,3);!oe.__s&&Nn(o.__H,e)&&(o.__=t,o.u=e,G.__H.__h.push(o))}function ys(t,e){var o=go(Pt++,4);!oe.__s&&Nn(o.__H,e)&&(o.__=t,o.u=e,G.__h.push(o))}function ue(t){return yo=5,gs(function(){return{current:t}},[])}function gs(t,e){var o=go(Pt++,7);return Nn(o.__H,e)&&(o.__=t(),o.__H=e,o.__h=t),o.__}function Co(t,e){return yo=8,gs(function(){return t},e)}function cr(t){var e=G.context[t.__c],o=go(Pt++,9);return o.c=t,e?(o.__==null&&(o.__=!0,e.sub(G)),e.props.value):t.__}function Zc(){for(var t;t=_s.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(dr),t.__H.__h.forEach(kn),t.__H.__h=[]}catch(e){t.__H.__h=[],oe.__e(e,t.__v)}}oe.__b=function(t){G=null,ds&&ds(t)},oe.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),hs&&hs(t,e)},oe.__r=function(t){cs&&cs(t),Pt=0;var e=(G=t.__c).__H;e&&(In===G?(e.__h=[],G.__h=[],e.__.forEach(function(o){o.__N&&(o.__=o.__N),o.u=o.__N=void 0})):(e.__h.forEach(dr),e.__h.forEach(kn),e.__h=[],Pt=0)),In=G},oe.diffed=function(t){ps&&ps(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(_s.push(e)!==1&&ls===oe.requestAnimationFrame||((ls=oe.requestAnimationFrame)||qc)(Zc)),e.__H.__.forEach(function(o){o.u&&(o.__H=o.u),o.u=void 0})),In=G=null},oe.__c=function(t,e){e.some(function(o){try{o.__h.forEach(dr),o.__h=o.__h.filter(function(r){return!r.__||kn(r)})}catch(r){e.some(function(n){n.__h&&(n.__h=[])}),e=[],oe.__e(r,o.__v)}}),us&&us(t,e)},oe.unmount=function(t){ms&&ms(t);var e,o=t.__c;o&&o.__H&&(o.__H.__.forEach(function(r){try{dr(r)}catch(n){e=n}}),o.__H=void 0,e&&oe.__e(e,o.__v))};var fs=typeof requestAnimationFrame=="function";function qc(t){var e,o=function(){clearTimeout(r),fs&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(o,35);fs&&(e=requestAnimationFrame(o))}function dr(t){var e=G,o=t.__c;typeof o=="function"&&(t.__c=void 0,o()),G=e}function kn(t){var e=G;t.__c=t.__(),G=e}function Nn(t,e){return!t||t.length!==e.length||e.some(function(o,r){return o!==t[r]})}function Cs(t,e){return typeof e=="function"?e(t):e}Y(`.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-white);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-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-blue-beta)}.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
3
|
`);var vs=ar(void 0),Xc={card:!1,storedcard:!1,googlepay:!1,applepay:!1},bs=({children:t,initialValue:e,isSolePaymentMethod:o,hasCard:r,hasGooglePay:n,hasApplePay:a,hasStoredPaymentMethods:s,onSubmitApiReady:d})=>{let[c,p]=w(e),u=ue(null),l=Co(W=>{u.current=W},[]),h=Co(W=>{u.current===W&&(u.current=null)},[]),m=Co(()=>{let W=u.current;return W?(W(),!0):!1},[]);ys(()=>{d?.({triggerSubmit:m})},[]);let[g,b]=w(null),[C,y]=w(!1),[_,k]=w(Xc),[E,H]=w({}),[M,K]=w(null),[ee,F]=w(null),O=(W,Je)=>{k(bt=>({...bt,[W]:Je}))},L=(W,Je)=>{H(bt=>({...bt,[W]:Je}))},pe=Co(W=>C&&c!==W,[C,c]),Ee=W=>{F(W)},Vt=W=>{K(W)};return i(vs.Provider,{value:{activePaymentMethod:c,setActivePaymentMethod:p,activeStoredPaymentMethodId:g,setActiveStoredPaymentMethodId:b,isPaymentMethodInitialized:_,updatePaymentMethodInitialization:O,isStoredCardInitialized:E,updateStoredCardInitialization:L,handleSuccess:Vt,success:M,handleError:Ee,error:ee,threeDSecureActive:C,setThreeDSecureActive:y,isObscuredByThreeDS:pe,isSolePaymentMethod:o,hasCard:r,hasGooglePay:n,hasApplePay:a,hasStoredPaymentMethods:s,registerSubmitHandler:l,unregisterSubmitHandler:h}},t)},ae=()=>{let t=cr(vs);if(t===void 0)throw new Error("usePaymentMethodGroup must be used within a PaymentMethodGroup");return t};var Es=ar(void 0),Ss=({children:t,i18nService:e,onLanguageChange:o})=>{let r=n=>{e.setLanguage(n),o?.(n)};return i(Es.Provider,{value:{i18n:e,changeLanguage:r}},t)},Se=()=>{let t=cr(Es);if(!t)throw new Error("useI18n must be used within an I18nProvider");return t};var Jc=()=>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"})),Ps=Jc;var Qc=({opacity:t=1})=>i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"26",viewBox:"0 0 40 26",opacity:t},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"})),Rs=Qc;var ep=({opacity:t=1})=>i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"26",fill:"none",viewBox:"0 0 40 26",opacity:t},i("path",{fill:"#fff",d:"M0 0h40v26H0z"}),i("path",{fill:"#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"})),Ts=ep;var tp=({opacity:t=1})=>i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"26",fill:"none",viewBox:"0 0 40 26",opacity:t},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"})),As=tp;var op=({opacity:t=1})=>i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 40 26",width:"40",height:"26",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"})),Ds=op;var rp=({opacity:t=1})=>i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"26",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"})))),ws=rp;var np=({opacity:t=1})=>i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 40 26",width:"40",height:"26",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"})),xs=np;var ap=({opacity:t=1})=>i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"26",fill:"none",viewBox:"0 0 40 26",opacity:t},i("path",{fill:"#fff",d:"M0 0h40v26H0z"}),i("g",{"clip-path":"url(#a)"},i("g",{"clip-path":"url(#b)"},i("path",{fill:"#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:"#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:"#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:"#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)"})))),Is=ap;var sp=({opacity:t=1})=>i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 40 26",width:"40",height:"26",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"})),ks=sp;Y(`.straumur__tooltip__content{position:absolute;z-index:50;padding:var(--straumur__space-s);border-radius:var(--straumur__border-radius-s);right:40%;top:100%;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}
|
|
4
4
|
`);var zt=({children:t,content:e})=>{let[o,r]=w(!1),n=ue(null);return i("div",{style:{position:"relative"}},i("div",{ref:n,onMouseEnter:()=>{r(!0)},onMouseLeave:()=>{r(!1)}},t),o&&n&&i("div",{className:"straumur__tooltip__content"},e))};function On(t){let e=()=>window.matchMedia(t).matches,[o,r]=w(e);return le(()=>{let n=window.matchMedia(t),a=s=>r(s.matches);return r(n.matches),n.addEventListener("change",a),()=>{n.removeEventListener("change",a)}},[t]),o}function ur({brands:t,brandHidden:e=[],limit:o=3}){let r=On("(max-width: 380px)"),a=On("(max-width: 335px)")?1:r?2:o,s=t.filter(d=>{let{brand:c}=d;return!e.some(u=>u.brand===c)});return i(ne,null,s.map(({brand:d},c)=>c>=Math.min(o,a)?c===Math.min(o,a)?i(zt,{content:i("span",{style:{display:"flex",gap:"4px",overflow:"visible"}},s.slice(Math.min(o,a)).map(({brand:p})=>i(pr,{key:p,brand:p})))},i("span",{key:d,className:"straumur__render-brand-icons__overflow"},"+",s.length-Math.min(o,a))):null:i(pr,{key:d,brand:d})))}var pr=({brand:t,defaultToBrandName:e=!0})=>{switch(t){case"visa":return i(Ts,null);case"mc":return i(Rs,null);case"maestro":return i(As,null);case"amex":return i(Ds,null);case"jcb":return i(ws,null);case"diners":return i(xs,null);case"discover":return i(Is,null);case"cup":return i(ks,null);default:return e?i("span",null,t):i(ne,null)}};var _r,j,Fs,Rt,Ns,Ls,Mn,Vn,Fn,Ln,Bs,vo={},Us=[],ip=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,yr=Array.isArray;function Qe(t,e){for(var o in e)t[o]=e[o];return t}function Vs(t){var e=t.parentNode;e&&e.removeChild(t)}function f(t,e,o){var r,n,a,s={};for(a in e)a=="key"?r=e[a]:a=="ref"?n=e[a]:s[a]=e[a];if(arguments.length>2&&(s.children=arguments.length>3?_r.call(arguments,2):o),typeof t=="function"&&t.defaultProps!=null)for(a in t.defaultProps)s[a]===void 0&&(s[a]=t.defaultProps[a]);return hr(t,s,r,n,null)}function hr(t,e,o,r,n){var a={type:t,props:e,key:o,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:n??++Fs,__i:-1,__u:0};return n==null&&j.vnode!=null&&j.vnode(a),a}function et(t){return t.children}function U(t,e){this.props=t,this.context=e}function Tt(t,e){if(e==null)return t.__?Tt(t.__,t.__i+1):null;for(var o;e<t.__k.length;e++)if((o=t.__k[e])!=null&&o.__e!=null)return o.__e;return typeof t.type=="function"?Tt(t):null}function Hs(t){var e,o;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((o=t.__k[e])!=null&&o.__e!=null){t.__e=t.__c.base=o.__e;break}return Hs(t)}}function Bn(t){(!t.__d&&(t.__d=!0)&&Rt.push(t)&&!fr.__r++||Ns!==j.debounceRendering)&&((Ns=j.debounceRendering)||Ls)(fr)}function fr(){var t,e,o,r,n,a,s,d;for(Rt.sort(Mn);t=Rt.shift();)t.__d&&(e=Rt.length,r=void 0,a=(n=(o=t).__v).__e,s=[],d=[],o.__P&&((r=Qe({},n)).__v=n.__v+1,j.vnode&&j.vnode(r),Yn(o.__P,r,n,o.__n,o.__P.namespaceURI,32&n.__u?[a]:null,s,a??Tt(n),!!(32&n.__u),d),r.__v=n.__v,r.__.__k[r.__i]=r,Ks(s,r,d),r.__e!=a&&Hs(r)),Rt.length>e&&Rt.sort(Mn));fr.__r=0}function Ys(t,e,o,r,n,a,s,d,c,p,u){var l,h,m,g,b,C=r&&r.__k||Us,y=e.length;for(o.__d=c,lp(o,e,C),c=o.__d,l=0;l<y;l++)(m=o.__k[l])!=null&&typeof m!="boolean"&&typeof m!="function"&&(h=m.__i===-1?vo:C[m.__i]||vo,m.__i=l,Yn(t,m,h,n,a,s,d,c,p,u),g=m.__e,m.ref&&h.ref!=m.ref&&(h.ref&&zn(h.ref,null,m),u.push(m.ref,m.__c||g,m)),b==null&&g!=null&&(b=g),65536&m.__u||h.__k===m.__k?(c&&typeof m.type=="string"&&!t.contains(c)&&(c=Tt(h)),c=zs(m,c,t)):typeof m.type=="function"&&m.__d!==void 0?c=m.__d:g&&(c=g.nextSibling),m.__d=void 0,m.__u&=-196609);o.__d=c,o.__e=b}function lp(t,e,o){var r,n,a,s,d,c=e.length,p=o.length,u=p,l=0;for(t.__k=[],r=0;r<c;r++)s=r+l,(n=t.__k[r]=(n=e[r])==null||typeof n=="boolean"||typeof n=="function"?null:typeof n=="string"||typeof n=="number"||typeof n=="bigint"||n.constructor==String?hr(null,n,null,null,null):yr(n)?hr(et,{children:n},null,null,null):n.constructor===void 0&&n.__b>0?hr(n.type,n.props,n.key,n.ref?n.ref:null,n.__v):n)!=null?(n.__=t,n.__b=t.__b+1,d=dp(n,o,s,u),n.__i=d,a=null,d!==-1&&(u--,(a=o[d])&&(a.__u|=131072)),a==null||a.__v===null?(d==-1&&l--,typeof n.type!="function"&&(n.__u|=65536)):d!==s&&(d==s-1?l=d-s:d==s+1?l++:d>s?u>c-s?l+=d-s:l--:d<s&&l++,d!==r+l&&(n.__u|=65536))):(a=o[s])&&a.key==null&&a.__e&&!(131072&a.__u)&&(a.__e==t.__d&&(t.__d=Tt(a)),Un(a,a,!1),o[s]=null,u--);if(u)for(r=0;r<p;r++)(a=o[r])!=null&&!(131072&a.__u)&&(a.__e==t.__d&&(t.__d=Tt(a)),Un(a,a))}function zs(t,e,o){var r,n;if(typeof t.type=="function"){for(r=t.__k,n=0;r&&n<r.length;n++)r[n]&&(r[n].__=t,e=zs(r[n],e,o));return e}t.__e!=e&&(o.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType===8);return e}function Hn(t,e){return e=e||[],t==null||typeof t=="boolean"||(yr(t)?t.some(function(o){Hn(o,e)}):e.push(t)),e}function dp(t,e,o,r){var n=t.key,a=t.type,s=o-1,d=o+1,c=e[o];if(c===null||c&&n==c.key&&a===c.type&&!(131072&c.__u))return o;if(r>(c==null||131072&c.__u?0:1))for(;s>=0||d<e.length;){if(s>=0){if((c=e[s])&&!(131072&c.__u)&&n==c.key&&a===c.type)return s;s--}if(d<e.length){if((c=e[d])&&!(131072&c.__u)&&n==c.key&&a===c.type)return d;d++}}return-1}function Os(t,e,o){e[0]==="-"?t.setProperty(e,o??""):t[e]=o==null?"":typeof o!="number"||ip.test(e)?o:o+"px"}function mr(t,e,o,r,n){var a;e:if(e==="style")if(typeof o=="string")t.style.cssText=o;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)o&&e in o||Os(t.style,e,"");if(o)for(e in o)r&&o[e]===r[e]||Os(t.style,e,o[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]=o,o?r?o.u=r.u:(o.u=Vn,t.addEventListener(e,a?Ln:Fn,a)):t.removeEventListener(e,a?Ln:Fn,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]=o??"";break e}catch{}typeof o=="function"||(o==null||o===!1&&e[4]!=="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&o==1?"":o))}}function Ms(t){return function(e){if(this.l){var o=this.l[e.type+t];if(e.t==null)e.t=Vn++;else if(e.t<o.u)return;return o(j.event?j.event(e):e)}}}function Yn(t,e,o,r,n,a,s,d,c,p){var u,l,h,m,g,b,C,y,_,k,E,H,M,K,ee,F,O=e.type;if(e.constructor!==void 0)return null;128&o.__u&&(c=!!(32&o.__u),a=[d=e.__e=o.__e]),(u=j.__b)&&u(e);e:if(typeof O=="function")try{if(y=e.props,_="prototype"in O&&O.prototype.render,k=(u=O.contextType)&&r[u.__c],E=u?k?k.props.value:u.__:r,o.__c?C=(l=e.__c=o.__c).__=l.__E:(_?e.__c=l=new O(y,E):(e.__c=l=new U(y,E),l.constructor=O,l.render=pp),k&&k.sub(l),l.props=y,l.state||(l.state={}),l.context=E,l.__n=r,h=l.__d=!0,l.__h=[],l._sb=[]),_&&l.__s==null&&(l.__s=l.state),_&&O.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=Qe({},l.__s)),Qe(l.__s,O.getDerivedStateFromProps(y,l.__s))),m=l.props,g=l.state,l.__v=e,h)_&&O.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),_&&l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(_&&O.getDerivedStateFromProps==null&&y!==m&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(y,E),!l.__e&&(l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(y,l.__s,E)===!1||e.__v===o.__v)){for(e.__v!==o.__v&&(l.props=y,l.state=l.__s,l.__d=!1),e.__e=o.__e,e.__k=o.__k,e.__k.forEach(function(L){L&&(L.__=e)}),H=0;H<l._sb.length;H++)l.__h.push(l._sb[H]);l._sb=[],l.__h.length&&s.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(y,l.__s,E),_&&l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(m,g,b)})}if(l.context=E,l.props=y,l.__P=t,l.__e=!1,M=j.__r,K=0,_){for(l.state=l.__s,l.__d=!1,M&&M(e),u=l.render(l.props,l.state,l.context),ee=0;ee<l._sb.length;ee++)l.__h.push(l._sb[ee]);l._sb=[]}else do l.__d=!1,M&&M(e),u=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++K<25);l.state=l.__s,l.getChildContext!=null&&(r=Qe(Qe({},r),l.getChildContext())),_&&!h&&l.getSnapshotBeforeUpdate!=null&&(b=l.getSnapshotBeforeUpdate(m,g)),Ys(t,yr(F=u!=null&&u.type===et&&u.key==null?u.props.children:u)?F:[F],e,o,r,n,a,s,d,c,p),l.base=e.__e,e.__u&=-161,l.__h.length&&s.push(l),C&&(l.__E=l.__=null)}catch(L){e.__v=null,c||a!=null?(e.__e=d,e.__u|=c?160:32,a[a.indexOf(d)]=null):(e.__e=o.__e,e.__k=o.__k),j.__e(L,e,o)}else a==null&&e.__v===o.__v?(e.__k=o.__k,e.__e=o.__e):e.__e=cp(o.__e,e,o,r,n,a,s,c,p);(u=j.diffed)&&u(e)}function Ks(t,e,o){e.__d=void 0;for(var r=0;r<o.length;r++)zn(o[r],o[++r],o[++r]);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 cp(t,e,o,r,n,a,s,d,c){var p,u,l,h,m,g,b,C=o.props,y=e.props,_=e.type;if(_==="svg"?n="http://www.w3.org/2000/svg":_==="math"?n="http://www.w3.org/1998/Math/MathML":n||(n="http://www.w3.org/1999/xhtml"),a!=null){for(p=0;p<a.length;p++)if((m=a[p])&&"setAttribute"in m==!!_&&(_?m.localName===_:m.nodeType===3)){t=m,a[p]=null;break}}if(t==null){if(_===null)return document.createTextNode(y);t=document.createElementNS(n,_,y.is&&y),a=null,d=!1}if(_===null)C===y||d&&t.data===y||(t.data=y);else{if(a=a&&_r.call(t.childNodes),C=o.props||vo,!d&&a!=null)for(C={},p=0;p<t.attributes.length;p++)C[(m=t.attributes[p]).name]=m.value;for(p in C)if(m=C[p],p!="children"){if(p=="dangerouslySetInnerHTML")l=m;else if(p!=="key"&&!(p in y)){if(p=="value"&&"defaultValue"in y||p=="checked"&&"defaultChecked"in y)continue;mr(t,p,null,m,n)}}for(p in y)m=y[p],p=="children"?h=m:p=="dangerouslySetInnerHTML"?u=m:p=="value"?g=m:p=="checked"?b=m:p==="key"||d&&typeof m!="function"||C[p]===m||mr(t,p,m,C[p],n);if(u)d||l&&(u.__html===l.__html||u.__html===t.innerHTML)||(t.innerHTML=u.__html),e.__k=[];else if(l&&(t.innerHTML=""),Ys(t,yr(h)?h:[h],e,o,r,_==="foreignObject"?"http://www.w3.org/1999/xhtml":n,a,s,a?a[0]:o.__k&&Tt(o,0),d,c),a!=null)for(p=a.length;p--;)a[p]!=null&&Vs(a[p]);d||(p="value",g!==void 0&&(g!==t[p]||_==="progress"&&!g||_==="option"&&g!==C[p])&&mr(t,p,g,C[p],n),p="checked",b!==void 0&&b!==t[p]&&mr(t,p,b,C[p],n))}return t}function zn(t,e,o){try{typeof t=="function"?t(e):t.current=e}catch(r){j.__e(r,o)}}function Un(t,e,o){var r,n;if(j.unmount&&j.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||zn(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(a){j.__e(a,e)}r.base=r.__P=null}if(r=t.__k)for(n=0;n<r.length;n++)r[n]&&Un(r[n],e,o||typeof t.type!="function");o||t.__e==null||Vs(t.__e),t.__c=t.__=t.__e=t.__d=void 0}function pp(t,e,o){return this.constructor(t,o)}function Kn(t,e,o){var r,n,a;j.__&&j.__(t,e),r=e.__k,n=[],a=[],Yn(e,t=e.__k=f(et,null,[t]),r||vo,vo,e.namespaceURI,r?null:e.firstChild?_r.call(e.childNodes):null,n,r?r.__e:e.firstChild,!1,a),Ks(n,t,a)}function Gs(t,e){var o={__c:e="__cC"+Bs++,__:t,Consumer:function(r,n){return r.children(n)},Provider:function(r){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(d){d.__e=!0,Bn(d)})},this.sub=function(s){n.push(s);var d=s.componentWillUnmount;s.componentWillUnmount=function(){n&&n.splice(n.indexOf(s),1),d&&d.call(s)}}),r.children}};return o.Provider.__=o.Consumer.contextType=o}_r=Us.slice,j={__e:function(t,e,o,r){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,r||{}),s=n.__d),s)return n.__E=n}catch(d){t=d}throw t}},Fs=0,U.prototype.setState=function(t,e){var o;o=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Qe({},this.state),typeof t=="function"&&(t=t(Qe({},o),this.props)),t&&Qe(o,t),t!=null&&this.__v&&(e&&this._sb.push(e),Bn(this))},U.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Bn(this))},U.prototype.render=et,Rt=[],Ls=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Mn=function(t,e){return t.__v.__b-e.__v.__b},fr.__r=0,Vn=0,Fn=Ms(!1),Ln=Ms(!0),Bs=0;var Kt,Z,Gn,js,bo=0,ei=[],se=j,$s=se.__b,Ws=se.__r,Zs=se.diffed,qs=se.__c,Xs=se.unmount,Js=se.__;function Cr(t,e){se.__h&&se.__h(Z,t,bo||e),bo=0;var o=Z.__H||(Z.__H={__:[],__h:[]});return t>=o.__.length&&o.__.push({}),o.__[t]}function ye(t){return bo=1,up(ni,t)}function up(t,e,o){var r=Cr(Kt++,2);if(r.t=t,!r.__c&&(r.__=[o?o(e):ni(void 0,e),function(d){var c=r.__N?r.__N[0]:r.__[0],p=r.t(c,d);c!==p&&(r.__N=[p,r.__[1]],r.__c.setState({}))}],r.__c=Z,!Z.u)){var n=function(d,c,p){if(!r.__c.__H)return!0;var u=r.__c.__H.__.filter(function(h){return!!h.__c});if(u.every(function(h){return!h.__N}))return!a||a.call(this,d,c,p);var l=!1;return u.forEach(function(h){if(h.__N){var m=h.__[0];h.__=h.__N,h.__N=void 0,m!==h.__[0]&&(l=!0)}}),!(!l&&r.__c.props===d)&&(!a||a.call(this,d,c,p))};Z.u=!0;var a=Z.shouldComponentUpdate,s=Z.componentWillUpdate;Z.componentWillUpdate=function(d,c,p){if(this.__e){var u=a;a=void 0,n(d,c,p),a=u}s&&s.call(this,d,c,p)},Z.shouldComponentUpdate=n}return r.__N||r.__}function Ke(t,e){var o=Cr(Kt++,3);!se.__s&&ri(o.__H,e)&&(o.__=t,o.i=e,Z.__H.__h.push(o))}function tt(t){return bo=5,vr(function(){return{current:t}},[])}function vr(t,e){var o=Cr(Kt++,7);return ri(o.__H,e)&&(o.__=t(),o.__H=e,o.__h=t),o.__}function ti(t,e){return bo=8,vr(function(){return t},e)}function oi(t){var e=Z.context[t.__c],o=Cr(Kt++,9);return o.c=t,e?(o.__==null&&(o.__=!0,e.sub(Z)),e.props.value):t.__}function mp(){for(var t;t=ei.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(gr),t.__H.__h.forEach(jn),t.__H.__h=[]}catch(e){t.__H.__h=[],se.__e(e,t.__v)}}se.__b=function(t){Z=null,$s&&$s(t)},se.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Js&&Js(t,e)},se.__r=function(t){Ws&&Ws(t),Kt=0;var e=(Z=t.__c).__H;e&&(Gn===Z?(e.__h=[],Z.__h=[],e.__.forEach(function(o){o.__N&&(o.__=o.__N),o.i=o.__N=void 0})):(e.__h.forEach(gr),e.__h.forEach(jn),e.__h=[],Kt=0)),Gn=Z},se.diffed=function(t){Zs&&Zs(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(ei.push(e)!==1&&js===se.requestAnimationFrame||((js=se.requestAnimationFrame)||hp)(mp)),e.__H.__.forEach(function(o){o.i&&(o.__H=o.i),o.i=void 0})),Gn=Z=null},se.__c=function(t,e){e.some(function(o){try{o.__h.forEach(gr),o.__h=o.__h.filter(function(r){return!r.__||jn(r)})}catch(r){e.some(function(n){n.__h&&(n.__h=[])}),e=[],se.__e(r,o.__v)}}),qs&&qs(t,e)},se.unmount=function(t){Xs&&Xs(t);var e,o=t.__c;o&&o.__H&&(o.__H.__.forEach(function(r){try{gr(r)}catch(n){e=n}}),o.__H=void 0,e&&se.__e(e,o.__v))};var Qs=typeof requestAnimationFrame=="function";function hp(t){var e,o=function(){clearTimeout(r),Qs&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(o,100);Qs&&(e=requestAnimationFrame(o))}function gr(t){var e=Z,o=t.__c;typeof o=="function"&&(t.__c=void 0,o()),Z=e}function jn(t){var e=Z;t.__c=t.__(),Z=e}function ri(t,e){return!t||t.length!==e.length||e.some(function(o,r){return o!==t[r]})}function ni(t,e){return typeof e=="function"?e(t):e}var ai="encrypted",A="encryptedCardNumber",D="encryptedExpiryDate",I="encryptedExpiryMonth",R="encryptedExpiryYear",T="encryptedSecurityCode",fe="encryptedPassword",Eo="encryptedSecurityCode3digits",So="encryptedSecurityCode4digits",Po="giftcard",si="6.0.0",At=["amex","mc","visa"],ii=[Po],fp=[A,D,I,R,T,fe],br=fp,li=["bcmc"],di="required",Er="optional",Sr="hidden",Fe=di,Ro=Er,To=Sr,De=di,Ao=Er,Dt=Sr,ci="data-cse",pi="data-info",ui="data-uid",mi=["accel","pulse","star","nyce"];var wt={[A]:"cardNumber",[D]:"expiryDate",[T]:"securityCode",[I]:"expiryMonth",[R]:"expiryYear",[fe]:"password",[Eo]:"securityCodeThreeDigits",[So]:"securityCodeFourDigits"},hi=6e3;var we=(t,e)=>e.split(".").reduce((o,r)=>o&&o[r]?o[r]:void 0,t);var Ge="field.error.required";var Pr="invalid.format.expects",fi="creditCard.holderName.invalid",_i="creditCard.taxNumber.invalid",yi="boleto.socialSecurityNumber.invalid",xt=(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})({}),Gt=(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})({}),gi={[A]:"cc.num.900",[D]:"cc.dat.910",[I]:"cc.mth.915",[R]:"cc.yr.917",[T]:"cc.cvc.920",[fe]:"kcp.pwd.940"};var Ci=t=>t?Array.prototype.slice.call(t.querySelectorAll('[data-cse*="encrypted"]')).map(e=>e.getAttribute("data-cse")):[],vi=(t,e)=>(e===D?(t[I]=!1,t[R]=!1):t[e]=!1,t),bi=(t,e)=>(o,r)=>{let n=e.valid[r]!==!0?((a,s)=>s!==1||a!==I&&a!==R?a:D)(r,t):null;return n=((a,s,d)=>{let{isFieldOfType:c,fieldIsValid:p}=d.reduce((m,g)=>(m.isFieldOfType||(m.isFieldOfType=a===g,m.fieldIsValid=!s.errors[g]),m),{isFieldOfType:!1,fieldIsValid:!1}),u=a===T?"cvcPolicy":"expiryDatePolicy",l=u==="cvcPolicy"?Ro:Ao,h=u==="cvcPolicy"?To:Dt;return(s[u]===l||s[u]===h)&&p&&c?null:a})(n,e,[T,D,I,R]),n&&!o.includes(n)&&o.push(n),o},Ei=(t,e,o)=>({rootNode:e,fieldType:t,error:we(o,`errors.${t}`)||gi[t],type:"card"});function x(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var Rr=class{constructor(e){x(this,"callbacks",void 0),x(this,"config",void 0),x(this,"props",void 0),x(this,"state",void 0),x(this,"validateForm",void 0),x(this,"handleBrandFromBinLookup",void 0),x(this,"callbacksHandler",void 0),x(this,"configHandler",void 0),x(this,"createCardSecuredFields",void 0),x(this,"createNonCardSecuredFields",void 0),x(this,"createSecuredFields",void 0),x(this,"destroySecuredFields",void 0),x(this,"handleIOSTouchEvents",void 0),x(this,"destroyTouchendListener",void 0),x(this,"destroyTouchstartListener",void 0),x(this,"handleBinValue",void 0),x(this,"handleEncryption",void 0),x(this,"handleFocus",void 0),x(this,"handleIframeConfigFeedback",void 0),x(this,"handleValidation",void 0),x(this,"handleSFShiftTab",void 0),x(this,"handleShiftTab",void 0),x(this,"isConfigured",void 0),x(this,"postMessageToAllIframes",void 0),x(this,"processAutoComplete",void 0),x(this,"processBrand",void 0),x(this,"sendBrandToCardSF",void 0),x(this,"sendExpiryDatePolicyToSF",void 0),x(this,"setFocusOnFrame",void 0),x(this,"setupSecuredField",void 0),x(this,"touchendListener",void 0),x(this,"touchstartListener",void 0),x(this,"hasGenuineTouchEvents",void 0),x(this,"encryptedAttrName",void 0),x(this,"hasRedundantCVCField",void 0),x(this,"isSingleBrandedCard",void 0),x(this,"securityCode",void 0),this.props=e,this.state={},this.config={},this.callbacks={}}};var Si=Object.prototype.toString;function Do(t){return typeof t=="object"&&t!==null&&Object.prototype.toString.call(t)==="[object Array]"}function ge(t){return t!=null}function wo(t){return t!==!1&&ge(t)}function $n(t){return!!t&&typeof t=="object"}function Pi(t){return!wo(t)||!(!(typeof(e=t)=="number"||$n(e)&&Si.call(e)==="[object Number]")||t!==0&&!Number.isNaN(t))||!(!Do(t)&&!(function(o){return typeof o=="string"||$n(o)&&Si.call(o)==="[object String]"})(t)||t.length!==0)||!(!$n(t)||Object.keys(t).length!==0);var e}function It(...t){let e=Do(t[0])?t[0]:t;return{from:o=>e.map(r=>r in o?{[r]:o[r]}:{}).reduce((r,n)=>({...r,...n}),{})}}function Ri(...t){let e=Do(t[0])?t[0]:t;return{from:o=>It(...Object.keys(o).filter(r=>!e.includes(r))).from(o)}}var Ti=t=>Do(t)&&t.length?t:At;var xo=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 Tr=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 Ai(t){this.config.cardGroupTypes=Ti(t.cardGroupTypes);let e=t.loadingContext;if(!e)return void Pe("WARNING Config :: no loadingContext has been specified!");var o;this.config.loadingContext=(o=e).charAt(o.length-1)==="/"?e:`${e}/`,this.config.isCreditCardType=ii.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 r=this.config.isCreditCardType?"card":t.type,n=btoa(window.location.origin),a=`${r}${!this.config.loadingContext.includes("live")&&t.forceCompat?"Compat":""}`;this.config.iframeSrc=`${this.config.loadingContext}securedfields/${t.clientKey}/${si}/securedFields.html?type=${a}&d=${n}`}var be=()=>{};function Di(t={}){this.callbacks.onLoad=t.onLoad?t.onLoad:be,this.callbacks.onConfigSuccess=t.onConfigSuccess?t.onConfigSuccess:be,this.callbacks.onFieldValid=t.onFieldValid?t.onFieldValid:be,this.callbacks.onAllValid=t.onAllValid?t.onAllValid:be,this.callbacks.onBrand=t.onBrand?t.onBrand:be,this.callbacks.onError=t.onError?t.onError:be,this.callbacks.onFocus=t.onFocus?t.onFocus:be,this.callbacks.onBinValue=t.onBinValue?t.onBinValue:be,this.callbacks.onAutoComplete=t.onAutoComplete?t.onAutoComplete:be,this.callbacks.onAdditionalSFConfig=t.onAdditionalSFConfig?t.onAdditionalSFConfig:be,this.callbacks.onAdditionalSFRemoved=t.onAdditionalSFRemoved?t.onAdditionalSFRemoved:be,this.callbacks.onTouchstartIOS=t.onTouchstartIOS?t.onTouchstartIOS:be,this.callbacks.onKeyPressed=t.onKeyPressed?t.onKeyPressed:be}var wi=({fieldType:t,encryptedFieldName:e,uuid:o,isValid:r,txVariant:n,rootNode:a})=>({fieldType:t,encryptedFieldName:e,uid:o,valid:r,type:n,rootNode:a}),xi=({fieldType:t,txVariant:e,rootNode:o})=>{let r=t===D,n=[],a=["encryptedExpiryMonth","encryptedExpiryYear"],s,d,c,p,u=r?2:1;for(s=0;s<u;s+=1){c=r?a[s]:t,d=`${e}-encrypted-${c}`,p=r?c:t;let l=wi({fieldType:t,encryptedFieldName:p,uuid:d,isValid:!1,txVariant:e,rootNode:o});n.push(l)}return n},Ii=({fieldType:t,txVariant:e,rootNode:o,encryptedObjArr:r})=>{let n,a,s,d,c,p=[];for(n=0;n<r.length;n+=1){s=r[n],d=s.encryptedFieldName,a=`${e}-encrypted-${d}`,c=s.blob;let u=wi({fieldType:t,encryptedFieldName:d,uuid:a,isValid:!0,txVariant:e,rootNode:o});u.blob=c,p.push(u)}return p};function S(t={},e){return Object.prototype.hasOwnProperty.call(t,e)}var Ar=(t,e,o,r,n)=>{if(!S(t,"error"))return null;let a=e,s={rootNode:r,fieldType:t.fieldType,error:null,type:null},d=t.error!=="";return d||a.hasError?(s.error=d?t.error:"",s.type=o,a.hasError=d,a.errorType=s.error,n(s),s):null};function ki(t){let e,o=t.fieldType;if(this.state.type==="card"&&S(t,"cvcPolicy")&&ge(t.cvcPolicy)&&S(this.state.securedFields,T)&&(this.state.securedFields[T].cvcPolicy=t.cvcPolicy),Ar(t,this.state.securedFields[o],this.state.type,this.props.rootNode,this.callbacks.onError),this.state.securedFields[o].isEncrypted){e=xi({fieldType:o,txVariant:this.state.type,rootNode:this.props.rootNode}),o===A&&(e[0].endDigits="");for(let r=0,n=e.length;r<n;r+=1)this.callbacks.onFieldValid(e[r]);this.state.securedFields[o].isEncrypted=!1}this.validateForm(),S(t,"brand")&&this.processBrand(t)}var ie=(t,e,o)=>{if(e){let r=JSON.stringify(t);e.postMessage(r,o)}};function de(t,e){return t.securedFields[e]?.iframeContentWindow||null}function Ni(t){let e=t.fieldType,o,r;this.config.autoFocus&&(t.type!=="year"&&e!==R||this.setFocusOnFrame(T),e===I&&this.setFocusOnFrame(R));let n=t[e];this.state.securedFields[e].isEncrypted=!0,Ar({error:"",fieldType:e},this.state.securedFields[e],this.state.type,this.props.rootNode,this.callbacks.onError);let a=Ii({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};ie(s,de(this.state,R),this.config.loadingContext)}for(e===A&&wo(t.endDigits)&&(a[0].endDigits=t.endDigits),e===A&&wo(t.issuerBin)&&(a[0].issuerBin=+t.issuerBin),e===D&&wo(t.expiryDate)&&(a[1].expiryDate=t.expiryDate),o=0,r=a.length;o<r;o+=1)this.callbacks.onFieldValid(a[o]);this.validateForm()}var Dr=(t,e)=>{let o=[];return t&&typeof t.querySelectorAll=="function"&&(o=[].slice.call(t.querySelectorAll(e))),o},xe=(t,e)=>{if(t)return t.querySelector(e)},Io=(t,e)=>{if(t)return t.getAttribute(e)},Oi=t=>{for(;t.firstChild;)t.removeChild(t.firstChild)};var Wn,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 o,r,n;if(e){if(o=P.cards.filter(a=>e.includes(a.cardType)).filter(a=>S(a,"pattern")&&t.match(a.pattern)),o.length){if(o.length===1)return o[0];for(r=0,n=o.length;r<n;r+=1)if(!o[r].longestRule){let a=o[r].startingRules.reduce((s,d)=>s>d?s:d);o[r].longestRule=String(a).length}return o.reduce((a,s)=>a.longestRule>=s.longestRule?a:s)}return{cardType:P.__NO_BRAND}}return{cardType:P.__NO_BRAND}},detectCardLength:(t,e)=>{let o,r,n=0,a=!1,s=e,d=t.cardType!==P.__NO_BRAND?t.permittedLengths[t.permittedLengths.length-1]:0;if(d&&s>d&&(n=s.length-d,n>0&&(s=s.substring(0,s.length-n),r=s)),t.permittedLengths.forEach(c=>{s.length===c&&(a=!0)}),s.length===d){let c=Math.floor(s.length/4);o=d+(s.length%4>0?c:c-1),t.cardType.toLowerCase()==="amex"&&(o=d+2)}return{shortenedNewValue:r,maxLength:o,reachedValidLength:a}},getShortestPermittedCardLength:()=>{if(!Wn){let t=[];P.cards.forEach(e=>{t=t.concat(e.permittedLengths??[])}),Wn=Math.min.apply(null,t)}return Wn},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 Mi({src:t,title:e="iframe element",policy:o="origin"}){let r=document.createElement("iframe");r.setAttribute("src",t),r.classList.add("js-iframe"),e===""||e.trim().length===0||e==="none"?r.setAttribute("role","presentation"):r.setAttribute("title",e),r.setAttribute("allowtransparency","true"),r.setAttribute("referrerpolicy",o);let n=document.createTextNode("<p>Your browser does not support iframes.</p>");return r.appendChild(n),r}var je=(t,e,o,r=!1)=>!(!t||typeof t.addEventListener!="function")&&(t.addEventListener(e,o,r),!0),ot=(t,e,o,r=!1)=>!(!t||typeof t.removeEventListener!="function")&&(t.removeEventListener(e,o,r),!0);var Fi=(t,e,o)=>{let r=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)),r===a||(o&&Pe(`WARNING postMessageValidation: postMessage listener for iframe::origin mismatch!
|
|
@@ -7,12 +7,12 @@ About to set up securedField:`,a),await this.setupSecuredField(a,e,o).catch(s=>{
|
|
|
7
7
|
iframe load count=${this.state.iframeCount}. Expected count:${this.state.numIframes}`);if(d.loadToConfigTimeout=setTimeout(()=>{n({type:s.fieldType,failReason:"sf took too long to config"})},hi),this.state.iframeCount===this.state.originalNumIframes){let c={iframesLoaded:!0};this.callbacks.onLoad(c)}}).onConfig(c=>{this.handleIframeConfigFeedback(c),clearTimeout(d.loadToConfigTimeout),d.loadToConfigTimeout=null,r(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:p,...u}=c;this.callbacks.onKeyPressed(u)});this.state.securedFields[a]=d})}var bp=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 r=t.indexOf("rv:");return parseInt(t.substring(r+3,t.indexOf(".",r)),10)}let o=t.indexOf("Edge/");return o>0&&parseInt(t.substring(o+5,t.indexOf(".",o)),10)})(),Ie={__IS_IE:bp,__IS_IOS:typeof navigator<"u"&&/iphone|ipod|ipad/i.test(navigator.userAgent),__IS_FIREFOX:typeof navigator<"u"&&/(firefox)/i.test(navigator.userAgent)};var $t={touchendListener:function(t){let e=t.target;if(e instanceof HTMLInputElement||HTMLTextAreaElement&&e instanceof HTMLTextAreaElement){let r=e.value,n="selectionStart"in(o=e)?o.selectionStart:0,a=!1;n===r.length&&(n-=1,a=!0),e.value=r;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 r=this.props.rootNode,n=document.createElement("input");n.style.width="1px",n.style.height="1px",n.style.opacity="0",n.style.fontSize="18px",r.appendChild(n),n.focus(),r.removeChild(n)}var o;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 o=e.getAttribute("name")??e.getAttribute("data-id");this.callbacks.onTouchstartIOS?.({fieldType:"webInternalElement",name:o})}},handleTouchend:function(){let t=xe(document,"body");t.style.cursor="pointer",je(t,"touchend",this.touchendListener),this.state.registerFieldForIos=!0},destroyTouchendListener:function(){if(!Ie.__IS_IOS)return!1;let t=xe(document,"body");return t.style.cursor="auto",ot(t,"touchend",this.touchendListener),!0},destroyTouchstartListener:function(){return!!Ie.__IS_IOS&&(ot(document,"touchstart",this.touchstartListener),!0)}};var rt=(t,e,o)=>((r,n=!0)=>{let a=Array.prototype.slice.call(Dr(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 p=c.getAttribute("tabindex"),u=!p||parseInt(p,10)>=0,l=c.getBoundingClientRect(),h=l.width>0&&l.height>0;u&&h&&s.push(c)});let d=((c,p)=>{for(let u=0;u<c.length;u+=1)if(p(c[u]))return u;return-1})(s,c=>c===r||r.contains(c));return s[d+(n?-1:1)]})(xe(e,`[data-cse=${t}]`),o),Zi=t=>{t&&(t.focus(),t.blur(),t.focus())};function qi(t,e,o,r){let n,a;switch(t){case A:n=rt(A,e);break;case D:case I:a=A;break;case R:a=I;break;case T:r===1?n=rt(T,e):a=o?R:D}return{fieldToFocus:a,additionalField:n}}function Xi(t,e){let o,r;switch(t){case A:o=rt(A,e);break;case T:r=A}return{fieldToFocus:r,additionalField:o}}function Ji(t,e,o){let r,n;switch(t){case A:r=rt(A,e);break;case D:case I:n=A;break;case R:n=I;break;case T:n=o?R:D;break;case fe:r=rt(t,e)}return{fieldToFocus:n,additionalField:r}}var Qn={handleShiftTab:function(t){let e;this.state.type==="giftcard"?e=Xi(t,this.props.rootNode):e=this.state.isKCP?Ji(t,this.props.rootNode,this.state.hasSeparateDateFields):qi(t,this.props.rootNode,this.state.hasSeparateDateFields,this.state.numIframes);let o=e.fieldToFocus,r=e.additionalField;o?this.setFocusOnFrame(o,!1):r&&Zi(r)},handleSFShiftTab:function(t){(Ie.__IS_FIREFOX||Ie.__IS_IE&&Ie.__IS_IE<=11)&&this.handleShiftTab(t)}};function Qi(t){if(S(this.state.securedFields,A)){let e={txVariant:this.state.type,...t,fieldType:A,numKey:this.state.securedFields[A].numKey};ie(e,de(this.state,A),this.config.loadingContext)}}function el(t){(S(this.state.securedFields,I)&&S(this.state.securedFields,R)?[I,R]:[D]).forEach(e=>{let o={txVariant:this.state.type,...t,fieldType:e,numKey:this.state.securedFields[e].numKey};ie(o,de(this.state,e),this.config.loadingContext)})}function tl(t,e){let o=this.state.type==="card";if(!t||!Object.keys(t).length)return o?(this.sendBrandToCardSF({brand:"reset"}),this.sendExpiryDatePolicyToSF({expiryDatePolicy:De})):e&&this.processBrand({...e,fieldType:A}),void(this.state.type==="card"&&S(this.state.securedFields,D)&&(this.state.securedFields[D].expiryDatePolicy=De));let r=t.supportedBrands[0],n=r.brand,a=r.expiryDatePolicy??(r.showExpiryDate===!0?De:Dt),s={brand:n,cvcPolicy:r.cvcPolicy,expiryDatePolicy:a,cvcText:"Security code",showSocialSecurityNumber:r.showSocialSecurityNumber??!1,fieldType:A};if(this.processBrand(s),o){let d={brand:n,enableLuhnCheck:t.supportedBrands[0].enableLuhnCheck!==!1,...r?.panLength&&!t.isDualBrandSelection&&{panLength:r?.panLength}};this.sendBrandToCardSF(d),this.sendExpiryDatePolicyToSF({expiryDatePolicy:a})}S(this.state.securedFields,T)&&(this.state.securedFields[T].cvcPolicy=r.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 ol({csfState:t,csfConfig:e},o,r){if(!S(t.securedFields,o))return;let n={txVariant:t.type,fieldType:o,focus:!0,numKey:t.securedFields[o].numKey};ie(n,de(t,o),e.loadingContext)}function rl({csfState:t,csfConfig:e},o){let r=Object.keys(o||{});return r.length?(Object.keys(t.securedFields).forEach(n=>{let a={txVariant:t.type,fieldType:n,numKey:t.securedFields[n].numKey};r.forEach(s=>{a[s]=o[s]}),ie(a,de(t,n),e.loadingContext)}),!0):!1}function nl({csfState:t,csfConfig:e,csfProps:o,csfCallbacks:r},n){if(n.fieldType===A){let d={brand:n.brand,cvcPolicy:n.cvcPolicy,expiryDatePolicy:n.expiryDatePolicy,showSocialSecurityNumber:n.showSocialSecurityNumber},c=(a=d,s=t.brand,!Zn(a,s));if(!c)return null;let p=t.type==="card"||t.type==="bcmc";if(p&&c&&(t.brand=d,S(t.securedFields,T))){let l={txVariant:t.type,brand:d.brand,fieldType:T,cvcPolicy:n.cvcPolicy,numKey:t.securedFields[T].numKey};ie(l,de(t,T),e.loadingContext)}let u=p?It(["brand","cvcPolicy","cvcText","expiryDatePolicy","showSocialSecurityNumber"]).from(n):null;if(u&&u.brand){let l=u;l.type=t.type,l.rootNode=o.rootNode,r.onBrand(l)}return!0}var a,s;return!1}function al({csfState:t,csfConfig:e,csfCallbacks:o},r){if(r.name==="cc-name"){let n={...r};delete n.numKey;let a=n;return o.onAutoComplete(a),!0}if(r.name==="cc-exp"){let n=r.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 d=s.slice(-2),c=`${a}/${d}`;if(S(t.securedFields,D)){let p={txVariant:t.type,fieldType:D,autoComplete:c,numKey:t.securedFields[D].numKey};return ie(p,de(t,D),e.loadingContext),!0}if(S(t.securedFields,I)){let p={txVariant:t.type,fieldType:I,autoComplete:a,numKey:t.securedFields[I].numKey};ie(p,de(t,I),e.loadingContext)}return S(t.securedFields,R)&&setTimeout(()=>{let p={txVariant:t.type,fieldType:R,autoComplete:d,numKey:t.securedFields[R].numKey};ie(p,de(t,R),e.loadingContext)},0),!0}return!1}function sl({csfState:t,csfProps:e,csfCallbacks:o},r,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&&r()):t.currentFocusObject===s&&(t.currentFocusObject=null);let d=a;d.currentFocusObject=t.currentFocusObject,o.onFocus(d)}function il({csfState:t,csfCallbacks:e},o,r){if(t.iframeConfigCount+=1,window._b$dl&&console.log("### handleIframeConfigFeedback::csfState.iframeConfigCount:: ",t.iframeConfigCount,"who=",r.fieldType),t.isConfigured){let n={additionalIframeConfigured:!0,fieldType:r.fieldType,type:t.type};e.onAdditionalSFConfig(n)}else if(t.iframeConfigCount===t.originalNumIframes)return o(),!0;return!1}function ll({csfState:t,csfConfig:e,csfProps:o,csfCallbacks:r},n){t.isConfigured=!0;let a={iframesConfigured:!0,type:t.type,rootNode:o.rootNode};if(r.onConfigSuccess(a),t.numIframes===1&&e.isCreditCardType){if(t.type==="card")return xo("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 dl({csfState:t,csfProps:e,csfCallbacks:o}){let r=(s=>{let d=Object.keys(s);for(let c=0,p=d.length;c<p;c+=1)if(!s[d[c]].isValid)return!1;return!0})(t.securedFields),n=r!==t.allValid;if(t.allValid=r,!r&&!n)return;let a={allValid:r,type:t.type,rootNode:e.rootNode};o.onAllValid(a)}function cl({csfState:t,csfCallbacks:e},o){let{binValue:r,encryptedBin:n,uuid:a}=o,s={binValue:r,type:t.type};n&&(s.encryptedBin=n,s.uuid=a),e.onBinValue(s)}function pl(){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 Oo=(t="You cannot use secured fields")=>{Pe(`${t} - they are not yet configured. Use the 'onConfigSuccess' callback to know when this has happened.`)},Ir=class extends Rr{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,je(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):Oo("You cannot set focus on any secured field")},isValidated:(e,o)=>{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 r={txVariant:this.state.type,fieldType:e,externalValidation:!0,code:o,numKey:this.state.securedFields[e].numKey};ie(r,de(this.state,e),this.config.loadingContext)}}else Oo("You cannot set validated on any secured field")},hasUnsupportedCard:(e,o)=>{if(this.state.isConfigured){if(S(this.state.securedFields,e)){this.state.securedFields[e].hasError=!!o,this.state.securedFields[e].errorType=o;let r={txVariant:this.state.type,fieldType:e,unsupportedCard:!!o,code:o,numKey:this.state.securedFields[e].numKey};ie(r,de(this.state,e),this.config.loadingContext)}}else Oo("You cannot set hasUnsupportedCard on any secured field")},destroy:()=>{this.state.isConfigured?this.destroySecuredFields():Oo("You cannot destroy secured fields")},brandsFromBinLookup:(e,o)=>{if(!this.config.isCreditCardType)return null;this.state.isConfigured?this.handleBrandFromBinLookup(e,o):Oo("You cannot set pass brands to secured fields")},addSecuredField:e=>{let o=xe(this.props.rootNode,`[data-cse="${e}"]`);o&&(this.state.numIframes+=1,this.setupSecuredField(o))},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 o={additionalIframeRemoved:!0,fieldType:e,type:this.state.type};this.callbacks.onAdditionalSFRemoved(o)}},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 o={csfState:this.state,csfConfig:this.config,csfProps:this.props,csfCallbacks:this.callbacks};this.configHandler=Ai,this.callbacksHandler=Di,this.validateForm=Le(dl,o),this.isConfigured=Le(ll,o,this.validateForm),this.handleIframeConfigFeedback=Le(il,o,this.isConfigured),this.processBrand=Le(nl,o),this.handleValidation=ki,this.handleEncryption=Ni,this.createSecuredFields=Gi,this.createNonCardSecuredFields=ji,this.createCardSecuredFields=$i,this.setupSecuredField=Wi,this.postMessageToAllIframes=Le(rl,o),this.handleIOSTouchEvents=$t.handleTouchend.bind(this),this.touchendListener=$t.touchendListener.bind(this),this.destroyTouchendListener=$t.destroyTouchendListener.bind(this),this.touchstartListener=$t.touchstartListener.bind(this),this.destroyTouchstartListener=$t.destroyTouchstartListener.bind(this),this.setFocusOnFrame=Le(ol,o),this.handleFocus=Le(sl,o,this.handleIOSTouchEvents),this.handleSFShiftTab=Qn.handleSFShiftTab,this.handleShiftTab=Qn.handleShiftTab,this.destroySecuredFields=pl,this.processAutoComplete=Le(al,o),this.handleBinValue=Le(cl,o),this.handleBrandFromBinLookup=tl,this.sendBrandToCardSF=Qi,this.sendExpiryDatePolicyToSF=el,this.init()}};var ul=t=>{if(!t)throw new Error("No securedFields configuration object defined");let e={...t};try{let r=jt.isGenericCardType(e.type);e.type=r?"card":e.type}catch{e.type="card"}if(!S(e,"rootNode"))return xo('ERROR: SecuredFields configuration object is missing a "rootNode" property');if(Pi(e.clientKey))return Pe('WARNING: AdyenCheckout configuration object is missing a "clientKey" property.');let o=Ep(e.rootNode);return o?(e.rootNode=o,new Ir(e).createReturnObject()):xo(`ERROR: SecuredFields cannot find a valid rootNode element for ${e.type}`)},Ep=t=>{let e;return typeof t=="object"&&(e=t),typeof t!="string"||(e=xe(document,t),e)?e:null};var ml=t=>t.replace(/([a-z])([A-Z])/g,"$1_$2").toLowerCase();var kr=(t,e)=>{let o=t==="card"?"nocard":t||"nocard",r={type:o,extension:"svg"};return e.getImage(r)(o)},hl=t=>{let e=ml(t);return br.includes(t)&&(e=e.substring(ai.length+1)),e};function Nr(t,e,o,r){return(e!==Er&&e!==Sr||o[t]!==0)&&r[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!==A)&&(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 o=Nr(T,t.cvcPolicy,this.numCharsInField,e.errors),r=this.numDateFields===1?Nr(D,t.expiryDatePolicy,this.numCharsInField,e.errors):null,n=this.numDateFields===2?Nr(I,t.expiryDatePolicy,this.numCharsInField,e.errors):null,a=this.numDateFields===2?Nr(R,t.expiryDatePolicy,this.numCharsInField,e.errors):null;return{brand:t.brand,cvcPolicy:t.cvcPolicy??Fe,showSocialSecurityNumber:t.showSocialSecurityNumber,errors:{...e.errors,...ge(o)&&{[T]:o},...ge(r)&&{[D]:r},...ge(n)&&{[I]:n},...ge(a)&&{[R]:a}},expiryDatePolicy:t.expiryDatePolicy??De}},()=>{this.props.onChange(this.state,{event:"handleOnBrand"});let e=this.props.brandsConfiguration[t.brand]?.icon??kr(t.brand,this.props.resources);this.props.onBrand({...t,brandImageUrl:e})})},handleOnError:function(t,e=null){let o=t.error;return this.setState(r=>({errors:{...r.errors,[t.fieldType]:o||!1},...e&&{data:{...r.data,[A]:void 0}},...e&&{valid:{...r.valid,[A]:!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 fl={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,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var Mo=class extends U{componentDidMount(){this.props.rootNode&&this.setRootNode(this.props.rootNode);let e=Ci(this.rootNode),o=e.reduce(vi,{});this.setState({valid:o}),e.forEach(r=>{this.numCharsInField[r]=0}),this.numDateFields=e.filter(r=>r.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 o=this.props.loadingContext,r={rootNode:e,type:this.props.type,clientKey:this.props.clientKey,cardGroupTypes:this.props.brands,autoFocus:this.props.autoFocus,trimTrailingSeparator:this.props.trimTrailingSeparator,loadingContext:o,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=ul(r),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 o=r=>({data:{...r.data,[fe]:void 0},valid:{...r.valid,[fe]:!1},errors:{...r.errors,[fe]:!1},hasKoreanFields:!1});this.setState(o,()=>{this.props.onChange(this.state)}),this.csf.removeSecuredField(fe),this.csf.setKCPStatus(!1)}if(!this.state.hasKoreanFields&&e){let o=r=>({valid:{...r.valid,[fe]:!1},hasKoreanFields:!0,isSfpValid:!1});this.setState(o,()=>{this.props.onChange(this.state)}),this.csf.addSecuredField(fe),this.csf.setKCPStatus(!0)}}getChildContext(){return{i18n:this.props.i18n}}handleUnsupportedCard(e){let o=!!e.error;return o&&this.setState({detectedUnsupportedBrands:e.detectedBrands}),e.rootNode=this.rootNode,this.handleOnError(e,o),this.csf&&this.csf.hasUnsupportedCard(A,e.error),o}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:o}=this;Object.keys(o.valid).reduce(bi(e,o),[]).forEach(r=>{let n=Ei(r,this.rootNode,o);this.handleOnError(n,!!o.detectedUnsupportedBrands),this.csf&&this.csf.isValidated&&this.csf.isValidated(r,n.error)})}mapErrorsToValidationRuleResult(){return Object.keys(this.state.errors).reduce((e,o)=>{let r=this.state.errors[o];return e[o]=r?{isValid:!1,errorMessage:Hi(r,Gt),errorI18n:this.props.i18n.get(r),error:r,rootNode:this.rootNode,...this.state.detectedUnsupportedBrands&&{detectedBrands:this.state.detectedUnsupportedBrands}}:null,e},{})}processBinLookupResponse(e,o){if(this.state.detectedUnsupportedBrands&&(this.setState(a=>({errors:{...a.errors,[A]:!1},detectedUnsupportedBrands:null})),this.csf&&e)){let a={type:"card",fieldType:"encryptedCardNumber",error:""};this.handleUnsupportedCard(a)}this.issuingCountryCode=e?.issuingCountryCode?.toLowerCase();let r=o?.brand,n=r&&li.includes(o.brand);n&&this.setState(o,()=>{this.props.onChange(this.state)}),this.csf&&this.csf.brandsFromBinLookup(e,n?o:null)}render(e,o){return e.render({setRootNode:this.setRootNode,setFocusOn:this.setFocusOn},o)}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",r=>{this.rootNode=r});let o={status:"loading",brand:e.type,errors:{},valid:{},data:{},cvcPolicy:Fe,expiryDatePolicy:De,isSfpValid:!1,hasKoreanFields:e.hasKoreanFields};this.state=o,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)}};$(Mo,"defaultProps",fl);function _l(t,e){let[o,r]=t;return{dualBrandSelectElements:[{id:o.brand,brandObject:o},{id:r.brand,brandObject:r}],selectedBrandValue:e?o.brand:"",leadBrand:o}}var yl=Gs(void 0),Wt=({i18n:t,loadingContext:e,resources:o,analytics:r,children:n})=>(Ke(()=>{t&&e&&o||console.warn(`CoreProvider - WARNING core provider is missing:${t?"":"i18n"} ${e?"":"loadingContext"} ${o?"":"resources"}`)},[t,e,o]),f(yl.Provider,{value:{i18n:t,loadingContext:e,resources:o,analytics:r}},Hn(n))),nt=()=>{let t=oi(yl);if(t===void 0)throw new Error('"useCoreContext" must be used within a CoreProvider');return t};function gl(){let{resources:t}=nt();return ti(e=>t?.getImage(e),[])}var Or="threeDS2Fingerprint",kt="3DS2Fingerprint_Error",Mr="callSubmit3DS2Fingerprint_Response",Fr="threeDS2Challenge",Te="3DS2Challenge_Error",Ae="threeDS2",at="3DS2",$e='Missing "token" property from threeDS2 action';var Nt="timeout",Cl={result:{transStatus:"U"},type:"challengeResult",errorCode:Nt},vl={result:{threeDSCompInd:"N"},type:"fingerPrintResult",errorCode:Nt},ea={"01":["250px","400px"],"02":["390px","400px"],"03":["500px","600px"],"04":["600px","400px"],"05":["100%","100%"]};var Zt=(t,e=!1)=>{let o;try{o=new URL(t)}catch{return!1}return e&&o.protocol==="http:"||o.protocol==="https:"};var bl=(t,e,o)=>e.some(r=>t.includes(r[o]));var El=["cartebancaire","bcmc","dankort"];var Sp=(t,e)=>t.reduce((o,r)=>o||e.includes(r.brand),!1),Sl=t=>t.map(e=>({...e})),Pp=(t,e="mc",o="visa")=>{let r=Sl(t);return r[0].brand!==e&&r[0].brand!==o&&r.reverse(),r.length=1,r};function Pl(t,e,o,r={}){let{type:n,cvcPolicy:a}=t,{sfp:s}=e,{dualBrandSelectElements:d,setDualBrandSelectElements:c,setSelectedBrandValue:p,issuingCountryCode:u,setIssuingCountryCode:l}=o;return{processBinLookup:(h,m)=>{let g=h?.issuingCountryCode?h.issuingCountryCode.toLowerCase():null;if(l(g),!h||!Object.keys(h).length){c([]),p("");let b=m&&n!=="card"?n:null;return s.current.processBinLookupResponse(h,{brand:b,cvcPolicy:a}),void(r.current=0)}if(h.supportedBrands?.length){let b=Sp(h.supportedBrands,mi),C=b?Pp(h.supportedBrands):Sl(h.supportedBrands);if(C.length>1){let y=bl(El,C,"brand"),_=_l(C,y);c(_.dualBrandSelectElements),p(_.selectedBrandValue),s.current.processBinLookupResponse({issuingCountryCode:h.issuingCountryCode,supportedBrands:[_.leadBrand]}),_.leadBrand.panLength>0&&(r.current=_.leadBrand.panLength)}else c([]),p(""),b||p(C[0].brand),s.current.processBinLookupResponse({issuingCountryCode:h.issuingCountryCode,supportedBrands:C}),C[0].panLength>0&&(r.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 g=[];m&&(g=d.reduce((b,C)=>(C.brandObject.brand===m&&b.push(C.brandObject),b),[]),g.length&&(p(m),s.current.processBinLookupResponse({issuingCountryCode:u,supportedBrands:g,isDualBrandSelection:!0})))}}}function Rl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ta={exports:{}};var Tl;function Al(){return Tl||(Tl=1,t=ta,(function(){var e={}.hasOwnProperty;function o(){for(var a="",s=0;s<arguments.length;s++){var d=arguments[s];d&&(a=n(a,r(d)))}return a}function r(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return o.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var s="";for(var d in a)e.call(a,d)&&a[d]&&(s=n(s,d));return s}function n(a,s){return s?a?a+" "+s:a+s:a}t.exports?(o.default=o,t.exports=o):window.classNames=o})()),ta.exports;var t}var Be=Rl(Al());var Ot=({inline:t=!1,size:e="large"})=>f("div",{"data-testid":"spinner",className:"adyen-checkout__spinner__wrapper "+(t?"adyen-checkout__spinner__wrapper--inline":"")},f("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 Dl(t){let{backgroundUrl:e="",className:o="",classNameModifiers:r=[],src:n="",alt:a="",showOnError:s=!1}=t,[d,c]=ye(!1),p=tt(null),u=()=>{c(!0)},l=Be([o],"adyen-checkout__image",{"adyen-checkout__image--loaded":d},...r.map(h=>`adyen-checkout__image--${h}`));return Ke(()=>{let h=e?new Image:p.current;h.src=e||n,h.onload=u,c(!!h.complete)},[]),e?f("div",{"data-testid":"background",style:{backgroundUrl:e},...t,className:l}):f("img",{...t,alt:a,ref:p,className:l,onError:()=>{c(s)}})}function ra(t){let e=t.replace("_","-"),o=new RegExp("([a-z]{2})([-])([A-Z]{2})");if(o.test(e))return e;let[r,n]=e.split("-");if(r.length!==2)throw new v("IMPLEMENTATION_ERROR",`Locale '${t}' does not match the expected format`);if(!n)return r.toLowerCase();let a=[r.toLowerCase(),n.toUpperCase()].join("-");if(o.test(a))return a;throw new v("IMPLEMENTATION_ERROR",`Locale '${t}' does not match the expected format`)}function wl(t={}){return Object.keys(t).reduce((e,o)=>(e[ra(o)]=t[o],e),{})}var oa=(t,e)=>t.replace(/%{(\w+)}/g,(o,r)=>e[r]||""),xl=(t,e,o={values:{},count:0})=>{let r=`${e}__plural`,n=a=>`${e}__${a}`;return Object.prototype.hasOwnProperty.call(t,n(o.count))?oa(t[n(o.count)],o.values):Object.prototype.hasOwnProperty.call(t,r)&&o.count>1?oa(t[r],o.values):Object.prototype.hasOwnProperty.call(t,e)?oa(t[e],o.values):null};var Il="https://checkoutshopper-live.adyen.com/checkoutshopper/",Lr="6.25.0";var kl=["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 Nl(t,e){let{headers:o=[],errorLevel:r="warn",errorCode:n,loadingContext:a=Il,method:s="GET",path:d,timeout:c=6e4}=t,p={method:s,mode:"cors",cache:"default",credentials:"same-origin",headers:{Accept:"application/json, text/plain, */*","Content-Type":s==="POST"?"application/json":"text/plain",...o},redirect:"follow",referrerPolicy:"no-referrer-when-downgrade",...AbortSignal?.timeout&&{signal:AbortSignal?.timeout(c)},...e&&{body:JSON.stringify(e)}},u=`${a}${d}`;return fetch(u,p).then(async l=>{let h=await l.json();if(l.ok)return h;if((function(m){return m&&m.errorCode&&m.errorType&&m.message&&m.status})(h))return void na({message:h.message,level:r,cause:h,code:n});na({message:t.errorMessage||`Service at ${u} is not available`,level:r,cause:h,code:n})}).catch(l=>{if(l instanceof v)throw l;na({message:t.errorMessage||`Call to ${u} failed. Error= ${l}`,level:r,cause:l,code:n})})}function na({message:t,level:e,cause:o,code:r}){switch(e){case"silent":break;case"info":case"warn":case"error":console[e](t);break;default:throw new v("NETWORK_ERROR",t,{cause:o,code:r})}}function aa(t,e){return Nl({...t,method:"GET"},e)}function q(t,e){return Nl({...t,method:"POST"},e)}var Ol=(t,e=300)=>{let o;return function(...r){clearTimeout(o),o=setTimeout(()=>t.apply(this,r),e)}};function sa(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var Fo=class extends U{render(){let{classNameModifiers:e=[],disabled:o,href:r,icon:n,onClickCompletedIcon:a,inline:s,label:d,ariaLabel:c,ariaDescribedBy:p,status:u,variant:l,buttonRef:h,onClickCompletedLabel:m,onMouseEnter:g,onMouseLeave:b,onFocus:C,onBlur:y,onKeyDown:_,onKeyPress:k}=this.props,{completed:E}=this.state,{i18n:H}=nt(),M=a||n?f("img",{className:"adyen-checkout__button__icon",src:this.state.completed?a??n:n,alt:"","aria-hidden":"true"}):"",K=[...e,...l!=="primary"?[l]:[],...s?["inline"]:[],...E?["completed"]:[],...u==="loading"||u==="redirect"?["loading"]:[]],ee=Be(["adyen-checkout__button",...K.map(L=>`adyen-checkout__button--${L}`)]),F={loading:f("span",{className:"adyen-checkout__button__content"},f(Ot,{size:"medium",inline:!0}),f("span",{className:"adyen-checkout__button__text--sr-only"},H.get("loading"))),redirect:f("span",{className:"adyen-checkout__button__content"},f(Ot,{size:"medium",inline:!0}),H.get("payButton.redirecting")),default:f("span",{className:"adyen-checkout__button__content"},M,f("span",{className:"adyen-checkout__button__text"},this.state.completed?m??d:d))},O=F[u]||F.default;return r?f("a",{className:ee,href:r,disabled:o,target:this.props.target,rel:this.props.rel},O):f("button",{ref:h,className:ee,type:"button",disabled:o,onClick:this.onClick,"aria-label":c,"aria-describedby":p,onMouseEnter:g,onMouseLeave:b,onKeyDown:_,onFocus:C,onBlur:y,onKeyPress:k},O,u!=="loading"&&u!=="redirect"&&this.props.children)}constructor(...e){super(...e),sa(this,"onClick",o=>{o.preventDefault(),this.props.disabled||this.props.onClick?.(o,{complete:this.complete})}),sa(this,"complete",(o=1e3)=>{this.setState({completed:!0}),setTimeout(()=>{this.setState({completed:!1})},o)})}};sa(Fo,"defaultProps",{status:"default",variant:"primary",disabled:!1,label:"",inline:!1,target:"_self"});var ia="v3/analytics",Ml=1e4;var ke={log:"log",error:"error",info:"info"},X={network:"Network",apiError:"ApiError",sdkError:"SdkError",redirect:"Redirect"},Fl={redirect:"600"},Ll="action",la="submit",Br="selected",Ue="rendered";var Bl="validationError",Ul="focus",Vl="unfocus";var Ur="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})({}),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})({}),da={[fi]:"925",[_i]:"942",[yi]:"926",[`${Ge}.country`]:"930",[`${Ge}.street`]:"931",[`${Ge}.house_number_or_name`]:"932",[`${Ge}.postal_code`]:"933",[`${Ge}.city`]:"935",[`${Ge}.state_or_province`]:"936",[`${Pr}.postal_code`]:"934"},Vr=["cart","minicart","pdp","checkout"],Hl=["applicationInfo","checkoutAttemptId"],Yl="fetch-checkoutAttemptId-failed",Hr={all:"all",initial:"initial"};var zl=t=>t.replace(/[^0-9]/g,"");var Kl=()=>Date.now(),Gl=(t,e)=>{if(t===Ge||t===Pr)return da[`${t}.${e}`]??t;let o=da[t]??t;return isNaN(Number(o))&&(o=zl(o)),o},jl=t=>t?Object.keys(t).reduce((e,o)=>(Hl.includes(o)&&(e[o]=t[o]),e),{}):{};function ca(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var st=class{constructor(){ca(this,"timestamp",void 0),ca(this,"id",void 0),ca(this,"component",void 0),this.id=qt(),this.timestamp=String(Kl())}};function Ne(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var Lo=(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})({}),ce=class extends st{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===Bl&&(this.validationErrorCode=Gl(this.validationErrorCode,this.target)),this}};function it(){let t=we(window,"screen.colorDepth")||"",e=we(window,"screen.height")||"",o=we(window,"screen.width")||"",r=we(window,"navigator.userAgent")||"";return{acceptHeader:"*/*",colorDepth:t,language:we(window,"navigator.language")||"en",javaEnabled:!1,screenHeight:e,screenWidth:o,userAgent:r,timeZoneOffset:new Date().getTimezoneOffset()}}var $l=t=>{let e=null;return o=>{if(t.props.doBinLookup!==!1){if(o.encryptedBin&&t.props.clientKey)e=o.uuid,q({loadingContext:t.props.loadingContext,path:`v3/bin/binLookup?token=${t.props.clientKey}`},{type:t.props.brand,supportedBrands:t.props.brands||At,encryptedBin:o.encryptedBin,requestId:o.uuid}).then(r=>{if(r?.requestId===e)if(r.brands?.length){let n=r.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:r.issuingCountryCode,supportedBrands:n.supportedBrands,...r.showSocialSecurityNumber?{showSocialSecurityNumber:r.showSocialSecurityNumber}:{}}),void t.onBinLookup({type:o.type,detectedBrands:n.detectedBrands,supportedBrands:n.supportedBrands.map(a=>a.brand),paymentMethodVariants:n.paymentMethodVariants,supportedBrandsRaw:n.supportedBrands,brands:t.props.brands||At,issuingCountryCode:r.issuingCountryCode});if(n.detectedBrands.length){let a={type:"card",fieldType:"encryptedCardNumber",error:Gt.ERROR_MSG_UNSUPPORTED_CARD_ENTERED,detectedBrands:n.detectedBrands};return t.handleUnsupportedCard(a),void t.onBinLookup({type:o.type,detectedBrands:n.detectedBrands,supportedBrands:null,paymentMethodVariants:n.paymentMethodVariants,brands:t.props.brands||At})}}else t.onBinLookup({type:o.type,detectedBrands:null,supportedBrands:null,paymentMethodVariants:null,brands:t.props.brands||At}),t.processBinLookupResponse({},!0);else r?.requestId||t.props.onError(r||{errorType:"binLookup",message:"unknownError"})});else if(e){t.processBinLookupResponse(null,!0),e=null;let r={type:"card",fieldType:"encryptedCardNumber",error:""};t.handleUnsupportedCard(r),t.onBinLookup({isReset:!0})}t.props.onBinValue&&t.props.onBinValue(o)}else t.props.onBinValue&&t.props.onBinValue(o)}};function Ce(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var lt=class t{removeScript(){this.script?.parentNode?.removeChild(this.script),this.script=null}loadScript(){return new Promise((e,o)=>{let r=document.querySelector(this.node);if(!r)return void o(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=d=>{n(),o(new v("SCRIPT_ERROR",`Unable to load script ${this.src}.${d?.message&&`Message: ${d.message}`}`,{cause:d?.error||d}))};if(this.script=r.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),r.appendChild(this.script)}})}trackEvent(e){let o=new ce({type:e,component:this.component,cdnUrl:this.baseUrl});this.analytics?.sendAnalytics(o)}constructor({src:e,component:o,node:r="body",attributes:n,dataAttributes:a,analytics:s}){Ce(this,"src",void 0),Ce(this,"component",void 0),Ce(this,"node",void 0),Ce(this,"attributes",void 0),Ce(this,"dataAttributes",void 0),Ce(this,"analytics",void 0),Ce(this,"baseUrl",void 0),Ce(this,"script",void 0),Ce(this,"loadPromise",null),Ce(this,"rejectLoadPromise",null),Ce(this,"load",()=>(this.loadPromise!==null||(this.loadPromise=new Promise((d,c)=>{this.rejectLoadPromise=c;let p=0;this.trackEvent(Lo.sdkDownloadInitiated);let u=async()=>{try{p++,await this.loadScript(),this.trackEvent(Lo.sdkDownloadCompleted),d()}catch(l){if(this.loadPromise===null)return;this.trackEvent(Lo.sdkDownloadFailed),this.removeScript(),p<t.MAX_NUMBER_OF_RETRIES?setTimeout(()=>{u()},t.RETRY_DELAY):(this.trackEvent(Lo.sdkDownloadAborted),this.loadPromise=null,this.rejectLoadPromise=null,c(l))}};u()})),this.loadPromise)),Ce(this,"remove",()=>{this.rejectLoadPromise?.(new v("CANCEL","Script loading cancelled.")),this.removeScript(),this.loadPromise=null}),this.src=e,this.component=o,this.node=r,this.attributes=n,this.dataAttributes=a,this.analytics=s,this.baseUrl=(function(d){let c=new URL(d);return c.origin+c.pathname})(this.src)}};Ce(lt,"RETRY_DELAY",1e3),Ce(lt,"MAX_NUMBER_OF_RETRIES",3);var Tp=(t,e)=>e?.value&&e?.currency?t.amount(e.value,e.currency,{currencyDisplay:e.currencyDisplay||"symbol"}):"",Wl=(t,e)=>`${t.get("payButton")} ${Tp(t,e)}`,Zl=(t,e)=>{let o=e&&e?.value&&e?.currency?t.amount(e.value,e.currency,{currencyDisplay:e.currencyDisplay||"symbol"}):"";return`${o.length?"/ ":""}${o}`};var ql=({label:t})=>f("span",{className:"checkout-secondary-button__text"},t);var Xl=({amount:t,secondaryAmount:e,classNameModifiers:o=[],label:r,...n})=>{let{i18n:a}=nt(),s=t&&{}.hasOwnProperty.call(t,"value")&&t.value===0,d=s?a.get("confirmPreauthorization"):Wl(a,t),c=t&&typeof t.value=="number"&&!!t.currency,p=e&&Object.keys(e).length>0,u=!s&&!r&&c&&p?Zl(a,e):null;return f(Fo,{...n,disabled:n.disabled||n.status==="loading",classNameModifiers:[...o,"pay"],label:r||d},u&&f(ql,{label:u}))};function Jl(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var We=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:o,width:r,height:n,minWidth:a,minHeight:s,allow:d,title:c,classNameModifiers:p}){let u=p.filter(l=>!!l);return f("iframe",{ref:l=>{this.iframeEl=l},allow:d,className:Be("adyen-checkout__iframe",`adyen-checkout__iframe--${e}`,u.length&&p.map(l=>`adyen-checkout__iframe--${e}-${l}`)),name:e,src:o,width:r,height:n,frameBorder:"0",title:c,referrerpolicy:"origin","min-width":a,"min-height":s})}constructor(...e){super(...e),Jl(this,"iframeEl",void 0)}};Jl(We,"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 Mt(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var Ze=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=we(this.props,"modules.risk.data"),o=we(this.props,"modules.analytics.getCheckoutAttemptId")?.()??Yl,r=this.state.order||this.props.order,n=this.formatData();return n.paymentMethod&&o&&(n.paymentMethod.checkoutAttemptId=o),{...e&&{riskData:{clientData:e}},...r&&{order:{orderData:r.orderData,pspReference:r.pspReference}},...n,clientStateDataIndicator:!0}}activate(){}render(){throw new Error("Payment method cannot be rendered.")}mount(e){let o=typeof e=="string"?document.querySelector(e):e;if(!o)throw new Error("Component could not mount. Root node was not found.");let r=!this._node;return this._node&&this.unmount(),this._node=o,je(this._node,"keypress",this.handleKeyPress,!1),this._component=this.render(),Kn(this._component,o),r&&this.props.modules&&this.props.modules.analytics&&this.setUpAnalytics({containerWidth:o&&o.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 ce({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 ot(this._node,"keypress",this.handleKeyPress),this._node&&Kn(null,this._node),this}remove(){this.unmount(),this.core&&this.core.remove(this)}constructor(e,o){if(Mt(this,"_id",`${this.constructor.type}-${qt()}`),Mt(this,"core",void 0),Mt(this,"props",void 0),Mt(this,"state",{}),Mt(this,"_component",void 0),Mt(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(o),this.handleKeyPress=this.handleKeyPress.bind(this)}};Mt(Ze,"defaultProps",{});var Ap=["action","resultCode","sessionData","order","sessionResult","donationToken","error"];function qe(t){let e=[],o=Object.keys(t).reduce((r,n)=>(Ap.includes(n)?r[n]=t[n]:e.push(n),r),{});return e.length&&console.warn(`The following properties should not be passed to the client: ${e.join(", ")}`),o}function Xt(t){t&&(delete t.order,delete t.action,t.donationToken&&t.donationToken.length!==0||delete t.donationToken)}function Xe(t){return["Cancelled","Error","Refused"].includes(t.resultCode)?Promise.reject(t):Promise.resolve(t)}function Yr(t){return t?typeof t.activePaymentMethod=="object"&&typeof t.closeActivePaymentMethod=="function":!1}function Ql(t,e){return t==="FI"&&e?{openFirstPaymentMethod:!1,openFirstStoredPaymentMethod:!1}:{}}var dt=class extends Error{constructor(e){super(e)}};function Bo(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var me=class extends st{getEventCategory(){return ke.log}constructor(e){return super(),Bo(this,"type",void 0),Bo(this,"message",void 0),Bo(this,"subType",void 0),Bo(this,"result",void 0),Bo(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 pa(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var Q=class extends st{getEventCategory(){return ke.error}constructor(e){return super(),pa(this,"code",void 0),pa(this,"errorType",void 0),pa(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,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var he=class extends Ze{get analytics(){return this.core.modules.analytics}buildElementProps(e){let o={showPayButton:!0,...this.core.getCorePropsForComponent(),...e?.isStoredPaymentMethod?{}:this.getPaymentMethodFromPaymentMethodsResponse(e?.type),...e},r=Yr(this);this.props=this.formatProps({...this.constructor.defaultProps,...Ql(this.core.options.countryCode,r),...o})}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,o){return this.elementRef?.setStatus(e,o),this}setStatus(e,o){return this.componentRef?.setStatus&&this.componentRef.setStatus(e,o),this}onChange(){this.props.onChange?.({data:this.data,isValid:this.isValid,errors:this.state.errors,valid:this.state.valid},this.elementRef)}setUpAnalytics(e){let o=this.props.session?.id;return this.props.modules.analytics.setUp({...e,...o&&{sessionId:o}})}submitAnalytics(e){try{e.component=this.getComponent(e),this.props.modules.analytics.sendAnalytics(e)}catch(o){console.warn("Failed to submit the analytics event. Error:",o)}}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(qe).then(Xe).then(this.handleResponse).catch(e=>{e instanceof dt?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,o)=>this.props.beforeSubmit(this.data,this.elementRef,{resolve:e,reject:()=>o(new dt("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,o)=>{let r=new me({type:la,message:"Shopper clicked pay"});this.submitAnalytics(r),this.props.onSubmit({data:this.data,isValid:this.isValid},this.elementRef,{resolve:e,reject:o})})}async submitUsingSessionsFlow(e){let o=new me({type:la,message:"Shopper clicked pay"});this.submitAnalytics(o);try{return await this.core.session.submitPayment(e)}catch(r){return r instanceof v?this.handleError(r):this.handleError(new v("ERROR","Error when making /payments call",{cause:r})),Promise.reject(r)}}onComplete(e){this.handleAdditionalDetails(e)}handleAdditionalDetails(e){this.makeAdditionalDetailsCall(e).then(qe).then(Xe).then(this.handleResponse).catch(this.handleFailedResult)}makeAdditionalDetailsCall(e){return this.props.onAdditionalDetails?new Promise((o,r)=>{this.props.onAdditionalDetails(e,this.elementRef,{resolve:o,reject:r})}):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(o){return o instanceof v?this.handleError(o):this.handleError(new v("ERROR","Error when making /details call",{cause:o})),Promise.reject(o)}}handleAction(e,o={}){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 r=this.core.createFromAction(e,{...this.elementRef.props,...o});return r?(this.unmount(),r.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,o){this.props.onEnterKeyPressed?this.props.onEnterKeyPressed(e,o):(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(o=>o.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,o){return new Promise((r,n)=>{if(!this.props.onPaymentMethodsRequest)return r();this.props.onPaymentMethodsRequest({...e&&{order:{orderData:e.orderData,pspReference:e.pspReference}},locale:this.core.options.locale},{resolve:r,reject:n})}).catch(r=>{this.handleError(new v("IMPLEMENTATION_ERROR","Something failed during payment methods update or onPaymentMethodsRequest was not implemented",{cause:r}))}).then(r=>this.core.update({...r&&{paymentMethodsResponse:r},order:e,amount:e?e.remainingAmount:o}))}constructor(e,o){super(e,o),Oe(this,"componentRef",void 0),Oe(this,"resources",void 0),Oe(this,"elementRef",void 0),Oe(this,"handleError",r=>{if(this.setElementStatus("ready"),r.name===Xn&&r.options.code){let n=new Q({errorType:X.apiError,code:r.options.code});this.submitAnalytics(n)}this.props.onError&&this.props.onError(r,this.elementRef)}),Oe(this,"handleOrder",r=>{let{order:n}=r;(this.core.session?this.core.update({order:n}):this.handleAdvanceFlowPaymentMethodsUpdate(n)).then(()=>{this.props.onOrderUpdated?.({order:n})})}),Oe(this,"handleFailedResult",r=>{Yr(this.elementRef)&&this.elementRef.displayFinalAnimation("error"),Xt(r),this.props.onPaymentFailed?.(r,this.elementRef)}),Oe(this,"handleSuccessResult",r=>{Yr(this.elementRef)&&this.elementRef.displayFinalAnimation("success"),Xt(r),this.props.onPaymentCompleted?.(r,this.elementRef)}),Oe(this,"setComponentRef",r=>{this.componentRef=r}),Oe(this,"payButton",r=>f(Xl,{...r,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=o&&o.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 ua(t){let e=tt(null),[o,r]=ye({}),[n,a]=ye({}),[s,d]=ye({}),[c,p]=ye(!1),[u,l]=ye(null),[h,m]=ye([]),[g,b]=ye(""),C=vr(()=>Pl(t,{sfp:e},{dualBrandSelectElements:h,setDualBrandSelectElements:m,setSelectedBrandValue:b,issuingCountryCode:u,setIssuingCountryCode:l}),[h,u]);return this.processBinLookupResponse=(y,_)=>{C.processBinLookup(y,_)},this.dualBrandingChangeHandler=C.handleDualBrandSelection,Ke(()=>(this.setFocusOn=e.current.setFocusOn,this.updateStyles=e.current.updateStyles,this.showValidation=e.current.showValidation,this.handleUnsupportedCard=e.current.handleUnsupportedCard,()=>{e.current.destroy()}),[]),Ke(()=>{let y=e.current.mapErrorsToValidationRuleResult(),_={...o,...y};if(t.onChange({data:s,valid:n,errors:_,isValid:c,selectedBrandValue:g}),Object.keys(_).length){let k=Object.entries(_).map(([E,H])=>({fieldType:E,...H||{error:"",rootNode:this.props.rootNode}}));this.props.onValidationError?.(k)}},[s,n,o,g]),f(Mo,{ref:e,...Dp(t),type:t.brand,onChange:y=>{d({...s,...y.data}),r({...o,...y.errors}),a({...n,...y.valid}),p(y.isSfpValid)},render:()=>null})}ua.defaultProps={onChange:()=>{},onError:()=>{},onValidationError:()=>{}};var Dp=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 Ft(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var He=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 o={...e};o.rootNode=this._node,o.isReset||(o.supportedBrandsRaw=e.supportedBrandsRaw?.map(r=>(r.brandImageUrl=this.props.brandsConfiguration[r.brand]?.icon??kr(r.brand,this.resources),r))),this.props.onBinLookup(o)}get isValid(){return!!this.state.isValid}get browserInfo(){return it()}render(){return f(Wt,{i18n:this.props.i18n,loadingContext:this.props.loadingContext,resources:this.resources},f(ua,{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),Ft(this,"brand",J.card),Ft(this,"onBinValue",$l(this)),Ft(this,"onFocus",o=>{let r=new ce({type:o.focus===!0?Ul:Vl,target:hl(o.fieldType)});this.submitAnalytics(r),this.props.onFocus?.(o)}),Ft(this,"onEnterKeyPressed",(o,r)=>{this.props.onEnterKeyPressed?.(o,r)})}};Ft(He,"type",J.customCard),Ft(He,"analyticsType","custom-scheme"),Ft(He,"defaultProps",{onBinLookup:()=>{},brandsConfiguration:{}});var Jt=class extends U{componentDidMount(){this.formEl.submit(),this.props.onFormSubmit(`${this.props.inputName} sent`)}render({name:e,action:o,target:r,inputName:n,inputValue:a}){return f("form",{ref:s=>{this.formEl=s},method:"POST",className:Be(["adyen-checkout__threeds2__form",`adyen-checkout__threeds2__form--${e}`]),name:e,action:o,target:r,style:{display:"none"}},f("input",{name:n,value:a}))}constructor(...e){var o,r,n;super(...e),n=void 0,(r="formEl")in(o=this)?Object.defineProperty(o,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):o[r]=n}};var Qt=(t,e,o,r)=>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!==r)return"Event data was not of expected type";e(s)}catch{return a.type=`${r}-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 Uo=t=>{let e=/^(?:([A-Za-z]+):)?(\/{0,3})([0-9.\-A-Za-z]+)(?::(\d+))?(?:\/([^?#]*))?(?:\?([^#]*))?(?:#(.*))?$/.exec(t);if(!e)return null;let[,o,r,n,a]=e;return o&&r&&n?`${o}:${r}${n}${a?`:${a}`:""}`:null};var wp="not base64",xp="malformed URI sequence",ct={decode:t=>{if(!ct.isBase64(t))return{success:!1,error:wp};try{return{success:!0,data:(e=t,decodeURIComponent(Array.prototype.map.call(window.atob(e),o=>`%${`00${o.charCodeAt(0).toString(16)}`.slice(-2)}`).join("")))}}catch{return{success:!1,error:xp}}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 eo=t=>"success"in t&&!t.success,ed=t=>{let e=ct.decode(t);if(e.success)try{return JSON.parse(e.data)}catch{return{success:!1,error:"Could not JSON parse token"}}return e},zr=t=>{if(!t||!Object.keys(t).length)throw new Error("No (populated) data object to encode");return ct.encode(JSON.stringify(t))},td=t=>{let e=t.length===1?`0${t}`:t;return Object.prototype.hasOwnProperty.call(ea,e)?e:"02"},Ip=t=>ea[td(t)],od=({token:t,size:e})=>{let o=ed(t);if(eo(o))return o;let{acsTransID:r,acsURL:n,messageVersion:a,threeDSNotificationURL:s,threeDSServerTransID:d}=o,c=Uo(s);return{acsURL:n,cReqData:{acsTransID:r,messageVersion:a,threeDSServerTransID:d,messageType:"CReq",challengeWindowSize:td(e)},iframeSizeArr:Ip(e),postMessageDomain:c}},rd=({token:t,notificationURL:e})=>{let o=ed(t);if(eo(o))return o;let{threeDSMethodNotificationURL:r,threeDSMethodUrl:n,threeDSServerTransID:a}=o,s=e||r;return{threeDSServerTransID:a,threeDSMethodURL:n,threeDSMethodNotificationURL:s,postMessageDomain:Uo(s)}},nd=(t,e,o)=>({data:{[t]:zr({threeDSCompInd:e.threeDSCompInd}),paymentData:o}}),ad=(t,e,o)=>({data:{details:{"threeds2.fingerprint":zr(e)},paymentData:o}}),sd=(t,e,o)=>({data:{details:{[t]:zr({transStatus:e,authorisationToken:o})}}}),id=(t,e,o)=>({data:{details:{"threeds2.challengeResult":zr({transStatus:e})},paymentData:o}}),Kr=t=>{let e=window.btoa(t).split("=")[0];return e=e.replace(/\+/g,"-"),e=e.replace(/\//g,"_"),e},kp=["elementRef"],Np=["createFromAction","onAdditionalDetails"],ld=(t,e)=>{if(t==="fingerprint"){let o=e.elementRef?kp:Np,r=It(o).from(e);return r.showSpinner=!e.isDropin,r.statusType="loading",r}return{statusType:"custom",i18n:e.i18n,elementRef:e.elementRef}};var to=(t,e,o)=>{let r;return{promise:new Promise((n,a)=>{r=setTimeout(()=>{a(o)},t),e.then(s=>{clearTimeout(r),n(s)}).catch(s=>{clearTimeout(r),a(s)})}),cancel:()=>{clearTimeout(r)}}};function ha(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var dd="threeDSIframe",Gr=class extends U{get3DS2ChallengePromise(){return new Promise((e,o)=>{this.processMessageHandler=Qt(this.props.postMessageDomain,e,o,"challengeResult"),window.addEventListener("message",this.processMessageHandler)})}componentDidMount(){this.challengePromise=to(6e5,this.get3DS2ChallengePromise(),Cl),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:o,iframeSizeArr:r,onFormSubmit:n},{base64URLencodedData:a,status:s}){let[d,c]=r;return f("div",{className:Be(["adyen-checkout__threeds2__challenge",`adyen-checkout__threeds2__challenge--${o.challengeWindowSize}`])},s!=="iframeLoaded"&&f(Ot,null),f(We,{name:dd,width:d,height:c,callback:this.iframeCallback}),f(Jt,{name:"cReqForm",action:e,target:dd,inputName:"creq",inputValue:a,onFormSubmit:n}))}constructor(e){super(e),ha(this,"processMessageHandler",void 0),ha(this,"challengePromise",void 0),ha(this,"iframeCallback",()=>{this.setState({status:"iframeLoaded"}),this.state.status==="init"&&this.props.onActionHandled?.({componentType:"3DS2Challenge",actionDescription:`${at} challenge iframe loaded`})});let o=JSON.stringify(this.props.cReqData),r=Kr(o);this.state={base64URLencodedData:r,status:"init"}}};function cd(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var Vo=class extends U{componentDidMount(){if(eo(this.state.challengeData)){let e=this.state.challengeData.error,o=e.indexOf($e)>-1?V.ACTION_IS_MISSING_TOKEN:V.TOKEN_DECODE_OR_PARSING_FAILED;this.setError({errorInfo:e.indexOf($e)>-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 r=new Q({code:o,errorType:X.apiError,message:`${Te}: ${e}`});this.props.onSubmitAnalytics(r),console.debug("### PrepareChallenge3DS2::exiting:: no challengeData")}else{let e=this.props.environment==="test"&&this.props._environmentUrls?.api?.includes("http://localhost:8080"),{acsURL:o}=this.state.challengeData;if(!Zt(o,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:r,messageVersion:n,threeDSServerTransID:a}=this.state.challengeData.cReqData;if(!r||!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,o=null){this.setState({status:"complete"},()=>{let r=(this.props.isMDFlow?id:sd)(this.props.dataKey,e.transStatus,this.props.paymentData),n;o&&console.debug("### PrepareChallenge3DS2::errorCodeObject::",o);let a=o||e;if(a.errorCode){let d={code:a.errorCode==="timeout"?V.THREEDS2_TIMEOUT:V.NO_TRANSSTATUS,errorType:a.errorCode==="timeout"?X.network:X.apiError};n=new Q({message:a.message,...d}),this.props.onSubmitAnalytics(n)}let s;switch(e?.transStatus){case"Y":s="success";break;case"N":s="failed";break;case"U":s=o?"timeout":"cancelled"}e?.errorCode&&(s="noTransStatus"),n=new me({type:Ae,message:`${at} challenge has completed`,subType:Ve.CHALLENGE_COMPLETED,result:s}),this.props.onSubmitAnalytics(n),this.props.onComplete(r)})}setError(e,o){this.setState({status:"error",errorInfo:e.errorInfo}),o&&this.props.onError(new v(No,e.errorInfo,{cause:e.errorObj}))}render(e,{challengeData:o}){let r=gl();return this.state.status==="performingChallenge"?f(Gr,{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(No,`${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:`${Fr}: ${n.errorCode}`};return this.props.isMDFlow&&this.props.onError(new v(No,`${Te}: '3DS2 challenge timed out'`,{cause:n.errorCode})),void this.setStatusComplete(n.result,a)}},...o,onActionHandled:this.props.onActionHandled,onFormSubmit:this.onFormSubmit}):this.state.status==="error"?f("div",{className:"adyen-checkout__threeds2-challenge-error"},f(Dl,{className:"adyen-checkout__status__icon adyen-checkout__status__icon--error",src:r({imageFolder:"components/"})("error"),alt:""}),f("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),cd(this,"onFormSubmit",o=>{let r=new me({type:Ae,message:o,subType:Ve.CHALLENGE_DATA_SENT});this.props.onSubmitAnalytics(r)}),this.props.token){let o=od({token:this.props.token,size:this.props.challengeWindowSize||this.props.size});this.state={status:"init",challengeData:o}}else this.state={challengeData:{success:!1,error:$e}},console.debug(`${Te}: ${$e}`)}};cd(Vo,"defaultProps",{onComplete:()=>{},onError:()=>{},isMDFlow:!1});function jr(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var oo=class extends he{onComplete(e){this.props.onComplete?this.props.onComplete(e,this.elementRef):super.onComplete(e),this.unmount()}render(){if(!ge(this.props.paymentData)){let e=S(this.props,"isMDFlow")?"paymentData":"authorisationToken";this.props.onError(new v(ko,`No ${e} received. 3DS2 Challenge cannot proceed`));let o=new Q({code:V.ACTION_IS_MISSING_PAYMENT_DATA,errorType:X.apiError,message:`${Te}: Missing 'paymentData' property from threeDS2 action`});return this.submitAnalytics(o),null}return f(Wt,{i18n:this.props.i18n,loadingContext:this.props.loadingContext,resources:this.resources},f(Vo,{...this.props,onComplete:this.onComplete,onSubmitAnalytics:this.submitAnalytics,isMDFlow:this.props.paymentData.length<15,onActionHandled:this.onActionHandled}))}constructor(...e){super(...e),jr(this,"submitAnalytics",o=>{o instanceof ce&&o.type===Ue||super.submitAnalytics(o)}),jr(this,"onActionHandled",o=>{let r=new me({type:Ae,message:o.actionDescription,subType:Ve.CHALLENGE_IFRAME_LOADED});this.submitAnalytics(r),super.onActionHandled(o)})}};jr(oo,"type",J.threeDS2Challenge),jr(oo,"defaultProps",{dataKey:"threeDSResult",size:"02",type:Fr});function fa(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var pd="threeDSMethodIframe",Ho=class extends U{get3DS2MethodPromise(){return new Promise((e,o)=>{this.processMessageHandler=Qt(this.props.postMessageDomain,e,o,"fingerPrintResult"),window.addEventListener("message",this.processMessageHandler)})}componentDidMount(){this.fingerPrintPromise=to(1e4,this.get3DS2MethodPromise(),vl),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:o,onFormSubmit:r},{base64URLencodedData:n}){return f("div",{className:"adyen-checkout__3ds2-device-fingerprint"},this.props.showSpinner&&f(Ot,null),f("div",{style:{display:"none"}},f(We,{name:pd,callback:()=>{o?.({componentType:"3DS2Fingerprint",actionDescription:`${at} fingerprint iframe loaded`})}}),f(Jt,{name:"threeDSMethodForm",action:e,target:pd,inputName:"threeDSMethodData",inputValue:n,onFormSubmit:r})))}constructor(e){super(e),fa(this,"processMessageHandler",void 0),fa(this,"fingerPrintPromise",void 0);let{threeDSServerTransID:o,threeDSMethodNotificationURL:r}=this.props,n=JSON.stringify({threeDSServerTransID:o,threeDSMethodNotificationURL:r}),a=Kr(n);this.state={base64URLencodedData:a}}};fa(Ho,"defaultProps",{showSpinner:!0});function _a(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var ro=class extends U{componentDidMount(){if(eo(this.state.fingerPrintData)){let e=this.state.fingerPrintData.error,o=e.indexOf($e)>-1?V.ACTION_IS_MISSING_TOKEN:V.TOKEN_DECODE_OR_PARSING_FAILED;this.setStatusComplete({threeDSCompInd:"N"},{errorCode:o,message:`${kt}: ${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:o,threeDSMethodNotificationURL:r,postMessageDomain:n,threeDSServerTransID:a}=this.state.fingerPrintData;if(!Zt(o,e))return this.setStatusComplete({threeDSCompInd:"U"},{errorCode:V.TOKEN_IS_MISSING_THREEDSMETHODURL,message:`${kt}: Decoded token is missing a valid threeDSMethodURL property`}),void console.debug("### PrepareFingerprint3DS2::exiting:: no valid threeDSMethodURL");let s=Zt(r,e),d=Zt(n,e),c=a?.length;if(!s||!d||!c)return this.setStatusComplete({threeDSCompInd:"N"},{errorCode:V.TOKEN_IS_MISSING_OTHER_PROPS,message:`${kt}: 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,o=null){this.setState({status:"complete"},()=>{let r=(this.props.isMDFlow?ad:nd)(this.props.dataKey,e,this.props.paymentData),n,a=o||e;if(a.errorCode){let d={code:a.errorCode===Nt?V.THREEDS2_TIMEOUT:a.errorCode,errorType:a.errorCode===Nt?X.network:X.apiError};n=new Q({message:a.message,...d}),this.props.onSubmitAnalytics(n)}let s;switch(e?.threeDSCompInd){case"Y":s="success";break;case"N":s=o?o.errorCode===Nt?Nt:"failedInternal":"failed";break;case"U":s="noThreeDSMethodURL"}n=new me({type:Ae,message:`${at} fingerprinting has completed`,subType:Ve.FINGERPRINT_COMPLETED,result:s}),this.props.onSubmitAnalytics(n),this.props.onComplete(r)})}render({showSpinner:e},{status:o,fingerPrintData:r}){return o==="retrievingFingerPrint"?f(Ho,{onCompleteFingerprint:n=>{this.setStatusComplete(n.result)},onErrorFingerprint:n=>{let a={errorCode:n.errorCode,message:`${Or}: ${n.errorCode}`};this.setStatusComplete(n.result,a)},showSpinner:e,...r,onActionHandled:this.props.onActionHandled,onFormSubmit:this.onFormSubmit}):null}constructor(e){super(e),_a(this,"onFormSubmit",n=>{let a=new me({type:Ae,message:n,subType:Ve.FINGERPRINT_DATA_SENT});this.props.onSubmitAnalytics(a)});let{token:o,notificationURL:r}=this.props;if(o){let n=rd({token:o,notificationURL:r});this.state={status:"init",fingerPrintData:n}}else this.state={fingerPrintData:{success:!1,error:$e}},console.debug(`${kt}: ${$e}`)}};_a(ro,"type","scheme"),_a(ro,"defaultProps",{onComplete:()=>{},onError:()=>{},paymentData:"",showSpinner:!0,isMDFlow:!1});var pt={makePayments:"620",submitPaymentDetails:"621",submitThreeDS2Fingerprint:"622",createOrder:"623"};function ud({data:t}){q({path:`v1/submitThreeDS2Fingerprint?token=${this.props.clientKey}`,loadingContext:this.props.loadingContext,errorLevel:"fatal",errorCode:pt.submitThreeDS2Fingerprint},{...t}).then(e=>{let o;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),o=new Q({code:V.NO_DETAILS_FOR_FRICTIONLESS_OR_REFUSED,errorType:X.apiError,message:`${Mr}: no details object in a response indicating either a "frictionless" flow, or a "refused" response`}),void this.submitAnalytics(o))}if(!e.action)return console.debug('Handled Error::callSubmit3DS2Fingerprint::FAILED:: no action object in a response indicating a "challenge". resData=',e),o=new Q({code:V.NO_ACTION_FOR_CHALLENGE,errorType:X.apiError,message:`${Mr}: no action object in a response indicating a "challenge" flow`}),void this.submitAnalytics(o);let r=this.props.elementRef??this;return r?e.action?.type==="threeDS2"?r.handleAction(e.action,It("challengeWindowSize").from(this.props)):e.action?.type==="redirect"?r.handleAction(e.action):void 0:(console.debug("Handled Error::callSubmit3DS2Fingerprint::FAILED:: no actionHandler"),o=new Q({code:V.NO_COMPONENT_FOR_ACTION,errorType:X.sdkError,message:`${Mr}: no component defined to handle the action response`}),void this.submitAnalytics(o))}).catch(e=>{this.handleError(e)})}function Yo(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var no=class extends he{onComplete(e){this.props.onComplete?this.props.onComplete(e,this.elementRef):super.onComplete(e),this.unmount()}render(){if(!ge(this.props.paymentData)){this.props.onError(new v(ko,"No paymentData received. 3DS2 Fingerprint cannot proceed"));let e=new Q({code:V.ACTION_IS_MISSING_PAYMENT_DATA,errorType:X.apiError,message:`${kt}: Missing 'paymentData' property from threeDS2 action`});return this.submitAnalytics(e),null}return f(ro,{...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),Yo(this,"callSubmit3DS2Fingerprint",ud.bind(this)),Yo(this,"submitAnalytics",o=>{o instanceof ce&&o.type===Ue||super.submitAnalytics(o)}),Yo(this,"onActionHandled",o=>{let r=new me({type:Ae,message:o.actionDescription,subType:Ve.FINGERPRINT_IFRAME_LOADED});this.submitAnalytics(r),super.onActionHandled(o)})}};Yo(no,"type",J.threeDS2Fingerprint),Yo(no,"defaultProps",{dataKey:"fingerprintResult",type:Or});function md({label:t=null,icon:e=null,payButton:o,onSubmit:r,amount:n=null,name:a,showPayButton:s,...d}){let{i18n:c}=nt(),[p,u]=ye("ready");if(this.setStatus=l=>{u(l)},s)return f(et,null,o({...d,status:p,icon:e,classNameModifiers:["standalone"],label:t||(n&&{}.hasOwnProperty.call(n,"value")&&n.value===0?`${c.get("preauthorizeWith")} ${a}`:`${c.get("continueTo")} ${a}`),onClick:r}))}var hd={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 ya={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 Fp=t=>hd[t]||100,zo=(t,e)=>{let o=Fp(e);return parseInt(String(t),10)/o},fd=(t,e,o,r={})=>{let n=t.toString(),a=zo(n,o),s=e.replace("_","-"),d={style:"currency",currency:o,currencyDisplay:"symbol",...ya[o]?{...r,...ya[o]}:r};try{return a.toLocaleString(s,d)}catch{return n}};var _d=({buttonStyle:t,buttonType:e,buttonLocale:o,onClick:r})=>f("apple-pay-button",{"data-testid":"apple-pay-button",buttonstyle:t,type:e,locale:o,onclick:r});function yd(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var $r=class{begin(){return this.session.begin()}onvalidatemerchant(e,o){return new Promise((r,n)=>o(r,n,e.validationURL)).then(r=>{this.session.completeMerchantValidation(r)}).catch(r=>{console.error(r),this.session.abort(),this.options.onError(r)})}onpaymentauthorized(e,o){return new Promise((r,n)=>o(r,n,e)).then(r=>{this.session.completePayment(r)}).catch(r=>{this.session.completePayment(r)})}onpaymentmethodselected(e,o){return new Promise((r,n)=>o(r,n,e)).then(r=>{this.session.completePaymentMethodSelection(r)}).catch(r=>{this.session.completePaymentMethodSelection(r)})}onshippingcontactselected(e,o){return new Promise((r,n)=>o(r,n,e)).then(r=>{this.session.completeShippingContactSelection(r)}).catch(r=>{this.session.completeShippingContactSelection(r)})}onshippingmethodselected(e,o){return new Promise((r,n)=>o(r,n,e)).then(r=>{this.session.completeShippingMethodSelection(r)}).catch(r=>{this.session.completeShippingMethodSelection(r)})}oncancel(e,o){o(e)}constructor(e,o){yd(this,"session",void 0),yd(this,"options",void 0),this.options=o,this.session=new ApplePaySession(o.version,e),this.session.onvalidatemerchant=r=>{this.onvalidatemerchant(r,o.onValidateMerchant)},this.session.onpaymentauthorized=r=>{this.onpaymentauthorized(r,o.onPaymentAuthorized)},this.session.oncancel=r=>{this.oncancel(r,o.onCancel)},typeof o.onPaymentMethodSelected=="function"&&(this.session.onpaymentmethodselected=r=>{this.onpaymentmethodselected(r,o.onPaymentMethodSelected)}),typeof o.onShippingContactSelected=="function"&&(this.session.onshippingcontactselected=r=>{this.onshippingcontactselected(r,o.onShippingContactSelected)}),typeof o.onShippingMethodSelected=="function"&&(this.session.onshippingmethodselected=r=>{this.onshippingmethodselected(r,o.onShippingMethodSelected)})}};var gd={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 Cd=t=>{let{countryCode:e,companyName:o,amount:r,...n}=t,a=(s=>String(zo(s.value,s.currency)))(r);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:r.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 vd(t){try{for(let e=t;e>0;e--)if(ApplePaySession?.supportsVersion(e))return e}catch(e){console.warn(e)}return null}function ga(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 bd(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((o,r)=>(e[r]&&!o.includes(e[r])&&o.push(e[r]),o),[])}function Ed(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var Lp="https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js",Wr=class{async load(){try{let e=new lt({src:Lp,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}){Ed(this,"sdkLoadingPromise",void 0),Ed(this,"analytics",void 0),this.analytics=e}};var Sd=()=>{if(typeof window>"u")return!1;try{return window.self!==window.top}catch{return!0}};function Ko(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var Lt=class t extends he{formatProps(e){let o=e.brands?.length?bd(e.brands):e.supportedNetworks;return{...e,configuration:e.configuration,supportedNetworks:o,buttonLocale:e.buttonLocale??e.i18n?.locale,totalPriceLabel:e.totalPriceLabel||e.configuration?.merchantName,renderApplePayCodeAs:e.renderApplePayCodeAs??(Sd()?"window":"modal")}}formatData(){let{applePayToken:e,billingAddress:o,deliveryAddress:r}=this.state,{isExpress:n}=this.props;return{paymentMethod:{type:t.type,applePayToken:e,...n&&{subtype:"express"}},...o&&{billingAddress:o},...r&&{deliveryAddress:r}}}submitAnalytics(e){if(e instanceof ce&&e.type===Ue){let{isExpress:o,expressPage:r}=this.props,n=r&&Vr.includes(r);typeof o=="boolean"&&(e.isExpress=o),o===!0&&n&&(e.expressPage=r)}super.submitAnalytics(e)}get isValid(){return!0}async applePayCapabilities(e){let o=e||this.props.configuration.merchantId;try{return await this.sdkLoader.isSdkLoaded(),await ApplePaySession?.applePayCapabilities(o)}catch(r){throw new v("ERROR","Apple Pay: Error when requesting applePayCapabilities()",{cause:r})}}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||vd(14))}configureApplePayWebOptions(){if(window.ApplePayWebOptions){let{renderApplePayCodeAs:e,onApplePayCodeClose:o}=this.props;window.ApplePayWebOptions.set({renderApplePayCodeAs:e,...o&&{onApplePayCodeClose:o}})}}startSession(){let{onValidateMerchant:e,onPaymentMethodSelected:o,onShippingMethodSelected:r,onShippingContactSelected:n}=this.props,a=Cd({companyName:this.props.configuration.merchantName,countryCode:this.core.options.countryCode,...this.props}),s=new $r(a,{version:this.applePayVersionNumber,onError:d=>{this.handleError(new v("ERROR","ApplePay - Something went wrong on ApplePayService",{cause:d}))},onCancel:d=>{this.handleError(new v("CANCEL","ApplePay UI dismissed",{cause:d}))},onPaymentMethodSelected:o,onShippingMethodSelected:r,onShippingContactSelected:n,onValidateMerchant:e||this.validateMerchant,onPaymentAuthorized:(d,c,p)=>{let u=ga(p.payment.billingContact),l=ga(p.payment.shippingContact,!0);this.setState({applePayToken:btoa(JSON.stringify(p.payment.token.paymentData)),authorizedEvent:p,...u&&{billingAddress:u},...l&&{deliveryAddress:l}}),this.handleAuthorization().then(this.makePaymentsCall).then(qe).then(Xe).then(this.collectOrderTrackingDetailsIfNeeded).then(({paymentResponse:h,orderDetails:m})=>(d({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 g={...h,error:{applePayError:m}};this.handleFailedResult(g)})}});return new Promise((d,c)=>this.props.onClick(d,c)).then(()=>{s.begin()}).catch(()=>({}))}async handleAuthorization(){return new Promise((e,o)=>{this.props.onAuthorized||e();let{authorizedEvent:r,billingAddress:n,deliveryAddress:a}=this.state;this.props.onAuthorized({authorizedEvent:r,...n&&{billingAddress:n},...a&&{deliveryAddress:a}},{resolve:e,reject:o})}).catch(e=>{let o={error:{applePayError:e}};return Promise.reject(o)})}async collectOrderTrackingDetailsIfNeeded(e){return new Promise((o,r)=>{if(!this.props.onOrderTrackingRequest)return o();this.props.onOrderTrackingRequest(o,r)}).then(o=>({paymentResponse:e,...o&&{orderDetails:o}})).catch(()=>({paymentResponse:e}))}async validateMerchant(e,o){let{hostname:r}=window.location,{clientKey:n,configuration:a,loadingContext:s,initiative:d,domainName:c}=this.props,{merchantName:p,merchantId:u}=a,l={loadingContext:s,path:`v1/applePay/sessions?clientKey=${n}`},h={displayName:p,domainName:c||r,initiative:d,merchantIdentifier:u};try{let m=await q(l,h),g=ct.decode(m.data);g.success?e(JSON.parse(g.data)):o("Could not decode Apple Pay session")}catch{o("Could not get Apple Pay session")}}render(){return this.props.showPayButton?f(_d,{buttonStyle:this.props.buttonColor,buttonType:this.props.buttonType,buttonLocale:this.props.buttonLocale,onClick:this.submit}):null}constructor(e,o){super(e,o),Ko(this,"sdkLoader",void 0),Ko(this,"applePayVersionNumber",void 0),Ko(this,"submit",()=>{if(this.props.isInstantPayment){let s=new ce({type:Br,target:Ur});this.submitAnalytics(s)}this.startSession()});let{isExpress:r,onShippingContactSelected:n,onShippingMethodSelected:a}=this.props;if(r===!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 Wr({analytics:this.analytics}),this.sdkLoader.load().then(this.defineApplePayVersionNumber).then(this.configureApplePayWebOptions).catch(s=>{this.handleError(s)})}};Ko(Lt,"type",J.applepay),Ko(Lt,"defaultProps",gd);var ut={API_VERSION:2,API_VERSION_MINOR:0,GATEWAY:"adyen",URL:"https://pay.google.com/gp/p/js/pay.js"};function Pd({allowedAuthMethods:t,allowedCardNetworks:e,existingPaymentMethodRequired:o=!1}){return{apiVersion:ut.API_VERSION,apiVersionMinor:ut.API_VERSION_MINOR,allowedPaymentMethods:[{type:"CARD",parameters:{allowedAuthMethods:t,allowedCardNetworks:e},tokenizationSpecification:{type:"PAYMENT_GATEWAY",parameters:{}}}],existingPaymentMethodRequired:o}}function Bp({amount:t,countryCode:e="US",totalPriceStatus:o="FINAL",...r}){let n=String(zo(t.value,t.currency));return{countryCode:e,currencyCode:t.currency,totalPrice:n,totalPriceStatus:o,...r.transactionInfo}}function Ca({configuration:t,...e},o){return{apiVersion:ut.API_VERSION,apiVersionMinor:ut.API_VERSION_MINOR,transactionInfo:Bp({countryCode:o,...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:ut.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 Rd(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 va(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 Up=["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 Td(t=""){let e=t.toLowerCase().substring(0,2);return Up.includes(e)?e:null}function Ad(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var Zr=class{async getGooglePaymentsClient(e){return window.google?.payments||await new lt({src:ut.URL,component:"googlepay",analytics:this.analytics}).load(),new google.payments.api.PaymentsClient(e)}isReadyToPay(e){return this.paymentsClient?this.paymentsClient.then(o=>o.isReadyToPay(Pd(e))):Promise.reject(new Error("Google Pay is not available"))}prefetchPaymentData(e,o){if(!this.paymentsClient)throw new Error("Google Pay is not available");let r=Ca(e,o);this.paymentsClient.then(n=>n.prefetchPaymentData(r))}initiatePayment(e,o){if(!this.paymentsClient)throw new Error("Google Pay is not available");let r=Ca(e,o);return this.paymentsClient.then(n=>n.loadPaymentData(r))}constructor(e,o,r){Ad(this,"analytics",void 0),Ad(this,"paymentsClient",void 0);let n=Rd(e);this.analytics=o,this.paymentsClient=this.getGooglePaymentsClient({environment:n,paymentDataCallbacks:r})}};var Dd=t=>{let e=tt(void 0);return Ke(()=>{let{onClick:o,buttonRadius:r,buttonColor:n,buttonType:a,buttonLocale:s,buttonSizeMode:d,buttonRootNode:c,paymentsClient:p}=t;p.then(u=>u.createButton({onClick:o,buttonType:a,buttonColor:n,buttonLocale:s,buttonSizeMode:d,buttonRootNode:c,...r!==void 0&&{buttonRadius:r}})).then(u=>{e.current&&e.current.appendChild(u)})},[t.buttonColor,t.buttonType,t.buttonLocale,t.buttonSizeMode,t.buttonRootNode,t.paymentsClient]),f("div",{"data-testid":"googlepay-button-container",className:"adyen-checkout__paywithgoogle",ref:e})};var wd={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 Vp=Object.freeze({mc:"MASTERCARD",amex:"AMEX",visa:"VISA",elodebit:"ELO_DEBIT",elo:"ELO",interac:"INTERAC",discover:"DISCOVER",jcb:"JCB",electron:"ELECTRON",maestro:"MAESTRO"});function xd(t){let e=t.map(o=>Vp[o]).filter(o=>!!o);return[...new Set(e)]}function mt(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var Hp=["AMEX","DISCOVER","JCB","MASTERCARD","VISA"],ht=class extends he{getPaymentMethodFromPaymentMethodsResponse(e){return this.core.paymentMethodsResponse.find(e||this.constructor.type)||this.core.paymentMethodsResponse.find(J.paywithgoogle)}formatProps(e){let o=e.buttonSizeMode??(e.isDropin?"fill":"static"),r=Td(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:o,buttonLocale:r,callbackIntents:n}}formatData(){let{googlePayCardNetwork:e,googlePayToken:o,billingAddress:r,deliveryAddress:n}=this.state,{isExpress:a}=this.props;return{paymentMethod:{type:this.type,googlePayCardNetwork:e,googlePayToken:o,...a&&{subtype:"express"}},browserInfo:this.browserInfo,origin:!!window&&window.location.origin,...r&&{billingAddress:r},...n&&{deliveryAddress:n}}}createAllowedCardNetworksValues({allowedCardNetworks:e,brands:o}){return e?.length>0?e:o?.length>0?xd(o):Hp}submitAnalytics(e){if(e instanceof ce&&e.type===Ue){let{isExpress:o,expressPage:r}=this.props,n=r&&Vr.includes(r);typeof o=="boolean"&&(e.isExpress=o),o===!0&&n&&(e.expressPage=r)}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,o)=>{this.props.onAuthorized||e();let{authorizedEvent:r,billingAddress:n,deliveryAddress:a}=this.state;this.props.onAuthorized({authorizedEvent:r,...n&&{billingAddress:n},...a&&{deliveryAddress:a}},{resolve:e,reject:o})}).catch(e=>{let o={error:{googlePayError:e}};return Promise.reject(o)})}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 it()}get icon(){return this.props.icon??this.resources.getImage()("googlepay")}render(){return this.props.showPayButton?f(Dd,{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,o){super(e,o),mt(this,"googlePay",void 0),mt(this,"submit",()=>{if(this.props.isInstantPayment){let a=new ce({type:Br,target:Ur});this.submitAnalytics(a)}new Promise((a,s)=>this.props.onClick(a,s)).then(this.showGooglePayPaymentSheet).catch(()=>{})}),mt(this,"onPaymentAuthorized",async a=>{let s=va(a.paymentMethodData.info.billingAddress),d=va(a.shippingAddress,!0);return this.setState({authorizedEvent:a,googlePayToken:a.paymentMethodData.tokenizationData.token,googlePayCardNetwork:a.paymentMethodData.info.cardNetwork,...s&&{billingAddress:s},...d&&{deliveryAddress:d}}),new Promise(c=>{this.handleAuthorization().then(this.makePaymentsCall).then(qe).then(Xe).then(p=>(c({transactionState:"SUCCESS"}),p)).then(p=>{this.handleResponse(p)}).catch(p=>{this.setElementStatus("ready");let u=p?.error?.googlePayError,l=this.props.i18n.get("error.subtitle.payment"),h=typeof u=="string"?{intent:"PAYMENT_AUTHORIZATION",reason:"OTHER_ERROR",message:u||l}:{intent:u?.intent||"PAYMENT_AUTHORIZATION",reason:u?.reason||"OTHER_ERROR",message:u?.message||l};c({transactionState:"ERROR",error:h});let m={...p,error:{googlePayError:h}};this.handleFailedResult(m)})})}),mt(this,"isReadyToPay",()=>this.googlePay.isReadyToPay(this.props)),mt(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:r,paymentDataCallbacks:n}=this.props;if(r===!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 Zr(this.props.environment,this.analytics,{...r&&n?.onPaymentDataChanged&&{onPaymentDataChanged:n.onPaymentDataChanged},onPaymentAuthorized:this.onPaymentAuthorized})}};mt(ht,"type",J.googlepay),mt(ht,"txVariants",[J.googlepay,J.paywithgoogle]),mt(ht,"defaultProps",wd);var ba=()=>{try{if(window.parent.location.href)return window.location!==window.parent.location}catch{return!1}};function Id(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var Go=class extends U{componentDidMount(){new Promise((e,o)=>{this.props.beforeRedirect(e,o,{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&&ba()?window.top.location.assign?.(this.props.url):window.location.assign(this.props.url)}).catch(()=>{this.props.onRedirectError()})}render({url:e,method:o,data:r={}}){return o==="POST"?f("form",{method:"post","data-testid":"redirect-shopper-form",action:e,style:{display:"none"},ref:n=>{this.postForm=n},...this.props.redirectFromTopWhenInIframe&&ba()&&{target:"_top"}},Object.keys(r).map(n=>f("input",{type:"hidden",name:n,key:n,value:r[n]}))):null}constructor(...e){super(...e),Id(this,"postForm",void 0)}};Id(Go,"defaultProps",{beforeRedirect:t=>t(),onRedirectError:()=>{},method:"GET"});function Ea(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var ft=class extends he{formatData(){return{paymentMethod:{type:this.type},browserInfo:this.browserInfo}}get isValid(){return!0}get browserInfo(){return it()}render(){return this.props.url&&this.props.method?f(Go,{url:this.props.url,...this.props,onActionHandled:this.onActionHandled,onRedirectError:this.handleRedirectError}):this.props.showPayButton?f(Wt,{i18n:this.props.i18n,loadingContext:this.props.loadingContext,resources:this.resources},f(md,{...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),Ea(this,"handleRedirectError",()=>{let o=new Q({component:this.props.paymentMethodType,errorType:X.redirect,code:Fl.redirect});super.submitAnalytics(o)})}};Ea(ft,"type",J.redirect),Ea(ft,"defaultProps",{type:ft.type});var kd={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/"},Sa={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/"},Nd={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 qr=(t,e,o)=>o||e[t?.toLowerCase()]||e.fallback,Od=(t,e)=>({apiUrl:qr(t,kd,e?.api),analyticsUrl:qr(t,Nd,e?.analytics),cdnImagesUrl:qr(t,Sa,e?.cdn?.images),cdnTranslationsUrl:qr(t,Sa,e?.cdn?.translations)});function Md(t){return Object.keys(t).reduce((e,o)=>(kl.includes(o)&&(e[o]=t[o]),e),{})}function Fd(t){let e=(o=>o)(["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(o=>{e.includes(o)||console.warn(`AdyenCheckout - Configuration property "${o}" 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 Yp='WARNING: Failed to retrieve "checkoutAttemptId". Consequently, analytics will not be available for this payment. The payment process, however, will not be affected.',Ld=({analyticsContext:t,clientKey:e,locale:o,analyticsPath:r})=>{let n=null,a={errorLevel:"fatal",loadingContext:t,path:`${r}?clientKey=${e}`,errorMessage:Yp};return s=>{if(n!==null)return n;let d={version:Lr,buildType:"esm",channel:"Web",platform:"Web",locale:o,referrer:window.location.href,screenWidth:window.screen.width,...s};return n=q(a,d).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 Bd=({analyticsContext:t,clientKey:e,analyticsPath:o})=>{let r={channel:"Web",platform:"Web",info:[],errors:[],logs:[]};return{add:(n,a)=>{r[n].push(a)},run:n=>{let a=(s=>r.info.length||r.logs.length||r.errors.length?q({errorLevel:"silent",loadingContext:t,path:`${o}/${s}?clientKey=${e}`},r).then(()=>{}).catch(()=>{console.debug("### EventsQueue:::: send has failed")}):Promise.resolve(null))(n);return r.info=[],r.errors=[],r.logs=[],a},getQueue:()=>r}};function Xr(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var Ra=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,o){return this.storage[e]=o}removeItem(e){delete this.storage[e]}clear(){this.storage={}}constructor(){Xr(this,"storage",void 0),this.storage={}}},ao=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,o){Xr(this,"prefix","adyen-checkout__"),Xr(this,"key",void 0),Xr(this,"storage",void 0);try{if(this.storage=o?window[o]:window.localStorage,!this.storage)throw new Error("storage does not exist")}catch{this.storage=new Ra}this.key=this.prefix+e}};var jo=null,Ta=null,Ud=({locale:t,clientKey:e,analytics:o,analyticsContext:r})=>{let n={enabled:!0,...o},a=n.enabled?Hr.all:Hr.initial,s=Ld({analyticsContext:r,clientKey:e,locale:t,analyticsPath:ia}),d=new ao("checkout-attempt-id","sessionStorage"),c=Bd({analyticsContext:r,clientKey:e,analyticsPath:ia}),p=()=>jo?c.run(jo):Promise.resolve(null);return{setUp:async u=>{try{let l={checkoutStage:"checkout",...u},h=d.get(),m=(function(_){if(!_?.timestamp)return!1;let k=Date.now()-9e5;return _.timestamp>k})(h),{payload:g}=n,b=jl(n.analyticsData),C=m?h.id:b?.checkoutAttemptId,y={...l,...g,...b,...C&&{checkoutAttemptId:C},level:a};jo=await s(y),d.set({id:jo,timestamp:m?h.timestamp:Date.now()})}catch(l){console.warn(l)}},getCheckoutAttemptId:()=>jo,getEventsQueue:()=>c,getEnabled:()=>n.enabled,flush:()=>{p()},sendAnalytics:u=>a!==Hr.all?!1:(((l,h)=>{let m=l===ke.info?l:`${l}s`;c.add(`${m}`,h),l===ke.info&&(clearTimeout(Ta),Ta=setTimeout(()=>{p()},Ml)),l!==ke.log&&l!==ke.error||(clearTimeout(Ta),Ol(p)())})(u.getEventCategory(),u),!0)}};function Bt(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var Jr=class{get(e,o){let r=xl(this.translations,e,o);return r!==null?r:e}amount(e,o,r){return fd(e,this.locale,o,r)}date(e,o={}){if(e===void 0)return"";let r={year:"numeric",month:"2-digit",day:"2-digit",...o};return new Date(e).toLocaleDateString(this.locale,r)}dateTime(e){return e===void 0?"":this.timeAndDateFormatter.format(new Date(e))}constructor(e){Bt(this,"locale",void 0),Bt(this,"languageCode",void 0),Bt(this,"translations",void 0),Bt(this,"customTranslations",void 0),Bt(this,"timeFormatOptions",{hour:"numeric",minute:"numeric"}),Bt(this,"timeAndDateFormatOptions",{year:"numeric",month:"2-digit",day:"2-digit",...this.timeFormatOptions}),Bt(this,"timeAndDateFormatter",void 0);let{locale:o,translations:r,customTranslations:n}=e;if(!o)throw new v("IMPLEMENTATION_ERROR",'Language: "locale" property is not defined');this.locale=o,this.languageCode=this.locale.split("-")[0],this.customTranslations=n||{},this.timeAndDateFormatter=Intl.DateTimeFormat(this.locale,this.timeAndDateFormatOptions),this.translations={...r,...!!this.customTranslations[this.locale]&&this.customTranslations[this.locale]}}};var Vd="1.0.0",Hd="1.0.0",Ut="deviceFingerprint";var Yd={result:{type:Ut,value:"df-timedOut"},errorCode:"timeout"},zd={UNKNOWN:"unknownError"},Aa={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 Da(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var Qr=class extends U{getDfpPromise(){return new Promise((e,o)=>{this.processMessageHandler=Qt(this.postMessageDomain,e,o,Ut),window.addEventListener("message",this.processMessageHandler)})}componentDidMount(){this.deviceFingerPrintPromise=to(2e4,this.getDfpPromise(),Yd),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 f("div",{className:"adyen-checkout-risk__device-fingerprint"},f(We,{name:"dfIframe",src:e,allow:"geolocation; microphone; camera;",title:"devicefingerprinting iframe"}))}constructor(e){super(e),Da(this,"postMessageDomain",void 0),Da(this,"processMessageHandler",void 0),Da(this,"deviceFingerPrintPromise",void 0),this.postMessageDomain=Uo(this.props.loadingContext)||this.props.loadingContext}};var Kd=t=>({errorCode:t,message:Aa[t]||Aa[zd.UNKNOWN],type:Ut});var $o=class extends U{setStatusComplete(e){this.setState({status:"complete"},()=>{this.props.onComplete(e)})}render({loadingContext:e},{dfpURL:o}){return this.state.status==="retrievingFingerPrint"?f("div",{className:"adyen-checkout-risk__device-fingerprint--wrapper",style:{position:"absolute",width:0,height:0}},f(Qr,{loadingContext:e,dfpURL:o,onCompleteFingerprint:r=>{this.setStatusComplete(r)},onErrorFingerprint:r=>{this.props.onError(Kd(r.errorCode)),this.setStatusComplete(r.result)}})):null}constructor(e){super(e),e.clientKey&&(this.state={status:"retrievingFingerPrint",dfpURL:`${this.props.loadingContext}assets/html/${e.clientKey}/dfp.${Hd}.html`})}},wa,xa,Ia;Ia={onComplete:()=>{},onError:()=>{}},(xa="defaultProps")in(wa=$o)?Object.defineProperty(wa,xa,{value:Ia,enumerable:!0,configurable:!0,writable:!0}):wa[xa]=Ia;function so(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var io=class t extends Ze{formatProps(e){return{...e,risk:{...t.defaultProps.risk,...e.risk}}}get isValid(){return this.state.isValid}get data(){if(this.isValid){let e={version:Vd,...this.state.data};return ct.encode(JSON.stringify(e))}return!1}get enabled(){return this.props.risk.enabled}componentWillUnmount(){this.cleanUp()}render(){return f($o,{...this.props,loadingContext:this.props.loadingContext,onComplete:this.onComplete,onError:this.onError})}constructor(e,o){super(e,o),so(this,"nodeRiskContainer",null),so(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()}),so(this,"onError",n=>{this.props.risk.onError(n),this.cleanUp()}),so(this,"cleanUp",()=>{this.nodeRiskContainer&&this.nodeRiskContainer.parentNode&&this.nodeRiskContainer.parentNode.removeChild(this.nodeRiskContainer)});let r={[Ut]:null};this.setState({data:r}),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"}))}};so(io,"type","risk"),so(io,"defaultProps",{risk:{enabled:!0,onComplete:()=>{},onError:()=>{},node:"body"}});function ka(t){return!this.length||this.indexOf(t.type)>-1}function Na(t){return!this.length||this.indexOf(t.type)<0}function Gd(t){return!!t&&!!t.supportedShopperInteractions&&t.supportedShopperInteractions.includes("Ecommerce")}var Kp=["scheme","blik","twint","ach","cashapp","paybybank_AIS_DD","payto","paybybank_pix","eft_directdebit_CA"];function jd(t){return!!t&&!!t.type&&Kp.includes(t.type)}var Gp=t=>({...t,storedPaymentMethodId:t.id,isStoredPaymentMethod:!0}),$d=(t,{allowPaymentMethods:e=[],removePaymentMethods:o=[]})=>t?t.filter(ka,e).filter(Na,o):[],Wd=(t,{allowPaymentMethods:e=[],removePaymentMethods:o=[]})=>t?t.filter(jd).filter(ka,e).filter(Na,o).filter(Gd).map(Gp):[],Zd=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 qd(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var en=class{mapCreatedComponentType(e){return e==="card"?"scheme":e}has(e){return!!this.paymentMethods.find(o=>o.type===this.mapCreatedComponentType(e))}find(e){return this.paymentMethods.find(o=>o.type===this.mapCreatedComponentType(e))}constructor(e,o={}){qd(this,"paymentMethods",[]),qd(this,"storedPaymentMethods",[]),Zd(e),this.paymentMethods=e?$d(e.paymentMethods,o):[],this.storedPaymentMethods=e?Wd(e.storedPaymentMethods,o):[]}};var Oa=(t,e,o,r)=>{let n=e.getComponent(o);if(!n)throw Error(`Action Element of type ${o} not found in the registry`);return new n(t,{...r,id:`${o}-${qt()}`})},Wo=t=>(e,o,r,n)=>{let a={...n,...r,onError:n.onError,statusType:t,originalAction:r};return Oa(e,o,r.paymentMethodType,a)},Xd={redirect:(t,e,o,r)=>{let n={...r,...o,statusType:"redirect",originalAction:o};return Oa(t,e,"redirect",n)},threeDS2:(t,e,o,r)=>{let n=o.subtype==="fingerprint"?"threeDS2DeviceFingerprint":"threeDS2Challenge",a=o.subtype==="fingerprint"||r.isMDFlow?o.paymentData:o.authorisationToken,s={core:t,token:o.token,paymentData:a,onActionHandled:r.onActionHandled,onComplete:r.onComplete,onError:r.onError,isDropin:!!r.isDropin,loadingContext:r.loadingContext,clientKey:r.clientKey,paymentMethodType:r.paymentMethodType,challengeWindowSize:r.challengeWindowSize,isMDFlow:r.isMDFlow,modules:{analytics:r.modules?.analytics,resources:r.modules?.resources},...ld(o.subtype,r)};return Oa(t,e,n,s)},voucher:Wo("custom"),qrCode:Wo("custom"),await:Wo("custom"),bankTransfer:Wo("custom"),sdk:Wo("custom")};function Jd(t,e,o,r={}){let n=Xd[o.type];if(n&&typeof n=="function")return n(t,e,o,r);throw new Error("Invalid Action")}function Qd(t,e){let o=`${"v1"}/sessions/${e.id}/payments?clientKey=${e.clientKey}`,r={sessionData:e.data,...t};return q({loadingContext:e.loadingContext,path:o,errorLevel:"fatal",errorCode:pt.makePayments},r)}function ec(t,e){let o=`${"v1"}/sessions/${e.id}/paymentDetails?clientKey=${e.clientKey}`,r={...e.data&&{sessionData:e.data},...t};return q({loadingContext:e.loadingContext,path:o,errorLevel:"fatal",errorCode:pt.submitPaymentDetails},r)}function tc(t,e){let o=`${"v1"}/sessions/${t.id}/setup?clientKey=${t.clientKey}`,r={browserInfo:e.browserInfo,sessionData:t.data,...e.order?{order:{orderData:e.order.orderData,pspReference:e.order.pspReference}}:{}};return q({loadingContext:t.loadingContext,path:o,errorLevel:"fatal"},r)}function oc(t,e){let o=`${"v1"}/sessions/${e.id}/paymentMethodBalance?clientKey=${e.clientKey}`,r={sessionData:e.data,...t};return q({loadingContext:e.loadingContext,path:o,errorLevel:"fatal"},r)}function rc(t){let e=`${"v1"}/sessions/${t.id}/orders?clientKey=${t.clientKey}`,o={sessionData:t.data};return q({loadingContext:t.loadingContext,path:e,errorLevel:"fatal",errorCode:pt.createOrder},o)}function nc(t){if(!t||!t.id)throw new v("IMPLEMENTATION_ERROR","Invalid session");let{shopperLocale:e,shopperEmail:o,telephoneNumber:r,id:n}=t;return{id:n,...t.sessionData?{sessionData:t.sessionData}:{},...e&&{shopperLocale:e},...o&&{shopperEmail:o},...r&&{telephoneNumber:r}}}function ac(t,e){let o=`${"v1"}/sessions/${e.id}/orders/cancel?clientKey=${e.clientKey}`,r={sessionData:e.data,order:t};return q({loadingContext:e.loadingContext,path:o,errorLevel:"fatal"},r)}function Zo(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var tn=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 o={...e,browserInfo:it()};return tc(this,o).then(r=>(r.configuration&&(this.configuration={...r.configuration}),r.sessionData&&this.updateSessionData(r.sessionData),r))}submitPayment(e){return Qd(e,this).then(o=>(o.sessionData&&this.updateSessionData(o.sessionData),o))}submitDetails(e){return ec(e,this).then(o=>(o.sessionData&&this.updateSessionData(o.sessionData),o))}checkBalance(e){return oc(e,this).then(o=>(o.sessionData&&this.updateSessionData(o.sessionData),o))}createOrder(){return rc(this).then(e=>(e.sessionData&&this.updateSessionData(e.sessionData),e))}cancelOrder(e){return ac(e.order,this).then(o=>(o.sessionData&&this.updateSessionData(o.sessionData),o))}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,o,r){Zo(this,"session",void 0),Zo(this,"storage",void 0),Zo(this,"clientKey",void 0),Zo(this,"loadingContext",void 0),Zo(this,"configuration",void 0);let n=nc(e);if(!o)throw new Error("No clientKey available");if(!r)throw new Error("No loadingContext available");this.storage=new ao("session","localStorage"),this.clientKey=o,this.loadingContext=r,this.session=n,this.session.sessionData?this.storeSession():this.session=this.getStoredSession()}};function Ma(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var on=class{getImage(e={}){return this.getImageUrl({...e,resourceContext:this.resourceContext})}constructor(e){if(Ma(this,"resourceContext",void 0),Ma(this,"returnImage",({name:o,resourceContext:r,imageFolder:n="",parentFolder:a="",extension:s,size:d="",subFolder:c=""})=>`${r}images/${n}${c}${a}${o}${d}.${s}`),Ma(this,"getImageUrl",({resourceContext:o,extension:r="svg",...n})=>a=>{let s={extension:r,resourceContext:o,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 sc({setComponentRef:t}){let e=tt({});Object.keys(e.current).length||t?.(e.current);let[o,r]=ye(null);return e.current.setMessages=n=>{r(n)},o?f(et,null,o.map(n=>f("div",{key:n,className:"adyen-checkout-sr-panel__msg"},n))):null}function Ye(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var lo=class extends Ze{get enabled(){return this._enabled}get moveFocus(){return this._moveFocus}setAriaProps(e){let o=document.querySelector('[class^="adyen-checkout-sr-panel"]');for(let[r,n]of Object.entries(e))o.setAttribute(r,n);this.props={...this.props,ariaAttributes:{...this.props.ariaAttributes,...e}}}render(){return this.props.enabled?f("div",{className:this.showPanel?"adyen-checkout-sr-panel":"adyen-checkout-sr-panel--sr-only",role:"log",...this.props.ariaAttributes},f(sc,{setComponentRef:this.setComponentRef})):null}constructor(e,o){if(super(e,o),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",r=>{this.componentRef=r}),Ye(this,"setMessages",r=>{if(!this.props.enabled)return;let n=null;r&&(n=Array.isArray(r)?r:[r]),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 r=document.querySelector(this.props.node);if(!r)throw new Error("Component could not mount. Root node was not found.");{let n=document.getElementById(this.id);n&&r.removeChild(n),this.srPanelContainer=document.createElement("div"),this.srPanelContainer.className="sr-panel-holder",this.srPanelContainer.id=this.id,r.appendChild(this.srPanelContainer),this.mount(this.srPanelContainer)}}}};Ye(lo,"type","srPanel"),Ye(lo,"defaultProps",{enabled:!0,node:"body",showPanel:!1,id:"ariaLiveSRPanel",ariaAttributes:{"aria-relevant":"all","aria-live":"polite","aria-atomic":"true"}});function ic(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var jp={[J.redirect]:ft,[J.threeDS2Challenge]:oo,[J.threeDS2DeviceFingerprint]:no},co=new class{add(...t){this.componentsMap={...this.componentsMap,...this.createComponentsMap(t)}}getComponent(t){return this.componentsMap[t]||(this.supportedTxVariants.has(t)?void 0:ft)}createComponentsMap(t){return t.reduce((e,o)=>{var r;return typeof(r=o).type=="string"&&r.type?(o.type==="dropin"||[o.type,...o.txVariants].filter(n=>n).forEach(n=>{e={...e,[n]:o}}),e):(console.error("CoreRegistry: Attempt to register Class failed. The Class is not a valid UIElement"),e)},{})}constructor(){ic(this,"componentsMap",jp),ic(this,"supportedTxVariants",new Set(Object.values(J)))}};var lc="en-US";async function dc(t,e,o){try{return await aa({loadingContext:t,errorLevel:"fatal",errorMessage:`Translations: Failed to fetch translations for locale "${o}"`,path:`sdk/${e}/translations/${o}.json`})}catch{return await aa({loadingContext:t,errorLevel:"fatal",errorMessage:`Translations: Couldn't fetch translation for locale "${o}" nor the fallback translation "en-US"`,path:`sdk/${e}/translations/en-US.json`})}}var cc={exposeLibraryMetadata:!0,showPayButton:!0};function _e(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var yt=class t{static setBundleType(e){t.metadata.bundleType=e}static register(...e){co.add(...e)}register(...e){co.add(...e)}getComponent(e){return co.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:o,shopperLocale:r,countryCode:n,paymentMethods:a,...s}=e;return this.setOptions({...s,amount:this.options.order?this.options.order.remainingAmount:o,locale:this.options.locale||r,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 dc(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(Jn,"You must specify a countryCode when initializing checkout.");this.options.locale||this.setOptions({locale:lc}),this.options.locale=ra(this.options.locale),this.options.translations=wl(this.options.translations)}submitDetails(e){let o=null;this.options.onAdditionalDetails&&(o=new Promise((r,n)=>{this.options.onAdditionalDetails({data:e},void 0,{resolve:r,reject:n})})),this.session&&(o=this.session.submitDetails(e).catch(r=>(this.options.onError?.(r),Promise.reject(r)))),o?o.then(qe).then(Xe).then(this.afterAdditionalDetails).then(r=>{Xt(r),this.options.onPaymentCompleted?.(r)}).catch(r=>{r instanceof dt||(Xt(r),this.options.onPaymentFailed?.(r))}):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,o={}){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 r=e.type===Ae?`${e.type}${e.subtype}`:e.paymentMethodType,n=new me({type:Ll,subType:e.type,message:`${r} action was handled by the SDK`,component:r});this.modules.analytics.sendAnalytics(n);let a={...this.getCorePropsForComponent(),...o};return Jd(this,co,e,a)}return this.handleCreateError()}getCorePropsForComponent(){return{...Md(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 o=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(o)}createPaymentMethodsList(e){this.paymentMethodsResponse=new en(this.options.paymentMethodsResponse||e,this.options)}async createCoreModules(){if(this.modules)return;let e=await this.fetchLocaleTranslations();this.modules=Object.freeze({risk:new io(this,{...this.options,loadingContext:this.loadingContext}),analytics:Ud({analyticsContext:this.analyticsContext,clientKey:this.options.clientKey,locale:this.options.locale,analytics:this.options.analytics}),resources:new on(this.cdnImagesUrl),i18n:new Jr({locale:this.options.locale,translations:e,customTranslations:this.options.translations}),srPanel:new lo(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",d=>{if(this.options.afterAdditionalDetails&&d?.action){let c=this.createFromAction(d.action);return this.options.afterAdditionalDetails(c),Promise.reject(new dt("Handled by afterAdditionalDetails"))}return Promise.resolve(d)}),_e(this,"update",(d={})=>(this.setOptions(d),this.initialize().then(()=>(this.components.forEach(c=>{let p={...d,...this.session&&{session:this.session}};c.update(p)}),this)))),_e(this,"remove",d=>(this.components=this.components.filter(c=>c._id!==d._id),d.unmount(),this)),_e(this,"setOptions",d=>{this.options={...this.options,...d,locale:d?.locale||this.options?.locale}}),Fd(e),this.createFromAction=this.createFromAction.bind(this),this.setOptions({...cc,...e});let{apiUrl:o,analyticsUrl:r,cdnImagesUrl:n,cdnTranslationsUrl:a}=Od(this.options.environment,this.options._environmentUrls);this.loadingContext=o,this.analyticsContext=r,this.cdnImagesUrl=n,this.cdnTranslationsUrl=a,this.session=this.options.session&&new tn(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(yt,"metadata",{version:Lr,bundleType:"esm"}),_e(yt,"registry",co);async function Me(t){return await new yt(t).initialize()}Me.register=(...t)=>{yt.register(...t)},Me.setBundleType=t=>{yt.setBundleType(t)};var $p=()=>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)"})))),rn=$p;var Wp=()=>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"}))))),gt=Wp;var Zp=({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"})),nn=Zp;function pc({brand:t,brandName:e,isSelected:o,onBrandClick:r}){let n=a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),a.currentTarget.click())};return i("span",{className:"straumur__card-component__dual-branding--logo"+(o?" straumur__card-component__dual-branding--logo--selected":""),title:t,"data-value":t,onClick:r,onKeyDown:n,role:"radio","aria-checked":o,"aria-label":e??t,tabIndex:0},i("div",{className:"straumur__card-component__dual-branding--logo--item"},i(pr,{brand:t,defaultToBrandName:!1}),"\xA0",e??""),o&&i(nn,{color:"var(--straumur__color-neon-green-zeta)"}))}function uc({dualBrandConfiguration:t,selectedBrand:e,onBrandClick:o}){return i("div",{className:"straumur__card-component__dual-branding",role:"radiogroup","aria-label":"Card brand"},i(pc,{brand:t.brand1,brandName:t.brand1Name,isSelected:e===t.brand1,onBrandClick:o}),i(pc,{brand:t.brand2,brandName:t.brand2Name,isSelected:e===t.brand2,onBrandClick:o}))}var qp=["AuthenticationFinished","AuthenticationNotRequired","Authorised","Cancelled","ChallengeShopper","Error","IdentifyShopper","PartiallyAuthorised","Pending","PresentToShopper","Received","RedirectShopper","Refused"];function Fa(t){return t&&qp.includes(t)?t:"Error"}var ve=class extends Error{messageKey;messageText;constructor(e,o){super(o??e),this.messageKey=e,this.messageText=o}};function qo(t,e){return t instanceof ve?t.messageText?{text:t.messageText}:{key:t.messageKey}:{key:e}}function mc(t,e){return{async submitPayment(o){let r={...o,sessionId:e},n=await ns(t,r);if(!n.ok)throw new ve("error.failedToSubmitPayment");let a=await n.json();if(!a.resultCode)throw new ve("error.paymentFailed");return{resultCode:a.resultCode,action:a.action}},async submitAdditionalDetails(o){let r={...o,sessionId:e},n=await as(t,r);if(!n.ok)throw new ve("error.failedToSubmitPaymentDetails");let a=await n.json();if(!a.resultCode)throw new ve("error.paymentDetailsFailed");return{resultCode:a.resultCode,action:a.action}},async disableToken(o){let n=await ss(t,{storedPaymentMethodId:o,sessionId:e});if(!n.ok)throw new ve("error.failedToSubmitRemoveStoredPaymentCard");if(!(await n.json()).success)throw new ve("error.failedToRemoveStoredPaymentCard")}}}function hc(t){function e(n,a,s,d){let c=p=>s(p instanceof ve?p:new ve(d));try{Promise.resolve(n(a,s)).catch(c)}catch(p){c(p)}}let o={submitPayment(n){return new Promise((a,s)=>{e((d,c)=>t.onSubmit({data:n},{resolve:d,reject:p=>c(new ve("error.failedToSubmitPayment",p))}),a,s,"error.failedToSubmitPayment")})},submitAdditionalDetails(n){return new Promise((a,s)=>{e((d,c)=>t.onAdditionalDetails({data:n},{resolve:d,reject:p=>c(new ve("error.failedToSubmitPaymentDetails",p))}),a,s,"error.failedToSubmitPaymentDetails")})},beforeSubmit:t.onBeforeSubmit},{onDisableToken:r}=t;return r&&(o.disableToken=n=>new Promise((a,s)=>{e((d,c)=>r({storedPaymentMethodId:n},{resolve:()=>d(),reject:()=>c(new ve("error.failedToRemoveStoredPaymentCard"))}),a,s,"error.failedToSubmitRemoveStoredPaymentCard")})),o}async function La(t){let{beforeSubmit:e}=t;return!e||await e()}async function an(t,e){e()&&await La(t)&&e()?.submit()}function Ba(t){return(e,o)=>{let{beforeSubmit:r}=t;if(!r){e();return}let n=r();if(n instanceof Promise){n.then(a=>a?e():o()).catch(()=>o());return}if(n){e();return}o()}}var Xp=["Refused","Cancelled","Error"];function Ct(t){let{configuration:e,handleSuccess:o,handleError:r,setThreeDSecureActive:n,enrichSubmitData:a,onSubmitStart:s,dispatchResultFromAdditionalDetails:d}=t,c;function p(){return c?{text:c}:{key:"error.paymentUnsuccessful"}}function u(b){b==="Authorised"?o({key:"success.paymentAuthorized"}):r(p()),Xp.includes(b)?e.onPaymentFailed?.({resultCode:b}):e.onPaymentCompleted?.({resultCode:b})}async function l(b,C,y){s?.();let{paymentFlow:_}=e;if(!await La(_)){y.reject();return}try{let k=a?a(b.data):b.data,{resultCode:E,action:H,errorMessage:M}=await _.submitPayment(k);c=M,(E==="ChallengeShopper"||E==="IdentifyShopper")&&n(!0),y.resolve({resultCode:E,action:H})}catch(k){y.reject(),r(qo(k,"error.failedToSubmitPayment"))}}async function h(b,C,y){try{let{resultCode:_,action:k,errorMessage:E}=await e.paymentFlow.submitAdditionalDetails(b.data);c=E,y.resolve({resultCode:_,action:k}),d&&u(_)}catch(_){y.reject(),r(qo(_,"error.failedToSubmitPaymentDetails")),d&&e.onPaymentFailed?.({resultCode:"Error"})}}function m(b,C){u(Fa(b.resultCode))}function g(b,C){u(b?Fa(b.resultCode):"Error")}return{handleOnSubmit:l,handleOnSubmitAdditionalData:h,handlePaymentCompleted:m,handlePaymentFailed:g}}function po(t,e,o){le(()=>{e()&&o()},[t])}function sn(t,e){le(()=>{e&&t.current?.focus()},[e,t])}var fc="(prefers-color-scheme: dark)";function Jp(){return typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia(fc).matches:!1}function uo(t){let[e,o]=w(Jp);return le(()=>{if(t!=="system"||typeof window>"u"||typeof window.matchMedia!="function")return;let r=window.matchMedia(fc),n=a=>o(a.matches);return o(r.matches),r.addEventListener("change",n),()=>r.removeEventListener("change",n)},[t]),t==="system"?e?"dark":"light":t}function ln(t){return t==="dark"?{base:{color:"#e8edf2"},placeholder:{color:"#9aa7b5"},error:{color:"#e08a8a"}}:{base:{color:"#00112c"},placeholder:{color:"#72889d"},error:{color:"#d96666"}}}function Qp({configuration:t,paymentMethods:e,onBrandHidden:o}){let r=ue(null),n=ue(),a=ue(),{i18n:s}=Se(),[d,c]=w(!0),[p,u]=w("required"),[l,h]=w(!1),[m,g]=w(!1),[b,C]=w(null),[y,_]=w(null),k=ue(!1),[E,H]=w({encryptedCardNumber:{visible:!1},encryptedExpiryDate:{visible:!1},encryptedSecurityCode:{visible:!1}}),{activePaymentMethod:M,isPaymentMethodInitialized:K,updatePaymentMethodInitialization:ee,handleSuccess:F,handleError:O,setThreeDSecureActive:L,threeDSecureActive:pe,isObscuredByThreeDS:Ee,hasCard:Vt,registerSubmitHandler:W,unregisterSubmitHandler:Je}=ae(),bt=uo(t.theme);async function mo(){await an(t.paymentFlow,()=>a.current)}le(()=>{if(!(M==="card"&&K.card)){t.onCardValidityChanged?.(!1,!1);return}return W(mo),()=>{Je(mo),t.onCardValidityChanged?.(!1,!1)}},[M,K.card,W,Je]);let ho=e.paymentMethods?.paymentMethods?.find(N=>N.type==="scheme")?.brands??[],{handleOnSubmit:_n,handleOnSubmitAdditionalData:Xo,handlePaymentCompleted:yn,handlePaymentFailed:gn}=Ct({configuration:t,handleSuccess:F,handleError:O,setThreeDSecureActive:L,enrichSubmitData:N=>({...N,storePaymentMethod:k.current})});function Cn(N,te){O({key:"error.unknownError"})}let Jo=async()=>{a.current?.remove(),n.current=await Me({clientKey:e.clientKey,environment:t.environment,locale:t.locale,countryCode:t.countryCode,paymentMethodsResponse:e.paymentMethods,amount:{value:e.minorUnitsAmount,currency:e.currency},onSubmit:_n,onAdditionalDetails:Xo,onError:Cn,onPaymentCompleted:yn,onPaymentFailed:gn}),a.current=new He(n.current,{brands:ho,placeholders:t.placeholders,styles:ln(bt),challengeWindowSize:"05",onBinLookup:N=>{N.supportedBrandsRaw&&N.supportedBrandsRaw.length>1&&(g(!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(u(N.cvcPolicy),N.brand==="card"){o([]),_(null);return}let te=ho.filter(re=>re!==N.brand).map(re=>({brand:re}));o(te),ho.filter(re=>re===N.brand).map(re=>({brand:re})).length===1&&_(N.brand)},onConfigSuccess(){ee("card",!0)},onValidationError:N=>{let te={encryptedCardNumber:{visible:!1,message:void 0},encryptedExpiryDate:{visible:!1,message:void 0},encryptedSecurityCode:{visible:!1,message:void 0}};N.filter(re=>re.error).forEach(re=>{te[re.fieldType].visible=!0,te[re.fieldType].message=re.errorI18n}),H(te)},onAllValid:N=>{c(!N.allValid),t.onCardValidityChanged?.(N.allValid,!0)}}),r.current&&a.current.mount(r.current)};le(()=>{Vt&&M==="card"&&!K.card&&Jo()},[t,M]),po(t,()=>!!(a.current&&K.card),()=>{Jo(),H({encryptedCardNumber:{visible:!1,message:void 0},encryptedExpiryDate:{visible:!1,message:void 0},encryptedSecurityCode:{visible:!1,message:void 0}})}),le(()=>{k.current=l},[l]);function Ha(N){a.current.dualBrandingChangeHandler(N)}function vn(N){h(N.currentTarget.checked)}return sn(r,pe&&M==="card"),!Vt||Ee("card")||e.paymentMethods?.paymentMethods?.length===0?null:i("div",{className:"straumur__card-component__expandable",ref:r,tabIndex:-1,style:{height:pe?"600px":"auto",minWidth:pe?"350px":"auto"}},!K.card&&i("div",{className:"straumur__card-component__loading-text"},i(gt,null)),i("div",{className:"straumur__card-component__form",style:{opacity:K.card&&!pe?1:0,position:K.card&&!pe?"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"},(p==="optional"||p==="required")&&i(ne,null,i("label",{className:`straumur__card-component__form--wrapper--label ${E.encryptedSecurityCode.visible?"straumur__card-component__form--wrapper--label--error":""}`},p==="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"))},i(rn,null)))))),m&&b&&i(uc,{dualBrandConfiguration:b,selectedBrand:y,onBrandClick:Ha}),e.enableStoreDetails==="AskForConsent"&&i("label",{className:"straumur__card-component__form--wrapper--label-checkbox"},i("div",{className:`straumur__card-component__form--wrapper--label-checkbox--checkmark ${l?"straumur__card-component__form--wrapper--label-checkbox--checkmark--checked":""}`},i("div",{className:`straumur__card-component__form--wrapper--label-checkbox--checkmark--icon ${l?"straumur__card-component__form--wrapper--label-checkbox--checkmark--icon--checked":""}`},i(nn,null))),i("input",{type:"checkbox",className:"straumur__card-component__form--wrapper--label-checkbox--checkbox",checked:l,onChange:vn}),s.t("cards.storePaymentMethod")),!t.hideSubmitButton&&i("button",{className:"straumur__card-component__submit-button",disabled:d,onClick:mo},e.minorUnitsAmount===0?s.t("cards.saveCardDetails"):e.formattedAmount)))}var _c=Qp;Y(`.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-blue-beta);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-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
8
|
`);function eu({icon:t,title:e,isActive:o,isSole:r,onChange:n,children:a,headerRight:s,confirmSection:d}){return i("label",{className:`straumur__payment-method-item${r?" straumur__payment-method-item--sole":""}`},!r&&i("input",{type:"radio",className:"straumur__payment-method-item__radio-selector",checked:o,onChange:n}),i("span",{className:`straumur__payment-method-item__content${r?" straumur__payment-method-item__content--expanded":""}`},!r&&i("span",{className:"straumur__payment-method-item--circle"}),t,i("span",{className:"straumur__payment-method-item--title"},e),s),d,i("div",{className:`straumur__payment-method-item__expandable${r?" straumur__payment-method-item__expandable--visible":""}`},a))}var vt=eu;function tu({configuration:t,paymentMethods:e}){let{i18n:o}=Se(),[r,n]=w([]),{activePaymentMethod:a,setActivePaymentMethod:s,isObscuredByThreeDS:d,isSolePaymentMethod:c,hasCard:p}=ae();if(!p||d("card"))return null;let l=e.paymentMethods.paymentMethods.find(h=>h.type==="scheme").brands.map(h=>({brand:h,brandFullName:h}));return i(vt,{icon:i(Ps,null),title:o.t("cards.title"),isActive:a==="card",isSole:c,onChange:()=>s("card"),headerRight:i("span",{className:"straumur__card-component--brands"},i(ur,{brands:l,brandHidden:r}))},i(_c,{configuration:t,paymentMethods:e,onBrandHidden:n}))}var yc=tu;Y(`.adyen-checkout__paywithgoogle{height:var(--straumur__space-8xlg)}
|
|
9
9
|
`);var ou=()=>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"})),gc=ou;Y(`.straumur__google-pay-button__loading{display:flex;justify-content:center}
|
|
10
|
-
`);var Cc="CANCEL";var ru={applepay:{loadingClassName:"straumur__apple-pay-button__loading",createElement(t,{configuration:e,paymentMethods:o,walletConfig:r,handleOnSubmit:n}){let a={amount:{value:o.minorUnitsAmount,currency:o.currency},environment:e.environment,onSubmit:n,onClick:Ba(e.paymentFlow),configuration:{...r,merchantName:o.merchantName}};return new Lt(t,a)}},googlepay:{loadingClassName:"straumur__google-pay-button__loading",createElement(t,{configuration:e,paymentMethods:o,walletConfig:r,handleOnSubmit:n}){let a={amount:{value:o.minorUnitsAmount,currency:o.currency},challengeWindowSize:"05",countryCode:e.countryCode,environment:e.environment,onSubmit:n,onClick:Ba(e.paymentFlow),buttonSizeMode:"fill",configuration:{...r,merchantName:o.merchantName}};return new ht(t,a)}}};function nu({method:t,configuration:e,paymentMethods:o,isInstantPayment:r,onUnavailable:n}){let a=ru[t],s=ue(null),d=ue(),c=ue(),{isPaymentMethodInitialized:p,updatePaymentMethodInitialization:u,handleSuccess:l,handleError:h,setThreeDSecureActive:m,threeDSecureActive:g,isObscuredByThreeDS:b,setActivePaymentMethod:C,activePaymentMethod:y}=ae(),{handleOnSubmit:_,handleOnSubmitAdditionalData:k,handlePaymentCompleted:E,handlePaymentFailed:H}=Ct({configuration:e,handleSuccess:l,handleError:h,setThreeDSecureActive:m,onSubmitStart:()=>{r&&C(t)}});function M(F,O){F.name!==Cc&&h({key:"error.unknownError"})}function K(){u(t,!0),y===t&&C(null),n?.()}let ee=async()=>{d.current=await Me({clientKey:o.clientKey,environment:e.environment,locale:e.locale,countryCode:e.countryCode,paymentMethodsResponse:o.paymentMethods,amount:{value:o.minorUnitsAmount,currency:o.currency},onError:M,onAdditionalDetails:k,onPaymentCompleted:E,onPaymentFailed:H});let O=o.paymentMethods.paymentMethods?.find(L=>L.type===t)?.configuration;if(!O){K();return}c.current=a.createElement(d.current,{configuration:e,paymentMethods:o,walletConfig:O,handleOnSubmit:_}),c.current.isAvailable().then(()=>{c.current.mount(s.current),u(t,!0)}).catch(()=>{K()})};return le(()=>{p[t]||ee()},[e]),po(e,()=>!!(c.current&&p[t]),()=>{c.current.remove(),ee()}),b(t)?null:i(ne,null,p[t]===!1&&i("div",{className:a.loadingClassName},i(gt,null)),i("div",{ref:s,style:{height:g?"600px":"auto",minWidth:g?"350px":"auto",position:p[t]?"static":"absolute"}}))}var dn=nu;function au(t){return i(dn,{method:"googlepay",...t})}var cn=au;function su({configuration:t,paymentMethods:e}){let{i18n:o}=Se(),{activePaymentMethod:r,setActivePaymentMethod:n,isObscuredByThreeDS:a,isSolePaymentMethod:s,hasGooglePay:d}=ae(),[c,p]=w(!1);return!d||c||t.instantPayments&&t.instantPayments.some(u=>u==="googlepay")||a("googlepay")?null:i(vt,{icon:i(gc,null),title:o.t("googlePay.title"),isActive:r==="googlepay",isSole:s,onChange:()=>n("googlepay")},i(cn,{configuration:t,paymentMethods:e,isInstantPayment:!1,onUnavailable:()=>p(!0)}))}var vc=su;Y("");var iu=()=>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"})),bc=iu;Y(`.straumur__apple-pay-button__loading{display:flex;justify-content:center}
|
|
10
|
+
`);var Cc="CANCEL";var ru={applepay:{loadingClassName:"straumur__apple-pay-button__loading",createElement(t,{configuration:e,paymentMethods:o,walletConfig:r,handleOnSubmit:n}){let a={amount:{value:o.minorUnitsAmount,currency:o.currency},environment:e.environment,onSubmit:n,onClick:Ba(e.paymentFlow),configuration:{...r,merchantName:o.merchantName}};return new Lt(t,a)}},googlepay:{loadingClassName:"straumur__google-pay-button__loading",createElement(t,{configuration:e,paymentMethods:o,walletConfig:r,handleOnSubmit:n}){let a={amount:{value:o.minorUnitsAmount,currency:o.currency},challengeWindowSize:"05",countryCode:e.countryCode,environment:e.environment,onSubmit:n,onClick:Ba(e.paymentFlow),buttonSizeMode:"fill",buttonRadius:12,configuration:{...r,merchantName:o.merchantName}};return new ht(t,a)}}};function nu({method:t,configuration:e,paymentMethods:o,isInstantPayment:r,onUnavailable:n}){let a=ru[t],s=ue(null),d=ue(),c=ue(),{isPaymentMethodInitialized:p,updatePaymentMethodInitialization:u,handleSuccess:l,handleError:h,setThreeDSecureActive:m,threeDSecureActive:g,isObscuredByThreeDS:b,setActivePaymentMethod:C,activePaymentMethod:y}=ae(),{handleOnSubmit:_,handleOnSubmitAdditionalData:k,handlePaymentCompleted:E,handlePaymentFailed:H}=Ct({configuration:e,handleSuccess:l,handleError:h,setThreeDSecureActive:m,onSubmitStart:()=>{r&&C(t)}});function M(F,O){F.name!==Cc&&h({key:"error.unknownError"})}function K(){u(t,!0),y===t&&C(null),n?.()}let ee=async()=>{d.current=await Me({clientKey:o.clientKey,environment:e.environment,locale:e.locale,countryCode:e.countryCode,paymentMethodsResponse:o.paymentMethods,amount:{value:o.minorUnitsAmount,currency:o.currency},onError:M,onAdditionalDetails:k,onPaymentCompleted:E,onPaymentFailed:H});let O=o.paymentMethods.paymentMethods?.find(L=>L.type===t)?.configuration;if(!O){K();return}c.current=a.createElement(d.current,{configuration:e,paymentMethods:o,walletConfig:O,handleOnSubmit:_}),c.current.isAvailable().then(()=>{c.current.mount(s.current),u(t,!0)}).catch(()=>{K()})};return le(()=>{p[t]||ee()},[e]),po(e,()=>!!(c.current&&p[t]),()=>{c.current.remove(),ee()}),b(t)?null:i(ne,null,p[t]===!1&&i("div",{className:a.loadingClassName},i(gt,null)),i("div",{ref:s,style:{height:g?"600px":"auto",minWidth:g?"350px":"auto",position:p[t]?"static":"absolute"}}))}var dn=nu;function au(t){return i(dn,{method:"googlepay",...t})}var cn=au;function su({configuration:t,paymentMethods:e}){let{i18n:o}=Se(),{activePaymentMethod:r,setActivePaymentMethod:n,isObscuredByThreeDS:a,isSolePaymentMethod:s,hasGooglePay:d}=ae(),[c,p]=w(!1);return!d||c||t.instantPayments&&t.instantPayments.some(u=>u==="googlepay")||a("googlepay")?null:i(vt,{icon:i(gc,null),title:o.t("googlePay.title"),isActive:r==="googlepay",isSole:s,onChange:()=>n("googlepay")},i(cn,{configuration:t,paymentMethods:e,isInstantPayment:!1,onUnavailable:()=>p(!0)}))}var vc=su;Y("");var iu=()=>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"})),bc=iu;Y(`.straumur__apple-pay-button__loading{display:flex;justify-content:center}
|
|
11
11
|
`);function lu(t){return i(dn,{method:"applepay",...t})}var pn=lu;function du({configuration:t,paymentMethods:e}){let{i18n:o}=Se(),{activePaymentMethod:r,setActivePaymentMethod:n,isObscuredByThreeDS:a,isSolePaymentMethod:s,hasApplePay:d}=ae(),[c,p]=w(!1);return!d||c||t.instantPayments&&t.instantPayments.some(u=>u==="applepay")||a("applepay")?null:i(vt,{icon:i(bc,null),title:o.t("applePay.title"),isActive:r==="applepay",isSole:s,onChange:()=>n("applepay")},i(pn,{configuration:t,paymentMethods:e,isInstantPayment:!1,onUnavailable:()=>p(!0)}))}var Ec=du;Y(`.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-white);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-secondary);border:1px solid var(--straumur__color-border);cursor:not-allowed}
|
|
12
12
|
`);var cu=()=>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"})))),Sc=cu;function pu({configuration:t,paymentMethods:e,storedPaymentMethod:o,onStoredCardRemoved:r}){let n=ue(null),a=ue(),s=ue(),{i18n:d}=Se(),[c,p]=w(!0),[u,l]=w("required"),[h,m]=w(!1),[g,b]=w({encryptedSecurityCode:{visible:!1}}),{activePaymentMethod:C,setActivePaymentMethod:y,activeStoredPaymentMethodId:_,setActiveStoredPaymentMethodId:k,isStoredCardInitialized:E,updateStoredCardInitialization:H,handleSuccess:M,handleError:K,setThreeDSecureActive:ee,threeDSecureActive:F,isSolePaymentMethod:O,registerSubmitHandler:L,unregisterSubmitHandler:pe}=ae(),Ee=O?C==="storedcard":C==="storedcard"&&_===o.id,Vt=uo(t.theme);async function W(){await an(t.paymentFlow,()=>s.current)}le(()=>{if(!(Ee&&E[o.id])){t.onCardValidityChanged?.(!1,!1);return}return L(W),()=>{pe(W),t.onCardValidityChanged?.(!1,!1)}},[Ee,E[o.id],L,pe]);let{handleOnSubmit:Je,handleOnSubmitAdditionalData:bt,handlePaymentCompleted:mo,handlePaymentFailed:ho}=Ct({configuration:t,handleSuccess:M,handleError:K,setThreeDSecureActive:ee,enrichSubmitData:te=>({...te,paymentMethod:{...te.paymentMethod,storedPaymentMethodId:o.id}})});function _n(te,re){K({key:"error.unknownError"})}let Xo=async()=>{a.current=await Me({clientKey:e.clientKey,environment:t.environment,locale:t.locale,countryCode:t.countryCode,amount:{value:e.minorUnitsAmount,currency:e.currency},paymentMethodsResponse:e.paymentMethods,onError:_n,onAdditionalDetails:bt,onPaymentCompleted:mo,onPaymentFailed:ho}),s.current=new He(a.current,{brands:[o.brand],styles:ln(Vt),onSubmit:Je,onConfigSuccess(){H(o.id,!0)},onBrand:te=>{l(te.cvcPolicy)},onValidationError:te=>{let re={encryptedSecurityCode:{visible:!1,message:void 0}};te.filter(fo=>fo.error).forEach(fo=>{re[fo.fieldType].visible=!0,re[fo.fieldType].message=fo.errorI18n}),b(re)},onAllValid:te=>{p(!te.allValid),t.onCardValidityChanged?.(te.allValid,!0)},placeholders:t.placeholders,challengeWindowSize:"05"}),n.current&&s.current.mount(n.current)};if(le(()=>{Ee&&!E[o.id]&&Xo()},[t,Ee]),po(t,()=>!!(s.current&&E[_]),()=>{Xo(),b({encryptedSecurityCode:{visible:!1,message:void 0}})}),le(()=>{m(!1)},[C,_]),sn(n,F&&Ee),F&&!Ee)return null;function yn(){y("storedcard"),k(o.id)}function gn(){m(!0)}function Cn(){m(!1)}async function Jo(){let{disableToken:te}=t.paymentFlow;if(te)try{await te(o.id),r(o.id)}catch(re){K(qo(re,"error.failedToSubmitRemoveStoredPaymentCard"))}}let vn=t.paymentFlow.disableToken!==void 0&&Ee&&E[o.id]?i("div",{className:"straumur__stored-card-component__remove-stored-card-button"},i("button",{onClick:gn,className:"straumur__stored-card-component__remove-stored-card-button--text",disabled:h},d.t("stored-cards.removeStoredCard"))):null,N=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(Sc,null),i("span",{className:"straumur__stored-card-component__confirm-remove-stored-card--header--title"},d.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:Jo},d.t("stored-cards.removeStoredCardQuestionYesRemove")),i("button",{className:"straumur__stored-card-component__confirm-remove-stored-card--actions--button",onClick:Cn},d.t("stored-cards.removeStoredCardQuestionCancel"))));return i(vt,{icon:i(ur,{brands:[{brand:o.brand,brandFullName:o.name}]}),title:`\u2022\u2022\u2022\u2022 ${o.lastFour}`,isActive:Ee,isSole:O,onChange:yn,headerRight:vn,confirmSection:N},i("div",{ref:n,tabIndex:-1,style:{height:F?"600px":"auto",minWidth:F?"350px":"auto"}},!E[o.id]&&i("div",{className:"straumur__stored-card-component__loading-text"},i(gt,null)),i("div",{className:"straumur__stored-card-component__form",style:{opacity:E[o.id]&&!F?1:0,position:E[o.id]&&!F?"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"},d.t("stored-cards.expiryDate")),i("span",{className:"straumur__stored-card-component__form--wrapper--input straumur__stored-card-component__form--wrapper--input--readonly"},o.expiryMonth,"/",o.expiryYear)),i("div",{className:"straumur__stored-card-component__form--wrapper"},(u==="optional"||u==="required")&&i(ne,null,i("label",{className:`straumur__stored-card-component__form--wrapper--label ${g.encryptedSecurityCode.visible?"straumur__stored-card-component__form--wrapper--label--error":""}`},u==="optional"?d.t("stored-cards.securityCode3DigitsOptional"):d.t("stored-cards.securityCode3Digits")),i("span",{className:`straumur__stored-card-component__form--wrapper--input ${g.encryptedSecurityCode.visible?"straumur__stored-card-component__form--wrapper--input--error":""}`,"data-cse":"encryptedSecurityCode",role:"group","aria-label":d.t("stored-cards.securityCode3Digits")},i("div",{className:"straumur__stored-card-component__form--wrapper--label--info"},i(zt,{content:d.t("stored-cards.securityCode3DigitsInfo")},i(rn,null))))),g.encryptedSecurityCode.visible&&i("span",{className:"straumur__stored-card-component__form--wrapper--error"},g.encryptedSecurityCode.message))),!t.hideSubmitButton&&i("button",{className:"straumur__stored-card-component__submit-button",disabled:c,onClick:W},e.minorUnitsAmount===0?d.t("stored-cards.saveCardDetails"):e.formattedAmount))))}var Pc=pu;function uu({configuration:t,paymentMethods:e}){let[o,r]=w(e.paymentMethods.storedPaymentMethods??[]),{isObscuredByThreeDS:n,hasStoredPaymentMethods:a}=ae();if(!a||n("storedcard"))return null;function s(d){r(c=>c.filter(p=>p.id!==d))}return i(ne,null,o?.map(d=>i(Pc,{key:d.id,configuration:t,storedPaymentMethod:d,paymentMethods:e,onStoredCardRemoved:s})))}var Rc=uu;Y(`.straumur__payment-method-group{display:flex;flex-direction:column;gap:var(--straumur__space-xxlg);width:100%}
|
|
13
13
|
`);function mu({children:t,initialValue:e,isSolePaymentMethod:o,hasCard:r,hasGooglePay:n,hasApplePay:a,hasStoredPaymentMethods:s,onSubmitApiReady:d}){return i(bs,{initialValue:e,isSolePaymentMethod:o,hasCard:r,hasGooglePay:n,hasApplePay:a,hasStoredPaymentMethods:s,onSubmitApiReady:d},i("div",{className:"straumur__payment-method-group"},t))}var Tc=mu;Y(`.straumur__result-component{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;min-height:300px;background-color:var(--straumur__color-white);border-radius:var(--straumur__border-radius-xxlg)}
|
|
14
14
|
`);var hu=()=>i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"120",height:"120",viewBox:"0 0 120 120"},i("circle",{cx:"60",cy:"60",r:"50",fill:"none",stroke:"#5b8206","stroke-width":"5","stroke-dasharray":"314","stroke-dashoffset":"314"},i("animate",{attributeName:"stroke-dashoffset",from:"314",to:"0",dur:"1s",fill:"freeze"})),i("g",{transform:"translate(60,60)"},i("path",{d:"M-25 5 L-5 25 L25 -15",fill:"none",stroke:"#5b8206","stroke-width":"6","stroke-linecap":"round","stroke-linejoin":"round","stroke-dasharray":"100","stroke-dashoffset":"100"},i("animate",{attributeName:"stroke-dashoffset",from:"100",to:"0",dur:"0.5s",begin:"1s",fill:"freeze"}),i("animateTransform",{attributeName:"transform",type:"scale",from:"1 1",to:"1.2 1.2",begin:"1.5s",dur:"0.2s",fill:"freeze",additive:"sum"}),i("animateTransform",{attributeName:"transform",type:"scale",from:"1.2 1.2",to:"1 1",begin:"1.7s",dur:"0.2s",fill:"freeze",additive:"sum"})))),un=hu;var fu=()=>i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"120",height:"120",viewBox:"0 0 120 120"},i("circle",{cx:"60",cy:"60",r:"50",fill:"none",stroke:"#d03e00","stroke-width":"5","stroke-dasharray":"314","stroke-dashoffset":"314"},i("animate",{attributeName:"stroke-dashoffset",from:"314",to:"0",dur:"1s",fill:"freeze"})),i("g",{transform:"translate(60,60)"},i("g",{id:"crossGroup"},i("line",{x1:"-20",y1:"-20",x2:"20",y2:"20",stroke:"#d03e00","stroke-width":"6","stroke-linecap":"round","stroke-dasharray":"57","stroke-dashoffset":"57"},i("animate",{attributeName:"stroke-dashoffset",from:"57",to:"0",dur:"0.3s",begin:"1s",fill:"freeze"})),i("line",{x1:"20",y1:"-20",x2:"-20",y2:"20",stroke:"#d03e00","stroke-width":"6","stroke-linecap":"round","stroke-dasharray":"57","stroke-dashoffset":"57"},i("animate",{attributeName:"stroke-dashoffset",from:"57",to:"0",dur:"0.3s",begin:"1.3s",fill:"freeze"}))))),mn=fu;function _u(){let{error:t,success:e}=ae(),{i18n:o}=Se();if(!t&&!e)return null;let r=n=>"key"in n?o.t(n.key):n.text;return i("div",{className:"straumur__result-component"},t&&i(ne,null,i("span",{"aria-hidden":"true"},i(mn,null)),i("p",{className:"straumur__result-component__error--message",role:"alert"},r(t))),e&&i(ne,null,i("span",{"aria-hidden":"true"},i(un,null)),i("p",{className:"straumur__result-component__success--message",role:"status"},r(e))))}var Ac=_u;function yu({children:t}){let{error:e,success:o}=ae();return e||o?null:i(ne,null,t)}var Dc=yu;Y(`.instant-payments{display:grid;gap:var(--straumur__space-lg);grid-template-columns:1fr 1fr}.instant-payments--single{grid-template-columns:1fr}@container straumur (max-width: 420px){.instant-payments{grid-template-columns:1fr}}
|
|
15
|
-
`);function gu({configuration:t,paymentMethods:e}){let{hasGooglePay:o,hasApplePay:r}=ae(),[n,a]=w(new Set),s=l=>{a(h=>new Set(h).add(l))};if(!t.instantPayments)return null;let d=["googlepay","applepay"],p=t.instantPayments.filter(l=>d.includes(l)).filter(l=>l==="googlepay"?o:r),u=p.filter(l=>!n.has(l));return p.length===0?null:i("div",{className:`straumur__instant-payments instant-payments ${u.length>1?"straumur__instant-payments--multiple instant-payments--multiple":"straumur__instant-payments--single instant-payments--single"}`,style:{display:u.length===0?"none":void 0}},p.map(l=>l==="googlepay"?i(cn,{key:l,configuration:t,paymentMethods:e,isInstantPayment:!0,onUnavailable:()=>s("googlepay")}):l==="applepay"?i(pn,{key:l,configuration:t,paymentMethods:e,isInstantPayment:!0,onUnavailable:()=>s("applepay")}):null))}var wc=gu;function Cu(t,e,o,r,n){let a=e&&!n?.some(c=>c==="googlepay"),s=o&&!n?.some(c=>c==="applepay");return r+(t?1:0)+(a?1:0)+(s?1:0)!==1?{initialPaymentMethod:null,isSolePaymentMethod:!1}:r===1?{initialPaymentMethod:"storedcard",isSolePaymentMethod:!0}:t?{initialPaymentMethod:"card",isSolePaymentMethod:!0}:a?{initialPaymentMethod:"googlepay",isSolePaymentMethod:!0}:s?{initialPaymentMethod:"applepay",isSolePaymentMethod:!0}:{initialPaymentMethod:null,isSolePaymentMethod:!1}}function vu({configuration:t,paymentMethods:e,onSubmitApiReady:o}){let r=e.paymentMethods.paymentMethods??[],n=e.paymentMethods.storedPaymentMethods??[],a=m=>!t.allowedPaymentMethods||t.allowedPaymentMethods.includes(m),s=r.some(m=>m.type==="scheme")&&a("card"),d=r.some(m=>m.type==="googlepay")&&a("googlepay"),c=r.some(m=>m.type==="applepay")&&a("applepay"),p=a("storedcard")?n.length:0,u=p>0,{initialPaymentMethod:l,isSolePaymentMethod:h}=Cu(s,d,c,p,t.instantPayments);return i(Tc,{initialValue:l,isSolePaymentMethod:h,hasCard:s,hasGooglePay:d,hasApplePay:c,hasStoredPaymentMethods:u,onSubmitApiReady:o},i(Dc,null,i(wc,{configuration:t,paymentMethods:e}),i(Rc,{configuration:t,paymentMethods:e}),i(yc,{configuration:t,paymentMethods:e}),i(vc,{configuration:t,paymentMethods:e}),i(Ec,{configuration:t,paymentMethods:e})),i(Ac,null))}var xc=vu;var hn=class{constructor(e,o){this.language=e;this.customLocalizations=o}t(e){return this.customLocalizations?.[this.language]?.[e]||ir[this.language][e]||e}setLanguage(e){this.language=e}updateCustomLocalizations(e){this.customLocalizations=e}};function fn({children:t,theme:e="light"}){let o=uo(e);return i("div",{className:"straumur__root-component","data-theme":o},t)}function Ic({theme:t}){return i(fn,{theme:t},i("div",{className:"straumur__component"},i(gt,null)))}function Ua({variant:t,message:e,i18n:o,theme:r}){return i(fn,{theme:r},i("div",{className:"straumur__component"},i("span",{"aria-hidden":"true"},t==="success"?i(un,null):i(mn,null)),i("p",{role:t==="success"?"status":"alert"},"key"in e?o.t(e.key):e.text)))}function kc(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 bu="IS";function Eu(t){return typeof t.sessionId=="string"&&t.sessionId.length>0}function Su(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 Nc(t){let e=t,o=lr(e.locale),r=Eu(e),n={mode:r?"session":"advanced",sessionId:e.sessionId,environment:e.environment,countryCode:r?bu:e.countryCode,paymentFlow:r?mc(e.environment,e.sessionId):hc(e),onPaymentCompleted:e.onPaymentCompleted,onPaymentFailed:e.onPaymentFailed,placeholders:e.placeholders,locale:o,customLocalizations:e.localizations,instantPayments:e.instantPayments,theme:e.theme??"light"};return r?{configuration:n,advancedConfiguration:null,paymentMethods:null,initializationFailed:!1}:Su(e)?{configuration:n,advancedConfiguration:e,paymentMethods:kc(e,o),initializationFailed:!1}:{configuration:n,advancedConfiguration:null,paymentMethods:null,initializationFailed:!0}}var Va=class{configuration;advancedConfiguration=null;paymentMethods=null;mountElement=null;i18n;submitApi=null;initializationFailed=!1;constructor(e){let o=Nc(e);this.configuration=o.configuration,this.advancedConfiguration=o.advancedConfiguration,this.paymentMethods=o.paymentMethods,this.initializationFailed=o.initializationFailed,this.i18n=new hn(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}Yt(i(Ic,{theme:this.configuration.theme}),this.mountElement);let o=await xn(this.configuration.environment,this.configuration.sessionId);if(o.resultCode==="Error"){this.handleError({key:o.error});return}this.paymentMethods=o,this.renderComponent()}catch(o){console.error("[StraumurCheckout] mount() failed:",o)}}renderComponent(){this.mountElement&&Yt(i(fn,{theme:this.configuration.theme},i(Ss,{i18nService:this.i18n,onLanguageChange:e=>{this.configuration.locale=e,this.renderComponent()}},i(xc,{configuration:this.configuration,paymentMethods:this.paymentMethods,onSubmitApiReady:e=>{this.submitApi=e}}))),this.mountElement)}handleSuccess(e){this.mountElement&&Yt(i(Ua,{variant:"success",message:e,i18n:this.i18n,theme:this.configuration.theme}),this.mountElement)}handleError(e){this.mountElement&&Yt(i(Ua,{variant:"failure",message:e,i18n:this.i18n,theme:this.configuration.theme}),this.mountElement)}async resolveRedirectContext(){if(this.configuration.mode==="advanced")return this.initializationFailed||!this.advancedConfiguration?(this.handleError({key:"error.failedToInitializeStraumurWebComponent"}),null):{clientKey:this.advancedConfiguration.clientKey,paymentMethods:this.advancedConfiguration.paymentMethods};let e=await xn(this.configuration.environment,this.configuration.sessionId);return e.resultCode==="Error"?(this.handleError({key:e.error}),null):{clientKey:e.clientKey,paymentMethods:e.paymentMethods}}async submitDetails(e,o){try{o&&(this.mountElement=typeof o=="string"?document.querySelector(o):o);let r=await this.resolveRedirectContext();if(!r)return;let{handleOnSubmitAdditionalData:n}=Ct({configuration:this.configuration,handleSuccess:s=>this.handleSuccess(s),handleError:s=>this.handleError(s),setThreeDSecureActive:()=>{},dispatchResultFromAdditionalDetails:!0});(await Me({environment:this.configuration.environment,clientKey:r.clientKey,paymentMethodsResponse:r.paymentMethods,countryCode:this.configuration.countryCode,onAdditionalDetails:n})).submitDetails({details:{redirectResult:e}})}catch(r){console.error("[StraumurCheckout] submitDetails() failed:",r),this.handleError({key:"error.failedToSubmitPaymentDetails"}),this.configuration.onPaymentFailed?.({resultCode:"Error"})}}updateConfig(e){let{locale:o,...r}=e;this.configuration={...this.configuration,...r,...o?{locale:lr(o)}:{}},o&&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&&(Yt(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}},Oc=Va;return Vc(Pu);})();
|
|
15
|
+
`);function gu({configuration:t,paymentMethods:e}){let{hasGooglePay:o,hasApplePay:r}=ae(),[n,a]=w(new Set),s=l=>{a(h=>new Set(h).add(l))};if(!t.instantPayments)return null;let d=["googlepay","applepay"],p=t.instantPayments.filter(l=>d.includes(l)).filter(l=>l==="googlepay"?o:r),u=p.filter(l=>!n.has(l));return p.length===0?null:i("div",{className:`straumur__instant-payments instant-payments ${u.length>1?"straumur__instant-payments--multiple instant-payments--multiple":"straumur__instant-payments--single instant-payments--single"}`,style:{display:u.length===0?"none":void 0}},p.map(l=>l==="googlepay"?i(cn,{key:l,configuration:t,paymentMethods:e,isInstantPayment:!0,onUnavailable:()=>s("googlepay")}):l==="applepay"?i(pn,{key:l,configuration:t,paymentMethods:e,isInstantPayment:!0,onUnavailable:()=>s("applepay")}):null))}var wc=gu;function Cu(t,e,o,r,n){let a=e&&!n?.some(c=>c==="googlepay"),s=o&&!n?.some(c=>c==="applepay");return r+(t?1:0)+(a?1:0)+(s?1:0)!==1?{initialPaymentMethod:null,isSolePaymentMethod:!1}:r===1?{initialPaymentMethod:"storedcard",isSolePaymentMethod:!0}:t?{initialPaymentMethod:"card",isSolePaymentMethod:!0}:a?{initialPaymentMethod:"googlepay",isSolePaymentMethod:!0}:s?{initialPaymentMethod:"applepay",isSolePaymentMethod:!0}:{initialPaymentMethod:null,isSolePaymentMethod:!1}}function vu({configuration:t,paymentMethods:e,onSubmitApiReady:o}){let r=e.paymentMethods.paymentMethods??[],n=e.paymentMethods.storedPaymentMethods??[],a=m=>!t.allowedPaymentMethods||t.allowedPaymentMethods.includes(m),s=r.some(m=>m.type==="scheme")&&a("card"),d=r.some(m=>m.type==="googlepay")&&a("googlepay"),c=r.some(m=>m.type==="applepay")&&a("applepay"),p=a("storedcard")?n.length:0,u=p>0,{initialPaymentMethod:l,isSolePaymentMethod:h}=Cu(s,d,c,p,t.instantPayments);return i(Tc,{initialValue:l,isSolePaymentMethod:h,hasCard:s,hasGooglePay:d,hasApplePay:c,hasStoredPaymentMethods:u,onSubmitApiReady:o},i(Dc,null,i(wc,{configuration:t,paymentMethods:e}),i(Rc,{configuration:t,paymentMethods:e}),i(yc,{configuration:t,paymentMethods:e}),i(vc,{configuration:t,paymentMethods:e}),i(Ec,{configuration:t,paymentMethods:e})),i(Ac,null))}var xc=vu;var hn=class{constructor(e,o){this.language=e;this.customLocalizations=o}t(e){return this.customLocalizations?.[this.language]?.[e]||ir[this.language][e]||e}setLanguage(e){this.language=e}updateCustomLocalizations(e){this.customLocalizations=e}};function fn({children:t,theme:e="light"}){let o=uo(e);return i("div",{className:"straumur__root-component","data-theme":o},t)}function Ic({theme:t}){return i(fn,{theme:t},i("div",{className:"straumur__component"},i(gt,null)))}function Ua({variant:t,message:e,i18n:o,theme:r}){return i(fn,{theme:r},i("div",{className:"straumur__component"},i("span",{"aria-hidden":"true"},t==="success"?i(un,null):i(mn,null)),i("p",{role:t==="success"?"status":"alert"},"key"in e?o.t(e.key):e.text)))}function kc(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 bu="IS";function Eu(t){return typeof t.sessionId=="string"&&t.sessionId.length>0}function Su(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 Nc(t){let e=t,o=lr(e.locale),r=Eu(e),n={mode:r?"session":"advanced",sessionId:e.sessionId,environment:e.environment,countryCode:r?bu:e.countryCode,paymentFlow:r?mc(e.environment,e.sessionId):hc(e),onPaymentCompleted:e.onPaymentCompleted,onPaymentFailed:e.onPaymentFailed,placeholders:e.placeholders,locale:o,customLocalizations:e.localizations,instantPayments:e.instantPayments,hideSubmitButton:e.hideSubmitButton,onCardValidityChanged:e.onCardValidityChanged,allowedPaymentMethods:e.allowedPaymentMethods,theme:e.theme??"light"};return r?{configuration:n,advancedConfiguration:null,paymentMethods:null,initializationFailed:!1}:Su(e)?{configuration:n,advancedConfiguration:e,paymentMethods:kc(e,o),initializationFailed:!1}:{configuration:n,advancedConfiguration:null,paymentMethods:null,initializationFailed:!0}}var Va=class{configuration;advancedConfiguration=null;paymentMethods=null;mountElement=null;i18n;submitApi=null;initializationFailed=!1;constructor(e){let o=Nc(e);this.configuration=o.configuration,this.advancedConfiguration=o.advancedConfiguration,this.paymentMethods=o.paymentMethods,this.initializationFailed=o.initializationFailed,this.i18n=new hn(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}Yt(i(Ic,{theme:this.configuration.theme}),this.mountElement);let o=await xn(this.configuration.environment,this.configuration.sessionId);if(o.resultCode==="Error"){this.handleError({key:o.error});return}this.paymentMethods=o,this.renderComponent()}catch(o){console.error("[StraumurCheckout] mount() failed:",o)}}renderComponent(){this.mountElement&&Yt(i(fn,{theme:this.configuration.theme},i(Ss,{i18nService:this.i18n,onLanguageChange:e=>{this.configuration.locale=e,this.renderComponent()}},i(xc,{configuration:this.configuration,paymentMethods:this.paymentMethods,onSubmitApiReady:e=>{this.submitApi=e}}))),this.mountElement)}handleSuccess(e){this.mountElement&&Yt(i(Ua,{variant:"success",message:e,i18n:this.i18n,theme:this.configuration.theme}),this.mountElement)}handleError(e){this.mountElement&&Yt(i(Ua,{variant:"failure",message:e,i18n:this.i18n,theme:this.configuration.theme}),this.mountElement)}async resolveRedirectContext(){if(this.configuration.mode==="advanced")return this.initializationFailed||!this.advancedConfiguration?(this.handleError({key:"error.failedToInitializeStraumurWebComponent"}),null):{clientKey:this.advancedConfiguration.clientKey,paymentMethods:this.advancedConfiguration.paymentMethods};let e=await xn(this.configuration.environment,this.configuration.sessionId);return e.resultCode==="Error"?(this.handleError({key:e.error}),null):{clientKey:e.clientKey,paymentMethods:e.paymentMethods}}async submitDetails(e,o){try{o&&(this.mountElement=typeof o=="string"?document.querySelector(o):o);let r=await this.resolveRedirectContext();if(!r)return;let{handleOnSubmitAdditionalData:n}=Ct({configuration:this.configuration,handleSuccess:s=>this.handleSuccess(s),handleError:s=>this.handleError(s),setThreeDSecureActive:()=>{},dispatchResultFromAdditionalDetails:!0});(await Me({environment:this.configuration.environment,clientKey:r.clientKey,paymentMethodsResponse:r.paymentMethods,countryCode:this.configuration.countryCode,onAdditionalDetails:n})).submitDetails({details:{redirectResult:e}})}catch(r){console.error("[StraumurCheckout] submitDetails() failed:",r),this.handleError({key:"error.failedToSubmitPaymentDetails"}),this.configuration.onPaymentFailed?.({resultCode:"Error"})}}updateConfig(e){let{locale:o,...r}=e;this.configuration={...this.configuration,...r,...o?{locale:lr(o)}:{}},o&&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&&(Yt(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}},Oc=Va;return Vc(Pu);})();
|
|
16
16
|
/*! Bundled license information:
|
|
17
17
|
|
|
18
18
|
@adyen/adyen-web/dist/es/external/classnames/index.js:
|