@everymatrix/player-account-balance-modal-nd 1.0.69 → 1.0.71
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.
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";var or=Object.defineProperty,lr=Object.defineProperties;var ur=Object.getOwnPropertyDescriptors;var ln=Object.getOwnPropertySymbols;var cr=Object.prototype.hasOwnProperty,hr=Object.prototype.propertyIsEnumerable;var Ot=(e,t,n)=>t in e?or(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Nt=(e,t)=>{for(var n in t||(t={}))cr.call(t,n)&&Ot(e,n,t[n]);if(ln)for(var n of ln(t))hr.call(t,n)&&Ot(e,n,t[n]);return e},Pt=(e,t)=>lr(e,ur(t));var He=(e,t,n)=>Ot(e,typeof t!="symbol"?t+"":t,n);var bt=(e,t,n)=>new Promise((r,a)=>{var i=h=>{try{l(n.next(h))}catch(o){a(o)}},s=h=>{try{l(n.throw(h))}catch(o){a(o)}},l=h=>h.done?r(h.value):Promise.resolve(h.value).then(i,s);l((n=n.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function Ne(){}function Mn(e){return e()}function un(){return Object.create(null)}function tt(e){e.forEach(Mn)}function en(e){return typeof e=="function"}function Cn(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function fr(e){return Object.keys(e).length===0}function On(e,...t){if(e==null){for(const r of t)r(void 0);return Ne}const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function dr(e,t,n){e.$$.on_destroy.push(On(t,n))}function c(e,t){e.appendChild(t)}function pr(e,t,n){const r=br(e);if(!r.getElementById(t)){const a=E("style");a.id=t,a.textContent=n,vr(r,a)}}function br(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function vr(e,t){return c(e.head||e,t),t.sheet}function we(e,t,n){e.insertBefore(t,n||null)}function _e(e){e.parentNode&&e.parentNode.removeChild(e)}function E(e){return document.createElement(e)}function cn(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function L(e){return document.createTextNode(e)}function X(){return L(" ")}function mr(){return L("")}function Et(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function b(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function gr(e){return Array.from(e.childNodes)}function k(e,t){t=""+t,e.data!==t&&(e.data=t)}function yr(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}let ut;function lt(e){ut=e}function Br(){if(!ut)throw new Error("Function called outside component initialization");return ut}function Er(e){Br().$$.on_mount.push(e)}const qe=[],Gt=[];let Qe=[];const hn=[],_r=Promise.resolve();let jt=!1;function xr(){jt||(jt=!0,_r.then(Be))}function Vt(e){Qe.push(e)}const It=new Set;let We=0;function Be(){if(We!==0)return;const e=ut;do{try{for(;We<qe.length;){const t=qe[We];We++,lt(t),wr(t.$$)}}catch(t){throw qe.length=0,We=0,t}for(lt(null),qe.length=0,We=0;Gt.length;)Gt.pop()();for(let t=0;t<Qe.length;t+=1){const n=Qe[t];It.has(n)||(It.add(n),n())}Qe.length=0}while(qe.length);for(;hn.length;)hn.pop()();jt=!1,It.clear(),lt(e)}function wr(e){if(e.fragment!==null){e.update(),tt(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(Vt)}}function Tr(e){const t=[],n=[];Qe.forEach(r=>e.indexOf(r)===-1?t.push(r):n.push(r)),n.forEach(r=>r()),Qe=t}const Sr=new Set;function Ar(e,t){e&&e.i&&(Sr.delete(e),e.i(t))}function Hr(e,t,n){const{fragment:r,after_update:a}=e.$$;r&&r.m(t,n),Vt(()=>{const i=e.$$.on_mount.map(Mn).filter(en);e.$$.on_destroy?e.$$.on_destroy.push(...i):tt(i),e.$$.on_mount=[]}),a.forEach(Vt)}function Mr(e,t){const n=e.$$;n.fragment!==null&&(Tr(n.after_update),tt(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Cr(e,t){e.$$.dirty[0]===-1&&(qe.push(e),xr(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Or(e,t,n,r,a,i,s=null,l=[-1]){const h=ut;lt(e);const o=e.$$={fragment:null,ctx:[],props:i,update:Ne,not_equal:a,bound:un(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(h?h.$$.context:[])),callbacks:un(),dirty:l,skip_bound:!1,root:t.target||h.$$.root};s&&s(o.root);let f=!1;if(o.ctx=n?n(e,t.props||{},(d,p,..._)=>{const w=_.length?_[0]:p;return o.ctx&&a(o.ctx[d],o.ctx[d]=w)&&(!o.skip_bound&&o.bound[d]&&o.bound[d](w),f&&Cr(e,d)),p}):[],o.update(),f=!0,tt(o.before_update),o.fragment=r?r(o.ctx):!1,t.target){if(t.hydrate){const d=gr(t.target);o.fragment&&o.fragment.l(d),d.forEach(_e)}else o.fragment&&o.fragment.c();t.intro&&Ar(e.$$.fragment),Hr(e,t.target,t.anchor),Be()}lt(h)}let Nn;typeof HTMLElement=="function"&&(Nn=class extends HTMLElement{constructor(t,n,r){super();He(this,"$$ctor");He(this,"$$s");He(this,"$$c");He(this,"$$cn",!1);He(this,"$$d",{});He(this,"$$r",!1);He(this,"$$p_d",{});He(this,"$$l",{});He(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 a=this.$$c.$on(t,n);this.$$l_u.set(n,a)}super.addEventListener(t,n,r)}removeEventListener(t,n,r){if(super.removeEventListener(t,n,r),this.$$c){const a=this.$$l_u.get(n);a&&(a(),this.$$l_u.delete(n))}}connectedCallback(){return bt(this,null,function*(){if(this.$$cn=!0,!this.$$c){let t=function(i){return()=>{let s;return{c:function(){s=E("slot"),i!=="default"&&b(s,"name",i)},m:function(o,f){we(o,s,f)},d:function(o){o&&_e(s)}}}};if(yield Promise.resolve(),!this.$$cn||this.$$c)return;const n={},r=yr(this);for(const i of this.$$s)i in r&&(n[i]=[t(i)]);for(const i of this.attributes){const s=this.$$g_p(i.name);s in this.$$d||(this.$$d[s]=mt(s,i.value,this.$$p_d,"toProp"))}for(const i in this.$$p_d)!(i in this.$$d)&&this[i]!==void 0&&(this.$$d[i]=this[i],delete this[i]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:Pt(Nt({},this.$$d),{$$slots:n,$$scope:{ctx:[]}})});const a=()=>{this.$$r=!0;for(const i in this.$$p_d)if(this.$$d[i]=this.$$c.$$.ctx[this.$$c.$$.props[i]],this.$$p_d[i].reflect){const s=mt(i,this.$$d[i],this.$$p_d,"toAttribute");s==null?this.removeAttribute(this.$$p_d[i].attribute||i):this.setAttribute(this.$$p_d[i].attribute||i,s)}this.$$r=!1};this.$$c.$$.after_update.push(a),a();for(const i in this.$$l)for(const s of this.$$l[i]){const l=this.$$c.$on(i,s);this.$$l_u.set(s,l)}this.$$l={}}})}attributeChangedCallback(t,n,r){var a;this.$$r||(t=this.$$g_p(t),this.$$d[t]=mt(t,r,this.$$p_d,"toProp"),(a=this.$$c)==null||a.$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 mt(e,t,n,r){var i;const a=(i=n[e])==null?void 0:i.type;if(t=a==="Boolean"&&typeof t!="boolean"?t!=null:t,!r||!n[e])return t;if(r==="toAttribute")switch(a){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(a){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Nr(e,t,n,r,a,i){let s=class extends Nn{constructor(){super(e,n,a),this.$$p_d=t}static get observedAttributes(){return Object.keys(t).map(l=>(t[l].attribute||l).toLowerCase())}};return Object.keys(t).forEach(l=>{Object.defineProperty(s.prototype,l,{get(){return this.$$c&&l in this.$$c?this.$$c[l]:this.$$d[l]},set(h){var o;h=mt(l,h,t),this.$$d[l]=h,(o=this.$$c)==null||o.$set({[l]:h})}})}),r.forEach(l=>{Object.defineProperty(s.prototype,l,{get(){var h;return(h=this.$$c)==null?void 0:h[l]}})}),e.element=s,s}class Pr{constructor(){He(this,"$$");He(this,"$$set")}$destroy(){Mr(this,1),this.$destroy=Ne}$on(t,n){if(!en(n))return Ne;const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(n),()=>{const a=r.indexOf(n);a!==-1&&r.splice(a,1)}}$set(t){this.$$set&&!fr(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Ir="4";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Ir);const Ze=[];function Rr(e,t){return{subscribe:wt(e,t).subscribe}}function wt(e,t=Ne){let n;const r=new Set;function a(l){if(Cn(e,l)&&(e=l,n)){const h=!Ze.length;for(const o of r)o[1](),Ze.push(o,e);if(h){for(let o=0;o<Ze.length;o+=2)Ze[o][0](Ze[o+1]);Ze.length=0}}}function i(l){a(l(e))}function s(l,h=Ne){const o=[l,h];return r.add(o),r.size===1&&(n=t(a,i)||Ne),l(e),()=>{r.delete(o),r.size===0&&n&&(n(),n=null)}}return{set:a,update:i,subscribe:s}}function nt(e,t,n){const r=!Array.isArray(e),a=r?[e]:e;if(!a.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const i=t.length<2;return Rr(n,(s,l)=>{let h=!1;const o=[];let f=0,d=Ne;const p=()=>{if(f)return;d();const w=t(r?o[0]:o,s,l);i?s(w):d=en(w)?w:Ne},_=a.map((w,A)=>On(w,P=>{o[A]=P,f&=~(1<<A),h&&p()},()=>{f|=1<<A}));return h=!0,p(),function(){tt(_),d(),h=!1}})}var Lr=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Dr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Fr=function(t){return Ur(t)&&!$r(t)};function Ur(e){return!!e&&typeof e=="object"}function $r(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||Vr(e)}var Gr=typeof Symbol=="function"&&Symbol.for,jr=Gr?Symbol.for("react.element"):60103;function Vr(e){return e.$$typeof===jr}function kr(e){return Array.isArray(e)?[]:{}}function ct(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Je(kr(e),e,t):e}function Xr(e,t,n){return e.concat(t).map(function(r){return ct(r,n)})}function zr(e,t){if(!t.customMerge)return Je;var n=t.customMerge(e);return typeof n=="function"?n:Je}function Wr(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function fn(e){return Object.keys(e).concat(Wr(e))}function Pn(e,t){try{return t in e}catch(n){return!1}}function Zr(e,t){return Pn(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function qr(e,t,n){var r={};return n.isMergeableObject(e)&&fn(e).forEach(function(a){r[a]=ct(e[a],n)}),fn(t).forEach(function(a){Zr(e,a)||(Pn(e,a)&&n.isMergeableObject(t[a])?r[a]=zr(a,n)(e[a],t[a],n):r[a]=ct(t[a],n))}),r}function Je(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||Xr,n.isMergeableObject=n.isMergeableObject||Fr,n.cloneUnlessOtherwiseSpecified=ct;var r=Array.isArray(t),a=Array.isArray(e),i=r===a;return i?r?n.arrayMerge(e,t,n):qr(e,t,n):ct(t,n)}Je.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,a){return Je(r,a,n)},{})};var Qr=Je,Jr=Qr;const Yr=Dr(Jr);var kt=function(e,t){return kt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(n[a]=r[a])},kt(e,t)};function Tt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");kt(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var V=function(){return V=Object.assign||function(t){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},V.apply(this,arguments)};function Kr(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 a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}function Rt(e,t,n){if(n||arguments.length===2)for(var r=0,a=t.length,i;r<a;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var F;(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"})(F||(F={}));var te;(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"})(te||(te={}));var Ye;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Ye||(Ye={}));function dn(e){return e.type===te.literal}function ea(e){return e.type===te.argument}function In(e){return e.type===te.number}function Rn(e){return e.type===te.date}function Ln(e){return e.type===te.time}function Dn(e){return e.type===te.select}function Fn(e){return e.type===te.plural}function ta(e){return e.type===te.pound}function Un(e){return e.type===te.tag}function $n(e){return!!(e&&typeof e=="object"&&e.type===Ye.number)}function Xt(e){return!!(e&&typeof e=="object"&&e.type===Ye.dateTime)}var Gn=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,na=/(?:[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 ra(e){var t={};return e.replace(na,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 aa=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function ia(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(aa).filter(function(p){return p.length>0}),n=[],r=0,a=t;r<a.length;r++){var i=a[r],s=i.split("/");if(s.length===0)throw new Error("Invalid number skeleton");for(var l=s[0],h=s.slice(1),o=0,f=h;o<f.length;o++){var d=f[o];if(d.length===0)throw new Error("Invalid number skeleton")}n.push({stem:l,options:h})}return n}function sa(e){return e.replace(/^(.*?)-/,"")}var pn=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,jn=/^(@+)?(\+|#+)?[rs]?$/g,oa=/(\*)(0+)|(#+)(0+)|(0+)/g,Vn=/^(0+)$/;function bn(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(jn,function(n,r,a){return typeof a!="string"?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):a==="+"?t.minimumSignificantDigits=r.length:r[0]==="#"?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+(typeof a=="string"?a.length:0)),""}),t}function kn(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 la(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)),!Vn.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function vn(e){var t={},n=kn(e);return n||t}function ua(e){for(var t={},n=0,r=e;n<r.length;n++){var a=r[n];switch(a.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=a.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=sa(a.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=V(V(V({},t),{notation:"scientific"}),a.options.reduce(function(h,o){return V(V({},h),vn(o))},{}));continue;case"engineering":t=V(V(V({},t),{notation:"engineering"}),a.options.reduce(function(h,o){return V(V({},h),vn(o))},{}));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(a.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(a.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");a.options[0].replace(oa,function(h,o,f,d,p,_){if(o)t.minimumIntegerDigits=f.length;else{if(d&&p)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(Vn.test(a.stem)){t.minimumIntegerDigits=a.stem.length;continue}if(pn.test(a.stem)){if(a.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");a.stem.replace(pn,function(h,o,f,d,p,_){return f==="*"?t.minimumFractionDigits=o.length:d&&d[0]==="#"?t.maximumFractionDigits=d.length:p&&_?(t.minimumFractionDigits=p.length,t.maximumFractionDigits=p.length+_.length):(t.minimumFractionDigits=o.length,t.maximumFractionDigits=o.length),""});var i=a.options[0];i==="w"?t=V(V({},t),{trailingZeroDisplay:"stripIfInteger"}):i&&(t=V(V({},t),bn(i)));continue}if(jn.test(a.stem)){t=V(V({},t),bn(a.stem));continue}var s=kn(a.stem);s&&(t=V(V({},t),s));var l=la(a.stem);l&&(t=V(V({},t),l))}return t}var vt={"001":["H","h"],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","hB","h","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","hB","h","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","hB","h","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"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["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 ca(e,t){for(var n="",r=0;r<e.length;r++){var a=e.charAt(r);if(a==="j"){for(var i=0;r+1<e.length&&e.charAt(r+1)===a;)i++,r++;var s=1+(i&1),l=i<2?1:3+(i>>1),h="a",o=ha(t);for((o=="H"||o=="k")&&(l=0);l-- >0;)n+=h;for(;s-- >0;)n=o+n}else a==="J"?n+="H":n+=a}return n}function ha(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 a=vt[r||""]||vt[n||""]||vt["".concat(n,"-001")]||vt["001"];return a[0]}var Lt,fa=new RegExp("^".concat(Gn.source,"*")),da=new RegExp("".concat(Gn.source,"*$"));function G(e,t){return{start:e,end:t}}var pa=!!String.prototype.startsWith&&"_a".startsWith("a",1),ba=!!String.fromCodePoint,va=!!Object.fromEntries,ma=!!String.prototype.codePointAt,ga=!!String.prototype.trimStart,ya=!!String.prototype.trimEnd,Ba=!!Number.isSafeInteger,Ea=Ba?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},zt=!0;try{var _a=zn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");zt=((Lt=_a.exec("a"))===null||Lt===void 0?void 0:Lt[0])==="a"}catch(e){zt=!1}var mn=pa?function(t,n,r){return t.startsWith(n,r)}:function(t,n,r){return t.slice(r,r+n.length)===n},Wt=ba?String.fromCodePoint:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r="",a=t.length,i=0,s;a>i;){if(s=t[i++],s>1114111)throw RangeError(s+" is not a valid code point");r+=s<65536?String.fromCharCode(s):String.fromCharCode(((s-=65536)>>10)+55296,s%1024+56320)}return r},gn=va?Object.fromEntries:function(t){for(var n={},r=0,a=t;r<a.length;r++){var i=a[r],s=i[0],l=i[1];n[s]=l}return n},Xn=ma?function(t,n){return t.codePointAt(n)}:function(t,n){var r=t.length;if(!(n<0||n>=r)){var a=t.charCodeAt(n),i;return a<55296||a>56319||n+1===r||(i=t.charCodeAt(n+1))<56320||i>57343?a:(a-55296<<10)+(i-56320)+65536}},xa=ga?function(t){return t.trimStart()}:function(t){return t.replace(fa,"")},wa=ya?function(t){return t.trimEnd()}:function(t){return t.replace(da,"")};function zn(e,t){return new RegExp(e,t)}var Zt;if(zt){var yn=zn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Zt=function(t,n){var r;yn.lastIndex=n;var a=yn.exec(t);return(r=a[1])!==null&&r!==void 0?r:""}}else Zt=function(t,n){for(var r=[];;){var a=Xn(t,n);if(a===void 0||Wn(a)||Ha(a))break;r.push(a),n+=a>=65536?2:1}return Wt.apply(void 0,r)};var Ta=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 a=[];!this.isEOF();){var i=this.char();if(i===123){var s=this.parseArgument(t,r);if(s.err)return s;a.push(s.val)}else{if(i===125&&t>0)break;if(i===35&&(n==="plural"||n==="selectordinal")){var l=this.clonePosition();this.bump(),a.push({type:te.pound,location:G(l,this.clonePosition())})}else if(i===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(F.UNMATCHED_CLOSING_TAG,G(this.clonePosition(),this.clonePosition()))}else if(i===60&&!this.ignoreTag&&qt(this.peek()||0)){var s=this.parseTag(t,n);if(s.err)return s;a.push(s.val)}else{var s=this.parseLiteral(t,n);if(s.err)return s;a.push(s.val)}}}return{val:a,err:null}},e.prototype.parseTag=function(t,n){var r=this.clonePosition();this.bump();var a=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:te.literal,value:"<".concat(a,"/>"),location:G(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(t+1,n,!0);if(i.err)return i;var s=i.val,l=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!qt(this.char()))return this.error(F.INVALID_TAG,G(l,this.clonePosition()));var h=this.clonePosition(),o=this.parseTagName();return a!==o?this.error(F.UNMATCHED_CLOSING_TAG,G(h,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:te.tag,value:a,children:s,location:G(r,this.clonePosition())},err:null}:this.error(F.INVALID_TAG,G(l,this.clonePosition())))}else return this.error(F.UNCLOSED_TAG,G(r,this.clonePosition()))}else return this.error(F.INVALID_TAG,G(r,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&Aa(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var r=this.clonePosition(),a="";;){var i=this.tryParseQuote(n);if(i){a+=i;continue}var s=this.tryParseUnquoted(t,n);if(s){a+=s;continue}var l=this.tryParseLeftAngleBracket();if(l){a+=l;continue}break}var h=G(r,this.clonePosition());return{val:{type:te.literal,value:a,location:h},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Sa(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 Wt.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(),Wt(r))},e.prototype.parseArgument=function(t,n){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(F.EXPECT_ARGUMENT_CLOSING_BRACE,G(r,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(F.EMPTY_ARGUMENT,G(r,this.clonePosition()));var a=this.parseIdentifierIfPossible().value;if(!a)return this.error(F.MALFORMED_ARGUMENT,G(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(F.EXPECT_ARGUMENT_CLOSING_BRACE,G(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:te.argument,value:a,location:G(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(F.EXPECT_ARGUMENT_CLOSING_BRACE,G(r,this.clonePosition())):this.parseArgumentOptions(t,n,a,r);default:return this.error(F.MALFORMED_ARGUMENT,G(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),r=Zt(this.message,n),a=n+r.length;this.bumpTo(a);var i=this.clonePosition(),s=G(t,i);return{value:r,location:s}},e.prototype.parseArgumentOptions=function(t,n,r,a){var i,s=this.clonePosition(),l=this.parseIdentifierIfPossible().value,h=this.clonePosition();switch(l){case"":return this.error(F.EXPECT_ARGUMENT_TYPE,G(s,h));case"number":case"date":case"time":{this.bumpSpace();var o=null;if(this.bumpIf(",")){this.bumpSpace();var f=this.clonePosition(),d=this.parseSimpleArgStyleIfPossible();if(d.err)return d;var p=wa(d.val);if(p.length===0)return this.error(F.EXPECT_ARGUMENT_STYLE,G(this.clonePosition(),this.clonePosition()));var _=G(f,this.clonePosition());o={style:p,styleLocation:_}}var w=this.tryParseArgumentClose(a);if(w.err)return w;var A=G(a,this.clonePosition());if(o&&mn(o==null?void 0:o.style,"::",0)){var P=xa(o.style.slice(2));if(l==="number"){var d=this.parseNumberSkeletonFromString(P,o.styleLocation);return d.err?d:{val:{type:te.number,value:r,location:A,style:d.val},err:null}}else{if(P.length===0)return this.error(F.EXPECT_DATE_TIME_SKELETON,A);var C=P;this.locale&&(C=ca(P,this.locale));var p={type:Ye.dateTime,pattern:C,location:o.styleLocation,parsedOptions:this.shouldParseSkeletons?ra(C):{}},H=l==="date"?te.date:te.time;return{val:{type:H,value:r,location:A,style:p},err:null}}}return{val:{type:l==="number"?te.number:l==="date"?te.date:te.time,value:r,location:A,style:(i=o==null?void 0:o.style)!==null&&i!==void 0?i:null},err:null}}case"plural":case"selectordinal":case"select":{var y=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(F.EXPECT_SELECT_ARGUMENT_OPTIONS,G(y,V({},y)));this.bumpSpace();var O=this.parseIdentifierIfPossible(),U=0;if(l!=="select"&&O.value==="offset"){if(!this.bumpIf(":"))return this.error(F.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,G(this.clonePosition(),this.clonePosition()));this.bumpSpace();var d=this.tryParseDecimalInteger(F.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,F.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(d.err)return d;this.bumpSpace(),O=this.parseIdentifierIfPossible(),U=d.val}var j=this.tryParsePluralOrSelectOptions(t,l,n,O);if(j.err)return j;var w=this.tryParseArgumentClose(a);if(w.err)return w;var ee=G(a,this.clonePosition());return l==="select"?{val:{type:te.select,value:r,options:gn(j.val),location:ee},err:null}:{val:{type:te.plural,value:r,options:gn(j.val),offset:U,pluralType:l==="plural"?"cardinal":"ordinal",location:ee},err:null}}default:return this.error(F.INVALID_ARGUMENT_TYPE,G(s,h))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(F.EXPECT_ARGUMENT_CLOSING_BRACE,G(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 a=this.clonePosition();if(!this.bumpUntil("'"))return this.error(F.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,G(a,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=ia(t)}catch(a){return this.error(F.INVALID_NUMBER_SKELETON,n)}return{val:{type:Ye.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?ua(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,r,a){for(var i,s=!1,l=[],h=new Set,o=a.value,f=a.location;;){if(o.length===0){var d=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var p=this.tryParseDecimalInteger(F.EXPECT_PLURAL_ARGUMENT_SELECTOR,F.INVALID_PLURAL_ARGUMENT_SELECTOR);if(p.err)return p;f=G(d,this.clonePosition()),o=this.message.slice(d.offset,this.offset())}else break}if(h.has(o))return this.error(n==="select"?F.DUPLICATE_SELECT_ARGUMENT_SELECTOR:F.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,f);o==="other"&&(s=!0),this.bumpSpace();var _=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?F.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:F.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,G(this.clonePosition(),this.clonePosition()));var w=this.parseMessage(t+1,n,r);if(w.err)return w;var A=this.tryParseArgumentClose(_);if(A.err)return A;l.push([o,{value:w.val,location:G(_,this.clonePosition())}]),h.add(o),this.bumpSpace(),i=this.parseIdentifierIfPossible(),o=i.value,f=i.location}return l.length===0?this.error(n==="select"?F.EXPECT_SELECT_ARGUMENT_SELECTOR:F.EXPECT_PLURAL_ARGUMENT_SELECTOR,G(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(F.MISSING_OTHER_CLAUSE,G(this.clonePosition(),this.clonePosition())):{val:l,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var r=1,a=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var i=!1,s=0;!this.isEOF();){var l=this.char();if(l>=48&&l<=57)i=!0,s=s*10+(l-48),this.bump();else break}var h=G(a,this.clonePosition());return i?(s*=r,Ea(s)?{val:s,err:null}:this.error(n,h)):this.error(t,h)},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=Xn(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(mn(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()&&Wn(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 qt(e){return e>=97&&e<=122||e>=65&&e<=90}function Sa(e){return qt(e)||e===47}function Aa(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 Wn(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Ha(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 Qt(e){e.forEach(function(t){if(delete t.location,Dn(t)||Fn(t))for(var n in t.options)delete t.options[n].location,Qt(t.options[n].value);else In(t)&&$n(t.style)||(Rn(t)||Ln(t))&&Xt(t.style)?delete t.style.location:Un(t)&&Qt(t.children)})}function Ma(e,t){t===void 0&&(t={}),t=V({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Ta(e,t).parse();if(n.err){var r=SyntaxError(F[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||Qt(n.val),n.val}function Dt(e,t){var n=t&&t.cache?t.cache:Ra,r=t&&t.serializer?t.serializer:Ia,a=t&&t.strategy?t.strategy:Oa;return a(e,{cache:n,serializer:r})}function Ca(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Zn(e,t,n,r){var a=Ca(r)?r:n(r),i=t.get(a);return typeof i=="undefined"&&(i=e.call(this,r),t.set(a,i)),i}function qn(e,t,n){var r=Array.prototype.slice.call(arguments,3),a=n(r),i=t.get(a);return typeof i=="undefined"&&(i=e.apply(this,r),t.set(a,i)),i}function tn(e,t,n,r,a){return n.bind(t,e,r,a)}function Oa(e,t){var n=e.length===1?Zn:qn;return tn(e,this,n,t.cache.create(),t.serializer)}function Na(e,t){return tn(e,this,qn,t.cache.create(),t.serializer)}function Pa(e,t){return tn(e,this,Zn,t.cache.create(),t.serializer)}var Ia=function(){return JSON.stringify(arguments)};function nn(){this.cache=Object.create(null)}nn.prototype.get=function(e){return this.cache[e]};nn.prototype.set=function(e,t){this.cache[e]=t};var Ra={create:function(){return new nn}},Ft={variadic:Na,monadic:Pa},Ke;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Ke||(Ke={}));var St=function(e){Tt(t,e);function t(n,r,a){var i=e.call(this,n)||this;return i.code=r,i.originalMessage=a,i}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),Bn=function(e){Tt(t,e);function t(n,r,a,i){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(a).join('", "'),'"'),Ke.INVALID_VALUE,i)||this}return t}(St),La=function(e){Tt(t,e);function t(n,r,a){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),Ke.INVALID_VALUE,a)||this}return t}(St),Da=function(e){Tt(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,'"'),Ke.MISSING_VALUE,r)||this}return t}(St),Ee;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Ee||(Ee={}));function Fa(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==Ee.literal||n.type!==Ee.literal?t.push(n):r.value+=n.value,t},[])}function Ua(e){return typeof e=="function"}function gt(e,t,n,r,a,i,s){if(e.length===1&&dn(e[0]))return[{type:Ee.literal,value:e[0].value}];for(var l=[],h=0,o=e;h<o.length;h++){var f=o[h];if(dn(f)){l.push({type:Ee.literal,value:f.value});continue}if(ta(f)){typeof i=="number"&&l.push({type:Ee.literal,value:n.getNumberFormat(t).format(i)});continue}var d=f.value;if(!(a&&d in a))throw new Da(d,s);var p=a[d];if(ea(f)){(!p||typeof p=="string"||typeof p=="number")&&(p=typeof p=="string"||typeof p=="number"?String(p):""),l.push({type:typeof p=="string"?Ee.literal:Ee.object,value:p});continue}if(Rn(f)){var _=typeof f.style=="string"?r.date[f.style]:Xt(f.style)?f.style.parsedOptions:void 0;l.push({type:Ee.literal,value:n.getDateTimeFormat(t,_).format(p)});continue}if(Ln(f)){var _=typeof f.style=="string"?r.time[f.style]:Xt(f.style)?f.style.parsedOptions:r.time.medium;l.push({type:Ee.literal,value:n.getDateTimeFormat(t,_).format(p)});continue}if(In(f)){var _=typeof f.style=="string"?r.number[f.style]:$n(f.style)?f.style.parsedOptions:void 0;_&&_.scale&&(p=p*(_.scale||1)),l.push({type:Ee.literal,value:n.getNumberFormat(t,_).format(p)});continue}if(Un(f)){var w=f.children,A=f.value,P=a[A];if(!Ua(P))throw new La(A,"function",s);var C=gt(w,t,n,r,a,i),H=P(C.map(function(U){return U.value}));Array.isArray(H)||(H=[H]),l.push.apply(l,H.map(function(U){return{type:typeof U=="string"?Ee.literal:Ee.object,value:U}}))}if(Dn(f)){var y=f.options[p]||f.options.other;if(!y)throw new Bn(f.value,p,Object.keys(f.options),s);l.push.apply(l,gt(y.value,t,n,r,a));continue}if(Fn(f)){var y=f.options["=".concat(p)];if(!y){if(!Intl.PluralRules)throw new St(`Intl.PluralRules is not available in this environment.
|
|
2
|
+
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
3
|
+
`,Ke.MISSING_INTL_API,s);var O=n.getPluralRules(t,{type:f.pluralType}).select(p-(f.offset||0));y=f.options[O]||f.options.other}if(!y)throw new Bn(f.value,p,Object.keys(f.options),s);l.push.apply(l,gt(y.value,t,n,r,a,p-(f.offset||0)));continue}}return Fa(l)}function $a(e,t){return t?V(V(V({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=V(V({},e[r]),t[r]||{}),n},{})):e}function Ga(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=$a(e[r],t[r]),n},V({},e)):e}function Ut(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function ja(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,Rt([void 0],n,!1)))},{cache:Ut(e.number),strategy:Ft.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,Rt([void 0],n,!1)))},{cache:Ut(e.dateTime),strategy:Ft.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,Rt([void 0],n,!1)))},{cache:Ut(e.pluralRules),strategy:Ft.variadic})}}var Va=function(){function e(t,n,r,a){var i=this;if(n===void 0&&(n=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(h){var o=i.formatToParts(h);if(o.length===1)return o[0].value;var f=o.reduce(function(d,p){return!d.length||p.type!==Ee.literal||typeof d[d.length-1]!="string"?d.push(p.value):d[d.length-1]+=p.value,d},[]);return f.length<=1?f[0]||"":f},this.formatToParts=function(h){return gt(i.ast,i.locales,i.formatters,i.formats,h,void 0,i.message)},this.resolvedOptions=function(){var h;return{locale:((h=i.resolvedLocale)===null||h===void 0?void 0:h.toString())||Intl.NumberFormat.supportedLocalesOf(i.locales)[0]}},this.getAst=function(){return i.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 s=a||{};s.formatters;var l=Kr(s,["formatters"]);this.ast=e.__parse(t,V(V({},l),{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=Ga(e.formats,r),this.formatters=a&&a.formatters||ja(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=Ma,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 ka(e,t){if(t==null)return;if(t in e)return e[t];const n=t.split(".");let r=e;for(let a=0;a<n.length;a++)if(typeof r=="object"){if(a>0){const i=n.slice(a,n.length).join(".");if(i in r){r=r[i];break}}r=r[n[a]]}else r=void 0;return r}const Ue={},Xa=(e,t,n)=>n&&(t in Ue||(Ue[t]={}),e in Ue[t]||(Ue[t][e]=n),n),Qn=(e,t)=>{if(t==null)return;if(t in Ue&&e in Ue[t])return Ue[t][e];const n=At(t);for(let r=0;r<n.length;r++){const a=n[r],i=Wa(a,e);if(i)return Xa(e,t,i)}};let rn;const ft=wt({});function za(e){return rn[e]||null}function Jn(e){return e in rn}function Wa(e,t){if(!Jn(e))return null;const n=za(e);return ka(n,t)}function Za(e){if(e==null)return;const t=At(e);for(let n=0;n<t.length;n++){const r=t[n];if(Jn(r))return r}}function Yn(e,...t){delete Ue[e],ft.update(n=>(n[e]=Yr.all([n[e]||{},...t]),n))}nt([ft],([e])=>Object.keys(e));ft.subscribe(e=>rn=e);const yt={};function qa(e,t){yt[e].delete(t),yt[e].size===0&&delete yt[e]}function Kn(e){return yt[e]}function Qa(e){return At(e).map(t=>{const n=Kn(t);return[t,n?[...n]:[]]}).filter(([,t])=>t.length>0)}function Jt(e){return e==null?!1:At(e).some(t=>{var n;return(n=Kn(t))==null?void 0:n.size})}function Ja(e,t){return Promise.all(t.map(r=>(qa(e,r),r().then(a=>a.default||a)))).then(r=>Yn(e,...r))}const ot={};function er(e){if(!Jt(e))return e in ot?ot[e]:Promise.resolve();const t=Qa(e);return ot[e]=Promise.all(t.map(([n,r])=>Ja(n,r))).then(()=>{if(Jt(e))return er(e);delete ot[e]}),ot[e]}const Ya={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"}}},Ka={fallbackLocale:null,loadingDelay:200,formats:Ya,warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0},ei=Ka;function et(){return ei}const $t=wt(!1);var ti=Object.defineProperty,ni=Object.defineProperties,ri=Object.getOwnPropertyDescriptors,En=Object.getOwnPropertySymbols,ai=Object.prototype.hasOwnProperty,ii=Object.prototype.propertyIsEnumerable,_n=(e,t,n)=>t in e?ti(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,si=(e,t)=>{for(var n in t||(t={}))ai.call(t,n)&&_n(e,n,t[n]);if(En)for(var n of En(t))ii.call(t,n)&&_n(e,n,t[n]);return e},oi=(e,t)=>ni(e,ri(t));let Yt;const _t=wt(null);function xn(e){return e.split("-").map((t,n,r)=>r.slice(0,n+1).join("-")).reverse()}function At(e,t=et().fallbackLocale){const n=xn(e);return t?[...new Set([...n,...xn(t)])]:n}function Ve(){return Yt!=null?Yt:void 0}_t.subscribe(e=>{Yt=e!=null?e:void 0,typeof window!="undefined"&&e!=null&&document.documentElement.setAttribute("lang",e)});const li=e=>{if(e&&Za(e)&&Jt(e)){const{loadingDelay:t}=et();let n;return typeof window!="undefined"&&Ve()!=null&&t?n=window.setTimeout(()=>$t.set(!0),t):$t.set(!0),er(e).then(()=>{_t.set(e)}).finally(()=>{clearTimeout(n),$t.set(!1)})}return _t.set(e)},rt=oi(si({},_t),{set:li}),Ht=e=>{const t=Object.create(null);return r=>{const a=JSON.stringify(r);return a in t?t[a]:t[a]=e(r)}};var ui=Object.defineProperty,xt=Object.getOwnPropertySymbols,tr=Object.prototype.hasOwnProperty,nr=Object.prototype.propertyIsEnumerable,wn=(e,t,n)=>t in e?ui(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,an=(e,t)=>{for(var n in t||(t={}))tr.call(t,n)&&wn(e,n,t[n]);if(xt)for(var n of xt(t))nr.call(t,n)&&wn(e,n,t[n]);return e},at=(e,t)=>{var n={};for(var r in e)tr.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&xt)for(var r of xt(e))t.indexOf(r)<0&&nr.call(e,r)&&(n[r]=e[r]);return n};const ht=(e,t)=>{const{formats:n}=et();if(e in n&&t in n[e])return n[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},ci=Ht(e=>{var t=e,{locale:n,format:r}=t,a=at(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return r&&(a=ht("number",r)),new Intl.NumberFormat(n,a)}),hi=Ht(e=>{var t=e,{locale:n,format:r}=t,a=at(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return r?a=ht("date",r):Object.keys(a).length===0&&(a=ht("date","short")),new Intl.DateTimeFormat(n,a)}),fi=Ht(e=>{var t=e,{locale:n,format:r}=t,a=at(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return r?a=ht("time",r):Object.keys(a).length===0&&(a=ht("time","short")),new Intl.DateTimeFormat(n,a)}),di=(e={})=>{var t=e,{locale:n=Ve()}=t,r=at(t,["locale"]);return ci(an({locale:n},r))},pi=(e={})=>{var t=e,{locale:n=Ve()}=t,r=at(t,["locale"]);return hi(an({locale:n},r))},bi=(e={})=>{var t=e,{locale:n=Ve()}=t,r=at(t,["locale"]);return fi(an({locale:n},r))},vi=Ht((e,t=Ve())=>new Va(e,t,et().formats,{ignoreTag:et().ignoreTag})),mi=(e,t={})=>{var n,r,a,i;let s=t;typeof e=="object"&&(s=e,e=s.id);const{values:l,locale:h=Ve(),default:o}=s;if(h==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let f=Qn(e,h);if(!f)f=(i=(a=(r=(n=et()).handleMissingMessage)==null?void 0:r.call(n,{locale:h,id:e,defaultValue:o}))!=null?a:o)!=null?i:e;else if(typeof f!="string")return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof f}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),f;if(!l)return f;let d=f;try{d=vi(f,h).format(l)}catch(p){p instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,p.message)}return d},gi=(e,t)=>bi(t).format(e),yi=(e,t)=>pi(t).format(e),Bi=(e,t)=>di(t).format(e),Ei=(e,t=Ve())=>Qn(e,t),_i=nt([rt,ft],()=>mi);nt([rt],()=>gi);nt([rt],()=>yi);nt([rt],()=>Bi);nt([rt,ft],()=>Ei);function Tn(e,t){Yn(e,t)}function xi(e){rt.set(e)}const Sn={en:{balanceTitle:"Your Balance",totalBalance:"Total Balance",cashBalance:"Cash Balance",bonusBalance:"Bonus Balance",depositButton:"Deposit"},"zh-hk":{balanceTitle:"您的餘額",totalBalance:"總餘額",cashBalance:"現金餘額",bonusBalance:"獎金餘額",depositButton:"訂金"},de:{balanceTitle:"Dein Kontostand",totalBalance:"Gesamtsaldo",cashBalance:"Barguthaben",bonusBalance:"Bonusguthaben",depositButton:"Anzahlung"},it:{balanceTitle:"Il tuo bilancio",totalBalance:"Saldo totale",cashBalance:"Saldo in contanti",bonusBalance:"Saldo bonus",depositButton:"Depositare"},fr:{balanceTitle:"Votre solde",totalBalance:"Solde total",cashBalance:"Encaisse",bonusBalance:"Solde du bonus",depositButton:"Dépôt"},es:{balanceTitle:"Saldos",totalBalance:"Saldo Total",cashBalance:"Saldo Disponible",bonusBalance:"Saldo de Bonos",depositButton:"Deposita"},tr:{balanceTitle:"Bakiyeniz",totalBalance:"Toplam Bakiye",cashBalance:"Nakit dengesi",bonusBalance:"Bonus Bakiyesi",depositButton:"Depozito"},ru:{balanceTitle:"Ваш баланс",totalBalance:"Итоговый баланс",cashBalance:"Денежных баланс",bonusBalance:"Бонусный баланс",depositButton:"Депозит"},ro:{balanceTitle:"Balanta Ta",totalBalance:"Balanta Totala",cashBalance:"Balanta Cash",bonusBalance:"Balanta Bonus",depositButton:"Depunere"},hr:{balanceTitle:"Vaše stanje",totalBalance:"Ukupno stanje",cashBalance:"Stanje novca",bonusBalance:"Stanje bonusa",depositButton:"Uplata"},hu:{balanceTitle:"Az egyensúlyod",totalBalance:"Teljes egyenleg",cashBalance:"Pénzforgalmi egyenleg",bonusBalance:"Bónuszegyenleg",depositButton:"Letét"},pl:{balanceTitle:"Twój balans",totalBalance:"Saldo całkowite",cashBalance:"Saldo środków pieniężnych",bonusBalance:"Saldo bonusowe",depositButton:"Depozyt"},pt:{balanceTitle:"Seu Saldo",totalBalance:"Saldo total",cashBalance:"Saldo de caixa",bonusBalance:"Saldo de bônus",depositButton:"Depósito"},sl:{balanceTitle:"Vaše stanje",totalBalance:"Skupno stanje",cashBalance:"Stanje gotovine",bonusBalance:"Bonus stanje",depositButton:"Polog"},sr:{balanceTitle:"Стање",totalBalance:"Укупно стање",cashBalance:"Новчано стање",bonusBalance:"Бонус Баланце",depositButton:"Депозит"},"pt-br":{balanceTitle:"Seu balanço",totalBalance:"Balanço total",cashBalance:"Saldo de caixa",bonusBalance:"Saldo em títulos",depositButton:"Depósito"},"es-mx":{balanceTitle:"Su saldo",totalBalance:"Saldo total",cashBalance:"Saldo en efectivo",bonusBalance:"Saldo en bonos",depositButton:"Depósito"}};var Kt={exports:{}};/** @license
|
|
4
|
+
* eventsource.js
|
|
5
|
+
* Available under MIT License (MIT)
|
|
6
|
+
* https://github.com/Yaffle/EventSource/
|
|
7
|
+
*/(function(e,t){(function(n){var r=n.setTimeout,a=n.clearTimeout,i=n.XMLHttpRequest,s=n.XDomainRequest,l=n.ActiveXObject,h=n.EventSource,o=n.document,f=n.Promise,d=n.fetch,p=n.Response,_=n.TextDecoder,w=n.TextEncoder,A=n.AbortController;if(typeof window!="undefined"&&typeof o!="undefined"&&!("readyState"in o)&&o.body==null&&(o.readyState="loading",window.addEventListener("load",function(u){o.readyState="complete"},!1)),i==null&&l!=null&&(i=function(){return new l("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(u){function v(){}return v.prototype=u,new v}),Date.now||(Date.now=function(){return new Date().getTime()}),A==null){var P=d;d=function(u,v){var B=v.signal;return P(u,{headers:v.headers,credentials:v.credentials,cache:v.cache}).then(function(m){var S=m.body.getReader();return B._reader=S,B._aborted&&B._reader.cancel(),{status:m.status,statusText:m.statusText,headers:m.headers,body:{getReader:function(){return S}}}})},A=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function C(){this.bitsNeeded=0,this.codePoint=0}C.prototype.decode=function(u){function v(q,K,N){if(N===1)return q>=128>>K&&q<<K<=2047;if(N===2)return q>=2048>>K&&q<<K<=55295||q>=57344>>K&&q<<K<=65535;if(N===3)return q>=65536>>K&&q<<K<=1114111;throw new Error}function B(q,K){if(q===6*1)return K>>6>15?3:K>31?2:1;if(q===6*2)return K>15?3:2;if(q===6*3)return 3;throw new Error}for(var m=65533,S="",T=this.bitsNeeded,x=this.codePoint,I=0;I<u.length;I+=1){var $=u[I];T!==0&&($<128||$>191||!v(x<<6|$&63,T-6,B(T,x)))&&(T=0,x=m,S+=String.fromCharCode(x)),T===0?($>=0&&$<=127?(T=0,x=$):$>=192&&$<=223?(T=6*1,x=$&31):$>=224&&$<=239?(T=6*2,x=$&15):$>=240&&$<=247?(T=6*3,x=$&7):(T=0,x=m),T!==0&&!v(x,T,B(T,x))&&(T=0,x=m)):(T-=6,x=x<<6|$&63),T===0&&(x<=65535?S+=String.fromCharCode(x):(S+=String.fromCharCode(55296+(x-65535-1>>10)),S+=String.fromCharCode(56320+(x-65535-1&1023))))}return this.bitsNeeded=T,this.codePoint=x,S};var H=function(){try{return new _().decode(new w().encode("test"),{stream:!0})==="test"}catch(u){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+u)}return!1};(_==null||w==null||!H())&&(_=C);var y=function(){};function O(u){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=y,this.onload=y,this.onerror=y,this.onreadystatechange=y,this._contentType="",this._xhr=u,this._sendTimeout=0,this._abort=y}O.prototype.open=function(u,v){this._abort(!0);var B=this,m=this._xhr,S=1,T=0;this._abort=function(N){B._sendTimeout!==0&&(a(B._sendTimeout),B._sendTimeout=0),(S===1||S===2||S===3)&&(S=4,m.onload=y,m.onerror=y,m.onabort=y,m.onprogress=y,m.onreadystatechange=y,m.abort(),T!==0&&(a(T),T=0),N||(B.readyState=4,B.onabort(null),B.onreadystatechange())),S=0};var x=function(){if(S===1){var N=0,ae="",Ie=void 0;if("contentType"in m)N=200,ae="OK",Ie=m.contentType;else try{N=m.status,ae=m.statusText,Ie=m.getResponseHeader("Content-Type")}catch(it){N=0,ae="",Ie=void 0}N!==0&&(S=2,B.readyState=2,B.status=N,B.statusText=ae,B._contentType=Ie,B.onreadystatechange())}},I=function(){if(x(),S===2||S===3){S=3;var N="";try{N=m.responseText}catch(ae){}B.readyState=3,B.responseText=N,B.onprogress()}},$=function(N,ae){if((ae==null||ae.preventDefault==null)&&(ae={preventDefault:y}),I(),S===1||S===2||S===3){if(S=4,T!==0&&(a(T),T=0),B.readyState=4,N==="load")B.onload(ae);else if(N==="error")B.onerror(ae);else if(N==="abort")B.onabort(ae);else throw new TypeError;B.onreadystatechange()}},q=function(N){m!=null&&(m.readyState===4?(!("onload"in m)||!("onerror"in m)||!("onabort"in m))&&$(m.responseText===""?"error":"load",N):m.readyState===3?"onprogress"in m||I():m.readyState===2&&x())},K=function(){T=r(function(){K()},500),m.readyState===3&&I()};"onload"in m&&(m.onload=function(N){$("load",N)}),"onerror"in m&&(m.onerror=function(N){$("error",N)}),"onabort"in m&&(m.onabort=function(N){$("abort",N)}),"onprogress"in m&&(m.onprogress=I),"onreadystatechange"in m&&(m.onreadystatechange=function(N){q(N)}),("contentType"in m||!("ontimeout"in i.prototype))&&(v+=(v.indexOf("?")===-1?"?":"&")+"padding=true"),m.open(u,v,!0),"readyState"in m&&(T=r(function(){K()},0))},O.prototype.abort=function(){this._abort(!1)},O.prototype.getResponseHeader=function(u){return this._contentType},O.prototype.setRequestHeader=function(u,v){var B=this._xhr;"setRequestHeader"in B&&B.setRequestHeader(u,v)},O.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},O.prototype.send=function(){if((!("ontimeout"in i.prototype)||!("sendAsBinary"in i.prototype)&&!("mozAnon"in i.prototype))&&o!=null&&o.readyState!=null&&o.readyState!=="complete"){var u=this;u._sendTimeout=r(function(){u._sendTimeout=0,u.send()},4);return}var v=this._xhr;"withCredentials"in v&&(v.withCredentials=this.withCredentials);try{v.send(void 0)}catch(B){throw B}};function U(u){return u.replace(/[A-Z]/g,function(v){return String.fromCharCode(v.charCodeAt(0)+32)})}function j(u){for(var v=Object.create(null),B=u.split(`\r
|
|
8
|
+
`),m=0;m<B.length;m+=1){var S=B[m],T=S.split(": "),x=T.shift(),I=T.join(": ");v[U(x)]=I}this._map=v}j.prototype.get=function(u){return this._map[U(u)]},i!=null&&i.HEADERS_RECEIVED==null&&(i.HEADERS_RECEIVED=2);function ee(){}ee.prototype.open=function(u,v,B,m,S,T,x){u.open("GET",S);var I=0;u.onprogress=function(){var q=u.responseText,K=q.slice(I);I+=K.length,B(K)},u.onerror=function(q){q.preventDefault(),m(new Error("NetworkError"))},u.onload=function(){m(null)},u.onabort=function(){m(null)},u.onreadystatechange=function(){if(u.readyState===i.HEADERS_RECEIVED){var q=u.status,K=u.statusText,N=u.getResponseHeader("Content-Type"),ae=u.getAllResponseHeaders();v(q,K,N,new j(ae))}},u.withCredentials=T;for(var $ in x)Object.prototype.hasOwnProperty.call(x,$)&&u.setRequestHeader($,x[$]);return u.send(),u};function Y(u){this._headers=u}Y.prototype.get=function(u){return this._headers.get(u)};function Q(){}Q.prototype.open=function(u,v,B,m,S,T,x){var I=null,$=new A,q=$.signal,K=new _;return d(S,{headers:x,credentials:T?"include":"same-origin",signal:q,cache:"no-store"}).then(function(N){return I=N.body.getReader(),v(N.status,N.statusText,N.headers.get("Content-Type"),new Y(N.headers)),new f(function(ae,Ie){var it=function(){I.read().then(function(Te){if(Te.done)ae(void 0);else{var me=K.decode(Te.value,{stream:!0});B(me),it()}}).catch(function(Te){Ie(Te)})};it()})}).catch(function(N){if(N.name!=="AbortError")return N}).then(function(N){m(N)}),{abort:function(){I!=null&&I.cancel(),$.abort()}}};function M(){this._listeners=Object.create(null)}function W(u){r(function(){throw u},0)}M.prototype.dispatchEvent=function(u){u.target=this;var v=this._listeners[u.type];if(v!=null)for(var B=v.length,m=0;m<B;m+=1){var S=v[m];try{typeof S.handleEvent=="function"?S.handleEvent(u):S.call(this,u)}catch(T){W(T)}}},M.prototype.addEventListener=function(u,v){u=String(u);var B=this._listeners,m=B[u];m==null&&(m=[],B[u]=m);for(var S=!1,T=0;T<m.length;T+=1)m[T]===v&&(S=!0);S||m.push(v)},M.prototype.removeEventListener=function(u,v){u=String(u);var B=this._listeners,m=B[u];if(m!=null){for(var S=[],T=0;T<m.length;T+=1)m[T]!==v&&S.push(m[T]);S.length===0?delete B[u]:B[u]=S}};function D(u){this.type=u,this.target=void 0}function ne(u,v){D.call(this,u),this.data=v.data,this.lastEventId=v.lastEventId}ne.prototype=Object.create(D.prototype);function ie(u,v){D.call(this,u),this.status=v.status,this.statusText=v.statusText,this.headers=v.headers}ie.prototype=Object.create(D.prototype);function se(u,v){D.call(this,u),this.error=v.error}se.prototype=Object.create(D.prototype);var de=-1,le=0,ve=1,pe=2,xe=-1,J=0,Z=1,re=2,$e=3,ke=/^text\/event\-stream(;.*)?$/i,Fe=1e3,Ge=18e6,g=function(u,v){var B=u==null?v:parseInt(u,10);return B!==B&&(B=v),R(B)},R=function(u){return Math.min(Math.max(u,Fe),Ge)},z=function(u,v,B){try{typeof v=="function"&&v.call(u,B)}catch(m){W(m)}};function oe(u,v){M.call(this),v=v||{},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,ue(this,u,v)}function he(){return i!=null&&"withCredentials"in i.prototype||s==null?new i:new s}var Me=d!=null&&p!=null&&"body"in p.prototype;function ue(u,v,B){v=String(v);var m=!!B.withCredentials,S=B.lastEventIdQueryParameterName||"lastEventId",T=R(1e3),x=g(B.heartbeatTimeout,45e3),I="",$=T,q=!1,K=0,N=B.headers||{},ae=B.Transport,Ie=Me&&ae==null?void 0:new O(ae!=null?new ae:he()),it=ae!=null&&typeof ae!="string"?new ae:Ie==null?new Q:new ee,Te=void 0,me=0,Ce=de,Xe="",dt="",Re="",pt="",ge=J,Mt=0,je=0,ir=function(fe,ce,Se,Ae){if(Ce===le)if(fe===200&&Se!=null&&ke.test(Se)){Ce=ve,q=Date.now(),$=T,u.readyState=ve;var ye=new ie("open",{status:fe,statusText:ce,headers:Ae});u.dispatchEvent(ye),z(u,u.onopen,ye)}else{var be="";fe!==200?(ce&&(ce=ce.replace(/\s+/g," ")),be="EventSource's response has a status "+fe+" "+ce+" that is not 200. Aborting the connection."):be="EventSource's response has a Content-Type specifying an unsupported type: "+(Se==null?"-":Se.replace(/\s+/g," "))+". Aborting the connection.",Ct();var ye=new ie("error",{status:fe,statusText:ce,headers:Ae});u.dispatchEvent(ye),z(u,u.onerror,ye),console.error(be)}},sr=function(fe){if(Ce===ve){for(var ce=-1,Se=0;Se<fe.length;Se+=1){var Ae=fe.charCodeAt(Se);(Ae===10||Ae===13)&&(ce=Se)}var ye=(ce!==-1?pt:"")+fe.slice(0,ce+1);pt=(ce===-1?pt:"")+fe.slice(ce+1),fe!==""&&(q=Date.now(),K+=fe.length);for(var be=0;be<ye.length;be+=1){var Ae=ye.charCodeAt(be);if(ge===xe&&Ae===10)ge=J;else if(ge===xe&&(ge=J),Ae===13||Ae===10){if(ge!==J){ge===Z&&(je=be+1);var Le=ye.slice(Mt,je-1),De=ye.slice(je+(je<be&&ye.charCodeAt(je)===32?1:0),be);Le==="data"?(Xe+=`
|
|
9
|
+
`,Xe+=De):Le==="id"?dt=De:Le==="event"?Re=De:Le==="retry"?(T=g(De,T),$=T):Le==="heartbeatTimeout"&&(x=g(De,x),me!==0&&(a(me),me=r(function(){st()},x)))}if(ge===J){if(Xe!==""){I=dt,Re===""&&(Re="message");var ze=new ne(Re,{data:Xe.slice(1),lastEventId:dt});if(u.dispatchEvent(ze),Re==="open"?z(u,u.onopen,ze):Re==="message"?z(u,u.onmessage,ze):Re==="error"&&z(u,u.onerror,ze),Ce===pe)return}Xe="",Re=""}ge=Ae===13?xe:J}else ge===J&&(Mt=be,ge=Z),ge===Z?Ae===58&&(je=be+1,ge=re):ge===re&&(ge=$e)}}},on=function(fe){if(Ce===ve||Ce===le){Ce=de,me!==0&&(a(me),me=0),me=r(function(){st()},$),$=R(Math.min(T*16,$*2)),u.readyState=le;var ce=new se("error",{error:fe});u.dispatchEvent(ce),z(u,u.onerror,ce),fe!=null&&console.error(fe)}},Ct=function(){Ce=pe,Te!=null&&(Te.abort(),Te=void 0),me!==0&&(a(me),me=0),u.readyState=pe},st=function(){if(me=0,Ce!==de){if(!q&&Te!=null)on(new Error("No activity within "+x+" milliseconds. "+(Ce===le?"No response received.":K+" chars received.")+" Reconnecting.")),Te!=null&&(Te.abort(),Te=void 0);else{var fe=Math.max((q||Date.now())+x-Date.now(),1);q=!1,me=r(function(){st()},fe)}return}q=!1,K=0,me=r(function(){st()},x),Ce=le,Xe="",Re="",dt=I,pt="",Mt=0,je=0,ge=J;var ce=v;if(v.slice(0,5)!=="data:"&&v.slice(0,5)!=="blob:"&&I!==""){var Se=v.indexOf("?");ce=Se===-1?v:v.slice(0,Se+1)+v.slice(Se+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(De,ze){return ze===S?"":De}),ce+=(v.indexOf("?")===-1?"?":"&")+S+"="+encodeURIComponent(I)}var Ae=u.withCredentials,ye={};ye.Accept="text/event-stream";var be=u.headers;if(be!=null)for(var Le in be)Object.prototype.hasOwnProperty.call(be,Le)&&(ye[Le]=be[Le]);try{Te=it.open(Ie,ir,sr,on,ce,Ae,ye)}catch(De){throw Ct(),De}};u.url=v,u.readyState=le,u.withCredentials=m,u.headers=N,u._close=Ct,st()}oe.prototype=Object.create(M.prototype),oe.prototype.CONNECTING=le,oe.prototype.OPEN=ve,oe.prototype.CLOSED=pe,oe.prototype.close=function(){this._close()},oe.CONNECTING=le,oe.OPEN=ve,oe.CLOSED=pe,oe.prototype.withCredentials=void 0;var Pe=h;i!=null&&(h==null||!("withCredentials"in h.prototype))&&(Pe=oe),function(u){{var v=u(t);v!==void 0&&(e.exports=v)}}(function(u){u.EventSourcePolyfill=oe,u.NativeEventSource=h,u.EventSource=Pe})})(typeof globalThis=="undefined"?typeof window!="undefined"?window:typeof self!="undefined"?self:Lr:globalThis)})(Kt,Kt.exports);var wi=Kt.exports;/*!
|
|
10
|
+
* currency.js - v2.0.4
|
|
11
|
+
* http://scurker.github.io/currency.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) 2021 Jason Wilson
|
|
14
|
+
* Released under MIT license
|
|
15
|
+
*/var Ti={symbol:"$",separator:",",decimal:".",errorOnInvalid:!1,precision:2,pattern:"!#",negativePattern:"-!#",format:Mi,fromCents:!1},rr=function(t){return Math.round(t)},sn=function(t){return Math.pow(10,t)},Si=function(t,n){return rr(t/n)*n},Ai=/(\d)(?=(\d{3})+\b)/g,Hi=/(\d)(?=(\d\d)+\d\b)/g;function Oe(e,t){var n=this;if(!(n instanceof Oe))return new Oe(e,t);var r=Object.assign({},Ti,t),a=sn(r.precision),i=Bt(e,r);n.intValue=i,n.value=i/a,r.increment=r.increment||1/a,r.useVedic?r.groups=Hi:r.groups=Ai,this.s=r,this.p=a}function Bt(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,r=0,a=t.decimal,i=t.errorOnInvalid,s=t.precision,l=t.fromCents,h=sn(s),o=typeof e=="number",f=e instanceof Oe;if(f&&l)return e.intValue;if(o||f)r=f?e.value:e;else if(typeof e=="string"){var d=new RegExp("[^-\\d"+a+"]","g"),p=new RegExp("\\"+a,"g");r=e.replace(/\((.*)\)/,"-$1").replace(d,"").replace(p,"."),r=r||0}else{if(i)throw Error("Invalid Input");r=0}return l||(r*=h,r=r.toFixed(4)),n?rr(r):r}function Mi(e,t){var n=t.pattern,r=t.negativePattern,a=t.symbol,i=t.separator,s=t.decimal,l=t.groups,h=(""+e).replace(/^-/,"").split("."),o=h[0],f=h[1];return(e.value>=0?n:r).replace("!",a).replace("#",o.replace(l,"$1"+i)+(f?s+f:""))}Oe.prototype={add:function(t){var n=this.intValue,r=this.s,a=this.p;return Oe((n+=Bt(t,r))/(r.fromCents?1:a),r)},subtract:function(t){var n=this.intValue,r=this.s,a=this.p;return Oe((n-=Bt(t,r))/(r.fromCents?1:a),r)},multiply:function(t){var n=this.intValue,r=this.s;return Oe((n*=t)/(r.fromCents?1:sn(r.precision)),r)},divide:function(t){var n=this.intValue,r=this.s;return Oe(n/=Bt(t,r,!1),r)},distribute:function(t){for(var n=this.intValue,r=this.p,a=this.s,i=[],s=Math[n>=0?"floor":"ceil"](n/t),l=Math.abs(n-s*t),h=a.fromCents?1:r;t!==0;t--){var o=Oe(s/h,a);l-- >0&&(o=o[n>=0?"add":"subtract"](1/h)),i.push(o)}return i},dollars:function(){return~~this.value},cents:function(){var t=this.intValue,n=this.p;return~~(t%n)},format:function(t){var n=this.s;return typeof t=="function"?t(this,n):n.format(this,Object.assign({},n,t))},toString:function(){var t=this.intValue,n=this.p,r=this.s;return Si(t/n,r.increment).toFixed(r.precision)},toJSON:function(){return this.value}};function Ci(e){pr(e,"svelte-1dlb2l5",'.svelte-1dlb2l5.svelte-1dlb2l5,.svelte-1dlb2l5.svelte-1dlb2l5::before,.svelte-1dlb2l5.svelte-1dlb2l5::after{font-family:inherit}:host{font-family:inherit}button.svelte-1dlb2l5.svelte-1dlb2l5{font-family:inherit}p.svelte-1dlb2l5.svelte-1dlb2l5{padding:0;margin:0}@keyframes svelte-1dlb2l5-growWidthPercent{from{height:0}to{height:100%}}.ShowBalance.svelte-1dlb2l5.svelte-1dlb2l5{position:relative}.ShowBalance.svelte-1dlb2l5 .BalanceValue.svelte-1dlb2l5{font-size:14px;cursor:pointer;display:flex;flex-wrap:nowrap;white-space:nowrap}.ShowBalance.svelte-1dlb2l5 .BalanceValue svg.svelte-1dlb2l5{width:16px;fill:black}.ShowBalance.svelte-1dlb2l5 .BalanceValue span.svelte-1dlb2l5{padding-left:5px}.ShowBalance.svelte-1dlb2l5 .BalanceValue .TriangleActive.svelte-1dlb2l5,.ShowBalance.svelte-1dlb2l5 .BalanceValue .TriangleInactive.svelte-1dlb2l5{display:block;margin:0 3px;transition:all 0.2s}.ShowBalance.svelte-1dlb2l5 .BalanceValue .TriangleActive.svelte-1dlb2l5:hover,.ShowBalance.svelte-1dlb2l5 .BalanceValue .TriangleInactive.svelte-1dlb2l5:hover{transform:scale(1.2)}.ShowBalance.svelte-1dlb2l5 .BalanceValue .TriangleActive svg.svelte-1dlb2l5,.ShowBalance.svelte-1dlb2l5 .BalanceValue .TriangleInactive svg.svelte-1dlb2l5{margin:2px 0px}.ShowBalance.svelte-1dlb2l5 .BalanceValue .TriangleActive.svelte-1dlb2l5{transform:scale(1.1) rotateX(180deg) translateY(3px)}.ShowBalance.svelte-1dlb2l5 .BalanceValue .TriangleActive.svelte-1dlb2l5:hover{transform:scale(1.1) rotateX(180deg) translateY(3px)}@media only screen and (max-width: 360px){.ShowBalance.svelte-1dlb2l5 .BalanceValue.svelte-1dlb2l5{font-size:12px}.ShowBalance.svelte-1dlb2l5 .BalanceValue svg.svelte-1dlb2l5{width:12px}}.BalanceModalWrapper.svelte-1dlb2l5.svelte-1dlb2l5{background:linear-gradient(90deg, rgb(42, 79, 55) 0%, rgb(0, 61, 92) 100%);position:absolute;top:40px;padding:10px;transform:translateX(-45%);box-shadow:0px 30px 30px var(--emw-header-color-primary, var(--emw-color-primary, #D0046C));border-radius:5px;z-index:17;box-shadow:0px 5px 20px 0px #191919;transition:all 0.2s ease-in;opacity:0}.BalanceModalWrapper.svelte-1dlb2l5.svelte-1dlb2l5:before{content:"";background:linear-gradient(90deg, rgb(42, 79, 55) 0%, rgb(0, 61, 92) 100%);clip-path:polygon(50% 0, 0% 100%, 100% 100%);position:absolute;top:-8px;left:50%;width:25px;height:10px;z-index:1}.BalanceModalWrapper.Open.svelte-1dlb2l5.svelte-1dlb2l5{opacity:1}.BalanceModalClose.svelte-1dlb2l5.svelte-1dlb2l5{position:absolute;top:5px;right:5px;width:20px;height:20px;z-index:1;cursor:pointer;transition:all 0.3s ease;opacity:0}.BalanceModalClose.svelte-1dlb2l5.svelte-1dlb2l5:before{content:"";background:var(--emw-color-secondary, var(--emw-color-secondary, white));position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(45deg)}.BalanceModalClose.svelte-1dlb2l5.svelte-1dlb2l5:after{content:"";background:var(--emw-color-secondary, var(--emw-color-secondary, white));position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(-45deg)}.BalanceModalClose.svelte-1dlb2l5.svelte-1dlb2l5:hover{transform:scale(1.1)}.BalanceModalClose.Open.svelte-1dlb2l5.svelte-1dlb2l5{opacity:1}.BalanceModal.svelte-1dlb2l5.svelte-1dlb2l5{transition:all 0.2s ease-in;width:270px}.BalanceModalHeader.svelte-1dlb2l5.svelte-1dlb2l5{display:flex;align-items:center;justify-content:center;padding:20px 0}.BalanceModalHeader.svelte-1dlb2l5 .BalanceModalTitle.svelte-1dlb2l5{font-size:16px;font-weight:bold;color:var(--emw-header-contrast, var(--emw-color-contrast, white))}.BalanceModalRowBoth.svelte-1dlb2l5.svelte-1dlb2l5{display:flex;flex-direction:column;gap:5px;padding:20px 0;border-bottom:1px solid var(--emw-color-gray-100, #E6E6E6)}.BalanceModalRowBoth.svelte-1dlb2l5.svelte-1dlb2l5:last-child{border-bottom:none}.BalanceModalRowBoth.svelte-1dlb2l5 .BalanceModalRowLine.svelte-1dlb2l5{display:flex;width:100%;justify-content:space-between}.BalanceModalRowBoth.svelte-1dlb2l5 .BalanceModalText.svelte-1dlb2l5{color:var(--emw-header-contrast, var(--emw-color-contrast, white));font-size:14px;text-transform:capitalize}.BalanceModalRowBoth.svelte-1dlb2l5 .BalanceModalValue.svelte-1dlb2l5{font-size:14px;font-weight:bold;color:var(--emw-header-contrast, var(--emw-color-contrast, white))}.BalanceModalRow.svelte-1dlb2l5.svelte-1dlb2l5{display:flex;justify-content:space-between;align-items:center;padding:20px 0;border-bottom:1px solid var(--emw-color-gray-100, #E6E6E6)}.BalanceModalRow.svelte-1dlb2l5.svelte-1dlb2l5:last-child{border-bottom:none}.BalanceModalRow.svelte-1dlb2l5 .BalanceModalText.svelte-1dlb2l5{color:var(--emw-header-contrast, var(--emw-color-contrast, white));font-size:14px;text-transform:capitalize}.BalanceModalRow.svelte-1dlb2l5 .BalanceModalValue.svelte-1dlb2l5{font-size:14px;font-weight:bold;color:var(--emw-header-contrast, var(--emw-color-contrast, white))}.BalanceModalFooter.svelte-1dlb2l5.svelte-1dlb2l5{display:flex;align-items:center;padding:20px 0 10px}.BalanceModalFooter.svelte-1dlb2l5 .BalanceModalAction.svelte-1dlb2l5{background:var(--emw-color-primary);font-size:12px;color:white;text-transform:uppercase;width:100%;border-radius:30px;border:none;padding:10px 0;cursor:pointer;transition:all 0.2s ease-in;box-shadow:0px 3px 7px 0px rgba(0, 0, 0, 0.2)}.BalanceModalFooter.svelte-1dlb2l5 .BalanceModalAction.svelte-1dlb2l5:hover{background:rgba(255, 255, 255, 0.1);color:var(--emw-color-primary);box-shadow:0px 0px 0px 2px inset var(--emw-color-primary);font-size:14px}.BalanceModalFooter.svelte-1dlb2l5 .BalanceModalAction.svelte-1dlb2l5:active{background:rgba(255, 255, 255, 0.5)}.ShowBalanceModalOverlay.svelte-1dlb2l5.svelte-1dlb2l5{background-color:rgba(0, 0, 0, 0.7);position:fixed;top:0;bottom:0;left:0;right:0;z-index:16;opacity:0;transition:all 0.2s linear}.ShowBalanceModalOverlay.Open.svelte-1dlb2l5.svelte-1dlb2l5{opacity:1}')}function An(e){let t,n,r,a,i,s,l,h,o=e[9]("balanceTitle")+"",f,d,p,_,w,A=e[9]("totalBalance")+"",P,C,H,y,O,U,j,ee,Y,Q,M,W,D=e[9]("depositButton")+"",ne,ie,se,de,le,ve;function pe(Z,re){return Z[0]=="gm16"?Ni:Oi}let xe=pe(e),J=xe(e);return{c(){t=E("div"),n=E("div"),a=X(),i=E("div"),s=E("div"),l=E("div"),h=E("p"),f=L(o),d=X(),p=E("div"),_=E("div"),w=E("p"),P=L(A),C=X(),H=E("p"),y=E("span"),O=L(e[5]),U=X(),j=E("span"),ee=L(e[6]),Y=X(),J.c(),Q=X(),M=E("div"),W=E("button"),ne=L(D),b(n,"class",r="BalanceModalClose "+(e[4]?"Open":"")+" svelte-1dlb2l5"),b(h,"class","BalanceModalTitle svelte-1dlb2l5"),b(l,"class","BalanceModalHeader svelte-1dlb2l5"),b(w,"class","BalanceModalText svelte-1dlb2l5"),b(y,"class","BalanceModalAmount svelte-1dlb2l5"),b(j,"class","BalanceModalCurrency svelte-1dlb2l5"),b(H,"class","BalanceModalValue svelte-1dlb2l5"),b(_,"class","BalanceModalRow svelte-1dlb2l5"),b(p,"class","BalanceModalBody svelte-1dlb2l5"),b(W,"class","BalanceModalAction svelte-1dlb2l5"),b(M,"class","BalanceModalFooter svelte-1dlb2l5"),b(s,"class",ie="ModalContent "+(e[4]?"Open":"")+" svelte-1dlb2l5"),b(i,"class",se="BalanceModal "+(e[4]?"Open":"")+" svelte-1dlb2l5"),b(t,"class",de="BalanceModalWrapper "+(e[4]?"Open":"")+" svelte-1dlb2l5")},m(Z,re){we(Z,t,re),c(t,n),c(t,a),c(t,i),c(i,s),c(s,l),c(l,h),c(h,f),c(s,d),c(s,p),c(p,_),c(_,w),c(w,P),c(_,C),c(_,H),c(H,y),c(y,O),c(H,U),c(H,j),c(j,ee),c(p,Y),J.m(p,null),c(s,Q),c(s,M),c(M,W),c(W,ne),le||(ve=[Et(n,"click",e[25]),Et(W,"click",e[26])],le=!0)},p(Z,re){re[0]&16&&r!==(r="BalanceModalClose "+(Z[4]?"Open":"")+" svelte-1dlb2l5")&&b(n,"class",r),re[0]&512&&o!==(o=Z[9]("balanceTitle")+"")&&k(f,o),re[0]&512&&A!==(A=Z[9]("totalBalance")+"")&&k(P,A),re[0]&32&&k(O,Z[5]),re[0]&64&&k(ee,Z[6]),xe===(xe=pe(Z))&&J?J.p(Z,re):(J.d(1),J=xe(Z),J&&(J.c(),J.m(p,null))),re[0]&512&&D!==(D=Z[9]("depositButton")+"")&&k(ne,D),re[0]&16&&ie!==(ie="ModalContent "+(Z[4]?"Open":"")+" svelte-1dlb2l5")&&b(s,"class",ie),re[0]&16&&se!==(se="BalanceModal "+(Z[4]?"Open":"")+" svelte-1dlb2l5")&&b(i,"class",se),re[0]&16&&de!==(de="BalanceModalWrapper "+(Z[4]?"Open":"")+" svelte-1dlb2l5")&&b(t,"class",de)},d(Z){Z&&_e(t),J.d(),le=!1,tt(ve)}}}function Oi(e){var M,W;let t,n,r=e[9]("cashBalance")+"",a,i,s,l,h=e[12]((M=e[7][0])==null?void 0:M.balanceAmount)+"",o,f,d,p,_,w,A,P=e[9]("bonusBalance")+"",C,H,y,O,U=e[12]((W=e[7][1])==null?void 0:W.balanceAmount)+"",j,ee,Y,Q;return{c(){t=E("div"),n=E("p"),a=L(r),i=X(),s=E("p"),l=E("span"),o=L(h),f=X(),d=E("span"),p=L(e[6]),_=X(),w=E("div"),A=E("p"),C=L(P),H=X(),y=E("p"),O=E("span"),j=L(U),ee=X(),Y=E("span"),Q=L(e[6]),b(n,"class","BalanceModalText svelte-1dlb2l5"),b(l,"class","BalanceModalAmount svelte-1dlb2l5"),b(d,"class","BalanceModalCurrency svelte-1dlb2l5"),b(s,"class","BalanceModalValue svelte-1dlb2l5"),b(t,"class","BalanceModalRow svelte-1dlb2l5"),b(A,"class","BalanceModalText svelte-1dlb2l5"),b(O,"class","BalanceModalAmount svelte-1dlb2l5"),b(Y,"class","BalanceModalCurrency svelte-1dlb2l5"),b(y,"class","BalanceModalValue svelte-1dlb2l5"),b(w,"class","BalanceModalRow svelte-1dlb2l5")},m(D,ne){we(D,t,ne),c(t,n),c(n,a),c(t,i),c(t,s),c(s,l),c(l,o),c(s,f),c(s,d),c(d,p),we(D,_,ne),we(D,w,ne),c(w,A),c(A,C),c(w,H),c(w,y),c(y,O),c(O,j),c(y,ee),c(y,Y),c(Y,Q)},p(D,ne){var ie,se;ne[0]&512&&r!==(r=D[9]("cashBalance")+"")&&k(a,r),ne[0]&128&&h!==(h=D[12]((ie=D[7][0])==null?void 0:ie.balanceAmount)+"")&&k(o,h),ne[0]&64&&k(p,D[6]),ne[0]&512&&P!==(P=D[9]("bonusBalance")+"")&&k(C,P),ne[0]&128&&U!==(U=D[12]((se=D[7][1])==null?void 0:se.balanceAmount)+"")&&k(j,U),ne[0]&64&&k(Q,D[6])},d(D){D&&(_e(t),_e(_),_e(w))}}}function Ni(e){let t;function n(i,s){if(i[1]==="Casino"||i[1]==="Sports")return Ii;if(i[1]==="All")return Pi}let r=n(e),a=r&&r(e);return{c(){a&&a.c(),t=mr()},m(i,s){a&&a.m(i,s),we(i,t,s)},p(i,s){r===(r=n(i))&&a?a.p(i,s):(a&&a.d(1),a=r&&r(i),a&&(a.c(),a.m(t.parentNode,t)))},d(i){i&&_e(t),a&&a.d(i)}}}function Pi(e){let t,n,r,a=e[9]("cashBalance")+"",i,s,l,h,o,f=e[12](e[8].Casino.Real)+"",d,p,_,w,A,P,C,H=e[9]("cashBalance")+"",y,O,U,j,ee,Y=e[12](e[8].Sports.Real)+"",Q,M,W,D,ne,ie,se,de,le=e[9]("bonusBalance")+"",ve,pe,xe,J,Z,re=e[12](e[8].Casino.Bonus)+"",$e,ke,Fe,Ge,g,R,z,oe=e[9]("bonusBalance")+"",he,Me,ue,Pe,u,v=e[12](e[8].Sports.Bonus)+"",B,m,S,T;return{c(){t=E("div"),n=E("div"),r=E("p"),i=L(a),s=L(" Casino"),l=X(),h=E("p"),o=E("span"),d=L(f),p=X(),_=E("span"),w=L(e[6]),A=X(),P=E("div"),C=E("p"),y=L(H),O=L(" Sports"),U=X(),j=E("p"),ee=E("span"),Q=L(Y),M=X(),W=E("span"),D=L(e[6]),ne=X(),ie=E("div"),se=E("div"),de=E("p"),ve=L(le),pe=L(" Casino"),xe=X(),J=E("p"),Z=E("span"),$e=L(re),ke=X(),Fe=E("span"),Ge=L(e[6]),g=X(),R=E("div"),z=E("p"),he=L(oe),Me=L(" Sports"),ue=X(),Pe=E("p"),u=E("span"),B=L(v),m=X(),S=E("span"),T=L(e[6]),b(r,"class","BalanceModalText svelte-1dlb2l5"),b(o,"class","BalanceModalAmount svelte-1dlb2l5"),b(_,"class","BalanceModalCurrency svelte-1dlb2l5"),b(h,"class","BalanceModalValue svelte-1dlb2l5"),b(n,"class","BalanceModalRowLine svelte-1dlb2l5"),b(C,"class","BalanceModalText svelte-1dlb2l5"),b(ee,"class","BalanceModalAmount svelte-1dlb2l5"),b(W,"class","BalanceModalCurrency svelte-1dlb2l5"),b(j,"class","BalanceModalValue svelte-1dlb2l5"),b(P,"class","BalanceModalRowLine svelte-1dlb2l5"),b(t,"class","BalanceModalRowBoth svelte-1dlb2l5"),b(de,"class","BalanceModalText svelte-1dlb2l5"),b(Z,"class","BalanceModalAmount svelte-1dlb2l5"),b(Fe,"class","BalanceModalCurrency svelte-1dlb2l5"),b(J,"class","BalanceModalValue svelte-1dlb2l5"),b(se,"class","BalanceModalRowLine svelte-1dlb2l5"),b(z,"class","BalanceModalText svelte-1dlb2l5"),b(u,"class","BalanceModalAmount svelte-1dlb2l5"),b(S,"class","BalanceModalCurrency svelte-1dlb2l5"),b(Pe,"class","BalanceModalValue svelte-1dlb2l5"),b(R,"class","BalanceModalRowLine svelte-1dlb2l5"),b(ie,"class","BalanceModalRowBoth svelte-1dlb2l5")},m(x,I){we(x,t,I),c(t,n),c(n,r),c(r,i),c(r,s),c(n,l),c(n,h),c(h,o),c(o,d),c(h,p),c(h,_),c(_,w),c(t,A),c(t,P),c(P,C),c(C,y),c(C,O),c(P,U),c(P,j),c(j,ee),c(ee,Q),c(j,M),c(j,W),c(W,D),we(x,ne,I),we(x,ie,I),c(ie,se),c(se,de),c(de,ve),c(de,pe),c(se,xe),c(se,J),c(J,Z),c(Z,$e),c(J,ke),c(J,Fe),c(Fe,Ge),c(ie,g),c(ie,R),c(R,z),c(z,he),c(z,Me),c(R,ue),c(R,Pe),c(Pe,u),c(u,B),c(Pe,m),c(Pe,S),c(S,T)},p(x,I){I[0]&512&&a!==(a=x[9]("cashBalance")+"")&&k(i,a),I[0]&256&&f!==(f=x[12](x[8].Casino.Real)+"")&&k(d,f),I[0]&64&&k(w,x[6]),I[0]&512&&H!==(H=x[9]("cashBalance")+"")&&k(y,H),I[0]&256&&Y!==(Y=x[12](x[8].Sports.Real)+"")&&k(Q,Y),I[0]&64&&k(D,x[6]),I[0]&512&&le!==(le=x[9]("bonusBalance")+"")&&k(ve,le),I[0]&256&&re!==(re=x[12](x[8].Casino.Bonus)+"")&&k($e,re),I[0]&64&&k(Ge,x[6]),I[0]&512&&oe!==(oe=x[9]("bonusBalance")+"")&&k(he,oe),I[0]&256&&v!==(v=x[12](x[8].Sports.Bonus)+"")&&k(B,v),I[0]&64&&k(T,x[6])},d(x){x&&(_e(t),_e(ne),_e(ie))}}}function Ii(e){let t,n,r=e[9]("cashBalance")+"",a,i,s,l,h=e[8][e[1]?e[1]:"Casino"].Real+"",o,f,d,p,_,w,A,P=e[9]("bonusBalance")+"",C,H,y,O,U=e[8][e[1]?e[1]:"Casino"].Bonus+"",j,ee,Y,Q;return{c(){t=E("div"),n=E("p"),a=L(r),i=X(),s=E("p"),l=E("span"),o=L(h),f=X(),d=E("span"),p=L(e[6]),_=X(),w=E("div"),A=E("p"),C=L(P),H=X(),y=E("p"),O=E("span"),j=L(U),ee=X(),Y=E("span"),Q=L(e[6]),b(n,"class","BalanceModalText svelte-1dlb2l5"),b(l,"class","BalanceModalAmount svelte-1dlb2l5"),b(d,"class","BalanceModalCurrency svelte-1dlb2l5"),b(s,"class","BalanceModalValue svelte-1dlb2l5"),b(t,"class","BalanceModalRow svelte-1dlb2l5"),b(A,"class","BalanceModalText svelte-1dlb2l5"),b(O,"class","BalanceModalAmount svelte-1dlb2l5"),b(Y,"class","BalanceModalCurrency svelte-1dlb2l5"),b(y,"class","BalanceModalValue svelte-1dlb2l5"),b(w,"class","BalanceModalRow svelte-1dlb2l5")},m(M,W){we(M,t,W),c(t,n),c(n,a),c(t,i),c(t,s),c(s,l),c(l,o),c(s,f),c(s,d),c(d,p),we(M,_,W),we(M,w,W),c(w,A),c(A,C),c(w,H),c(w,y),c(y,O),c(O,j),c(y,ee),c(y,Y),c(Y,Q)},p(M,W){W[0]&512&&r!==(r=M[9]("cashBalance")+"")&&k(a,r),W[0]&258&&h!==(h=M[8][M[1]?M[1]:"Casino"].Real+"")&&k(o,h),W[0]&64&&k(p,M[6]),W[0]&512&&P!==(P=M[9]("bonusBalance")+"")&&k(C,P),W[0]&258&&U!==(U=M[8][M[1]?M[1]:"Casino"].Bonus+"")&&k(j,U),W[0]&64&&k(Q,M[6])},d(M){M&&(_e(t),_e(_),_e(w))}}}function Hn(e){let t,n,r,a;return{c(){t=E("div"),b(t,"class",n="ShowBalanceModalOverlay "+(e[4]?"Open":"")+" svelte-1dlb2l5")},m(i,s){we(i,t,s),r||(a=Et(t,"click",e[27]),r=!0)},p(i,s){s[0]&16&&n!==(n="ShowBalanceModalOverlay "+(i[4]?"Open":"")+" svelte-1dlb2l5")&&b(t,"class",n)},d(i){i&&_e(t),r=!1,a()}}}function Ri(e){let t,n,r,a,i,s,l,h,o,f,d,p,_,w,A,P,C=e[3]&&An(e),H=e[3]&&Hn(e);return{c(){t=E("div"),n=E("div"),r=E("div"),a=E("p"),i=L(e[5]),s=X(),l=L(e[6]),h=X(),o=E("span"),f=cn("svg"),d=cn("path"),_=X(),C&&C.c(),w=X(),H&&H.c(),b(a,"class","svelte-1dlb2l5"),b(d,"id","arrow"),b(d,"d","M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z"),b(d,"transform","translate(-274.511 -441.088)"),b(d,"fill","#d1d1d1"),b(d,"class","svelte-1dlb2l5"),b(f,"xmlns","http://www.w3.org/2000/svg"),b(f,"width","14"),b(f,"height","6.835"),b(f,"viewBox","0 0 14 6.835"),b(f,"class","svelte-1dlb2l5"),b(o,"class",p=(e[4]?"TriangleActive":"TriangleInactive")+" svelte-1dlb2l5"),b(r,"class","BalanceValue svelte-1dlb2l5"),b(n,"class","ShowBalance svelte-1dlb2l5"),b(t,"class","svelte-1dlb2l5")},m(y,O){we(y,t,O),c(t,n),c(n,r),c(r,a),c(a,i),c(a,s),c(a,l),c(r,h),c(r,o),c(o,f),c(f,d),c(n,_),C&&C.m(n,null),c(t,w),H&&H.m(t,null),e[28](t),A||(P=Et(r,"click",e[24]),A=!0)},p(y,O){O[0]&32&&k(i,y[5]),O[0]&64&&k(l,y[6]),O[0]&16&&p!==(p=(y[4]?"TriangleActive":"TriangleInactive")+" svelte-1dlb2l5")&&b(o,"class",p),y[3]?C?C.p(y,O):(C=An(y),C.c(),C.m(n,null)):C&&(C.d(1),C=null),y[3]?H?H.p(y,O):(H=Hn(y),H.c(),H.m(t,null)):H&&(H.d(1),H=null)},i:Ne,o:Ne,d(y){y&&_e(t),C&&C.d(),H&&H.d(),e[28](null),A=!1,P()}}}function Li(e,t){return Pt(Nt({},e),{balanceAmount:t})}function Di(e,t,n){let r;dr(e,_i,g=>n(9,r=g));let{userid:a=""}=t,{session:i=""}=t,{endpoint:s=""}=t,{lang:l="en"}=t,{clientstyling:h=""}=t,{clientstylingurl:o=""}=t,{translationurl:f=""}=t,{customlocaleidentifier:d=""}=t,{gmversion:p=""}=t,{displaybalanceoption:_="All"}=t,{currencyseparator:w=""}=t,{currencydecimal:A=""}=t,{currencyprecision:P=""}=t,C=!1,H=!1,y="",O="",U,j=[],ee="0",Y,Q=!1;const M={Casino:{Real:0,Bonus:0},Sports:{Real:0,Bonus:0}},W=()=>{fetch(f).then(R=>R.json()).then(R=>{Object.keys(R).forEach(z=>{Tn(z,R[z])})}).catch(R=>{console.log(R)})};Object.keys(Sn).forEach(g=>{Tn(g,Sn[g])});const D=g=>{switch(g){case"balance":window.postMessage({type:"BalanceModalStatus",status:"open"},window.location.href),n(3,C=!0),setTimeout(()=>{n(4,H=!0)},150);break;case"closebalance":n(4,H=!1),window.postMessage({type:"BalanceModalStatus",status:"close"},window.location.href),setTimeout(()=>{n(3,C=!1)},150);break}},ne=g=>bt(this,null,function*(){try{Q=!0;const R=yield fetch(g,{method:"GET",headers:{"X-SessionID":i}}),z=yield R.json();if(R.ok)Q=!1,window.postMessage({type:"BalancedFetched"},window.location.href),n(7,j=z.items),n(6,O=Object.keys(z.totalAmount)[0]),n(5,y=pe(z.totalAmount[O]));else throw Q=!1,new Error("Failed to fetch balance data !")}catch(R){Q=!1,console.log("Balance error: ",R)}finally{Q=!1}}),ie=g=>bt(this,null,function*(){try{Q=!0,_=="Casino"&&g.searchParams.append("productType","Casino"),_=="Sports"&&g.searchParams.append("productType","Sports"),_==="All"&&(g.searchParams.append("productType","Casino"),g.searchParams.append("productType","Sports"));const R=yield fetch(g,{method:"GET",headers:{"X-SessionID":i}}),z=yield R.json();if(R.ok){Q=!1;for(const oe of z.items){const{type:he,amount:Me,productType:ue}=oe;_==="Casino"?n(8,M.Casino[he]=Me,M):_==="Sports"?n(8,M.Sports[he]=Me,M):_==="All"&&ue&&he&&n(8,M[ue][he]=Me,M)}n(6,O=Object.keys(z.totalAmount)[0]),n(5,y=pe(z.totalAmount[O]))}else throw Q=!1,new Error("Failed to fetch balance data !")}catch(R){Q=!1,console.log("Balance error: ",R)}finally{Q=!1}}),se=(g,R)=>{let z=new wi.EventSourcePolyfill(g,{headers:{accept:"text/event-stream","X-SessionId":R}});Y&&Y.close(),Y=z,z.addEventListener("message",oe=>{ee="0";try{let{balanceChange:he,currency:Me}=JSON.parse(oe.data);if(p==="gmcore")n(7,j=j.map(ue=>(he&&he[ue.id]&&(ue=Li(ue,he[ue.id].afterAmount)),ee=(parseFloat(ue==null?void 0:ue.balanceAmount)+parseFloat(ee)).toString(),ue))),n(5,y=pe(Number(ee)));else if(p==="gm16"){for(let ue in he)n(8,M.Casino[ue]=he[ue].afterAmount,M);n(5,y=pe(M.Casino.Bonus+M.Casino.Real))}Me=Me}catch(he){console.log("Balance stream failed: ",he),se(`${s}/v1/player/${a}/balance/updates`,i)}})},de=()=>{D("closebalance"),window.postMessage({type:"GoToDeposit"},window.location.href),typeof gtag=="function"&>ag("event","GoToDeposit",{context:"PlayerAccountBalanceModal"})},le=()=>{switch(xi(l),p){case"gmcore":ne(new URL(`${s}/v1/player/${a}/account`));break;case"gm16":ie(new URL(`${s}/v1/player/${a}/balance`));break;default:throw Error(`Invalid apiversion attribute: ${p}`)}},ve=()=>{let g;return d.includes(l)&&(g=d),g},pe=g=>{let R;return d?R=new Intl.NumberFormat(ve(),{useGrouping:!0}).format(g):w&&A?R=Oe(g,{separator:w,decimal:A,symbol:"",precision:parseInt(P||"2",10)}).format():R=Oe(g,{separator:".",decimal:",",symbol:"",precision:parseInt(P||"2",10)}).format(),R},xe=g=>{if(g.data)switch(g.data.type){case"LogoutSuccessfull":Y.close();break}},J=()=>{let g=document.createElement("style");g.innerHTML=h,U.appendChild(g)},Z=()=>{let g=new URL(o),R=document.createElement("style");fetch(g.href).then(z=>z.text()).then(z=>{R.innerHTML=z,setTimeout(()=>{U.appendChild(R)},1)})};Er(()=>(window.addEventListener("message",xe,!1),()=>{window.removeEventListener("message",xe),Y&&Y.close()}));const re=()=>D("balance"),$e=()=>D("closebalance"),ke=()=>de(),Fe=()=>D("closebalance");function Ge(g){Gt[g?"unshift":"push"](()=>{U=g,n(2,U)})}return e.$$set=g=>{"userid"in g&&n(13,a=g.userid),"session"in g&&n(14,i=g.session),"endpoint"in g&&n(15,s=g.endpoint),"lang"in g&&n(16,l=g.lang),"clientstyling"in g&&n(17,h=g.clientstyling),"clientstylingurl"in g&&n(18,o=g.clientstylingurl),"translationurl"in g&&n(19,f=g.translationurl),"customlocaleidentifier"in g&&n(20,d=g.customlocaleidentifier),"gmversion"in g&&n(0,p=g.gmversion),"displaybalanceoption"in g&&n(1,_=g.displaybalanceoption),"currencyseparator"in g&&n(21,w=g.currencyseparator),"currencydecimal"in g&&n(22,A=g.currencydecimal),"currencyprecision"in g&&n(23,P=g.currencyprecision)},e.$$.update=()=>{e.$$.dirty[0]&65536&&l&&ve(),e.$$.dirty[0]&122883&&s&&a&&i&&l&&p&&_&&le(),e.$$.dirty[0]&57344&&s&&a&&i&&se(`${s}/v1/player/${a}/balance/updates`,i),e.$$.dirty[0]&131076&&h&&U&&J(),e.$$.dirty[0]&262148&&o&&U&&Z(),e.$$.dirty[0]&524288&&f&&W()},[p,_,U,C,H,y,O,j,M,r,D,de,pe,a,i,s,l,h,o,f,d,w,A,P,re,$e,ke,Fe,Ge]}class ar extends Pr{constructor(t){super(),Or(this,t,Di,Ri,Cn,{userid:13,session:14,endpoint:15,lang:16,clientstyling:17,clientstylingurl:18,translationurl:19,customlocaleidentifier:20,gmversion:0,displaybalanceoption:1,currencyseparator:21,currencydecimal:22,currencyprecision:23},Ci,[-1,-1])}get userid(){return this.$$.ctx[13]}set userid(t){this.$$set({userid:t}),Be()}get session(){return this.$$.ctx[14]}set session(t){this.$$set({session:t}),Be()}get endpoint(){return this.$$.ctx[15]}set endpoint(t){this.$$set({endpoint:t}),Be()}get lang(){return this.$$.ctx[16]}set lang(t){this.$$set({lang:t}),Be()}get clientstyling(){return this.$$.ctx[17]}set clientstyling(t){this.$$set({clientstyling:t}),Be()}get clientstylingurl(){return this.$$.ctx[18]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),Be()}get translationurl(){return this.$$.ctx[19]}set translationurl(t){this.$$set({translationurl:t}),Be()}get customlocaleidentifier(){return this.$$.ctx[20]}set customlocaleidentifier(t){this.$$set({customlocaleidentifier:t}),Be()}get gmversion(){return this.$$.ctx[0]}set gmversion(t){this.$$set({gmversion:t}),Be()}get displaybalanceoption(){return this.$$.ctx[1]}set displaybalanceoption(t){this.$$set({displaybalanceoption:t}),Be()}get currencyseparator(){return this.$$.ctx[21]}set currencyseparator(t){this.$$set({currencyseparator:t}),Be()}get currencydecimal(){return this.$$.ctx[22]}set currencydecimal(t){this.$$set({currencydecimal:t}),Be()}get currencyprecision(){return this.$$.ctx[23]}set currencyprecision(t){this.$$set({currencyprecision:t}),Be()}}Nr(ar,{userid:{},session:{},endpoint:{},lang:{},clientstyling:{},clientstylingurl:{},translationurl:{},customlocaleidentifier:{},gmversion:{},displaybalanceoption:{},currencyseparator:{},currencydecimal:{},currencyprecision:{}},[],[],!0);exports.default=ar;
|