@everymatrix/player-account-balance-modal 1.99.57 → 1.99.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/{PlayerAccountBalanceModal-D-KlFkjp.js → PlayerAccountBalanceModal-DfqTzyof.js} +19 -36
- package/components/{PlayerAccountBalanceModal-DELbhuU-.js → PlayerAccountBalanceModal-fXLI0tIC.js} +18 -35
- package/components/PlayerAccountBalanceModal-fo_7QiCQ.cjs +9 -0
- package/es2015/player-account-balance-modal.cjs +1 -1
- package/es2015/player-account-balance-modal.js +1 -1
- package/esnext/player-account-balance-modal.js +1 -1
- package/package.json +1 -1
- package/components/PlayerAccountBalanceModal-fBrRuexd.cjs +0 -9
package/components/{PlayerAccountBalanceModal-D-KlFkjp.js → PlayerAccountBalanceModal-DfqTzyof.js}
RENAMED
|
@@ -10,7 +10,7 @@ var Nt = Math.pow, Rt = (e, t, n) => t in e ? lr(e, t, { enumerable: !0, configu
|
|
|
10
10
|
dr.call(t, n) && Rt(e, n, t[n]);
|
|
11
11
|
return e;
|
|
12
12
|
}, Pt = (e, t) => hr(e, cr(t));
|
|
13
|
-
var se = (e, t, n) =>
|
|
13
|
+
var se = (e, t, n) => Rt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
14
14
|
var It = (e, t, n) => new Promise((r, o) => {
|
|
15
15
|
var i = (f) => {
|
|
16
16
|
try {
|
|
@@ -70,8 +70,7 @@ function gr(e, t, n) {
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
function br(e) {
|
|
73
|
-
if (!e)
|
|
74
|
-
return document;
|
|
73
|
+
if (!e) return document;
|
|
75
74
|
const t = e.getRootNode ? e.getRootNode() : e.ownerDocument;
|
|
76
75
|
return t && /** @type {ShadowRoot} */
|
|
77
76
|
t.host ? (
|
|
@@ -135,8 +134,7 @@ function tt(e) {
|
|
|
135
134
|
nt = e;
|
|
136
135
|
}
|
|
137
136
|
function _r() {
|
|
138
|
-
if (!nt)
|
|
139
|
-
throw new Error("Function called outside component initialization");
|
|
137
|
+
if (!nt) throw new Error("Function called outside component initialization");
|
|
140
138
|
return nt;
|
|
141
139
|
}
|
|
142
140
|
function Tr(e) {
|
|
@@ -167,8 +165,7 @@ function k() {
|
|
|
167
165
|
} catch (t) {
|
|
168
166
|
throw Ie.length = 0, Me = 0, t;
|
|
169
167
|
}
|
|
170
|
-
for (tt(null), Ie.length = 0, Me = 0; Vt.length; )
|
|
171
|
-
Vt.pop()();
|
|
168
|
+
for (tt(null), Ie.length = 0, Me = 0; Vt.length; ) Vt.pop()();
|
|
172
169
|
for (let t = 0; t < Fe.length; t += 1) {
|
|
173
170
|
const n = Fe[t];
|
|
174
171
|
Dt.has(n) || (Dt.add(n), n());
|
|
@@ -488,8 +485,7 @@ function Dr(e, t) {
|
|
|
488
485
|
}
|
|
489
486
|
}
|
|
490
487
|
function Fr(e, t) {
|
|
491
|
-
if (!e || !t)
|
|
492
|
-
return;
|
|
488
|
+
if (!e || !t) return;
|
|
493
489
|
const n = new URL(t);
|
|
494
490
|
fetch(n.href).then((r) => r.text()).then((r) => {
|
|
495
491
|
const o = document.createElement("style");
|
|
@@ -499,8 +495,7 @@ function Fr(e, t) {
|
|
|
499
495
|
});
|
|
500
496
|
}
|
|
501
497
|
function Ur(e, t, n, r = !1) {
|
|
502
|
-
if (!window.emMessageBus)
|
|
503
|
-
return;
|
|
498
|
+
if (!window.emMessageBus) return;
|
|
504
499
|
if (!("adoptedStyleSheets" in Document.prototype) || !r)
|
|
505
500
|
return n = Gr(e, t), n;
|
|
506
501
|
window[De] || (window[De] = {}), n = jr(e, t);
|
|
@@ -521,8 +516,7 @@ function Gr(e, t) {
|
|
|
521
516
|
}
|
|
522
517
|
function jr(e, t) {
|
|
523
518
|
return window.emMessageBus.subscribe(t, (n) => {
|
|
524
|
-
if (!e)
|
|
525
|
-
return;
|
|
519
|
+
if (!e) return;
|
|
526
520
|
const r = e.getRootNode(), o = window[De];
|
|
527
521
|
let i = o[t] && o[t].sheet;
|
|
528
522
|
i ? o[t].refCount = o[t].refCount + 1 : (i = new CSSStyleSheet(), i.replaceSync(n), o[t] = {
|
|
@@ -675,8 +669,7 @@ var Wt = function(e, t) {
|
|
|
675
669
|
return Wt = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
|
|
676
670
|
n.__proto__ = r;
|
|
677
671
|
} || function(n, r) {
|
|
678
|
-
for (var o in r)
|
|
679
|
-
Object.prototype.hasOwnProperty.call(r, o) && (n[o] = r[o]);
|
|
672
|
+
for (var o in r) Object.prototype.hasOwnProperty.call(r, o) && (n[o] = r[o]);
|
|
680
673
|
}, Wt(e, t);
|
|
681
674
|
};
|
|
682
675
|
function Tt(e, t) {
|
|
@@ -692,25 +685,22 @@ var fe = function() {
|
|
|
692
685
|
return fe = Object.assign || function(t) {
|
|
693
686
|
for (var n, r = 1, o = arguments.length; r < o; r++) {
|
|
694
687
|
n = arguments[r];
|
|
695
|
-
for (var i in n)
|
|
696
|
-
Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
|
|
688
|
+
for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
|
|
697
689
|
}
|
|
698
690
|
return t;
|
|
699
691
|
}, fe.apply(this, arguments);
|
|
700
692
|
};
|
|
701
693
|
function ao(e, t) {
|
|
702
694
|
var n = {};
|
|
703
|
-
for (var r in e)
|
|
704
|
-
Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
695
|
+
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
705
696
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
706
697
|
for (var o = 0, r = Object.getOwnPropertySymbols(e); o < r.length; o++)
|
|
707
698
|
t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
|
|
708
699
|
return n;
|
|
709
700
|
}
|
|
710
701
|
function Ft(e, t, n) {
|
|
711
|
-
if (n || arguments.length === 2)
|
|
712
|
-
|
|
713
|
-
(i || !(r in t)) && (i || (i = Array.prototype.slice.call(t, 0, r)), i[r] = t[r]);
|
|
702
|
+
if (n || arguments.length === 2) for (var r = 0, o = t.length, i; r < o; r++)
|
|
703
|
+
(i || !(r in t)) && (i || (i = Array.prototype.slice.call(t, 0, r)), i[r] = t[r]);
|
|
714
704
|
return e.concat(i || Array.prototype.slice.call(t));
|
|
715
705
|
}
|
|
716
706
|
function Ut(e, t) {
|
|
@@ -765,8 +755,7 @@ var co = function() {
|
|
|
765
755
|
return vt = Object.assign || function(t) {
|
|
766
756
|
for (var n, r = 1, o = arguments.length; r < o; r++) {
|
|
767
757
|
n = arguments[r];
|
|
768
|
-
for (var i in n)
|
|
769
|
-
Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
|
|
758
|
+
for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
|
|
770
759
|
}
|
|
771
760
|
return t;
|
|
772
761
|
}, vt.apply(this, arguments);
|
|
@@ -912,8 +901,7 @@ var F = function() {
|
|
|
912
901
|
return F = Object.assign || function(t) {
|
|
913
902
|
for (var n, r = 1, o = arguments.length; r < o; r++) {
|
|
914
903
|
n = arguments[r];
|
|
915
|
-
for (var i in n)
|
|
916
|
-
Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
|
|
904
|
+
for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
|
|
917
905
|
}
|
|
918
906
|
return t;
|
|
919
907
|
}, F.apply(this, arguments);
|
|
@@ -2555,8 +2543,7 @@ function Bo(e, t) {
|
|
|
2555
2543
|
n += f;
|
|
2556
2544
|
for (; u-- > 0; )
|
|
2557
2545
|
n = l + n;
|
|
2558
|
-
} else
|
|
2559
|
-
o === "J" ? n += "H" : n += o;
|
|
2546
|
+
} else o === "J" ? n += "H" : n += o;
|
|
2560
2547
|
}
|
|
2561
2548
|
return n;
|
|
2562
2549
|
}
|
|
@@ -3159,8 +3146,7 @@ function Kt(e) {
|
|
|
3159
3146
|
if (delete t.location, kn(t) || Vn(t))
|
|
3160
3147
|
for (var n in t.options)
|
|
3161
3148
|
delete t.options[n].location, Kt(t.options[n].value);
|
|
3162
|
-
else
|
|
3163
|
-
Gn(t) && zn(t.style) || (jn(t) || $n(t)) && Zt(t.style) ? delete t.style.location : Xn(t) && Kt(t.children);
|
|
3149
|
+
else Gn(t) && zn(t.style) || (jn(t) || $n(t)) && Zt(t.style) ? delete t.style.location : Xn(t) && Kt(t.children);
|
|
3164
3150
|
});
|
|
3165
3151
|
}
|
|
3166
3152
|
function Vo(e, t) {
|
|
@@ -4835,8 +4821,7 @@ function Fi(e, t, n) {
|
|
|
4835
4821
|
x.Bonus.length === 0 ? x.Bonus.push({ amount: b.amount }) : n(3, x.Bonus[0].amount += b.amount, x);
|
|
4836
4822
|
break;
|
|
4837
4823
|
case "Real":
|
|
4838
|
-
if (b.creditLine && x.Credit.length === 0 && x.Credit.push({ amount: b.creditLine }), B === "totalRealAmount")
|
|
4839
|
-
continue;
|
|
4824
|
+
if (b.creditLine && x.Credit.length === 0 && x.Credit.push({ amount: b.creditLine }), B === "totalRealAmount") continue;
|
|
4840
4825
|
x.Real.length === 0 ? x.Real.push({ amount: b.amount }) : n(3, x.Real[0].amount += b.amount, x);
|
|
4841
4826
|
break;
|
|
4842
4827
|
}
|
|
@@ -4885,8 +4870,7 @@ function Fi(e, t, n) {
|
|
|
4885
4870
|
throw n(1, W = !1), new Error("Failed to fetch balance data !");
|
|
4886
4871
|
});
|
|
4887
4872
|
}, ae = () => {
|
|
4888
|
-
if (ie && ie.close(), i.length < 1)
|
|
4889
|
-
return;
|
|
4873
|
+
if (ie && ie.close(), i.length < 1) return;
|
|
4890
4874
|
let s, c;
|
|
4891
4875
|
switch (y) {
|
|
4892
4876
|
case "gm16":
|
|
@@ -4945,8 +4929,7 @@ function Fi(e, t, n) {
|
|
|
4945
4929
|
n(3, x.Total[0].amount = s, x);
|
|
4946
4930
|
break;
|
|
4947
4931
|
case "totalRealAmount":
|
|
4948
|
-
if (!xe)
|
|
4949
|
-
return;
|
|
4932
|
+
if (!xe) return;
|
|
4950
4933
|
let c = 0;
|
|
4951
4934
|
for (const p of x.Real)
|
|
4952
4935
|
c += p.amount;
|
package/components/{PlayerAccountBalanceModal-DELbhuU-.js → PlayerAccountBalanceModal-fXLI0tIC.js}
RENAMED
|
@@ -41,8 +41,7 @@ function or(e, t, n) {
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
function ir(e) {
|
|
44
|
-
if (!e)
|
|
45
|
-
return document;
|
|
44
|
+
if (!e) return document;
|
|
46
45
|
const t = e.getRootNode ? e.getRootNode() : e.ownerDocument;
|
|
47
46
|
return t && /** @type {ShadowRoot} */
|
|
48
47
|
t.host ? (
|
|
@@ -106,8 +105,7 @@ function et(e) {
|
|
|
106
105
|
tt = e;
|
|
107
106
|
}
|
|
108
107
|
function hr() {
|
|
109
|
-
if (!tt)
|
|
110
|
-
throw new Error("Function called outside component initialization");
|
|
108
|
+
if (!tt) throw new Error("Function called outside component initialization");
|
|
111
109
|
return tt;
|
|
112
110
|
}
|
|
113
111
|
function cr(e) {
|
|
@@ -138,8 +136,7 @@ function $() {
|
|
|
138
136
|
} catch (t) {
|
|
139
137
|
throw Pe.length = 0, Ne = 0, t;
|
|
140
138
|
}
|
|
141
|
-
for (et(null), Pe.length = 0, Ne = 0; Ft.length; )
|
|
142
|
-
Ft.pop()();
|
|
139
|
+
for (et(null), Pe.length = 0, Ne = 0; Ft.length; ) Ft.pop()();
|
|
143
140
|
for (let t = 0; t < De.length; t += 1) {
|
|
144
141
|
const n = De[t];
|
|
145
142
|
Lt.has(n) || (Lt.add(n), n());
|
|
@@ -451,8 +448,7 @@ function Br(e, t) {
|
|
|
451
448
|
}
|
|
452
449
|
}
|
|
453
450
|
function wr(e, t) {
|
|
454
|
-
if (!e || !t)
|
|
455
|
-
return;
|
|
451
|
+
if (!e || !t) return;
|
|
456
452
|
const n = new URL(t);
|
|
457
453
|
fetch(n.href).then((r) => r.text()).then((r) => {
|
|
458
454
|
const o = document.createElement("style");
|
|
@@ -462,8 +458,7 @@ function wr(e, t) {
|
|
|
462
458
|
});
|
|
463
459
|
}
|
|
464
460
|
function Ar(e, t, n, r = !1) {
|
|
465
|
-
if (!window.emMessageBus)
|
|
466
|
-
return;
|
|
461
|
+
if (!window.emMessageBus) return;
|
|
467
462
|
if (!("adoptedStyleSheets" in Document.prototype) || !r)
|
|
468
463
|
return n = Cr(e, t), n;
|
|
469
464
|
window[Ie] || (window[Ie] = {}), n = Hr(e, t);
|
|
@@ -484,8 +479,7 @@ function Cr(e, t) {
|
|
|
484
479
|
}
|
|
485
480
|
function Hr(e, t) {
|
|
486
481
|
return window.emMessageBus.subscribe(t, (n) => {
|
|
487
|
-
if (!e)
|
|
488
|
-
return;
|
|
482
|
+
if (!e) return;
|
|
489
483
|
const r = e.getRootNode(), o = window[Ie];
|
|
490
484
|
let i = o[t] && o[t].sheet;
|
|
491
485
|
i ? o[t].refCount = o[t].refCount + 1 : (i = new CSSStyleSheet(), i.replaceSync(n), o[t] = {
|
|
@@ -638,8 +632,7 @@ var jt = function(e, t) {
|
|
|
638
632
|
return jt = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
|
|
639
633
|
n.__proto__ = r;
|
|
640
634
|
} || function(n, r) {
|
|
641
|
-
for (var o in r)
|
|
642
|
-
Object.prototype.hasOwnProperty.call(r, o) && (n[o] = r[o]);
|
|
635
|
+
for (var o in r) Object.prototype.hasOwnProperty.call(r, o) && (n[o] = r[o]);
|
|
643
636
|
}, jt(e, t);
|
|
644
637
|
};
|
|
645
638
|
function _t(e, t) {
|
|
@@ -655,25 +648,22 @@ var ce = function() {
|
|
|
655
648
|
return ce = Object.assign || function(t) {
|
|
656
649
|
for (var n, r = 1, o = arguments.length; r < o; r++) {
|
|
657
650
|
n = arguments[r];
|
|
658
|
-
for (var i in n)
|
|
659
|
-
Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
|
|
651
|
+
for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
|
|
660
652
|
}
|
|
661
653
|
return t;
|
|
662
654
|
}, ce.apply(this, arguments);
|
|
663
655
|
};
|
|
664
656
|
function Zr(e, t) {
|
|
665
657
|
var n = {};
|
|
666
|
-
for (var r in e)
|
|
667
|
-
Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
658
|
+
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
668
659
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
669
660
|
for (var o = 0, r = Object.getOwnPropertySymbols(e); o < r.length; o++)
|
|
670
661
|
t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
|
|
671
662
|
return n;
|
|
672
663
|
}
|
|
673
664
|
function Rt(e, t, n) {
|
|
674
|
-
if (n || arguments.length === 2)
|
|
675
|
-
|
|
676
|
-
(i || !(r in t)) && (i || (i = Array.prototype.slice.call(t, 0, r)), i[r] = t[r]);
|
|
665
|
+
if (n || arguments.length === 2) for (var r = 0, o = t.length, i; r < o; r++)
|
|
666
|
+
(i || !(r in t)) && (i || (i = Array.prototype.slice.call(t, 0, r)), i[r] = t[r]);
|
|
677
667
|
return e.concat(i || Array.prototype.slice.call(t));
|
|
678
668
|
}
|
|
679
669
|
function Nt(e, t) {
|
|
@@ -728,8 +718,7 @@ var Kr = function() {
|
|
|
728
718
|
return yt = Object.assign || function(t) {
|
|
729
719
|
for (var n, r = 1, o = arguments.length; r < o; r++) {
|
|
730
720
|
n = arguments[r];
|
|
731
|
-
for (var i in n)
|
|
732
|
-
Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
|
|
721
|
+
for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
|
|
733
722
|
}
|
|
734
723
|
return t;
|
|
735
724
|
}, yt.apply(this, arguments);
|
|
@@ -875,8 +864,7 @@ var F = function() {
|
|
|
875
864
|
return F = Object.assign || function(t) {
|
|
876
865
|
for (var n, r = 1, o = arguments.length; r < o; r++) {
|
|
877
866
|
n = arguments[r];
|
|
878
|
-
for (var i in n)
|
|
879
|
-
Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
|
|
867
|
+
for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
|
|
880
868
|
}
|
|
881
869
|
return t;
|
|
882
870
|
}, F.apply(this, arguments);
|
|
@@ -2518,8 +2506,7 @@ function fo(e, t) {
|
|
|
2518
2506
|
n += d;
|
|
2519
2507
|
for (; u-- > 0; )
|
|
2520
2508
|
n = c + n;
|
|
2521
|
-
} else
|
|
2522
|
-
o === "J" ? n += "H" : n += o;
|
|
2509
|
+
} else o === "J" ? n += "H" : n += o;
|
|
2523
2510
|
}
|
|
2524
2511
|
return n;
|
|
2525
2512
|
}
|
|
@@ -3122,8 +3109,7 @@ function Wt(e) {
|
|
|
3122
3109
|
if (delete t.location, In(t) || Dn(t))
|
|
3123
3110
|
for (var n in t.options)
|
|
3124
3111
|
delete t.options[n].location, Wt(t.options[n].value);
|
|
3125
|
-
else
|
|
3126
|
-
Nn(t) && Un(t.style) || (Mn(t) || Pn(t)) && kt(t.style) ? delete t.style.location : Fn(t) && Wt(t.children);
|
|
3112
|
+
else Nn(t) && Un(t.style) || (Mn(t) || Pn(t)) && kt(t.style) ? delete t.style.location : Fn(t) && Wt(t.children);
|
|
3127
3113
|
});
|
|
3128
3114
|
}
|
|
3129
3115
|
function Ro(e, t) {
|
|
@@ -4797,8 +4783,7 @@ function wi(e, t, n) {
|
|
|
4797
4783
|
E.Bonus.length === 0 ? E.Bonus.push({ amount: v.amount }) : n(3, E.Bonus[0].amount += v.amount, E);
|
|
4798
4784
|
break;
|
|
4799
4785
|
case "Real":
|
|
4800
|
-
if (v.creditLine && E.Credit.length === 0 && E.Credit.push({ amount: v.creditLine }), S === "totalRealAmount")
|
|
4801
|
-
continue;
|
|
4786
|
+
if (v.creditLine && E.Credit.length === 0 && E.Credit.push({ amount: v.creditLine }), S === "totalRealAmount") continue;
|
|
4802
4787
|
E.Real.length === 0 ? E.Real.push({ amount: v.amount }) : n(3, E.Real[0].amount += v.amount, E);
|
|
4803
4788
|
break;
|
|
4804
4789
|
}
|
|
@@ -4847,8 +4832,7 @@ function wi(e, t, n) {
|
|
|
4847
4832
|
throw n(1, W = !1), new Error("Failed to fetch balance data !");
|
|
4848
4833
|
});
|
|
4849
4834
|
}, ae = () => {
|
|
4850
|
-
if (ie && ie.close(), i.length < 1)
|
|
4851
|
-
return;
|
|
4835
|
+
if (ie && ie.close(), i.length < 1) return;
|
|
4852
4836
|
let s, h;
|
|
4853
4837
|
switch (b) {
|
|
4854
4838
|
case "gm16":
|
|
@@ -4907,8 +4891,7 @@ function wi(e, t, n) {
|
|
|
4907
4891
|
n(3, E.Total[0].amount = s, E);
|
|
4908
4892
|
break;
|
|
4909
4893
|
case "totalRealAmount":
|
|
4910
|
-
if (!Ee)
|
|
4911
|
-
return;
|
|
4894
|
+
if (!Ee) return;
|
|
4912
4895
|
let h = 0;
|
|
4913
4896
|
for (const m of E.Real)
|
|
4914
4897
|
h += m.amount;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";var hr=Object.defineProperty,cr=Object.defineProperties;var fr=Object.getOwnPropertyDescriptors;var un=Object.getOwnPropertySymbols;var dr=Object.prototype.hasOwnProperty,pr=Object.prototype.propertyIsEnumerable;var Nt=Math.pow,Rt=(e,t,n)=>t in e?hr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mt=(e,t)=>{for(var n in t||(t={}))dr.call(t,n)&&Rt(e,n,t[n]);if(un)for(var n of un(t))pr.call(t,n)&&Rt(e,n,t[n]);return e},Pt=(e,t)=>cr(e,fr(t));var se=(e,t,n)=>Rt(e,typeof t!="symbol"?t+"":t,n);var It=(e,t,n)=>new Promise((r,o)=>{var i=f=>{try{a(n.next(f))}catch(l){o(l)}},u=f=>{try{a(n.throw(f))}catch(l){o(l)}},a=f=>f.done?r(f.value):Promise.resolve(f.value).then(i,u);a((n=n.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function ue(){}function Rn(e){return e()}function ln(){return Object.create(null)}function ke(e){e.forEach(Rn)}function rn(e){return typeof e=="function"}function Nn(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function mr(e){return Object.keys(e).length===0}function Mn(e,...t){if(e==null){for(const r of t)r(void 0);return ue}const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function gr(e,t,n){e.$$.on_destroy.push(Mn(t,n))}function R(e,t){e.appendChild(t)}function br(e,t,n){const r=yr(e);if(!r.getElementById(t)){const o=G("style");o.id=t,o.textContent=n,vr(r,o)}}function yr(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 R(e.head||e,t),t.sheet}function de(e,t,n){e.insertBefore(t,n||null)}function he(e){e.parentNode&&e.parentNode.removeChild(e)}function Pn(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function G(e){return document.createElement(e)}function ye(e){return document.createTextNode(e)}function ve(){return ye(" ")}function Er(){return ye("")}function bt(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function z(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function xr(e){return Array.from(e.childNodes)}function He(e,t){t=""+t,e.data!==t&&(e.data=t)}function _r(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}let nt;function tt(e){nt=e}function Tr(){if(!nt)throw new Error("Function called outside component initialization");return nt}function Sr(e){Tr().$$.on_mount.push(e)}const Ie=[],Vt=[];let Fe=[];const hn=[],Br=Promise.resolve();let Xt=!1;function wr(){Xt||(Xt=!0,Br.then(k))}function zt(e){Fe.push(e)}const Dt=new Set;let Me=0;function k(){if(Me!==0)return;const e=nt;do{try{for(;Me<Ie.length;){const t=Ie[Me];Me++,tt(t),Ar(t.$$)}}catch(t){throw Ie.length=0,Me=0,t}for(tt(null),Ie.length=0,Me=0;Vt.length;)Vt.pop()();for(let t=0;t<Fe.length;t+=1){const n=Fe[t];Dt.has(n)||(Dt.add(n),n())}Fe.length=0}while(Ie.length);for(;hn.length;)hn.pop()();Xt=!1,Dt.clear(),tt(e)}function Ar(e){if(e.fragment!==null){e.update(),ke(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(zt)}}function Cr(e){const t=[],n=[];Fe.forEach(r=>e.indexOf(r)===-1?t.push(r):n.push(r)),n.forEach(r=>r()),Fe=t}const Hr=new Set;function Or(e,t){e&&e.i&&(Hr.delete(e),e.i(t))}function yt(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function Lr(e,t,n){const{fragment:r,after_update:o}=e.$$;r&&r.m(t,n),zt(()=>{const i=e.$$.on_mount.map(Rn).filter(rn);e.$$.on_destroy?e.$$.on_destroy.push(...i):ke(i),e.$$.on_mount=[]}),o.forEach(zt)}function Rr(e,t){const n=e.$$;n.fragment!==null&&(Cr(n.after_update),ke(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Nr(e,t){e.$$.dirty[0]===-1&&(Ie.push(e),wr(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Mr(e,t,n,r,o,i,u=null,a=[-1]){const f=nt;tt(e);const l=e.$$={fragment:null,ctx:[],props:i,update:ue,not_equal:o,bound:ln(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(f?f.$$.context:[])),callbacks:ln(),dirty:a,skip_bound:!1,root:t.target||f.$$.root};u&&u(l.root);let d=!1;if(l.ctx=n?n(e,t.props||{},(g,y,..._)=>{const B=_.length?_[0]:y;return l.ctx&&o(l.ctx[g],l.ctx[g]=B)&&(!l.skip_bound&&l.bound[g]&&l.bound[g](B),d&&Nr(e,g)),y}):[],l.update(),d=!0,ke(l.before_update),l.fragment=r?r(l.ctx):!1,t.target){if(t.hydrate){const g=xr(t.target);l.fragment&&l.fragment.l(g),g.forEach(he)}else l.fragment&&l.fragment.c();t.intro&&Or(e.$$.fragment),Lr(e,t.target,t.anchor),k()}tt(f)}let In;typeof HTMLElement=="function"&&(In=class extends HTMLElement{constructor(t,n,r){super();se(this,"$$ctor");se(this,"$$s");se(this,"$$c");se(this,"$$cn",!1);se(this,"$$d",{});se(this,"$$r",!1);se(this,"$$p_d",{});se(this,"$$l",{});se(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 o=this.$$c.$on(t,n);this.$$l_u.set(n,o)}super.addEventListener(t,n,r)}removeEventListener(t,n,r){if(super.removeEventListener(t,n,r),this.$$c){const o=this.$$l_u.get(n);o&&(o(),this.$$l_u.delete(n))}}connectedCallback(){return It(this,null,function*(){if(this.$$cn=!0,!this.$$c){let t=function(i){return()=>{let u;return{c:function(){u=G("slot"),i!=="default"&&z(u,"name",i)},m:function(l,d){de(l,u,d)},d:function(l){l&&he(u)}}}};if(yield Promise.resolve(),!this.$$cn||this.$$c)return;const n={},r=_r(this);for(const i of this.$$s)i in r&&(n[i]=[t(i)]);for(const i of this.attributes){const u=this.$$g_p(i.name);u in this.$$d||(this.$$d[u]=pt(u,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(Mt({},this.$$d),{$$slots:n,$$scope:{ctx:[]}})});const o=()=>{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 u=pt(i,this.$$d[i],this.$$p_d,"toAttribute");u==null?this.removeAttribute(this.$$p_d[i].attribute||i):this.setAttribute(this.$$p_d[i].attribute||i,u)}this.$$r=!1};this.$$c.$$.after_update.push(o),o();for(const i in this.$$l)for(const u of this.$$l[i]){const a=this.$$c.$on(i,u);this.$$l_u.set(u,a)}this.$$l={}}})}attributeChangedCallback(t,n,r){var o;this.$$r||(t=this.$$g_p(t),this.$$d[t]=pt(t,r,this.$$p_d,"toProp"),(o=this.$$c)==null||o.$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 pt(e,t,n,r){var i;const o=(i=n[e])==null?void 0:i.type;if(t=o==="Boolean"&&typeof t!="boolean"?t!=null:t,!r||!n[e])return t;if(r==="toAttribute")switch(o){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(o){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Pr(e,t,n,r,o,i){let u=class extends In{constructor(){super(e,n,o),this.$$p_d=t}static get observedAttributes(){return Object.keys(t).map(a=>(t[a].attribute||a).toLowerCase())}};return Object.keys(t).forEach(a=>{Object.defineProperty(u.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(f){var l;f=pt(a,f,t),this.$$d[a]=f,(l=this.$$c)==null||l.$set({[a]:f})}})}),r.forEach(a=>{Object.defineProperty(u.prototype,a,{get(){var f;return(f=this.$$c)==null?void 0:f[a]}})}),e.element=u,u}class Ir{constructor(){se(this,"$$");se(this,"$$set")}$destroy(){Rr(this,1),this.$destroy=ue}$on(t,n){if(!rn(n))return ue;const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(n),()=>{const o=r.indexOf(n);o!==-1&&r.splice(o,1)}}$set(t){this.$$set&&!mr(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Dr="4";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Dr);const De="__WIDGET_GLOBAL_STYLE_CACHE__";function Fr(e,t){if(e){const n=document.createElement("style");n.innerHTML=t,e.appendChild(n)}}function Ur(e,t){if(!e||!t)return;const n=new URL(t);fetch(n.href).then(r=>r.text()).then(r=>{const o=document.createElement("style");o.innerHTML=r,e&&e.appendChild(o)}).catch(r=>{console.error("There was an error while trying to load client styling from URL",r)})}function Gr(e,t,n,r=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!r)return n=jr(e,t),n;window[De]||(window[De]={}),n=$r(e,t);const i=n.unsubscribe.bind(n),u=()=>{if(window[De][t]){const a=window[De][t];a.refCount>1?a.refCount=a.refCount-1:delete window[De][t]}i()};return n.unsubscribe=u,n}function jr(e,t){const n=document.createElement("style");return window.emMessageBus.subscribe(t,r=>{e&&(n.innerHTML=r,e.appendChild(n))})}function $r(e,t){return window.emMessageBus.subscribe(t,n=>{if(!e)return;const r=e.getRootNode(),o=window[De];let i=o[t]&&o[t].sheet;i?o[t].refCount=o[t].refCount+1:(i=new CSSStyleSheet,i.replaceSync(n),o[t]={sheet:i,refCount:1});const u=r.adoptedStyleSheets||[];u.includes(i)||(r.adoptedStyleSheets=[...u,i])})}const Pe=[];function kr(e,t){return{subscribe:_t(e,t).subscribe}}function _t(e,t=ue){let n;const r=new Set;function o(a){if(Nn(e,a)&&(e=a,n)){const f=!Pe.length;for(const l of r)l[1](),Pe.push(l,e);if(f){for(let l=0;l<Pe.length;l+=2)Pe[l][0](Pe[l+1]);Pe.length=0}}}function i(a){o(a(e))}function u(a,f=ue){const l=[a,f];return r.add(l),r.size===1&&(n=t(o,i)||ue),a(e),()=>{r.delete(l),r.size===0&&n&&(n(),n=null)}}return{set:o,update:i,subscribe:u}}function Ve(e,t,n){const r=!Array.isArray(e),o=r?[e]:e;if(!o.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const i=t.length<2;return kr(n,(u,a)=>{let f=!1;const l=[];let d=0,g=ue;const y=()=>{if(d)return;g();const B=t(r?l[0]:l,u,a);i?u(B):g=rn(B)?B:ue},_=o.map((B,P)=>Mn(B,j=>{l[P]=j,d&=~(1<<P),f&&y()},()=>{d|=1<<P}));return f=!0,y(),function(){ke(_),g(),f=!1}})}var Vr=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Xr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var zr=function(t){return Wr(t)&&!Zr(t)};function Wr(e){return!!e&&typeof e=="object"}function Zr(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||Jr(e)}var qr=typeof Symbol=="function"&&Symbol.for,Qr=qr?Symbol.for("react.element"):60103;function Jr(e){return e.$$typeof===Qr}function Yr(e){return Array.isArray(e)?[]:{}}function rt(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Ue(Yr(e),e,t):e}function Kr(e,t,n){return e.concat(t).map(function(r){return rt(r,n)})}function eo(e,t){if(!t.customMerge)return Ue;var n=t.customMerge(e);return typeof n=="function"?n:Ue}function to(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function cn(e){return Object.keys(e).concat(to(e))}function Dn(e,t){try{return t in e}catch(n){return!1}}function no(e,t){return Dn(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function ro(e,t,n){var r={};return n.isMergeableObject(e)&&cn(e).forEach(function(o){r[o]=rt(e[o],n)}),cn(t).forEach(function(o){no(e,o)||(Dn(e,o)&&n.isMergeableObject(t[o])?r[o]=eo(o,n)(e[o],t[o],n):r[o]=rt(t[o],n))}),r}function Ue(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||Kr,n.isMergeableObject=n.isMergeableObject||zr,n.cloneUnlessOtherwiseSpecified=rt;var r=Array.isArray(t),o=Array.isArray(e),i=r===o;return i?r?n.arrayMerge(e,t,n):ro(e,t,n):rt(t,n)}Ue.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,o){return Ue(r,o,n)},{})};var oo=Ue,io=oo;const ao=Xr(io);var Wt=function(e,t){return Wt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},Wt(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");Wt(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var fe=function(){return fe=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},fe.apply(this,arguments)};function so(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 o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Ft(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;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))}function Ut(e,t){var n=t&&t.cache?t.cache:mo,r=t&&t.serializer?t.serializer:fo,o=t&&t.strategy?t.strategy:ho;return o(e,{cache:n,serializer:r})}function uo(e){return e==null||typeof e=="number"||typeof e=="boolean"}function lo(e,t,n,r){var o=uo(r)?r:n(r),i=t.get(o);return typeof i=="undefined"&&(i=e.call(this,r),t.set(o,i)),i}function Fn(e,t,n){var r=Array.prototype.slice.call(arguments,3),o=n(r),i=t.get(o);return typeof i=="undefined"&&(i=e.apply(this,r),t.set(o,i)),i}function Un(e,t,n,r,o){return n.bind(t,e,r,o)}function ho(e,t){var n=e.length===1?lo:Fn;return Un(e,this,n,t.cache.create(),t.serializer)}function co(e,t){return Un(e,this,Fn,t.cache.create(),t.serializer)}var fo=function(){return JSON.stringify(arguments)},po=function(){function e(){this.cache=Object.create(null)}return e.prototype.get=function(t){return this.cache[t]},e.prototype.set=function(t,n){this.cache[t]=n},e}(),mo={create:function(){return new po}},Gt={variadic:co},vt=function(){return vt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},vt.apply(this,arguments)};var H;(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"})(H||(H={}));var D;(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"})(D||(D={}));var Ge;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Ge||(Ge={}));function fn(e){return e.type===D.literal}function go(e){return e.type===D.argument}function Gn(e){return e.type===D.number}function jn(e){return e.type===D.date}function $n(e){return e.type===D.time}function kn(e){return e.type===D.select}function Vn(e){return e.type===D.plural}function bo(e){return e.type===D.pound}function Xn(e){return e.type===D.tag}function zn(e){return!!(e&&typeof e=="object"&&e.type===Ge.number)}function Zt(e){return!!(e&&typeof e=="object"&&e.type===Ge.dateTime)}var Wn=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,yo=/(?:[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 vo(e){var t={};return e.replace(yo,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 F=function(){return F=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},F.apply(this,arguments)};var Eo=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function xo(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(Eo).filter(function(y){return y.length>0}),n=[],r=0,o=t;r<o.length;r++){var i=o[r],u=i.split("/");if(u.length===0)throw new Error("Invalid number skeleton");for(var a=u[0],f=u.slice(1),l=0,d=f;l<d.length;l++){var g=d[l];if(g.length===0)throw new Error("Invalid number skeleton")}n.push({stem:a,options:f})}return n}function _o(e){return e.replace(/^(.*?)-/,"")}var dn=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Zn=/^(@+)?(\+|#+)?[rs]?$/g,To=/(\*)(0+)|(#+)(0+)|(0+)/g,qn=/^(0+)$/;function pn(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(Zn,function(n,r,o){return typeof o!="string"?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):o==="+"?t.minimumSignificantDigits=r.length:r[0]==="#"?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+(typeof o=="string"?o.length:0)),""}),t}function Qn(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 So(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)),!qn.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function mn(e){var t={},n=Qn(e);return n||t}function Bo(e){for(var t={},n=0,r=e;n<r.length;n++){var o=r[n];switch(o.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=o.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=_o(o.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=F(F(F({},t),{notation:"scientific"}),o.options.reduce(function(f,l){return F(F({},f),mn(l))},{}));continue;case"engineering":t=F(F(F({},t),{notation:"engineering"}),o.options.reduce(function(f,l){return F(F({},f),mn(l))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(o.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(o.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");o.options[0].replace(To,function(f,l,d,g,y,_){if(l)t.minimumIntegerDigits=d.length;else{if(g&&y)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(qn.test(o.stem)){t.minimumIntegerDigits=o.stem.length;continue}if(dn.test(o.stem)){if(o.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");o.stem.replace(dn,function(f,l,d,g,y,_){return d==="*"?t.minimumFractionDigits=l.length:g&&g[0]==="#"?t.maximumFractionDigits=g.length:y&&_?(t.minimumFractionDigits=y.length,t.maximumFractionDigits=y.length+_.length):(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length),""});var i=o.options[0];i==="w"?t=F(F({},t),{trailingZeroDisplay:"stripIfInteger"}):i&&(t=F(F({},t),pn(i)));continue}if(Zn.test(o.stem)){t=F(F({},t),pn(o.stem));continue}var u=Qn(o.stem);u&&(t=F(F({},t),u));var a=So(o.stem);a&&(t=F(F({},t),a))}return t}var dt={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function wo(e,t){for(var n="",r=0;r<e.length;r++){var o=e.charAt(r);if(o==="j"){for(var i=0;r+1<e.length&&e.charAt(r+1)===o;)i++,r++;var u=1+(i&1),a=i<2?1:3+(i>>1),f="a",l=Ao(t);for((l=="H"||l=="k")&&(a=0);a-- >0;)n+=f;for(;u-- >0;)n=l+n}else o==="J"?n+="H":n+=o}return n}function Ao(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 o=dt[r||""]||dt[n||""]||dt["".concat(n,"-001")]||dt["001"];return o[0]}var jt,Co=new RegExp("^".concat(Wn.source,"*")),Ho=new RegExp("".concat(Wn.source,"*$"));function L(e,t){return{start:e,end:t}}var Oo=!!String.prototype.startsWith&&"_a".startsWith("a",1),Lo=!!String.fromCodePoint,Ro=!!Object.fromEntries,No=!!String.prototype.codePointAt,Mo=!!String.prototype.trimStart,Po=!!String.prototype.trimEnd,Io=!!Number.isSafeInteger,Do=Io?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},qt=!0;try{var Fo=Yn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");qt=((jt=Fo.exec("a"))===null||jt===void 0?void 0:jt[0])==="a"}catch(e){qt=!1}var gn=Oo?function(t,n,r){return t.startsWith(n,r)}:function(t,n,r){return t.slice(r,r+n.length)===n},Qt=Lo?String.fromCodePoint:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r="",o=t.length,i=0,u;o>i;){if(u=t[i++],u>1114111)throw RangeError(u+" is not a valid code point");r+=u<65536?String.fromCharCode(u):String.fromCharCode(((u-=65536)>>10)+55296,u%1024+56320)}return r},bn=Ro?Object.fromEntries:function(t){for(var n={},r=0,o=t;r<o.length;r++){var i=o[r],u=i[0],a=i[1];n[u]=a}return n},Jn=No?function(t,n){return t.codePointAt(n)}:function(t,n){var r=t.length;if(!(n<0||n>=r)){var o=t.charCodeAt(n),i;return o<55296||o>56319||n+1===r||(i=t.charCodeAt(n+1))<56320||i>57343?o:(o-55296<<10)+(i-56320)+65536}},Uo=Mo?function(t){return t.trimStart()}:function(t){return t.replace(Co,"")},Go=Po?function(t){return t.trimEnd()}:function(t){return t.replace(Ho,"")};function Yn(e,t){return new RegExp(e,t)}var Jt;if(qt){var yn=Yn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Jt=function(t,n){var r;yn.lastIndex=n;var o=yn.exec(t);return(r=o[1])!==null&&r!==void 0?r:""}}else Jt=function(t,n){for(var r=[];;){var o=Jn(t,n);if(o===void 0||Kn(o)||Vo(o))break;r.push(o),n+=o>=65536?2:1}return Qt.apply(void 0,r)};var jo=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 o=[];!this.isEOF();){var i=this.char();if(i===123){var u=this.parseArgument(t,r);if(u.err)return u;o.push(u.val)}else{if(i===125&&t>0)break;if(i===35&&(n==="plural"||n==="selectordinal")){var a=this.clonePosition();this.bump(),o.push({type:D.pound,location:L(a,this.clonePosition())})}else if(i===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(H.UNMATCHED_CLOSING_TAG,L(this.clonePosition(),this.clonePosition()))}else if(i===60&&!this.ignoreTag&&Yt(this.peek()||0)){var u=this.parseTag(t,n);if(u.err)return u;o.push(u.val)}else{var u=this.parseLiteral(t,n);if(u.err)return u;o.push(u.val)}}}return{val:o,err:null}},e.prototype.parseTag=function(t,n){var r=this.clonePosition();this.bump();var o=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:D.literal,value:"<".concat(o,"/>"),location:L(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(t+1,n,!0);if(i.err)return i;var u=i.val,a=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Yt(this.char()))return this.error(H.INVALID_TAG,L(a,this.clonePosition()));var f=this.clonePosition(),l=this.parseTagName();return o!==l?this.error(H.UNMATCHED_CLOSING_TAG,L(f,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:D.tag,value:o,children:u,location:L(r,this.clonePosition())},err:null}:this.error(H.INVALID_TAG,L(a,this.clonePosition())))}else return this.error(H.UNCLOSED_TAG,L(r,this.clonePosition()))}else return this.error(H.INVALID_TAG,L(r,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&ko(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var r=this.clonePosition(),o="";;){var i=this.tryParseQuote(n);if(i){o+=i;continue}var u=this.tryParseUnquoted(t,n);if(u){o+=u;continue}var a=this.tryParseLeftAngleBracket();if(a){o+=a;continue}break}var f=L(r,this.clonePosition());return{val:{type:D.literal,value:o,location:f},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!$o(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 Qt.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(),Qt(r))},e.prototype.parseArgument=function(t,n){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(H.EXPECT_ARGUMENT_CLOSING_BRACE,L(r,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(H.EMPTY_ARGUMENT,L(r,this.clonePosition()));var o=this.parseIdentifierIfPossible().value;if(!o)return this.error(H.MALFORMED_ARGUMENT,L(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(H.EXPECT_ARGUMENT_CLOSING_BRACE,L(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:D.argument,value:o,location:L(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(H.EXPECT_ARGUMENT_CLOSING_BRACE,L(r,this.clonePosition())):this.parseArgumentOptions(t,n,o,r);default:return this.error(H.MALFORMED_ARGUMENT,L(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),r=Jt(this.message,n),o=n+r.length;this.bumpTo(o);var i=this.clonePosition(),u=L(t,i);return{value:r,location:u}},e.prototype.parseArgumentOptions=function(t,n,r,o){var i,u=this.clonePosition(),a=this.parseIdentifierIfPossible().value,f=this.clonePosition();switch(a){case"":return this.error(H.EXPECT_ARGUMENT_TYPE,L(u,f));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var d=this.clonePosition(),g=this.parseSimpleArgStyleIfPossible();if(g.err)return g;var y=Go(g.val);if(y.length===0)return this.error(H.EXPECT_ARGUMENT_STYLE,L(this.clonePosition(),this.clonePosition()));var _=L(d,this.clonePosition());l={style:y,styleLocation:_}}var B=this.tryParseArgumentClose(o);if(B.err)return B;var P=L(o,this.clonePosition());if(l&&gn(l==null?void 0:l.style,"::",0)){var j=Uo(l.style.slice(2));if(a==="number"){var g=this.parseNumberSkeletonFromString(j,l.styleLocation);return g.err?g:{val:{type:D.number,value:r,location:P,style:g.val},err:null}}else{if(j.length===0)return this.error(H.EXPECT_DATE_TIME_SKELETON,P);var Z=j;this.locale&&(Z=wo(j,this.locale));var y={type:Ge.dateTime,pattern:Z,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?vo(Z):{}},U=a==="date"?D.date:D.time;return{val:{type:U,value:r,location:P,style:y},err:null}}}return{val:{type:a==="number"?D.number:a==="date"?D.date:D.time,value:r,location:P,style:(i=l==null?void 0:l.style)!==null&&i!==void 0?i:null},err:null}}case"plural":case"selectordinal":case"select":{var w=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(H.EXPECT_SELECT_ARGUMENT_OPTIONS,L(w,vt({},w)));this.bumpSpace();var C=this.parseIdentifierIfPossible(),N=0;if(a!=="select"&&C.value==="offset"){if(!this.bumpIf(":"))return this.error(H.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,L(this.clonePosition(),this.clonePosition()));this.bumpSpace();var g=this.tryParseDecimalInteger(H.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,H.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(g.err)return g;this.bumpSpace(),C=this.parseIdentifierIfPossible(),N=g.val}var M=this.tryParsePluralOrSelectOptions(t,a,n,C);if(M.err)return M;var B=this.tryParseArgumentClose(o);if(B.err)return B;var W=L(o,this.clonePosition());return a==="select"?{val:{type:D.select,value:r,options:bn(M.val),location:W},err:null}:{val:{type:D.plural,value:r,options:bn(M.val),offset:N,pluralType:a==="plural"?"cardinal":"ordinal",location:W},err:null}}default:return this.error(H.INVALID_ARGUMENT_TYPE,L(u,f))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(H.EXPECT_ARGUMENT_CLOSING_BRACE,L(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 o=this.clonePosition();if(!this.bumpUntil("'"))return this.error(H.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,L(o,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=xo(t)}catch(o){return this.error(H.INVALID_NUMBER_SKELETON,n)}return{val:{type:Ge.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?Bo(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,r,o){for(var i,u=!1,a=[],f=new Set,l=o.value,d=o.location;;){if(l.length===0){var g=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var y=this.tryParseDecimalInteger(H.EXPECT_PLURAL_ARGUMENT_SELECTOR,H.INVALID_PLURAL_ARGUMENT_SELECTOR);if(y.err)return y;d=L(g,this.clonePosition()),l=this.message.slice(g.offset,this.offset())}else break}if(f.has(l))return this.error(n==="select"?H.DUPLICATE_SELECT_ARGUMENT_SELECTOR:H.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,d);l==="other"&&(u=!0),this.bumpSpace();var _=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?H.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:H.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,L(this.clonePosition(),this.clonePosition()));var B=this.parseMessage(t+1,n,r);if(B.err)return B;var P=this.tryParseArgumentClose(_);if(P.err)return P;a.push([l,{value:B.val,location:L(_,this.clonePosition())}]),f.add(l),this.bumpSpace(),i=this.parseIdentifierIfPossible(),l=i.value,d=i.location}return a.length===0?this.error(n==="select"?H.EXPECT_SELECT_ARGUMENT_SELECTOR:H.EXPECT_PLURAL_ARGUMENT_SELECTOR,L(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!u?this.error(H.MISSING_OTHER_CLAUSE,L(this.clonePosition(),this.clonePosition())):{val:a,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var r=1,o=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var i=!1,u=0;!this.isEOF();){var a=this.char();if(a>=48&&a<=57)i=!0,u=u*10+(a-48),this.bump();else break}var f=L(o,this.clonePosition());return i?(u*=r,Do(u)?{val:u,err:null}:this.error(n,f)):this.error(t,f)},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=Jn(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(gn(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()&&Kn(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 Yt(e){return e>=97&&e<=122||e>=65&&e<=90}function $o(e){return Yt(e)||e===47}function ko(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 Kn(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Vo(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 Kt(e){e.forEach(function(t){if(delete t.location,kn(t)||Vn(t))for(var n in t.options)delete t.options[n].location,Kt(t.options[n].value);else Gn(t)&&zn(t.style)||(jn(t)||$n(t))&&Zt(t.style)?delete t.style.location:Xn(t)&&Kt(t.children)})}function Xo(e,t){t===void 0&&(t={}),t=vt({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new jo(e,t).parse();if(n.err){var r=SyntaxError(H[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||Kt(n.val),n.val}var je;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(je||(je={}));var St=function(e){Tt(t,e);function t(n,r,o){var i=e.call(this,n)||this;return i.code=r,i.originalMessage=o,i}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),vn=function(e){Tt(t,e);function t(n,r,o,i){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(o).join('", "'),'"'),je.INVALID_VALUE,i)||this}return t}(St),zo=function(e){Tt(t,e);function t(n,r,o){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),je.INVALID_VALUE,o)||this}return t}(St),Wo=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,'"'),je.MISSING_VALUE,r)||this}return t}(St),ee;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(ee||(ee={}));function Zo(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 qo(e){return typeof e=="function"}function mt(e,t,n,r,o,i,u){if(e.length===1&&fn(e[0]))return[{type:ee.literal,value:e[0].value}];for(var a=[],f=0,l=e;f<l.length;f++){var d=l[f];if(fn(d)){a.push({type:ee.literal,value:d.value});continue}if(bo(d)){typeof i=="number"&&a.push({type:ee.literal,value:n.getNumberFormat(t).format(i)});continue}var g=d.value;if(!(o&&g in o))throw new Wo(g,u);var y=o[g];if(go(d)){(!y||typeof y=="string"||typeof y=="number")&&(y=typeof y=="string"||typeof y=="number"?String(y):""),a.push({type:typeof y=="string"?ee.literal:ee.object,value:y});continue}if(jn(d)){var _=typeof d.style=="string"?r.date[d.style]:Zt(d.style)?d.style.parsedOptions:void 0;a.push({type:ee.literal,value:n.getDateTimeFormat(t,_).format(y)});continue}if($n(d)){var _=typeof d.style=="string"?r.time[d.style]:Zt(d.style)?d.style.parsedOptions:r.time.medium;a.push({type:ee.literal,value:n.getDateTimeFormat(t,_).format(y)});continue}if(Gn(d)){var _=typeof d.style=="string"?r.number[d.style]:zn(d.style)?d.style.parsedOptions:void 0;_&&_.scale&&(y=y*(_.scale||1)),a.push({type:ee.literal,value:n.getNumberFormat(t,_).format(y)});continue}if(Xn(d)){var B=d.children,P=d.value,j=o[P];if(!qo(j))throw new zo(P,"function",u);var Z=mt(B,t,n,r,o,i),U=j(Z.map(function(N){return N.value}));Array.isArray(U)||(U=[U]),a.push.apply(a,U.map(function(N){return{type:typeof N=="string"?ee.literal:ee.object,value:N}}))}if(kn(d)){var w=d.options[y]||d.options.other;if(!w)throw new vn(d.value,y,Object.keys(d.options),u);a.push.apply(a,mt(w.value,t,n,r,o));continue}if(Vn(d)){var w=d.options["=".concat(y)];if(!w){if(!Intl.PluralRules)throw new St(`Intl.PluralRules is not available in this environment.
|
|
2
|
+
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
3
|
+
`,je.MISSING_INTL_API,u);var C=n.getPluralRules(t,{type:d.pluralType}).select(y-(d.offset||0));w=d.options[C]||d.options.other}if(!w)throw new vn(d.value,y,Object.keys(d.options),u);a.push.apply(a,mt(w.value,t,n,r,o,y-(d.offset||0)));continue}}return Zo(a)}function Qo(e,t){return t?fe(fe(fe({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=fe(fe({},e[r]),t[r]||{}),n},{})):e}function Jo(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=Qo(e[r],t[r]),n},fe({},e)):e}function $t(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function Yo(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Ut(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,Ft([void 0],n,!1)))},{cache:$t(e.number),strategy:Gt.variadic}),getDateTimeFormat:Ut(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,Ft([void 0],n,!1)))},{cache:$t(e.dateTime),strategy:Gt.variadic}),getPluralRules:Ut(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,Ft([void 0],n,!1)))},{cache:$t(e.pluralRules),strategy:Gt.variadic})}}var Ko=function(){function e(t,n,r,o){n===void 0&&(n=e.defaultLocale);var i=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(f){var l=i.formatToParts(f);if(l.length===1)return l[0].value;var d=l.reduce(function(g,y){return!g.length||y.type!==ee.literal||typeof g[g.length-1]!="string"?g.push(y.value):g[g.length-1]+=y.value,g},[]);return d.length<=1?d[0]||"":d},this.formatToParts=function(f){return mt(i.ast,i.locales,i.formatters,i.formats,f,void 0,i.message)},this.resolvedOptions=function(){var f;return{locale:((f=i.resolvedLocale)===null||f===void 0?void 0:f.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 u=o||{};u.formatters;var a=so(u,["formatters"]);this.ast=e.__parse(t,fe(fe({},a),{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=Jo(e.formats,r),this.formatters=o&&o.formatters||Yo(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=Xo,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 ei(e,t){if(t==null)return;if(t in e)return e[t];const n=t.split(".");let r=e;for(let o=0;o<n.length;o++)if(typeof r=="object"){if(o>0){const i=n.slice(o,n.length).join(".");if(i in r){r=r[i];break}}r=r[n[o]]}else r=void 0;return r}const we={},ti=(e,t,n)=>n&&(t in we||(we[t]={}),e in we[t]||(we[t][e]=n),n),er=(e,t)=>{if(t==null)return;if(t in we&&e in we[t])return we[t][e];const n=Bt(t);for(let r=0;r<n.length;r++){const o=n[r],i=ri(o,e);if(i)return ti(e,t,i)}};let on;const it=_t({});function ni(e){return on[e]||null}function tr(e){return e in on}function ri(e,t){if(!tr(e))return null;const n=ni(e);return ei(n,t)}function oi(e){if(e==null)return;const t=Bt(e);for(let n=0;n<t.length;n++){const r=t[n];if(tr(r))return r}}function nr(e,...t){delete we[e],it.update(n=>(n[e]=ao.all([n[e]||{},...t]),n))}Ve([it],([e])=>Object.keys(e));it.subscribe(e=>on=e);const gt={};function ii(e,t){gt[e].delete(t),gt[e].size===0&&delete gt[e]}function rr(e){return gt[e]}function ai(e){return Bt(e).map(t=>{const n=rr(t);return[t,n?[...n]:[]]}).filter(([,t])=>t.length>0)}function en(e){return e==null?!1:Bt(e).some(t=>{var n;return(n=rr(t))==null?void 0:n.size})}function si(e,t){return Promise.all(t.map(r=>(ii(e,r),r().then(o=>o.default||o)))).then(r=>nr(e,...r))}const et={};function or(e){if(!en(e))return e in et?et[e]:Promise.resolve();const t=ai(e);return et[e]=Promise.all(t.map(([n,r])=>si(n,r))).then(()=>{if(en(e))return or(e);delete et[e]}),et[e]}const ui={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"}}},li={fallbackLocale:null,loadingDelay:200,formats:ui,warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0},hi=li;function $e(){return hi}const kt=_t(!1);var ci=Object.defineProperty,fi=Object.defineProperties,di=Object.getOwnPropertyDescriptors,En=Object.getOwnPropertySymbols,pi=Object.prototype.hasOwnProperty,mi=Object.prototype.propertyIsEnumerable,xn=(e,t,n)=>t in e?ci(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gi=(e,t)=>{for(var n in t||(t={}))pi.call(t,n)&&xn(e,n,t[n]);if(En)for(var n of En(t))mi.call(t,n)&&xn(e,n,t[n]);return e},bi=(e,t)=>fi(e,di(t));let tn;const Et=_t(null);function _n(e){return e.split("-").map((t,n,r)=>r.slice(0,n+1).join("-")).reverse()}function Bt(e,t=$e().fallbackLocale){const n=_n(e);return t?[...new Set([...n,..._n(t)])]:n}function Oe(){return tn!=null?tn:void 0}Et.subscribe(e=>{tn=e!=null?e:void 0,typeof window!="undefined"&&e!=null&&document.documentElement.setAttribute("lang",e)});const yi=e=>{if(e&&oi(e)&&en(e)){const{loadingDelay:t}=$e();let n;return typeof window!="undefined"&&Oe()!=null&&t?n=window.setTimeout(()=>kt.set(!0),t):kt.set(!0),or(e).then(()=>{Et.set(e)}).finally(()=>{clearTimeout(n),kt.set(!1)})}return Et.set(e)},Xe=bi(gi({},Et),{set:yi}),wt=e=>{const t=Object.create(null);return r=>{const o=JSON.stringify(r);return o in t?t[o]:t[o]=e(r)}};var vi=Object.defineProperty,xt=Object.getOwnPropertySymbols,ir=Object.prototype.hasOwnProperty,ar=Object.prototype.propertyIsEnumerable,Tn=(e,t,n)=>t in e?vi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,an=(e,t)=>{for(var n in t||(t={}))ir.call(t,n)&&Tn(e,n,t[n]);if(xt)for(var n of xt(t))ar.call(t,n)&&Tn(e,n,t[n]);return e},ze=(e,t)=>{var n={};for(var r in e)ir.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&&ar.call(e,r)&&(n[r]=e[r]);return n};const ot=(e,t)=>{const{formats:n}=$e();if(e in n&&t in n[e])return n[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},Ei=wt(e=>{var t=e,{locale:n,format:r}=t,o=ze(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return r&&(o=ot("number",r)),new Intl.NumberFormat(n,o)}),xi=wt(e=>{var t=e,{locale:n,format:r}=t,o=ze(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return r?o=ot("date",r):Object.keys(o).length===0&&(o=ot("date","short")),new Intl.DateTimeFormat(n,o)}),_i=wt(e=>{var t=e,{locale:n,format:r}=t,o=ze(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return r?o=ot("time",r):Object.keys(o).length===0&&(o=ot("time","short")),new Intl.DateTimeFormat(n,o)}),Ti=(e={})=>{var t=e,{locale:n=Oe()}=t,r=ze(t,["locale"]);return Ei(an({locale:n},r))},Si=(e={})=>{var t=e,{locale:n=Oe()}=t,r=ze(t,["locale"]);return xi(an({locale:n},r))},Bi=(e={})=>{var t=e,{locale:n=Oe()}=t,r=ze(t,["locale"]);return _i(an({locale:n},r))},wi=wt((e,t=Oe())=>new Ko(e,t,$e().formats,{ignoreTag:$e().ignoreTag})),Ai=(e,t={})=>{var n,r,o,i;let u=t;typeof e=="object"&&(u=e,e=u.id);const{values:a,locale:f=Oe(),default:l}=u;if(f==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let d=er(e,f);if(!d)d=(i=(o=(r=(n=$e()).handleMissingMessage)==null?void 0:r.call(n,{locale:f,id:e,defaultValue:l}))!=null?o:l)!=null?i:e;else if(typeof d!="string")return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof d}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),d;if(!a)return d;let g=d;try{g=wi(d,f).format(a)}catch(y){y instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,y.message)}return g},Ci=(e,t)=>Bi(t).format(e),Hi=(e,t)=>Si(t).format(e),Oi=(e,t)=>Ti(t).format(e),Li=(e,t=Oe())=>er(e,t),Ri=Ve([Xe,it],()=>Ai);Ve([Xe],()=>Ci);Ve([Xe],()=>Hi);Ve([Xe],()=>Oi);Ve([Xe,it],()=>Li);function Sn(e,t){nr(e,t)}function Ni(e){Xe.set(e)}const Bn={en:{Title:"Your Balance",Total:"Total Balance",Real:"Cash Balance",Bonus:"Bonus Balance",Credit:"Credit Balance",Casino:"Casino",Sports:"Sports",DepositButton:"Deposit",Loading:"Loading ..."},"zh-hk":{Title:"您的結餘",Total:"總結餘",Real:"現金結餘",Bonus:"紅利結餘",Credit:"信用結餘",Casino:"賭場",Sports:"體育",DepositButton:"存款",Loading:"載入中 ..."},de:{Title:"Ihr Guthaben",Total:"Gesamtguthaben",Real:"Barguthaben",Bonus:"Bonusguthaben",Credit:"Kreditguthaben",Casino:"Casino",Sports:"Sport",DepositButton:"Einzahlen",Loading:"Wird geladen ..."},it:{Title:"Il tuo saldo",Total:"Saldo totale",Real:"Saldo in contanti",Bonus:"Saldo bonus",Credit:"Saldo di credito",Casino:"Casinò",Sports:"Sport",DepositButton:"Deposita",Loading:"Caricamento ..."},fr:{Title:"Votre solde",Total:"Solde total",Real:"Solde en espèces",Bonus:"Solde bonus",Credit:"Solde de crédit",Casino:"Casino",Sports:"Sports",DepositButton:"Dépôt",Loading:"Chargement ..."},es:{Title:"Tu saldo",Total:"Saldo total",Real:"Saldo en efectivo",Bonus:"Saldo de bono",Credit:"Saldo de crédito",Casino:"Casino",Sports:"Deportes",DepositButton:"Depósito",Loading:"Cargando ..."},tr:{Title:"Bakiyeniz",Total:"Toplam Bakiye",Real:"Nakit Bakiye",Bonus:"Bonus Bakiyesi",Credit:"Kredi Bakiyesi",Casino:"Kumarhane",Sports:"Spor",DepositButton:"Yatır",Loading:"Yükleniyor ..."},ru:{Title:"Ваш баланс",Total:"Общий баланс",Real:"Денежный баланс",Bonus:"Бонусный баланс",Credit:"Кредитный баланс",Casino:"Казино",Sports:"Спорт",DepositButton:"Депозит",Loading:"Загружается ..."},ro:{Title:"Soldul tău",Total:"Sold total",Real:"Sold în numerar",Bonus:"Sold bonus",Credit:"Sold credit",Casino:"Cazinou",Sports:"Sporturi",DepositButton:"Depozit",Loading:"Se încarcă ..."},hr:{Title:"Vaš saldo",Total:"Ukupni saldo",Real:"Gotovinski saldo",Bonus:"Bonus saldo",Credit:"Kreditni saldo",Casino:"Casino",Sports:"Sportovi",DepositButton:"Depozit",Loading:"Učitavanje ..."},hu:{Title:"Az egyenleged",Total:"Teljes egyenleg",Real:"Készpénz egyenleg",Bonus:"Bónusz egyenleg",Credit:"Hitel egyenleg",Casino:"Kaszinó",Sports:"Sport",DepositButton:"Befizetés",Loading:"Betöltés ..."},pl:{Title:"Twoje saldo",Total:"Całkowite saldo",Real:"Saldo gotówkowe",Bonus:"Saldo bonusowe",Credit:"Saldo kredytowe",Casino:"Kasyno",Sports:"Sport",DepositButton:"Wpłać",Loading:"Ładowanie ..."},pt:{Title:"Seu Saldo",Total:"Saldo Total",Real:"Saldo em Dinheiro",Bonus:"Saldo de Bônus",Credit:"Saldo de Crédito",Casino:"Cassino",Sports:"Esportes",DepositButton:"Depositar",Loading:"Carregando ..."},sl:{Title:"Vaš saldo",Total:"Skupni saldo",Real:"Gotovinski saldo",Bonus:"Bonus saldo",Credit:"Kreditni saldo",Casino:"Kasino",Sports:"Šport",DepositButton:"Depozit",Loading:"Nalaganje ..."},sr:{Title:"Vaš saldo",Total:"Ukupan saldo",Real:"Gotovinski saldo",Bonus:"Bonus saldo",Credit:"Kreditni saldo",Casino:"Kasino",Sports:"Sport",DepositButton:"Depozit",Loading:"Učitavanje ..."},"pt-br":{Title:"Seu Saldo",Total:"Saldo Total",Real:"Saldo em Dinheiro",Bonus:"Saldo de Bônus",Credit:"Saldo de Crédito",Casino:"Cassino",Sports:"Esportes",DepositButton:"Depositar",Loading:"Carregando ..."},"es-mx":{Title:"Tu saldo",Total:"Saldo total",Real:"Saldo en efectivo",Bonus:"Saldo de bono",Credit:"Saldo de crédito",Casino:"Casino",Sports:"Deportes",DepositButton:"Depósito",Loading:"Cargando ..."},"en-us":{Title:"Your Balance",Total:"Total Balance",Real:"Cash Balance",Bonus:"Bonus Balance",Credit:"Credit Balance",Casino:"Casino",Sports:"Sports",DepositButton:"Deposit",Loading:"Loading ..."}};var nn={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,o=n.clearTimeout,i=n.XMLHttpRequest,u=n.XDomainRequest,a=n.ActiveXObject,f=n.EventSource,l=n.document,d=n.Promise,g=n.fetch,y=n.Response,_=n.TextDecoder,B=n.TextEncoder,P=n.AbortController;if(typeof window!="undefined"&&typeof l!="undefined"&&!("readyState"in l)&&l.body==null&&(l.readyState="loading",window.addEventListener("load",function(h){l.readyState="complete"},!1)),i==null&&a!=null&&(i=function(){return new a("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(h){function v(){}return v.prototype=h,new v}),Date.now||(Date.now=function(){return new Date().getTime()}),P==null){var j=g;g=function(h,v){var s=v.signal;return j(h,{headers:v.headers,credentials:v.credentials,cache:v.cache}).then(function(c){var p=c.body.getReader();return s._reader=p,s._aborted&&s._reader.cancel(),{status:c.status,statusText:c.statusText,headers:c.headers,body:{getReader:function(){return p}}}})},P=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function Z(){this.bitsNeeded=0,this.codePoint=0}Z.prototype.decode=function(h){function v(A,O,T){if(T===1)return A>=128>>O&&A<<O<=2047;if(T===2)return A>=2048>>O&&A<<O<=55295||A>=57344>>O&&A<<O<=65535;if(T===3)return A>=65536>>O&&A<<O<=1114111;throw new Error}function s(A,O){if(A===6*1)return O>>6>15?3:O>31?2:1;if(A===6*2)return O>15?3:2;if(A===6*3)return 3;throw new Error}for(var c=65533,p="",m=this.bitsNeeded,E=this.codePoint,S=0;S<h.length;S+=1){var b=h[S];m!==0&&(b<128||b>191||!v(E<<6|b&63,m-6,s(m,E)))&&(m=0,E=c,p+=String.fromCharCode(E)),m===0?(b>=0&&b<=127?(m=0,E=b):b>=192&&b<=223?(m=6*1,E=b&31):b>=224&&b<=239?(m=6*2,E=b&15):b>=240&&b<=247?(m=6*3,E=b&7):(m=0,E=c),m!==0&&!v(E,m,s(m,E))&&(m=0,E=c)):(m-=6,E=E<<6|b&63),m===0&&(E<=65535?p+=String.fromCharCode(E):(p+=String.fromCharCode(55296+(E-65535-1>>10)),p+=String.fromCharCode(56320+(E-65535-1&1023))))}return this.bitsNeeded=m,this.codePoint=E,p};var U=function(){try{return new _().decode(new B().encode("test"),{stream:!0})==="test"}catch(h){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+h)}return!1};(_==null||B==null||!U())&&(_=Z);var w=function(){};function C(h){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=w,this.onload=w,this.onerror=w,this.onreadystatechange=w,this._contentType="",this._xhr=h,this._sendTimeout=0,this._abort=w}C.prototype.open=function(h,v){this._abort(!0);var s=this,c=this._xhr,p=1,m=0;this._abort=function(T){s._sendTimeout!==0&&(o(s._sendTimeout),s._sendTimeout=0),(p===1||p===2||p===3)&&(p=4,c.onload=w,c.onerror=w,c.onabort=w,c.onprogress=w,c.onreadystatechange=w,c.abort(),m!==0&&(o(m),m=0),T||(s.readyState=4,s.onabort(null),s.onreadystatechange())),p=0};var E=function(){if(p===1){var T=0,I="",Q=void 0;if("contentType"in c)T=200,I="OK",Q=c.contentType;else try{T=c.status,I=c.statusText,Q=c.getResponseHeader("Content-Type")}catch(Ye){T=0,I="",Q=void 0}T!==0&&(p=2,s.readyState=2,s.status=T,s.statusText=I,s._contentType=Q,s.onreadystatechange())}},S=function(){if(E(),p===2||p===3){p=3;var T="";try{T=c.responseText}catch(I){}s.readyState=3,s.responseText=T,s.onprogress()}},b=function(T,I){if((I==null||I.preventDefault==null)&&(I={preventDefault:w}),S(),p===1||p===2||p===3){if(p=4,m!==0&&(o(m),m=0),s.readyState=4,T==="load")s.onload(I);else if(T==="error")s.onerror(I);else if(T==="abort")s.onabort(I);else throw new TypeError;s.onreadystatechange()}},A=function(T){c!=null&&(c.readyState===4?(!("onload"in c)||!("onerror"in c)||!("onabort"in c))&&b(c.responseText===""?"error":"load",T):c.readyState===3?"onprogress"in c||S():c.readyState===2&&E())},O=function(){m=r(function(){O()},500),c.readyState===3&&S()};"onload"in c&&(c.onload=function(T){b("load",T)}),"onerror"in c&&(c.onerror=function(T){b("error",T)}),"onabort"in c&&(c.onabort=function(T){b("abort",T)}),"onprogress"in c&&(c.onprogress=S),"onreadystatechange"in c&&(c.onreadystatechange=function(T){A(T)}),("contentType"in c||!("ontimeout"in i.prototype))&&(v+=(v.indexOf("?")===-1?"?":"&")+"padding=true"),c.open(h,v,!0),"readyState"in c&&(m=r(function(){O()},0))},C.prototype.abort=function(){this._abort(!1)},C.prototype.getResponseHeader=function(h){return this._contentType},C.prototype.setRequestHeader=function(h,v){var s=this._xhr;"setRequestHeader"in s&&s.setRequestHeader(h,v)},C.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},C.prototype.send=function(){if((!("ontimeout"in i.prototype)||!("sendAsBinary"in i.prototype)&&!("mozAnon"in i.prototype))&&l!=null&&l.readyState!=null&&l.readyState!=="complete"){var h=this;h._sendTimeout=r(function(){h._sendTimeout=0,h.send()},4);return}var v=this._xhr;"withCredentials"in v&&(v.withCredentials=this.withCredentials);try{v.send(void 0)}catch(s){throw s}};function N(h){return h.replace(/[A-Z]/g,function(v){return String.fromCharCode(v.charCodeAt(0)+32)})}function M(h){for(var v=Object.create(null),s=h.split(`\r
|
|
8
|
+
`),c=0;c<s.length;c+=1){var p=s[c],m=p.split(": "),E=m.shift(),S=m.join(": ");v[N(E)]=S}this._map=v}M.prototype.get=function(h){return this._map[N(h)]},i!=null&&i.HEADERS_RECEIVED==null&&(i.HEADERS_RECEIVED=2);function W(){}W.prototype.open=function(h,v,s,c,p,m,E){h.open("GET",p);var S=0;h.onprogress=function(){var A=h.responseText,O=A.slice(S);S+=O.length,s(O)},h.onerror=function(A){A.preventDefault(),c(new Error("NetworkError"))},h.onload=function(){c(null)},h.onabort=function(){c(null)},h.onreadystatechange=function(){if(h.readyState===i.HEADERS_RECEIVED){var A=h.status,O=h.statusText,T=h.getResponseHeader("Content-Type"),I=h.getAllResponseHeaders();v(A,O,T,new M(I))}},h.withCredentials=m;for(var b in E)Object.prototype.hasOwnProperty.call(E,b)&&h.setRequestHeader(b,E[b]);return h.send(),h};function Ee(h){this._headers=h}Ee.prototype.get=function(h){return this._headers.get(h)};function xe(){}xe.prototype.open=function(h,v,s,c,p,m,E){var S=null,b=new P,A=b.signal,O=new _;return g(p,{headers:E,credentials:m?"include":"same-origin",signal:A,cache:"no-store"}).then(function(T){return S=T.body.getReader(),v(T.status,T.statusText,T.headers.get("Content-Type"),new Ee(T.headers)),new d(function(I,Q){var Ye=function(){S.read().then(function(ne){if(ne.done)I(void 0);else{var J=O.decode(ne.value,{stream:!0});s(J),Ye()}}).catch(function(ne){Q(ne)})};Ye()})}).catch(function(T){if(T.name!=="AbortError")return T}).then(function(T){c(T)}),{abort:function(){S!=null&&S.cancel(),b.abort()}}};function ie(){this._listeners=Object.create(null)}function pe(h){r(function(){throw h},0)}ie.prototype.dispatchEvent=function(h){h.target=this;var v=this._listeners[h.type];if(v!=null)for(var s=v.length,c=0;c<s;c+=1){var p=v[c];try{typeof p.handleEvent=="function"?p.handleEvent(h):p.call(this,h)}catch(m){pe(m)}}},ie.prototype.addEventListener=function(h,v){h=String(h);var s=this._listeners,c=s[h];c==null&&(c=[],s[h]=c);for(var p=!1,m=0;m<c.length;m+=1)c[m]===v&&(p=!0);p||c.push(v)},ie.prototype.removeEventListener=function(h,v){h=String(h);var s=this._listeners,c=s[h];if(c!=null){for(var p=[],m=0;m<c.length;m+=1)c[m]!==v&&p.push(c[m]);p.length===0?delete s[h]:s[h]=p}};function q(h){this.type=h,this.target=void 0}function _e(h,v){q.call(this,h),this.data=v.data,this.lastEventId=v.lastEventId}_e.prototype=Object.create(q.prototype);function x(h,v){q.call(this,h),this.status=v.status,this.statusText=v.statusText,this.headers=v.headers}x.prototype=Object.create(q.prototype);function Te(h,v){q.call(this,h),this.error=v.error}Te.prototype=Object.create(q.prototype);var We=-1,ce=0,Se=1,Ae=2,Ze=-1,ae=0,Le=1,at=2,qe=3,st=/^text\/event\-stream(;.*)?$/i,At=1e3,ut=18e6,Qe=function(h,v){var s=h==null?v:parseInt(h,10);return s!==s&&(s=v),Je(s)},Je=function(h){return Math.min(Math.max(h,At),ut)},Be=function(h,v,s){try{typeof v=="function"&&v.call(h,s)}catch(c){pe(c)}};function te(h,v){ie.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,Ht(this,h,v)}function lt(){return i!=null&&"withCredentials"in i.prototype||u==null?new i:new u}var Ct=g!=null&&y!=null&&"body"in y.prototype;function Ht(h,v,s){v=String(v);var c=!!s.withCredentials,p=s.lastEventIdQueryParameterName||"lastEventId",m=Je(1e3),E=Qe(s.heartbeatTimeout,45e3),S="",b=m,A=!1,O=0,T=s.headers||{},I=s.Transport,Q=Ct&&I==null?void 0:new C(I!=null?new I:lt()),Ye=I!=null&&typeof I!="string"?new I:Q==null?new xe:new W,ne=void 0,J=0,le=We,Re="",ct="",me="",ft="",Y=ae,Ot=0,Ce=0,ur=function(V,$,re,oe){if(le===ce)if(V===200&&re!=null&&st.test(re)){le=Se,A=Date.now(),b=m,h.readyState=Se;var K=new x("open",{status:V,statusText:$,headers:oe});h.dispatchEvent(K),Be(h,h.onopen,K)}else{var X="";V!==200?($&&($=$.replace(/\s+/g," ")),X="EventSource's response has a status "+V+" "+$+" that is not 200. Aborting the connection."):X="EventSource's response has a Content-Type specifying an unsupported type: "+(re==null?"-":re.replace(/\s+/g," "))+". Aborting the connection.",Lt();var K=new x("error",{status:V,statusText:$,headers:oe});h.dispatchEvent(K),Be(h,h.onerror,K),console.error(X)}},lr=function(V){if(le===Se){for(var $=-1,re=0;re<V.length;re+=1){var oe=V.charCodeAt(re);(oe===10||oe===13)&&($=re)}var K=($!==-1?ft:"")+V.slice(0,$+1);ft=($===-1?ft:"")+V.slice($+1),V!==""&&(A=Date.now(),O+=V.length);for(var X=0;X<K.length;X+=1){var oe=K.charCodeAt(X);if(Y===Ze&&oe===10)Y=ae;else if(Y===Ze&&(Y=ae),oe===13||oe===10){if(Y!==ae){Y===Le&&(Ce=X+1);var ge=K.slice(Ot,Ce-1),be=K.slice(Ce+(Ce<X&&K.charCodeAt(Ce)===32?1:0),X);ge==="data"?(Re+=`
|
|
9
|
+
`,Re+=be):ge==="id"?ct=be:ge==="event"?me=be:ge==="retry"?(m=Qe(be,m),b=m):ge==="heartbeatTimeout"&&(E=Qe(be,E),J!==0&&(o(J),J=r(function(){Ke()},E)))}if(Y===ae){if(Re!==""){S=ct,me===""&&(me="message");var Ne=new _e(me,{data:Re.slice(1),lastEventId:ct});if(h.dispatchEvent(Ne),me==="open"?Be(h,h.onopen,Ne):me==="message"?Be(h,h.onmessage,Ne):me==="error"&&Be(h,h.onerror,Ne),le===Ae)return}Re="",me=""}Y=oe===13?Ze:ae}else Y===ae&&(Ot=X,Y=Le),Y===Le?oe===58&&(Ce=X+1,Y=at):Y===at&&(Y=qe)}}},sn=function(V){if(le===Se||le===ce){le=We,J!==0&&(o(J),J=0),J=r(function(){Ke()},b),b=Je(Math.min(m*16,b*2)),h.readyState=ce;var $=new Te("error",{error:V});h.dispatchEvent($),Be(h,h.onerror,$),V!=null&&console.error(V)}},Lt=function(){le=Ae,ne!=null&&(ne.abort(),ne=void 0),J!==0&&(o(J),J=0),h.readyState=Ae},Ke=function(){if(J=0,le!==We){if(!A&&ne!=null)sn(new Error("No activity within "+E+" milliseconds. "+(le===ce?"No response received.":O+" chars received.")+" Reconnecting.")),ne!=null&&(ne.abort(),ne=void 0);else{var V=Math.max((A||Date.now())+E-Date.now(),1);A=!1,J=r(function(){Ke()},V)}return}A=!1,O=0,J=r(function(){Ke()},E),le=ce,Re="",me="",ct=S,ft="",Ot=0,Ce=0,Y=ae;var $=v;if(v.slice(0,5)!=="data:"&&v.slice(0,5)!=="blob:"&&S!==""){var re=v.indexOf("?");$=re===-1?v:v.slice(0,re+1)+v.slice(re+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(be,Ne){return Ne===p?"":be}),$+=(v.indexOf("?")===-1?"?":"&")+p+"="+encodeURIComponent(S)}var oe=h.withCredentials,K={};K.Accept="text/event-stream";var X=h.headers;if(X!=null)for(var ge in X)Object.prototype.hasOwnProperty.call(X,ge)&&(K[ge]=X[ge]);try{ne=Ye.open(Q,ur,lr,sn,$,oe,K)}catch(be){throw Lt(),be}};h.url=v,h.readyState=ce,h.withCredentials=c,h.headers=T,h._close=Lt,Ke()}te.prototype=Object.create(ie.prototype),te.prototype.CONNECTING=ce,te.prototype.OPEN=Se,te.prototype.CLOSED=Ae,te.prototype.close=function(){this._close()},te.CONNECTING=ce,te.OPEN=Se,te.CLOSED=Ae,te.prototype.withCredentials=void 0;var ht=f;i!=null&&(f==null||!("withCredentials"in f.prototype))&&(ht=te),function(h){{var v=h(t);v!==void 0&&(e.exports=v)}}(function(h){h.EventSourcePolyfill=te,h.NativeEventSource=f,h.EventSource=ht})})(typeof globalThis=="undefined"?typeof window!="undefined"?window:typeof self!="undefined"?self:Vr:globalThis)})(nn,nn.exports);var Mi=nn.exports;function Pi(e){br(e,"svelte-gv6dm2",'*,*::before,*::after{font-family:inherit}:host{font-family:inherit}input,textarea,button{font-family:inherit}p{padding:0;margin:0}.ShowBalance{position:relative}.ShowBalance .Loading{font-size:14px;white-space:nowrap;padding-right:10px}.ShowBalance .BalanceValue{font-size:14px;cursor:pointer;display:flex;flex-wrap:nowrap;white-space:nowrap;background:transparent;border:none;font:inherit;color:inherit}.ShowBalance .BalanceValue svg{width:16px}.ShowBalance .BalanceValue span{padding-left:8px}@media only screen and (max-width: 360px){.ShowBalance .BalanceValue{font-size:12px}.ShowBalance .BalanceValue svg{width:12px}}.BalanceModalWrapper{background-color:var(--emw--color-white, #FFFFFF);position:absolute;top:45px;left:50%;transform:translateX(-60%);padding:10px;box-shadow:0px 30px 30px var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));border-radius:5px;z-index:17;box-shadow:0px 5px 20px 0px #191919}.BalanceModalWrapper:before{content:"";background:var(--emw--color-white, #FFFFFF);clip-path:polygon(50% 0, 0% 100%, 100% 100%);position:absolute;top:-8px;left:60%;width:25px;height:10px;transform:translateX(-50%);z-index:1}.BalanceModalClose{position:absolute;top:5px;right:5px;width:20px;height:20px;z-index:1;cursor:pointer;font:inherit}.BalanceModalClose:before{content:"";background:var(--emw--color-secondary, var(--emw--color-secondary, #FD2839));position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(45deg)}.BalanceModalClose:after{content:"";background:var(--emw--color-secondary, var(--emw--color-secondary, #FD2839));position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(-45deg)}.BalanceModal{position:relative;width:280px}.BalanceModalHeader{display:flex;align-items:center;justify-content:center;padding:20px 0}.BalanceModalHeader .BalanceModalTitle{font-size:16px;font-weight:bold;color:var(--emw--header-contrast, var(--emw--color-contrast, #07072A))}.BalanceModalRowBoth{display:flex;flex-direction:column;gap:5px;padding:20px 0;border-bottom:1px solid var(--emw--color-gray-100, #E6E6E6)}.BalanceModalRowBoth:last-child{border-bottom:none}.BalanceModalRowBoth .BalanceModalRowLine{display:flex;width:100%;justify-content:space-between}.BalanceModalRowBoth .BalanceModalText{color:var(--emw--header-contrast, var(--emw--color-contrast, #07072A));font-size:14px;text-transform:capitalize}.BalanceModalRowBoth .BalanceModalValue{font-size:14px;font-weight:bold;color:var(--emw--header-contrast, var(--emw--color-contrast, #07072A))}.BalanceModalFooter{display:flex;align-items:center;padding:20px 0 10px}.BalanceModalFooter .BalanceModalAction{background:var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));font-size:12px;color:white;text-transform:uppercase;width:100%;border-radius:5px;border:none;padding:10px 0;cursor:pointer}.BalanceModalFooter .BalanceModalAction:hover,.BalanceModalFooter .BalanceModalActionactive{background:var(--emw--header-contrast, var(--emw--color-background, #07072A))}.ShowBalanceModalOverlay{background-color:rgba(0, 0, 0, 0.7);position:fixed;top:0;bottom:0;left:0;right:0;z-index:16}')}function wn(e,t,n){const r=e.slice();return r[51]=t[n],r}function An(e,t,n){const r=e.slice();return r[54]=t[n],r}function Ii(e){let t,n=(e[3].Total?e[5](e[3].Total[0].amount):"0")+"",r,o,i,u,a,f,l,d=e[2]&&Cn(e);return{c(){t=G("button"),r=ye(n),o=ve(),i=G("span"),i.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 11.435"><defs><style>.a{fill:var(--emw--color-white, #FFFFFF);}</style></defs><path class="a" d="M16.191,19.235l7.562-7.568a1.423,1.423,0,0,1,2.019,0,1.441,1.441,0,0,1,0,2.025L17.2,22.265a1.427,1.427,0,0,1-1.971.042L6.6,13.7a1.429,1.429,0,0,1,2.019-2.025Z" transform="translate(-6.188 -11.246)"></path></svg>',u=ve(),d&&d.c(),a=Er(),z(t,"class","BalanceValue")},m(g,y){de(g,t,y),R(t,r),R(t,o),R(t,i),de(g,u,y),d&&d.m(g,y),de(g,a,y),f||(l=bt(t,"click",e[25]),f=!0)},p(g,y){y[0]&8&&n!==(n=(g[3].Total?g[5](g[3].Total[0].amount):"0")+"")&&He(r,n),g[2]?d?d.p(g,y):(d=Cn(g),d.c(),d.m(a.parentNode,a)):d&&(d.d(1),d=null)},d(g){g&&(he(t),he(u),he(a)),d&&d.d(g),f=!1,l()}}}function Di(e){let t,n=e[4]("Loading")+"",r;return{c(){t=G("p"),r=ye(n)},m(o,i){de(o,t,i),R(t,r)},p(o,i){i[0]&16&&n!==(n=o[4]("Loading")+"")&&He(r,n)},d(o){o&&he(t)}}}function Cn(e){let t,n,r,o,i,u,a=e[4]("Title")+"",f,l,d,g,y,_,B=e[4]("DepositButton")+"",P,j,Z,U=yt(Object.keys(e[3])),w=[];for(let C=0;C<U.length;C+=1)w[C]=On(wn(e,U,C));return{c(){t=G("div"),n=G("button"),r=ve(),o=G("div"),i=G("div"),u=G("p"),f=ye(a),l=ve(),d=G("div");for(let C=0;C<w.length;C+=1)w[C].c();g=ve(),y=G("div"),_=G("button"),P=ye(B),z(n,"class","BalanceModalClose"),z(u,"class","BalanceModalTitle"),z(i,"class","BalanceModalHeader"),z(d,"class","BalanceModalBody"),z(_,"class","BalanceModalAction"),z(y,"class","BalanceModalFooter"),z(o,"class","BalanceModal"),z(t,"class","BalanceModalWrapper")},m(C,N){de(C,t,N),R(t,n),R(t,r),R(t,o),R(o,i),R(i,u),R(u,f),R(o,l),R(o,d);for(let M=0;M<w.length;M+=1)w[M]&&w[M].m(d,null);R(o,g),R(o,y),R(y,_),R(_,P),j||(Z=[bt(n,"click",e[26]),bt(_,"click",e[27])],j=!0)},p(C,N){if(N[0]&16&&a!==(a=C[4]("Title")+"")&&He(f,a),N[0]&184){U=yt(Object.keys(C[3]));let M;for(M=0;M<U.length;M+=1){const W=wn(C,U,M);w[M]?w[M].p(W,N):(w[M]=On(W),w[M].c(),w[M].m(d,null))}for(;M<w.length;M+=1)w[M].d(1);w.length=U.length}N[0]&16&&B!==(B=C[4]("DepositButton")+"")&&He(P,B)},d(C){C&&he(t),Pn(w,C),j=!1,ke(Z)}}}function Hn(e){let t,n,r=e[4](e[51])+"",o,i,u=e[7](e[54])+"",a,f,l,d,g=e[5](e[54].amount)+"",y;return{c(){t=G("div"),n=G("p"),o=ye(r),i=ve(),a=ye(u),f=ve(),l=G("p"),d=G("span"),y=ye(g),z(n,"class","BalanceModalText"),z(d,"class","BalanceModalAmount"),z(l,"class","BalanceModalValue"),z(t,"class","BalanceModalRowLine")},m(_,B){de(_,t,B),R(t,n),R(n,o),R(n,i),R(n,a),R(t,f),R(t,l),R(l,d),R(d,y)},p(_,B){B[0]&24&&r!==(r=_[4](_[51])+"")&&He(o,r),B[0]&8&&u!==(u=_[7](_[54])+"")&&He(a,u),B[0]&8&&g!==(g=_[5](_[54].amount)+"")&&He(y,g)},d(_){_&&he(t)}}}function On(e){let t,n,r=yt(e[3][e[51]]),o=[];for(let i=0;i<r.length;i+=1)o[i]=Hn(An(e,r,i));return{c(){t=G("div");for(let i=0;i<o.length;i+=1)o[i].c();n=ve(),z(t,"class","BalanceModalRowBoth")},m(i,u){de(i,t,u);for(let a=0;a<o.length;a+=1)o[a]&&o[a].m(t,null);R(t,n)},p(i,u){if(u[0]&184){r=yt(i[3][i[51]]);let a;for(a=0;a<r.length;a+=1){const f=An(i,r,a);o[a]?o[a].p(f,u):(o[a]=Hn(f),o[a].c(),o[a].m(t,n))}for(;a<o.length;a+=1)o[a].d(1);o.length=r.length}},d(i){i&&he(t),Pn(o,i)}}}function Ln(e){let t,n,r;return{c(){t=G("button"),z(t,"class","ShowBalanceModalOverlay")},m(o,i){de(o,t,i),n||(r=bt(t,"click",e[28]),n=!0)},p:ue,d(o){o&&he(t),n=!1,r()}}}function Fi(e){let t,n,r;function o(f,l){return f[1]?Di:Ii}let i=o(e),u=i(e),a=e[2]&&Ln(e);return{c(){t=G("div"),n=G("div"),u.c(),r=ve(),a&&a.c(),z(n,"class","ShowBalance")},m(f,l){de(f,t,l),R(t,n),u.m(n,null),R(t,r),a&&a.m(t,null),e[29](t)},p(f,l){i===(i=o(f))&&u?u.p(f,l):(u.d(1),u=i(f),u&&(u.c(),u.m(n,null))),f[2]?a?a.p(f,l):(a=Ln(f),a.c(),a.m(t,null)):a&&(a.d(1),a=null)},i:ue,o:ue,d(f){f&&he(t),u.d(),a&&a.d(),e[29](null)}}}function Ui(e,t,n){let r;gr(e,Ri,s=>n(4,r=s));let{userid:o=""}=t,{session:i=""}=t,{endpoint:u=""}=t,{lang:a="en"}=t,{mbsource:f=""}=t,{clientstyling:l=""}=t,{clientstylingurl:d=""}=t,{translationurl:g=""}=t,{gmversion:y="gm16"}=t,{displaybalanceoption:_="All"}=t,{totalcalculationmode:B="totalCashAmount"}=t,{hideproducttype:P=""}=t,{currencylocale:j="en"}=t,{currencydisplay:Z="symbol"}=t,{maximumfractiondigits:U="2"}=t,{minimumfractiondigits:w="0"}=t,{customdisplayformat:C=""}=t,N,M,W=!0,Ee=!1,xe=!1,ie,pe="",q=[],_e;const x={},Te=["totalCashAmount","totalRealAmount"],We=()=>{fetch(g).then(s=>s.json()).then(s=>Object.keys(s).forEach(c=>Sn(c,s[c]))).catch(s=>console.log(s))};Object.keys(Bn).forEach(s=>Sn(s,Bn[s]));const ce=s=>{if(C)return Se(s);const c=j||a,p={style:"currency",currency:pe,useGrouping:!0,currencyDisplay:Z||"code",maximumFractionDigits:U===""||isNaN(Number(U))?2:Number(U),minimumFractionDigits:w===""||isNaN(Number(w))?0:Number(w)};return new Intl.NumberFormat(c,p).format(s)},Se=s=>{const c=[];let p="";for(const m of C)switch(m){default:p+=m;break;case"{":p&&c.push(p),p="";break;case"}":const[E,S]=p.split("|");if(p="",E.toLowerCase()==="currency")p=pe;else if(E.toLowerCase()==="amount"){let b=",",A=".",O=2;S&&(S[0]!==" "&&(b=S[0]),S[1]!==" "&&(A=S[1]),S[2]!==" "&&!isNaN(Number(S[2]))&&(O=Number(S[2])));let[T,I]=String(Math.floor(s*Nt(10,O))/Nt(10,O)).split(".");p+=T[0];for(let Q=1;Q<T.length;++Q)(T.length-Q)%3===0?p+=b+T[Q]:p+=T[Q];I&&(p+=A+I)}p&&c.push(p),p="";break}return c.push(p),c.join("")},Ae=()=>It(this,null,function*(){var c,p,m;n(1,W=!0);const s=new URL(`${u}/v1/player/${o}/account`);try{const E=yield fetch(s,{method:"GET",headers:{"X-SessionID":i}}),S=yield E.json();if(E.ok)q=S.items,pe=(c=q.find(b=>b.displayName==="Casino"))==null?void 0:c.currency,n(3,x.Total=[{amount:S.totalAmount[pe]}],x),n(3,x.Real=[{amount:(p=q.find(b=>b.displayName==="Casino"))==null?void 0:p.balanceAmount}],x),n(3,x.Bonus=[{amount:(m=q.find(b=>b.displayName==="UBS"))==null?void 0:m.balanceAmount}],x);else throw new Error("Failed to fetch balance data !")}catch(E){console.log("Balance error: ",E)}finally{n(1,W=!1)}}),Ze=()=>{n(1,W=!0);const s=new URL(`${u}/v2/player/${o}/balance`),c=new Headers;c.append("X-SessionID",i),fetch(s,{method:"GET",headers:c}).then(m=>m.json()).then(m=>{m[B]||n(8,B=Te[0]);const E=m.items.find(b=>b.type==="Real"&&b.walletAccountType==="Ordinary");if(pe=E.currency,xe=!!E.productType,n(3,x.Total=[{amount:0}],x),n(3,x.Real=[],x),n(3,x.Bonus=[],x),n(3,x.Credit=[],x),!xe){_e={lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1},n(3,x.Total[0].amount=m[B][pe],x);for(const b of m.items)switch(b.type){case"Bonus":x.Bonus.length===0?x.Bonus.push({amount:b.amount}):n(3,x.Bonus[0].amount+=b.amount,x);break;case"Real":if(b.creditLine&&x.Credit.length===0&&x.Credit.push({amount:b.creditLine}),B==="totalRealAmount")continue;x.Real.length===0?x.Real.push({amount:b.amount}):n(3,x.Real[0].amount+=b.amount,x);break}for(const[b,A]of Object.entries(x))A.length<1&&delete x[b];n(1,W=!1);return}_e={Casino:{lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1},Sports:{lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1}};let S=m.items;_&&_!=="All"&&(S=m.items.filter(b=>b.productType===_));for(const b of S){let A;switch(b.type){case"Bonus":A=x.Bonus.findIndex(O=>O.productType===b.productType),A>0?n(3,x.Bonus[A].amount+=b.amount,x):x.Bonus.push({amount:b.amount,productType:b.productType});break;case"Real":b.creditLine&&x.Credit.push({amount:b.creditLine,productType:b.productType}),A=x.Real.findIndex(O=>O.productType===b.productType),A>0?n(3,x.Real[A].amount+=b.amount,x):x.Real.push({amount:b.amount,productType:b.productType});break}}st();for(const[b,A]of Object.entries(x))A.length<1&&delete x[b];window.postMessage({type:"playerBalanceInfo",balance:m},window.location.href),n(1,W=!1)}).catch(()=>{throw n(1,W=!1),new Error("Failed to fetch balance data !")})},ae=()=>{if(ie&&ie.close(),i.length<1)return;let s,c;switch(y){case"gm16":s=new URL(`${u}/v2/player/${o}/information/updates`),c=E=>At(E);break;case"gmcore":s=new URL(`${u}/v1/player/${o}/balance/updates`),c=E=>at(E);break}const p={accept:"text/event-stream","X-SessionId":i},m=new Mi.EventSourcePolyfill(s,{headers:p});ie=m,m.addEventListener("message",c)},Le=s=>{let c;try{c=JSON.parse(s)}catch(p){console.log("Balance stream failed: ",p);return}return c},at=s=>{var E,S;const c=Le(s.data);if(!c){ae();return}let p="0";const m=c.balanceChange;q=q.map(b=>(m&&m[b.id]&&(b=Pt(Mt({},b),{balanceAmount:m[b.id].afterAmount})),p=(parseFloat(b==null?void 0:b.balanceAmount)+parseFloat(p)).toString(),b)),n(3,x.Real=[{amount:(E=q[0])==null?void 0:E.balanceAmount}],x),n(3,x.Bonus=[{amount:(S=q[1])==null?void 0:S.balanceAmount}],x),n(3,x.Total=[{amount:Number(p)}],x)},qe=(s,c,p)=>{let m=null;switch(p.walletAccountType){case"Ordinary":(p.afterAmount!==p.affectedAmount||c.lastOrdinaryAfterAmount===0)&&(c.lastOrdinaryAfterAmount=p.afterAmount,c.showCreditLineAfterAmount||(m=p.afterAmount));break;case"CreditLine":p.afterAmount!==0?(m=p.afterAmount,c.showCreditLineAfterAmount=!0):(m=c.lastOrdinaryAfterAmount,c.showCreditLineAfterAmount=!1);break;default:m=p.afterAmount}return m===null?s:m},st=()=>{switch(B){case"totalCashAmount":let s=0;for(const p of["Real","Bonus"])for(const m of x[p])s+=Math.max(m.amount,0);n(3,x.Total[0].amount=s,x);break;case"totalRealAmount":if(!xe)return;let c=0;for(const p of x.Real)c+=p.amount;n(3,x.Total[0].amount=c,x)}},At=s=>{const c=Le(s.data);if(!c){ae();return}if(Qe(c==null?void 0:c.type)||c.type!=="BALANCE_UPDATE_V2")return;const p=c.body.balanceChange;for(const[m,E]of Object.entries(p))if(B==="totalRealAmount"&&m==="Real"&&!xe&&n(3,x.Total[0].amount=qe(x.Total[0].amount,_e,E),x),!!x[m])for(const S of x[m]){if(!xe){S.amount=m==="Real"?qe(S.amount,_e,E):E.afterAmount;continue}E.productType===S.productType&&(S.amount=m==="Real"?qe(S.amount,_e[S.productType],E):E.afterAmount)}st()},ut=()=>{n(2,Ee=!1),window.postMessage({type:"GoToDeposit"},window.location.href),typeof gtag=="function"&>ag("event","GoToDeposit",{context:"PlayerAccountBalanceModal"})},Qe=s=>s==="SESSION_EXPIRATION"?(window.postMessage({type:"SessionExpiration"},window.location.href),!0):!1,Je=()=>{Te.includes(B)||(console.error(`Unsupported value ('${B}') for totalcalculationmode parameter. Only the following values are supported ${Te}. Using default value ('${Te[0]}').`),n(8,B=Te[0]))},Be=s=>{const c=P.split(",").map(p=>p.trim());return!s.productType||c.includes(s.productType)?"":r(s.productType)},te=()=>{switch(Ni(a),Je(),y){case"gmcore":Ae();break;case"gm16":Ze();break;default:throw Error(`Invalid apiversion attribute: ${y}`)}},lt=s=>s.data&&s.data.type==="LogoutSuccessfull"&&ie.close();Sr(()=>(window.addEventListener("message",lt,!1),()=>{window.removeEventListener("message",lt),ie&&ie.close()}));const Ct=()=>n(2,Ee=!0),Ht=()=>n(2,Ee=!1),ht=()=>ut(),h=()=>n(2,Ee=!1);function v(s){Vt[s?"unshift":"push"](()=>{N=s,n(0,N)})}return e.$$set=s=>{"userid"in s&&n(9,o=s.userid),"session"in s&&n(10,i=s.session),"endpoint"in s&&n(11,u=s.endpoint),"lang"in s&&n(12,a=s.lang),"mbsource"in s&&n(13,f=s.mbsource),"clientstyling"in s&&n(14,l=s.clientstyling),"clientstylingurl"in s&&n(15,d=s.clientstylingurl),"translationurl"in s&&n(16,g=s.translationurl),"gmversion"in s&&n(17,y=s.gmversion),"displaybalanceoption"in s&&n(18,_=s.displaybalanceoption),"totalcalculationmode"in s&&n(8,B=s.totalcalculationmode),"hideproducttype"in s&&n(19,P=s.hideproducttype),"currencylocale"in s&&n(20,j=s.currencylocale),"currencydisplay"in s&&n(21,Z=s.currencydisplay),"maximumfractiondigits"in s&&n(22,U=s.maximumfractiondigits),"minimumfractiondigits"in s&&n(23,w=s.minimumfractiondigits),"customdisplayformat"in s&&n(24,C=s.customdisplayformat)},e.$$.update=()=>{e.$$.dirty[0]&400896&&u&&o&&i&&a&&y&&_&&te(),e.$$.dirty[0]&134656&&u&&o&&i&&y&&ae(),e.$$.dirty[0]&16385&&l&&N&&Fr(N,l),e.$$.dirty[0]&32769&&d&&N&&Ur(N,d),e.$$.dirty[0]&8193&&N&&Gr(N,`${f}.Style`,M),e.$$.dirty[0]&65536&&g&&We()},[N,W,Ee,x,r,ce,ut,Be,B,o,i,u,a,f,l,d,g,y,_,P,j,Z,U,w,C,Ct,Ht,ht,h,v]}class sr extends Ir{constructor(t){super(),Mr(this,t,Ui,Fi,Nn,{userid:9,session:10,endpoint:11,lang:12,mbsource:13,clientstyling:14,clientstylingurl:15,translationurl:16,gmversion:17,displaybalanceoption:18,totalcalculationmode:8,hideproducttype:19,currencylocale:20,currencydisplay:21,maximumfractiondigits:22,minimumfractiondigits:23,customdisplayformat:24},Pi,[-1,-1])}get userid(){return this.$$.ctx[9]}set userid(t){this.$$set({userid:t}),k()}get session(){return this.$$.ctx[10]}set session(t){this.$$set({session:t}),k()}get endpoint(){return this.$$.ctx[11]}set endpoint(t){this.$$set({endpoint:t}),k()}get lang(){return this.$$.ctx[12]}set lang(t){this.$$set({lang:t}),k()}get mbsource(){return this.$$.ctx[13]}set mbsource(t){this.$$set({mbsource:t}),k()}get clientstyling(){return this.$$.ctx[14]}set clientstyling(t){this.$$set({clientstyling:t}),k()}get clientstylingurl(){return this.$$.ctx[15]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),k()}get translationurl(){return this.$$.ctx[16]}set translationurl(t){this.$$set({translationurl:t}),k()}get gmversion(){return this.$$.ctx[17]}set gmversion(t){this.$$set({gmversion:t}),k()}get displaybalanceoption(){return this.$$.ctx[18]}set displaybalanceoption(t){this.$$set({displaybalanceoption:t}),k()}get totalcalculationmode(){return this.$$.ctx[8]}set totalcalculationmode(t){this.$$set({totalcalculationmode:t}),k()}get hideproducttype(){return this.$$.ctx[19]}set hideproducttype(t){this.$$set({hideproducttype:t}),k()}get currencylocale(){return this.$$.ctx[20]}set currencylocale(t){this.$$set({currencylocale:t}),k()}get currencydisplay(){return this.$$.ctx[21]}set currencydisplay(t){this.$$set({currencydisplay:t}),k()}get maximumfractiondigits(){return this.$$.ctx[22]}set maximumfractiondigits(t){this.$$set({maximumfractiondigits:t}),k()}get minimumfractiondigits(){return this.$$.ctx[23]}set minimumfractiondigits(t){this.$$set({minimumfractiondigits:t}),k()}get customdisplayformat(){return this.$$.ctx[24]}set customdisplayformat(t){this.$$set({customdisplayformat:t}),k()}}Pr(sr,{userid:{},session:{},endpoint:{},lang:{},mbsource:{},clientstyling:{},clientstylingurl:{},translationurl:{},gmversion:{},displaybalanceoption:{},totalcalculationmode:{},hideproducttype:{},currencylocale:{},currencydisplay:{},maximumfractiondigits:{},minimumfractiondigits:{},customdisplayformat:{}},[],[],!0);exports.default=sr;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";if(typeof window!="undefined"){let n=function(t){return function(...s){try{return t.apply(this,s)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw e}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>require("../components/PlayerAccountBalanceModal-
|
|
1
|
+
"use strict";if(typeof window!="undefined"){let n=function(t){return function(...s){try{return t.apply(this,s)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw e}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>require("../components/PlayerAccountBalanceModal-fo_7QiCQ.cjs")).then(({default:t})=>{!customElements.get("player-account-balance-modal")&&customElements.define("player-account-balance-modal",t.element)})}
|
|
@@ -10,7 +10,7 @@ if (typeof window != "undefined") {
|
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
|
-
customElements.define = n(customElements.define), import("../components/PlayerAccountBalanceModal-
|
|
13
|
+
customElements.define = n(customElements.define), import("../components/PlayerAccountBalanceModal-DfqTzyof.js").then(({ default: t }) => {
|
|
14
14
|
!customElements.get("player-account-balance-modal") && customElements.define("player-account-balance-modal", t.element);
|
|
15
15
|
});
|
|
16
16
|
}
|
package/package.json
CHANGED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";var hr=Object.defineProperty,cr=Object.defineProperties;var fr=Object.getOwnPropertyDescriptors;var un=Object.getOwnPropertySymbols;var dr=Object.prototype.hasOwnProperty,pr=Object.prototype.propertyIsEnumerable;var Nt=Math.pow,Rt=(e,t,n)=>t in e?hr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mt=(e,t)=>{for(var n in t||(t={}))dr.call(t,n)&&Rt(e,n,t[n]);if(un)for(var n of un(t))pr.call(t,n)&&Rt(e,n,t[n]);return e},Pt=(e,t)=>cr(e,fr(t));var se=(e,t,n)=>(Rt(e,typeof t!="symbol"?t+"":t,n),n);var It=(e,t,n)=>new Promise((r,o)=>{var i=f=>{try{a(n.next(f))}catch(l){o(l)}},u=f=>{try{a(n.throw(f))}catch(l){o(l)}},a=f=>f.done?r(f.value):Promise.resolve(f.value).then(i,u);a((n=n.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function ue(){}function Rn(e){return e()}function ln(){return Object.create(null)}function ke(e){e.forEach(Rn)}function rn(e){return typeof e=="function"}function Nn(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function mr(e){return Object.keys(e).length===0}function Mn(e,...t){if(e==null){for(const r of t)r(void 0);return ue}const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function gr(e,t,n){e.$$.on_destroy.push(Mn(t,n))}function R(e,t){e.appendChild(t)}function br(e,t,n){const r=yr(e);if(!r.getElementById(t)){const o=G("style");o.id=t,o.textContent=n,vr(r,o)}}function yr(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 R(e.head||e,t),t.sheet}function de(e,t,n){e.insertBefore(t,n||null)}function he(e){e.parentNode&&e.parentNode.removeChild(e)}function Pn(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function G(e){return document.createElement(e)}function ye(e){return document.createTextNode(e)}function ve(){return ye(" ")}function Er(){return ye("")}function bt(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function z(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function xr(e){return Array.from(e.childNodes)}function He(e,t){t=""+t,e.data!==t&&(e.data=t)}function _r(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}let nt;function tt(e){nt=e}function Tr(){if(!nt)throw new Error("Function called outside component initialization");return nt}function Sr(e){Tr().$$.on_mount.push(e)}const Ie=[],Vt=[];let Fe=[];const hn=[],Br=Promise.resolve();let Xt=!1;function wr(){Xt||(Xt=!0,Br.then(k))}function zt(e){Fe.push(e)}const Dt=new Set;let Me=0;function k(){if(Me!==0)return;const e=nt;do{try{for(;Me<Ie.length;){const t=Ie[Me];Me++,tt(t),Ar(t.$$)}}catch(t){throw Ie.length=0,Me=0,t}for(tt(null),Ie.length=0,Me=0;Vt.length;)Vt.pop()();for(let t=0;t<Fe.length;t+=1){const n=Fe[t];Dt.has(n)||(Dt.add(n),n())}Fe.length=0}while(Ie.length);for(;hn.length;)hn.pop()();Xt=!1,Dt.clear(),tt(e)}function Ar(e){if(e.fragment!==null){e.update(),ke(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(zt)}}function Cr(e){const t=[],n=[];Fe.forEach(r=>e.indexOf(r)===-1?t.push(r):n.push(r)),n.forEach(r=>r()),Fe=t}const Hr=new Set;function Or(e,t){e&&e.i&&(Hr.delete(e),e.i(t))}function yt(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function Lr(e,t,n){const{fragment:r,after_update:o}=e.$$;r&&r.m(t,n),zt(()=>{const i=e.$$.on_mount.map(Rn).filter(rn);e.$$.on_destroy?e.$$.on_destroy.push(...i):ke(i),e.$$.on_mount=[]}),o.forEach(zt)}function Rr(e,t){const n=e.$$;n.fragment!==null&&(Cr(n.after_update),ke(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Nr(e,t){e.$$.dirty[0]===-1&&(Ie.push(e),wr(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Mr(e,t,n,r,o,i,u=null,a=[-1]){const f=nt;tt(e);const l=e.$$={fragment:null,ctx:[],props:i,update:ue,not_equal:o,bound:ln(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(f?f.$$.context:[])),callbacks:ln(),dirty:a,skip_bound:!1,root:t.target||f.$$.root};u&&u(l.root);let d=!1;if(l.ctx=n?n(e,t.props||{},(g,y,..._)=>{const B=_.length?_[0]:y;return l.ctx&&o(l.ctx[g],l.ctx[g]=B)&&(!l.skip_bound&&l.bound[g]&&l.bound[g](B),d&&Nr(e,g)),y}):[],l.update(),d=!0,ke(l.before_update),l.fragment=r?r(l.ctx):!1,t.target){if(t.hydrate){const g=xr(t.target);l.fragment&&l.fragment.l(g),g.forEach(he)}else l.fragment&&l.fragment.c();t.intro&&Or(e.$$.fragment),Lr(e,t.target,t.anchor),k()}tt(f)}let In;typeof HTMLElement=="function"&&(In=class extends HTMLElement{constructor(t,n,r){super();se(this,"$$ctor");se(this,"$$s");se(this,"$$c");se(this,"$$cn",!1);se(this,"$$d",{});se(this,"$$r",!1);se(this,"$$p_d",{});se(this,"$$l",{});se(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 o=this.$$c.$on(t,n);this.$$l_u.set(n,o)}super.addEventListener(t,n,r)}removeEventListener(t,n,r){if(super.removeEventListener(t,n,r),this.$$c){const o=this.$$l_u.get(n);o&&(o(),this.$$l_u.delete(n))}}connectedCallback(){return It(this,null,function*(){if(this.$$cn=!0,!this.$$c){let t=function(i){return()=>{let u;return{c:function(){u=G("slot"),i!=="default"&&z(u,"name",i)},m:function(l,d){de(l,u,d)},d:function(l){l&&he(u)}}}};if(yield Promise.resolve(),!this.$$cn||this.$$c)return;const n={},r=_r(this);for(const i of this.$$s)i in r&&(n[i]=[t(i)]);for(const i of this.attributes){const u=this.$$g_p(i.name);u in this.$$d||(this.$$d[u]=pt(u,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(Mt({},this.$$d),{$$slots:n,$$scope:{ctx:[]}})});const o=()=>{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 u=pt(i,this.$$d[i],this.$$p_d,"toAttribute");u==null?this.removeAttribute(this.$$p_d[i].attribute||i):this.setAttribute(this.$$p_d[i].attribute||i,u)}this.$$r=!1};this.$$c.$$.after_update.push(o),o();for(const i in this.$$l)for(const u of this.$$l[i]){const a=this.$$c.$on(i,u);this.$$l_u.set(u,a)}this.$$l={}}})}attributeChangedCallback(t,n,r){var o;this.$$r||(t=this.$$g_p(t),this.$$d[t]=pt(t,r,this.$$p_d,"toProp"),(o=this.$$c)==null||o.$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 pt(e,t,n,r){var i;const o=(i=n[e])==null?void 0:i.type;if(t=o==="Boolean"&&typeof t!="boolean"?t!=null:t,!r||!n[e])return t;if(r==="toAttribute")switch(o){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(o){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Pr(e,t,n,r,o,i){let u=class extends In{constructor(){super(e,n,o),this.$$p_d=t}static get observedAttributes(){return Object.keys(t).map(a=>(t[a].attribute||a).toLowerCase())}};return Object.keys(t).forEach(a=>{Object.defineProperty(u.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(f){var l;f=pt(a,f,t),this.$$d[a]=f,(l=this.$$c)==null||l.$set({[a]:f})}})}),r.forEach(a=>{Object.defineProperty(u.prototype,a,{get(){var f;return(f=this.$$c)==null?void 0:f[a]}})}),e.element=u,u}class Ir{constructor(){se(this,"$$");se(this,"$$set")}$destroy(){Rr(this,1),this.$destroy=ue}$on(t,n){if(!rn(n))return ue;const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(n),()=>{const o=r.indexOf(n);o!==-1&&r.splice(o,1)}}$set(t){this.$$set&&!mr(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Dr="4";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Dr);const De="__WIDGET_GLOBAL_STYLE_CACHE__";function Fr(e,t){if(e){const n=document.createElement("style");n.innerHTML=t,e.appendChild(n)}}function Ur(e,t){if(!e||!t)return;const n=new URL(t);fetch(n.href).then(r=>r.text()).then(r=>{const o=document.createElement("style");o.innerHTML=r,e&&e.appendChild(o)}).catch(r=>{console.error("There was an error while trying to load client styling from URL",r)})}function Gr(e,t,n,r=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!r)return n=jr(e,t),n;window[De]||(window[De]={}),n=$r(e,t);const i=n.unsubscribe.bind(n),u=()=>{if(window[De][t]){const a=window[De][t];a.refCount>1?a.refCount=a.refCount-1:delete window[De][t]}i()};return n.unsubscribe=u,n}function jr(e,t){const n=document.createElement("style");return window.emMessageBus.subscribe(t,r=>{e&&(n.innerHTML=r,e.appendChild(n))})}function $r(e,t){return window.emMessageBus.subscribe(t,n=>{if(!e)return;const r=e.getRootNode(),o=window[De];let i=o[t]&&o[t].sheet;i?o[t].refCount=o[t].refCount+1:(i=new CSSStyleSheet,i.replaceSync(n),o[t]={sheet:i,refCount:1});const u=r.adoptedStyleSheets||[];u.includes(i)||(r.adoptedStyleSheets=[...u,i])})}const Pe=[];function kr(e,t){return{subscribe:_t(e,t).subscribe}}function _t(e,t=ue){let n;const r=new Set;function o(a){if(Nn(e,a)&&(e=a,n)){const f=!Pe.length;for(const l of r)l[1](),Pe.push(l,e);if(f){for(let l=0;l<Pe.length;l+=2)Pe[l][0](Pe[l+1]);Pe.length=0}}}function i(a){o(a(e))}function u(a,f=ue){const l=[a,f];return r.add(l),r.size===1&&(n=t(o,i)||ue),a(e),()=>{r.delete(l),r.size===0&&n&&(n(),n=null)}}return{set:o,update:i,subscribe:u}}function Ve(e,t,n){const r=!Array.isArray(e),o=r?[e]:e;if(!o.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const i=t.length<2;return kr(n,(u,a)=>{let f=!1;const l=[];let d=0,g=ue;const y=()=>{if(d)return;g();const B=t(r?l[0]:l,u,a);i?u(B):g=rn(B)?B:ue},_=o.map((B,P)=>Mn(B,j=>{l[P]=j,d&=~(1<<P),f&&y()},()=>{d|=1<<P}));return f=!0,y(),function(){ke(_),g(),f=!1}})}var Vr=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Xr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var zr=function(t){return Wr(t)&&!Zr(t)};function Wr(e){return!!e&&typeof e=="object"}function Zr(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||Jr(e)}var qr=typeof Symbol=="function"&&Symbol.for,Qr=qr?Symbol.for("react.element"):60103;function Jr(e){return e.$$typeof===Qr}function Yr(e){return Array.isArray(e)?[]:{}}function rt(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Ue(Yr(e),e,t):e}function Kr(e,t,n){return e.concat(t).map(function(r){return rt(r,n)})}function eo(e,t){if(!t.customMerge)return Ue;var n=t.customMerge(e);return typeof n=="function"?n:Ue}function to(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function cn(e){return Object.keys(e).concat(to(e))}function Dn(e,t){try{return t in e}catch(n){return!1}}function no(e,t){return Dn(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function ro(e,t,n){var r={};return n.isMergeableObject(e)&&cn(e).forEach(function(o){r[o]=rt(e[o],n)}),cn(t).forEach(function(o){no(e,o)||(Dn(e,o)&&n.isMergeableObject(t[o])?r[o]=eo(o,n)(e[o],t[o],n):r[o]=rt(t[o],n))}),r}function Ue(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||Kr,n.isMergeableObject=n.isMergeableObject||zr,n.cloneUnlessOtherwiseSpecified=rt;var r=Array.isArray(t),o=Array.isArray(e),i=r===o;return i?r?n.arrayMerge(e,t,n):ro(e,t,n):rt(t,n)}Ue.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,o){return Ue(r,o,n)},{})};var oo=Ue,io=oo;const ao=Xr(io);var Wt=function(e,t){return Wt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},Wt(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");Wt(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var fe=function(){return fe=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},fe.apply(this,arguments)};function so(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 o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Ft(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;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))}function Ut(e,t){var n=t&&t.cache?t.cache:mo,r=t&&t.serializer?t.serializer:fo,o=t&&t.strategy?t.strategy:ho;return o(e,{cache:n,serializer:r})}function uo(e){return e==null||typeof e=="number"||typeof e=="boolean"}function lo(e,t,n,r){var o=uo(r)?r:n(r),i=t.get(o);return typeof i=="undefined"&&(i=e.call(this,r),t.set(o,i)),i}function Fn(e,t,n){var r=Array.prototype.slice.call(arguments,3),o=n(r),i=t.get(o);return typeof i=="undefined"&&(i=e.apply(this,r),t.set(o,i)),i}function Un(e,t,n,r,o){return n.bind(t,e,r,o)}function ho(e,t){var n=e.length===1?lo:Fn;return Un(e,this,n,t.cache.create(),t.serializer)}function co(e,t){return Un(e,this,Fn,t.cache.create(),t.serializer)}var fo=function(){return JSON.stringify(arguments)},po=function(){function e(){this.cache=Object.create(null)}return e.prototype.get=function(t){return this.cache[t]},e.prototype.set=function(t,n){this.cache[t]=n},e}(),mo={create:function(){return new po}},Gt={variadic:co},vt=function(){return vt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},vt.apply(this,arguments)};var H;(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"})(H||(H={}));var D;(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"})(D||(D={}));var Ge;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Ge||(Ge={}));function fn(e){return e.type===D.literal}function go(e){return e.type===D.argument}function Gn(e){return e.type===D.number}function jn(e){return e.type===D.date}function $n(e){return e.type===D.time}function kn(e){return e.type===D.select}function Vn(e){return e.type===D.plural}function bo(e){return e.type===D.pound}function Xn(e){return e.type===D.tag}function zn(e){return!!(e&&typeof e=="object"&&e.type===Ge.number)}function Zt(e){return!!(e&&typeof e=="object"&&e.type===Ge.dateTime)}var Wn=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,yo=/(?:[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 vo(e){var t={};return e.replace(yo,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 F=function(){return F=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},F.apply(this,arguments)};var Eo=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function xo(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(Eo).filter(function(y){return y.length>0}),n=[],r=0,o=t;r<o.length;r++){var i=o[r],u=i.split("/");if(u.length===0)throw new Error("Invalid number skeleton");for(var a=u[0],f=u.slice(1),l=0,d=f;l<d.length;l++){var g=d[l];if(g.length===0)throw new Error("Invalid number skeleton")}n.push({stem:a,options:f})}return n}function _o(e){return e.replace(/^(.*?)-/,"")}var dn=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Zn=/^(@+)?(\+|#+)?[rs]?$/g,To=/(\*)(0+)|(#+)(0+)|(0+)/g,qn=/^(0+)$/;function pn(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(Zn,function(n,r,o){return typeof o!="string"?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):o==="+"?t.minimumSignificantDigits=r.length:r[0]==="#"?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+(typeof o=="string"?o.length:0)),""}),t}function Qn(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 So(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)),!qn.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function mn(e){var t={},n=Qn(e);return n||t}function Bo(e){for(var t={},n=0,r=e;n<r.length;n++){var o=r[n];switch(o.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=o.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=_o(o.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=F(F(F({},t),{notation:"scientific"}),o.options.reduce(function(f,l){return F(F({},f),mn(l))},{}));continue;case"engineering":t=F(F(F({},t),{notation:"engineering"}),o.options.reduce(function(f,l){return F(F({},f),mn(l))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(o.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(o.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");o.options[0].replace(To,function(f,l,d,g,y,_){if(l)t.minimumIntegerDigits=d.length;else{if(g&&y)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(qn.test(o.stem)){t.minimumIntegerDigits=o.stem.length;continue}if(dn.test(o.stem)){if(o.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");o.stem.replace(dn,function(f,l,d,g,y,_){return d==="*"?t.minimumFractionDigits=l.length:g&&g[0]==="#"?t.maximumFractionDigits=g.length:y&&_?(t.minimumFractionDigits=y.length,t.maximumFractionDigits=y.length+_.length):(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length),""});var i=o.options[0];i==="w"?t=F(F({},t),{trailingZeroDisplay:"stripIfInteger"}):i&&(t=F(F({},t),pn(i)));continue}if(Zn.test(o.stem)){t=F(F({},t),pn(o.stem));continue}var u=Qn(o.stem);u&&(t=F(F({},t),u));var a=So(o.stem);a&&(t=F(F({},t),a))}return t}var dt={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function wo(e,t){for(var n="",r=0;r<e.length;r++){var o=e.charAt(r);if(o==="j"){for(var i=0;r+1<e.length&&e.charAt(r+1)===o;)i++,r++;var u=1+(i&1),a=i<2?1:3+(i>>1),f="a",l=Ao(t);for((l=="H"||l=="k")&&(a=0);a-- >0;)n+=f;for(;u-- >0;)n=l+n}else o==="J"?n+="H":n+=o}return n}function Ao(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 o=dt[r||""]||dt[n||""]||dt["".concat(n,"-001")]||dt["001"];return o[0]}var jt,Co=new RegExp("^".concat(Wn.source,"*")),Ho=new RegExp("".concat(Wn.source,"*$"));function L(e,t){return{start:e,end:t}}var Oo=!!String.prototype.startsWith&&"_a".startsWith("a",1),Lo=!!String.fromCodePoint,Ro=!!Object.fromEntries,No=!!String.prototype.codePointAt,Mo=!!String.prototype.trimStart,Po=!!String.prototype.trimEnd,Io=!!Number.isSafeInteger,Do=Io?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},qt=!0;try{var Fo=Yn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");qt=((jt=Fo.exec("a"))===null||jt===void 0?void 0:jt[0])==="a"}catch(e){qt=!1}var gn=Oo?function(t,n,r){return t.startsWith(n,r)}:function(t,n,r){return t.slice(r,r+n.length)===n},Qt=Lo?String.fromCodePoint:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r="",o=t.length,i=0,u;o>i;){if(u=t[i++],u>1114111)throw RangeError(u+" is not a valid code point");r+=u<65536?String.fromCharCode(u):String.fromCharCode(((u-=65536)>>10)+55296,u%1024+56320)}return r},bn=Ro?Object.fromEntries:function(t){for(var n={},r=0,o=t;r<o.length;r++){var i=o[r],u=i[0],a=i[1];n[u]=a}return n},Jn=No?function(t,n){return t.codePointAt(n)}:function(t,n){var r=t.length;if(!(n<0||n>=r)){var o=t.charCodeAt(n),i;return o<55296||o>56319||n+1===r||(i=t.charCodeAt(n+1))<56320||i>57343?o:(o-55296<<10)+(i-56320)+65536}},Uo=Mo?function(t){return t.trimStart()}:function(t){return t.replace(Co,"")},Go=Po?function(t){return t.trimEnd()}:function(t){return t.replace(Ho,"")};function Yn(e,t){return new RegExp(e,t)}var Jt;if(qt){var yn=Yn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Jt=function(t,n){var r;yn.lastIndex=n;var o=yn.exec(t);return(r=o[1])!==null&&r!==void 0?r:""}}else Jt=function(t,n){for(var r=[];;){var o=Jn(t,n);if(o===void 0||Kn(o)||Vo(o))break;r.push(o),n+=o>=65536?2:1}return Qt.apply(void 0,r)};var jo=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 o=[];!this.isEOF();){var i=this.char();if(i===123){var u=this.parseArgument(t,r);if(u.err)return u;o.push(u.val)}else{if(i===125&&t>0)break;if(i===35&&(n==="plural"||n==="selectordinal")){var a=this.clonePosition();this.bump(),o.push({type:D.pound,location:L(a,this.clonePosition())})}else if(i===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(H.UNMATCHED_CLOSING_TAG,L(this.clonePosition(),this.clonePosition()))}else if(i===60&&!this.ignoreTag&&Yt(this.peek()||0)){var u=this.parseTag(t,n);if(u.err)return u;o.push(u.val)}else{var u=this.parseLiteral(t,n);if(u.err)return u;o.push(u.val)}}}return{val:o,err:null}},e.prototype.parseTag=function(t,n){var r=this.clonePosition();this.bump();var o=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:D.literal,value:"<".concat(o,"/>"),location:L(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(t+1,n,!0);if(i.err)return i;var u=i.val,a=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Yt(this.char()))return this.error(H.INVALID_TAG,L(a,this.clonePosition()));var f=this.clonePosition(),l=this.parseTagName();return o!==l?this.error(H.UNMATCHED_CLOSING_TAG,L(f,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:D.tag,value:o,children:u,location:L(r,this.clonePosition())},err:null}:this.error(H.INVALID_TAG,L(a,this.clonePosition())))}else return this.error(H.UNCLOSED_TAG,L(r,this.clonePosition()))}else return this.error(H.INVALID_TAG,L(r,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&ko(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var r=this.clonePosition(),o="";;){var i=this.tryParseQuote(n);if(i){o+=i;continue}var u=this.tryParseUnquoted(t,n);if(u){o+=u;continue}var a=this.tryParseLeftAngleBracket();if(a){o+=a;continue}break}var f=L(r,this.clonePosition());return{val:{type:D.literal,value:o,location:f},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!$o(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 Qt.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(),Qt(r))},e.prototype.parseArgument=function(t,n){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(H.EXPECT_ARGUMENT_CLOSING_BRACE,L(r,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(H.EMPTY_ARGUMENT,L(r,this.clonePosition()));var o=this.parseIdentifierIfPossible().value;if(!o)return this.error(H.MALFORMED_ARGUMENT,L(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(H.EXPECT_ARGUMENT_CLOSING_BRACE,L(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:D.argument,value:o,location:L(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(H.EXPECT_ARGUMENT_CLOSING_BRACE,L(r,this.clonePosition())):this.parseArgumentOptions(t,n,o,r);default:return this.error(H.MALFORMED_ARGUMENT,L(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),r=Jt(this.message,n),o=n+r.length;this.bumpTo(o);var i=this.clonePosition(),u=L(t,i);return{value:r,location:u}},e.prototype.parseArgumentOptions=function(t,n,r,o){var i,u=this.clonePosition(),a=this.parseIdentifierIfPossible().value,f=this.clonePosition();switch(a){case"":return this.error(H.EXPECT_ARGUMENT_TYPE,L(u,f));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var d=this.clonePosition(),g=this.parseSimpleArgStyleIfPossible();if(g.err)return g;var y=Go(g.val);if(y.length===0)return this.error(H.EXPECT_ARGUMENT_STYLE,L(this.clonePosition(),this.clonePosition()));var _=L(d,this.clonePosition());l={style:y,styleLocation:_}}var B=this.tryParseArgumentClose(o);if(B.err)return B;var P=L(o,this.clonePosition());if(l&&gn(l==null?void 0:l.style,"::",0)){var j=Uo(l.style.slice(2));if(a==="number"){var g=this.parseNumberSkeletonFromString(j,l.styleLocation);return g.err?g:{val:{type:D.number,value:r,location:P,style:g.val},err:null}}else{if(j.length===0)return this.error(H.EXPECT_DATE_TIME_SKELETON,P);var Z=j;this.locale&&(Z=wo(j,this.locale));var y={type:Ge.dateTime,pattern:Z,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?vo(Z):{}},U=a==="date"?D.date:D.time;return{val:{type:U,value:r,location:P,style:y},err:null}}}return{val:{type:a==="number"?D.number:a==="date"?D.date:D.time,value:r,location:P,style:(i=l==null?void 0:l.style)!==null&&i!==void 0?i:null},err:null}}case"plural":case"selectordinal":case"select":{var w=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(H.EXPECT_SELECT_ARGUMENT_OPTIONS,L(w,vt({},w)));this.bumpSpace();var C=this.parseIdentifierIfPossible(),N=0;if(a!=="select"&&C.value==="offset"){if(!this.bumpIf(":"))return this.error(H.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,L(this.clonePosition(),this.clonePosition()));this.bumpSpace();var g=this.tryParseDecimalInteger(H.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,H.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(g.err)return g;this.bumpSpace(),C=this.parseIdentifierIfPossible(),N=g.val}var M=this.tryParsePluralOrSelectOptions(t,a,n,C);if(M.err)return M;var B=this.tryParseArgumentClose(o);if(B.err)return B;var W=L(o,this.clonePosition());return a==="select"?{val:{type:D.select,value:r,options:bn(M.val),location:W},err:null}:{val:{type:D.plural,value:r,options:bn(M.val),offset:N,pluralType:a==="plural"?"cardinal":"ordinal",location:W},err:null}}default:return this.error(H.INVALID_ARGUMENT_TYPE,L(u,f))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(H.EXPECT_ARGUMENT_CLOSING_BRACE,L(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 o=this.clonePosition();if(!this.bumpUntil("'"))return this.error(H.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,L(o,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=xo(t)}catch(o){return this.error(H.INVALID_NUMBER_SKELETON,n)}return{val:{type:Ge.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?Bo(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,r,o){for(var i,u=!1,a=[],f=new Set,l=o.value,d=o.location;;){if(l.length===0){var g=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var y=this.tryParseDecimalInteger(H.EXPECT_PLURAL_ARGUMENT_SELECTOR,H.INVALID_PLURAL_ARGUMENT_SELECTOR);if(y.err)return y;d=L(g,this.clonePosition()),l=this.message.slice(g.offset,this.offset())}else break}if(f.has(l))return this.error(n==="select"?H.DUPLICATE_SELECT_ARGUMENT_SELECTOR:H.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,d);l==="other"&&(u=!0),this.bumpSpace();var _=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?H.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:H.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,L(this.clonePosition(),this.clonePosition()));var B=this.parseMessage(t+1,n,r);if(B.err)return B;var P=this.tryParseArgumentClose(_);if(P.err)return P;a.push([l,{value:B.val,location:L(_,this.clonePosition())}]),f.add(l),this.bumpSpace(),i=this.parseIdentifierIfPossible(),l=i.value,d=i.location}return a.length===0?this.error(n==="select"?H.EXPECT_SELECT_ARGUMENT_SELECTOR:H.EXPECT_PLURAL_ARGUMENT_SELECTOR,L(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!u?this.error(H.MISSING_OTHER_CLAUSE,L(this.clonePosition(),this.clonePosition())):{val:a,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var r=1,o=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var i=!1,u=0;!this.isEOF();){var a=this.char();if(a>=48&&a<=57)i=!0,u=u*10+(a-48),this.bump();else break}var f=L(o,this.clonePosition());return i?(u*=r,Do(u)?{val:u,err:null}:this.error(n,f)):this.error(t,f)},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=Jn(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(gn(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()&&Kn(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 Yt(e){return e>=97&&e<=122||e>=65&&e<=90}function $o(e){return Yt(e)||e===47}function ko(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 Kn(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Vo(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 Kt(e){e.forEach(function(t){if(delete t.location,kn(t)||Vn(t))for(var n in t.options)delete t.options[n].location,Kt(t.options[n].value);else Gn(t)&&zn(t.style)||(jn(t)||$n(t))&&Zt(t.style)?delete t.style.location:Xn(t)&&Kt(t.children)})}function Xo(e,t){t===void 0&&(t={}),t=vt({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new jo(e,t).parse();if(n.err){var r=SyntaxError(H[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||Kt(n.val),n.val}var je;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(je||(je={}));var St=function(e){Tt(t,e);function t(n,r,o){var i=e.call(this,n)||this;return i.code=r,i.originalMessage=o,i}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),vn=function(e){Tt(t,e);function t(n,r,o,i){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(o).join('", "'),'"'),je.INVALID_VALUE,i)||this}return t}(St),zo=function(e){Tt(t,e);function t(n,r,o){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),je.INVALID_VALUE,o)||this}return t}(St),Wo=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,'"'),je.MISSING_VALUE,r)||this}return t}(St),ee;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(ee||(ee={}));function Zo(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 qo(e){return typeof e=="function"}function mt(e,t,n,r,o,i,u){if(e.length===1&&fn(e[0]))return[{type:ee.literal,value:e[0].value}];for(var a=[],f=0,l=e;f<l.length;f++){var d=l[f];if(fn(d)){a.push({type:ee.literal,value:d.value});continue}if(bo(d)){typeof i=="number"&&a.push({type:ee.literal,value:n.getNumberFormat(t).format(i)});continue}var g=d.value;if(!(o&&g in o))throw new Wo(g,u);var y=o[g];if(go(d)){(!y||typeof y=="string"||typeof y=="number")&&(y=typeof y=="string"||typeof y=="number"?String(y):""),a.push({type:typeof y=="string"?ee.literal:ee.object,value:y});continue}if(jn(d)){var _=typeof d.style=="string"?r.date[d.style]:Zt(d.style)?d.style.parsedOptions:void 0;a.push({type:ee.literal,value:n.getDateTimeFormat(t,_).format(y)});continue}if($n(d)){var _=typeof d.style=="string"?r.time[d.style]:Zt(d.style)?d.style.parsedOptions:r.time.medium;a.push({type:ee.literal,value:n.getDateTimeFormat(t,_).format(y)});continue}if(Gn(d)){var _=typeof d.style=="string"?r.number[d.style]:zn(d.style)?d.style.parsedOptions:void 0;_&&_.scale&&(y=y*(_.scale||1)),a.push({type:ee.literal,value:n.getNumberFormat(t,_).format(y)});continue}if(Xn(d)){var B=d.children,P=d.value,j=o[P];if(!qo(j))throw new zo(P,"function",u);var Z=mt(B,t,n,r,o,i),U=j(Z.map(function(N){return N.value}));Array.isArray(U)||(U=[U]),a.push.apply(a,U.map(function(N){return{type:typeof N=="string"?ee.literal:ee.object,value:N}}))}if(kn(d)){var w=d.options[y]||d.options.other;if(!w)throw new vn(d.value,y,Object.keys(d.options),u);a.push.apply(a,mt(w.value,t,n,r,o));continue}if(Vn(d)){var w=d.options["=".concat(y)];if(!w){if(!Intl.PluralRules)throw new St(`Intl.PluralRules is not available in this environment.
|
|
2
|
-
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
3
|
-
`,je.MISSING_INTL_API,u);var C=n.getPluralRules(t,{type:d.pluralType}).select(y-(d.offset||0));w=d.options[C]||d.options.other}if(!w)throw new vn(d.value,y,Object.keys(d.options),u);a.push.apply(a,mt(w.value,t,n,r,o,y-(d.offset||0)));continue}}return Zo(a)}function Qo(e,t){return t?fe(fe(fe({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=fe(fe({},e[r]),t[r]||{}),n},{})):e}function Jo(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=Qo(e[r],t[r]),n},fe({},e)):e}function $t(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function Yo(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Ut(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,Ft([void 0],n,!1)))},{cache:$t(e.number),strategy:Gt.variadic}),getDateTimeFormat:Ut(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,Ft([void 0],n,!1)))},{cache:$t(e.dateTime),strategy:Gt.variadic}),getPluralRules:Ut(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,Ft([void 0],n,!1)))},{cache:$t(e.pluralRules),strategy:Gt.variadic})}}var Ko=function(){function e(t,n,r,o){n===void 0&&(n=e.defaultLocale);var i=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(f){var l=i.formatToParts(f);if(l.length===1)return l[0].value;var d=l.reduce(function(g,y){return!g.length||y.type!==ee.literal||typeof g[g.length-1]!="string"?g.push(y.value):g[g.length-1]+=y.value,g},[]);return d.length<=1?d[0]||"":d},this.formatToParts=function(f){return mt(i.ast,i.locales,i.formatters,i.formats,f,void 0,i.message)},this.resolvedOptions=function(){var f;return{locale:((f=i.resolvedLocale)===null||f===void 0?void 0:f.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 u=o||{};u.formatters;var a=so(u,["formatters"]);this.ast=e.__parse(t,fe(fe({},a),{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=Jo(e.formats,r),this.formatters=o&&o.formatters||Yo(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=Xo,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 ei(e,t){if(t==null)return;if(t in e)return e[t];const n=t.split(".");let r=e;for(let o=0;o<n.length;o++)if(typeof r=="object"){if(o>0){const i=n.slice(o,n.length).join(".");if(i in r){r=r[i];break}}r=r[n[o]]}else r=void 0;return r}const we={},ti=(e,t,n)=>n&&(t in we||(we[t]={}),e in we[t]||(we[t][e]=n),n),er=(e,t)=>{if(t==null)return;if(t in we&&e in we[t])return we[t][e];const n=Bt(t);for(let r=0;r<n.length;r++){const o=n[r],i=ri(o,e);if(i)return ti(e,t,i)}};let on;const it=_t({});function ni(e){return on[e]||null}function tr(e){return e in on}function ri(e,t){if(!tr(e))return null;const n=ni(e);return ei(n,t)}function oi(e){if(e==null)return;const t=Bt(e);for(let n=0;n<t.length;n++){const r=t[n];if(tr(r))return r}}function nr(e,...t){delete we[e],it.update(n=>(n[e]=ao.all([n[e]||{},...t]),n))}Ve([it],([e])=>Object.keys(e));it.subscribe(e=>on=e);const gt={};function ii(e,t){gt[e].delete(t),gt[e].size===0&&delete gt[e]}function rr(e){return gt[e]}function ai(e){return Bt(e).map(t=>{const n=rr(t);return[t,n?[...n]:[]]}).filter(([,t])=>t.length>0)}function en(e){return e==null?!1:Bt(e).some(t=>{var n;return(n=rr(t))==null?void 0:n.size})}function si(e,t){return Promise.all(t.map(r=>(ii(e,r),r().then(o=>o.default||o)))).then(r=>nr(e,...r))}const et={};function or(e){if(!en(e))return e in et?et[e]:Promise.resolve();const t=ai(e);return et[e]=Promise.all(t.map(([n,r])=>si(n,r))).then(()=>{if(en(e))return or(e);delete et[e]}),et[e]}const ui={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"}}},li={fallbackLocale:null,loadingDelay:200,formats:ui,warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0},hi=li;function $e(){return hi}const kt=_t(!1);var ci=Object.defineProperty,fi=Object.defineProperties,di=Object.getOwnPropertyDescriptors,En=Object.getOwnPropertySymbols,pi=Object.prototype.hasOwnProperty,mi=Object.prototype.propertyIsEnumerable,xn=(e,t,n)=>t in e?ci(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gi=(e,t)=>{for(var n in t||(t={}))pi.call(t,n)&&xn(e,n,t[n]);if(En)for(var n of En(t))mi.call(t,n)&&xn(e,n,t[n]);return e},bi=(e,t)=>fi(e,di(t));let tn;const Et=_t(null);function _n(e){return e.split("-").map((t,n,r)=>r.slice(0,n+1).join("-")).reverse()}function Bt(e,t=$e().fallbackLocale){const n=_n(e);return t?[...new Set([...n,..._n(t)])]:n}function Oe(){return tn!=null?tn:void 0}Et.subscribe(e=>{tn=e!=null?e:void 0,typeof window!="undefined"&&e!=null&&document.documentElement.setAttribute("lang",e)});const yi=e=>{if(e&&oi(e)&&en(e)){const{loadingDelay:t}=$e();let n;return typeof window!="undefined"&&Oe()!=null&&t?n=window.setTimeout(()=>kt.set(!0),t):kt.set(!0),or(e).then(()=>{Et.set(e)}).finally(()=>{clearTimeout(n),kt.set(!1)})}return Et.set(e)},Xe=bi(gi({},Et),{set:yi}),wt=e=>{const t=Object.create(null);return r=>{const o=JSON.stringify(r);return o in t?t[o]:t[o]=e(r)}};var vi=Object.defineProperty,xt=Object.getOwnPropertySymbols,ir=Object.prototype.hasOwnProperty,ar=Object.prototype.propertyIsEnumerable,Tn=(e,t,n)=>t in e?vi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,an=(e,t)=>{for(var n in t||(t={}))ir.call(t,n)&&Tn(e,n,t[n]);if(xt)for(var n of xt(t))ar.call(t,n)&&Tn(e,n,t[n]);return e},ze=(e,t)=>{var n={};for(var r in e)ir.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&&ar.call(e,r)&&(n[r]=e[r]);return n};const ot=(e,t)=>{const{formats:n}=$e();if(e in n&&t in n[e])return n[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},Ei=wt(e=>{var t=e,{locale:n,format:r}=t,o=ze(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return r&&(o=ot("number",r)),new Intl.NumberFormat(n,o)}),xi=wt(e=>{var t=e,{locale:n,format:r}=t,o=ze(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return r?o=ot("date",r):Object.keys(o).length===0&&(o=ot("date","short")),new Intl.DateTimeFormat(n,o)}),_i=wt(e=>{var t=e,{locale:n,format:r}=t,o=ze(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return r?o=ot("time",r):Object.keys(o).length===0&&(o=ot("time","short")),new Intl.DateTimeFormat(n,o)}),Ti=(e={})=>{var t=e,{locale:n=Oe()}=t,r=ze(t,["locale"]);return Ei(an({locale:n},r))},Si=(e={})=>{var t=e,{locale:n=Oe()}=t,r=ze(t,["locale"]);return xi(an({locale:n},r))},Bi=(e={})=>{var t=e,{locale:n=Oe()}=t,r=ze(t,["locale"]);return _i(an({locale:n},r))},wi=wt((e,t=Oe())=>new Ko(e,t,$e().formats,{ignoreTag:$e().ignoreTag})),Ai=(e,t={})=>{var n,r,o,i;let u=t;typeof e=="object"&&(u=e,e=u.id);const{values:a,locale:f=Oe(),default:l}=u;if(f==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let d=er(e,f);if(!d)d=(i=(o=(r=(n=$e()).handleMissingMessage)==null?void 0:r.call(n,{locale:f,id:e,defaultValue:l}))!=null?o:l)!=null?i:e;else if(typeof d!="string")return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof d}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),d;if(!a)return d;let g=d;try{g=wi(d,f).format(a)}catch(y){y instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,y.message)}return g},Ci=(e,t)=>Bi(t).format(e),Hi=(e,t)=>Si(t).format(e),Oi=(e,t)=>Ti(t).format(e),Li=(e,t=Oe())=>er(e,t),Ri=Ve([Xe,it],()=>Ai);Ve([Xe],()=>Ci);Ve([Xe],()=>Hi);Ve([Xe],()=>Oi);Ve([Xe,it],()=>Li);function Sn(e,t){nr(e,t)}function Ni(e){Xe.set(e)}const Bn={en:{Title:"Your Balance",Total:"Total Balance",Real:"Cash Balance",Bonus:"Bonus Balance",Credit:"Credit Balance",Casino:"Casino",Sports:"Sports",DepositButton:"Deposit",Loading:"Loading ..."},"zh-hk":{Title:"您的結餘",Total:"總結餘",Real:"現金結餘",Bonus:"紅利結餘",Credit:"信用結餘",Casino:"賭場",Sports:"體育",DepositButton:"存款",Loading:"載入中 ..."},de:{Title:"Ihr Guthaben",Total:"Gesamtguthaben",Real:"Barguthaben",Bonus:"Bonusguthaben",Credit:"Kreditguthaben",Casino:"Casino",Sports:"Sport",DepositButton:"Einzahlen",Loading:"Wird geladen ..."},it:{Title:"Il tuo saldo",Total:"Saldo totale",Real:"Saldo in contanti",Bonus:"Saldo bonus",Credit:"Saldo di credito",Casino:"Casinò",Sports:"Sport",DepositButton:"Deposita",Loading:"Caricamento ..."},fr:{Title:"Votre solde",Total:"Solde total",Real:"Solde en espèces",Bonus:"Solde bonus",Credit:"Solde de crédit",Casino:"Casino",Sports:"Sports",DepositButton:"Dépôt",Loading:"Chargement ..."},es:{Title:"Tu saldo",Total:"Saldo total",Real:"Saldo en efectivo",Bonus:"Saldo de bono",Credit:"Saldo de crédito",Casino:"Casino",Sports:"Deportes",DepositButton:"Depósito",Loading:"Cargando ..."},tr:{Title:"Bakiyeniz",Total:"Toplam Bakiye",Real:"Nakit Bakiye",Bonus:"Bonus Bakiyesi",Credit:"Kredi Bakiyesi",Casino:"Kumarhane",Sports:"Spor",DepositButton:"Yatır",Loading:"Yükleniyor ..."},ru:{Title:"Ваш баланс",Total:"Общий баланс",Real:"Денежный баланс",Bonus:"Бонусный баланс",Credit:"Кредитный баланс",Casino:"Казино",Sports:"Спорт",DepositButton:"Депозит",Loading:"Загружается ..."},ro:{Title:"Soldul tău",Total:"Sold total",Real:"Sold în numerar",Bonus:"Sold bonus",Credit:"Sold credit",Casino:"Cazinou",Sports:"Sporturi",DepositButton:"Depozit",Loading:"Se încarcă ..."},hr:{Title:"Vaš saldo",Total:"Ukupni saldo",Real:"Gotovinski saldo",Bonus:"Bonus saldo",Credit:"Kreditni saldo",Casino:"Casino",Sports:"Sportovi",DepositButton:"Depozit",Loading:"Učitavanje ..."},hu:{Title:"Az egyenleged",Total:"Teljes egyenleg",Real:"Készpénz egyenleg",Bonus:"Bónusz egyenleg",Credit:"Hitel egyenleg",Casino:"Kaszinó",Sports:"Sport",DepositButton:"Befizetés",Loading:"Betöltés ..."},pl:{Title:"Twoje saldo",Total:"Całkowite saldo",Real:"Saldo gotówkowe",Bonus:"Saldo bonusowe",Credit:"Saldo kredytowe",Casino:"Kasyno",Sports:"Sport",DepositButton:"Wpłać",Loading:"Ładowanie ..."},pt:{Title:"Seu Saldo",Total:"Saldo Total",Real:"Saldo em Dinheiro",Bonus:"Saldo de Bônus",Credit:"Saldo de Crédito",Casino:"Cassino",Sports:"Esportes",DepositButton:"Depositar",Loading:"Carregando ..."},sl:{Title:"Vaš saldo",Total:"Skupni saldo",Real:"Gotovinski saldo",Bonus:"Bonus saldo",Credit:"Kreditni saldo",Casino:"Kasino",Sports:"Šport",DepositButton:"Depozit",Loading:"Nalaganje ..."},sr:{Title:"Vaš saldo",Total:"Ukupan saldo",Real:"Gotovinski saldo",Bonus:"Bonus saldo",Credit:"Kreditni saldo",Casino:"Kasino",Sports:"Sport",DepositButton:"Depozit",Loading:"Učitavanje ..."},"pt-br":{Title:"Seu Saldo",Total:"Saldo Total",Real:"Saldo em Dinheiro",Bonus:"Saldo de Bônus",Credit:"Saldo de Crédito",Casino:"Cassino",Sports:"Esportes",DepositButton:"Depositar",Loading:"Carregando ..."},"es-mx":{Title:"Tu saldo",Total:"Saldo total",Real:"Saldo en efectivo",Bonus:"Saldo de bono",Credit:"Saldo de crédito",Casino:"Casino",Sports:"Deportes",DepositButton:"Depósito",Loading:"Cargando ..."},"en-us":{Title:"Your Balance",Total:"Total Balance",Real:"Cash Balance",Bonus:"Bonus Balance",Credit:"Credit Balance",Casino:"Casino",Sports:"Sports",DepositButton:"Deposit",Loading:"Loading ..."}};var nn={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,o=n.clearTimeout,i=n.XMLHttpRequest,u=n.XDomainRequest,a=n.ActiveXObject,f=n.EventSource,l=n.document,d=n.Promise,g=n.fetch,y=n.Response,_=n.TextDecoder,B=n.TextEncoder,P=n.AbortController;if(typeof window!="undefined"&&typeof l!="undefined"&&!("readyState"in l)&&l.body==null&&(l.readyState="loading",window.addEventListener("load",function(h){l.readyState="complete"},!1)),i==null&&a!=null&&(i=function(){return new a("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(h){function v(){}return v.prototype=h,new v}),Date.now||(Date.now=function(){return new Date().getTime()}),P==null){var j=g;g=function(h,v){var s=v.signal;return j(h,{headers:v.headers,credentials:v.credentials,cache:v.cache}).then(function(c){var p=c.body.getReader();return s._reader=p,s._aborted&&s._reader.cancel(),{status:c.status,statusText:c.statusText,headers:c.headers,body:{getReader:function(){return p}}}})},P=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function Z(){this.bitsNeeded=0,this.codePoint=0}Z.prototype.decode=function(h){function v(A,O,T){if(T===1)return A>=128>>O&&A<<O<=2047;if(T===2)return A>=2048>>O&&A<<O<=55295||A>=57344>>O&&A<<O<=65535;if(T===3)return A>=65536>>O&&A<<O<=1114111;throw new Error}function s(A,O){if(A===6*1)return O>>6>15?3:O>31?2:1;if(A===6*2)return O>15?3:2;if(A===6*3)return 3;throw new Error}for(var c=65533,p="",m=this.bitsNeeded,E=this.codePoint,S=0;S<h.length;S+=1){var b=h[S];m!==0&&(b<128||b>191||!v(E<<6|b&63,m-6,s(m,E)))&&(m=0,E=c,p+=String.fromCharCode(E)),m===0?(b>=0&&b<=127?(m=0,E=b):b>=192&&b<=223?(m=6*1,E=b&31):b>=224&&b<=239?(m=6*2,E=b&15):b>=240&&b<=247?(m=6*3,E=b&7):(m=0,E=c),m!==0&&!v(E,m,s(m,E))&&(m=0,E=c)):(m-=6,E=E<<6|b&63),m===0&&(E<=65535?p+=String.fromCharCode(E):(p+=String.fromCharCode(55296+(E-65535-1>>10)),p+=String.fromCharCode(56320+(E-65535-1&1023))))}return this.bitsNeeded=m,this.codePoint=E,p};var U=function(){try{return new _().decode(new B().encode("test"),{stream:!0})==="test"}catch(h){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+h)}return!1};(_==null||B==null||!U())&&(_=Z);var w=function(){};function C(h){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=w,this.onload=w,this.onerror=w,this.onreadystatechange=w,this._contentType="",this._xhr=h,this._sendTimeout=0,this._abort=w}C.prototype.open=function(h,v){this._abort(!0);var s=this,c=this._xhr,p=1,m=0;this._abort=function(T){s._sendTimeout!==0&&(o(s._sendTimeout),s._sendTimeout=0),(p===1||p===2||p===3)&&(p=4,c.onload=w,c.onerror=w,c.onabort=w,c.onprogress=w,c.onreadystatechange=w,c.abort(),m!==0&&(o(m),m=0),T||(s.readyState=4,s.onabort(null),s.onreadystatechange())),p=0};var E=function(){if(p===1){var T=0,I="",Q=void 0;if("contentType"in c)T=200,I="OK",Q=c.contentType;else try{T=c.status,I=c.statusText,Q=c.getResponseHeader("Content-Type")}catch(Ye){T=0,I="",Q=void 0}T!==0&&(p=2,s.readyState=2,s.status=T,s.statusText=I,s._contentType=Q,s.onreadystatechange())}},S=function(){if(E(),p===2||p===3){p=3;var T="";try{T=c.responseText}catch(I){}s.readyState=3,s.responseText=T,s.onprogress()}},b=function(T,I){if((I==null||I.preventDefault==null)&&(I={preventDefault:w}),S(),p===1||p===2||p===3){if(p=4,m!==0&&(o(m),m=0),s.readyState=4,T==="load")s.onload(I);else if(T==="error")s.onerror(I);else if(T==="abort")s.onabort(I);else throw new TypeError;s.onreadystatechange()}},A=function(T){c!=null&&(c.readyState===4?(!("onload"in c)||!("onerror"in c)||!("onabort"in c))&&b(c.responseText===""?"error":"load",T):c.readyState===3?"onprogress"in c||S():c.readyState===2&&E())},O=function(){m=r(function(){O()},500),c.readyState===3&&S()};"onload"in c&&(c.onload=function(T){b("load",T)}),"onerror"in c&&(c.onerror=function(T){b("error",T)}),"onabort"in c&&(c.onabort=function(T){b("abort",T)}),"onprogress"in c&&(c.onprogress=S),"onreadystatechange"in c&&(c.onreadystatechange=function(T){A(T)}),("contentType"in c||!("ontimeout"in i.prototype))&&(v+=(v.indexOf("?")===-1?"?":"&")+"padding=true"),c.open(h,v,!0),"readyState"in c&&(m=r(function(){O()},0))},C.prototype.abort=function(){this._abort(!1)},C.prototype.getResponseHeader=function(h){return this._contentType},C.prototype.setRequestHeader=function(h,v){var s=this._xhr;"setRequestHeader"in s&&s.setRequestHeader(h,v)},C.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},C.prototype.send=function(){if((!("ontimeout"in i.prototype)||!("sendAsBinary"in i.prototype)&&!("mozAnon"in i.prototype))&&l!=null&&l.readyState!=null&&l.readyState!=="complete"){var h=this;h._sendTimeout=r(function(){h._sendTimeout=0,h.send()},4);return}var v=this._xhr;"withCredentials"in v&&(v.withCredentials=this.withCredentials);try{v.send(void 0)}catch(s){throw s}};function N(h){return h.replace(/[A-Z]/g,function(v){return String.fromCharCode(v.charCodeAt(0)+32)})}function M(h){for(var v=Object.create(null),s=h.split(`\r
|
|
8
|
-
`),c=0;c<s.length;c+=1){var p=s[c],m=p.split(": "),E=m.shift(),S=m.join(": ");v[N(E)]=S}this._map=v}M.prototype.get=function(h){return this._map[N(h)]},i!=null&&i.HEADERS_RECEIVED==null&&(i.HEADERS_RECEIVED=2);function W(){}W.prototype.open=function(h,v,s,c,p,m,E){h.open("GET",p);var S=0;h.onprogress=function(){var A=h.responseText,O=A.slice(S);S+=O.length,s(O)},h.onerror=function(A){A.preventDefault(),c(new Error("NetworkError"))},h.onload=function(){c(null)},h.onabort=function(){c(null)},h.onreadystatechange=function(){if(h.readyState===i.HEADERS_RECEIVED){var A=h.status,O=h.statusText,T=h.getResponseHeader("Content-Type"),I=h.getAllResponseHeaders();v(A,O,T,new M(I))}},h.withCredentials=m;for(var b in E)Object.prototype.hasOwnProperty.call(E,b)&&h.setRequestHeader(b,E[b]);return h.send(),h};function Ee(h){this._headers=h}Ee.prototype.get=function(h){return this._headers.get(h)};function xe(){}xe.prototype.open=function(h,v,s,c,p,m,E){var S=null,b=new P,A=b.signal,O=new _;return g(p,{headers:E,credentials:m?"include":"same-origin",signal:A,cache:"no-store"}).then(function(T){return S=T.body.getReader(),v(T.status,T.statusText,T.headers.get("Content-Type"),new Ee(T.headers)),new d(function(I,Q){var Ye=function(){S.read().then(function(ne){if(ne.done)I(void 0);else{var J=O.decode(ne.value,{stream:!0});s(J),Ye()}}).catch(function(ne){Q(ne)})};Ye()})}).catch(function(T){if(T.name!=="AbortError")return T}).then(function(T){c(T)}),{abort:function(){S!=null&&S.cancel(),b.abort()}}};function ie(){this._listeners=Object.create(null)}function pe(h){r(function(){throw h},0)}ie.prototype.dispatchEvent=function(h){h.target=this;var v=this._listeners[h.type];if(v!=null)for(var s=v.length,c=0;c<s;c+=1){var p=v[c];try{typeof p.handleEvent=="function"?p.handleEvent(h):p.call(this,h)}catch(m){pe(m)}}},ie.prototype.addEventListener=function(h,v){h=String(h);var s=this._listeners,c=s[h];c==null&&(c=[],s[h]=c);for(var p=!1,m=0;m<c.length;m+=1)c[m]===v&&(p=!0);p||c.push(v)},ie.prototype.removeEventListener=function(h,v){h=String(h);var s=this._listeners,c=s[h];if(c!=null){for(var p=[],m=0;m<c.length;m+=1)c[m]!==v&&p.push(c[m]);p.length===0?delete s[h]:s[h]=p}};function q(h){this.type=h,this.target=void 0}function _e(h,v){q.call(this,h),this.data=v.data,this.lastEventId=v.lastEventId}_e.prototype=Object.create(q.prototype);function x(h,v){q.call(this,h),this.status=v.status,this.statusText=v.statusText,this.headers=v.headers}x.prototype=Object.create(q.prototype);function Te(h,v){q.call(this,h),this.error=v.error}Te.prototype=Object.create(q.prototype);var We=-1,ce=0,Se=1,Ae=2,Ze=-1,ae=0,Le=1,at=2,qe=3,st=/^text\/event\-stream(;.*)?$/i,At=1e3,ut=18e6,Qe=function(h,v){var s=h==null?v:parseInt(h,10);return s!==s&&(s=v),Je(s)},Je=function(h){return Math.min(Math.max(h,At),ut)},Be=function(h,v,s){try{typeof v=="function"&&v.call(h,s)}catch(c){pe(c)}};function te(h,v){ie.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,Ht(this,h,v)}function lt(){return i!=null&&"withCredentials"in i.prototype||u==null?new i:new u}var Ct=g!=null&&y!=null&&"body"in y.prototype;function Ht(h,v,s){v=String(v);var c=!!s.withCredentials,p=s.lastEventIdQueryParameterName||"lastEventId",m=Je(1e3),E=Qe(s.heartbeatTimeout,45e3),S="",b=m,A=!1,O=0,T=s.headers||{},I=s.Transport,Q=Ct&&I==null?void 0:new C(I!=null?new I:lt()),Ye=I!=null&&typeof I!="string"?new I:Q==null?new xe:new W,ne=void 0,J=0,le=We,Re="",ct="",me="",ft="",Y=ae,Ot=0,Ce=0,ur=function(V,$,re,oe){if(le===ce)if(V===200&&re!=null&&st.test(re)){le=Se,A=Date.now(),b=m,h.readyState=Se;var K=new x("open",{status:V,statusText:$,headers:oe});h.dispatchEvent(K),Be(h,h.onopen,K)}else{var X="";V!==200?($&&($=$.replace(/\s+/g," ")),X="EventSource's response has a status "+V+" "+$+" that is not 200. Aborting the connection."):X="EventSource's response has a Content-Type specifying an unsupported type: "+(re==null?"-":re.replace(/\s+/g," "))+". Aborting the connection.",Lt();var K=new x("error",{status:V,statusText:$,headers:oe});h.dispatchEvent(K),Be(h,h.onerror,K),console.error(X)}},lr=function(V){if(le===Se){for(var $=-1,re=0;re<V.length;re+=1){var oe=V.charCodeAt(re);(oe===10||oe===13)&&($=re)}var K=($!==-1?ft:"")+V.slice(0,$+1);ft=($===-1?ft:"")+V.slice($+1),V!==""&&(A=Date.now(),O+=V.length);for(var X=0;X<K.length;X+=1){var oe=K.charCodeAt(X);if(Y===Ze&&oe===10)Y=ae;else if(Y===Ze&&(Y=ae),oe===13||oe===10){if(Y!==ae){Y===Le&&(Ce=X+1);var ge=K.slice(Ot,Ce-1),be=K.slice(Ce+(Ce<X&&K.charCodeAt(Ce)===32?1:0),X);ge==="data"?(Re+=`
|
|
9
|
-
`,Re+=be):ge==="id"?ct=be:ge==="event"?me=be:ge==="retry"?(m=Qe(be,m),b=m):ge==="heartbeatTimeout"&&(E=Qe(be,E),J!==0&&(o(J),J=r(function(){Ke()},E)))}if(Y===ae){if(Re!==""){S=ct,me===""&&(me="message");var Ne=new _e(me,{data:Re.slice(1),lastEventId:ct});if(h.dispatchEvent(Ne),me==="open"?Be(h,h.onopen,Ne):me==="message"?Be(h,h.onmessage,Ne):me==="error"&&Be(h,h.onerror,Ne),le===Ae)return}Re="",me=""}Y=oe===13?Ze:ae}else Y===ae&&(Ot=X,Y=Le),Y===Le?oe===58&&(Ce=X+1,Y=at):Y===at&&(Y=qe)}}},sn=function(V){if(le===Se||le===ce){le=We,J!==0&&(o(J),J=0),J=r(function(){Ke()},b),b=Je(Math.min(m*16,b*2)),h.readyState=ce;var $=new Te("error",{error:V});h.dispatchEvent($),Be(h,h.onerror,$),V!=null&&console.error(V)}},Lt=function(){le=Ae,ne!=null&&(ne.abort(),ne=void 0),J!==0&&(o(J),J=0),h.readyState=Ae},Ke=function(){if(J=0,le!==We){if(!A&&ne!=null)sn(new Error("No activity within "+E+" milliseconds. "+(le===ce?"No response received.":O+" chars received.")+" Reconnecting.")),ne!=null&&(ne.abort(),ne=void 0);else{var V=Math.max((A||Date.now())+E-Date.now(),1);A=!1,J=r(function(){Ke()},V)}return}A=!1,O=0,J=r(function(){Ke()},E),le=ce,Re="",me="",ct=S,ft="",Ot=0,Ce=0,Y=ae;var $=v;if(v.slice(0,5)!=="data:"&&v.slice(0,5)!=="blob:"&&S!==""){var re=v.indexOf("?");$=re===-1?v:v.slice(0,re+1)+v.slice(re+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(be,Ne){return Ne===p?"":be}),$+=(v.indexOf("?")===-1?"?":"&")+p+"="+encodeURIComponent(S)}var oe=h.withCredentials,K={};K.Accept="text/event-stream";var X=h.headers;if(X!=null)for(var ge in X)Object.prototype.hasOwnProperty.call(X,ge)&&(K[ge]=X[ge]);try{ne=Ye.open(Q,ur,lr,sn,$,oe,K)}catch(be){throw Lt(),be}};h.url=v,h.readyState=ce,h.withCredentials=c,h.headers=T,h._close=Lt,Ke()}te.prototype=Object.create(ie.prototype),te.prototype.CONNECTING=ce,te.prototype.OPEN=Se,te.prototype.CLOSED=Ae,te.prototype.close=function(){this._close()},te.CONNECTING=ce,te.OPEN=Se,te.CLOSED=Ae,te.prototype.withCredentials=void 0;var ht=f;i!=null&&(f==null||!("withCredentials"in f.prototype))&&(ht=te),function(h){{var v=h(t);v!==void 0&&(e.exports=v)}}(function(h){h.EventSourcePolyfill=te,h.NativeEventSource=f,h.EventSource=ht})})(typeof globalThis=="undefined"?typeof window!="undefined"?window:typeof self!="undefined"?self:Vr:globalThis)})(nn,nn.exports);var Mi=nn.exports;function Pi(e){br(e,"svelte-gv6dm2",'*,*::before,*::after{font-family:inherit}:host{font-family:inherit}input,textarea,button{font-family:inherit}p{padding:0;margin:0}.ShowBalance{position:relative}.ShowBalance .Loading{font-size:14px;white-space:nowrap;padding-right:10px}.ShowBalance .BalanceValue{font-size:14px;cursor:pointer;display:flex;flex-wrap:nowrap;white-space:nowrap;background:transparent;border:none;font:inherit;color:inherit}.ShowBalance .BalanceValue svg{width:16px}.ShowBalance .BalanceValue span{padding-left:8px}@media only screen and (max-width: 360px){.ShowBalance .BalanceValue{font-size:12px}.ShowBalance .BalanceValue svg{width:12px}}.BalanceModalWrapper{background-color:var(--emw--color-white, #FFFFFF);position:absolute;top:45px;left:50%;transform:translateX(-60%);padding:10px;box-shadow:0px 30px 30px var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));border-radius:5px;z-index:17;box-shadow:0px 5px 20px 0px #191919}.BalanceModalWrapper:before{content:"";background:var(--emw--color-white, #FFFFFF);clip-path:polygon(50% 0, 0% 100%, 100% 100%);position:absolute;top:-8px;left:60%;width:25px;height:10px;transform:translateX(-50%);z-index:1}.BalanceModalClose{position:absolute;top:5px;right:5px;width:20px;height:20px;z-index:1;cursor:pointer;font:inherit}.BalanceModalClose:before{content:"";background:var(--emw--color-secondary, var(--emw--color-secondary, #FD2839));position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(45deg)}.BalanceModalClose:after{content:"";background:var(--emw--color-secondary, var(--emw--color-secondary, #FD2839));position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(-45deg)}.BalanceModal{position:relative;width:280px}.BalanceModalHeader{display:flex;align-items:center;justify-content:center;padding:20px 0}.BalanceModalHeader .BalanceModalTitle{font-size:16px;font-weight:bold;color:var(--emw--header-contrast, var(--emw--color-contrast, #07072A))}.BalanceModalRowBoth{display:flex;flex-direction:column;gap:5px;padding:20px 0;border-bottom:1px solid var(--emw--color-gray-100, #E6E6E6)}.BalanceModalRowBoth:last-child{border-bottom:none}.BalanceModalRowBoth .BalanceModalRowLine{display:flex;width:100%;justify-content:space-between}.BalanceModalRowBoth .BalanceModalText{color:var(--emw--header-contrast, var(--emw--color-contrast, #07072A));font-size:14px;text-transform:capitalize}.BalanceModalRowBoth .BalanceModalValue{font-size:14px;font-weight:bold;color:var(--emw--header-contrast, var(--emw--color-contrast, #07072A))}.BalanceModalFooter{display:flex;align-items:center;padding:20px 0 10px}.BalanceModalFooter .BalanceModalAction{background:var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));font-size:12px;color:white;text-transform:uppercase;width:100%;border-radius:5px;border:none;padding:10px 0;cursor:pointer}.BalanceModalFooter .BalanceModalAction:hover,.BalanceModalFooter .BalanceModalActionactive{background:var(--emw--header-contrast, var(--emw--color-background, #07072A))}.ShowBalanceModalOverlay{background-color:rgba(0, 0, 0, 0.7);position:fixed;top:0;bottom:0;left:0;right:0;z-index:16}')}function wn(e,t,n){const r=e.slice();return r[51]=t[n],r}function An(e,t,n){const r=e.slice();return r[54]=t[n],r}function Ii(e){let t,n=(e[3].Total?e[5](e[3].Total[0].amount):"0")+"",r,o,i,u,a,f,l,d=e[2]&&Cn(e);return{c(){t=G("button"),r=ye(n),o=ve(),i=G("span"),i.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 11.435"><defs><style>.a{fill:var(--emw--color-white, #FFFFFF);}</style></defs><path class="a" d="M16.191,19.235l7.562-7.568a1.423,1.423,0,0,1,2.019,0,1.441,1.441,0,0,1,0,2.025L17.2,22.265a1.427,1.427,0,0,1-1.971.042L6.6,13.7a1.429,1.429,0,0,1,2.019-2.025Z" transform="translate(-6.188 -11.246)"></path></svg>',u=ve(),d&&d.c(),a=Er(),z(t,"class","BalanceValue")},m(g,y){de(g,t,y),R(t,r),R(t,o),R(t,i),de(g,u,y),d&&d.m(g,y),de(g,a,y),f||(l=bt(t,"click",e[25]),f=!0)},p(g,y){y[0]&8&&n!==(n=(g[3].Total?g[5](g[3].Total[0].amount):"0")+"")&&He(r,n),g[2]?d?d.p(g,y):(d=Cn(g),d.c(),d.m(a.parentNode,a)):d&&(d.d(1),d=null)},d(g){g&&(he(t),he(u),he(a)),d&&d.d(g),f=!1,l()}}}function Di(e){let t,n=e[4]("Loading")+"",r;return{c(){t=G("p"),r=ye(n)},m(o,i){de(o,t,i),R(t,r)},p(o,i){i[0]&16&&n!==(n=o[4]("Loading")+"")&&He(r,n)},d(o){o&&he(t)}}}function Cn(e){let t,n,r,o,i,u,a=e[4]("Title")+"",f,l,d,g,y,_,B=e[4]("DepositButton")+"",P,j,Z,U=yt(Object.keys(e[3])),w=[];for(let C=0;C<U.length;C+=1)w[C]=On(wn(e,U,C));return{c(){t=G("div"),n=G("button"),r=ve(),o=G("div"),i=G("div"),u=G("p"),f=ye(a),l=ve(),d=G("div");for(let C=0;C<w.length;C+=1)w[C].c();g=ve(),y=G("div"),_=G("button"),P=ye(B),z(n,"class","BalanceModalClose"),z(u,"class","BalanceModalTitle"),z(i,"class","BalanceModalHeader"),z(d,"class","BalanceModalBody"),z(_,"class","BalanceModalAction"),z(y,"class","BalanceModalFooter"),z(o,"class","BalanceModal"),z(t,"class","BalanceModalWrapper")},m(C,N){de(C,t,N),R(t,n),R(t,r),R(t,o),R(o,i),R(i,u),R(u,f),R(o,l),R(o,d);for(let M=0;M<w.length;M+=1)w[M]&&w[M].m(d,null);R(o,g),R(o,y),R(y,_),R(_,P),j||(Z=[bt(n,"click",e[26]),bt(_,"click",e[27])],j=!0)},p(C,N){if(N[0]&16&&a!==(a=C[4]("Title")+"")&&He(f,a),N[0]&184){U=yt(Object.keys(C[3]));let M;for(M=0;M<U.length;M+=1){const W=wn(C,U,M);w[M]?w[M].p(W,N):(w[M]=On(W),w[M].c(),w[M].m(d,null))}for(;M<w.length;M+=1)w[M].d(1);w.length=U.length}N[0]&16&&B!==(B=C[4]("DepositButton")+"")&&He(P,B)},d(C){C&&he(t),Pn(w,C),j=!1,ke(Z)}}}function Hn(e){let t,n,r=e[4](e[51])+"",o,i,u=e[7](e[54])+"",a,f,l,d,g=e[5](e[54].amount)+"",y;return{c(){t=G("div"),n=G("p"),o=ye(r),i=ve(),a=ye(u),f=ve(),l=G("p"),d=G("span"),y=ye(g),z(n,"class","BalanceModalText"),z(d,"class","BalanceModalAmount"),z(l,"class","BalanceModalValue"),z(t,"class","BalanceModalRowLine")},m(_,B){de(_,t,B),R(t,n),R(n,o),R(n,i),R(n,a),R(t,f),R(t,l),R(l,d),R(d,y)},p(_,B){B[0]&24&&r!==(r=_[4](_[51])+"")&&He(o,r),B[0]&8&&u!==(u=_[7](_[54])+"")&&He(a,u),B[0]&8&&g!==(g=_[5](_[54].amount)+"")&&He(y,g)},d(_){_&&he(t)}}}function On(e){let t,n,r=yt(e[3][e[51]]),o=[];for(let i=0;i<r.length;i+=1)o[i]=Hn(An(e,r,i));return{c(){t=G("div");for(let i=0;i<o.length;i+=1)o[i].c();n=ve(),z(t,"class","BalanceModalRowBoth")},m(i,u){de(i,t,u);for(let a=0;a<o.length;a+=1)o[a]&&o[a].m(t,null);R(t,n)},p(i,u){if(u[0]&184){r=yt(i[3][i[51]]);let a;for(a=0;a<r.length;a+=1){const f=An(i,r,a);o[a]?o[a].p(f,u):(o[a]=Hn(f),o[a].c(),o[a].m(t,n))}for(;a<o.length;a+=1)o[a].d(1);o.length=r.length}},d(i){i&&he(t),Pn(o,i)}}}function Ln(e){let t,n,r;return{c(){t=G("button"),z(t,"class","ShowBalanceModalOverlay")},m(o,i){de(o,t,i),n||(r=bt(t,"click",e[28]),n=!0)},p:ue,d(o){o&&he(t),n=!1,r()}}}function Fi(e){let t,n,r;function o(f,l){return f[1]?Di:Ii}let i=o(e),u=i(e),a=e[2]&&Ln(e);return{c(){t=G("div"),n=G("div"),u.c(),r=ve(),a&&a.c(),z(n,"class","ShowBalance")},m(f,l){de(f,t,l),R(t,n),u.m(n,null),R(t,r),a&&a.m(t,null),e[29](t)},p(f,l){i===(i=o(f))&&u?u.p(f,l):(u.d(1),u=i(f),u&&(u.c(),u.m(n,null))),f[2]?a?a.p(f,l):(a=Ln(f),a.c(),a.m(t,null)):a&&(a.d(1),a=null)},i:ue,o:ue,d(f){f&&he(t),u.d(),a&&a.d(),e[29](null)}}}function Ui(e,t,n){let r;gr(e,Ri,s=>n(4,r=s));let{userid:o=""}=t,{session:i=""}=t,{endpoint:u=""}=t,{lang:a="en"}=t,{mbsource:f=""}=t,{clientstyling:l=""}=t,{clientstylingurl:d=""}=t,{translationurl:g=""}=t,{gmversion:y="gm16"}=t,{displaybalanceoption:_="All"}=t,{totalcalculationmode:B="totalCashAmount"}=t,{hideproducttype:P=""}=t,{currencylocale:j="en"}=t,{currencydisplay:Z="symbol"}=t,{maximumfractiondigits:U="2"}=t,{minimumfractiondigits:w="0"}=t,{customdisplayformat:C=""}=t,N,M,W=!0,Ee=!1,xe=!1,ie,pe="",q=[],_e;const x={},Te=["totalCashAmount","totalRealAmount"],We=()=>{fetch(g).then(s=>s.json()).then(s=>Object.keys(s).forEach(c=>Sn(c,s[c]))).catch(s=>console.log(s))};Object.keys(Bn).forEach(s=>Sn(s,Bn[s]));const ce=s=>{if(C)return Se(s);const c=j||a,p={style:"currency",currency:pe,useGrouping:!0,currencyDisplay:Z||"code",maximumFractionDigits:U===""||isNaN(Number(U))?2:Number(U),minimumFractionDigits:w===""||isNaN(Number(w))?0:Number(w)};return new Intl.NumberFormat(c,p).format(s)},Se=s=>{const c=[];let p="";for(const m of C)switch(m){default:p+=m;break;case"{":p&&c.push(p),p="";break;case"}":const[E,S]=p.split("|");if(p="",E.toLowerCase()==="currency")p=pe;else if(E.toLowerCase()==="amount"){let b=",",A=".",O=2;S&&(S[0]!==" "&&(b=S[0]),S[1]!==" "&&(A=S[1]),S[2]!==" "&&!isNaN(Number(S[2]))&&(O=Number(S[2])));let[T,I]=String(Math.floor(s*Nt(10,O))/Nt(10,O)).split(".");p+=T[0];for(let Q=1;Q<T.length;++Q)(T.length-Q)%3===0?p+=b+T[Q]:p+=T[Q];I&&(p+=A+I)}p&&c.push(p),p="";break}return c.push(p),c.join("")},Ae=()=>It(this,null,function*(){var c,p,m;n(1,W=!0);const s=new URL(`${u}/v1/player/${o}/account`);try{const E=yield fetch(s,{method:"GET",headers:{"X-SessionID":i}}),S=yield E.json();if(E.ok)q=S.items,pe=(c=q.find(b=>b.displayName==="Casino"))==null?void 0:c.currency,n(3,x.Total=[{amount:S.totalAmount[pe]}],x),n(3,x.Real=[{amount:(p=q.find(b=>b.displayName==="Casino"))==null?void 0:p.balanceAmount}],x),n(3,x.Bonus=[{amount:(m=q.find(b=>b.displayName==="UBS"))==null?void 0:m.balanceAmount}],x);else throw new Error("Failed to fetch balance data !")}catch(E){console.log("Balance error: ",E)}finally{n(1,W=!1)}}),Ze=()=>{n(1,W=!0);const s=new URL(`${u}/v2/player/${o}/balance`),c=new Headers;c.append("X-SessionID",i),fetch(s,{method:"GET",headers:c}).then(m=>m.json()).then(m=>{m[B]||n(8,B=Te[0]);const E=m.items.find(b=>b.type==="Real"&&b.walletAccountType==="Ordinary");if(pe=E.currency,xe=!!E.productType,n(3,x.Total=[{amount:0}],x),n(3,x.Real=[],x),n(3,x.Bonus=[],x),n(3,x.Credit=[],x),!xe){_e={lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1},n(3,x.Total[0].amount=m[B][pe],x);for(const b of m.items)switch(b.type){case"Bonus":x.Bonus.length===0?x.Bonus.push({amount:b.amount}):n(3,x.Bonus[0].amount+=b.amount,x);break;case"Real":if(b.creditLine&&x.Credit.length===0&&x.Credit.push({amount:b.creditLine}),B==="totalRealAmount")continue;x.Real.length===0?x.Real.push({amount:b.amount}):n(3,x.Real[0].amount+=b.amount,x);break}for(const[b,A]of Object.entries(x))A.length<1&&delete x[b];n(1,W=!1);return}_e={Casino:{lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1},Sports:{lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1}};let S=m.items;_&&_!=="All"&&(S=m.items.filter(b=>b.productType===_));for(const b of S){let A;switch(b.type){case"Bonus":A=x.Bonus.findIndex(O=>O.productType===b.productType),A>0?n(3,x.Bonus[A].amount+=b.amount,x):x.Bonus.push({amount:b.amount,productType:b.productType});break;case"Real":b.creditLine&&x.Credit.push({amount:b.creditLine,productType:b.productType}),A=x.Real.findIndex(O=>O.productType===b.productType),A>0?n(3,x.Real[A].amount+=b.amount,x):x.Real.push({amount:b.amount,productType:b.productType});break}}st();for(const[b,A]of Object.entries(x))A.length<1&&delete x[b];window.postMessage({type:"playerBalanceInfo",balance:m},window.location.href),n(1,W=!1)}).catch(()=>{throw n(1,W=!1),new Error("Failed to fetch balance data !")})},ae=()=>{if(ie&&ie.close(),i.length<1)return;let s,c;switch(y){case"gm16":s=new URL(`${u}/v2/player/${o}/information/updates`),c=E=>At(E);break;case"gmcore":s=new URL(`${u}/v1/player/${o}/balance/updates`),c=E=>at(E);break}const p={accept:"text/event-stream","X-SessionId":i},m=new Mi.EventSourcePolyfill(s,{headers:p});ie=m,m.addEventListener("message",c)},Le=s=>{let c;try{c=JSON.parse(s)}catch(p){console.log("Balance stream failed: ",p);return}return c},at=s=>{var E,S;const c=Le(s.data);if(!c){ae();return}let p="0";const m=c.balanceChange;q=q.map(b=>(m&&m[b.id]&&(b=Pt(Mt({},b),{balanceAmount:m[b.id].afterAmount})),p=(parseFloat(b==null?void 0:b.balanceAmount)+parseFloat(p)).toString(),b)),n(3,x.Real=[{amount:(E=q[0])==null?void 0:E.balanceAmount}],x),n(3,x.Bonus=[{amount:(S=q[1])==null?void 0:S.balanceAmount}],x),n(3,x.Total=[{amount:Number(p)}],x)},qe=(s,c,p)=>{let m=null;switch(p.walletAccountType){case"Ordinary":(p.afterAmount!==p.affectedAmount||c.lastOrdinaryAfterAmount===0)&&(c.lastOrdinaryAfterAmount=p.afterAmount,c.showCreditLineAfterAmount||(m=p.afterAmount));break;case"CreditLine":p.afterAmount!==0?(m=p.afterAmount,c.showCreditLineAfterAmount=!0):(m=c.lastOrdinaryAfterAmount,c.showCreditLineAfterAmount=!1);break;default:m=p.afterAmount}return m===null?s:m},st=()=>{switch(B){case"totalCashAmount":let s=0;for(const p of["Real","Bonus"])for(const m of x[p])s+=Math.max(m.amount,0);n(3,x.Total[0].amount=s,x);break;case"totalRealAmount":if(!xe)return;let c=0;for(const p of x.Real)c+=p.amount;n(3,x.Total[0].amount=c,x)}},At=s=>{const c=Le(s.data);if(!c){ae();return}if(Qe(c==null?void 0:c.type)||c.type!=="BALANCE_UPDATE_V2")return;const p=c.body.balanceChange;for(const[m,E]of Object.entries(p))if(B==="totalRealAmount"&&m==="Real"&&!xe&&n(3,x.Total[0].amount=qe(x.Total[0].amount,_e,E),x),!!x[m])for(const S of x[m]){if(!xe){S.amount=m==="Real"?qe(S.amount,_e,E):E.afterAmount;continue}E.productType===S.productType&&(S.amount=m==="Real"?qe(S.amount,_e[S.productType],E):E.afterAmount)}st()},ut=()=>{n(2,Ee=!1),window.postMessage({type:"GoToDeposit"},window.location.href),typeof gtag=="function"&>ag("event","GoToDeposit",{context:"PlayerAccountBalanceModal"})},Qe=s=>s==="SESSION_EXPIRATION"?(window.postMessage({type:"SessionExpiration"},window.location.href),!0):!1,Je=()=>{Te.includes(B)||(console.error(`Unsupported value ('${B}') for totalcalculationmode parameter. Only the following values are supported ${Te}. Using default value ('${Te[0]}').`),n(8,B=Te[0]))},Be=s=>{const c=P.split(",").map(p=>p.trim());return!s.productType||c.includes(s.productType)?"":r(s.productType)},te=()=>{switch(Ni(a),Je(),y){case"gmcore":Ae();break;case"gm16":Ze();break;default:throw Error(`Invalid apiversion attribute: ${y}`)}},lt=s=>s.data&&s.data.type==="LogoutSuccessfull"&&ie.close();Sr(()=>(window.addEventListener("message",lt,!1),()=>{window.removeEventListener("message",lt),ie&&ie.close()}));const Ct=()=>n(2,Ee=!0),Ht=()=>n(2,Ee=!1),ht=()=>ut(),h=()=>n(2,Ee=!1);function v(s){Vt[s?"unshift":"push"](()=>{N=s,n(0,N)})}return e.$$set=s=>{"userid"in s&&n(9,o=s.userid),"session"in s&&n(10,i=s.session),"endpoint"in s&&n(11,u=s.endpoint),"lang"in s&&n(12,a=s.lang),"mbsource"in s&&n(13,f=s.mbsource),"clientstyling"in s&&n(14,l=s.clientstyling),"clientstylingurl"in s&&n(15,d=s.clientstylingurl),"translationurl"in s&&n(16,g=s.translationurl),"gmversion"in s&&n(17,y=s.gmversion),"displaybalanceoption"in s&&n(18,_=s.displaybalanceoption),"totalcalculationmode"in s&&n(8,B=s.totalcalculationmode),"hideproducttype"in s&&n(19,P=s.hideproducttype),"currencylocale"in s&&n(20,j=s.currencylocale),"currencydisplay"in s&&n(21,Z=s.currencydisplay),"maximumfractiondigits"in s&&n(22,U=s.maximumfractiondigits),"minimumfractiondigits"in s&&n(23,w=s.minimumfractiondigits),"customdisplayformat"in s&&n(24,C=s.customdisplayformat)},e.$$.update=()=>{e.$$.dirty[0]&400896&&u&&o&&i&&a&&y&&_&&te(),e.$$.dirty[0]&134656&&u&&o&&i&&y&&ae(),e.$$.dirty[0]&16385&&l&&N&&Fr(N,l),e.$$.dirty[0]&32769&&d&&N&&Ur(N,d),e.$$.dirty[0]&8193&&N&&Gr(N,`${f}.Style`,M),e.$$.dirty[0]&65536&&g&&We()},[N,W,Ee,x,r,ce,ut,Be,B,o,i,u,a,f,l,d,g,y,_,P,j,Z,U,w,C,Ct,Ht,ht,h,v]}class sr extends Ir{constructor(t){super(),Mr(this,t,Ui,Fi,Nn,{userid:9,session:10,endpoint:11,lang:12,mbsource:13,clientstyling:14,clientstylingurl:15,translationurl:16,gmversion:17,displaybalanceoption:18,totalcalculationmode:8,hideproducttype:19,currencylocale:20,currencydisplay:21,maximumfractiondigits:22,minimumfractiondigits:23,customdisplayformat:24},Pi,[-1,-1])}get userid(){return this.$$.ctx[9]}set userid(t){this.$$set({userid:t}),k()}get session(){return this.$$.ctx[10]}set session(t){this.$$set({session:t}),k()}get endpoint(){return this.$$.ctx[11]}set endpoint(t){this.$$set({endpoint:t}),k()}get lang(){return this.$$.ctx[12]}set lang(t){this.$$set({lang:t}),k()}get mbsource(){return this.$$.ctx[13]}set mbsource(t){this.$$set({mbsource:t}),k()}get clientstyling(){return this.$$.ctx[14]}set clientstyling(t){this.$$set({clientstyling:t}),k()}get clientstylingurl(){return this.$$.ctx[15]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),k()}get translationurl(){return this.$$.ctx[16]}set translationurl(t){this.$$set({translationurl:t}),k()}get gmversion(){return this.$$.ctx[17]}set gmversion(t){this.$$set({gmversion:t}),k()}get displaybalanceoption(){return this.$$.ctx[18]}set displaybalanceoption(t){this.$$set({displaybalanceoption:t}),k()}get totalcalculationmode(){return this.$$.ctx[8]}set totalcalculationmode(t){this.$$set({totalcalculationmode:t}),k()}get hideproducttype(){return this.$$.ctx[19]}set hideproducttype(t){this.$$set({hideproducttype:t}),k()}get currencylocale(){return this.$$.ctx[20]}set currencylocale(t){this.$$set({currencylocale:t}),k()}get currencydisplay(){return this.$$.ctx[21]}set currencydisplay(t){this.$$set({currencydisplay:t}),k()}get maximumfractiondigits(){return this.$$.ctx[22]}set maximumfractiondigits(t){this.$$set({maximumfractiondigits:t}),k()}get minimumfractiondigits(){return this.$$.ctx[23]}set minimumfractiondigits(t){this.$$set({minimumfractiondigits:t}),k()}get customdisplayformat(){return this.$$.ctx[24]}set customdisplayformat(t){this.$$set({customdisplayformat:t}),k()}}Pr(sr,{userid:{},session:{},endpoint:{},lang:{},mbsource:{},clientstyling:{},clientstylingurl:{},translationurl:{},gmversion:{},displaybalanceoption:{},totalcalculationmode:{},hideproducttype:{},currencylocale:{},currencydisplay:{},maximumfractiondigits:{},minimumfractiondigits:{},customdisplayformat:{}},[],[],!0);exports.default=sr;
|