@everymatrix/cashier-step-up 0.14.36 → 0.14.38
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/components/{CashierStepUp-CC5ef0tj.js → CashierStepUp-BVxmAwHQ.js} +1028 -959
- package/components/{CashierStepUp-BhQQ7S7K.js → CashierStepUp-DQe8mRSw.js} +990 -921
- package/components/CashierStepUp-E4BcBowq.cjs +3 -0
- package/es2015/cashier-step-up.cjs +1 -1
- package/es2015/cashier-step-up.js +1 -1
- package/esnext/cashier-step-up.js +1 -1
- package/package.json +1 -1
- package/components/CashierStepUp-BBwpK1r9.cjs +0 -3
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";var qn=Object.defineProperty,Qn=Object.defineProperties;var Jn=Object.getOwnPropertyDescriptors;var kt=Object.getOwnPropertySymbols;var Yn=Object.prototype.hasOwnProperty,Kn=Object.prototype.propertyIsEnumerable;var ht=(e,t,n)=>t in e?qn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,We=(e,t)=>{for(var n in t||(t={}))Yn.call(t,n)&&ht(e,n,t[n]);if(kt)for(var n of kt(t))Kn.call(t,n)&&ht(e,n,t[n]);return e},ct=(e,t)=>Qn(e,Jn(t));var ee=(e,t,n)=>(ht(e,typeof t!="symbol"?t+"":t,n),n);var Ee=(e,t,n)=>new Promise((r,i)=>{var o=u=>{try{s(n.next(u))}catch(l){i(l)}},a=u=>{try{s(n.throw(u))}catch(l){i(l)}},s=u=>u.done?r(u.value):Promise.resolve(u.value).then(o,a);s((n=n.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function te(){}function an(e){return e()}function Dt(){return Object.create(null)}function _e(e){e.forEach(an)}function Bt(e){return typeof e=="function"}function ln(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function er(e){return Object.keys(e).length===0}function un(e,...t){if(e==null){for(const r of t)r(void 0);return te}const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function tr(e,t,n){e.$$.on_destroy.push(un(t,n))}function v(e,t){e.appendChild(t)}function nr(e,t,n){const r=rr(e);if(!r.getElementById(t)){const i=O("style");i.id=t,i.textContent=n,ir(r,i)}}function rr(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function ir(e,t){return v(e.head||e,t),t.sheet}function A(e,t,n){e.insertBefore(t,n||null)}function H(e){e.parentNode&&e.parentNode.removeChild(e)}function or(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function O(e){return document.createElement(e)}function ie(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function k(e){return document.createTextNode(e)}function j(){return k(" ")}function sr(){return k("")}function ce(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function p(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function ar(e){return Array.from(e.childNodes)}function V(e,t){t=""+t,e.data!==t&&(e.data=t)}function oe(e,t,n){e.classList.toggle(t,!!n)}function lr(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}let Ve;function je(e){Ve=e}function ur(){if(!Ve)throw new Error("Function called outside component initialization");return Ve}function hr(e){ur().$$.on_mount.push(e)}const Ce=[],Ye=[];let Be=[];const Ut=[],cr=Promise.resolve();let yt=!1;function fr(){yt||(yt=!0,cr.then(se))}function Et(e){Be.push(e)}const ft=new Set;let Oe=0;function se(){if(Oe!==0)return;const e=Ve;do{try{for(;Oe<Ce.length;){const t=Ce[Oe];Oe++,je(t),pr(t.$$)}}catch(t){throw Ce.length=0,Oe=0,t}for(je(null),Ce.length=0,Oe=0;Ye.length;)Ye.pop()();for(let t=0;t<Be.length;t+=1){const n=Be[t];ft.has(n)||(ft.add(n),n())}Be.length=0}while(Ce.length);for(;Ut.length;)Ut.pop()();yt=!1,ft.clear(),je(e)}function pr(e){if(e.fragment!==null){e.update(),_e(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(Et)}}function dr(e){const t=[],n=[];Be.forEach(r=>e.indexOf(r)===-1?t.push(r):n.push(r)),n.forEach(r=>r()),Be=t}const mr=new Set;function gr(e,t){e&&e.i&&(mr.delete(e),e.i(t))}function Gt(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function br(e,t,n){const{fragment:r,after_update:i}=e.$$;r&&r.m(t,n),Et(()=>{const o=e.$$.on_mount.map(an).filter(Bt);e.$$.on_destroy?e.$$.on_destroy.push(...o):_e(o),e.$$.on_mount=[]}),i.forEach(Et)}function vr(e,t){const n=e.$$;n.fragment!==null&&(dr(n.after_update),_e(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function yr(e,t){e.$$.dirty[0]===-1&&(Ce.push(e),fr(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Er(e,t,n,r,i,o,a=null,s=[-1]){const u=Ve;je(e);const l=e.$$={fragment:null,ctx:[],props:o,update:te,not_equal:i,bound:Dt(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:Dt(),dirty:s,skip_bound:!1,root:t.target||u.$$.root};a&&a(l.root);let h=!1;if(l.ctx=n?n(e,t.props||{},(c,d,...y)=>{const m=y.length?y[0]:d;return l.ctx&&i(l.ctx[c],l.ctx[c]=m)&&(!l.skip_bound&&l.bound[c]&&l.bound[c](m),h&&yr(e,c)),d}):[],l.update(),h=!0,_e(l.before_update),l.fragment=r?r(l.ctx):!1,t.target){if(t.hydrate){const c=ar(t.target);l.fragment&&l.fragment.l(c),c.forEach(H)}else l.fragment&&l.fragment.c();t.intro&&gr(e.$$.fragment),br(e,t.target,t.anchor),se()}je(u)}let hn;typeof HTMLElement=="function"&&(hn=class extends HTMLElement{constructor(t,n,r){super();ee(this,"$$ctor");ee(this,"$$s");ee(this,"$$c");ee(this,"$$cn",!1);ee(this,"$$d",{});ee(this,"$$r",!1);ee(this,"$$p_d",{});ee(this,"$$l",{});ee(this,"$$l_u",new Map);this.$$ctor=t,this.$$s=n,r&&this.attachShadow({mode:"open"})}addEventListener(t,n,r){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(n),this.$$c){const i=this.$$c.$on(t,n);this.$$l_u.set(n,i)}super.addEventListener(t,n,r)}removeEventListener(t,n,r){if(super.removeEventListener(t,n,r),this.$$c){const i=this.$$l_u.get(n);i&&(i(),this.$$l_u.delete(n))}}connectedCallback(){return Ee(this,null,function*(){if(this.$$cn=!0,!this.$$c){let t=function(o){return()=>{let a;return{c:function(){a=O("slot"),o!=="default"&&p(a,"name",o)},m:function(l,h){A(l,a,h)},d:function(l){l&&H(a)}}}};if(yield Promise.resolve(),!this.$$cn||this.$$c)return;const n={},r=lr(this);for(const o of this.$$s)o in r&&(n[o]=[t(o)]);for(const o of this.attributes){const a=this.$$g_p(o.name);a in this.$$d||(this.$$d[a]=qe(a,o.value,this.$$p_d,"toProp"))}for(const o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:ct(We({},this.$$d),{$$slots:n,$$scope:{ctx:[]}})});const i=()=>{this.$$r=!0;for(const o in this.$$p_d)if(this.$$d[o]=this.$$c.$$.ctx[this.$$c.$$.props[o]],this.$$p_d[o].reflect){const a=qe(o,this.$$d[o],this.$$p_d,"toAttribute");a==null?this.removeAttribute(this.$$p_d[o].attribute||o):this.setAttribute(this.$$p_d[o].attribute||o,a)}this.$$r=!1};this.$$c.$$.after_update.push(i),i();for(const o in this.$$l)for(const a of this.$$l[o]){const s=this.$$c.$on(o,a);this.$$l_u.set(a,s)}this.$$l={}}})}attributeChangedCallback(t,n,r){var i;this.$$r||(t=this.$$g_p(t),this.$$d[t]=qe(t,r,this.$$p_d,"toProp"),(i=this.$$c)==null||i.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(t){return Object.keys(this.$$p_d).find(n=>this.$$p_d[n].attribute===t||!this.$$p_d[n].attribute&&n.toLowerCase()===t)||t}});function qe(e,t,n,r){var o;const i=(o=n[e])==null?void 0:o.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!r||!n[e])return t;if(r==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t==null?null:t;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function _r(e,t,n,r,i,o){let a=class extends hn{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return Object.keys(t).map(s=>(t[s].attribute||s).toLowerCase())}};return Object.keys(t).forEach(s=>{Object.defineProperty(a.prototype,s,{get(){return this.$$c&&s in this.$$c?this.$$c[s]:this.$$d[s]},set(u){var l;u=qe(s,u,t),this.$$d[s]=u,(l=this.$$c)==null||l.$set({[s]:u})}})}),r.forEach(s=>{Object.defineProperty(a.prototype,s,{get(){var u;return(u=this.$$c)==null?void 0:u[s]}})}),e.element=a,a}class xr{constructor(){ee(this,"$$");ee(this,"$$set")}$destroy(){vr(this,1),this.$destroy=te}$on(t,n){if(!Bt(n))return te;const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(n),()=>{const i=r.indexOf(n);i!==-1&&r.splice(i,1)}}$set(t){this.$$set&&!er(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const wr="4";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(wr);const Ae="__WIDGET_GLOBAL_STYLE_CACHE__";function Sr(e,t){if(e){const n=document.createElement("style");n.innerHTML=t,e.appendChild(n)}}function Tr(e,t){if(!e||!t)return;const n=new URL(t);fetch(n.href).then(r=>r.text()).then(r=>{const i=document.createElement("style");i.innerHTML=r,e&&e.appendChild(i)}).catch(r=>{console.error("There was an error while trying to load client styling from URL",r)})}function Or(e,t,n,r=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!r)return n=Hr(e,t),n;window[Ae]||(window[Ae]={}),n=Cr(e,t);const o=n.unsubscribe.bind(n),a=()=>{if(window[Ae][t]){const s=window[Ae][t];s.refCount>1?s.refCount=s.refCount-1:delete window[Ae][t]}o()};return n.unsubscribe=a,n}function Hr(e,t){const n=document.createElement("style");return window.emMessageBus.subscribe(t,r=>{e&&(n.innerHTML=r,e.appendChild(n))})}function Cr(e,t){return window.emMessageBus.subscribe(t,n=>{if(!e)return;const r=e.getRootNode(),i=window[Ae];let o=i[t]&&i[t].sheet;o?i[t].refCount=i[t].refCount+1:(o=new CSSStyleSheet,o.replaceSync(n),i[t]={sheet:o,refCount:1});const a=r.adoptedStyleSheets||[];a.includes(o)||(r.adoptedStyleSheets=[...a,o])})}const He=[];function Ar(e,t){return{subscribe:nt(e,t).subscribe}}function nt(e,t=te){let n;const r=new Set;function i(s){if(ln(e,s)&&(e=s,n)){const u=!He.length;for(const l of r)l[1](),He.push(l,e);if(u){for(let l=0;l<He.length;l+=2)He[l][0](He[l+1]);He.length=0}}}function o(s){i(s(e))}function a(s,u=te){const l=[s,u];return r.add(l),r.size===1&&(n=t(i,o)||te),s(e),()=>{r.delete(l),r.size===0&&n&&(n(),n=null)}}return{set:i,update:o,subscribe:a}}function Ne(e,t,n){const r=!Array.isArray(e),i=r?[e]:e;if(!i.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const o=t.length<2;return Ar(n,(a,s)=>{let u=!1;const l=[];let h=0,c=te;const d=()=>{if(h)return;c();const m=t(r?l[0]:l,a,s);o?a(m):c=Bt(m)?m:te},y=i.map((m,g)=>un(m,_=>{l[g]=_,h&=~(1<<g),u&&d()},()=>{h|=1<<g}));return u=!0,d(),function(){_e(y),c(),u=!1}})}function Br(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Mr=function(t){return Pr(t)&&!Lr(t)};function Pr(e){return!!e&&typeof e=="object"}function Lr(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||Rr(e)}var Ir=typeof Symbol=="function"&&Symbol.for,Nr=Ir?Symbol.for("react.element"):60103;function Rr(e){return e.$$typeof===Nr}function kr(e){return Array.isArray(e)?[]:{}}function ze(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Me(kr(e),e,t):e}function Dr(e,t,n){return e.concat(t).map(function(r){return ze(r,n)})}function Ur(e,t){if(!t.customMerge)return Me;var n=t.customMerge(e);return typeof n=="function"?n:Me}function Gr(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function Ft(e){return Object.keys(e).concat(Gr(e))}function cn(e,t){try{return t in e}catch(n){return!1}}function Fr(e,t){return cn(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function jr(e,t,n){var r={};return n.isMergeableObject(e)&&Ft(e).forEach(function(i){r[i]=ze(e[i],n)}),Ft(t).forEach(function(i){Fr(e,i)||(cn(e,i)&&n.isMergeableObject(t[i])?r[i]=Ur(i,n)(e[i],t[i],n):r[i]=ze(t[i],n))}),r}function Me(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||Dr,n.isMergeableObject=n.isMergeableObject||Mr,n.cloneUnlessOtherwiseSpecified=ze;var r=Array.isArray(t),i=Array.isArray(e),o=r===i;return o?r?n.arrayMerge(e,t,n):jr(e,t,n):ze(t,n)}Me.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return Me(r,i,n)},{})};var Vr=Me,zr=Vr;const $r=Br(zr);var _t=function(e,t){return _t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},_t(e,t)};function rt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");_t(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var ae=function(){return ae=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},ae.apply(this,arguments)};function Xr(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function pt(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}function dt(e,t){var n=t&&t.cache?t.cache:Kr,r=t&&t.serializer?t.serializer:Jr,i=t&&t.strategy?t.strategy:qr;return i(e,{cache:n,serializer:r})}function Wr(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Zr(e,t,n,r){var i=Wr(r)?r:n(r),o=t.get(i);return typeof o=="undefined"&&(o=e.call(this,r),t.set(i,o)),o}function fn(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),o=t.get(i);return typeof o=="undefined"&&(o=e.apply(this,r),t.set(i,o)),o}function pn(e,t,n,r,i){return n.bind(t,e,r,i)}function qr(e,t){var n=e.length===1?Zr:fn;return pn(e,this,n,t.cache.create(),t.serializer)}function Qr(e,t){return pn(e,this,fn,t.cache.create(),t.serializer)}var Jr=function(){return JSON.stringify(arguments)},Yr=function(){function e(){this.cache=Object.create(null)}return e.prototype.get=function(t){return this.cache[t]},e.prototype.set=function(t,n){this.cache[t]=n},e}(),Kr={create:function(){return new Yr}},mt={variadic:Qr},Ke=function(){return Ke=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Ke.apply(this,arguments)};var w;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(w||(w={}));var L;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(L||(L={}));var Pe;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Pe||(Pe={}));function jt(e){return e.type===L.literal}function ei(e){return e.type===L.argument}function dn(e){return e.type===L.number}function mn(e){return e.type===L.date}function gn(e){return e.type===L.time}function bn(e){return e.type===L.select}function vn(e){return e.type===L.plural}function ti(e){return e.type===L.pound}function yn(e){return e.type===L.tag}function En(e){return!!(e&&typeof e=="object"&&e.type===Pe.number)}function xt(e){return!!(e&&typeof e=="object"&&e.type===Pe.dateTime)}var _n=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,ni=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function ri(e){var t={};return e.replace(ni,function(n){var r=n.length;switch(n[0]){case"G":t.era=r===4?"long":r===5?"narrow":"short";break;case"y":t.year=r===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][r-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=r===4?"long":r===5?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][r-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][r-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][r-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][r-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][r-1];break;case"s":t.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=r<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var R=function(){return R=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},R.apply(this,arguments)};var ii=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function oi(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(ii).filter(function(d){return d.length>0}),n=[],r=0,i=t;r<i.length;r++){var o=i[r],a=o.split("/");if(a.length===0)throw new Error("Invalid number skeleton");for(var s=a[0],u=a.slice(1),l=0,h=u;l<h.length;l++){var c=h[l];if(c.length===0)throw new Error("Invalid number skeleton")}n.push({stem:s,options:u})}return n}function si(e){return e.replace(/^(.*?)-/,"")}var Vt=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,xn=/^(@+)?(\+|#+)?[rs]?$/g,ai=/(\*)(0+)|(#+)(0+)|(0+)/g,wn=/^(0+)$/;function zt(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(xn,function(n,r,i){return typeof i!="string"?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):i==="+"?t.minimumSignificantDigits=r.length:r[0]==="#"?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+(typeof i=="string"?i.length:0)),""}),t}function Sn(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function li(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if(n==="+!"?(t.signDisplay="always",e=e.slice(2)):n==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!wn.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function $t(e){var t={},n=Sn(e);return n||t}function ui(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=si(i.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=R(R(R({},t),{notation:"scientific"}),i.options.reduce(function(u,l){return R(R({},u),$t(l))},{}));continue;case"engineering":t=R(R(R({},t),{notation:"engineering"}),i.options.reduce(function(u,l){return R(R({},u),$t(l))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(i.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(ai,function(u,l,h,c,d,y){if(l)t.minimumIntegerDigits=h.length;else{if(c&&d)throw new Error("We currently do not support maximum integer digits");if(y)throw new Error("We currently do not support exact integer digits")}return""});continue}if(wn.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(Vt.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(Vt,function(u,l,h,c,d,y){return h==="*"?t.minimumFractionDigits=l.length:c&&c[0]==="#"?t.maximumFractionDigits=c.length:d&&y?(t.minimumFractionDigits=d.length,t.maximumFractionDigits=d.length+y.length):(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length),""});var o=i.options[0];o==="w"?t=R(R({},t),{trailingZeroDisplay:"stripIfInteger"}):o&&(t=R(R({},t),zt(o)));continue}if(xn.test(i.stem)){t=R(R({},t),zt(i.stem));continue}var a=Sn(i.stem);a&&(t=R(R({},t),a));var s=li(i.stem);s&&(t=R(R({},t),s))}return t}var Ze={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function hi(e,t){for(var n="",r=0;r<e.length;r++){var i=e.charAt(r);if(i==="j"){for(var o=0;r+1<e.length&&e.charAt(r+1)===i;)o++,r++;var a=1+(o&1),s=o<2?1:3+(o>>1),u="a",l=ci(t);for((l=="H"||l=="k")&&(s=0);s-- >0;)n+=u;for(;a-- >0;)n=l+n}else i==="J"?n+="H":n+=i}return n}function ci(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=e.language,r;n!=="root"&&(r=e.maximize().region);var i=Ze[r||""]||Ze[n||""]||Ze["".concat(n,"-001")]||Ze["001"];return i[0]}var gt,fi=new RegExp("^".concat(_n.source,"*")),pi=new RegExp("".concat(_n.source,"*$"));function T(e,t){return{start:e,end:t}}var di=!!String.prototype.startsWith&&"_a".startsWith("a",1),mi=!!String.fromCodePoint,gi=!!Object.fromEntries,bi=!!String.prototype.codePointAt,vi=!!String.prototype.trimStart,yi=!!String.prototype.trimEnd,Ei=!!Number.isSafeInteger,_i=Ei?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},wt=!0;try{var xi=On("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");wt=((gt=xi.exec("a"))===null||gt===void 0?void 0:gt[0])==="a"}catch(e){wt=!1}var Xt=di?function(t,n,r){return t.startsWith(n,r)}:function(t,n,r){return t.slice(r,r+n.length)===n},St=mi?String.fromCodePoint:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r="",i=t.length,o=0,a;i>o;){if(a=t[o++],a>1114111)throw RangeError(a+" is not a valid code point");r+=a<65536?String.fromCharCode(a):String.fromCharCode(((a-=65536)>>10)+55296,a%1024+56320)}return r},Wt=gi?Object.fromEntries:function(t){for(var n={},r=0,i=t;r<i.length;r++){var o=i[r],a=o[0],s=o[1];n[a]=s}return n},Tn=bi?function(t,n){return t.codePointAt(n)}:function(t,n){var r=t.length;if(!(n<0||n>=r)){var i=t.charCodeAt(n),o;return i<55296||i>56319||n+1===r||(o=t.charCodeAt(n+1))<56320||o>57343?i:(i-55296<<10)+(o-56320)+65536}},wi=vi?function(t){return t.trimStart()}:function(t){return t.replace(fi,"")},Si=yi?function(t){return t.trimEnd()}:function(t){return t.replace(pi,"")};function On(e,t){return new RegExp(e,t)}var Tt;if(wt){var Zt=On("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Tt=function(t,n){var r;Zt.lastIndex=n;var i=Zt.exec(t);return(r=i[1])!==null&&r!==void 0?r:""}}else Tt=function(t,n){for(var r=[];;){var i=Tn(t,n);if(i===void 0||Hn(i)||Ci(i))break;r.push(i),n+=i>=65536?2:1}return St.apply(void 0,r)};var Ti=function(){function e(t,n){n===void 0&&(n={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,n,r){for(var i=[];!this.isEOF();){var o=this.char();if(o===123){var a=this.parseArgument(t,r);if(a.err)return a;i.push(a.val)}else{if(o===125&&t>0)break;if(o===35&&(n==="plural"||n==="selectordinal")){var s=this.clonePosition();this.bump(),i.push({type:L.pound,location:T(s,this.clonePosition())})}else if(o===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(w.UNMATCHED_CLOSING_TAG,T(this.clonePosition(),this.clonePosition()))}else if(o===60&&!this.ignoreTag&&Ot(this.peek()||0)){var a=this.parseTag(t,n);if(a.err)return a;i.push(a.val)}else{var a=this.parseLiteral(t,n);if(a.err)return a;i.push(a.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,n){var r=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:L.literal,value:"<".concat(i,"/>"),location:T(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(t+1,n,!0);if(o.err)return o;var a=o.val,s=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Ot(this.char()))return this.error(w.INVALID_TAG,T(s,this.clonePosition()));var u=this.clonePosition(),l=this.parseTagName();return i!==l?this.error(w.UNMATCHED_CLOSING_TAG,T(u,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:L.tag,value:i,children:a,location:T(r,this.clonePosition())},err:null}:this.error(w.INVALID_TAG,T(s,this.clonePosition())))}else return this.error(w.UNCLOSED_TAG,T(r,this.clonePosition()))}else return this.error(w.INVALID_TAG,T(r,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&Hi(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var r=this.clonePosition(),i="";;){var o=this.tryParseQuote(n);if(o){i+=o;continue}var a=this.tryParseUnquoted(t,n);if(a){i+=a;continue}var s=this.tryParseLeftAngleBracket();if(s){i+=s;continue}break}var u=T(r,this.clonePosition());return{val:{type:L.literal,value:i,location:u},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Oi(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(r===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(r);this.bump()}return St.apply(void 0,n)},e.prototype.tryParseUnquoted=function(t,n){if(this.isEOF())return null;var r=this.char();return r===60||r===123||r===35&&(n==="plural"||n==="selectordinal")||r===125&&t>0?null:(this.bump(),St(r))},e.prototype.parseArgument=function(t,n){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(w.EXPECT_ARGUMENT_CLOSING_BRACE,T(r,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(w.EMPTY_ARGUMENT,T(r,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(w.MALFORMED_ARGUMENT,T(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(w.EXPECT_ARGUMENT_CLOSING_BRACE,T(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:L.argument,value:i,location:T(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(w.EXPECT_ARGUMENT_CLOSING_BRACE,T(r,this.clonePosition())):this.parseArgumentOptions(t,n,i,r);default:return this.error(w.MALFORMED_ARGUMENT,T(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),r=Tt(this.message,n),i=n+r.length;this.bumpTo(i);var o=this.clonePosition(),a=T(t,o);return{value:r,location:a}},e.prototype.parseArgumentOptions=function(t,n,r,i){var o,a=this.clonePosition(),s=this.parseIdentifierIfPossible().value,u=this.clonePosition();switch(s){case"":return this.error(w.EXPECT_ARGUMENT_TYPE,T(a,u));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var h=this.clonePosition(),c=this.parseSimpleArgStyleIfPossible();if(c.err)return c;var d=Si(c.val);if(d.length===0)return this.error(w.EXPECT_ARGUMENT_STYLE,T(this.clonePosition(),this.clonePosition()));var y=T(h,this.clonePosition());l={style:d,styleLocation:y}}var m=this.tryParseArgumentClose(i);if(m.err)return m;var g=T(i,this.clonePosition());if(l&&Xt(l==null?void 0:l.style,"::",0)){var _=wi(l.style.slice(2));if(s==="number"){var c=this.parseNumberSkeletonFromString(_,l.styleLocation);return c.err?c:{val:{type:L.number,value:r,location:g,style:c.val},err:null}}else{if(_.length===0)return this.error(w.EXPECT_DATE_TIME_SKELETON,g);var S=_;this.locale&&(S=hi(_,this.locale));var d={type:Pe.dateTime,pattern:S,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?ri(S):{}},M=s==="date"?L.date:L.time;return{val:{type:M,value:r,location:g,style:d},err:null}}}return{val:{type:s==="number"?L.number:s==="date"?L.date:L.time,value:r,location:g,style:(o=l==null?void 0:l.style)!==null&&o!==void 0?o:null},err:null}}case"plural":case"selectordinal":case"select":{var I=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(w.EXPECT_SELECT_ARGUMENT_OPTIONS,T(I,Ke({},I)));this.bumpSpace();var D=this.parseIdentifierIfPossible(),P=0;if(s!=="select"&&D.value==="offset"){if(!this.bumpIf(":"))return this.error(w.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,T(this.clonePosition(),this.clonePosition()));this.bumpSpace();var c=this.tryParseDecimalInteger(w.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,w.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(c.err)return c;this.bumpSpace(),D=this.parseIdentifierIfPossible(),P=c.val}var N=this.tryParsePluralOrSelectOptions(t,s,n,D);if(N.err)return N;var m=this.tryParseArgumentClose(i);if(m.err)return m;var ne=T(i,this.clonePosition());return s==="select"?{val:{type:L.select,value:r,options:Wt(N.val),location:ne},err:null}:{val:{type:L.plural,value:r,options:Wt(N.val),offset:P,pluralType:s==="plural"?"cardinal":"ordinal",location:ne},err:null}}default:return this.error(w.INVALID_ARGUMENT_TYPE,T(a,u))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(w.EXPECT_ARGUMENT_CLOSING_BRACE,T(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,n=this.clonePosition();!this.isEOF();){var r=this.char();switch(r){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(w.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,T(i,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,n){var r=[];try{r=oi(t)}catch(i){return this.error(w.INVALID_NUMBER_SKELETON,n)}return{val:{type:Pe.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?ui(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,r,i){for(var o,a=!1,s=[],u=new Set,l=i.value,h=i.location;;){if(l.length===0){var c=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var d=this.tryParseDecimalInteger(w.EXPECT_PLURAL_ARGUMENT_SELECTOR,w.INVALID_PLURAL_ARGUMENT_SELECTOR);if(d.err)return d;h=T(c,this.clonePosition()),l=this.message.slice(c.offset,this.offset())}else break}if(u.has(l))return this.error(n==="select"?w.DUPLICATE_SELECT_ARGUMENT_SELECTOR:w.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,h);l==="other"&&(a=!0),this.bumpSpace();var y=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?w.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:w.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,T(this.clonePosition(),this.clonePosition()));var m=this.parseMessage(t+1,n,r);if(m.err)return m;var g=this.tryParseArgumentClose(y);if(g.err)return g;s.push([l,{value:m.val,location:T(y,this.clonePosition())}]),u.add(l),this.bumpSpace(),o=this.parseIdentifierIfPossible(),l=o.value,h=o.location}return s.length===0?this.error(n==="select"?w.EXPECT_SELECT_ARGUMENT_SELECTOR:w.EXPECT_PLURAL_ARGUMENT_SELECTOR,T(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!a?this.error(w.MISSING_OTHER_CLAUSE,T(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var r=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var o=!1,a=0;!this.isEOF();){var s=this.char();if(s>=48&&s<=57)o=!0,a=a*10+(s-48),this.bump();else break}var u=T(i,this.clonePosition());return o?(a*=r,_i(a)?{val:a,err:null}:this.error(n,u)):this.error(t,u)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var n=Tn(this.message,t);if(n===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return n},e.prototype.error=function(t,n){return{val:null,err:{kind:t,message:this.message,location:n}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(Xt(this.message,t,this.offset())){for(var n=0;n<t.length;n++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var n=this.offset(),r=this.message.indexOf(t,n);return r>=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var n=this.offset();if(n===t)break;if(n>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Hn(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),n=this.offset(),r=this.message.charCodeAt(n+(t>=65536?2:1));return r!=null?r:null},e}();function Ot(e){return e>=97&&e<=122||e>=65&&e<=90}function Oi(e){return Ot(e)||e===47}function Hi(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function Hn(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Ci(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function Ht(e){e.forEach(function(t){if(delete t.location,bn(t)||vn(t))for(var n in t.options)delete t.options[n].location,Ht(t.options[n].value);else dn(t)&&En(t.style)||(mn(t)||gn(t))&&xt(t.style)?delete t.style.location:yn(t)&&Ht(t.children)})}function Ai(e,t){t===void 0&&(t={}),t=Ke({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Ti(e,t).parse();if(n.err){var r=SyntaxError(w[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||Ht(n.val),n.val}var Le;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Le||(Le={}));var it=function(e){rt(t,e);function t(n,r,i){var o=e.call(this,n)||this;return o.code=r,o.originalMessage=i,o}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),qt=function(e){rt(t,e);function t(n,r,i,o){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(i).join('", "'),'"'),Le.INVALID_VALUE,o)||this}return t}(it),Bi=function(e){rt(t,e);function t(n,r,i){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),Le.INVALID_VALUE,i)||this}return t}(it),Mi=function(e){rt(t,e);function t(n,r){return e.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(r,'"'),Le.MISSING_VALUE,r)||this}return t}(it),q;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(q||(q={}));function Pi(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==q.literal||n.type!==q.literal?t.push(n):r.value+=n.value,t},[])}function Li(e){return typeof e=="function"}function Qe(e,t,n,r,i,o,a){if(e.length===1&&jt(e[0]))return[{type:q.literal,value:e[0].value}];for(var s=[],u=0,l=e;u<l.length;u++){var h=l[u];if(jt(h)){s.push({type:q.literal,value:h.value});continue}if(ti(h)){typeof o=="number"&&s.push({type:q.literal,value:n.getNumberFormat(t).format(o)});continue}var c=h.value;if(!(i&&c in i))throw new Mi(c,a);var d=i[c];if(ei(h)){(!d||typeof d=="string"||typeof d=="number")&&(d=typeof d=="string"||typeof d=="number"?String(d):""),s.push({type:typeof d=="string"?q.literal:q.object,value:d});continue}if(mn(h)){var y=typeof h.style=="string"?r.date[h.style]:xt(h.style)?h.style.parsedOptions:void 0;s.push({type:q.literal,value:n.getDateTimeFormat(t,y).format(d)});continue}if(gn(h)){var y=typeof h.style=="string"?r.time[h.style]:xt(h.style)?h.style.parsedOptions:r.time.medium;s.push({type:q.literal,value:n.getDateTimeFormat(t,y).format(d)});continue}if(dn(h)){var y=typeof h.style=="string"?r.number[h.style]:En(h.style)?h.style.parsedOptions:void 0;y&&y.scale&&(d=d*(y.scale||1)),s.push({type:q.literal,value:n.getNumberFormat(t,y).format(d)});continue}if(yn(h)){var m=h.children,g=h.value,_=i[g];if(!Li(_))throw new Bi(g,"function",a);var S=Qe(m,t,n,r,i,o),M=_(S.map(function(P){return P.value}));Array.isArray(M)||(M=[M]),s.push.apply(s,M.map(function(P){return{type:typeof P=="string"?q.literal:q.object,value:P}}))}if(bn(h)){var I=h.options[d]||h.options.other;if(!I)throw new qt(h.value,d,Object.keys(h.options),a);s.push.apply(s,Qe(I.value,t,n,r,i));continue}if(vn(h)){var I=h.options["=".concat(d)];if(!I){if(!Intl.PluralRules)throw new it(`Intl.PluralRules is not available in this environment.
|
|
2
|
+
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
3
|
+
`,Le.MISSING_INTL_API,a);var D=n.getPluralRules(t,{type:h.pluralType}).select(d-(h.offset||0));I=h.options[D]||h.options.other}if(!I)throw new qt(h.value,d,Object.keys(h.options),a);s.push.apply(s,Qe(I.value,t,n,r,i,d-(h.offset||0)));continue}}return Pi(s)}function Ii(e,t){return t?ae(ae(ae({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=ae(ae({},e[r]),t[r]||{}),n},{})):e}function Ni(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=Ii(e[r],t[r]),n},ae({},e)):e}function bt(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function Ri(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:dt(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,pt([void 0],n,!1)))},{cache:bt(e.number),strategy:mt.variadic}),getDateTimeFormat:dt(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,pt([void 0],n,!1)))},{cache:bt(e.dateTime),strategy:mt.variadic}),getPluralRules:dt(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,pt([void 0],n,!1)))},{cache:bt(e.pluralRules),strategy:mt.variadic})}}var ki=function(){function e(t,n,r,i){n===void 0&&(n=e.defaultLocale);var o=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(u){var l=o.formatToParts(u);if(l.length===1)return l[0].value;var h=l.reduce(function(c,d){return!c.length||d.type!==q.literal||typeof c[c.length-1]!="string"?c.push(d.value):c[c.length-1]+=d.value,c},[]);return h.length<=1?h[0]||"":h},this.formatToParts=function(u){return Qe(o.ast,o.locales,o.formatters,o.formats,u,void 0,o.message)},this.resolvedOptions=function(){var u;return{locale:((u=o.resolvedLocale)===null||u===void 0?void 0:u.toString())||Intl.NumberFormat.supportedLocalesOf(o.locales)[0]}},this.getAst=function(){return o.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var a=i||{};a.formatters;var s=Xr(a,["formatters"]);this.ast=e.__parse(t,ae(ae({},s),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=Ni(e.formats,r),this.formatters=i&&i.formatters||Ri(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(typeof Intl.Locale!="undefined"){var n=Intl.NumberFormat.supportedLocalesOf(t);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=Ai,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();function Di(e,t){if(t==null)return;if(t in e)return e[t];const n=t.split(".");let r=e;for(let i=0;i<n.length;i++)if(typeof r=="object"){if(i>0){const o=n.slice(i,n.length).join(".");if(o in r){r=r[o];break}}r=r[n[i]]}else r=void 0;return r}const de={},Ui=(e,t,n)=>n&&(t in de||(de[t]={}),e in de[t]||(de[t][e]=n),n),Cn=(e,t)=>{if(t==null)return;if(t in de&&e in de[t])return de[t][e];const n=ot(t);for(let r=0;r<n.length;r++){const i=n[r],o=Fi(i,e);if(o)return Ui(e,t,o)}};let Mt;const Xe=nt({});function Gi(e){return Mt[e]||null}function An(e){return e in Mt}function Fi(e,t){if(!An(e))return null;const n=Gi(e);return Di(n,t)}function ji(e){if(e==null)return;const t=ot(e);for(let n=0;n<t.length;n++){const r=t[n];if(An(r))return r}}function Bn(e,...t){delete de[e],Xe.update(n=>(n[e]=$r.all([n[e]||{},...t]),n))}Ne([Xe],([e])=>Object.keys(e));Xe.subscribe(e=>Mt=e);const Je={};function Vi(e,t){Je[e].delete(t),Je[e].size===0&&delete Je[e]}function Mn(e){return Je[e]}function zi(e){return ot(e).map(t=>{const n=Mn(t);return[t,n?[...n]:[]]}).filter(([,t])=>t.length>0)}function Ct(e){return e==null?!1:ot(e).some(t=>{var n;return(n=Mn(t))==null?void 0:n.size})}function $i(e,t){return Promise.all(t.map(r=>(Vi(e,r),r().then(i=>i.default||i)))).then(r=>Bn(e,...r))}const Fe={};function Pn(e){if(!Ct(e))return e in Fe?Fe[e]:Promise.resolve();const t=zi(e);return Fe[e]=Promise.all(t.map(([n,r])=>$i(n,r))).then(()=>{if(Ct(e))return Pn(e);delete Fe[e]}),Fe[e]}const Xi={number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},Wi={fallbackLocale:null,loadingDelay:200,formats:Xi,warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0},Zi=Wi;function Ie(){return Zi}const vt=nt(!1);var qi=Object.defineProperty,Qi=Object.defineProperties,Ji=Object.getOwnPropertyDescriptors,Qt=Object.getOwnPropertySymbols,Yi=Object.prototype.hasOwnProperty,Ki=Object.prototype.propertyIsEnumerable,Jt=(e,t,n)=>t in e?qi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,eo=(e,t)=>{for(var n in t||(t={}))Yi.call(t,n)&&Jt(e,n,t[n]);if(Qt)for(var n of Qt(t))Ki.call(t,n)&&Jt(e,n,t[n]);return e},to=(e,t)=>Qi(e,Ji(t));let At;const et=nt(null);function Yt(e){return e.split("-").map((t,n,r)=>r.slice(0,n+1).join("-")).reverse()}function ot(e,t=Ie().fallbackLocale){const n=Yt(e);return t?[...new Set([...n,...Yt(t)])]:n}function xe(){return At!=null?At:void 0}et.subscribe(e=>{At=e!=null?e:void 0,typeof window!="undefined"&&e!=null&&document.documentElement.setAttribute("lang",e)});const no=e=>{if(e&&ji(e)&&Ct(e)){const{loadingDelay:t}=Ie();let n;return typeof window!="undefined"&&xe()!=null&&t?n=window.setTimeout(()=>vt.set(!0),t):vt.set(!0),Pn(e).then(()=>{et.set(e)}).finally(()=>{clearTimeout(n),vt.set(!1)})}return et.set(e)},Re=to(eo({},et),{set:no}),st=e=>{const t=Object.create(null);return r=>{const i=JSON.stringify(r);return i in t?t[i]:t[i]=e(r)}};var ro=Object.defineProperty,tt=Object.getOwnPropertySymbols,Ln=Object.prototype.hasOwnProperty,In=Object.prototype.propertyIsEnumerable,Kt=(e,t,n)=>t in e?ro(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Pt=(e,t)=>{for(var n in t||(t={}))Ln.call(t,n)&&Kt(e,n,t[n]);if(tt)for(var n of tt(t))In.call(t,n)&&Kt(e,n,t[n]);return e},ke=(e,t)=>{var n={};for(var r in e)Ln.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&tt)for(var r of tt(e))t.indexOf(r)<0&&In.call(e,r)&&(n[r]=e[r]);return n};const $e=(e,t)=>{const{formats:n}=Ie();if(e in n&&t in n[e])return n[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},io=st(e=>{var t=e,{locale:n,format:r}=t,i=ke(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return r&&(i=$e("number",r)),new Intl.NumberFormat(n,i)}),oo=st(e=>{var t=e,{locale:n,format:r}=t,i=ke(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return r?i=$e("date",r):Object.keys(i).length===0&&(i=$e("date","short")),new Intl.DateTimeFormat(n,i)}),so=st(e=>{var t=e,{locale:n,format:r}=t,i=ke(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return r?i=$e("time",r):Object.keys(i).length===0&&(i=$e("time","short")),new Intl.DateTimeFormat(n,i)}),ao=(e={})=>{var t=e,{locale:n=xe()}=t,r=ke(t,["locale"]);return io(Pt({locale:n},r))},lo=(e={})=>{var t=e,{locale:n=xe()}=t,r=ke(t,["locale"]);return oo(Pt({locale:n},r))},uo=(e={})=>{var t=e,{locale:n=xe()}=t,r=ke(t,["locale"]);return so(Pt({locale:n},r))},ho=st((e,t=xe())=>new ki(e,t,Ie().formats,{ignoreTag:Ie().ignoreTag})),co=(e,t={})=>{var n,r,i,o;let a=t;typeof e=="object"&&(a=e,e=a.id);const{values:s,locale:u=xe(),default:l}=a;if(u==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let h=Cn(e,u);if(!h)h=(o=(i=(r=(n=Ie()).handleMissingMessage)==null?void 0:r.call(n,{locale:u,id:e,defaultValue:l}))!=null?i:l)!=null?o:e;else if(typeof h!="string")return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof h}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),h;if(!s)return h;let c=h;try{c=ho(h,u).format(s)}catch(d){d instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,d.message)}return c},fo=(e,t)=>uo(t).format(e),po=(e,t)=>lo(t).format(e),mo=(e,t)=>ao(t).format(e),go=(e,t=xe())=>Cn(e,t),bo=Ne([Re,Xe],()=>co);Ne([Re],()=>fo);Ne([Re],()=>po);Ne([Re],()=>mo);Ne([Re,Xe],()=>go);function en(e,t){Bn(e,t)}function vo(e){Re.set(e)}const tn={en:{otpTitle:"Code verification is required",popupMessage:"Please enter the security code received on your SMS/email address to perform the update.",popupMessageLastWarning:"If the next validation attempt is failed, your transaction will fail and you will be returned back to payment method.",minutes:"minutes",errorHeader:"Error",configError:"Unable to load OTP data. Please try again later.",otpHeading:"Enter OTP",resendOtp:"Resent OTP",submit:"Submit",close:"Close",invalidOtp:"The code you've sent is not valid. Please try again.",accountBlocked:"Too many attempts for OTP. Your account has been blocked for one hour.",submissionError:"Something went wrong. Please try again.",otpExpiredMessage:"Validation code has expired, please request a new one to continue.",timeRemaining:"Code expires in:",selectChannelTitle:"Select verification method",selectChannelMessage:"Choose how you would like to receive your verification code",channelSMS:"SMS",channelEmail:"Email",sendCode:"Send code",waitSeconds:"Please wait for before resending:"},tr:{otpTitle:"Kod doğrulaması gereklidir",popupMessage:"Güncellemeyi gerçekleştirmek için SMS/e-posta adresinize gönderilen güvenlik kodunu girin.",popupMessageLastWarning:"Bir sonraki doğrulama denemesi başarısız olursa, işleminiz başarısız olacak ve ödeme yöntemine geri döndürüleceksiniz.",minutes:"dakika",errorHeader:"Hata",configError:"OTP verileri yüklenemedi. Lütfen daha sonra tekrar deneyin.",otpHeading:"OTP Girin",resendOtp:"OTP'yi Yeniden Gönder",submit:"Gönder",close:"Kapat",invalidOtp:"Gönderdiğiniz kod geçerli değil. Lütfen tekrar deneyin.",accountBlocked:"OTP için çok fazla deneme yapıldı. Hesabınız bir saat süreyle engellenmiştir.",submissionError:"Bir şeyler ters gitti. Lütfen tekrar deneyin.",otpExpiredMessage:"Doğrulama kodunun süresi doldu, devam etmek için lütfen yeni bir kod isteyin.",timeRemaining:"Kodun süresi doluyor:",selectChannelTitle:"Doğrulama yöntemi seçin",selectChannelMessage:"Doğrulama kodunuzu nasıl almak istediğinizi seçin",channelSMS:"SMS kodu",channelEmail:"E-posta kodu",sendCode:"Kodu gönder",waitSeconds:"Tekrar göndermeden önce lütfen bekleyin:"},fr:{otpTitle:"La vérification par code est requise",popupMessage:"Veuillez saisir le code de sécurité reçu par SMS ou par e-mail afin d'effectuer la mise à jour.",popupMessageLastWarning:"Si la prochaine tentative de validation échoue, votre transaction échouera et vous serez redirigé vers le moyen de paiement.",minutes:"minutes",errorHeader:"Erreur",configError:"Impossible de charger les données OTP. Veuillez réessayer plus tard.",otpHeading:"Saisir le code OTP",resendOtp:"Renvoyer le code OTP",submit:"Valider",close:"Fermer",invalidOtp:"Le code que vous avez saisi n'est pas valide. Veuillez réessayer.",accountBlocked:"Trop de tentatives de code OTP. Votre compte a été bloqué pendant une heure.",submissionError:"Une erreur s'est produite. Veuillez réessayer.",otpExpiredMessage:"Le code de validation a expiré. Veuillez en demander un nouveau pour continuer.",timeRemaining:"Le code expire dans :",selectChannelTitle:"Sélectionner la méthode de vérification",selectChannelMessage:"Choisissez comment vous souhaitez recevoir votre code de vérification",channelSMS:"SMS",channelEmail:"E-mail",sendCode:"Envoyer le code",waitSeconds:"Veuillez patienter avant de renvoyer le code :"},da:{otpTitle:"Kodebekræftelse er påkrævet",popupMessage:"Indtast venligst sikkerhedskoden modtaget på din SMS/e-mailadresse for at udføre opdateringen.",popupMessageLastWarning:"Hvis det næste valideringsforsøg mislykkes, vil din transaktion mislykkes, og du vil blive sendt tilbage til betalingsmetoden.",minutes:"minutter",errorHeader:"Fejl",configError:"Kan ikke indlæse OTP-data. Prøv venligst igen senere.",otpHeading:"Indtast OTP",resendOtp:"Send OTP igen",submit:"Indsend",close:"Luk",invalidOtp:"Koden du har sendt er ikke gyldig. Prøv venligst igen.",accountBlocked:"For mange forsøg på OTP. Din konto er blevet blokeret i en time.",submissionError:"Noget gik galt. Prøv venligst igen.",otpExpiredMessage:"Valideringskoden er udløbet. Anmod venligst om en ny for at fortsætte.",timeRemaining:"Koden udløber om:",selectChannelTitle:"Vælg bekræftelsesmetode",selectChannelMessage:"Vælg, hvordan du gerne vil modtage din bekræftelseskode",channelSMS:"SMS",channelEmail:"E-mail",sendCode:"Send kode",waitSeconds:"Vent venligst før genafsendelse:"},de:{otpTitle:"Code-Verifizierung ist erforderlich",popupMessage:"Bitte geben Sie den Sicherheitscode ein, den Sie per SMS/E-Mail erhalten haben, um die Aktualisierung durchzuführen.",popupMessageLastWarning:"Wenn der nächste Validierungsversuch fehlschlägt, schlägt Ihre Transaktion fehl und Sie werden zur Zahlungsmethode zurückgeleitet.",minutes:"Minuten",errorHeader:"Fehler",configError:"OTP-Daten können nicht geladen werden. Bitte versuchen Sie es später erneut.",otpHeading:"OTP eingeben",resendOtp:"OTP erneut senden",submit:"Absenden",close:"Schließen",invalidOtp:"Der von Ihnen gesendete Code ist ungültig. Bitte versuchen Sie es erneut.",accountBlocked:"Zu viele OTP-Versuche. Ihr Konto wurde für eine Stunde gesperrt.",submissionError:"Etwas ist schiefgelaufen. Bitte versuchen Sie es erneut.",otpExpiredMessage:"Der Validierungscode ist abgelaufen. Bitte fordern Sie einen neuen an, um fortzufahren.",timeRemaining:"Code läuft ab in:",selectChannelTitle:"Verifizierungsmethode auswählen",selectChannelMessage:"Wählen Sie, wie Sie Ihren Verifizierungscode erhalten möchten",channelSMS:"SMS",channelEmail:"E-Mail",sendCode:"Code senden",waitSeconds:"Bitte warten Sie, bevor Sie erneut senden:"},nl:{otpTitle:"Codeverificatie is vereist",popupMessage:"Voer de beveiligingscode in die u via SMS/e-mail heeft ontvangen om de update uit te voeren.",popupMessageLastWarning:"Als de volgende validatiepoging mislukt, zal uw transactie mislukken en wordt u teruggestuurd naar de betaalmethode.",minutes:"minuten",errorHeader:"Fout",configError:"Kan OTP-gegevens niet laden. Probeer het later opnieuw.",otpHeading:"OTP invoeren",resendOtp:"OTP opnieuw verzenden",submit:"Verzenden",close:"Sluiten",invalidOtp:"De code die u heeft verzonden is niet geldig. Probeer het opnieuw.",accountBlocked:"Te veel OTP-pogingen. Uw account is voor één uur geblokkeerd.",submissionError:"Er is iets misgegaan. Probeer het opnieuw.",otpExpiredMessage:"De validatiecode is verlopen. Vraag een nieuwe aan om door te gaan.",timeRemaining:"Code verloopt over:",selectChannelTitle:"Verificatiemethode selecteren",selectChannelMessage:"Kies hoe u uw verificatiecode wilt ontvangen",channelSMS:"SMS",channelEmail:"E-mail",sendCode:"Code verzenden",waitSeconds:"Wacht even voordat u opnieuw verzendt:"}};function yo(e){nr(e,"svelte-gpy3mu",'*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:inherit}.RadioIndicator{width:20px;height:20px;border-radius:50%;border:2px solid var(--emw--color-typography, #fff);position:relative;flex-shrink:0;margin-right:8px;transition:all 0.2s ease;opacity:0.7}.RadioIndicator.checked::after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:10px;height:10px;border-radius:50%;opacity:1;background:var(--emw--color-primary, #fff)}.RadioIndicator.checked{border:2px solid var(--emw--color-primary, #fff)}.ModalCloseIcon{padding:0px;position:absolute;right:0;top:0;margin:15px 20px;z-index:20;transition:all 0.3s ease}.ModalCloseIcon svg{width:11px;height:11px;fill:var(--emw--color-primary, red);cursor:pointer}.ModalCloseIcon:hover{transform:rotate(90deg)}.OtpContent{width:100%;display:flex;flex-direction:column;gap:var(--emw--spacing-large, 20px)}.OtpFieldWrapper{display:flex;flex-direction:column;gap:10px}.OtpFieldWrapper h2{margin:0}.OtpButton{text-transform:uppercase;font-weight:var(--emw--font-weight-medium, 500);color:var(--emw--color-typography-button, #000000);text-align:center;font-size:var(--emw--font-size-medium, 16px);font-style:normal;font-family:inherit;height:46px;line-height:normal;border:none;background:var(--emw--color-primary, #f9c408);border-radius:10px;width:100%;margin:var(--emw--spacing-small, 12px) 0;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:var(--emw--spacing-2x-small-plus, 5px);transition:all 0.2s linear}.OtpButton:active{box-shadow:inset 0px 0px 0px 1px rgba(255, 255, 255, 0.2);background-color:var(--emw--color-active, #fecd1c)}.OtpButton[disabled],.OtpButton.disabled{filter:saturate(50%);opacity:0.5;cursor:not-allowed;pointer-events:none}.OtpButton:hover:not([disabled]):not(.disabled){box-shadow:inset 0px 0px 0px 1px rgba(255, 255, 255, 0.2);background-color:var(--emw--color-hover, #dbac03)}@container (max-width: 500px){.OtpDescription{font-size:var(--emw--font-size-small, 12px)}.OtpDescription .Title{font-size:var(--emw--font-size-big, 20px)}}.OtpDescription{display:flex;color:var(--emw--color-typography, #fff);flex-direction:column;gap:12px;font-size:var(--emw--font-size-small, 12px)}.OtpDescription .Title{font-size:var(--emw--font-medium, 16px);font-weight:var(--emw--font-weight-medium, 600)}.OtpError{display:flex;flex-direction:column;gap:20px;align-items:center}.OtpError .OtpErrorHeader{display:flex;justify-content:center;gap:5px;align-items:center}.OtpError h2{margin:0;color:var(--emw--color-typography, #fff)}.OtpError p{color:var(--emw--color-typography, #fff);text-align:center;font-size:var(--emw--font-size-small, 12px)}.OtpError svg{width:25px;fill:var(--emw--color-error, #dd3434)}.ChannelSelection{display:flex;flex-direction:row;justify-content:space-between}.ChannelCheckbox{display:flex;align-items:center;padding:var(--emw--spacing-medium, 16px);cursor:pointer;transition:all 0.2s ease}.ChannelCheckbox input[type=radio]{display:none}.ChannelCheckbox .ChannelContent{display:flex;align-items:center;gap:3px;width:100%;color:var(--emw--color-typography, #fff);font-size:var(--emw--font-size-medium, 16px);font-weight:var(--emw--font-weight-medium, 500)}.ChannelCheckbox .ChannelContent svg{flex-shrink:0;opacity:0.7;width:20px;height:20px}.ChannelCheckbox .ChannelContent span{text-transform:uppercase}.ChannelCheckbox.selected .ChannelContent{color:var(--emw--color-primary, #000000)}.ChannelCheckbox.selected .ChannelContent svg{stroke:var(--emw--color-primary, #000000);opacity:1}.ChannelCheckbox:hover:not(.selected){color:var(--emw--color-active, #fff)}.OtpField{display:flex;justify-content:space-between;margin:10px}.OtpField input{width:45px;font-size:32px;padding:5px;text-align:center;border-radius:5px;margin:6px;font-weight:bold;outline:none;background:var(--emw--color-background);border:0;transition:all 0.1s;box-shadow:inset 0px 0px 0px 1px rgba(255, 255, 255, 0.3);color:var(--emw--color-typography, #fff)}.OtpField input.space{margin-right:1rem !important}.OtpField input:focus{box-shadow:0 0 1px 1px var(--emw--color-primary, #007bff)}.OtpActionButtons{display:flex;justify-content:space-between;gap:40px}.OtpErrorMessage{color:var(--emw--color-error, #dd3434);font-weight:bold}.OtpNoticeMessage{color:var(--emw--color-primary, #f9c408);font-weight:bold}.LastWarningMessage{color:var(--emw--color-error, #dd3434);font-weight:bold}.OtpLoaderContainer{width:100%;display:flex;justify-content:center;align-items:center;padding:20px 0}.OtpLoader{width:48px;height:48px;border:5px solid var(--emw--color-secondary, #b3d8ff);border-bottom-color:var(--emw--color-primary, #007bff);border-radius:50%;display:inline-block;box-sizing:border-box;animation:rotation 1s linear infinite}@keyframes rotation{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.OtpTimer{color:var(--emw--color-typography, #fff);font-size:var(--emw--font-size-small, 12px);opacity:0.8}@container (max-width: 500px){.OtpContent{padding:var(--emw--spacing-small, 10px)}.OtpField input{width:40px;font-size:28px;margin:4px}}')}function nn(e,t,n){const r=e.slice();return r[69]=t[n],r[70]=t,r[71]=n,r}function Eo(e){let t,n,r,i,o,a,s,u,l,h,c,d,y,m,g,_,S,M=e[19]("channelSMS")+"",I,D,P,N,ne,Q,le,me,ue,B,U,Z,ge,be,ve=e[19]("channelEmail")+"",J,De,Y,X,re,ye,we;function Se(b,C){return b[9]?So:b[12]?xo:wo}let he=Se(e),K=he(e),W=e[0]&&on(e);function Ue(b,C){if(b[3]&&b[12])return Bo;if(b[12]&&b[4])return Ao}let fe=Ue(e),z=fe&&fe(e);function Ge(b,C){if(b[9])return Po;if(b[12]&&b[4])return Mo}let pe=Ge(e),F=pe&&pe(e);return{c(){t=O("div"),K.c(),n=j(),r=O("div"),i=O("label"),o=O("div"),a=j(),s=O("input"),l=j(),h=O("div"),c=ie("svg"),d=ie("path"),y=ie("circle"),m=ie("circle"),g=ie("circle"),_=j(),S=O("span"),I=k(M),D=j(),P=O("label"),N=O("div"),ne=j(),Q=O("input"),me=j(),ue=O("div"),B=ie("svg"),U=ie("rect"),Z=ie("path"),ge=j(),be=O("span"),J=k(ve),De=j(),W&&W.c(),Y=j(),z&&z.c(),X=j(),re=O("div"),F&&F.c(),p(t,"class","OtpDescription"),p(o,"class","RadioIndicator"),oe(o,"checked",e[0]===e[20].SMS),p(s,"type","radio"),p(s,"name","channel"),s.value=e[20].SMS,s.checked=u=e[0]===e[20].SMS,p(d,"d","M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"),p(y,"cx","9"),p(y,"cy","11"),p(y,"r","0.5"),p(y,"fill","currentColor"),p(m,"cx","12"),p(m,"cy","11"),p(m,"r","0.5"),p(m,"fill","currentColor"),p(g,"cx","15"),p(g,"cy","11"),p(g,"r","0.5"),p(g,"fill","currentColor"),p(c,"xmlns","http://www.w3.org/2000/svg"),p(c,"width","24"),p(c,"height","24"),p(c,"viewBox","0 0 24 24"),p(c,"fill","none"),p(c,"stroke","currentColor"),p(c,"stroke-width","2"),p(c,"stroke-linecap","round"),p(c,"stroke-linejoin","round"),p(h,"class","ChannelContent"),p(i,"class","ChannelCheckbox"),oe(i,"selected",e[0]===e[20].SMS),p(N,"class","RadioIndicator"),oe(N,"checked",e[0]===e[20].EMAIL),p(Q,"type","radio"),p(Q,"name","channel"),Q.value=e[20].EMAIL,Q.checked=le=e[0]===e[20].EMAIL,p(U,"x","2"),p(U,"y","4"),p(U,"width","20"),p(U,"height","16"),p(U,"rx","2"),p(Z,"d","m2 7 10 6 10-6"),p(B,"xmlns","http://www.w3.org/2000/svg"),p(B,"width","24"),p(B,"height","24"),p(B,"viewBox","0 0 24 24"),p(B,"fill","none"),p(B,"stroke","currentColor"),p(B,"stroke-width","2"),p(B,"stroke-linecap","round"),p(B,"stroke-linejoin","round"),p(ue,"class","ChannelContent"),p(P,"class","ChannelCheckbox"),oe(P,"selected",e[0]===e[20].EMAIL),p(r,"class","ChannelSelection"),p(re,"class","OtpActionButtons")},m(b,C){A(b,t,C),K.m(t,null),A(b,n,C),A(b,r,C),v(r,i),v(i,o),v(i,a),v(i,s),v(i,l),v(i,h),v(h,c),v(c,d),v(c,y),v(c,m),v(c,g),v(h,_),v(h,S),v(S,I),v(r,D),v(r,P),v(P,N),v(P,ne),v(P,Q),v(P,me),v(P,ue),v(ue,B),v(B,U),v(B,Z),v(ue,ge),v(ue,be),v(be,J),A(b,De,C),W&&W.m(b,C),A(b,Y,C),z&&z.m(b,C),A(b,X,C),A(b,re,C),F&&F.m(re,null),ye||(we=[ce(s,"change",e[39]),ce(Q,"change",e[40])],ye=!0)},p(b,C){he===(he=Se(b))&&K?K.p(b,C):(K.d(1),K=he(b),K&&(K.c(),K.m(t,null))),C[0]&1048577&&oe(o,"checked",b[0]===b[20].SMS),C[0]&1&&u!==(u=b[0]===b[20].SMS)&&(s.checked=u),C[0]&524288&&M!==(M=b[19]("channelSMS")+"")&&V(I,M),C[0]&1048577&&oe(i,"selected",b[0]===b[20].SMS),C[0]&1048577&&oe(N,"checked",b[0]===b[20].EMAIL),C[0]&1&&le!==(le=b[0]===b[20].EMAIL)&&(Q.checked=le),C[0]&524288&&ve!==(ve=b[19]("channelEmail")+"")&&V(J,ve),C[0]&1048577&&oe(P,"selected",b[0]===b[20].EMAIL),b[0]?W?W.p(b,C):(W=on(b),W.c(),W.m(Y.parentNode,Y)):W&&(W.d(1),W=null),fe===(fe=Ue(b))&&z?z.p(b,C):(z&&z.d(1),z=fe&&fe(b),z&&(z.c(),z.m(X.parentNode,X))),pe===(pe=Ge(b))&&F?F.p(b,C):(F&&F.d(1),F=pe&&pe(b),F&&(F.c(),F.m(re,null)))},d(b){b&&(H(t),H(n),H(r),H(De),H(Y),H(X),H(re)),K.d(),W&&W.d(b),z&&z.d(b),F&&F.d(),ye=!1,_e(we)}}}function _o(e){let t,n,r,i,o,a,s=e[19]("errorHeader")+"",u,l,h,c,d,y,m=e[19]("close")+"",g,_,S;return{c(){t=O("div"),n=O("div"),r=ie("svg"),i=ie("path"),o=j(),a=O("h2"),u=k(s),l=j(),h=O("p"),c=k(e[8]),d=j(),y=O("button"),g=k(m),p(i,"d","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"),p(r,"xmlns","http://www.w3.org/2000/svg"),p(r,"viewBox","0 0 512 512"),p(n,"class","OtpErrorHeader"),p(y,"class","OtpButton error"),p(t,"class","OtpError")},m(M,I){A(M,t,I),v(t,n),v(n,r),v(r,i),v(n,o),v(n,a),v(a,u),v(t,l),v(t,h),v(h,c),v(t,d),v(t,y),v(y,g),_||(S=ce(y,"click",e[28]),_=!0)},p(M,I){I[0]&524288&&s!==(s=M[19]("errorHeader")+"")&&V(u,s),I[0]&256&&V(c,M[8]),I[0]&524288&&m!==(m=M[19]("close")+"")&&V(g,m)},d(M){M&&H(t),_=!1,S()}}}function xo(e){let t,n,r,i;function o(l,h){return l[10]?Oo:To}let a=o(e),s=a(e),u=e[6]&&rn(e);return{c(){t=O("p"),s.c(),r=j(),u&&u.c(),i=sr(),p(t,"class",n=e[10]?"LastWarningMessage":"")},m(l,h){A(l,t,h),s.m(t,null),A(l,r,h),u&&u.m(l,h),A(l,i,h)},p(l,h){a===(a=o(l))&&s?s.p(l,h):(s.d(1),s=a(l),s&&(s.c(),s.m(t,null))),h[0]&1024&&n!==(n=l[10]?"LastWarningMessage":"")&&p(t,"class",n),l[6]?u?u.p(l,h):(u=rn(l),u.c(),u.m(i.parentNode,i)):u&&(u.d(1),u=null)},d(l){l&&(H(t),H(r),H(i)),s.d(),u&&u.d(l)}}}function wo(e){let t,n=(e[19]("selectChannelMessage")||"Selectează metoda prin care vrei să primești codul OTP")+"",r;return{c(){t=O("p"),r=k(n)},m(i,o){A(i,t,o),v(t,r)},p(i,o){o[0]&524288&&n!==(n=(i[19]("selectChannelMessage")||"Selectează metoda prin care vrei să primești codul OTP")+"")&&V(r,n)},d(i){i&&H(t)}}}function So(e){let t,n=e[19]("otpExpiredMessage")+"",r;return{c(){t=O("p"),r=k(n),p(t,"class","OtpNoticeMessage"),p(t,"role","alert")},m(i,o){A(i,t,o),v(t,r)},p(i,o){o[0]&524288&&n!==(n=i[19]("otpExpiredMessage")+"")&&V(r,n)},d(i){i&&H(t)}}}function To(e){let t=e[19]("popupMessage")+"",n;return{c(){n=k(t)},m(r,i){A(r,n,i)},p(r,i){i[0]&524288&&t!==(t=r[19]("popupMessage")+"")&&V(n,t)},d(r){r&&H(n)}}}function Oo(e){let t=e[19]("popupMessageLastWarning")+"",n;return{c(){n=k(t)},m(r,i){A(r,n,i)},p(r,i){i[0]&524288&&t!==(t=r[19]("popupMessageLastWarning")+"")&&V(n,t)},d(r){r&&H(n)}}}function rn(e){let t,n;return{c(){t=O("p"),n=k(e[8]),p(t,"class","OtpErrorMessage"),p(t,"role","alert")},m(r,i){A(r,t,i),v(t,n)},p(r,i){i[0]&256&&V(n,r[8])},d(r){r&&H(t)}}}function on(e){let t,n,r,i;function o(u,l){return u[17]>0?Co:Ho}let a=o(e),s=a(e);return{c(){t=O("button"),s.c(),p(t,"class","OtpButton"),t.disabled=n=!e[18],oe(t,"disabled",!e[18]||e[16])},m(u,l){A(u,t,l),s.m(t,null),r||(i=ce(t,"click",e[22]),r=!0)},p(u,l){a===(a=o(u))&&s?s.p(u,l):(s.d(1),s=a(u),s&&(s.c(),s.m(t,null))),l[0]&262144&&n!==(n=!u[18])&&(t.disabled=n),l[0]&327680&&oe(t,"disabled",!u[18]||u[16])},d(u){u&&H(t),s.d(),r=!1,i()}}}function Ho(e){let t=e[19]("sendCode")+"",n;return{c(){n=k(t)},m(r,i){A(r,n,i)},p(r,i){i[0]&524288&&t!==(t=r[19]("sendCode")+"")&&V(n,t)},d(r){r&&H(n)}}}function Co(e){let t=e[19]("waitSeconds")+"",n,r,i,o;return{c(){n=k(t),r=k(" ("),i=k(e[17]),o=k("s)")},m(a,s){A(a,n,s),A(a,r,s),A(a,i,s),A(a,o,s)},p(a,s){s[0]&524288&&t!==(t=a[19]("waitSeconds")+"")&&V(n,t),s[0]&131072&&V(i,a[17])},d(a){a&&(H(n),H(r),H(i),H(o))}}}function Ao(e){let t,n,r=e[19]("timeRemaining")+"",i,o,a=e[23](e[5])+"",s,u,l=e[19]("minutes")+"",h,c,d,y=Gt(e[2]),m=[];for(let g=0;g<y.length;g+=1)m[g]=sn(nn(e,y,g));return{c(){t=O("div"),n=O("div"),i=k(r),o=j(),s=k(a),u=j(),h=k(l),c=j(),d=O("div");for(let g=0;g<m.length;g+=1)m[g].c();p(n,"class","OtpTimer"),p(d,"class","OtpField"),p(t,"class","OtpFieldWrapper")},m(g,_){A(g,t,_),v(t,n),v(n,i),v(n,o),v(n,s),v(n,u),v(n,h),v(t,c),v(t,d);for(let S=0;S<m.length;S+=1)m[S]&&m[S].m(d,null)},p(g,_){if(_[0]&524288&&r!==(r=g[19]("timeRemaining")+"")&&V(i,r),_[0]&32&&a!==(a=g[23](g[5])+"")&&V(s,a),_[0]&524288&&l!==(l=g[19]("minutes")+"")&&V(h,l),_[0]&117458964){y=Gt(g[2]);let S;for(S=0;S<y.length;S+=1){const M=nn(g,y,S);m[S]?m[S].p(M,_):(m[S]=sn(M),m[S].c(),m[S].m(d,null))}for(;S<m.length;S+=1)m[S].d(1);m.length=y.length}},d(g){g&&H(t),or(m,g)}}}function Bo(e){let t;return{c(){t=O("div"),t.innerHTML='<span class="OtpLoader"></span>',p(t,"class","OtpLoaderContainer")},m(n,r){A(n,t,r)},p:te,d(n){n&&H(t)}}}function sn(e){let t,n,r,i=e[71],o,a;const s=()=>e[41](t,i),u=()=>e[41](null,i);function l(...c){return e[42](e[71],...c)}function h(...c){return e[43](e[71],...c)}return{c(){t=O("input"),p(t,"id",`otp-input-${e[71]}`),p(t,"type","text"),p(t,"class",n=`otp-box ${e[4].inputLength%2===0&&e[71]===e[4].inputLength/2-1?"space":""}`),p(t,"maxlength",1),t.value=r=e[69],p(t,"inputmode","numeric"),t.disabled=e[11],p(t,"autocomplete","off")},m(c,d){A(c,t,d),s(),o||(a=[ce(t,"input",l),ce(t,"keydown",h),ce(t,"paste",e[24])],o=!0)},p(c,d){e=c,d[0]&16&&n!==(n=`otp-box ${e[4].inputLength%2===0&&e[71]===e[4].inputLength/2-1?"space":""}`)&&p(t,"class",n),d[0]&4&&r!==(r=e[69])&&t.value!==r&&(t.value=r),d[0]&2048&&(t.disabled=e[11]),i!==e[71]&&(u(),i=e[71],s())},d(c){c&&H(t),u(),o=!1,_e(a)}}}function Mo(e){let t,n=e[19]("submit")+"",r,i,o,a;return{c(){t=O("button"),r=k(n),p(t,"class","OtpButton"),t.disabled=i=e[2].join("").length!==e[4].inputLength||e[13]||e[15]},m(s,u){A(s,t,u),v(t,r),o||(a=ce(t,"click",e[29]),o=!0)},p(s,u){u[0]&524288&&n!==(n=s[19]("submit")+"")&&V(r,n),u[0]&40980&&i!==(i=s[2].join("").length!==s[4].inputLength||s[13]||s[15])&&(t.disabled=i)},d(s){s&&H(t),o=!1,a()}}}function Po(e){let t,n=e[19]("resendOtp")+"",r,i,o;return{c(){t=O("button"),r=k(n),p(t,"class","OtpButton")},m(a,s){A(a,t,s),v(t,r),i||(o=ce(t,"click",e[27]),i=!0)},p(a,s){s[0]&524288&&n!==(n=a[19]("resendOtp")+"")&&V(r,n)},d(a){a&&H(t),i=!1,o()}}}function Lo(e){let t;function n(o,a){return o[7]?_o:Eo}let r=n(e),i=r(e);return{c(){t=O("div"),i.c(),p(t,"class","OtpContent")},m(o,a){A(o,t,a),i.m(t,null),e[44](t)},p(o,a){r===(r=n(o))&&i?i.p(o,a):(i.d(1),i=r(o),i&&(i.c(),i.m(t,null)))},i:te,o:te,d(o){o&&H(t),i.d(),e[44](null)}}}function Io(e,t,n){let r,i,o;tr(e,bo,f=>n(19,o=f));let{clientstyling:a=""}=t,{clientstylingurl:s=""}=t,{mbsource:u}=t,{lang:l="en"}=t,{endpoint:h}=t,{session:c}=t,{translationurl:d}=t,{templateid:y}=t,m=[],g=!0,_=null,S=0,M="",I="",D=!1,P=!1,N="",ne="",Q="",le=!1,me=!1,ue=!1,B="",U={},Z=null,ge=!1,be=!1,ve="",J,De,Y=[],X=null,re=0,ye=!1,we=!1;const Se={SMS:"sms",EMAIL:"email"},he={MAX_ATTEMPTS_EXCEEDED:"gm.twofa.token_max_attempts_exceeded",INTERNAL_SERVER_ERROR:"gm.multifactorauthentication.internal_server_error",MAX_INVALIDATE:"gm.multifactorauthentication.challenge_internal_server_error"};Object.keys(tn).forEach(f=>{en(f,tn[f])});const K=()=>{vo(l)},W=()=>{fetch(d).then(f=>f.json()).then(f=>{Object.keys(f).forEach(E=>{en(E,f[E])})}).catch(f=>{console.log(f)})},Ue=f=>Ee(this,null,function*(){var E;if((E=f.detail)!=null&&E["x-step-up-required"]){if(n(7,P=!1),n(6,D=!1),n(8,N=""),ne=f.detail["x-step-up-token"],Q=f.detail.flow,!ne||!Q){n(3,g=!1),n(7,P=!0),n(8,N=o("configError"));return}n(12,ge=!1),n(3,g=!1)}}),fe=()=>{X&&(clearInterval(X),X=null),Z&&(clearInterval(Z),Z=null),n(6,D=!1),n(7,P=!1),n(8,N=""),n(10,me=!1),n(2,m=[]),n(4,_=null),n(3,g=!0),n(0,B=""),n(12,ge=!1),n(38,U={})},z=()=>{fe()},Ge=()=>new Promise((f,E)=>{const x=new URL(`${h}/api/pam/v1/mfa/challenge/${ne}`),G=new Headers;G.append("accept","application/json"),G.append("Content-Type","application/json"),G.append("X-SessionId",`${c}`),n(16,we=!0);const Te={method:"PATCH",headers:G,body:JSON.stringify({channel:B,templateId:y})};fetch(x,Te).then(Rt=>Rt.json()).then(()=>{n(15,ye=!1),C(),at(),f()}).catch(Rt=>{E()})}),pe=()=>{Z&&clearInterval(Z),Z=setInterval(()=>{const f=We({},U);let E=!1;Object.keys(f).forEach(x=>{f[x]>0&&(f[x]--,E=!0)}),n(38,U=f),!E&&Z&&(clearInterval(Z),Z=null)},1e3)},F=f=>{n(0,B=f)},b=()=>Ee(this,null,function*(){if(!(!B||U[B]&&U[B]>0)){n(3,g=!0),y&&y.startsWith("2fa-")&&n(30,y=`2fa-${B}`);try{yield Ge(),yield ut(),n(38,U=ct(We({},U),{[B]:30})),pe(),n(12,ge=!0),C(),at()}catch(f){console.error("Error submitting channel:",f),n(6,D=!0),n(8,N=o("submissionError"))}finally{n(3,g=!1)}}}),C=()=>{const f=new Date(M),E=new Date(I),x=new Date,G=E.getTime()-x.getTime();re=f.getTime()-G;const $=Date.now(),Te=Math.max(0,Math.floor((re-$)/1e3));n(5,S=Te)},at=()=>{X&&clearInterval(X),X=setInterval(()=>{const f=Date.now(),E=Math.max(0,Math.floor((re-f)/1e3));n(5,S=E),n(11,ue=E<=0),E<=0&&(clearInterval(X),X=null,n(9,le=!0),n(6,D=!1),n(10,me=!1))},1e3)},Rn=f=>{const E=Math.floor(f/60),x=f%60;return`${E.toString().padStart(2,"0")}:${x.toString().padStart(2,"0")}`},lt=(f,E)=>{const x=[...m];x[f]=E.toUpperCase(),n(2,m=x),x.join("")!==ve&&n(13,be=!1)},kn=f=>{var G,$,Te;f.preventDefault();const x=((($=(G=f.clipboardData)==null?void 0:G.getData("text"))==null?void 0:$.trim())||"").slice(0,_.inputLength).split("");n(2,m=[...x,...Array(_.inputLength-x.length).fill("")]),(Te=Y[x.length])==null||Te.focus(),x.length===_.inputLength&&Nt()},Lt=(f,E)=>{const x=f.target,G=x.value;if(/^[a-z0-9]$/i.test(G)){lt(E,G);const $=Y[E+1];$==null||$.focus()}x.value=""},It=(f,E)=>{const x=f.key,G=f.ctrlKey||f.metaKey;if(/^[a-z0-9]$/i.test(x)){if(G&&x.toLowerCase()==="v")return;f.preventDefault(),lt(E,x);const $=Y[E+1];$==null||$.focus()}else if(x==="Backspace"){f.preventDefault(),m[E]!==""&<(E,"");const $=Y[E-1];$==null||$.focus()}},Dn=()=>{Q=="stateful"&&(Ge(),n(9,le=!1));const f=new CustomEvent("otpResendRequested");window.dispatchEvent(f)},Un=f=>{window.dispatchEvent(new CustomEvent("otpSubmitted",{detail:{code:f,maxAttempts:_.maxValidationAttempts,validatedAttempts:_.numberOfValidateAttempts}}))},Gn=f=>Ee(this,null,function*(){const E=new URL(`/api/nwa/api/v1/mfa/challenge/${ne}/validate`,h);E.searchParams.append("input",f);try{const x=yield fetch(E.href,{method:"POST"});if(x.status===200){Fn();return}const G=yield x.json();throw new Error(G.message)}catch(x){if(yield ut(),x.message===he.INTERNAL_SERVER_ERROR){if(_.numberOfValidateAttempts===_.maxValidationAttempts-1){window.dispatchEvent(new CustomEvent("otpSetTimeout")),window.postMessage({type:"WidgetNotification",data:{type:"error",message:o("accountBlocked")}},window.location.href),window.dispatchEvent(new CustomEvent("manualClosePopup"));return}n(6,D=!0),n(8,N=o("invalidOtp")),ut();return}x.message===he.MAX_INVALIDATE&&(n(6,D=!0),n(8,N=o("invalidOtp"))),x.details===he.MAX_ATTEMPTS_EXCEEDED&&n(15,ye=!0),console.error("OTP submission failed:",x),n(6,D=!0),n(8,N=o("submissionError"))}finally{n(3,g=!1)}}),Fn=()=>{window.dispatchEvent(new CustomEvent("otpSuccess",{detail:{message:"User successfully authenticated"}}))},jn=()=>{window.dispatchEvent(new CustomEvent("manualClosePopup"))},Nt=()=>Ee(this,null,function*(){if(m.join("").length!==_.inputLength){n(6,D=!0),n(8,N=o("invalidOtp"));return}const f=m.join("");n(13,be=!0),ve=f,n(3,g=!0),n(6,D=!1),n(8,N=""),Q==="stateless"&&Un(f),Q==="stateful"&&(yield Gn(f))}),ut=()=>Ee(this,null,function*(){if(h)try{n(3,g=!0);const f=new URL(`/api/nwa/api/v1/mfa/challenge/${ne}/config`,h),E=yield fetch(f.href),x=yield E.json();if(E.ok)n(4,_=x),n(2,m=Array(_.inputLength).fill("")),n(9,le=!1),M=_.expirationTime,I=_.serverTime,_.numberOfValidateAttempts!==0&&(n(6,D=!0),n(8,N=o("invalidOtp"))),_.numberOfValidateAttempts===_.maxValidationAttempts-1&&n(10,me=!0),n(3,g=!1),C(),at(),n(16,we=!1);else if(x&&x.details===he.MAX_ATTEMPTS_EXCEEDED)window.dispatchEvent(new CustomEvent("manualClosePopup"));else{const G=x&&x.message||`Failed to load config. Status: ${E.status}`;throw new Error(G)}}catch(f){n(3,g=!1),n(7,P=!0),n(8,N=o("configError")),window.dispatchEvent(new CustomEvent("2fa-loading",{detail:{isLoading:!1}})),console.error("Error loading 2FA config:",f)}});hr(()=>(window.addEventListener("stepUpAuthRequired",Ue,!1),window.addEventListener("closePopup",z,!1),()=>{window.removeEventListener("stepUpAuthRequired",Ue),window.removeEventListener("closePopup",z,!1),X&&clearInterval(X),Z&&clearInterval(Z)}));const Vn=()=>F(Se.SMS),zn=()=>F(Se.EMAIL);function $n(f,E){Ye[f?"unshift":"push"](()=>{Y[E]=f,n(14,Y)})}const Xn=(f,E)=>Lt(E,f),Wn=(f,E)=>It(E,f);function Zn(f){Ye[f?"unshift":"push"](()=>{J=f,n(1,J)})}return e.$$set=f=>{"clientstyling"in f&&n(31,a=f.clientstyling),"clientstylingurl"in f&&n(32,s=f.clientstylingurl),"mbsource"in f&&n(33,u=f.mbsource),"lang"in f&&n(34,l=f.lang),"endpoint"in f&&n(35,h=f.endpoint),"session"in f&&n(36,c=f.session),"translationurl"in f&&n(37,d=f.translationurl),"templateid"in f&&n(30,y=f.templateid)},e.$$.update=()=>{e.$$.dirty[0]&2|e.$$.dirty[1]&1&&a&&J&&Sr(J,a),e.$$.dirty[0]&2|e.$$.dirty[1]&2&&s&&J&&Tr(J,s),e.$$.dirty[0]&2|e.$$.dirty[1]&4&&u&&J&&Or(J,`${u}.Style`,De),e.$$.dirty[1]&8&&l&&K(),e.$$.dirty[1]&72&&l&&d&&W(),e.$$.dirty[0]&1|e.$$.dirty[1]&128&&n(18,r=B&&(!U[B]||U[B]===0)),e.$$.dirty[0]&1|e.$$.dirty[1]&128&&n(17,i=B&&U[B]||0)},[B,J,m,g,_,S,D,P,N,le,me,ue,ge,be,Y,ye,we,i,r,o,Se,F,b,Rn,kn,Lt,It,Dn,jn,Nt,y,a,s,u,l,h,c,d,U,Vn,zn,$n,Xn,Wn,Zn]}class Nn extends xr{constructor(t){super(),Er(this,t,Io,Lo,ln,{clientstyling:31,clientstylingurl:32,mbsource:33,lang:34,endpoint:35,session:36,translationurl:37,templateid:30},yo,[-1,-1,-1])}get clientstyling(){return this.$$.ctx[31]}set clientstyling(t){this.$$set({clientstyling:t}),se()}get clientstylingurl(){return this.$$.ctx[32]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),se()}get mbsource(){return this.$$.ctx[33]}set mbsource(t){this.$$set({mbsource:t}),se()}get lang(){return this.$$.ctx[34]}set lang(t){this.$$set({lang:t}),se()}get endpoint(){return this.$$.ctx[35]}set endpoint(t){this.$$set({endpoint:t}),se()}get session(){return this.$$.ctx[36]}set session(t){this.$$set({session:t}),se()}get translationurl(){return this.$$.ctx[37]}set translationurl(t){this.$$set({translationurl:t}),se()}get templateid(){return this.$$.ctx[30]}set templateid(t){this.$$set({templateid:t}),se()}}_r(Nn,{clientstyling:{},clientstylingurl:{},mbsource:{},lang:{},endpoint:{},session:{},translationurl:{},templateid:{}},[],[],!0);exports.default=Nn;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";if(typeof window!="undefined"){let s=function(t){return function(...n){try{return t.apply(this,n)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw e}}};customElements.define=s(customElements.define),Promise.resolve().then(()=>require("../components/CashierStepUp-
|
|
1
|
+
"use strict";if(typeof window!="undefined"){let s=function(t){return function(...n){try{return t.apply(this,n)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw e}}};customElements.define=s(customElements.define),Promise.resolve().then(()=>require("../components/CashierStepUp-E4BcBowq.cjs")).then(({default:t})=>{!customElements.get("cashier-step-up")&&customElements.define("cashier-step-up",t.element)})}
|
|
@@ -10,7 +10,7 @@ if (typeof window != "undefined") {
|
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
|
-
customElements.define = n(customElements.define), import("../components/CashierStepUp-
|
|
13
|
+
customElements.define = n(customElements.define), import("../components/CashierStepUp-BVxmAwHQ.js").then(({ default: t }) => {
|
|
14
14
|
!customElements.get("cashier-step-up") && customElements.define("cashier-step-up", t.element);
|
|
15
15
|
});
|
|
16
16
|
}
|
package/package.json
CHANGED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";var Zr=Object.defineProperty,qr=Object.defineProperties;var Qr=Object.getOwnPropertyDescriptors;var kt=Object.getOwnPropertySymbols;var Jr=Object.prototype.hasOwnProperty,Yr=Object.prototype.propertyIsEnumerable;var ht=(e,t,r)=>t in e?Zr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,We=(e,t)=>{for(var r in t||(t={}))Jr.call(t,r)&&ht(e,r,t[r]);if(kt)for(var r of kt(t))Yr.call(t,r)&&ht(e,r,t[r]);return e},ct=(e,t)=>qr(e,Qr(t));var ee=(e,t,r)=>(ht(e,typeof t!="symbol"?t+"":t,r),r);var Ee=(e,t,r)=>new Promise((n,i)=>{var o=u=>{try{s(r.next(u))}catch(l){i(l)}},a=u=>{try{s(r.throw(u))}catch(l){i(l)}},s=u=>u.done?n(u.value):Promise.resolve(u.value).then(o,a);s((r=r.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function te(){}function sr(e){return e()}function Dt(){return Object.create(null)}function ve(e){e.forEach(sr)}function Bt(e){return typeof e=="function"}function ar(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function Kr(e){return Object.keys(e).length===0}function lr(e,...t){if(e==null){for(const n of t)n(void 0);return te}const r=e.subscribe(...t);return r.unsubscribe?()=>r.unsubscribe():r}function en(e,t,r){e.$$.on_destroy.push(lr(t,r))}function y(e,t){e.appendChild(t)}function tn(e,t,r){const n=rn(e);if(!n.getElementById(t)){const i=O("style");i.id=t,i.textContent=r,nn(n,i)}}function rn(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function nn(e,t){return y(e.head||e,t),t.sheet}function C(e,t,r){e.insertBefore(t,r||null)}function H(e){e.parentNode&&e.parentNode.removeChild(e)}function on(e,t){for(let r=0;r<e.length;r+=1)e[r]&&e[r].d(t)}function O(e){return document.createElement(e)}function ie(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function k(e){return document.createTextNode(e)}function j(){return k(" ")}function sn(){return k("")}function ce(e,t,r,n){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r,n)}function p(e,t,r){r==null?e.removeAttribute(t):e.getAttribute(t)!==r&&e.setAttribute(t,r)}function an(e){return Array.from(e.childNodes)}function V(e,t){t=""+t,e.data!==t&&(e.data=t)}function oe(e,t,r){e.classList.toggle(t,!!r)}function ln(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}let Ve;function je(e){Ve=e}function un(){if(!Ve)throw new Error("Function called outside component initialization");return Ve}function hn(e){un().$$.on_mount.push(e)}const Ae=[],Ye=[];let Be=[];const Ut=[],cn=Promise.resolve();let _t=!1;function fn(){_t||(_t=!0,cn.then(se))}function Et(e){Be.push(e)}const ft=new Set;let Oe=0;function se(){if(Oe!==0)return;const e=Ve;do{try{for(;Oe<Ae.length;){const t=Ae[Oe];Oe++,je(t),pn(t.$$)}}catch(t){throw Ae.length=0,Oe=0,t}for(je(null),Ae.length=0,Oe=0;Ye.length;)Ye.pop()();for(let t=0;t<Be.length;t+=1){const r=Be[t];ft.has(r)||(ft.add(r),r())}Be.length=0}while(Ae.length);for(;Ut.length;)Ut.pop()();_t=!1,ft.clear(),je(e)}function pn(e){if(e.fragment!==null){e.update(),ve(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(Et)}}function dn(e){const t=[],r=[];Be.forEach(n=>e.indexOf(n)===-1?t.push(n):r.push(n)),r.forEach(n=>n()),Be=t}const mn=new Set;function gn(e,t){e&&e.i&&(mn.delete(e),e.i(t))}function Gt(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function bn(e,t,r){const{fragment:n,after_update:i}=e.$$;n&&n.m(t,r),Et(()=>{const o=e.$$.on_mount.map(sr).filter(Bt);e.$$.on_destroy?e.$$.on_destroy.push(...o):ve(o),e.$$.on_mount=[]}),i.forEach(Et)}function yn(e,t){const r=e.$$;r.fragment!==null&&(dn(r.after_update),ve(r.on_destroy),r.fragment&&r.fragment.d(t),r.on_destroy=r.fragment=null,r.ctx=[])}function _n(e,t){e.$$.dirty[0]===-1&&(Ae.push(e),fn(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function En(e,t,r,n,i,o,a=null,s=[-1]){const u=Ve;je(e);const l=e.$$={fragment:null,ctx:[],props:o,update:te,not_equal:i,bound:Dt(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:Dt(),dirty:s,skip_bound:!1,root:t.target||u.$$.root};a&&a(l.root);let h=!1;if(l.ctx=r?r(e,t.props||{},(c,d,..._)=>{const m=_.length?_[0]:d;return l.ctx&&i(l.ctx[c],l.ctx[c]=m)&&(!l.skip_bound&&l.bound[c]&&l.bound[c](m),h&&_n(e,c)),d}):[],l.update(),h=!0,ve(l.before_update),l.fragment=n?n(l.ctx):!1,t.target){if(t.hydrate){const c=an(t.target);l.fragment&&l.fragment.l(c),c.forEach(H)}else l.fragment&&l.fragment.c();t.intro&&gn(e.$$.fragment),bn(e,t.target,t.anchor),se()}je(u)}let ur;typeof HTMLElement=="function"&&(ur=class extends HTMLElement{constructor(t,r,n){super();ee(this,"$$ctor");ee(this,"$$s");ee(this,"$$c");ee(this,"$$cn",!1);ee(this,"$$d",{});ee(this,"$$r",!1);ee(this,"$$p_d",{});ee(this,"$$l",{});ee(this,"$$l_u",new Map);this.$$ctor=t,this.$$s=r,n&&this.attachShadow({mode:"open"})}addEventListener(t,r,n){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(r),this.$$c){const i=this.$$c.$on(t,r);this.$$l_u.set(r,i)}super.addEventListener(t,r,n)}removeEventListener(t,r,n){if(super.removeEventListener(t,r,n),this.$$c){const i=this.$$l_u.get(r);i&&(i(),this.$$l_u.delete(r))}}connectedCallback(){return Ee(this,null,function*(){if(this.$$cn=!0,!this.$$c){let t=function(o){return()=>{let a;return{c:function(){a=O("slot"),o!=="default"&&p(a,"name",o)},m:function(l,h){C(l,a,h)},d:function(l){l&&H(a)}}}};if(yield Promise.resolve(),!this.$$cn||this.$$c)return;const r={},n=ln(this);for(const o of this.$$s)o in n&&(r[o]=[t(o)]);for(const o of this.attributes){const a=this.$$g_p(o.name);a in this.$$d||(this.$$d[a]=qe(a,o.value,this.$$p_d,"toProp"))}for(const o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:ct(We({},this.$$d),{$$slots:r,$$scope:{ctx:[]}})});const i=()=>{this.$$r=!0;for(const o in this.$$p_d)if(this.$$d[o]=this.$$c.$$.ctx[this.$$c.$$.props[o]],this.$$p_d[o].reflect){const a=qe(o,this.$$d[o],this.$$p_d,"toAttribute");a==null?this.removeAttribute(this.$$p_d[o].attribute||o):this.setAttribute(this.$$p_d[o].attribute||o,a)}this.$$r=!1};this.$$c.$$.after_update.push(i),i();for(const o in this.$$l)for(const a of this.$$l[o]){const s=this.$$c.$on(o,a);this.$$l_u.set(a,s)}this.$$l={}}})}attributeChangedCallback(t,r,n){var i;this.$$r||(t=this.$$g_p(t),this.$$d[t]=qe(t,n,this.$$p_d,"toProp"),(i=this.$$c)==null||i.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(t){return Object.keys(this.$$p_d).find(r=>this.$$p_d[r].attribute===t||!this.$$p_d[r].attribute&&r.toLowerCase()===t)||t}});function qe(e,t,r,n){var o;const i=(o=r[e])==null?void 0:o.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!r[e])return t;if(n==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t==null?null:t;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function vn(e,t,r,n,i,o){let a=class extends ur{constructor(){super(e,r,i),this.$$p_d=t}static get observedAttributes(){return Object.keys(t).map(s=>(t[s].attribute||s).toLowerCase())}};return Object.keys(t).forEach(s=>{Object.defineProperty(a.prototype,s,{get(){return this.$$c&&s in this.$$c?this.$$c[s]:this.$$d[s]},set(u){var l;u=qe(s,u,t),this.$$d[s]=u,(l=this.$$c)==null||l.$set({[s]:u})}})}),n.forEach(s=>{Object.defineProperty(a.prototype,s,{get(){var u;return(u=this.$$c)==null?void 0:u[s]}})}),e.element=a,a}class xn{constructor(){ee(this,"$$");ee(this,"$$set")}$destroy(){yn(this,1),this.$destroy=te}$on(t,r){if(!Bt(r))return te;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(r),()=>{const i=n.indexOf(r);i!==-1&&n.splice(i,1)}}$set(t){this.$$set&&!Kr(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const wn="4";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(wn);const Ce="__WIDGET_GLOBAL_STYLE_CACHE__";function Sn(e,t){if(e){const r=document.createElement("style");r.innerHTML=t,e.appendChild(r)}}function Tn(e,t){if(!e||!t)return;const r=new URL(t);fetch(r.href).then(n=>n.text()).then(n=>{const i=document.createElement("style");i.innerHTML=n,e&&e.appendChild(i)}).catch(n=>{console.error("There was an error while trying to load client styling from URL",n)})}function On(e,t,r,n=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!n)return r=Hn(e,t),r;window[Ce]||(window[Ce]={}),r=An(e,t);const o=r.unsubscribe.bind(r),a=()=>{if(window[Ce][t]){const s=window[Ce][t];s.refCount>1?s.refCount=s.refCount-1:delete window[Ce][t]}o()};return r.unsubscribe=a,r}function Hn(e,t){const r=document.createElement("style");return window.emMessageBus.subscribe(t,n=>{e&&(r.innerHTML=n,e.appendChild(r))})}function An(e,t){return window.emMessageBus.subscribe(t,r=>{if(!e)return;const n=e.getRootNode(),i=window[Ce];let o=i[t]&&i[t].sheet;o?i[t].refCount=i[t].refCount+1:(o=new CSSStyleSheet,o.replaceSync(r),i[t]={sheet:o,refCount:1});const a=n.adoptedStyleSheets||[];a.includes(o)||(n.adoptedStyleSheets=[...a,o])})}const He=[];function Cn(e,t){return{subscribe:rt(e,t).subscribe}}function rt(e,t=te){let r;const n=new Set;function i(s){if(ar(e,s)&&(e=s,r)){const u=!He.length;for(const l of n)l[1](),He.push(l,e);if(u){for(let l=0;l<He.length;l+=2)He[l][0](He[l+1]);He.length=0}}}function o(s){i(s(e))}function a(s,u=te){const l=[s,u];return n.add(l),n.size===1&&(r=t(i,o)||te),s(e),()=>{n.delete(l),n.size===0&&r&&(r(),r=null)}}return{set:i,update:o,subscribe:a}}function Ne(e,t,r){const n=!Array.isArray(e),i=n?[e]:e;if(!i.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const o=t.length<2;return Cn(r,(a,s)=>{let u=!1;const l=[];let h=0,c=te;const d=()=>{if(h)return;c();const m=t(n?l[0]:l,a,s);o?a(m):c=Bt(m)?m:te},_=i.map((m,g)=>lr(m,v=>{l[g]=v,h&=~(1<<g),u&&d()},()=>{h|=1<<g}));return u=!0,d(),function(){ve(_),c(),u=!1}})}function Bn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pn=function(t){return Mn(t)&&!Ln(t)};function Mn(e){return!!e&&typeof e=="object"}function Ln(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||Rn(e)}var In=typeof Symbol=="function"&&Symbol.for,Nn=In?Symbol.for("react.element"):60103;function Rn(e){return e.$$typeof===Nn}function kn(e){return Array.isArray(e)?[]:{}}function $e(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Pe(kn(e),e,t):e}function Dn(e,t,r){return e.concat(t).map(function(n){return $e(n,r)})}function Un(e,t){if(!t.customMerge)return Pe;var r=t.customMerge(e);return typeof r=="function"?r:Pe}function Gn(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function Ft(e){return Object.keys(e).concat(Gn(e))}function hr(e,t){try{return t in e}catch(r){return!1}}function Fn(e,t){return hr(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function jn(e,t,r){var n={};return r.isMergeableObject(e)&&Ft(e).forEach(function(i){n[i]=$e(e[i],r)}),Ft(t).forEach(function(i){Fn(e,i)||(hr(e,i)&&r.isMergeableObject(t[i])?n[i]=Un(i,r)(e[i],t[i],r):n[i]=$e(t[i],r))}),n}function Pe(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||Dn,r.isMergeableObject=r.isMergeableObject||Pn,r.cloneUnlessOtherwiseSpecified=$e;var n=Array.isArray(t),i=Array.isArray(e),o=n===i;return o?n?r.arrayMerge(e,t,r):jn(e,t,r):$e(t,r)}Pe.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(n,i){return Pe(n,i,r)},{})};var Vn=Pe,$n=Vn;const zn=Bn($n);var vt=function(e,t){return vt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},vt(e,t)};function nt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");vt(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var ae=function(){return ae=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},ae.apply(this,arguments)};function Xn(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function pt(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}function dt(e,t){var r=t&&t.cache?t.cache:Kn,n=t&&t.serializer?t.serializer:Jn,i=t&&t.strategy?t.strategy:qn;return i(e,{cache:r,serializer:n})}function Wn(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Zn(e,t,r,n){var i=Wn(n)?n:r(n),o=t.get(i);return typeof o=="undefined"&&(o=e.call(this,n),t.set(i,o)),o}function cr(e,t,r){var n=Array.prototype.slice.call(arguments,3),i=r(n),o=t.get(i);return typeof o=="undefined"&&(o=e.apply(this,n),t.set(i,o)),o}function fr(e,t,r,n,i){return r.bind(t,e,n,i)}function qn(e,t){var r=e.length===1?Zn:cr;return fr(e,this,r,t.cache.create(),t.serializer)}function Qn(e,t){return fr(e,this,cr,t.cache.create(),t.serializer)}var Jn=function(){return JSON.stringify(arguments)},Yn=function(){function e(){this.cache=Object.create(null)}return e.prototype.get=function(t){return this.cache[t]},e.prototype.set=function(t,r){this.cache[t]=r},e}(),Kn={create:function(){return new Yn}},mt={variadic:Qn},Ke=function(){return Ke=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},Ke.apply(this,arguments)};var w;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(w||(w={}));var L;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(L||(L={}));var Me;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Me||(Me={}));function jt(e){return e.type===L.literal}function ei(e){return e.type===L.argument}function pr(e){return e.type===L.number}function dr(e){return e.type===L.date}function mr(e){return e.type===L.time}function gr(e){return e.type===L.select}function br(e){return e.type===L.plural}function ti(e){return e.type===L.pound}function yr(e){return e.type===L.tag}function _r(e){return!!(e&&typeof e=="object"&&e.type===Me.number)}function xt(e){return!!(e&&typeof e=="object"&&e.type===Me.dateTime)}var Er=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,ri=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function ni(e){var t={};return e.replace(ri,function(r){var n=r.length;switch(r[0]){case"G":t.era=n===4?"long":n===5?"narrow":"short";break;case"y":t.year=n===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=n===4?"long":n===5?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][n-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][n-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][n-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][n-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][n-1];break;case"s":t.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=n<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var R=function(){return R=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},R.apply(this,arguments)};var ii=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function oi(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(ii).filter(function(d){return d.length>0}),r=[],n=0,i=t;n<i.length;n++){var o=i[n],a=o.split("/");if(a.length===0)throw new Error("Invalid number skeleton");for(var s=a[0],u=a.slice(1),l=0,h=u;l<h.length;l++){var c=h[l];if(c.length===0)throw new Error("Invalid number skeleton")}r.push({stem:s,options:u})}return r}function si(e){return e.replace(/^(.*?)-/,"")}var Vt=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,vr=/^(@+)?(\+|#+)?[rs]?$/g,ai=/(\*)(0+)|(#+)(0+)|(0+)/g,xr=/^(0+)$/;function $t(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(vr,function(r,n,i){return typeof i!="string"?(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length):i==="+"?t.minimumSignificantDigits=n.length:n[0]==="#"?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+(typeof i=="string"?i.length:0)),""}),t}function wr(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function li(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var r=e.slice(0,2);if(r==="+!"?(t.signDisplay="always",e=e.slice(2)):r==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!xr.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function zt(e){var t={},r=wr(e);return r||t}function ui(e){for(var t={},r=0,n=e;r<n.length;r++){var i=n[r];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=si(i.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=R(R(R({},t),{notation:"scientific"}),i.options.reduce(function(u,l){return R(R({},u),zt(l))},{}));continue;case"engineering":t=R(R(R({},t),{notation:"engineering"}),i.options.reduce(function(u,l){return R(R({},u),zt(l))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(i.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(ai,function(u,l,h,c,d,_){if(l)t.minimumIntegerDigits=h.length;else{if(c&&d)throw new Error("We currently do not support maximum integer digits");if(_)throw new Error("We currently do not support exact integer digits")}return""});continue}if(xr.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(Vt.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(Vt,function(u,l,h,c,d,_){return h==="*"?t.minimumFractionDigits=l.length:c&&c[0]==="#"?t.maximumFractionDigits=c.length:d&&_?(t.minimumFractionDigits=d.length,t.maximumFractionDigits=d.length+_.length):(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length),""});var o=i.options[0];o==="w"?t=R(R({},t),{trailingZeroDisplay:"stripIfInteger"}):o&&(t=R(R({},t),$t(o)));continue}if(vr.test(i.stem)){t=R(R({},t),$t(i.stem));continue}var a=wr(i.stem);a&&(t=R(R({},t),a));var s=li(i.stem);s&&(t=R(R({},t),s))}return t}var Ze={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function hi(e,t){for(var r="",n=0;n<e.length;n++){var i=e.charAt(n);if(i==="j"){for(var o=0;n+1<e.length&&e.charAt(n+1)===i;)o++,n++;var a=1+(o&1),s=o<2?1:3+(o>>1),u="a",l=ci(t);for((l=="H"||l=="k")&&(s=0);s-- >0;)r+=u;for(;a-- >0;)r=l+r}else i==="J"?r+="H":r+=i}return r}function ci(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r=e.language,n;r!=="root"&&(n=e.maximize().region);var i=Ze[n||""]||Ze[r||""]||Ze["".concat(r,"-001")]||Ze["001"];return i[0]}var gt,fi=new RegExp("^".concat(Er.source,"*")),pi=new RegExp("".concat(Er.source,"*$"));function T(e,t){return{start:e,end:t}}var di=!!String.prototype.startsWith&&"_a".startsWith("a",1),mi=!!String.fromCodePoint,gi=!!Object.fromEntries,bi=!!String.prototype.codePointAt,yi=!!String.prototype.trimStart,_i=!!String.prototype.trimEnd,Ei=!!Number.isSafeInteger,vi=Ei?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},wt=!0;try{var xi=Tr("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");wt=((gt=xi.exec("a"))===null||gt===void 0?void 0:gt[0])==="a"}catch(e){wt=!1}var Xt=di?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},St=mi?String.fromCodePoint:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var n="",i=t.length,o=0,a;i>o;){if(a=t[o++],a>1114111)throw RangeError(a+" is not a valid code point");n+=a<65536?String.fromCharCode(a):String.fromCharCode(((a-=65536)>>10)+55296,a%1024+56320)}return n},Wt=gi?Object.fromEntries:function(t){for(var r={},n=0,i=t;n<i.length;n++){var o=i[n],a=o[0],s=o[1];r[a]=s}return r},Sr=bi?function(t,r){return t.codePointAt(r)}:function(t,r){var n=t.length;if(!(r<0||r>=n)){var i=t.charCodeAt(r),o;return i<55296||i>56319||r+1===n||(o=t.charCodeAt(r+1))<56320||o>57343?i:(i-55296<<10)+(o-56320)+65536}},wi=yi?function(t){return t.trimStart()}:function(t){return t.replace(fi,"")},Si=_i?function(t){return t.trimEnd()}:function(t){return t.replace(pi,"")};function Tr(e,t){return new RegExp(e,t)}var Tt;if(wt){var Zt=Tr("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Tt=function(t,r){var n;Zt.lastIndex=r;var i=Zt.exec(t);return(n=i[1])!==null&&n!==void 0?n:""}}else Tt=function(t,r){for(var n=[];;){var i=Sr(t,r);if(i===void 0||Or(i)||Ai(i))break;n.push(i),r+=i>=65536?2:1}return St.apply(void 0,n)};var Ti=function(){function e(t,r){r===void 0&&(r={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!r.ignoreTag,this.locale=r.locale,this.requiresOtherClause=!!r.requiresOtherClause,this.shouldParseSkeletons=!!r.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,r,n){for(var i=[];!this.isEOF();){var o=this.char();if(o===123){var a=this.parseArgument(t,n);if(a.err)return a;i.push(a.val)}else{if(o===125&&t>0)break;if(o===35&&(r==="plural"||r==="selectordinal")){var s=this.clonePosition();this.bump(),i.push({type:L.pound,location:T(s,this.clonePosition())})}else if(o===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(w.UNMATCHED_CLOSING_TAG,T(this.clonePosition(),this.clonePosition()))}else if(o===60&&!this.ignoreTag&&Ot(this.peek()||0)){var a=this.parseTag(t,r);if(a.err)return a;i.push(a.val)}else{var a=this.parseLiteral(t,r);if(a.err)return a;i.push(a.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,r){var n=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:L.literal,value:"<".concat(i,"/>"),location:T(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(t+1,r,!0);if(o.err)return o;var a=o.val,s=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Ot(this.char()))return this.error(w.INVALID_TAG,T(s,this.clonePosition()));var u=this.clonePosition(),l=this.parseTagName();return i!==l?this.error(w.UNMATCHED_CLOSING_TAG,T(u,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:L.tag,value:i,children:a,location:T(n,this.clonePosition())},err:null}:this.error(w.INVALID_TAG,T(s,this.clonePosition())))}else return this.error(w.UNCLOSED_TAG,T(n,this.clonePosition()))}else return this.error(w.INVALID_TAG,T(n,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&Hi(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,r){for(var n=this.clonePosition(),i="";;){var o=this.tryParseQuote(r);if(o){i+=o;continue}var a=this.tryParseUnquoted(t,r);if(a){i+=a;continue}var s=this.tryParseLeftAngleBracket();if(s){i+=s;continue}break}var u=T(n,this.clonePosition());return{val:{type:L.literal,value:i,location:u},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Oi(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var r=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(n===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(n);this.bump()}return St.apply(void 0,r)},e.prototype.tryParseUnquoted=function(t,r){if(this.isEOF())return null;var n=this.char();return n===60||n===123||n===35&&(r==="plural"||r==="selectordinal")||n===125&&t>0?null:(this.bump(),St(n))},e.prototype.parseArgument=function(t,r){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(w.EXPECT_ARGUMENT_CLOSING_BRACE,T(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(w.EMPTY_ARGUMENT,T(n,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(w.MALFORMED_ARGUMENT,T(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(w.EXPECT_ARGUMENT_CLOSING_BRACE,T(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:L.argument,value:i,location:T(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(w.EXPECT_ARGUMENT_CLOSING_BRACE,T(n,this.clonePosition())):this.parseArgumentOptions(t,r,i,n);default:return this.error(w.MALFORMED_ARGUMENT,T(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),n=Tt(this.message,r),i=r+n.length;this.bumpTo(i);var o=this.clonePosition(),a=T(t,o);return{value:n,location:a}},e.prototype.parseArgumentOptions=function(t,r,n,i){var o,a=this.clonePosition(),s=this.parseIdentifierIfPossible().value,u=this.clonePosition();switch(s){case"":return this.error(w.EXPECT_ARGUMENT_TYPE,T(a,u));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var h=this.clonePosition(),c=this.parseSimpleArgStyleIfPossible();if(c.err)return c;var d=Si(c.val);if(d.length===0)return this.error(w.EXPECT_ARGUMENT_STYLE,T(this.clonePosition(),this.clonePosition()));var _=T(h,this.clonePosition());l={style:d,styleLocation:_}}var m=this.tryParseArgumentClose(i);if(m.err)return m;var g=T(i,this.clonePosition());if(l&&Xt(l==null?void 0:l.style,"::",0)){var v=wi(l.style.slice(2));if(s==="number"){var c=this.parseNumberSkeletonFromString(v,l.styleLocation);return c.err?c:{val:{type:L.number,value:n,location:g,style:c.val},err:null}}else{if(v.length===0)return this.error(w.EXPECT_DATE_TIME_SKELETON,g);var S=v;this.locale&&(S=hi(v,this.locale));var d={type:Me.dateTime,pattern:S,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?ni(S):{}},P=s==="date"?L.date:L.time;return{val:{type:P,value:n,location:g,style:d},err:null}}}return{val:{type:s==="number"?L.number:s==="date"?L.date:L.time,value:n,location:g,style:(o=l==null?void 0:l.style)!==null&&o!==void 0?o:null},err:null}}case"plural":case"selectordinal":case"select":{var I=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(w.EXPECT_SELECT_ARGUMENT_OPTIONS,T(I,Ke({},I)));this.bumpSpace();var D=this.parseIdentifierIfPossible(),M=0;if(s!=="select"&&D.value==="offset"){if(!this.bumpIf(":"))return this.error(w.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,T(this.clonePosition(),this.clonePosition()));this.bumpSpace();var c=this.tryParseDecimalInteger(w.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,w.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(c.err)return c;this.bumpSpace(),D=this.parseIdentifierIfPossible(),M=c.val}var N=this.tryParsePluralOrSelectOptions(t,s,r,D);if(N.err)return N;var m=this.tryParseArgumentClose(i);if(m.err)return m;var re=T(i,this.clonePosition());return s==="select"?{val:{type:L.select,value:n,options:Wt(N.val),location:re},err:null}:{val:{type:L.plural,value:n,options:Wt(N.val),offset:M,pluralType:s==="plural"?"cardinal":"ordinal",location:re},err:null}}default:return this.error(w.INVALID_ARGUMENT_TYPE,T(a,u))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(w.EXPECT_ARGUMENT_CLOSING_BRACE,T(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,r=this.clonePosition();!this.isEOF();){var n=this.char();switch(n){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(w.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,T(i,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(r.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(r.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,r){var n=[];try{n=oi(t)}catch(i){return this.error(w.INVALID_NUMBER_SKELETON,r)}return{val:{type:Me.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?ui(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,n,i){for(var o,a=!1,s=[],u=new Set,l=i.value,h=i.location;;){if(l.length===0){var c=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var d=this.tryParseDecimalInteger(w.EXPECT_PLURAL_ARGUMENT_SELECTOR,w.INVALID_PLURAL_ARGUMENT_SELECTOR);if(d.err)return d;h=T(c,this.clonePosition()),l=this.message.slice(c.offset,this.offset())}else break}if(u.has(l))return this.error(r==="select"?w.DUPLICATE_SELECT_ARGUMENT_SELECTOR:w.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,h);l==="other"&&(a=!0),this.bumpSpace();var _=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?w.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:w.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,T(this.clonePosition(),this.clonePosition()));var m=this.parseMessage(t+1,r,n);if(m.err)return m;var g=this.tryParseArgumentClose(_);if(g.err)return g;s.push([l,{value:m.val,location:T(_,this.clonePosition())}]),u.add(l),this.bumpSpace(),o=this.parseIdentifierIfPossible(),l=o.value,h=o.location}return s.length===0?this.error(r==="select"?w.EXPECT_SELECT_ARGUMENT_SELECTOR:w.EXPECT_PLURAL_ARGUMENT_SELECTOR,T(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!a?this.error(w.MISSING_OTHER_CLAUSE,T(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var n=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var o=!1,a=0;!this.isEOF();){var s=this.char();if(s>=48&&s<=57)o=!0,a=a*10+(s-48),this.bump();else break}var u=T(i,this.clonePosition());return o?(a*=n,vi(a)?{val:a,err:null}:this.error(r,u)):this.error(t,u)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var r=Sr(this.message,t);if(r===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return r},e.prototype.error=function(t,r){return{val:null,err:{kind:t,message:this.message,location:r}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(Xt(this.message,t,this.offset())){for(var r=0;r<t.length;r++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var r=this.offset(),n=this.message.indexOf(t,r);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var r=this.offset();if(r===t)break;if(r>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Or(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),n=this.message.charCodeAt(r+(t>=65536?2:1));return n!=null?n:null},e}();function Ot(e){return e>=97&&e<=122||e>=65&&e<=90}function Oi(e){return Ot(e)||e===47}function Hi(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function Or(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Ai(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function Ht(e){e.forEach(function(t){if(delete t.location,gr(t)||br(t))for(var r in t.options)delete t.options[r].location,Ht(t.options[r].value);else pr(t)&&_r(t.style)||(dr(t)||mr(t))&&xt(t.style)?delete t.style.location:yr(t)&&Ht(t.children)})}function Ci(e,t){t===void 0&&(t={}),t=Ke({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new Ti(e,t).parse();if(r.err){var n=SyntaxError(w[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return t!=null&&t.captureLocation||Ht(r.val),r.val}var Le;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Le||(Le={}));var it=function(e){nt(t,e);function t(r,n,i){var o=e.call(this,r)||this;return o.code=n,o.originalMessage=i,o}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),qt=function(e){nt(t,e);function t(r,n,i,o){return e.call(this,'Invalid values for "'.concat(r,'": "').concat(n,'". Options are "').concat(Object.keys(i).join('", "'),'"'),Le.INVALID_VALUE,o)||this}return t}(it),Bi=function(e){nt(t,e);function t(r,n,i){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),Le.INVALID_VALUE,i)||this}return t}(it),Pi=function(e){nt(t,e);function t(r,n){return e.call(this,'The intl string context variable "'.concat(r,'" was not provided to the string "').concat(n,'"'),Le.MISSING_VALUE,n)||this}return t}(it),q;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(q||(q={}));function Mi(e){return e.length<2?e:e.reduce(function(t,r){var n=t[t.length-1];return!n||n.type!==q.literal||r.type!==q.literal?t.push(r):n.value+=r.value,t},[])}function Li(e){return typeof e=="function"}function Qe(e,t,r,n,i,o,a){if(e.length===1&&jt(e[0]))return[{type:q.literal,value:e[0].value}];for(var s=[],u=0,l=e;u<l.length;u++){var h=l[u];if(jt(h)){s.push({type:q.literal,value:h.value});continue}if(ti(h)){typeof o=="number"&&s.push({type:q.literal,value:r.getNumberFormat(t).format(o)});continue}var c=h.value;if(!(i&&c in i))throw new Pi(c,a);var d=i[c];if(ei(h)){(!d||typeof d=="string"||typeof d=="number")&&(d=typeof d=="string"||typeof d=="number"?String(d):""),s.push({type:typeof d=="string"?q.literal:q.object,value:d});continue}if(dr(h)){var _=typeof h.style=="string"?n.date[h.style]:xt(h.style)?h.style.parsedOptions:void 0;s.push({type:q.literal,value:r.getDateTimeFormat(t,_).format(d)});continue}if(mr(h)){var _=typeof h.style=="string"?n.time[h.style]:xt(h.style)?h.style.parsedOptions:n.time.medium;s.push({type:q.literal,value:r.getDateTimeFormat(t,_).format(d)});continue}if(pr(h)){var _=typeof h.style=="string"?n.number[h.style]:_r(h.style)?h.style.parsedOptions:void 0;_&&_.scale&&(d=d*(_.scale||1)),s.push({type:q.literal,value:r.getNumberFormat(t,_).format(d)});continue}if(yr(h)){var m=h.children,g=h.value,v=i[g];if(!Li(v))throw new Bi(g,"function",a);var S=Qe(m,t,r,n,i,o),P=v(S.map(function(M){return M.value}));Array.isArray(P)||(P=[P]),s.push.apply(s,P.map(function(M){return{type:typeof M=="string"?q.literal:q.object,value:M}}))}if(gr(h)){var I=h.options[d]||h.options.other;if(!I)throw new qt(h.value,d,Object.keys(h.options),a);s.push.apply(s,Qe(I.value,t,r,n,i));continue}if(br(h)){var I=h.options["=".concat(d)];if(!I){if(!Intl.PluralRules)throw new it(`Intl.PluralRules is not available in this environment.
|
|
2
|
-
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
3
|
-
`,Le.MISSING_INTL_API,a);var D=r.getPluralRules(t,{type:h.pluralType}).select(d-(h.offset||0));I=h.options[D]||h.options.other}if(!I)throw new qt(h.value,d,Object.keys(h.options),a);s.push.apply(s,Qe(I.value,t,r,n,i,d-(h.offset||0)));continue}}return Mi(s)}function Ii(e,t){return t?ae(ae(ae({},e||{}),t||{}),Object.keys(e).reduce(function(r,n){return r[n]=ae(ae({},e[n]),t[n]||{}),r},{})):e}function Ni(e,t){return t?Object.keys(e).reduce(function(r,n){return r[n]=Ii(e[n],t[n]),r},ae({},e)):e}function bt(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function Ri(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:dt(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.NumberFormat).bind.apply(t,pt([void 0],r,!1)))},{cache:bt(e.number),strategy:mt.variadic}),getDateTimeFormat:dt(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.DateTimeFormat).bind.apply(t,pt([void 0],r,!1)))},{cache:bt(e.dateTime),strategy:mt.variadic}),getPluralRules:dt(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.PluralRules).bind.apply(t,pt([void 0],r,!1)))},{cache:bt(e.pluralRules),strategy:mt.variadic})}}var ki=function(){function e(t,r,n,i){r===void 0&&(r=e.defaultLocale);var o=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(u){var l=o.formatToParts(u);if(l.length===1)return l[0].value;var h=l.reduce(function(c,d){return!c.length||d.type!==q.literal||typeof c[c.length-1]!="string"?c.push(d.value):c[c.length-1]+=d.value,c},[]);return h.length<=1?h[0]||"":h},this.formatToParts=function(u){return Qe(o.ast,o.locales,o.formatters,o.formats,u,void 0,o.message)},this.resolvedOptions=function(){var u;return{locale:((u=o.resolvedLocale)===null||u===void 0?void 0:u.toString())||Intl.NumberFormat.supportedLocalesOf(o.locales)[0]}},this.getAst=function(){return o.ast},this.locales=r,this.resolvedLocale=e.resolveLocale(r),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var a=i||{};a.formatters;var s=Xn(a,["formatters"]);this.ast=e.__parse(t,ae(ae({},s),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=Ni(e.formats,n),this.formatters=i&&i.formatters||Ri(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(typeof Intl.Locale!="undefined"){var r=Intl.NumberFormat.supportedLocalesOf(t);return r.length>0?new Intl.Locale(r[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=Ci,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();function Di(e,t){if(t==null)return;if(t in e)return e[t];const r=t.split(".");let n=e;for(let i=0;i<r.length;i++)if(typeof n=="object"){if(i>0){const o=r.slice(i,r.length).join(".");if(o in n){n=n[o];break}}n=n[r[i]]}else n=void 0;return n}const de={},Ui=(e,t,r)=>r&&(t in de||(de[t]={}),e in de[t]||(de[t][e]=r),r),Hr=(e,t)=>{if(t==null)return;if(t in de&&e in de[t])return de[t][e];const r=ot(t);for(let n=0;n<r.length;n++){const i=r[n],o=Fi(i,e);if(o)return Ui(e,t,o)}};let Pt;const Xe=rt({});function Gi(e){return Pt[e]||null}function Ar(e){return e in Pt}function Fi(e,t){if(!Ar(e))return null;const r=Gi(e);return Di(r,t)}function ji(e){if(e==null)return;const t=ot(e);for(let r=0;r<t.length;r++){const n=t[r];if(Ar(n))return n}}function Cr(e,...t){delete de[e],Xe.update(r=>(r[e]=zn.all([r[e]||{},...t]),r))}Ne([Xe],([e])=>Object.keys(e));Xe.subscribe(e=>Pt=e);const Je={};function Vi(e,t){Je[e].delete(t),Je[e].size===0&&delete Je[e]}function Br(e){return Je[e]}function $i(e){return ot(e).map(t=>{const r=Br(t);return[t,r?[...r]:[]]}).filter(([,t])=>t.length>0)}function At(e){return e==null?!1:ot(e).some(t=>{var r;return(r=Br(t))==null?void 0:r.size})}function zi(e,t){return Promise.all(t.map(n=>(Vi(e,n),n().then(i=>i.default||i)))).then(n=>Cr(e,...n))}const Fe={};function Pr(e){if(!At(e))return e in Fe?Fe[e]:Promise.resolve();const t=$i(e);return Fe[e]=Promise.all(t.map(([r,n])=>zi(r,n))).then(()=>{if(At(e))return Pr(e);delete Fe[e]}),Fe[e]}const Xi={number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},Wi={fallbackLocale:null,loadingDelay:200,formats:Xi,warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0},Zi=Wi;function Ie(){return Zi}const yt=rt(!1);var qi=Object.defineProperty,Qi=Object.defineProperties,Ji=Object.getOwnPropertyDescriptors,Qt=Object.getOwnPropertySymbols,Yi=Object.prototype.hasOwnProperty,Ki=Object.prototype.propertyIsEnumerable,Jt=(e,t,r)=>t in e?qi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,eo=(e,t)=>{for(var r in t||(t={}))Yi.call(t,r)&&Jt(e,r,t[r]);if(Qt)for(var r of Qt(t))Ki.call(t,r)&&Jt(e,r,t[r]);return e},to=(e,t)=>Qi(e,Ji(t));let Ct;const et=rt(null);function Yt(e){return e.split("-").map((t,r,n)=>n.slice(0,r+1).join("-")).reverse()}function ot(e,t=Ie().fallbackLocale){const r=Yt(e);return t?[...new Set([...r,...Yt(t)])]:r}function xe(){return Ct!=null?Ct:void 0}et.subscribe(e=>{Ct=e!=null?e:void 0,typeof window!="undefined"&&e!=null&&document.documentElement.setAttribute("lang",e)});const ro=e=>{if(e&&ji(e)&&At(e)){const{loadingDelay:t}=Ie();let r;return typeof window!="undefined"&&xe()!=null&&t?r=window.setTimeout(()=>yt.set(!0),t):yt.set(!0),Pr(e).then(()=>{et.set(e)}).finally(()=>{clearTimeout(r),yt.set(!1)})}return et.set(e)},Re=to(eo({},et),{set:ro}),st=e=>{const t=Object.create(null);return n=>{const i=JSON.stringify(n);return i in t?t[i]:t[i]=e(n)}};var no=Object.defineProperty,tt=Object.getOwnPropertySymbols,Mr=Object.prototype.hasOwnProperty,Lr=Object.prototype.propertyIsEnumerable,Kt=(e,t,r)=>t in e?no(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Mt=(e,t)=>{for(var r in t||(t={}))Mr.call(t,r)&&Kt(e,r,t[r]);if(tt)for(var r of tt(t))Lr.call(t,r)&&Kt(e,r,t[r]);return e},ke=(e,t)=>{var r={};for(var n in e)Mr.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&tt)for(var n of tt(e))t.indexOf(n)<0&&Lr.call(e,n)&&(r[n]=e[n]);return r};const ze=(e,t)=>{const{formats:r}=Ie();if(e in r&&t in r[e])return r[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},io=st(e=>{var t=e,{locale:r,format:n}=t,i=ke(t,["locale","format"]);if(r==null)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return n&&(i=ze("number",n)),new Intl.NumberFormat(r,i)}),oo=st(e=>{var t=e,{locale:r,format:n}=t,i=ke(t,["locale","format"]);if(r==null)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return n?i=ze("date",n):Object.keys(i).length===0&&(i=ze("date","short")),new Intl.DateTimeFormat(r,i)}),so=st(e=>{var t=e,{locale:r,format:n}=t,i=ke(t,["locale","format"]);if(r==null)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return n?i=ze("time",n):Object.keys(i).length===0&&(i=ze("time","short")),new Intl.DateTimeFormat(r,i)}),ao=(e={})=>{var t=e,{locale:r=xe()}=t,n=ke(t,["locale"]);return io(Mt({locale:r},n))},lo=(e={})=>{var t=e,{locale:r=xe()}=t,n=ke(t,["locale"]);return oo(Mt({locale:r},n))},uo=(e={})=>{var t=e,{locale:r=xe()}=t,n=ke(t,["locale"]);return so(Mt({locale:r},n))},ho=st((e,t=xe())=>new ki(e,t,Ie().formats,{ignoreTag:Ie().ignoreTag})),co=(e,t={})=>{var r,n,i,o;let a=t;typeof e=="object"&&(a=e,e=a.id);const{values:s,locale:u=xe(),default:l}=a;if(u==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let h=Hr(e,u);if(!h)h=(o=(i=(n=(r=Ie()).handleMissingMessage)==null?void 0:n.call(r,{locale:u,id:e,defaultValue:l}))!=null?i:l)!=null?o:e;else if(typeof h!="string")return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof h}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),h;if(!s)return h;let c=h;try{c=ho(h,u).format(s)}catch(d){d instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,d.message)}return c},fo=(e,t)=>uo(t).format(e),po=(e,t)=>lo(t).format(e),mo=(e,t)=>ao(t).format(e),go=(e,t=xe())=>Hr(e,t),bo=Ne([Re,Xe],()=>co);Ne([Re],()=>fo);Ne([Re],()=>po);Ne([Re],()=>mo);Ne([Re,Xe],()=>go);function er(e,t){Cr(e,t)}function yo(e){Re.set(e)}const tr={en:{otpTitle:"Code verification is required",popupMessage:"Please enter the security code received on your SMS/email address to perform the update.",popupMessageLastWarning:"If the next validation attempt is failed, your transaction will fail and you will be returned back to payment method.",minutes:"minutes",errorHeader:"Error",configError:"Unable to load OTP data. Please try again later.",otpHeading:"Enter OTP",resendOtp:"Resent OTP",submit:"Submit",close:"Close",invalidOtp:"The code you've sent is not valid. Please try again.",accountBlocked:"Too many attempts for OTP. Your account has been blocked for one hour.",submissionError:"Something went wrong. Please try again.",otpExpiredMessage:"Validation code has expired, please request a new one to continue.",timeRemaining:"Code expires in:",selectChannelTitle:"Select verification method",selectChannelMessage:"Choose how you would like to receive your verification code",channelSMS:"SMS",channelEmail:"Email",sendCode:"Send code",waitSeconds:"Please wait for before resending:"},tr:{otpTitle:"Kod doğrulaması gereklidir",popupMessage:"Güncellemeyi gerçekleştirmek için SMS/e-posta adresinize gönderilen güvenlik kodunu girin.",popupMessageLastWarning:"Bir sonraki doğrulama denemesi başarısız olursa, işleminiz başarısız olacak ve ödeme yöntemine geri döndürüleceksiniz.",minutes:"dakika",errorHeader:"Hata",configError:"OTP verileri yüklenemedi. Lütfen daha sonra tekrar deneyin.",otpHeading:"OTP Girin",resendOtp:"OTP'yi Yeniden Gönder",submit:"Gönder",close:"Kapat",invalidOtp:"Gönderdiğiniz kod geçerli değil. Lütfen tekrar deneyin.",accountBlocked:"OTP için çok fazla deneme yapıldı. Hesabınız bir saat süreyle engellenmiştir.",submissionError:"Bir şeyler ters gitti. Lütfen tekrar deneyin.",otpExpiredMessage:"Doğrulama kodunun süresi doldu, devam etmek için lütfen yeni bir kod isteyin.",timeRemaining:"Kodun süresi doluyor:",selectChannelTitle:"Doğrulama yöntemi seçin",selectChannelMessage:"Doğrulama kodunuzu nasıl almak istediğinizi seçin",channelSMS:"SMS kodu",channelEmail:"E-posta kodu",sendCode:"Kodu gönder",waitSeconds:"Tekrar göndermeden önce lütfen bekleyin:"},fr:{otpTitle:"La vérification par code est requise",popupMessage:"Veuillez saisir le code de sécurité reçu par SMS ou par e-mail afin d’effectuer la mise à jour.",popupMessageLastWarning:"Si la prochaine tentative de validation échoue, votre transaction échouera et vous serez redirigé vers le moyen de paiement.",minutes:"minutes",errorHeader:"Erreur",configError:"Impossible de charger les données OTP. Veuillez réessayer plus tard.",otpHeading:"Saisir le code OTP",resendOtp:"Renvoyer le code OTP",submit:"Valider",close:"Fermer",invalidOtp:"Le code que vous avez saisi n’est pas valide. Veuillez réessayer.",accountBlocked:"Trop de tentatives de code OTP. Votre compte a été bloqué pendant une heure.",submissionError:"Une erreur s’est produite. Veuillez réessayer.",otpExpiredMessage:"Le code de validation a expiré. Veuillez en demander un nouveau pour continuer.",timeRemaining:"Le code expire dans :",selectChannelTitle:"Sélectionner la méthode de vérification",selectChannelMessage:"Choisissez comment vous souhaitez recevoir votre code de vérification",channelSMS:"SMS",channelEmail:"E-mail",sendCode:"Envoyer le code",waitSeconds:"Veuillez patienter avant de renvoyer le code :"}};function _o(e){tn(e,"svelte-gpy3mu",'*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:inherit}.RadioIndicator{width:20px;height:20px;border-radius:50%;border:2px solid var(--emw--color-typography, #fff);position:relative;flex-shrink:0;margin-right:8px;transition:all 0.2s ease;opacity:0.7}.RadioIndicator.checked::after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:10px;height:10px;border-radius:50%;opacity:1;background:var(--emw--color-primary, #fff)}.RadioIndicator.checked{border:2px solid var(--emw--color-primary, #fff)}.ModalCloseIcon{padding:0px;position:absolute;right:0;top:0;margin:15px 20px;z-index:20;transition:all 0.3s ease}.ModalCloseIcon svg{width:11px;height:11px;fill:var(--emw--color-primary, red);cursor:pointer}.ModalCloseIcon:hover{transform:rotate(90deg)}.OtpContent{width:100%;display:flex;flex-direction:column;gap:var(--emw--spacing-large, 20px)}.OtpFieldWrapper{display:flex;flex-direction:column;gap:10px}.OtpFieldWrapper h2{margin:0}.OtpButton{text-transform:uppercase;font-weight:var(--emw--font-weight-medium, 500);color:var(--emw--color-typography-button, #000000);text-align:center;font-size:var(--emw--font-size-medium, 16px);font-style:normal;font-family:inherit;height:46px;line-height:normal;border:none;background:var(--emw--color-primary, #f9c408);border-radius:10px;width:100%;margin:var(--emw--spacing-small, 12px) 0;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:var(--emw--spacing-2x-small-plus, 5px);transition:all 0.2s linear}.OtpButton:active{box-shadow:inset 0px 0px 0px 1px rgba(255, 255, 255, 0.2);background-color:var(--emw--color-active, #fecd1c)}.OtpButton[disabled],.OtpButton.disabled{filter:saturate(50%);opacity:0.5;cursor:not-allowed;pointer-events:none}.OtpButton:hover:not([disabled]):not(.disabled){box-shadow:inset 0px 0px 0px 1px rgba(255, 255, 255, 0.2);background-color:var(--emw--color-hover, #dbac03)}@container (max-width: 500px){.OtpDescription{font-size:var(--emw--font-size-small, 12px)}.OtpDescription .Title{font-size:var(--emw--font-size-big, 20px)}}.OtpDescription{display:flex;color:var(--emw--color-typography, #fff);flex-direction:column;gap:12px;font-size:var(--emw--font-size-small, 12px)}.OtpDescription .Title{font-size:var(--emw--font-medium, 16px);font-weight:var(--emw--font-weight-medium, 600)}.OtpError{display:flex;flex-direction:column;gap:20px;align-items:center}.OtpError .OtpErrorHeader{display:flex;justify-content:center;gap:5px;align-items:center}.OtpError h2{margin:0;color:var(--emw--color-typography, #fff)}.OtpError p{color:var(--emw--color-typography, #fff);text-align:center;font-size:var(--emw--font-size-small, 12px)}.OtpError svg{width:25px;fill:var(--emw--color-error, #dd3434)}.ChannelSelection{display:flex;flex-direction:row;justify-content:space-between}.ChannelCheckbox{display:flex;align-items:center;padding:var(--emw--spacing-medium, 16px);cursor:pointer;transition:all 0.2s ease}.ChannelCheckbox input[type=radio]{display:none}.ChannelCheckbox .ChannelContent{display:flex;align-items:center;gap:3px;width:100%;color:var(--emw--color-typography, #fff);font-size:var(--emw--font-size-medium, 16px);font-weight:var(--emw--font-weight-medium, 500)}.ChannelCheckbox .ChannelContent svg{flex-shrink:0;opacity:0.7;width:20px;height:20px}.ChannelCheckbox .ChannelContent span{text-transform:uppercase}.ChannelCheckbox.selected .ChannelContent{color:var(--emw--color-primary, #000000)}.ChannelCheckbox.selected .ChannelContent svg{stroke:var(--emw--color-primary, #000000);opacity:1}.ChannelCheckbox:hover:not(.selected){color:var(--emw--color-active, #fff)}.OtpField{display:flex;justify-content:space-between;margin:10px}.OtpField input{width:45px;font-size:32px;padding:5px;text-align:center;border-radius:5px;margin:6px;font-weight:bold;outline:none;background:var(--emw--color-background);border:0;transition:all 0.1s;box-shadow:inset 0px 0px 0px 1px rgba(255, 255, 255, 0.3);color:var(--emw--color-typography, #fff)}.OtpField input.space{margin-right:1rem !important}.OtpField input:focus{box-shadow:0 0 1px 1px var(--emw--color-primary, #007bff)}.OtpActionButtons{display:flex;justify-content:space-between;gap:40px}.OtpErrorMessage{color:var(--emw--color-error, #dd3434);font-weight:bold}.OtpNoticeMessage{color:var(--emw--color-primary, #f9c408);font-weight:bold}.LastWarningMessage{color:var(--emw--color-error, #dd3434);font-weight:bold}.OtpLoaderContainer{width:100%;display:flex;justify-content:center;align-items:center;padding:20px 0}.OtpLoader{width:48px;height:48px;border:5px solid var(--emw--color-secondary, #b3d8ff);border-bottom-color:var(--emw--color-primary, #007bff);border-radius:50%;display:inline-block;box-sizing:border-box;animation:rotation 1s linear infinite}@keyframes rotation{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.OtpTimer{color:var(--emw--color-typography, #fff);font-size:var(--emw--font-size-small, 12px);opacity:0.8}@container (max-width: 500px){.OtpContent{padding:var(--emw--spacing-small, 10px)}.OtpField input{width:40px;font-size:28px;margin:4px}}')}function rr(e,t,r){const n=e.slice();return n[69]=t[r],n[70]=t,n[71]=r,n}function Eo(e){let t,r,n,i,o,a,s,u,l,h,c,d,_,m,g,v,S,P=e[19]("channelSMS")+"",I,D,M,N,re,Q,le,me,ue,B,U,Z,ge,be,ye=e[19]("channelEmail")+"",J,De,Y,X,ne,_e,we;function Se(b,A){return b[9]?So:b[12]?xo:wo}let he=Se(e),K=he(e),W=e[0]&&ir(e);function Ue(b,A){if(b[3]&&b[12])return Bo;if(b[12]&&b[4])return Co}let fe=Ue(e),$=fe&&fe(e);function Ge(b,A){if(b[9])return Mo;if(b[12]&&b[4])return Po}let pe=Ge(e),F=pe&&pe(e);return{c(){t=O("div"),K.c(),r=j(),n=O("div"),i=O("label"),o=O("div"),a=j(),s=O("input"),l=j(),h=O("div"),c=ie("svg"),d=ie("path"),_=ie("circle"),m=ie("circle"),g=ie("circle"),v=j(),S=O("span"),I=k(P),D=j(),M=O("label"),N=O("div"),re=j(),Q=O("input"),me=j(),ue=O("div"),B=ie("svg"),U=ie("rect"),Z=ie("path"),ge=j(),be=O("span"),J=k(ye),De=j(),W&&W.c(),Y=j(),$&&$.c(),X=j(),ne=O("div"),F&&F.c(),p(t,"class","OtpDescription"),p(o,"class","RadioIndicator"),oe(o,"checked",e[0]===e[20].SMS),p(s,"type","radio"),p(s,"name","channel"),s.value=e[20].SMS,s.checked=u=e[0]===e[20].SMS,p(d,"d","M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"),p(_,"cx","9"),p(_,"cy","11"),p(_,"r","0.5"),p(_,"fill","currentColor"),p(m,"cx","12"),p(m,"cy","11"),p(m,"r","0.5"),p(m,"fill","currentColor"),p(g,"cx","15"),p(g,"cy","11"),p(g,"r","0.5"),p(g,"fill","currentColor"),p(c,"xmlns","http://www.w3.org/2000/svg"),p(c,"width","24"),p(c,"height","24"),p(c,"viewBox","0 0 24 24"),p(c,"fill","none"),p(c,"stroke","currentColor"),p(c,"stroke-width","2"),p(c,"stroke-linecap","round"),p(c,"stroke-linejoin","round"),p(h,"class","ChannelContent"),p(i,"class","ChannelCheckbox"),oe(i,"selected",e[0]===e[20].SMS),p(N,"class","RadioIndicator"),oe(N,"checked",e[0]===e[20].EMAIL),p(Q,"type","radio"),p(Q,"name","channel"),Q.value=e[20].EMAIL,Q.checked=le=e[0]===e[20].EMAIL,p(U,"x","2"),p(U,"y","4"),p(U,"width","20"),p(U,"height","16"),p(U,"rx","2"),p(Z,"d","m2 7 10 6 10-6"),p(B,"xmlns","http://www.w3.org/2000/svg"),p(B,"width","24"),p(B,"height","24"),p(B,"viewBox","0 0 24 24"),p(B,"fill","none"),p(B,"stroke","currentColor"),p(B,"stroke-width","2"),p(B,"stroke-linecap","round"),p(B,"stroke-linejoin","round"),p(ue,"class","ChannelContent"),p(M,"class","ChannelCheckbox"),oe(M,"selected",e[0]===e[20].EMAIL),p(n,"class","ChannelSelection"),p(ne,"class","OtpActionButtons")},m(b,A){C(b,t,A),K.m(t,null),C(b,r,A),C(b,n,A),y(n,i),y(i,o),y(i,a),y(i,s),y(i,l),y(i,h),y(h,c),y(c,d),y(c,_),y(c,m),y(c,g),y(h,v),y(h,S),y(S,I),y(n,D),y(n,M),y(M,N),y(M,re),y(M,Q),y(M,me),y(M,ue),y(ue,B),y(B,U),y(B,Z),y(ue,ge),y(ue,be),y(be,J),C(b,De,A),W&&W.m(b,A),C(b,Y,A),$&&$.m(b,A),C(b,X,A),C(b,ne,A),F&&F.m(ne,null),_e||(we=[ce(s,"change",e[39]),ce(Q,"change",e[40])],_e=!0)},p(b,A){he===(he=Se(b))&&K?K.p(b,A):(K.d(1),K=he(b),K&&(K.c(),K.m(t,null))),A[0]&1048577&&oe(o,"checked",b[0]===b[20].SMS),A[0]&1&&u!==(u=b[0]===b[20].SMS)&&(s.checked=u),A[0]&524288&&P!==(P=b[19]("channelSMS")+"")&&V(I,P),A[0]&1048577&&oe(i,"selected",b[0]===b[20].SMS),A[0]&1048577&&oe(N,"checked",b[0]===b[20].EMAIL),A[0]&1&&le!==(le=b[0]===b[20].EMAIL)&&(Q.checked=le),A[0]&524288&&ye!==(ye=b[19]("channelEmail")+"")&&V(J,ye),A[0]&1048577&&oe(M,"selected",b[0]===b[20].EMAIL),b[0]?W?W.p(b,A):(W=ir(b),W.c(),W.m(Y.parentNode,Y)):W&&(W.d(1),W=null),fe===(fe=Ue(b))&&$?$.p(b,A):($&&$.d(1),$=fe&&fe(b),$&&($.c(),$.m(X.parentNode,X))),pe===(pe=Ge(b))&&F?F.p(b,A):(F&&F.d(1),F=pe&&pe(b),F&&(F.c(),F.m(ne,null)))},d(b){b&&(H(t),H(r),H(n),H(De),H(Y),H(X),H(ne)),K.d(),W&&W.d(b),$&&$.d(b),F&&F.d(),_e=!1,ve(we)}}}function vo(e){let t,r,n,i,o,a,s=e[19]("errorHeader")+"",u,l,h,c,d,_,m=e[19]("close")+"",g,v,S;return{c(){t=O("div"),r=O("div"),n=ie("svg"),i=ie("path"),o=j(),a=O("h2"),u=k(s),l=j(),h=O("p"),c=k(e[8]),d=j(),_=O("button"),g=k(m),p(i,"d","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"),p(n,"xmlns","http://www.w3.org/2000/svg"),p(n,"viewBox","0 0 512 512"),p(r,"class","OtpErrorHeader"),p(_,"class","OtpButton error"),p(t,"class","OtpError")},m(P,I){C(P,t,I),y(t,r),y(r,n),y(n,i),y(r,o),y(r,a),y(a,u),y(t,l),y(t,h),y(h,c),y(t,d),y(t,_),y(_,g),v||(S=ce(_,"click",e[28]),v=!0)},p(P,I){I[0]&524288&&s!==(s=P[19]("errorHeader")+"")&&V(u,s),I[0]&256&&V(c,P[8]),I[0]&524288&&m!==(m=P[19]("close")+"")&&V(g,m)},d(P){P&&H(t),v=!1,S()}}}function xo(e){let t,r,n,i;function o(l,h){return l[10]?Oo:To}let a=o(e),s=a(e),u=e[6]&&nr(e);return{c(){t=O("p"),s.c(),n=j(),u&&u.c(),i=sn(),p(t,"class",r=e[10]?"LastWarningMessage":"")},m(l,h){C(l,t,h),s.m(t,null),C(l,n,h),u&&u.m(l,h),C(l,i,h)},p(l,h){a===(a=o(l))&&s?s.p(l,h):(s.d(1),s=a(l),s&&(s.c(),s.m(t,null))),h[0]&1024&&r!==(r=l[10]?"LastWarningMessage":"")&&p(t,"class",r),l[6]?u?u.p(l,h):(u=nr(l),u.c(),u.m(i.parentNode,i)):u&&(u.d(1),u=null)},d(l){l&&(H(t),H(n),H(i)),s.d(),u&&u.d(l)}}}function wo(e){let t,r=(e[19]("selectChannelMessage")||"Selectează metoda prin care vrei să primești codul OTP")+"",n;return{c(){t=O("p"),n=k(r)},m(i,o){C(i,t,o),y(t,n)},p(i,o){o[0]&524288&&r!==(r=(i[19]("selectChannelMessage")||"Selectează metoda prin care vrei să primești codul OTP")+"")&&V(n,r)},d(i){i&&H(t)}}}function So(e){let t,r=e[19]("otpExpiredMessage")+"",n;return{c(){t=O("p"),n=k(r),p(t,"class","OtpNoticeMessage"),p(t,"role","alert")},m(i,o){C(i,t,o),y(t,n)},p(i,o){o[0]&524288&&r!==(r=i[19]("otpExpiredMessage")+"")&&V(n,r)},d(i){i&&H(t)}}}function To(e){let t=e[19]("popupMessage")+"",r;return{c(){r=k(t)},m(n,i){C(n,r,i)},p(n,i){i[0]&524288&&t!==(t=n[19]("popupMessage")+"")&&V(r,t)},d(n){n&&H(r)}}}function Oo(e){let t=e[19]("popupMessageLastWarning")+"",r;return{c(){r=k(t)},m(n,i){C(n,r,i)},p(n,i){i[0]&524288&&t!==(t=n[19]("popupMessageLastWarning")+"")&&V(r,t)},d(n){n&&H(r)}}}function nr(e){let t,r;return{c(){t=O("p"),r=k(e[8]),p(t,"class","OtpErrorMessage"),p(t,"role","alert")},m(n,i){C(n,t,i),y(t,r)},p(n,i){i[0]&256&&V(r,n[8])},d(n){n&&H(t)}}}function ir(e){let t,r,n,i;function o(u,l){return u[17]>0?Ao:Ho}let a=o(e),s=a(e);return{c(){t=O("button"),s.c(),p(t,"class","OtpButton"),t.disabled=r=!e[18],oe(t,"disabled",!e[18]||e[16])},m(u,l){C(u,t,l),s.m(t,null),n||(i=ce(t,"click",e[22]),n=!0)},p(u,l){a===(a=o(u))&&s?s.p(u,l):(s.d(1),s=a(u),s&&(s.c(),s.m(t,null))),l[0]&262144&&r!==(r=!u[18])&&(t.disabled=r),l[0]&327680&&oe(t,"disabled",!u[18]||u[16])},d(u){u&&H(t),s.d(),n=!1,i()}}}function Ho(e){let t=e[19]("sendCode")+"",r;return{c(){r=k(t)},m(n,i){C(n,r,i)},p(n,i){i[0]&524288&&t!==(t=n[19]("sendCode")+"")&&V(r,t)},d(n){n&&H(r)}}}function Ao(e){let t=e[19]("waitSeconds")+"",r,n,i,o;return{c(){r=k(t),n=k(" ("),i=k(e[17]),o=k("s)")},m(a,s){C(a,r,s),C(a,n,s),C(a,i,s),C(a,o,s)},p(a,s){s[0]&524288&&t!==(t=a[19]("waitSeconds")+"")&&V(r,t),s[0]&131072&&V(i,a[17])},d(a){a&&(H(r),H(n),H(i),H(o))}}}function Co(e){let t,r,n=e[19]("timeRemaining")+"",i,o,a=e[23](e[5])+"",s,u,l=e[19]("minutes")+"",h,c,d,_=Gt(e[2]),m=[];for(let g=0;g<_.length;g+=1)m[g]=or(rr(e,_,g));return{c(){t=O("div"),r=O("div"),i=k(n),o=j(),s=k(a),u=j(),h=k(l),c=j(),d=O("div");for(let g=0;g<m.length;g+=1)m[g].c();p(r,"class","OtpTimer"),p(d,"class","OtpField"),p(t,"class","OtpFieldWrapper")},m(g,v){C(g,t,v),y(t,r),y(r,i),y(r,o),y(r,s),y(r,u),y(r,h),y(t,c),y(t,d);for(let S=0;S<m.length;S+=1)m[S]&&m[S].m(d,null)},p(g,v){if(v[0]&524288&&n!==(n=g[19]("timeRemaining")+"")&&V(i,n),v[0]&32&&a!==(a=g[23](g[5])+"")&&V(s,a),v[0]&524288&&l!==(l=g[19]("minutes")+"")&&V(h,l),v[0]&117458964){_=Gt(g[2]);let S;for(S=0;S<_.length;S+=1){const P=rr(g,_,S);m[S]?m[S].p(P,v):(m[S]=or(P),m[S].c(),m[S].m(d,null))}for(;S<m.length;S+=1)m[S].d(1);m.length=_.length}},d(g){g&&H(t),on(m,g)}}}function Bo(e){let t;return{c(){t=O("div"),t.innerHTML='<span class="OtpLoader"></span>',p(t,"class","OtpLoaderContainer")},m(r,n){C(r,t,n)},p:te,d(r){r&&H(t)}}}function or(e){let t,r,n,i=e[71],o,a;const s=()=>e[41](t,i),u=()=>e[41](null,i);function l(...c){return e[42](e[71],...c)}function h(...c){return e[43](e[71],...c)}return{c(){t=O("input"),p(t,"id",`otp-input-${e[71]}`),p(t,"type","text"),p(t,"class",r=`otp-box ${e[4].inputLength%2===0&&e[71]===e[4].inputLength/2-1?"space":""}`),p(t,"maxlength",1),t.value=n=e[69],p(t,"inputmode","numeric"),t.disabled=e[11],p(t,"autocomplete","off")},m(c,d){C(c,t,d),s(),o||(a=[ce(t,"input",l),ce(t,"keydown",h),ce(t,"paste",e[24])],o=!0)},p(c,d){e=c,d[0]&16&&r!==(r=`otp-box ${e[4].inputLength%2===0&&e[71]===e[4].inputLength/2-1?"space":""}`)&&p(t,"class",r),d[0]&4&&n!==(n=e[69])&&t.value!==n&&(t.value=n),d[0]&2048&&(t.disabled=e[11]),i!==e[71]&&(u(),i=e[71],s())},d(c){c&&H(t),u(),o=!1,ve(a)}}}function Po(e){let t,r=e[19]("submit")+"",n,i,o,a;return{c(){t=O("button"),n=k(r),p(t,"class","OtpButton"),t.disabled=i=e[2].join("").length!==e[4].inputLength||e[13]||e[15]},m(s,u){C(s,t,u),y(t,n),o||(a=ce(t,"click",e[29]),o=!0)},p(s,u){u[0]&524288&&r!==(r=s[19]("submit")+"")&&V(n,r),u[0]&40980&&i!==(i=s[2].join("").length!==s[4].inputLength||s[13]||s[15])&&(t.disabled=i)},d(s){s&&H(t),o=!1,a()}}}function Mo(e){let t,r=e[19]("resendOtp")+"",n,i,o;return{c(){t=O("button"),n=k(r),p(t,"class","OtpButton")},m(a,s){C(a,t,s),y(t,n),i||(o=ce(t,"click",e[27]),i=!0)},p(a,s){s[0]&524288&&r!==(r=a[19]("resendOtp")+"")&&V(n,r)},d(a){a&&H(t),i=!1,o()}}}function Lo(e){let t;function r(o,a){return o[7]?vo:Eo}let n=r(e),i=n(e);return{c(){t=O("div"),i.c(),p(t,"class","OtpContent")},m(o,a){C(o,t,a),i.m(t,null),e[44](t)},p(o,a){n===(n=r(o))&&i?i.p(o,a):(i.d(1),i=n(o),i&&(i.c(),i.m(t,null)))},i:te,o:te,d(o){o&&H(t),i.d(),e[44](null)}}}function Io(e,t,r){let n,i,o;en(e,bo,f=>r(19,o=f));let{clientstyling:a=""}=t,{clientstylingurl:s=""}=t,{mbsource:u}=t,{lang:l="en"}=t,{endpoint:h}=t,{session:c}=t,{translationurl:d}=t,{templateid:_}=t,m=[],g=!0,v=null,S=0,P="",I="",D=!1,M=!1,N="",re="",Q="",le=!1,me=!1,ue=!1,B="",U={},Z=null,ge=!1,be=!1,ye="",J,De,Y=[],X=null,ne=0,_e=!1,we=!1;const Se={SMS:"sms",EMAIL:"email"},he={MAX_ATTEMPTS_EXCEEDED:"gm.twofa.token_max_attempts_exceeded",INTERNAL_SERVER_ERROR:"gm.multifactorauthentication.internal_server_error",MAX_INVALIDATE:"gm.multifactorauthentication.challenge_internal_server_error"};Object.keys(tr).forEach(f=>{er(f,tr[f])});const K=()=>{yo(l)},W=()=>{fetch(d).then(f=>f.json()).then(f=>{Object.keys(f).forEach(E=>{er(E,f[E])})}).catch(f=>{console.log(f)})},Ue=f=>Ee(this,null,function*(){var E;if((E=f.detail)!=null&&E["x-step-up-required"]){if(r(7,M=!1),r(6,D=!1),r(8,N=""),re=f.detail["x-step-up-token"],Q=f.detail.flow,!re||!Q){r(3,g=!1),r(7,M=!0),r(8,N=o("configError"));return}r(12,ge=!1),r(3,g=!1)}}),fe=()=>{X&&(clearInterval(X),X=null),Z&&(clearInterval(Z),Z=null),r(6,D=!1),r(7,M=!1),r(8,N=""),r(10,me=!1),r(2,m=[]),r(4,v=null),r(3,g=!0),r(0,B=""),r(12,ge=!1),r(38,U={})},$=()=>{fe()},Ge=()=>new Promise((f,E)=>{const x=new URL(`${h}/api/pam/v1/mfa/challenge/${re}`),G=new Headers;G.append("accept","application/json"),G.append("Content-Type","application/json"),G.append("X-SessionId",`${c}`),r(16,we=!0);const Te={method:"PATCH",headers:G,body:JSON.stringify({channel:B,templateId:_})};fetch(x,Te).then(Rt=>Rt.json()).then(()=>{r(15,_e=!1),A(),at(),f()}).catch(Rt=>{E()})}),pe=()=>{Z&&clearInterval(Z),Z=setInterval(()=>{const f=We({},U);let E=!1;Object.keys(f).forEach(x=>{f[x]>0&&(f[x]--,E=!0)}),r(38,U=f),!E&&Z&&(clearInterval(Z),Z=null)},1e3)},F=f=>{r(0,B=f)},b=()=>Ee(this,null,function*(){if(!(!B||U[B]&&U[B]>0)){r(3,g=!0),_&&_.startsWith("2fa-")&&r(30,_=`2fa-${B}`);try{yield Ge(),yield ut(),r(38,U=ct(We({},U),{[B]:30})),pe(),r(12,ge=!0),A(),at()}catch(f){console.error("Error submitting channel:",f),r(6,D=!0),r(8,N=o("submissionError"))}finally{r(3,g=!1)}}}),A=()=>{const f=new Date(P),E=new Date(I),x=new Date,G=E.getTime()-x.getTime();ne=f.getTime()-G;const z=Date.now(),Te=Math.max(0,Math.floor((ne-z)/1e3));r(5,S=Te)},at=()=>{X&&clearInterval(X),X=setInterval(()=>{const f=Date.now(),E=Math.max(0,Math.floor((ne-f)/1e3));r(5,S=E),r(11,ue=E<=0),E<=0&&(clearInterval(X),X=null,r(9,le=!0),r(6,D=!1),r(10,me=!1))},1e3)},Nr=f=>{const E=Math.floor(f/60),x=f%60;return`${E.toString().padStart(2,"0")}:${x.toString().padStart(2,"0")}`},lt=(f,E)=>{const x=[...m];x[f]=E.toUpperCase(),r(2,m=x),x.join("")!==ye&&r(13,be=!1)},Rr=f=>{var G,z,Te;f.preventDefault();const x=(((z=(G=f.clipboardData)==null?void 0:G.getData("text"))==null?void 0:z.trim())||"").slice(0,v.inputLength).split("");r(2,m=[...x,...Array(v.inputLength-x.length).fill("")]),(Te=Y[x.length])==null||Te.focus(),x.length===v.inputLength&&Nt()},Lt=(f,E)=>{const x=f.target,G=x.value;if(/^[a-z0-9]$/i.test(G)){lt(E,G);const z=Y[E+1];z==null||z.focus()}x.value=""},It=(f,E)=>{const x=f.key,G=f.ctrlKey||f.metaKey;if(/^[a-z0-9]$/i.test(x)){if(G&&x.toLowerCase()==="v")return;f.preventDefault(),lt(E,x);const z=Y[E+1];z==null||z.focus()}else if(x==="Backspace"){f.preventDefault(),m[E]!==""&<(E,"");const z=Y[E-1];z==null||z.focus()}},kr=()=>{Q=="stateful"&&(Ge(),r(9,le=!1));const f=new CustomEvent("otpResendRequested");window.dispatchEvent(f)},Dr=f=>{window.dispatchEvent(new CustomEvent("otpSubmitted",{detail:{code:f,maxAttempts:v.maxValidationAttempts,validatedAttempts:v.numberOfValidateAttempts}}))},Ur=f=>Ee(this,null,function*(){const E=new URL(`/api/nwa/api/v1/mfa/challenge/${re}/validate`,h);E.searchParams.append("input",f);try{const x=yield fetch(E.href,{method:"POST"});if(x.status===200){Gr();return}const G=yield x.json();throw new Error(G.message)}catch(x){if(yield ut(),x.message===he.INTERNAL_SERVER_ERROR){if(v.numberOfValidateAttempts===v.maxValidationAttempts-1){window.dispatchEvent(new CustomEvent("otpSetTimeout")),window.postMessage({type:"WidgetNotification",data:{type:"error",message:o("accountBlocked")}},window.location.href),window.dispatchEvent(new CustomEvent("manualClosePopup"));return}r(6,D=!0),r(8,N=o("invalidOtp")),ut();return}x.message===he.MAX_INVALIDATE&&(r(6,D=!0),r(8,N=o("invalidOtp"))),x.details===he.MAX_ATTEMPTS_EXCEEDED&&r(15,_e=!0),console.error("OTP submission failed:",x),r(6,D=!0),r(8,N=o("submissionError"))}finally{r(3,g=!1)}}),Gr=()=>{window.dispatchEvent(new CustomEvent("otpSuccess",{detail:{message:"User successfully authenticated"}}))},Fr=()=>{window.dispatchEvent(new CustomEvent("manualClosePopup"))},Nt=()=>Ee(this,null,function*(){if(m.join("").length!==v.inputLength){r(6,D=!0),r(8,N=o("invalidOtp"));return}const f=m.join("");r(13,be=!0),ye=f,r(3,g=!0),r(6,D=!1),r(8,N=""),Q==="stateless"&&Dr(f),Q==="stateful"&&(yield Ur(f))}),ut=()=>Ee(this,null,function*(){if(h)try{r(3,g=!0);const f=new URL(`/api/nwa/api/v1/mfa/challenge/${re}/config`,h),E=yield fetch(f.href),x=yield E.json();if(E.ok)r(4,v=x),r(2,m=Array(v.inputLength).fill("")),r(9,le=!1),P=v.expirationTime,I=v.serverTime,v.numberOfValidateAttempts!==0&&(r(6,D=!0),r(8,N=o("invalidOtp"))),v.numberOfValidateAttempts===v.maxValidationAttempts-1&&r(10,me=!0),r(3,g=!1),A(),at(),r(16,we=!1);else if(x&&x.details===he.MAX_ATTEMPTS_EXCEEDED)window.dispatchEvent(new CustomEvent("manualClosePopup"));else{const G=x&&x.message||`Failed to load config. Status: ${E.status}`;throw new Error(G)}}catch(f){r(3,g=!1),r(7,M=!0),r(8,N=o("configError")),window.dispatchEvent(new CustomEvent("2fa-loading",{detail:{isLoading:!1}})),console.error("Error loading 2FA config:",f)}});hn(()=>(window.addEventListener("stepUpAuthRequired",Ue,!1),window.addEventListener("closePopup",$,!1),()=>{window.removeEventListener("stepUpAuthRequired",Ue),window.removeEventListener("closePopup",$,!1),X&&clearInterval(X),Z&&clearInterval(Z)}));const jr=()=>F(Se.SMS),Vr=()=>F(Se.EMAIL);function $r(f,E){Ye[f?"unshift":"push"](()=>{Y[E]=f,r(14,Y)})}const zr=(f,E)=>Lt(E,f),Xr=(f,E)=>It(E,f);function Wr(f){Ye[f?"unshift":"push"](()=>{J=f,r(1,J)})}return e.$$set=f=>{"clientstyling"in f&&r(31,a=f.clientstyling),"clientstylingurl"in f&&r(32,s=f.clientstylingurl),"mbsource"in f&&r(33,u=f.mbsource),"lang"in f&&r(34,l=f.lang),"endpoint"in f&&r(35,h=f.endpoint),"session"in f&&r(36,c=f.session),"translationurl"in f&&r(37,d=f.translationurl),"templateid"in f&&r(30,_=f.templateid)},e.$$.update=()=>{e.$$.dirty[0]&2|e.$$.dirty[1]&1&&a&&J&&Sn(J,a),e.$$.dirty[0]&2|e.$$.dirty[1]&2&&s&&J&&Tn(J,s),e.$$.dirty[0]&2|e.$$.dirty[1]&4&&u&&J&&On(J,`${u}.Style`,De),e.$$.dirty[1]&8&&l&&K(),e.$$.dirty[1]&72&&l&&d&&W(),e.$$.dirty[0]&1|e.$$.dirty[1]&128&&r(18,n=B&&(!U[B]||U[B]===0)),e.$$.dirty[0]&1|e.$$.dirty[1]&128&&r(17,i=B&&U[B]||0)},[B,J,m,g,v,S,D,M,N,le,me,ue,ge,be,Y,_e,we,i,n,o,Se,F,b,Nr,Rr,Lt,It,kr,Fr,Nt,_,a,s,u,l,h,c,d,U,jr,Vr,$r,zr,Xr,Wr]}class Ir extends xn{constructor(t){super(),En(this,t,Io,Lo,ar,{clientstyling:31,clientstylingurl:32,mbsource:33,lang:34,endpoint:35,session:36,translationurl:37,templateid:30},_o,[-1,-1,-1])}get clientstyling(){return this.$$.ctx[31]}set clientstyling(t){this.$$set({clientstyling:t}),se()}get clientstylingurl(){return this.$$.ctx[32]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),se()}get mbsource(){return this.$$.ctx[33]}set mbsource(t){this.$$set({mbsource:t}),se()}get lang(){return this.$$.ctx[34]}set lang(t){this.$$set({lang:t}),se()}get endpoint(){return this.$$.ctx[35]}set endpoint(t){this.$$set({endpoint:t}),se()}get session(){return this.$$.ctx[36]}set session(t){this.$$set({session:t}),se()}get translationurl(){return this.$$.ctx[37]}set translationurl(t){this.$$set({translationurl:t}),se()}get templateid(){return this.$$.ctx[30]}set templateid(t){this.$$set({templateid:t}),se()}}vn(Ir,{clientstyling:{},clientstylingurl:{},mbsource:{},lang:{},endpoint:{},session:{},translationurl:{},templateid:{}},[],[],!0);exports.default=Ir;
|