xendit-components-web 0.0.15 → 0.0.17
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/CHANGELOG.md +14 -0
- package/README.md +2 -2
- package/package.json +13 -7
- package/sdk/dist/cjs/index.cjs +3 -0
- package/sdk/dist/cjs/index.cjs.map +1 -0
- package/sdk/dist/cjs/test-data.cjs +3 -0
- package/sdk/dist/cjs/test-data.cjs.map +1 -0
- package/sdk/dist/esm-bundled/index.mjs +8 -0
- package/sdk/dist/esm-bundled/index.mjs.map +1 -0
- package/sdk/dist/esm-bundled/test-data.mjs +3 -0
- package/sdk/dist/esm-bundled/test-data.mjs.map +1 -0
- package/sdk/dist/esm-external/index.mjs +3 -0
- package/sdk/dist/esm-external/index.mjs.map +1 -0
- package/sdk/dist/esm-external/test-data.mjs +3 -0
- package/sdk/dist/esm-external/test-data.mjs.map +1 -0
- package/sdk/dist/index.umd.js +2 -2
- package/sdk/dist/index.umd.js.map +1 -1
- package/sdk/dist/esm/index.js +0 -8
- package/sdk/dist/esm/index.js.map +0 -1
- package/sdk/dist/esm/test-data.js +0 -3
- package/sdk/dist/esm/test-data.js.map +0 -1
package/sdk/dist/index.umd.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*! Copyright (c) 2026 Xendit Inc. Licensed under the MIT License (MIT). */
|
|
2
|
-
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).Xendit={})}(this,function(e){"use strict";var n,t,r,i,a,o,d,s,l,c,u,h,p,m={},f=[],_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,b=Array.isArray;function $(e,n){for(var t in n)e[t]=n[t];return e}function y(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function g(e,t,r){var i,a,o,d={};for(o in t)"key"==o?i=t[o]:"ref"==o?a=t[o]:d[o]=t[o];if(arguments.length>2&&(d.children=arguments.length>3?n.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===d[o]&&(d[o]=e.defaultProps[o]);return v(e,d,i,a,null)}function v(e,n,i,a,o){var d={type:e,props:n,key:i,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==o?++r:o,__i:-1,__u:0};return null==o&&null!=t.vnode&&t.vnode(d),d}function x(e){return e.children}function w(e,n){this.props=e,this.context=n}function C(e,n){if(null==n)return e.__?C(e.__,e.__i+1):null;for(var t;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e)return t.__e;return"function"==typeof e.type?C(e):null}function E(e){if(e.__P&&e.__d){var n=e.__v,r=n.__e,i=[],a=[],o=$({},n);o.__v=n.__v+1,t.vnode&&t.vnode(o),D(e.__P,o,n,e.__n,e.__P.namespaceURI,32&n.__u?[r]:null,i,null==r?C(n):r,!!(32&n.__u),a),o.__v=n.__v,o.__.__k[o.__i]=o,U(i,o,a),n.__e=n.__=null,o.__e!=r&&k(o)}}function k(e){if(null!=(e=e.__)&&null!=e.__c)return e.__e=e.__c.base=null,e.__k.some(function(n){if(null!=n&&null!=n.__e)return e.__e=e.__c.base=n.__e}),k(e)}function P(e){(!e.__d&&(e.__d=!0)&&i.push(e)&&!N.__r++||a!=t.debounceRendering)&&((a=t.debounceRendering)||o)(N)}function N(){for(var e,n=1;i.length;)i.length>n&&i.sort(d),e=i.shift(),n=i.length,E(e);N.__r=0}function S(e,n,t,r,i,a,o,d,s,l,c){var u,h,p,_,$,y,g,w=r&&r.__k||f,E=n.length;for(s=function(e,n,t,r,i){var a,o,d,s,l,c=t.length,u=c,h=0;for(e.__k=new Array(i),a=0;a<i;a++)null!=(o=n[a])&&"boolean"!=typeof o&&"function"!=typeof o?("string"==typeof o||"number"==typeof o||"bigint"==typeof o||o.constructor==String?o=e.__k[a]=v(null,o,null,null,null):b(o)?o=e.__k[a]=v(x,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?o=e.__k[a]=v(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):e.__k[a]=o,s=a+h,o.__=e,o.__b=e.__b+1,d=null,-1!=(l=o.__i=I(o,t,s,u))&&(u--,(d=t[l])&&(d.__u|=2)),null==d||null==d.__v?(-1==l&&(i>c?h--:i<c&&h++),"function"!=typeof o.type&&(o.__u|=4)):l!=s&&(l==s-1?h--:l==s+1?h++:(l>s?h--:h++,o.__u|=4))):e.__k[a]=null;if(u)for(a=0;a<c;a++)null!=(d=t[a])&&!(2&d.__u)&&(d.__e==r&&(r=C(d)),K(d,d));return r}(t,n,w,s,E),u=0;u<E;u++)null!=(p=t.__k[u])&&(h=-1!=p.__i&&w[p.__i]||m,p.__i=u,y=D(e,p,h,i,a,o,d,s,l,c),_=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&F(h.ref,null,p),c.push(p.ref,p.__c||_,p)),null==$&&null!=_&&($=_),(g=!!(4&p.__u))||h.__k===p.__k?s=A(p,s,e,g):"function"==typeof p.type&&void 0!==y?s=y:_&&(s=_.nextSibling),p.__u&=-7);return t.__e=$,s}function A(e,n,t,r){var i,a;if("function"==typeof e.type){for(i=e.__k,a=0;i&&a<i.length;a++)i[a]&&(i[a].__=e,n=A(i[a],n,t,r));return n}e.__e!=n&&(r&&(n&&e.type&&!n.parentNode&&(n=C(e)),t.insertBefore(e.__e,n||null)),n=e.__e);do{n=n&&n.nextSibling}while(null!=n&&8==n.nodeType);return n}function T(e,n){return n=n||[],null==e||"boolean"==typeof e||(b(e)?e.some(function(e){T(e,n)}):n.push(e)),n}function I(e,n,t,r){var i,a,o,d=e.key,s=e.type,l=n[t],c=null!=l&&!(2&l.__u);if(null===l&&null==d||c&&d==l.key&&s==l.type)return t;if(r>(c?1:0))for(i=t-1,a=t+1;i>=0||a<n.length;)if(null!=(l=n[o=i>=0?i--:a++])&&!(2&l.__u)&&d==l.key&&s==l.type)return o;return-1}function R(e,n,t){"-"==n[0]?e.setProperty(n,null==t?"":t):e[n]=null==t?"":"number"!=typeof t||_.test(n)?t:t+"px"}function M(e,n,t,r,i){var a,o;e:if("style"==n)if("string"==typeof t)e.style.cssText=t;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(n in r)t&&n in t||R(e.style,n,"");if(t)for(n in t)r&&t[n]==r[n]||R(e.style,n,t[n])}else if("o"==n[0]&&"n"==n[1])a=n!=(n=n.replace(s,"$1")),o=n.toLowerCase(),n=o in e||"onFocusOut"==n||"onFocusIn"==n?o.slice(2):n.slice(2),e.l||(e.l={}),e.l[n+a]=t,t?r?t.u=r.u:(t.u=l,e.addEventListener(n,a?u:c,a)):e.removeEventListener(n,a?u:c,a);else{if("http://www.w3.org/2000/svg"==i)n=n.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=n&&"height"!=n&&"href"!=n&&"list"!=n&&"form"!=n&&"tabIndex"!=n&&"download"!=n&&"rowSpan"!=n&&"colSpan"!=n&&"role"!=n&&"popover"!=n&&n in e)try{e[n]=null==t?"":t;break e}catch(e){}"function"==typeof t||(null==t||!1===t&&"-"!=n[4]?e.removeAttribute(n):e.setAttribute(n,"popover"==n&&1==t?"":t))}}function O(e){return function(n){if(this.l){var r=this.l[n.type+e];if(null==n.t)n.t=l++;else if(n.t<r.u)return;return r(t.event?t.event(n):n)}}}function D(e,n,r,i,a,o,d,s,l,c){var u,h,p,m,_,g,v,C,E,k,P,N,A,T,I,R=n.type;if(void 0!==n.constructor)return null;128&r.__u&&(l=!!(32&r.__u),o=[s=n.__e=r.__e]),(u=t.__b)&&u(n);e:if("function"==typeof R)try{if(C=n.props,E="prototype"in R&&R.prototype.render,k=(u=R.contextType)&&i[u.__c],P=u?k?k.props.value:u.__:i,r.__c?v=(h=n.__c=r.__c).__=h.__E:(E?n.__c=h=new R(C,P):(n.__c=h=new w(C,P),h.constructor=R,h.render=G),k&&k.sub(h),h.state||(h.state={}),h.__n=i,p=h.__d=!0,h.__h=[],h._sb=[]),E&&null==h.__s&&(h.__s=h.state),E&&null!=R.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=$({},h.__s)),$(h.__s,R.getDerivedStateFromProps(C,h.__s))),m=h.props,_=h.state,h.__v=n,p)E&&null==R.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),E&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(E&&null==R.getDerivedStateFromProps&&C!==m&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(C,P),n.__v==r.__v||!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(C,h.__s,P)){n.__v!=r.__v&&(h.props=C,h.state=h.__s,h.__d=!1),n.__e=r.__e,n.__k=r.__k,n.__k.some(function(e){e&&(e.__=n)}),f.push.apply(h.__h,h._sb),h._sb=[],h.__h.length&&d.push(h);break e}null!=h.componentWillUpdate&&h.componentWillUpdate(C,h.__s,P),E&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(m,_,g)})}if(h.context=P,h.props=C,h.__P=e,h.__e=!1,N=t.__r,A=0,E)h.state=h.__s,h.__d=!1,N&&N(n),u=h.render(h.props,h.state,h.context),f.push.apply(h.__h,h._sb),h._sb=[];else do{h.__d=!1,N&&N(n),u=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++A<25);h.state=h.__s,null!=h.getChildContext&&(i=$($({},i),h.getChildContext())),E&&!p&&null!=h.getSnapshotBeforeUpdate&&(g=h.getSnapshotBeforeUpdate(m,_)),T=null!=u&&u.type===x&&null==u.key?B(u.props.children):u,s=S(e,b(T)?T:[T],n,r,i,a,o,d,s,l,c),h.base=n.__e,n.__u&=-161,h.__h.length&&d.push(h),v&&(h.__E=h.__=null)}catch(e){if(n.__v=null,l||null!=o)if(e.then){for(n.__u|=l?160:128;s&&8==s.nodeType&&s.nextSibling;)s=s.nextSibling;o[o.indexOf(s)]=null,n.__e=s}else{for(I=o.length;I--;)y(o[I]);L(n)}else n.__e=r.__e,n.__k=r.__k,e.then||L(n);t.__e(e,n,r)}else null==o&&n.__v==r.__v?(n.__k=r.__k,n.__e=r.__e):s=n.__e=q(r.__e,n,r,i,a,o,d,l,c);return(u=t.diffed)&&u(n),128&n.__u?void 0:s}function L(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(L))}function U(e,n,r){for(var i=0;i<r.length;i++)F(r[i],r[++i],r[++i]);t.__c&&t.__c(n,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(e){e.call(n)})}catch(e){t.__e(e,n.__v)}})}function B(e){return"object"!=typeof e||null==e||e.__b>0?e:b(e)?e.map(B):$({},e)}function q(e,r,i,a,o,d,s,l,c){var u,h,p,f,_,$,g,v=i.props||m,x=r.props,w=r.type;if("svg"==w?o="http://www.w3.org/2000/svg":"math"==w?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),null!=d)for(u=0;u<d.length;u++)if((_=d[u])&&"setAttribute"in _==!!w&&(w?_.localName==w:3==_.nodeType)){e=_,d[u]=null;break}if(null==e){if(null==w)return document.createTextNode(x);e=document.createElementNS(o,w,x.is&&x),l&&(t.__m&&t.__m(r,d),l=!1),d=null}if(null==w)v===x||l&&e.data==x||(e.data=x);else{if(d=d&&n.call(e.childNodes),!l&&null!=d)for(v={},u=0;u<e.attributes.length;u++)v[(_=e.attributes[u]).name]=_.value;for(u in v)_=v[u],"dangerouslySetInnerHTML"==u?p=_:"children"==u||u in x||"value"==u&&"defaultValue"in x||"checked"==u&&"defaultChecked"in x||M(e,u,null,_,o);for(u in x)_=x[u],"children"==u?f=_:"dangerouslySetInnerHTML"==u?h=_:"value"==u?$=_:"checked"==u?g=_:l&&"function"!=typeof _||v[u]===_||M(e,u,_,v[u],o);if(h)l||p&&(h.__html==p.__html||h.__html==e.innerHTML)||(e.innerHTML=h.__html),r.__k=[];else if(p&&(e.innerHTML=""),S("template"==r.type?e.content:e,b(f)?f:[f],r,i,a,"foreignObject"==w?"http://www.w3.org/1999/xhtml":o,d,s,d?d[0]:i.__k&&C(i,0),l,c),null!=d)for(u=d.length;u--;)y(d[u]);l||(u="value","progress"==w&&null==$?e.removeAttribute("value"):null!=$&&($!==e[u]||"progress"==w&&!$||"option"==w&&$!=v[u])&&M(e,u,$,v[u],o),u="checked",null!=g&&g!=e[u]&&M(e,u,g,v[u],o))}return e}function F(e,n,r){try{if("function"==typeof e){var i="function"==typeof e.__u;i&&e.__u(),i&&null==n||(e.__u=e(n))}else e.current=n}catch(e){t.__e(e,r)}}function K(e,n,r){var i,a;if(t.unmount&&t.unmount(e),(i=e.ref)&&(i.current&&i.current!=e.__e||F(i,null,n)),null!=(i=e.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(e){t.__e(e,n)}i.base=i.__P=null}if(i=e.__k)for(a=0;a<i.length;a++)i[a]&&K(i[a],n,r||"function"!=typeof e.type);r||y(e.__e),e.__c=e.__=e.__e=void 0}function G(e,n,t){return this.constructor(e,t)}function V(e,r,i){var a,o,d;r==document&&(r=document.documentElement),t.__&&t.__(e,r),a=!1?null:r.__k,o=[],d=[],D(r,e=r.__k=g(x,null,[e]),a||m,m,r.namespaceURI,a?null:r.firstChild?n.call(r.childNodes):null,o,a?a.__e:r.firstChild,false,d),U(o,e,d)}function H(e){function n(e){var t,r;return this.getChildContext||(t=new Set,(r={})[n.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){t=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&t.forEach(function(e){e.__e=!0,P(e)})},this.sub=function(e){t.add(e);var n=e.componentWillUnmount;e.componentWillUnmount=function(){t&&t.delete(e),n&&n.call(e)}}),e.children}return n.__c="__cC"+h++,n.__=e,n.Provider=n.__l=(n.Consumer=function(e,n){return e.children(n)}).contextType=n,n}n=f.slice,t={__e:function(e,n,t,r){for(var i,a,o;n=n.__;)if((i=n.__c)&&!i.__)try{if((a=i.constructor)&&null!=a.getDerivedStateFromError&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(n){e=n}throw e}},r=0,w.prototype.setState=function(e,n){var t;t=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=$({},this.state),"function"==typeof e&&(e=e($({},t),this.props)),e&&$(t,e),null!=e&&this.__v&&(n&&this._sb.push(n),P(this))},w.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),P(this))},w.prototype.render=x,i=[],o="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,d=function(e,n){return e.__v.__b-n.__v.__b},N.__r=0,s=/(PointerCapture)$|Capture$/i,l=0,c=O(!1),u=O(!0),h=0,null!=(p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0)&&p.__PREACT_DEVTOOLS__&&p.__PREACT_DEVTOOLS__.attachPreact("10.28.4",t,{Fragment:x,Component:w});var W={};function j(e){return e.type===x?"Fragment":"function"==typeof e.type?e.type.displayName||e.type.name:"string"==typeof e.type?e.type:"#text"}var Y=[],X=[];function z(){return Y.length>0?Y[Y.length-1]:null}var Z=!0;function J(e){return"function"==typeof e.type&&e.type!=x}function Q(e){for(var n=[e],t=e;null!=t.__o;)n.push(t.__o),t=t.__o;return n.reduce(function(e,n){e+=" in "+j(n);var t=n.__source;return t?e+=" (at "+t.fileName+":"+t.lineNumber+")":Z&&console.warn("Add @babel/plugin-transform-react-jsx-source to get a more detailed component stack. Note that you should not add it to production builds of your App for bundle size reasons."),Z=!1,e+"\n"},"")}var ee="function"==typeof WeakMap;function ne(e){var n=[];return e.__k?(e.__k.forEach(function(e){e&&"function"==typeof e.type?n.push.apply(n,ne(e)):e&&"string"==typeof e.type&&n.push(e.type)}),n):n}function te(e){return e?"function"==typeof e.type?null==e.__?null!=e.__e&&null!=e.__e.parentNode?e.__e.parentNode.localName:"":te(e.__):e.type:""}var re=w.prototype.setState;function ie(e){return"table"===e||"tfoot"===e||"tbody"===e||"thead"===e||"td"===e||"tr"===e||"th"===e}w.prototype.setState=function(e,n){return null==this.__v&&null==this.state&&console.warn('Calling "this.setState" inside the constructor of a component is a no-op and might be a bug in your application. Instead, set "this.state = {}" directly.\n\n'+Q(z())),re.call(this,e,n)};var ae=/^(address|article|aside|blockquote|details|div|dl|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hgroup|hr|main|menu|nav|ol|p|pre|search|section|table|ul)$/,oe=w.prototype.forceUpdate;function de(e){var n=e.props,t=j(e),r="";for(var i in n)if(n.hasOwnProperty(i)&&"children"!==i){var a=n[i];"function"==typeof a&&(a="function "+(a.displayName||a.name)+"() {}"),a=Object(a)!==a||a.toString?a+"":Object.prototype.toString.call(a),r+=" "+i+"="+JSON.stringify(a)}var o=n.children;return"<"+t+r+(o&&o.length?">..</"+t+">":" />")}w.prototype.forceUpdate=function(e){return null==this.__v?console.warn('Calling "this.forceUpdate" inside the constructor of a component is a no-op and might be a bug in your application.\n\n'+Q(z())):null==this.__P&&console.warn('Can\'t call "this.forceUpdate" on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.\n\n'+Q(this.__v)),oe.call(this,e)},t.__m=function(e,n){var t=e.type,r=n.map(function(e){return e&&e.localName}).filter(Boolean);console.error('Expected a DOM node of type "'+t+'" but found "'+r.join(", ")+"\" as available DOM-node(s), this is caused by the SSR'd HTML containing different DOM-nodes compared to the hydrated one.\n\n"+Q(e))},function(){!function(){var e=t.__b,n=t.diffed,r=t.__,i=t.vnode,a=t.__r;t.diffed=function(e){J(e)&&X.pop(),Y.pop(),n&&n(e)},t.__b=function(n){J(n)&&Y.push(n),e&&e(n)},t.__=function(e,n){X=[],r&&r(e,n)},t.vnode=function(e){e.__o=X.length>0?X[X.length-1]:null,i&&i(e)},t.__r=function(e){J(e)&&X.push(e),a&&a(e)}}();var e=!1,n=t.__b,r=t.diffed,i=t.vnode,a=t.__r,o=t.__e,d=t.__,s=t.__h,l=ee?{useEffect:new WeakMap,useLayoutEffect:new WeakMap,lazyPropTypes:new WeakMap}:null,c=[];t.__e=function(e,n,t,r){if(n&&n.__c&&"function"==typeof e.then){var i=e;e=new Error("Missing Suspense. The throwing component was: "+j(n));for(var a=n;a;a=a.__)if(a.__c&&a.__c.__c){e=i;break}if(e instanceof Error)throw e}try{(r=r||{}).componentStack=Q(n),o(e,n,t,r),"function"!=typeof e.then&&setTimeout(function(){throw e})}catch(e){throw e}},t.__=function(e,n){if(!n)throw new Error("Undefined parent passed to render(), this is the second argument.\nCheck if the element is available in the DOM/has the correct id.");var t;switch(n.nodeType){case 1:case 11:case 9:t=!0;break;default:t=!1}if(!t){var r=j(e);throw new Error("Expected a valid HTML node as a second argument to render.\tReceived "+n+" instead: render(<"+r+" />, "+n+");")}d&&d(e,n)},t.__b=function(t){var r=t.type;if(e=!0,void 0===r)throw new Error("Undefined component passed to createElement()\n\nYou likely forgot to export your component or might have mixed up default and named imports"+de(t)+"\n\n"+Q(t));if(null!=r&&"object"==typeof r){if(void 0!==r.__k&&void 0!==r.__e)throw new Error("Invalid type passed to createElement(): "+r+"\n\nDid you accidentally pass a JSX literal as JSX twice?\n\n let My"+j(t)+" = "+de(r)+";\n let vnode = <My"+j(t)+" />;\n\nThis usually happens when you export a JSX literal and not the component.\n\n"+Q(t));throw new Error("Invalid type passed to createElement(): "+(Array.isArray(r)?"array":r))}if(void 0!==t.ref&&"function"!=typeof t.ref&&"object"!=typeof t.ref&&!("$$typeof"in t))throw new Error('Component\'s "ref" property should be a function, or an object created by createRef(), but got ['+typeof t.ref+"] instead\n"+de(t)+"\n\n"+Q(t));if("string"==typeof t.type)for(var i in t.props)if("o"===i[0]&&"n"===i[1]&&"function"!=typeof t.props[i]&&null!=t.props[i])throw new Error("Component's \""+i+'" property should be a function, but got ['+typeof t.props[i]+"] instead\n"+de(t)+"\n\n"+Q(t));if("function"==typeof t.type&&t.type.propTypes){if("Lazy"===t.type.displayName&&l&&!l.lazyPropTypes.has(t.type)){var a="PropTypes are not supported on lazy(). Use propTypes on the wrapped component itself. ";try{var o=t.type();l.lazyPropTypes.set(t.type,!0),console.warn(a+"Component wrapped in lazy() is "+j(o))}catch(e){console.warn(a+"We will log the wrapped component's name once it is loaded.")}}var d=t.props;t.type.__f&&delete(d=function(e,n){for(var t in n)e[t]=n[t];return e}({},d)).ref,function(e,n,t,r,i){Object.keys(e).forEach(function(t){var a;try{a=e[t](n,t,r,"prop",null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){a=e}a&&!(a.message in W)&&(W[a.message]=!0,console.error("Failed prop type: "+a.message+(i&&"\n"+i()||"")))})}(t.type.propTypes,d,0,j(t),function(){return Q(t)})}n&&n(t)};var u,h=0;t.__r=function(n){a&&a(n),e=!0;var t=n.__c;if(t===u?h++:h=1,h>=25)throw new Error("Too many re-renders. This is limited to prevent an infinite loop which may lock up your browser. The component causing this is: "+j(n));u=t},t.__h=function(n,t,r){if(!n||!e)throw new Error("Hook can only be invoked from render methods.");s&&s(n,t,r)};var p=function(e,n){return{get:function(){var t="get"+e+n;c&&c.indexOf(t)<0&&(c.push(t),console.warn("getting vnode."+e+" is deprecated, "+n))},set:function(){var t="set"+e+n;c&&c.indexOf(t)<0&&(c.push(t),console.warn("setting vnode."+e+" is not allowed, "+n))}}},m={nodeName:p("nodeName","use vnode.type"),attributes:p("attributes","use vnode.props"),children:p("children","use vnode.props.children")},f=Object.create({},m);t.vnode=function(e){var n=e.props;if(null!==e.type&&null!=n&&("__source"in n||"__self"in n)){var t=e.props={};for(var r in n){var a=n[r];"__source"===r?e.__source=a:"__self"===r?e.__self=a:t[r]=a}}e.__proto__=f,i&&i(e)},t.diffed=function(n){var t,i=n.type,a=n.__;if(n.__k&&n.__k.forEach(function(e){if("object"==typeof e&&e&&void 0===e.type){var t=Object.keys(e).join(",");throw new Error("Objects are not valid as a child. Encountered an object with the keys {"+t+"}.\n\n"+Q(n))}}),n.__c===u&&(h=0),"string"==typeof i&&(ie(i)||"p"===i||"a"===i||"button"===i)){var o=te(a);if(""!==o&&ie(i))"table"===i&&"td"!==o&&ie(o)?console.error("Improper nesting of table. Your <table> should not have a table-node parent."+de(n)+"\n\n"+Q(n)):"thead"!==i&&"tfoot"!==i&&"tbody"!==i||"table"===o?"tr"===i&&"thead"!==o&&"tfoot"!==o&&"tbody"!==o?console.error("Improper nesting of table. Your <tr> should have a <thead/tbody/tfoot> parent."+de(n)+"\n\n"+Q(n)):"td"===i&&"tr"!==o?console.error("Improper nesting of table. Your <td> should have a <tr> parent."+de(n)+"\n\n"+Q(n)):"th"===i&&"tr"!==o&&console.error("Improper nesting of table. Your <th> should have a <tr>."+de(n)+"\n\n"+Q(n)):console.error("Improper nesting of table. Your <thead/tbody/tfoot> should have a <table> parent."+de(n)+"\n\n"+Q(n));else if("p"===i){var d=ne(n).filter(function(e){return ae.test(e)});d.length&&console.error("Improper nesting of paragraph. Your <p> should not have "+d.join(", ")+" as child-elements."+de(n)+"\n\n"+Q(n))}else"a"!==i&&"button"!==i||-1!==ne(n).indexOf(i)&&console.error("Improper nesting of interactive content. Your <"+i+"> should not have other "+("a"===i?"anchor":"button")+" tags as child-elements."+de(n)+"\n\n"+Q(n))}if(e=!1,r&&r(n),null!=n.__k)for(var s=[],l=0;l<n.__k.length;l++){var c=n.__k[l];if(c&&null!=c.key){var p=c.key;if(-1!==s.indexOf(p)){console.error('Following component has two or more children with the same key attribute: "'+p+'". This may cause glitches and misbehavior in rendering process. Component: \n\n'+de(n)+"\n\n"+Q(n));break}s.push(p)}}if(null!=n.__c&&null!=n.__c.__H){var m=n.__c.__H.__;if(m)for(var f=0;f<m.length;f+=1){var _=m[f];if(_.__H)for(var b=0;b<_.__H.length;b++)if((t=_.__H[b])!=t){var $=j(n);console.warn("Invalid argument passed to hook. Hooks should not be called with NaN in the dependency array. Hook index "+f+" in component "+$+" was called with NaN.")}}}}}();var se,le,ce,ue,he=0,pe=[],me=t,fe=me.__b,_e=me.__r,be=me.diffed,$e=me.__c,ye=me.unmount,ge=me.__;function ve(e,n){me.__h&&me.__h(le,e,he||n),he=0;var t=le.__H||(le.__H={__:[],__h:[]});return e>=t.__.length&&t.__.push({}),t.__[e]}function xe(e){return he=1,function(e,n,t){var r=ve(se++,2);if(r.t=e,!r.__c&&(r.__=[t?t(n):Me(void 0,n),function(e){var n=r.__N?r.__N[0]:r.__[0],t=r.t(n,e);n!==t&&(r.__N=[t,r.__[1]],r.__c.setState({}))}],r.__c=le,!le.__f)){var i=function(e,n,t){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter(function(e){return e.__c});if(i.every(function(e){return!e.__N}))return!a||a.call(this,e,n,t);var o=r.__c.props!==e;return i.some(function(e){if(e.__N){var n=e.__[0];e.__=e.__N,e.__N=void 0,n!==e.__[0]&&(o=!0)}}),a&&a.call(this,e,n,t)||o};le.__f=!0;var a=le.shouldComponentUpdate,o=le.componentWillUpdate;le.componentWillUpdate=function(e,n,t){if(this.__e){var r=a;a=void 0,i(e,n,t),a=r}o&&o.call(this,e,n,t)},le.shouldComponentUpdate=i}return r.__N||r.__}(Me,e)}function we(e,n){var t=ve(se++,4);!me.__s&&Re(t.__H,n)&&(t.__=e,t.u=n,le.__h.push(t))}function Ce(e){return he=5,Ee(function(){return{current:e}},[])}function Ee(e,n){var t=ve(se++,7);return Re(t.__H,n)&&(t.__=e(),t.__H=n,t.__h=e),t.__}function ke(e,n){return he=8,Ee(function(){return e},n)}function Pe(e){var n=le.context[e.__c],t=ve(se++,9);return t.c=e,n?(null==t.__&&(t.__=!0,n.sub(le)),n.props.value):e.__}function Ne(){for(var e;e=pe.shift();){var n=e.__H;if(e.__P&&n)try{n.__h.some(Te),n.__h.some(Ie),n.__h=[]}catch(t){n.__h=[],me.__e(t,e.__v)}}}me.__b=function(e){le=null,fe&&fe(e)},me.__=function(e,n){e&&n.__k&&n.__k.__m&&(e.__m=n.__k.__m),ge&&ge(e,n)},me.__r=function(e){_e&&_e(e),se=0;var n=(le=e.__c).__H;n&&(ce===le?(n.__h=[],le.__h=[],n.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(n.__h.some(Te),n.__h.some(Ie),n.__h=[],se=0)),ce=le},me.diffed=function(e){be&&be(e);var n=e.__c;n&&n.__H&&(n.__H.__h.length&&(1!==pe.push(n)&&ue===me.requestAnimationFrame||((ue=me.requestAnimationFrame)||Ae)(Ne)),n.__H.__.some(function(e){e.u&&(e.__H=e.u),e.u=void 0})),ce=le=null},me.__c=function(e,n){n.some(function(e){try{e.__h.some(Te),e.__h=e.__h.filter(function(e){return!e.__||Ie(e)})}catch(t){n.some(function(e){e.__h&&(e.__h=[])}),n=[],me.__e(t,e.__v)}}),$e&&$e(e,n)},me.unmount=function(e){ye&&ye(e);var n,t=e.__c;t&&t.__H&&(t.__H.__.some(function(e){try{Te(e)}catch(e){n=e}}),t.__H=void 0,n&&me.__e(n,t.__v))};var Se="function"==typeof requestAnimationFrame;function Ae(e){var n,t=function(){clearTimeout(r),Se&&cancelAnimationFrame(n),setTimeout(e)},r=setTimeout(t,35);Se&&(n=requestAnimationFrame(t))}function Te(e){var n=le,t=e.__c;"function"==typeof t&&(e.__c=void 0,t()),le=n}function Ie(e){var n=le;e.__c=e.__(),le=n}function Re(e,n){return!e||e.length!==n.length||n.some(function(n,t){return n!==e[t]})}function Me(e,n){return"function"==typeof n?n(e):n}function Oe(e,n){for(var t in n)e[t]=n[t];return e}function De(e,n){for(var t in e)if("__source"!==t&&!(t in n))return!0;for(var r in n)if("__source"!==r&&e[r]!==n[r])return!0;return!1}function Le(e,n){this.props=e,this.context=n}(Le.prototype=new w).isPureReactComponent=!0,Le.prototype.shouldComponentUpdate=function(e,n){return De(this.props,e)||De(this.state,n)};var Ue=t.__b;t.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ue&&Ue(e)};var Be="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var qe=t.__e;t.__e=function(e,n,t,r){if(e.then)for(var i,a=n;a=a.__;)if((i=a.__c)&&i.__c)return null==n.__e&&(n.__e=t.__e,n.__k=t.__k),i.__c(e,n);qe(e,n,t,r)};var Fe=t.unmount;function Ke(e,n,t){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){"function"==typeof e.__c&&e.__c()}),e.__c.__H=null),null!=(e=Oe({},e)).__c&&(e.__c.__P===t&&(e.__c.__P=n),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return Ke(e,n,t)})),e}function Ge(e,n,t){return e&&t&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return Ge(e,n,t)}),e.__c&&e.__c.__P===n&&(e.__e&&t.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=t)),e}function Ve(){this.__u=0,this.o=null,this.__b=null}function He(e){if(!e.__)return null;var n=e.__.__c;return n&&n.__a&&n.__a(e)}function We(){this.i=null,this.l=null}t.unmount=function(e){var n=e.__c;n&&(n.__z=!0),n&&n.__R&&n.__R(),n&&32&e.__u&&(e.type=null),Fe&&Fe(e)},(Ve.prototype=new w).__c=function(e,n){var t=n.__c,r=this;null==r.o&&(r.o=[]),r.o.push(t);var i=He(r.__v),a=!1,o=function(){a||r.__z||(a=!0,t.__R=null,i?i(s):s())};t.__R=o;var d=t.__P;t.__P=null;var s=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=Ge(e,e.__c.__P,e.__c.__O)}var n;for(r.setState({__a:r.__b=null});n=r.o.pop();)n.__P=d,n.forceUpdate()}};r.__u++||32&n.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},Ve.prototype.componentWillUnmount=function(){this.o=[]},Ve.prototype.render=function(e,n){if(this.__b){if(this.__v.__k){var t=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Ke(this.__b,t,r.__O=r.__P)}this.__b=null}var i=n.__a&&g(x,null,e.fallback);return i&&(i.__u&=-33),[g(x,null,n.__a?null:e.children),i]};var je=function(e,n,t){if(++t[1]===t[0]&&e.l.delete(n),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(t=e.i;t;){for(;t.length>3;)t.pop()();if(t[1]<t[0])break;e.i=t=t[2]}};(We.prototype=new w).__a=function(e){var n=this,t=He(n.__v),r=n.l.get(e);return r[0]++,function(i){var a=function(){n.props.revealOrder?(r.push(i),je(n,e,r)):i()};t?t(a):a()}},We.prototype.render=function(e){this.i=null,this.l=new Map;var n=T(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&n.reverse();for(var t=n.length;t--;)this.l.set(n[t],this.i=[1,0,this.i]);return e.children},We.prototype.componentDidUpdate=We.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(n,t){je(e,t,n)})};var Ye="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Xe=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,ze=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Ze=/[A-Z0-9]/g,Je="undefined"!=typeof document,Qe=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};w.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(w.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(n){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:n})}})});var en=t.event;function nn(){}function tn(){return this.cancelBubble}function rn(){return this.defaultPrevented}t.event=function(e){return en&&(e=en(e)),e.persist=nn,e.isPropagationStopped=tn,e.isDefaultPrevented=rn,e.nativeEvent=e};var an={enumerable:!1,configurable:!0,get:function(){return this.class}},on=t.vnode;t.vnode=function(e){"string"==typeof e.type&&function(e){var n=e.props,t=e.type,r={},i=-1===t.indexOf("-");for(var a in n){var o=n[a];if(!("value"===a&&"defaultValue"in n&&null==o||Je&&"children"===a&&"noscript"===t||"class"===a||"className"===a)){var d=a.toLowerCase();"defaultValue"===a&&"value"in n&&null==n.value?a="value":"download"===a&&!0===o?o="":"translate"===d&&"no"===o?o=!1:"o"===d[0]&&"n"===d[1]?"ondoubleclick"===d?a="ondblclick":"onchange"!==d||"input"!==t&&"textarea"!==t||Qe(n.type)?"onfocus"===d?a="onfocusin":"onblur"===d?a="onfocusout":ze.test(a)&&(a=d):d=a="oninput":i&&Xe.test(a)?a=a.replace(Ze,"-$&").toLowerCase():null===o&&(o=void 0),"oninput"===d&&r[a=d]&&(a="oninputCapture"),r[a]=o}}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=T(n.children).forEach(function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)})),"select"==t&&null!=r.defaultValue&&(r.value=T(n.children).forEach(function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value})),n.class&&!n.className?(r.class=n.class,Object.defineProperty(r,"className",an)):n.className&&(r.class=r.className=n.className),e.props=r}(e),e.$$typeof=Ye,on&&on(e)};var dn=t.__r;t.__r=function(e){dn&&dn(e),e.__c};var sn=t.diffed;t.diffed=function(e){sn&&sn(e);var n=e.props,t=e.__e;null!=t&&"textarea"===e.type&&"value"in n&&n.value!==t.value&&(t.value=null==n.value?"":n.value)};var ln=0;function cn(e,n,r,i,a,o){n||(n={});var d,s,l=n;if("ref"in l)for(s in l={},n)"ref"==s?d=n[s]:l[s]=n[s];var c={type:e,props:l,key:r,ref:d,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--ln,__i:-1,__u:0,__source:a,__self:o};if("function"==typeof e&&(d=e.defaultProps))for(s in d)void 0===l[s]&&(l[s]=d[s]);return t.vnode&&t.vnode(c),c}const un=e=>{const{name:n,size:t,direction:r}=e;let i;switch(r){case"left":i="rotate(0 12 12)";break;case"right":i="rotate(180 12 12)";break;case"up":i="rotate(90 12 12)";break;case"down":i="rotate(-90 12 12)"}return cn("svg",{className:`xendit-icon ${e.className??""}`,width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"none",children:cn("g",{transform:i,children:pn.find(e=>e.name===n)?.node??null})})};function hn(e,n,t){return{name:e,node:cn("g",{id:`xendit-icon-${e}`,transform:`scale(${1/t} ${1/t})`,children:n})}}const pn=[hn("chevron",cn("path",{d:"M15 19.5L7.5 12L15 4.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),1),hn("check",cn("path",{d:"M13.5 4.5L6.5 11.5L3 8",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),16/24),hn("x",cn(x,{children:[cn("path",{d:"M18.75 5.25L5.25 18.75",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),cn("path",{d:"M18.75 18.75L5.25 5.25",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})]}),1),hn("card",cn("path",{fill:"currentColor",d:"M17.5 3.75H2.5C2.16848 3.75 1.85054 3.8817 1.61612 4.11612C1.3817 4.35054 1.25 4.66848 1.25 5V15C1.25 15.3315 1.3817 15.6495 1.61612 15.8839C1.85054 16.1183 2.16848 16.25 2.5 16.25H17.5C17.8315 16.25 18.1495 16.1183 18.3839 15.8839C18.6183 15.6495 18.75 15.3315 18.75 15V5C18.75 4.66848 18.6183 4.35054 18.3839 4.11612C18.1495 3.8817 17.8315 3.75 17.5 3.75ZM10.625 13.75H9.375C9.20924 13.75 9.05027 13.6842 8.93306 13.5669C8.81585 13.4497 8.75 13.2908 8.75 13.125C8.75 12.9592 8.81585 12.8003 8.93306 12.6831C9.05027 12.5658 9.20924 12.5 9.375 12.5H10.625C10.7908 12.5 10.9497 12.5658 11.0669 12.6831C11.1842 12.8003 11.25 12.9592 11.25 13.125C11.25 13.2908 11.1842 13.4497 11.0669 13.5669C10.9497 13.6842 10.7908 13.75 10.625 13.75ZM15.625 13.75H13.125C12.9592 13.75 12.8003 13.6842 12.6831 13.5669C12.5658 13.4497 12.5 13.2908 12.5 13.125C12.5 12.9592 12.5658 12.8003 12.6831 12.6831C12.8003 12.5658 12.9592 12.5 13.125 12.5H15.625C15.7908 12.5 15.9497 12.5658 16.0669 12.6831C16.1842 12.8003 16.25 12.9592 16.25 13.125C16.25 13.2908 16.1842 13.4497 16.0669 13.5669C15.9497 13.6842 15.7908 13.75 15.625 13.75ZM2.5 6.875V5H17.5V6.875H2.5Z"}),20/24),hn("copy",cn(x,{children:[cn("path",{d:"M6 9.5H10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),cn("path",{d:"M6 7.5H10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),cn("path",{d:"M10 2.5H12.5C12.6326 2.5 12.7598 2.55268 12.8536 2.64645C12.9473 2.74021 13 2.86739 13 3V13.5C13 13.6326 12.9473 13.7598 12.8536 13.8536C12.7598 13.9473 12.6326 14 12.5 14H3.5C3.36739 14 3.24021 13.9473 3.14645 13.8536C3.05268 13.7598 3 13.6326 3 13.5V3C3 2.86739 3.05268 2.74021 3.14645 2.64645C3.24021 2.55268 3.36739 2.5 3.5 2.5H6",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),cn("path",{d:"M5.5 4.5V4C5.5 3.33696 5.76339 2.70107 6.23223 2.23223C6.70107 1.76339 7.33696 1.5 8 1.5C8.66304 1.5 9.29893 1.76339 9.76777 2.23223C10.2366 2.70107 10.5 3.33696 10.5 4V4.5H5.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]}),16/24),hn("dummy",cn("path",{fill:"currentColor",d:"M17.5 11.875V15C17.5 15.3315 17.3683 15.6495 17.1339 15.8839C16.8995 16.1183 16.5815 16.25 16.25 16.25H3.75C3.41848 16.25 3.10054 16.1183 2.86612 15.8839C2.6317 15.6495 2.5 15.3315 2.5 15V11.875C2.5 11.5435 2.6317 11.2255 2.86612 10.9911C3.10054 10.7567 3.41848 10.625 3.75 10.625H16.25C16.5815 10.625 16.8995 10.7567 17.1339 10.9911C17.3683 11.2255 17.5 11.5435 17.5 11.875ZM16.25 3.75H3.75C3.41848 3.75 3.10054 3.8817 2.86612 4.11612C2.6317 4.35054 2.5 4.66848 2.5 5V8.125C2.5 8.45652 2.6317 8.77446 2.86612 9.00888C3.10054 9.2433 3.41848 9.375 3.75 9.375H16.25C16.5815 9.375 16.8995 9.2433 17.1339 9.00888C17.3683 8.77446 17.5 8.45652 17.5 8.125V5C17.5 4.66848 17.3683 4.35054 17.1339 4.11612C16.8995 3.8817 16.5815 3.75 16.25 3.75Z"}),20/24)];let mn=!1;class XenditInitEvent extends Event{static type="init";constructor(){super(XenditInitEvent.type,{})}}class XenditFatalErrorEvent extends Event{message;static type="fatal-error";constructor(e){super(XenditFatalErrorEvent.type,{}),this.message=e}}class XenditReadyEvent extends Event{channelCode;static type="submission-ready";constructor(e){super(XenditReadyEvent.type,{}),this.channelCode=e}}class XenditNotReadyEvent extends Event{static type="submission-not-ready";constructor(){super(XenditNotReadyEvent.type,{})}}class XenditSubmissionBeginEvent extends Event{static type="submission-begin";constructor(){super(XenditSubmissionBeginEvent.type,{})}}class XenditSubmissionEndEvent extends Event{reason;userErrorMessage;developerErrorMessage;static type="submission-end";constructor(e,n,t){super(XenditSubmissionEndEvent.type,{}),this.reason=e,this.userErrorMessage=n,this.developerErrorMessage=t}}class XenditActionBeginEvent extends Event{static type="action-begin";constructor(){super(XenditActionBeginEvent.type,{})}}class XenditActionEndEvent extends Event{static type="action-end";constructor(){super(XenditActionEndEvent.type,{})}}class XenditWillRedirectEvent extends Event{static type="will-redirect";constructor(){super(XenditWillRedirectEvent.type,{})}}class XenditSessionCompleteEvent extends Event{static type="session-complete";constructor(){super(XenditSessionCompleteEvent.type,{})}}class XenditSessionExpiredOrCanceledEvent extends Event{static type="session-expired-or-canceled";constructor(){super(XenditSessionExpiredOrCanceledEvent.type,{})}}class XenditSessionPendingEvent extends Event{static type="session-pending";constructor(){super(XenditSessionPendingEvent.type,{})}}class XenditSessionNotPendingEvent extends Event{static type="session-not-pending";constructor(){super(XenditSessionNotPendingEvent.type,{})}}class XenditPaymentRequestCreatedEvent extends Event{paymentRequestId;static type="payment-request-created";constructor(e){super(XenditPaymentRequestCreatedEvent.type,{}),this.paymentRequestId=e}}class XenditPaymentTokenCreatedEvent extends Event{paymentTokenId;static type="payment-token-created";constructor(e){super(XenditPaymentTokenCreatedEvent.type,{}),this.paymentTokenId=e}}class XenditPaymentRequestDiscardedEvent extends Event{paymentRequestId;static type="payment-request-discarded";constructor(e){super(XenditPaymentRequestDiscardedEvent.type,{}),this.paymentRequestId=e}}class XenditPaymentTokenDiscardedEvent extends Event{paymentTokenId;static type="payment-token-discarded";constructor(e){super(XenditPaymentTokenDiscardedEvent.type,{}),this.paymentTokenId=e}}const fn=Symbol("xendit-internal"),_n=e=>cn("div",{class:"xendit-accordion",children:e.children});function bn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $n,yn={exports:{}};
|
|
2
|
+
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).Xendit={})}(this,function(e){"use strict";var n,t,r,i,a,o,d,s,l,c,u,h,p,_={},m=[],f=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,y=Array.isArray;function b(e,n){for(var t in n)e[t]=n[t];return e}function $(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function g(e,t,r){var i,a,o,d={};for(o in t)"key"==o?i=t[o]:"ref"==o?a=t[o]:d[o]=t[o];if(arguments.length>2&&(d.children=arguments.length>3?n.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===d[o]&&(d[o]=e.defaultProps[o]);return v(e,d,i,a,null)}function v(e,n,i,a,o){var d={type:e,props:n,key:i,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==o?++r:o,__i:-1,__u:0};return null==o&&null!=t.vnode&&t.vnode(d),d}function x(e){return e.children}function w(e,n){this.props=e,this.context=n}function C(e,n){if(null==n)return e.__?C(e.__,e.__i+1):null;for(var t;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e)return t.__e;return"function"==typeof e.type?C(e):null}function E(e){if(e.__P&&e.__d){var n=e.__v,r=n.__e,i=[],a=[],o=b({},n);o.__v=n.__v+1,t.vnode&&t.vnode(o),D(e.__P,o,n,e.__n,e.__P.namespaceURI,32&n.__u?[r]:null,i,null==r?C(n):r,!!(32&n.__u),a),o.__v=n.__v,o.__.__k[o.__i]=o,U(i,o,a),n.__e=n.__=null,o.__e!=r&&k(o)}}function k(e){if(null!=(e=e.__)&&null!=e.__c)return e.__e=e.__c.base=null,e.__k.some(function(n){if(null!=n&&null!=n.__e)return e.__e=e.__c.base=n.__e}),k(e)}function P(e){(!e.__d&&(e.__d=!0)&&i.push(e)&&!A.__r++||a!=t.debounceRendering)&&((a=t.debounceRendering)||o)(A)}function A(){for(var e,n=1;i.length;)i.length>n&&i.sort(d),e=i.shift(),n=i.length,E(e);A.__r=0}function N(e,n,t,r,i,a,o,d,s,l,c){var u,h,p,f,b,$,g,w=r&&r.__k||m,E=n.length;for(s=function(e,n,t,r,i){var a,o,d,s,l,c=t.length,u=c,h=0;for(e.__k=new Array(i),a=0;a<i;a++)null!=(o=n[a])&&"boolean"!=typeof o&&"function"!=typeof o?("string"==typeof o||"number"==typeof o||"bigint"==typeof o||o.constructor==String?o=e.__k[a]=v(null,o,null,null,null):y(o)?o=e.__k[a]=v(x,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?o=e.__k[a]=v(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):e.__k[a]=o,s=a+h,o.__=e,o.__b=e.__b+1,d=null,-1!=(l=o.__i=I(o,t,s,u))&&(u--,(d=t[l])&&(d.__u|=2)),null==d||null==d.__v?(-1==l&&(i>c?h--:i<c&&h++),"function"!=typeof o.type&&(o.__u|=4)):l!=s&&(l==s-1?h--:l==s+1?h++:(l>s?h--:h++,o.__u|=4))):e.__k[a]=null;if(u)for(a=0;a<c;a++)null!=(d=t[a])&&!(2&d.__u)&&(d.__e==r&&(r=C(d)),G(d,d));return r}(t,n,w,s,E),u=0;u<E;u++)null!=(p=t.__k[u])&&(h=-1!=p.__i&&w[p.__i]||_,p.__i=u,$=D(e,p,h,i,a,o,d,s,l,c),f=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&q(h.ref,null,p),c.push(p.ref,p.__c||f,p)),null==b&&null!=f&&(b=f),(g=!!(4&p.__u))||h.__k===p.__k?s=S(p,s,e,g):"function"==typeof p.type&&void 0!==$?s=$:f&&(s=f.nextSibling),p.__u&=-7);return t.__e=b,s}function S(e,n,t,r){var i,a;if("function"==typeof e.type){for(i=e.__k,a=0;i&&a<i.length;a++)i[a]&&(i[a].__=e,n=S(i[a],n,t,r));return n}e.__e!=n&&(r&&(n&&e.type&&!n.parentNode&&(n=C(e)),t.insertBefore(e.__e,n||null)),n=e.__e);do{n=n&&n.nextSibling}while(null!=n&&8==n.nodeType);return n}function T(e,n){return n=n||[],null==e||"boolean"==typeof e||(y(e)?e.some(function(e){T(e,n)}):n.push(e)),n}function I(e,n,t,r){var i,a,o,d=e.key,s=e.type,l=n[t],c=null!=l&&!(2&l.__u);if(null===l&&null==d||c&&d==l.key&&s==l.type)return t;if(r>(c?1:0))for(i=t-1,a=t+1;i>=0||a<n.length;)if(null!=(l=n[o=i>=0?i--:a++])&&!(2&l.__u)&&d==l.key&&s==l.type)return o;return-1}function R(e,n,t){"-"==n[0]?e.setProperty(n,null==t?"":t):e[n]=null==t?"":"number"!=typeof t||f.test(n)?t:t+"px"}function M(e,n,t,r,i){var a,o;e:if("style"==n)if("string"==typeof t)e.style.cssText=t;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(n in r)t&&n in t||R(e.style,n,"");if(t)for(n in t)r&&t[n]==r[n]||R(e.style,n,t[n])}else if("o"==n[0]&&"n"==n[1])a=n!=(n=n.replace(s,"$1")),o=n.toLowerCase(),n=o in e||"onFocusOut"==n||"onFocusIn"==n?o.slice(2):n.slice(2),e.l||(e.l={}),e.l[n+a]=t,t?r?t.u=r.u:(t.u=l,e.addEventListener(n,a?u:c,a)):e.removeEventListener(n,a?u:c,a);else{if("http://www.w3.org/2000/svg"==i)n=n.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=n&&"height"!=n&&"href"!=n&&"list"!=n&&"form"!=n&&"tabIndex"!=n&&"download"!=n&&"rowSpan"!=n&&"colSpan"!=n&&"role"!=n&&"popover"!=n&&n in e)try{e[n]=null==t?"":t;break e}catch(e){}"function"==typeof t||(null==t||!1===t&&"-"!=n[4]?e.removeAttribute(n):e.setAttribute(n,"popover"==n&&1==t?"":t))}}function O(e){return function(n){if(this.l){var r=this.l[n.type+e];if(null==n.t)n.t=l++;else if(n.t<r.u)return;return r(t.event?t.event(n):n)}}}function D(e,n,r,i,a,o,d,s,l,c){var u,h,p,_,f,g,v,C,E,k,P,A,S,T,I,R=n.type;if(void 0!==n.constructor)return null;128&r.__u&&(l=!!(32&r.__u),o=[s=n.__e=r.__e]),(u=t.__b)&&u(n);e:if("function"==typeof R)try{if(C=n.props,E="prototype"in R&&R.prototype.render,k=(u=R.contextType)&&i[u.__c],P=u?k?k.props.value:u.__:i,r.__c?v=(h=n.__c=r.__c).__=h.__E:(E?n.__c=h=new R(C,P):(n.__c=h=new w(C,P),h.constructor=R,h.render=K),k&&k.sub(h),h.state||(h.state={}),h.__n=i,p=h.__d=!0,h.__h=[],h._sb=[]),E&&null==h.__s&&(h.__s=h.state),E&&null!=R.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=b({},h.__s)),b(h.__s,R.getDerivedStateFromProps(C,h.__s))),_=h.props,f=h.state,h.__v=n,p)E&&null==R.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),E&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(E&&null==R.getDerivedStateFromProps&&C!==_&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(C,P),n.__v==r.__v||!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(C,h.__s,P)){n.__v!=r.__v&&(h.props=C,h.state=h.__s,h.__d=!1),n.__e=r.__e,n.__k=r.__k,n.__k.some(function(e){e&&(e.__=n)}),m.push.apply(h.__h,h._sb),h._sb=[],h.__h.length&&d.push(h);break e}null!=h.componentWillUpdate&&h.componentWillUpdate(C,h.__s,P),E&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(_,f,g)})}if(h.context=P,h.props=C,h.__P=e,h.__e=!1,A=t.__r,S=0,E)h.state=h.__s,h.__d=!1,A&&A(n),u=h.render(h.props,h.state,h.context),m.push.apply(h.__h,h._sb),h._sb=[];else do{h.__d=!1,A&&A(n),u=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++S<25);h.state=h.__s,null!=h.getChildContext&&(i=b(b({},i),h.getChildContext())),E&&!p&&null!=h.getSnapshotBeforeUpdate&&(g=h.getSnapshotBeforeUpdate(_,f)),T=null!=u&&u.type===x&&null==u.key?B(u.props.children):u,s=N(e,y(T)?T:[T],n,r,i,a,o,d,s,l,c),h.base=n.__e,n.__u&=-161,h.__h.length&&d.push(h),v&&(h.__E=h.__=null)}catch(e){if(n.__v=null,l||null!=o)if(e.then){for(n.__u|=l?160:128;s&&8==s.nodeType&&s.nextSibling;)s=s.nextSibling;o[o.indexOf(s)]=null,n.__e=s}else{for(I=o.length;I--;)$(o[I]);L(n)}else n.__e=r.__e,n.__k=r.__k,e.then||L(n);t.__e(e,n,r)}else null==o&&n.__v==r.__v?(n.__k=r.__k,n.__e=r.__e):s=n.__e=F(r.__e,n,r,i,a,o,d,l,c);return(u=t.diffed)&&u(n),128&n.__u?void 0:s}function L(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(L))}function U(e,n,r){for(var i=0;i<r.length;i++)q(r[i],r[++i],r[++i]);t.__c&&t.__c(n,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(e){e.call(n)})}catch(e){t.__e(e,n.__v)}})}function B(e){return"object"!=typeof e||null==e||e.__b>0?e:y(e)?e.map(B):b({},e)}function F(e,r,i,a,o,d,s,l,c){var u,h,p,m,f,b,g,v=i.props||_,x=r.props,w=r.type;if("svg"==w?o="http://www.w3.org/2000/svg":"math"==w?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),null!=d)for(u=0;u<d.length;u++)if((f=d[u])&&"setAttribute"in f==!!w&&(w?f.localName==w:3==f.nodeType)){e=f,d[u]=null;break}if(null==e){if(null==w)return document.createTextNode(x);e=document.createElementNS(o,w,x.is&&x),l&&(t.__m&&t.__m(r,d),l=!1),d=null}if(null==w)v===x||l&&e.data==x||(e.data=x);else{if(d=d&&n.call(e.childNodes),!l&&null!=d)for(v={},u=0;u<e.attributes.length;u++)v[(f=e.attributes[u]).name]=f.value;for(u in v)f=v[u],"dangerouslySetInnerHTML"==u?p=f:"children"==u||u in x||"value"==u&&"defaultValue"in x||"checked"==u&&"defaultChecked"in x||M(e,u,null,f,o);for(u in x)f=x[u],"children"==u?m=f:"dangerouslySetInnerHTML"==u?h=f:"value"==u?b=f:"checked"==u?g=f:l&&"function"!=typeof f||v[u]===f||M(e,u,f,v[u],o);if(h)l||p&&(h.__html==p.__html||h.__html==e.innerHTML)||(e.innerHTML=h.__html),r.__k=[];else if(p&&(e.innerHTML=""),N("template"==r.type?e.content:e,y(m)?m:[m],r,i,a,"foreignObject"==w?"http://www.w3.org/1999/xhtml":o,d,s,d?d[0]:i.__k&&C(i,0),l,c),null!=d)for(u=d.length;u--;)$(d[u]);l||(u="value","progress"==w&&null==b?e.removeAttribute("value"):null!=b&&(b!==e[u]||"progress"==w&&!b||"option"==w&&b!=v[u])&&M(e,u,b,v[u],o),u="checked",null!=g&&g!=e[u]&&M(e,u,g,v[u],o))}return e}function q(e,n,r){try{if("function"==typeof e){var i="function"==typeof e.__u;i&&e.__u(),i&&null==n||(e.__u=e(n))}else e.current=n}catch(e){t.__e(e,r)}}function G(e,n,r){var i,a;if(t.unmount&&t.unmount(e),(i=e.ref)&&(i.current&&i.current!=e.__e||q(i,null,n)),null!=(i=e.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(e){t.__e(e,n)}i.base=i.__P=null}if(i=e.__k)for(a=0;a<i.length;a++)i[a]&&G(i[a],n,r||"function"!=typeof e.type);r||$(e.__e),e.__c=e.__=e.__e=void 0}function K(e,n,t){return this.constructor(e,t)}function V(e,r,i){var a,o,d;r==document&&(r=document.documentElement),t.__&&t.__(e,r),a=!1?null:r.__k,o=[],d=[],D(r,e=r.__k=g(x,null,[e]),a||_,_,r.namespaceURI,a?null:r.firstChild?n.call(r.childNodes):null,o,a?a.__e:r.firstChild,false,d),U(o,e,d)}function W(e){function n(e){var t,r;return this.getChildContext||(t=new Set,(r={})[n.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){t=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&t.forEach(function(e){e.__e=!0,P(e)})},this.sub=function(e){t.add(e);var n=e.componentWillUnmount;e.componentWillUnmount=function(){t&&t.delete(e),n&&n.call(e)}}),e.children}return n.__c="__cC"+h++,n.__=e,n.Provider=n.__l=(n.Consumer=function(e,n){return e.children(n)}).contextType=n,n}n=m.slice,t={__e:function(e,n,t,r){for(var i,a,o;n=n.__;)if((i=n.__c)&&!i.__)try{if((a=i.constructor)&&null!=a.getDerivedStateFromError&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(n){e=n}throw e}},r=0,w.prototype.setState=function(e,n){var t;t=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=b({},this.state),"function"==typeof e&&(e=e(b({},t),this.props)),e&&b(t,e),null!=e&&this.__v&&(n&&this._sb.push(n),P(this))},w.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),P(this))},w.prototype.render=x,i=[],o="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,d=function(e,n){return e.__v.__b-n.__v.__b},A.__r=0,s=/(PointerCapture)$|Capture$/i,l=0,c=O(!1),u=O(!0),h=0,null!=(p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0)&&p.__PREACT_DEVTOOLS__&&p.__PREACT_DEVTOOLS__.attachPreact("10.28.4",t,{Fragment:x,Component:w});var H={};function j(e){return e.type===x?"Fragment":"function"==typeof e.type?e.type.displayName||e.type.name:"string"==typeof e.type?e.type:"#text"}var Y=[],X=[];function z(){return Y.length>0?Y[Y.length-1]:null}var Z=!0;function J(e){return"function"==typeof e.type&&e.type!=x}function Q(e){for(var n=[e],t=e;null!=t.__o;)n.push(t.__o),t=t.__o;return n.reduce(function(e,n){e+=" in "+j(n);var t=n.__source;return t?e+=" (at "+t.fileName+":"+t.lineNumber+")":Z&&console.warn("Add @babel/plugin-transform-react-jsx-source to get a more detailed component stack. Note that you should not add it to production builds of your App for bundle size reasons."),Z=!1,e+"\n"},"")}var ee="function"==typeof WeakMap;function ne(e){var n=[];return e.__k?(e.__k.forEach(function(e){e&&"function"==typeof e.type?n.push.apply(n,ne(e)):e&&"string"==typeof e.type&&n.push(e.type)}),n):n}function te(e){return e?"function"==typeof e.type?null==e.__?null!=e.__e&&null!=e.__e.parentNode?e.__e.parentNode.localName:"":te(e.__):e.type:""}var re=w.prototype.setState;function ie(e){return"table"===e||"tfoot"===e||"tbody"===e||"thead"===e||"td"===e||"tr"===e||"th"===e}w.prototype.setState=function(e,n){return null==this.__v&&null==this.state&&console.warn('Calling "this.setState" inside the constructor of a component is a no-op and might be a bug in your application. Instead, set "this.state = {}" directly.\n\n'+Q(z())),re.call(this,e,n)};var ae=/^(address|article|aside|blockquote|details|div|dl|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hgroup|hr|main|menu|nav|ol|p|pre|search|section|table|ul)$/,oe=w.prototype.forceUpdate;function de(e){var n=e.props,t=j(e),r="";for(var i in n)if(n.hasOwnProperty(i)&&"children"!==i){var a=n[i];"function"==typeof a&&(a="function "+(a.displayName||a.name)+"() {}"),a=Object(a)!==a||a.toString?a+"":Object.prototype.toString.call(a),r+=" "+i+"="+JSON.stringify(a)}var o=n.children;return"<"+t+r+(o&&o.length?">..</"+t+">":" />")}w.prototype.forceUpdate=function(e){return null==this.__v?console.warn('Calling "this.forceUpdate" inside the constructor of a component is a no-op and might be a bug in your application.\n\n'+Q(z())):null==this.__P&&console.warn('Can\'t call "this.forceUpdate" on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.\n\n'+Q(this.__v)),oe.call(this,e)},t.__m=function(e,n){var t=e.type,r=n.map(function(e){return e&&e.localName}).filter(Boolean);console.error('Expected a DOM node of type "'+t+'" but found "'+r.join(", ")+"\" as available DOM-node(s), this is caused by the SSR'd HTML containing different DOM-nodes compared to the hydrated one.\n\n"+Q(e))},function(){!function(){var e=t.__b,n=t.diffed,r=t.__,i=t.vnode,a=t.__r;t.diffed=function(e){J(e)&&X.pop(),Y.pop(),n&&n(e)},t.__b=function(n){J(n)&&Y.push(n),e&&e(n)},t.__=function(e,n){X=[],r&&r(e,n)},t.vnode=function(e){e.__o=X.length>0?X[X.length-1]:null,i&&i(e)},t.__r=function(e){J(e)&&X.push(e),a&&a(e)}}();var e=!1,n=t.__b,r=t.diffed,i=t.vnode,a=t.__r,o=t.__e,d=t.__,s=t.__h,l=ee?{useEffect:new WeakMap,useLayoutEffect:new WeakMap,lazyPropTypes:new WeakMap}:null,c=[];t.__e=function(e,n,t,r){if(n&&n.__c&&"function"==typeof e.then){var i=e;e=new Error("Missing Suspense. The throwing component was: "+j(n));for(var a=n;a;a=a.__)if(a.__c&&a.__c.__c){e=i;break}if(e instanceof Error)throw e}try{(r=r||{}).componentStack=Q(n),o(e,n,t,r),"function"!=typeof e.then&&setTimeout(function(){throw e})}catch(e){throw e}},t.__=function(e,n){if(!n)throw new Error("Undefined parent passed to render(), this is the second argument.\nCheck if the element is available in the DOM/has the correct id.");var t;switch(n.nodeType){case 1:case 11:case 9:t=!0;break;default:t=!1}if(!t){var r=j(e);throw new Error("Expected a valid HTML node as a second argument to render.\tReceived "+n+" instead: render(<"+r+" />, "+n+");")}d&&d(e,n)},t.__b=function(t){var r=t.type;if(e=!0,void 0===r)throw new Error("Undefined component passed to createElement()\n\nYou likely forgot to export your component or might have mixed up default and named imports"+de(t)+"\n\n"+Q(t));if(null!=r&&"object"==typeof r){if(void 0!==r.__k&&void 0!==r.__e)throw new Error("Invalid type passed to createElement(): "+r+"\n\nDid you accidentally pass a JSX literal as JSX twice?\n\n let My"+j(t)+" = "+de(r)+";\n let vnode = <My"+j(t)+" />;\n\nThis usually happens when you export a JSX literal and not the component.\n\n"+Q(t));throw new Error("Invalid type passed to createElement(): "+(Array.isArray(r)?"array":r))}if(void 0!==t.ref&&"function"!=typeof t.ref&&"object"!=typeof t.ref&&!("$$typeof"in t))throw new Error('Component\'s "ref" property should be a function, or an object created by createRef(), but got ['+typeof t.ref+"] instead\n"+de(t)+"\n\n"+Q(t));if("string"==typeof t.type)for(var i in t.props)if("o"===i[0]&&"n"===i[1]&&"function"!=typeof t.props[i]&&null!=t.props[i])throw new Error("Component's \""+i+'" property should be a function, but got ['+typeof t.props[i]+"] instead\n"+de(t)+"\n\n"+Q(t));if("function"==typeof t.type&&t.type.propTypes){if("Lazy"===t.type.displayName&&l&&!l.lazyPropTypes.has(t.type)){var a="PropTypes are not supported on lazy(). Use propTypes on the wrapped component itself. ";try{var o=t.type();l.lazyPropTypes.set(t.type,!0),console.warn(a+"Component wrapped in lazy() is "+j(o))}catch(e){console.warn(a+"We will log the wrapped component's name once it is loaded.")}}var d=t.props;t.type.__f&&delete(d=function(e,n){for(var t in n)e[t]=n[t];return e}({},d)).ref,function(e,n,t,r,i){Object.keys(e).forEach(function(t){var a;try{a=e[t](n,t,r,"prop",null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){a=e}a&&!(a.message in H)&&(H[a.message]=!0,console.error("Failed prop type: "+a.message+(i&&"\n"+i()||"")))})}(t.type.propTypes,d,0,j(t),function(){return Q(t)})}n&&n(t)};var u,h=0;t.__r=function(n){a&&a(n),e=!0;var t=n.__c;if(t===u?h++:h=1,h>=25)throw new Error("Too many re-renders. This is limited to prevent an infinite loop which may lock up your browser. The component causing this is: "+j(n));u=t},t.__h=function(n,t,r){if(!n||!e)throw new Error("Hook can only be invoked from render methods.");s&&s(n,t,r)};var p=function(e,n){return{get:function(){var t="get"+e+n;c&&c.indexOf(t)<0&&(c.push(t),console.warn("getting vnode."+e+" is deprecated, "+n))},set:function(){var t="set"+e+n;c&&c.indexOf(t)<0&&(c.push(t),console.warn("setting vnode."+e+" is not allowed, "+n))}}},_={nodeName:p("nodeName","use vnode.type"),attributes:p("attributes","use vnode.props"),children:p("children","use vnode.props.children")},m=Object.create({},_);t.vnode=function(e){var n=e.props;if(null!==e.type&&null!=n&&("__source"in n||"__self"in n)){var t=e.props={};for(var r in n){var a=n[r];"__source"===r?e.__source=a:"__self"===r?e.__self=a:t[r]=a}}e.__proto__=m,i&&i(e)},t.diffed=function(n){var t,i=n.type,a=n.__;if(n.__k&&n.__k.forEach(function(e){if("object"==typeof e&&e&&void 0===e.type){var t=Object.keys(e).join(",");throw new Error("Objects are not valid as a child. Encountered an object with the keys {"+t+"}.\n\n"+Q(n))}}),n.__c===u&&(h=0),"string"==typeof i&&(ie(i)||"p"===i||"a"===i||"button"===i)){var o=te(a);if(""!==o&&ie(i))"table"===i&&"td"!==o&&ie(o)?console.error("Improper nesting of table. Your <table> should not have a table-node parent."+de(n)+"\n\n"+Q(n)):"thead"!==i&&"tfoot"!==i&&"tbody"!==i||"table"===o?"tr"===i&&"thead"!==o&&"tfoot"!==o&&"tbody"!==o?console.error("Improper nesting of table. Your <tr> should have a <thead/tbody/tfoot> parent."+de(n)+"\n\n"+Q(n)):"td"===i&&"tr"!==o?console.error("Improper nesting of table. Your <td> should have a <tr> parent."+de(n)+"\n\n"+Q(n)):"th"===i&&"tr"!==o&&console.error("Improper nesting of table. Your <th> should have a <tr>."+de(n)+"\n\n"+Q(n)):console.error("Improper nesting of table. Your <thead/tbody/tfoot> should have a <table> parent."+de(n)+"\n\n"+Q(n));else if("p"===i){var d=ne(n).filter(function(e){return ae.test(e)});d.length&&console.error("Improper nesting of paragraph. Your <p> should not have "+d.join(", ")+" as child-elements."+de(n)+"\n\n"+Q(n))}else"a"!==i&&"button"!==i||-1!==ne(n).indexOf(i)&&console.error("Improper nesting of interactive content. Your <"+i+"> should not have other "+("a"===i?"anchor":"button")+" tags as child-elements."+de(n)+"\n\n"+Q(n))}if(e=!1,r&&r(n),null!=n.__k)for(var s=[],l=0;l<n.__k.length;l++){var c=n.__k[l];if(c&&null!=c.key){var p=c.key;if(-1!==s.indexOf(p)){console.error('Following component has two or more children with the same key attribute: "'+p+'". This may cause glitches and misbehavior in rendering process. Component: \n\n'+de(n)+"\n\n"+Q(n));break}s.push(p)}}if(null!=n.__c&&null!=n.__c.__H){var _=n.__c.__H.__;if(_)for(var m=0;m<_.length;m+=1){var f=_[m];if(f.__H)for(var y=0;y<f.__H.length;y++)if((t=f.__H[y])!=t){var b=j(n);console.warn("Invalid argument passed to hook. Hooks should not be called with NaN in the dependency array. Hook index "+m+" in component "+b+" was called with NaN.")}}}}}();var se=0;function le(e,n,r,i,a,o){n||(n={});var d,s,l=n;if("ref"in l)for(s in l={},n)"ref"==s?d=n[s]:l[s]=n[s];var c={type:e,props:l,key:r,ref:d,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--se,__i:-1,__u:0,__source:a,__self:o};if("function"==typeof e&&(d=e.defaultProps))for(s in d)void 0===l[s]&&(l[s]=d[s]);return t.vnode&&t.vnode(c),c}const ce=e=>{const{name:n,size:t,direction:r}=e;let i;switch(r){case"left":i="rotate(0 12 12)";break;case"right":i="rotate(180 12 12)";break;case"up":i="rotate(90 12 12)";break;case"down":i="rotate(-90 12 12)"}return le("svg",{className:`xendit-icon ${e.className??""}`,width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"none",children:le("g",{transform:i,children:he.find(e=>e.name===n)?.node??null})})};function ue(e,n,t){return{name:e,node:le("g",{id:`xendit-icon-${e}`,transform:`scale(${1/t} ${1/t})`,children:n})}}const he=[ue("chevron",le("path",{d:"M15 19.5L7.5 12L15 4.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),1),ue("check",le("path",{d:"M13.5 4.5L6.5 11.5L3 8",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),16/24),ue("x",le(x,{children:[le("path",{d:"M18.75 5.25L5.25 18.75",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),le("path",{d:"M18.75 18.75L5.25 5.25",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})]}),1),ue("card",le("path",{fill:"currentColor",d:"M17.5 3.75H2.5C2.16848 3.75 1.85054 3.8817 1.61612 4.11612C1.3817 4.35054 1.25 4.66848 1.25 5V15C1.25 15.3315 1.3817 15.6495 1.61612 15.8839C1.85054 16.1183 2.16848 16.25 2.5 16.25H17.5C17.8315 16.25 18.1495 16.1183 18.3839 15.8839C18.6183 15.6495 18.75 15.3315 18.75 15V5C18.75 4.66848 18.6183 4.35054 18.3839 4.11612C18.1495 3.8817 17.8315 3.75 17.5 3.75ZM10.625 13.75H9.375C9.20924 13.75 9.05027 13.6842 8.93306 13.5669C8.81585 13.4497 8.75 13.2908 8.75 13.125C8.75 12.9592 8.81585 12.8003 8.93306 12.6831C9.05027 12.5658 9.20924 12.5 9.375 12.5H10.625C10.7908 12.5 10.9497 12.5658 11.0669 12.6831C11.1842 12.8003 11.25 12.9592 11.25 13.125C11.25 13.2908 11.1842 13.4497 11.0669 13.5669C10.9497 13.6842 10.7908 13.75 10.625 13.75ZM15.625 13.75H13.125C12.9592 13.75 12.8003 13.6842 12.6831 13.5669C12.5658 13.4497 12.5 13.2908 12.5 13.125C12.5 12.9592 12.5658 12.8003 12.6831 12.6831C12.8003 12.5658 12.9592 12.5 13.125 12.5H15.625C15.7908 12.5 15.9497 12.5658 16.0669 12.6831C16.1842 12.8003 16.25 12.9592 16.25 13.125C16.25 13.2908 16.1842 13.4497 16.0669 13.5669C15.9497 13.6842 15.7908 13.75 15.625 13.75ZM2.5 6.875V5H17.5V6.875H2.5Z"}),20/24),ue("copy",le(x,{children:[le("path",{d:"M6 9.5H10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),le("path",{d:"M6 7.5H10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),le("path",{d:"M10 2.5H12.5C12.6326 2.5 12.7598 2.55268 12.8536 2.64645C12.9473 2.74021 13 2.86739 13 3V13.5C13 13.6326 12.9473 13.7598 12.8536 13.8536C12.7598 13.9473 12.6326 14 12.5 14H3.5C3.36739 14 3.24021 13.9473 3.14645 13.8536C3.05268 13.7598 3 13.6326 3 13.5V3C3 2.86739 3.05268 2.74021 3.14645 2.64645C3.24021 2.55268 3.36739 2.5 3.5 2.5H6",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),le("path",{d:"M5.5 4.5V4C5.5 3.33696 5.76339 2.70107 6.23223 2.23223C6.70107 1.76339 7.33696 1.5 8 1.5C8.66304 1.5 9.29893 1.76339 9.76777 2.23223C10.2366 2.70107 10.5 3.33696 10.5 4V4.5H5.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]}),16/24),ue("dummy",le("path",{fill:"currentColor",d:"M17.5 11.875V15C17.5 15.3315 17.3683 15.6495 17.1339 15.8839C16.8995 16.1183 16.5815 16.25 16.25 16.25H3.75C3.41848 16.25 3.10054 16.1183 2.86612 15.8839C2.6317 15.6495 2.5 15.3315 2.5 15V11.875C2.5 11.5435 2.6317 11.2255 2.86612 10.9911C3.10054 10.7567 3.41848 10.625 3.75 10.625H16.25C16.5815 10.625 16.8995 10.7567 17.1339 10.9911C17.3683 11.2255 17.5 11.5435 17.5 11.875ZM16.25 3.75H3.75C3.41848 3.75 3.10054 3.8817 2.86612 4.11612C2.6317 4.35054 2.5 4.66848 2.5 5V8.125C2.5 8.45652 2.6317 8.77446 2.86612 9.00888C3.10054 9.2433 3.41848 9.375 3.75 9.375H16.25C16.5815 9.375 16.8995 9.2433 17.1339 9.00888C17.3683 8.77446 17.5 8.45652 17.5 8.125V5C17.5 4.66848 17.3683 4.35054 17.1339 4.11612C16.8995 3.8817 16.5815 3.75 16.25 3.75Z"}),20/24)];let pe=!1;class XenditInitEvent extends Event{static type="init";constructor(){super(XenditInitEvent.type,{})}}class XenditFatalErrorEvent extends Event{message;static type="fatal-error";constructor(e){super(XenditFatalErrorEvent.type,{}),this.message=e}}class XenditReadyEvent extends Event{channelCode;static type="submission-ready";constructor(e){super(XenditReadyEvent.type,{}),this.channelCode=e}}class XenditNotReadyEvent extends Event{static type="submission-not-ready";constructor(){super(XenditNotReadyEvent.type,{})}}class XenditSubmissionBeginEvent extends Event{static type="submission-begin";constructor(){super(XenditSubmissionBeginEvent.type,{})}}class XenditSubmissionEndEvent extends Event{reason;userErrorMessage;developerErrorMessage;static type="submission-end";constructor(e,n,t){super(XenditSubmissionEndEvent.type,{}),this.reason=e,this.userErrorMessage=n,this.developerErrorMessage=t}}class XenditActionBeginEvent extends Event{static type="action-begin";constructor(){super(XenditActionBeginEvent.type,{})}}class XenditActionEndEvent extends Event{static type="action-end";constructor(){super(XenditActionEndEvent.type,{})}}class XenditWillRedirectEvent extends Event{static type="will-redirect";constructor(){super(XenditWillRedirectEvent.type,{})}}class XenditSessionCompleteEvent extends Event{static type="session-complete";constructor(){super(XenditSessionCompleteEvent.type,{})}}class XenditSessionExpiredOrCanceledEvent extends Event{static type="session-expired-or-canceled";constructor(){super(XenditSessionExpiredOrCanceledEvent.type,{})}}class XenditSessionPendingEvent extends Event{static type="session-pending";constructor(){super(XenditSessionPendingEvent.type,{})}}class XenditSessionNotPendingEvent extends Event{static type="session-not-pending";constructor(){super(XenditSessionNotPendingEvent.type,{})}}class XenditPaymentRequestCreatedEvent extends Event{paymentRequestId;static type="payment-request-created";constructor(e){super(XenditPaymentRequestCreatedEvent.type,{}),this.paymentRequestId=e}}class XenditPaymentTokenCreatedEvent extends Event{paymentTokenId;static type="payment-token-created";constructor(e){super(XenditPaymentTokenCreatedEvent.type,{}),this.paymentTokenId=e}}class XenditPaymentRequestDiscardedEvent extends Event{paymentRequestId;static type="payment-request-discarded";constructor(e){super(XenditPaymentRequestDiscardedEvent.type,{}),this.paymentRequestId=e}}class XenditPaymentTokenDiscardedEvent extends Event{paymentTokenId;static type="payment-token-discarded";constructor(e){super(XenditPaymentTokenDiscardedEvent.type,{}),this.paymentTokenId=e}}const _e=Symbol("xendit-internal"),me=e=>le("div",{class:"xendit-accordion",children:e.children});var fe,ye,be,$e,ge=0,ve=[],xe=t,we=xe.__b,Ce=xe.__r,Ee=xe.diffed,ke=xe.__c,Pe=xe.unmount,Ae=xe.__;function Ne(e,n){xe.__h&&xe.__h(ye,e,ge||n),ge=0;var t=ye.__H||(ye.__H={__:[],__h:[]});return e>=t.__.length&&t.__.push({}),t.__[e]}function Se(e){return ge=1,function(e,n,t){var r=Ne(fe++,2);if(r.t=e,!r.__c&&(r.__=[t?t(n):Ge(void 0,n),function(e){var n=r.__N?r.__N[0]:r.__[0],t=r.t(n,e);n!==t&&(r.__N=[t,r.__[1]],r.__c.setState({}))}],r.__c=ye,!ye.__f)){var i=function(e,n,t){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter(function(e){return e.__c});if(i.every(function(e){return!e.__N}))return!a||a.call(this,e,n,t);var o=r.__c.props!==e;return i.some(function(e){if(e.__N){var n=e.__[0];e.__=e.__N,e.__N=void 0,n!==e.__[0]&&(o=!0)}}),a&&a.call(this,e,n,t)||o};ye.__f=!0;var a=ye.shouldComponentUpdate,o=ye.componentWillUpdate;ye.componentWillUpdate=function(e,n,t){if(this.__e){var r=a;a=void 0,i(e,n,t),a=r}o&&o.call(this,e,n,t)},ye.shouldComponentUpdate=i}return r.__N||r.__}(Ge,e)}function Te(e,n){var t=Ne(fe++,4);!xe.__s&&qe(t.__H,n)&&(t.__=e,t.u=n,ye.__h.push(t))}function Ie(e){return ge=5,Re(function(){return{current:e}},[])}function Re(e,n){var t=Ne(fe++,7);return qe(t.__H,n)&&(t.__=e(),t.__H=n,t.__h=e),t.__}function Me(e,n){return ge=8,Re(function(){return e},n)}function Oe(e){var n=ye.context[e.__c],t=Ne(fe++,9);return t.c=e,n?(null==t.__&&(t.__=!0,n.sub(ye)),n.props.value):e.__}function De(){for(var e;e=ve.shift();){var n=e.__H;if(e.__P&&n)try{n.__h.some(Be),n.__h.some(Fe),n.__h=[]}catch(t){n.__h=[],xe.__e(t,e.__v)}}}xe.__b=function(e){ye=null,we&&we(e)},xe.__=function(e,n){e&&n.__k&&n.__k.__m&&(e.__m=n.__k.__m),Ae&&Ae(e,n)},xe.__r=function(e){Ce&&Ce(e),fe=0;var n=(ye=e.__c).__H;n&&(be===ye?(n.__h=[],ye.__h=[],n.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(n.__h.some(Be),n.__h.some(Fe),n.__h=[],fe=0)),be=ye},xe.diffed=function(e){Ee&&Ee(e);var n=e.__c;n&&n.__H&&(n.__H.__h.length&&(1!==ve.push(n)&&$e===xe.requestAnimationFrame||(($e=xe.requestAnimationFrame)||Ue)(De)),n.__H.__.some(function(e){e.u&&(e.__H=e.u),e.u=void 0})),be=ye=null},xe.__c=function(e,n){n.some(function(e){try{e.__h.some(Be),e.__h=e.__h.filter(function(e){return!e.__||Fe(e)})}catch(t){n.some(function(e){e.__h&&(e.__h=[])}),n=[],xe.__e(t,e.__v)}}),ke&&ke(e,n)},xe.unmount=function(e){Pe&&Pe(e);var n,t=e.__c;t&&t.__H&&(t.__H.__.some(function(e){try{Be(e)}catch(e){n=e}}),t.__H=void 0,n&&xe.__e(n,t.__v))};var Le="function"==typeof requestAnimationFrame;function Ue(e){var n,t=function(){clearTimeout(r),Le&&cancelAnimationFrame(n),setTimeout(e)},r=setTimeout(t,35);Le&&(n=requestAnimationFrame(t))}function Be(e){var n=ye,t=e.__c;"function"==typeof t&&(e.__c=void 0,t()),ye=n}function Fe(e){var n=ye;e.__c=e.__(),ye=n}function qe(e,n){return!e||e.length!==n.length||n.some(function(n,t){return n!==e[t]})}function Ge(e,n){return"function"==typeof n?n(e):n}function Ke(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ve,We={exports:{}};
|
|
3
3
|
/*!
|
|
4
4
|
Copyright (c) 2018 Jed Watson.
|
|
5
5
|
Licensed under the MIT License (MIT), see
|
|
6
6
|
http://jedwatson.github.io/classnames
|
|
7
|
-
*/var gn=($n||($n=1,function(e){!function(){var n={}.hasOwnProperty;function t(){for(var e="",n=0;n<arguments.length;n++){var t=arguments[n];t&&(e=i(e,r(t)))}return e}function r(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return t.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var r="";for(var a in e)n.call(e,a)&&e[a]&&(r=i(r,a));return r}function i(e,n){return n?e?e+" "+n:e+n:e}e.exports?(t.default=t,e.exports=t):window.classNames=t}()}(yn)),yn.exports),vn=bn(gn);const xn=e=>{const{id:n,title:t,subtitle:r,disabled:i,open:a,onClick:o,children:d}=e,s=a?"up":"down",l=ke(()=>{i||o(n)},[i,o,n]),c=ke(e=>{"Enter"!==e.key&&" "!==e.key||(l(),e.preventDefault())},[l]),u=ke(()=>{l()},[l]);return cn("div",{className:vn("xendit-accordion-item",i?"xendit-accordion-item-disabled":"",a?"xendit-accordion-item-open":"xendit-accordion-item-closed"),children:[cn("div",{className:"xendit-accordion-item-header",onClick:u,onKeyDown:c,role:"button",tabIndex:i?-1:0,children:[cn(un,{className:"xendit-accordion-item-header-icon",name:"dummy",size:24}),cn("div",{className:"xendit-accordion-item-header-title xendit-text-16 xendit-text-bold",children:[t,r?cn("div",{className:"xendit-accordion-item-header-subtitle xendit-text-14",children:r}):null]}),cn(un,{className:"xendit-accordion-item-chevron",name:"chevron",size:24,direction:s})]}),cn("div",{className:"xendit-accordion-item-content",inert:!a,children:cn("div",{className:"xendit-accordion-item-padding",children:d})})]})},wn=H(null);wn.displayName="SessionContext";const Cn=H(null);Cn.displayName="BusinessContext";const En=H(null);En.displayName="CustomerContext";const kn=H(null);kn.displayName="ChannelsContext";const Pn=H(null);Pn.displayName="ChannelUiGroupsContext";const Nn=H(null);Nn.displayName="DigitalWalletsContext";const Sn=H(null);Sn.displayName="SdkContext";const An=H(null);An.displayName="CurrentChannelContext";const Tn=()=>{const e=Pe(wn);if(null===e)throw new Error("useSession must be used within a XenditSessionProvider");return e},In=()=>{const e=Pe(kn);if(null===e)throw new Error("useChannels must be used within a XenditSessionProvider");return e},Rn=()=>Pe(Nn),Mn=()=>{const e=Pe(Sn);if(null===e)throw new Error("useSdk must be used within a XenditSessionProvider");return e},On=()=>Pe(An),Dn=({children:e,data:n,sdk:t})=>{const{session:r,business:i,customer:a,channels:o,digitalWallets:d,channelUiGroups:s}=n,l=t.getCurrentChannel()?.[fn]?.[0]??null;return"ACTIVE"!==t.getSdkStatus()||"ACTIVE"!==r.status?null:cn(Sn.Provider,{value:t,children:cn(An.Provider,{value:l,children:cn(wn.Provider,{value:r,children:cn(Cn.Provider,{value:i,children:cn(En.Provider,{value:a,children:cn(kn.Provider,{value:o,children:cn(Nn.Provider,{value:d,children:cn(Pn.Provider,{value:s,children:e})})})})})})})})},Ln=300;function Un(e){if(null==e)throw new Error("Assertion failed: argument is null or undefined; this is a bug, please contact support.")}function Bn(e,n){if(e!==n)throw new Error("Assertion failed; this is a bug, please contact support.")}function qn(e){return new Promise(n=>setTimeout(n,1*e))}class AbortError extends Error{constructor(){super("AbortError"),this.name="AbortError"}}function Fn(e){return e instanceof AbortError&&"AbortError"===e.name}function Kn(e,n){return new Promise((t,r)=>{function i(){n.removeEventListener("abort",i),clearTimeout(a),r(new AbortError)}const a=setTimeout(()=>{n.removeEventListener("abort",i),t()},1*e);n.aborted?i():n.addEventListener("abort",i)})}function Gn(e){const n=e.find(e=>{switch(e.type){case"REDIRECT_CUSTOMER":switch(e.descriptor){case"WEB_URL":return!0;case"DEEPLINK_URL":return function(){const e=navigator.userAgent;if(!e)return!1;if(/android/i.test(e))return!0;if(/iPad|iPhone|iPod/.test(e))return!0;return!1}();case"WEB_GOOGLE_PAYLINK":return!1}break;case"PRESENT_TO_CUSTOMER":return!0;case"API_POST_REQUEST":return!1}return!1});return n||e[0]}const Vn="mock",Hn={pl:"https://checkout-ui-gateway.xendit.co",pd:"https://checkout-ui-gateway-prod-dev.xendit.co",sl:"https://checkout-ui-gateway-live.stg.tidnex.dev",sd:"https://checkout-ui-gateway-dev.stg.tidnex.dev"};function Wn(e){return Hn[e]??null}function jn(e,n){const t={...e};for(const e of Object.keys(n)){const r=n[e];void 0!==r&&(t[e]=r)}return t}function Yn(e){const n=Ce();return we(()=>{n.current=e}),n.current}function Xn(e){let n;if("string"==typeof e.channel_property)n=e.channel_property;else{n=Object.values(e.channel_property).join("__")}return n}const zn=Math.floor(255*Math.random());function Zn(e){const n=Xn(e).split("").map(e=>(e.charCodeAt(0)%256^zn).toString(16)).join("");return`xendit-id-${n}`}function Jn(e){Un(e%2==0);const n=function(e){const n=new Uint8Array(e);for(let t=0;t<e;t++)n[t]=Math.floor(256*Math.random());return n}(e/2);return Array.from(n).map(e=>e.toString(16).padStart(2,"0")).join("")}function Qn(){return[Jn(8),Jn(4),Jn(4),Jn(4),Jn(12)].join("-")}function et(){return`xendit-id-${Ce(Jn(12)).current}`}function nt(e){if(e instanceof Error)return e.stack??e.message;if("string"==typeof e)return e;try{return`Unknown error: ${JSON.stringify(e)}`}catch{return"Unknown error"}}function tt(e){for(const n of Object.keys(e)){if("symbol"==typeof n)continue;const t=Object.getOwnPropertyDescriptor(e,n);void 0!==t&&("function"!=typeof t.get&&void 0===t.value&&delete e[n])}return e}function rt(e,n){let t=e;if(!n)return;if(Array.isArray(t))throw new Error("Getting values from channel property arrays is not supported.");let r=n;for(;;){if(!r||"object"!=typeof r||Array.isArray(r))return;const e=t.indexOf(".");if(-1===e)return r?r[t]:void 0;{const n=t.slice(0,e);r=r?r[n]:void 0,t=t.slice(e+1)}}}function it(e){const n=rt("card_details.card_number",e);return"string"!=typeof n?null:n}function at(e){const n={version:0,publicKey:"",iv:"",cipherText:"",valid:!1,validationError:null,withoutValidationError:e};if(!e)return n;const t=e.split("-");if(t.length<6)throw new Error("Invalid encrypted field value format.");if("xendit"!==t[0])throw new Error("Invalid encrypted field value format.");if("encrypted"!==t[1])throw new Error("Invalid encrypted field value format.");const r=parseInt(t[2],10);if(isNaN(r)||r<=0)throw new Error("Invalid encrypted field value format.");if(n.version=r,n.publicKey=t[3],n.iv=t[4],n.cipherText=t[5],t.length>6){if("invalid"!==t[6])throw new Error("Invalid encrypted field value format.");n.validationError=atob(t[7]),n.withoutValidationError=t.slice(0,6).join("-")}else n.valid=!0;return n}const ot=new WeakMap;let dt=1;function st(e,n){return Un(e.length>0),Un(e.length<=2),2===e.length?n?(Un(!0===e[1].allow_save),e[1]):(Un(!1===e[0].allow_save),e[0]):e[0]}function lt(e,n){if("PAY"!==e.session_type)return!0;const t=e.amount,r=n.min_amount??0,i=n.max_amount??Number.MAX_VALUE;return!(t<r||t>i)}function ct(e){Object.defineProperty(e,fn,{enumerable:!1,writable:!1,configurable:!1,value:e[fn]})}const ut={CARDS:!0,QRIS:!0,QR_PH:!0,PROMPTPAY:!0,SGQR:!0};function ht(e,n){for(const t of e)if(t.type.name===n)return!0;return!1}var pt,mt;!function(e){e.BARE="bare",e.PRIMARY_ROUNDED="primary-rounded",e.WHITE_ROUNDED="white-rounded"}(pt||(pt={})),function(e){e.SM="sm",e.MD="md"}(mt||(mt={}));const ft=e=>{const{children:n,variant:t,size:r,type:i="button",...a}=e,o={[pt.BARE]:void 0,[pt.PRIMARY_ROUNDED]:"xendit-button-primary-rounded",[pt.WHITE_ROUNDED]:"xendit-button-white-rounded"}[t],d={[mt.SM]:"xendit-button-sm",[mt.MD]:void 0}[r??mt.MD];return cn("button",{...a,className:vn(e.className,"xendit-button",o,d),type:i,children:n})},_t=()=>{const e=.4*Math.PI,n=.4;return cn("svg",{className:"xendit-button-loading-spinner",viewBox:"-0.5 -0.5 1 1",children:cn("path",{d:`M ${Math.cos(e)*n} ${Math.sin(e)*n} A 0.4 0.4 0 0 0 ${Math.cos(0)*n} ${Math.sin(0)*n}`,fill:"none",stroke:"currentColor",strokeWidth:"0.1",strokeLinecap:"round"})})},bt=e=>{const{id:n,options:t,onChange:r,defaultIndex:i=-1,selectedIndex:a,className:o,placeholder:d,disabled:s}=e,l=Mn().t,c=et(),u=n||c,h="number"==typeof a,[p,m]=xe(i),f=h?a:p,[_,b]=xe(f>=0?f:0),[$,y]=xe(!1),g=$&&!s&&t.length>0,[v,x]=xe(""),w=Ce(null),C=Ce(null),E=Ce(null),k=Ce(null),P=Ce(null),N=Ee(()=>{const e=t.map(gt).filter(({item:e})=>{if(""===v.trim())return!0;const n=v.toLowerCase();return e.title.toLowerCase().includes(n)||e.description?.toLowerCase().includes(n)||e.value.toLowerCase().includes(n)});return e.length>0?e:t.map(gt)},[v,t]),S=Math.max(0,Math.min(N.length-1,_));we(()=>{if(!g)return;const e=e=>{const n=w.current;n&&(n.contains(e.target)||y(!1))};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[g]),we(()=>{if(!g)return;const e=e=>{const n=w.current;n&&e.relatedTarget&&(n.contains(e.relatedTarget)||y(!1))};return document.body.addEventListener("focusout",e),()=>document.body.removeEventListener("focusout",e)},[g]),we(()=>{g&&f>=0&&b(f)},[g,f]),we(()=>{if(!g)return;if(!k.current)return;if(!E.current)return;const e=E.current.parentElement;e&&(e.scrollTop=k.current.offsetTop-e.clientHeight/2+k.current.clientHeight/2)},[g,_]);const A=ke(()=>{g||(y(!0),queueMicrotask(()=>P.current?.focus()))},[g]),T=ke(()=>{g&&(y(!1),x(""),C.current?.focus())},[g]),I=ke(()=>{g?T():A()},[T,g,A]),R=ke(e=>{const n=t[e];n&&(n.disabled||(h||m(e),r(n,e),T()))},[T,h,r,t]),M=ke(e=>{"ArrowDown"!==e.key&&"ArrowUp"!==e.key&&" "!==e.key&&"Enter"!==e.key||(e.preventDefault(),A())},[A]),O=ke(e=>{const n=e.target===P.current;if("Escape"===e.key)return e.preventDefault(),void T();if("Enter"===e.key||" "===e.key){if(n&&" "===e.key)return;e.preventDefault();const t=N[S];return void(t&&R(t.originalIndex))}return"ArrowDown"===e.key?(e.preventDefault(),void b(e=>Math.min(N.length-1,e+1))):"ArrowUp"===e.key?(e.preventDefault(),void b(e=>Math.max(0,e-1))):"Home"===e.key?(e.preventDefault(),void b(0)):"End"===e.key?(e.preventDefault(),void b(N.length-1)):void 0},[S,T,R,N]),D=ke(e=>{e.stopPropagation(),e.preventDefault(),R(Number(e.currentTarget.dataset.index))},[R]),L=ke(e=>{x(e.currentTarget.value),b(0)},[]),U=f>=0?t[f]:void 0;return cn("div",{ref:w,className:`xendit-dropdown ${o??""}`,children:[cn("button",{id:u,ref:C,type:"button",className:U?.leadingAsset?"xendit-dropdown-has-asset":"","aria-expanded":g?"true":"false",onClick:I,onKeyDown:M,disabled:s,children:[U?.leadingAsset?U.leadingAsset:null,cn("span",U?{className:"xendit-dropdown-button-title xendit-text-14",children:U.shortTitle??U.title}:{className:"xendit-dropdown-button-title xendit-text-14",children:d}),cn(un,{className:"xendit-dropdown-chevron",name:"chevron",size:16,direction:"down"})]}),g?cn("div",{className:"xendit-dropdown-menu",children:[cn("div",{className:"xendit-dropdown-search",children:cn("input",{ref:P,placeholder:l("combobox.default_search_placeholder"),value:v,onInput:L,onClick:yt,onKeyDown:O})}),cn("ul",{ref:E,role:"listbox",tabIndex:-1,onKeyDown:O,children:N.map(({item:e,originalIndex:n},t)=>{const r=n===f,i=t===S;return cn("li",{role:"option","data-index":n,"aria-disabled":!!e.disabled||void 0,"aria-selected":r,onClick:D,ref:i?k:void 0,children:cn("div",{className:`xendit-dropdown-item xendit-text-14 ${i?"xendit-dropdown-item-active":""} ${e.leadingAsset?"xendit-dropdown-has-asset":""} ${e.disabled?"xendit-dropdown-item-disabled":""}`,children:[e.leadingAsset?e.leadingAsset:null,cn("div",{className:"xendit-dropdown-item-text xendit-text-14",children:[cn("span",{className:"xendit-dropdown-item-title",children:e.title}),e.description&&cn("span",{className:"xendit-dropdown-item-description xendit-text-12",children:e.description})]}),r?cn(un,{name:"check",size:16,className:"xendit-dropdown-item-selected"}):null]})},n)})})]}):null]})},$t=e=>cn("div",{className:"xendit-dropdown xendit-skeleton-field",children:cn("button",{inert:!0,id:e.id,disabled:!0,type:"button",children:cn(_t,{})})});function yt(e){e.stopPropagation()}function gt(e,n){return{item:e,originalIndex:n}}function vt(e){return function(e,n){if(e===n)throw new Error("Assertion failed; this is a bug, please contact support.")}(e.session_type,"AUTHORIZATION"),Bn(e.mode,"COMPONENTS"),tt({id:e.payment_session_id,description:e.description||void 0,sessionType:e.session_type,mode:e.mode,referenceId:e.reference_id,country:e.country,currency:e.currency,amount:e.amount,channelProperties:e.channel_properties||void 0,expiresAt:new Date(e.expires_at),locale:e.locale,status:e.status,items:e.items?.map(e=>tt({type:e.type,referenceId:e.reference_id,name:e.name,netUnitAmount:e.net_unit_amount,quantity:e.quantity,url:e.url,imageUrl:e.image_url,category:e.category,subcategory:e.subcategory,description:e.description,metadata:e.metadata}))})}function xt(e,n,t,r){const i=tt({groupId:e.id,label:e.label,get channels(){return(n[e.id]||[]).map(e=>Ct(e,n,t,r))},[fn]:e});return ct(i),i}function wt(e,n){return Ct(e,{},{},n)}function Ct(e,n,t,r){Un(!r.pairChannels.paired[e.channel_code]);const i=tt({channelCode:r.pairChannels.pairs[e.channel_code]?.map(e=>e.channel_code)??e.channel_code,brandName:e.brand_name,brandColor:e.brand_color,brandLogoUrl:e.brand_logo_url,get uiGroup(){if(!t[e.ui_group])throw new Error("UI group not found");return xt(t[e.ui_group],n,t,r)},minAmount:e.min_amount,maxAmount:e.max_amount,cardBrands:e.card?.brands.map(e=>({name:e.name,logoUrl:e.logo_url})),[fn]:r.pairChannels.pairs[e.channel_code]??[e]});return ct(i),i}function Et(e){const n={};for(const t of e)n[t.id]=t;return n}function kt(e,n){if(n.pairChannels.paired[e.channel_code])return!1;if(n.options.filterMinMax&&!lt(n.session,e))return!1;const t=n.options.filter;return!(t&&!function(e,n){if("string"==typeof e&&n===e)return!0;if(Array.isArray(e)&&e.includes(n))return!0;if(e instanceof RegExp&&e.test(n))return!0;return!1}(t,e.channel_code))}function Pt(e,n){const t={};for(const r of e){if(!kt(r,n))continue;const e=r.ui_group;t[e]||(t[e]=[]),t[e].push(r)}return t}function Nt(e){const n=new Map;for(const t of e){const e=t.brand_name;n.has(e)||n.set(e,[]),n.get(e).push(t)}const t={},r={};for(const[e,i]of n)for(const e of i){if(!1===i[0].allow_save){const n=i.find(n=>e.channel_code!==n.channel_code&&e.ui_group===n.ui_group&&!0===n.allow_save);n&&(t[e.channel_code]=[e,n],r[n.channel_code]=!0)}}return{pairs:t,paired:r}}const St=e=>{const{group:n,open:t}=e,r=Mn(),{t:i}=r,a=Tn(),o=In(),d=On(),s=a.session_type,l=et(),[c,u]=xe(null),h=Ce(null),[p,m]=xe(!1),f=Ce(null),_=Ee(()=>Nt(o),[o]),b=Ee(()=>({pairChannels:_,session:{amount:a.amount,session_type:a.session_type},options:{filterMinMax:!1}}),[_,a.amount,a.session_type]),$=Ee(()=>o.filter(e=>kt(e,b)&&e.ui_group===n.id),[o,n.id,b]);we(()=>{if(!h.current)return;if(!d)return;if(!t)return;$.find(e=>e.channel_code===d.channel_code)&&(f.current=r.createChannelComponent(wt(d,b)),f.current.parentElement!==h.current&&(m(!0),h.current.replaceChildren(f.current)))},[$,d,b,t,r]);const y=Yn(t);we(()=>{if(t&&!y&&null===d&&null!==c){const e=$.find(e=>e.channel_code===c);e&&r.setCurrentChannel(wt(e,b))}},[$,d,c,b,t,y,r]);const g=ke(e=>{const n=o.find(n=>n.channel_code===e.value)||null;u(n?.channel_code??null),r.setCurrentChannel(n?wt(n,b):null)},[o,b,r]),v=Ee(()=>$.map(e=>({leadingAsset:cn("img",{className:"xendit-channel-logo",src:e.brand_logo_url},e.channel_code),title:e.brand_name,value:e.channel_code,disabled:!lt(a,e),description:At(i,a,e)||void 0})),[$,a,i]);return cn("div",{className:"xendit-channel-picker-group",children:[1===$.length&&"CARDS"===$[0].channel_code?null:cn("div",{className:"xendit-channel-form-field-group",children:[cn("label",{htmlFor:l,className:"xendit-text-14",children:"SAVE"===s?i("payment_methods.add_payment_method",{groupName:n.label??"",ns:"session"}):i("payment_methods.pay_with")}),cn(bt,{id:l,selectedIndex:function(){const e=v.findIndex(e=>e.value===d?.channel_code);if(-1!==e)return e;const n=v.findIndex(e=>e.value===c);return-1!==n?n:-1}(),options:v,disabled:v.length<=1,onChange:g,placeholder:i("payment_methods.select_channel_placeholder",{groupName:n.label,ns:"session"})})]}),cn("div",{style:{display:p?"":"none"},ref:h})]})};function At(e,n,t){return lt(n,t)?null:t.min_amount&&n.amount<t.min_amount?e("payment_methods.channel_disabled_amount_too_small"):e("payment_methods.channel_disabled_amount_too_large")}const Tt=e=>{const n=Mn(),t=Ce(null),r=Rn(),i=r?.google_pay;return we(()=>{if(t.current&&i){const e=n.createDigitalWalletComponent("GOOGLE_PAY");return t.current.appendChild(e),()=>{e.remove()}}},[i,n]),cn("div",{ref:t,className:"xendit-channel-picker-digital-wallet-section"})},It=e=>{const n=Mn(),t=Tn(),r=(()=>{const e=Pe(Pn);if(null===e)throw new Error("useChannelUiGroups must be used within a XenditSessionProvider");return e})(),i=On(),a=In(),{t:o}=Mn(),d=Ee(()=>Pt(a,{options:{filterMinMax:!1},pairChannels:Nt(a),session:t}),[a,t]),s=Ce(null),l=Ee(()=>Nt(a),[a]),c=Ee(()=>({pairChannels:l,session:{amount:t.amount,session_type:t.session_type},options:{filterMinMax:!1}}),[l,t.amount,t.session_type]),u=i?.ui_group??null,[h,p]=xe(null),m=ke(e=>{if(u===e||h===e)u===e&&s.current?.dispatchEvent(new XenditClearCurrentChannelEvent(e)),h===e&&p(null);else{const i=r.find(n=>n.id===e);Un(i);const s=Rt(t,i,a,o).enabledChannels;if(0===s)return;if(1===s){const t=d[e][0];n.setCurrentChannel(wt(t,c)),p(null)}else p(e),n.setCurrentChannel(null)}},[r,a,d,c,h,n,u,t,o]);we(()=>{null!==i&&null!==h&&p(null)},[i,h]);const f=n[fn].options.enableDigitalWallets??!1;return cn("div",{ref:s,children:[f?cn(Tt,{}):null,cn(_n,{children:r.filter(e=>(d[e.id]||[]).length>0).map(e=>{const n=null!==u?u===e.id:h===e.id,r=Rt(t,e,a,o),i=0===r.enabledChannels,d=r.firstDisabledChannelReason;return cn(xn,{id:e.id,title:e.label,subtitle:d??void 0,open:n,disabled:i,onClick:m,children:cn(St,{group:e,open:n})},e.id)})})]})};function Rt(e,n,t,r){let i=null,a=0;for(const o of t)o.ui_group===n.id&&(lt(e,o)?a++:null===i&&(i=At(r,e,o)));return{enabledChannels:a,firstDisabledChannelReason:i}}class XenditClearCurrentChannelEvent extends Event{static type="xendit-clear-current-channel";uiGroup;constructor(e){super(XenditClearCurrentChannelEvent.type,{bubbles:!0,composed:!0}),this.uiGroup=e}}var Mt={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:48|5[0-3579]|[6-9])|7(?:20|32|8)|[89]","(?:31|4)6|51|6(?:485|5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:241|349)0\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|[34]\\d\\d)|91(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79]))))\\d{3}|(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|3(?:[0-3589]\\d|4[0-578]|6[1-9]|7[0-35-9])|7(?:[013-57-9]\\d|2[0-8])|8(?:55|6[0-8]|[78]\\d|9[02-9]))\\d{6}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|2[23]"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","(?:[025-7]\\d|44)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[024-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","(?:01\\d|8)\\d{7}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["0"]]]],BL:["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:2[7-9]|3[3-7]|5[12]|87)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","8001\\d{5}|(?:[2-467]\\d|50)\\d{6}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[235]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","[1-467]\\d{9,10}|55[0-46-9]\\d{8}|[34]\\d{7}|55\\d{7,8}|(?:5[0-46-9]|[89]\\d)\\d{7,9}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37|86)","300|4(?:0(?:0|20)|370|864)"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[178]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-6]|7[246]|8[2-4]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|[78]"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","[2-9]\\d{9}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|5[07]|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|9(?:0[25]|42))[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:2[125-9]|3[23]|44|66|77|88)|6(?:22|33))[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["5"],"0$1"]],"0"],CF:["236","00","8776\\d{4}|(?:[27]\\d|61)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-8]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["60|809"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9(?:10|[2-9])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-8]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]","(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["46"]],["(\\d{3})(\\d{7})","$1 $2",["6|90"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|9[14]"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9,10,11,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|3[13])"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,0,[["528[89]\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[016-8]\\d|2[0-8]|5[0-5]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],ET:["251","00","(?:11|[2-579]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-579]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d{5})","$1",["20[2-59]"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],["(\\d)(\\d{4,9})","$1 $2",["(?:19|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,"0|180020",0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-5])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|5[01]))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","(?:[56]94\\d|7093)\\d{5}|(?:80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0|180020","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","(?:[235]\\d{3}|800)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","[2-69]\\d{8}|80\\d{5,7}|[1-79]\\d{7}|6\\d{6}",[7,8,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","[2-589]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","00[1-9]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13,14,15,16,17],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0|180020","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|8(?:28[235-7]|3))|73179|807(?:1|9[1-3])|(?:1552|6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689])\\d|8(?:[14-6]\\d|2[0-79]))|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["16|[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["18[06]","18[06]0"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,11}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11,12],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[03]"]]],0,0,0,0,0,0,[["0(?:669[0-79]\\d{1,6}|831\\d{2,8})|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[2356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],["3[2-8]\\d{9,10}",[11,12]],0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0|180020","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|427|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[47]"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[25-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["3|4(?:2[09]|7[01])|6[1-9]","3|4(?:2(?:0|9[02-69])|7(?:0[019]|1))|6[1-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[25-9]"],"0$1"]],"0",0,"(000[2569]\\d{4,6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[36]0|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","8\\d{13}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["3"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-6]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[2457]\\d|33|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(0-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"0 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(0-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(0-$1)",1]],"0",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["20"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["20"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|78|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2679]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{4})(\\d{5})","$1-$2",["892"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8(?:0[0-7]|9)"],"0$1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[5-8]"],"0$1"]],"0",0,0,0,0,"[5-8]"],MC:["377","00","(?:[3489]|[67]\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[67]"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|452|678|86","[12]|452|6788|86"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[12]1"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],MQ:["596","00","(?:596\\d|7091)\\d{5}|(?:69|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|8(?:0[6-9]|[36])"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],MX:["52","0[09]","[2-9]\\d{9}",[10],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"]]],0,0,0,0,0,0,0,"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[0467]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","(?:20|9\\d)\\d{8}|[78]\\d{9,13}",[10,11,12,13,14],[["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:222|444|(?:55|8\\d)\\d|666|777|999)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[24-9]"]]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","[45]\\d{5}|(?:708|8\\d\\d)\\d{6}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[45]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","[36-8]\\d{5,8}|4\\d{6,8}|59\\d{6}|9\\d{5,10}|(?:2\\d|5[0-8])\\d{6,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["3[289]|4[246-8]|61|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[136]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","709\\d{6}|(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-9]"],"0$1"]],"0",0,0,0,0,0,[["26(?:2\\d\\d|3(?:0\\d|1[0-6]))\\d{4}"],["(?:69(?:2\\d\\d|3(?:[06][0-6]|1[0-3]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))|7092[0-3])\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-6]|76(?:2[278]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,"[3489]",0,"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","(?:[15]\\d|800|92)\\d{7}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","[6-9]\\d{6}|[1-6]\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","(?:[2489]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10,12],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[348]|64|79|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6[0-35-9]|7[67]|9[2-9]"]]],"0"],SR:["597","00","(?:[2-5]|[6-8]\\d|90)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-9]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[25-7]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[25-7]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-359]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-4]|5[1-3]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[59]"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|30|[689]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[236-9]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","(?:[0-57-9]\\d|66)\\d{7}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3(?:[1245]|3[12])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["\\d"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","(?:[1-6]\\d|71)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["[67]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-579]|61)","5(?:[0-579]|61[06])","5(?:[0-579]|61[06]1)"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868"],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[258]0"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]","[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],TZ:["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0"],US:["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["(?:274[27]|(?:472|983)[2-47-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013-79]|3[0-24679]|4[167]|5[0-3]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-269])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-247]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|2\\d{3,4}|(?:[49]\\d|80)\\d{5}",[4,5,6,7,8,9,10,11,12,13],[["(\\d{4,5})","$1",["21"]],["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","00","(?:20|33|[5-9]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"]]]],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11,12],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72|8\\d{4})\\d{4}|[89]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[47-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}",[8,9,10,11,12],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2|39"],"0$1"],["(\\d{2})(\\d{7,10})","$1 $2",["3"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","7093\\d{5}|(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}",[9],0,"0",0,0,0,0,0,[["269(?:0[0-467]|15|5[0-4]|6\\d|[78]0)\\d{4}"],["(?:639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])|7093[5-7])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|[579]\\d|63)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[579]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[235-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"],0,0,0,0,0,0,["2\\d{8}",[9]]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|5[12]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|5(?:0\\d{3}|2[0-2]))\\d{7}",[7,8,9,10,12]],0,0,0,["348[57]\\d{7}",[11]],0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}};function Ot(e,n){var t=Array.prototype.slice.call(n);return t.push(Mt),e.apply(this,t)}function Dt(e,n){e=e.split("-"),n=n.split("-");for(var t=e[0].split("."),r=n[0].split("."),i=0;i<3;i++){var a=Number(t[i]),o=Number(r[i]);if(a>o)return 1;if(o>a)return-1;if(!isNaN(a)&&isNaN(o))return 1;if(isNaN(a)&&!isNaN(o))return-1}return e[1]&&n[1]?e[1]>n[1]?1:e[1]<n[1]?-1:0:!e[1]&&n[1]?1:e[1]&&!n[1]?-1:0}var Lt={}.constructor;function Ut(e){return null!=e&&e.constructor===Lt}function Bt(e){return Bt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bt(e)}function qt(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Ft(e,n,t){return n&&function(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Kt(r.key),r)}}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Kt(e){var n=function(e,n){if("object"!=Bt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n);if("object"!=Bt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==Bt(n)?n:n+""}var Gt=" ext. ",Vt=/^\d+$/,Ht=function(){return Ft(function e(n){qt(this,e),Zt(n),this.metadata=n,er.call(this,n)},[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter(function(e){return"001"!==e})}},{key:"getCountryMetadata",value:function(e){return this.metadata.countries[e]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(e){return void 0!==this.getCountryMetadata(e)}},{key:"hasCallingCode",value:function(e){if(this.getCountryCodesForCallingCode(e))return!0;if(this.nonGeographic()){if(this.nonGeographic()[e])return!0}else{var n=this.countryCallingCodes()[e];if(n&&1===n.length&&"001"===n[0])return!0}}},{key:"isNonGeographicCallingCode",value:function(e){return this.nonGeographic()?!!this.nonGeographic()[e]:!this.getCountryCodesForCallingCode(e)}},{key:"country",value:function(e){return this.selectNumberingPlan(e)}},{key:"selectNumberingPlan",value:function(e,n){if(e&&Vt.test(e)&&(n=e,e=null),e&&"001"!==e){if(!this.hasCountry(e))throw new Error("Unknown country: ".concat(e));this.numberingPlan=new Wt(this.getCountryMetadata(e),this)}else if(n){if(!this.hasCallingCode(n))throw new Error("Unknown calling code: ".concat(n));this.numberingPlan=new Wt(this.getNumberingPlanMetadata(n),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(e){var n=this.countryCallingCodes()[e];if(n){if(1===n.length&&3===n[0].length)return;return n}}},{key:"getCountryCodeForCallingCode",value:function(e){var n=this.getCountryCodesForCallingCode(e);if(n)return n[0]}},{key:"getNumberingPlanMetadata",value:function(e){var n=this.getCountryCodeForCallingCode(e);if(n)return this.getCountryMetadata(n);if(this.nonGeographic()){var t=this.nonGeographic()[e];if(t)return t}else{var r=this.countryCallingCodes()[e];if(r&&1===r.length&&"001"===r[0])return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function(){return this.numberingPlan.hasTypes()}},{key:"type",value:function(e){return this.numberingPlan.type(e)}},{key:"ext",value:function(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function(e){return this.selectNumberingPlan(e)}},{key:"hasSelectedNumberingPlan",value:function(){return void 0!==this.numberingPlan}}])}(),Wt=function(){return Ft(function e(n,t){qt(this,e),this.globalMetadataObject=t,this.metadata=n,er.call(this,t.metadata)},[{key:"callingCode",value:function(){return this.metadata[0]}},{key:"getDefaultCountryMetadataForRegion",value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"IDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[1]}},{key:"defaultIDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[12]}},{key:"nationalNumberPattern",value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function(e){return e[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var e=this,n=this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[];return n.map(function(n){return new jt(n,e)})}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(e){return e[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion())}},{key:"_nationalPrefixForParsing",value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion())}},{key:"leadingDigits",value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function(){return(!this.types()||0!==this.types().length)&&!!this.types()}},{key:"type",value:function(e){if(this.hasTypes()&&zt(this.types(),e))return new Xt(zt(this.types(),e),this)}},{key:"ext",value:function(){return this.v1||this.v2?Gt:this.metadata[13]||Gt}}])}(),jt=function(){return Ft(function e(n,t){qt(this,e),this._format=n,this.metadata=t},[{key:"pattern",value:function(){return this._format[0]}},{key:"format",value:function(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function(){return!(!this.nationalPrefixFormattingRule()||Yt.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}])}(),Yt=/^\(?\$1\)?$/,Xt=function(){return Ft(function e(n,t){qt(this,e),this.type=n,this.metadata=t},[{key:"pattern",value:function(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}])}();function zt(e,n){switch(n){case"FIXED_LINE":return e[0];case"MOBILE":return e[1];case"TOLL_FREE":return e[2];case"PREMIUM_RATE":return e[3];case"PERSONAL_NUMBER":return e[4];case"VOICEMAIL":return e[5];case"UAN":return e[6];case"PAGER":return e[7];case"VOIP":return e[8];case"SHARED_COST":return e[9]}}function Zt(e){if(!e)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!Ut(e)||!Ut(e.countries))throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(Ut(e)?"an object of shape: { "+Object.keys(e).join(", ")+" }":"a "+Jt(e)+": "+e,"."))}var Jt=function(e){return Bt(e)};function Qt(e,n){if((n=new Ht(n)).hasCountry(e))return n.selectNumberingPlan(e).countryCallingCode();throw new Error("Unknown country: ".concat(e))}function er(e){var n=e.version;"number"==typeof n?(this.v1=1===n,this.v2=2===n,this.v3=3===n,this.v4=4===n):n?-1===Dt(n,"1.2.0")?this.v2=!0:-1===Dt(n,"1.7.35")?this.v3=!0:this.v4=!0:this.v1=!0}function nr(e,n,t){return function(e,n,t,r){n&&(r=new Ht(r.metadata)).selectNumberingPlan(n);var i=r.type(t),a=i&&i.possibleLengths()||r.possibleLengths();if(!a)return"IS_POSSIBLE";var o=e.length,d=a[0];if(d===o)return"IS_POSSIBLE";if(d>o)return"TOO_SHORT";if(a[a.length-1]<o)return"TOO_LONG";return a.indexOf(o,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}(e,n,void 0,t)}function tr(e,n,t){return"IS_POSSIBLE"===nr(e,n,t)}function rr(e,n){return e=e||"",new RegExp("^(?:"+n+")$").test(e)}function ir(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(t)return(t=t.call(e)).next.bind(t);if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return ar(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ar(e,n):void 0}}(e))||n){t&&(e=t);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ar(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}var or=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function dr(e,n,t){if(n=n||{},e.country||e.countryCallingCode){(t=new Ht(t)).selectNumberingPlan(e.country,e.countryCallingCode);var r=n.v2?e.nationalNumber:e.phone;if(rr(r,t.nationalNumberPattern())){if(sr(r,"FIXED_LINE",t))return t.type("MOBILE")&&""===t.type("MOBILE").pattern()?"FIXED_LINE_OR_MOBILE":t.type("MOBILE")?sr(r,"MOBILE",t)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE":"FIXED_LINE_OR_MOBILE";for(var i,a=ir(or);!(i=a()).done;){var o=i.value;if(sr(r,o,t))return o}}}}function sr(e,n,t){var r=t.type(n);return!(!r||!r.pattern())&&(!(r.possibleLengths()&&r.possibleLengths().indexOf(e.length)<0)&&rr(e,r.pattern()))}function lr(e,n,t){var r=new Ht(t).getCountryCodesForCallingCode(e);return r?r.filter(function(e){return function(e,n,t){var r=new Ht(t);if(r.selectNumberingPlan(n),r.numberingPlan.possibleLengths().indexOf(e.length)>=0)return!0;return!1}(n,e,t)}):[]}var cr="0-90-9٠-٩۰-۹",ur="".concat("-‐-―−ー-").concat("//").concat("..").concat(" ").concat("()()[]\\[\\]").concat("~⁓∼~"),hr=new RegExp("(["+cr+"])");function pr(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(t)return(t=t.call(e)).next.bind(t);if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return mr(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?mr(e,n):void 0}}(e))||n){t&&(e=t);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function mr(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function fr(e,n){var t=n.nationalNumber,r=n.metadata,i=r.getCountryCodesForCallingCode(e);if(i)return 1===i.length?i[0]:function(e,n){var t=n.countries,r=n.metadata;r=new Ht(r);for(var i,a=pr(t);!(i=a()).done;){var o=i.value;if(r.selectNumberingPlan(o),r.leadingDigits()){if(e&&0===e.search(r.leadingDigits()))return o}else if(dr({phone:e,country:o},void 0,r.metadata))return o}}(t,{countries:i,metadata:r.metadata})}function _r(e,n,t){var r=function(e,n){if(e&&n.numberingPlan.nationalPrefixForParsing()){var t=new RegExp("^(?:"+n.numberingPlan.nationalPrefixForParsing()+")"),r=t.exec(e);if(r){var i,a,o,d=r.length-1,s=d>0&&r[d];if(n.nationalPrefixTransformRule()&&s)i=e.replace(t,n.nationalPrefixTransformRule()),d>1&&(a=r[1]);else{var l=r[0];i=e.slice(l.length),s&&(a=r[1])}if(s){var c=e.indexOf(r[1]);e.slice(0,c)===n.numberingPlan.nationalPrefix()&&(o=n.numberingPlan.nationalPrefix())}else o=r[0];return{nationalNumber:i,nationalPrefix:o,carrierCode:a}}}return{nationalNumber:e}}(e,t),i=r.carrierCode,a=r.nationalNumber;if(a!==e){if(!function(e,n,t){if(rr(e,t.nationalNumberPattern())&&!rr(n,t.nationalNumberPattern()))return!1;return!0}(e,a,t))return{nationalNumber:e};if(t.numberingPlan.possibleLengths()&&(n||(n=fr(t.numberingPlan.callingCode(),{nationalNumber:a,metadata:t})),!function(e,n,t){switch(nr(e,n,t)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}(a,n,t)))return{nationalNumber:e}}return{nationalNumber:a,carrierCode:i}}function br(e,n,t,r,i){if(!e)return{};var a;if("+"!==e[0]){var o=function(e,n,t,r){if(n){var i=new Ht(r);i.selectNumberingPlan(n,t);var a=new RegExp(i.IDDPrefix());if(0===e.search(a)){var o=(e=e.slice(e.match(a)[0].length)).match(hr);if(!(o&&null!=o[1]&&o[1].length>0&&"0"===o[1]))return e}}}(e,t,r,i);if(!o||o===e){if(t||r){var d=function(e,n,t,r,i){var a=t?Qt(t,i):r;if(0===e.indexOf(a)){(i=new Ht(i)).selectNumberingPlan(t,a);var o=e.slice(a.length),d=_r(o,n,i).nationalNumber,s=_r(e,n,i).nationalNumber;if(!rr(s,i.nationalNumberPattern())&&rr(d,i.nationalNumberPattern())||"TOO_LONG"===nr(s,n,i))return{countryCallingCode:a,number:o}}return{number:e}}(e,n,t,r,i),s=d.countryCallingCode,l=d.number;if(s)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:s,number:l}}return{number:e}}a=!0,e="+"+o}if("0"===e[1])return{};i=new Ht(i);for(var c=2;c-1<=3&&c<=e.length;){var u=e.slice(1,c);if(i.hasCallingCode(u))return i.selectNumberingPlan(u),{countryCallingCodeSource:a?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:u,number:e.slice(c)};c++}return{}}var $r=/(\$\d)/;function yr(e,n,t){var r=t.useInternationalFormat,i=t.withNationalPrefix,a=e.replace(new RegExp(n.pattern()),r?n.internationalFormat():i&&n.nationalPrefixFormattingRule()?n.format().replace($r,n.nationalPrefixFormattingRule()):n.format());return r?function(e){return e.replace(new RegExp("[".concat(ur,"]+"),"g")," ").trim()}(a):a}var gr=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;var vr=function(e){return"([".concat(cr,"]{1,").concat(e,"})")};function xr(e){var n="[ \\t,]*",t="[:\\..]?[ \\t,-]*",r="#?",i="[ \\t]*";return";ext="+vr("20")+"|"+(n+"(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)"+t+vr("20")+r)+"|"+(n+"(?:[xx##~~]|int|int)"+t+vr("9")+r)+"|"+("[- ]+"+vr("6")+"#")+"|"+(i+"(?:,{2}|;)"+t+vr("15")+r)+"|"+(i+"(?:,)+"+t+vr("9")+r)}var wr="["+cr+"]{2}",Cr="[++]{0,1}(?:["+ur+"]*["+cr+"]){3,}["+ur+cr+"]*",Er=new RegExp("^[++]{0,1}(?:["+ur+"]*["+cr+"]){1,2}$","i"),kr=Cr+"(?:"+xr()+")?",Pr=new RegExp("^"+wr+"$|^"+kr+"$","i");var Nr={formatExtension:function(e,n,t){return"".concat(e).concat(t.ext()).concat(n)}};function Sr(e,n,t,r){if(t=t?function(){for(var e=1,n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];for(;e<t.length;){if(t[e])for(var i in t[e])t[0][i]=t[e][i];e++}return t[0]}({},Nr,t):Nr,r=new Ht(r),e.country&&"001"!==e.country){if(!r.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));r.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode)return e.phone||"";r.selectNumberingPlan(e.countryCallingCode)}var i,a=r.countryCallingCode(),o=t.v2?e.nationalNumber:e.phone;switch(n){case"NATIONAL":return o?Tr(i=Ar(o,e.carrierCode,"NATIONAL",r,t),e.ext,r,t.formatExtension):"";case"INTERNATIONAL":return o?(i=Ar(o,null,"INTERNATIONAL",r,t),Tr(i="+".concat(a," ").concat(i),e.ext,r,t.formatExtension)):"+".concat(a);case"E.164":return"+".concat(a).concat(o);case"RFC3966":return function(e){var n=e.number,t=e.ext;if(!n)return"";if("+"!==n[0])throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');return"tel:".concat(n).concat(t?";ext="+t:"")}({number:"+".concat(a).concat(o),ext:e.ext});case"IDD":if(!t.fromCountry)return;var d=function(e,n,t,r,i){var a=Qt(r,i.metadata);if(a===t){var o=Ar(e,n,"NATIONAL",i);return"1"===t?t+" "+o:o}var d=function(e,n,t){var r=new Ht(t);return r.selectNumberingPlan(e,n),r.defaultIDDPrefix()?r.defaultIDDPrefix():gr.test(r.IDDPrefix())?r.IDDPrefix():void 0}(r,void 0,i.metadata);if(d)return"".concat(d," ").concat(t," ").concat(Ar(e,null,"INTERNATIONAL",i))}(o,e.carrierCode,a,t.fromCountry,r);if(!d)return;return Tr(d,e.ext,r,t.formatExtension);default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(n,'"'))}}function Ar(e,n,t,r,i){var a,o,d=(a=r.formats(),o=e,function(e,n){for(var t=0;t<e.length;){if(n(e[t]))return e[t];t++}}(a,function(e){if(e.leadingDigitsPatterns().length>0){var n=e.leadingDigitsPatterns()[e.leadingDigitsPatterns().length-1];if(0!==o.search(n))return!1}return rr(o,e.pattern())}));return d?yr(e,d,{useInternationalFormat:"INTERNATIONAL"===t,withNationalPrefix:!d.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!i||!1!==i.nationalPrefix}):e}function Tr(e,n,t,r){return n?r(e,n,t):e}function Ir(e){return Ir="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ir(e)}function Rr(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Mr(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Rr(Object(t),!0).forEach(function(n){Or(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Rr(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Or(e,n,t){return(n=Lr(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Dr(e,n,t){return n&&function(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Lr(r.key),r)}}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Lr(e){var n=function(e,n){if("object"!=Ir(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n);if("object"!=Ir(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==Ir(n)?n:n+""}var Ur=function(){return Dr(function e(n,t,r){if(function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e),!n)throw new TypeError("First argument is required");if("string"!=typeof n)throw new TypeError("First argument must be a string");if("+"===n[0]&&!t)throw new TypeError("`metadata` argument not passed");if(Ut(t)&&Ut(t.countries)){r=t;var i=n;if(!qr.test(i))throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits');var a=br(i,void 0,void 0,void 0,r);if(n=a.countryCallingCode,!(t=a.number))throw new Error("Invalid `number` argument passed: too short")}if(!t)throw new TypeError("`nationalNumber` argument is required");if("string"!=typeof t)throw new TypeError("`nationalNumber` argument must be a string");Zt(r);var o=function(e,n){var t,r,i=new Ht(n);Br(e)?(t=e,i.selectNumberingPlan(t),r=i.countryCallingCode()):r=e;return{country:t,countryCallingCode:r}}(n,r),d=o.country,s=o.countryCallingCode;this.country=d,this.countryCallingCode=s,this.nationalNumber=t,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return r}},[{key:"setExt",value:function(e){this.ext=e}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:lr(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return function(e,n,t){if(void 0===n&&(n={}),t=new Ht(t),n.v2){if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");t.selectNumberingPlan(e.countryCallingCode)}else{if(!e.phone)return!1;if(e.country){if(!t.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));t.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");t.selectNumberingPlan(e.countryCallingCode)}}if(t.possibleLengths())return tr(e.phone||e.nationalNumber,e.country,t);if(e.countryCallingCode&&t.isNonGeographicCallingCode(e.countryCallingCode))return!0;throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}(this,{v2:!0},this.getMetadata())}},{key:"isValid",value:function(){return function(e,n,t){return n=n||{},(t=new Ht(t)).selectNumberingPlan(e.country,e.countryCallingCode),t.hasTypes()?void 0!==dr(e,n,t.metadata):rr(n.v2?e.nationalNumber:e.phone,t.nationalNumberPattern())}(this,{v2:!0},this.getMetadata())}},{key:"isNonGeographic",value:function(){return new Ht(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(e){return this.number===e.number&&this.ext===e.ext}},{key:"getType",value:function(){return dr(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(e,n){return Sr(this,e,n?Mr(Mr({},n),{},{v2:!0}):{v2:!0},this.getMetadata())}},{key:"formatNational",value:function(e){return this.format("NATIONAL",e)}},{key:"formatInternational",value:function(e){return this.format("INTERNATIONAL",e)}},{key:"getURI",value:function(e){return this.format("RFC3966",e)}}])}(),Br=function(e){return/^[A-Z]{2}$/.test(e)};var qr=/^\+\d+$/;function Fr(e){return Fr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fr(e)}function Kr(e,n,t){return n=Wr(n),function(e,n){if(n&&("object"==Fr(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Vr()?Reflect.construct(n,t||[],Wr(e).constructor):n.apply(e,t))}function Gr(e){var n="function"==typeof Map?new Map:void 0;return Gr=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(n){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return function(e,n,t){if(Vr())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,n);var i=new(e.bind.apply(e,r));return t&&Hr(i,t.prototype),i}(e,arguments,Wr(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),Hr(t,e)},Gr(e)}function Vr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Vr=function(){return!!e})()}function Hr(e,n){return Hr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},Hr(e,n)}function Wr(e){return Wr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Wr(e)}var jr=function(e){function n(e){var t;return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),t=Kr(this,n,[e]),Object.setPrototypeOf(t,n.prototype),t.name=t.constructor.name,t}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&Hr(e,n)}(n,e),function(e){return Object.defineProperty(e,"prototype",{writable:!1}),e}(n)}(Gr(Error)),Yr=new RegExp("(?:"+xr()+")$","i");var Xr={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"};function zr(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(t)return(t=t.call(e)).next.bind(t);if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return Zr(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Zr(e,n):void 0}}(e))||n){t&&(e=t);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Zr(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function Jr(e){for(var n,t="",r=zr(e.split(""));!(n=r()).done;){t+=Qr(n.value,t)||""}return t}function Qr(e,n,t){if("+"===e){if(n)return;return"+"}return function(e){return Xr[e]}(e)}var ei="(["+cr+"]|[\\-\\.\\(\\)]?)",ni=new RegExp("^\\+"+ei+"*["+cr+"]"+ei+"*$","g"),ti=new RegExp("^("+("["+cr+"]+((\\-)*["+cr+"])*")+"\\.)*"+("[a-zA-Z]+((\\-)*["+cr+"])*")+"\\.?$","g"),ri="tel:",ii=";phone-context=";function ai(e,n){var t,r=n.extractFormattedPhoneNumber,i=function(e){var n=e.indexOf(ii);if(n<0)return null;var t=n+15;if(t>=e.length)return"";var r=e.indexOf(";",t);return r>=0?e.substring(t,r):e.substring(t)}(e);if(!function(e){return null===e||0!==e.length&&(ni.test(e)||ti.test(e))}(i))throw new jr("NOT_A_NUMBER");if(null===i)t=r(e)||"";else{t="","+"===i.charAt(0)&&(t+=i);var a,o=e.indexOf(ri);a=o>=0?o+4:0;var d=e.indexOf(ii);t+=e.substring(a,d)}var s=t.indexOf(";isub=");if(s>0&&(t=t.substring(0,s)),""!==t)return t}var oi=new RegExp("[++"+cr+"]"),di=new RegExp("[^"+cr+"#]+$");function si(e,n,t){if(n=n||{},t=new Ht(t),n.defaultCountry&&!t.hasCountry(n.defaultCountry)){if(n.v2)throw new jr("INVALID_COUNTRY");throw new Error("Unknown country: ".concat(n.defaultCountry))}var r=function(e,n,t){var r=ai(e,{extractFormattedPhoneNumber:function(e){return function(e,n,t){if(!e)return;if(e.length>250){if(t)throw new jr("TOO_LONG");return}if(!1===n)return e;var r=e.search(oi);if(r<0)return;return e.slice(r).replace(di,"")}(e,t,n)}});if(!r)return{};if(!function(e){return e.length>=2&&Pr.test(e)}(r))return function(e){return Er.test(e)}(r)?{error:"TOO_SHORT"}:{};var i=function(e){var n=e.search(Yr);if(n<0)return{};for(var t=e.slice(0,n),r=e.match(Yr),i=1;i<r.length;){if(r[i])return{number:t,ext:r[i]};i++}}(r);if(i.ext)return i;return{number:r}}(e,n.v2,n.extract),i=r.number,a=r.ext,o=r.error;if(!i){if(n.v2){if("TOO_SHORT"===o)throw new jr("TOO_SHORT");throw new jr("NOT_A_NUMBER")}return{}}var d=function(e,n,t,r){var i,a=br(Jr(e),void 0,n,t,r.metadata),o=a.countryCallingCodeSource,d=a.countryCallingCode,s=a.number;if(d)r.selectNumberingPlan(d);else{if(!s||!n&&!t)return{};r.selectNumberingPlan(n,t),n&&(i=n),d=t||Qt(n,r.metadata)}if(!s)return{countryCallingCodeSource:o,countryCallingCode:d};var l=_r(Jr(s),i,r),c=l.nationalNumber,u=l.carrierCode,h=fr(d,{nationalNumber:c,metadata:r});h&&(i=h,"001"===h||r.selectNumberingPlan(i));return{country:i,countryCallingCode:d,countryCallingCodeSource:o,nationalNumber:c,carrierCode:u}}(i,n.defaultCountry,n.defaultCallingCode,t),s=d.country,l=d.nationalNumber,c=d.countryCallingCode,u=d.countryCallingCodeSource,h=d.carrierCode;if(!t.hasSelectedNumberingPlan()){if(n.v2)throw new jr("INVALID_COUNTRY");return{}}if(!l||l.length<2){if(n.v2)throw new jr("TOO_SHORT");return{}}if(l.length>17){if(n.v2)throw new jr("TOO_LONG");return{}}if(n.v2){var p=new Ur(c,l,t.metadata);return s&&(p.country=s),h&&(p.carrierCode=h),a&&(p.ext=a),p.__countryCallingCodeSource=u,p}var m=!!(n.extended?t.hasSelectedNumberingPlan():s)&&rr(l,t.nationalNumberPattern());return n.extended?{country:s,countryCallingCode:c,carrierCode:h,valid:m,possible:!!m||!(!0!==n.extended||!t.possibleLengths()||!tr(l,s,t)),phone:l,ext:a}:m?function(e,n,t){var r={country:e,phone:n};t&&(r.ext=t);return r}(s,l,a):{}}function li(e){return li="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},li(e)}function ci(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function ui(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ci(Object(t),!0).forEach(function(n){hi(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ci(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function hi(e,n,t){return(n=function(e){var n=function(e,n){if("object"!=li(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n);if("object"!=li(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==li(n)?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function pi(e){return pi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pi(e)}function mi(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function fi(e,n,t){return(n=function(e){var n=function(e,n){if("object"!=pi(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n);if("object"!=pi(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==pi(n)?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function _i(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,i,a,o,d=[],s=!0,l=!1;try{if(a=(t=t.call(e)).next,0===n);else for(;!(s=(r=a.call(t)).done)&&(d.push(r.value),d.length!==n);s=!0);}catch(e){l=!0,i=e}finally{try{if(!s&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(l)throw i}}return d}}(e,n)||function(e,n){if(e){if("string"==typeof e)return bi(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?bi(e,n):void 0}}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bi(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function $i(e){var n,t,r,i=_i(Array.prototype.slice.call(e),4),a=i[0],o=i[1],d=i[2],s=i[3];if("string"!=typeof a)throw new TypeError("A text for parsing must be a string.");if(n=a,o&&"string"!=typeof o){if(!Ut(o))throw new Error("Invalid second argument: ".concat(o));d?(t=o,r=d):r=o}else s?(t=d,r=s):(t=void 0,r=d),o&&(t=function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?mi(Object(t),!0).forEach(function(n){fi(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):mi(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}({defaultCountry:o},t));return{text:n,options:t,metadata:r}}function yi(e){return yi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yi(e)}function gi(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function vi(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?gi(Object(t),!0).forEach(function(n){xi(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):gi(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function xi(e,n,t){return(n=function(e){var n=function(e,n){if("object"!=yi(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n);if("object"!=yi(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==yi(n)?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function wi(e,n,t){n&&n.defaultCountry&&!function(e,n){return n.countries.hasOwnProperty(e)}(n.defaultCountry,t)&&(n=vi(vi({},n),{},{defaultCountry:void 0}));try{return function(e,n,t){return si(e,ui(ui({},n),{},{v2:!0}),t)}(e,n,t)}catch(e){if(!(e instanceof jr))throw e}}function Ci(){var e=$i(arguments);return wi(e.text,e.options,e.metadata)}function Ei(e){return new Ht(e).getCountries()}function ki(e,n,t){if(n[e])return new Ur(e,n[e],t)}function Pi(){return Ot(Ci,arguments)}function Ni(){return Ot(Qt,arguments)}const Si=({countryCode:e,size:n=16})=>cn("div",{style:{width:`${n}px`,height:`${n}px`,borderRadius:"50%",backgroundImage:`url(https://assets.xendit.co/payment-session/flags/circle/${e.toLowerCase()}.svg)`,backgroundSize:"cover",backgroundPosition:"center"}}),Ai=e=>{const{field:n,onChange:t}=e,r=Zn(n),i=Xn(n),[a,o]=xe(void 0),d=Ti.findIndex(e=>e.value===a),s=Ce(null);Ii(e=>{if(s.current){const n=Ti.find(n=>n.value===e);n&&l(n)}});const l=ke(e=>{o(e.value),s.current&&(s.current.value=e.value),t()},[t]);return cn("div",{children:[cn("input",{type:"hidden",name:i,defaultValue:"",ref:s}),cn(bt,{id:r,options:Ti,onChange:l,placeholder:n.placeholder,selectedIndex:d})]})},Ti=function(){return Ot(Ei,arguments)}().map(e=>({title:new Intl.DisplayNames(["en"],{type:"region"}).of(e),value:e,leadingAsset:cn(Si,{countryCode:e})})).sort((e,n)=>e.title.localeCompare(n.title));function Ii(e){const n=Fa()?.cardDetails,t=n?.details?.country_codes[0],r=Yn(t);we(()=>{t&&t!==r&&e(t)})}const Ri=e=>{const{field:n,onChange:t}=e,r=Zn(n),i=Xn(n),a=Ce(null),o=ke(e=>{a.current&&(a.current.value=e.value),t()},[t]);if(!function(e){return"dropdown"===e.type.name}(n))throw new Error("DropdownField expects field.type.name to be 'dropdown'");return cn(x,{children:[cn(bt,{id:r,placeholder:n.placeholder,options:(d=n.type.options,d.map(e=>({title:e.label,description:e.subtitle,value:e.value}))),onChange:o}),cn("input",{type:"hidden",name:i,defaultValue:"",ref:a})]});var d};const Mi="undefined"!=typeof window&&window.HTMLElement?window.HTMLElement:EventTarget;class XenditFormAssociatedFocusTrap extends Mi{static tag="xendit-form-associated-focus-trap";static formAssociated=!0;internals;constructor(){super(),this.internals=this.attachInternals()}}var Oi;Oi=XenditFormAssociatedFocusTrap,"undefined"!=typeof window&&window.customElements&&customElements.define(Oi.tag,Oi);class InternalUpdateWorldState extends Event{data;static type="xendit-update-world-state";constructor(e){super(InternalUpdateWorldState.type,{bubbles:!1}),this.data=e}}class InternalUpdateChannelComponentData extends Event{channelCode;data;static type="xendit-update-channel-component-data";constructor(e,n){super(InternalUpdateChannelComponentData.type,{bubbles:!1}),this.channelCode=e,this.data=n}}class InternalSetFieldTouchedEvent extends Event{static type="xendit-internal-set-field-touched";constructor(){super(InternalSetFieldTouchedEvent.type,{bubbles:!0})}}class InternalBehaviorTreeUpdateEvent extends Event{static type="xendit-internal-behavior-tree-update";constructor(){super(InternalBehaviorTreeUpdateEvent.type,{})}}class InternalNeedsRerenderEvent extends Event{static type="xendit-internal-needs-rerender";constructor(){super(InternalNeedsRerenderEvent.type,{})}}class InternalScheduleMockUpdateEvent extends Event{mockData;static type="xendit-internal-schedule-mock-update";constructor(e){super(InternalScheduleMockUpdateEvent.type,{}),this.mockData=e}}Un("https://assets.xendit.co/components/secure-iframe-v0.0.15.html");const Di=new URL("https://assets.xendit.co/components/secure-iframe-v0.0.15.html"),Li=Di.toString(),Ui=Di.origin,Bi=e=>{const{field:n,onChange:t}=e,r=Mn(),i=Zn(n),a=Xn(n),o=Tn(),d=Ce(null),s=Ce(null),[l,c]=xe(),[u,h]=xe(!1),[p,m]=xe(null),{card:f}=Ba()??{},_=ke(e=>{if(!d.current)return;const r=d.current.contentWindow;if(e.source!==r)return;if(e.origin!==Ui)return;const i=e.data;switch(i.type){case"xendit-iframe-ready":c(i.ecdhPublicKey);break;case"xendit-iframe-change":{if(!s.current)return;m(i.cardBrand);const e=i.encrypted,n=1,r=e.map(e=>{if(i.empty)return"";const t=["xendit-encrypted",n,l,e.iv,e.value];return!i.valid&&i.validationErrorCodes.length&&t.push("invalid",btoa(i.validationErrorCodes[0].localeKey)),t.join("-")});if(0===r.length)break;s.current.value=r.length>1?JSON.stringify(r):r[0],t?.();break}case"xendit-iframe-focus":h(!0);break;case"xendit-iframe-blur":h(!1),s.current?.value&&s.current?.dispatchEvent(new InternalSetFieldTouchedEvent);break;case"xendit-iframe-failed-init":console.error(`Iframe field for ${n.channel_property} failed to initialize securely`)}},[n.channel_property,l,t]),b=ke(()=>{d.current?.contentWindow&&d.current.contentWindow.postMessage({type:"xendit-iframe-focus"},Ui)},[]);we(()=>(window.addEventListener("message",_),()=>{window.removeEventListener("message",_)}),[_]);const $=new URL(Li);$.searchParams.set("input_type",n.type.name),$.searchParams.set("embedder",window.location.origin),$.searchParams.set("session_id",o.payment_session_id),$.searchParams.set("pk",r[fn].sdkKey.publicKey),$.searchParams.set("sig",r[fn].sdkKey.signature),r[fn].options.iframeFieldAppearance&&$.searchParams.set("appearance",JSON.stringify(r[fn].options.iframeFieldAppearance));return cn("div",{className:`xendit-iframe-container ${u?"xendit-field-focus":""}`,children:[cn(XenditFormAssociatedFocusTrap.tag,{id:i,onFocus:b,tabIndex:-1}),cn("input",{type:"hidden",name:a,defaultValue:"",ref:s}),cn("iframe",{src:$.toString(),ref:d,sandbox:"allow-scripts allow-same-origin"}),"credit_card_number"===n.type.name&&f&&cn(qi,{cardsBrandList:f.brands,selectedCardBrand:p})]})},qi=({cardsBrandList:e,selectedCardBrand:n})=>{if(!e)return null;const t=e.find(e=>e.name===n)?.logo_url;return cn("div",{className:"xendit-card-brands-list",children:n?t&&cn("img",{className:"xendit-card-brand-logo",src:t,alt:n}):e.map(({name:e,logo_url:n})=>cn("img",{className:"xendit-card-brand-logo",src:n,alt:e},e))})};var Fi={AC:"40123",AD:"312345",AE:"501234567",AF:"701234567",AG:"2684641234",AI:"2642351234",AL:"672123456",AM:"77123456",AO:"923123456",AR:"91123456789",AS:"6847331234",AT:"664123456",AU:"412345678",AW:"5601234",AX:"412345678",AZ:"401234567",BA:"61123456",BB:"2462501234",BD:"1812345678",BE:"450001234",BF:"70123456",BG:"43012345",BH:"36001234",BI:"79561234",BJ:"0195123456",BL:"690001234",BM:"4413701234",BN:"7123456",BO:"71234567",BQ:"3181234",BR:"11961234567",BS:"2423591234",BT:"17123456",BW:"71123456",BY:"294911911",BZ:"6221234",CA:"5062345678",CC:"412345678",CD:"991234567",CF:"70012345",CG:"061234567",CH:"781234567",CI:"0123456789",CK:"71234",CL:"221234567",CM:"671234567",CN:"13123456789",CO:"3211234567",CR:"83123456",CU:"51234567",CV:"9911234",CW:"95181234",CX:"412345678",CY:"96123456",CZ:"601123456",DE:"15123456789",DJ:"77831001",DK:"34412345",DM:"7672251234",DO:"8092345678",DZ:"551234567",EC:"991234567",EE:"51234567",EG:"1001234567",EH:"650123456",ER:"7123456",ES:"612345678",ET:"911234567",FI:"412345678",FJ:"7012345",FK:"51234",FM:"3501234",FO:"211234",FR:"612345678",GA:"06031234",GB:"7400123456",GD:"4734031234",GE:"555123456",GF:"694201234",GG:"7781123456",GH:"231234567",GI:"57123456",GL:"221234",GM:"3012345",GN:"601123456",GP:"690001234",GQ:"222123456",GR:"6912345678",GT:"51234567",GU:"6713001234",GW:"955012345",GY:"6091234",HK:"51234567",HN:"91234567",HR:"921234567",HT:"34101234",HU:"201234567",ID:"812345678",IE:"850123456",IL:"502345678",IM:"7924123456",IN:"8123456789",IO:"3801234",IQ:"7912345678",IR:"9123456789",IS:"6111234",IT:"3123456789",JE:"7797712345",JM:"8762101234",JO:"790123456",JP:"9012345678",KE:"712123456",KG:"700123456",KH:"91234567",KI:"72001234",KM:"3212345",KN:"8697652917",KP:"1921234567",KR:"1020000000",KW:"50012345",KY:"3453231234",KZ:"7710009998",LA:"2023123456",LB:"71123456",LC:"7582845678",LI:"660234567",LK:"712345678",LR:"770123456",LS:"50123456",LT:"61234567",LU:"628123456",LV:"21234567",LY:"912345678",MA:"650123456",MC:"612345678",MD:"62112345",ME:"60123456",MF:"690001234",MG:"321234567",MH:"2351234",MK:"72345678",ML:"65012345",MM:"92123456",MN:"88123456",MO:"66123456",MP:"6702345678",MQ:"696201234",MR:"22123456",MS:"6644923456",MT:"96961234",MU:"52512345",MV:"7712345",MW:"991234567",MX:"2221234567",MY:"123456789",MZ:"821234567",NA:"811234567",NC:"751234",NE:"93123456",NF:"381234",NG:"8021234567",NI:"81234567",NL:"612345678",NO:"40612345",NP:"9841234567",NR:"5551234",NU:"8884012",NZ:"211234567",OM:"92123456",PA:"61234567",PE:"912345678",PF:"87123456",PG:"70123456",PH:"9051234567",PK:"3012345678",PL:"512345678",PM:"551234",PR:"7872345678",PS:"599123456",PT:"912345678",PW:"6201234",PY:"961456789",QA:"33123456",RE:"692123456",RO:"712034567",RS:"601234567",RU:"9123456789",RW:"720123456",SA:"512345678",SB:"7421234",SC:"2510123",SD:"911231234",SE:"701234567",SG:"81234567",SH:"51234",SI:"31234567",SJ:"41234567",SK:"912123456",SL:"25123456",SM:"66661212",SN:"701234567",SO:"71123456",SR:"7412345",SS:"977123456",ST:"9812345",SV:"70123456",SX:"7215205678",SY:"944567890",SZ:"76123456",TA:"8999",TC:"6492311234",TD:"63012345",TG:"90112345",TH:"812345678",TJ:"917123456",TK:"7290",TL:"77212345",TM:"66123456",TN:"20123456",TO:"7715123",TR:"5012345678",TT:"8682911234",TV:"901234",TW:"912345678",TZ:"621234567",UA:"501234567",UG:"712345678",US:"2015550123",UY:"94231234",UZ:"912345678",VA:"3123456789",VC:"7844301234",VE:"4121234567",VG:"2843001234",VI:"3406421234",VN:"912345678",VU:"5912345",WF:"821234",WS:"7212345",XK:"43201234",YE:"712345678",YT:"639012345",ZA:"711234567",ZM:"955123456",ZW:"712345678"};const Ki=e=>{const{field:n,onChange:t}=e,r=Zn(n),i=Xn(n),a=Tn(),o=Ce(null),[d,s]=xe(a.country),l=Ee(()=>{const e=Gi.findIndex(e=>e.value===d);return-1===e?0:e},[d]),c=Gi[l],[u,h]=xe(""),p=Ce(null),m=ke((e,n)=>{const t=Vi(e,n);return t?t.number:`+${e.dial}${n}`},[]),f=ke((e,n)=>{o.current&&(o.current.value=m(e,n))},[m]);function _(e){const n=e;s(n.value),f(n,u),t()}return Ii(e=>{const n=Gi.find(n=>n.value===e);n&&n.value!==d&&!u&&_(n)}),cn("div",{className:"xendit-input-phone",children:[cn("div",{className:"xendit-combobox",children:[cn(bt,{options:Gi,selectedIndex:l,onChange:_}),cn("input",{id:r,ref:p,type:"tel",inputMode:"tel",placeholder:function(){return Ot(ki,arguments)}(c.value,Fi)?.formatInternational()?.replace(`+${Ni(c.value)} `,"")||"",className:"xendit-text-14 xendit-phone-number-input",onBlur:function(e){!function(){const e=Vi(c,u);if(e){const n=e.formatInternational();h(n.replace(`+${Ni(c.value)} `,""))}}(),e.currentTarget?.value&&o.current?.dispatchEvent(new InternalSetFieldTouchedEvent)},onChange:function(e){const n=e.target.value;h(n),f(c,n),t()},value:u,autoComplete:"tel"})]}),cn("input",{type:"hidden",name:i,ref:o})]})},Gi=Ti.map(e=>{const n=Ni(e.value);return n?{...e,shortTitle:`+${n}`,title:`${e.title} (+${n})`,dial:n}:null}).filter(e=>Boolean(e)),Vi=(e,n)=>{const t=Pi(n,e.value);return t&&t.isPossible()?t:null};function Hi(e){return{title:e.name,value:e.value}}const Wi=[{name:"Alabama",value:"AL"},{name:"Alaska",value:"AK"},{name:"American Samoa",value:"AS"},{name:"Arizona",value:"AZ"},{name:"Arkansas",value:"AR"},{name:"California",value:"CA"},{name:"Colorado",value:"CO"},{name:"Connecticut",value:"CT"},{name:"Delaware",value:"DE"},{name:"District Of Columbia",value:"DC"},{name:"Federated States Of Micronesia",value:"FM"},{name:"Florida",value:"FL"},{name:"Georgia",value:"GA"},{name:"Guam",value:"GU"},{name:"Hawaii",value:"HI"},{name:"Idaho",value:"ID"},{name:"Illinois",value:"IL"},{name:"Indiana",value:"IN"},{name:"Iowa",value:"IA"},{name:"Kansas",value:"KS"},{name:"Kentucky",value:"KY"},{name:"Louisiana",value:"LA"},{name:"Maine",value:"ME"},{name:"Marshall Islands",value:"MH"},{name:"Maryland",value:"MD"},{name:"Massachusetts",value:"MA"},{name:"Michigan",value:"MI"},{name:"Minnesota",value:"MN"},{name:"Mississippi",value:"MS"},{name:"Missouri",value:"MO"},{name:"Montana",value:"MT"},{name:"Nebraska",value:"NE"},{name:"Nevada",value:"NV"},{name:"New Hampshire",value:"NH"},{name:"New Jersey",value:"NJ"},{name:"New Mexico",value:"NM"},{name:"New York",value:"NY"},{name:"North Carolina",value:"NC"},{name:"North Dakota",value:"ND"},{name:"Northern Mariana Islands",value:"MP"},{name:"Ohio",value:"OH"},{name:"Oklahoma",value:"OK"},{name:"Oregon",value:"OR"},{name:"Palau",value:"PW"},{name:"Pennsylvania",value:"PA"},{name:"Puerto Rico",value:"PR"},{name:"Rhode Island",value:"RI"},{name:"South Carolina",value:"SC"},{name:"South Dakota",value:"SD"},{name:"Tennessee",value:"TN"},{name:"Texas",value:"TX"},{name:"Utah",value:"UT"},{name:"Vermont",value:"VT"},{name:"Virgin Islands",value:"VI"},{name:"Virginia",value:"VA"},{name:"Washington",value:"WA"},{name:"West Virginia",value:"WV"},{name:"Wisconsin",value:"WI"},{name:"Wyoming",value:"WY"}].map(Hi),ji=[{name:"Alberta",value:"AB"},{name:"British Columbia",value:"BC"},{name:"Manitoba",value:"MB"},{name:"New Brunswick",value:"NB"},{name:"Newfoundland and Labrador",value:"NL"},{name:"Northwest Territories",value:"NT"},{name:"Nova Scotia",value:"NS"},{name:"Nunavut",value:"NU"},{name:"Ontario",value:"ON"},{name:"Prince Edward Island",value:"PE"},{name:"Quebec",value:"QC"},{name:"Saskatchewan",value:"SK"},{name:"Yukon Territory",value:"YT"}].map(Hi),Yi=[{name:"Avon"},{name:"Bedfordshire"},{name:"Berkshire"},{name:"Buckinghamshire"},{name:"Cambridgeshire"},{name:"Cheshire"},{name:"Cleveland"},{name:"Cornwall"},{name:"Cumbria"},{name:"Derbyshire"},{name:"Devon"},{name:"Dorset"},{name:"Durham"},{name:"East Sussex"},{name:"Essex"},{name:"Gloucestershire"},{name:"Hampshire"},{name:"Herefordshire"},{name:"Hertfordshire"},{name:"Isle of Wight"},{name:"Kent"},{name:"Lancashire"},{name:"Leicestershire"},{name:"Lincolnshire"},{name:"London"},{name:"Merseyside"},{name:"Norfolk"},{name:"Northamptonshire"},{name:"Northumberland"},{name:"North Yorkshire"},{name:"Nottinghamshire"},{name:"Oxfordshire"},{name:"Rutland"},{name:"Shropshire"},{name:"Somerset"},{name:"South Yorkshire"},{name:"Staffordshire"},{name:"Suffolk"},{name:"Surrey"},{name:"Tyne and Wear"},{name:"Warwickshire"},{name:"West Midlands"},{name:"West Sussex"},{name:"West Yorkshire"},{name:"Wiltshire"},{name:"Worcestershire"},{name:"Clwyd"},{name:"Dyfed"},{name:"Gwent"},{name:"Gwynedd"},{name:"Mid Glamorgan"},{name:"Powys"},{name:"South Glamorgan"},{name:"West Glamorgan"},{name:"Aberdeenshire"},{name:"Angus"},{name:"Argyll"},{name:"Ayrshire"},{name:"Banffshire"},{name:"Berwickshire"},{name:"Bute"},{name:"Caithness"},{name:"Clackmannanshire"},{name:"Dumfriesshire"},{name:"Dunbartonshire"},{name:"East Lothian"},{name:"Fife"},{name:"Inverness-shire"},{name:"Kincardineshire"},{name:"Kinross-shire"},{name:"Kirkcudbrightshire"},{name:"Lanarkshire"},{name:"Midlothian"},{name:"Moray"},{name:"Nairnshire"},{name:"Orkney"},{name:"Peeblesshire"},{name:"Perthshire"},{name:"Renfrewshire"},{name:"Ross-shire"},{name:"Roxburghshire"},{name:"Selkirkshire"},{name:"Shetland"},{name:"Stirlingshire"},{name:"Sutherland"},{name:"West Lothian"},{name:"Wigtownshire"},{name:"Antrim"},{name:"Armagh"},{name:"Down"},{name:"Fermanagh"},{name:"Londonderry"},{name:"Tyrone"}].map(e=>({title:e.name,value:e.name})),Xi=e=>{const{field:n,onChange:t}=e,r=Zn(n),i=Xn(n),a=Tn(),o=Ba()?.form,d=wa(),s=Ce(null),l=ke(()=>{s.current&&(s.current.value=""),t()},[t]),c=ke(e=>{s.current&&(s.current.value=e.value),t(),s.current?.dispatchEvent(new InternalSetFieldTouchedEvent)},[t]),u=ke(e=>{s.current&&(s.current.value=e.target.value),t(),s.current?.dispatchEvent(new InternalSetFieldTouchedEvent)},[t]),h=function(e){switch(e){case"US":return Wi;case"CA":return ji;case"GB":return Yi;default:return null}}(function(e,n,t,r){if(n)for(let r=0;r<n.length;r++){const i=n[r];if(r>0&&i===e){const e=n[r-1];if("country"===e.type.name){const n=rt(e.channel_property,t);if(n&&"string"==typeof n)return n}}}return r.country}(n,o??[],d??{},a)),p=Yn(h);return we(()=>{p!==h&&l()},[l,h,p]),cn(x,{children:[cn("input",{type:"hidden",name:i,defaultValue:"",ref:s}),h?cn(bt,{id:r,options:h,onChange:c,placeholder:n.placeholder},(m=h,ot.has(m)||ot.set(m,dt++),ot.get(m).toString())):cn("input",{type:"text",id:r,onChange:u,placeholder:n.placeholder,className:"xendit-input xendit-text-14"})]});var m};const zi=e=>{const{field:n,onChange:t}=e,r=Zn(n),i=Xn(n),a=Ce(null);return cn("input",{id:r,name:i,ref:a,type:"text",placeholder:n.placeholder,className:"xendit-text-14",onBlur:function(e){e.currentTarget?.value&&a.current?.dispatchEvent(new InternalSetFieldTouchedEvent)},onChange:function(e){t()},minLength:Zi(n)?n.type.min_length:void 0,maxLength:Zi(n)?n.type.max_length:void 0,autoComplete:Zi(n)?n.type.autocomplete:void 0})};function Zi(e){return"text"===e.type.name}const Ji={IDR:"id",VND:"vi",BRL:"pt-BR",RUB:"ru",CZK:"cs",RON:"ro",UAH:"uk",CLP:"es-CL",COP:"es-CO",UYU:"es-UY",ARS:"es-AR",INR:"hi-IN",NPR:"hi-IN",LKR:"hi-IN",BDT:"hi-IN"},Qi={USD:"US$",CAD:"CA$",EUR:"€",AFN:"؋",ALL:"Lek",AMD:"֏",ARS:"AR$",AUD:"AU$",AZN:"₼",BAM:"KM",BDT:"৳",BIF:"FBu",BND:"BN$",BOB:"Bs",BRL:"R$",BWP:"P",BYN:"Br",BZD:"BZ$",CDF:"FrCD",CHF:"CHF",CLP:"CL$",CNY:"CN¥",COP:"CO$",CRC:"₡",CVE:"CV$",CZK:"Kč",DJF:"Fdj",DKK:"kr",DOP:"RD$",ERN:"Nfk",ETB:"Br",GBP:"£",GEL:"₾",GHS:"GH₵",GNF:"FG",GTQ:"Q",HKD:"HK$",HNL:"L",HUF:"Ft",IDR:"Rp",ILS:"₪",INR:"₹",IRR:"IRR",ISK:"kr",JMD:"J$",JPY:"¥",KES:"Ksh",KHR:"៛",KMF:"FC",KRW:"₩",KZT:"₸",LKR:"SL Re",MDL:"lei",MGA:"MGA",MKD:"MKD",MMK:"K",MOP:"MOP$",MUR:"₨",MXN:"MX$",MYR:"RM",MZN:"MTn",NAD:"N$",NGN:"₦",NIO:"C$",NOK:"kr",NPR:"रु",NZD:"NZ$",PAB:"B/.",PEN:"S/.",PHP:"₱",PKR:"₨",PLN:"zł",PYG:"₲",RON:"RON",RSD:"RSD",RUB:"₽",RWF:"FR",SDG:"SDG",SEK:"kr",SGD:"S$",SOS:"Ssh",THB:"฿",TOP:"T$",TRY:"TL",TTD:"TT$",TWD:"NT$",TZS:"TSh",UAH:"₴",UGX:"USh",UYU:"$U",UZS:"сум",VND:"₫",XAF:"FCFA",XOF:"CFA",ZAR:"R",ZMW:"K",ZWL:"ZWL$"},ea={ALL:"1 $",BAM:"1 $",BYN:"1 $",CZK:"1 $",DKK:"1 $",GEL:"1 $",HUF:"1 $",ISK:"1 $",IRR:"1 $",KHR:"1$",MDL:"1 $",MKD:"1 $",NOK:"1 $",PLN:"1 $",RON:"1 $",RSD:"1 $",RUB:"1$",SEK:"1 $",UZS:"1 $",VND:"1$"},na={BHD:3,JOD:3,KWD:3,LYD:3,OMR:3,TND:3};function ta(e,n){let t="";const r=e<0,i=Ji[n]??"en",a=na[n]??2;if(t=new Intl.NumberFormat(i,{style:"decimal",minimumFractionDigits:a,maximumFractionDigits:20}).format(Math.abs(e)),t=t.replace(/(\.|,)000?$/,""),Qi[n]){const e=Qi[n]??n;t=(ea[n]??"$1").replace("$",e).replace("1",t)}else t=n+" "+t;return r&&(t="-"+t),t}const ra=e=>{const{field:n,onChange:t}=e,{t:r}=Mn(),i=Tn(),a=Zn(n),o=Xn(n),d=Ce(null),s=Ba();Un(s);const l=Ee(()=>ht(s.form,"credit_card_number"),[s.form]),c=Fa()?.paymentOptions,u=c?.options?.installment_plans,[h,p]=xe(null),m=Ee(()=>{const e=u?.map(e=>({title:r("installment_plan.pay_in_installments",{installments:e.terms,amount:ta(e.installment_amount,i.currency)}),subtitle:e.interest_rate,value:ia(e)}))??[];return l&&e.unshift({title:r("installment_plan.pay_in_full",{amount:ta(i.amount,i.currency)}),value:""}),e},[l,u,i.amount,i.currency,r]);let f=m?.findIndex(e=>e.value===h);-1===f&&(f=0);const _=ke(()=>{p(null),d.current&&(d.current.value="")},[]),b=ke(e=>{if(d.current){const n=u?.find(n=>ia(n)===e.value);n?n.code?d.current.value=JSON.stringify([n.terms,n.interval,n.code]):d.current.value=JSON.stringify([n.terms,n.interval]):d.current.value="",d.current?.dispatchEvent(new InternalSetFieldTouchedEvent)}p(e.value),t()},[u,t]);we(()=>{m.length&&b(m[0])},[]);const $=Yn(m);return we(()=>{m===$||u?.some(e=>ia(e)===h)||(m.length?b(m[0]):_())},[_,m,b,u,$,h]),cn(x,{children:[c?cn(bt,{id:a,placeholder:n.placeholder,className:"xendit-text-14",onChange:b,options:m,selectedIndex:f}):cn($t,{id:a}),cn("input",{type:"hidden",name:o,ref:d})]})};function ia(e){return`${e.terms}_${e.interval}_${e.code??""}`}const aa=e=>{const{field:n,className:t}=e;return cn("div",{className:`${t} xendit-channel-form-field xendit-form-field-span-${n.span}`,children:function(){switch(n.type.name){case"credit_card_number":case"credit_card_expiry":case"credit_card_cvn":return cn(Bi,{...e});case"phone_number":return cn(Ki,{...e});case"text":case"email":case"postal_code":return cn(zi,{...e});case"dropdown":return cn(Ri,{...e});case"installment_plan":return cn(ra,{...e});case"country":return cn(Ai,{...e});case"province":return cn(Xi,{...e})}throw n.type,new Error(`Unsupported field type: ${n.type.name}`)}()})};const oa={en:{session:{"validation.card_cvn_invalid":"CVN is not valid","validation.card_expiry_invalid":"Card expiry is not valid","validation.card_number_incomplete":"Card number is incomplete","validation.card_number_invalid":"Card number is not valid","validation.generic_invalid":"{{field}} is not valid","validation.required":"{{field}} is required","validation.text_too_long":"{{field}} is too long","validation.text_too_short":"{{field}} is too short","payment.save_checkbox_label":"Save for faster payment next time","payment_methods.add_payment_method":"Add payment method","payment_methods.channel_disabled_amount_too_large":"Not available for this payment","payment_methods.channel_disabled_amount_too_small":"Not available for this payment","payment_methods.pay_with":"Pay with","payment_methods.select_channel_placeholder":"Select {{groupName}}","default_error.message_1":"There was a problem with the request.","default_error.message_2":"Please try again later.","default_error.title":"Error","combobox.default_search_placeholder":"Search...","installment_plan.pay_in_full":"Pay in Full — {{amount}}","installment_plan.pay_in_installments":"{{installments}}x Installments — {{amount}}","google_pay_errors.developer_error.title":"Google Pay Error","google_pay_errors.developer_error.message":"Something went wrong with Google Pay. Please try again or use a different payment method.","google_pay_errors.buyer_account_error.title":"Google Pay Error","google_pay_errors.buyer_account_error.message":"Your Google account is unable to make this payment. Use a different Google account or a different payment method.","google_pay_errors.merchant_account_error.title":"Google Pay Error","google_pay_errors.merchant_account_error.message":"Something went wrong with Google Pay. Please try again or use a different payment method.","google_pay_errors.internal_error.title":"Google Pay Error","google_pay_errors.internal_error.message":"Something went wrong with Google Pay. Please try again or use a different payment method.","google_pay_errors.unknown_error.title":"Google Pay Error","google_pay_errors.unknown_error.message":"An unknown error occurred with Google Pay. The error code is {{statusCode}}.","failure_code.account_access_blocked":"Your payment was declined. Please try again or use a different payment method.","failure_code.account_already_linked":"Your account has already been linked. Please use a different payment method.","failure_code.account_not_activated":"Your payment couldn’t be processed because your account hasn’t been activated. Please activate your account and try again.","failure_code.authentication_failed":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.capture_amount_exceeded":"Your payment couldn't be processed. Please make sure your payment details are correct and try again, or use a different payment method.","failure_code.card_declined":"Your card was declined. Please try again with another card or payment method.","failure_code.channel_unavailable":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.declined_by_issuer":"Your payment was declined. Please try again or use a different payment method.","failure_code.declined_by_processor":"Your payment was declined. Please try again or use a different payment method.","failure_code.expired_card":"Your card was declined because it is expired. Please try again or use a different payment method.","failure_code.expired_otp":"Your payment couldn’t be processed because your verification code is invalid. Please try again or use a different payment method.","failure_code.failure_details_unavailable":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.inactive_or_unauthorized_card":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.insufficient_balance":"Your payment couldn’t be processed because your account balance is insufficient. Please make sure you have enough funds and try again.","failure_code.invalid_account_details":"Your payment information is incorrect. Please double-check your card details or try a different payment method.","failure_code.invalid_cvv":"The CVN entered was incorrect. Please try again.","failure_code.invalid_merchant_settings":"Your payment couldn’t be processed. Please contact the seller or try a different payment method.","failure_code.invalid_otp":"Your payment couldn’t be processed because your verification code is invalid. Please try again or use a different payment method.","failure_code.invalid_token":"Your payment couldn’t be processed because your verification code is invalid. Please try again or use a different payment method.","failure_code.issuer_unavailable":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.otp_attempt_counts_exceeded":"Your payment couldn’t be processed because there were too many failed OTP attempts. Please make the payment again or use a different payment method.","failure_code.partner_timeout_error":"Your payment couldn't be processed. Please try again or use a different payment method.","failure_code.payment_amount_limits_exceeded":"Your payment couldn’t be processed because you’ve exceeded your transaction limit. Please use a different payment method.","failure_code.payment_attempt_counts_exceeded":"Your payment couldn’t be processed due to too many failed attempts.","failure_code.payment_request_expired":"Your payment couldn’t be processed because the link has expired. Please try again or use a different payment method.","failure_code.processor_error":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.server_error":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.stolen_card":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.suspected_fraudulent":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.timeout_error":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.user_declined_payment":"Your payment was declined. Please try again or use a different payment method.","failure_code.user_device_unreachable":"Your payment couldn’t be processed due to a network issue. Please try again or use a different payment method.","failure_code.user_did_not_authorize":"Your payment couldn’t be processed because it wasn’t authorized in time. Please try again.",failure_code_unknown:"A failure occurred with code {{failureCode}}","payment_request_status.canceled.subtext":"Please try to check out again or contact the seller if the problem persists.","payment_request_status.canceled.title":"This page is no longer available","payment_request_status.expired.subtext":"Your payment couldn’t be processed. Please try again or use a different payment method.","payment_request_status.expired.title":"Payment unsuccessful","payment_request_status.failed.subtext":"Your payment couldn't be processed. Please try a different payment method or submit an inquiry to the seller by sharing your Unique Identifiers.","payment_request_status.failed.title":"Payment failed","payment_token_status.canceled.subtext":"Please try again or use a different payment method.","payment_token_status.canceled.title":"Payment method couldn't be added","payment_token_status.expired.subtext":"Please try again or use a different payment method.","payment_token_status.expired.title":"Payment method couldn't be added","payment_token_status.failed.subtext":"Your payment couldn't be processed. Please try a different payment method or submit an inquiry to the seller by sharing your Unique Identifiers.","payment_token_status.failed.title":"Payment method couldn't be added","action.payment_confirmation_instructions":"Once you've paid, click the button above to get your payment confirmation.","action.payment_made":"I've made this payment","action_va.merchant_name":"Virtual Account Name","action_va.amount_to_pay":"Amount to Pay","action_va.virtual_account_number":"Virtual Account Number","action_va.copy":"Copy","action_va.copied_to_clipboard":"Copied to clipboard","action_qr.unable_to_generate":"Unable to generate QR code","action_deeplink.button":"Open App","action_deeplink.instructions":"Please complete your payment on {{channelName}} app.","action_deeplink.title":"Awaiting payment...","action_empty_list_push_notification.subtext":"Check the notification in your {{channelName}} app to complete your payment.","action_empty_list_push_notification.title":"Awaiting payment...","image_alt.channel_logo":"{{channelName}} logo"}}.session,id:{session:{"validation.card_cvn_invalid":"CVN tidak valid","validation.card_expiry_invalid":"Tanggal kedaluwarsa kartu tidak valid","validation.card_number_incomplete":"Nomor kartu tidak lengkap","validation.card_number_invalid":"Nomor kartu tidak valid","validation.generic_invalid":"{{field}} tidak valid","validation.required":"{{field}} wajib diisi","validation.text_too_long":"{{field}} terlalu panjang","validation.text_too_short":"{{field}} terlalu pendek","payment.save_checkbox_label":"Simpan untuk pembayaran lebih cepat lain kali","payment_methods.add_payment_method":"Tambah metode pembayaran","payment_methods.channel_disabled_amount_too_large":"Tidak tersedia untuk pembayaran ini","payment_methods.channel_disabled_amount_too_small":"Tidak tersedia untuk pembayaran ini","payment_methods.pay_with":"Bayar dengan","payment_methods.select_channel_placeholder":"Pilih {{groupName}}","default_error.message_1":"Ada masalah dengan permintaan ini.","default_error.message_2":"Silakan coba lagi nanti.","default_error.title":"Error","failure_code.account_access_blocked":"Pembayaran Anda ditolak. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.account_already_linked":"Akun Anda sudah di-link. Silakan gunakan metode pembayaran lain.","failure_code.account_not_activated":"Pembayaran Anda tidak dapat diproses karena akun Anda belum diaktifkan. Harap aktifkan akun Anda dan coba lagi.","failure_code.authentication_failed":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.capture_amount_exceeded":"Pembayaran Anda tidak dapat diproses. Pastikan detail pembayaran Anda benar dan coba lagi, atau gunakan metode pembayaran lain.","failure_code.card_declined":"Kartu Anda ditolak. Silakan coba lagi dengan kartu atau metode pembayaran lain.","failure_code.channel_unavailable":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.declined_by_issuer":"Pembayaran Anda ditolak. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.declined_by_processor":"Pembayaran Anda ditolak. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.expired_card":"Kartu Anda ditolak karena sudah kedaluwarsa. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.expired_otp":"Pembayaran Anda tidak dapat diproses karena kode verifikasi tidak valid. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.failure_details_unavailable":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.inactive_or_unauthorized_card":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.insufficient_balance":"Pembayaran Anda tidak dapat diproses karena saldo akun Anda tidak mencukupi. Pastikan Anda memiliki dana yang cukup dan coba lagi.","failure_code.invalid_account_details":"Informasi pembayaran Anda salah. Harap periksa kembali detail kartu Anda atau coba gunakan metode pembayaran lain.","failure_code.invalid_cvv":"CVN yang dimasukkan salah. Silakan coba lagi.","failure_code.invalid_merchant_settings":"Pembayaran Anda tidak dapat diproses. Silakan hubungi penjual atau coba metode pembayaran lain.","failure_code.invalid_otp":"Pembayaran Anda tidak dapat diproses karena kode verifikasi tidak valid. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.invalid_token":"Pembayaran Anda tidak dapat diproses karena kode verifikasi tidak valid. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.issuer_unavailable":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.otp_attempt_counts_exceeded":"Pembayaran Anda tidak dapat diproses karena terlalu banyak percobaan OTP yang gagal. Harap lakukan pembayaran lagi atau gunakan metode pembayaran lain.","failure_code.partner_timeout_error":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.payment_amount_limits_exceeded":"Pembayaran Anda tidak dapat diproses karena Anda telah melampaui batas transaksi. Silakan gunakan metode pembayaran lain.","failure_code.payment_attempt_counts_exceeded":"Pembayaran Anda tidak dapat diproses karena terlalu banyak percobaan yang gagal.","failure_code.payment_request_expired":"Pembayaran Anda tidak dapat diproses karena link telah kedaluwarsa. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.processor_error":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.server_error":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.stolen_card":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.suspected_fraudulent":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.timeout_error":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.user_declined_payment":"Pembayaran Anda ditolak. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.user_device_unreachable":"Pembayaran Anda tidak dapat diproses karena masalah jaringan. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.user_did_not_authorize":"Pembayaran Anda tidak dapat diproses karena waktu pembayaran telah habis. Silakan coba lagi.",failure_code_unknown:"Terjadi kegagalan dengan kode {{failureCode}}","payment_request_status.canceled.subtext":"Silakan coba check out lagi atau hubungi penjual jika masalah terus berlanjut.","payment_request_status.canceled.title":"Halaman ini tidak tersedia lagi","payment_request_status.expired.subtext":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","payment_request_status.expired.title":"Pembayaran tidak berhasil","payment_request_status.failed.subtext":"Pembayaran Anda tidak dapat diproses. Silakan coba metode pembayaran lain atau ajukan pertanyaan kepada penjual dengan membagikan ID Unik Anda.","payment_request_status.failed.title":"Pembayaran gagal","payment_token_status.canceled.subtext":"Silakan coba lagi atau gunakan metode pembayaran lain.","payment_token_status.canceled.title":"Metode pembayaran tidak dapat ditambahkan","payment_token_status.expired.subtext":"Silakan coba lagi atau gunakan metode pembayaran lain.","payment_token_status.expired.title":"Metode pembayaran tidak dapat ditambahkan","payment_token_status.failed.subtext":"Pembayaran Anda tidak dapat diproses. Silakan coba metode pembayaran lain atau ajukan pertanyaan kepada penjual dengan membagikan ID Unik Anda.","payment_token_status.failed.title":"Metode pembayaran tidak dapat ditambahkan","action.payment_confirmation_instructions":"Setelah Anda bayar, klik tombol di atas untuk mendapatkan konfirmasi pembayaran Anda.","action.payment_made":"Saya telah melakukan pembayaran ini","action_va.amount_to_pay":"Jumlah Pembayaran","action_va.virtual_account_number":"Nomor Virtual Account","action_qr.unable_to_generate":"Tidak dapat membuat kode QR"}}.session,th:{session:{"validation.card_cvn_invalid":"CVN ไม่ถูกต้อง","validation.card_expiry_invalid":"วันหมดอายุของบัตรไม่ถูกต้อง","validation.card_number_incomplete":"หมายเลขบัตรไม่ครบถ้วน","validation.card_number_invalid":"หมายเลขบัตรไม่ถูกต้อง","validation.generic_invalid":"{{field}} ไม่ถูกต้อง","validation.required":"กรุณากรอก {{field}}","validation.text_too_long":"{{field}} ยาวเกินไป","validation.text_too_short":"{{field}} สั้นเกินไป","payment.save_checkbox_label":"บันทึกไว้สำหรับการชำระเงินที่เร็วขึ้นในครั้งถัดไป","payment_methods.add_payment_method":"เพิ่มวิธีการชำระเงิน","payment_methods.channel_disabled_amount_too_large":"ไม่สามารถใช้ได้กับการชำระเงินนี้","payment_methods.channel_disabled_amount_too_small":"ไม่สามารถใช้ได้กับการชำระเงินนี้","payment_methods.pay_with":"ชำระเงินด้วย","payment_methods.select_channel_placeholder":"เลือก {{groupName}}","default_error.message_1":"มีปัญหาในการประมวลผลคำขอ","default_error.message_2":"โปรดลองอีกครั้งในภายหลัง","default_error.title":"ข้อผิดพลาด","failure_code.account_access_blocked":"การชำระเงินของคุณถูกปฏิเสธ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.account_already_linked":"บัญชีนี้มีการเชื่อมต่อไว้แล้ว กรุณาเลือกวิธีการชำระเงินอื่น","failure_code.account_not_activated":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากบัญชีของคุณยังไม่ได้เปิดใช้งาน กรุณาเปิดใช้งานบัญชีและลองใหม่อีกครั้ง","failure_code.authentication_failed":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.capture_amount_exceeded":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาตรวจสอบรายละเอียดการชำระเงินให้ถูกต้องแล้วลองใหม่อีกครั้ง หรือใช้วิธีการชำระเงินอื่น","failure_code.card_declined":"บัตรของคุณถูกปฏิเสธ กรุณาลองใหม่ด้วยบัตรหรือวิธีการชำระเงินอื่น","failure_code.channel_unavailable":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือเลือกวิธีการชำระเงินอื่น","failure_code.declined_by_issuer":"การชำระเงินของคุณถูกปฏิเสธ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.declined_by_processor":"การชำระเงินของคุณถูกปฏิเสธ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.expired_card":"บัตรของคุณถูกปฏิเสธเนื่องจากบัตรหมดอายุ กรุณาลองใหม่อีกครั้งหรือใช้วิธีการชําระเงินอื่น","failure_code.expired_otp":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากรหัสยืนยันของคุณไม่ถูกต้อง กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.failure_details_unavailable":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.inactive_or_unauthorized_card":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือเลือกวิธีการชำระเงินอื่น","failure_code.insufficient_balance":"ไม่สามารถดำเนินการชำระเงินได้ เนื่องจากยอดเงินในบัญชีไม่เพียงพอ กรุณาตรวจสอบให้แน่ใจว่ามียอดเงินเพียงพอแล้วลองใหม่อีกครั้ง","failure_code.invalid_account_details":"ข้อมูลการชำระเงินไม่ถูกต้อง กรุณาตรวจสอบรายละเอียดบัตรอีกครั้ง หรือใช้วิธีการชำระเงินอื่น","failure_code.invalid_cvv":"CVN ที่กรอกไม่ถูกต้อง กรุณาลองใหม่อีกครั้ง","failure_code.invalid_merchant_settings":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาติดต่อผู้ขายหรือลองใช้วิธีชำระเงินอื่น","failure_code.invalid_otp":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากรหัสยืนยันของคุณไม่ถูกต้อง กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.invalid_token":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากรหัสยืนยันของคุณไม่ถูกต้อง กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.issuer_unavailable":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือเลือกวิธีการชำระเงินอื่น","failure_code.otp_attempt_counts_exceeded":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากมีการกรอกรหัส OTP ผิดพลาดมากเกินไป กรุณาชำระเงินใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.partner_timeout_error":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.payment_amount_limits_exceeded":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากคุณทำธุรกรรมเกินขีดจำกัด กรุณาใช้วิธีชำระเงินอื่น","failure_code.payment_attempt_counts_exceeded":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากพยายามล้มเหลวหลายครั้งเกินไป","failure_code.payment_request_expired":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากลิงก์หมดอายุแล้ว กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.processor_error":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือเลือกวิธีการชำระเงินอื่น","failure_code.server_error":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.stolen_card":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือเลือกวิธีการชำระเงินอื่น","failure_code.suspected_fraudulent":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือเลือกวิธีการชำระเงินอื่น","failure_code.timeout_error":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.user_declined_payment":"การชำระเงินของคุณถูกปฏิเสธ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.user_device_unreachable":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากปัญหาเครือข่าย กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.user_did_not_authorize":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากไม่ได้รับการอนุมัติภายในเวลาที่กำหนด กรุณาลองใหม่อีกครั้ง",failure_code_unknown:"เกิดข้อผิดพลาดขึ้น (รหัส: {{failureCode}})","payment_request_status.canceled.subtext":"กรุณาลองชำระเงินอีกครั้ง หรือ ติดต่อผู้ขายหากปัญหายังคงเกิดขึ้น","payment_request_status.canceled.title":"หน้านี้ไม่สามารถใช้งานได้แล้ว","payment_request_status.expired.subtext":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือลองใช้วิธีชำระเงินอื่น","payment_request_status.expired.title":"ชำระเงินไม่สำเร็จ","payment_request_status.failed.subtext":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใช้วิธีการชำระเงินอื่น หรือส่งคำถามไปยังผู้ขายโดยแชร์ Unique Identifiers ของคุณ","payment_request_status.failed.title":"ชำระเงินไม่สำเร็จ","payment_token_status.canceled.subtext":"กรุณาลองใหม่อีกครั้งหรือใช้วิธีการชําระเงินอื่น","payment_token_status.canceled.title":"ไม่สามารถเพิ่มวิธีการชําระเงินได้","payment_token_status.expired.subtext":"กรุณาลองใหม่อีกครั้งหรือใช้วิธีการชําระเงินอื่น","payment_token_status.expired.title":"ไม่สามารถเพิ่มวิธีการชําระเงินได้","payment_token_status.failed.subtext":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใช้วิธีการชำระเงินอื่น หรือส่งคำถามไปยังผู้ขายโดยแชร์ Unique Identifiers ของคุณ","payment_token_status.failed.title":"ไม่สามารถเพิ่มวิธีการชําระเงินได้","action.payment_confirmation_instructions":"เมื่อคุณชำระเงินแล้ว คลิกที่ปุ่มด้านบนเพื่อยืนยันการชำระเงิน","action.payment_made":"ฉันได้ชำระเงินแล้ว","action_va.amount_to_pay":"ยอดชำระ","action_va.virtual_account_number":"หมายเลข Virtual Account","action_qr.unable_to_generate":"ไม่สามารถสร้างคิวอาร์โค้ดได้"}}.session,vi:{session:{"validation.card_cvn_invalid":"CVN không hợp lệ","validation.card_expiry_invalid":"Ngày hết hạn thẻ không hợp lệ","validation.card_number_incomplete":"Số thẻ chưa đầy đủ","validation.card_number_invalid":"Số thẻ không hợp lệ","validation.generic_invalid":"{{field}} không hợp lệ","validation.required":"Vui lòng nhập {{field}}","validation.text_too_long":"{{field}} quá dài","validation.text_too_short":"{{field}} quá ngắn","payment.save_checkbox_label":"Lưu để thanh toán nhanh hơn lần sau","payment_methods.add_payment_method":"Thêm phương thức thanh toán","payment_methods.channel_disabled_amount_too_large":"Không khả dụng cho khoản thanh toán này","payment_methods.channel_disabled_amount_too_small":"Không khả dụng cho khoản thanh toán này","payment_methods.pay_with":"Thanh toán bằng","payment_methods.select_channel_placeholder":"Chọn {{groupName}}","default_error.message_1":"Có vấn đề với yêu cầu.","default_error.message_2":"Vui lòng thử lại sau.","default_error.title":"Lỗi","failure_code.account_access_blocked":"Thanh toán của bạn bị từ chối. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.account_already_linked":"Tài khoản của bạn đã được liên kết. Vui lòng dùng phương thức khác.","failure_code.account_not_activated":"Không thể thực hiện thanh toán vì tài khoản chưa được kích hoạt. Vui lòng kích hoạt và thử lại.","failure_code.authentication_failed":"Không thể thực hiện thanh toán. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.capture_amount_exceeded":"Không thể thực hiện thanh toán. Vui lòng kiểm tra thông tin thanh toán và thử lại, hoặc dùng phương thức khác.","failure_code.card_declined":"Thẻ của bạn đã bị từ chối. Vui lòng thử lại bằng thẻ khác hoặc phương thức khác.","failure_code.channel_unavailable":"Không thể thực hiện thanh toán. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.declined_by_issuer":"Thanh toán của bạn bị từ chối. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.declined_by_processor":"Thanh toán của bạn bị từ chối. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.expired_card":"Thẻ của bạn bị từ chối do đã hết hạn. Vui lòng thử lại hoặc sử dụng phương thức thanh toán khác.","failure_code.expired_otp":"Không thể thực hiện thanh toán vì mã xác minh không hợp lệ. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.failure_details_unavailable":"Không thể thực hiện thanh toán. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.inactive_or_unauthorized_card":"Không thể xử lý thanh toán của bạn. Vui lòng thử lại hoặc sử dụng phương thức thanh toán khác.","failure_code.insufficient_balance":"Không thể thực hiện thanh toán vì số dư tài khoản không đủ. Vui lòng nạp thêm tiền và thử lại.","failure_code.invalid_account_details":"Thông tin thanh toán không chính xác. Vui lòng kiểm tra lại hoặc dùng phương thức khác.","failure_code.invalid_cvv":"Mã CVN nhập không đúng. Vui lòng thử lại.","failure_code.invalid_merchant_settings":"Không thể thực hiện thanh toán. Vui lòng liên hệ người bán hoặc dùng phương thức khác.","failure_code.invalid_otp":"Không thể thực hiện thanh toán vì mã xác minh không hợp lệ. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.invalid_token":"Không thể thực hiện thanh toán vì mã xác minh không hợp lệ. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.issuer_unavailable":"Không thể thực hiện thanh toán. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.otp_attempt_counts_exceeded":"Không thể thực hiện thanh toán vì đã nhập sai OTP quá nhiều lần. Vui lòng thanh toán lại hoặc dùng phương thức khác.","failure_code.partner_timeout_error":"Không thể thực hiện thanh toán. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.payment_amount_limits_exceeded":"Không thể thực hiện thanh toán vì bạn đã vượt quá hạn mức giao dịch. Vui lòng dùng phương thức khác.","failure_code.payment_attempt_counts_exceeded":"Không thể thực hiện thanh toán do quá nhiều lần thử thất bại.","failure_code.payment_request_expired":"Không thể thực hiện thanh toán vì liên kết đã hết hạn. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.processor_error":"Không thể xử lý thanh toán của bạn. Vui lòng thử lại hoặc sử dụng phương thức thanh toán khác.","failure_code.server_error":"Không thể thực hiện thanh toán. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.stolen_card":"Không thể xử lý thanh toán của bạn. Vui lòng thử lại hoặc sử dụng phương thức thanh toán khác.","failure_code.suspected_fraudulent":"Không thể xử lý thanh toán của bạn. Vui lòng thử lại hoặc sử dụng phương thức thanh toán khác.","failure_code.timeout_error":"Không thể thực hiện thanh toán. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.user_declined_payment":"Thanh toán của bạn bị từ chối. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.user_device_unreachable":"Không thể thực hiện thanh toán do sự cố mạng. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.user_did_not_authorize":"Không thể thực hiện thanh toán vì không được xác nhận kịp thời. Vui lòng thử lại.",failure_code_unknown:"Có lỗi xảy ra với mã {{failureCode}}","payment_request_status.canceled.subtext":"Vui lòng thử thanh toán lại hoặc liên hệ người bán nếu vấn đề vẫn tiếp diễn.","payment_request_status.canceled.title":"Trang này không còn khả dụng","payment_request_status.expired.subtext":"Thanh toán của bạn không thể xử lý. Vui lòng thử lại hoặc chọn phương thức khác.","payment_request_status.expired.title":"Thanh toán không thành công","payment_request_status.failed.subtext":"Không thể thực hiện thanh toán. Vui lòng thử phương thức khác hoặc gửi yêu cầu đến người bán bằng cách chia sẻ Mã định danh duy nhất.","payment_request_status.failed.title":"Thanh toán thất bại","payment_token_status.canceled.subtext":"Vui lòng thử lại hoặc dùng phương thức khác.","payment_token_status.canceled.title":"Không thể thêm phương thức thanh toán","payment_token_status.expired.subtext":"Vui lòng thử lại hoặc dùng phương thức khác.","payment_token_status.expired.title":"Không thể thêm phương thức thanh toán","payment_token_status.failed.subtext":"Không thể thực hiện thanh toán. Vui lòng thử phương thức khác hoặc gửi yêu cầu đến người bán bằng cách chia sẻ Mã định danh duy nhất.","payment_token_status.failed.title":"Không thể thêm phương thức thanh toán","action.payment_confirmation_instructions":"Sau khi bạn đã thanh toán, hãy nhấp nút phía trên để nhận xác nhận thanh toán.","action.payment_made":"Tôi đã thực hiện thanh toán này","action_va.amount_to_pay":"Số tiền cần thanh toán","action_va.virtual_account_number":"Số tài khoản định danh (Virtual Account)","action_qr.unable_to_generate":"Không thể tạo mã QR"}}.session};const da=(e,n,t)=>n?(e=>"object"==typeof e&&null!==e&&"localeKey"in e)(n)?e(n.localeKey,{field:t.label}):n.value:null;function sa(e){return e.startsWith("/")&&e.endsWith("/")?e.slice(1,-1):e}function la(e,n){if(0===n.length)return e.required?{localeKey:"validation.required"}:void 0;switch(e.type.name){case"credit_card_number":case"credit_card_expiry":case"credit_card_cvn":return function(e){const n=at(e);if(!n.valid){if(n.validationError)return{localeKey:n.validationError};throw new Error("Unexpected value in encrypted field, this is a bug, please contact support.")}}(n);case"phone_number":return(e=>{const n=Pi(e);if(!n||!n.isValid())return{localeKey:"validation.generic_invalid"}})(n);case"email":return(e=>{if(!/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[A-Za-z]{2,}$/.test(e))return{localeKey:"validation.generic_invalid"}})(n);case"postal_code":return(e=>{if(!/^(?![-\s]+)[A-Za-z0-9\s-]+$/.test(e))return{localeKey:"validation.generic_invalid"}})(n);case"text":return((e,n)=>{if(Array.isArray(e.type.regex_validators))for(const t of e.type.regex_validators)if(!new RegExp(sa(t.regex)).test(n))return{value:t.message};return void 0!==e.type.min_length&&n.length<e.type.min_length?{localeKey:"validation.text_too_short"}:n.length>e.type.max_length?{localeKey:"validation.text_too_long"}:void 0})(e,n);case"country":case"province":case"installment_plan":case"dropdown":return;default:throw e.type,new Error(`Unsupported input type: ${e.type.name}; this is a bug, please contact support.`)}}function ca(e,n){const t=Array.isArray(e.channel_property)?e.channel_property:[e.channel_property];for(const r of t){let t=ua(n,r);if(void 0===t&&(t=""),"string"!=typeof t)continue;const i=la(e,t);if(i)return i}}function ua(e,n){const t=n.split("."),r=e[t[0]];if(void 0!==r){if("object"!=typeof r||Array.isArray(r)){if(1!==t.length)throw new Error(`Attempted to read channel property "${n}" expecting an object but found a primitive value; this is a bug, please contact support.`);return r}return ua(r,t.slice(1).join("."))}}const ha="field-radius-bl-0",pa="field-radius-br-0",ma="field-radius-tl-0",fa="field-radius-tr-0",_a="field-collapse-r",ba="field-collapse-l",$a="field-collapse-t",ya="field-collapse-b",ga=({fieldGroup:e,groupIndex:n,handleFieldChanged:t,channelProperties:r})=>{const{t:i}=Mn(),a=Ce(null),[o,d]=xe({}),s=e.map(e=>e.span),l=Math.ceil(e.reduce((e,n)=>e+n.span,0)/2);we(()=>{const e=a.current;if(e)return e.addEventListener(InternalSetFieldTouchedEvent.type,n),()=>{e.removeEventListener(InternalSetFieldTouchedEvent.type,n)};function n(e){const n=e.target.name;d(e=>({...e,[n]:!0}))}},[]);const c=(()=>{for(const n of e){if(!o[Xn(n)])continue;const e=ca(n,r??{});if(e)return cn("span",{className:"xendit-error-message xendit-text-12",children:da(i,e,n)})}return null})();return cn("div",{className:"xendit-channel-form-field-group",children:[cn("label",{htmlFor:Zn(e[0]),className:"xendit-text-14",children:e[0].group_label??e[0].label??""}),cn("div",{ref:a,className:"xendit-form-field-group "+(c?"invalid":""),children:e.map((e,n)=>{const r=(e=>{const n=s.slice(0,e).reduce((e,n)=>e+n,0),t=0===e?0:Math.floor(n/2);return{fieldPositionBySpan:n,fieldRow:t,fieldColumn:n%2,isLastRow:t===l-1}})(n),i=((e,n,t)=>{const{fieldPositionBySpan:r,fieldRow:i,fieldColumn:a,isLastRow:o}=t;return vn({[ha]:l>i+1||r%2==1,[pa]:!!s[n+1],[ma]:n>0,[fa]:!(0===i&&1===a||0===i&&0===a&&2===e.span),[_a]:1===e.span&&0===a,[ba]:1===e.span&&1===a,[$a]:r>=2,[ya]:!o})})(e,n,r);return cn(aa,{className:i,field:e,onChange:t},n)})},n),c]})},va=function(e){function n(n){var t=Oe({},n);return delete t.ref,e(t,n.ref||null)}return n.$$typeof=Be,n.render=e,n.prototype.isReactComponent=n.__f=!0,n.displayName="ForwardRef("+(e.displayName||e.name)+")",n}(({form:e,onChannelPropertiesChanged:n},t)=>{const r=Tn(),i=Fa(),a=Ce(null),[o,d]=xe(null);!function(e,n,t){he=6,we(function(){if("function"==typeof e){var t=e(n());return function(){e(null),t&&"function"==typeof t&&t()}}if(e)return e.current=n(),function(){return e.current=null}},null==t?t:t.concat(e))}(t,()=>({setAllFieldsTouched(){const e=a.current;e&&Array.from(e.elements).filter(e=>e instanceof HTMLInputElement).forEach(e=>{e.name&&e.dispatchEvent(new InternalSetFieldTouchedEvent)})}}));const s=ke(()=>{if(!a.current)return{};return function(e){const n={};for(const[t,r]of e){if(r instanceof Blob)continue;const e=t.split("__"),i=Ca(e,r);e:for(const t of e){const e=t.split(".");let r=n;for(;e.length>1;){const n=e.shift();let t=r[n];if(void 0===t&&(t=r[n]={}),t&&"object"==typeof t){if(Array.isArray(t))continue e;r=t}}const a=i.length?i.shift():"";r[e[0]]=a}}return n}(new FormData(a.current).entries())},[]),l=ke(()=>{if(!a.current)return;const e=s();d(e),n(e)},[s,n]),c=function(e,n,t,r){const i=Ee(()=>Ea(e.session_type,n,t,r),[r,t,n,e.session_type]);return i}(r,e,o||{},i??null),u=Yn(c);!function(e,n){var t=ve(se++,3);!me.__s&&Re(t.__H,n)&&(t.__=e,t.u=n,le.__H.__h.push(t))}(()=>{(function(e,n){if(e.length!==n.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!==n[t])return!1;return!0})(u||[],c)||l()},[c,l,u]);const h=function(e){const n=[[]];for(const t of e)1!==t.span||1!==n[n.length-1].length||1!==n[n.length-1][0].span?t.join?n[n.length-1].push(t):n.push([t]):n[n.length-1].push(t);return n}(c).filter(e=>e.length);return 0===h.length?null:cn("div",{class:"xendit-channel-form",children:cn("form",{ref:a,children:cn(xa.Provider,{value:o,children:h.map((e,n)=>cn(ga,{fieldGroup:e,groupIndex:n,handleFieldChanged:l,channelProperties:o},n))})})})}),xa=H(null),wa=()=>Pe(xa);function Ca(e,n){if(0===e.length)return[];if(1===e.length)return[n];if(""===n)return[];try{return JSON.parse(n)}catch(e){return[n]}}function Ea(e,n,t,r){const i=ht(n,"credit_card_number"),a=r?.cardDetails?.details?.require_billing_information,o=!!r?.paymentOptions?.options?.installment_plans?.length;return n.filter(n=>{if(n.flags?.require_billing_information){if("PAY"!==e)return!1;if(!a)return!1}if("installment_plan"===n.type.name&&!o&&i)return!1;for(const e of n.display_if||[]){const[n,r,i]=e,a=ua(t,n);switch(r){case"equals":if(a!==i)return!1;break;case"not_equals":if(a===i)return!1}}return!0})}const ka=e=>{const n=Ce(null),t=Ce(null),r=void 0!==HTMLElement.prototype.animate;return we(()=>{r&&(n.current?.animate(Pa,Na),t.current?.animate(Sa,Aa))},[r]),cn("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[cn("g",{opacity:"0.5",children:[cn("path",{d:"M8.79453 10.2303C7.1791 10.2303 5.86953 11.5399 5.86953 13.1553V28.9503C5.86953 31.535 7.96484 33.6303 10.5495 33.6303H26.3445C27.96 33.6303 29.2695 32.3208 29.2695 30.7053",fill:"#F1F1F1"}),cn("path",{d:"M8.79453 10.2303V10.2303C7.1791 10.2303 5.86953 11.5399 5.86953 13.1553V28.9503C5.86953 31.535 7.96484 33.6303 10.5495 33.6303H26.3445C27.96 33.6303 29.2695 32.3208 29.2695 30.7053V30.7053",stroke:"#D0D0D0",strokeWidth:"1.755",strokeLinecap:"round",strokeLinejoin:"round"})]}),cn("g",{ref:t,style:{transformOrigin:"20px 20px"},children:[cn("path",{d:"M28.8177 6.00256H14.7777C12.193 6.00256 10.0977 8.09787 10.0977 10.6826V24.7226C10.0977 27.3073 12.193 29.4026 14.7777 29.4026H28.8177C31.4023 29.4026 33.4977 27.3073 33.4977 24.7226V10.6826C33.4977 8.09787 31.4024 6.00256 28.8177 6.00256Z",fill:"white",stroke:"#EDEDED",strokeWidth:"1.755",strokeLinecap:"round",strokeLinejoin:"round"}),cn("g",{style:{transformOrigin:"10px 30px"},ref:n,children:[cn("path",{d:"M26.7697 20.5301V12.7301H18.9697",stroke:"#7C7C7C",strokeWidth:"1.872",strokeLinecap:"round",strokeLinejoin:"round"}),cn("path",{d:"M17.4102 22.0901L26.7702 12.7301",stroke:"#7C7C7C",strokeWidth:"1.872",strokeLinecap:"round",strokeLinejoin:"round"})]})]})]})},Pa=[{transform:"scale(0.1)"},{transform:"scale(1)"}],Na={duration:500,easing:"ease-out"},Sa=[{transform:"rotate(0deg)"},{transform:"rotate(5deg)"},{transform:"rotate(-5deg)"},{transform:"rotate(0deg)"}],Aa={duration:1e3,easing:"ease-out",iterations:1/0,delay:2e3},Ta=e=>{const n=Ce(null),t=Ce(null),r=et(),i=void 0!==HTMLElement.prototype.animate;return we(()=>{if(i&&n.current){const e=()=>{if(!n.current)return;const r=n.current.animate(Ia,Ra);setTimeout(()=>{t.current?.animate(Oa,Da)},1e3),r.onfinish=()=>{const r=n.current?.animate(Ia,Ma);setTimeout(()=>{t.current?.animate(Oa,Da)},500),r&&(r.onfinish=e)}};e()}},[i]),cn("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"var(--xendit-color-icon-primary)",xmlns:"http://www.w3.org/2000/svg",...e,children:[cn("g",{"clip-path":`url(#${r})`,children:[cn("rect",{x:"8",y:"8",width:"24",height:"24",fill:"var(--xendit-color-icon-secondary)",ref:t}),cn("path",{d:"M11.5 13.1528C11.5 12.24 12.24 11.5 13.1528 11.5H17.4028C18.3156 11.5 19.0556 12.24 19.0556 13.1528V17.4028C19.0556 18.3156 18.3156 19.0556 17.4028 19.0556H13.1528C12.24 19.0556 11.5 18.3156 11.5 17.4028V13.1528Z"}),cn("path",{d:"M20.9444 13.1528C20.9444 12.24 21.6844 11.5 22.5972 11.5H26.8472C27.76 11.5 28.5 12.24 28.5 13.1528V17.4028C28.5 18.3156 27.76 19.0556 26.8472 19.0556H22.5972C21.6844 19.0556 20.9444 18.3156 20.9444 17.4028V13.1528Z"}),cn("path",{d:"M11.5 22.5972C11.5 21.6844 12.24 20.9444 13.1528 20.9444H17.4028C18.3156 20.9444 19.0556 21.6844 19.0556 22.5972V26.8472C19.0556 27.76 18.3156 28.5 17.4028 28.5H13.1528C12.24 28.5 11.5 27.76 11.5 26.8472V22.5972Z"}),cn("path",{d:"M20.9444 22.5972C20.9444 21.6844 21.6844 20.9444 22.5972 20.9444H26.8472C27.76 20.9444 28.5 21.6844 28.5 22.5972V26.8472C28.5 27.76 27.76 28.5 26.8472 28.5H22.5972C21.6844 28.5 20.9444 27.76 20.9444 26.8472V22.5972Z"}),cn("path",{d:"M7.875 23C8.35825 23 8.75 23.3918 8.75 23.875V30.2754C8.75021 30.6755 9.07451 30.9998 9.47461 31H15.875C16.3582 31 16.75 31.3918 16.75 31.875C16.75 32.3582 16.3582 32.75 15.875 32.75H9.47461C8.10801 32.7498 7.00021 31.642 7 30.2754V23.875C7 23.3918 7.39175 23 7.875 23Z"}),cn("path",{d:"M31.875 23C32.3582 23 32.75 23.3918 32.75 23.875V30.2754C32.7498 31.642 31.642 32.7498 30.2754 32.75H23.875C23.3918 32.75 23 32.3582 23 31.875C23 31.3918 23.3918 31 23.875 31H30.2754C30.6755 30.9998 30.9998 30.6755 31 30.2754V23.875C31 23.3918 31.3918 23 31.875 23Z"}),cn("path",{d:"M15.875 7C16.3582 7 16.75 7.39175 16.75 7.875C16.75 8.35825 16.3582 8.75 15.875 8.75H9.47461C9.07451 8.75021 8.75021 9.07451 8.75 9.47461V15.875C8.75 16.3582 8.35825 16.75 7.875 16.75C7.39175 16.75 7 16.3582 7 15.875V9.47461C7.00021 8.10801 8.10801 7.00021 9.47461 7H15.875Z"}),cn("path",{d:"M30.2754 7C31.642 7.00021 32.7498 8.10801 32.75 9.47461V15.875C32.75 16.3582 32.3582 16.75 31.875 16.75C31.3918 16.75 31 16.3582 31 15.875V9.47461C30.9998 9.07451 30.6755 8.75021 30.2754 8.75H23.875C23.3918 8.75 23 8.35825 23 7.875C23 7.39175 23.3918 7 23.875 7H30.2754Z"}),cn("rect",{x:"3",y:"-4",width:"34",height:"4",rx:"1.75",ref:n})]}),cn("defs",{children:cn("clipPath",{id:r,children:cn("rect",{width:"40",height:"40",fill:"white"})})})]})},Ia=[{transform:"translateY(0)"},{transform:"translateY(44px)"}],Ra={duration:1e3,delay:1e3,easing:"ease-out"},Ma={duration:1e3,direction:"reverse",delay:500,easing:"ease-in"},Oa=[{opacity:1},{opacity:0},{opacity:1}],Da={duration:1e3},La=e=>{const{id:n,label:t,checked:r,onChange:i,disabled:a}=e,o=et(),d=n||o;return cn("div",{className:"xendit-checkbox",children:[cn("div",{className:"xendit-checkbox-box",children:[cn("input",{id:d,type:"checkbox",onChange:e=>{i?.(e)},checked:r,disabled:a}),cn("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",className:"xendit-checkbox-graphic",children:cn("polyline",{points:"40 144 96 200 224 72",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"16"})})]}),cn("label",{htmlFor:d,className:"xendit-text-14",children:t})]})},Ua=H(null),Ba=()=>{const e=Pe(Ua);if(void 0===e)throw new Error("useChannel must be used within a ChannelProvider");return e},qa=H(null);qa.displayName="ChannelComponentDataContext";const Fa=()=>Pe(qa),Ka=e=>{const{channelOrPair:n,channelData:t,savePaymentMethod:r,formRef:i}=e,a=Ce(null),o=Mn(),{t:d}=o,s=Tn(),l=n[0],c=n.length>1,u=st(n,r),h=function(e){if(e&&2===e.length)return[e[0],e[1]];return null}(u.instructions),p="OPTIONAL"===s.allow_save_payment_method&&(u.allow_save||c);return cn(Ua.Provider,{value:u,children:cn(qa.Provider,{value:t,children:cn("div",{className:"xendit-payment-channel",ref:a,children:[cn(va,{ref:i,form:u.form,onChannelPropertiesChanged:e=>{let n=e;if("CARDS"===l.channel_code&&e.installment_configuration){const t=Object.fromEntries(Object.entries(e.installment_configuration).filter(([e,n])=>""!==n));n=0===Object.keys(t).length?{...e,installment_configuration:void 0}:{...e,installment_configuration:t}}const t=new XenditChannelPropertiesChangedEvent(l.channel_code,n);a.current?.dispatchEvent(t)}}),u.banner?cn(Ga,{banner:u.banner}):null,p&&cn(La,{label:d("payment.save_checkbox_label"),onChange:e=>{const n=e.target?.checked;o?.dispatchEvent(new InternalUpdateChannelComponentData(l.channel_code,{savePaymentMethod:n}))},checked:r}),h?cn("div",{className:"xendit-payment-channel-instructions",children:["QR_CODE"===u.pm_type?cn(Ta,{}):cn(ka,{}),cn("div",{className:"xendit-payment-channel-instructions-text xendit-text-12",children:h.map((e,n)=>cn("p",{className:0===n?"xendit-text-semibold":void 0,children:e},n))})]}):null]})})})},Ga=e=>{const n="number"==typeof e.banner.aspect_ratio?String(e.banner.aspect_ratio):void 0;return e.banner?.link_url?cn("a",{href:e.banner.link_url,target:"_blank",rel:"noopener noreferrer",children:cn("img",{src:e.banner.image_url,alt:e.banner.alt_text,className:"xendit-payment-channel-banner",style:{aspectRatio:n}})}):cn("img",{src:e.banner.image_url,alt:e.banner.alt_text,className:"xendit-payment-channel-banner",style:{aspectRatio:n}})};class XenditChannelPropertiesChangedEvent extends Event{static type="xendit-channel-properties-changed";channel;channelProperties;constructor(e,n){super(XenditChannelPropertiesChangedEvent.type,{bubbles:!0,composed:!0}),this.channel=e,this.channelProperties=n}}class NetworkError extends Error{errorResponse;constructor(e){super(e.message),this.errorResponse=e}}function Va(e){const n=new URLSearchParams;return n.append("payload",JSON.stringify(e)),n}function Ha(e,n,t){return async function(...r){let i,a,o,d,s;switch(e){case"GET":[i,a,o,s]=r;break;case"POST":[i,d,a,o,s]=r;break;default:throw new Error(`Unable to call endpoint with method ${e}; this is a bug, please contact support.`)}const l="v0.0.15";Un(l),Un(l.startsWith("v"));const c=i.hostId;if(c===Vn)throw new Error("A network request was made in mock mode; this is a bug.");const u=Wn(c);if(!u)throw new Error(`Unknown hostId ${c} in sdkKey; this is a bug, please contact support.`);const h=new URL(n(a),u);if(t&&!o)throw new Error("Query string argument is missing; this is a bug, please contact support.");const p=t?.(o)??new URLSearchParams;p.set("components_version",l),h.search=p.toString();const m={method:e,body:d?Va(d):void 0,headers:{"Content-Type":"application/x-www-form-urlencoded"},signal:s},f=await fetch(h,m);if(!f.ok){const e=await f.json();if(!e||!e.error_code)throw new Error("Unexpected error response from server");throw new NetworkError(e)}return f.json()}}const Wa=Ha("GET",e=>`/api/sessions/${e}`),ja=Ha("POST",()=>"/api/sessions/payment_tokens"),Ya=Ha("POST",()=>"/api/sessions/payment_requests"),Xa=Ha("POST",e=>`/api/sessions/${e.sessionAuthKey}/payment_requests/${e.paymentRequestId}/simulate`),za=Ha("GET",e=>`/api/sessions/${e}/poll`,e=>new URLSearchParams(e?{token_request_id:e}:{})),Za=Ha("POST",e=>`/api/sessions/${e}/card_info`),Ja=Ha("POST",e=>`/api/sessions/${e}/payment_options`);function Qa(e,n,t){return{impl:e,key:n??"",child:t,instance:void 0}}class BehaviorTree{fn;bb;root=Qa(class{});updating=!1;again=!1;constructor(e,n){this.fn=e,this.bb=n}update(){if(this.again=!0,this.updating)return;let e=0;try{for(this.updating=!0;this.again;){this.again=!1,e+=1,eo(e);const n=this.root??void 0,t=this.fn(this.bb);this.root=t,no(n,t,this.bb,0)}}finally{this.updating=!1}}findBehavior(e){let n=this.root;for(;n;){if(n.impl===e)return n.instance?n.instance:null;n=n.child}return null}}function eo(e){if(e>32)throw new Error("Max recursion depth exceeded; this is a bug, please contact support.")}function no(e,n,t,r){eo(r);void 0===e||void 0===n||e.impl!==n.impl||e.key!==n.key?(e&&ro(e,r+1),n&&to(n,t,r+1)):(n&&(n.instance=e?.instance),e&&(e.instance=void 0),no(e?.child,n?.child,t,r+1),n?.instance?.update?.())}function to(e,n,t){eo(t),e.instance=new e.impl(n,e.key),e.instance.enter?.(),e.child&&to(e.child,n,t+1)}function ro(e,n){eo(n),e.child&&ro(e.child,n+1),e.instance?.exit?.(),e.instance=void 0}function io(e){const{url:n,mock:t,onIframeComplete:r}=e,i=Ce(null),a=ke(e=>{if(!i.current)return;const n=i.current.contentWindow;e.source===n&&"xendit-iframe-action-complete"===e.data?.type&&r(e.data)},[r]);return we(()=>(window.addEventListener("message",a),()=>{window.removeEventListener("message",a)}),[a]),cn("iframe",t?{ref:i,srcDoc:ao,className:"xendit-action-iframe"}:{ref:i,src:n,className:"xendit-action-iframe"})}const ao="\n <html>\n <head>\n <title>Xendit Mock Action Iframe</title>\n <style>\n body {\n font-family: Arial, sans-serif;\n font-size: 14px;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 12px;\n }\n p {\n margin: 0;\n }\n .buttons {\n display: flex;\n gap: 8px;\n }\n button {\n font-size: 12px;\n display: flex;\n align-items: center;\n text-align: left;\n background-color: white;\n border: 1px solid rgba(243, 243, 243);\n border-radius: 4px;\n justify-content: space-between;\n padding: 4px;\n cursor: pointer;\n }\n button:hover {\n border-color: #1762ee;\n background-color: #1762ee;\n color: white;\n }\n </style>\n </head>\n <body>\n <p>This is a mock action page.</p>\n <p>Normally, this would be a 3DS authentication page.</p>\n <p>Click a button below to simulate the result of the action.</p>\n <div class=\"buttons\">\n <button onclick=\"parent.postMessage({type: 'xendit-iframe-action-complete', mockStatus: 'success'}, '*')\">\n Simulate Success\n </button>\n <button onclick=\"parent.postMessage({type: 'xendit-iframe-action-complete', mockStatus: 'fail'}, '*')\">\n Simulate Failure\n </button>\n </div>\n </body>\n </html>\n";var oo,so,lo={};function co(){return so?oo:(so=1,oo=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then})}var uo,ho={},po={};function mo(){if(uo)return po;let e;uo=1;const n=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return po.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},po.getSymbolTotalCodewords=function(e){return n[e]},po.getBCHDigit=function(e){let n=0;for(;0!==e;)n++,e>>>=1;return n},po.setToSJISFunction=function(n){if("function"!=typeof n)throw new Error('"toSJISFunc" is not a valid function.');e=n},po.isKanjiModeEnabled=function(){return void 0!==e},po.toSJIS=function(n){return e(n)},po}var fo,_o,bo,$o,yo,go={};function vo(){return fo||(fo=1,(e=go).L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},e.from=function(n,t){if(e.isValid(n))return n;try{return function(n){if("string"!=typeof n)throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+n)}}(n)}catch(e){return t}}),go;var e}var xo,wo={};var Co,Eo={};var ko,Po={};var No,So={};function Ao(){if(No)return So;No=1;const e=vo(),n=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],t=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return So.getBlocksCount=function(t,r){switch(r){case e.L:return n[4*(t-1)+0];case e.M:return n[4*(t-1)+1];case e.Q:return n[4*(t-1)+2];case e.H:return n[4*(t-1)+3];default:return}},So.getTotalCodewordsCount=function(n,r){switch(r){case e.L:return t[4*(n-1)+0];case e.M:return t[4*(n-1)+1];case e.Q:return t[4*(n-1)+2];case e.H:return t[4*(n-1)+3];default:return}},So}var To,Io,Ro,Mo,Oo={},Do={};function Lo(){return Io||(Io=1,function(e){const n=function(){if(To)return Do;To=1;const e=new Uint8Array(512),n=new Uint8Array(256);return function(){let t=1;for(let r=0;r<255;r++)e[r]=t,n[t]=r,t<<=1,256&t&&(t^=285);for(let n=255;n<512;n++)e[n]=e[n-255]}(),Do.log=function(e){if(e<1)throw new Error("log("+e+")");return n[e]},Do.exp=function(n){return e[n]},Do.mul=function(t,r){return 0===t||0===r?0:e[n[t]+n[r]]},Do}();e.mul=function(e,t){const r=new Uint8Array(e.length+t.length-1);for(let i=0;i<e.length;i++)for(let a=0;a<t.length;a++)r[i+a]^=n.mul(e[i],t[a]);return r},e.mod=function(e,t){let r=new Uint8Array(e);for(;r.length-t.length>=0;){const e=r[0];for(let i=0;i<t.length;i++)r[i]^=n.mul(t[i],e);let i=0;for(;i<r.length&&0===r[i];)i++;r=r.slice(i)}return r},e.generateECPolynomial=function(t){let r=new Uint8Array([1]);for(let i=0;i<t;i++)r=e.mul(r,new Uint8Array([1,n.exp(i)]));return r}}(Oo)),Oo}var Uo,Bo={},qo={},Fo={};function Ko(){return Uo||(Uo=1,Fo.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),Fo}var Go,Vo,Ho,Wo={};function jo(){if(Go)return Wo;Go=1;const e="[0-9]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const t="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+")(?:.|[\r\n]))+";Wo.KANJI=new RegExp(n,"g"),Wo.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Wo.BYTE=new RegExp(t,"g"),Wo.NUMERIC=new RegExp(e,"g"),Wo.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const r=new RegExp("^"+n+"$"),i=new RegExp("^"+e+"$"),a=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return Wo.testKanji=function(e){return r.test(e)},Wo.testNumeric=function(e){return i.test(e)},Wo.testAlphanumeric=function(e){return a.test(e)},Wo}function Yo(){return Vo||(Vo=1,function(e){const n=Ko(),t=jo();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(e,t){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!n.isValid(t))throw new Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},e.getBestModeForData=function(n){return t.testNumeric(n)?e.NUMERIC:t.testAlphanumeric(n)?e.ALPHANUMERIC:t.testKanji(n)?e.KANJI:e.BYTE},e.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},e.isValid=function(e){return e&&e.bit&&e.ccBits},e.from=function(n,t){if(e.isValid(n))return n;try{return function(n){if("string"!=typeof n)throw new Error("Param is not a string");switch(n.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+n)}}(n)}catch(e){return t}}}(qo)),qo}function Xo(){return Ho||(Ho=1,function(e){const n=mo(),t=Ao(),r=vo(),i=Yo(),a=Ko(),o=n.getBCHDigit(7973);function d(e,n){return i.getCharCountIndicator(e,n)+4}function s(e,n){let t=0;return e.forEach(function(e){const r=d(e.mode,n);t+=r+e.getBitsLength()}),t}e.from=function(e,n){return a.isValid(e)?parseInt(e,10):n},e.getCapacity=function(e,r,o){if(!a.isValid(e))throw new Error("Invalid QR Code version");void 0===o&&(o=i.BYTE);const s=8*(n.getSymbolTotalCodewords(e)-t.getTotalCodewordsCount(e,r));if(o===i.MIXED)return s;const l=s-d(o,e);switch(o){case i.NUMERIC:return Math.floor(l/10*3);case i.ALPHANUMERIC:return Math.floor(l/11*2);case i.KANJI:return Math.floor(l/13);case i.BYTE:default:return Math.floor(l/8)}},e.getBestVersionForData=function(n,t){let a;const o=r.from(t,r.M);if(Array.isArray(n)){if(n.length>1)return function(n,t){for(let r=1;r<=40;r++)if(s(n,r)<=e.getCapacity(r,t,i.MIXED))return r}(n,o);if(0===n.length)return 1;a=n[0]}else a=n;return function(n,t,r){for(let i=1;i<=40;i++)if(t<=e.getCapacity(i,r,n))return i}(a.mode,a.getLength(),o)},e.getEncodedBits=function(e){if(!a.isValid(e)||e<7)throw new Error("Invalid QR Code version");let t=e<<12;for(;n.getBCHDigit(t)-o>=0;)t^=7973<<n.getBCHDigit(t)-o;return e<<12|t}}(Bo)),Bo}var zo,Zo={};var Jo,Qo,ed,nd,td,rd,id,ad,od={};var dd,sd,ld,cd={exports:{}};function ud(){return dd||(dd=1,function(e){var n={single_source_shortest_paths:function(e,t,r){var i={},a={};a[t]=0;var o,d,s,l,c,u,h,p=n.PriorityQueue.make();for(p.push(t,0);!p.empty();)for(s in d=(o=p.pop()).value,l=o.cost,c=e[d]||{})c.hasOwnProperty(s)&&(u=l+c[s],h=a[s],(void 0===a[s]||h>u)&&(a[s]=u,p.push(s,u),i[s]=d));if(void 0!==r&&void 0===a[r]){var m=["Could not find a path from ",t," to ",r,"."].join("");throw new Error(m)}return i},extract_shortest_path_from_predecessor_list:function(e,n){for(var t=[],r=n;r;)t.push(r),e[r],r=e[r];return t.reverse(),t},find_path:function(e,t,r){var i=n.single_source_shortest_paths(e,t,r);return n.extract_shortest_path_from_predecessor_list(i,r)},PriorityQueue:{make:function(e){var t,r=n.PriorityQueue,i={};for(t in e=e||{},r)r.hasOwnProperty(t)&&(i[t]=r[t]);return i.queue=[],i.sorter=e.sorter||r.default_sorter,i},default_sorter:function(e,n){return e.cost-n.cost},push:function(e,n){var t={value:e,cost:n};this.queue.push(t),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=n}(cd)),cd.exports}function hd(){return sd||(sd=1,function(e){const n=Yo(),t=function(){if(Qo)return Jo;Qo=1;const e=Yo();function n(n){this.mode=e.NUMERIC,this.data=n.toString()}return n.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){let n,t,r;for(n=0;n+3<=this.data.length;n+=3)t=this.data.substr(n,3),r=parseInt(t,10),e.put(r,10);const i=this.data.length-n;i>0&&(t=this.data.substr(n),r=parseInt(t,10),e.put(r,3*i+1))},Jo=n}(),r=function(){if(nd)return ed;nd=1;const e=Yo(),n=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function t(n){this.mode=e.ALPHANUMERIC,this.data=n}return t.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let r=45*n.indexOf(this.data[t]);r+=n.indexOf(this.data[t+1]),e.put(r,11)}this.data.length%2&&e.put(n.indexOf(this.data[t]),6)},ed=t}(),i=function(){if(rd)return td;rd=1;const e=Yo();function n(n){this.mode=e.BYTE,this.data="string"==typeof n?(new TextEncoder).encode(n):new Uint8Array(n)}return n.getBitsLength=function(e){return 8*e},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){for(let n=0,t=this.data.length;n<t;n++)e.put(this.data[n],8)},td=n}(),a=function(){if(ad)return id;ad=1;const e=Yo(),n=mo();function t(n){this.mode=e.KANJI,this.data=n}return t.getBitsLength=function(e){return 13*e},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let r=n.toSJIS(this.data[t]);if(r>=33088&&r<=40956)r-=33088;else{if(!(r>=57408&&r<=60351))throw new Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");r-=49472}r=192*(r>>>8&255)+(255&r),e.put(r,13)}},id=t}(),o=jo(),d=mo(),s=ud();function l(e){return unescape(encodeURIComponent(e)).length}function c(e,n,t){const r=[];let i;for(;null!==(i=e.exec(t));)r.push({data:i[0],index:i.index,mode:n,length:i[0].length});return r}function u(e){const t=c(o.NUMERIC,n.NUMERIC,e),r=c(o.ALPHANUMERIC,n.ALPHANUMERIC,e);let i,a;d.isKanjiModeEnabled()?(i=c(o.BYTE,n.BYTE,e),a=c(o.KANJI,n.KANJI,e)):(i=c(o.BYTE_KANJI,n.BYTE,e),a=[]);return t.concat(r,i,a).sort(function(e,n){return e.index-n.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function h(e,o){switch(o){case n.NUMERIC:return t.getBitsLength(e);case n.ALPHANUMERIC:return r.getBitsLength(e);case n.KANJI:return a.getBitsLength(e);case n.BYTE:return i.getBitsLength(e)}}function p(e,o){let s;const l=n.getBestModeForData(e);if(s=n.from(o,l),s!==n.BYTE&&s.bit<l.bit)throw new Error('"'+e+'" cannot be encoded with mode '+n.toString(s)+".\n Suggested mode is: "+n.toString(l));switch(s!==n.KANJI||d.isKanjiModeEnabled()||(s=n.BYTE),s){case n.NUMERIC:return new t(e);case n.ALPHANUMERIC:return new r(e);case n.KANJI:return new a(e);case n.BYTE:return new i(e)}}e.fromArray=function(e){return e.reduce(function(e,n){return"string"==typeof n?e.push(p(n,null)):n.data&&e.push(p(n.data,n.mode)),e},[])},e.fromString=function(t,r){const i=function(e){const t=[];for(let r=0;r<e.length;r++){const i=e[r];switch(i.mode){case n.NUMERIC:t.push([i,{data:i.data,mode:n.ALPHANUMERIC,length:i.length},{data:i.data,mode:n.BYTE,length:i.length}]);break;case n.ALPHANUMERIC:t.push([i,{data:i.data,mode:n.BYTE,length:i.length}]);break;case n.KANJI:t.push([i,{data:i.data,mode:n.BYTE,length:l(i.data)}]);break;case n.BYTE:t.push([{data:i.data,mode:n.BYTE,length:l(i.data)}])}}return t}(u(t,d.isKanjiModeEnabled())),a=function(e,t){const r={},i={start:{}};let a=["start"];for(let o=0;o<e.length;o++){const d=e[o],s=[];for(let e=0;e<d.length;e++){const l=d[e],c=""+o+e;s.push(c),r[c]={node:l,lastCount:0},i[c]={};for(let e=0;e<a.length;e++){const o=a[e];r[o]&&r[o].node.mode===l.mode?(i[o][c]=h(r[o].lastCount+l.length,l.mode)-h(r[o].lastCount,l.mode),r[o].lastCount+=l.length):(r[o]&&(r[o].lastCount=l.length),i[o][c]=h(l.length,l.mode)+4+n.getCharCountIndicator(l.mode,t))}}a=s}for(let e=0;e<a.length;e++)i[a[e]].end=0;return{map:i,table:r}}(i,r),o=s.find_path(a.map,"start","end"),c=[];for(let e=1;e<o.length-1;e++)c.push(a.table[o[e]].node);return e.fromArray(function(e){return e.reduce(function(e,n){const t=e.length-1>=0?e[e.length-1]:null;return t&&t.mode===n.mode?(e[e.length-1].data+=n.data,e):(e.push(n),e)},[])}(c))},e.rawSplit=function(n){return e.fromArray(u(n,d.isKanjiModeEnabled()))}}(od)),od}function pd(){if(ld)return ho;ld=1;const e=mo(),n=vo(),t=function(){if(bo)return _o;function e(){this.buffer=[],this.length=0}return bo=1,e.prototype={get:function(e){const n=Math.floor(e/8);return 1==(this.buffer[n]>>>7-e%8&1)},put:function(e,n){for(let t=0;t<n;t++)this.putBit(1==(e>>>n-t-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),e&&(this.buffer[n]|=128>>>this.length%8),this.length++}},_o=e}(),r=function(){if(yo)return $o;function e(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}return yo=1,e.prototype.set=function(e,n,t,r){const i=e*this.size+n;this.data[i]=t,r&&(this.reservedBit[i]=!0)},e.prototype.get=function(e,n){return this.data[e*this.size+n]},e.prototype.xor=function(e,n,t){this.data[e*this.size+n]^=t},e.prototype.isReserved=function(e,n){return this.reservedBit[e*this.size+n]},$o=e}(),i=(xo||(xo=1,function(e){const n=mo().getSymbolSize;e.getRowColCoords=function(e){if(1===e)return[];const t=Math.floor(e/7)+2,r=n(e),i=145===r?26:2*Math.ceil((r-13)/(2*t-2)),a=[r-7];for(let e=1;e<t-1;e++)a[e]=a[e-1]-i;return a.push(6),a.reverse()},e.getPositions=function(n){const t=[],r=e.getRowColCoords(n),i=r.length;for(let e=0;e<i;e++)for(let n=0;n<i;n++)0===e&&0===n||0===e&&n===i-1||e===i-1&&0===n||t.push([r[e],r[n]]);return t}}(wo)),wo),a=function(){if(Co)return Eo;Co=1;const e=mo().getSymbolSize;return Eo.getPositions=function(n){const t=e(n);return[[0,0],[t-7,0],[0,t-7]]},Eo}(),o=(ko||(ko=1,function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const n=3,t=3,r=40,i=10;function a(n,t,r){switch(n){case e.Patterns.PATTERN000:return(t+r)%2==0;case e.Patterns.PATTERN001:return t%2==0;case e.Patterns.PATTERN010:return r%3==0;case e.Patterns.PATTERN011:return(t+r)%3==0;case e.Patterns.PATTERN100:return(Math.floor(t/2)+Math.floor(r/3))%2==0;case e.Patterns.PATTERN101:return t*r%2+t*r%3==0;case e.Patterns.PATTERN110:return(t*r%2+t*r%3)%2==0;case e.Patterns.PATTERN111:return(t*r%3+(t+r)%2)%2==0;default:throw new Error("bad maskPattern:"+n)}}e.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},e.from=function(n){return e.isValid(n)?parseInt(n,10):void 0},e.getPenaltyN1=function(e){const t=e.size;let r=0,i=0,a=0,o=null,d=null;for(let s=0;s<t;s++){i=a=0,o=d=null;for(let l=0;l<t;l++){let t=e.get(s,l);t===o?i++:(i>=5&&(r+=n+(i-5)),o=t,i=1),t=e.get(l,s),t===d?a++:(a>=5&&(r+=n+(a-5)),d=t,a=1)}i>=5&&(r+=n+(i-5)),a>=5&&(r+=n+(a-5))}return r},e.getPenaltyN2=function(e){const n=e.size;let r=0;for(let t=0;t<n-1;t++)for(let i=0;i<n-1;i++){const n=e.get(t,i)+e.get(t,i+1)+e.get(t+1,i)+e.get(t+1,i+1);4!==n&&0!==n||r++}return r*t},e.getPenaltyN3=function(e){const n=e.size;let t=0,i=0,a=0;for(let r=0;r<n;r++){i=a=0;for(let o=0;o<n;o++)i=i<<1&2047|e.get(r,o),o>=10&&(1488===i||93===i)&&t++,a=a<<1&2047|e.get(o,r),o>=10&&(1488===a||93===a)&&t++}return t*r},e.getPenaltyN4=function(e){let n=0;const t=e.data.length;for(let r=0;r<t;r++)n+=e.data[r];return Math.abs(Math.ceil(100*n/t/5)-10)*i},e.applyMask=function(e,n){const t=n.size;for(let r=0;r<t;r++)for(let i=0;i<t;i++)n.isReserved(i,r)||n.xor(i,r,a(e,i,r))},e.getBestMask=function(n,t){const r=Object.keys(e.Patterns).length;let i=0,a=1/0;for(let o=0;o<r;o++){t(o),e.applyMask(o,n);const r=e.getPenaltyN1(n)+e.getPenaltyN2(n)+e.getPenaltyN3(n)+e.getPenaltyN4(n);e.applyMask(o,n),r<a&&(a=r,i=o)}return i}}(Po)),Po),d=Ao(),s=function(){if(Mo)return Ro;Mo=1;const e=Lo();function n(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}return n.prototype.initialize=function(n){this.degree=n,this.genPoly=e.generateECPolynomial(this.degree)},n.prototype.encode=function(n){if(!this.genPoly)throw new Error("Encoder not initialized");const t=new Uint8Array(n.length+this.degree);t.set(n);const r=e.mod(t,this.genPoly),i=this.degree-r.length;if(i>0){const e=new Uint8Array(this.degree);return e.set(r,i),e}return r},Ro=n}(),l=Xo(),c=function(){if(zo)return Zo;zo=1;const e=mo(),n=e.getBCHDigit(1335);return Zo.getEncodedBits=function(t,r){const i=t.bit<<3|r;let a=i<<10;for(;e.getBCHDigit(a)-n>=0;)a^=1335<<e.getBCHDigit(a)-n;return 21522^(i<<10|a)},Zo}(),u=Yo(),h=hd();function p(e,n,t){const r=e.size,i=c.getEncodedBits(n,t);let a,o;for(a=0;a<15;a++)o=1==(i>>a&1),a<6?e.set(a,8,o,!0):a<8?e.set(a+1,8,o,!0):e.set(r-15+a,8,o,!0),a<8?e.set(8,r-a-1,o,!0):a<9?e.set(8,15-a-1+1,o,!0):e.set(8,15-a-1,o,!0);e.set(r-8,8,1,!0)}function m(n,r,i){const a=new t;i.forEach(function(e){a.put(e.mode.bit,4),a.put(e.getLength(),u.getCharCountIndicator(e.mode,n)),e.write(a)});const o=8*(e.getSymbolTotalCodewords(n)-d.getTotalCodewordsCount(n,r));for(a.getLengthInBits()+4<=o&&a.put(0,4);a.getLengthInBits()%8!=0;)a.putBit(0);const l=(o-a.getLengthInBits())/8;for(let e=0;e<l;e++)a.put(e%2?17:236,8);return function(n,t,r){const i=e.getSymbolTotalCodewords(t),a=d.getTotalCodewordsCount(t,r),o=i-a,l=d.getBlocksCount(t,r),c=i%l,u=l-c,h=Math.floor(i/l),p=Math.floor(o/l),m=p+1,f=h-p,_=new s(f);let b=0;const $=new Array(l),y=new Array(l);let g=0;const v=new Uint8Array(n.buffer);for(let e=0;e<l;e++){const n=e<u?p:m;$[e]=v.slice(b,b+n),y[e]=_.encode($[e]),b+=n,g=Math.max(g,n)}const x=new Uint8Array(i);let w,C,E=0;for(w=0;w<g;w++)for(C=0;C<l;C++)w<$[C].length&&(x[E++]=$[C][w]);for(w=0;w<f;w++)for(C=0;C<l;C++)x[E++]=y[C][w];return x}(a,n,r)}function f(n,t,d,s){let c;if(Array.isArray(n))c=h.fromArray(n);else{if("string"!=typeof n)throw new Error("Invalid data");{let e=t;if(!e){const t=h.rawSplit(n);e=l.getBestVersionForData(t,d)}c=h.fromString(n,e||40)}}const u=l.getBestVersionForData(c,d);if(!u)throw new Error("The amount of data is too big to be stored in a QR Code");if(t){if(t<u)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+u+".\n")}else t=u;const f=m(t,d,c),_=e.getSymbolSize(t),b=new r(_);return function(e,n){const t=e.size,r=a.getPositions(n);for(let n=0;n<r.length;n++){const i=r[n][0],a=r[n][1];for(let n=-1;n<=7;n++)if(!(i+n<=-1||t<=i+n))for(let r=-1;r<=7;r++)a+r<=-1||t<=a+r||(n>=0&&n<=6&&(0===r||6===r)||r>=0&&r<=6&&(0===n||6===n)||n>=2&&n<=4&&r>=2&&r<=4?e.set(i+n,a+r,!0,!0):e.set(i+n,a+r,!1,!0))}}(b,t),function(e){const n=e.size;for(let t=8;t<n-8;t++){const n=t%2==0;e.set(t,6,n,!0),e.set(6,t,n,!0)}}(b),function(e,n){const t=i.getPositions(n);for(let n=0;n<t.length;n++){const r=t[n][0],i=t[n][1];for(let n=-2;n<=2;n++)for(let t=-2;t<=2;t++)-2===n||2===n||-2===t||2===t||0===n&&0===t?e.set(r+n,i+t,!0,!0):e.set(r+n,i+t,!1,!0)}}(b,t),p(b,d,0),t>=7&&function(e,n){const t=e.size,r=l.getEncodedBits(n);let i,a,o;for(let n=0;n<18;n++)i=Math.floor(n/3),a=n%3+t-8-3,o=1==(r>>n&1),e.set(i,a,o,!0),e.set(a,i,o,!0)}(b,t),function(e,n){const t=e.size;let r=-1,i=t-1,a=7,o=0;for(let d=t-1;d>0;d-=2)for(6===d&&d--;;){for(let t=0;t<2;t++)if(!e.isReserved(i,d-t)){let r=!1;o<n.length&&(r=1==(n[o]>>>a&1)),e.set(i,d-t,r),a--,-1===a&&(o++,a=7)}if(i+=r,i<0||t<=i){i-=r,r=-r;break}}}(b,f),isNaN(s)&&(s=o.getBestMask(b,p.bind(null,b,d))),o.applyMask(s,b),p(b,d,s),{modules:b,version:t,errorCorrectionLevel:d,maskPattern:s,segments:c}}return ho.create=function(t,r){if(void 0===t||""===t)throw new Error("No input text");let i,a,d=n.M;return void 0!==r&&(d=n.from(r.errorCorrectionLevel,n.M),i=l.from(r.version),a=o.from(r.maskPattern),r.toSJISFunc&&e.setToSJISFunction(r.toSJISFunc)),f(t,i,d,a)},ho}var md,fd,_d={},bd={};function $d(){return md||(md=1,function(e){function n(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");let n=e.slice().replace("#","").split("");if(n.length<3||5===n.length||n.length>8)throw new Error("Invalid hex color: "+e);3!==n.length&&4!==n.length||(n=Array.prototype.concat.apply([],n.map(function(e){return[e,e]}))),6===n.length&&n.push("F","F");const t=parseInt(n.join(""),16);return{r:t>>24&255,g:t>>16&255,b:t>>8&255,a:255&t,hex:"#"+n.slice(0,6).join("")}}e.getOptions=function(e){e||(e={}),e.color||(e.color={});const t=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;return{width:r,scale:r?4:i,margin:t,color:{dark:n(e.color.dark||"#000000ff"),light:n(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},e.getScale=function(e,n){return n.width&&n.width>=e+2*n.margin?n.width/(e+2*n.margin):n.scale},e.getImageWidth=function(n,t){const r=e.getScale(n,t);return Math.floor((n+2*t.margin)*r)},e.qrToImageData=function(n,t,r){const i=t.modules.size,a=t.modules.data,o=e.getScale(i,r),d=Math.floor((i+2*r.margin)*o),s=r.margin*o,l=[r.color.light,r.color.dark];for(let e=0;e<d;e++)for(let t=0;t<d;t++){let c=4*(e*d+t),u=r.color.light;if(e>=s&&t>=s&&e<d-s&&t<d-s){u=l[a[Math.floor((e-s)/o)*i+Math.floor((t-s)/o)]?1:0]}n[c++]=u.r,n[c++]=u.g,n[c++]=u.b,n[c]=u.a}}}(bd)),bd}function yd(){return fd||(fd=1,function(e){const n=$d();e.render=function(e,t,r){let i=r,a=t;void 0!==i||t&&t.getContext||(i=t,t=void 0),t||(a=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),i=n.getOptions(i);const o=n.getImageWidth(e.modules.size,i),d=a.getContext("2d"),s=d.createImageData(o,o);return n.qrToImageData(s.data,e,i),function(e,n,t){e.clearRect(0,0,n.width,n.height),n.style||(n.style={}),n.height=t,n.width=t,n.style.height=t+"px",n.style.width=t+"px"}(d,a,o),d.putImageData(s,0,0),a},e.renderToDataURL=function(n,t,r){let i=r;void 0!==i||t&&t.getContext||(i=t,t=void 0),i||(i={});const a=e.render(n,t,i),o=i.type||"image/png",d=i.rendererOpts||{};return a.toDataURL(o,d.quality)}}(_d)),_d}var gd,vd,xd={};function wd(){if(gd)return xd;gd=1;const e=$d();function n(e,n){const t=e.a/255,r=n+'="'+e.hex+'"';return t<1?r+" "+n+'-opacity="'+t.toFixed(2).slice(1)+'"':r}function t(e,n,t){let r=e+n;return void 0!==t&&(r+=" "+t),r}return xd.render=function(r,i,a){const o=e.getOptions(i),d=r.modules.size,s=r.modules.data,l=d+2*o.margin,c=o.color.light.a?"<path "+n(o.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",u="<path "+n(o.color.dark,"stroke")+' d="'+function(e,n,r){let i="",a=0,o=!1,d=0;for(let s=0;s<e.length;s++){const l=Math.floor(s%n),c=Math.floor(s/n);l||o||(o=!0),e[s]?(d++,s>0&&l>0&&e[s-1]||(i+=o?t("M",l+r,.5+c+r):t("m",a,0),a=0,o=!1),l+1<n&&e[s+1]||(i+=t("h",d),d=0)):a++}return i}(s,d,o.margin)+'"/>',h='viewBox="0 0 '+l+" "+l+'"',p='<svg xmlns="http://www.w3.org/2000/svg" '+(o.width?'width="'+o.width+'" height="'+o.width+'" ':"")+h+' shape-rendering="crispEdges">'+c+u+"</svg>\n";return"function"==typeof a&&a(null,p),p},xd}var Cd=function(){if(vd)return lo;vd=1;const e=co(),n=pd(),t=yd(),r=wd();function i(t,r,i,a,o){const d=[].slice.call(arguments,1),s=d.length,l="function"==typeof d[s-1];if(!l&&!e())throw new Error("Callback required as last argument");if(!l){if(s<1)throw new Error("Too few arguments provided");return 1===s?(i=r,r=a=void 0):2!==s||r.getContext||(a=i,i=r,r=void 0),new Promise(function(e,o){try{const o=n.create(i,a);e(t(o,r,a))}catch(e){o(e)}})}if(s<2)throw new Error("Too few arguments provided");2===s?(o=i,i=r,r=a=void 0):3===s&&(r.getContext&&void 0===o?(o=a,a=void 0):(o=a,a=i,i=r,r=void 0));try{const e=n.create(i,a);o(null,t(e,r,a))}catch(e){o(e)}}return lo.create=n.create,lo.toCanvas=i.bind(null,t.render),lo.toDataURL=i.bind(null,t.renderToDataURL),lo.toString=i.bind(null,function(e,n,t){return r.render(e,t)}),lo}(),Ed=bn(Cd),kd=bn(wd());function Pd(e){const{amount:n,businessName:t,channelLogo:r,currency:i,mock:a,onAffirm:o,qrString:d,title:s,t:l}=e,[c,u]=xe(!1),h=ke(()=>{u(!0),a&&o()},[a,o]),p=Ee(()=>{try{return function(e){const n=Ed.create(e),t=1,r=kd.render(n,{margin:t}),i=(new DOMParser).parseFromString(r,"image/svg+xml").documentElement;i.style.width="100%",i.style.height="100%",i.setAttribute("width",String(n.modules.size+2*t)),i.setAttribute("height",String(n.modules.size+2*t));const a=i.querySelector("[fill]");a?.setAttribute("fill","var(--xendit-qr-background-color)");const o=i.querySelector("[stroke]");return o?.setAttribute("stroke","var(--xendit-qr-foreground-color)"),i}(d)}catch(e){console.log("Error generating QR code SVG:",e);const n=document.createElement("div");return n.innerText=l("action_qr.unable_to_generate"),n}},[d,l]);return e.hideUi?cn("div",{"data-testid":"qr-code",ref:e=>{!e||1===e.childNodes.length&&e.firstChild===p||e?.replaceChildren(p)}}):cn("div",{className:"xendit-action-present-to-customer",children:[cn("img",{src:r,alt:"Channel Logo",className:"xendit-action-qr-channel-logo"}),cn("div",{className:"xendit-action-title",children:s}),cn("div",{className:"xendit-action-qr-content",children:[cn("div",{className:"xendit-text-16 xendit-text-semibold xendit-text-center",children:t}),cn("div",{"data-testid":"qr-code",className:"xendit-action-qr-qrcode-container",ref:e=>{!e||1===e.childNodes.length&&e.firstChild===p||e?.replaceChildren(p)}}),cn("div",{className:"xendit-text-16 xendit-text-semibold xendit-text-center",children:ta(n,i)})]}),cn("div",{children:[cn(ft,{variant:pt.WHITE_ROUNDED,disabled:c,onClick:h,className:"xendit-button-block",children:c?cn(_t,{}):l("action.payment_made")}),cn("p",{className:"xendit-text-12 xendit-text-secondary xendit-text-center",children:l("action.payment_confirmation_instructions")})]})]})}const Nd=e=>{const{title:n,onClose:t,children:r,seamless:i}=e,a=Ce(!1),o=Ce(!1),d=Ce(null),s=Ce(null),l=void 0!==HTMLElement.prototype.animate,c=ke(()=>{a.current||(a.current=!0,t())},[t]),u=ke(()=>{if(!d.current||!s.current||o.current)return;if(o.current=!0,!l)return void c();s.current.animate?.(Td,Sd);const e=d.current.animate?.(Rd,Sd);e.onfinish=c},[c,l]);return we(()=>{l&&(s.current?.animate?.(Ad,Sd),d.current?.animate?.(Id,Sd))},[l]),we(()=>{e.close&&u()},[e.close,u]),cn("div",{className:"xendit-dialog-backdrop",ref:s,children:cn("div",{className:"xendit-dialog",ref:d,children:[i?cn("button",{"aria-label":"Close",onClick:u,className:"xendit-dialog-floating-close",children:cn(un,{name:"x",size:20})}):cn("div",{className:"xendit-dialog-header xendit-text-16 xendit-text-semibold",children:[n,cn("button",{"aria-label":"Close",onClick:u,children:cn(un,{name:"x",size:20})})]}),cn("div",{className:"xendit-dialog-body",children:r})]})})},Sd={duration:200,easing:"ease-in-out",fill:"forwards"},Ad=[{backgroundColor:"rgba(0, 0, 0, 0)"},{backgroundColor:"rgba(0, 0, 0, 0.5)"}],Td=Ad.slice().reverse(),Id=[{opacity:0,transform:"scale(0.9) translateY(-20px)"},{opacity:1,transform:""}],Rd=Id.slice().reverse();function Md(e){const{sdk:n,title:t,onClose:r,width:i,height:a}=e,o=Ce(null);return we(()=>{const e=n.createActionContainerComponent(fn);return o.current?.replaceChildren(e),()=>{n.destroyComponent(e)}},[n]),cn(Nd,{title:t,onClose:r,close:e.close,seamless:!0,children:cn("div",{className:"xendit-default-action-container",ref:o,style:{width:i?`calc(min(100vw - 64px, ${i}px))`:"calc(100vw - 64px)",height:a?`calc(min(100vh - 64px, ${a}px))`:void 0}})})}const Od=({instructions:e})=>{switch(e.length){case 0:return null;case 1:return cn(Dd,{instruction:e[0]});default:return cn(Ld,{instructions:e})}},Dd=e=>cn("div",{children:[cn("p",{className:"xendit-instructions-single-tab-heading",children:e.instruction.title}),cn(Ud,{instruction:e.instruction})]}),Ld=e=>{const[n,t]=xe(0);return cn("div",{children:[cn("div",{className:"xendit-instructions-tab-list",children:e.instructions.map((e,r)=>cn("button",{className:vn("xendit-instructions-tab-button",{"xendit-instructions-active-tab":n===r}),onClick:()=>t(r),children:e.title},r))}),cn(Ud,{instruction:e.instructions[n]})]})},Ud=e=>cn("ol",{className:"xendit-instructions-numbered-list","data-testid":"instructions-steps",children:e.instruction.content.map((e,n)=>cn("li",{className:"xendit-instructions-step-li",children:cn("div",{className:"xendit-instructions-step-box",children:(Array.isArray(e)?e:[e]).map((e,n)=>cn(x,{children:Kd(e)},n))})},n))});function Bd(e){const n=Array.from(e).map((e,n)=>{switch(e.nodeType){case Node.TEXT_NODE:return null===e.textContent?null:e.textContent;case Node.ELEMENT_NODE:return function(e,n){const t=vn({"xendit-instructions-bold":"B"===e.nodeName,"xendit-instructions-italics":"I"===e.nodeName});return t?cn("span",{className:t,children:Bd(e.childNodes)},n):Bd(e.childNodes)}(e,n);default:return null}});return n}const qd="undefined"!=typeof DOMParser?new DOMParser:null;function Fd(e){try{if(!qd)return e;return Bd(qd.parseFromString(e,"text/html").body.childNodes)}catch(n){return e}}function Kd(e){if("string"==typeof e)return cn("p",{className:"xendit-instructions-step-item",children:Fd(e)});switch(e.type){case"text":return function(e){return cn("p",{children:Fd(e.text)})}(e);case"image":return function(e){return cn("div",{children:cn("img",{src:e.src,alt:e.alt||"",style:{height:`${e.height??24}px`}})})}(e);case"bullets":return function(e){return cn("ul",{className:"xendit-instructions-bullet-list",children:e.items.map((e,n)=>cn("li",{children:Fd(e)},n))})}(e);case"form":return function(e){return cn("div",{className:"xendit-instructions-form-card",children:[e.heading?cn("h3",{className:"xendit-instructions-form-heading",children:Fd(e.heading)}):null,e.fields.map((e,n)=>cn("div",{className:"xendit-instructions-form-field",children:[cn("div",{className:"xendit-instructions-form-field-label",children:Fd(e.label)}),cn("div",{className:"xendit-instructions-form-field-value",children:Fd(e.value)})]},n))]})}(e);case"table":return function(e){return cn("table",{className:"xendit-instructions-table",children:[cn("thead",{children:cn("tr",{children:e.headers.map((e,n)=>cn("th",{className:"xendit-instructions-table-header",children:Fd(e)},n))})}),cn("tbody",{children:e.rows.map((e,n)=>cn("tr",{children:e.map((e,n)=>cn("td",{className:"xendit-instructions-table-cell",children:Fd(e)},n))},n))})]})}(e)}return null}const Gd=H({fire:()=>{},text:""}),Vd=({children:e})=>{const[n,t]=xe("");return cn(Gd.Provider,{value:{text:n,fire:e=>{t(e);const n=setTimeout(()=>{t("")},2e3);return()=>clearTimeout(n)}},children:cn("div",{style:{position:"relative"},children:e})})},Hd=()=>{const{text:e}=Pe(Gd);return e?cn("div",{className:"xendit-tooltip",children:e}):null};function Wd(e){const{amount:n,channelLogo:t,currency:r,mock:i,onAffirm:a,vaNumber:o,merchantName:d,instructions:s,title:l,t:c}=e,[u,h]=xe(!1),p=ke(()=>{h(!0),i&&a()},[i,a]),m=[{heading:c("action_va.merchant_name"),value:d},{heading:c("action_va.virtual_account_number"),value:o,enableCopy:!0},{heading:c("action_va.amount_to_pay"),value:ta(n,r),enableCopy:!0}];return cn("div",{className:"xendit-action-present-to-customer",children:[cn("img",{src:t,alt:"Channel Logo",className:"xendit-action-qr-channel-logo"}),cn("div",{className:"xendit-action-title",children:l}),cn("div",{className:"xendit-action-va-content",children:cn("div",{className:"xendit-action-va-details",children:m.map((e,n)=>cn("div",{className:"xendit-action-va-detail-item",children:[cn("div",{className:"xendit-action-va-detail-content",children:[cn("div",{className:"xendit-action-va-heading xendit-text-12 xendit-text-semibold",children:e.heading}),cn("div",{className:"xendit-action-va-value xendit-text-semibold",children:e.value})]}),e.enableCopy?cn(Vd,{children:[cn(jd,{value:e.value,t:c}),cn(Hd,{})]}):null]},n))})}),cn("div",{children:[cn(ft,{variant:pt.WHITE_ROUNDED,disabled:u,onClick:p,className:"xendit-button-block",children:u?cn(_t,{}):c("action.payment_made")}),cn("p",{className:"xendit-text-12 xendit-text-secondary xendit-text-center",children:c("action.payment_confirmation_instructions")})]}),cn(Od,{instructions:s})]})}const jd=({value:e,t:n})=>{const{fire:t}=Pe(Gd);return cn(ft,{variant:pt.WHITE_ROUNDED,size:mt.SM,onClick:()=>{navigator.clipboard.writeText(e),t(n("action_va.copied_to_clipboard"))},children:[n("action_va.copy"),cn(un,{name:"copy",size:16})]})};var Yd;function Xd(e){return"payment_request_id"in e?{id:e.payment_request_id,type:Yd.PaymentRequest,entity:e}:{id:e.payment_token_id,type:Yd.PaymentToken,entity:e}}function zd(e,n,t){return`${e===Yd.PaymentRequest?"payment_request":"payment_token"}_status.${n.toLowerCase()}.${t}`}!function(e){e.PaymentRequest="REQUEST",e.PaymentToken="TOKEN"}(Yd||(Yd={}));function Zd(e,n,t){const{session:r,paymentEntity:i}=e;switch(Un(r),Un(i),Un(n),t){case"PENDING":return Jd(r);case"PENDING_PAYMENT_ENTITY_ONLY":return function(e,n){const t=n.type===Yd.PaymentRequest?n.entity:void 0,r=n.type===Yd.PaymentToken?n.entity:void 0;return{session:e,payment_request:Qd(t,"PENDING"),payment_token:Qd(r,"PENDING")}}(r,i);case"SUCCESS":return"PENDING"===n._mock_action_type?Jd(r):function(e,n){const t=n.type===Yd.PaymentRequest?n.entity:void 0,r=n.type===Yd.PaymentToken?n.entity:void 0;return{session:{...e,status:"COMPLETED",payment_request_id:t?.payment_request_id,payment_token_id:r?.payment_token_id},payment_request:Qd(t,"SUCCEEDED"),payment_token:Qd(r,"ACTIVE"),succeeded_channel:{channel_code:n.entity.channel_code,logo_url:"https://placehold.co/48"}}}(r,i);case"FAILURE":return function(e,n){const t=n.type===Yd.PaymentRequest?n.entity:void 0,r=n.type===Yd.PaymentToken?n.entity:void 0;return{session:{...e,status:"ACTIVE"},payment_request:Qd(t,"FAILED"),payment_token:Qd(r,"FAILED")}}(r,i)}}function Jd(e){return{session:{...e,status:"PENDING"}}}function Qd(e,n){return e?{...e,status:n}:e}function es(e,n){return"PENDING"===n?{payment_request_id:`pr-${Qn()}`,status:"PENDING",channel_code:e,actions:[],session_token_request_id:Qn()}:n?{payment_request_id:`pr-${Qn()}`,status:"REQUIRES_ACTION",channel_code:e,actions:ns(n),session_token_request_id:Qn()}:{payment_request_id:`pr-${Qn()}`,status:"SUCCEEDED",channel_code:e,actions:[],session_token_request_id:Qn()}}function ns(e){if(!e)return[];const n=function(e){if("PENDING"===e)throw new Error("PENDING mock action type should not generate an action");switch(e){case"IFRAME":return{type:"REDIRECT_CUSTOMER",descriptor:"WEB_URL",value:"https://example.com/iframe",iframe_capable:!0};case"REDIRECT":return{type:"REDIRECT_CUSTOMER",descriptor:"WEB_URL",value:"https://example.com/redirect",iframe_capable:!1};case"DEEP_LINK":return{type:"REDIRECT_CUSTOMER",descriptor:"DEEPLINK_URL",value:"mockapp://mock-deep-link"};case"PUSH_NOTIFICATION":return null;case"QR":return{type:"PRESENT_TO_CUSTOMER",descriptor:"QR_STRING",value:"https://example.com/qr-code-data",action_title:"Pay with QR Code",action_subtitle:"Scan the QR code below",action_graphic:"",instructions:null};case"BARCODE":return{type:"PRESENT_TO_CUSTOMER",descriptor:"PAYMENT_CODE",value:"1234567890",action_title:"Pay at a Store",action_subtitle:"Show this barcode to the cashier",action_graphic:"",instructions:null};case"VA":return{type:"PRESENT_TO_CUSTOMER",descriptor:"VIRTUAL_ACCOUNT_NUMBER",value:"1234567890",action_title:"Pay with Virtual Account",action_subtitle:"Protect yourself from fraud - ensure all details are correct",action_graphic:"",instructions:[{title:"Mobile Banking",content:[{type:"text",text:"Open Mobile App"},{type:"text",text:"Select <b>Mock VA</b>, then select <b>Transfer</b>"},{type:"text",text:"Enter your Virtual Account Number, for example 3816523906568, then press <b>OK</b>"},{type:"text",text:"Click on <b>Send</b> button at the top right corner to proceed"},{type:"text",text:"Click <b>OK</b> to proceed"},{type:"text",text:"Enter your PIN to authorize the transaction"}]},{title:"Internet Banking",content:[{type:"text",text:"Login to the website"},{type:"text",text:"Select <b>Transfer</b>, then select <b>Transfer to Mock VA Virtual Account</b>"},{type:"text",text:"Enter the Virtual Account Number, for example 3816523906568"},{type:"text",text:"Select <b>Continue</b> to proceed your payment"}]},{title:"ATM",content:[{type:"text",text:"Insert your ATM card and PIN"},{type:"text",text:"Enter your ATM PIN"},{type:"text",text:"Select <b>Transfer</b>"},{type:"text",text:"Select <b>To Mock VA Virtual Account</b>"},{type:"text",text:"Enter Virtual Account Number, for example 3816523906568. Press <b>Correct</b> to proceed"},{type:"text",text:"Verify Virtual Account details and then enter amount to be transferred and select <b>Correct</b> to confirm"},{type:"text",text:"Confirm your transaction details displayed"},{type:"text",text:"Select <b>Yes</b> if the details are correct or <b>No</b> if the details are not correct"}]}]}}throw new Error(`Unknown mock action type: ${e}`)}(e);return null===n?[]:[n]}const ts=e=>cn("div",{className:"xendit-redirect-instructions",children:[cn("div",{className:"xendit-redirect-instructions-logo",children:cn("img",{src:e.logoUrl,alt:e.logoAlt})}),cn("div",{className:"xendit-redirect-instructions-text",children:[cn("div",{className:"xendit-text-16",children:e.title}),e.subtitle?cn("div",{className:"xendit-text-14 xendit-text-secondary",children:e.subtitle}):null]}),e.redirectUrl?cn("a",{href:e.redirectUrl,className:"xendit-redirect-instructions-button xendit-text-14",children:e.redirectButtonLabel??""}):null]}),rs=e=>{const n=e.t,t=e.channel,r=t.brand_name;return cn(ts,{title:n("action_empty_list_push_notification.title"),subtitle:n("action_empty_list_push_notification.subtext",{channelName:r}),logoUrl:t.brand_logo_url,logoAlt:n("image_alt.channel_logo",{channelName:r}),redirectUrl:null,redirectButtonLabel:null})},is=e=>{const n=e.t,t=e.channel,r=t.brand_name;return cn(ts,{title:n("action_deeplink.title"),subtitle:n("action_deeplink.instructions",{channelName:r}),logoUrl:t.brand_logo_url,logoAlt:n("image_alt.channel_logo",{channelName:r}),redirectUrl:e.redirectUrl,redirectButtonLabel:n("action_deeplink.button",{channelName:r})})};class ContainerActionBehavior{bb;cleanupFn=null;defaultContainerHeight=0;defaultContainerWidth=400;title="Complete your payment";constructor(e){this.bb=e}ensureHasActionContainer(){if(this.bb.sdk[fn].liveComponents.actionContainer)return()=>{this.emptyActionContainer()};let e=!1,n=!1;const t=document.createElement("div");t.setAttribute("class","xendit-default-action-container");const r={sdk:this.bb.sdk,title:this.title,width:this.defaultContainerWidth,height:this.defaultContainerHeight,onClose:()=>{e=!0,V(null,t),t.remove(),n||this.bb.sdk.abortSubmission()}};return V(g(Md,r),t),document.body.appendChild(t),i=>{i||(n=!0),e||V(g(Md,{...r,close:!0}),t)}}cleanupActionContainer(e){this.cleanupFn&&(this.cleanupFn(e),this.cleanupFn=null)}emptyActionContainer(){const e=this.bb.sdk[fn].liveComponents.actionContainer;e&&V(null,e)}updateActionContainerBrandColor(){Un(this.bb.channel);const e=this.bb.sdk[fn].liveComponents.actionContainer;e&&e.style.setProperty("--xendit-channel-brand-color",this.bb.channel.brand_color)}populateActionContainer(e){const n=this.bb.sdk[fn].liveComponents.actionContainer;if(!n)throw new Error("Trying to populate action container, but it is missing; A default action container should have been created. This is a bug, please contact support.");this.updateActionContainerBrandColor(),V(e(),n)}exit(){this.cleanupActionContainer(!1),this.emptyActionContainer()}}class ActionCompletedBehavior{bb;constructor(e){this.bb=e}enter(){}}class ActionRedirectBehavior{bb;url;constructor(e,n){this.bb=e,this.url=n}enter(){this.bb.dispatchEvent(new XenditWillRedirectEvent),window.location.href=this.url}}class ActionIframeBehavior extends ContainerActionBehavior{bb;url;constructor(e,n){super(e),this.bb=e,this.url=n,this.defaultContainerHeight=600}enter(){this.cleanupFn=this.ensureHasActionContainer(),this.populateActionContainer(()=>g(io,{url:this.url,mock:this.bb.mock,onIframeComplete:e=>{this.cleanupActionContainer(!1);const n="success"===e.mockStatus?"SUCCESS":"FAILURE";this.updateMocksOnIframeCompletion(n),this.bb.actionCompleted=!0,this.bb.pollImmediatelyRequested=!0,this.bb.dispatchEvent(new InternalBehaviorTreeUpdateEvent)}}))}updateMocksOnIframeCompletion(e){Un(this.bb.world?.paymentEntity),this.bb.mock&&this.bb.dispatchEvent(new InternalScheduleMockUpdateEvent(Zd(this.bb.world,this.bb.channel,e)))}exit(){super.exit()}}class ActionQrBehavior extends ContainerActionBehavior{bb;actionIndex;constructor(e,n){super(e),this.bb=e,this.actionIndex=n}enter(){const e=this.bb.world?.paymentEntity?.entity.actions[Number(this.actionIndex)];Bn(e?.type,"PRESENT_TO_CUSTOMER"),Un(this.bb.world),Un(this.bb.channel);const n=this.bb.sdk[fn].liveComponents.actionContainer,t={amount:this.bb.world.session.amount,businessName:this.bb.world.business.name??"",channelLogo:this.bb.channel.brand_logo_url,currency:this.bb.world.session.currency,hideUi:"true"===n?.getAttribute("data-qr-code-only")||!1,mock:this.bb.mock,onAffirm:this.affirmPayment.bind(this),qrString:e.value,title:e.action_subtitle,t:this.bb.sdk.t.bind(this.bb.sdk)};this.cleanupFn=this.ensureHasActionContainer(),this.populateActionContainer(()=>g(Pd,t))}affirmPayment(){this.bb.mock?this.updateMocksOnSimulatePaymentCompletion():this.bb.sdk.isProdLive()?this.bb.pollImmediatelyRequested=!0:this.bb.simulatePaymentRequested=!0}updateMocksOnSimulatePaymentCompletion(){Un(this.bb.world?.paymentEntity),this.bb.mock&&this.bb.dispatchEvent(new InternalScheduleMockUpdateEvent(Zd(this.bb.world,this.bb.channel,"SUCCESS")))}exit(){super.exit()}}class ActionDeepLinkBehavior extends ContainerActionBehavior{bb;actionIndex;constructor(e,n){super(e),this.bb=e,this.actionIndex=n}enter(){Un(this.bb.world);const e=this.bb.world?.paymentEntity?.entity.actions[Number(this.actionIndex)];Bn(e?.type,"REDIRECT_CUSTOMER"),Bn(e?.descriptor,"DEEPLINK_URL");const n=this.bb.sdk.t.bind(this.bb.sdk),t=this.bb.channel;Un(t),this.cleanupFn=this.ensureHasActionContainer(),this.populateActionContainer(()=>g(is,{t:n,channel:t,redirectUrl:e.value}))}exit(){super.exit()}}class ActionEmptyListPushNotificationBehavior extends ContainerActionBehavior{bb;constructor(e){super(e),this.bb=e}enter(){Un(this.bb.world),this.bb.hackyOvoActionLatch=!0;const e=this.bb.sdk.t.bind(this.bb.sdk),n=this.bb.channel;Un(n),this.cleanupFn=this.ensureHasActionContainer(),this.populateActionContainer(()=>g(rs,{t:e,channel:n})),this.bb.mock&&this.bb.dispatchEvent(new InternalScheduleMockUpdateEvent(Zd(this.bb.world,this.bb.channel,"PENDING_PAYMENT_ENTITY_ONLY")))}exit(){this.bb.hackyOvoActionLatch=void 0,super.exit()}}class ActionVaBehavior extends ContainerActionBehavior{bb;actionIndex;constructor(e,n){super(e),this.bb=e,this.actionIndex=n}enter(){const e=this.bb.world?.paymentEntity?.entity.actions[Number(this.actionIndex)];Bn(e?.type,"PRESENT_TO_CUSTOMER"),Un(this.bb.world),Un(this.bb.channel);const n={amount:this.bb.world.session.amount,channelLogo:this.bb.channel.brand_logo_url,currency:this.bb.world.session.currency,mock:this.bb.mock,onAffirm:this.affirmPayment.bind(this),vaNumber:e.value,merchantName:this.bb.world.business.name??"",instructions:e.instructions??[],title:e.action_title,t:this.bb.sdk.t.bind(this.bb.sdk)};this.cleanupFn=this.ensureHasActionContainer(),this.populateActionContainer(()=>g(Wd,n))}affirmPayment(){this.bb.mock?this.updateMocksOnSimulatePaymentCompletion():"pl"===this.bb.sdkKey.hostId?this.bb.pollImmediatelyRequested=!0:this.bb.simulatePaymentRequested=!0}updateMocksOnSimulatePaymentCompletion(){Un(this.bb.world?.paymentEntity),this.bb.mock&&this.bb.dispatchEvent(new InternalScheduleMockUpdateEvent(Zd(this.bb.world,this.bb.channel,"SUCCESS")))}}class CardInfoBehavior{bb;channelCode;cardDetailsRequest=null;constructor(e,n){this.bb=e,this.channelCode=n}enter(){this.lookupCardDetails()}update(){this.lookupCardDetails()}exit(){this.abortLookupCardDetails()}abortLookupCardDetails(){this.cardDetailsRequest&&(this.cardDetailsRequest.abortController.abort(new AbortError),this.cardDetailsRequest=null)}lookupCardDetails(){const e=it(this.bb.channelProperties);if(!e)return;if(this.cardDetailsRequest?.cardNumber===e)return;if(this.bb.channelData?.cardDetails?.cardNumber===e)return;this.cardDetailsRequest&&this.abortLookupCardDetails();const n=new AbortController,t=Kn(300,n.signal).then(()=>{if(this.bb.mock){const n=at(e).cipherText;try{return JSON.parse(atob(n))}catch{}return{schemes:["VISA"],country_codes:["ID"],require_billing_information:!1}}{const t=at(e).withoutValidationError;return Za(this.bb.sdkKey,{card_number:t},this.bb.sdkKey.sessionAuthKey,void 0,n.signal)}}).then(n=>{this.bb.dispatchEvent(new InternalUpdateChannelComponentData(this.channelCode,{cardDetails:{cardNumber:e,details:n}}))}).catch(e=>{if(!Fn(e))throw e});this.cardDetailsRequest={cardNumber:e,promise:t,abortController:n}}}class ChannelValidBehavior{bb;lastChannelCode=null;constructor(e){this.bb=e}enter(){this.sendReadyEventIfChanged()}update(){this.sendReadyEventIfChanged()}sendReadyEventIfChanged(){const e=this.bb.channel?.channel_code??null;e&&e!==this.lastChannelCode&&(this.bb.dispatchEvent(new XenditReadyEvent(e)),this.lastChannelCode=e)}exit(){this.bb.dispatchEvent(new XenditNotReadyEvent)}}class ChannelInvalidBehavior{bb;channelCode;constructor(e,n){this.bb=e,this.channelCode=n}enter(){}}class PollWorker{sdkKey;sdk;sessionTokenRequestId;onPollResult;started=!1;stopped=!1;constructor(e,n,t,r){this.sdkKey=e,this.sdk=n,this.sessionTokenRequestId=t,this.onPollResult=r}async start(){if(this.stopped)throw new Error("PollWorker has been stopped, make a new instance instead of calling start again");this.started=!0;for await(const e of async function*(e,n,t=2){yield 0;let r=e;for(let e=1;e<n;e++)r*=t,await qn(r),yield e}(5e3,100,1.06)){if(this.stopped)return;let e;if(this.sdk.isMock()){if(!(this.sdk instanceof XenditComponentsTest&&this.sdk.nextMockUpdate))continue;await qn(Ln),e=this.sdk.nextMockUpdate,this.sdk.nextMockUpdate=null}else try{e=await za(this.sdkKey,this.sdkKey.sessionAuthKey,this.sessionTokenRequestId)}catch(e){continue}if(this.stopped)return;if(!e.session)throw new Error("Session is not defined");let n=null;e.payment_token?n=Xd(e.payment_token):e.payment_request&&(n=Xd(e.payment_request)),this.onPollResult(e,n),await qn(1)}}isPolling(){return this.started&&!this.stopped}stop(){this.started=!1,this.stopped=!0}}class PePendingBehavior{bb;pollWorker;constructor(e){this.bb=e,this.pollWorker=new PollWorker(this.bb.sdkKey,this.bb.sdk,this.bb.world?.sessionTokenRequestId??null,this.onPollResult)}enter(){if(this.bb.mock)switch(Un(this.bb.world?.paymentEntity),this.bb.world?.paymentEntity.entity.status){case"ACTIVE":case"AUTHORIZED":case"SUCCEEDED":case"PENDING":this.bb.dispatchEvent(new InternalScheduleMockUpdateEvent(Zd(this.bb.world,this.bb.channel,"SUCCESS")));break;case"FAILED":case"CANCELED":case"EXPIRED":this.bb.dispatchEvent(new InternalScheduleMockUpdateEvent(Zd(this.bb.world,this.bb.channel,"FAILURE")))}this.pollWorker.start()}exit(){this.pollWorker.stop()}onPollResult=(e,n)=>{this.bb.dispatchEvent(new InternalUpdateWorldState({session:e.session,paymentEntity:n??void 0,succeededChannel:e.succeeded_channel??null}))}}class PeRequiresActionBehavior{bb;pollWorker=null;canCreateActionContainer=!0;constructor(e){this.bb=e,this.resetPolling()}enter(){this.bb.dispatchEvent(new XenditActionBeginEvent),this.canCreateActionContainer=!1,this.pollWorker?.start()}update(){this.bb.pollImmediatelyRequested&&(this.bb.pollImmediatelyRequested=!1,this.resetPolling())}exit(){this.pollWorker?.stop(),this.bb.dispatchEvent(new XenditActionEndEvent),this.bb.actionCompleted=!1}onPollResult=(e,n)=>{this.bb.dispatchEvent(new InternalUpdateWorldState({session:e.session,paymentEntity:n??void 0,succeededChannel:e.succeeded_channel??null}))};resetPolling(){const e=this.pollWorker?.isPolling()??!1;this.pollWorker?.stop(),this.pollWorker=new PollWorker(this.bb.sdkKey,this.bb.sdk,this.bb.world?.sessionTokenRequestId??null,this.onPollResult),e&&this.pollWorker.start()}}class PeFailedBehavior{bb;constructor(e){this.bb=e}enter(){this.bb.submissionRequested=!1,this.bb.dispatchEvent(new InternalBehaviorTreeUpdateEvent)}}class PaymentOptionsBehavior{bb;channelCode;paymentOptionsRequest=null;constructor(e,n){this.bb=e,this.channelCode=n}enter(){this.lookupPaymentOptions()}update(){this.lookupPaymentOptions()}exit(){this.abortLookupPaymentOptions()}abortLookupPaymentOptions(){this.paymentOptionsRequest&&(this.paymentOptionsRequest.abortController.abort(new AbortError),this.paymentOptionsRequest=null)}lookupPaymentOptions(){let e;if(Un(this.bb.world),Un(this.bb.channel),ht(this.bb.channel.form,"credit_card_number")){if(e=it(this.bb.channelProperties)??void 0,!e)return;if(this.paymentOptionsRequest?.cardNumber===e)return;if(this.bb.channelData?.paymentOptions?.cardNumber??null===e)return;if(e){if(!at(e).valid)return}}else if(this.paymentOptionsRequest||this.bb.channelData?.paymentOptions)return;this.paymentOptionsRequest&&this.abortLookupPaymentOptions();const n=new AbortController,t=async function(e,n,t,r,i,a){if(a)return Kn(Ln,i).then(()=>function(e,n){return{channel_code:e,country:n.country,currency:n.currency,amount:n.amount,installment_plans:[{interval:"MONTH",interval_count:1,terms:3,installment_amount:Math.floor(n.amount/3),total_amount:n.amount,description:"Unused",code:"3M",interest_rate:1},{interval:"MONTH",interval_count:1,terms:6,installment_amount:Math.floor(n.amount/6),total_amount:n.amount,description:"Unused",code:"6M",interest_rate:1},{interval:"MONTH",interval_count:1,terms:9,installment_amount:Math.floor(n.amount/9),total_amount:n.amount,description:"Unused",interest_rate:1,code:void 0}]}}(t,n));return Ja(e,{channel_code:t,channel_properties:r?{card_number:r}:void 0},e.sessionAuthKey,null,i)}(this.bb.sdkKey,this.bb.world.session,this.bb.channel.channel_code,e,n.signal,this.bb.mock).then(n=>{this.bb.dispatchEvent(new InternalUpdateChannelComponentData(this.channelCode,{paymentOptions:{cardNumber:e??null,options:n}}))}).catch(e=>{if(!Fn(e))throw e});this.paymentOptionsRequest={cardNumber:e??void 0,promise:t,abortController:n}}}class SdkLoadingBehavior{bb;constructor(e){this.bb=e}enter(){}}class SdkActiveBehavior{bb;constructor(e){this.bb=e}enter(){this.bb.dispatchEvent(new XenditInitEvent),this.bb.dispatchEvent(new InternalNeedsRerenderEvent)}exit(){this.bb.dispatchEvent(new InternalNeedsRerenderEvent)}}class SdkFatalErrorBehavior{bb;constructor(e){this.bb=e}enter(){this.bb.dispatchEvent(new XenditFatalErrorEvent(this.bb.sdkFatalErrorMessage??"Unknown error"))}}function as(e,n){switch(e.type){case Yd.PaymentRequest:n(new XenditPaymentRequestDiscardedEvent(e.id));break;case Yd.PaymentToken:n(new XenditPaymentTokenDiscardedEvent(e.id))}n(new InternalUpdateWorldState({paymentEntity:null,sessionTokenRequestId:null}))}class SessionActiveBehavior{bb;constructor(e){this.bb=e}enter(){this.bb.dispatchEvent(new InternalNeedsRerenderEvent)}exit(){this.bb.dispatchEvent(new InternalNeedsRerenderEvent)}}class SessionCompletedBehavior{bb;constructor(e){this.bb=e}enter(){this.bb.dispatchEvent(new XenditSessionCompleteEvent)}}class SessionFailedBehavior{bb;constructor(e){this.bb=e}enter(){this.bb.dispatchEvent(new XenditSessionExpiredOrCanceledEvent)}}class SessionPendingBehavior{bb;pollWorker;constructor(e){this.bb=e,this.pollWorker=new PollWorker(this.bb.sdkKey,this.bb.sdk,this.bb.world?.sessionTokenRequestId??null,this.onPollResult)}enter(){this.pollWorker.start(),this.bb.dispatchEvent(new XenditSessionPendingEvent)}exit(){this.pollWorker.stop(),Un(this.bb.world?.session);const e=this.bb.world.paymentEntity;"COMPLETED"!==this.bb.world.session.status&&e&&as(e,this.bb.dispatchEvent),this.bb.dispatchEvent(new XenditSessionNotPendingEvent)}onPollResult=(e,n)=>{this.bb.dispatchEvent(new InternalUpdateWorldState({session:e.session,paymentEntity:n??void 0,succeededChannel:e.succeeded_channel??null}))}}class SimulatePaymentBehavior{bb;exited=!1;simulationRequest=null;constructor(e){this.bb=e}enter(){this.simulatePayment()}exit(){this.exited=!0,this.bb.simulatePaymentRequested=!1,this.abortSimulation()}abortSimulation(){this.simulationRequest&&(this.simulationRequest.abortController.abort(new AbortError),this.simulationRequest=null)}simulatePayment(){if(this.simulationRequest&&this.abortSimulation(),!this.bb.channel)throw new Error("Channel is missing");if(!this.bb.world)throw new Error("Invalid state");if(!this.bb.world.paymentEntity)throw new Error("Payment entity is missing");if(this.bb.world.paymentEntity.type!==Yd.PaymentRequest)throw new Error("Payment entity is not a payment request");const e=this.bb.world?.paymentEntity.id,n=new AbortController,t=async function(e,n,t,r,i){return n?(await Kn(Ln,i),es(t.channel_code,t._mock_action_type)):await Xa(e,{channel_code:t.channel_code},{sessionAuthKey:e.sessionAuthKey,paymentRequestId:r},void 0,i)}(this.bb.sdkKey,this.bb.mock,this.bb.channel,e,n.signal).then(()=>{this.bb.actionCompleted=!0,this.bb.mock&&this.bb.world&&this.bb.dispatchEvent(new InternalScheduleMockUpdateEvent(Zd(this.bb.world,this.bb.channel,"SUCCESS"))),this.bb.dispatchEvent(new InternalBehaviorTreeUpdateEvent)}).catch(e=>{Fn(e)||this.exited||(this.bb.simulatePaymentRequested=!1,console.error("Simulate Payment failed:",e))});this.simulationRequest={promise:t,abortController:n}}}class SubmissionBehavior{bb;exited=!1;submission=null;submissionError=null;constructor(e){this.bb=e}enter(){this.bb.dispatchEvent(new XenditSubmissionBeginEvent),this.bb.dispatchEvent(new InternalScheduleMockUpdateEvent(null)),this.submit()}exit(){this.exited=!0,Un(this.bb.world?.session);const e=this.bb.sdk.t,n=this.bb.world.paymentEntity;let t,r,i;var a;"COMPLETED"!==this.bb.world.session.status&&"PENDING"!==this.bb.world.session.status&&n&&as(n,this.bb.dispatchEvent),"ACTIVE"!==this.bb.world.session.status?t=`SESSION_${this.bb.world.session.status}`:!n||"FAILED"!==n.entity.status&&"CANCELED"!==n.entity.status&&"EXPIRED"!==n.entity.status?this.submissionError?(t="REQUEST_FAILED",!("message"in(a=this.submissionError))&&"text"in a&&"code"in a?(r=this.submissionError.text,i={type:"ERROR",code:this.submissionError.code}):(r=function(e){return[e("default_error.title"),e("default_error.message_1"),e("default_error.message_2")]}(e),i={type:"NETWORK_ERROR",code:"NETWORK_ERROR"})):t=this.submission?"REQUEST_ABORTED":"ACTION_ABORTED":(t=`PAYMENT_${n.type}_${n.entity.status}`,r=function(e,n,t,r){const i=e(zd(n,t,"title")),a=r?e(function(e){return`failure_code.${e.toLowerCase()}`}(r),e("failure_code_unknown",{failureCode:r})):e(zd(n,t,"subtext"));return[i,a]}(e,n.type,n.entity.status,n.entity.failure_code),i={type:"FAILURE",code:n.entity.failure_code??"UNKNOWN"}),this.bb.dispatchEvent(new XenditSubmissionEndEvent(t,r,i)),this.submission&&(this.submission?.abortController.abort(new AbortError),this.submission=null),this.bb.submissionRequested=!1,this.bb.dispatchEvent(new InternalNeedsRerenderEvent)}submit(){if(!this.bb.world?.session)throw new Error("Session object missing");if(!this.bb.channel)throw new Error("Channel missing");if(this.bb.instantSubmissionError)return this.bb.submissionRequested=!1,this.submissionError=this.bb.instantSubmissionError,this.bb.instantSubmissionError=null,void this.bb.dispatchEvent(new InternalBehaviorTreeUpdateEvent);const e="OPTIONAL"===this.bb.world.session.allow_save_payment_method&&this.bb.channel?.allow_save,n=this.bb.world?.session?.session_type,t=this.bb.channel.channel_code,r=this.bb.channel._mock_action_type,i=this.bb.channelProperties??{},a=new AbortController,o=async function(e,n,t,r,i,a,o,d){let s;if(n)switch(t){case"PAY":await Kn(Ln,o.signal),s=es(r,i);break;case"SAVE":await Kn(Ln,o.signal),s=function(e,n){return"PENDING"===n?{payment_token_id:`pt-${Qn()}`,status:"PENDING",channel_code:e,actions:ns(n),session_token_request_id:Qn()}:n?{payment_token_id:`pt-${Qn()}`,status:"REQUIRES_ACTION",channel_code:e,actions:ns(n),session_token_request_id:Qn()}:{payment_token_id:`pt-${Qn()}`,status:"ACTIVE",channel_code:e,actions:[],session_token_request_id:Qn()}}(r,i);break;default:throw new Error(`The session type ${t} is not supported.`)}else switch(t){case"PAY":s=await Ya(e,{session_id:e.sessionAuthKey,channel_code:r,channel_properties:a,save_payment_method:d},null,null,o.signal);break;case"SAVE":s=await ja(e,{session_id:e.sessionAuthKey,channel_code:r,channel_properties:a},null,null,o.signal);break;default:throw new Error(`The session type ${t} is not supported.`)}return Xd(s)}(this.bb.sdkKey,this.bb.mock,n,t,r,i,a,e?this.bb.channelData?.savePaymentMethod??!1:void 0).then(e=>{switch(this.submission=null,e.type){case Yd.PaymentRequest:this.bb.dispatchEvent(new XenditPaymentRequestCreatedEvent(e.id));break;case Yd.PaymentToken:this.bb.dispatchEvent(new XenditPaymentTokenCreatedEvent(e.id))}this.bb.dispatchEvent(new InternalUpdateWorldState({paymentEntity:e,sessionTokenRequestId:e.entity.session_token_request_id}))}).catch(e=>{Fn(e)||(console.error("Submission failed:",e),this.exited||(this.bb.submissionRequested=!1,this.submissionError=e instanceof NetworkError?{text:[e.errorResponse.error_content?.title,e.errorResponse.error_content?.message_1,e.errorResponse.error_content?.message_2].filter(e=>void 0!==e),code:e.errorResponse.error_code}:e,this.bb.dispatchEvent(new InternalBehaviorTreeUpdateEvent)))});this.submission={abortController:a,promise:o}}}function os(e){switch(e.sdkStatus){case"LOADING":return Qa(SdkLoadingBehavior);case"ACTIVE":if(!e.world?.session)throw new Error("Session is required when SDK is active");return Qa(SdkActiveBehavior,"active",function(e){if(!e.world?.session)throw new Error("Session is required to create behavior tree for session");switch(e.world.session.status){case"ACTIVE":return Qa(SessionActiveBehavior,"active",e.submissionRequested?function(e){if(!e.world)throw new Error("SDK not initialized in behaviorTreeForSubmission");return Qa(SubmissionBehavior,"submission",e.world.paymentEntity&&null!==e.world.sessionTokenRequestId?function(e){if(!e.world?.paymentEntity)throw new Error("Payment entity is required to create behavior tree for payment entity");if(e.hackyOvoActionLatch&&"PENDING"===e.world.paymentEntity.entity.status)return Qa(PeRequiresActionBehavior,e.world.paymentEntity.id,Qa(ActionEmptyListPushNotificationBehavior,""));switch(e.world.paymentEntity.entity.status){case"PENDING":return Qa(PePendingBehavior);case"REQUIRES_ACTION":return Qa(PeRequiresActionBehavior,e.world.paymentEntity.id,function(e){if(!e.world?.paymentEntity)throw new Error("Payment entity is missing");if(e.actionCompleted)return Qa(ActionCompletedBehavior);if(e.simulatePaymentRequested)return Qa(SimulatePaymentBehavior);const n=Gn(e.world.paymentEntity.entity.actions);if(!n)return Qa(ActionEmptyListPushNotificationBehavior,"");const t=e.world.paymentEntity.entity.actions.indexOf(n);switch(n.type){case"REDIRECT_CUSTOMER":switch(n.descriptor){case"WEB_URL":return function(e){return"REDIRECT_CUSTOMER"===e.type&&!1!==e.iframe_capable}(n)?Qa(ActionIframeBehavior,n.value):Qa(ActionRedirectBehavior,n.value);case"DEEPLINK_URL":return Qa(ActionDeepLinkBehavior,String(t));case"WEB_GOOGLE_PAYLINK":throw new Error(`Unsupported action type ${n.type} ${n.descriptor}`)}break;case"PRESENT_TO_CUSTOMER":switch(n.descriptor){case"QR_STRING":return Qa(ActionQrBehavior,String(t));case"PAYMENT_CODE":throw new Error(`Unsupported action type ${n.type} ${n.descriptor}`);case"VIRTUAL_ACCOUNT_NUMBER":return Qa(ActionVaBehavior,String(t))}break;case"API_POST_REQUEST":switch(n.descriptor){case"CAPTURE_PAYMENT":case"VALIDATE_OTP":case"RESEND_OTP":throw new Error(`Unsupported action type ${n.type} ${n.descriptor}`)}}throw new Error(`Unknown action type: ${n.type} ${n.descriptor}`)}(e));case"FAILED":case"EXPIRED":case"CANCELED":return Qa(PeFailedBehavior);case"ACCEPTING_PAYMENTS":throw new Error("Status ACCEPTING_PAYMENTS should not happen");case"AUTHORIZED":case"ACTIVE":case"SUCCEEDED":return Qa(PePendingBehavior,e.world.paymentEntity.id);default:throw e.world.paymentEntity.entity,new Error(`Unknown payment entity status: ${e.world.paymentEntity.entity.status}`)}}(e):void 0)}(e):function(e){if(!e.channel||!e.world?.session)return;if(e.channelIsDigitalWallet)return;const n=function(e,n,t,r){t||(t={});for(const i of Ea(e,n.form,t,r))if(ca(i,t))return!1;return!0}(e.world.session.session_type,e.channel,e.channelProperties,e.channelData);let t=Qa(n?ChannelValidBehavior:ChannelInvalidBehavior);ht(e.channel.form,"credit_card_number")&&(t=Qa(CardInfoBehavior,e.channel.channel_code,t));ht(e.channel.form,"installment_plan")&&(t=Qa(PaymentOptionsBehavior,e.channel.channel_code,t));return t}(e));case"COMPLETED":return Qa(SessionCompletedBehavior);case"EXPIRED":case"CANCELED":return Qa(SessionFailedBehavior,e.world.session.status);case"PENDING":return Qa(SessionPendingBehavior,e.world.session.status);default:throw e.world.session.status,new Error(`Unknown session status: ${e.world.session.status}`)}}(e));case"FATAL_ERROR":return Qa(SdkFatalErrorBehavior);default:throw e.sdkStatus,new Error(`Unknown SDK status: ${e.sdkStatus}`)}}const ds=e=>{const{onReady:n,options:t}=e,r=Mn(),i=r.t,a=Tn(),o=(()=>{const e=Pe(Cn);if(null===e)throw new Error("useBusiness must be used within a XenditSessionProvider");return e})(),d=Rn(),s=d?.google_pay;Un(s);const l=Ce(!1),c=Ce(null),u=Ce(null),h=Ee(()=>s.allowed_payment_methods.map(e=>e.payment_method_specification),[s.allowed_payment_methods]),p=Ee(()=>({apiVersion:2,apiVersionMinor:0,allowedPaymentMethods:h,emailRequired:!0,merchantInfo:{merchantId:s.merchant_id,merchantName:o.name??""},transactionInfo:{transactionId:a.payment_session_id,totalPriceStatus:"FINAL",totalPrice:String(a.amount),currencyCode:a.currency}}),[o.name,s.merchant_id,h,a.amount,a.currency,a.payment_session_id]),m=Ee(()=>({buttonColor:"default",buttonType:"plain",buttonRadius:999,buttonSizeMode:"fill",buttonBorderType:"no_border",...t}),[t]);we(()=>{const e=window.google?.payments?.api?.PaymentsClient;e?u.current=new e({environment:r.isMock()?"TEST":"PRODUCTION"}):console.error("XenditComponents: Google Pay button was requested but the Google Pay SDK is not loaded.")},[r]);const f=ke(()=>{Un(u.current),u.current.loadPaymentData(p).then(function(e){const n=function(e){Un(s);const n=r.getActiveChannels();for(const t of s.allowed_payment_methods)if(t.payment_method_specification.type===e.paymentMethodData.type)return ss(n,t.channel_code);throw new Error(`No matching channel found for selected Google Pay payment method ${e.paymentMethodData.type}`)}(e);Un(n);let t={};"CARDS"===n.channelCode&&(t={google_pay:JSON.stringify(e)}),r.submitDigitalWallet("GOOGLE_PAY",n,t)}).catch(function(e){const n=e.statusCode??"UNKNOWN_ERROR";if("CANCELED"===n)return;function t(e,n){return`google_pay_errors.${e.toLowerCase()}.${n}`}const a={code:`GOOGLE_PAY_${n}`,text:[i(t(n,"title"),i("google_pay_errors.unknown_error.title")),i(t(n,"message"),i("google_pay_errors.unknown_error.message",{statusCode:n}))]},o=s.allowed_payment_methods[0];Un(o);const d=ss(r.getActiveChannels(),o.channel_code);r.submitDigitalWallet("GOOGLE_PAY",d,{},a)})},[s,p,r,i]);return we(()=>{u.current&&(l.current||u.current.isReadyToPay({apiVersion:2,apiVersionMinor:0,allowedPaymentMethods:h}).then(function(e){e.result&&(l.current||(l.current=!0,n()))}).catch(function(e){console.error("XenditComponents: Error when checking if Google Pay is ready",e)}))},[h,n]),we(()=>{if(!u.current)return;const e=u.current.createButton({...m,buttonLocale:a.locale,allowedPaymentMethods:h,onClick:f});c.current&&c.current.replaceChildren(e)},[m,h,f,a.locale]),cn("div",{ref:c})};function ss(e,n){const t=e.find(e=>Array.isArray(e.channelCode)?e.channelCode.includes(n):e.channelCode===n);if(!t)throw new Error(`Channel not found for code: ${n}`);return t}const ls=e=>{const{scriptTagRegex:n,checkLoaded:t,children:r}=e,[,i]=xe({}),a=t();return we(()=>{if(a)return;const e=Array.from(document.scripts).find(e=>n.test(e.src));if(e){const n=()=>{i({})};return e.addEventListener("load",n),()=>{e.removeEventListener("load",n)}}},[i,a,n]),we(()=>{if(!a){const e=setTimeout(()=>{i({})},1e3);return()=>clearTimeout(e)}}),a?r:null},cs=e=>{const{digitalWalletCode:n,digitalWalletOptions:t}=e,r=Ce(null),i=ke(()=>{r.current?.parentElement?.style.setProperty("display","block")},[]);let a=null;if("GOOGLE_PAY"===n)a=cn(ls,{scriptTagRegex:us.GOOGLE_PAY.scriptTagRegex,checkLoaded:us.GOOGLE_PAY.checkLoaded,children:cn(ds,{onReady:i,options:t})});return cn("div",{ref:r,children:a})},us={GOOGLE_PAY:{scriptTagRegex:/https:\/\/pay.google.com\/.*\/js\/pay.js/,checkLoaded:()=>"undefined"!=typeof google&&void 0!==google.payments}};class XenditComponents extends EventTarget{t=e=>{throw new Error("Localization used before initialization; this is a bug.")};[fn];constructor(e){if(super(),"undefined"==typeof window||"undefined"==typeof document)throw new Error("XenditComponents can only be instantiated in a browser");const n=function(e){if(!e)throw new Error("The componentsSdkKey option is missing; check the constructor parameters.");const n=e.split("-");if(n.length<4||n[2]!==Vn&&null===Wn(n[2]))throw new Error("The componentsSdkKey option has the wrong format. Ensure you pass the value returned from the `components_sdk_key` property of the `POST /sessions` response.");return{sessionAuthKey:[n[0],n[1]].join("-"),hostId:n[2],publicKey:n[3],signature:n[4]}}(e.componentsSdkKey);this[fn]={sdkKey:n,options:e,worldState:null,liveComponents:{channelPicker:null,paymentChannels:new Map,actionContainer:null,digitalWalletContainer:new Map},behaviorTree:new BehaviorTree(os,{sdk:this,sdkKey:n,mock:this.isMock(),sdkStatus:"LOADING",sdkFatalErrorMessage:null,channel:null,channelProperties:null,channelData:null,channelIsDigitalWallet:!1,instantSubmissionError:null,dispatchEvent:this.dispatchEvent.bind(this),world:null,submissionRequested:!1,simulatePaymentRequested:!1,actionCompleted:!1,pollImmediatelyRequested:!1}),currentChannelCode:null,currentDigitalWalletSubmission:null,eventListenersPresent:new Map},ct(this),this.addEventListener("fatal-error",e=>{const n=e;this[fn].eventListenersPresent.get("fatal-error")||console.error(`XenditComponents: A "fatal-error" event occurred but no event listener was attached: ${n.message}`)}),this[fn].eventListenersPresent.set("fatal-error",!1),this.behaviorTreeUpdate(),this.addEventListener(InternalUpdateWorldState.type,this.onUpdateWorldState.bind(this)),this.addEventListener(InternalUpdateChannelComponentData.type,this.onUpdateChannelComponentData.bind(this)),this.addEventListener(InternalBehaviorTreeUpdateEvent.type,this.behaviorTreeUpdate.bind(this));let t=!1;this.addEventListener(InternalNeedsRerenderEvent.type,()=>{t||(t=!0,queueMicrotask(()=>{t=!1,this.rerenderAllComponents(),this.syncInertAttribute()}))}),this.initializeAsync()}async initializeAsync(){let e;try{e=await Wa(this[fn].sdkKey,this[fn].sdkKey.sessionAuthKey),e.channels=e.channels.filter(e=>ut[e.channel_code])}catch(e){return this[fn].behaviorTree.bb.sdkStatus="FATAL_ERROR",this[fn].behaviorTree.bb.sdkFatalErrorMessage=nt(e),void this.behaviorTreeUpdate()}this.dispatchEvent(new InternalUpdateWorldState({business:e.business,customer:e.customer,session:e.session,channels:e.channels,channelUiGroups:e.channel_ui_groups,digitalWallets:e.digital_wallets??null,paymentEntity:null,sessionTokenRequestId:null,succeededChannel:null}))}assertInitialized(){if(!this[fn].worldState)throw new Error("The session data is not loaded. Listen for the `init` event. Only `createChannelPickerComponent` can be called before initialization.")}isMock(){return!1}isProdLive(){return"pl"===this[fn].sdkKey.hostId}findChannel(e){this.assertInitialized();return this[fn].worldState.channels.find(n=>n.channel_code===e)??null}onUpdateWorldState(e){const n=e.data;this[fn].worldState=jn(this[fn].worldState??{},n);const t=this[fn].worldState.session.locale;this.t=function(e){const n=oa[e];return function(...t){let r,i,a={};switch(t.length){case 1:r=t[0];break;case 2:"string"==typeof t[1]?(r=t[0],i=t[1]):(r=t[0],a=t[1]);break;case 3:r=t[0],i=t[1],a=t[2];break;default:throw new Error("Invalid arguments for t function")}let o=n?.[r];return void 0===o&&void 0!==i&&(o=i),o?o.replace(/\{\{(\w+)\}\}/g,(e,n)=>a[n]?String(a[n]):""):(console.warn(`Missing localization for key: ${r} in locale: ${e}`),r)}}(t),this.behaviorTreeUpdate(),this.rerenderAllComponents()}onUpdateChannelComponentData(e){const n=e.channelCode,t=e.data,r=this[fn].liveComponents.paymentChannels.get(n);r&&(r.data=jn(r.data,t),this.behaviorTreeUpdate(),this.rerenderAllComponents())}behaviorTreeUpdate(){const e=this[fn].behaviorTree.bb;if("LOADING"===e.sdkStatus&&this[fn].worldState&&(e.sdkStatus="ACTIVE"),e.world=this[fn].worldState,this[fn].currentDigitalWalletSubmission)e.channel=this.findChannel(this[fn].currentDigitalWalletSubmission.channelCode),e.channelProperties=this[fn].currentDigitalWalletSubmission.channelProperties,e.channelData=null,e.channelIsDigitalWallet=!0,e.instantSubmissionError=this[fn].currentDigitalWalletSubmission.instantSubmissionError;else{const n=this[fn].currentChannelCode?this[fn].liveComponents.paymentChannels.get(this[fn].currentChannelCode):null;e.channel=n?st(n.channel[fn],n.data.savePaymentMethod):null,e.channelProperties=n?n.channelProperties:null,e.channelData=n?n.data:null,e.channelIsDigitalWallet=!1}try{this[fn].behaviorTree.update()}catch(e){this[fn].behaviorTree.bb.sdkStatus="FATAL_ERROR",this[fn].behaviorTree.bb.sdkFatalErrorMessage=nt(e),this[fn].behaviorTree.update()}}getSdkStatus(){return this[fn].behaviorTree.bb.sdkStatus}rerenderAllComponents(){this.renderChannelPicker();for(const e of this[fn].liveComponents.paymentChannels.keys())this.renderPaymentChannel(e);for(const e of this[fn].liveComponents.digitalWalletContainer.keys())this.renderDigitalWalletComponent(e)}getSession(){return this.assertInitialized(),vt(this[fn].worldState.session)}getCustomer(){return this.assertInitialized(),this[fn].worldState.customer?(Bn((e=this[fn].worldState.customer).type,"INDIVIDUAL"),Un(e.individual_detail),{id:e.id,type:e.type,email:e.email??void 0,mobileNumber:e.mobile_number??void 0,individualDetail:{givenNames:e.individual_detail.given_names??void 0,surname:e.individual_detail.surname??void 0}}):null;var e}getActiveChannelGroups(e){return this.assertInitialized(),function(e,n,t){const r=Et(n),i=Pt(e,t);return n.filter(e=>i[e.id]?.length).map(e=>xt(e,i,r,t))}(this[fn].worldState.channels,this[fn].worldState.channelUiGroups,{options:{filter:e?.filter,filterMinMax:e?.filterMinMax??!0},session:this[fn].worldState.session,pairChannels:Nt(this[fn].worldState.channels)})}getActiveChannels(e){return this.assertInitialized(),function(e,n,t){const r=Et(n),i=Pt(e,t);return e.filter(e=>kt(e,t)).map(e=>Ct(e,i,r,t))}(this[fn].worldState.channels,this[fn].worldState.channelUiGroups,{options:{filter:e?.filter,filterMinMax:e?.filterMinMax??!0},session:this[fn].worldState.session,pairChannels:Nt(this[fn].worldState.channels)})}createChannelPickerComponent(){this[fn].liveComponents.channelPicker&&this.destroyComponent(this[fn].liveComponents.channelPicker);const e=document.createElement("xendit-channel-picker");return e.setAttribute("translate","no"),this[fn].liveComponents.channelPicker=e,this[fn].worldState&&this.renderChannelPicker(),this.setupUiEventsForChannelPicker(e),e}renderChannelPicker(){this.assertInitialized();const e=this[fn].liveComponents.channelPicker;e&&V(g(Dn,{data:this[fn].worldState,sdk:this,children:g(It,{})}),e)}setupUiEventsForChannelPicker(e){e.addEventListener(XenditClearCurrentChannelEvent.type,e=>{this.assertInitialized();const n=e,t=this[fn].currentChannelCode;if(!t)return;const r=this[fn].worldState.channels.find(e=>e.channel_code===t);r&&r.ui_group===n.uiGroup&&this.setCurrentChannel(null)})}createChannelComponent(e,n=!0){if(this.assertInitialized(),!lt(this[fn].worldState.session,e[fn][0]))throw new Error("Cannot create channel component: `session.amount` is outside of the channel's min/max amount.");const t=e[fn][0].channel_code;n&&(this[fn].currentChannelCode=t);const r=this[fn].liveComponents.paymentChannels.get(t);let i,a={current:null};return r?(i=r.element,a=r.channelFormRef):(i=document.createElement("xendit-payment-channel"),i.setAttribute("data-channel-code",t),i.setAttribute("inert",""),i.setAttribute("translate","no"),i.style.setProperty("--xendit-channel-brand-color",e[fn][0].brand_color),this.setupUiEventsForPaymentChannel(i),this[fn].liveComponents.paymentChannels.set(t,{element:i,channel:e,channelProperties:null,channelFormRef:a,data:{savePaymentMethod:!1,cardDetails:null,paymentOptions:null}})),this.renderPaymentChannel(t),n&&(this.behaviorTreeUpdate(),this.syncInertAttribute()),this.dispatchEvent(new InternalNeedsRerenderEvent),i}renderPaymentChannel(e){this.assertInitialized();const n=this[fn].liveComponents.paymentChannels.get(e);if(!n)return;const t=n.channel;V(g(Dn,{data:this[fn].worldState,sdk:this,children:g(Ka,{channelOrPair:t[fn],channelData:n.data,savePaymentMethod:n.data.savePaymentMethod,formRef:n.channelFormRef})}),n.element)}getActiveDigitalWallets(){return this.assertInitialized(),this[fn].worldState.digitalWallets?function(e,n,t,r){const i=[],a=Et(t);if(e.google_pay){const t=e.google_pay.allowed_payment_methods.map(e=>{const t=n.find(n=>n.channel_code===e.channel_code);return Un(t),t}),o=Pt(t,r);i.push({digitalWalletCode:"GOOGLE_PAY",get channels(){return t.map(e=>Ct(e,o,a,r))},[fn]:!0})}return i}(this[fn].worldState.digitalWallets,this[fn].worldState.channels,this[fn].worldState.channelUiGroups,{options:{filterMinMax:!1},pairChannels:Nt(this[fn].worldState.channels),session:this[fn].worldState.session}):[]}createDigitalWalletComponent(e,n){this.assertInitialized();const t=this[fn].liveComponents.digitalWalletContainer.get(e);t&&this.destroyComponent(t.element);const r=document.createElement("xendit-digital-wallet");return r.setAttribute("translate","no"),r.style.setProperty("display","none"),this[fn].liveComponents.digitalWalletContainer.set(e,{element:r,options:n}),this.renderDigitalWalletComponent(e),r}renderDigitalWalletComponent(e){this.assertInitialized();const n=this[fn].liveComponents.digitalWalletContainer.get(e);n&&V(g(Dn,{data:this[fn].worldState,sdk:this,children:g(cs,{digitalWalletCode:e,digitalWalletOptions:n.options})}),n.element)}getCurrentChannel(){const e=this[fn].currentChannelCode;return e?this.getActiveChannels().find(n=>{if(n.channelCode===e||Array.isArray(n.channelCode)&&n.channelCode.includes(e))return!0})??null:null}setCurrentChannel(e){const n=this[fn].currentChannelCode,t=e?.[fn][0].channel_code??null;if(n===t)return;this[fn].currentChannelCode=t;let r=null;e&&t&&(r=this[fn].liveComponents.paymentChannels.get(t)??null,r||(this.createChannelComponent(e,!1),r=this[fn].liveComponents.paymentChannels.get(t)??null)),this.behaviorTreeUpdate(),this.syncInertAttribute(),this.renderChannelPicker()}syncInertAttribute(){const e=this[fn].behaviorTree.bb.submissionRequested,n=this[fn].liveComponents.paymentChannels;for(const[t,r]of n){(Array.isArray(r.channel.channelCode)?r.channel.channelCode[0]:r.channel.channelCode)!==this[fn].currentChannelCode||e?r.element.setAttribute("inert",""):r.element.hasAttribute("inert")&&r.element.removeAttribute("inert")}}setupUiEventsForPaymentChannel(e){e.addEventListener(XenditChannelPropertiesChangedEvent.type,e=>{const n=e,t=n.channel,r=this[fn].liveComponents.paymentChannels.get(t);r&&(r.channelProperties=n.channelProperties,this.behaviorTreeUpdate())})}showValidationErrors(){if(!this[fn].behaviorTree.findBehavior(ChannelInvalidBehavior))return;const e=this[fn].currentChannelCode;if(!e)return;const n=this[fn].liveComponents.paymentChannels.get(e);if(!n)throw new Error("Current channel is set but component is missing; this is a bug, please contact support.");const t=n.channelFormRef.current;t?.setAllFieldsTouched()}createActionContainerComponent(e){this.assertInitialized(),this[fn].liveComponents.actionContainer&&this.destroyComponent(this[fn].liveComponents.actionContainer);const n=e===fn,t=n?void 0:e,r=this[fn].behaviorTree.findBehavior(PeRequiresActionBehavior);if(!n&&r&&!r.canCreateActionContainer)throw new Error("Unable to create action container; there is an action in progress. Create an action before or during the `action-begin` event.");const i=document.createElement("xendit-action-container");return i.setAttribute("translate","no"),t?.qrCode&&void 0!==t.qrCode.qrCodeOnly&&i.setAttribute("data-qr-code-only",t.qrCode.qrCodeOnly.toString()),this[fn].liveComponents.actionContainer=i,i}destroyComponent(e){if(!e.tagName.startsWith("XENDIT-"))throw new Error("Unable to destroy component; only elements created by this SDK can be destroyed.");if(this[fn].liveComponents.channelPicker===e)return this[fn].liveComponents.channelPicker=null,V(null,e),void e.remove();for(const[n,t]of this[fn].liveComponents.paymentChannels)if(t.element===e)return this[fn].liveComponents.paymentChannels.delete(n),this[fn].currentChannelCode===n&&this.setCurrentChannel(null),V(null,e),void e.remove();if(this[fn].liveComponents.actionContainer===e)return this[fn].liveComponents.actionContainer=null,V(null,e),void e.remove();for(const[n,t]of this[fn].liveComponents.digitalWalletContainer)if(t.element===e)return this[fn].liveComponents.digitalWalletContainer.delete(n),V(null,e),void e.remove();throw new Error("Unable to destroy component; component not found. It may have already been destroyed.")}submit(){this.assertInitialized();if(!this[fn].behaviorTree.findBehavior(SessionActiveBehavior))throw new Error("Unable to submit; the session is not in the active state. Listen to the `session-complete` and `session-expired-or-canceled` events and display success or failure states accordingly.");const e=this[fn].currentChannelCode;if(!e)throw new Error("Unable to submit; there is no current payment channel. Create a payment component with `createChannelComponent` or make an existing one active with `setCurrentChannel`.");if(!this[fn].liveComponents.paymentChannels.get(e))throw new Error("Current channel is set but component is missing; this is a bug, please contact support.");this.showValidationErrors();if(this[fn].behaviorTree.findBehavior(ChannelInvalidBehavior))throw new Error("Unable to submit; the form for the current channel has errors. Listen to the `submission-ready` and `submission-not-ready` events, do not allow submission while in the not-ready state.");if(!this[fn].behaviorTree.findBehavior(ChannelValidBehavior))throw new Error("Unable to submit; the SDK is not in a valid state for submission. Listen to the `submission-ready` and `submission-not-ready` events, do not allow submission while in the not-ready state.");this[fn].behaviorTree.bb.submissionRequested=!0,this.behaviorTreeUpdate(),this.syncInertAttribute()}submitDigitalWallet(e,n,t,r=null){this.assertInitialized(),this.setCurrentChannel(null),this[fn].currentDigitalWalletSubmission={digitalWalletCode:e,channelCode:n[fn][0].channel_code,channelProperties:t,instantSubmissionError:r},this.addEventListener(XenditSubmissionEndEvent.type,()=>{this[fn].currentDigitalWalletSubmission=null},{once:!0}),this[fn].behaviorTree.bb.submissionRequested=!0,this.behaviorTreeUpdate(),this.syncInertAttribute()}abortSubmission(){this.assertInitialized();this[fn].behaviorTree.findBehavior(SubmissionBehavior)&&(this[fn].behaviorTree.bb.submissionRequested=!1,this.behaviorTreeUpdate())}simulatePayment(){if(this.assertInitialized(),"PAY"!==this[fn].worldState.session.session_type)throw new Error('Unable to simulate payment, the session type is not "PAY".');if(!this[fn].behaviorTree.findBehavior(PeRequiresActionBehavior))throw new Error("Unable to simulate payment; there is no action in progress. You can simulate payments any time between the `action-begin` and `action-end` events.");const e=this[fn].worldState.paymentEntity;if(!e)throw new Error("The PeRequiresActionBehavior is present but there is no payment entity. This is a bug, please contact support.");const n=this.findChannel(e.entity.channel_code);if(!n)throw new Error("Channel not found; this is a bug, please contact support.");if(!function(e){switch(e.pm_type){case"QR_CODE":case"VIRTUAL_ACCOUNT":case"OVER_THE_COUNTER":return!0;default:return!1}}(n))throw new Error("Unable to simulate payment; the payment channel does not support simulation.");this[fn].behaviorTree.bb.simulatePaymentRequested=!0,this.behaviorTreeUpdate()}pollImmediately(){if(this.assertInitialized(),"ACTIVE"!==this[fn].worldState.session.status)throw new Error("Unable to poll immediately; the session is not longer active.");this[fn].behaviorTree.bb.pollImmediatelyRequested=!0,this.behaviorTreeUpdate()}getState(){const e=this[fn].currentChannelCode,n=this[fn].liveComponents.paymentChannels.get(e??"");return{channelCode:e,channelProperties:n?.channelProperties||null,behaviorTree:this[fn].behaviorTree}}addEventListener(e,n,t){return this[fn].eventListenersPresent.set(e,!0),super.addEventListener(e,n,t)}removeEventListener(e,n,t){return super.removeEventListener(e,n,t)}static amountFormat(e,n){return ta(e,n)}}class XenditComponentsTest extends XenditComponents{nextMockUpdate=null;constructor(e){super({...e,componentsSdkKey:`session-${Jn(32)}-mock-MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEyCADI5pdf6KmN8+Fxl2ES3yolUKXunNeY3gGScGNEvDcrcHAPKxIInAo5DVnDvTtYtqZvx/bu7HLeBJNMXwHhie/uyNEtT8dSaLc9bd0WSlYdxI+iUsTv2Qu0LiiPrZs-NKf7whM9meUs/eRCvG0oc180MDiyeli3kH6EQ3ZahECHsZQi5G2IpH6vk3cYMtf01Y1L4OBn1SZCOv1kwpjIUet4DJeoTwwq2nM5b+K7rD+/WFTi3AEX4NWJNkKi0a91`}),this.addEventListener(InternalScheduleMockUpdateEvent.type,this.setNextMockUpdate.bind(this))}async initializeAsync(){await qn(Ln);const e=(await Promise.resolve().then(function(){return hs})).makeTestBffData();this.dispatchEvent(new InternalUpdateWorldState({business:e.business,customer:e.customer,session:e.session,channels:e.channels,channelUiGroups:e.channel_ui_groups,digitalWallets:e.digital_wallets??null,paymentEntity:null,sessionTokenRequestId:null,succeededChannel:null}))}isMock(){return!0}setNextMockUpdate(e){const n=e;this.nextMockUpdate=n.mockData}}"undefined"==typeof window||"undefined"==typeof document||(mn||(mn=!0,t.debounceRendering=e=>queueMicrotask(e)),function(){const e=document.createElement("style");e.textContent='/* variables */\n:root {\n --xendit-font-family: sans-serif;\n --xendit-color-primary: #1762ee;\n --xendit-color-text: #252525;\n --xendit-color-text-secondary: #585858;\n --xendit-color-text-placeholder: #7d7d7d;\n --xendit-color-disabled: #f7f7f7;\n --xendit-color-danger: #d1414d;\n --xendit-color-border: #f3f3f3;\n --xendit-color-background: #ffffff;\n --xendit-focus-shadow: 0px 0px 0px 2px\n color-mix(in srgb, var(--xendit-color-primary) 15%, transparent);\n --xendit-animation-duration: 0.3s;\n --xendit-animation-ease: ease-in-out;\n --xendit-radius-1: 8px;\n --xendit-z-index-focus: 2;\n\n /* Browser-specific border collapse margins */\n --xendit-border-collapse-offset: -0.5px; /* Default for Chrome/Edge */\n --xendit-border-collapse-webkit-gecko: -1.5px; /* Fix Safari and Firefox subpixel rendering */\n\n /* QR code colors */\n --xendit-qr-foreground-color: #000000;\n --xendit-qr-background-color: #ffffff;\n\n /* icon colors */\n --xendit-color-icon-primary: #7c7c7c;\n --xendit-color-icon-secondary: #f1f1f1;\n}\n\n/* Set default font for root components */\nxendit-channel-picker,\nxendit-action-container,\nxendit-payment-channel {\n display: block;\n unicode-bidi: isolate;\n font-family: var(--xendit-font-family);\n color: var(--xendit-color-text);\n}\n\n.xendit-default-action-container {\n font-family: var(--xendit-font-family);\n}\n\nxendit-action-container {\n background-color: var(--xendit-color-background);\n flex: 1; /* Action container usually wants to stretch to fit, assuming the parent is a flexbox. */\n}\n\nxendit-payment-channel button,\nxendit-payment-channel textarea,\nxendit-payment-channel select,\nxendit-payment-channel input,\nxendit-payment-channel input::placeholder {\n font-family: inherit;\n}\n\nxendit-payment-channel input::placeholder,\nxendit-payment-channel textarea::placeholder,\nxendit-payment-channel select::placeholder {\n color: var(--xendit-color-text-placeholder);\n}\n\n/* Reusable typography classes */\n.xendit-text-12 {\n font-size: 12px;\n line-height: 16px;\n letter-spacing: -0.01px;\n}\n\n.xendit-text-14 {\n font-size: 14px;\n line-height: 16px;\n letter-spacing: -0.09px;\n}\n\n.xendit-text-16 {\n font-size: 16px;\n line-height: 16px;\n letter-spacing: -0.09px;\n}\n\n.xendit-text-18 {\n font-size: 18px;\n line-height: 24px;\n letter-spacing: -0.26px;\n}\n\n.xendit-text-20 {\n font-size: 20px;\n line-height: 28px;\n letter-spacing: -0.33px;\n}\n\n.xendit-text-12,\n.xendit-text-14,\n.xendit-text-16 {\n font-weight: 400;\n}\n\n.xendit-text-semibold {\n font-weight: 600;\n}\n\n.xendit-text-bold {\n font-weight: 700;\n}\n\n.xendit-text-secondary {\n color: var(--xendit-color-text-secondary);\n}\n\n.xendit-text-center {\n text-align: center;\n}\n\n/* Accordion component */\n\n.xendit-accordion {\n display: flex;\n flex-direction: column;\n border: 1px solid var(--xendit-color-border);\n border-radius: var(--xendit-radius-1);\n background: var(--xendit-color-background);\n}\n\n.xendit-accordion-item:not(:first-child) {\n border-top: 1px solid var(--xendit-color-border);\n border-top-left-radius: var(--xendit-radius-1);\n border-top-right-radius: var(--xendit-radius-1);\n}\n\n.xendit-accordion-item-header {\n display: grid;\n grid-template-columns: auto 1fr auto;\n grid-gap: 16px;\n align-items: center;\n cursor: pointer;\n padding: 24px 16px;\n color: var(--xendit-color-text);\n border-radius: 8px;\n}\n\n.xendit-accordion-item-disabled .xendit-accordion-item-header {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.xendit-accordion-item-header-title {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.xendit-accordion-item-disabled .xendit-accordion-item-header-title,\n.xendit-accordion-item-disabled .xendit-accordion-item-header-icon {\n opacity: 0.5;\n}\n\n.xendit-accordion-item.xendit-accordion-item-open\n .xendit-accordion-item-header {\n color: var(--xendit-color-primary);\n}\n\n.xendit-accordion-item-chevron {\n color: var(--xendit-color-text);\n}\n\n.xendit-accordion-item-disabled .xendit-accordion-item-chevron {\n display: none;\n}\n\n.xendit-accordion-item-chevron g {\n transition: transform var(--xendit-animation-duration)\n var(--xendit-animation-ease);\n}\n\n.xendit-accordion-item-header:focus-visible {\n border-radius: 8px;\n box-shadow: 0px 0px 0px 2px\n color-mix(in srgb, var(--xendit-color-primary) 15%, transparent);\n outline: none;\n}\n\n.xendit-accordion-item-content {\n overflow: hidden;\n transition: height var(--xendit-animation-duration)\n var(--xendit-animation-ease);\n}\n\n.xendit-accordion-item.xendit-accordion-item-closed\n .xendit-accordion-item-content {\n height: 0;\n}\n\n.xendit-accordion-item.xendit-accordion-item-open\n .xendit-accordion-item-content {\n height: calc-size(auto, size);\n}\n\n.xendit-accordion-item-padding {\n padding: 16px;\n}\n\n/* Channel picker digital wallet section */\n\n.xendit-channel-picker-digital-wallet-section {\n display: grid;\n grid-auto-flow: column;\n grid-auto-columns: 1fr;\n gap: 8px;\n margin-bottom: 8px;\n}\n\n/* Channel picker group */\n\n.xendit-channel-picker-group {\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n\n.xendit-channel-picker-group select {\n border: 1px solid var(--xendit-color-border);\n border-radius: 8px;\n padding: 12px;\n appearance: none;\n outline: none;\n}\n\n.xendit-channel-picker-group select:focus {\n box-shadow: 0px 0px 0px 2px\n color-mix(in srgb, var(--xendit-color-primary) 15%, transparent);\n}\n\n.xendit-channel-logo {\n width: 24px;\n height: 16px;\n margin: -5px 0;\n padding: 4px;\n border: 1px solid var(--xendit-color-border);\n border-radius: 4px;\n background-color: white; /* always white, not --xendit-color-background */\n object-fit: contain;\n}\n\n/* Payment channel */\n\nxendit-payment-channel[inert] {\n filter: opacity(0.5) grayscale(1);\n}\n\n.xendit-payment-channel {\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n\n.xendit-payment-channel-banner {\n width: 100%;\n height: auto;\n object-fit: contain;\n}\n\n.xendit-payment-channel-instructions {\n display: grid;\n grid-template-columns: auto 1fr;\n grid-gap: 12px;\n color: var(--xendit-color-text-secondary);\n}\n\n.xendit-payment-channel-instructions-logo {\n height: 40px;\n width: auto;\n object-fit: contain;\n}\n\n.xendit-payment-channel-instructions-text {\n display: flex;\n flex-direction: column;\n justify-content: center;\n gap: 4px;\n}\n\n.xendit-payment-channel-instructions-text p {\n margin: 0;\n}\n\n/* Forms */\n\n.xendit-channel-form {\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n\n.xendit-channel-form > form {\n display: contents;\n}\n\n.xendit-form-field-group {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n}\n\n.xendit-channel-form-field {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.xendit-channel-form-field-group {\n display: grid;\n gap: 8px;\n}\n\n.xendit-channel-form-field-group label {\n width: fit-content;\n cursor: pointer;\n}\n\n.xendit-form-field-group.invalid .xendit-channel-form-field input,\n.xendit-form-field-group.invalid\n .xendit-channel-form-field\n .xendit-iframe-container,\n.xendit-form-field-group.invalid .xendit-dropdown button {\n border: 1px solid var(--xendit-color-danger);\n}\n\n.xendit-channel-form-field input:not([type="checkbox"]),\n.xendit-channel-form-field select,\n.xendit-channel-form-field .xendit-iframe-container {\n display: flex;\n border: 1px solid var(--xendit-color-border);\n background: var(--xendit-color-background);\n border-radius: 8px;\n padding: 12px;\n appearance: none;\n}\n\n/* TODO: Refine these class usages */\n.xendit-channel-form-field.field-radius-tl-0 input,\n.xendit-channel-form-field.field-radius-tl-0 button,\n.xendit-channel-form-field.field-radius-tl-0 .xendit-iframe-container {\n border-top-left-radius: 0;\n}\n\n.xendit-channel-form-field.field-radius-tr-0 input,\n.xendit-channel-form-field.field-radius-tr-0 button,\n.xendit-channel-form-field.field-radius-tr-0 .xendit-iframe-container {\n border-top-right-radius: 0;\n}\n\n.xendit-channel-form-field.field-radius-bl-0 input,\n.xendit-channel-form-field.field-radius-bl-0 button,\n.xendit-channel-form-field.field-radius-bl-0 .xendit-iframe-container {\n border-bottom-left-radius: 0;\n}\n\n.xendit-channel-form-field.field-radius-br-0 input,\n.xendit-channel-form-field.field-radius-br-0 button,\n.xendit-channel-form-field.field-radius-br-0 .xendit-iframe-container {\n border-bottom-right-radius: 0;\n}\n\n.xendit-channel-form-field.field-collapse-l,\n.xendit-channel-form-field.field-collapse-l {\n margin-left: var(--xendit-border-collapse-offset);\n}\n\n.xendit-channel-form-field.field-collapse-r,\n.xendit-channel-form-field.field-collapse-r {\n margin-right: var(--xendit-border-collapse-offset);\n}\n\n.xendit-channel-form-field.field-collapse-l .xendit-iframe-container {\n margin-left: calc(var(--xendit-border-collapse-offset) * 2);\n width: calc(100% + abs(var(--xendit-border-collapse-offset) * 2));\n}\n\n.xendit-channel-form-field.field-collapse-r .xendit-iframe-container {\n margin-right: 0;\n}\n\n.xendit-channel-form-field.field-collapse-t input,\n.xendit-channel-form-field.field-collapse-t button,\n.xendit-channel-form-field.field-collapse-t .xendit-iframe-container {\n margin-top: var(--xendit-border-collapse-offset);\n}\n\n.xendit-channel-form-field.field-collapse-b input,\n.xendit-channel-form-field.field-collapse-b button,\n.xendit-channel-form-field.field-collapse-b .xendit-iframe-container {\n margin-bottom: var(--xendit-border-collapse-offset);\n}\n\n/* Safari and Firefox specific adjustments */\n@supports (font: -apple-system-body) or (-moz-appearance: none) {\n .xendit-channel-form-field.field-collapse-l .xendit-iframe-container {\n margin-left: 0;\n width: 100%;\n }\n\n .xendit-channel-form-field.field-collapse-b input,\n .xendit-channel-form-field.field-collapse-b button {\n margin-bottom: var(--xendit-border-collapse-webkit-gecko);\n height: calc(100% + abs(var(--xendit-border-collapse-webkit-gecko) * 2));\n }\n}\n\n.xendit-channel-form-field.field-collapse-r .xendit-iframe-container:focus {\n border-right: none;\n}\n\n.xendit-channel-form-field.field-collapse-l .xendit-iframe-container:focus {\n border-left: none;\n}\n/* Ends TODO */\n\n.xendit-card-brand-logo {\n width: 24px;\n height: 16px;\n border: 1px solid var(--xendit-color-border);\n border-radius: 4px;\n padding: 4px;\n background-color: white; /* always white, not --xendit-color-background */\n}\n\n.xendit-card-brands-list {\n display: flex;\n align-items: center;\n padding: 8px 12px;\n gap: 4px;\n}\n\n.xendit-channel-form-field input:focus,\n.xendit-channel-form-field select:focus,\n.xendit-channel-form-field .xendit-iframe-container.xendit-field-focus {\n border-color: var(--xendit-color-primary);\n box-shadow: var(--xendit-focus-shadow);\n outline: none;\n z-index: var(--xendit-z-index-focus);\n}\n\n.xendit-channel-form-field button:focus {\n position: relative;\n z-index: var(--xendit-z-index-focus);\n}\n\n.xendit-channel-form-field .xendit-iframe-container {\n height: 40px;\n width: 100%;\n padding: 0;\n overflow: hidden;\n box-sizing: border-box;\n}\n\n.xendit-channel-form-field .xendit-iframe-container iframe {\n height: 40px;\n width: 100%;\n border: none;\n min-width: 0;\n}\n\n.xendit-channel-form-field.xendit-form-field-span-1 {\n grid-column: span 1;\n}\n\n.xendit-channel-form-field.xendit-form-field-span-2 {\n grid-column: span 2;\n}\n\n.xendit-checkbox {\n display: flex;\n align-items: center;\n}\n\n.xendit-checkbox-box {\n display: flex;\n}\n\n.xendit-checkbox input {\n width: 16px;\n height: 16px;\n margin: 0;\n cursor: pointer;\n}\n\n.xendit-checkbox label {\n cursor: pointer;\n padding-left: 8px;\n}\n\n.xendit-checkbox input {\n opacity: 0;\n position: absolute;\n}\n\n.xendit-checkbox input + .xendit-checkbox-graphic {\n width: 16px;\n height: 16px;\n border: 1px solid var(--xendit-color-border);\n border-radius: 4px;\n box-sizing: border-box;\n color: transparent;\n}\n\n.xendit-checkbox input:checked + .xendit-checkbox-graphic {\n color: var(--xendit-color-background);\n background-color: var(--xendit-color-primary);\n border-color: var(--xendit-color-primary);\n}\n\n/* Dialog */\n\n.xendit-dialog-backdrop {\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n background: rgba(0, 0, 0, 0.5);\n display: flex;\n padding: 48px;\n justify-content: center;\n align-items: center;\n}\n\n.xendit-dialog {\n background-color: var(--xendit-color-background);\n border-radius: 8px;\n position: relative;\n}\n\n.xendit-dialog-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n color: var(--xendit-color-text);\n padding: 16px;\n gap: 16px;\n line-height: 20px;\n border-bottom: 1px solid var(--xendit-color-border);\n}\n\n.xendit-dialog-header button {\n display: flex;\n background: none;\n border: none;\n color: var(--xendit-color-text);\n cursor: pointer;\n padding: 0;\n}\n\n.xendit-dialog-floating-close {\n position: absolute;\n top: 24px;\n right: 24px;\n background: none;\n border: none;\n color: var(--xendit-color-text);\n cursor: pointer;\n padding: 0;\n}\n\n.xendit-dialog-body {\n display: flex;\n padding: 24px;\n}\n\n.xendit-error-message {\n color: var(--xendit-color-danger);\n}\n\n/* Phone input Dropdown */\n.xendit-input-phone .xendit-combobox {\n display: flex;\n gap: 8px;\n}\n\n.xendit-phone-number-input {\n width: 100%;\n}\n\n.xendit-input-phone .xendit-dropdown button {\n width: 64px;\n}\n\n.xendit-input-phone .xendit-dropdown button .xendit-dropdown-button-title {\n display: none;\n}\n\n.xendit-dropdown .xendit-dropdown-search input {\n padding: 8px;\n border: 1px solid var(--xendit-color-border);\n border-radius: var(--xendit-radius-1);\n box-sizing: border-box;\n}\n\n.xendit-dropdown-search input:focus {\n outline: none;\n border-color: var(--xendit-color-primary);\n box-shadow: var(--xendit-focus-shadow);\n}\n\n/* Phone input Dropdown ends */\n\n/* Dropdown */\n.xendit-dropdown button {\n width: 100%;\n display: grid;\n grid-template-columns: 1fr auto;\n align-items: center;\n gap: 8px;\n text-align: left;\n background-color: var(--xendit-color-background);\n border: 1px solid var(--xendit-color-border);\n border-radius: var(--xendit-radius-1);\n justify-content: space-between;\n padding: 12px;\n cursor: pointer;\n}\n\n.xendit-dropdown button.xendit-dropdown-has-asset {\n grid-template-columns: auto 1fr auto;\n}\n\n.xendit-dropdown button:disabled {\n background: var(--xendit-color-disabled);\n}\n\n.xendit-dropdown button:focus {\n outline: none;\n border: 1px solid var(--xendit-color-primary);\n box-shadow: 0px 0px 0px 2px #1762ee26;\n}\n\n.xendit-dropdown-menu {\n position: absolute;\n z-index: 1;\n display: flex;\n flex-direction: column;\n gap: 4px;\n max-height: 168px;\n width: 257px;\n padding: 4px;\n margin: 4px 0;\n background-color: var(--xendit-color-background);\n border: 1px solid var(--xendit-color-border);\n border-radius: var(--xendit-radius-1);\n list-style: none;\n box-shadow: 0px 4px 8px 0px #25252514;\n overflow-y: auto;\n}\n\n.xendit-dropdown-menu ul {\n list-style: none;\n padding: 4px;\n margin-top: 0;\n}\n\n.xendit-dropdown-search {\n position: sticky;\n top: 0;\n z-index: 1;\n}\n\n.xendit-dropdown-search input {\n width: 100%;\n}\n\n.xendit-dropdown-item {\n display: grid;\n grid-template-columns: 1fr auto;\n align-items: center;\n gap: 8px;\n padding: 8px 12px 8px 4px;\n border-radius: var(--xendit-radius-1);\n cursor: pointer;\n z-index: 0;\n --xendit-dropdown-item-hover-color: var(--xendit-color-background);\n --xendit-dropdown-item-hover-bg-color: var(--xendit-color-primary);\n}\n\n.xendit-dropdown-item-disabled {\n --xendit-dropdown-item-hover-color: var(--xendit-color-text);\n --xendit-dropdown-item-hover-bg-color: var(--xendit-color-disabled);\n}\n\n.xendit-dropdown-item-active {\n box-shadow: var(--xendit-focus-shadow);\n}\n\n.xendit-dropdown-item:hover {\n background-color: var(--xendit-dropdown-item-hover-bg-color);\n}\n\n.xendit-dropdown-item:hover .xendit-dropdown-item-text,\n.xendit-dropdown-item:hover .xendit-dropdown-item-description {\n color: var(--xendit-dropdown-item-hover-color);\n}\n\n.xendit-dropdown-item-selected {\n color: var(--xendit-color-primary);\n}\n\n.xendit-dropdown-item:hover .xendit-dropdown-item-selected {\n color: var(--xendit-dropdown-item-hover-color);\n}\n\n.xendit-dropdown-item.xendit-dropdown-has-asset {\n grid-template-columns: auto 1fr auto;\n}\n\n.xendit-dropdown-item-text {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.xendit-dropdown-item-disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n.xendit-dropdown-item-disabled:hover,\n.xendit-dropdown-item-disabled.xendit-dropdown-item-active {\n background-color: var(--xendit-color-disabled);\n}\n\n/* Dropdown ends */\n\n/* Button */\n.xendit-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n padding: 12px 16px;\n font-family: var(--xendit-font-family);\n font-size: 14px;\n font-weight: 600;\n line-height: 16px;\n letter-spacing: -0.09px;\n cursor: pointer;\n transition: background-color var(--xendit-animation-duration)\n var(--xendit-animation-ease);\n}\n.xendit-button-primary-rounded {\n border: 1px solid transparent;\n background-color: var(--xendit-color-primary);\n color: var(--xendit-color-background);\n border-radius: var(--xendit-radius-1);\n}\n.xendit-button-white-rounded {\n background-color: var(--xendit-color-background);\n color: var(--xendit-color-text);\n border: 1px solid var(--xendit-color-border);\n border-radius: var(--xendit-radius-1);\n}\n.xendit-button-white-rounded:hover {\n background-color: var(--xendit-color-border);\n}\n.xendit-button-block {\n width: 100%;\n}\n.xendit-button-sm {\n padding: 8px 12px;\n font-size: 12px;\n line-height: 16px;\n}\n\n@keyframes xendit-button-loading-spinner-spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n\n.xendit-button-loading-spinner {\n width: 16px;\n height: 16px;\n animation: xendit-button-loading-spinner-spin 1s linear infinite;\n}\n\n.xendit-skeleton-field button {\n height: 42px;\n background-color: var(--xendit-color-disabled);\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--xendit-color-text-secondary);\n}\n\n/* Button ends */\n\n.xendit-dotted-line {\n height: 1px;\n border: none;\n background: repeating-linear-gradient(\n to right,\n var(--xendit-color-border) 0px 4px,\n transparent 4px 8px\n );\n margin: 16px 0;\n}\n\n.xendit-tooltip {\n position: absolute;\n top: 100%;\n right: 50%;\n transform: translateX(50%);\n background-color: black;\n color: white;\n padding: 8px 12px;\n border-radius: var(--xendit-radius-1);\n white-space: nowrap;\n z-index: 1000;\n font-weight: 600;\n font-size: 14px;\n line-height: 16px;\n animation: xendit-tooltip-fade-in var(--xendit-animation-duration)\n var(--xendit-animation-ease);\n opacity: 1;\n}\n\n@keyframes xendit-tooltip-fade-in {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n/* Instructions */\n\n.xendit-instructions-bold {\n font-weight: 600;\n}\n.xendit-instructions-bullet-list {\n display: flex;\n flex-direction: column;\n gap: 12px;\n margin: 8px 0;\n}\n.xendit-instructions-bullet-list::marker {\n color: var(--xendit-color-text-secondary);\n}\n.xendit-instructions-form-card {\n display: flex;\n flex-direction: column;\n padding: 16px;\n border-radius: 12px;\n border: 1px solid var(--xendit-color-border);\n gap: 4px;\n width: 321px;\n}\n.xendit-instructions-form-field {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 8px 0;\n border-bottom: 1px solid var(--xendit-color-border);\n}\n.xendit-instructions-form-field-label {\n font-size: 12px;\n font-weight: 600;\n line-height: 16px;\n color: var(--xendit-color-text-secondary);\n}\n.xendit-instructions-form-field-value {\n font-size: 14px;\n line-height: 20px;\n color: var(--xendit-color-text);\n}\n.xendit-instructions-form-heading {\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n margin: 4px 0;\n}\n.xendit-instructions-italics {\n font-style: italic;\n}\n.xendit-instructions-numbered-list {\n display: flex;\n flex-direction: column;\n gap: 16px;\n list-style-type: decimal;\n padding-left: 40px;\n}\n.xendit-instructions-single-tab-heading {\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n margin-bottom: 16px;\n}\n.xendit-instructions-step-box {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.xendit-instructions-step-li {\n font-size: 14px;\n line-height: 20px;\n}\n.xendit-instructions-step-li p {\n margin: 0;\n}\n.xendit-instructions-step-li::marker {\n margin-left: 20px;\n}\n.xendit-instructions-tab-button {\n font-family: var(--xendit-font-family);\n font-size: 14px;\n padding: 8px 4px;\n background-color: transparent;\n border: none;\n border-top: 3px solid transparent;\n border-bottom: 3px solid transparent;\n}\n.xendit-instructions-active-tab {\n border-bottom-color: var(--xendit-color-primary);\n color: var(--xendit-color-primary);\n font-weight: 600;\n}\n.xendit-instructions-tab-list {\n display: flex;\n gap: 16px;\n margin-bottom: 16px;\n border-bottom: 1px solid var(--xendit-color-border);\n}\n.xendit-instructions-table {\n font-size: 14px;\n line-height: 16px;\n width: 100%;\n border-collapse: collapse;\n}\n.xendit-instructions-table-cell {\n padding: 4px;\n border: 1px solid black;\n}\n.xendit-instructions-table-header {\n font-size: 14px;\n font-weight: 600;\n line-height: 16px;\n padding: 4px;\n border: 1px solid black;\n}\n\n/* Instructions ends */\n\n.xendit-default-action-container {\n display: flex;\n flex-direction: column;\n border: none;\n}\n\n.xendit-action-title {\n font-weight: 600;\n font-size: 20px;\n line-height: 28px;\n text-align: center;\n}\n\n.xendit-action-iframe {\n border: none;\n width: 100%;\n height: 100%;\n}\n\n.xendit-action-present-to-customer {\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n.xendit-action-qr-content {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 16px;\n max-width: 384px;\n border: 1px solid var(--xendit-color-border);\n border-radius: var(--xendit-radius-1);\n padding: 16px;\n padding-bottom: 24px;\n}\n.xendit-action-qr-channel-logo {\n height: 64px;\n object-fit: contain;\n}\n.xendit-action-qr-qrcode-container {\n width: 100%;\n}\n\n/* va actions */\n.xendit-action-va-content {\n display: flex;\n flex-direction: column;\n border: 1px solid var(--xendit-color-border);\n border-radius: var(--xendit-radius-1);\n padding: 16px;\n padding-bottom: 24px;\n}\n.xendit-action-va-details {\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n.xendit-action-va-detail-item {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n.xendit-action-va-detail-content {\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n.xendit-action-va-heading {\n color: var(--xendit-color-text-placeholder);\n}\n.xendit-action-va-tag {\n color: var(--xendit-color-text-placeholder);\n background-color: #fafafa;\n padding: 2px 4px;\n border-radius: 4px;\n}\n\n/* redirect, deeplink, and push notification actions */\n.xendit-redirect-instructions {\n display: flex;\n flex-direction: column;\n align-items: center;\n text-align: center;\n gap: 24px;\n}\n\n.xendit-redirect-instructions-logo {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 112px;\n height: 112px;\n border: 2px solid var(--xendit-color-border);\n border-radius: 50%;\n overflow: hidden;\n}\n\n.xendit-redirect-instructions-logo img {\n width: 96px;\n height: 96px;\n object-fit: contain;\n}\n\n.xendit-redirect-instructions-text {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.xendit-redirect-instructions-button {\n display: inline-block;\n border-radius: 99px;\n color: white;\n padding: 12px 16px;\n background-color: var(--xendit-channel-brand-color, #000);\n text-decoration: none;\n white-space: nowrap;\n}\n\n.xendit-redirect-instructions-button:hover,\n.xendit-redirect-instructions-button:active {\n filter: brightness(1.1);\n}\n\n/* googlepay */\n\n.gpay-card-info-container-fill {\n display: flex;\n}\n';const n=document.querySelector("style, link");n?n.insertAdjacentElement("beforebegin",e):document.head.appendChild(e)}(),function(){const e=document.createElement("svg");e.id="xendit-icon-set",e.style.display="none",V(cn("defs",{children:pn.map(e=>e.node)}),e),document.head.appendChild(e)}());var hs=Object.freeze({__proto__:null,makeTestBffData:function(){const e=(new Date).toISOString(),n=new Date(Date.now()+2592e6).toISOString();return{session:{payment_session_id:`ps-${Jn(24)}`,created:e,updated:e,status:"ACTIVE",reference_id:Qn(),description:"Test session",currency:"IDR",amount:1e4,country:"ID",expires_at:n,session_type:"PAY",mode:"COMPONENTS",locale:"en",business_id:Jn(24),customer_id:`cust-${Qn()}`,capture_method:"AUTOMATIC",allow_save_payment_method:"OPTIONAL",items:[{reference_id:Qn(),type:"DIGITAL_PRODUCT",name:"Item 1",net_unit_amount:5e4,quantity:1,category:""},{reference_id:Qn(),type:"DIGITAL_SERVICE",name:"Item 2",net_unit_amount:5e4,quantity:1,category:""}]},business:{name:"Components Mock Merchant",country_of_operation:"Indonesia",merchant_profile_picture_url:"https://placehold.co/256x256.png?text=Logo"},customer:{type:"INDIVIDUAL",id:`cust-${Qn()}`,email:"exa**@example.com",mobile_number:null,phone_number:null,individual_detail:{given_names:"exa********",surname:null},business_detail:null},channels:[{brand_name:"Cards",channel_code:"CARDS",brand_logo_url:"https://assets.xendit.co/payment-session/logos/CARDS.svg",ui_group:"cards",allow_pay_without_save:!0,allow_save:!0,brand_color:"#000000",min_amount:5e3,max_amount:2e8,requires_customer_details:!1,_mock_action_type:"IFRAME",card:{brands:[{name:"VISA",logo_url:"https://assets.xendit.co/payment-session/logos/VISA.svg"},{name:"MASTERCARD",logo_url:"https://assets.xendit.co/payment-session/logos/MASTERCARD.svg"},{name:"JCB",logo_url:"https://assets.xendit.co/payment-session/logos/JCB.svg"}]},form:[{group_label:"Card Details",label:"Card Number",placeholder:"1234 1234 1234 1234",type:{name:"credit_card_number"},channel_property:"card_details.card_number",required:!0,span:2},{label:"Card Expiry Date",placeholder:"MM/YY",type:{name:"credit_card_expiry"},channel_property:["card_details.expiry_month","card_details.expiry_year"],required:!0,span:1,join:!0},{label:"CVN",placeholder:"CVV",type:{name:"credit_card_cvn"},channel_property:"card_details.cvn",required:!0,span:1,join:!0},{group_label:"Cardholder Name",label:"First Name",placeholder:"First Name",type:{name:"text",min_length:1,max_length:50,regex_validators:[{regex:"/^[a-zA-Z\\u00C0-\\u017F\\s]+$/",message:"Invalid input. Please use alphabetic characters only"}]},channel_property:"card_details.cardholder_first_name",required:!0,span:1},{label:"Last Name",placeholder:"Last Name",type:{name:"text",min_length:1,max_length:50,regex_validators:[{regex:"/^[ -~]+$/",message:"Invalid input. Please use alphabetic characters only"}]},channel_property:"card_details.cardholder_last_name",required:!0,span:1},{label:"Email",placeholder:"john.doe@example.com",type:{name:"email"},channel_property:"card_details.cardholder_email",required:!0,span:2},{label:"Mobile Number",placeholder:"8000032341",type:{name:"phone_number"},channel_property:"card_details.cardholder_phone_number",required:!0,span:2},{label:"Installment plan",placeholder:"Select installment plan",type:{name:"installment_plan"},channel_property:["installment_configuration.terms","installment_configuration.interval","installment_configuration.code"],required:!1,span:2},{group_label:"Billing Address",label:"First Name",placeholder:"First Name",type:{name:"text",max_length:255},channel_property:"billing_information.first_name",span:1,required:!0,flags:{require_billing_information:!0}},{label:"Last Name",placeholder:"Last Name",type:{name:"text",max_length:255},channel_property:"billing_information.last_name",span:1,required:!0,flags:{require_billing_information:!0},join:!0},{label:"Email",placeholder:"Email",type:{name:"text",max_length:255},channel_property:"billing_information.email",span:2,required:!0,flags:{require_billing_information:!0},join:!0},{label:"Country",placeholder:"Country",type:{name:"country"},channel_property:"billing_information.country",span:1,required:!0,flags:{require_billing_information:!0},join:!0},{label:"Province",placeholder:"State / Province",type:{name:"province"},channel_property:"billing_information.province_state",span:1,required:!0,flags:{require_billing_information:!0},join:!0},{label:"City",placeholder:"City",type:{name:"text",max_length:255},channel_property:"billing_information.city",span:2,required:!0,flags:{require_billing_information:!0},join:!0},{label:"Address Line 1",placeholder:"Address Line 1",type:{name:"text",max_length:255},channel_property:"billing_information.street_line1",span:2,required:!0,flags:{require_billing_information:!0},join:!0},{label:"Address Line 2",placeholder:"Address Line 2",type:{name:"text",max_length:255},channel_property:"billing_information.street_line2",span:2,required:!0,flags:{require_billing_information:!0},join:!0},{label:"Postal Code",placeholder:"Postal Code",type:{name:"postal_code"},channel_property:"billing_information.postal_code",span:2,required:!0,flags:{require_billing_information:!0},join:!0}],instructions:["Mock Cards channel","This mock channel behaves similarly to the production CARDS channel."]},{brand_name:"Mock E-Wallet Channel (Redirect action)",channel_code:"MOCK_EWALLET",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,_mock_action_type:"REDIRECT",form:[],instructions:["Mock E-Wallet channel","This mock channel behaves similarly to production E-Wallets channels with no user input."]},{brand_name:"Mock E-Wallet Channel (Iframe action)",channel_code:"MOCK_EWALLET_IFRAME",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,_mock_action_type:"IFRAME",form:[],instructions:["Mock E-Wallet channel","This mock channel has as iframe action."]},{brand_name:"Mock E-Wallet Channel (Deeplink action)",channel_code:"MOCK_EWALLET_DEEP_LINK",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,_mock_action_type:"DEEP_LINK",form:[],instructions:["Mock E-Wallet channel","This mock channel has a deeplink action."]},{brand_name:"Mock E-Wallet Channel (Push notification action)",channel_code:"MOCK_EWALLET_PUSH_NOTIFICATION",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,_mock_action_type:"PUSH_NOTIFICATION",form:[],instructions:["Mock E-Wallet channel","This mock channel has a deeplink action."]},{brand_name:"Mock E-Wallet Channel (Phone input)",channel_code:"MOCK_EWALLET_WITH_PHONE",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,_mock_action_type:"REDIRECT",form:[{label:"Phone Number",placeholder:"123 123 132",type:{name:"phone_number"},channel_property:"phone_number_field",required:!0,span:2}],instructions:["Mock E-Wallet channel","This mock channel behaves similarly to production E-Wallets channels with a phone number input."]},{brand_name:"Mock QR Channel",channel_code:"MOCK_QR",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,_mock_action_type:"QR",form:[],instructions:["Mock QR channel","This mock channel behaves similarly to production QR channels."],pm_type:"QR_CODE"},{brand_name:"Mock Direct Debit Channel",channel_code:"MOCK_DIRECT_DEBIT",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[],instructions:["Mock Direct Debit channel","This mock channel behaves similarly to production Direct Debit channels."]},{brand_name:"Mock FPX Business Channel",channel_code:"MOCK_FPX_BUSINESS",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,_mock_action_type:"PENDING",form:[],instructions:["Mock FPX channel","This mock channel behaves similarly to production FPX channels. It has a banner and it will enter the pending state after submission."],banner:{image_url:"https://assets.xendit.co/payment-session/banners/fpx-banner.svg",alt_text:"FPX Pay with Online Banking",aspect_ratio:9.7}},{brand_name:"Mock OTC Channel",channel_code:"MOCK_OTC",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,_mock_action_type:"BARCODE",form:[{label:"Payer Name",placeholder:"Payer Name",type:{name:"text",max_length:50},channel_property:"payer_name",required:!0,span:2}],instructions:["Mock OTC channel","This mock channel behaves similarly to production OTC channels."]},{brand_name:"Mock VA Channel",channel_code:"MOCK_VA",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,_mock_action_type:"VA",form:[],instructions:["Mock VA channel","This mock channel behaves similarly to production VA channels."]},{brand_name:"Mock Installments Channel",channel_code:"MOCK_INSTALLMENTS",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[{label:"Installment plan",placeholder:"Select installment plan",type:{name:"installment_plan"},channel_property:["installment_configuration.terms","installment_configuration.interval","installment_configuration.code"],required:!1,span:2}],instructions:["Mock Installments channel","This mock channel behaves similarly to production installment channels in Thailand."]},{brand_name:"Input Test",channel_code:"UI_INPUT_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[{label:"Card Number (Iframe)",placeholder:"1234 1234 1234 1234",type:{name:"credit_card_number"},channel_property:"card_number",required:!1,span:2},{label:"Card Expiry Date (Iframe)",placeholder:"MM/YY",type:{name:"credit_card_expiry"},channel_property:["expiry_month","expiry_year"],required:!1,span:2},{label:"CVN (Iframe)",placeholder:"CVV",type:{name:"credit_card_cvn"},channel_property:"cvn",required:!1,span:2},{label:"Text",placeholder:"Text",type:{name:"text",max_length:50},channel_property:"text_field",required:!1,span:2},{label:"Phone Number",placeholder:"123 123 123",type:{name:"phone_number"},channel_property:"phone_number_field",required:!1,span:2},{label:"Email",placeholder:"test@example.com",type:{name:"email"},channel_property:"email_field",required:!1,span:2},{label:"Postal Code",placeholder:"123456",type:{name:"postal_code"},channel_property:"postal_code_field",required:!1,span:2},{label:"Country",placeholder:"Select",type:{name:"country"},channel_property:"country_field",required:!1,span:2},{label:"Dropdown",placeholder:"Select",type:{name:"dropdown",options:[{label:"Option 1",value:"option_1"},{label:"Option 2",value:"option_2"},{label:"Option 3",value:"option_3"},{label:"Option 4",value:"option_4",subtitle:"With subtitle"},{label:"Option 5",value:"option_5",subtitle:"With subtitle"}]},channel_property:"dropdown_field",required:!1,span:2},{label:"Dropdown With Icons",placeholder:"Select",type:{name:"dropdown",options:[{label:"Option 1",value:"option_1",icon_url:"https://placehold.co/16"},{label:"Option 2",value:"option_2",icon_url:"https://placehold.co/16"},{label:"Option 3",value:"option_3",icon_url:"https://placehold.co/16"}]},channel_property:"dropdown_field_with_icons",required:!1,span:2}],instructions:["This test demonstrates basic usage of all input types.","All fields here are optional and blank values should pass validation."]},{brand_name:"Field Grouping Test",channel_code:"UI_FIELD_GROUPING_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[{group_label:"Vertical Grouping",label:"Top",placeholder:"Top",type:{name:"text",max_length:50},channel_property:"a1",required:!1,span:2},{label:"Middle",placeholder:"Middle",type:{name:"text",max_length:50},channel_property:"a2",required:!1,span:2,join:!0},{label:"Bottom",placeholder:"Bottom",type:{name:"text",max_length:50},channel_property:"a3",required:!1,span:2,join:!0},{group_label:"Horizontal Grouping",label:"Text",placeholder:"Left",type:{name:"text",max_length:50},channel_property:"b1",required:!1,span:1},{label:"Text",placeholder:"Right",type:{name:"text",max_length:50},channel_property:"b1",required:!1,span:1,join:!0},{group_label:"Mixed Grouping",label:"Text",placeholder:"Top Left",type:{name:"text",max_length:50},channel_property:"c1",required:!1,span:1},{label:"Text",placeholder:"Top Right",type:{name:"text",max_length:50},channel_property:"c2",required:!1,span:1,join:!0},{label:"Text",placeholder:"Middle Left",type:{name:"text",max_length:50},channel_property:"c3",required:!1,span:1,join:!0},{label:"Text",placeholder:"Middle Right",type:{name:"text",max_length:50},channel_property:"c4",required:!1,span:1,join:!0},{label:"Text",placeholder:"Bottom Left",type:{name:"text",max_length:50},channel_property:"c5",required:!1,span:1,join:!0},{label:"Text",placeholder:"Bottom Right",type:{name:"text",max_length:50},channel_property:"c6",required:!1,span:1,join:!0}],instructions:["This test demonstrates field grouping.","Fields can be 1 or 2 cells wide and can be grouped in any arrangement."]},{brand_name:"Text Validation Test",channel_code:"UI_TEXT_VALIDATION_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[{label:"Required Text Field",placeholder:"Required",type:{name:"text",max_length:50},channel_property:"required",required:!0,span:2},{label:"Validate Minimum Length (5)",placeholder:"Min 5 characters",type:{name:"text",min_length:5,max_length:50},channel_property:"min_5_chars",required:!1,span:2},{label:"Validate Using Regexp (/^[a-zA-Z0-9]+$/)",placeholder:"Alphanumeric only",type:{name:"text",max_length:50,regex_validators:[{regex:"/^[a-zA-Z0-9]+$/",message:"Invalid input. Please use alphanumeric characters only"}]},channel_property:"regexp_validation",required:!1,span:2}],instructions:["This test demonstrates text field validation.","Fields should validate on blur or `submit()` or `revealValidationErrors()`. Blurring a blank field does not trigger validation."]},{brand_name:"State/Province Field Test",channel_code:"UI_STATE_PROVINCE_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[{group_label:"Country + State/Province Fields",label:"Country",placeholder:"Country",type:{name:"country"},channel_property:"country_field",required:!0,span:2},{label:"State / Province",placeholder:"State / Province",type:{name:"province"},channel_property:"province_field",required:!0,span:2,join:!0},{group_label:"Country + State/Province Fields (Horizontal Grouping)",label:"Country",placeholder:"Country",type:{name:"country"},channel_property:"country_field_2",required:!0,span:1},{label:"State / Province",placeholder:"State / Province",type:{name:"province"},channel_property:"province_field_2",required:!0,span:1,join:!0}],instructions:["This test demonstrates the country + state/province field combination.","Selecting certain countries (US, CA, GB) should change the state/province field to a dropdown with predefined options."]},{brand_name:"Conditional Field Test",channel_code:"UI_CONDITIONAL_FIELD_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[{label:"Toggle Hidden Field",placeholder:"Select",type:{name:"dropdown",options:[{label:"Show",value:"show"},{label:"Hide",value:"hide"}]},channel_property:"toggle",required:!0,span:2},{label:"Conditional Field",placeholder:"This field is conditionally shown",type:{name:"text",max_length:50},channel_property:"conditional_field",required:!0,span:2,join:!0,display_if:[["toggle","equals","show"]]}],instructions:["This test demonstrates conditional field display based on another field's value.","The second field should only appear if 'Show' is selected in the first field."]},{brand_name:"Save Payment Details Test",channel_code:"UI_SAVE_PAYMENT_DETAILS_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!0,allow_save:!0,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[],instructions:["This channel supports both one-time payment and pay-and-save.","A checkbox should be displayed."]},{brand_name:"Paired Channels Test",channel_code:"UI_PAIRED_CHANNELS_TEST_1",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!0,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[{label:"This should show if the save checkbox is unchecked",placeholder:"Unchecked",type:{name:"text",max_length:50},channel_property:"nonsave",required:!1,span:2}],instructions:["This channel does not support save, but has a paired channel that does.","Changing the save checkbox switches between the two channels."]},{brand_name:"Paired Channels Test",channel_code:"UI_PAIRED_CHANNELS_TEST_2",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!1,allow_save:!0,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[{label:"This should show if the save checkbox is checked",placeholder:"Checked",type:{name:"text",max_length:50},channel_property:"save",required:!1,span:2}],instructions:["This channel can only be used for pay-and-save, but has a paired channel that supports one time payment.","Changing the save checkbox switches between the two channels."]},{brand_name:"Banner Test",channel_code:"UI_BANNER_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!0,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,banner:{image_url:"https://placehold.co/512x32.svg?text=Banner",alt_text:"",aspect_ratio:16},form:[],instructions:["This channel has a banner image.","It should be displayed above this text."]},{brand_name:"Single Item Test",channel_code:"GROUP_SINGLE_ITEM_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"single_item",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[],instructions:["This channel is in a group by itself.","The channel picker should automatically select it when the group is opened."]},{brand_name:"Disabled Group Test",channel_code:"GROUP_DISABLED_GROUP_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"disabled",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:999999999,max_amount:9999999999,requires_customer_details:!1,form:[],instructions:["This channel is in a disabled group.","Since all channels in this group are disabled, the group should not be selectable. You should never see this text because creating this channel will throw an error."]},{brand_name:"Partial Disabled Group (Enabled)",channel_code:"GROUP_PARTIAL_DISABLED_1",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"partial_disabled",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[],instructions:["This channel is in a partially disabled group.","This channel is enabled, but the other channel in the group is disabled. This channel should be automatically selected by the channel picker because it's the only enabled option."]},{brand_name:"Partial Disabled Group (Disabled)",channel_code:"GROUP_PARTIAL_DISABLED_2",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"partial_disabled",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:999999999,max_amount:9999999999,requires_customer_details:!1,form:[],instructions:["This channel is in a partially disabled group.","This channel is disabled. You should never see this text because creating this channel will throw an error."]}],channel_ui_groups:[{id:"cards",label:"Mock Cards",icon_url:"https://assets.xendit.co/payment-session/logos/CARDS.svg"},{id:"other",label:"Other Mock Channels",icon_url:"https://placehold.co/48x48.png?text=Logo"},{id:"ui_tests",label:"Channel UI Test Cases",icon_url:"https://placehold.co/48x48.png?text=Logo"},{id:"single_item",label:"Mock Single Item Group",icon_url:"https://placehold.co/48x48.png?text=Logo"},{id:"disabled",label:"Mock Disabled Group",icon_url:"https://placehold.co/48x48.png?text=Logo"},{id:"partial_disabled",label:"Mock Partial Disabled Group",icon_url:"https://placehold.co/48x48.png?text=Logo"}],digital_wallets:{google_pay:{merchant_id:"mock-googlepay-merchant-id",allowed_payment_methods:[{channel_code:"CARDS",payment_request_id:`pr-${Jn(32)}`,payment_method_specification:{type:"CARD",parameters:{billingAddressRequired:!0,allowedAuthMethods:["PAN_ONLY","CRYPTOGRAM_3DS"],allowedCardNetworks:["AMEX","MASTERCARD","VISA"]},tokenizationSpecification:{type:"PAYMENT_GATEWAY",parameters:{gateway:"xendit",gatewayMerchantId:"exampleGatewayMerchantId"}}}}]}}}}});e.XenditActionBeginEvent=XenditActionBeginEvent,e.XenditActionEndEvent=XenditActionEndEvent,e.XenditComponents=XenditComponents,e.XenditComponentsTest=XenditComponentsTest,e.XenditFatalErrorEvent=XenditFatalErrorEvent,e.XenditInitEvent=XenditInitEvent,e.XenditNotReadyEvent=XenditNotReadyEvent,e.XenditPaymentRequestCreatedEvent=XenditPaymentRequestCreatedEvent,e.XenditPaymentRequestDiscardedEvent=XenditPaymentRequestDiscardedEvent,e.XenditPaymentTokenCreatedEvent=XenditPaymentTokenCreatedEvent,e.XenditPaymentTokenDiscardedEvent=XenditPaymentTokenDiscardedEvent,e.XenditReadyEvent=XenditReadyEvent,e.XenditSessionCompleteEvent=XenditSessionCompleteEvent,e.XenditSessionExpiredOrCanceledEvent=XenditSessionExpiredOrCanceledEvent,e.XenditSessionNotPendingEvent=XenditSessionNotPendingEvent,e.XenditSessionPendingEvent=XenditSessionPendingEvent,e.XenditSubmissionBeginEvent=XenditSubmissionBeginEvent,e.XenditSubmissionEndEvent=XenditSubmissionEndEvent,e.XenditWillRedirectEvent=XenditWillRedirectEvent});
|
|
7
|
+
*/var He=(Ve||(Ve=1,function(e){!function(){var n={}.hasOwnProperty;function t(){for(var e="",n=0;n<arguments.length;n++){var t=arguments[n];t&&(e=i(e,r(t)))}return e}function r(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return t.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var r="";for(var a in e)n.call(e,a)&&e[a]&&(r=i(r,a));return r}function i(e,n){return n?e?e+" "+n:e+n:e}e.exports?(t.default=t,e.exports=t):window.classNames=t}()}(We)),We.exports),je=Ke(He);const Ye=e=>{const{id:n,title:t,subtitle:r,disabled:i,open:a,onClick:o,children:d}=e,s=a?"up":"down",l=Me(()=>{i||o(n)},[i,o,n]),c=Me(e=>{"Enter"!==e.key&&" "!==e.key||(l(),e.preventDefault())},[l]),u=Me(()=>{l()},[l]);return le("div",{className:je("xendit-accordion-item",i?"xendit-accordion-item-disabled":"",a?"xendit-accordion-item-open":"xendit-accordion-item-closed"),children:[le("div",{className:"xendit-accordion-item-header",onClick:u,onKeyDown:c,role:"button",tabIndex:i?-1:0,children:[le(ce,{className:"xendit-accordion-item-header-icon",name:"dummy",size:24}),le("div",{className:"xendit-accordion-item-header-title xendit-text-16 xendit-text-bold",children:[t,r?le("div",{className:"xendit-accordion-item-header-subtitle xendit-text-14",children:r}):null]}),le(ce,{className:"xendit-accordion-item-chevron",name:"chevron",size:24,direction:s})]}),le("div",{className:"xendit-accordion-item-content",inert:!a,children:le("div",{className:"xendit-accordion-item-padding",children:d})})]})},Xe=W(null);Xe.displayName="SessionContext";const ze=W(null);ze.displayName="BusinessContext";const Ze=W(null);Ze.displayName="CustomerContext";const Je=W(null);Je.displayName="ChannelsContext";const Qe=W(null);Qe.displayName="ChannelUiGroupsContext";const en=W(null);en.displayName="DigitalWalletsContext";const nn=W(null);nn.displayName="SdkContext";const tn=W(null);tn.displayName="CurrentChannelContext";const rn=()=>{const e=Oe(Xe);if(null===e)throw new Error("useSession must be used within a XenditSessionProvider");return e},an=()=>{const e=Oe(Je);if(null===e)throw new Error("useChannels must be used within a XenditSessionProvider");return e},on=()=>Oe(en),dn=()=>{const e=Oe(nn);if(null===e)throw new Error("useSdk must be used within a XenditSessionProvider");return e},sn=()=>Oe(tn),ln=({children:e,data:n,sdk:t})=>{const{session:r,business:i,customer:a,channels:o,digitalWallets:d,channelUiGroups:s}=n,l=t.getCurrentChannel()?.[_e]?.[0]??null;return"ACTIVE"!==t.getSdkStatus()||"ACTIVE"!==r.status?null:le(nn.Provider,{value:t,children:le(tn.Provider,{value:l,children:le(Xe.Provider,{value:r,children:le(ze.Provider,{value:i,children:le(Ze.Provider,{value:a,children:le(Je.Provider,{value:o,children:le(en.Provider,{value:d,children:le(Qe.Provider,{value:s,children:e})})})})})})})})},cn=300;function un(e){if(null==e)throw new Error("Assertion failed: argument is null or undefined; this is a bug, please contact support.")}function hn(e){if(!Array.isArray(e))throw new Error("Assertion failed: expected array; this is a bug, please contact support.")}function pn(e){if(Array.isArray(e))throw new Error("Assertion failed: expected array; this is a bug, please contact support.")}function _n(e,n){if(e!==n)throw new Error("Assertion failed; this is a bug, please contact support.")}function mn(e){return new Promise(n=>setTimeout(n,1*e))}class AbortError extends Error{constructor(){super("AbortError"),this.name="AbortError"}}function fn(e){return e instanceof AbortError&&"AbortError"===e.name}function yn(e,n){return new Promise((t,r)=>{function i(){n.removeEventListener("abort",i),clearTimeout(a),r(new AbortError)}const a=setTimeout(()=>{n.removeEventListener("abort",i),t()},1*e);n.aborted?i():n.addEventListener("abort",i)})}function bn(e){const n=e.find(e=>{switch(e.type){case"REDIRECT_CUSTOMER":switch(e.descriptor){case"WEB_URL":return!0;case"DEEPLINK_URL":return function(){const e=navigator.userAgent;if(!e)return!1;if(/android/i.test(e))return!0;if(/iPad|iPhone|iPod/.test(e))return!0;return!1}();case"WEB_GOOGLE_PAYLINK":return!1}break;case"PRESENT_TO_CUSTOMER":return!0;case"API_POST_REQUEST":return!1}return!1});return n||e[0]}function $n(e,n){if(e[_e].options.enablePaylinks)return n.find(e=>"REDIRECT_CUSTOMER"===e.type&&"WEB_GOOGLE_PAYLINK"===e.descriptor)}const gn="mock",vn={pl:"https://checkout-ui-gateway.xendit.co",pd:"https://checkout-ui-gateway-prod-dev.xendit.co",sl:"https://checkout-ui-gateway-live.stg.tidnex.dev",sd:"https://checkout-ui-gateway-dev.stg.tidnex.dev"};function xn(e){return vn[e]??null}function wn(e,n){const t={...e};for(const e of Object.keys(n)){const r=n[e];void 0!==r&&(t[e]=r)}return t}function Cn(e){const n=Ie();return Te(()=>{n.current=e}),n.current}function En(e){let n;if("string"==typeof e.channel_property)n=e.channel_property;else{n=Object.values(e.channel_property).join("__")}return n}const kn=Math.floor(255*Math.random());function Pn(e){const n=En(e).split("").map(e=>(e.charCodeAt(0)%256^kn).toString(16)).join("");return`xendit-id-${n}`}function An(e){un(e%2==0);const n=function(e){const n=new Uint8Array(e);for(let t=0;t<e;t++)n[t]=Math.floor(256*Math.random());return n}(e/2);return Array.from(n).map(e=>e.toString(16).padStart(2,"0")).join("")}function Nn(){return[An(8),An(4),An(4),An(4),An(12)].join("-")}function Sn(){return`xendit-id-${Ie(An(12)).current}`}function Tn(e){return"PRESENT_TO_CUSTOMER"===e.type}function In(e){if(e instanceof Error)return e.stack??e.message;if("string"==typeof e)return e;try{return`Unknown error: ${JSON.stringify(e)}`}catch{return"Unknown error"}}function Rn(e){for(const n of Object.keys(e)){if("symbol"==typeof n)continue;const t=Object.getOwnPropertyDescriptor(e,n);void 0!==t&&("function"!=typeof t.get&&void 0===t.value&&delete e[n])}return e}function Mn(e,n){let t=e;if(!n)return;if(Array.isArray(t))throw new Error("Getting values from channel property arrays is not supported.");let r=n;for(;;){if(!r||"object"!=typeof r||Array.isArray(r))return;const e=t.indexOf(".");if(-1===e)return r?r[t]:void 0;{const n=t.slice(0,e);r=r?r[n]:void 0,t=t.slice(e+1)}}}function On(e){const n=Mn("card_details.card_number",e);return"string"!=typeof n?null:n}function Dn(e){const n={version:0,publicKey:"",iv:"",cipherText:"",valid:!1,validationError:null,withoutValidationError:e};if(!e)return n;const t=e.split("-");if(t.length<6)throw new Error("Invalid encrypted field value format.");if("xendit"!==t[0])throw new Error("Invalid encrypted field value format.");if("encrypted"!==t[1])throw new Error("Invalid encrypted field value format.");const r=parseInt(t[2],10);if(isNaN(r)||r<=0)throw new Error("Invalid encrypted field value format.");if(n.version=r,n.publicKey=t[3],n.iv=t[4],n.cipherText=t[5],t.length>6){if("invalid"!==t[6])throw new Error("Invalid encrypted field value format.");n.validationError=atob(t[7]),n.withoutValidationError=t.slice(0,6).join("-")}else n.valid=!0;return n}const Ln=new WeakMap;let Un=1;function Bn(e,n){return un(e.length>0),un(e.length<=2),2===e.length?n?(un(!0===e[1].allow_save),e[1]):(un(!1===e[0].allow_save),e[0]):e[0]}function Fn(e,n){if("PAY"!==e.session_type)return!0;const t=e.amount,r=n.min_amount??0,i=n.max_amount??Number.MAX_VALUE;return!(t<r||t>i)}function qn(e){Object.defineProperty(e,_e,{enumerable:!1,writable:!1,configurable:!1,value:e[_e]})}const Gn={CARDS:!0,QRIS:!0,QR_PH:!0,PROMPTPAY:!0,SGQR:!0};function Kn(e,n){for(const t of e)if(t.type.name===n)return!0;return!1}var Vn,Wn;!function(e){e.BARE="bare",e.PRIMARY_ROUNDED="primary-rounded",e.WHITE_ROUNDED="white-rounded"}(Vn||(Vn={})),function(e){e.SM="sm",e.MD="md"}(Wn||(Wn={}));const Hn=e=>{const{children:n,variant:t,size:r,type:i="button",...a}=e,o={[Vn.BARE]:void 0,[Vn.PRIMARY_ROUNDED]:"xendit-button-primary-rounded",[Vn.WHITE_ROUNDED]:"xendit-button-white-rounded"}[t],d={[Wn.SM]:"xendit-button-sm",[Wn.MD]:void 0}[r??Wn.MD];return le("button",{...a,className:je(e.className,"xendit-button",o,d),type:i,children:n})},jn=()=>{const e=.4*Math.PI,n=.4;return le("svg",{className:"xendit-button-loading-spinner",viewBox:"-0.5 -0.5 1 1",children:le("path",{d:`M ${Math.cos(e)*n} ${Math.sin(e)*n} A 0.4 0.4 0 0 0 ${Math.cos(0)*n} ${Math.sin(0)*n}`,fill:"none",stroke:"currentColor",strokeWidth:"0.1",strokeLinecap:"round"})})},Yn=e=>{const{id:n,options:t,onChange:r,defaultIndex:i=-1,selectedIndex:a,className:o,placeholder:d,disabled:s}=e,l=dn().t,c=Sn(),u=n||c,h="number"==typeof a,[p,_]=Se(i),m=h?a:p,[f,y]=Se(m>=0?m:0),[b,$]=Se(!1),g=b&&!s&&t.length>0,[v,x]=Se(""),w=Ie(null),C=Ie(null),E=Ie(null),k=Ie(null),P=Ie(null),A=Re(()=>{const e=t.map(Zn).filter(({item:e})=>{if(""===v.trim())return!0;const n=v.toLowerCase();return e.title.toLowerCase().includes(n)||e.description?.toLowerCase().includes(n)||e.value.toLowerCase().includes(n)});return e.length>0?e:t.map(Zn)},[v,t]),N=Math.max(0,Math.min(A.length-1,f));Te(()=>{if(!g)return;const e=e=>{const n=w.current;n&&(n.contains(e.target)||$(!1))};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[g]),Te(()=>{if(!g)return;const e=e=>{const n=w.current;n&&e.relatedTarget&&(n.contains(e.relatedTarget)||$(!1))};return document.body.addEventListener("focusout",e),()=>document.body.removeEventListener("focusout",e)},[g]),Te(()=>{g&&m>=0&&y(m)},[g,m]),Te(()=>{if(!g)return;if(!k.current)return;if(!E.current)return;const e=E.current.parentElement;e&&(e.scrollTop=k.current.offsetTop-e.clientHeight/2+k.current.clientHeight/2)},[g,f]);const S=Me(()=>{g||($(!0),queueMicrotask(()=>P.current?.focus()))},[g]),T=Me(()=>{g&&($(!1),x(""),C.current?.focus())},[g]),I=Me(()=>{g?T():S()},[T,g,S]),R=Me(e=>{const n=t[e];n&&(n.disabled||(h||_(e),r(n,e),T()))},[T,h,r,t]),M=Me(e=>{"ArrowDown"!==e.key&&"ArrowUp"!==e.key&&" "!==e.key&&"Enter"!==e.key||(e.preventDefault(),S())},[S]),O=Me(e=>{const n=e.target===P.current;if("Escape"===e.key)return e.preventDefault(),void T();if("Enter"===e.key||" "===e.key){if(n&&" "===e.key)return;e.preventDefault();const t=A[N];return void(t&&R(t.originalIndex))}return"ArrowDown"===e.key?(e.preventDefault(),void y(e=>Math.min(A.length-1,e+1))):"ArrowUp"===e.key?(e.preventDefault(),void y(e=>Math.max(0,e-1))):"Home"===e.key?(e.preventDefault(),void y(0)):"End"===e.key?(e.preventDefault(),void y(A.length-1)):void 0},[N,T,R,A]),D=Me(e=>{e.stopPropagation(),e.preventDefault(),R(Number(e.currentTarget.dataset.index))},[R]),L=Me(e=>{x(e.currentTarget.value),y(0)},[]),U=m>=0?t[m]:void 0;return le("div",{ref:w,className:`xendit-dropdown ${o??""}`,children:[le("button",{id:u,ref:C,type:"button",className:U?.leadingAsset?"xendit-dropdown-has-asset":"","aria-expanded":g?"true":"false",onClick:I,onKeyDown:M,disabled:s,children:[U?.leadingAsset?U.leadingAsset:null,le("span",U?{className:"xendit-dropdown-button-title xendit-text-14",children:U.shortTitle??U.title}:{className:"xendit-dropdown-button-title xendit-text-14",children:d}),le(ce,{className:"xendit-dropdown-chevron",name:"chevron",size:16,direction:"down"})]}),g?le("div",{className:"xendit-dropdown-menu",children:[le("div",{className:"xendit-dropdown-search",children:le("input",{ref:P,placeholder:l("combobox.default_search_placeholder"),value:v,onInput:L,onClick:zn,onKeyDown:O})}),le("ul",{ref:E,role:"listbox",tabIndex:-1,onKeyDown:O,children:A.map(({item:e,originalIndex:n},t)=>{const r=n===m,i=t===N;return le("li",{role:"option","data-index":n,"aria-disabled":!!e.disabled||void 0,"aria-selected":r,onClick:D,ref:i?k:void 0,children:le("div",{className:`xendit-dropdown-item xendit-text-14 ${i?"xendit-dropdown-item-active":""} ${e.leadingAsset?"xendit-dropdown-has-asset":""} ${e.disabled?"xendit-dropdown-item-disabled":""}`,children:[e.leadingAsset?e.leadingAsset:null,le("div",{className:"xendit-dropdown-item-text xendit-text-14",children:[le("span",{className:"xendit-dropdown-item-title",children:e.title}),e.description&&le("span",{className:"xendit-dropdown-item-description xendit-text-12",children:e.description})]}),r?le(ce,{name:"check",size:16,className:"xendit-dropdown-item-selected"}):null]})},n)})})]}):null]})},Xn=e=>le("div",{className:"xendit-dropdown xendit-skeleton-field",children:le("button",{inert:!0,id:e.id,disabled:!0,type:"button",children:le(jn,{})})});function zn(e){e.stopPropagation()}function Zn(e,n){return{item:e,originalIndex:n}}function Jn(e){return function(e,n){if(e===n)throw new Error("Assertion failed; this is a bug, please contact support.")}(e.session_type,"AUTHORIZATION"),_n(e.mode,"COMPONENTS"),Rn({id:e.payment_session_id,description:e.description||void 0,sessionType:e.session_type,mode:e.mode,referenceId:e.reference_id,country:e.country,currency:e.currency,amount:e.amount,channelProperties:e.channel_properties||void 0,expiresAt:new Date(e.expires_at),locale:e.locale,status:e.status,items:e.items?.map(e=>Rn({type:e.type,referenceId:e.reference_id,name:e.name,netUnitAmount:e.net_unit_amount,quantity:e.quantity,url:e.url,imageUrl:e.image_url,category:e.category,subcategory:e.subcategory,description:e.description,metadata:e.metadata}))})}function Qn(e,n,t,r){const i=Rn({groupId:e.id,label:e.label,get channels(){return(n[e.id]||[]).map(e=>nt(e,n,t,r))},[_e]:e});return qn(i),i}function et(e,n){return nt(e,{},{},n)}function nt(e,n,t,r){un(!r.pairChannels.paired[e.channel_code]);const i=Rn({channelCode:r.pairChannels.pairs[e.channel_code]?.map(e=>e.channel_code)??e.channel_code,brandName:e.brand_name,brandColor:e.brand_color,brandLogoUrl:e.brand_logo_url,get uiGroup(){if(!t[e.ui_group])throw new Error("UI group not found");return Qn(t[e.ui_group],n,t,r)},minAmount:e.min_amount,maxAmount:e.max_amount,cardBrands:e.card?.brands.map(e=>({name:e.name,logoUrl:e.logo_url})),[_e]:r.pairChannels.pairs[e.channel_code]??[e]});return qn(i),i}function tt(e){const n={};for(const t of e)n[t.id]=t;return n}function rt(e,n){if(n.pairChannels.paired[e.channel_code])return!1;if(n.options.filterMinMax&&!Fn(n.session,e))return!1;const t=n.options.filter;return!(t&&!function(e,n){if("string"==typeof e&&n===e)return!0;if(Array.isArray(e)&&e.includes(n))return!0;if(e instanceof RegExp&&e.test(n))return!0;return!1}(t,e.channel_code))}function it(e,n){const t={};for(const r of e){if(!rt(r,n))continue;const e=r.ui_group;t[e]||(t[e]=[]),t[e].push(r)}return t}function at(e){const n=new Map;for(const t of e){const e=t.brand_name;n.has(e)||n.set(e,[]),n.get(e).push(t)}const t={},r={};for(const[e,i]of n)for(const e of i){if(!1===i[0].allow_save){const n=i.find(n=>e.channel_code!==n.channel_code&&e.ui_group===n.ui_group&&!0===n.allow_save);n&&(t[e.channel_code]=[e,n],r[n.channel_code]=!0)}}return{pairs:t,paired:r}}const ot=e=>{const{group:n,open:t}=e,r=dn(),{t:i}=r,a=rn(),o=an(),d=sn(),s=a.session_type,l=Sn(),[c,u]=Se(null),h=Ie(null),[p,_]=Se(!1),m=Ie(null),f=Re(()=>at(o),[o]),y=Re(()=>({pairChannels:f,session:{amount:a.amount,session_type:a.session_type},options:{filterMinMax:!1}}),[f,a.amount,a.session_type]),b=Re(()=>o.filter(e=>rt(e,y)&&e.ui_group===n.id),[o,n.id,y]);Te(()=>{if(!h.current)return;if(!d)return;if(!t)return;b.find(e=>e.channel_code===d.channel_code)&&(m.current=r.createChannelComponent(et(d,y)),m.current.parentElement!==h.current&&(_(!0),h.current.replaceChildren(m.current)))},[b,d,y,t,r]);const $=Cn(t);Te(()=>{if(t&&!$&&null===d&&null!==c){const e=b.find(e=>e.channel_code===c);e&&r.setCurrentChannel(et(e,y))}},[b,d,c,y,t,$,r]);const g=Me(e=>{const n=o.find(n=>n.channel_code===e.value)||null;u(n?.channel_code??null),r.setCurrentChannel(n?et(n,y):null)},[o,y,r]),v=Re(()=>b.map(e=>({leadingAsset:le("img",{className:"xendit-channel-logo",src:e.brand_logo_url},e.channel_code),title:e.brand_name,value:e.channel_code,disabled:!Fn(a,e),description:dt(i,a,e)||void 0})),[b,a,i]);return le("div",{className:"xendit-channel-picker-group",children:[1===b.length&&"CARDS"===b[0].channel_code?null:le("div",{className:"xendit-channel-form-field-group",children:[le("label",{htmlFor:l,className:"xendit-text-14",children:"SAVE"===s?i("payment_methods.add_payment_method",{groupName:n.label??"",ns:"session"}):i("payment_methods.pay_with")}),le(Yn,{id:l,selectedIndex:function(){const e=v.findIndex(e=>e.value===d?.channel_code);if(-1!==e)return e;const n=v.findIndex(e=>e.value===c);return-1!==n?n:-1}(),options:v,disabled:v.length<=1,onChange:g,placeholder:i("payment_methods.select_channel_placeholder",{groupName:n.label,ns:"session"})})]}),le("div",{style:{display:p?"":"none"},ref:h})]})};function dt(e,n,t){return Fn(n,t)?null:t.min_amount&&n.amount<t.min_amount?e("payment_methods.channel_disabled_amount_too_small"):e("payment_methods.channel_disabled_amount_too_large")}const st=e=>{const n=dn(),t=Ie(null),r=on(),i=r?.google_pay;return Te(()=>{if(t.current&&i){const e=n.createDigitalWalletComponent("GOOGLE_PAY");return t.current.appendChild(e),()=>{e.remove()}}},[i,n]),le("div",{ref:t,className:"xendit-channel-picker-digital-wallet-section"})},lt=e=>{const n=dn(),t=rn(),r=(()=>{const e=Oe(Qe);if(null===e)throw new Error("useChannelUiGroups must be used within a XenditSessionProvider");return e})(),i=sn(),a=an(),{t:o}=dn(),d=Re(()=>it(a,{options:{filterMinMax:!1},pairChannels:at(a),session:t}),[a,t]),s=Ie(null),l=Re(()=>at(a),[a]),c=Re(()=>({pairChannels:l,session:{amount:t.amount,session_type:t.session_type},options:{filterMinMax:!1}}),[l,t.amount,t.session_type]),u=i?.ui_group??null,[h,p]=Se(null),_=Me(e=>{if(u===e||h===e)u===e&&s.current?.dispatchEvent(new XenditClearCurrentChannelEvent(e)),h===e&&p(null);else{const i=r.find(n=>n.id===e);un(i);const s=ct(t,i,a,o).enabledChannels;if(0===s)return;if(1===s){const t=d[e][0];n.setCurrentChannel(et(t,c)),p(null)}else p(e),n.setCurrentChannel(null)}},[r,a,d,c,h,n,u,t,o]);Te(()=>{null!==i&&null!==h&&p(null)},[i,h]);const m=n[_e].options.enableDigitalWallets??!1;return le("div",{ref:s,children:[m?le(st,{}):null,le(me,{children:r.filter(e=>(d[e.id]||[]).length>0).map(e=>{const n=null!==u?u===e.id:h===e.id,r=ct(t,e,a,o),i=0===r.enabledChannels,d=r.firstDisabledChannelReason;return le(Ye,{id:e.id,title:e.label,subtitle:d??void 0,open:n,disabled:i,onClick:_,children:le(ot,{group:e,open:n})},e.id)})})]})};function ct(e,n,t,r){let i=null,a=0;for(const o of t)o.ui_group===n.id&&(Fn(e,o)?a++:null===i&&(i=dt(r,e,o)));return{enabledChannels:a,firstDisabledChannelReason:i}}class XenditClearCurrentChannelEvent extends Event{static type="xendit-clear-current-channel";uiGroup;constructor(e){super(XenditClearCurrentChannelEvent.type,{bubbles:!0,composed:!0}),this.uiGroup=e}}var ut={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:48|5[0-3579]|[6-9])|7(?:20|32|8)|[89]","(?:31|4)6|51|6(?:485|5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:241|349)0\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|[34]\\d\\d)|91(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79]))))\\d{3}|(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|3(?:[0-3589]\\d|4[0-578]|6[1-9]|7[0-35-9])|7(?:[013-57-9]\\d|2[0-8])|8(?:55|6[0-8]|[78]\\d|9[02-9]))\\d{6}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|2[23]"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","(?:[025-7]\\d|44)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[024-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","(?:01\\d|8)\\d{7}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["0"]]]],BL:["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:2[7-9]|3[3-7]|5[12]|87)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","8001\\d{5}|(?:[2-467]\\d|50)\\d{6}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[235]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","[1-467]\\d{9,10}|55[0-46-9]\\d{8}|[34]\\d{7}|55\\d{7,8}|(?:5[0-46-9]|[89]\\d)\\d{7,9}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37|86)","300|4(?:0(?:0|20)|370|864)"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[178]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-6]|7[246]|8[2-4]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|[78]"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","[2-9]\\d{9}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|5[07]|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|9(?:0[25]|42))[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:2[125-9]|3[23]|44|66|77|88)|6(?:22|33))[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["5"],"0$1"]],"0"],CF:["236","00","8776\\d{4}|(?:[27]\\d|61)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-8]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["60|809"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9(?:10|[2-9])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-8]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]","(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["46"]],["(\\d{3})(\\d{7})","$1 $2",["6|90"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|9[14]"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9,10,11,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|3[13])"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,0,[["528[89]\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[016-8]\\d|2[0-8]|5[0-5]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],ET:["251","00","(?:11|[2-579]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-579]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d{5})","$1",["20[2-59]"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],["(\\d)(\\d{4,9})","$1 $2",["(?:19|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,"0|180020",0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-5])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|5[01]))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","(?:[56]94\\d|7093)\\d{5}|(?:80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0|180020","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","(?:[235]\\d{3}|800)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","[2-69]\\d{8}|80\\d{5,7}|[1-79]\\d{7}|6\\d{6}",[7,8,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","[2-589]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","00[1-9]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13,14,15,16,17],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0|180020","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|8(?:28[235-7]|3))|73179|807(?:1|9[1-3])|(?:1552|6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689])\\d|8(?:[14-6]\\d|2[0-79]))|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["16|[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["18[06]","18[06]0"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,11}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11,12],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[03]"]]],0,0,0,0,0,0,[["0(?:669[0-79]\\d{1,6}|831\\d{2,8})|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[2356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],["3[2-8]\\d{9,10}",[11,12]],0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0|180020","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|427|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[47]"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[25-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["3|4(?:2[09]|7[01])|6[1-9]","3|4(?:2(?:0|9[02-69])|7(?:0[019]|1))|6[1-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[25-9]"],"0$1"]],"0",0,"(000[2569]\\d{4,6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[36]0|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","8\\d{13}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["3"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-6]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[2457]\\d|33|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(0-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"0 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(0-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(0-$1)",1]],"0",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["20"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["20"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|78|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2679]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{4})(\\d{5})","$1-$2",["892"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8(?:0[0-7]|9)"],"0$1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[5-8]"],"0$1"]],"0",0,0,0,0,"[5-8]"],MC:["377","00","(?:[3489]|[67]\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[67]"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|452|678|86","[12]|452|6788|86"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[12]1"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],MQ:["596","00","(?:596\\d|7091)\\d{5}|(?:69|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|8(?:0[6-9]|[36])"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],MX:["52","0[09]","[2-9]\\d{9}",[10],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"]]],0,0,0,0,0,0,0,"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[0467]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","(?:20|9\\d)\\d{8}|[78]\\d{9,13}",[10,11,12,13,14],[["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:222|444|(?:55|8\\d)\\d|666|777|999)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[24-9]"]]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","[45]\\d{5}|(?:708|8\\d\\d)\\d{6}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[45]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","[36-8]\\d{5,8}|4\\d{6,8}|59\\d{6}|9\\d{5,10}|(?:2\\d|5[0-8])\\d{6,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["3[289]|4[246-8]|61|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[136]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","709\\d{6}|(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-9]"],"0$1"]],"0",0,0,0,0,0,[["26(?:2\\d\\d|3(?:0\\d|1[0-6]))\\d{4}"],["(?:69(?:2\\d\\d|3(?:[06][0-6]|1[0-3]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))|7092[0-3])\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-6]|76(?:2[278]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,"[3489]",0,"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","(?:[15]\\d|800|92)\\d{7}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","[6-9]\\d{6}|[1-6]\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","(?:[2489]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10,12],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[348]|64|79|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6[0-35-9]|7[67]|9[2-9]"]]],"0"],SR:["597","00","(?:[2-5]|[6-8]\\d|90)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-9]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[25-7]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[25-7]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-359]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-4]|5[1-3]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[59]"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|30|[689]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[236-9]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","(?:[0-57-9]\\d|66)\\d{7}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3(?:[1245]|3[12])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["\\d"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","(?:[1-6]\\d|71)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["[67]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-579]|61)","5(?:[0-579]|61[06])","5(?:[0-579]|61[06]1)"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868"],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[258]0"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]","[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],TZ:["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0"],US:["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["(?:274[27]|(?:472|983)[2-47-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013-79]|3[0-24679]|4[167]|5[0-3]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-269])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-247]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|2\\d{3,4}|(?:[49]\\d|80)\\d{5}",[4,5,6,7,8,9,10,11,12,13],[["(\\d{4,5})","$1",["21"]],["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","00","(?:20|33|[5-9]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"]]]],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11,12],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72|8\\d{4})\\d{4}|[89]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[47-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}",[8,9,10,11,12],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2|39"],"0$1"],["(\\d{2})(\\d{7,10})","$1 $2",["3"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","7093\\d{5}|(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}",[9],0,"0",0,0,0,0,0,[["269(?:0[0-467]|15|5[0-4]|6\\d|[78]0)\\d{4}"],["(?:639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])|7093[5-7])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|[579]\\d|63)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[579]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[235-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"],0,0,0,0,0,0,["2\\d{8}",[9]]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|5[12]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|5(?:0\\d{3}|2[0-2]))\\d{7}",[7,8,9,10,12]],0,0,0,["348[57]\\d{7}",[11]],0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}};function ht(e,n){var t=Array.prototype.slice.call(n);return t.push(ut),e.apply(this,t)}function pt(e,n){e=e.split("-"),n=n.split("-");for(var t=e[0].split("."),r=n[0].split("."),i=0;i<3;i++){var a=Number(t[i]),o=Number(r[i]);if(a>o)return 1;if(o>a)return-1;if(!isNaN(a)&&isNaN(o))return 1;if(isNaN(a)&&!isNaN(o))return-1}return e[1]&&n[1]?e[1]>n[1]?1:e[1]<n[1]?-1:0:!e[1]&&n[1]?1:e[1]&&!n[1]?-1:0}var _t={}.constructor;function mt(e){return null!=e&&e.constructor===_t}function ft(e){return ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ft(e)}function yt(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function bt(e,n,t){return n&&function(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,$t(r.key),r)}}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function $t(e){var n=function(e,n){if("object"!=ft(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n);if("object"!=ft(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==ft(n)?n:n+""}var gt=" ext. ",vt=/^\d+$/,xt=function(){return bt(function e(n){yt(this,e),At(n),this.metadata=n,Tt.call(this,n)},[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter(function(e){return"001"!==e})}},{key:"getCountryMetadata",value:function(e){return this.metadata.countries[e]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(e){return void 0!==this.getCountryMetadata(e)}},{key:"hasCallingCode",value:function(e){if(this.getCountryCodesForCallingCode(e))return!0;if(this.nonGeographic()){if(this.nonGeographic()[e])return!0}else{var n=this.countryCallingCodes()[e];if(n&&1===n.length&&"001"===n[0])return!0}}},{key:"isNonGeographicCallingCode",value:function(e){return this.nonGeographic()?!!this.nonGeographic()[e]:!this.getCountryCodesForCallingCode(e)}},{key:"country",value:function(e){return this.selectNumberingPlan(e)}},{key:"selectNumberingPlan",value:function(e,n){if(e&&vt.test(e)&&(n=e,e=null),e&&"001"!==e){if(!this.hasCountry(e))throw new Error("Unknown country: ".concat(e));this.numberingPlan=new wt(this.getCountryMetadata(e),this)}else if(n){if(!this.hasCallingCode(n))throw new Error("Unknown calling code: ".concat(n));this.numberingPlan=new wt(this.getNumberingPlanMetadata(n),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(e){var n=this.countryCallingCodes()[e];if(n){if(1===n.length&&3===n[0].length)return;return n}}},{key:"getCountryCodeForCallingCode",value:function(e){var n=this.getCountryCodesForCallingCode(e);if(n)return n[0]}},{key:"getNumberingPlanMetadata",value:function(e){var n=this.getCountryCodeForCallingCode(e);if(n)return this.getCountryMetadata(n);if(this.nonGeographic()){var t=this.nonGeographic()[e];if(t)return t}else{var r=this.countryCallingCodes()[e];if(r&&1===r.length&&"001"===r[0])return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function(){return this.numberingPlan.hasTypes()}},{key:"type",value:function(e){return this.numberingPlan.type(e)}},{key:"ext",value:function(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function(e){return this.selectNumberingPlan(e)}},{key:"hasSelectedNumberingPlan",value:function(){return void 0!==this.numberingPlan}}])}(),wt=function(){return bt(function e(n,t){yt(this,e),this.globalMetadataObject=t,this.metadata=n,Tt.call(this,t.metadata)},[{key:"callingCode",value:function(){return this.metadata[0]}},{key:"getDefaultCountryMetadataForRegion",value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"IDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[1]}},{key:"defaultIDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[12]}},{key:"nationalNumberPattern",value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function(e){return e[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var e=this,n=this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[];return n.map(function(n){return new Ct(n,e)})}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(e){return e[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion())}},{key:"_nationalPrefixForParsing",value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion())}},{key:"leadingDigits",value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function(){return(!this.types()||0!==this.types().length)&&!!this.types()}},{key:"type",value:function(e){if(this.hasTypes()&&Pt(this.types(),e))return new kt(Pt(this.types(),e),this)}},{key:"ext",value:function(){return this.v1||this.v2?gt:this.metadata[13]||gt}}])}(),Ct=function(){return bt(function e(n,t){yt(this,e),this._format=n,this.metadata=t},[{key:"pattern",value:function(){return this._format[0]}},{key:"format",value:function(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function(){return!(!this.nationalPrefixFormattingRule()||Et.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}])}(),Et=/^\(?\$1\)?$/,kt=function(){return bt(function e(n,t){yt(this,e),this.type=n,this.metadata=t},[{key:"pattern",value:function(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}])}();function Pt(e,n){switch(n){case"FIXED_LINE":return e[0];case"MOBILE":return e[1];case"TOLL_FREE":return e[2];case"PREMIUM_RATE":return e[3];case"PERSONAL_NUMBER":return e[4];case"VOICEMAIL":return e[5];case"UAN":return e[6];case"PAGER":return e[7];case"VOIP":return e[8];case"SHARED_COST":return e[9]}}function At(e){if(!e)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!mt(e)||!mt(e.countries))throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(mt(e)?"an object of shape: { "+Object.keys(e).join(", ")+" }":"a "+Nt(e)+": "+e,"."))}var Nt=function(e){return ft(e)};function St(e,n){if((n=new xt(n)).hasCountry(e))return n.selectNumberingPlan(e).countryCallingCode();throw new Error("Unknown country: ".concat(e))}function Tt(e){var n=e.version;"number"==typeof n?(this.v1=1===n,this.v2=2===n,this.v3=3===n,this.v4=4===n):n?-1===pt(n,"1.2.0")?this.v2=!0:-1===pt(n,"1.7.35")?this.v3=!0:this.v4=!0:this.v1=!0}function It(e,n,t){return function(e,n,t,r){n&&(r=new xt(r.metadata)).selectNumberingPlan(n);var i=r.type(t),a=i&&i.possibleLengths()||r.possibleLengths();if(!a)return"IS_POSSIBLE";var o=e.length,d=a[0];if(d===o)return"IS_POSSIBLE";if(d>o)return"TOO_SHORT";if(a[a.length-1]<o)return"TOO_LONG";return a.indexOf(o,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}(e,n,void 0,t)}function Rt(e,n,t){return"IS_POSSIBLE"===It(e,n,t)}function Mt(e,n){return e=e||"",new RegExp("^(?:"+n+")$").test(e)}function Ot(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(t)return(t=t.call(e)).next.bind(t);if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return Dt(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Dt(e,n):void 0}}(e))||n){t&&(e=t);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Dt(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}var Lt=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function Ut(e,n,t){if(n=n||{},e.country||e.countryCallingCode){(t=new xt(t)).selectNumberingPlan(e.country,e.countryCallingCode);var r=n.v2?e.nationalNumber:e.phone;if(Mt(r,t.nationalNumberPattern())){if(Bt(r,"FIXED_LINE",t))return t.type("MOBILE")&&""===t.type("MOBILE").pattern()?"FIXED_LINE_OR_MOBILE":t.type("MOBILE")?Bt(r,"MOBILE",t)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE":"FIXED_LINE_OR_MOBILE";for(var i,a=Ot(Lt);!(i=a()).done;){var o=i.value;if(Bt(r,o,t))return o}}}}function Bt(e,n,t){var r=t.type(n);return!(!r||!r.pattern())&&(!(r.possibleLengths()&&r.possibleLengths().indexOf(e.length)<0)&&Mt(e,r.pattern()))}function Ft(e,n,t){var r=new xt(t).getCountryCodesForCallingCode(e);return r?r.filter(function(e){return function(e,n,t){var r=new xt(t);if(r.selectNumberingPlan(n),r.numberingPlan.possibleLengths().indexOf(e.length)>=0)return!0;return!1}(n,e,t)}):[]}var qt="0-90-9٠-٩۰-۹",Gt="".concat("-‐-―−ー-").concat("//").concat("..").concat(" ").concat("()()[]\\[\\]").concat("~⁓∼~"),Kt=new RegExp("(["+qt+"])");function Vt(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(t)return(t=t.call(e)).next.bind(t);if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return Wt(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Wt(e,n):void 0}}(e))||n){t&&(e=t);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Wt(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function Ht(e,n){var t=n.nationalNumber,r=n.metadata,i=r.getCountryCodesForCallingCode(e);if(i)return 1===i.length?i[0]:function(e,n){var t=n.countries,r=n.metadata;r=new xt(r);for(var i,a=Vt(t);!(i=a()).done;){var o=i.value;if(r.selectNumberingPlan(o),r.leadingDigits()){if(e&&0===e.search(r.leadingDigits()))return o}else if(Ut({phone:e,country:o},void 0,r.metadata))return o}}(t,{countries:i,metadata:r.metadata})}function jt(e,n,t){var r=function(e,n){if(e&&n.numberingPlan.nationalPrefixForParsing()){var t=new RegExp("^(?:"+n.numberingPlan.nationalPrefixForParsing()+")"),r=t.exec(e);if(r){var i,a,o,d=r.length-1,s=d>0&&r[d];if(n.nationalPrefixTransformRule()&&s)i=e.replace(t,n.nationalPrefixTransformRule()),d>1&&(a=r[1]);else{var l=r[0];i=e.slice(l.length),s&&(a=r[1])}if(s){var c=e.indexOf(r[1]);e.slice(0,c)===n.numberingPlan.nationalPrefix()&&(o=n.numberingPlan.nationalPrefix())}else o=r[0];return{nationalNumber:i,nationalPrefix:o,carrierCode:a}}}return{nationalNumber:e}}(e,t),i=r.carrierCode,a=r.nationalNumber;if(a!==e){if(!function(e,n,t){if(Mt(e,t.nationalNumberPattern())&&!Mt(n,t.nationalNumberPattern()))return!1;return!0}(e,a,t))return{nationalNumber:e};if(t.numberingPlan.possibleLengths()&&(n||(n=Ht(t.numberingPlan.callingCode(),{nationalNumber:a,metadata:t})),!function(e,n,t){switch(It(e,n,t)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}(a,n,t)))return{nationalNumber:e}}return{nationalNumber:a,carrierCode:i}}function Yt(e,n,t,r,i){if(!e)return{};var a;if("+"!==e[0]){var o=function(e,n,t,r){if(n){var i=new xt(r);i.selectNumberingPlan(n,t);var a=new RegExp(i.IDDPrefix());if(0===e.search(a)){var o=(e=e.slice(e.match(a)[0].length)).match(Kt);if(!(o&&null!=o[1]&&o[1].length>0&&"0"===o[1]))return e}}}(e,t,r,i);if(!o||o===e){if(t||r){var d=function(e,n,t,r,i){var a=t?St(t,i):r;if(0===e.indexOf(a)){(i=new xt(i)).selectNumberingPlan(t,a);var o=e.slice(a.length),d=jt(o,n,i).nationalNumber,s=jt(e,n,i).nationalNumber;if(!Mt(s,i.nationalNumberPattern())&&Mt(d,i.nationalNumberPattern())||"TOO_LONG"===It(s,n,i))return{countryCallingCode:a,number:o}}return{number:e}}(e,n,t,r,i),s=d.countryCallingCode,l=d.number;if(s)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:s,number:l}}return{number:e}}a=!0,e="+"+o}if("0"===e[1])return{};i=new xt(i);for(var c=2;c-1<=3&&c<=e.length;){var u=e.slice(1,c);if(i.hasCallingCode(u))return i.selectNumberingPlan(u),{countryCallingCodeSource:a?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:u,number:e.slice(c)};c++}return{}}var Xt=/(\$\d)/;function zt(e,n,t){var r=t.useInternationalFormat,i=t.withNationalPrefix,a=e.replace(new RegExp(n.pattern()),r?n.internationalFormat():i&&n.nationalPrefixFormattingRule()?n.format().replace(Xt,n.nationalPrefixFormattingRule()):n.format());return r?function(e){return e.replace(new RegExp("[".concat(Gt,"]+"),"g")," ").trim()}(a):a}var Zt=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;var Jt=function(e){return"([".concat(qt,"]{1,").concat(e,"})")};function Qt(e){var n="[ \\t,]*",t="[:\\..]?[ \\t,-]*",r="#?",i="[ \\t]*";return";ext="+Jt("20")+"|"+(n+"(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)"+t+Jt("20")+r)+"|"+(n+"(?:[xx##~~]|int|int)"+t+Jt("9")+r)+"|"+("[- ]+"+Jt("6")+"#")+"|"+(i+"(?:,{2}|;)"+t+Jt("15")+r)+"|"+(i+"(?:,)+"+t+Jt("9")+r)}var er="["+qt+"]{2}",nr="[++]{0,1}(?:["+Gt+"]*["+qt+"]){3,}["+Gt+qt+"]*",tr=new RegExp("^[++]{0,1}(?:["+Gt+"]*["+qt+"]){1,2}$","i"),rr=nr+"(?:"+Qt()+")?",ir=new RegExp("^"+er+"$|^"+rr+"$","i");var ar={formatExtension:function(e,n,t){return"".concat(e).concat(t.ext()).concat(n)}};function or(e,n,t,r){if(t=t?function(){for(var e=1,n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];for(;e<t.length;){if(t[e])for(var i in t[e])t[0][i]=t[e][i];e++}return t[0]}({},ar,t):ar,r=new xt(r),e.country&&"001"!==e.country){if(!r.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));r.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode)return e.phone||"";r.selectNumberingPlan(e.countryCallingCode)}var i,a=r.countryCallingCode(),o=t.v2?e.nationalNumber:e.phone;switch(n){case"NATIONAL":return o?sr(i=dr(o,e.carrierCode,"NATIONAL",r,t),e.ext,r,t.formatExtension):"";case"INTERNATIONAL":return o?(i=dr(o,null,"INTERNATIONAL",r,t),sr(i="+".concat(a," ").concat(i),e.ext,r,t.formatExtension)):"+".concat(a);case"E.164":return"+".concat(a).concat(o);case"RFC3966":return function(e){var n=e.number,t=e.ext;if(!n)return"";if("+"!==n[0])throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');return"tel:".concat(n).concat(t?";ext="+t:"")}({number:"+".concat(a).concat(o),ext:e.ext});case"IDD":if(!t.fromCountry)return;var d=function(e,n,t,r,i){var a=St(r,i.metadata);if(a===t){var o=dr(e,n,"NATIONAL",i);return"1"===t?t+" "+o:o}var d=function(e,n,t){var r=new xt(t);return r.selectNumberingPlan(e,n),r.defaultIDDPrefix()?r.defaultIDDPrefix():Zt.test(r.IDDPrefix())?r.IDDPrefix():void 0}(r,void 0,i.metadata);if(d)return"".concat(d," ").concat(t," ").concat(dr(e,null,"INTERNATIONAL",i))}(o,e.carrierCode,a,t.fromCountry,r);if(!d)return;return sr(d,e.ext,r,t.formatExtension);default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(n,'"'))}}function dr(e,n,t,r,i){var a,o,d=(a=r.formats(),o=e,function(e,n){for(var t=0;t<e.length;){if(n(e[t]))return e[t];t++}}(a,function(e){if(e.leadingDigitsPatterns().length>0){var n=e.leadingDigitsPatterns()[e.leadingDigitsPatterns().length-1];if(0!==o.search(n))return!1}return Mt(o,e.pattern())}));return d?zt(e,d,{useInternationalFormat:"INTERNATIONAL"===t,withNationalPrefix:!d.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!i||!1!==i.nationalPrefix}):e}function sr(e,n,t,r){return n?r(e,n,t):e}function lr(e){return lr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},lr(e)}function cr(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function ur(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?cr(Object(t),!0).forEach(function(n){hr(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):cr(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function hr(e,n,t){return(n=_r(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function pr(e,n,t){return n&&function(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_r(r.key),r)}}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _r(e){var n=function(e,n){if("object"!=lr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n);if("object"!=lr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==lr(n)?n:n+""}var mr=function(){return pr(function e(n,t,r){if(function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e),!n)throw new TypeError("First argument is required");if("string"!=typeof n)throw new TypeError("First argument must be a string");if("+"===n[0]&&!t)throw new TypeError("`metadata` argument not passed");if(mt(t)&&mt(t.countries)){r=t;var i=n;if(!yr.test(i))throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits');var a=Yt(i,void 0,void 0,void 0,r);if(n=a.countryCallingCode,!(t=a.number))throw new Error("Invalid `number` argument passed: too short")}if(!t)throw new TypeError("`nationalNumber` argument is required");if("string"!=typeof t)throw new TypeError("`nationalNumber` argument must be a string");At(r);var o=function(e,n){var t,r,i=new xt(n);fr(e)?(t=e,i.selectNumberingPlan(t),r=i.countryCallingCode()):r=e;return{country:t,countryCallingCode:r}}(n,r),d=o.country,s=o.countryCallingCode;this.country=d,this.countryCallingCode=s,this.nationalNumber=t,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return r}},[{key:"setExt",value:function(e){this.ext=e}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:Ft(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return function(e,n,t){if(void 0===n&&(n={}),t=new xt(t),n.v2){if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");t.selectNumberingPlan(e.countryCallingCode)}else{if(!e.phone)return!1;if(e.country){if(!t.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));t.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");t.selectNumberingPlan(e.countryCallingCode)}}if(t.possibleLengths())return Rt(e.phone||e.nationalNumber,e.country,t);if(e.countryCallingCode&&t.isNonGeographicCallingCode(e.countryCallingCode))return!0;throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}(this,{v2:!0},this.getMetadata())}},{key:"isValid",value:function(){return function(e,n,t){return n=n||{},(t=new xt(t)).selectNumberingPlan(e.country,e.countryCallingCode),t.hasTypes()?void 0!==Ut(e,n,t.metadata):Mt(n.v2?e.nationalNumber:e.phone,t.nationalNumberPattern())}(this,{v2:!0},this.getMetadata())}},{key:"isNonGeographic",value:function(){return new xt(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(e){return this.number===e.number&&this.ext===e.ext}},{key:"getType",value:function(){return Ut(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(e,n){return or(this,e,n?ur(ur({},n),{},{v2:!0}):{v2:!0},this.getMetadata())}},{key:"formatNational",value:function(e){return this.format("NATIONAL",e)}},{key:"formatInternational",value:function(e){return this.format("INTERNATIONAL",e)}},{key:"getURI",value:function(e){return this.format("RFC3966",e)}}])}(),fr=function(e){return/^[A-Z]{2}$/.test(e)};var yr=/^\+\d+$/;function br(e){return br="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},br(e)}function $r(e,n,t){return n=wr(n),function(e,n){if(n&&("object"==br(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,vr()?Reflect.construct(n,t||[],wr(e).constructor):n.apply(e,t))}function gr(e){var n="function"==typeof Map?new Map:void 0;return gr=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(n){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return function(e,n,t){if(vr())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,n);var i=new(e.bind.apply(e,r));return t&&xr(i,t.prototype),i}(e,arguments,wr(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),xr(t,e)},gr(e)}function vr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(vr=function(){return!!e})()}function xr(e,n){return xr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},xr(e,n)}function wr(e){return wr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},wr(e)}var Cr=function(e){function n(e){var t;return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),t=$r(this,n,[e]),Object.setPrototypeOf(t,n.prototype),t.name=t.constructor.name,t}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&xr(e,n)}(n,e),function(e){return Object.defineProperty(e,"prototype",{writable:!1}),e}(n)}(gr(Error)),Er=new RegExp("(?:"+Qt()+")$","i");var kr={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"};function Pr(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(t)return(t=t.call(e)).next.bind(t);if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return Ar(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Ar(e,n):void 0}}(e))||n){t&&(e=t);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ar(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function Nr(e){for(var n,t="",r=Pr(e.split(""));!(n=r()).done;){t+=Sr(n.value,t)||""}return t}function Sr(e,n,t){if("+"===e){if(n)return;return"+"}return function(e){return kr[e]}(e)}var Tr="(["+qt+"]|[\\-\\.\\(\\)]?)",Ir=new RegExp("^\\+"+Tr+"*["+qt+"]"+Tr+"*$","g"),Rr=new RegExp("^("+("["+qt+"]+((\\-)*["+qt+"])*")+"\\.)*"+("[a-zA-Z]+((\\-)*["+qt+"])*")+"\\.?$","g"),Mr="tel:",Or=";phone-context=";function Dr(e,n){var t,r=n.extractFormattedPhoneNumber,i=function(e){var n=e.indexOf(Or);if(n<0)return null;var t=n+15;if(t>=e.length)return"";var r=e.indexOf(";",t);return r>=0?e.substring(t,r):e.substring(t)}(e);if(!function(e){return null===e||0!==e.length&&(Ir.test(e)||Rr.test(e))}(i))throw new Cr("NOT_A_NUMBER");if(null===i)t=r(e)||"";else{t="","+"===i.charAt(0)&&(t+=i);var a,o=e.indexOf(Mr);a=o>=0?o+4:0;var d=e.indexOf(Or);t+=e.substring(a,d)}var s=t.indexOf(";isub=");if(s>0&&(t=t.substring(0,s)),""!==t)return t}var Lr=new RegExp("[++"+qt+"]"),Ur=new RegExp("[^"+qt+"#]+$");function Br(e,n,t){if(n=n||{},t=new xt(t),n.defaultCountry&&!t.hasCountry(n.defaultCountry)){if(n.v2)throw new Cr("INVALID_COUNTRY");throw new Error("Unknown country: ".concat(n.defaultCountry))}var r=function(e,n,t){var r=Dr(e,{extractFormattedPhoneNumber:function(e){return function(e,n,t){if(!e)return;if(e.length>250){if(t)throw new Cr("TOO_LONG");return}if(!1===n)return e;var r=e.search(Lr);if(r<0)return;return e.slice(r).replace(Ur,"")}(e,t,n)}});if(!r)return{};if(!function(e){return e.length>=2&&ir.test(e)}(r))return function(e){return tr.test(e)}(r)?{error:"TOO_SHORT"}:{};var i=function(e){var n=e.search(Er);if(n<0)return{};for(var t=e.slice(0,n),r=e.match(Er),i=1;i<r.length;){if(r[i])return{number:t,ext:r[i]};i++}}(r);if(i.ext)return i;return{number:r}}(e,n.v2,n.extract),i=r.number,a=r.ext,o=r.error;if(!i){if(n.v2){if("TOO_SHORT"===o)throw new Cr("TOO_SHORT");throw new Cr("NOT_A_NUMBER")}return{}}var d=function(e,n,t,r){var i,a=Yt(Nr(e),void 0,n,t,r.metadata),o=a.countryCallingCodeSource,d=a.countryCallingCode,s=a.number;if(d)r.selectNumberingPlan(d);else{if(!s||!n&&!t)return{};r.selectNumberingPlan(n,t),n&&(i=n),d=t||St(n,r.metadata)}if(!s)return{countryCallingCodeSource:o,countryCallingCode:d};var l=jt(Nr(s),i,r),c=l.nationalNumber,u=l.carrierCode,h=Ht(d,{nationalNumber:c,metadata:r});h&&(i=h,"001"===h||r.selectNumberingPlan(i));return{country:i,countryCallingCode:d,countryCallingCodeSource:o,nationalNumber:c,carrierCode:u}}(i,n.defaultCountry,n.defaultCallingCode,t),s=d.country,l=d.nationalNumber,c=d.countryCallingCode,u=d.countryCallingCodeSource,h=d.carrierCode;if(!t.hasSelectedNumberingPlan()){if(n.v2)throw new Cr("INVALID_COUNTRY");return{}}if(!l||l.length<2){if(n.v2)throw new Cr("TOO_SHORT");return{}}if(l.length>17){if(n.v2)throw new Cr("TOO_LONG");return{}}if(n.v2){var p=new mr(c,l,t.metadata);return s&&(p.country=s),h&&(p.carrierCode=h),a&&(p.ext=a),p.__countryCallingCodeSource=u,p}var _=!!(n.extended?t.hasSelectedNumberingPlan():s)&&Mt(l,t.nationalNumberPattern());return n.extended?{country:s,countryCallingCode:c,carrierCode:h,valid:_,possible:!!_||!(!0!==n.extended||!t.possibleLengths()||!Rt(l,s,t)),phone:l,ext:a}:_?function(e,n,t){var r={country:e,phone:n};t&&(r.ext=t);return r}(s,l,a):{}}function Fr(e){return Fr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fr(e)}function qr(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Gr(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?qr(Object(t),!0).forEach(function(n){Kr(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):qr(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Kr(e,n,t){return(n=function(e){var n=function(e,n){if("object"!=Fr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n);if("object"!=Fr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==Fr(n)?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Vr(e){return Vr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vr(e)}function Wr(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Hr(e,n,t){return(n=function(e){var n=function(e,n){if("object"!=Vr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n);if("object"!=Vr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==Vr(n)?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function jr(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,i,a,o,d=[],s=!0,l=!1;try{if(a=(t=t.call(e)).next,0===n);else for(;!(s=(r=a.call(t)).done)&&(d.push(r.value),d.length!==n);s=!0);}catch(e){l=!0,i=e}finally{try{if(!s&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(l)throw i}}return d}}(e,n)||function(e,n){if(e){if("string"==typeof e)return Yr(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Yr(e,n):void 0}}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yr(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function Xr(e){var n,t,r,i=jr(Array.prototype.slice.call(e),4),a=i[0],o=i[1],d=i[2],s=i[3];if("string"!=typeof a)throw new TypeError("A text for parsing must be a string.");if(n=a,o&&"string"!=typeof o){if(!mt(o))throw new Error("Invalid second argument: ".concat(o));d?(t=o,r=d):r=o}else s?(t=d,r=s):(t=void 0,r=d),o&&(t=function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Wr(Object(t),!0).forEach(function(n){Hr(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Wr(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}({defaultCountry:o},t));return{text:n,options:t,metadata:r}}function zr(e){return zr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zr(e)}function Zr(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Jr(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Zr(Object(t),!0).forEach(function(n){Qr(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Zr(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Qr(e,n,t){return(n=function(e){var n=function(e,n){if("object"!=zr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n);if("object"!=zr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==zr(n)?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function ei(e,n,t){n&&n.defaultCountry&&!function(e,n){return n.countries.hasOwnProperty(e)}(n.defaultCountry,t)&&(n=Jr(Jr({},n),{},{defaultCountry:void 0}));try{return function(e,n,t){return Br(e,Gr(Gr({},n),{},{v2:!0}),t)}(e,n,t)}catch(e){if(!(e instanceof Cr))throw e}}function ni(){var e=Xr(arguments);return ei(e.text,e.options,e.metadata)}function ti(e){return new xt(e).getCountries()}function ri(e,n,t){if(n[e])return new mr(e,n[e],t)}function ii(){return ht(ni,arguments)}function ai(){return ht(St,arguments)}const oi=({countryCode:e,size:n=16})=>le("div",{style:{width:`${n}px`,height:`${n}px`,borderRadius:"50%",backgroundImage:`url(https://assets.xendit.co/payment-session/flags/circle/${e.toLowerCase()}.svg)`,backgroundSize:"cover",backgroundPosition:"center"}}),di=e=>{const{field:n,onChange:t}=e,r=Pn(n),i=En(n),[a,o]=Se(void 0),d=si.findIndex(e=>e.value===a),s=Ie(null);li(e=>{if(s.current){const n=si.find(n=>n.value===e);n&&l(n)}});const l=Me(e=>{o(e.value),s.current&&(s.current.value=e.value),t()},[t]);return le("div",{children:[le("input",{type:"hidden",name:i,defaultValue:"",ref:s}),le(Yn,{id:r,options:si,onChange:l,placeholder:n.placeholder,selectedIndex:d})]})},si=function(){return ht(ti,arguments)}().map(e=>({title:new Intl.DisplayNames(["en"],{type:"region"}).of(e),value:e,leadingAsset:le(oi,{countryCode:e})})).sort((e,n)=>e.title.localeCompare(n.title));function li(e){const n=no()?.cardDetails,t=n?.details?.country_codes[0],r=Cn(t);Te(()=>{t&&t!==r&&e(t)})}const ci=e=>{const{field:n,onChange:t}=e,r=Pn(n),i=En(n),a=Ie(null),o=Me(e=>{a.current&&(a.current.value=e.value),t()},[t]);if(!function(e){return"dropdown"===e.type.name}(n))throw new Error("DropdownField expects field.type.name to be 'dropdown'");return le(x,{children:[le(Yn,{id:r,placeholder:n.placeholder,options:(d=n.type.options,d.map(e=>({title:e.label,description:e.subtitle,value:e.value}))),onChange:o}),le("input",{type:"hidden",name:i,defaultValue:"",ref:a})]});var d};const ui="undefined"!=typeof window&&window.HTMLElement?window.HTMLElement:EventTarget;class XenditFormAssociatedFocusTrap extends ui{static tag="xendit-form-associated-focus-trap";static formAssociated=!0;internals;constructor(){super(),this.internals=this.attachInternals()}}var hi;hi=XenditFormAssociatedFocusTrap,"undefined"!=typeof window&&window.customElements&&customElements.define(hi.tag,hi);class InternalUpdateWorldState extends Event{data;static type="xendit-update-world-state";constructor(e){super(InternalUpdateWorldState.type,{bubbles:!1}),this.data=e}}class InternalUpdateChannelComponentData extends Event{channelCode;data;static type="xendit-update-channel-component-data";constructor(e,n){super(InternalUpdateChannelComponentData.type,{bubbles:!1}),this.channelCode=e,this.data=n}}class InternalSetFieldTouchedEvent extends Event{static type="xendit-internal-set-field-touched";constructor(){super(InternalSetFieldTouchedEvent.type,{bubbles:!0})}}class InternalBehaviorTreeUpdateEvent extends Event{static type="xendit-internal-behavior-tree-update";constructor(){super(InternalBehaviorTreeUpdateEvent.type,{})}}class InternalNeedsRerenderEvent extends Event{static type="xendit-internal-needs-rerender";constructor(){super(InternalNeedsRerenderEvent.type,{})}}class InternalScheduleMockUpdateEvent extends Event{mockData;static type="xendit-internal-schedule-mock-update";constructor(e){super(InternalScheduleMockUpdateEvent.type,{}),this.mockData=e}}const pi=W(null);un("https://assets.xendit.co/components/secure-iframe-v0.0.17.html");const _i=new URL("https://assets.xendit.co/components/secure-iframe-v0.0.17.html").origin,mi=({children:e})=>{const n=Ie(new Map),t={registerIframe:(e,t)=>{t.current&&n.current.set(e,t.current)},unregisterIframe:e=>n.current.delete(e),postMessageToIframe:(e,t)=>{const r=n.current.get(e);r?.contentWindow&&r.contentWindow.postMessage(t,_i)}};return le(pi.Provider,{value:t,children:e})};un("https://assets.xendit.co/components/secure-iframe-v0.0.17.html");const fi=new URL("https://assets.xendit.co/components/secure-iframe-v0.0.17.html"),yi=fi.toString(),bi=fi.origin,$i=e=>{const{field:n,onChange:t}=e,r=dn(),i=Pn(n),a=En(n),o=rn(),d=Ie(null),s=Ie(null),[l,c]=Se(),[u,h]=Se(!1),[p,_]=Se(null),{card:m}=Qa()??{},f=Me(e=>{if(!d.current)return;const r=d.current.contentWindow;if(e.source!==r)return;if(e.origin!==bi)return;const i=e.data;switch(i.type){case"xendit-iframe-ready":c(i.ecdhPublicKey);break;case"xendit-iframe-change":{if(!s.current)return;_(i.cardBrand);const e=i.encrypted,n=1,r=e.map(e=>{if(i.empty)return"";const t=["xendit-encrypted",n,l,e.iv,e.value];return!i.valid&&i.validationErrorCodes.length&&t.push("invalid",btoa(i.validationErrorCodes[0].localeKey)),t.join("-")});if(0===r.length)break;s.current.value=r.length>1?JSON.stringify(r):r[0],t?.();break}case"xendit-iframe-focus":h(!0);break;case"xendit-iframe-blur":h(!1),s.current?.value&&s.current?.dispatchEvent(new InternalSetFieldTouchedEvent);break;case"xendit-iframe-failed-init":console.error(`Iframe field for ${n.channel_property} failed to initialize securely`)}},[n.channel_property,l,t]),y=Me(()=>{d.current?.contentWindow&&d.current.contentWindow.postMessage({type:"xendit-iframe-focus"},bi)},[]);Te(()=>(window.addEventListener("message",f),()=>{window.removeEventListener("message",f)}),[f]);const b=Oe(pi);Te(()=>(b?.registerIframe(a,d),()=>b?.unregisterIframe(a)),[a,b]);const $=new URL(yi);$.searchParams.set("input_type",n.type.name),$.searchParams.set("embedder",window.location.origin),$.searchParams.set("session_id",o.payment_session_id),$.searchParams.set("pk",r[_e].sdkKey.publicKey),$.searchParams.set("sig",r[_e].sdkKey.signature),r[_e].options.iframeFieldAppearance&&$.searchParams.set("appearance",JSON.stringify(r[_e].options.iframeFieldAppearance));return le("div",{className:`xendit-iframe-container ${u?"xendit-field-focus":""}`,children:[le(XenditFormAssociatedFocusTrap.tag,{id:i,onFocus:y,tabIndex:-1}),le("input",{type:"hidden",name:a,defaultValue:"",ref:s}),le("iframe",{src:$.toString(),ref:d,sandbox:"allow-scripts allow-same-origin"}),"credit_card_number"===n.type.name&&m&&le(gi,{cardsBrandList:m.brands,selectedCardBrand:p})]})},gi=({cardsBrandList:e,selectedCardBrand:n})=>{if(!e)return null;const t=e.find(e=>e.name===n)?.logo_url;return le("div",{className:"xendit-card-brands-list",children:n?t&&le("img",{className:"xendit-card-brand-logo",src:t,alt:n}):e.map(({name:e,logo_url:n})=>le("img",{className:"xendit-card-brand-logo",src:n,alt:e},e))})};var vi={AC:"40123",AD:"312345",AE:"501234567",AF:"701234567",AG:"2684641234",AI:"2642351234",AL:"672123456",AM:"77123456",AO:"923123456",AR:"91123456789",AS:"6847331234",AT:"664123456",AU:"412345678",AW:"5601234",AX:"412345678",AZ:"401234567",BA:"61123456",BB:"2462501234",BD:"1812345678",BE:"450001234",BF:"70123456",BG:"43012345",BH:"36001234",BI:"79561234",BJ:"0195123456",BL:"690001234",BM:"4413701234",BN:"7123456",BO:"71234567",BQ:"3181234",BR:"11961234567",BS:"2423591234",BT:"17123456",BW:"71123456",BY:"294911911",BZ:"6221234",CA:"5062345678",CC:"412345678",CD:"991234567",CF:"70012345",CG:"061234567",CH:"781234567",CI:"0123456789",CK:"71234",CL:"221234567",CM:"671234567",CN:"13123456789",CO:"3211234567",CR:"83123456",CU:"51234567",CV:"9911234",CW:"95181234",CX:"412345678",CY:"96123456",CZ:"601123456",DE:"15123456789",DJ:"77831001",DK:"34412345",DM:"7672251234",DO:"8092345678",DZ:"551234567",EC:"991234567",EE:"51234567",EG:"1001234567",EH:"650123456",ER:"7123456",ES:"612345678",ET:"911234567",FI:"412345678",FJ:"7012345",FK:"51234",FM:"3501234",FO:"211234",FR:"612345678",GA:"06031234",GB:"7400123456",GD:"4734031234",GE:"555123456",GF:"694201234",GG:"7781123456",GH:"231234567",GI:"57123456",GL:"221234",GM:"3012345",GN:"601123456",GP:"690001234",GQ:"222123456",GR:"6912345678",GT:"51234567",GU:"6713001234",GW:"955012345",GY:"6091234",HK:"51234567",HN:"91234567",HR:"921234567",HT:"34101234",HU:"201234567",ID:"812345678",IE:"850123456",IL:"502345678",IM:"7924123456",IN:"8123456789",IO:"3801234",IQ:"7912345678",IR:"9123456789",IS:"6111234",IT:"3123456789",JE:"7797712345",JM:"8762101234",JO:"790123456",JP:"9012345678",KE:"712123456",KG:"700123456",KH:"91234567",KI:"72001234",KM:"3212345",KN:"8697652917",KP:"1921234567",KR:"1020000000",KW:"50012345",KY:"3453231234",KZ:"7710009998",LA:"2023123456",LB:"71123456",LC:"7582845678",LI:"660234567",LK:"712345678",LR:"770123456",LS:"50123456",LT:"61234567",LU:"628123456",LV:"21234567",LY:"912345678",MA:"650123456",MC:"612345678",MD:"62112345",ME:"60123456",MF:"690001234",MG:"321234567",MH:"2351234",MK:"72345678",ML:"65012345",MM:"92123456",MN:"88123456",MO:"66123456",MP:"6702345678",MQ:"696201234",MR:"22123456",MS:"6644923456",MT:"96961234",MU:"52512345",MV:"7712345",MW:"991234567",MX:"2221234567",MY:"123456789",MZ:"821234567",NA:"811234567",NC:"751234",NE:"93123456",NF:"381234",NG:"8021234567",NI:"81234567",NL:"612345678",NO:"40612345",NP:"9841234567",NR:"5551234",NU:"8884012",NZ:"211234567",OM:"92123456",PA:"61234567",PE:"912345678",PF:"87123456",PG:"70123456",PH:"9051234567",PK:"3012345678",PL:"512345678",PM:"551234",PR:"7872345678",PS:"599123456",PT:"912345678",PW:"6201234",PY:"961456789",QA:"33123456",RE:"692123456",RO:"712034567",RS:"601234567",RU:"9123456789",RW:"720123456",SA:"512345678",SB:"7421234",SC:"2510123",SD:"911231234",SE:"701234567",SG:"81234567",SH:"51234",SI:"31234567",SJ:"41234567",SK:"912123456",SL:"25123456",SM:"66661212",SN:"701234567",SO:"71123456",SR:"7412345",SS:"977123456",ST:"9812345",SV:"70123456",SX:"7215205678",SY:"944567890",SZ:"76123456",TA:"8999",TC:"6492311234",TD:"63012345",TG:"90112345",TH:"812345678",TJ:"917123456",TK:"7290",TL:"77212345",TM:"66123456",TN:"20123456",TO:"7715123",TR:"5012345678",TT:"8682911234",TV:"901234",TW:"912345678",TZ:"621234567",UA:"501234567",UG:"712345678",US:"2015550123",UY:"94231234",UZ:"912345678",VA:"3123456789",VC:"7844301234",VE:"4121234567",VG:"2843001234",VI:"3406421234",VN:"912345678",VU:"5912345",WF:"821234",WS:"7212345",XK:"43201234",YE:"712345678",YT:"639012345",ZA:"711234567",ZM:"955123456",ZW:"712345678"};const xi=e=>{const{field:n,onChange:t}=e,r=Pn(n),i=En(n),a=rn(),o=Ie(null),[d,s]=Se(a.country),l=Re(()=>{const e=wi.findIndex(e=>e.value===d);return-1===e?0:e},[d]),c=wi[l],[u,h]=Se(""),p=Ie(null),_=Me((e,n)=>{const t=Ci(e,n);return t?t.number:`+${e.dial}${n}`},[]),m=Me((e,n)=>{o.current&&(o.current.value=_(e,n))},[_]);function f(e){const n=e;s(n.value),m(n,u),t()}return li(e=>{const n=wi.find(n=>n.value===e);n&&n.value!==d&&!u&&f(n)}),le("div",{className:"xendit-input-phone",children:[le(Yn,{options:wi,selectedIndex:l,onChange:f}),le("input",{id:r,ref:p,type:"tel",inputMode:"tel",placeholder:function(){return ht(ri,arguments)}(c.value,vi)?.formatInternational()?.replace(`+${ai(c.value)} `,"")||"",className:"xendit-text-14 xendit-phone-number-input",onBlur:function(e){!function(){const e=Ci(c,u);if(e){const n=e.formatInternational();h(n.replace(`+${ai(c.value)} `,""))}}(),e.currentTarget?.value&&o.current?.dispatchEvent(new InternalSetFieldTouchedEvent)},onChange:function(e){const n=e.target.value;h(n),m(c,n),t()},value:u,autoComplete:"tel"}),le("input",{type:"hidden",name:i,ref:o})]})},wi=si.map(e=>{const n=ai(e.value);return n?{...e,shortTitle:`+${n}`,title:`${e.title} (+${n})`,dial:n}:null}).filter(e=>Boolean(e)),Ci=(e,n)=>{const t=ii(n,e.value);return t&&t.isPossible()?t:null};function Ei(e){return{title:e.name,value:e.value}}const ki=[{name:"Alabama",value:"AL"},{name:"Alaska",value:"AK"},{name:"American Samoa",value:"AS"},{name:"Arizona",value:"AZ"},{name:"Arkansas",value:"AR"},{name:"California",value:"CA"},{name:"Colorado",value:"CO"},{name:"Connecticut",value:"CT"},{name:"Delaware",value:"DE"},{name:"District Of Columbia",value:"DC"},{name:"Federated States Of Micronesia",value:"FM"},{name:"Florida",value:"FL"},{name:"Georgia",value:"GA"},{name:"Guam",value:"GU"},{name:"Hawaii",value:"HI"},{name:"Idaho",value:"ID"},{name:"Illinois",value:"IL"},{name:"Indiana",value:"IN"},{name:"Iowa",value:"IA"},{name:"Kansas",value:"KS"},{name:"Kentucky",value:"KY"},{name:"Louisiana",value:"LA"},{name:"Maine",value:"ME"},{name:"Marshall Islands",value:"MH"},{name:"Maryland",value:"MD"},{name:"Massachusetts",value:"MA"},{name:"Michigan",value:"MI"},{name:"Minnesota",value:"MN"},{name:"Mississippi",value:"MS"},{name:"Missouri",value:"MO"},{name:"Montana",value:"MT"},{name:"Nebraska",value:"NE"},{name:"Nevada",value:"NV"},{name:"New Hampshire",value:"NH"},{name:"New Jersey",value:"NJ"},{name:"New Mexico",value:"NM"},{name:"New York",value:"NY"},{name:"North Carolina",value:"NC"},{name:"North Dakota",value:"ND"},{name:"Northern Mariana Islands",value:"MP"},{name:"Ohio",value:"OH"},{name:"Oklahoma",value:"OK"},{name:"Oregon",value:"OR"},{name:"Palau",value:"PW"},{name:"Pennsylvania",value:"PA"},{name:"Puerto Rico",value:"PR"},{name:"Rhode Island",value:"RI"},{name:"South Carolina",value:"SC"},{name:"South Dakota",value:"SD"},{name:"Tennessee",value:"TN"},{name:"Texas",value:"TX"},{name:"Utah",value:"UT"},{name:"Vermont",value:"VT"},{name:"Virgin Islands",value:"VI"},{name:"Virginia",value:"VA"},{name:"Washington",value:"WA"},{name:"West Virginia",value:"WV"},{name:"Wisconsin",value:"WI"},{name:"Wyoming",value:"WY"}].map(Ei),Pi=[{name:"Alberta",value:"AB"},{name:"British Columbia",value:"BC"},{name:"Manitoba",value:"MB"},{name:"New Brunswick",value:"NB"},{name:"Newfoundland and Labrador",value:"NL"},{name:"Northwest Territories",value:"NT"},{name:"Nova Scotia",value:"NS"},{name:"Nunavut",value:"NU"},{name:"Ontario",value:"ON"},{name:"Prince Edward Island",value:"PE"},{name:"Quebec",value:"QC"},{name:"Saskatchewan",value:"SK"},{name:"Yukon Territory",value:"YT"}].map(Ei),Ai=[{name:"Avon"},{name:"Bedfordshire"},{name:"Berkshire"},{name:"Buckinghamshire"},{name:"Cambridgeshire"},{name:"Cheshire"},{name:"Cleveland"},{name:"Cornwall"},{name:"Cumbria"},{name:"Derbyshire"},{name:"Devon"},{name:"Dorset"},{name:"Durham"},{name:"East Sussex"},{name:"Essex"},{name:"Gloucestershire"},{name:"Hampshire"},{name:"Herefordshire"},{name:"Hertfordshire"},{name:"Isle of Wight"},{name:"Kent"},{name:"Lancashire"},{name:"Leicestershire"},{name:"Lincolnshire"},{name:"London"},{name:"Merseyside"},{name:"Norfolk"},{name:"Northamptonshire"},{name:"Northumberland"},{name:"North Yorkshire"},{name:"Nottinghamshire"},{name:"Oxfordshire"},{name:"Rutland"},{name:"Shropshire"},{name:"Somerset"},{name:"South Yorkshire"},{name:"Staffordshire"},{name:"Suffolk"},{name:"Surrey"},{name:"Tyne and Wear"},{name:"Warwickshire"},{name:"West Midlands"},{name:"West Sussex"},{name:"West Yorkshire"},{name:"Wiltshire"},{name:"Worcestershire"},{name:"Clwyd"},{name:"Dyfed"},{name:"Gwent"},{name:"Gwynedd"},{name:"Mid Glamorgan"},{name:"Powys"},{name:"South Glamorgan"},{name:"West Glamorgan"},{name:"Aberdeenshire"},{name:"Angus"},{name:"Argyll"},{name:"Ayrshire"},{name:"Banffshire"},{name:"Berwickshire"},{name:"Bute"},{name:"Caithness"},{name:"Clackmannanshire"},{name:"Dumfriesshire"},{name:"Dunbartonshire"},{name:"East Lothian"},{name:"Fife"},{name:"Inverness-shire"},{name:"Kincardineshire"},{name:"Kinross-shire"},{name:"Kirkcudbrightshire"},{name:"Lanarkshire"},{name:"Midlothian"},{name:"Moray"},{name:"Nairnshire"},{name:"Orkney"},{name:"Peeblesshire"},{name:"Perthshire"},{name:"Renfrewshire"},{name:"Ross-shire"},{name:"Roxburghshire"},{name:"Selkirkshire"},{name:"Shetland"},{name:"Stirlingshire"},{name:"Sutherland"},{name:"West Lothian"},{name:"Wigtownshire"},{name:"Antrim"},{name:"Armagh"},{name:"Down"},{name:"Fermanagh"},{name:"Londonderry"},{name:"Tyrone"}].map(e=>({title:e.name,value:e.name})),Ni=e=>{const{field:n,onChange:t}=e,r=Pn(n),i=En(n),a=rn(),o=Qa()?.form,d=La(),s=Ie(null),l=Me(()=>{s.current&&(s.current.value=""),t()},[t]),c=Me(e=>{s.current&&(s.current.value=e.value),t(),s.current?.dispatchEvent(new InternalSetFieldTouchedEvent)},[t]),u=Me(e=>{s.current&&(s.current.value=e.target.value),t(),s.current?.dispatchEvent(new InternalSetFieldTouchedEvent)},[t]),h=function(e){switch(e){case"US":return ki;case"CA":return Pi;case"GB":return Ai;default:return null}}(function(e,n,t,r){if(n)for(let r=0;r<n.length;r++){const i=n[r];if(r>0&&i===e){const e=n[r-1];if("country"===e.type.name){const n=Mn(e.channel_property,t);if(n&&"string"==typeof n)return n}}}return r.country}(n,o??[],d??{},a)),p=Cn(h);return Te(()=>{p!==h&&l()},[l,h,p]),le(x,{children:[le("input",{type:"hidden",name:i,defaultValue:"",ref:s}),h?le(Yn,{id:r,options:h,onChange:c,placeholder:n.placeholder},(_=h,Ln.has(_)||Ln.set(_,Un++),Ln.get(_).toString())):le("input",{type:"text",id:r,onChange:u,placeholder:n.placeholder,className:"xendit-input xendit-text-14"})]});var _};const Si=e=>{const{field:n,onChange:t}=e,r=Pn(n),i=En(n),a=Ie(null);return le("input",{id:r,name:i,ref:a,type:"text",placeholder:n.placeholder,className:"xendit-text-14",onBlur:function(e){e.currentTarget?.value&&a.current?.dispatchEvent(new InternalSetFieldTouchedEvent)},onChange:function(e){t()},minLength:Ti(n)?n.type.min_length:void 0,maxLength:Ti(n)?n.type.max_length:void 0,autoComplete:Ti(n)?n.type.autocomplete:void 0})};function Ti(e){return"text"===e.type.name}const Ii={IDR:"id",VND:"vi",BRL:"pt-BR",RUB:"ru",CZK:"cs",RON:"ro",UAH:"uk",CLP:"es-CL",COP:"es-CO",UYU:"es-UY",ARS:"es-AR",INR:"hi-IN",NPR:"hi-IN",LKR:"hi-IN",BDT:"hi-IN"},Ri={USD:"US$",CAD:"CA$",EUR:"€",AFN:"؋",ALL:"Lek",AMD:"֏",ARS:"AR$",AUD:"AU$",AZN:"₼",BAM:"KM",BDT:"৳",BIF:"FBu",BND:"BN$",BOB:"Bs",BRL:"R$",BWP:"P",BYN:"Br",BZD:"BZ$",CDF:"FrCD",CHF:"CHF",CLP:"CL$",CNY:"CN¥",COP:"CO$",CRC:"₡",CVE:"CV$",CZK:"Kč",DJF:"Fdj",DKK:"kr",DOP:"RD$",ERN:"Nfk",ETB:"Br",GBP:"£",GEL:"₾",GHS:"GH₵",GNF:"FG",GTQ:"Q",HKD:"HK$",HNL:"L",HUF:"Ft",IDR:"Rp",ILS:"₪",INR:"₹",IRR:"IRR",ISK:"kr",JMD:"J$",JPY:"¥",KES:"Ksh",KHR:"៛",KMF:"FC",KRW:"₩",KZT:"₸",LKR:"SL Re",MDL:"lei",MGA:"MGA",MKD:"MKD",MMK:"K",MOP:"MOP$",MUR:"₨",MXN:"MX$",MYR:"RM",MZN:"MTn",NAD:"N$",NGN:"₦",NIO:"C$",NOK:"kr",NPR:"रु",NZD:"NZ$",PAB:"B/.",PEN:"S/.",PHP:"₱",PKR:"₨",PLN:"zł",PYG:"₲",RON:"RON",RSD:"RSD",RUB:"₽",RWF:"FR",SDG:"SDG",SEK:"kr",SGD:"S$",SOS:"Ssh",THB:"฿",TOP:"T$",TRY:"TL",TTD:"TT$",TWD:"NT$",TZS:"TSh",UAH:"₴",UGX:"USh",UYU:"$U",UZS:"сум",VND:"₫",XAF:"FCFA",XOF:"CFA",ZAR:"R",ZMW:"K",ZWL:"ZWL$"},Mi={ALL:"1 $",BAM:"1 $",BYN:"1 $",CZK:"1 $",DKK:"1 $",GEL:"1 $",HUF:"1 $",ISK:"1 $",IRR:"1 $",KHR:"1$",MDL:"1 $",MKD:"1 $",NOK:"1 $",PLN:"1 $",RON:"1 $",RSD:"1 $",RUB:"1$",SEK:"1 $",UZS:"1 $",VND:"1$"},Oi={BHD:3,JOD:3,KWD:3,LYD:3,OMR:3,TND:3};function Di(e,n){let t="";const r=e<0,i=Ii[n]??"en",a=Oi[n]??2;if(t=new Intl.NumberFormat(i,{style:"decimal",minimumFractionDigits:a,maximumFractionDigits:20}).format(Math.abs(e)),t=t.replace(/(\.|,)000?$/,""),Ri[n]){const e=Ri[n]??n;t=(Mi[n]??"$1").replace("$",e).replace("1",t)}else t=n+" "+t;return r&&(t="-"+t),t}const Li=e=>{const{field:n,onChange:t}=e,{t:r}=dn(),i=rn(),a=Pn(n),o=En(n),d=Ie(null),s=Qa();un(s);const l=Re(()=>Kn(s.form,"credit_card_number"),[s.form]),c=no()?.paymentOptions,u=c?.options?.installment_plans,[h,p]=Se(null),_=Re(()=>{const e=u?.map(e=>({title:r("installment_plan.pay_in_installments",{installments:e.terms,amount:Di(e.installment_amount,i.currency)}),subtitle:e.interest_rate,value:Ui(e)}))??[];return l&&e.unshift({title:r("installment_plan.pay_in_full",{amount:Di(i.amount,i.currency)}),value:""}),e},[l,u,i.amount,i.currency,r]);let m=_?.findIndex(e=>e.value===h);-1===m&&(m=0);const f=Me(()=>{p(null),d.current&&(d.current.value="")},[]),y=Me(e=>{if(d.current){const n=u?.find(n=>Ui(n)===e.value);n?n.code?d.current.value=JSON.stringify([n.terms,n.interval,n.code]):d.current.value=JSON.stringify([n.terms,n.interval]):d.current.value="",d.current?.dispatchEvent(new InternalSetFieldTouchedEvent)}p(e.value),t()},[u,t]);Te(()=>{_.length&&y(_[0])},[]);const b=Cn(_);return Te(()=>{_===b||u?.some(e=>Ui(e)===h)||(_.length?y(_[0]):f())},[f,_,y,u,b,h]),le(x,{children:[c?le(Yn,{id:a,placeholder:n.placeholder,className:"xendit-text-14",onChange:y,options:_,selectedIndex:m}):le(Xn,{id:a}),le("input",{type:"hidden",name:o,ref:d})]})};function Ui(e){return`${e.terms}_${e.interval}_${e.code??""}`}const Bi=e=>{const{field:n,className:t}=e;return le("div",{className:`${t} xendit-channel-form-field xendit-form-field-span-${n.span}`,children:function(){switch(n.type.name){case"credit_card_number":case"credit_card_expiry":case"credit_card_cvn":return le($i,{...e});case"phone_number":return le(xi,{...e});case"text":case"email":case"postal_code":return le(Si,{...e});case"dropdown":return le(ci,{...e});case"installment_plan":return le(Li,{...e});case"country":return le(di,{...e});case"province":return le(Ni,{...e})}throw n.type,new Error(`Unsupported field type: ${n.type.name}`)}()})};const Fi={en:{session:{"validation.card_cvn_invalid":"CVN is not valid","validation.card_expiry_invalid":"Card expiry is not valid","validation.card_number_incomplete":"Card number is incomplete","validation.card_number_invalid":"Card number is not valid","validation.generic_invalid":"{{field}} is not valid","validation.required":"{{field}} is required","validation.text_too_long":"{{field}} is too long","validation.text_too_short":"{{field}} is too short","payment.save_checkbox_label":"Save for faster payment next time","payment_methods.add_payment_method":"Add payment method","payment_methods.channel_disabled_amount_too_large":"Not available for this payment","payment_methods.channel_disabled_amount_too_small":"Not available for this payment","payment_methods.pay_with":"Pay with","payment_methods.select_channel_placeholder":"Select {{groupName}}","default_error.message_1":"There was a problem with the request.","default_error.message_2":"Please try again later.","default_error.title":"Error","combobox.default_search_placeholder":"Search...","installment_plan.pay_in_full":"Pay in Full — {{amount}}","installment_plan.pay_in_installments":"{{installments}}x Installments — {{amount}}","google_pay_errors.developer_error.title":"Google Pay Error","google_pay_errors.developer_error.message":"Something went wrong with Google Pay. Please try again or use a different payment method.","google_pay_errors.buyer_account_error.title":"Google Pay Error","google_pay_errors.buyer_account_error.message":"Your Google account is unable to make this payment. Use a different Google account or a different payment method.","google_pay_errors.merchant_account_error.title":"Google Pay Error","google_pay_errors.merchant_account_error.message":"Something went wrong with Google Pay. Please try again or use a different payment method.","google_pay_errors.internal_error.title":"Google Pay Error","google_pay_errors.internal_error.message":"Something went wrong with Google Pay. Please try again or use a different payment method.","google_pay_errors.unknown_error.title":"Google Pay Error","google_pay_errors.unknown_error.message":"An unknown error occurred with Google Pay. The error code is {{statusCode}}.","failure_code.account_access_blocked":"Your payment was declined. Please try again or use a different payment method.","failure_code.account_already_linked":"Your account has already been linked. Please use a different payment method.","failure_code.account_not_activated":"Your payment couldn’t be processed because your account hasn’t been activated. Please activate your account and try again.","failure_code.authentication_failed":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.capture_amount_exceeded":"Your payment couldn't be processed. Please make sure your payment details are correct and try again, or use a different payment method.","failure_code.card_declined":"Your card was declined. Please try again with another card or payment method.","failure_code.channel_unavailable":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.declined_by_issuer":"Your payment was declined. Please try again or use a different payment method.","failure_code.declined_by_processor":"Your payment was declined. Please try again or use a different payment method.","failure_code.expired_card":"Your card was declined because it is expired. Please try again or use a different payment method.","failure_code.expired_otp":"Your payment couldn’t be processed because your verification code is invalid. Please try again or use a different payment method.","failure_code.failure_details_unavailable":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.inactive_or_unauthorized_card":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.insufficient_balance":"Your payment couldn’t be processed because your account balance is insufficient. Please make sure you have enough funds and try again.","failure_code.invalid_account_details":"Your payment information is incorrect. Please double-check your card details or try a different payment method.","failure_code.invalid_cvv":"The CVN entered was incorrect. Please try again.","failure_code.invalid_merchant_settings":"Your payment couldn’t be processed. Please contact the seller or try a different payment method.","failure_code.invalid_otp":"Your payment couldn’t be processed because your verification code is invalid. Please try again or use a different payment method.","failure_code.invalid_token":"Your payment couldn’t be processed because your verification code is invalid. Please try again or use a different payment method.","failure_code.issuer_unavailable":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.otp_attempt_counts_exceeded":"Your payment couldn’t be processed because there were too many failed OTP attempts. Please make the payment again or use a different payment method.","failure_code.partner_timeout_error":"Your payment couldn't be processed. Please try again or use a different payment method.","failure_code.payment_amount_limits_exceeded":"Your payment couldn’t be processed because you’ve exceeded your transaction limit. Please use a different payment method.","failure_code.payment_attempt_counts_exceeded":"Your payment couldn’t be processed due to too many failed attempts.","failure_code.payment_request_expired":"Your payment couldn’t be processed because the link has expired. Please try again or use a different payment method.","failure_code.processor_error":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.server_error":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.stolen_card":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.suspected_fraudulent":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.timeout_error":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.user_declined_payment":"Your payment was declined. Please try again or use a different payment method.","failure_code.user_device_unreachable":"Your payment couldn’t be processed due to a network issue. Please try again or use a different payment method.","failure_code.user_did_not_authorize":"Your payment couldn’t be processed because it wasn’t authorized in time. Please try again.",failure_code_unknown:"A failure occurred with code {{failureCode}}","payment_request_status.canceled.subtext":"Please try to check out again or contact the seller if the problem persists.","payment_request_status.canceled.title":"This page is no longer available","payment_request_status.expired.subtext":"Your payment couldn’t be processed. Please try again or use a different payment method.","payment_request_status.expired.title":"Payment unsuccessful","payment_request_status.failed.subtext":"Your payment couldn't be processed. Please try a different payment method or submit an inquiry to the seller by sharing your Unique Identifiers.","payment_request_status.failed.title":"Payment failed","payment_token_status.canceled.subtext":"Please try again or use a different payment method.","payment_token_status.canceled.title":"Payment method couldn't be added","payment_token_status.expired.subtext":"Please try again or use a different payment method.","payment_token_status.expired.title":"Payment method couldn't be added","payment_token_status.failed.subtext":"Your payment couldn't be processed. Please try a different payment method or submit an inquiry to the seller by sharing your Unique Identifiers.","payment_token_status.failed.title":"Payment method couldn't be added","action.payment_confirmation_instructions":"Once you've paid, click the button above to get your payment confirmation.","action.payment_made":"I've made this payment","action_va.merchant_name":"Virtual Account Name","action_va.amount_to_pay":"Amount to Pay","action_va.virtual_account_number":"Virtual Account Number","action_va.copy":"Copy","action_va.copied_to_clipboard":"Copied to clipboard","action_qr.unable_to_generate":"Unable to generate QR code","action_deeplink.button":"Open App","action_deeplink.instructions":"Please complete your payment on {{channelName}} app.","action_deeplink.title":"Awaiting payment...","action_empty_list_push_notification.subtext":"Check the notification in your {{channelName}} app to complete your payment.","action_empty_list_push_notification.title":"Awaiting payment...","image_alt.channel_logo":"{{channelName}} logo","simulation.simulate_scenario":"Simulate scenario","simulation.simulate_test_scenario":"Simulate a test scenario","simulation.select_scenario":"Select a scenario","simulation.want_to_test_all_scenarios":"Want to test different scenarios?","simulation.see_all_scenarios":"See the full list here."}}.session,id:{session:{"validation.card_cvn_invalid":"CVN tidak valid","validation.card_expiry_invalid":"Tanggal kedaluwarsa kartu tidak valid","validation.card_number_incomplete":"Nomor kartu tidak lengkap","validation.card_number_invalid":"Nomor kartu tidak valid","validation.generic_invalid":"{{field}} tidak valid","validation.required":"{{field}} wajib diisi","validation.text_too_long":"{{field}} terlalu panjang","validation.text_too_short":"{{field}} terlalu pendek","payment.save_checkbox_label":"Simpan untuk pembayaran lebih cepat lain kali","payment_methods.add_payment_method":"Tambah metode pembayaran","payment_methods.channel_disabled_amount_too_large":"Tidak tersedia untuk pembayaran ini","payment_methods.channel_disabled_amount_too_small":"Tidak tersedia untuk pembayaran ini","payment_methods.pay_with":"Bayar dengan","payment_methods.select_channel_placeholder":"Pilih {{groupName}}","default_error.message_1":"Ada masalah dengan permintaan ini.","default_error.message_2":"Silakan coba lagi nanti.","default_error.title":"Error","failure_code.account_access_blocked":"Pembayaran Anda ditolak. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.account_already_linked":"Akun Anda sudah di-link. Silakan gunakan metode pembayaran lain.","failure_code.account_not_activated":"Pembayaran Anda tidak dapat diproses karena akun Anda belum diaktifkan. Harap aktifkan akun Anda dan coba lagi.","failure_code.authentication_failed":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.capture_amount_exceeded":"Pembayaran Anda tidak dapat diproses. Pastikan detail pembayaran Anda benar dan coba lagi, atau gunakan metode pembayaran lain.","failure_code.card_declined":"Kartu Anda ditolak. Silakan coba lagi dengan kartu atau metode pembayaran lain.","failure_code.channel_unavailable":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.declined_by_issuer":"Pembayaran Anda ditolak. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.declined_by_processor":"Pembayaran Anda ditolak. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.expired_card":"Kartu Anda ditolak karena sudah kedaluwarsa. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.expired_otp":"Pembayaran Anda tidak dapat diproses karena kode verifikasi tidak valid. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.failure_details_unavailable":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.inactive_or_unauthorized_card":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.insufficient_balance":"Pembayaran Anda tidak dapat diproses karena saldo akun Anda tidak mencukupi. Pastikan Anda memiliki dana yang cukup dan coba lagi.","failure_code.invalid_account_details":"Informasi pembayaran Anda salah. Harap periksa kembali detail kartu Anda atau coba gunakan metode pembayaran lain.","failure_code.invalid_cvv":"CVN yang dimasukkan salah. Silakan coba lagi.","failure_code.invalid_merchant_settings":"Pembayaran Anda tidak dapat diproses. Silakan hubungi penjual atau coba metode pembayaran lain.","failure_code.invalid_otp":"Pembayaran Anda tidak dapat diproses karena kode verifikasi tidak valid. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.invalid_token":"Pembayaran Anda tidak dapat diproses karena kode verifikasi tidak valid. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.issuer_unavailable":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.otp_attempt_counts_exceeded":"Pembayaran Anda tidak dapat diproses karena terlalu banyak percobaan OTP yang gagal. Harap lakukan pembayaran lagi atau gunakan metode pembayaran lain.","failure_code.partner_timeout_error":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.payment_amount_limits_exceeded":"Pembayaran Anda tidak dapat diproses karena Anda telah melampaui batas transaksi. Silakan gunakan metode pembayaran lain.","failure_code.payment_attempt_counts_exceeded":"Pembayaran Anda tidak dapat diproses karena terlalu banyak percobaan yang gagal.","failure_code.payment_request_expired":"Pembayaran Anda tidak dapat diproses karena link telah kedaluwarsa. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.processor_error":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.server_error":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.stolen_card":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.suspected_fraudulent":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.timeout_error":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.user_declined_payment":"Pembayaran Anda ditolak. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.user_device_unreachable":"Pembayaran Anda tidak dapat diproses karena masalah jaringan. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.user_did_not_authorize":"Pembayaran Anda tidak dapat diproses karena waktu pembayaran telah habis. Silakan coba lagi.",failure_code_unknown:"Terjadi kegagalan dengan kode {{failureCode}}","payment_request_status.canceled.subtext":"Silakan coba check out lagi atau hubungi penjual jika masalah terus berlanjut.","payment_request_status.canceled.title":"Halaman ini tidak tersedia lagi","payment_request_status.expired.subtext":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","payment_request_status.expired.title":"Pembayaran tidak berhasil","payment_request_status.failed.subtext":"Pembayaran Anda tidak dapat diproses. Silakan coba metode pembayaran lain atau ajukan pertanyaan kepada penjual dengan membagikan ID Unik Anda.","payment_request_status.failed.title":"Pembayaran gagal","payment_token_status.canceled.subtext":"Silakan coba lagi atau gunakan metode pembayaran lain.","payment_token_status.canceled.title":"Metode pembayaran tidak dapat ditambahkan","payment_token_status.expired.subtext":"Silakan coba lagi atau gunakan metode pembayaran lain.","payment_token_status.expired.title":"Metode pembayaran tidak dapat ditambahkan","payment_token_status.failed.subtext":"Pembayaran Anda tidak dapat diproses. Silakan coba metode pembayaran lain atau ajukan pertanyaan kepada penjual dengan membagikan ID Unik Anda.","payment_token_status.failed.title":"Metode pembayaran tidak dapat ditambahkan","action.payment_confirmation_instructions":"Setelah Anda bayar, klik tombol di atas untuk mendapatkan konfirmasi pembayaran Anda.","action.payment_made":"Saya telah melakukan pembayaran ini","action_va.amount_to_pay":"Jumlah Pembayaran","action_va.virtual_account_number":"Nomor Virtual Account","action_qr.unable_to_generate":"Tidak dapat membuat kode QR"}}.session,th:{session:{"validation.card_cvn_invalid":"CVN ไม่ถูกต้อง","validation.card_expiry_invalid":"วันหมดอายุของบัตรไม่ถูกต้อง","validation.card_number_incomplete":"หมายเลขบัตรไม่ครบถ้วน","validation.card_number_invalid":"หมายเลขบัตรไม่ถูกต้อง","validation.generic_invalid":"{{field}} ไม่ถูกต้อง","validation.required":"กรุณากรอก {{field}}","validation.text_too_long":"{{field}} ยาวเกินไป","validation.text_too_short":"{{field}} สั้นเกินไป","payment.save_checkbox_label":"บันทึกไว้สำหรับการชำระเงินที่เร็วขึ้นในครั้งถัดไป","payment_methods.add_payment_method":"เพิ่มวิธีการชำระเงิน","payment_methods.channel_disabled_amount_too_large":"ไม่สามารถใช้ได้กับการชำระเงินนี้","payment_methods.channel_disabled_amount_too_small":"ไม่สามารถใช้ได้กับการชำระเงินนี้","payment_methods.pay_with":"ชำระเงินด้วย","payment_methods.select_channel_placeholder":"เลือก {{groupName}}","default_error.message_1":"มีปัญหาในการประมวลผลคำขอ","default_error.message_2":"โปรดลองอีกครั้งในภายหลัง","default_error.title":"ข้อผิดพลาด","failure_code.account_access_blocked":"การชำระเงินของคุณถูกปฏิเสธ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.account_already_linked":"บัญชีนี้มีการเชื่อมต่อไว้แล้ว กรุณาเลือกวิธีการชำระเงินอื่น","failure_code.account_not_activated":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากบัญชีของคุณยังไม่ได้เปิดใช้งาน กรุณาเปิดใช้งานบัญชีและลองใหม่อีกครั้ง","failure_code.authentication_failed":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.capture_amount_exceeded":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาตรวจสอบรายละเอียดการชำระเงินให้ถูกต้องแล้วลองใหม่อีกครั้ง หรือใช้วิธีการชำระเงินอื่น","failure_code.card_declined":"บัตรของคุณถูกปฏิเสธ กรุณาลองใหม่ด้วยบัตรหรือวิธีการชำระเงินอื่น","failure_code.channel_unavailable":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือเลือกวิธีการชำระเงินอื่น","failure_code.declined_by_issuer":"การชำระเงินของคุณถูกปฏิเสธ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.declined_by_processor":"การชำระเงินของคุณถูกปฏิเสธ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.expired_card":"บัตรของคุณถูกปฏิเสธเนื่องจากบัตรหมดอายุ กรุณาลองใหม่อีกครั้งหรือใช้วิธีการชําระเงินอื่น","failure_code.expired_otp":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากรหัสยืนยันของคุณไม่ถูกต้อง กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.failure_details_unavailable":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.inactive_or_unauthorized_card":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือเลือกวิธีการชำระเงินอื่น","failure_code.insufficient_balance":"ไม่สามารถดำเนินการชำระเงินได้ เนื่องจากยอดเงินในบัญชีไม่เพียงพอ กรุณาตรวจสอบให้แน่ใจว่ามียอดเงินเพียงพอแล้วลองใหม่อีกครั้ง","failure_code.invalid_account_details":"ข้อมูลการชำระเงินไม่ถูกต้อง กรุณาตรวจสอบรายละเอียดบัตรอีกครั้ง หรือใช้วิธีการชำระเงินอื่น","failure_code.invalid_cvv":"CVN ที่กรอกไม่ถูกต้อง กรุณาลองใหม่อีกครั้ง","failure_code.invalid_merchant_settings":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาติดต่อผู้ขายหรือลองใช้วิธีชำระเงินอื่น","failure_code.invalid_otp":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากรหัสยืนยันของคุณไม่ถูกต้อง กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.invalid_token":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากรหัสยืนยันของคุณไม่ถูกต้อง กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.issuer_unavailable":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือเลือกวิธีการชำระเงินอื่น","failure_code.otp_attempt_counts_exceeded":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากมีการกรอกรหัส OTP ผิดพลาดมากเกินไป กรุณาชำระเงินใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.partner_timeout_error":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.payment_amount_limits_exceeded":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากคุณทำธุรกรรมเกินขีดจำกัด กรุณาใช้วิธีชำระเงินอื่น","failure_code.payment_attempt_counts_exceeded":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากพยายามล้มเหลวหลายครั้งเกินไป","failure_code.payment_request_expired":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากลิงก์หมดอายุแล้ว กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.processor_error":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือเลือกวิธีการชำระเงินอื่น","failure_code.server_error":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.stolen_card":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือเลือกวิธีการชำระเงินอื่น","failure_code.suspected_fraudulent":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือเลือกวิธีการชำระเงินอื่น","failure_code.timeout_error":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.user_declined_payment":"การชำระเงินของคุณถูกปฏิเสธ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.user_device_unreachable":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากปัญหาเครือข่าย กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.user_did_not_authorize":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากไม่ได้รับการอนุมัติภายในเวลาที่กำหนด กรุณาลองใหม่อีกครั้ง",failure_code_unknown:"เกิดข้อผิดพลาดขึ้น (รหัส: {{failureCode}})","payment_request_status.canceled.subtext":"กรุณาลองชำระเงินอีกครั้ง หรือ ติดต่อผู้ขายหากปัญหายังคงเกิดขึ้น","payment_request_status.canceled.title":"หน้านี้ไม่สามารถใช้งานได้แล้ว","payment_request_status.expired.subtext":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือลองใช้วิธีชำระเงินอื่น","payment_request_status.expired.title":"ชำระเงินไม่สำเร็จ","payment_request_status.failed.subtext":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใช้วิธีการชำระเงินอื่น หรือส่งคำถามไปยังผู้ขายโดยแชร์ Unique Identifiers ของคุณ","payment_request_status.failed.title":"ชำระเงินไม่สำเร็จ","payment_token_status.canceled.subtext":"กรุณาลองใหม่อีกครั้งหรือใช้วิธีการชําระเงินอื่น","payment_token_status.canceled.title":"ไม่สามารถเพิ่มวิธีการชําระเงินได้","payment_token_status.expired.subtext":"กรุณาลองใหม่อีกครั้งหรือใช้วิธีการชําระเงินอื่น","payment_token_status.expired.title":"ไม่สามารถเพิ่มวิธีการชําระเงินได้","payment_token_status.failed.subtext":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใช้วิธีการชำระเงินอื่น หรือส่งคำถามไปยังผู้ขายโดยแชร์ Unique Identifiers ของคุณ","payment_token_status.failed.title":"ไม่สามารถเพิ่มวิธีการชําระเงินได้","action.payment_confirmation_instructions":"เมื่อคุณชำระเงินแล้ว คลิกที่ปุ่มด้านบนเพื่อยืนยันการชำระเงิน","action.payment_made":"ฉันได้ชำระเงินแล้ว","action_va.amount_to_pay":"ยอดชำระ","action_va.virtual_account_number":"หมายเลข Virtual Account","action_qr.unable_to_generate":"ไม่สามารถสร้างคิวอาร์โค้ดได้"}}.session,vi:{session:{"validation.card_cvn_invalid":"CVN không hợp lệ","validation.card_expiry_invalid":"Ngày hết hạn thẻ không hợp lệ","validation.card_number_incomplete":"Số thẻ chưa đầy đủ","validation.card_number_invalid":"Số thẻ không hợp lệ","validation.generic_invalid":"{{field}} không hợp lệ","validation.required":"Vui lòng nhập {{field}}","validation.text_too_long":"{{field}} quá dài","validation.text_too_short":"{{field}} quá ngắn","payment.save_checkbox_label":"Lưu để thanh toán nhanh hơn lần sau","payment_methods.add_payment_method":"Thêm phương thức thanh toán","payment_methods.channel_disabled_amount_too_large":"Không khả dụng cho khoản thanh toán này","payment_methods.channel_disabled_amount_too_small":"Không khả dụng cho khoản thanh toán này","payment_methods.pay_with":"Thanh toán bằng","payment_methods.select_channel_placeholder":"Chọn {{groupName}}","default_error.message_1":"Có vấn đề với yêu cầu.","default_error.message_2":"Vui lòng thử lại sau.","default_error.title":"Lỗi","failure_code.account_access_blocked":"Thanh toán của bạn bị từ chối. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.account_already_linked":"Tài khoản của bạn đã được liên kết. Vui lòng dùng phương thức khác.","failure_code.account_not_activated":"Không thể thực hiện thanh toán vì tài khoản chưa được kích hoạt. Vui lòng kích hoạt và thử lại.","failure_code.authentication_failed":"Không thể thực hiện thanh toán. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.capture_amount_exceeded":"Không thể thực hiện thanh toán. Vui lòng kiểm tra thông tin thanh toán và thử lại, hoặc dùng phương thức khác.","failure_code.card_declined":"Thẻ của bạn đã bị từ chối. Vui lòng thử lại bằng thẻ khác hoặc phương thức khác.","failure_code.channel_unavailable":"Không thể thực hiện thanh toán. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.declined_by_issuer":"Thanh toán của bạn bị từ chối. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.declined_by_processor":"Thanh toán của bạn bị từ chối. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.expired_card":"Thẻ của bạn bị từ chối do đã hết hạn. Vui lòng thử lại hoặc sử dụng phương thức thanh toán khác.","failure_code.expired_otp":"Không thể thực hiện thanh toán vì mã xác minh không hợp lệ. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.failure_details_unavailable":"Không thể thực hiện thanh toán. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.inactive_or_unauthorized_card":"Không thể xử lý thanh toán của bạn. Vui lòng thử lại hoặc sử dụng phương thức thanh toán khác.","failure_code.insufficient_balance":"Không thể thực hiện thanh toán vì số dư tài khoản không đủ. Vui lòng nạp thêm tiền và thử lại.","failure_code.invalid_account_details":"Thông tin thanh toán không chính xác. Vui lòng kiểm tra lại hoặc dùng phương thức khác.","failure_code.invalid_cvv":"Mã CVN nhập không đúng. Vui lòng thử lại.","failure_code.invalid_merchant_settings":"Không thể thực hiện thanh toán. Vui lòng liên hệ người bán hoặc dùng phương thức khác.","failure_code.invalid_otp":"Không thể thực hiện thanh toán vì mã xác minh không hợp lệ. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.invalid_token":"Không thể thực hiện thanh toán vì mã xác minh không hợp lệ. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.issuer_unavailable":"Không thể thực hiện thanh toán. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.otp_attempt_counts_exceeded":"Không thể thực hiện thanh toán vì đã nhập sai OTP quá nhiều lần. Vui lòng thanh toán lại hoặc dùng phương thức khác.","failure_code.partner_timeout_error":"Không thể thực hiện thanh toán. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.payment_amount_limits_exceeded":"Không thể thực hiện thanh toán vì bạn đã vượt quá hạn mức giao dịch. Vui lòng dùng phương thức khác.","failure_code.payment_attempt_counts_exceeded":"Không thể thực hiện thanh toán do quá nhiều lần thử thất bại.","failure_code.payment_request_expired":"Không thể thực hiện thanh toán vì liên kết đã hết hạn. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.processor_error":"Không thể xử lý thanh toán của bạn. Vui lòng thử lại hoặc sử dụng phương thức thanh toán khác.","failure_code.server_error":"Không thể thực hiện thanh toán. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.stolen_card":"Không thể xử lý thanh toán của bạn. Vui lòng thử lại hoặc sử dụng phương thức thanh toán khác.","failure_code.suspected_fraudulent":"Không thể xử lý thanh toán của bạn. Vui lòng thử lại hoặc sử dụng phương thức thanh toán khác.","failure_code.timeout_error":"Không thể thực hiện thanh toán. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.user_declined_payment":"Thanh toán của bạn bị từ chối. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.user_device_unreachable":"Không thể thực hiện thanh toán do sự cố mạng. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.user_did_not_authorize":"Không thể thực hiện thanh toán vì không được xác nhận kịp thời. Vui lòng thử lại.",failure_code_unknown:"Có lỗi xảy ra với mã {{failureCode}}","payment_request_status.canceled.subtext":"Vui lòng thử thanh toán lại hoặc liên hệ người bán nếu vấn đề vẫn tiếp diễn.","payment_request_status.canceled.title":"Trang này không còn khả dụng","payment_request_status.expired.subtext":"Thanh toán của bạn không thể xử lý. Vui lòng thử lại hoặc chọn phương thức khác.","payment_request_status.expired.title":"Thanh toán không thành công","payment_request_status.failed.subtext":"Không thể thực hiện thanh toán. Vui lòng thử phương thức khác hoặc gửi yêu cầu đến người bán bằng cách chia sẻ Mã định danh duy nhất.","payment_request_status.failed.title":"Thanh toán thất bại","payment_token_status.canceled.subtext":"Vui lòng thử lại hoặc dùng phương thức khác.","payment_token_status.canceled.title":"Không thể thêm phương thức thanh toán","payment_token_status.expired.subtext":"Vui lòng thử lại hoặc dùng phương thức khác.","payment_token_status.expired.title":"Không thể thêm phương thức thanh toán","payment_token_status.failed.subtext":"Không thể thực hiện thanh toán. Vui lòng thử phương thức khác hoặc gửi yêu cầu đến người bán bằng cách chia sẻ Mã định danh duy nhất.","payment_token_status.failed.title":"Không thể thêm phương thức thanh toán","action.payment_confirmation_instructions":"Sau khi bạn đã thanh toán, hãy nhấp nút phía trên để nhận xác nhận thanh toán.","action.payment_made":"Tôi đã thực hiện thanh toán này","action_va.amount_to_pay":"Số tiền cần thanh toán","action_va.virtual_account_number":"Số tài khoản định danh (Virtual Account)","action_qr.unable_to_generate":"Không thể tạo mã QR"}}.session};const qi=(e,n,t)=>n?(e=>"object"==typeof e&&null!==e&&"localeKey"in e)(n)?e(n.localeKey,{field:t.label}):n.value:null;function Gi(e){return e.startsWith("/")&&e.endsWith("/")?e.slice(1,-1):e}function Ki(e,n){if(0===n.length)return e.required?{localeKey:"validation.required"}:void 0;switch(e.type.name){case"credit_card_number":case"credit_card_expiry":case"credit_card_cvn":return function(e){const n=Dn(e);if(!n.valid){if(n.validationError)return{localeKey:n.validationError};throw new Error("Unexpected value in encrypted field, this is a bug, please contact support.")}}(n);case"phone_number":return(e=>{const n=ii(e);if(!n||!n.isValid())return{localeKey:"validation.generic_invalid"}})(n);case"email":return(e=>{if(!/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[A-Za-z]{2,}$/.test(e))return{localeKey:"validation.generic_invalid"}})(n);case"postal_code":return(e=>{if(!/^(?![-\s]+)[A-Za-z0-9\s-]+$/.test(e))return{localeKey:"validation.generic_invalid"}})(n);case"text":return((e,n)=>{if(Array.isArray(e.type.regex_validators))for(const t of e.type.regex_validators)if(!new RegExp(Gi(t.regex)).test(n))return{value:t.message};return void 0!==e.type.min_length&&n.length<e.type.min_length?{localeKey:"validation.text_too_short"}:n.length>e.type.max_length?{localeKey:"validation.text_too_long"}:void 0})(e,n);case"country":case"province":case"installment_plan":case"dropdown":return;default:throw e.type,new Error(`Unsupported input type: ${e.type.name}; this is a bug, please contact support.`)}}function Vi(e,n){const t=Array.isArray(e.channel_property)?e.channel_property:[e.channel_property];for(const r of t){let t=Wi(n,r);if(void 0===t&&(t=""),"string"!=typeof t)continue;const i=Ki(e,t);if(i)return i}}function Wi(e,n){const t=n.split("."),r=e[t[0]];if(void 0!==r){if("object"!=typeof r||Array.isArray(r)){if(1!==t.length)throw new Error(`Attempted to read channel property "${n}" expecting an object but found a primitive value; this is a bug, please contact support.`);return r}return Wi(r,t.slice(1).join("."))}}const Hi=W(null),ji=({scenarios:e,onSelect:n,children:t})=>{const[r,i]=Se(!1),a=Ie(null);return Te(()=>{if(!r)return;const e=e=>{const n=a.current;n&&(n.contains(e.target)||i(!1))};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[r]),le("div",{ref:a,children:le(Hi.Provider,{value:{open:r,setOpen:i,scenarios:e,onSelect:n},children:t})})},Yi=({children:e})=>le("div",{className:"xendit-form-simulation-root",children:e}),Xi=({children:e})=>{const{open:n,setOpen:t}=Oe(Hi)||{};return le("button",{type:"button",className:"xendit-form-simulation-trigger",onClick:()=>t?.(!n),children:e})},zi=()=>{const{open:e,setOpen:n,scenarios:t,onSelect:r}=Oe(Hi)||{},{t:i}=dn();return e&&t?le("div",{className:"xendit-form-simulation-popover",children:[le("div",{className:"xendit-text-12 xendit-text-semibold",children:i("simulation.simulate_test_scenario")}),le(Yn,{onChange:e=>{const i=t.scenarios.find(n=>n.description===e.value);i&&(r?.(i.name),n?.(!1))},placeholder:i("simulation.select_scenario"),options:t.scenarios.map(e=>({title:e.description,value:e.description,leadingAsset:le("img",{src:e.imageUrl,className:"xendit-form-simulation-scenario-icon"})}))}),t?.docsLink?le("div",{className:"xendit-text-14",children:[i("simulation.want_to_test_all_scenarios")," ",le("a",{href:t.docsLink,target:"_blank",rel:"noopener noreferrer",className:"xendit-text-link",children:i("simulation.see_all_scenarios")})]}):null]}):null},Zi="field-radius-bl-0",Ji="field-radius-br-0",Qi="field-radius-tl-0",ea="field-radius-tr-0",na="field-collapse-r",ta="field-collapse-l",ra="field-collapse-t",ia="field-collapse-b",aa=({fieldGroup:e,groupIndex:n,handleFieldChanged:t,channelProperties:r,simulationScenarios:i})=>{const{t:a}=dn(),o=Ie(null),[d,s]=Se({}),l=e.map(e=>e.span),c=Math.ceil(e.reduce((e,n)=>e+n.span,0)/2);Te(()=>{const e=o.current;if(e)return e.addEventListener(InternalSetFieldTouchedEvent.type,n),()=>{e.removeEventListener(InternalSetFieldTouchedEvent.type,n)};function n(e){const n=e.target.name;s(e=>({...e,[n]:!0}))}},[]);const u=(()=>{for(const n of e){if(!d[En(n)])continue;const e=Vi(n,r??{});if(e)return le("span",{className:"xendit-error-message xendit-text-12",children:qi(a,e,n)})}return null})();return le(mi,{children:le("div",{className:"xendit-channel-form-field-group",children:[le("div",{className:"xendit-channel-form-field-group-label-container",children:[le("label",{htmlFor:Pn(e[0]),className:"xendit-text-14",children:e[0].group_label??e[0].label??""}),i?le(oa,{simulationScenarios:i,fieldGroup:e}):null]}),le("div",{ref:o,className:"xendit-form-field-group "+(u?"invalid":""),children:e.map((e,n)=>{const r=(e=>{const n=l.slice(0,e).reduce((e,n)=>e+n,0),t=0===e?0:Math.floor(n/2);return{fieldPositionBySpan:n,fieldRow:t,fieldColumn:n%2,isLastRow:t===c-1}})(n),i=((e,n,t)=>{const{fieldPositionBySpan:r,fieldRow:i,fieldColumn:a,isLastRow:o}=t;return je({[Zi]:c>i+1||r%2==1,[Ji]:!!l[n+1],[Qi]:n>0,[ea]:!(0===i&&1===a||0===i&&0===a&&2===e.span),[na]:1===e.span&&0===a,[ta]:1===e.span&&1===a,[ra]:r>=2,[ia]:!o})})(e,n,r);return le(Bi,{className:i,field:e,onChange:t},n)})},n),u]})})},oa=({simulationScenarios:e,fieldGroup:n})=>{const t=Oe(pi),{t:r}=dn();return le(ji,{scenarios:e,onSelect:r=>{const i=e.scenarios.find(e=>e.name===r);if(i?.values)for(const[e,r]of Object.entries(i.values)){const i=n.find(n=>En(n)===e);i&&("credit_card_number"!==i.type.name&&"credit_card_expiry"!==i.type.name&&"credit_card_cvn"!==i.type.name||t?.postMessageToIframe(e,{type:"xendit-iframe-populate-for-simulation",scenario:r}))}},children:le(Yi,{children:[le(Xi,{children:le("div",{className:"xendit-text-12 xendit-text-semibold xendit-text-link",children:r("simulation.simulate_scenario")})}),le(zi,{})]})})};function da(e,n){for(var t in n)e[t]=n[t];return e}function sa(e,n){for(var t in e)if("__source"!==t&&!(t in n))return!0;for(var r in n)if("__source"!==r&&e[r]!==n[r])return!0;return!1}function la(e,n){this.props=e,this.context=n}(la.prototype=new w).isPureReactComponent=!0,la.prototype.shouldComponentUpdate=function(e,n){return sa(this.props,e)||sa(this.state,n)};var ca=t.__b;t.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),ca&&ca(e)};var ua="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var ha=t.__e;t.__e=function(e,n,t,r){if(e.then)for(var i,a=n;a=a.__;)if((i=a.__c)&&i.__c)return null==n.__e&&(n.__e=t.__e,n.__k=t.__k),i.__c(e,n);ha(e,n,t,r)};var pa=t.unmount;function _a(e,n,t){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){"function"==typeof e.__c&&e.__c()}),e.__c.__H=null),null!=(e=da({},e)).__c&&(e.__c.__P===t&&(e.__c.__P=n),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return _a(e,n,t)})),e}function ma(e,n,t){return e&&t&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return ma(e,n,t)}),e.__c&&e.__c.__P===n&&(e.__e&&t.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=t)),e}function fa(){this.__u=0,this.o=null,this.__b=null}function ya(e){if(!e.__)return null;var n=e.__.__c;return n&&n.__a&&n.__a(e)}function ba(){this.i=null,this.l=null}t.unmount=function(e){var n=e.__c;n&&(n.__z=!0),n&&n.__R&&n.__R(),n&&32&e.__u&&(e.type=null),pa&&pa(e)},(fa.prototype=new w).__c=function(e,n){var t=n.__c,r=this;null==r.o&&(r.o=[]),r.o.push(t);var i=ya(r.__v),a=!1,o=function(){a||r.__z||(a=!0,t.__R=null,i?i(s):s())};t.__R=o;var d=t.__P;t.__P=null;var s=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=ma(e,e.__c.__P,e.__c.__O)}var n;for(r.setState({__a:r.__b=null});n=r.o.pop();)n.__P=d,n.forceUpdate()}};r.__u++||32&n.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},fa.prototype.componentWillUnmount=function(){this.o=[]},fa.prototype.render=function(e,n){if(this.__b){if(this.__v.__k){var t=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=_a(this.__b,t,r.__O=r.__P)}this.__b=null}var i=n.__a&&g(x,null,e.fallback);return i&&(i.__u&=-33),[g(x,null,n.__a?null:e.children),i]};var $a=function(e,n,t){if(++t[1]===t[0]&&e.l.delete(n),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(t=e.i;t;){for(;t.length>3;)t.pop()();if(t[1]<t[0])break;e.i=t=t[2]}};(ba.prototype=new w).__a=function(e){var n=this,t=ya(n.__v),r=n.l.get(e);return r[0]++,function(i){var a=function(){n.props.revealOrder?(r.push(i),$a(n,e,r)):i()};t?t(a):a()}},ba.prototype.render=function(e){this.i=null,this.l=new Map;var n=T(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&n.reverse();for(var t=n.length;t--;)this.l.set(n[t],this.i=[1,0,this.i]);return e.children},ba.prototype.componentDidUpdate=ba.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(n,t){$a(e,t,n)})};var ga="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,va=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,xa=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,wa=/[A-Z0-9]/g,Ca="undefined"!=typeof document,Ea=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};w.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(w.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(n){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:n})}})});var ka=t.event;function Pa(){}function Aa(){return this.cancelBubble}function Na(){return this.defaultPrevented}t.event=function(e){return ka&&(e=ka(e)),e.persist=Pa,e.isPropagationStopped=Aa,e.isDefaultPrevented=Na,e.nativeEvent=e};var Sa={enumerable:!1,configurable:!0,get:function(){return this.class}},Ta=t.vnode;t.vnode=function(e){"string"==typeof e.type&&function(e){var n=e.props,t=e.type,r={},i=-1===t.indexOf("-");for(var a in n){var o=n[a];if(!("value"===a&&"defaultValue"in n&&null==o||Ca&&"children"===a&&"noscript"===t||"class"===a||"className"===a)){var d=a.toLowerCase();"defaultValue"===a&&"value"in n&&null==n.value?a="value":"download"===a&&!0===o?o="":"translate"===d&&"no"===o?o=!1:"o"===d[0]&&"n"===d[1]?"ondoubleclick"===d?a="ondblclick":"onchange"!==d||"input"!==t&&"textarea"!==t||Ea(n.type)?"onfocus"===d?a="onfocusin":"onblur"===d?a="onfocusout":xa.test(a)&&(a=d):d=a="oninput":i&&va.test(a)?a=a.replace(wa,"-$&").toLowerCase():null===o&&(o=void 0),"oninput"===d&&r[a=d]&&(a="oninputCapture"),r[a]=o}}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=T(n.children).forEach(function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)})),"select"==t&&null!=r.defaultValue&&(r.value=T(n.children).forEach(function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value})),n.class&&!n.className?(r.class=n.class,Object.defineProperty(r,"className",Sa)):n.className&&(r.class=r.className=n.className),e.props=r}(e),e.$$typeof=ga,Ta&&Ta(e)};var Ia=t.__r;t.__r=function(e){Ia&&Ia(e),e.__c};var Ra=t.diffed;t.diffed=function(e){Ra&&Ra(e);var n=e.props,t=e.__e;null!=t&&"textarea"===e.type&&"value"in n&&n.value!==t.value&&(t.value=null==n.value?"":n.value)};const Ma={scenarios:[{imageUrl:"https://assets.xendit.co/payment-session/logos/VISA.svg",description:"3DS Challenge, authentication is successful if OTP is correct.",name:"3_ds_challenge_authentication_is_successful_if_otp_is_correct_visa",values:{"card_details.card_number":"3_ds_challenge_authentication_is_successful_if_otp_is_correct_visa","card_details.expiry_month__card_details.expiry_year":"3_ds_challenge_authentication_is_successful_if_otp_is_correct_visa","card_details.cvn":"3_ds_challenge_authentication_is_successful_if_otp_is_correct_visa"}},{imageUrl:"https://assets.xendit.co/payment-session/logos/VISA.svg",description:"3DS Frictionless, authentication is successful.",name:"3_ds_frictionless_authentication_is_successful_visa",values:{"card_details.card_number":"3_ds_frictionless_authentication_is_successful_visa","card_details.expiry_month__card_details.expiry_year":"3_ds_frictionless_authentication_is_successful_visa","card_details.cvn":"3_ds_frictionless_authentication_is_successful_visa"}},{imageUrl:"https://assets.xendit.co/payment-session/logos/MASTERCARD.svg",description:"3DS Challenge, authentication is successful if OTP is correct.",name:"3_ds_challenge_authentication_is_successful_if_otp_is_correct_mastercard",values:{"card_details.card_number":"3_ds_challenge_authentication_is_successful_if_otp_is_correct_mastercard","card_details.expiry_month__card_details.expiry_year":"3_ds_challenge_authentication_is_successful_if_otp_is_correct_mastercard","card_details.cvn":"3_ds_challenge_authentication_is_successful_if_otp_is_correct_mastercard"}},{imageUrl:"https://assets.xendit.co/payment-session/logos/MASTERCARD.svg",description:"3DS Frictionless, authentication is successful.",name:"3_ds_frictionless_authentication_is_successful_mastercard",values:{"card_details.card_number":"3_ds_frictionless_authentication_is_successful_mastercard","card_details.expiry_month__card_details.expiry_year":"3_ds_frictionless_authentication_is_successful_mastercard","card_details.cvn":"3_ds_frictionless_authentication_is_successful_mastercard"}},{imageUrl:"https://assets.xendit.co/payment-session/logos/VISA.svg",description:"3DS Challenge, with list of simulated options.",name:"3_ds_challenge_with_list_of_simulated_options_visa",values:{"card_details.card_number":"3_ds_challenge_with_list_of_simulated_options_visa","card_details.expiry_month__card_details.expiry_year":"3_ds_challenge_with_list_of_simulated_options_visa","card_details.cvn":"3_ds_challenge_with_list_of_simulated_options_visa"}},{imageUrl:"https://assets.xendit.co/payment-session/logos/VISA.svg",description:"3DS Frictionless, authentication is successful.",name:"3_ds_frictionless_authentication_is_successful_visa2",values:{"card_details.card_number":"3_ds_frictionless_authentication_is_successful_visa2","card_details.expiry_month__card_details.expiry_year":"3_ds_frictionless_authentication_is_successful_visa2","card_details.cvn":"3_ds_frictionless_authentication_is_successful_visa2"}},{imageUrl:"https://assets.xendit.co/payment-session/logos/MASTERCARD.svg",description:"3DS Challenge, with list of simulated options.",name:"3_ds_challenge_with_list_of_simulated_options_mastercard",values:{"card_details.card_number":"3_ds_challenge_with_list_of_simulated_options_mastercard","card_details.expiry_month__card_details.expiry_year":"3_ds_challenge_with_list_of_simulated_options_mastercard","card_details.cvn":"3_ds_challenge_with_list_of_simulated_options_mastercard"}},{imageUrl:"https://assets.xendit.co/payment-session/logos/MASTERCARD.svg",description:"3DS Frictionless, authentication is successful.",name:"3_ds_frictionless_authentication_is_successful_mastercard2",values:{"card_details.card_number":"3_ds_frictionless_authentication_is_successful_mastercard2","card_details.expiry_month__card_details.expiry_year":"3_ds_frictionless_authentication_is_successful_mastercard2","card_details.cvn":"3_ds_frictionless_authentication_is_successful_mastercard2"}},{imageUrl:"https://assets.xendit.co/payment-session/logos/VISA.svg",description:"3DS Challenge, authentication is successful if OTP is correct. For frictionless flow, use amount < THB 20.",name:"3_ds_challenge_authentication_is_successful_if_otp_is_correct_for_frictionless_flow_use_amount_thb_20_visa",values:{"card_details.card_number":"3_ds_challenge_authentication_is_successful_if_otp_is_correct_for_frictionless_flow_use_amount_thb_20_visa","card_details.expiry_month__card_details.expiry_year":"3_ds_challenge_authentication_is_successful_if_otp_is_correct_for_frictionless_flow_use_amount_thb_20_visa","card_details.cvn":"3_ds_challenge_authentication_is_successful_if_otp_is_correct_for_frictionless_flow_use_amount_thb_20_visa"}},{imageUrl:"https://assets.xendit.co/payment-session/logos/MASTERCARD.svg",description:"3DS Challenge, authentication is successful if OTP is correct. For frictionless flow, use amount < THB 20.",name:"3_ds_challenge_authentication_is_successful_if_otp_is_correct_for_frictionless_flow_use_amount_thb_20_mastercard",values:{"card_details.card_number":"3_ds_challenge_authentication_is_successful_if_otp_is_correct_for_frictionless_flow_use_amount_thb_20_mastercard","card_details.expiry_month__card_details.expiry_year":"3_ds_challenge_authentication_is_successful_if_otp_is_correct_for_frictionless_flow_use_amount_thb_20_mastercard","card_details.cvn":"3_ds_challenge_authentication_is_successful_if_otp_is_correct_for_frictionless_flow_use_amount_thb_20_mastercard"}},{imageUrl:"https://assets.xendit.co/payment-session/logos/VISA.svg",description:"Failing transaction",name:"failing_transaction_visa",values:{"card_details.card_number":"failing_transaction_visa","card_details.expiry_month__card_details.expiry_year":"failing_transaction_visa","card_details.cvn":"failing_transaction_visa"}},{imageUrl:"https://assets.xendit.co/payment-session/logos/MASTERCARD.svg",description:"Failing transaction",name:"failing_transaction_mastercard",values:{"card_details.card_number":"failing_transaction_mastercard","card_details.expiry_month__card_details.expiry_year":"failing_transaction_mastercard","card_details.cvn":"failing_transaction_mastercard"}},{imageUrl:"https://assets.xendit.co/payment-session/logos/AMEX.svg",description:"3DS Frictionless, authentication successful (use a 4 digit CVN)",name:"3_ds_frictionless_authentication_successful_use_a_4_digit_cvn",values:{"card_details.card_number":"3_ds_frictionless_authentication_successful_use_a_4_digit_cvn","card_details.expiry_month__card_details.expiry_year":"3_ds_frictionless_authentication_successful_use_a_4_digit_cvn","card_details.cvn":"3_ds_frictionless_authentication_successful_use_a_4_digit_cvn"}},{imageUrl:"https://assets.xendit.co/payment-session/logos/AMEX.svg",description:"3DS Frictionless, authentication successful (use a 4 digit CVN)",name:"3_ds_frictionless_authentication_successful_use_a_4_digit_cvn2",values:{"card_details.card_number":"3_ds_frictionless_authentication_successful_use_a_4_digit_cvn2","card_details.expiry_month__card_details.expiry_year":"3_ds_frictionless_authentication_successful_use_a_4_digit_cvn2","card_details.cvn":"3_ds_frictionless_authentication_successful_use_a_4_digit_cvn2"}},{imageUrl:"https://assets.xendit.co/payment-session/logos/AMEX.svg",description:"3DS Challenge (use a 4 digit CVN)",name:"3_ds_challenge_use_a_4_digit_cvn",values:{"card_details.card_number":"3_ds_challenge_use_a_4_digit_cvn","card_details.expiry_month__card_details.expiry_year":"3_ds_challenge_use_a_4_digit_cvn","card_details.cvn":"3_ds_challenge_use_a_4_digit_cvn"}}],docsLink:"https://docs.xendit.co/docs/cards-simulate-card-scenarios"},Oa=function(e){function n(n){var t=da({},n);return delete t.ref,e(t,n.ref||null)}return n.$$typeof=ua,n.render=e,n.prototype.isReactComponent=n.__f=!0,n.displayName="ForwardRef("+(e.displayName||e.name)+")",n}(({form:e,onChannelPropertiesChanged:n},t)=>{const r=rn(),i=Qa(),a=dn(),o=no(),d=Ie(null),[s,l]=Se(null);!function(e,n,t){ge=6,Te(function(){if("function"==typeof e){var t=e(n());return function(){e(null),t&&"function"==typeof t&&t()}}if(e)return e.current=n(),function(){return e.current=null}},null==t?t:t.concat(e))}(t,()=>({setAllFieldsTouched(){const e=d.current;e&&Array.from(e.elements).filter(e=>e instanceof HTMLInputElement).forEach(e=>{e.name&&e.dispatchEvent(new InternalSetFieldTouchedEvent)})}}));const c=Me(()=>{if(!d.current)return{};return function(e){const n={};for(const[t,r]of e){if(r instanceof Blob)continue;const e=t.split("__"),i=Ua(e,r);e:for(const t of e){const e=t.split(".");let r=n;for(;e.length>1;){const n=e.shift();let t=r[n];if(void 0===t&&(t=r[n]={}),t&&"object"==typeof t){if(Array.isArray(t))continue e;r=t}}const a=i.length?i.shift():"";r[e[0]]=a}}return n}(new FormData(d.current).entries())},[]),u=Me(()=>{if(!d.current)return;const e=c();l(e),n(e)},[c,n]),h=function(e,n,t,r){const i=Re(()=>Ba(e.session_type,n,t,r),[r,t,n,e.session_type]);return i}(r,e,s||{},o??null),p=Cn(h);!function(e,n){var t=Ne(fe++,3);!xe.__s&&qe(t.__H,n)&&(t.__=e,t.u=n,ye.__H.__h.push(t))}(()=>{(function(e,n){if(e.length!==n.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!==n[t])return!1;return!0})(p||[],h)||u()},[h,u,p]);const _=Me(e=>"pd"!==a[_e].sdkKey.hostId?null:"CARDS"===i?.channel_code&&e.some(e=>"credit_card_number"===e.type.name)?Ma:null,[i,a]),m=function(e){const n=[[]];for(const t of e)1!==t.span||1!==n[n.length-1].length||1!==n[n.length-1][0].span?t.join?n[n.length-1].push(t):n.push([t]):n[n.length-1].push(t);return n}(h).filter(e=>e.length);return 0===m.length?null:le("div",{class:"xendit-channel-form",children:le("form",{ref:d,children:le(Da.Provider,{value:s,children:m.map((e,n)=>le(aa,{fieldGroup:e,groupIndex:n,handleFieldChanged:u,channelProperties:s,simulationScenarios:_(e)},n))})})})}),Da=W(null),La=()=>Oe(Da);function Ua(e,n){if(0===e.length)return[];if(1===e.length)return[n];if(""===n)return[];try{return JSON.parse(n)}catch(e){return[n]}}function Ba(e,n,t,r){const i=Kn(n,"credit_card_number"),a=r?.cardDetails?.details?.require_billing_information,o=!!r?.paymentOptions?.options?.installment_plans?.length;return n.filter(n=>{if(n.flags?.require_billing_information){if("PAY"!==e)return!1;if(!a)return!1}if("installment_plan"===n.type.name&&!o&&i)return!1;for(const e of n.display_if||[]){const[n,r,i]=e,a=Wi(t,n);switch(r){case"equals":if(a!==i)return!1;break;case"not_equals":if(a===i)return!1}}return!0})}const Fa=e=>{const n=Ie(null),t=Ie(null),r=void 0!==HTMLElement.prototype.animate;return Te(()=>{r&&(n.current?.animate(qa,Ga),t.current?.animate(Ka,Va))},[r]),le("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[le("g",{opacity:"0.5",children:[le("path",{d:"M8.79453 10.2303C7.1791 10.2303 5.86953 11.5399 5.86953 13.1553V28.9503C5.86953 31.535 7.96484 33.6303 10.5495 33.6303H26.3445C27.96 33.6303 29.2695 32.3208 29.2695 30.7053",fill:"#F1F1F1"}),le("path",{d:"M8.79453 10.2303V10.2303C7.1791 10.2303 5.86953 11.5399 5.86953 13.1553V28.9503C5.86953 31.535 7.96484 33.6303 10.5495 33.6303H26.3445C27.96 33.6303 29.2695 32.3208 29.2695 30.7053V30.7053",stroke:"#D0D0D0",strokeWidth:"1.755",strokeLinecap:"round",strokeLinejoin:"round"})]}),le("g",{ref:t,style:{transformOrigin:"20px 20px"},children:[le("path",{d:"M28.8177 6.00256H14.7777C12.193 6.00256 10.0977 8.09787 10.0977 10.6826V24.7226C10.0977 27.3073 12.193 29.4026 14.7777 29.4026H28.8177C31.4023 29.4026 33.4977 27.3073 33.4977 24.7226V10.6826C33.4977 8.09787 31.4024 6.00256 28.8177 6.00256Z",fill:"white",stroke:"#EDEDED",strokeWidth:"1.755",strokeLinecap:"round",strokeLinejoin:"round"}),le("g",{style:{transformOrigin:"10px 30px"},ref:n,children:[le("path",{d:"M26.7697 20.5301V12.7301H18.9697",stroke:"#7C7C7C",strokeWidth:"1.872",strokeLinecap:"round",strokeLinejoin:"round"}),le("path",{d:"M17.4102 22.0901L26.7702 12.7301",stroke:"#7C7C7C",strokeWidth:"1.872",strokeLinecap:"round",strokeLinejoin:"round"})]})]})]})},qa=[{transform:"scale(0.1)"},{transform:"scale(1)"}],Ga={duration:500,easing:"ease-out"},Ka=[{transform:"rotate(0deg)"},{transform:"rotate(5deg)"},{transform:"rotate(-5deg)"},{transform:"rotate(0deg)"}],Va={duration:1e3,easing:"ease-out",iterations:1/0,delay:2e3},Wa=e=>{const n=Ie(null),t=Ie(null),r=Sn(),i=void 0!==HTMLElement.prototype.animate;return Te(()=>{if(i&&n.current){const e=()=>{if(!n.current)return;const r=n.current.animate(Ha,ja);setTimeout(()=>{t.current?.animate(Xa,za)},1e3),r.onfinish=()=>{const r=n.current?.animate(Ha,Ya);setTimeout(()=>{t.current?.animate(Xa,za)},500),r&&(r.onfinish=e)}};e()}},[i]),le("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"var(--xendit-color-icon-primary)",xmlns:"http://www.w3.org/2000/svg",...e,children:[le("g",{"clip-path":`url(#${r})`,children:[le("rect",{x:"8",y:"8",width:"24",height:"24",fill:"var(--xendit-color-icon-secondary)",ref:t}),le("path",{d:"M11.5 13.1528C11.5 12.24 12.24 11.5 13.1528 11.5H17.4028C18.3156 11.5 19.0556 12.24 19.0556 13.1528V17.4028C19.0556 18.3156 18.3156 19.0556 17.4028 19.0556H13.1528C12.24 19.0556 11.5 18.3156 11.5 17.4028V13.1528Z"}),le("path",{d:"M20.9444 13.1528C20.9444 12.24 21.6844 11.5 22.5972 11.5H26.8472C27.76 11.5 28.5 12.24 28.5 13.1528V17.4028C28.5 18.3156 27.76 19.0556 26.8472 19.0556H22.5972C21.6844 19.0556 20.9444 18.3156 20.9444 17.4028V13.1528Z"}),le("path",{d:"M11.5 22.5972C11.5 21.6844 12.24 20.9444 13.1528 20.9444H17.4028C18.3156 20.9444 19.0556 21.6844 19.0556 22.5972V26.8472C19.0556 27.76 18.3156 28.5 17.4028 28.5H13.1528C12.24 28.5 11.5 27.76 11.5 26.8472V22.5972Z"}),le("path",{d:"M20.9444 22.5972C20.9444 21.6844 21.6844 20.9444 22.5972 20.9444H26.8472C27.76 20.9444 28.5 21.6844 28.5 22.5972V26.8472C28.5 27.76 27.76 28.5 26.8472 28.5H22.5972C21.6844 28.5 20.9444 27.76 20.9444 26.8472V22.5972Z"}),le("path",{d:"M7.875 23C8.35825 23 8.75 23.3918 8.75 23.875V30.2754C8.75021 30.6755 9.07451 30.9998 9.47461 31H15.875C16.3582 31 16.75 31.3918 16.75 31.875C16.75 32.3582 16.3582 32.75 15.875 32.75H9.47461C8.10801 32.7498 7.00021 31.642 7 30.2754V23.875C7 23.3918 7.39175 23 7.875 23Z"}),le("path",{d:"M31.875 23C32.3582 23 32.75 23.3918 32.75 23.875V30.2754C32.7498 31.642 31.642 32.7498 30.2754 32.75H23.875C23.3918 32.75 23 32.3582 23 31.875C23 31.3918 23.3918 31 23.875 31H30.2754C30.6755 30.9998 30.9998 30.6755 31 30.2754V23.875C31 23.3918 31.3918 23 31.875 23Z"}),le("path",{d:"M15.875 7C16.3582 7 16.75 7.39175 16.75 7.875C16.75 8.35825 16.3582 8.75 15.875 8.75H9.47461C9.07451 8.75021 8.75021 9.07451 8.75 9.47461V15.875C8.75 16.3582 8.35825 16.75 7.875 16.75C7.39175 16.75 7 16.3582 7 15.875V9.47461C7.00021 8.10801 8.10801 7.00021 9.47461 7H15.875Z"}),le("path",{d:"M30.2754 7C31.642 7.00021 32.7498 8.10801 32.75 9.47461V15.875C32.75 16.3582 32.3582 16.75 31.875 16.75C31.3918 16.75 31 16.3582 31 15.875V9.47461C30.9998 9.07451 30.6755 8.75021 30.2754 8.75H23.875C23.3918 8.75 23 8.35825 23 7.875C23 7.39175 23.3918 7 23.875 7H30.2754Z"}),le("rect",{x:"3",y:"-4",width:"34",height:"4",rx:"1.75",ref:n})]}),le("defs",{children:le("clipPath",{id:r,children:le("rect",{width:"40",height:"40",fill:"white"})})})]})},Ha=[{transform:"translateY(0)"},{transform:"translateY(44px)"}],ja={duration:1e3,delay:1e3,easing:"ease-out"},Ya={duration:1e3,direction:"reverse",delay:500,easing:"ease-in"},Xa=[{opacity:1},{opacity:0},{opacity:1}],za={duration:1e3},Za=e=>{const{id:n,label:t,checked:r,onChange:i,disabled:a}=e,o=Sn(),d=n||o;return le("div",{className:"xendit-checkbox",children:[le("div",{className:"xendit-checkbox-box",children:[le("input",{id:d,type:"checkbox",onChange:e=>{i?.(e)},checked:r,disabled:a}),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",className:"xendit-checkbox-graphic",children:le("polyline",{points:"40 144 96 200 224 72",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"16"})})]}),le("label",{htmlFor:d,className:"xendit-text-14",children:t})]})},Ja=W(null),Qa=()=>{const e=Oe(Ja);if(void 0===e)throw new Error("useChannel must be used within a ChannelProvider");return e},eo=W(null);eo.displayName="ChannelComponentDataContext";const no=()=>Oe(eo),to=e=>{const{channelOrPair:n,channelData:t,savePaymentMethod:r,formRef:i}=e,a=Ie(null),o=dn(),{t:d}=o,s=rn(),l=n[0],c=n.length>1,u=Bn(n,r),h=function(e){if(e&&2===e.length)return[e[0],e[1]];return null}(u.instructions),p="OPTIONAL"===s.allow_save_payment_method&&(u.allow_save||c);return le(Ja.Provider,{value:u,children:le(eo.Provider,{value:t,children:le("div",{className:"xendit-payment-channel",ref:a,children:[le(Oa,{ref:i,form:u.form,onChannelPropertiesChanged:e=>{let n=e;if("CARDS"===l.channel_code&&e.installment_configuration){const t=Object.fromEntries(Object.entries(e.installment_configuration).filter(([e,n])=>""!==n));n=0===Object.keys(t).length?{...e,installment_configuration:void 0}:{...e,installment_configuration:t}}const t=new XenditChannelPropertiesChangedEvent(l.channel_code,n);a.current?.dispatchEvent(t)}}),u.banner?le(ro,{banner:u.banner}):null,p&&le(Za,{label:d("payment.save_checkbox_label"),onChange:e=>{const n=e.target?.checked;o?.dispatchEvent(new InternalUpdateChannelComponentData(l.channel_code,{savePaymentMethod:n}))},checked:r}),h?le("div",{className:"xendit-payment-channel-instructions",children:["QR_CODE"===u.pm_type?le(Wa,{}):le(Fa,{}),le("div",{className:"xendit-payment-channel-instructions-text xendit-text-12",children:h.map((e,n)=>le("p",{className:0===n?"xendit-text-semibold":void 0,children:e},n))})]}):null]})})})},ro=e=>{const n="number"==typeof e.banner.aspect_ratio?String(e.banner.aspect_ratio):void 0;return e.banner?.link_url?le("a",{href:e.banner.link_url,target:"_blank",rel:"noopener noreferrer",children:le("img",{src:e.banner.image_url,alt:e.banner.alt_text,className:"xendit-payment-channel-banner",style:{aspectRatio:n}})}):le("img",{src:e.banner.image_url,alt:e.banner.alt_text,className:"xendit-payment-channel-banner",style:{aspectRatio:n}})};class XenditChannelPropertiesChangedEvent extends Event{static type="xendit-channel-properties-changed";channel;channelProperties;constructor(e,n){super(XenditChannelPropertiesChangedEvent.type,{bubbles:!0,composed:!0}),this.channel=e,this.channelProperties=n}}class NetworkError extends Error{errorResponse;constructor(e){super(e.message),this.errorResponse=e}}function io(e){const n=new URLSearchParams;return n.append("payload",JSON.stringify(e)),n}function ao(e,n,t){return async function(...r){let i,a,o,d,s;switch(e){case"GET":[i,a,o,s]=r;break;case"POST":[i,d,a,o,s]=r;break;default:throw new Error(`Unable to call endpoint with method ${e}; this is a bug, please contact support.`)}const l="v0.0.17";un(l),un(l.startsWith("v"));const c=i.hostId;if(c===gn)throw new Error("A network request was made in mock mode; this is a bug.");const u=xn(c);if(!u)throw new Error(`Unknown hostId ${c} in sdkKey; this is a bug, please contact support.`);const h=new URL(n(a),u);if(t&&!o)throw new Error("Query string argument is missing; this is a bug, please contact support.");const p=t?.(o)??new URLSearchParams;p.set("components_version",l),h.search=p.toString();const _={method:e,body:d?io(d):void 0,headers:{"Content-Type":"application/x-www-form-urlencoded"},signal:s},m=await fetch(h,_);if(!m.ok){const e=await m.json();if(!e||!e.error_code)throw new Error("Unexpected error response from server");throw new NetworkError(e)}return m.json()}}const oo=ao("GET",e=>`/api/sessions/${e}`),so=ao("POST",()=>"/api/sessions/payment_tokens"),lo=ao("POST",()=>"/api/sessions/payment_requests"),co=ao("POST",e=>`/api/sessions/${e.sessionAuthKey}/payment_requests/${e.paymentRequestId}/simulate`),uo=ao("GET",e=>`/api/sessions/${e}/poll`,e=>new URLSearchParams(e?{token_request_id:e}:{})),ho=ao("POST",e=>`/api/sessions/${e}/card_info`),po=ao("POST",e=>`/api/sessions/${e}/payment_options`);function _o(e,n,t){return{impl:e,key:n??"",child:t,instance:void 0}}class BehaviorTree{fn;bb;root=_o(class{});updating=!1;again=!1;constructor(e,n){this.fn=e,this.bb=n}update(){if(this.again=!0,this.updating)return;let e=0;try{for(this.updating=!0;this.again;){this.again=!1,e+=1,mo(e);const n=this.root??void 0,t=this.fn(this.bb);this.root=t,fo(n,t,this.bb,0)}}finally{this.updating=!1}}findBehavior(e){return $o(this.root,e)}}function mo(e){if(e>32)throw new Error("Max recursion depth exceeded; this is a bug, please contact support.")}function fo(e,n,t,r){if(mo(r),function(e,n){return void 0===e||void 0===n||Array.isArray(e)!==Array.isArray(n)||(!Array.isArray(e)||!Array.isArray(n))&&(pn(e),pn(n),e.impl!==n.impl||e.key!==n.key)}(e,n))e&&bo(e,r+1),n&&yo(n,t,r+1);else if(Array.isArray(e)||Array.isArray(n)){hn(e),hn(n);const i=Math.max(e.length,n.length);for(let a=0;a<i;a++)fo(e[a],n[a],t,r+1)}else n&&(n.instance=e?.instance),e&&(e.instance=void 0),fo(e?.child,n?.child,t,r+1),n?.instance?.update?.()}function yo(e,n,t){if(mo(t),Array.isArray(e))for(const r of e)r&&yo(r,n,t+1);else e.instance=new e.impl(n,e.key),e.instance.enter?.(),e.child&&yo(e.child,n,t+1)}function bo(e,n){if(mo(n),Array.isArray(e))for(const t of e)t&&bo(t,n+1);else e.child&&bo(e.child,n+1),e.instance?.exit?.(),e.instance=void 0}function $o(e,n){if(Array.isArray(e))for(const t of e){if(!t)continue;const e=$o(t,n);if(e)return e}else{if(e.impl===n)return e.instance??null;if(e.child)return $o(e.child,n)}return null}function go(e){const{url:n,mock:t,onIframeComplete:r}=e,i=Ie(null),a=Me(e=>{if(!i.current)return;const n=i.current.contentWindow;e.source===n&&"xendit-iframe-action-complete"===e.data?.type&&r(e.data)},[r]);return Te(()=>(window.addEventListener("message",a),()=>{window.removeEventListener("message",a)}),[a]),le("iframe",t?{ref:i,srcDoc:vo,className:"xendit-action-iframe"}:{ref:i,src:n,className:"xendit-action-iframe"})}const vo="\n <html>\n <head>\n <title>Xendit Mock Action Iframe</title>\n <style>\n body {\n font-family: Arial, sans-serif;\n font-size: 14px;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 12px;\n }\n p {\n margin: 0;\n }\n .buttons {\n display: flex;\n gap: 8px;\n }\n button {\n font-size: 12px;\n display: flex;\n align-items: center;\n text-align: left;\n background-color: white;\n border: 1px solid rgba(243, 243, 243);\n border-radius: 4px;\n justify-content: space-between;\n padding: 4px;\n cursor: pointer;\n }\n button:hover {\n border-color: #1762ee;\n background-color: #1762ee;\n color: white;\n }\n </style>\n </head>\n <body>\n <p>This is a mock action page.</p>\n <p>Normally, this would be a 3DS authentication page.</p>\n <p>Click a button below to simulate the result of the action.</p>\n <div class=\"buttons\">\n <button onclick=\"parent.postMessage({type: 'xendit-iframe-action-complete', mockStatus: 'success'}, '*')\">\n Simulate Success\n </button>\n <button onclick=\"parent.postMessage({type: 'xendit-iframe-action-complete', mockStatus: 'fail'}, '*')\">\n Simulate Failure\n </button>\n </div>\n </body>\n </html>\n";var xo,wo,Co={};function Eo(){return wo?xo:(wo=1,xo=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then})}var ko,Po={},Ao={};function No(){if(ko)return Ao;let e;ko=1;const n=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return Ao.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},Ao.getSymbolTotalCodewords=function(e){return n[e]},Ao.getBCHDigit=function(e){let n=0;for(;0!==e;)n++,e>>>=1;return n},Ao.setToSJISFunction=function(n){if("function"!=typeof n)throw new Error('"toSJISFunc" is not a valid function.');e=n},Ao.isKanjiModeEnabled=function(){return void 0!==e},Ao.toSJIS=function(n){return e(n)},Ao}var So,To,Io,Ro,Mo,Oo={};function Do(){return So||(So=1,(e=Oo).L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},e.from=function(n,t){if(e.isValid(n))return n;try{return function(n){if("string"!=typeof n)throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+n)}}(n)}catch(e){return t}}),Oo;var e}var Lo,Uo={};var Bo,Fo={};var qo,Go={};var Ko,Vo={};function Wo(){if(Ko)return Vo;Ko=1;const e=Do(),n=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],t=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return Vo.getBlocksCount=function(t,r){switch(r){case e.L:return n[4*(t-1)+0];case e.M:return n[4*(t-1)+1];case e.Q:return n[4*(t-1)+2];case e.H:return n[4*(t-1)+3];default:return}},Vo.getTotalCodewordsCount=function(n,r){switch(r){case e.L:return t[4*(n-1)+0];case e.M:return t[4*(n-1)+1];case e.Q:return t[4*(n-1)+2];case e.H:return t[4*(n-1)+3];default:return}},Vo}var Ho,jo,Yo,Xo,zo={},Zo={};function Jo(){return jo||(jo=1,function(e){const n=function(){if(Ho)return Zo;Ho=1;const e=new Uint8Array(512),n=new Uint8Array(256);return function(){let t=1;for(let r=0;r<255;r++)e[r]=t,n[t]=r,t<<=1,256&t&&(t^=285);for(let n=255;n<512;n++)e[n]=e[n-255]}(),Zo.log=function(e){if(e<1)throw new Error("log("+e+")");return n[e]},Zo.exp=function(n){return e[n]},Zo.mul=function(t,r){return 0===t||0===r?0:e[n[t]+n[r]]},Zo}();e.mul=function(e,t){const r=new Uint8Array(e.length+t.length-1);for(let i=0;i<e.length;i++)for(let a=0;a<t.length;a++)r[i+a]^=n.mul(e[i],t[a]);return r},e.mod=function(e,t){let r=new Uint8Array(e);for(;r.length-t.length>=0;){const e=r[0];for(let i=0;i<t.length;i++)r[i]^=n.mul(t[i],e);let i=0;for(;i<r.length&&0===r[i];)i++;r=r.slice(i)}return r},e.generateECPolynomial=function(t){let r=new Uint8Array([1]);for(let i=0;i<t;i++)r=e.mul(r,new Uint8Array([1,n.exp(i)]));return r}}(zo)),zo}var Qo,ed={},nd={},td={};function rd(){return Qo||(Qo=1,td.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),td}var id,ad,od,dd={};function sd(){if(id)return dd;id=1;const e="[0-9]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const t="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+")(?:.|[\r\n]))+";dd.KANJI=new RegExp(n,"g"),dd.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),dd.BYTE=new RegExp(t,"g"),dd.NUMERIC=new RegExp(e,"g"),dd.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const r=new RegExp("^"+n+"$"),i=new RegExp("^"+e+"$"),a=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return dd.testKanji=function(e){return r.test(e)},dd.testNumeric=function(e){return i.test(e)},dd.testAlphanumeric=function(e){return a.test(e)},dd}function ld(){return ad||(ad=1,function(e){const n=rd(),t=sd();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(e,t){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!n.isValid(t))throw new Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},e.getBestModeForData=function(n){return t.testNumeric(n)?e.NUMERIC:t.testAlphanumeric(n)?e.ALPHANUMERIC:t.testKanji(n)?e.KANJI:e.BYTE},e.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},e.isValid=function(e){return e&&e.bit&&e.ccBits},e.from=function(n,t){if(e.isValid(n))return n;try{return function(n){if("string"!=typeof n)throw new Error("Param is not a string");switch(n.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+n)}}(n)}catch(e){return t}}}(nd)),nd}function cd(){return od||(od=1,function(e){const n=No(),t=Wo(),r=Do(),i=ld(),a=rd(),o=n.getBCHDigit(7973);function d(e,n){return i.getCharCountIndicator(e,n)+4}function s(e,n){let t=0;return e.forEach(function(e){const r=d(e.mode,n);t+=r+e.getBitsLength()}),t}e.from=function(e,n){return a.isValid(e)?parseInt(e,10):n},e.getCapacity=function(e,r,o){if(!a.isValid(e))throw new Error("Invalid QR Code version");void 0===o&&(o=i.BYTE);const s=8*(n.getSymbolTotalCodewords(e)-t.getTotalCodewordsCount(e,r));if(o===i.MIXED)return s;const l=s-d(o,e);switch(o){case i.NUMERIC:return Math.floor(l/10*3);case i.ALPHANUMERIC:return Math.floor(l/11*2);case i.KANJI:return Math.floor(l/13);case i.BYTE:default:return Math.floor(l/8)}},e.getBestVersionForData=function(n,t){let a;const o=r.from(t,r.M);if(Array.isArray(n)){if(n.length>1)return function(n,t){for(let r=1;r<=40;r++)if(s(n,r)<=e.getCapacity(r,t,i.MIXED))return r}(n,o);if(0===n.length)return 1;a=n[0]}else a=n;return function(n,t,r){for(let i=1;i<=40;i++)if(t<=e.getCapacity(i,r,n))return i}(a.mode,a.getLength(),o)},e.getEncodedBits=function(e){if(!a.isValid(e)||e<7)throw new Error("Invalid QR Code version");let t=e<<12;for(;n.getBCHDigit(t)-o>=0;)t^=7973<<n.getBCHDigit(t)-o;return e<<12|t}}(ed)),ed}var ud,hd={};var pd,_d,md,fd,yd,bd,$d,gd,vd={};var xd,wd,Cd,Ed={exports:{}};function kd(){return xd||(xd=1,function(e){var n={single_source_shortest_paths:function(e,t,r){var i={},a={};a[t]=0;var o,d,s,l,c,u,h,p=n.PriorityQueue.make();for(p.push(t,0);!p.empty();)for(s in d=(o=p.pop()).value,l=o.cost,c=e[d]||{})c.hasOwnProperty(s)&&(u=l+c[s],h=a[s],(void 0===a[s]||h>u)&&(a[s]=u,p.push(s,u),i[s]=d));if(void 0!==r&&void 0===a[r]){var _=["Could not find a path from ",t," to ",r,"."].join("");throw new Error(_)}return i},extract_shortest_path_from_predecessor_list:function(e,n){for(var t=[],r=n;r;)t.push(r),e[r],r=e[r];return t.reverse(),t},find_path:function(e,t,r){var i=n.single_source_shortest_paths(e,t,r);return n.extract_shortest_path_from_predecessor_list(i,r)},PriorityQueue:{make:function(e){var t,r=n.PriorityQueue,i={};for(t in e=e||{},r)r.hasOwnProperty(t)&&(i[t]=r[t]);return i.queue=[],i.sorter=e.sorter||r.default_sorter,i},default_sorter:function(e,n){return e.cost-n.cost},push:function(e,n){var t={value:e,cost:n};this.queue.push(t),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=n}(Ed)),Ed.exports}function Pd(){return wd||(wd=1,function(e){const n=ld(),t=function(){if(_d)return pd;_d=1;const e=ld();function n(n){this.mode=e.NUMERIC,this.data=n.toString()}return n.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){let n,t,r;for(n=0;n+3<=this.data.length;n+=3)t=this.data.substr(n,3),r=parseInt(t,10),e.put(r,10);const i=this.data.length-n;i>0&&(t=this.data.substr(n),r=parseInt(t,10),e.put(r,3*i+1))},pd=n}(),r=function(){if(fd)return md;fd=1;const e=ld(),n=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function t(n){this.mode=e.ALPHANUMERIC,this.data=n}return t.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let r=45*n.indexOf(this.data[t]);r+=n.indexOf(this.data[t+1]),e.put(r,11)}this.data.length%2&&e.put(n.indexOf(this.data[t]),6)},md=t}(),i=function(){if(bd)return yd;bd=1;const e=ld();function n(n){this.mode=e.BYTE,this.data="string"==typeof n?(new TextEncoder).encode(n):new Uint8Array(n)}return n.getBitsLength=function(e){return 8*e},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){for(let n=0,t=this.data.length;n<t;n++)e.put(this.data[n],8)},yd=n}(),a=function(){if(gd)return $d;gd=1;const e=ld(),n=No();function t(n){this.mode=e.KANJI,this.data=n}return t.getBitsLength=function(e){return 13*e},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let r=n.toSJIS(this.data[t]);if(r>=33088&&r<=40956)r-=33088;else{if(!(r>=57408&&r<=60351))throw new Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");r-=49472}r=192*(r>>>8&255)+(255&r),e.put(r,13)}},$d=t}(),o=sd(),d=No(),s=kd();function l(e){return unescape(encodeURIComponent(e)).length}function c(e,n,t){const r=[];let i;for(;null!==(i=e.exec(t));)r.push({data:i[0],index:i.index,mode:n,length:i[0].length});return r}function u(e){const t=c(o.NUMERIC,n.NUMERIC,e),r=c(o.ALPHANUMERIC,n.ALPHANUMERIC,e);let i,a;d.isKanjiModeEnabled()?(i=c(o.BYTE,n.BYTE,e),a=c(o.KANJI,n.KANJI,e)):(i=c(o.BYTE_KANJI,n.BYTE,e),a=[]);return t.concat(r,i,a).sort(function(e,n){return e.index-n.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function h(e,o){switch(o){case n.NUMERIC:return t.getBitsLength(e);case n.ALPHANUMERIC:return r.getBitsLength(e);case n.KANJI:return a.getBitsLength(e);case n.BYTE:return i.getBitsLength(e)}}function p(e,o){let s;const l=n.getBestModeForData(e);if(s=n.from(o,l),s!==n.BYTE&&s.bit<l.bit)throw new Error('"'+e+'" cannot be encoded with mode '+n.toString(s)+".\n Suggested mode is: "+n.toString(l));switch(s!==n.KANJI||d.isKanjiModeEnabled()||(s=n.BYTE),s){case n.NUMERIC:return new t(e);case n.ALPHANUMERIC:return new r(e);case n.KANJI:return new a(e);case n.BYTE:return new i(e)}}e.fromArray=function(e){return e.reduce(function(e,n){return"string"==typeof n?e.push(p(n,null)):n.data&&e.push(p(n.data,n.mode)),e},[])},e.fromString=function(t,r){const i=function(e){const t=[];for(let r=0;r<e.length;r++){const i=e[r];switch(i.mode){case n.NUMERIC:t.push([i,{data:i.data,mode:n.ALPHANUMERIC,length:i.length},{data:i.data,mode:n.BYTE,length:i.length}]);break;case n.ALPHANUMERIC:t.push([i,{data:i.data,mode:n.BYTE,length:i.length}]);break;case n.KANJI:t.push([i,{data:i.data,mode:n.BYTE,length:l(i.data)}]);break;case n.BYTE:t.push([{data:i.data,mode:n.BYTE,length:l(i.data)}])}}return t}(u(t,d.isKanjiModeEnabled())),a=function(e,t){const r={},i={start:{}};let a=["start"];for(let o=0;o<e.length;o++){const d=e[o],s=[];for(let e=0;e<d.length;e++){const l=d[e],c=""+o+e;s.push(c),r[c]={node:l,lastCount:0},i[c]={};for(let e=0;e<a.length;e++){const o=a[e];r[o]&&r[o].node.mode===l.mode?(i[o][c]=h(r[o].lastCount+l.length,l.mode)-h(r[o].lastCount,l.mode),r[o].lastCount+=l.length):(r[o]&&(r[o].lastCount=l.length),i[o][c]=h(l.length,l.mode)+4+n.getCharCountIndicator(l.mode,t))}}a=s}for(let e=0;e<a.length;e++)i[a[e]].end=0;return{map:i,table:r}}(i,r),o=s.find_path(a.map,"start","end"),c=[];for(let e=1;e<o.length-1;e++)c.push(a.table[o[e]].node);return e.fromArray(function(e){return e.reduce(function(e,n){const t=e.length-1>=0?e[e.length-1]:null;return t&&t.mode===n.mode?(e[e.length-1].data+=n.data,e):(e.push(n),e)},[])}(c))},e.rawSplit=function(n){return e.fromArray(u(n,d.isKanjiModeEnabled()))}}(vd)),vd}function Ad(){if(Cd)return Po;Cd=1;const e=No(),n=Do(),t=function(){if(Io)return To;function e(){this.buffer=[],this.length=0}return Io=1,e.prototype={get:function(e){const n=Math.floor(e/8);return 1==(this.buffer[n]>>>7-e%8&1)},put:function(e,n){for(let t=0;t<n;t++)this.putBit(1==(e>>>n-t-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),e&&(this.buffer[n]|=128>>>this.length%8),this.length++}},To=e}(),r=function(){if(Mo)return Ro;function e(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}return Mo=1,e.prototype.set=function(e,n,t,r){const i=e*this.size+n;this.data[i]=t,r&&(this.reservedBit[i]=!0)},e.prototype.get=function(e,n){return this.data[e*this.size+n]},e.prototype.xor=function(e,n,t){this.data[e*this.size+n]^=t},e.prototype.isReserved=function(e,n){return this.reservedBit[e*this.size+n]},Ro=e}(),i=(Lo||(Lo=1,function(e){const n=No().getSymbolSize;e.getRowColCoords=function(e){if(1===e)return[];const t=Math.floor(e/7)+2,r=n(e),i=145===r?26:2*Math.ceil((r-13)/(2*t-2)),a=[r-7];for(let e=1;e<t-1;e++)a[e]=a[e-1]-i;return a.push(6),a.reverse()},e.getPositions=function(n){const t=[],r=e.getRowColCoords(n),i=r.length;for(let e=0;e<i;e++)for(let n=0;n<i;n++)0===e&&0===n||0===e&&n===i-1||e===i-1&&0===n||t.push([r[e],r[n]]);return t}}(Uo)),Uo),a=function(){if(Bo)return Fo;Bo=1;const e=No().getSymbolSize;return Fo.getPositions=function(n){const t=e(n);return[[0,0],[t-7,0],[0,t-7]]},Fo}(),o=(qo||(qo=1,function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const n=3,t=3,r=40,i=10;function a(n,t,r){switch(n){case e.Patterns.PATTERN000:return(t+r)%2==0;case e.Patterns.PATTERN001:return t%2==0;case e.Patterns.PATTERN010:return r%3==0;case e.Patterns.PATTERN011:return(t+r)%3==0;case e.Patterns.PATTERN100:return(Math.floor(t/2)+Math.floor(r/3))%2==0;case e.Patterns.PATTERN101:return t*r%2+t*r%3==0;case e.Patterns.PATTERN110:return(t*r%2+t*r%3)%2==0;case e.Patterns.PATTERN111:return(t*r%3+(t+r)%2)%2==0;default:throw new Error("bad maskPattern:"+n)}}e.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},e.from=function(n){return e.isValid(n)?parseInt(n,10):void 0},e.getPenaltyN1=function(e){const t=e.size;let r=0,i=0,a=0,o=null,d=null;for(let s=0;s<t;s++){i=a=0,o=d=null;for(let l=0;l<t;l++){let t=e.get(s,l);t===o?i++:(i>=5&&(r+=n+(i-5)),o=t,i=1),t=e.get(l,s),t===d?a++:(a>=5&&(r+=n+(a-5)),d=t,a=1)}i>=5&&(r+=n+(i-5)),a>=5&&(r+=n+(a-5))}return r},e.getPenaltyN2=function(e){const n=e.size;let r=0;for(let t=0;t<n-1;t++)for(let i=0;i<n-1;i++){const n=e.get(t,i)+e.get(t,i+1)+e.get(t+1,i)+e.get(t+1,i+1);4!==n&&0!==n||r++}return r*t},e.getPenaltyN3=function(e){const n=e.size;let t=0,i=0,a=0;for(let r=0;r<n;r++){i=a=0;for(let o=0;o<n;o++)i=i<<1&2047|e.get(r,o),o>=10&&(1488===i||93===i)&&t++,a=a<<1&2047|e.get(o,r),o>=10&&(1488===a||93===a)&&t++}return t*r},e.getPenaltyN4=function(e){let n=0;const t=e.data.length;for(let r=0;r<t;r++)n+=e.data[r];return Math.abs(Math.ceil(100*n/t/5)-10)*i},e.applyMask=function(e,n){const t=n.size;for(let r=0;r<t;r++)for(let i=0;i<t;i++)n.isReserved(i,r)||n.xor(i,r,a(e,i,r))},e.getBestMask=function(n,t){const r=Object.keys(e.Patterns).length;let i=0,a=1/0;for(let o=0;o<r;o++){t(o),e.applyMask(o,n);const r=e.getPenaltyN1(n)+e.getPenaltyN2(n)+e.getPenaltyN3(n)+e.getPenaltyN4(n);e.applyMask(o,n),r<a&&(a=r,i=o)}return i}}(Go)),Go),d=Wo(),s=function(){if(Xo)return Yo;Xo=1;const e=Jo();function n(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}return n.prototype.initialize=function(n){this.degree=n,this.genPoly=e.generateECPolynomial(this.degree)},n.prototype.encode=function(n){if(!this.genPoly)throw new Error("Encoder not initialized");const t=new Uint8Array(n.length+this.degree);t.set(n);const r=e.mod(t,this.genPoly),i=this.degree-r.length;if(i>0){const e=new Uint8Array(this.degree);return e.set(r,i),e}return r},Yo=n}(),l=cd(),c=function(){if(ud)return hd;ud=1;const e=No(),n=e.getBCHDigit(1335);return hd.getEncodedBits=function(t,r){const i=t.bit<<3|r;let a=i<<10;for(;e.getBCHDigit(a)-n>=0;)a^=1335<<e.getBCHDigit(a)-n;return 21522^(i<<10|a)},hd}(),u=ld(),h=Pd();function p(e,n,t){const r=e.size,i=c.getEncodedBits(n,t);let a,o;for(a=0;a<15;a++)o=1==(i>>a&1),a<6?e.set(a,8,o,!0):a<8?e.set(a+1,8,o,!0):e.set(r-15+a,8,o,!0),a<8?e.set(8,r-a-1,o,!0):a<9?e.set(8,15-a-1+1,o,!0):e.set(8,15-a-1,o,!0);e.set(r-8,8,1,!0)}function _(n,r,i){const a=new t;i.forEach(function(e){a.put(e.mode.bit,4),a.put(e.getLength(),u.getCharCountIndicator(e.mode,n)),e.write(a)});const o=8*(e.getSymbolTotalCodewords(n)-d.getTotalCodewordsCount(n,r));for(a.getLengthInBits()+4<=o&&a.put(0,4);a.getLengthInBits()%8!=0;)a.putBit(0);const l=(o-a.getLengthInBits())/8;for(let e=0;e<l;e++)a.put(e%2?17:236,8);return function(n,t,r){const i=e.getSymbolTotalCodewords(t),a=d.getTotalCodewordsCount(t,r),o=i-a,l=d.getBlocksCount(t,r),c=i%l,u=l-c,h=Math.floor(i/l),p=Math.floor(o/l),_=p+1,m=h-p,f=new s(m);let y=0;const b=new Array(l),$=new Array(l);let g=0;const v=new Uint8Array(n.buffer);for(let e=0;e<l;e++){const n=e<u?p:_;b[e]=v.slice(y,y+n),$[e]=f.encode(b[e]),y+=n,g=Math.max(g,n)}const x=new Uint8Array(i);let w,C,E=0;for(w=0;w<g;w++)for(C=0;C<l;C++)w<b[C].length&&(x[E++]=b[C][w]);for(w=0;w<m;w++)for(C=0;C<l;C++)x[E++]=$[C][w];return x}(a,n,r)}function m(n,t,d,s){let c;if(Array.isArray(n))c=h.fromArray(n);else{if("string"!=typeof n)throw new Error("Invalid data");{let e=t;if(!e){const t=h.rawSplit(n);e=l.getBestVersionForData(t,d)}c=h.fromString(n,e||40)}}const u=l.getBestVersionForData(c,d);if(!u)throw new Error("The amount of data is too big to be stored in a QR Code");if(t){if(t<u)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+u+".\n")}else t=u;const m=_(t,d,c),f=e.getSymbolSize(t),y=new r(f);return function(e,n){const t=e.size,r=a.getPositions(n);for(let n=0;n<r.length;n++){const i=r[n][0],a=r[n][1];for(let n=-1;n<=7;n++)if(!(i+n<=-1||t<=i+n))for(let r=-1;r<=7;r++)a+r<=-1||t<=a+r||(n>=0&&n<=6&&(0===r||6===r)||r>=0&&r<=6&&(0===n||6===n)||n>=2&&n<=4&&r>=2&&r<=4?e.set(i+n,a+r,!0,!0):e.set(i+n,a+r,!1,!0))}}(y,t),function(e){const n=e.size;for(let t=8;t<n-8;t++){const n=t%2==0;e.set(t,6,n,!0),e.set(6,t,n,!0)}}(y),function(e,n){const t=i.getPositions(n);for(let n=0;n<t.length;n++){const r=t[n][0],i=t[n][1];for(let n=-2;n<=2;n++)for(let t=-2;t<=2;t++)-2===n||2===n||-2===t||2===t||0===n&&0===t?e.set(r+n,i+t,!0,!0):e.set(r+n,i+t,!1,!0)}}(y,t),p(y,d,0),t>=7&&function(e,n){const t=e.size,r=l.getEncodedBits(n);let i,a,o;for(let n=0;n<18;n++)i=Math.floor(n/3),a=n%3+t-8-3,o=1==(r>>n&1),e.set(i,a,o,!0),e.set(a,i,o,!0)}(y,t),function(e,n){const t=e.size;let r=-1,i=t-1,a=7,o=0;for(let d=t-1;d>0;d-=2)for(6===d&&d--;;){for(let t=0;t<2;t++)if(!e.isReserved(i,d-t)){let r=!1;o<n.length&&(r=1==(n[o]>>>a&1)),e.set(i,d-t,r),a--,-1===a&&(o++,a=7)}if(i+=r,i<0||t<=i){i-=r,r=-r;break}}}(y,m),isNaN(s)&&(s=o.getBestMask(y,p.bind(null,y,d))),o.applyMask(s,y),p(y,d,s),{modules:y,version:t,errorCorrectionLevel:d,maskPattern:s,segments:c}}return Po.create=function(t,r){if(void 0===t||""===t)throw new Error("No input text");let i,a,d=n.M;return void 0!==r&&(d=n.from(r.errorCorrectionLevel,n.M),i=l.from(r.version),a=o.from(r.maskPattern),r.toSJISFunc&&e.setToSJISFunction(r.toSJISFunc)),m(t,i,d,a)},Po}var Nd,Sd,Td={},Id={};function Rd(){return Nd||(Nd=1,function(e){function n(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");let n=e.slice().replace("#","").split("");if(n.length<3||5===n.length||n.length>8)throw new Error("Invalid hex color: "+e);3!==n.length&&4!==n.length||(n=Array.prototype.concat.apply([],n.map(function(e){return[e,e]}))),6===n.length&&n.push("F","F");const t=parseInt(n.join(""),16);return{r:t>>24&255,g:t>>16&255,b:t>>8&255,a:255&t,hex:"#"+n.slice(0,6).join("")}}e.getOptions=function(e){e||(e={}),e.color||(e.color={});const t=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;return{width:r,scale:r?4:i,margin:t,color:{dark:n(e.color.dark||"#000000ff"),light:n(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},e.getScale=function(e,n){return n.width&&n.width>=e+2*n.margin?n.width/(e+2*n.margin):n.scale},e.getImageWidth=function(n,t){const r=e.getScale(n,t);return Math.floor((n+2*t.margin)*r)},e.qrToImageData=function(n,t,r){const i=t.modules.size,a=t.modules.data,o=e.getScale(i,r),d=Math.floor((i+2*r.margin)*o),s=r.margin*o,l=[r.color.light,r.color.dark];for(let e=0;e<d;e++)for(let t=0;t<d;t++){let c=4*(e*d+t),u=r.color.light;if(e>=s&&t>=s&&e<d-s&&t<d-s){u=l[a[Math.floor((e-s)/o)*i+Math.floor((t-s)/o)]?1:0]}n[c++]=u.r,n[c++]=u.g,n[c++]=u.b,n[c]=u.a}}}(Id)),Id}function Md(){return Sd||(Sd=1,function(e){const n=Rd();e.render=function(e,t,r){let i=r,a=t;void 0!==i||t&&t.getContext||(i=t,t=void 0),t||(a=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),i=n.getOptions(i);const o=n.getImageWidth(e.modules.size,i),d=a.getContext("2d"),s=d.createImageData(o,o);return n.qrToImageData(s.data,e,i),function(e,n,t){e.clearRect(0,0,n.width,n.height),n.style||(n.style={}),n.height=t,n.width=t,n.style.height=t+"px",n.style.width=t+"px"}(d,a,o),d.putImageData(s,0,0),a},e.renderToDataURL=function(n,t,r){let i=r;void 0!==i||t&&t.getContext||(i=t,t=void 0),i||(i={});const a=e.render(n,t,i),o=i.type||"image/png",d=i.rendererOpts||{};return a.toDataURL(o,d.quality)}}(Td)),Td}var Od,Dd,Ld={};function Ud(){if(Od)return Ld;Od=1;const e=Rd();function n(e,n){const t=e.a/255,r=n+'="'+e.hex+'"';return t<1?r+" "+n+'-opacity="'+t.toFixed(2).slice(1)+'"':r}function t(e,n,t){let r=e+n;return void 0!==t&&(r+=" "+t),r}return Ld.render=function(r,i,a){const o=e.getOptions(i),d=r.modules.size,s=r.modules.data,l=d+2*o.margin,c=o.color.light.a?"<path "+n(o.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",u="<path "+n(o.color.dark,"stroke")+' d="'+function(e,n,r){let i="",a=0,o=!1,d=0;for(let s=0;s<e.length;s++){const l=Math.floor(s%n),c=Math.floor(s/n);l||o||(o=!0),e[s]?(d++,s>0&&l>0&&e[s-1]||(i+=o?t("M",l+r,.5+c+r):t("m",a,0),a=0,o=!1),l+1<n&&e[s+1]||(i+=t("h",d),d=0)):a++}return i}(s,d,o.margin)+'"/>',h='viewBox="0 0 '+l+" "+l+'"',p='<svg xmlns="http://www.w3.org/2000/svg" '+(o.width?'width="'+o.width+'" height="'+o.width+'" ':"")+h+' shape-rendering="crispEdges">'+c+u+"</svg>\n";return"function"==typeof a&&a(null,p),p},Ld}var Bd=function(){if(Dd)return Co;Dd=1;const e=Eo(),n=Ad(),t=Md(),r=Ud();function i(t,r,i,a,o){const d=[].slice.call(arguments,1),s=d.length,l="function"==typeof d[s-1];if(!l&&!e())throw new Error("Callback required as last argument");if(!l){if(s<1)throw new Error("Too few arguments provided");return 1===s?(i=r,r=a=void 0):2!==s||r.getContext||(a=i,i=r,r=void 0),new Promise(function(e,o){try{const o=n.create(i,a);e(t(o,r,a))}catch(e){o(e)}})}if(s<2)throw new Error("Too few arguments provided");2===s?(o=i,i=r,r=a=void 0):3===s&&(r.getContext&&void 0===o?(o=a,a=void 0):(o=a,a=i,i=r,r=void 0));try{const e=n.create(i,a);o(null,t(e,r,a))}catch(e){o(e)}}return Co.create=n.create,Co.toCanvas=i.bind(null,t.render),Co.toDataURL=i.bind(null,t.renderToDataURL),Co.toString=i.bind(null,function(e,n,t){return r.render(e,t)}),Co}(),Fd=Ke(Bd),qd=Ke(Ud());function Gd(e){const{amount:n,businessName:t,channelLogo:r,currency:i,onAffirm:a,qrString:o,title:d,t:s}=e,[l,c]=Se(!1),u=Me(()=>{c(!0),a()},[a]),h=Re(()=>{try{return function(e){const n=Fd.create(e),t=1,r=qd.render(n,{margin:t}),i=(new DOMParser).parseFromString(r,"image/svg+xml").documentElement;i.style.width="100%",i.style.height="100%",i.setAttribute("width",String(n.modules.size+2*t)),i.setAttribute("height",String(n.modules.size+2*t));const a=i.querySelector("[fill]");a?.setAttribute("fill","var(--xendit-qr-background-color)");const o=i.querySelector("[stroke]");return o?.setAttribute("stroke","var(--xendit-qr-foreground-color)"),i}(o)}catch(e){console.log("Error generating QR code SVG:",e);const n=document.createElement("div");return n.innerText=s("action_qr.unable_to_generate"),n}},[o,s]);return e.hideUi?le("div",{"data-testid":"qr-code",ref:e=>{!e||1===e.childNodes.length&&e.firstChild===h||e?.replaceChildren(h)}}):le("div",{className:"xendit-action-present-to-customer",children:[le("img",{src:r,alt:"Channel Logo",className:"xendit-action-qr-channel-logo"}),le("div",{className:"xendit-action-title",children:d}),le("div",{className:"xendit-action-qr-content",children:[le("div",{className:"xendit-text-16 xendit-text-semibold xendit-text-center",children:t}),le("div",{"data-testid":"qr-code",className:"xendit-action-qr-qrcode-container",ref:e=>{!e||1===e.childNodes.length&&e.firstChild===h||e?.replaceChildren(h)}}),le("div",{className:"xendit-text-16 xendit-text-semibold xendit-text-center",children:Di(n,i)})]}),le("div",{className:"xendit-action-present-to-customer-affirm",children:[le(Hn,{variant:Vn.WHITE_ROUNDED,disabled:l,onClick:u,className:"xendit-button-block",children:l?le(jn,{}):s("action.payment_made")}),le("div",{className:"xendit-text-12 xendit-text-secondary xendit-text-center",children:s("action.payment_confirmation_instructions")})]})]})}const Kd=e=>{const{title:n,onClose:t,children:r,seamless:i}=e,a=Ie(!1),o=Ie(!1),d=Ie(null),s=Ie(null),l=void 0!==HTMLElement.prototype.animate,c=Me(()=>{a.current||(a.current=!0,t())},[t]),u=Me(()=>{if(!d.current||!s.current||o.current)return;if(o.current=!0,!l)return void c();s.current.animate?.(Hd,Vd);const e=d.current.animate?.(Yd,Vd);e.onfinish=c},[c,l]);return Te(()=>{l&&(s.current?.animate?.(Wd,Vd),d.current?.animate?.(jd,Vd))},[l]),Te(()=>{e.close&&u()},[e.close,u]),le("div",{className:"xendit-dialog-backdrop",ref:s,children:le("div",{className:"xendit-dialog",ref:d,children:[i?le("button",{"aria-label":"Close",onClick:u,className:"xendit-dialog-floating-close",children:le(ce,{name:"x",size:20})}):le("div",{className:"xendit-dialog-header xendit-text-16 xendit-text-semibold",children:[n,le("button",{"aria-label":"Close",onClick:u,children:le(ce,{name:"x",size:20})})]}),le("div",{className:"xendit-dialog-body",children:r})]})})},Vd={duration:200,easing:"ease-in-out",fill:"forwards"},Wd=[{backgroundColor:"rgba(0, 0, 0, 0)"},{backgroundColor:"rgba(0, 0, 0, 0.5)"}],Hd=Wd.slice().reverse(),jd=[{opacity:0,transform:"scale(0.9) translateY(-20px)"},{opacity:1,transform:""}],Yd=jd.slice().reverse();function Xd(e){const{sdk:n,title:t,onClose:r,width:i,height:a}=e,o=Ie(null);return Te(()=>{const e=n.createActionContainerComponent(_e);return o.current?.replaceChildren(e),()=>{n.destroyComponent(e)}},[n]),le(Kd,{title:t,onClose:r,close:e.close,seamless:!0,children:le("div",{className:"xendit-default-action-container",ref:o,style:{width:i?`calc(min(100vw - 64px, ${i}px))`:"calc(100vw - 64px)",height:a?`calc(min(100vh - 64px, ${a}px))`:void 0}})})}const zd=({instructions:e})=>{switch(e.length){case 0:return null;case 1:return le(Zd,{instruction:e[0]});default:return le(Jd,{instructions:e})}},Zd=e=>le("div",{children:[le("p",{className:"xendit-instructions-single-tab-heading",children:e.instruction.title}),le(Qd,{instruction:e.instruction})]}),Jd=e=>{const[n,t]=Se(0);return le("div",{children:[le("div",{className:"xendit-instructions-tab-list",children:e.instructions.map((e,r)=>le("button",{className:je("xendit-instructions-tab-button",{"xendit-instructions-active-tab":n===r}),onClick:()=>t(r),children:e.title},r))}),le(Qd,{instruction:e.instructions[n]})]})},Qd=e=>le("ol",{className:"xendit-instructions-numbered-list","data-testid":"instructions-steps",children:e.instruction.content.map((e,n)=>le("li",{className:"xendit-instructions-step-li",children:le("div",{className:"xendit-instructions-step-box",children:(Array.isArray(e)?e:[e]).map((e,n)=>le(x,{children:rs(e)},n))})},n))});function es(e){const n=Array.from(e).map((e,n)=>{switch(e.nodeType){case Node.TEXT_NODE:return null===e.textContent?null:e.textContent;case Node.ELEMENT_NODE:return function(e,n){const t=je({"xendit-instructions-bold":"B"===e.nodeName,"xendit-instructions-italics":"I"===e.nodeName});return t?le("span",{className:t,children:es(e.childNodes)},n):es(e.childNodes)}(e,n);default:return null}});return n}const ns="undefined"!=typeof DOMParser?new DOMParser:null;function ts(e){try{if(!ns)return e;return es(ns.parseFromString(e,"text/html").body.childNodes)}catch(n){return e}}function rs(e){if("string"==typeof e)return le("p",{className:"xendit-instructions-step-item",children:ts(e)});switch(e.type){case"text":return function(e){return le("p",{children:ts(e.text)})}(e);case"image":return function(e){return le("div",{children:le("img",{src:e.src,alt:e.alt||"",style:{height:`${e.height??24}px`}})})}(e);case"bullets":return function(e){return le("ul",{className:"xendit-instructions-bullet-list",children:e.items.map((e,n)=>le("li",{children:ts(e)},n))})}(e);case"form":return function(e){return le("div",{className:"xendit-instructions-form-card",children:[e.heading?le("h3",{className:"xendit-instructions-form-heading",children:ts(e.heading)}):null,e.fields.map((e,n)=>le("div",{className:"xendit-instructions-form-field",children:[le("div",{className:"xendit-instructions-form-field-label",children:ts(e.label)}),le("div",{className:"xendit-instructions-form-field-value",children:ts(e.value)})]},n))]})}(e);case"table":return function(e){return le("table",{className:"xendit-instructions-table",children:[le("thead",{children:le("tr",{children:e.headers.map((e,n)=>le("th",{className:"xendit-instructions-table-header",children:ts(e)},n))})}),le("tbody",{children:e.rows.map((e,n)=>le("tr",{children:e.map((e,n)=>le("td",{className:"xendit-instructions-table-cell",children:ts(e)},n))},n))})]})}(e)}return null}const is=W({fire:()=>{},text:""}),as=({children:e})=>{const[n,t]=Se("");return le(is.Provider,{value:{text:n,fire:e=>{t(e);const n=setTimeout(()=>{t("")},2e3);return()=>clearTimeout(n)}},children:le("div",{style:{position:"relative"},children:e})})},os=()=>{const{text:e}=Oe(is);return e?le("div",{className:"xendit-tooltip",children:e}):null};function ds(e){const{amount:n,channelLogo:t,currency:r,onAffirm:i,vaNumber:a,merchantName:o,instructions:d,title:s,t:l}=e,[c,u]=Se(!1),h=Me(()=>{u(!0),i()},[i]),p=[{heading:l("action_va.merchant_name"),value:o},{heading:l("action_va.virtual_account_number"),value:a,enableCopy:!0},{heading:l("action_va.amount_to_pay"),value:Di(n,r),enableCopy:!0}];return le("div",{className:"xendit-action-present-to-customer",children:[le("img",{src:t,alt:"Channel Logo",className:"xendit-action-qr-channel-logo"}),le("div",{className:"xendit-action-title",children:s}),le("div",{className:"xendit-action-va-content",children:le("div",{className:"xendit-action-va-details",children:p.map((e,n)=>le("div",{className:"xendit-action-va-detail-item",children:[le("div",{className:"xendit-action-va-detail-content",children:[le("div",{className:"xendit-action-va-heading xendit-text-12 xendit-text-semibold",children:e.heading}),le("div",{className:"xendit-action-va-value xendit-text-semibold",children:e.value})]}),e.enableCopy?le(as,{children:[le(ss,{value:e.value,t:l}),le(os,{})]}):null]},n))})}),le("div",{className:"xendit-action-present-to-customer-affirm",children:[le(Hn,{variant:Vn.WHITE_ROUNDED,disabled:c,onClick:h,className:"xendit-button-block",children:c?le(jn,{}):l("action.payment_made")}),le("div",{className:"xendit-text-12 xendit-text-secondary xendit-text-center",children:l("action.payment_confirmation_instructions")})]}),le(zd,{instructions:d})]})}const ss=({value:e,t:n})=>{const{fire:t}=Oe(is);return le(Hn,{variant:Vn.WHITE_ROUNDED,size:Wn.SM,onClick:()=>{navigator.clipboard.writeText(e),t(n("action_va.copied_to_clipboard"))},children:[n("action_va.copy"),le(ce,{name:"copy",size:16})]})};var ls;function cs(e){return"payment_request_id"in e?{id:e.payment_request_id,type:ls.PaymentRequest,entity:e}:{id:e.payment_token_id,type:ls.PaymentToken,entity:e}}function us(e,n,t){return`${e===ls.PaymentRequest?"payment_request":"payment_token"}_status.${n.toLowerCase()}.${t}`}!function(e){e.PaymentRequest="REQUEST",e.PaymentToken="TOKEN"}(ls||(ls={}));function hs(e,n,t){const{session:r,paymentEntity:i}=e;switch(un(r),un(i),un(n),t){case"PENDING":return ps(r);case"PENDING_PAYMENT_ENTITY_ONLY":return function(e,n){const t=n.type===ls.PaymentRequest?n.entity:void 0,r=n.type===ls.PaymentToken?n.entity:void 0;return{session:e,payment_request:_s(t,"PENDING"),payment_token:_s(r,"PENDING")}}(r,i);case"SUCCESS":return"PENDING"===n._mock_action_type?ps(r):function(e,n){const t=n.type===ls.PaymentRequest?n.entity:void 0,r=n.type===ls.PaymentToken?n.entity:void 0;return{session:{...e,status:"COMPLETED",payment_request_id:t?.payment_request_id,payment_token_id:r?.payment_token_id},payment_request:_s(t,"SUCCEEDED"),payment_token:_s(r,"ACTIVE"),succeeded_channel:{channel_code:n.entity.channel_code,logo_url:"https://placehold.co/48"}}}(r,i);case"FAILURE":return function(e,n){const t=n.type===ls.PaymentRequest?n.entity:void 0,r=n.type===ls.PaymentToken?n.entity:void 0;return{session:{...e,status:"ACTIVE"},payment_request:_s(t,"FAILED"),payment_token:_s(r,"FAILED")}}(r,i)}}function ps(e){return{session:{...e,status:"PENDING"}}}function _s(e,n){return e?{...e,status:n}:e}function ms(e,n){return"PENDING"===n?{payment_request_id:`pr-${Nn()}`,status:"PENDING",channel_code:e,actions:[],session_token_request_id:Nn()}:n?{payment_request_id:`pr-${Nn()}`,status:"REQUIRES_ACTION",channel_code:e,actions:fs(n),session_token_request_id:Nn()}:{payment_request_id:`pr-${Nn()}`,status:"SUCCEEDED",channel_code:e,actions:[],session_token_request_id:Nn()}}function fs(e){if(!e)return[];return(Array.isArray(e)?e:[e]).map(e=>function(e){if("PENDING"===e)throw new Error("PENDING mock action type should not generate an action");switch(e){case"IFRAME":return{type:"REDIRECT_CUSTOMER",descriptor:"WEB_URL",value:"https://example.com/iframe",iframe_capable:!0};case"REDIRECT":return{type:"REDIRECT_CUSTOMER",descriptor:"WEB_URL",value:"https://example.com/redirect",iframe_capable:!1};case"PAYLINK":return{type:"REDIRECT_CUSTOMER",descriptor:"WEB_GOOGLE_PAYLINK",value:"https://example.com/paylink"};case"DEEP_LINK":return{type:"REDIRECT_CUSTOMER",descriptor:"DEEPLINK_URL",value:"mockapp://mock-deep-link"};case"PUSH_NOTIFICATION":return null;case"QR":return{type:"PRESENT_TO_CUSTOMER",descriptor:"QR_STRING",value:"https://example.com/qr-code-data",action_title:"Pay with QR Code",action_subtitle:"Scan the QR code below",action_graphic:"",instructions:null};case"BARCODE":return{type:"PRESENT_TO_CUSTOMER",descriptor:"PAYMENT_CODE",value:"1234567890",action_title:"Pay at a Store",action_subtitle:"Show this barcode to the cashier",action_graphic:"",instructions:null};case"VA":return{type:"PRESENT_TO_CUSTOMER",descriptor:"VIRTUAL_ACCOUNT_NUMBER",value:"1234567890",action_title:"Pay with Virtual Account",action_subtitle:"Protect yourself from fraud - ensure all details are correct",action_graphic:"",instructions:[{title:"Mobile Banking",content:[{type:"text",text:"Open Mobile App"},{type:"text",text:"Select <b>Mock VA</b>, then select <b>Transfer</b>"},{type:"text",text:"Enter your Virtual Account Number, for example 3816523906568, then press <b>OK</b>"},{type:"text",text:"Click on <b>Send</b> button at the top right corner to proceed"},{type:"text",text:"Click <b>OK</b> to proceed"},{type:"text",text:"Enter your PIN to authorize the transaction"}]},{title:"Internet Banking",content:[{type:"text",text:"Login to the website"},{type:"text",text:"Select <b>Transfer</b>, then select <b>Transfer to Mock VA Virtual Account</b>"},{type:"text",text:"Enter the Virtual Account Number, for example 3816523906568"},{type:"text",text:"Select <b>Continue</b> to proceed your payment"}]},{title:"ATM",content:[{type:"text",text:"Insert your ATM card and PIN"},{type:"text",text:"Enter your ATM PIN"},{type:"text",text:"Select <b>Transfer</b>"},{type:"text",text:"Select <b>To Mock VA Virtual Account</b>"},{type:"text",text:"Enter Virtual Account Number, for example 3816523906568. Press <b>Correct</b> to proceed"},{type:"text",text:"Verify Virtual Account details and then enter amount to be transferred and select <b>Correct</b> to confirm"},{type:"text",text:"Confirm your transaction details displayed"},{type:"text",text:"Select <b>Yes</b> if the details are correct or <b>No</b> if the details are not correct"}]}]}}throw new Error(`Unknown mock action type: ${e}`)}(e)).filter(e=>null!==e)}const ys=e=>le("div",{className:"xendit-redirect-instructions",children:[le("div",{className:"xendit-redirect-instructions-logo",children:le("img",{src:e.logoUrl,alt:e.logoAlt})}),le("div",{className:"xendit-redirect-instructions-text",children:[le("div",{className:"xendit-text-16",children:e.title}),e.subtitle?le("div",{className:"xendit-text-14 xendit-text-secondary",children:e.subtitle}):null]}),e.redirectUrl?le("a",{href:e.redirectUrl,className:"xendit-redirect-instructions-button xendit-text-14",children:e.redirectButtonLabel??""}):null]}),bs=e=>{const n=e.t,t=e.channel,r=t.brand_name;return le(ys,{title:n("action_empty_list_push_notification.title"),subtitle:n("action_empty_list_push_notification.subtext",{channelName:r}),logoUrl:t.brand_logo_url,logoAlt:n("image_alt.channel_logo",{channelName:r}),redirectUrl:null,redirectButtonLabel:null})},$s=e=>{const n=e.t,t=e.channel,r=t.brand_name;return le(ys,{title:n("action_deeplink.title"),subtitle:n("action_deeplink.instructions",{channelName:r}),logoUrl:t.brand_logo_url,logoAlt:n("image_alt.channel_logo",{channelName:r}),redirectUrl:e.redirectUrl,redirectButtonLabel:n("action_deeplink.button",{channelName:r})})};class ContainerActionBehavior{bb;cleanupFn=null;defaultContainerHeight=0;defaultContainerWidth=400;title="Complete your payment";constructor(e){this.bb=e}ensureHasActionContainer(){if(this.bb.sdk[_e].liveComponents.actionContainer)return()=>{this.emptyActionContainer()};let e=!1,n=!1;const t=document.createElement("div");t.setAttribute("class","xendit-default-action-container");const r={sdk:this.bb.sdk,title:this.title,width:this.defaultContainerWidth,height:this.defaultContainerHeight,onClose:()=>{e=!0,V(null,t),t.remove(),n||this.bb.sdk.abortSubmission()}};return V(g(Xd,r),t),document.body.appendChild(t),i=>{i||(n=!0),e||V(g(Xd,{...r,close:!0}),t)}}cleanupActionContainer(e){this.cleanupFn&&(this.cleanupFn(e),this.cleanupFn=null)}emptyActionContainer(){const e=this.bb.sdk[_e].liveComponents.actionContainer;e&&V(null,e)}updateActionContainerBrandColor(){un(this.bb.channel);const e=this.bb.sdk[_e].liveComponents.actionContainer;e&&e.style.setProperty("--xendit-channel-brand-color",this.bb.channel.brand_color)}populateActionContainer(e){const n=this.bb.sdk[_e].liveComponents.actionContainer;if(!n)throw new Error("Trying to populate action container, but it is missing; A default action container should have been created. This is a bug, please contact support.");this.updateActionContainerBrandColor(),V(e(),n)}exit(){this.cleanupActionContainer(!1),this.emptyActionContainer()}}class ActionCompletedBehavior{bb;constructor(e){this.bb=e}enter(){}}class ActionRedirectBehavior{bb;url;constructor(e,n){this.bb=e,this.url=n}enter(){this.bb.dispatchEvent(new XenditWillRedirectEvent),window.location.href=this.url}}class ActionIframeBehavior extends ContainerActionBehavior{bb;url;constructor(e,n){super(e),this.bb=e,this.url=n,this.defaultContainerHeight=600}enter(){this.cleanupFn=this.ensureHasActionContainer(),this.populateActionContainer(()=>g(go,{url:this.url,mock:this.bb.mock,onIframeComplete:e=>{this.cleanupActionContainer(!1);const n="success"===e.mockStatus?"SUCCESS":"FAILURE";this.updateMocksOnIframeCompletion(n),this.bb.actionCompleted=!0,this.bb.pollImmediatelyRequested=!0,this.bb.dispatchEvent(new InternalBehaviorTreeUpdateEvent)}}))}updateMocksOnIframeCompletion(e){un(this.bb.world?.paymentEntity),this.bb.mock&&this.bb.dispatchEvent(new InternalScheduleMockUpdateEvent(hs(this.bb.world,this.bb.channel,e)))}exit(){super.exit()}}class ActionQrBehavior extends ContainerActionBehavior{bb;actionIndex;constructor(e,n){super(e),this.bb=e,this.actionIndex=n}enter(){const e=this.bb.world?.paymentEntity?.entity.actions[Number(this.actionIndex)];_n(e?.type,"PRESENT_TO_CUSTOMER"),un(this.bb.world),un(this.bb.channel);const n=this.bb.sdk[_e].liveComponents.actionContainer,t={amount:this.bb.world.session.amount,businessName:this.bb.world.business.name??"",channelLogo:this.bb.channel.brand_logo_url,currency:this.bb.world.session.currency,hideUi:"true"===n?.getAttribute("data-qr-code-only")||!1,onAffirm:this.affirmPayment.bind(this),qrString:e.value,title:e.action_subtitle,t:this.bb.sdk.t.bind(this.bb.sdk)};this.cleanupFn=this.ensureHasActionContainer(),this.populateActionContainer(()=>g(Gd,t))}affirmPayment(){this.bb.sdk.isProdLive()?this.bb.pollImmediatelyRequested=!0:this.bb.simulatePaymentRequested=!0,this.bb.dispatchEvent(new InternalBehaviorTreeUpdateEvent)}exit(){super.exit()}}class ActionDeepLinkBehavior extends ContainerActionBehavior{bb;actionIndex;constructor(e,n){super(e),this.bb=e,this.actionIndex=n}enter(){un(this.bb.world);const e=this.bb.world?.paymentEntity?.entity.actions[Number(this.actionIndex)];if(_n(e?.type,"REDIRECT_CUSTOMER"),"DEEPLINK_URL"!==e.descriptor&&"WEB_URL"!==e.descriptor)throw new Error("Unexpected action type in ActionDeepLinkBehavior");const n=this.bb.sdk.t.bind(this.bb.sdk),t=this.bb.channel;un(t),this.cleanupFn=this.ensureHasActionContainer(),this.populateActionContainer(()=>g($s,{t:n,channel:t,redirectUrl:e.value}))}exit(){super.exit()}}class ActionEmptyListPushNotificationBehavior extends ContainerActionBehavior{bb;constructor(e){super(e),this.bb=e}enter(){un(this.bb.world),this.bb.hackyOvoActionLatch=!0;const e=this.bb.sdk.t.bind(this.bb.sdk),n=this.bb.channel;un(n),this.cleanupFn=this.ensureHasActionContainer(),this.populateActionContainer(()=>g(bs,{t:e,channel:n})),this.bb.mock&&this.bb.dispatchEvent(new InternalScheduleMockUpdateEvent(hs(this.bb.world,this.bb.channel,"PENDING_PAYMENT_ENTITY_ONLY")))}exit(){this.bb.hackyOvoActionLatch=void 0,super.exit()}}class ActionVaBehavior extends ContainerActionBehavior{bb;actionIndex;constructor(e,n){super(e),this.bb=e,this.actionIndex=n}enter(){const e=this.bb.world?.paymentEntity?.entity.actions[Number(this.actionIndex)];_n(e?.type,"PRESENT_TO_CUSTOMER"),un(this.bb.world),un(this.bb.channel);const n={amount:this.bb.world.session.amount,channelLogo:this.bb.channel.brand_logo_url,currency:this.bb.world.session.currency,onAffirm:this.affirmPayment.bind(this),vaNumber:e.value,merchantName:this.bb.world.business.name??"",instructions:e.instructions??[],title:e.action_title,t:this.bb.sdk.t.bind(this.bb.sdk)};this.cleanupFn=this.ensureHasActionContainer(),this.populateActionContainer(()=>g(ds,n))}affirmPayment(){this.bb.sdk.isProdLive()?this.bb.pollImmediatelyRequested=!0:this.bb.simulatePaymentRequested=!0,this.bb.dispatchEvent(new InternalBehaviorTreeUpdateEvent)}}class ActionPaylinkBehavior{bb;actionIndex;el=null;constructor(e,n){this.bb=e,this.actionIndex=n}enter(){un(this.bb.world),un(this.bb.world.paymentEntity);const e=this.bb.world?.paymentEntity?.entity.actions[Number(this.actionIndex)];if(!e)throw new Error("Action not found for paylink behavior");_n(e.type,"REDIRECT_CUSTOMER"),_n(e.descriptor,"WEB_GOOGLE_PAYLINK");const n=document.createElement("link");n.rel="facilitated-payment",n.href=e.value,this.el=n,document.head.appendChild(n)}exit(){this.el?.remove(),this.el=null}}class CardInfoBehavior{bb;channelCode;cardDetailsRequest=null;constructor(e,n){this.bb=e,this.channelCode=n}enter(){this.lookupCardDetails()}update(){this.lookupCardDetails()}exit(){this.abortLookupCardDetails()}abortLookupCardDetails(){this.cardDetailsRequest&&(this.cardDetailsRequest.abortController.abort(new AbortError),this.cardDetailsRequest=null)}lookupCardDetails(){const e=On(this.bb.channelProperties);if(!e)return;if(this.cardDetailsRequest?.cardNumber===e)return;if(this.bb.channelData?.cardDetails?.cardNumber===e)return;this.cardDetailsRequest&&this.abortLookupCardDetails();const n=new AbortController,t=yn(300,n.signal).then(()=>{if(this.bb.mock){const n=Dn(e).cipherText;try{return JSON.parse(atob(n))}catch{}return{schemes:["VISA"],country_codes:["ID"],require_billing_information:!1}}{const t=Dn(e).withoutValidationError;return ho(this.bb.sdkKey,{card_number:t},this.bb.sdkKey.sessionAuthKey,void 0,n.signal)}}).then(n=>{this.bb.dispatchEvent(new InternalUpdateChannelComponentData(this.channelCode,{cardDetails:{cardNumber:e,details:n}}))}).catch(e=>{if(!fn(e))throw e});this.cardDetailsRequest={cardNumber:e,promise:t,abortController:n}}}class ChannelValidBehavior{bb;lastChannelCode=null;constructor(e){this.bb=e}enter(){this.sendReadyEventIfChanged()}update(){this.sendReadyEventIfChanged()}sendReadyEventIfChanged(){const e=this.bb.channel?.channel_code??null;e&&e!==this.lastChannelCode&&(this.bb.dispatchEvent(new XenditReadyEvent(e)),this.lastChannelCode=e)}exit(){this.bb.dispatchEvent(new XenditNotReadyEvent)}}class ChannelInvalidBehavior{bb;channelCode;constructor(e,n){this.bb=e,this.channelCode=n}enter(){}}class PollWorker{sdkKey;sdk;sessionTokenRequestId;onPollResult;started=!1;stopped=!1;constructor(e,n,t,r){this.sdkKey=e,this.sdk=n,this.sessionTokenRequestId=t,this.onPollResult=r}async start(){if(this.stopped)throw new Error("PollWorker has been stopped, make a new instance instead of calling start again");this.started=!0;for await(const e of async function*(e,n,t=2){yield 0;let r=e;for(let e=1;e<n;e++)r*=t,await mn(r),yield e}(5e3,100,1.06)){if(this.stopped)return;let e;if(this.sdk.isMock()){if(!(this.sdk instanceof XenditComponentsTest&&this.sdk.nextMockUpdate))continue;await mn(cn),e=this.sdk.nextMockUpdate,this.sdk.nextMockUpdate=null}else try{e=await uo(this.sdkKey,this.sdkKey.sessionAuthKey,this.sessionTokenRequestId)}catch(e){continue}if(this.stopped)return;if(!e.session)throw new Error("Session is not defined");let n=null;e.payment_token?n=cs(e.payment_token):e.payment_request&&(n=cs(e.payment_request)),this.onPollResult(e,n),await mn(1)}}isPolling(){return this.started&&!this.stopped}stop(){this.started=!1,this.stopped=!0}}class PePendingBehavior{bb;pollWorker;constructor(e){this.bb=e,this.pollWorker=new PollWorker(this.bb.sdkKey,this.bb.sdk,this.bb.world?.sessionTokenRequestId??null,this.onPollResult)}enter(){if(this.bb.mock)switch(un(this.bb.world?.paymentEntity),this.bb.world?.paymentEntity.entity.status){case"ACTIVE":case"AUTHORIZED":case"SUCCEEDED":case"PENDING":this.bb.dispatchEvent(new InternalScheduleMockUpdateEvent(hs(this.bb.world,this.bb.channel,"SUCCESS")));break;case"FAILED":case"CANCELED":case"EXPIRED":this.bb.dispatchEvent(new InternalScheduleMockUpdateEvent(hs(this.bb.world,this.bb.channel,"FAILURE")))}this.pollWorker.start()}exit(){this.pollWorker.stop()}onPollResult=(e,n)=>{this.bb.dispatchEvent(new InternalUpdateWorldState({session:e.session,paymentEntity:n??void 0,succeededChannel:e.succeeded_channel??null}))}}class PeRequiresActionBehavior{bb;pollWorker=null;canCreateActionContainer=!0;constructor(e){this.bb=e,this.resetPolling()}enter(){this.bb.dispatchEvent(new XenditActionBeginEvent),this.canCreateActionContainer=!1,this.pollWorker?.start()}update(){this.bb.pollImmediatelyRequested&&(this.bb.pollImmediatelyRequested=!1,this.resetPolling())}exit(){this.pollWorker?.stop(),this.bb.dispatchEvent(new XenditActionEndEvent),this.bb.actionCompleted=!1}onPollResult=(e,n)=>{this.bb.dispatchEvent(new InternalUpdateWorldState({session:e.session,paymentEntity:n??void 0,succeededChannel:e.succeeded_channel??null}))};resetPolling(){const e=this.pollWorker?.isPolling()??!1;this.pollWorker?.stop(),this.pollWorker=new PollWorker(this.bb.sdkKey,this.bb.sdk,this.bb.world?.sessionTokenRequestId??null,this.onPollResult),e&&this.pollWorker.start()}}class PeFailedBehavior{bb;constructor(e){this.bb=e}enter(){this.bb.submissionRequested=!1,this.bb.dispatchEvent(new InternalBehaviorTreeUpdateEvent)}}class PaymentOptionsBehavior{bb;channelCode;paymentOptionsRequest=null;constructor(e,n){this.bb=e,this.channelCode=n}enter(){this.lookupPaymentOptions()}update(){this.lookupPaymentOptions()}exit(){this.abortLookupPaymentOptions()}abortLookupPaymentOptions(){this.paymentOptionsRequest&&(this.paymentOptionsRequest.abortController.abort(new AbortError),this.paymentOptionsRequest=null)}lookupPaymentOptions(){let e;if(un(this.bb.world),un(this.bb.channel),Kn(this.bb.channel.form,"credit_card_number")){if(e=On(this.bb.channelProperties)??void 0,!e)return;if(this.paymentOptionsRequest?.cardNumber===e)return;if(this.bb.channelData?.paymentOptions?.cardNumber??null===e)return;if(e){if(!Dn(e).valid)return}}else if(this.paymentOptionsRequest||this.bb.channelData?.paymentOptions)return;this.paymentOptionsRequest&&this.abortLookupPaymentOptions();const n=new AbortController,t=async function(e,n,t,r,i,a){if(a)return yn(cn,i).then(()=>function(e,n){return{channel_code:e,country:n.country,currency:n.currency,amount:n.amount,installment_plans:[{interval:"MONTH",interval_count:1,terms:3,installment_amount:Math.floor(n.amount/3),total_amount:n.amount,description:"Unused",code:"3M",interest_rate:1},{interval:"MONTH",interval_count:1,terms:6,installment_amount:Math.floor(n.amount/6),total_amount:n.amount,description:"Unused",code:"6M",interest_rate:1},{interval:"MONTH",interval_count:1,terms:9,installment_amount:Math.floor(n.amount/9),total_amount:n.amount,description:"Unused",interest_rate:1,code:void 0}]}}(t,n));return po(e,{channel_code:t,channel_properties:r?{card_number:r}:void 0},e.sessionAuthKey,null,i)}(this.bb.sdkKey,this.bb.world.session,this.bb.channel.channel_code,e,n.signal,this.bb.mock).then(n=>{this.bb.dispatchEvent(new InternalUpdateChannelComponentData(this.channelCode,{paymentOptions:{cardNumber:e??null,options:n}}))}).catch(e=>{if(!fn(e))throw e});this.paymentOptionsRequest={cardNumber:e??void 0,promise:t,abortController:n}}}class SdkLoadingBehavior{bb;constructor(e){this.bb=e}enter(){}}class SdkActiveBehavior{bb;constructor(e){this.bb=e}enter(){this.bb.dispatchEvent(new XenditInitEvent),this.bb.dispatchEvent(new InternalNeedsRerenderEvent)}exit(){this.bb.dispatchEvent(new InternalNeedsRerenderEvent)}}class SdkFatalErrorBehavior{bb;constructor(e){this.bb=e}enter(){this.bb.dispatchEvent(new XenditFatalErrorEvent(this.bb.sdkFatalErrorMessage??"Unknown error"))}}function gs(e,n){switch(e.type){case ls.PaymentRequest:n(new XenditPaymentRequestDiscardedEvent(e.id));break;case ls.PaymentToken:n(new XenditPaymentTokenDiscardedEvent(e.id))}n(new InternalUpdateWorldState({paymentEntity:null,sessionTokenRequestId:null}))}class SessionActiveBehavior{bb;constructor(e){this.bb=e}enter(){this.bb.dispatchEvent(new InternalNeedsRerenderEvent)}exit(){this.bb.dispatchEvent(new InternalNeedsRerenderEvent)}}class SessionCompletedBehavior{bb;constructor(e){this.bb=e}enter(){this.bb.dispatchEvent(new XenditSessionCompleteEvent)}}class SessionFailedBehavior{bb;constructor(e){this.bb=e}enter(){this.bb.dispatchEvent(new XenditSessionExpiredOrCanceledEvent)}}class SessionPendingBehavior{bb;pollWorker;constructor(e){this.bb=e,this.pollWorker=new PollWorker(this.bb.sdkKey,this.bb.sdk,this.bb.world?.sessionTokenRequestId??null,this.onPollResult)}enter(){this.pollWorker.start(),this.bb.dispatchEvent(new XenditSessionPendingEvent)}exit(){this.pollWorker.stop(),un(this.bb.world?.session);const e=this.bb.world.paymentEntity;"COMPLETED"!==this.bb.world.session.status&&e&&gs(e,this.bb.dispatchEvent),this.bb.dispatchEvent(new XenditSessionNotPendingEvent)}onPollResult=(e,n)=>{this.bb.dispatchEvent(new InternalUpdateWorldState({session:e.session,paymentEntity:n??void 0,succeededChannel:e.succeeded_channel??null}))}}class SimulatePaymentBehavior{bb;exited=!1;simulationRequest=null;constructor(e){this.bb=e}enter(){this.simulatePayment()}exit(){this.exited=!0,this.bb.simulatePaymentRequested=!1,this.abortSimulation()}abortSimulation(){this.simulationRequest&&(this.simulationRequest.abortController.abort(new AbortError),this.simulationRequest=null)}simulatePayment(){if(this.simulationRequest&&this.abortSimulation(),!this.bb.channel)throw new Error("Channel is missing");if(!this.bb.world)throw new Error("Invalid state");if(!this.bb.world.paymentEntity)throw new Error("Payment entity is missing");if(this.bb.world.paymentEntity.type!==ls.PaymentRequest)throw new Error("Payment entity is not a payment request");const e=this.bb.world?.paymentEntity.id,n=new AbortController,t=async function(e,n,t,r,i){return n?(await yn(cn,i),ms(t.channel_code,t._mock_action_type)):await co(e,{channel_code:t.channel_code},{sessionAuthKey:e.sessionAuthKey,paymentRequestId:r},void 0,i)}(this.bb.sdkKey,this.bb.mock,this.bb.channel,e,n.signal).then(()=>{this.bb.mock&&this.bb.world&&this.bb.dispatchEvent(new InternalScheduleMockUpdateEvent(hs(this.bb.world,this.bb.channel,"SUCCESS"))),this.bb.dispatchEvent(new InternalBehaviorTreeUpdateEvent)}).catch(e=>{fn(e)||this.exited||(this.bb.simulatePaymentRequested=!1,console.error("Simulate Payment failed:",e))});this.simulationRequest={promise:t,abortController:n}}}class SubmissionBehavior{bb;exited=!1;submission=null;submissionError=null;constructor(e){this.bb=e}enter(){this.bb.dispatchEvent(new XenditSubmissionBeginEvent),this.bb.dispatchEvent(new InternalScheduleMockUpdateEvent(null)),this.submit()}exit(){this.exited=!0,un(this.bb.world?.session);const e=this.bb.sdk.t,n=this.bb.world.paymentEntity;let t,r,i;var a;"COMPLETED"!==this.bb.world.session.status&&"PENDING"!==this.bb.world.session.status&&n&&gs(n,this.bb.dispatchEvent),"ACTIVE"!==this.bb.world.session.status?t=`SESSION_${this.bb.world.session.status}`:!n||"FAILED"!==n.entity.status&&"CANCELED"!==n.entity.status&&"EXPIRED"!==n.entity.status?this.submissionError?(t="REQUEST_FAILED",!("message"in(a=this.submissionError))&&"text"in a&&"code"in a?(r=this.submissionError.text,i={type:"ERROR",code:this.submissionError.code}):(r=function(e){return[e("default_error.title"),e("default_error.message_1"),e("default_error.message_2")]}(e),i={type:"NETWORK_ERROR",code:"NETWORK_ERROR"})):t=this.submission?"REQUEST_ABORTED":"ACTION_ABORTED":(t=`PAYMENT_${n.type}_${n.entity.status}`,r=function(e,n,t,r){const i=e(us(n,t,"title")),a=r?e(function(e){return`failure_code.${e.toLowerCase()}`}(r),e("failure_code_unknown",{failureCode:r})):e(us(n,t,"subtext"));return[i,a]}(e,n.type,n.entity.status,n.entity.failure_code),i={type:"FAILURE",code:n.entity.failure_code??"UNKNOWN"}),this.bb.dispatchEvent(new XenditSubmissionEndEvent(t,r,i)),this.submission&&(this.submission?.abortController.abort(new AbortError),this.submission=null),this.bb.submissionRequested=!1,this.bb.dispatchEvent(new InternalNeedsRerenderEvent)}submit(){if(!this.bb.world?.session)throw new Error("Session object missing");if(!this.bb.channel)throw new Error("Channel missing");if(this.bb.instantSubmissionError)return this.bb.submissionRequested=!1,this.submissionError=this.bb.instantSubmissionError,this.bb.instantSubmissionError=null,void this.bb.dispatchEvent(new InternalBehaviorTreeUpdateEvent);const e="OPTIONAL"===this.bb.world.session.allow_save_payment_method&&this.bb.channel?.allow_save,n=this.bb.world?.session?.session_type,t=this.bb.channel.channel_code,r=this.bb.channel._mock_action_type,i=this.bb.channelProperties??{},a=new AbortController,o=async function(e,n,t,r,i,a,o,d){let s;if(n)switch(t){case"PAY":await yn(cn,o.signal),s=ms(r,i);break;case"SAVE":await yn(cn,o.signal),s=function(e,n){return"PENDING"===n?{payment_token_id:`pt-${Nn()}`,status:"PENDING",channel_code:e,actions:fs(n),session_token_request_id:Nn()}:n?{payment_token_id:`pt-${Nn()}`,status:"REQUIRES_ACTION",channel_code:e,actions:fs(n),session_token_request_id:Nn()}:{payment_token_id:`pt-${Nn()}`,status:"ACTIVE",channel_code:e,actions:[],session_token_request_id:Nn()}}(r,i);break;default:throw new Error(`The session type ${t} is not supported.`)}else switch(t){case"PAY":s=await lo(e,{session_id:e.sessionAuthKey,channel_code:r,channel_properties:a,save_payment_method:d},null,null,o.signal);break;case"SAVE":s=await so(e,{session_id:e.sessionAuthKey,channel_code:r,channel_properties:a},null,null,o.signal);break;default:throw new Error(`The session type ${t} is not supported.`)}return cs(s)}(this.bb.sdkKey,this.bb.mock,n,t,r,i,a,e?this.bb.channelData?.savePaymentMethod??!1:void 0).then(e=>{switch(this.submission=null,e.type){case ls.PaymentRequest:this.bb.dispatchEvent(new XenditPaymentRequestCreatedEvent(e.id));break;case ls.PaymentToken:this.bb.dispatchEvent(new XenditPaymentTokenCreatedEvent(e.id))}this.bb.dispatchEvent(new InternalUpdateWorldState({paymentEntity:e,sessionTokenRequestId:e.entity.session_token_request_id}))}).catch(e=>{fn(e)||(console.error("Submission failed:",e),this.exited||(this.bb.submissionRequested=!1,this.submissionError=e instanceof NetworkError?{text:[e.errorResponse.error_content?.title,e.errorResponse.error_content?.message_1,e.errorResponse.error_content?.message_2].filter(e=>void 0!==e),code:e.errorResponse.error_code}:e,this.bb.dispatchEvent(new InternalBehaviorTreeUpdateEvent)))});this.submission={abortController:a,promise:o}}}function vs(e){switch(e.sdkStatus){case"LOADING":return _o(SdkLoadingBehavior);case"ACTIVE":return _o(SdkActiveBehavior,"active",function(e){switch(un(e.world?.session),e.world.session.status){case"ACTIVE":return _o(SessionActiveBehavior,"active",e.submissionRequested?function(e){return un(e.world),_o(SubmissionBehavior,"submission",e.world.paymentEntity&&null!==e.world.sessionTokenRequestId?function(e){function n(){return un(e.world?.paymentEntity),$n(e.sdk,e.world.paymentEntity.entity.actions)?function(e){un(e.world?.paymentEntity);const n=$n(e.sdk,e.world.paymentEntity.entity.actions);un(n);const t=e.world.paymentEntity.entity.actions.indexOf(n);return _o(ActionPaylinkBehavior,String(t))}(e):void 0}if(un(e.world?.paymentEntity),e.hackyOvoActionLatch&&"PENDING"===e.world.paymentEntity.entity.status)return _o(PeRequiresActionBehavior,e.world.paymentEntity.id,[_o(ActionEmptyListPushNotificationBehavior,""),n()]);switch(e.world.paymentEntity.entity.status){case"PENDING":return _o(PePendingBehavior);case"REQUIRES_ACTION":return _o(PeRequiresActionBehavior,e.world.paymentEntity.id,[xs(e),n()]);case"FAILED":case"EXPIRED":case"CANCELED":return _o(PeFailedBehavior);case"ACCEPTING_PAYMENTS":throw new Error("Status ACCEPTING_PAYMENTS should not happen");case"AUTHORIZED":case"ACTIVE":case"SUCCEEDED":return _o(PePendingBehavior,e.world.paymentEntity.id);default:throw e.world.paymentEntity.entity,new Error(`Unknown payment entity status: ${e.world.paymentEntity.entity.status}`)}}(e):void 0)}(e):function(e){if(!e.channel||!e.world?.session)return;if(e.channelIsDigitalWallet)return;const n=function(e,n,t,r){t||(t={});for(const i of Ba(e,n.form,t,r))if(Vi(i,t))return!1;return!0}(e.world.session.session_type,e.channel,e.channelProperties,e.channelData),t=_o(n?ChannelValidBehavior:ChannelInvalidBehavior),r=Kn(e.channel.form,"credit_card_number")?_o(CardInfoBehavior,e.channel.channel_code):void 0,i=Kn(e.channel.form,"installment_plan")?_o(PaymentOptionsBehavior,e.channel.channel_code):void 0;return[t,r,i]}(e));case"COMPLETED":return _o(SessionCompletedBehavior);case"EXPIRED":case"CANCELED":return _o(SessionFailedBehavior,e.world.session.status);case"PENDING":return _o(SessionPendingBehavior,e.world.session.status);default:throw e.world.session.status,new Error(`Unknown session status: ${e.world.session.status}`)}}(e));case"FATAL_ERROR":return _o(SdkFatalErrorBehavior);default:throw e.sdkStatus,new Error(`Unknown SDK status: ${e.sdkStatus}`)}}function xs(e){if(un(e.world?.paymentEntity),e.actionCompleted)return _o(ActionCompletedBehavior);const n=bn(e.world.paymentEntity.entity.actions);if(!n)return _o(ActionEmptyListPushNotificationBehavior,"");const t=e.world.paymentEntity.entity.actions.indexOf(n),r=!!$n(e.sdk,e.world.paymentEntity.entity.actions);let i;switch(e.simulatePaymentRequested&&Tn(n)&&(i=_o(SimulatePaymentBehavior)),n.type){case"REDIRECT_CUSTOMER":switch(n.descriptor){case"WEB_URL":return function(e){return"REDIRECT_CUSTOMER"===e.type&&!1!==e.iframe_capable}(n)?_o(ActionIframeBehavior,n.value):r?_o(ActionDeepLinkBehavior,String(t)):_o(ActionRedirectBehavior,n.value);case"DEEPLINK_URL":return _o(ActionDeepLinkBehavior,String(t));case"WEB_GOOGLE_PAYLINK":throw new Error("Paylink actions should not be the primary action")}break;case"PRESENT_TO_CUSTOMER":switch(n.descriptor){case"QR_STRING":return _o(ActionQrBehavior,String(t),i);case"PAYMENT_CODE":throw new Error(`Unsupported action type ${n.type} ${n.descriptor}`);case"VIRTUAL_ACCOUNT_NUMBER":return _o(ActionVaBehavior,String(t),i)}break;case"API_POST_REQUEST":switch(n.descriptor){case"CAPTURE_PAYMENT":case"VALIDATE_OTP":case"RESEND_OTP":throw new Error(`Unsupported action type ${n.type} ${n.descriptor}`)}}throw new Error(`Unknown action type: ${n.type} ${n.descriptor}`)}const ws=e=>{const{onReady:n,options:t}=e,r=dn(),i=r.t,a=rn(),o=(()=>{const e=Oe(ze);if(null===e)throw new Error("useBusiness must be used within a XenditSessionProvider");return e})(),d=on(),s=d?.google_pay;un(s);const l=Ie(!1),c=Ie(null),u=Ie(null),h=Re(()=>s.allowed_payment_methods.map(e=>e.payment_method_specification),[s.allowed_payment_methods]),p=Re(()=>({apiVersion:2,apiVersionMinor:0,allowedPaymentMethods:h,emailRequired:!0,merchantInfo:{merchantId:s.merchant_id,merchantName:o.name??""},transactionInfo:{transactionId:a.payment_session_id,totalPriceStatus:"FINAL",totalPrice:String(a.amount),currencyCode:a.currency}}),[o.name,s.merchant_id,h,a.amount,a.currency,a.payment_session_id]),_=Re(()=>({buttonColor:"default",buttonType:"plain",buttonRadius:999,buttonSizeMode:"fill",buttonBorderType:"no_border",...t}),[t]);Te(()=>{const e=window.google?.payments?.api?.PaymentsClient;e?u.current=new e({environment:r.isMock()?"TEST":"PRODUCTION"}):console.error("XenditComponents: Google Pay button was requested but the Google Pay SDK is not loaded.")},[r]);const m=Me(()=>{un(u.current),u.current.loadPaymentData(p).then(function(e){const n=function(e){un(s);const n=r.getActiveChannels();for(const t of s.allowed_payment_methods)if(t.payment_method_specification.type===e.paymentMethodData.type)return Cs(n,t.channel_code);throw new Error(`No matching channel found for selected Google Pay payment method ${e.paymentMethodData.type}`)}(e);un(n);let t={};"CARDS"===n.channelCode&&(t={google_pay:JSON.stringify(e)}),r.submitDigitalWallet("GOOGLE_PAY",n,t)}).catch(function(e){const n=e.statusCode??"UNKNOWN_ERROR";if("CANCELED"===n)return;function t(e,n){return`google_pay_errors.${e.toLowerCase()}.${n}`}const a={code:`GOOGLE_PAY_${n}`,text:[i(t(n,"title"),i("google_pay_errors.unknown_error.title")),i(t(n,"message"),i("google_pay_errors.unknown_error.message",{statusCode:n}))]},o=s.allowed_payment_methods[0];un(o);const d=Cs(r.getActiveChannels(),o.channel_code);r.submitDigitalWallet("GOOGLE_PAY",d,{},a)})},[s,p,r,i]);return Te(()=>{u.current&&(l.current||u.current.isReadyToPay({apiVersion:2,apiVersionMinor:0,allowedPaymentMethods:h}).then(function(e){e.result&&(l.current||(l.current=!0,n()))}).catch(function(e){console.error("XenditComponents: Error when checking if Google Pay is ready",e)}))},[h,n]),Te(()=>{if(!u.current)return;const e=u.current.createButton({..._,buttonLocale:a.locale,allowedPaymentMethods:h,onClick:m});c.current&&c.current.replaceChildren(e)},[_,h,m,a.locale]),le("div",{ref:c})};function Cs(e,n){const t=e.find(e=>Array.isArray(e.channelCode)?e.channelCode.includes(n):e.channelCode===n);if(!t)throw new Error(`Channel not found for code: ${n}`);return t}const Es=e=>{const{scriptTagRegex:n,checkLoaded:t,children:r}=e,[,i]=Se({}),a=t();return Te(()=>{if(a)return;const e=Array.from(document.scripts).find(e=>n.test(e.src));if(e){const n=()=>{i({})};return e.addEventListener("load",n),()=>{e.removeEventListener("load",n)}}},[i,a,n]),Te(()=>{if(!a){const e=setTimeout(()=>{i({})},1e3);return()=>clearTimeout(e)}}),a?r:null},ks=e=>{const{digitalWalletCode:n,digitalWalletOptions:t}=e,r=Ie(null),i=Me(()=>{r.current?.parentElement?.style.setProperty("display","block")},[]);let a=null;if("GOOGLE_PAY"===n)a=le(Es,{scriptTagRegex:Ps.GOOGLE_PAY.scriptTagRegex,checkLoaded:Ps.GOOGLE_PAY.checkLoaded,children:le(ws,{onReady:i,options:t})});return le("div",{ref:r,children:a})},Ps={GOOGLE_PAY:{scriptTagRegex:/https:\/\/pay.google.com\/.*\/js\/pay.js/,checkLoaded:()=>"undefined"!=typeof google&&void 0!==google.payments}};class XenditComponents extends EventTarget{t=e=>{throw new Error("Localization used before initialization; this is a bug.")};[_e];constructor(e){if(super(),"undefined"==typeof window||"undefined"==typeof document)throw new Error("XenditComponents can only be instantiated in a browser");const n=function(e){if(!e)throw new Error("The componentsSdkKey option is missing; check the constructor parameters.");const n=e.split("-");if(n.length<4||n[2]!==gn&&null===xn(n[2]))throw new Error("The componentsSdkKey option has the wrong format. Ensure you pass the value returned from the `components_sdk_key` property of the `POST /sessions` response.");return{sessionAuthKey:[n[0],n[1]].join("-"),hostId:n[2],publicKey:n[3],signature:n[4]}}(e.componentsSdkKey);this[_e]={sdkKey:n,options:e,worldState:null,liveComponents:{channelPicker:null,paymentChannels:new Map,actionContainer:null,digitalWalletContainer:new Map},behaviorTree:new BehaviorTree(vs,{sdk:this,sdkKey:n,mock:this.isMock(),sdkStatus:"LOADING",sdkFatalErrorMessage:null,channel:null,channelProperties:null,channelData:null,channelIsDigitalWallet:!1,instantSubmissionError:null,dispatchEvent:this.dispatchEvent.bind(this),world:null,submissionRequested:!1,simulatePaymentRequested:!1,actionCompleted:!1,pollImmediatelyRequested:!1}),currentChannelCode:null,currentDigitalWalletSubmission:null,eventListenersPresent:new Map},qn(this),this.addEventListener("fatal-error",e=>{const n=e;this[_e].eventListenersPresent.get("fatal-error")||console.error(`XenditComponents: A "fatal-error" event occurred but no event listener was attached: ${n.message}`)}),this[_e].eventListenersPresent.set("fatal-error",!1),this.behaviorTreeUpdate(),this.addEventListener(InternalUpdateWorldState.type,this.onUpdateWorldState.bind(this)),this.addEventListener(InternalUpdateChannelComponentData.type,this.onUpdateChannelComponentData.bind(this)),this.addEventListener(InternalBehaviorTreeUpdateEvent.type,this.behaviorTreeUpdate.bind(this));let t=!1;this.addEventListener(InternalNeedsRerenderEvent.type,()=>{t||(t=!0,queueMicrotask(()=>{t=!1,this.rerenderAllComponents(),this.syncInertAttribute()}))}),this.initializeAsync()}async initializeAsync(){let e;try{e=await oo(this[_e].sdkKey,this[_e].sdkKey.sessionAuthKey),e.channels=e.channels.filter(e=>Gn[e.channel_code])}catch(e){return this[_e].behaviorTree.bb.sdkStatus="FATAL_ERROR",this[_e].behaviorTree.bb.sdkFatalErrorMessage=In(e),void this.behaviorTreeUpdate()}this.dispatchEvent(new InternalUpdateWorldState({business:e.business,customer:e.customer,session:e.session,channels:e.channels,channelUiGroups:e.channel_ui_groups,digitalWallets:e.digital_wallets??null,paymentEntity:null,sessionTokenRequestId:null,succeededChannel:null}))}assertInitialized(){if(!this[_e].worldState)throw new Error("The session data is not loaded. Listen for the `init` event. Only `createChannelPickerComponent` can be called before initialization.")}isMock(){return!1}isProdLive(){return"pl"===this[_e].sdkKey.hostId}findChannel(e){this.assertInitialized();return this[_e].worldState.channels.find(n=>n.channel_code===e)??null}onUpdateWorldState(e){const n=e.data;this[_e].worldState=wn(this[_e].worldState??{},n);const t=this[_e].worldState.session.locale;this.t=function(e){const n=Fi[e];return function(...t){let r,i,a={};switch(t.length){case 1:r=t[0];break;case 2:"string"==typeof t[1]?(r=t[0],i=t[1]):(r=t[0],a=t[1]);break;case 3:r=t[0],i=t[1],a=t[2];break;default:throw new Error("Invalid arguments for t function")}let o=n?.[r];return void 0===o&&void 0!==i&&(o=i),o?o.replace(/\{\{(\w+)\}\}/g,(e,n)=>a[n]?String(a[n]):""):(console.warn(`Missing localization for key: ${r} in locale: ${e}`),r)}}(t),this.behaviorTreeUpdate(),this.rerenderAllComponents()}onUpdateChannelComponentData(e){const n=e.channelCode,t=e.data,r=this[_e].liveComponents.paymentChannels.get(n);r&&(r.data=wn(r.data,t),this.behaviorTreeUpdate(),this.rerenderAllComponents())}behaviorTreeUpdate(){const e=this[_e].behaviorTree.bb;if("LOADING"===e.sdkStatus&&this[_e].worldState&&(e.sdkStatus="ACTIVE"),e.world=this[_e].worldState,this[_e].currentDigitalWalletSubmission)e.channel=this.findChannel(this[_e].currentDigitalWalletSubmission.channelCode),e.channelProperties=this[_e].currentDigitalWalletSubmission.channelProperties,e.channelData=null,e.channelIsDigitalWallet=!0,e.instantSubmissionError=this[_e].currentDigitalWalletSubmission.instantSubmissionError;else{const n=this[_e].currentChannelCode?this[_e].liveComponents.paymentChannels.get(this[_e].currentChannelCode):null;e.channel=n?Bn(n.channel[_e],n.data.savePaymentMethod):null,e.channelProperties=n?n.channelProperties:null,e.channelData=n?n.data:null,e.channelIsDigitalWallet=!1}try{this[_e].behaviorTree.update()}catch(e){this[_e].behaviorTree.bb.sdkStatus="FATAL_ERROR",this[_e].behaviorTree.bb.sdkFatalErrorMessage=In(e),this[_e].behaviorTree.update()}}getSdkStatus(){return this[_e].behaviorTree.bb.sdkStatus}rerenderAllComponents(){this.renderChannelPicker();for(const e of this[_e].liveComponents.paymentChannels.keys())this.renderPaymentChannel(e);for(const e of this[_e].liveComponents.digitalWalletContainer.keys())this.renderDigitalWalletComponent(e)}getSession(){return this.assertInitialized(),Jn(this[_e].worldState.session)}getCustomer(){return this.assertInitialized(),this[_e].worldState.customer?(_n((e=this[_e].worldState.customer).type,"INDIVIDUAL"),un(e.individual_detail),{id:e.id,type:e.type,email:e.email??void 0,mobileNumber:e.mobile_number??void 0,individualDetail:{givenNames:e.individual_detail.given_names??void 0,surname:e.individual_detail.surname??void 0}}):null;var e}getActiveChannelGroups(e){return this.assertInitialized(),function(e,n,t){const r=tt(n),i=it(e,t);return n.filter(e=>i[e.id]?.length).map(e=>Qn(e,i,r,t))}(this[_e].worldState.channels,this[_e].worldState.channelUiGroups,{options:{filter:e?.filter,filterMinMax:e?.filterMinMax??!0},session:this[_e].worldState.session,pairChannels:at(this[_e].worldState.channels)})}getActiveChannels(e){return this.assertInitialized(),function(e,n,t){const r=tt(n),i=it(e,t);return e.filter(e=>rt(e,t)).map(e=>nt(e,i,r,t))}(this[_e].worldState.channels,this[_e].worldState.channelUiGroups,{options:{filter:e?.filter,filterMinMax:e?.filterMinMax??!0},session:this[_e].worldState.session,pairChannels:at(this[_e].worldState.channels)})}createChannelPickerComponent(){this[_e].liveComponents.channelPicker&&this.destroyComponent(this[_e].liveComponents.channelPicker);const e=document.createElement("xendit-channel-picker");return e.setAttribute("translate","no"),this[_e].liveComponents.channelPicker=e,this[_e].worldState&&this.renderChannelPicker(),this.setupUiEventsForChannelPicker(e),e}renderChannelPicker(){this.assertInitialized();const e=this[_e].liveComponents.channelPicker;e&&V(g(ln,{data:this[_e].worldState,sdk:this,children:g(lt,{})}),e)}setupUiEventsForChannelPicker(e){e.addEventListener(XenditClearCurrentChannelEvent.type,e=>{this.assertInitialized();const n=e,t=this[_e].currentChannelCode;if(!t)return;const r=this[_e].worldState.channels.find(e=>e.channel_code===t);r&&r.ui_group===n.uiGroup&&this.setCurrentChannel(null)})}createChannelComponent(e,n=!0){if(this.assertInitialized(),!Fn(this[_e].worldState.session,e[_e][0]))throw new Error("Cannot create channel component: `session.amount` is outside of the channel's min/max amount.");const t=e[_e][0].channel_code;n&&(this[_e].currentChannelCode=t);const r=this[_e].liveComponents.paymentChannels.get(t);let i,a={current:null};return r?(i=r.element,a=r.channelFormRef):(i=document.createElement("xendit-payment-channel"),i.setAttribute("data-channel-code",t),i.setAttribute("inert",""),i.setAttribute("translate","no"),i.style.setProperty("--xendit-channel-brand-color",e[_e][0].brand_color),this.setupUiEventsForPaymentChannel(i),this[_e].liveComponents.paymentChannels.set(t,{element:i,channel:e,channelProperties:null,channelFormRef:a,data:{savePaymentMethod:!1,cardDetails:null,paymentOptions:null}})),this.renderPaymentChannel(t),n&&(this.behaviorTreeUpdate(),this.syncInertAttribute()),this.dispatchEvent(new InternalNeedsRerenderEvent),i}renderPaymentChannel(e){this.assertInitialized();const n=this[_e].liveComponents.paymentChannels.get(e);if(!n)return;const t=n.channel;V(g(ln,{data:this[_e].worldState,sdk:this,children:g(to,{channelOrPair:t[_e],channelData:n.data,savePaymentMethod:n.data.savePaymentMethod,formRef:n.channelFormRef})}),n.element)}getActiveDigitalWallets(){return this.assertInitialized(),this[_e].worldState.digitalWallets?function(e,n,t,r){const i=[],a=tt(t);if(e.google_pay){const t=e.google_pay.allowed_payment_methods.map(e=>{const t=n.find(n=>n.channel_code===e.channel_code);return un(t),t}),o=it(t,r);i.push({digitalWalletCode:"GOOGLE_PAY",get channels(){return t.map(e=>nt(e,o,a,r))},[_e]:!0})}return i}(this[_e].worldState.digitalWallets,this[_e].worldState.channels,this[_e].worldState.channelUiGroups,{options:{filterMinMax:!1},pairChannels:at(this[_e].worldState.channels),session:this[_e].worldState.session}):[]}createDigitalWalletComponent(e,n){this.assertInitialized();const t=this[_e].liveComponents.digitalWalletContainer.get(e);t&&this.destroyComponent(t.element);const r=document.createElement("xendit-digital-wallet");return r.setAttribute("translate","no"),r.style.setProperty("display","none"),this[_e].liveComponents.digitalWalletContainer.set(e,{element:r,options:n}),this.renderDigitalWalletComponent(e),r}renderDigitalWalletComponent(e){this.assertInitialized();const n=this[_e].liveComponents.digitalWalletContainer.get(e);n&&V(g(ln,{data:this[_e].worldState,sdk:this,children:g(ks,{digitalWalletCode:e,digitalWalletOptions:n.options})}),n.element)}getCurrentChannel(){const e=this[_e].currentChannelCode;return e?this.getActiveChannels().find(n=>{if(n.channelCode===e||Array.isArray(n.channelCode)&&n.channelCode.includes(e))return!0})??null:null}setCurrentChannel(e){const n=this[_e].currentChannelCode,t=e?.[_e][0].channel_code??null;if(n===t)return;this[_e].currentChannelCode=t;let r=null;e&&t&&(r=this[_e].liveComponents.paymentChannels.get(t)??null,r||(this.createChannelComponent(e,!1),r=this[_e].liveComponents.paymentChannels.get(t)??null)),this.behaviorTreeUpdate(),this.syncInertAttribute(),this.renderChannelPicker()}syncInertAttribute(){const e=this[_e].behaviorTree.bb.submissionRequested,n=this[_e].liveComponents.paymentChannels;for(const[t,r]of n){(Array.isArray(r.channel.channelCode)?r.channel.channelCode[0]:r.channel.channelCode)!==this[_e].currentChannelCode||e?r.element.setAttribute("inert",""):r.element.hasAttribute("inert")&&r.element.removeAttribute("inert")}}setupUiEventsForPaymentChannel(e){e.addEventListener(XenditChannelPropertiesChangedEvent.type,e=>{const n=e,t=n.channel,r=this[_e].liveComponents.paymentChannels.get(t);r&&(r.channelProperties=n.channelProperties,this.behaviorTreeUpdate())})}showValidationErrors(){if(!this[_e].behaviorTree.findBehavior(ChannelInvalidBehavior))return;const e=this[_e].currentChannelCode;if(!e)return;const n=this[_e].liveComponents.paymentChannels.get(e);if(!n)throw new Error("Current channel is set but component is missing; this is a bug, please contact support.");const t=n.channelFormRef.current;t?.setAllFieldsTouched()}createActionContainerComponent(e){this.assertInitialized(),this[_e].liveComponents.actionContainer&&this.destroyComponent(this[_e].liveComponents.actionContainer);const n=e===_e,t=n?void 0:e,r=this[_e].behaviorTree.findBehavior(PeRequiresActionBehavior);if(!n&&r&&!r.canCreateActionContainer)throw new Error("Unable to create action container; there is an action in progress. Create an action before or during the `action-begin` event.");const i=document.createElement("xendit-action-container");return i.setAttribute("translate","no"),t?.qrCode&&void 0!==t.qrCode.qrCodeOnly&&i.setAttribute("data-qr-code-only",t.qrCode.qrCodeOnly.toString()),this[_e].liveComponents.actionContainer=i,i}destroyComponent(e){if(!e.tagName.startsWith("XENDIT-"))throw new Error("Unable to destroy component; only elements created by this SDK can be destroyed.");if(this[_e].liveComponents.channelPicker===e)return this[_e].liveComponents.channelPicker=null,V(null,e),void e.remove();for(const[n,t]of this[_e].liveComponents.paymentChannels)if(t.element===e)return this[_e].liveComponents.paymentChannels.delete(n),this[_e].currentChannelCode===n&&this.setCurrentChannel(null),V(null,e),void e.remove();if(this[_e].liveComponents.actionContainer===e)return this[_e].liveComponents.actionContainer=null,V(null,e),void e.remove();for(const[n,t]of this[_e].liveComponents.digitalWalletContainer)if(t.element===e)return this[_e].liveComponents.digitalWalletContainer.delete(n),V(null,e),void e.remove();throw new Error("Unable to destroy component; component not found. It may have already been destroyed.")}submit(){this.assertInitialized();if(!this[_e].behaviorTree.findBehavior(SessionActiveBehavior))throw new Error("Unable to submit; the session is not in the active state. Listen to the `session-complete` and `session-expired-or-canceled` events and display success or failure states accordingly.");const e=this[_e].currentChannelCode;if(!e)throw new Error("Unable to submit; there is no current payment channel. Create a payment component with `createChannelComponent` or make an existing one active with `setCurrentChannel`.");if(!this[_e].liveComponents.paymentChannels.get(e))throw new Error("Current channel is set but component is missing; this is a bug, please contact support.");this.showValidationErrors();if(this[_e].behaviorTree.findBehavior(ChannelInvalidBehavior))throw new Error("Unable to submit; the form for the current channel has errors. Listen to the `submission-ready` and `submission-not-ready` events, do not allow submission while in the not-ready state.");if(!this[_e].behaviorTree.findBehavior(ChannelValidBehavior))throw new Error("Unable to submit; the SDK is not in a valid state for submission. Listen to the `submission-ready` and `submission-not-ready` events, do not allow submission while in the not-ready state.");this[_e].behaviorTree.bb.submissionRequested=!0,this.behaviorTreeUpdate(),this.syncInertAttribute()}submitDigitalWallet(e,n,t,r=null){this.assertInitialized(),this.setCurrentChannel(null),this[_e].currentDigitalWalletSubmission={digitalWalletCode:e,channelCode:n[_e][0].channel_code,channelProperties:t,instantSubmissionError:r},this.addEventListener(XenditSubmissionEndEvent.type,()=>{this[_e].currentDigitalWalletSubmission=null},{once:!0}),this[_e].behaviorTree.bb.submissionRequested=!0,this.behaviorTreeUpdate(),this.syncInertAttribute()}abortSubmission(){this.assertInitialized();this[_e].behaviorTree.findBehavior(SubmissionBehavior)&&(this[_e].behaviorTree.bb.submissionRequested=!1,this.behaviorTreeUpdate())}simulatePayment(){if(this.assertInitialized(),"PAY"!==this[_e].worldState.session.session_type)throw new Error('Unable to simulate payment, the session type is not "PAY".');if(!this[_e].behaviorTree.findBehavior(PeRequiresActionBehavior))throw new Error("Unable to simulate payment; there is no action in progress. You can simulate payments any time between the `action-begin` and `action-end` events.");const e=this[_e].worldState.paymentEntity;if(!e)throw new Error("The PeRequiresActionBehavior is present but there is no payment entity. This is a bug, please contact support.");if(!this.findChannel(e.entity.channel_code))throw new Error("Channel not found; this is a bug, please contact support.");const n=bn(e.entity.actions);if(!n||!Tn(n))throw new Error("Unable to simulate payment; the action does not support simulation.");this[_e].behaviorTree.bb.simulatePaymentRequested=!0,this.behaviorTreeUpdate()}pollImmediately(){if(this.assertInitialized(),"ACTIVE"!==this[_e].worldState.session.status)throw new Error("Unable to poll immediately; the session is not longer active.");this[_e].behaviorTree.bb.pollImmediatelyRequested=!0,this.behaviorTreeUpdate()}getState(){const e=this[_e].currentChannelCode,n=this[_e].liveComponents.paymentChannels.get(e??"");return{channelCode:e,channelProperties:n?.channelProperties||null,behaviorTree:this[_e].behaviorTree}}addEventListener(e,n,t){return this[_e].eventListenersPresent.set(e,!0),super.addEventListener(e,n,t)}removeEventListener(e,n,t){return super.removeEventListener(e,n,t)}static amountFormat(e,n){return Di(e,n)}}class XenditComponentsTest extends XenditComponents{nextMockUpdate=null;constructor(e){super({...e,componentsSdkKey:`session-${An(32)}-mock-MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEyCADI5pdf6KmN8+Fxl2ES3yolUKXunNeY3gGScGNEvDcrcHAPKxIInAo5DVnDvTtYtqZvx/bu7HLeBJNMXwHhie/uyNEtT8dSaLc9bd0WSlYdxI+iUsTv2Qu0LiiPrZs-NKf7whM9meUs/eRCvG0oc180MDiyeli3kH6EQ3ZahECHsZQi5G2IpH6vk3cYMtf01Y1L4OBn1SZCOv1kwpjIUet4DJeoTwwq2nM5b+K7rD+/WFTi3AEX4NWJNkKi0a91`}),this.addEventListener(InternalScheduleMockUpdateEvent.type,this.setNextMockUpdate.bind(this))}async initializeAsync(){await mn(cn);const e=(await Promise.resolve().then(function(){return As})).makeTestBffData();this.dispatchEvent(new InternalUpdateWorldState({business:e.business,customer:e.customer,session:e.session,channels:e.channels,channelUiGroups:e.channel_ui_groups,digitalWallets:e.digital_wallets??null,paymentEntity:null,sessionTokenRequestId:null,succeededChannel:null}))}isMock(){return!0}setNextMockUpdate(e){const n=e;this.nextMockUpdate=n.mockData}}"undefined"==typeof window||"undefined"==typeof document||(pe||(pe=!0,t.debounceRendering=e=>queueMicrotask(e)),function(){const e=document.createElement("style");e.textContent='/* variables */\n:root {\n --xendit-font-family: sans-serif;\n --xendit-color-primary: #1762ee;\n --xendit-color-text: #252525;\n --xendit-color-text-secondary: #585858;\n --xendit-color-text-placeholder: #7d7d7d;\n --xendit-color-disabled: #f7f7f7;\n --xendit-color-danger: #d1414d;\n --xendit-color-border: #f3f3f3;\n --xendit-color-background: #ffffff;\n --xendit-focus-shadow: 0px 0px 0px 2px\n color-mix(in srgb, var(--xendit-color-primary) 15%, transparent);\n --xendit-animation-duration: 0.3s;\n --xendit-animation-ease: ease-in-out;\n --xendit-radius-1: 8px;\n --xendit-z-index-focus: 2;\n\n /* Browser-specific border collapse margins */\n --xendit-border-collapse-offset: -0.5px; /* Default for Chrome/Edge */\n --xendit-border-collapse-webkit-gecko: -1.5px; /* Fix Safari and Firefox subpixel rendering */\n\n /* QR code colors */\n --xendit-qr-foreground-color: #000000;\n --xendit-qr-background-color: #ffffff;\n\n /* icon colors */\n --xendit-color-icon-primary: #7c7c7c;\n --xendit-color-icon-secondary: #f1f1f1;\n}\n\n/* Set default font for root components */\nxendit-channel-picker,\nxendit-action-container,\nxendit-payment-channel {\n display: block;\n unicode-bidi: isolate;\n font-family: var(--xendit-font-family);\n color: var(--xendit-color-text);\n}\n\n.xendit-default-action-container {\n font-family: var(--xendit-font-family);\n}\n\nxendit-action-container {\n background-color: var(--xendit-color-background);\n flex: 1; /* Action container usually wants to stretch to fit, assuming the parent is a flexbox. */\n}\n\nxendit-payment-channel button,\nxendit-payment-channel textarea,\nxendit-payment-channel select,\nxendit-payment-channel input,\nxendit-payment-channel input::placeholder {\n font-family: inherit;\n}\n\nxendit-payment-channel input::placeholder,\nxendit-payment-channel textarea::placeholder,\nxendit-payment-channel select::placeholder {\n color: var(--xendit-color-text-placeholder);\n}\n\n/* Reusable typography classes */\n.xendit-text-12 {\n font-size: 12px;\n line-height: 16px;\n letter-spacing: -0.01px;\n}\n\n.xendit-text-14 {\n font-size: 14px;\n line-height: 16px;\n letter-spacing: -0.09px;\n}\n\n.xendit-text-16 {\n font-size: 16px;\n line-height: 16px;\n letter-spacing: -0.09px;\n}\n\n.xendit-text-18 {\n font-size: 18px;\n line-height: 24px;\n letter-spacing: -0.26px;\n}\n\n.xendit-text-20 {\n font-size: 20px;\n line-height: 28px;\n letter-spacing: -0.33px;\n}\n\n.xendit-text-12,\n.xendit-text-14,\n.xendit-text-16 {\n font-weight: 400;\n}\n\n.xendit-text-semibold {\n font-weight: 600;\n}\n\n.xendit-text-bold {\n font-weight: 700;\n}\n\n.xendit-text-link {\n color: var(--xendit-color-primary);\n}\n.xendit-text-secondary {\n color: var(--xendit-color-text-secondary);\n}\n\n.xendit-text-center {\n text-align: center;\n}\n\n/* Accordion component */\n\n.xendit-accordion {\n display: flex;\n flex-direction: column;\n border: 1px solid var(--xendit-color-border);\n border-radius: var(--xendit-radius-1);\n background: var(--xendit-color-background);\n}\n\n.xendit-accordion-item:not(:first-child) {\n border-top: 1px solid var(--xendit-color-border);\n border-top-left-radius: var(--xendit-radius-1);\n border-top-right-radius: var(--xendit-radius-1);\n}\n\n.xendit-accordion-item-header {\n display: grid;\n grid-template-columns: auto 1fr auto;\n grid-gap: 16px;\n align-items: center;\n cursor: pointer;\n padding: 24px 16px;\n color: var(--xendit-color-text);\n border-radius: 8px;\n}\n\n.xendit-accordion-item-disabled .xendit-accordion-item-header {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.xendit-accordion-item-header-title {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.xendit-accordion-item-disabled .xendit-accordion-item-header-title,\n.xendit-accordion-item-disabled .xendit-accordion-item-header-icon {\n opacity: 0.5;\n}\n\n.xendit-accordion-item.xendit-accordion-item-open\n .xendit-accordion-item-header {\n color: var(--xendit-color-primary);\n}\n\n.xendit-accordion-item-chevron {\n color: var(--xendit-color-text);\n}\n\n.xendit-accordion-item-disabled .xendit-accordion-item-chevron {\n display: none;\n}\n\n.xendit-accordion-item-chevron g {\n transition: transform var(--xendit-animation-duration)\n var(--xendit-animation-ease);\n}\n\n.xendit-accordion-item-header:focus-visible {\n border-radius: 8px;\n box-shadow: 0px 0px 0px 2px\n color-mix(in srgb, var(--xendit-color-primary) 15%, transparent);\n outline: none;\n}\n\n.xendit-accordion-item-content {\n overflow: hidden;\n transition: height var(--xendit-animation-duration)\n var(--xendit-animation-ease);\n}\n\n.xendit-accordion-item.xendit-accordion-item-closed\n .xendit-accordion-item-content {\n height: 0;\n}\n\n.xendit-accordion-item.xendit-accordion-item-open\n .xendit-accordion-item-content {\n height: calc-size(auto, size);\n}\n\n.xendit-accordion-item-padding {\n padding: 16px;\n}\n\n/* Channel picker digital wallet section */\n\n.xendit-channel-picker-digital-wallet-section {\n display: grid;\n grid-auto-flow: column;\n grid-auto-columns: 1fr;\n gap: 8px;\n margin-bottom: 8px;\n}\n\n/* Channel picker group */\n\n.xendit-channel-picker-group {\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n\n.xendit-channel-picker-group select {\n border: 1px solid var(--xendit-color-border);\n border-radius: 8px;\n padding: 12px;\n appearance: none;\n outline: none;\n}\n\n.xendit-channel-picker-group select:focus {\n box-shadow: 0px 0px 0px 2px\n color-mix(in srgb, var(--xendit-color-primary) 15%, transparent);\n}\n\n.xendit-channel-logo {\n width: 24px;\n height: 16px;\n margin: -5px 0;\n padding: 4px;\n border: 1px solid var(--xendit-color-border);\n border-radius: 4px;\n background-color: white; /* always white, not --xendit-color-background */\n object-fit: contain;\n}\n\n/* Payment channel */\n\nxendit-payment-channel[inert] {\n filter: opacity(0.5) grayscale(1);\n}\n\n.xendit-payment-channel {\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n\n.xendit-payment-channel-banner {\n width: 100%;\n height: auto;\n object-fit: contain;\n}\n\n.xendit-payment-channel-instructions {\n display: grid;\n grid-template-columns: auto 1fr;\n grid-gap: 12px;\n color: var(--xendit-color-text-secondary);\n}\n\n.xendit-payment-channel-instructions-logo {\n height: 40px;\n width: auto;\n object-fit: contain;\n}\n\n.xendit-payment-channel-instructions-text {\n display: flex;\n flex-direction: column;\n justify-content: center;\n gap: 4px;\n}\n\n.xendit-payment-channel-instructions-text p {\n margin: 0;\n}\n\n/* Forms */\n\n.xendit-channel-form {\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n\n.xendit-channel-form > form {\n display: contents;\n}\n\n.xendit-form-field-group {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n}\n\n.xendit-channel-form-field {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.xendit-channel-form-field-group {\n display: grid;\n gap: 8px;\n}\n\n.xendit-channel-form-field-group-label-container {\n display: flex;\n justify-content: space-between;\n gap: 16px;\n}\n\n.xendit-channel-form-field-group label {\n width: fit-content;\n cursor: pointer;\n}\n\n.xendit-form-field-group.invalid .xendit-channel-form-field input,\n.xendit-form-field-group.invalid\n .xendit-channel-form-field\n .xendit-iframe-container,\n.xendit-form-field-group.invalid .xendit-dropdown button {\n border: 1px solid var(--xendit-color-danger);\n}\n\n.xendit-channel-form-field input:not([type="checkbox"]),\n.xendit-channel-form-field select,\n.xendit-channel-form-field .xendit-iframe-container {\n display: flex;\n border: 1px solid var(--xendit-color-border);\n background: var(--xendit-color-background);\n border-radius: 8px;\n padding: 12px;\n appearance: none;\n}\n\n/* TODO: Refine these class usages */\n.xendit-channel-form-field.field-radius-tl-0 input,\n.xendit-channel-form-field.field-radius-tl-0 button,\n.xendit-channel-form-field.field-radius-tl-0 .xendit-iframe-container {\n border-top-left-radius: 0;\n}\n\n.xendit-channel-form-field.field-radius-tr-0 input,\n.xendit-channel-form-field.field-radius-tr-0 button,\n.xendit-channel-form-field.field-radius-tr-0 .xendit-iframe-container {\n border-top-right-radius: 0;\n}\n\n.xendit-channel-form-field.field-radius-bl-0 input,\n.xendit-channel-form-field.field-radius-bl-0 button,\n.xendit-channel-form-field.field-radius-bl-0 .xendit-iframe-container {\n border-bottom-left-radius: 0;\n}\n\n.xendit-channel-form-field.field-radius-br-0 input,\n.xendit-channel-form-field.field-radius-br-0 button,\n.xendit-channel-form-field.field-radius-br-0 .xendit-iframe-container {\n border-bottom-right-radius: 0;\n}\n\n.xendit-channel-form-field.field-collapse-l,\n.xendit-channel-form-field.field-collapse-l {\n margin-left: var(--xendit-border-collapse-offset);\n}\n\n.xendit-channel-form-field.field-collapse-r,\n.xendit-channel-form-field.field-collapse-r {\n margin-right: var(--xendit-border-collapse-offset);\n}\n\n.xendit-channel-form-field.field-collapse-l .xendit-iframe-container {\n margin-left: calc(var(--xendit-border-collapse-offset) * 2);\n width: calc(100% + abs(var(--xendit-border-collapse-offset) * 2));\n}\n\n.xendit-channel-form-field.field-collapse-r .xendit-iframe-container {\n margin-right: 0;\n}\n\n.xendit-channel-form-field.field-collapse-t input,\n.xendit-channel-form-field.field-collapse-t button,\n.xendit-channel-form-field.field-collapse-t .xendit-iframe-container {\n margin-top: var(--xendit-border-collapse-offset);\n}\n\n.xendit-channel-form-field.field-collapse-b input,\n.xendit-channel-form-field.field-collapse-b button,\n.xendit-channel-form-field.field-collapse-b .xendit-iframe-container {\n margin-bottom: var(--xendit-border-collapse-offset);\n}\n\n/* Safari and Firefox specific adjustments */\n@supports (font: -apple-system-body) or (-moz-appearance: none) {\n .xendit-channel-form-field.field-collapse-l .xendit-iframe-container {\n margin-left: 0;\n width: 100%;\n }\n\n .xendit-channel-form-field.field-collapse-b input,\n .xendit-channel-form-field.field-collapse-b button {\n margin-bottom: var(--xendit-border-collapse-webkit-gecko);\n height: calc(100% + abs(var(--xendit-border-collapse-webkit-gecko) * 2));\n }\n}\n\n.xendit-channel-form-field.field-collapse-r .xendit-iframe-container:focus {\n border-right: none;\n}\n\n.xendit-channel-form-field.field-collapse-l .xendit-iframe-container:focus {\n border-left: none;\n}\n/* Ends TODO */\n\n.xendit-card-brand-logo {\n width: 24px;\n height: 16px;\n border: 1px solid var(--xendit-color-border);\n border-radius: 4px;\n padding: 4px;\n background-color: white; /* always white, not --xendit-color-background */\n}\n\n.xendit-card-brands-list {\n display: flex;\n align-items: center;\n padding: 8px 12px;\n gap: 4px;\n}\n\n.xendit-channel-form-field input:focus,\n.xendit-channel-form-field select:focus,\n.xendit-channel-form-field .xendit-iframe-container.xendit-field-focus {\n border-color: var(--xendit-color-primary);\n box-shadow: var(--xendit-focus-shadow);\n outline: none;\n z-index: var(--xendit-z-index-focus);\n}\n\n.xendit-channel-form-field button:focus {\n position: relative;\n z-index: var(--xendit-z-index-focus);\n}\n\n.xendit-channel-form-field .xendit-iframe-container {\n height: 40px;\n width: 100%;\n padding: 0;\n overflow: hidden;\n box-sizing: border-box;\n}\n\n.xendit-channel-form-field .xendit-iframe-container iframe {\n height: 40px;\n width: 100%;\n border: none;\n min-width: 0;\n}\n\n.xendit-channel-form-field.xendit-form-field-span-1 {\n grid-column: span 1;\n}\n\n.xendit-channel-form-field.xendit-form-field-span-2 {\n grid-column: span 2;\n}\n\n.xendit-checkbox {\n display: flex;\n align-items: center;\n}\n\n.xendit-checkbox-box {\n display: flex;\n}\n\n.xendit-checkbox input {\n width: 16px;\n height: 16px;\n margin: 0;\n cursor: pointer;\n}\n\n.xendit-checkbox label {\n cursor: pointer;\n padding-left: 8px;\n}\n\n.xendit-checkbox input {\n opacity: 0;\n position: absolute;\n}\n\n.xendit-checkbox input + .xendit-checkbox-graphic {\n width: 16px;\n height: 16px;\n border: 1px solid var(--xendit-color-border);\n border-radius: 4px;\n box-sizing: border-box;\n color: transparent;\n}\n\n.xendit-checkbox input:checked + .xendit-checkbox-graphic {\n color: var(--xendit-color-background);\n background-color: var(--xendit-color-primary);\n border-color: var(--xendit-color-primary);\n}\n\n/* Dialog */\n\n.xendit-dialog-backdrop {\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n background: rgba(0, 0, 0, 0.5);\n display: flex;\n padding: 48px;\n justify-content: center;\n align-items: center;\n}\n\n.xendit-dialog {\n background-color: var(--xendit-color-background);\n border-radius: 8px;\n position: relative;\n}\n\n.xendit-dialog-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n color: var(--xendit-color-text);\n padding: 16px;\n gap: 16px;\n line-height: 20px;\n border-bottom: 1px solid var(--xendit-color-border);\n}\n\n.xendit-dialog-header button {\n display: flex;\n background: none;\n border: none;\n color: var(--xendit-color-text);\n cursor: pointer;\n padding: 0;\n}\n\n.xendit-dialog-floating-close {\n position: absolute;\n top: 24px;\n right: 24px;\n background: none;\n border: none;\n color: var(--xendit-color-text);\n cursor: pointer;\n padding: 0;\n}\n\n.xendit-dialog-body {\n display: flex;\n padding: 24px;\n}\n\n.xendit-error-message {\n color: var(--xendit-color-danger);\n}\n\n/* Phone input Dropdown */\n.xendit-input-phone {\n display: flex;\n gap: 8px;\n}\n\n.xendit-phone-number-input {\n width: 100%;\n}\n\n.xendit-dropdown .xendit-dropdown-search input {\n padding: 8px;\n border: 1px solid var(--xendit-color-border);\n border-radius: var(--xendit-radius-1);\n box-sizing: border-box;\n}\n\n.xendit-dropdown-search input:focus {\n outline: none;\n border-color: var(--xendit-color-primary);\n box-shadow: var(--xendit-focus-shadow);\n}\n\n/* Phone input Dropdown ends */\n\n/* Dropdown */\n.xendit-dropdown button {\n width: 100%;\n display: grid;\n grid-template-columns: 1fr auto;\n align-items: center;\n gap: 8px;\n text-align: left;\n background-color: var(--xendit-color-background);\n border: 1px solid var(--xendit-color-border);\n border-radius: var(--xendit-radius-1);\n justify-content: space-between;\n padding: 12px;\n cursor: pointer;\n}\n\n.xendit-dropdown button.xendit-dropdown-has-asset {\n grid-template-columns: auto 1fr auto;\n}\n\n.xendit-dropdown button:disabled {\n background: var(--xendit-color-disabled);\n}\n\n.xendit-dropdown button:focus {\n outline: none;\n border: 1px solid var(--xendit-color-primary);\n box-shadow: 0px 0px 0px 2px #1762ee26;\n}\n\n.xendit-dropdown-menu {\n position: absolute;\n z-index: 1;\n display: flex;\n flex-direction: column;\n gap: 4px;\n max-height: 168px;\n width: 257px;\n padding: 4px;\n margin: 4px 0;\n background-color: var(--xendit-color-background);\n border: 1px solid var(--xendit-color-border);\n border-radius: var(--xendit-radius-1);\n list-style: none;\n box-shadow: 0px 4px 8px 0px #25252514;\n overflow-y: auto;\n}\n\n.xendit-dropdown-menu ul {\n list-style: none;\n padding: 4px;\n margin-top: 0;\n}\n\n.xendit-dropdown-search {\n position: sticky;\n top: 0;\n z-index: 1;\n}\n\n.xendit-dropdown-search input {\n width: 100%;\n}\n\n.xendit-dropdown-item {\n display: grid;\n grid-template-columns: 1fr auto;\n align-items: center;\n gap: 8px;\n padding: 8px 12px 8px 4px;\n border-radius: var(--xendit-radius-1);\n cursor: pointer;\n z-index: 0;\n --xendit-dropdown-item-hover-color: var(--xendit-color-background);\n --xendit-dropdown-item-hover-bg-color: var(--xendit-color-primary);\n}\n\n.xendit-dropdown-item-disabled {\n --xendit-dropdown-item-hover-color: var(--xendit-color-text);\n --xendit-dropdown-item-hover-bg-color: var(--xendit-color-disabled);\n}\n\n.xendit-dropdown-item-active {\n box-shadow: var(--xendit-focus-shadow);\n}\n\n.xendit-dropdown-item:hover {\n background-color: var(--xendit-dropdown-item-hover-bg-color);\n}\n\n.xendit-dropdown-item:hover .xendit-dropdown-item-text,\n.xendit-dropdown-item:hover .xendit-dropdown-item-description {\n color: var(--xendit-dropdown-item-hover-color);\n}\n\n.xendit-dropdown-item-selected {\n color: var(--xendit-color-primary);\n}\n\n.xendit-dropdown-item:hover .xendit-dropdown-item-selected {\n color: var(--xendit-dropdown-item-hover-color);\n}\n\n.xendit-dropdown-item.xendit-dropdown-has-asset {\n grid-template-columns: auto 1fr auto;\n}\n\n.xendit-dropdown-item-text {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.xendit-dropdown-item-disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n.xendit-dropdown-item-disabled:hover,\n.xendit-dropdown-item-disabled.xendit-dropdown-item-active {\n background-color: var(--xendit-color-disabled);\n}\n\n/* Dropdown ends */\n\n/* Button */\n.xendit-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n padding: 12px 16px;\n font-family: var(--xendit-font-family);\n font-size: 14px;\n font-weight: 600;\n line-height: 16px;\n letter-spacing: -0.09px;\n cursor: pointer;\n transition: background-color var(--xendit-animation-duration)\n var(--xendit-animation-ease);\n}\n.xendit-button-primary-rounded {\n border: 1px solid transparent;\n background-color: var(--xendit-color-primary);\n color: var(--xendit-color-background);\n border-radius: var(--xendit-radius-1);\n}\n.xendit-button-white-rounded {\n background-color: var(--xendit-color-background);\n color: var(--xendit-color-text);\n border: 1px solid var(--xendit-color-border);\n border-radius: var(--xendit-radius-1);\n}\n.xendit-button-white-rounded:hover {\n background-color: var(--xendit-color-border);\n}\n.xendit-button-block {\n width: 100%;\n}\n.xendit-button-sm {\n padding: 8px 12px;\n font-size: 12px;\n line-height: 16px;\n}\n\n@keyframes xendit-button-loading-spinner-spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n\n.xendit-button-loading-spinner {\n width: 16px;\n height: 16px;\n animation: xendit-button-loading-spinner-spin 1s linear infinite;\n}\n\n.xendit-skeleton-field button {\n height: 42px;\n background-color: var(--xendit-color-disabled);\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--xendit-color-text-secondary);\n}\n\n/* Button ends */\n\n.xendit-dotted-line {\n height: 1px;\n border: none;\n background: repeating-linear-gradient(\n to right,\n var(--xendit-color-border) 0px 4px,\n transparent 4px 8px\n );\n margin: 16px 0;\n}\n\n/* Form Simulation Helper */\n.xendit-form-simulation-root {\n position: relative;\n}\n.xendit-form-simulation-trigger {\n background: transparent;\n border: none;\n cursor: pointer;\n padding: 0;\n}\n.xendit-form-simulation-popover {\n position: absolute;\n top: 100%;\n right: 0;\n\n width: 350px;\n display: flex;\n flex-direction: column;\n gap: 12px;\n border-radius: 4px;\n padding: 12px;\n border: 1px solid var(--xendit-color-border);\n background: color-mix(\n in srgb,\n var(--xendit-color-background),\n transparent 40%\n );\n backdrop-filter: blur(6px);\n box-shadow: 0px 0px 0px 2px\n color-mix(in srgb, var(--xendit-color-primary) 15%, transparent);\n}\n.xendit-form-simulation-popover .xendit-dropdown {\n position: relative;\n}\n.xendit-form-simulation-popover .xendit-dropdown-menu {\n width: auto;\n}\n.xendit-form-simulation-scenario-icon {\n height: 28px;\n width: 40px;\n border-radius: 4px;\n border: 1px solid var(--xendit-color-border);\n object-fit: contain;\n background-color: white;\n}\n\n/* Form Simulation Helper ends */\n\n.xendit-tooltip {\n position: absolute;\n top: 100%;\n right: 50%;\n transform: translateX(50%);\n background-color: black;\n color: white;\n padding: 8px 12px;\n border-radius: var(--xendit-radius-1);\n white-space: nowrap;\n z-index: 1000;\n font-weight: 600;\n font-size: 14px;\n line-height: 16px;\n animation: xendit-tooltip-fade-in var(--xendit-animation-duration)\n var(--xendit-animation-ease);\n opacity: 1;\n}\n\n@keyframes xendit-tooltip-fade-in {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n/* Instructions */\n\n.xendit-instructions-bold {\n font-weight: 600;\n}\n.xendit-instructions-bullet-list {\n display: flex;\n flex-direction: column;\n gap: 12px;\n margin: 8px 0;\n}\n.xendit-instructions-bullet-list::marker {\n color: var(--xendit-color-text-secondary);\n}\n.xendit-instructions-form-card {\n display: flex;\n flex-direction: column;\n padding: 16px;\n border-radius: 12px;\n border: 1px solid var(--xendit-color-border);\n gap: 4px;\n width: 321px;\n}\n.xendit-instructions-form-field {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 8px 0;\n border-bottom: 1px solid var(--xendit-color-border);\n}\n.xendit-instructions-form-field-label {\n font-size: 12px;\n font-weight: 600;\n line-height: 16px;\n color: var(--xendit-color-text-secondary);\n}\n.xendit-instructions-form-field-value {\n font-size: 14px;\n line-height: 20px;\n color: var(--xendit-color-text);\n}\n.xendit-instructions-form-heading {\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n margin: 4px 0;\n}\n.xendit-instructions-italics {\n font-style: italic;\n}\n.xendit-instructions-numbered-list {\n display: flex;\n flex-direction: column;\n gap: 16px;\n list-style-type: decimal;\n padding-left: 40px;\n}\n.xendit-instructions-single-tab-heading {\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n margin-bottom: 16px;\n}\n.xendit-instructions-step-box {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.xendit-instructions-step-li {\n font-size: 14px;\n line-height: 20px;\n}\n.xendit-instructions-step-li p {\n margin: 0;\n}\n.xendit-instructions-step-li::marker {\n margin-left: 20px;\n}\n.xendit-instructions-tab-button {\n font-family: var(--xendit-font-family);\n font-size: 14px;\n padding: 8px 4px;\n background-color: transparent;\n border: none;\n border-top: 3px solid transparent;\n border-bottom: 3px solid transparent;\n}\n.xendit-instructions-active-tab {\n border-bottom-color: var(--xendit-color-primary);\n color: var(--xendit-color-primary);\n font-weight: 600;\n}\n.xendit-instructions-tab-list {\n display: flex;\n gap: 16px;\n margin-bottom: 16px;\n border-bottom: 1px solid var(--xendit-color-border);\n}\n.xendit-instructions-table {\n font-size: 14px;\n line-height: 16px;\n width: 100%;\n border-collapse: collapse;\n}\n.xendit-instructions-table-cell {\n padding: 4px;\n border: 1px solid black;\n}\n.xendit-instructions-table-header {\n font-size: 14px;\n font-weight: 600;\n line-height: 16px;\n padding: 4px;\n border: 1px solid black;\n}\n\n/* Instructions ends */\n\n.xendit-default-action-container {\n display: flex;\n flex-direction: column;\n border: none;\n}\n\n.xendit-action-title {\n font-weight: 600;\n font-size: 20px;\n line-height: 28px;\n text-align: center;\n}\n\n.xendit-action-iframe {\n border: none;\n width: 100%;\n height: 100%;\n}\n\n.xendit-action-present-to-customer {\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n.xendit-action-present-to-customer-affirm {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.xendit-action-qr-content {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 16px;\n max-width: 384px;\n border: 1px solid var(--xendit-color-border);\n border-radius: var(--xendit-radius-1);\n padding: 16px;\n padding-bottom: 24px;\n}\n.xendit-action-qr-channel-logo {\n height: 64px;\n object-fit: contain;\n}\n.xendit-action-qr-qrcode-container {\n width: 100%;\n}\n\n/* va actions */\n.xendit-action-va-content {\n display: flex;\n flex-direction: column;\n border: 1px solid var(--xendit-color-border);\n border-radius: var(--xendit-radius-1);\n padding: 16px;\n padding-bottom: 24px;\n}\n.xendit-action-va-details {\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n.xendit-action-va-detail-item {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n.xendit-action-va-detail-content {\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n.xendit-action-va-heading {\n color: var(--xendit-color-text-placeholder);\n}\n.xendit-action-va-tag {\n color: var(--xendit-color-text-placeholder);\n background-color: #fafafa;\n padding: 2px 4px;\n border-radius: 4px;\n}\n\n/* redirect, deeplink, and push notification actions */\n.xendit-redirect-instructions {\n display: flex;\n flex-direction: column;\n align-items: center;\n text-align: center;\n gap: 24px;\n}\n\n.xendit-redirect-instructions-logo {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 112px;\n height: 112px;\n border: 2px solid var(--xendit-color-border);\n border-radius: 50%;\n overflow: hidden;\n}\n\n.xendit-redirect-instructions-logo img {\n width: 96px;\n height: 96px;\n object-fit: contain;\n}\n\n.xendit-redirect-instructions-text {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.xendit-redirect-instructions-button {\n display: inline-block;\n border-radius: 99px;\n color: white;\n padding: 12px 16px;\n background-color: var(--xendit-channel-brand-color, #000);\n text-decoration: none;\n white-space: nowrap;\n}\n\n.xendit-redirect-instructions-button:hover,\n.xendit-redirect-instructions-button:active {\n filter: brightness(1.1);\n}\n\n/* googlepay */\n\n.gpay-card-info-container-fill {\n display: flex;\n}\n';const n=document.querySelector("style, link");n?n.insertAdjacentElement("beforebegin",e):document.head.appendChild(e)}(),function(){const e=document.createElement("svg");e.id="xendit-icon-set",e.style.display="none",V(le("defs",{children:he.map(e=>e.node)}),e),document.head.appendChild(e)}());var As=Object.freeze({__proto__:null,makeTestBffData:function(){const e=(new Date).toISOString(),n=new Date(Date.now()+2592e6).toISOString();return{session:{payment_session_id:`ps-${An(24)}`,created:e,updated:e,status:"ACTIVE",reference_id:Nn(),description:"Test session",currency:"IDR",amount:1e4,country:"ID",expires_at:n,session_type:"PAY",mode:"COMPONENTS",locale:"en",business_id:An(24),customer_id:`cust-${Nn()}`,capture_method:"AUTOMATIC",allow_save_payment_method:"OPTIONAL",items:[{reference_id:Nn(),type:"DIGITAL_PRODUCT",name:"Item 1",net_unit_amount:5e4,quantity:1,category:""},{reference_id:Nn(),type:"DIGITAL_SERVICE",name:"Item 2",net_unit_amount:5e4,quantity:1,category:""}]},business:{name:"Components Mock Merchant",country_of_operation:"Indonesia",merchant_profile_picture_url:"https://placehold.co/256x256.png?text=Logo"},customer:{type:"INDIVIDUAL",id:`cust-${Nn()}`,email:"exa**@example.com",mobile_number:null,phone_number:null,individual_detail:{given_names:"exa********",surname:null},business_detail:null},channels:[{brand_name:"Cards",channel_code:"CARDS",brand_logo_url:"https://assets.xendit.co/payment-session/logos/CARDS.svg",ui_group:"cards",allow_pay_without_save:!0,allow_save:!0,brand_color:"#000000",min_amount:5e3,max_amount:2e8,requires_customer_details:!1,_mock_action_type:"IFRAME",card:{brands:[{name:"VISA",logo_url:"https://assets.xendit.co/payment-session/logos/VISA.svg"},{name:"MASTERCARD",logo_url:"https://assets.xendit.co/payment-session/logos/MASTERCARD.svg"},{name:"JCB",logo_url:"https://assets.xendit.co/payment-session/logos/JCB.svg"}]},form:[{group_label:"Card Details",label:"Card Number",placeholder:"1234 1234 1234 1234",type:{name:"credit_card_number"},channel_property:"card_details.card_number",required:!0,span:2},{label:"Card Expiry Date",placeholder:"MM/YY",type:{name:"credit_card_expiry"},channel_property:["card_details.expiry_month","card_details.expiry_year"],required:!0,span:1,join:!0},{label:"CVN",placeholder:"CVV",type:{name:"credit_card_cvn"},channel_property:"card_details.cvn",required:!0,span:1,join:!0},{group_label:"Cardholder Name",label:"First Name",placeholder:"First Name",type:{name:"text",min_length:1,max_length:50,regex_validators:[{regex:"/^[a-zA-Z\\u00C0-\\u017F\\s]+$/",message:"Invalid input. Please use alphabetic characters only"}]},channel_property:"card_details.cardholder_first_name",required:!0,span:1},{label:"Last Name",placeholder:"Last Name",type:{name:"text",min_length:1,max_length:50,regex_validators:[{regex:"/^[ -~]+$/",message:"Invalid input. Please use alphabetic characters only"}]},channel_property:"card_details.cardholder_last_name",required:!0,span:1},{label:"Email",placeholder:"john.doe@example.com",type:{name:"email"},channel_property:"card_details.cardholder_email",required:!0,span:2},{label:"Mobile Number",placeholder:"8000032341",type:{name:"phone_number"},channel_property:"card_details.cardholder_phone_number",required:!0,span:2},{label:"Installment plan",placeholder:"Select installment plan",type:{name:"installment_plan"},channel_property:["installment_configuration.terms","installment_configuration.interval","installment_configuration.code"],required:!1,span:2},{group_label:"Billing Address",label:"First Name",placeholder:"First Name",type:{name:"text",max_length:255},channel_property:"billing_information.first_name",span:1,required:!0,flags:{require_billing_information:!0}},{label:"Last Name",placeholder:"Last Name",type:{name:"text",max_length:255},channel_property:"billing_information.last_name",span:1,required:!0,flags:{require_billing_information:!0},join:!0},{label:"Email",placeholder:"Email",type:{name:"text",max_length:255},channel_property:"billing_information.email",span:2,required:!0,flags:{require_billing_information:!0},join:!0},{label:"Country",placeholder:"Country",type:{name:"country"},channel_property:"billing_information.country",span:1,required:!0,flags:{require_billing_information:!0},join:!0},{label:"Province",placeholder:"State / Province",type:{name:"province"},channel_property:"billing_information.province_state",span:1,required:!0,flags:{require_billing_information:!0},join:!0},{label:"City",placeholder:"City",type:{name:"text",max_length:255},channel_property:"billing_information.city",span:2,required:!0,flags:{require_billing_information:!0},join:!0},{label:"Address Line 1",placeholder:"Address Line 1",type:{name:"text",max_length:255},channel_property:"billing_information.street_line1",span:2,required:!0,flags:{require_billing_information:!0},join:!0},{label:"Address Line 2",placeholder:"Address Line 2",type:{name:"text",max_length:255},channel_property:"billing_information.street_line2",span:2,required:!0,flags:{require_billing_information:!0},join:!0},{label:"Postal Code",placeholder:"Postal Code",type:{name:"postal_code"},channel_property:"billing_information.postal_code",span:2,required:!0,flags:{require_billing_information:!0},join:!0}],instructions:["Mock Cards channel","This mock channel behaves similarly to the production CARDS channel."]},{brand_name:"Mock E-Wallet Channel (Redirect action)",channel_code:"MOCK_EWALLET",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,_mock_action_type:"REDIRECT",form:[],instructions:["Mock E-Wallet channel","This mock channel has a redirect action."]},{brand_name:"Mock E-Wallet Channel (Redirect and Paylink actions)",channel_code:"MOCK_EWALLET_PAYLINK",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,_mock_action_type:["REDIRECT","PAYLINK"],form:[],instructions:["Mock E-Wallet channel","This mock channel has a redirect and a paylink action."]},{brand_name:"Mock E-Wallet Channel (Iframe action)",channel_code:"MOCK_EWALLET_IFRAME",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,_mock_action_type:"IFRAME",form:[],instructions:["Mock E-Wallet channel","This mock channel has as iframe action."]},{brand_name:"Mock E-Wallet Channel (Deeplink action)",channel_code:"MOCK_EWALLET_DEEP_LINK",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,_mock_action_type:"DEEP_LINK",form:[],instructions:["Mock E-Wallet channel","This mock channel has a deeplink action."]},{brand_name:"Mock E-Wallet Channel (Push notification action)",channel_code:"MOCK_EWALLET_PUSH_NOTIFICATION",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,_mock_action_type:"PUSH_NOTIFICATION",form:[],instructions:["Mock E-Wallet channel","This mock channel has a deeplink action."]},{brand_name:"Mock E-Wallet Channel (Phone input)",channel_code:"MOCK_EWALLET_WITH_PHONE",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,_mock_action_type:"REDIRECT",form:[{label:"Phone Number",placeholder:"123 123 132",type:{name:"phone_number"},channel_property:"phone_number_field",required:!0,span:2}],instructions:["Mock E-Wallet channel","This mock channel behaves similarly to production E-Wallets channels with a phone number input."]},{brand_name:"Mock QR Channel",channel_code:"MOCK_QR",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,_mock_action_type:"QR",form:[],instructions:["Mock QR channel","This mock channel behaves similarly to production QR channels."],pm_type:"QR_CODE"},{brand_name:"Mock Direct Debit Channel",channel_code:"MOCK_DIRECT_DEBIT",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[],instructions:["Mock Direct Debit channel","This mock channel behaves similarly to production Direct Debit channels."]},{brand_name:"Mock FPX Business Channel",channel_code:"MOCK_FPX_BUSINESS",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,_mock_action_type:"PENDING",form:[],instructions:["Mock FPX channel","This mock channel behaves similarly to production FPX channels. It has a banner and it will enter the pending state after submission."],banner:{image_url:"https://assets.xendit.co/payment-session/banners/fpx-banner.svg",alt_text:"FPX Pay with Online Banking",aspect_ratio:9.7}},{brand_name:"Mock OTC Channel",channel_code:"MOCK_OTC",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,_mock_action_type:"BARCODE",form:[{label:"Payer Name",placeholder:"Payer Name",type:{name:"text",max_length:50},channel_property:"payer_name",required:!0,span:2}],instructions:["Mock OTC channel","This mock channel behaves similarly to production OTC channels."]},{brand_name:"Mock VA Channel",channel_code:"MOCK_VA",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,_mock_action_type:"VA",form:[],instructions:["Mock VA channel","This mock channel behaves similarly to production VA channels."]},{brand_name:"Mock Installments Channel",channel_code:"MOCK_INSTALLMENTS",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[{label:"Installment plan",placeholder:"Select installment plan",type:{name:"installment_plan"},channel_property:["installment_configuration.terms","installment_configuration.interval","installment_configuration.code"],required:!1,span:2}],instructions:["Mock Installments channel","This mock channel behaves similarly to production installment channels in Thailand."]},{brand_name:"Input Test",channel_code:"UI_INPUT_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[{label:"Card Number (Iframe)",placeholder:"1234 1234 1234 1234",type:{name:"credit_card_number"},channel_property:"card_number",required:!1,span:2},{label:"Card Expiry Date (Iframe)",placeholder:"MM/YY",type:{name:"credit_card_expiry"},channel_property:["expiry_month","expiry_year"],required:!1,span:2},{label:"CVN (Iframe)",placeholder:"CVV",type:{name:"credit_card_cvn"},channel_property:"cvn",required:!1,span:2},{label:"Text",placeholder:"Text",type:{name:"text",max_length:50},channel_property:"text_field",required:!1,span:2},{label:"Phone Number",placeholder:"123 123 123",type:{name:"phone_number"},channel_property:"phone_number_field",required:!1,span:2},{label:"Email",placeholder:"test@example.com",type:{name:"email"},channel_property:"email_field",required:!1,span:2},{label:"Postal Code",placeholder:"123456",type:{name:"postal_code"},channel_property:"postal_code_field",required:!1,span:2},{label:"Country",placeholder:"Select",type:{name:"country"},channel_property:"country_field",required:!1,span:2},{label:"Dropdown",placeholder:"Select",type:{name:"dropdown",options:[{label:"Option 1",value:"option_1"},{label:"Option 2",value:"option_2"},{label:"Option 3",value:"option_3"},{label:"Option 4",value:"option_4",subtitle:"With subtitle"},{label:"Option 5",value:"option_5",subtitle:"With subtitle"}]},channel_property:"dropdown_field",required:!1,span:2},{label:"Dropdown With Icons",placeholder:"Select",type:{name:"dropdown",options:[{label:"Option 1",value:"option_1",icon_url:"https://placehold.co/16"},{label:"Option 2",value:"option_2",icon_url:"https://placehold.co/16"},{label:"Option 3",value:"option_3",icon_url:"https://placehold.co/16"}]},channel_property:"dropdown_field_with_icons",required:!1,span:2}],instructions:["This test demonstrates basic usage of all input types.","All fields here are optional and blank values should pass validation."]},{brand_name:"Field Grouping Test",channel_code:"UI_FIELD_GROUPING_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[{group_label:"Vertical Grouping",label:"Top",placeholder:"Top",type:{name:"text",max_length:50},channel_property:"a1",required:!1,span:2},{label:"Middle",placeholder:"Middle",type:{name:"text",max_length:50},channel_property:"a2",required:!1,span:2,join:!0},{label:"Bottom",placeholder:"Bottom",type:{name:"text",max_length:50},channel_property:"a3",required:!1,span:2,join:!0},{group_label:"Horizontal Grouping",label:"Text",placeholder:"Left",type:{name:"text",max_length:50},channel_property:"b1",required:!1,span:1},{label:"Text",placeholder:"Right",type:{name:"text",max_length:50},channel_property:"b1",required:!1,span:1,join:!0},{group_label:"Mixed Grouping",label:"Text",placeholder:"Top Left",type:{name:"text",max_length:50},channel_property:"c1",required:!1,span:1},{label:"Text",placeholder:"Top Right",type:{name:"text",max_length:50},channel_property:"c2",required:!1,span:1,join:!0},{label:"Text",placeholder:"Middle Left",type:{name:"text",max_length:50},channel_property:"c3",required:!1,span:1,join:!0},{label:"Text",placeholder:"Middle Right",type:{name:"text",max_length:50},channel_property:"c4",required:!1,span:1,join:!0},{label:"Text",placeholder:"Bottom Left",type:{name:"text",max_length:50},channel_property:"c5",required:!1,span:1,join:!0},{label:"Text",placeholder:"Bottom Right",type:{name:"text",max_length:50},channel_property:"c6",required:!1,span:1,join:!0}],instructions:["This test demonstrates field grouping.","Fields can be 1 or 2 cells wide and can be grouped in any arrangement."]},{brand_name:"Text Validation Test",channel_code:"UI_TEXT_VALIDATION_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[{label:"Required Text Field",placeholder:"Required",type:{name:"text",max_length:50},channel_property:"required",required:!0,span:2},{label:"Validate Minimum Length (5)",placeholder:"Min 5 characters",type:{name:"text",min_length:5,max_length:50},channel_property:"min_5_chars",required:!1,span:2},{label:"Validate Using Regexp (/^[a-zA-Z0-9]+$/)",placeholder:"Alphanumeric only",type:{name:"text",max_length:50,regex_validators:[{regex:"/^[a-zA-Z0-9]+$/",message:"Invalid input. Please use alphanumeric characters only"}]},channel_property:"regexp_validation",required:!1,span:2}],instructions:["This test demonstrates text field validation.","Fields should validate on blur or `submit()` or `revealValidationErrors()`. Blurring a blank field does not trigger validation."]},{brand_name:"State/Province Field Test",channel_code:"UI_STATE_PROVINCE_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[{group_label:"Country + State/Province Fields",label:"Country",placeholder:"Country",type:{name:"country"},channel_property:"country_field",required:!0,span:2},{label:"State / Province",placeholder:"State / Province",type:{name:"province"},channel_property:"province_field",required:!0,span:2,join:!0},{group_label:"Country + State/Province Fields (Horizontal Grouping)",label:"Country",placeholder:"Country",type:{name:"country"},channel_property:"country_field_2",required:!0,span:1},{label:"State / Province",placeholder:"State / Province",type:{name:"province"},channel_property:"province_field_2",required:!0,span:1,join:!0}],instructions:["This test demonstrates the country + state/province field combination.","Selecting certain countries (US, CA, GB) should change the state/province field to a dropdown with predefined options."]},{brand_name:"Conditional Field Test",channel_code:"UI_CONDITIONAL_FIELD_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[{label:"Toggle Hidden Field",placeholder:"Select",type:{name:"dropdown",options:[{label:"Show",value:"show"},{label:"Hide",value:"hide"}]},channel_property:"toggle",required:!0,span:2},{label:"Conditional Field",placeholder:"This field is conditionally shown",type:{name:"text",max_length:50},channel_property:"conditional_field",required:!0,span:2,join:!0,display_if:[["toggle","equals","show"]]}],instructions:["This test demonstrates conditional field display based on another field's value.","The second field should only appear if 'Show' is selected in the first field."]},{brand_name:"Save Payment Details Test",channel_code:"UI_SAVE_PAYMENT_DETAILS_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!0,allow_save:!0,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[],instructions:["This channel supports both one-time payment and pay-and-save.","A checkbox should be displayed."]},{brand_name:"Paired Channels Test",channel_code:"UI_PAIRED_CHANNELS_TEST_1",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!0,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[{label:"This should show if the save checkbox is unchecked",placeholder:"Unchecked",type:{name:"text",max_length:50},channel_property:"nonsave",required:!1,span:2}],instructions:["This channel does not support save, but has a paired channel that does.","Changing the save checkbox switches between the two channels."]},{brand_name:"Paired Channels Test",channel_code:"UI_PAIRED_CHANNELS_TEST_2",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!1,allow_save:!0,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[{label:"This should show if the save checkbox is checked",placeholder:"Checked",type:{name:"text",max_length:50},channel_property:"save",required:!1,span:2}],instructions:["This channel can only be used for pay-and-save, but has a paired channel that supports one time payment.","Changing the save checkbox switches between the two channels."]},{brand_name:"Banner Test",channel_code:"UI_BANNER_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!0,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,banner:{image_url:"https://placehold.co/512x32.svg?text=Banner",alt_text:"",aspect_ratio:16},form:[],instructions:["This channel has a banner image.","It should be displayed above this text."]},{brand_name:"Single Item Test",channel_code:"GROUP_SINGLE_ITEM_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"single_item",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[],instructions:["This channel is in a group by itself.","The channel picker should automatically select it when the group is opened."]},{brand_name:"Disabled Group Test",channel_code:"GROUP_DISABLED_GROUP_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"disabled",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:999999999,max_amount:9999999999,requires_customer_details:!1,form:[],instructions:["This channel is in a disabled group.","Since all channels in this group are disabled, the group should not be selectable. You should never see this text because creating this channel will throw an error."]},{brand_name:"Partial Disabled Group (Enabled)",channel_code:"GROUP_PARTIAL_DISABLED_1",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"partial_disabled",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[],instructions:["This channel is in a partially disabled group.","This channel is enabled, but the other channel in the group is disabled. This channel should be automatically selected by the channel picker because it's the only enabled option."]},{brand_name:"Partial Disabled Group (Disabled)",channel_code:"GROUP_PARTIAL_DISABLED_2",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"partial_disabled",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:999999999,max_amount:9999999999,requires_customer_details:!1,form:[],instructions:["This channel is in a partially disabled group.","This channel is disabled. You should never see this text because creating this channel will throw an error."]}],channel_ui_groups:[{id:"cards",label:"Mock Cards",icon_url:"https://assets.xendit.co/payment-session/logos/CARDS.svg"},{id:"other",label:"Other Mock Channels",icon_url:"https://placehold.co/48x48.png?text=Logo"},{id:"ui_tests",label:"Channel UI Test Cases",icon_url:"https://placehold.co/48x48.png?text=Logo"},{id:"single_item",label:"Mock Single Item Group",icon_url:"https://placehold.co/48x48.png?text=Logo"},{id:"disabled",label:"Mock Disabled Group",icon_url:"https://placehold.co/48x48.png?text=Logo"},{id:"partial_disabled",label:"Mock Partial Disabled Group",icon_url:"https://placehold.co/48x48.png?text=Logo"}],digital_wallets:{google_pay:{merchant_id:"mock-googlepay-merchant-id",allowed_payment_methods:[{channel_code:"CARDS",payment_request_id:`pr-${An(32)}`,payment_method_specification:{type:"CARD",parameters:{billingAddressRequired:!0,allowedAuthMethods:["PAN_ONLY","CRYPTOGRAM_3DS"],allowedCardNetworks:["AMEX","MASTERCARD","VISA"]},tokenizationSpecification:{type:"PAYMENT_GATEWAY",parameters:{gateway:"xendit",gatewayMerchantId:"exampleGatewayMerchantId"}}}}]}}}}});e.XenditActionBeginEvent=XenditActionBeginEvent,e.XenditActionEndEvent=XenditActionEndEvent,e.XenditComponents=XenditComponents,e.XenditComponentsTest=XenditComponentsTest,e.XenditFatalErrorEvent=XenditFatalErrorEvent,e.XenditInitEvent=XenditInitEvent,e.XenditNotReadyEvent=XenditNotReadyEvent,e.XenditPaymentRequestCreatedEvent=XenditPaymentRequestCreatedEvent,e.XenditPaymentRequestDiscardedEvent=XenditPaymentRequestDiscardedEvent,e.XenditPaymentTokenCreatedEvent=XenditPaymentTokenCreatedEvent,e.XenditPaymentTokenDiscardedEvent=XenditPaymentTokenDiscardedEvent,e.XenditReadyEvent=XenditReadyEvent,e.XenditSessionCompleteEvent=XenditSessionCompleteEvent,e.XenditSessionExpiredOrCanceledEvent=XenditSessionExpiredOrCanceledEvent,e.XenditSessionNotPendingEvent=XenditSessionNotPendingEvent,e.XenditSessionPendingEvent=XenditSessionPendingEvent,e.XenditSubmissionBeginEvent=XenditSubmissionBeginEvent,e.XenditSubmissionEndEvent=XenditSubmissionEndEvent,e.XenditWillRedirectEvent=XenditWillRedirectEvent});
|
|
8
8
|
//# sourceMappingURL=index.umd.js.map
|