@everymatrix/cashier-step-up 0.5.16 → 0.5.18
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-CTF4zkcp.js +4853 -0
- package/components/CashierStepUp-DiWjURI5.cjs +3 -0
- package/components/CashierStepUp-UCVyknjk.js +4805 -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-6tjo_ts2.js +0 -4631
- package/components/CashierStepUp-BeFAWTec.cjs +0 -3
- package/components/CashierStepUp-DEw3PTWj.js +0 -4582
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";var zn=Object.defineProperty,Xn=Object.defineProperties;var Wn=Object.getOwnPropertyDescriptors;var Rt=Object.getOwnPropertySymbols;var Zn=Object.prototype.hasOwnProperty,qn=Object.prototype.propertyIsEnumerable;var ht=(e,t,n)=>t in e?zn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qe=(e,t)=>{for(var n in t||(t={}))Zn.call(t,n)&&ht(e,n,t[n]);if(Rt)for(var n of Rt(t))qn.call(t,n)&&ht(e,n,t[n]);return e},ct=(e,t)=>Xn(e,Wn(t));var te=(e,t,n)=>(ht(e,typeof t!="symbol"?t+"":t,n),n);var xe=(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 re(){}function sn(e){return e()}function kt(){return Object.create(null)}function we(e){e.forEach(sn)}function Bt(e){return typeof e=="function"}function an(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function Qn(e){return Object.keys(e).length===0}function ln(e,...t){if(e==null){for(const r of t)r(void 0);return re}const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function Jn(e,t,n){e.$$.on_destroy.push(ln(t,n))}function g(e,t){e.appendChild(t)}function Yn(e,t,n){const r=Kn(e);if(!r.getElementById(t)){const i=T("style");i.id=t,i.textContent=n,er(r,i)}}function Kn(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function er(e,t){return g(e.head||e,t),t.sheet}function C(e,t,n){e.insertBefore(t,n||null)}function H(e){e.parentNode&&e.parentNode.removeChild(e)}function tr(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function T(e){return document.createElement(e)}function ne(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function I(e){return document.createTextNode(e)}function D(){return I(" ")}function nr(){return I("")}function fe(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 rr(e){return Array.from(e.childNodes)}function G(e,t){t=""+t,e.data!==t&&(e.data=t)}function ue(e,t,n){e.classList.toggle(t,!!n)}function ir(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}let Xe;function ze(e){Xe=e}function or(){if(!Xe)throw new Error("Function called outside component initialization");return Xe}function sr(e){or().$$.on_mount.push(e)}const Le=[],tt=[];let Pe=[];const Dt=[],ar=Promise.resolve();let _t=!1;function lr(){_t||(_t=!0,ar.then(he))}function Et(e){Pe.push(e)}const ft=new Set;let Ae=0;function he(){if(Ae!==0)return;const e=Xe;do{try{for(;Ae<Le.length;){const t=Le[Ae];Ae++,ze(t),ur(t.$$)}}catch(t){throw Le.length=0,Ae=0,t}for(ze(null),Le.length=0,Ae=0;tt.length;)tt.pop()();for(let t=0;t<Pe.length;t+=1){const n=Pe[t];ft.has(n)||(ft.add(n),n())}Pe.length=0}while(Le.length);for(;Dt.length;)Dt.pop()();_t=!1,ft.clear(),ze(e)}function ur(e){if(e.fragment!==null){e.update(),we(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(Et)}}function hr(e){const t=[],n=[];Pe.forEach(r=>e.indexOf(r)===-1?t.push(r):n.push(r)),n.forEach(r=>r()),Pe=t}const cr=new Set;function fr(e,t){e&&e.i&&(cr.delete(e),e.i(t))}function Ut(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function pr(e,t,n){const{fragment:r,after_update:i}=e.$$;r&&r.m(t,n),Et(()=>{const o=e.$$.on_mount.map(sn).filter(Bt);e.$$.on_destroy?e.$$.on_destroy.push(...o):we(o),e.$$.on_mount=[]}),i.forEach(Et)}function dr(e,t){const n=e.$$;n.fragment!==null&&(hr(n.after_update),we(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function mr(e,t){e.$$.dirty[0]===-1&&(Le.push(e),lr(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function gr(e,t,n,r,i,o,a=null,s=[-1]){const u=Xe;ze(e);const l=e.$$={fragment:null,ctx:[],props:o,update:re,not_equal:i,bound:kt(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:kt(),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,..._)=>{const b=_.length?_[0]:d;return l.ctx&&i(l.ctx[c],l.ctx[c]=b)&&(!l.skip_bound&&l.bound[c]&&l.bound[c](b),h&&mr(e,c)),d}):[],l.update(),h=!0,we(l.before_update),l.fragment=r?r(l.ctx):!1,t.target){if(t.hydrate){const c=rr(t.target);l.fragment&&l.fragment.l(c),c.forEach(H)}else l.fragment&&l.fragment.c();t.intro&&fr(e.$$.fragment),pr(e,t.target,t.anchor),he()}ze(u)}let un;typeof HTMLElement=="function"&&(un=class extends HTMLElement{constructor(t,n,r){super();te(this,"$$ctor");te(this,"$$s");te(this,"$$c");te(this,"$$cn",!1);te(this,"$$d",{});te(this,"$$r",!1);te(this,"$$p_d",{});te(this,"$$l",{});te(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 xe(this,null,function*(){if(this.$$cn=!0,!this.$$c){let t=function(o){return()=>{let a;return{c:function(){a=T("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 n={},r=ir(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]=Ye(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(Qe({},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=Ye(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]=Ye(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 Ye(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 br(e,t,n,r,i,o){let a=class extends un{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=Ye(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 yr{constructor(){te(this,"$$");te(this,"$$set")}$destroy(){dr(this,1),this.$destroy=re}$on(t,n){if(!Bt(n))return re;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&&!Qn(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const _r="4";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(_r);function Er(e,t){if(e){const n=document.createElement("style");n.innerHTML=t,e.appendChild(n)}}function vr(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 xr(e,t,n){if(window.emMessageBus){const r=document.createElement("style");window.emMessageBus.subscribe(t,i=>{r.innerHTML=i,e&&e.appendChild(r)})}}const Be=[];function wr(e,t){return{subscribe:ot(e,t).subscribe}}function ot(e,t=re){let n;const r=new Set;function i(s){if(an(e,s)&&(e=s,n)){const u=!Be.length;for(const l of r)l[1](),Be.push(l,e);if(u){for(let l=0;l<Be.length;l+=2)Be[l][0](Be[l+1]);Be.length=0}}}function o(s){i(s(e))}function a(s,u=re){const l=[s,u];return r.add(l),r.size===1&&(n=t(i,o)||re),s(e),()=>{r.delete(l),r.size===0&&n&&(n(),n=null)}}return{set:i,update:o,subscribe:a}}function ke(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 wr(n,(a,s)=>{let u=!1;const l=[];let h=0,c=re;const d=()=>{if(h)return;c();const b=t(r?l[0]:l,a,s);o?a(b):c=Bt(b)?b:re},_=i.map((b,m)=>ln(b,E=>{l[m]=E,h&=~(1<<m),u&&d()},()=>{h|=1<<m}));return u=!0,d(),function(){we(_),c(),u=!1}})}function Sr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Tr=function(t){return Or(t)&&!Hr(t)};function Or(e){return!!e&&typeof e=="object"}function Hr(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||Br(e)}var Cr=typeof Symbol=="function"&&Symbol.for,Ar=Cr?Symbol.for("react.element"):60103;function Br(e){return e.$$typeof===Ar}function Lr(e){return Array.isArray(e)?[]:{}}function We(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Me(Lr(e),e,t):e}function Pr(e,t,n){return e.concat(t).map(function(r){return We(r,n)})}function Mr(e,t){if(!t.customMerge)return Me;var n=t.customMerge(e);return typeof n=="function"?n:Me}function Ir(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function Gt(e){return Object.keys(e).concat(Ir(e))}function hn(e,t){try{return t in e}catch(n){return!1}}function Nr(e,t){return hn(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function Rr(e,t,n){var r={};return n.isMergeableObject(e)&&Gt(e).forEach(function(i){r[i]=We(e[i],n)}),Gt(t).forEach(function(i){Nr(e,i)||(hn(e,i)&&n.isMergeableObject(t[i])?r[i]=Mr(i,n)(e[i],t[i],n):r[i]=We(t[i],n))}),r}function Me(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||Pr,n.isMergeableObject=n.isMergeableObject||Tr,n.cloneUnlessOtherwiseSpecified=We;var r=Array.isArray(t),i=Array.isArray(e),o=r===i;return o?r?n.arrayMerge(e,t,n):Rr(e,t,n):We(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 kr=Me,Dr=kr;const Ur=Sr(Dr);var vt=function(e,t){return vt=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])},vt(e,t)};function st(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 n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var ce=function(){return ce=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},ce.apply(this,arguments)};function Gr(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:Wr,r=t&&t.serializer?t.serializer:zr,i=t&&t.strategy?t.strategy:$r;return i(e,{cache:n,serializer:r})}function Fr(e){return e==null||typeof e=="number"||typeof e=="boolean"}function jr(e,t,n,r){var i=Fr(r)?r:n(r),o=t.get(i);return typeof o=="undefined"&&(o=e.call(this,r),t.set(i,o)),o}function cn(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 fn(e,t,n,r,i){return n.bind(t,e,r,i)}function $r(e,t){var n=e.length===1?jr:cn;return fn(e,this,n,t.cache.create(),t.serializer)}function Vr(e,t){return fn(e,this,cn,t.cache.create(),t.serializer)}var zr=function(){return JSON.stringify(arguments)},Xr=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}(),Wr={create:function(){return new Xr}},mt={variadic:Vr},nt=function(){return nt=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},nt.apply(this,arguments)};var S;(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"})(S||(S={}));var P;(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"})(P||(P={}));var Ie;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Ie||(Ie={}));function Ft(e){return e.type===P.literal}function Zr(e){return e.type===P.argument}function pn(e){return e.type===P.number}function dn(e){return e.type===P.date}function mn(e){return e.type===P.time}function gn(e){return e.type===P.select}function bn(e){return e.type===P.plural}function qr(e){return e.type===P.pound}function yn(e){return e.type===P.tag}function _n(e){return!!(e&&typeof e=="object"&&e.type===Ie.number)}function xt(e){return!!(e&&typeof e=="object"&&e.type===Ie.dateTime)}var En=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Qr=/(?:[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 Jr(e){var t={};return e.replace(Qr,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 Yr=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function Kr(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(Yr).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 ei(e){return e.replace(/^(.*?)-/,"")}var jt=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,vn=/^(@+)?(\+|#+)?[rs]?$/g,ti=/(\*)(0+)|(#+)(0+)|(0+)/g,xn=/^(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(vn,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 wn(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 ni(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)),!xn.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Vt(e){var t={},n=wn(e);return n||t}function ri(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=ei(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),Vt(l))},{}));continue;case"engineering":t=R(R(R({},t),{notation:"engineering"}),i.options.reduce(function(u,l){return R(R({},u),Vt(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(ti,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(xn.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(jt.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(jt,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(vn.test(i.stem)){t=R(R({},t),$t(i.stem));continue}var a=wn(i.stem);a&&(t=R(R({},t),a));var s=ni(i.stem);s&&(t=R(R({},t),s))}return t}var Je={"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 ii(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=oi(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 oi(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=Je[r||""]||Je[n||""]||Je["".concat(n,"-001")]||Je["001"];return i[0]}var gt,si=new RegExp("^".concat(En.source,"*")),ai=new RegExp("".concat(En.source,"*$"));function O(e,t){return{start:e,end:t}}var li=!!String.prototype.startsWith&&"_a".startsWith("a",1),ui=!!String.fromCodePoint,hi=!!Object.fromEntries,ci=!!String.prototype.codePointAt,fi=!!String.prototype.trimStart,pi=!!String.prototype.trimEnd,di=!!Number.isSafeInteger,mi=di?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},wt=!0;try{var gi=Tn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");wt=((gt=gi.exec("a"))===null||gt===void 0?void 0:gt[0])==="a"}catch(e){wt=!1}var zt=li?function(t,n,r){return t.startsWith(n,r)}:function(t,n,r){return t.slice(r,r+n.length)===n},St=ui?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},Xt=hi?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},Sn=ci?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}},bi=fi?function(t){return t.trimStart()}:function(t){return t.replace(si,"")},yi=pi?function(t){return t.trimEnd()}:function(t){return t.replace(ai,"")};function Tn(e,t){return new RegExp(e,t)}var Tt;if(wt){var Wt=Tn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Tt=function(t,n){var r;Wt.lastIndex=n;var i=Wt.exec(t);return(r=i[1])!==null&&r!==void 0?r:""}}else Tt=function(t,n){for(var r=[];;){var i=Sn(t,n);if(i===void 0||On(i)||xi(i))break;r.push(i),n+=i>=65536?2:1}return St.apply(void 0,r)};var _i=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:P.pound,location:O(s,this.clonePosition())})}else if(o===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(S.UNMATCHED_CLOSING_TAG,O(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:P.literal,value:"<".concat(i,"/>"),location:O(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(S.INVALID_TAG,O(s,this.clonePosition()));var u=this.clonePosition(),l=this.parseTagName();return i!==l?this.error(S.UNMATCHED_CLOSING_TAG,O(u,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:P.tag,value:i,children:a,location:O(r,this.clonePosition())},err:null}:this.error(S.INVALID_TAG,O(s,this.clonePosition())))}else return this.error(S.UNCLOSED_TAG,O(r,this.clonePosition()))}else return this.error(S.INVALID_TAG,O(r,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&vi(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=O(r,this.clonePosition());return{val:{type:P.literal,value:i,location:u},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Ei(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(S.EXPECT_ARGUMENT_CLOSING_BRACE,O(r,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(S.EMPTY_ARGUMENT,O(r,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(S.MALFORMED_ARGUMENT,O(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(S.EXPECT_ARGUMENT_CLOSING_BRACE,O(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:P.argument,value:i,location:O(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(S.EXPECT_ARGUMENT_CLOSING_BRACE,O(r,this.clonePosition())):this.parseArgumentOptions(t,n,i,r);default:return this.error(S.MALFORMED_ARGUMENT,O(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=O(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(S.EXPECT_ARGUMENT_TYPE,O(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=yi(c.val);if(d.length===0)return this.error(S.EXPECT_ARGUMENT_STYLE,O(this.clonePosition(),this.clonePosition()));var _=O(h,this.clonePosition());l={style:d,styleLocation:_}}var b=this.tryParseArgumentClose(i);if(b.err)return b;var m=O(i,this.clonePosition());if(l&&zt(l==null?void 0:l.style,"::",0)){var E=bi(l.style.slice(2));if(s==="number"){var c=this.parseNumberSkeletonFromString(E,l.styleLocation);return c.err?c:{val:{type:P.number,value:r,location:m,style:c.val},err:null}}else{if(E.length===0)return this.error(S.EXPECT_DATE_TIME_SKELETON,m);var w=E;this.locale&&(w=ii(E,this.locale));var d={type:Ie.dateTime,pattern:w,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?Jr(w):{}},B=s==="date"?P.date:P.time;return{val:{type:B,value:r,location:m,style:d},err:null}}}return{val:{type:s==="number"?P.number:s==="date"?P.date:P.time,value:r,location:m,style:(o=l==null?void 0:l.style)!==null&&o!==void 0?o:null},err:null}}case"plural":case"selectordinal":case"select":{var L=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(S.EXPECT_SELECT_ARGUMENT_OPTIONS,O(L,nt({},L)));this.bumpSpace();var k=this.parseIdentifierIfPossible(),F=0;if(s!=="select"&&k.value==="offset"){if(!this.bumpIf(":"))return this.error(S.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,O(this.clonePosition(),this.clonePosition()));this.bumpSpace();var c=this.tryParseDecimalInteger(S.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,S.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(c.err)return c;this.bumpSpace(),k=this.parseIdentifierIfPossible(),F=c.val}var N=this.tryParsePluralOrSelectOptions(t,s,n,k);if(N.err)return N;var b=this.tryParseArgumentClose(i);if(b.err)return b;var ee=O(i,this.clonePosition());return s==="select"?{val:{type:P.select,value:r,options:Xt(N.val),location:ee},err:null}:{val:{type:P.plural,value:r,options:Xt(N.val),offset:F,pluralType:s==="plural"?"cardinal":"ordinal",location:ee},err:null}}default:return this.error(S.INVALID_ARGUMENT_TYPE,O(a,u))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(S.EXPECT_ARGUMENT_CLOSING_BRACE,O(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(S.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,O(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=Kr(t)}catch(i){return this.error(S.INVALID_NUMBER_SKELETON,n)}return{val:{type:Ie.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?ri(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(S.EXPECT_PLURAL_ARGUMENT_SELECTOR,S.INVALID_PLURAL_ARGUMENT_SELECTOR);if(d.err)return d;h=O(c,this.clonePosition()),l=this.message.slice(c.offset,this.offset())}else break}if(u.has(l))return this.error(n==="select"?S.DUPLICATE_SELECT_ARGUMENT_SELECTOR:S.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,h);l==="other"&&(a=!0),this.bumpSpace();var _=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?S.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:S.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,O(this.clonePosition(),this.clonePosition()));var b=this.parseMessage(t+1,n,r);if(b.err)return b;var m=this.tryParseArgumentClose(_);if(m.err)return m;s.push([l,{value:b.val,location:O(_,this.clonePosition())}]),u.add(l),this.bumpSpace(),o=this.parseIdentifierIfPossible(),l=o.value,h=o.location}return s.length===0?this.error(n==="select"?S.EXPECT_SELECT_ARGUMENT_SELECTOR:S.EXPECT_PLURAL_ARGUMENT_SELECTOR,O(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!a?this.error(S.MISSING_OTHER_CLAUSE,O(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=O(i,this.clonePosition());return o?(a*=r,mi(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=Sn(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(zt(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()&&On(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 Ei(e){return Ot(e)||e===47}function vi(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 On(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function xi(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,gn(t)||bn(t))for(var n in t.options)delete t.options[n].location,Ht(t.options[n].value);else pn(t)&&_n(t.style)||(dn(t)||mn(t))&&xt(t.style)?delete t.style.location:yn(t)&&Ht(t.children)})}function wi(e,t){t===void 0&&(t={}),t=nt({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new _i(e,t).parse();if(n.err){var r=SyntaxError(S[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 Ne;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Ne||(Ne={}));var at=function(e){st(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),Zt=function(e){st(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('", "'),'"'),Ne.INVALID_VALUE,o)||this}return t}(at),Si=function(e){st(t,e);function t(n,r,i){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),Ne.INVALID_VALUE,i)||this}return t}(at),Ti=function(e){st(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,'"'),Ne.MISSING_VALUE,r)||this}return t}(at),q;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(q||(q={}));function Oi(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 Hi(e){return typeof e=="function"}function Ke(e,t,n,r,i,o,a){if(e.length===1&&Ft(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(Ft(h)){s.push({type:q.literal,value:h.value});continue}if(qr(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 Ti(c,a);var d=i[c];if(Zr(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(dn(h)){var _=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,_).format(d)});continue}if(mn(h)){var _=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,_).format(d)});continue}if(pn(h)){var _=typeof h.style=="string"?r.number[h.style]:_n(h.style)?h.style.parsedOptions:void 0;_&&_.scale&&(d=d*(_.scale||1)),s.push({type:q.literal,value:n.getNumberFormat(t,_).format(d)});continue}if(yn(h)){var b=h.children,m=h.value,E=i[m];if(!Hi(E))throw new Si(m,"function",a);var w=Ke(b,t,n,r,i,o),B=E(w.map(function(F){return F.value}));Array.isArray(B)||(B=[B]),s.push.apply(s,B.map(function(F){return{type:typeof F=="string"?q.literal:q.object,value:F}}))}if(gn(h)){var L=h.options[d]||h.options.other;if(!L)throw new Zt(h.value,d,Object.keys(h.options),a);s.push.apply(s,Ke(L.value,t,n,r,i));continue}if(bn(h)){var L=h.options["=".concat(d)];if(!L){if(!Intl.PluralRules)throw new at(`Intl.PluralRules is not available in this environment.
|
|
2
|
+
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
3
|
+
`,Ne.MISSING_INTL_API,a);var k=n.getPluralRules(t,{type:h.pluralType}).select(d-(h.offset||0));L=h.options[k]||h.options.other}if(!L)throw new Zt(h.value,d,Object.keys(h.options),a);s.push.apply(s,Ke(L.value,t,n,r,i,d-(h.offset||0)));continue}}return Oi(s)}function Ci(e,t){return t?ce(ce(ce({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=ce(ce({},e[r]),t[r]||{}),n},{})):e}function Ai(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=Ci(e[r],t[r]),n},ce({},e)):e}function bt(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function Bi(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 Li=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 Ke(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=Gr(a,["formatters"]);this.ast=e.__parse(t,ce(ce({},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=Ai(e.formats,r),this.formatters=i&&i.formatters||Bi(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=wi,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 Pi(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 be={},Mi=(e,t,n)=>n&&(t in be||(be[t]={}),e in be[t]||(be[t][e]=n),n),Hn=(e,t)=>{if(t==null)return;if(t in be&&e in be[t])return be[t][e];const n=lt(t);for(let r=0;r<n.length;r++){const i=n[r],o=Ni(i,e);if(o)return Mi(e,t,o)}};let Lt;const qe=ot({});function Ii(e){return Lt[e]||null}function Cn(e){return e in Lt}function Ni(e,t){if(!Cn(e))return null;const n=Ii(e);return Pi(n,t)}function Ri(e){if(e==null)return;const t=lt(e);for(let n=0;n<t.length;n++){const r=t[n];if(Cn(r))return r}}function An(e,...t){delete be[e],qe.update(n=>(n[e]=Ur.all([n[e]||{},...t]),n))}ke([qe],([e])=>Object.keys(e));qe.subscribe(e=>Lt=e);const et={};function ki(e,t){et[e].delete(t),et[e].size===0&&delete et[e]}function Bn(e){return et[e]}function Di(e){return lt(e).map(t=>{const n=Bn(t);return[t,n?[...n]:[]]}).filter(([,t])=>t.length>0)}function Ct(e){return e==null?!1:lt(e).some(t=>{var n;return(n=Bn(t))==null?void 0:n.size})}function Ui(e,t){return Promise.all(t.map(r=>(ki(e,r),r().then(i=>i.default||i)))).then(r=>An(e,...r))}const Ve={};function Ln(e){if(!Ct(e))return e in Ve?Ve[e]:Promise.resolve();const t=Di(e);return Ve[e]=Promise.all(t.map(([n,r])=>Ui(n,r))).then(()=>{if(Ct(e))return Ln(e);delete Ve[e]}),Ve[e]}const Gi={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"}}},Fi={fallbackLocale:null,loadingDelay:200,formats:Gi,warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0},ji=Fi;function Re(){return ji}const yt=ot(!1);var $i=Object.defineProperty,Vi=Object.defineProperties,zi=Object.getOwnPropertyDescriptors,qt=Object.getOwnPropertySymbols,Xi=Object.prototype.hasOwnProperty,Wi=Object.prototype.propertyIsEnumerable,Qt=(e,t,n)=>t in e?$i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Zi=(e,t)=>{for(var n in t||(t={}))Xi.call(t,n)&&Qt(e,n,t[n]);if(qt)for(var n of qt(t))Wi.call(t,n)&&Qt(e,n,t[n]);return e},qi=(e,t)=>Vi(e,zi(t));let At;const rt=ot(null);function Jt(e){return e.split("-").map((t,n,r)=>r.slice(0,n+1).join("-")).reverse()}function lt(e,t=Re().fallbackLocale){const n=Jt(e);return t?[...new Set([...n,...Jt(t)])]:n}function Se(){return At!=null?At:void 0}rt.subscribe(e=>{At=e!=null?e:void 0,typeof window!="undefined"&&e!=null&&document.documentElement.setAttribute("lang",e)});const Qi=e=>{if(e&&Ri(e)&&Ct(e)){const{loadingDelay:t}=Re();let n;return typeof window!="undefined"&&Se()!=null&&t?n=window.setTimeout(()=>yt.set(!0),t):yt.set(!0),Ln(e).then(()=>{rt.set(e)}).finally(()=>{clearTimeout(n),yt.set(!1)})}return rt.set(e)},De=qi(Zi({},rt),{set:Qi}),ut=e=>{const t=Object.create(null);return r=>{const i=JSON.stringify(r);return i in t?t[i]:t[i]=e(r)}};var Ji=Object.defineProperty,it=Object.getOwnPropertySymbols,Pn=Object.prototype.hasOwnProperty,Mn=Object.prototype.propertyIsEnumerable,Yt=(e,t,n)=>t in e?Ji(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Pt=(e,t)=>{for(var n in t||(t={}))Pn.call(t,n)&&Yt(e,n,t[n]);if(it)for(var n of it(t))Mn.call(t,n)&&Yt(e,n,t[n]);return e},Ue=(e,t)=>{var n={};for(var r in e)Pn.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&it)for(var r of it(e))t.indexOf(r)<0&&Mn.call(e,r)&&(n[r]=e[r]);return n};const Ze=(e,t)=>{const{formats:n}=Re();if(e in n&&t in n[e])return n[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},Yi=ut(e=>{var t=e,{locale:n,format:r}=t,i=Ue(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return r&&(i=Ze("number",r)),new Intl.NumberFormat(n,i)}),Ki=ut(e=>{var t=e,{locale:n,format:r}=t,i=Ue(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return r?i=Ze("date",r):Object.keys(i).length===0&&(i=Ze("date","short")),new Intl.DateTimeFormat(n,i)}),eo=ut(e=>{var t=e,{locale:n,format:r}=t,i=Ue(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return r?i=Ze("time",r):Object.keys(i).length===0&&(i=Ze("time","short")),new Intl.DateTimeFormat(n,i)}),to=(e={})=>{var t=e,{locale:n=Se()}=t,r=Ue(t,["locale"]);return Yi(Pt({locale:n},r))},no=(e={})=>{var t=e,{locale:n=Se()}=t,r=Ue(t,["locale"]);return Ki(Pt({locale:n},r))},ro=(e={})=>{var t=e,{locale:n=Se()}=t,r=Ue(t,["locale"]);return eo(Pt({locale:n},r))},io=ut((e,t=Se())=>new Li(e,t,Re().formats,{ignoreTag:Re().ignoreTag})),oo=(e,t={})=>{var n,r,i,o;let a=t;typeof e=="object"&&(a=e,e=a.id);const{values:s,locale:u=Se(),default:l}=a;if(u==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let h=Hn(e,u);if(!h)h=(o=(i=(r=(n=Re()).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=io(h,u).format(s)}catch(d){d instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,d.message)}return c},so=(e,t)=>ro(t).format(e),ao=(e,t)=>no(t).format(e),lo=(e,t)=>to(t).format(e),uo=(e,t=Se())=>Hn(e,t),ho=ke([De,qe],()=>oo);ke([De],()=>so);ke([De],()=>ao);ke([De],()=>lo);ke([De,qe],()=>uo);function Kt(e,t){An(e,t)}function co(e){De.set(e)}const en={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, you will be logged out and blocked temporarily.",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, oturumunuz kapatılacak ve geçici olarak engelleneceksiniz.",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:"Select verification method",selectChannelMessage:"Choose how you would like to receive your verification code",channelSMS:"SMS kodu",channelEmail:"E-posta kodu",sendCode:"Kodu gönder",waitSeconds:"Tekrar göndermeden önce lütfen bekleyin:"}};function fo(e){Yn(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 tn(e,t,n){const r=e.slice();return r[67]=t[n],r[68]=t,r[69]=n,r}function po(e){let t,n,r=e[17]("otpTitle")+"",i,o,a,s,u,l,h,c,d,_,b,m,E,w,B,L,k,F,N=e[17]("channelSMS")+"",ee,de,Z,oe,Ge,M,z,Q,ie,j,se,K,ae,J,me=e[17]("channelEmail")+"",ye,_e,Ee,ve,pe,Fe,je;function $e(y,A){return y[9]?yo:y[12]?go:bo}let Te=$e(e),Y=Te(e),X=e[0]&&rn(e);function Oe(y,A){if(y[3]&&y[12])return So;if(y[12]&&y[4])return wo}let le=Oe(e),W=le&&le(e);function He(y,A){if(y[9])return Oo;if(y[12]&&y[4])return To}let ge=He(e),$=ge&&ge(e);return{c(){t=T("div"),n=T("div"),i=I(r),o=D(),Y.c(),a=D(),s=T("div"),u=T("label"),l=T("div"),h=D(),c=T("input"),_=D(),b=T("div"),m=ne("svg"),E=ne("path"),w=ne("circle"),B=ne("circle"),L=ne("circle"),k=D(),F=T("span"),ee=I(N),de=D(),Z=T("label"),oe=T("div"),Ge=D(),M=T("input"),Q=D(),ie=T("div"),j=ne("svg"),se=ne("rect"),K=ne("path"),ae=D(),J=T("span"),ye=I(me),_e=D(),X&&X.c(),Ee=D(),W&&W.c(),ve=D(),pe=T("div"),$&&$.c(),p(n,"class","Title"),p(t,"class","OtpDescription"),p(l,"class","RadioIndicator"),ue(l,"checked",e[0]===e[18].SMS),p(c,"type","radio"),p(c,"name","channel"),c.value=e[18].SMS,c.checked=d=e[0]===e[18].SMS,p(E,"d","M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"),p(w,"cx","9"),p(w,"cy","11"),p(w,"r","0.5"),p(w,"fill","currentColor"),p(B,"cx","12"),p(B,"cy","11"),p(B,"r","0.5"),p(B,"fill","currentColor"),p(L,"cx","15"),p(L,"cy","11"),p(L,"r","0.5"),p(L,"fill","currentColor"),p(m,"xmlns","http://www.w3.org/2000/svg"),p(m,"width","24"),p(m,"height","24"),p(m,"viewBox","0 0 24 24"),p(m,"fill","none"),p(m,"stroke","currentColor"),p(m,"stroke-width","2"),p(m,"stroke-linecap","round"),p(m,"stroke-linejoin","round"),p(b,"class","ChannelContent"),p(u,"class","ChannelCheckbox"),ue(u,"selected",e[0]===e[18].SMS),p(oe,"class","RadioIndicator"),ue(oe,"checked",e[0]===e[18].EMAIL),p(M,"type","radio"),p(M,"name","channel"),M.value=e[18].EMAIL,M.checked=z=e[0]===e[18].EMAIL,p(se,"x","2"),p(se,"y","4"),p(se,"width","20"),p(se,"height","16"),p(se,"rx","2"),p(K,"d","m2 7 10 6 10-6"),p(j,"xmlns","http://www.w3.org/2000/svg"),p(j,"width","24"),p(j,"height","24"),p(j,"viewBox","0 0 24 24"),p(j,"fill","none"),p(j,"stroke","currentColor"),p(j,"stroke-width","2"),p(j,"stroke-linecap","round"),p(j,"stroke-linejoin","round"),p(ie,"class","ChannelContent"),p(Z,"class","ChannelCheckbox"),ue(Z,"selected",e[0]===e[18].EMAIL),p(s,"class","ChannelSelection"),p(pe,"class","OtpActionButtons")},m(y,A){C(y,t,A),g(t,n),g(n,i),g(t,o),Y.m(t,null),C(y,a,A),C(y,s,A),g(s,u),g(u,l),g(u,h),g(u,c),g(u,_),g(u,b),g(b,m),g(m,E),g(m,w),g(m,B),g(m,L),g(b,k),g(b,F),g(F,ee),g(s,de),g(s,Z),g(Z,oe),g(Z,Ge),g(Z,M),g(Z,Q),g(Z,ie),g(ie,j),g(j,se),g(j,K),g(ie,ae),g(ie,J),g(J,ye),C(y,_e,A),X&&X.m(y,A),C(y,Ee,A),W&&W.m(y,A),C(y,ve,A),C(y,pe,A),$&&$.m(pe,null),Fe||(je=[fe(c,"change",e[37]),fe(M,"change",e[38])],Fe=!0)},p(y,A){A[0]&131072&&r!==(r=y[17]("otpTitle")+"")&&G(i,r),Te===(Te=$e(y))&&Y?Y.p(y,A):(Y.d(1),Y=Te(y),Y&&(Y.c(),Y.m(t,null))),A[0]&262145&&ue(l,"checked",y[0]===y[18].SMS),A[0]&1&&d!==(d=y[0]===y[18].SMS)&&(c.checked=d),A[0]&131072&&N!==(N=y[17]("channelSMS")+"")&&G(ee,N),A[0]&262145&&ue(u,"selected",y[0]===y[18].SMS),A[0]&262145&&ue(oe,"checked",y[0]===y[18].EMAIL),A[0]&1&&z!==(z=y[0]===y[18].EMAIL)&&(M.checked=z),A[0]&131072&&me!==(me=y[17]("channelEmail")+"")&&G(ye,me),A[0]&262145&&ue(Z,"selected",y[0]===y[18].EMAIL),y[0]?X?X.p(y,A):(X=rn(y),X.c(),X.m(Ee.parentNode,Ee)):X&&(X.d(1),X=null),le===(le=Oe(y))&&W?W.p(y,A):(W&&W.d(1),W=le&&le(y),W&&(W.c(),W.m(ve.parentNode,ve))),ge===(ge=He(y))&&$?$.p(y,A):($&&$.d(1),$=ge&&ge(y),$&&($.c(),$.m(pe,null)))},d(y){y&&(H(t),H(a),H(s),H(_e),H(Ee),H(ve),H(pe)),Y.d(),X&&X.d(y),W&&W.d(y),$&&$.d(),Fe=!1,we(je)}}}function mo(e){let t,n,r,i,o,a,s=e[17]("errorHeader")+"",u,l,h,c,d,_,b=e[17]("close")+"",m,E,w;return{c(){t=T("div"),n=T("div"),r=ne("svg"),i=ne("path"),o=D(),a=T("h2"),u=I(s),l=D(),h=T("p"),c=I(e[8]),d=D(),_=T("button"),m=I(b),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(_,"class","OtpButton error"),p(t,"class","OtpError")},m(B,L){C(B,t,L),g(t,n),g(n,r),g(r,i),g(n,o),g(n,a),g(a,u),g(t,l),g(t,h),g(h,c),g(t,d),g(t,_),g(_,m),E||(w=fe(_,"click",e[26]),E=!0)},p(B,L){L[0]&131072&&s!==(s=B[17]("errorHeader")+"")&&G(u,s),L[0]&256&&G(c,B[8]),L[0]&131072&&b!==(b=B[17]("close")+"")&&G(m,b)},d(B){B&&H(t),E=!1,w()}}}function go(e){let t,n,r,i;function o(l,h){return l[10]?Eo:_o}let a=o(e),s=a(e),u=e[6]&&nn(e);return{c(){t=T("p"),s.c(),r=D(),u&&u.c(),i=nr(),p(t,"class",n=e[10]?"LastWarningMessage":"")},m(l,h){C(l,t,h),s.m(t,null),C(l,r,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&&n!==(n=l[10]?"LastWarningMessage":"")&&p(t,"class",n),l[6]?u?u.p(l,h):(u=nn(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 bo(e){let t,n=(e[17]("selectChannelMessage")||"Selectează metoda prin care vrei să primești codul OTP")+"",r;return{c(){t=T("p"),r=I(n)},m(i,o){C(i,t,o),g(t,r)},p(i,o){o[0]&131072&&n!==(n=(i[17]("selectChannelMessage")||"Selectează metoda prin care vrei să primești codul OTP")+"")&&G(r,n)},d(i){i&&H(t)}}}function yo(e){let t,n=e[17]("otpExpiredMessage")+"",r;return{c(){t=T("p"),r=I(n),p(t,"class","OtpNoticeMessage"),p(t,"role","alert")},m(i,o){C(i,t,o),g(t,r)},p(i,o){o[0]&131072&&n!==(n=i[17]("otpExpiredMessage")+"")&&G(r,n)},d(i){i&&H(t)}}}function _o(e){let t=e[17]("popupMessage")+"",n;return{c(){n=I(t)},m(r,i){C(r,n,i)},p(r,i){i[0]&131072&&t!==(t=r[17]("popupMessage")+"")&&G(n,t)},d(r){r&&H(n)}}}function Eo(e){let t=e[17]("popupMessageLastWarning")+"",n;return{c(){n=I(t)},m(r,i){C(r,n,i)},p(r,i){i[0]&131072&&t!==(t=r[17]("popupMessageLastWarning")+"")&&G(n,t)},d(r){r&&H(n)}}}function nn(e){let t,n;return{c(){t=T("p"),n=I(e[8]),p(t,"class","OtpErrorMessage"),p(t,"role","alert")},m(r,i){C(r,t,i),g(t,n)},p(r,i){i[0]&256&&G(n,r[8])},d(r){r&&H(t)}}}function rn(e){let t,n,r,i;function o(u,l){return u[15]>0?xo:vo}let a=o(e),s=a(e);return{c(){t=T("button"),s.c(),p(t,"class","OtpButton"),t.disabled=n=!e[16],ue(t,"disabled",!e[16])},m(u,l){C(u,t,l),s.m(t,null),r||(i=fe(t,"click",e[20]),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]&65536&&n!==(n=!u[16])&&(t.disabled=n),l[0]&65536&&ue(t,"disabled",!u[16])},d(u){u&&H(t),s.d(),r=!1,i()}}}function vo(e){let t=e[17]("sendCode")+"",n;return{c(){n=I(t)},m(r,i){C(r,n,i)},p(r,i){i[0]&131072&&t!==(t=r[17]("sendCode")+"")&&G(n,t)},d(r){r&&H(n)}}}function xo(e){let t=e[17]("waitSeconds")+"",n,r,i,o;return{c(){n=I(t),r=I(" ("),i=I(e[15]),o=I("s)")},m(a,s){C(a,n,s),C(a,r,s),C(a,i,s),C(a,o,s)},p(a,s){s[0]&131072&&t!==(t=a[17]("waitSeconds")+"")&&G(n,t),s[0]&32768&&G(i,a[15])},d(a){a&&(H(n),H(r),H(i),H(o))}}}function wo(e){let t,n,r=e[17]("timeRemaining")+"",i,o,a=e[21](e[5])+"",s,u,l=e[17]("minutes")+"",h,c,d,_=Ut(e[2]),b=[];for(let m=0;m<_.length;m+=1)b[m]=on(tn(e,_,m));return{c(){t=T("div"),n=T("div"),i=I(r),o=D(),s=I(a),u=D(),h=I(l),c=D(),d=T("div");for(let m=0;m<b.length;m+=1)b[m].c();p(n,"class","OtpTimer"),p(d,"class","OtpField"),p(t,"class","OtpFieldWrapper")},m(m,E){C(m,t,E),g(t,n),g(n,i),g(n,o),g(n,s),g(n,u),g(n,h),g(t,c),g(t,d);for(let w=0;w<b.length;w+=1)b[w]&&b[w].m(d,null)},p(m,E){if(E[0]&131072&&r!==(r=m[17]("timeRemaining")+"")&&G(i,r),E[0]&32&&a!==(a=m[21](m[5])+"")&&G(s,a),E[0]&131072&&l!==(l=m[17]("minutes")+"")&&G(h,l),E[0]&29378580){_=Ut(m[2]);let w;for(w=0;w<_.length;w+=1){const B=tn(m,_,w);b[w]?b[w].p(B,E):(b[w]=on(B),b[w].c(),b[w].m(d,null))}for(;w<b.length;w+=1)b[w].d(1);b.length=_.length}},d(m){m&&H(t),tr(b,m)}}}function So(e){let t;return{c(){t=T("div"),t.innerHTML='<span class="OtpLoader"></span>',p(t,"class","OtpLoaderContainer")},m(n,r){C(n,t,r)},p:re,d(n){n&&H(t)}}}function on(e){let t,n,r,i=e[69],o,a;const s=()=>e[39](t,i),u=()=>e[39](null,i);function l(...c){return e[40](e[69],...c)}function h(...c){return e[41](e[69],...c)}return{c(){t=T("input"),p(t,"id",`otp-input-${e[69]}`),p(t,"type","text"),p(t,"class",n=`otp-box ${e[4].inputLength%2===0&&e[69]===e[4].inputLength/2-1?"space":""}`),p(t,"maxlength",1),t.value=r=e[67],p(t,"inputmode","numeric"),t.disabled=e[11],p(t,"autocomplete","off")},m(c,d){C(c,t,d),s(),o||(a=[fe(t,"input",l),fe(t,"keydown",h),fe(t,"paste",e[22])],o=!0)},p(c,d){e=c,d[0]&16&&n!==(n=`otp-box ${e[4].inputLength%2===0&&e[69]===e[4].inputLength/2-1?"space":""}`)&&p(t,"class",n),d[0]&4&&r!==(r=e[67])&&t.value!==r&&(t.value=r),d[0]&2048&&(t.disabled=e[11]),i!==e[69]&&(u(),i=e[69],s())},d(c){c&&H(t),u(),o=!1,we(a)}}}function To(e){let t,n=e[17]("submit")+"",r,i,o,a;return{c(){t=T("button"),r=I(n),p(t,"class","OtpButton"),t.disabled=i=e[2].join("").length!==e[4].inputLength||e[13]},m(s,u){C(s,t,u),g(t,r),o||(a=fe(t,"click",e[27]),o=!0)},p(s,u){u[0]&131072&&n!==(n=s[17]("submit")+"")&&G(r,n),u[0]&8212&&i!==(i=s[2].join("").length!==s[4].inputLength||s[13])&&(t.disabled=i)},d(s){s&&H(t),o=!1,a()}}}function Oo(e){let t,n=e[17]("resendOtp")+"",r,i,o;return{c(){t=T("button"),r=I(n),p(t,"class","OtpButton")},m(a,s){C(a,t,s),g(t,r),i||(o=fe(t,"click",e[25]),i=!0)},p(a,s){s[0]&131072&&n!==(n=a[17]("resendOtp")+"")&&G(r,n)},d(a){a&&H(t),i=!1,o()}}}function Ho(e){let t,n,r,i,o,a,s;function u(c,d){return c[7]?mo:po}let l=u(e),h=l(e);return{c(){t=T("div"),n=T("div"),r=ne("svg"),i=ne("path"),o=D(),h.c(),p(i,"d","M12.7711 0.229435C13.0582 0.517619 13.0755 0.973729 12.8215 1.28141L12.7711 1.33721L7.60685 6.50068L12.7711 11.6641C12.9128 11.8066 12.9944 11.998 12.999 12.1988C13.0035 12.3997 12.9308 12.5946 12.7957 12.7433C12.6606 12.892 12.4735 12.9832 12.2731 12.9979C12.0728 13.0126 11.8744 12.9497 11.7191 12.8223L11.6633 12.7719L6.49958 7.60791L1.3359 12.7719C1.19349 12.9136 1.00207 12.9952 0.801203 12.9998C0.60034 13.0044 0.405398 12.9316 0.256676 12.7965C0.107955 12.6614 0.0168256 12.4744 0.00212786 12.274C-0.0125699 12.0736 0.0502877 11.8753 0.177706 11.7199L0.228086 11.6641L5.3923 6.50068L0.228086 1.33721C0.0863637 1.1948 0.00478102 1.00338 0.000203544 0.802529C-0.00437393 0.601674 0.0684038 0.40674 0.203491 0.258024C0.338579 0.109308 0.525647 0.0181829 0.726024 0.00348576C0.9264 -0.0112114 1.12476 0.0516437 1.28011 0.179057L1.3359 0.229435L6.49958 5.39345L11.6633 0.229435C11.736 0.156695 11.8223 0.0989949 11.9174 0.0596283C12.0124 0.0202617 12.1143 0 12.2172 0C12.32 0 12.4219 0.0202617 12.5169 0.0596283C12.612 0.0989949 12.6983 0.156695 12.7711 0.229435Z"),p(r,"xmlns","http://www.w3.org/2000/svg"),p(r,"viewBox","0 0 13 13"),p(r,"fill","none"),p(r,"class","CloseButton"),p(n,"class","ModalCloseIcon"),p(t,"class","OtpContent")},m(c,d){C(c,t,d),g(t,n),g(n,r),g(r,i),g(t,o),h.m(t,null),e[42](t),a||(s=fe(r,"click",e[26]),a=!0)},p(c,d){l===(l=u(c))&&h?h.p(c,d):(h.d(1),h=l(c),h&&(h.c(),h.m(t,null)))},i:re,o:re,d(c){c&&H(t),h.d(),e[42](null),a=!1,s()}}}function Co(e,t,n){let r,i,o;Jn(e,ho,f=>n(17,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,b=[],m=!0,E=null,w=0,B="",L="",k=!1,F=!1,N="",ee="",de="",Z=!1,oe=!1,Ge=!1,M="",z={},Q=null,ie=!1,j=!1,se="",K,ae=[],J=null,me=0;const ye={SMS:"sms",EMAIL:"email"},_e={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(en).forEach(f=>{Kt(f,en[f])});const Ee=()=>{co(l)},ve=()=>{fetch(d).then(f=>f.json()).then(f=>{Object.keys(f).forEach(v=>{Kt(v,f[v])})}).catch(f=>{console.log(f)})},pe=f=>xe(this,null,function*(){var v;if((v=f.detail)!=null&&v["x-step-up-required"]){if(n(7,F=!1),n(6,k=!1),n(8,N=""),ee=f.detail["x-step-up-token"],de=f.detail.flow,!ee||!de){n(3,m=!1),n(7,F=!0),n(8,N=o("configError"));return}n(12,ie=!1),n(3,m=!1)}}),Fe=()=>{J&&(clearInterval(J),J=null),Q&&(clearInterval(Q),Q=null),n(6,k=!1),n(7,F=!1),n(8,N=""),n(10,oe=!1),n(2,b=[]),n(4,E=null),n(3,m=!0),n(0,M=""),n(12,ie=!1),n(36,z={})},je=()=>{Fe()},$e=()=>new Promise((f,v)=>{const x=new URL(`${h}/api/pam/v1/mfa/challenge/${ee}`),U=new Headers;U.append("accept","application/json"),U.append("Content-Type","application/json"),U.append("X-SessionId",`${c}`);const Ce={method:"PATCH",headers:U,body:JSON.stringify({channel:M,templateId:_})};fetch(x,Ce).then(Nt=>Nt.json()).then(()=>{Oe(),le(),f()}).catch(Nt=>{v()})}),Te=()=>{Q&&clearInterval(Q),Q=setInterval(()=>{const f=Qe({},z);let v=!1;Object.keys(f).forEach(x=>{f[x]>0&&(f[x]--,v=!0)}),n(36,z=f),!v&&Q&&(clearInterval(Q),Q=null)},1e3)},Y=f=>{n(0,M=f)},X=()=>xe(this,null,function*(){if(!(!M||z[M]&&z[M]>0)){n(3,m=!0),_&&_.startsWith("2fa-")&&n(28,_=`2fa-${M}`);try{yield $e(),yield It(),n(36,z=ct(Qe({},z),{[M]:30})),Te(),n(12,ie=!0),Oe(),le()}catch(f){console.error("Error submitting channel:",f),n(6,k=!0),n(8,N=o("submissionError"))}finally{n(3,m=!1)}}}),Oe=()=>{const f=new Date(B),v=new Date(L),x=new Date,U=v.getTime()-x.getTime();me=f.getTime()-U;const V=Date.now(),Ce=Math.max(0,Math.floor((me-V)/1e3));n(5,w=Ce)},le=()=>{J&&clearInterval(J),J=setInterval(()=>{const f=Date.now(),v=Math.max(0,Math.floor((me-f)/1e3));n(5,w=v),n(11,Ge=v<=0),v<=0&&(clearInterval(J),J=null,n(9,Z=!0),n(6,k=!1),n(10,oe=!1))},1e3)},W=f=>{const v=Math.floor(f/60),x=f%60;return`${v.toString().padStart(2,"0")}:${x.toString().padStart(2,"0")}`},He=(f,v)=>{const x=[...b];x[f]=v.toUpperCase(),n(2,b=x),x.join("")!==se&&n(13,j=!1)},ge=f=>{var U,V,Ce;f.preventDefault();const x=(((V=(U=f.clipboardData)==null?void 0:U.getData("text"))==null?void 0:V.trim())||"").slice(0,E.inputLength).split("");n(2,b=[...x,...Array(E.inputLength-x.length).fill("")]),(Ce=ae[x.length])==null||Ce.focus(),x.length===E.inputLength&&Mt()},$=(f,v)=>{const x=f.target,U=x.value;if(/^[a-z0-9]$/i.test(U)){He(v,U);const V=ae[v+1];V==null||V.focus()}x.value=""},y=(f,v)=>{const x=f.key,U=f.ctrlKey||f.metaKey;if(/^[a-z0-9]$/i.test(x)){if(U&&x.toLowerCase()==="v")return;f.preventDefault(),He(v,x);const V=ae[v+1];V==null||V.focus()}else if(x==="Backspace"){f.preventDefault(),b[v]!==""&&He(v,"");const V=ae[v-1];V==null||V.focus()}},A=()=>{de=="stateful"&&($e(),n(9,Z=!1));const f=new CustomEvent("otpResendRequested");window.dispatchEvent(f)},Nn=f=>{window.dispatchEvent(new CustomEvent("otpSubmitted",{detail:{code:f,maxAttempts:E.maxValidationAttempts,validatedAttempts:E.numberOfValidateAttempts}}))},Rn=f=>xe(this,null,function*(){const v=new URL(`/api/nwa/api/v1/mfa/challenge/${ee}/validate`,h);v.searchParams.append("input",f);try{const x=yield fetch(v.href,{method:"POST"});if(x.status===200){kn();return}const U=yield x.json();throw new Error(U.message)}catch(x){if(x.message===_e.INTERNAL_SERVER_ERROR){if(E.numberOfValidateAttempts===E.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,k=!0),n(8,N=o("invalidOtp")),It();return}x.message===_e.MAX_INVALIDATE&&(n(6,k=!0),n(8,N=o("invalidOtp"))),console.error("OTP submission failed:",x),n(6,k=!0),n(8,N=o("submissionError"))}finally{n(3,m=!1)}}),kn=()=>{window.dispatchEvent(new CustomEvent("otpSuccess",{detail:{message:"User successfully authenticated"}}))},Dn=()=>{window.dispatchEvent(new CustomEvent("manualClosePopup"))},Mt=()=>xe(this,null,function*(){if(b.join("").length!==E.inputLength){n(6,k=!0),n(8,N=o("invalidOtp"));return}const f=b.join("");n(13,j=!0),se=f,n(3,m=!0),n(6,k=!1),n(8,N=""),de==="stateless"&&Nn(f),de==="stateful"&&(yield Rn(f))}),It=()=>xe(this,null,function*(){if(h)try{n(3,m=!0);const f=new URL(`/api/nwa/api/v1/mfa/challenge/${ee}/config`,h),v=yield fetch(f.href),x=yield v.json();if(v.ok)n(4,E=x),n(2,b=Array(E.inputLength).fill("")),n(9,Z=!1),B=E.expirationTime,L=E.serverTime,E.numberOfValidateAttempts!==0&&(n(6,k=!0),n(8,N=o("invalidOtp"))),E.numberOfValidateAttempts===E.maxValidationAttempts-1&&n(10,oe=!0),n(3,m=!1),Oe(),le();else if(x&&x.details===_e.MAX_ATTEMPTS_EXCEEDED)window.dispatchEvent(new CustomEvent("manualClosePopup"));else{const U=x&&x.message||`Failed to load config. Status: ${v.status}`;throw new Error(U)}}catch(f){n(3,m=!1),n(7,F=!0),n(8,N=o("configError")),window.dispatchEvent(new CustomEvent("2fa-loading",{detail:{isLoading:!1}})),console.error("Error loading 2FA config:",f)}});sr(()=>(window.addEventListener("stepUpAuthRequired",pe,!1),window.addEventListener("closePopup",je,!1),()=>{window.removeEventListener("stepUpAuthRequired",pe),window.removeEventListener("closePopup",je,!1),J&&clearInterval(J),Q&&clearInterval(Q)}));const Un=()=>Y(ye.SMS),Gn=()=>Y(ye.EMAIL);function Fn(f,v){tt[f?"unshift":"push"](()=>{ae[v]=f,n(14,ae)})}const jn=(f,v)=>$(v,f),$n=(f,v)=>y(v,f);function Vn(f){tt[f?"unshift":"push"](()=>{K=f,n(1,K)})}return e.$$set=f=>{"clientstyling"in f&&n(29,a=f.clientstyling),"clientstylingurl"in f&&n(30,s=f.clientstylingurl),"mbsource"in f&&n(31,u=f.mbsource),"lang"in f&&n(32,l=f.lang),"endpoint"in f&&n(33,h=f.endpoint),"session"in f&&n(34,c=f.session),"translationurl"in f&&n(35,d=f.translationurl),"templateid"in f&&n(28,_=f.templateid)},e.$$.update=()=>{e.$$.dirty[0]&536870914&&a&&K&&Er(K,a),e.$$.dirty[0]&1073741826&&s&&K&&vr(K,s),e.$$.dirty[0]&2|e.$$.dirty[1]&1&&u&&K&&xr(K,`${u}.Style`),e.$$.dirty[1]&2&&l&&Ee(),e.$$.dirty[1]&18&&l&&d&&ve(),e.$$.dirty[0]&1|e.$$.dirty[1]&32&&n(16,r=M&&(!z[M]||z[M]===0)),e.$$.dirty[0]&1|e.$$.dirty[1]&32&&n(15,i=M&&z[M]||0)},[M,K,b,m,E,w,k,F,N,Z,oe,Ge,ie,j,ae,i,r,o,ye,Y,X,W,ge,$,y,A,Dn,Mt,_,a,s,u,l,h,c,d,z,Un,Gn,Fn,jn,$n,Vn]}class In extends yr{constructor(t){super(),gr(this,t,Co,Ho,an,{clientstyling:29,clientstylingurl:30,mbsource:31,lang:32,endpoint:33,session:34,translationurl:35,templateid:28},fo,[-1,-1,-1])}get clientstyling(){return this.$$.ctx[29]}set clientstyling(t){this.$$set({clientstyling:t}),he()}get clientstylingurl(){return this.$$.ctx[30]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),he()}get mbsource(){return this.$$.ctx[31]}set mbsource(t){this.$$set({mbsource:t}),he()}get lang(){return this.$$.ctx[32]}set lang(t){this.$$set({lang:t}),he()}get endpoint(){return this.$$.ctx[33]}set endpoint(t){this.$$set({endpoint:t}),he()}get session(){return this.$$.ctx[34]}set session(t){this.$$set({session:t}),he()}get translationurl(){return this.$$.ctx[35]}set translationurl(t){this.$$set({translationurl:t}),he()}get templateid(){return this.$$.ctx[28]}set templateid(t){this.$$set({templateid:t}),he()}}br(In,{clientstyling:{},clientstylingurl:{},mbsource:{},lang:{},endpoint:{},session:{},translationurl:{},templateid:{}},[],[],!0);exports.default=In;
|