@everymatrix/casino-header-controller-nd 1.72.2 → 1.73.1
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/{CasinoHeaderControllerNd-HxHgjp2M.cjs → CasinoHeaderControllerNd-BvKTqLpZ.cjs} +1 -1
- package/components/{CasinoHeaderControllerNd-UcryA1Kq.js → CasinoHeaderControllerNd-gILH6sRG.js} +484 -457
- package/components/{CasinoHeaderControllerNd-B0bAQaCY.js → CasinoHeaderControllerNd-myIAi3CY.js} +474 -447
- package/components/{PlayerAccountBalanceModalNd-ChQMG2EM.js → PlayerAccountBalanceModalNd-B8NV0aWl.js} +68 -74
- package/components/{PlayerAccountBalanceModalNd-ByFMRCSL.js → PlayerAccountBalanceModalNd-Diavvs5i.js} +67 -73
- package/components/{PlayerAccountBalanceModalNd-BxY0Gcer.cjs → PlayerAccountBalanceModalNd-FsUN0rmT.cjs} +1 -1
- package/es2015/casino-header-controller-nd.cjs +1 -1
- package/es2015/casino-header-controller-nd.js +1 -1
- package/esnext/casino-header-controller-nd.js +1 -1
- package/package.json +1 -1
|
@@ -213,7 +213,7 @@ var Ke = { exports: {} };
|
|
|
213
213
|
*/
|
|
214
214
|
(function(s, a) {
|
|
215
215
|
(function(n) {
|
|
216
|
-
var g = n.setTimeout, p = n.clearTimeout, c = n.XMLHttpRequest, w = n.XDomainRequest, h = n.ActiveXObject, b = n.EventSource, B = n.document, M = n.Promise, k = n.fetch, L = n.Response, A = n.TextDecoder, T = n.TextEncoder,
|
|
216
|
+
var g = n.setTimeout, p = n.clearTimeout, c = n.XMLHttpRequest, w = n.XDomainRequest, h = n.ActiveXObject, b = n.EventSource, B = n.document, M = n.Promise, k = n.fetch, L = n.Response, A = n.TextDecoder, T = n.TextEncoder, x = n.AbortController;
|
|
217
217
|
if (typeof window < "u" && typeof B < "u" && !("readyState" in B) && B.body == null && (B.readyState = "loading", window.addEventListener("load", function(t) {
|
|
218
218
|
B.readyState = "complete";
|
|
219
219
|
}, !1)), c == null && h != null && (c = function() {
|
|
@@ -224,7 +224,7 @@ var Ke = { exports: {} };
|
|
|
224
224
|
return l.prototype = t, new l();
|
|
225
225
|
}), Date.now || (Date.now = function() {
|
|
226
226
|
return (/* @__PURE__ */ new Date()).getTime();
|
|
227
|
-
}),
|
|
227
|
+
}), x == null) {
|
|
228
228
|
var j = k;
|
|
229
229
|
k = function(t, l) {
|
|
230
230
|
var d = l.signal;
|
|
@@ -241,7 +241,7 @@ var Ke = { exports: {} };
|
|
|
241
241
|
}
|
|
242
242
|
};
|
|
243
243
|
});
|
|
244
|
-
},
|
|
244
|
+
}, x = function() {
|
|
245
245
|
this.signal = {
|
|
246
246
|
_reader: null,
|
|
247
247
|
_aborted: !1
|
|
@@ -300,16 +300,16 @@ var Ke = { exports: {} };
|
|
|
300
300
|
};
|
|
301
301
|
var i = function() {
|
|
302
302
|
if (r === 1) {
|
|
303
|
-
var y = 0,
|
|
303
|
+
var y = 0, R = "", ne = void 0;
|
|
304
304
|
if ("contentType" in e)
|
|
305
|
-
y = 200,
|
|
305
|
+
y = 200, R = "OK", ne = e.contentType;
|
|
306
306
|
else
|
|
307
307
|
try {
|
|
308
|
-
y = e.status,
|
|
308
|
+
y = e.status, R = e.statusText, ne = e.getResponseHeader("Content-Type");
|
|
309
309
|
} catch {
|
|
310
|
-
y = 0,
|
|
310
|
+
y = 0, R = "", ne = void 0;
|
|
311
311
|
}
|
|
312
|
-
y !== 0 && (r = 2, d.readyState = 2, d.status = y, d.statusText =
|
|
312
|
+
y !== 0 && (r = 2, d.readyState = 2, d.status = y, d.statusText = R, d._contentType = ne, d.onreadystatechange());
|
|
313
313
|
}
|
|
314
314
|
}, v = function() {
|
|
315
315
|
if (i(), r === 2 || r === 3) {
|
|
@@ -321,16 +321,16 @@ var Ke = { exports: {} };
|
|
|
321
321
|
}
|
|
322
322
|
d.readyState = 3, d.responseText = y, d.onprogress();
|
|
323
323
|
}
|
|
324
|
-
}, m = function(y,
|
|
325
|
-
if ((
|
|
324
|
+
}, m = function(y, R) {
|
|
325
|
+
if ((R == null || R.preventDefault == null) && (R = {
|
|
326
326
|
preventDefault: F
|
|
327
327
|
}), v(), r === 1 || r === 2 || r === 3) {
|
|
328
328
|
if (r = 4, o !== 0 && (p(o), o = 0), d.readyState = 4, y === "load")
|
|
329
|
-
d.onload(
|
|
329
|
+
d.onload(R);
|
|
330
330
|
else if (y === "error")
|
|
331
|
-
d.onerror(
|
|
331
|
+
d.onerror(R);
|
|
332
332
|
else if (y === "abort")
|
|
333
|
-
d.onabort(
|
|
333
|
+
d.onabort(R);
|
|
334
334
|
else
|
|
335
335
|
throw new TypeError();
|
|
336
336
|
d.onreadystatechange();
|
|
@@ -410,8 +410,8 @@ var Ke = { exports: {} };
|
|
|
410
410
|
e(null);
|
|
411
411
|
}, t.onreadystatechange = function() {
|
|
412
412
|
if (t.readyState === c.HEADERS_RECEIVED) {
|
|
413
|
-
var u = t.status, S = t.statusText, y = t.getResponseHeader("Content-Type"),
|
|
414
|
-
l(u, S, y, new ce(
|
|
413
|
+
var u = t.status, S = t.statusText, y = t.getResponseHeader("Content-Type"), R = t.getAllResponseHeaders();
|
|
414
|
+
l(u, S, y, new ce(R));
|
|
415
415
|
}
|
|
416
416
|
}, t.withCredentials = o;
|
|
417
417
|
for (var m in i)
|
|
@@ -427,18 +427,18 @@ var Ke = { exports: {} };
|
|
|
427
427
|
function E() {
|
|
428
428
|
}
|
|
429
429
|
E.prototype.open = function(t, l, d, e, r, o, i) {
|
|
430
|
-
var v = null, m = new
|
|
430
|
+
var v = null, m = new x(), u = m.signal, S = new A();
|
|
431
431
|
return k(r, {
|
|
432
432
|
headers: i,
|
|
433
433
|
credentials: o ? "include" : "same-origin",
|
|
434
434
|
signal: u,
|
|
435
435
|
cache: "no-store"
|
|
436
436
|
}).then(function(y) {
|
|
437
|
-
return v = y.body.getReader(), l(y.status, y.statusText, y.headers.get("Content-Type"), new N(y.headers)), new M(function(
|
|
437
|
+
return v = y.body.getReader(), l(y.status, y.statusText, y.headers.get("Content-Type"), new N(y.headers)), new M(function(R, ne) {
|
|
438
438
|
var re = function() {
|
|
439
439
|
v.read().then(function(Q) {
|
|
440
440
|
if (Q.done)
|
|
441
|
-
|
|
441
|
+
R(void 0);
|
|
442
442
|
else {
|
|
443
443
|
var K = S.decode(Q.value, { stream: !0 });
|
|
444
444
|
d(K), re();
|
|
@@ -511,7 +511,7 @@ var Ke = { exports: {} };
|
|
|
511
511
|
P.call(this, t), this.error = l.error;
|
|
512
512
|
}
|
|
513
513
|
f.prototype = Object.create(P.prototype);
|
|
514
|
-
var ue = -1, le = 0, ae = 1, we = 2,
|
|
514
|
+
var ue = -1, le = 0, ae = 1, we = 2, xe = -1, se = 0, Re = 1, Se = 2, Le = 3, ze = /^text\/event\-stream(;.*)?$/i, Ee = 1e3, ke = 18e6, De = function(t, l) {
|
|
515
515
|
var d = t == null ? l : parseInt(t, 10);
|
|
516
516
|
return d !== d && (d = l), Ce(d);
|
|
517
517
|
}, Ce = function(t) {
|
|
@@ -532,7 +532,7 @@ var Ke = { exports: {} };
|
|
|
532
532
|
var Ve = k != null && L != null && "body" in L.prototype;
|
|
533
533
|
function Ue(t, l, d) {
|
|
534
534
|
l = String(l);
|
|
535
|
-
var e = !!d.withCredentials, r = d.lastEventIdQueryParameterName || "lastEventId", o = Ce(1e3), i = De(d.heartbeatTimeout, 45e3), v = "", m = o, u = !1, S = 0, y = d.headers || {},
|
|
535
|
+
var e = !!d.withCredentials, r = d.lastEventIdQueryParameterName || "lastEventId", o = Ce(1e3), i = De(d.heartbeatTimeout, 45e3), v = "", m = o, u = !1, S = 0, y = d.headers || {}, R = d.Transport, ne = Ve && R == null ? void 0 : new O(R != null ? new R() : Oe()), re = R != null && typeof R != "string" ? new R() : ne == null ? new E() : new X(), Q = void 0, K = 0, ie = ue, _e = "", Fe = "", fe = "", Ie = "", q = se, Pe = 0, be = 0, ot = function(V, H, Z, $) {
|
|
536
536
|
if (ie === le)
|
|
537
537
|
if (V === 200 && Z != null && ze.test(Z)) {
|
|
538
538
|
ie = ae, u = Date.now(), m = o, t.readyState = ae;
|
|
@@ -562,11 +562,11 @@ var Ke = { exports: {} };
|
|
|
562
562
|
Ie = (H === -1 ? Ie : "") + V.slice(H + 1), V !== "" && (u = Date.now(), S += V.length);
|
|
563
563
|
for (var U = 0; U < W.length; U += 1) {
|
|
564
564
|
var $ = W.charCodeAt(U);
|
|
565
|
-
if (q ===
|
|
565
|
+
if (q === xe && $ === 10)
|
|
566
566
|
q = se;
|
|
567
|
-
else if (q ===
|
|
567
|
+
else if (q === xe && (q = se), $ === 13 || $ === 10) {
|
|
568
568
|
if (q !== se) {
|
|
569
|
-
q ===
|
|
569
|
+
q === Re && (be = U + 1);
|
|
570
570
|
var pe = W.slice(Pe, be - 1), he = W.slice(be + (be < U && W.charCodeAt(be) === 32 ? 1 : 0), U);
|
|
571
571
|
pe === "data" ? (_e += `
|
|
572
572
|
`, _e += he) : pe === "id" ? Fe = he : pe === "event" ? fe = he : pe === "retry" ? (o = De(he, o), m = o) : pe === "heartbeatTimeout" && (i = De(he, i), K !== 0 && (p(K), K = g(function() {
|
|
@@ -585,9 +585,9 @@ var Ke = { exports: {} };
|
|
|
585
585
|
}
|
|
586
586
|
_e = "", fe = "";
|
|
587
587
|
}
|
|
588
|
-
q = $ === 13 ?
|
|
588
|
+
q = $ === 13 ? xe : se;
|
|
589
589
|
} else
|
|
590
|
-
q === se && (Pe = U, q =
|
|
590
|
+
q === se && (Pe = U, q = Re), q === Re ? $ === 58 && (be = U + 1, q = Se) : q === Se && (q = Le);
|
|
591
591
|
}
|
|
592
592
|
}
|
|
593
593
|
}, qe = function(V) {
|
|
@@ -662,7 +662,7 @@ function Ze(s, a, n) {
|
|
|
662
662
|
const g = s.slice();
|
|
663
663
|
return g[56] = a[n], g;
|
|
664
664
|
}
|
|
665
|
-
function
|
|
665
|
+
function xt(s) {
|
|
666
666
|
let a, n, g = (
|
|
667
667
|
/*balances*/
|
|
668
668
|
(s[1].Total ? (
|
|
@@ -681,34 +681,34 @@ function Rt(s) {
|
|
|
681
681
|
a = I("button"), n = I("p"), p = Te(g), c = ye(), w = I("span"), h = We("svg"), b = We("path"), M = ye(), T && T.c(), k = gt(), C(b, "id", "arrow"), C(b, "d", "M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z"), C(b, "transform", "translate(-274.511 -441.088)"), C(b, "fill", "#d1d1d1"), C(h, "xmlns", "http://www.w3.org/2000/svg"), C(h, "width", "14"), C(h, "height", "6.835"), C(h, "viewBox", "0 0 14 6.835"), C(w, "class", B = /*isModalDisplayed*/
|
|
682
682
|
s[3] ? "TriangleActive" : "TriangleInactive"), C(a, "class", "BalanceValue");
|
|
683
683
|
},
|
|
684
|
-
m(
|
|
685
|
-
ge(
|
|
684
|
+
m(x, j) {
|
|
685
|
+
ge(x, a, j), _(a, n), _(n, p), _(a, c), _(a, w), _(w, h), _(h, b), ge(x, M, j), T && T.m(x, j), ge(x, k, j), L || (A = je(
|
|
686
686
|
a,
|
|
687
687
|
"click",
|
|
688
688
|
/*click_handler*/
|
|
689
689
|
s[26]
|
|
690
690
|
), L = !0);
|
|
691
691
|
},
|
|
692
|
-
p(
|
|
692
|
+
p(x, j) {
|
|
693
693
|
j[0] & /*balances*/
|
|
694
694
|
2 && g !== (g = /*balances*/
|
|
695
|
-
(
|
|
695
|
+
(x[1].Total ? (
|
|
696
696
|
/*formatBalance*/
|
|
697
|
-
|
|
697
|
+
x[8](
|
|
698
698
|
/*balances*/
|
|
699
|
-
|
|
699
|
+
x[1].Total[0].amount
|
|
700
700
|
)
|
|
701
701
|
) : "0") + "") && Be(p, g), j[0] & /*isModalDisplayed*/
|
|
702
702
|
8 && B !== (B = /*isModalDisplayed*/
|
|
703
|
-
|
|
704
|
-
|
|
703
|
+
x[3] ? "TriangleActive" : "TriangleInactive") && C(w, "class", B), /*showBalance*/
|
|
704
|
+
x[4] ? T ? T.p(x, j) : (T = $e(x), T.c(), T.m(k.parentNode, k)) : T && (T.d(1), T = null);
|
|
705
705
|
},
|
|
706
|
-
d(
|
|
707
|
-
|
|
706
|
+
d(x) {
|
|
707
|
+
x && (me(a), me(M), me(k)), T && T.d(x), L = !1, A();
|
|
708
708
|
}
|
|
709
709
|
};
|
|
710
710
|
}
|
|
711
|
-
function
|
|
711
|
+
function Rt(s) {
|
|
712
712
|
let a, n = (
|
|
713
713
|
/*$_*/
|
|
714
714
|
s[6]("Loading") + ""
|
|
@@ -734,7 +734,7 @@ function $e(s) {
|
|
|
734
734
|
let a, n, g, p, c, w, h, b, B = (
|
|
735
735
|
/*$_*/
|
|
736
736
|
s[6]("Title") + ""
|
|
737
|
-
), M, k, L, A, T,
|
|
737
|
+
), M, k, L, A, T, x, j = (
|
|
738
738
|
/*$_*/
|
|
739
739
|
s[6]("DepositButton") + ""
|
|
740
740
|
), ee, te, F, O, Y, ce, X = He(Object.keys(
|
|
@@ -748,8 +748,8 @@ function $e(s) {
|
|
|
748
748
|
a = I("div"), n = I("button"), p = ye(), c = I("div"), w = I("div"), h = I("div"), b = I("p"), M = Te(B), k = ye(), L = I("div");
|
|
749
749
|
for (let E = 0; E < N.length; E += 1)
|
|
750
750
|
N[E].c();
|
|
751
|
-
A = ye(), T = I("div"),
|
|
752
|
-
(s[3] ? "Open" : "")), C(b, "class", "BalanceModalTitle"), C(h, "class", "BalanceModalHeader"), C(L, "class", "BalanceModalBody"), C(
|
|
751
|
+
A = ye(), T = I("div"), x = I("button"), ee = Te(j), C(n, "class", g = "BalanceModalClose " + /*isModalDisplayed*/
|
|
752
|
+
(s[3] ? "Open" : "")), C(b, "class", "BalanceModalTitle"), C(h, "class", "BalanceModalHeader"), C(L, "class", "BalanceModalBody"), C(x, "class", "BalanceModalAction"), C(T, "class", "BalanceModalFooter"), C(w, "class", te = "ModalContent " + /*isModalDisplayed*/
|
|
753
753
|
(s[3] ? "Open" : "")), C(c, "class", F = "BalanceModal " + /*isModalDisplayed*/
|
|
754
754
|
(s[3] ? "Open" : "")), C(a, "class", O = "BalanceModalWrapper " + /*isModalDisplayed*/
|
|
755
755
|
(s[3] ? "Open" : ""));
|
|
@@ -758,7 +758,7 @@ function $e(s) {
|
|
|
758
758
|
ge(E, a, z), _(a, n), _(a, p), _(a, c), _(c, w), _(w, h), _(h, b), _(b, M), _(w, k), _(w, L);
|
|
759
759
|
for (let D = 0; D < N.length; D += 1)
|
|
760
760
|
N[D] && N[D].m(L, null);
|
|
761
|
-
_(w, A), _(w, T), _(T,
|
|
761
|
+
_(w, A), _(w, T), _(T, x), _(x, ee), Y || (ce = [
|
|
762
762
|
je(
|
|
763
763
|
n,
|
|
764
764
|
"click",
|
|
@@ -766,7 +766,7 @@ function $e(s) {
|
|
|
766
766
|
s[27]
|
|
767
767
|
),
|
|
768
768
|
je(
|
|
769
|
-
|
|
769
|
+
x,
|
|
770
770
|
"click",
|
|
771
771
|
/*click_handler_2*/
|
|
772
772
|
s[28]
|
|
@@ -825,14 +825,11 @@ function et(s) {
|
|
|
825
825
|
)
|
|
826
826
|
) : "") + ""
|
|
827
827
|
), h, b, B, M, k = (
|
|
828
|
-
/*
|
|
829
|
-
|
|
830
|
-
/*
|
|
831
|
-
s[
|
|
832
|
-
|
|
833
|
-
s[56].amount
|
|
834
|
-
)
|
|
835
|
-
) : "0") + ""
|
|
828
|
+
/*formatBalance*/
|
|
829
|
+
s[8](
|
|
830
|
+
/*b*/
|
|
831
|
+
s[56].amount
|
|
832
|
+
) + ""
|
|
836
833
|
), L;
|
|
837
834
|
return {
|
|
838
835
|
c() {
|
|
@@ -856,14 +853,11 @@ function et(s) {
|
|
|
856
853
|
A[56].productType
|
|
857
854
|
)
|
|
858
855
|
) : "") + "") && Be(h, w), T[0] & /*balances*/
|
|
859
|
-
2 && k !== (k = /*
|
|
860
|
-
|
|
861
|
-
/*
|
|
862
|
-
A[
|
|
863
|
-
|
|
864
|
-
A[56].amount
|
|
865
|
-
)
|
|
866
|
-
) : "0") + "") && Be(L, k);
|
|
856
|
+
2 && k !== (k = /*formatBalance*/
|
|
857
|
+
A[8](
|
|
858
|
+
/*b*/
|
|
859
|
+
A[56].amount
|
|
860
|
+
) + "") && Be(L, k);
|
|
867
861
|
},
|
|
868
862
|
d(A) {
|
|
869
863
|
A && me(a);
|
|
@@ -894,7 +888,7 @@ function tt(s) {
|
|
|
894
888
|
_(a, n);
|
|
895
889
|
},
|
|
896
890
|
p(c, w) {
|
|
897
|
-
if (w[0] & /*
|
|
891
|
+
if (w[0] & /*formatBalance, balances, $_*/
|
|
898
892
|
322) {
|
|
899
893
|
g = He(
|
|
900
894
|
/*balances*/
|
|
@@ -943,7 +937,7 @@ function Et(s) {
|
|
|
943
937
|
function c(B, M) {
|
|
944
938
|
return (
|
|
945
939
|
/*isLoading*/
|
|
946
|
-
B[2] ?
|
|
940
|
+
B[2] ? Rt : xt
|
|
947
941
|
);
|
|
948
942
|
}
|
|
949
943
|
let w = c(s), h = w(s), b = (
|
|
@@ -974,7 +968,7 @@ function Et(s) {
|
|
|
974
968
|
function Dt(s, a, n) {
|
|
975
969
|
let g;
|
|
976
970
|
pt(s, St, (e) => n(6, g = e));
|
|
977
|
-
let { userid: p = "" } = a, { session: c = "" } = a, { endpoint: w = "" } = a, { lang: h = "en" } = a, { mbsource: b } = a, { clientstyling: B = "" } = a, { clientstylingurl: M = "" } = a, { translationurl: k = "" } = a, { gmversion: L = "gm16" } = a, { displaybalanceoption: A = "All" } = a, { totalcalculationmode: T = "totalCashAmount" } = a, { currencylocale:
|
|
971
|
+
let { userid: p = "" } = a, { session: c = "" } = a, { endpoint: w = "" } = a, { lang: h = "en" } = a, { mbsource: b } = a, { clientstyling: B = "" } = a, { clientstylingurl: M = "" } = a, { translationurl: k = "" } = a, { gmversion: L = "gm16" } = a, { displaybalanceoption: A = "All" } = a, { totalcalculationmode: T = "totalCashAmount" } = a, { currencylocale: x = "en" } = a, { currencydisplay: j = "symbol" } = a, { maximumfractiondigits: ee = "2" } = a, { minimumfractiondigits: te = "0" } = a, { customdisplayformat: F = "" } = a, O, Y = !0, ce = !1, X = !1, N = !1, E = !1, z = window.navigator.userAgent, D, P = "", oe = [], de;
|
|
978
972
|
const f = {}, ue = ["totalCashAmount", "totalRealAmount"], le = () => {
|
|
979
973
|
fetch(k).then((e) => e.json()).then((e) => Object.keys(e).forEach((r) => Ye(r, e[r]))).catch((e) => console.log(e));
|
|
980
974
|
};
|
|
@@ -1007,8 +1001,8 @@ function Dt(s, a, n) {
|
|
|
1007
1001
|
}
|
|
1008
1002
|
}, we = (e) => {
|
|
1009
1003
|
if (F)
|
|
1010
|
-
return
|
|
1011
|
-
const r =
|
|
1004
|
+
return xe(e);
|
|
1005
|
+
const r = x || h, o = {
|
|
1012
1006
|
style: "currency",
|
|
1013
1007
|
currency: P,
|
|
1014
1008
|
useGrouping: !0,
|
|
@@ -1017,7 +1011,7 @@ function Dt(s, a, n) {
|
|
|
1017
1011
|
minimumFractionDigits: te === "" || isNaN(Number(te)) ? 0 : Number(te)
|
|
1018
1012
|
};
|
|
1019
1013
|
return new Intl.NumberFormat(r, o).format(e);
|
|
1020
|
-
},
|
|
1014
|
+
}, xe = (e) => {
|
|
1021
1015
|
const r = [];
|
|
1022
1016
|
let o = "";
|
|
1023
1017
|
for (const i of F)
|
|
@@ -1035,10 +1029,10 @@ function Dt(s, a, n) {
|
|
|
1035
1029
|
else if (v.toLowerCase() === "amount") {
|
|
1036
1030
|
let u = ",", S = ".", y = 2;
|
|
1037
1031
|
m && (m[0] !== " " && (u = m[0]), m[1] !== " " && (S = m[1]), m[2] !== " " && !isNaN(Number(m[2])) && (y = Number(m[2])));
|
|
1038
|
-
let [
|
|
1039
|
-
o +=
|
|
1040
|
-
for (let re = 1; re <
|
|
1041
|
-
(
|
|
1032
|
+
let [R, ne] = String(Math.floor(e * 10 ** y) / 10 ** y).split(".");
|
|
1033
|
+
o += R[0];
|
|
1034
|
+
for (let re = 1; re < R.length; ++re)
|
|
1035
|
+
(R.length - re) % 3 === 0 ? o += u + R[re] : o += R[re];
|
|
1042
1036
|
ne && (o += S + ne);
|
|
1043
1037
|
}
|
|
1044
1038
|
o && r.push(o), o = "";
|
|
@@ -1078,7 +1072,7 @@ function Dt(s, a, n) {
|
|
|
1078
1072
|
} finally {
|
|
1079
1073
|
n(2, Y = !1);
|
|
1080
1074
|
}
|
|
1081
|
-
},
|
|
1075
|
+
}, Re = () => {
|
|
1082
1076
|
n(2, Y = !0);
|
|
1083
1077
|
const e = new URL(`${w}/v2/player/${p}/balance`), r = new Headers();
|
|
1084
1078
|
r.append("X-SessionID", c), fetch(e, { method: "GET", headers: r }).then((i) => i.json()).then((i) => {
|
|
@@ -1241,7 +1235,7 @@ function Dt(s, a, n) {
|
|
|
1241
1235
|
se();
|
|
1242
1236
|
break;
|
|
1243
1237
|
case "gm16":
|
|
1244
|
-
|
|
1238
|
+
Re();
|
|
1245
1239
|
break;
|
|
1246
1240
|
default:
|
|
1247
1241
|
throw Error(`Invalid apiversion attribute: ${L}`);
|
|
@@ -1252,14 +1246,14 @@ function Dt(s, a, n) {
|
|
|
1252
1246
|
ht(() => (window.addEventListener("message", Oe, !1), n(5, E = vt(z)), () => {
|
|
1253
1247
|
window.removeEventListener("message", Oe), D && D.close();
|
|
1254
1248
|
}));
|
|
1255
|
-
const Ue = () => ae("balance"), Ne = () => ae("closebalance"), t = () => Ce(), l = () => ae("
|
|
1249
|
+
const Ue = () => ae("balance"), Ne = () => ae("closebalance"), t = () => Ce(), l = () => ae("closebalance");
|
|
1256
1250
|
function d(e) {
|
|
1257
1251
|
mt[e ? "unshift" : "push"](() => {
|
|
1258
1252
|
O = e, n(0, O);
|
|
1259
1253
|
});
|
|
1260
1254
|
}
|
|
1261
1255
|
return s.$$set = (e) => {
|
|
1262
|
-
"userid" in e && n(11, p = e.userid), "session" in e && n(12, c = e.session), "endpoint" in e && n(13, w = e.endpoint), "lang" in e && n(14, h = e.lang), "mbsource" in e && n(15, b = e.mbsource), "clientstyling" in e && n(16, B = e.clientstyling), "clientstylingurl" in e && n(17, M = e.clientstylingurl), "translationurl" in e && n(18, k = e.translationurl), "gmversion" in e && n(19, L = e.gmversion), "displaybalanceoption" in e && n(20, A = e.displaybalanceoption), "totalcalculationmode" in e && n(10, T = e.totalcalculationmode), "currencylocale" in e && n(21,
|
|
1256
|
+
"userid" in e && n(11, p = e.userid), "session" in e && n(12, c = e.session), "endpoint" in e && n(13, w = e.endpoint), "lang" in e && n(14, h = e.lang), "mbsource" in e && n(15, b = e.mbsource), "clientstyling" in e && n(16, B = e.clientstyling), "clientstylingurl" in e && n(17, M = e.clientstylingurl), "translationurl" in e && n(18, k = e.translationurl), "gmversion" in e && n(19, L = e.gmversion), "displaybalanceoption" in e && n(20, A = e.displaybalanceoption), "totalcalculationmode" in e && n(10, T = e.totalcalculationmode), "currencylocale" in e && n(21, x = e.currencylocale), "currencydisplay" in e && n(22, j = e.currencydisplay), "maximumfractiondigits" in e && n(23, ee = e.maximumfractiondigits), "minimumfractiondigits" in e && n(24, te = e.minimumfractiondigits), "customdisplayformat" in e && n(25, F = e.customdisplayformat);
|
|
1263
1257
|
}, s.$$.update = () => {
|
|
1264
1258
|
s.$$.dirty[0] & /*endpoint, userid, session, lang, gmversion, displaybalanceoption*/
|
|
1265
1259
|
1603584 && w && p && c && h && L && A && J(), s.$$.dirty[0] & /*endpoint, userid, session, gmversion*/
|
|
@@ -1291,7 +1285,7 @@ function Dt(s, a, n) {
|
|
|
1291
1285
|
k,
|
|
1292
1286
|
L,
|
|
1293
1287
|
A,
|
|
1294
|
-
|
|
1288
|
+
x,
|
|
1295
1289
|
j,
|
|
1296
1290
|
ee,
|
|
1297
1291
|
te,
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* https://github.com/Yaffle/EventSource/
|
|
5
5
|
*/(function(l,a){(function(n){var y=n.setTimeout,m=n.clearTimeout,u=n.XMLHttpRequest,T=n.XDomainRequest,g=n.ActiveXObject,w=n.EventSource,B=n.document,D=n.Promise,k=n.fetch,M=n.Response,_=n.TextDecoder,S=n.TextEncoder,A=n.AbortController;if(typeof window!="undefined"&&typeof B!="undefined"&&!("readyState"in B)&&B.body==null&&(B.readyState="loading",window.addEventListener("load",function(o){B.readyState="complete"},!1)),u==null&&g!=null&&(u=function(){return new g("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(o){function d(){}return d.prototype=o,new d}),Date.now||(Date.now=function(){return new Date().getTime()}),A==null){var F=k;k=function(o,d){var f=d.signal;return F(o,{headers:d.headers,credentials:d.credentials,cache:d.cache}).then(function(t){var i=t.body.getReader();return f._reader=i,f._aborted&&f._reader.cancel(),{status:t.status,statusText:t.statusText,headers:t.headers,body:{getReader:function(){return i}}}})},A=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(o){function d(s,C,v){if(v===1)return s>=128>>C&&s<<C<=2047;if(v===2)return s>=2048>>C&&s<<C<=55295||s>=57344>>C&&s<<C<=65535;if(v===3)return s>=65536>>C&&s<<C<=1114111;throw new Error}function f(s,C){if(s===6*1)return C>>6>15?3:C>31?2:1;if(s===6*2)return C>15?3:2;if(s===6*3)return 3;throw new Error}for(var t=65533,i="",r=this.bitsNeeded,c=this.codePoint,b=0;b<o.length;b+=1){var h=o[b];r!==0&&(h<128||h>191||!d(c<<6|h&63,r-6,f(r,c)))&&(r=0,c=t,i+=String.fromCharCode(c)),r===0?(h>=0&&h<=127?(r=0,c=h):h>=192&&h<=223?(r=6*1,c=h&31):h>=224&&h<=239?(r=6*2,c=h&15):h>=240&&h<=247?(r=6*3,c=h&7):(r=0,c=t),r!==0&&!d(c,r,f(r,c))&&(r=0,c=t)):(r-=6,c=c<<6|h&63),r===0&&(c<=65535?i+=String.fromCharCode(c):(i+=String.fromCharCode(55296+(c-65535-1>>10)),i+=String.fromCharCode(56320+(c-65535-1&1023))))}return this.bitsNeeded=r,this.codePoint=c,i};var J=function(){try{return new _().decode(new S().encode("test"),{stream:!0})==="test"}catch(o){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+o)}return!1};(_==null||S==null||!J())&&(_=Z);var N=function(){};function L(o){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=N,this.onload=N,this.onerror=N,this.onreadystatechange=N,this._contentType="",this._xhr=o,this._sendTimeout=0,this._abort=N}L.prototype.open=function(o,d){this._abort(!0);var f=this,t=this._xhr,i=1,r=0;this._abort=function(v){f._sendTimeout!==0&&(m(f._sendTimeout),f._sendTimeout=0),(i===1||i===2||i===3)&&(i=4,t.onload=N,t.onerror=N,t.onabort=N,t.onprogress=N,t.onreadystatechange=N,t.abort(),r!==0&&(m(r),r=0),v||(f.readyState=4,f.onabort(null),f.onreadystatechange())),i=0};var c=function(){if(i===1){var v=0,x="",ee=void 0;if("contentType"in t)v=200,x="OK",ee=t.contentType;else try{v=t.status,x=t.statusText,ee=t.getResponseHeader("Content-Type")}catch(ae){v=0,x="",ee=void 0}v!==0&&(i=2,f.readyState=2,f.status=v,f.statusText=x,f._contentType=ee,f.onreadystatechange())}},b=function(){if(c(),i===2||i===3){i=3;var v="";try{v=t.responseText}catch(x){}f.readyState=3,f.responseText=v,f.onprogress()}},h=function(v,x){if((x==null||x.preventDefault==null)&&(x={preventDefault:N}),b(),i===1||i===2||i===3){if(i=4,r!==0&&(m(r),r=0),f.readyState=4,v==="load")f.onload(x);else if(v==="error")f.onerror(x);else if(v==="abort")f.onabort(x);else throw new TypeError;f.onreadystatechange()}},s=function(v){t!=null&&(t.readyState===4?(!("onload"in t)||!("onerror"in t)||!("onabort"in t))&&h(t.responseText===""?"error":"load",v):t.readyState===3?"onprogress"in t||b():t.readyState===2&&c())},C=function(){r=y(function(){C()},500),t.readyState===3&&b()};"onload"in t&&(t.onload=function(v){h("load",v)}),"onerror"in t&&(t.onerror=function(v){h("error",v)}),"onabort"in t&&(t.onabort=function(v){h("abort",v)}),"onprogress"in t&&(t.onprogress=b),"onreadystatechange"in t&&(t.onreadystatechange=function(v){s(v)}),("contentType"in t||!("ontimeout"in u.prototype))&&(d+=(d.indexOf("?")===-1?"?":"&")+"padding=true"),t.open(o,d,!0),"readyState"in t&&(r=y(function(){C()},0))},L.prototype.abort=function(){this._abort(!1)},L.prototype.getResponseHeader=function(o){return this._contentType},L.prototype.setRequestHeader=function(o,d){var f=this._xhr;"setRequestHeader"in f&&f.setRequestHeader(o,d)},L.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},L.prototype.send=function(){if((!("ontimeout"in u.prototype)||!("sendAsBinary"in u.prototype)&&!("mozAnon"in u.prototype))&&B!=null&&B.readyState!=null&&B.readyState!=="complete"){var o=this;o._sendTimeout=y(function(){o._sendTimeout=0,o.send()},4);return}var d=this._xhr;"withCredentials"in d&&(d.withCredentials=this.withCredentials);try{d.send(void 0)}catch(f){throw f}};function q(o){return o.replace(/[A-Z]/g,function(d){return String.fromCharCode(d.charCodeAt(0)+32)})}function ie(o){for(var d=Object.create(null),f=o.split(`\r
|
|
6
6
|
`),t=0;t<f.length;t+=1){var i=f[t],r=i.split(": "),c=r.shift(),b=r.join(": ");d[q(c)]=b}this._map=d}ie.prototype.get=function(o){return this._map[q(o)]},u!=null&&u.HEADERS_RECEIVED==null&&(u.HEADERS_RECEIVED=2);function U(){}U.prototype.open=function(o,d,f,t,i,r,c){o.open("GET",i);var b=0;o.onprogress=function(){var s=o.responseText,C=s.slice(b);b+=C.length,f(C)},o.onerror=function(s){s.preventDefault(),t(new Error("NetworkError"))},o.onload=function(){t(null)},o.onabort=function(){t(null)},o.onreadystatechange=function(){if(o.readyState===u.HEADERS_RECEIVED){var s=o.status,C=o.statusText,v=o.getResponseHeader("Content-Type"),x=o.getAllResponseHeaders();d(s,C,v,new ie(x))}},o.withCredentials=r;for(var h in c)Object.prototype.hasOwnProperty.call(c,h)&&o.setRequestHeader(h,c[h]);return o.send(),o};function O(o){this._headers=o}O.prototype.get=function(o){return this._headers.get(o)};function R(){}R.prototype.open=function(o,d,f,t,i,r,c){var b=null,h=new A,s=h.signal,C=new _;return k(i,{headers:c,credentials:r?"include":"same-origin",signal:s,cache:"no-store"}).then(function(v){return b=v.body.getReader(),d(v.status,v.statusText,v.headers.get("Content-Type"),new O(v.headers)),new D(function(x,ee){var ae=function(){b.read().then(function(W){if(W.done)x(void 0);else{var P=C.decode(W.value,{stream:!0});f(P),ae()}}).catch(function(W){ee(W)})};ae()})}).catch(function(v){if(v.name!=="AbortError")return v}).then(function(v){t(v)}),{abort:function(){b!=null&&b.cancel(),h.abort()}}};function j(){this._listeners=Object.create(null)}function E(o){y(function(){throw o},0)}j.prototype.dispatchEvent=function(o){o.target=this;var d=this._listeners[o.type];if(d!=null)for(var f=d.length,t=0;t<f;t+=1){var i=d[t];try{typeof i.handleEvent=="function"?i.handleEvent(o):i.call(this,o)}catch(r){E(r)}}},j.prototype.addEventListener=function(o,d){o=String(o);var f=this._listeners,t=f[o];t==null&&(t=[],f[o]=t);for(var i=!1,r=0;r<t.length;r+=1)t[r]===d&&(i=!0);i||t.push(d)},j.prototype.removeEventListener=function(o,d){o=String(o);var f=this._listeners,t=f[o];if(t!=null){for(var i=[],r=0;r<t.length;r+=1)t[r]!==d&&i.push(t[r]);i.length===0?delete f[o]:f[o]=i}};function V(o){this.type=o,this.target=void 0}function te(o,d){V.call(this,o),this.data=d.data,this.lastEventId=d.lastEventId}te.prototype=Object.create(V.prototype);function le(o,d){V.call(this,o),this.status=d.status,this.statusText=d.statusText,this.headers=d.headers}le.prototype=Object.create(V.prototype);function p(o,d){V.call(this,o),this.error=d.error}p.prototype=Object.create(V.prototype);var se=-1,oe=0,$=1,pe=2,we=-1,re=0,be=1,me=2,Ce=3,De=/^text\/event\-stream(;.*)?$/i,Be=1e3,_e=18e6,Te=function(o,d){var f=o==null?d:parseInt(o,10);return f!==f&&(f=d),ge(f)},ge=function(o){return Math.min(Math.max(o,Be),_e)},fe=function(o,d,f){try{typeof d=="function"&&d.call(o,f)}catch(t){E(t)}};function K(o,d){j.call(this),d=d||{},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,ke(this,o,d)}function Ae(){return u!=null&&"withCredentials"in u.prototype||T==null?new u:new T}var Me=k!=null&&M!=null&&"body"in M.prototype;function ke(o,d,f){d=String(d);var t=!!f.withCredentials,i=f.lastEventIdQueryParameterName||"lastEventId",r=ge(1e3),c=Te(f.heartbeatTimeout,45e3),b="",h=r,s=!1,C=0,v=f.headers||{},x=f.Transport,ee=Me&&x==null?void 0:new L(x!=null?new x:Ae()),ae=x!=null&&typeof x!="string"?new x:ee==null?new R:new U,W=void 0,P=0,ne=se,ye="",Re="",ce="",Ee="",X=re,Le=0,he=0,Je=function(H,I,Y,Q){if(ne===oe)if(H===200&&Y!=null&&De.test(Y)){ne=$,s=Date.now(),h=r,o.readyState=$;var G=new le("open",{status:H,statusText:I,headers:Q});o.dispatchEvent(G),fe(o,o.onopen,G)}else{var z="";H!==200?(I&&(I=I.replace(/\s+/g," ")),z="EventSource's response has a status "+H+" "+I+" that is not 200. Aborting the connection."):z="EventSource's response has a Content-Type specifying an unsupported type: "+(Y==null?"-":Y.replace(/\s+/g," "))+". Aborting the connection.",Oe();var G=new le("error",{status:H,statusText:I,headers:Q});o.dispatchEvent(G),fe(o,o.onerror,G),console.error(z)}},$e=function(H){if(ne===$){for(var I=-1,Y=0;Y<H.length;Y+=1){var Q=H.charCodeAt(Y);(Q===10||Q===13)&&(I=Y)}var G=(I!==-1?Ee:"")+H.slice(0,I+1);Ee=(I===-1?Ee:"")+H.slice(I+1),H!==""&&(s=Date.now(),C+=H.length);for(var z=0;z<G.length;z+=1){var Q=G.charCodeAt(z);if(X===we&&Q===10)X=re;else if(X===we&&(X=re),Q===13||Q===10){if(X!==re){X===be&&(he=z+1);var de=G.slice(Le,he-1),ue=G.slice(he+(he<z&&G.charCodeAt(he)===32?1:0),z);de==="data"?(ye+=`
|
|
7
|
-
`,ye+=ue):de==="id"?Re=ue:de==="event"?ce=ue:de==="retry"?(r=Te(ue,r),h=r):de==="heartbeatTimeout"&&(c=Te(ue,c),P!==0&&(m(P),P=y(function(){Se()},c)))}if(X===re){if(ye!==""){b=Re,ce===""&&(ce="message");var ve=new te(ce,{data:ye.slice(1),lastEventId:Re});if(o.dispatchEvent(ve),ce==="open"?fe(o,o.onopen,ve):ce==="message"?fe(o,o.onmessage,ve):ce==="error"&&fe(o,o.onerror,ve),ne===pe)return}ye="",ce=""}X=Q===13?we:re}else X===re&&(Le=z,X=be),X===be?Q===58&&(he=z+1,X=me):X===me&&(X=Ce)}}},Ie=function(H){if(ne===$||ne===oe){ne=se,P!==0&&(m(P),P=0),P=y(function(){Se()},h),h=ge(Math.min(r*16,h*2)),o.readyState=oe;var I=new p("error",{error:H});o.dispatchEvent(I),fe(o,o.onerror,I),H!=null&&console.error(H)}},Oe=function(){ne=pe,W!=null&&(W.abort(),W=void 0),P!==0&&(m(P),P=0),o.readyState=pe},Se=function(){if(P=0,ne!==se){if(!s&&W!=null)Ie(new Error("No activity within "+c+" milliseconds. "+(ne===oe?"No response received.":C+" chars received.")+" Reconnecting.")),W!=null&&(W.abort(),W=void 0);else{var H=Math.max((s||Date.now())+c-Date.now(),1);s=!1,P=y(function(){Se()},H)}return}s=!1,C=0,P=y(function(){Se()},c),ne=oe,ye="",ce="",Re=b,Ee="",Le=0,he=0,X=re;var I=d;if(d.slice(0,5)!=="data:"&&d.slice(0,5)!=="blob:"&&b!==""){var Y=d.indexOf("?");I=Y===-1?d:d.slice(0,Y+1)+d.slice(Y+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(ue,ve){return ve===i?"":ue}),I+=(d.indexOf("?")===-1?"?":"&")+i+"="+encodeURIComponent(b)}var Q=o.withCredentials,G={};G.Accept="text/event-stream";var z=o.headers;if(z!=null)for(var de in z)Object.prototype.hasOwnProperty.call(z,de)&&(G[de]=z[de]);try{W=ae.open(ee,Je,$e,Ie,I,Q,G)}catch(ue){throw Oe(),ue}};o.url=d,o.readyState=oe,o.withCredentials=t,o.headers=v,o._close=Oe,Se()}K.prototype=Object.create(j.prototype),K.prototype.CONNECTING=oe,K.prototype.OPEN=$,K.prototype.CLOSED=pe,K.prototype.close=function(){this._close()},K.CONNECTING=oe,K.OPEN=$,K.CLOSED=pe,K.prototype.withCredentials=void 0;var xe=w;u!=null&&(w==null||!("withCredentials"in w.prototype))&&(xe=K),function(o){{var d=o(a);d!==void 0&&(l.exports=d)}}(function(o){o.EventSourcePolyfill=K,o.NativeEventSource=w,o.EventSource=xe})})(typeof globalThis=="undefined"?typeof window!="undefined"?window:typeof self!="undefined"?self:e.commonjsGlobal:globalThis)})(Fe,Fe.exports);var it=Fe.exports;function lt(l){e.append_styles(l,"svelte-lfsn3o",'*,*::before,*::after{font-family:inherit}:host{font-family:inherit}input,textarea,button{font-family:inherit}p{padding:0;margin:0}@keyframes growWidthPercent{from{height:0}to{height:100%}}.ShowBalance{position:relative}.ShowBalance .Loading{font-size:14px;white-space:nowrap;padding-right:10px}.ShowBalance .BalanceValue{font-size:14px;cursor:pointer;background:transparent;border:none;font:inherit;color:inherit;display:flex;flex-wrap:nowrap;white-space:nowrap}.ShowBalance .BalanceValue svg{width:16px;fill:black}.ShowBalance .BalanceValue span{padding-left:5px}.ShowBalance .BalanceValue .TriangleActive,.ShowBalance .BalanceValue .TriangleInactive{display:block;margin:0 3px;transition:all 0.2s}.ShowBalance .BalanceValue .TriangleActive:hover,.ShowBalance .BalanceValue .TriangleInactive:hover{transform:scale(1.2)}.ShowBalance .BalanceValue .TriangleActive svg,.ShowBalance .BalanceValue .TriangleInactive svg{margin:2px 0px}.ShowBalance .BalanceValue .TriangleActive{transform:scale(1.1) rotateX(180deg) translateY(3px)}.ShowBalance .BalanceValue .TriangleActive:hover{transform:scale(1.1) rotateX(180deg) translateY(3px)}@media only screen and (max-width: 360px){.ShowBalance .BalanceValue{font-size:12px}.ShowBalance .BalanceValue svg{width:12px}}.BalanceModalWrapper{background:linear-gradient(90deg, rgb(42, 79, 55) 0%, rgb(0, 61, 92) 100%);position:absolute;top:40px;padding:10px;transform:translateX(-45%);box-shadow:0px 30px 30px var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));border-radius:5px;z-index:17;box-shadow:0px 5px 20px 0px #191919;transition:all 0.2s ease-in;opacity:0}.BalanceModalWrapper:before{content:"";background:linear-gradient(90deg, rgb(42, 79, 55) 0%, rgb(0, 61, 92) 100%);clip-path:polygon(50% 0, 0% 100%, 100% 100%);position:absolute;top:-8px;left:50%;width:25px;height:10px;z-index:1}.BalanceModalWrapper.Open{opacity:1}.BalanceModalClose{position:absolute;top:5px;right:5px;width:20px;height:20px;z-index:1;cursor:pointer;transition:all 0.3s ease;background:transparent;border:none;font:inherit;opacity:0}.BalanceModalClose:before{content:"";background:var(--emw--color-secondary, var(--emw--color-secondary, white));position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(45deg)}.BalanceModalClose:after{content:"";background:var(--emw--color-secondary, var(--emw--color-secondary, white));position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(-45deg)}.BalanceModalClose:hover{transform:scale(1.1)}.BalanceModalClose.Open{opacity:1}.BalanceModal{transition:all 0.2s ease-in;width:270px}.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, white))}.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, white));font-size:14px;text-transform:capitalize}.BalanceModalRowBoth .BalanceModalValue{font-size:14px;font-weight:bold;color:var(--emw--header-contrast, var(--emw--color-contrast, white))}.BalanceModalFooter{display:flex;align-items:center;padding:20px 0 10px}.BalanceModalFooter .BalanceModalAction{background:var(--emw--color-primary);font-size:12px;color:white;text-transform:uppercase;width:100%;border-radius:30px;border:none;padding:10px 0;cursor:pointer;transition:all 0.2s ease-in;box-shadow:0px 3px 7px 0px rgba(0, 0, 0, 0.2)}.BalanceModalFooter .BalanceModalAction:hover{background:rgba(255, 255, 255, 0.1);color:var(--emw--color-primary);box-shadow:0px 0px 0px 2px inset var(--emw--color-primary);font-size:14px}.BalanceModalFooter .BalanceModalAction:active{background:rgba(255, 255, 255, 0.5)}.ShowBalanceModalOverlay{background-color:rgba(0, 0, 0, 0.7);position:fixed;top:0;bottom:0;left:0;right:0;z-index:16;opacity:0;transition:all 0.2s linear}.ShowBalanceModalOverlay.Open{opacity:1}')}function Ge(l,a,n){const y=l.slice();return y[53]=a[n],y}function qe(l,a,n){const y=l.slice();return y[56]=a[n],y}function st(l){let a,n,y=(l[1].Total?l[8](l[1].Total[0].amount):"0")+"",m,u,T,g,w,B,D,k,M,_,S=l[4]&&Ke(l);return{c(){a=e.element("button"),n=e.element("p"),m=e.text(y),u=e.space(),T=e.element("span"),g=e.svg_element("svg"),w=e.svg_element("path"),D=e.space(),S&&S.c(),k=e.empty(),e.attr(w,"id","arrow"),e.attr(w,"d","M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z"),e.attr(w,"transform","translate(-274.511 -441.088)"),e.attr(w,"fill","#d1d1d1"),e.attr(g,"xmlns","http://www.w3.org/2000/svg"),e.attr(g,"width","14"),e.attr(g,"height","6.835"),e.attr(g,"viewBox","0 0 14 6.835"),e.attr(T,"class",B=l[3]?"TriangleActive":"TriangleInactive"),e.attr(a,"class","BalanceValue")},m(A,F){e.insert(A,a,F),e.append(a,n),e.append(n,m),e.append(a,u),e.append(a,T),e.append(T,g),e.append(g,w),e.insert(A,D,F),S&&S.m(A,F),e.insert(A,k,F),M||(_=e.listen(a,"click",l[26]),M=!0)},p(A,F){F[0]&2&&y!==(y=(A[1].Total?A[8](A[1].Total[0].amount):"0")+"")&&e.set_data(m,y),F[0]&8&&B!==(B=A[3]?"TriangleActive":"TriangleInactive")&&e.attr(T,"class",B),A[4]?S?S.p(A,F):(S=Ke(A),S.c(),S.m(k.parentNode,k)):S&&(S.d(1),S=null)},d(A){A&&(e.detach(a),e.detach(D),e.detach(k)),S&&S.d(A),M=!1,_()}}}function ct(l){let a,n=l[6]("Loading")+"",y;return{c(){a=e.element("p"),y=e.text(n),e.attr(a,"class","Loading")},m(m,u){e.insert(m,a,u),e.append(a,y)},p(m,u){u[0]&64&&n!==(n=m[6]("Loading")+"")&&e.set_data(y,n)},d(m){m&&e.detach(a)}}}function Ke(l){let a,n,y,m,u,T,g,w,B=l[6]("Title")+"",D,k,M,_,S,A,F=l[6]("DepositButton")+"",Z,J,N,L,q,ie,U=e.ensure_array_like(Object.keys(l[1])),O=[];for(let R=0;R<U.length;R+=1)O[R]=Ye(Ge(l,U,R));return{c(){a=e.element("div"),n=e.element("button"),m=e.space(),u=e.element("div"),T=e.element("div"),g=e.element("div"),w=e.element("p"),D=e.text(B),k=e.space(),M=e.element("div");for(let R=0;R<O.length;R+=1)O[R].c();_=e.space(),S=e.element("div"),A=e.element("button"),Z=e.text(F),e.attr(n,"class",y="BalanceModalClose "+(l[3]?"Open":"")),e.attr(w,"class","BalanceModalTitle"),e.attr(g,"class","BalanceModalHeader"),e.attr(M,"class","BalanceModalBody"),e.attr(A,"class","BalanceModalAction"),e.attr(S,"class","BalanceModalFooter"),e.attr(T,"class",J="ModalContent "+(l[3]?"Open":"")),e.attr(u,"class",N="BalanceModal "+(l[3]?"Open":"")),e.attr(a,"class",L="BalanceModalWrapper "+(l[3]?"Open":""))},m(R,j){e.insert(R,a,j),e.append(a,n),e.append(a,m),e.append(a,u),e.append(u,T),e.append(T,g),e.append(g,w),e.append(w,D),e.append(T,k),e.append(T,M);for(let E=0;E<O.length;E+=1)O[E]&&O[E].m(M,null);e.append(T,_),e.append(T,S),e.append(S,A),e.append(A,Z),q||(ie=[e.listen(n,"click",l[27]),e.listen(A,"click",l[28])],q=!0)},p(R,j){if(j[0]&8&&y!==(y="BalanceModalClose "+(R[3]?"Open":""))&&e.attr(n,"class",y),j[0]&64&&B!==(B=R[6]("Title")+"")&&e.set_data(D,B),j[0]&322){U=e.ensure_array_like(Object.keys(R[1]));let E;for(E=0;E<U.length;E+=1){const V=Ge(R,U,E);O[E]?O[E].p(V,j):(O[E]=Ye(V),O[E].c(),O[E].m(M,null))}for(;E<O.length;E+=1)O[E].d(1);O.length=U.length}j[0]&64&&F!==(F=R[6]("DepositButton")+"")&&e.set_data(Z,F),j[0]&8&&J!==(J="ModalContent "+(R[3]?"Open":""))&&e.attr(T,"class",J),j[0]&8&&N!==(N="BalanceModal "+(R[3]?"Open":""))&&e.attr(u,"class",N),j[0]&8&&L!==(L="BalanceModalWrapper "+(R[3]?"Open":""))&&e.attr(a,"class",L)},d(R){R&&e.detach(a),e.destroy_each(O,R),q=!1,e.run_all(ie)}}}function We(l){let a,n,y=l[6](l[53])+"",m,u,T=(l[56].productType?l[6](l[56].productType):"")+"",g,w,B,D,k=(l[56].amount?l[8](l[56].amount):"0")+"",M;return{c(){a=e.element("div"),n=e.element("p"),m=e.text(y),u=e.space(),g=e.text(T),w=e.space(),B=e.element("p"),D=e.element("span"),M=e.text(k),e.attr(n,"class","BalanceModalText"),e.attr(D,"class","BalanceModalAmount"),e.attr(B,"class","BalanceModalValue"),e.attr(a,"class","BalanceModalRowLine")},m(_,S){e.insert(_,a,S),e.append(a,n),e.append(n,m),e.append(n,u),e.append(n,g),e.append(a,w),e.append(a,B),e.append(B,D),e.append(D,M)},p(_,S){S[0]&66&&y!==(y=_[6](_[53])+"")&&e.set_data(m,y),S[0]&66&&T!==(T=(_[56].productType?_[6](_[56].productType):"")+"")&&e.set_data(g,T),S[0]&2&&k!==(k=(_[56].amount?_[8](_[56].amount):"0")+"")&&e.set_data(M,k)},d(_){_&&e.detach(a)}}}function Ye(l){let a,n,y=e.ensure_array_like(l[1][l[53]]),m=[];for(let u=0;u<y.length;u+=1)m[u]=We(qe(l,y,u));return{c(){a=e.element("div");for(let u=0;u<m.length;u+=1)m[u].c();n=e.space(),e.attr(a,"class","BalanceModalRowBoth")},m(u,T){e.insert(u,a,T);for(let g=0;g<m.length;g+=1)m[g]&&m[g].m(a,null);e.append(a,n)},p(u,T){if(T[0]&322){y=e.ensure_array_like(u[1][u[53]]);let g;for(g=0;g<y.length;g+=1){const w=qe(u,y,g);m[g]?m[g].p(w,T):(m[g]=We(w),m[g].c(),m[g].m(a,n))}for(;g<m.length;g+=1)m[g].d(1);m.length=y.length}},d(u){u&&e.detach(a),e.destroy_each(m,u)}}}function Qe(l){let a,n,y;return{c(){a=e.element("button"),e.attr(a,"class","ShowBalanceModalOverlay")},m(m,u){e.insert(m,a,u),n||(y=e.listen(a,"click",l[29]),n=!0)},p:e.noop,d(m){m&&e.detach(a),n=!1,y()}}}function dt(l){let a,n,y,m;function u(B,D){return B[2]?ct:st}let T=u(l),g=T(l),w=l[4]&&Qe(l);return{c(){a=e.element("div"),n=e.element("div"),g.c(),m=e.space(),w&&w.c(),e.attr(n,"class",y="ShowBalance "+(l[5]?"Mobile":""))},m(B,D){e.insert(B,a,D),e.append(a,n),g.m(n,null),e.append(a,m),w&&w.m(a,null),l[30](a)},p(B,D){T===(T=u(B))&&g?g.p(B,D):(g.d(1),g=T(B),g&&(g.c(),g.m(n,null))),D[0]&32&&y!==(y="ShowBalance "+(B[5]?"Mobile":""))&&e.attr(n,"class",y),B[4]?w?w.p(B,D):(w=Qe(B),w.c(),w.m(a,null)):w&&(w.d(1),w=null)},i:e.noop,o:e.noop,d(B){B&&e.detach(a),g.d(),w&&w.d(),l[30](null)}}}function ut(l,a,n){let y;e.component_subscribe(l,e.$format,t=>n(6,y=t));let{userid:m=""}=a,{session:u=""}=a,{endpoint:T=""}=a,{lang:g="en"}=a,{mbsource:w}=a,{clientstyling:B=""}=a,{clientstylingurl:D=""}=a,{translationurl:k=""}=a,{gmversion:M="gm16"}=a,{displaybalanceoption:_="All"}=a,{totalcalculationmode:S="totalCashAmount"}=a,{currencylocale:A="en"}=a,{currencydisplay:F="symbol"}=a,{maximumfractiondigits:Z="2"}=a,{minimumfractiondigits:J="0"}=a,{customdisplayformat:N=""}=a,L,q=!0,ie=!1,U=!1,O=!1,R=!1,j=window.navigator.userAgent,E,V="",te=[],le;const p={},se=["totalCashAmount","totalRealAmount"],oe=()=>{fetch(k).then(t=>t.json()).then(t=>Object.keys(t).forEach(i=>Pe(i,t[i]))).catch(t=>console.log(t))};Object.keys(Xe).forEach(t=>Pe(t,Xe[t]));const $=t=>{switch(t){case"balance":window.postMessage({type:"BalanceModalStatus",status:"open"},window.location.href),n(4,O=!0),setTimeout(()=>n(3,ie=!0),150);break;case"closebalance":n(3,ie=!1),window.postMessage({type:"BalanceModalStatus",status:"close"},window.location.href),setTimeout(()=>{n(4,O=!1)},150);break}},pe=t=>{if(N)return we(t);const i=A||g,r={style:"currency",currency:V,useGrouping:!0,currencyDisplay:F||"code",maximumFractionDigits:Z===""||isNaN(Number(Z))?2:Number(Z),minimumFractionDigits:J===""||isNaN(Number(J))?0:Number(J)};return new Intl.NumberFormat(i,r).format(t)},we=t=>{const i=[];let r="";for(const c of N)switch(c){default:r+=c;break;case"{":r&&i.push(r),r="";break;case"}":const[b,h]=r.split("|");if(r="",b.toLowerCase()==="currency")r=V;else if(b.toLowerCase()==="amount"){let s=",",C=".",v=2;h&&(h[0]!==" "&&(s=h[0]),h[1]!==" "&&(C=h[1]),h[2]!==" "&&!isNaN(Number(h[2]))&&(v=Number(h[2])));let[x,ee]=String(Math.floor(t*Ne(10,v))/Ne(10,v)).split(".");r+=x[0];for(let ae=1;ae<x.length;++ae)(x.length-ae)%3===0?r+=s+x[ae]:r+=x[ae];ee&&(r+=C+ee)}r&&i.push(r),r="";break}return i.push(r),i.join("")},re=()=>Ue(this,null,function*(){var i,r,c;n(2,q=!0);const t=new URL(`${T}/v1/player/${m}/account`);try{const b=yield fetch(t,{method:"GET",headers:{"X-SessionID":u}}),h=yield b.json();if(b.ok)window.postMessage({type:"BalancedFetched"},window.location.href),te=h.items,V=(i=te.find(s=>s.displayName==="Casino"))==null?void 0:i.currency,n(1,p.Total=[{amount:h.totalAmount[V]}],p),n(1,p.Real=[{amount:(r=te.find(s=>s.displayName==="Casino"))==null?void 0:r.balanceAmount}],p),n(1,p.Bonus=[{amount:(c=te.find(s=>s.displayName==="UBS"))==null?void 0:c.balanceAmount}],p);else throw new Error("Failed to fetch balance data !")}catch(b){console.log("Balance error: ",b)}finally{n(2,q=!1)}}),be=()=>{n(2,q=!0);const t=new URL(`${T}/v2/player/${m}/balance`),i=new Headers;i.append("X-SessionID",u),fetch(t,{method:"GET",headers:i}).then(c=>c.json()).then(c=>{c[S]||n(10,S=se[0]);const b=c.items.find(s=>s.type==="Real"&&s.walletAccountType==="Ordinary");if(V=b.currency,U=!!b.productType,n(1,p.Total=[{amount:0}],p),n(1,p.Real=[],p),n(1,p.Bonus=[],p),n(1,p.Credit=[],p),!U){le={lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1},n(1,p.Total[0].amount=c[S][V],p);for(const s of c.items)switch(s.type){case"Bonus":p.Bonus.length===0?p.Bonus.push({amount:s.amount}):n(1,p.Bonus[0].amount+=s.amount,p);break;case"Real":if(s.creditLine&&p.Credit.length===0&&p.Credit.push({amount:s.creditLine}),S==="totalRealAmount")continue;p.Real.length===0?p.Real.push({amount:s.amount}):n(1,p.Real[0].amount+=s.amount,p);break}for(const[s,C]of Object.entries(p))C.length<1&&delete p[s];n(2,q=!1);return}le={Casino:{lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1},Sports:{lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1}};let h=c.items;_&&_!=="All"&&(h=c.items.filter(s=>s.productType===_));for(const s of h){let C;switch(s.type){case"Bonus":C=p.Bonus.findIndex(v=>v.productType===s.productType),C>0?n(1,p.Bonus[C].amount+=s.amount,p):p.Bonus.push({amount:s.amount,productType:s.productType});break;case"Real":s.creditLine&&p.Credit.push({amount:s.creditLine,productType:s.productType}),C=p.Real.findIndex(v=>v.productType===s.productType),C>0?n(1,p.Real[C].amount+=s.amount,p):p.Real.push({amount:s.amount,productType:s.productType});break}}_e();for(const[s,C]of Object.entries(p))C.length<1&&delete p[s];n(2,q=!1)}).catch(c=>{throw n(2,q=!1),console.log("Balance fetch error",c),new Error("Failed to fetch balance data!")})},me=()=>{if(E&&E.close(),u.length<1)return;let t,i;switch(M){case"gm16":t=new URL(`${T}/v2/player/${m}/information/updates`),i=b=>Te(b);break;case"gmcore":t=new URL(`${T}/v1/player/${m}/balance/updates`),i=b=>De(b);break}const r={accept:"text/event-stream","X-SessionId":u},c=new it.EventSourcePolyfill(t,{headers:r});E=c,c.addEventListener("message",i)},Ce=t=>{let i;try{i=JSON.parse(t)}catch(r){console.log("Balance stream failed: ",r);return}return i},De=t=>{var b,h;const i=Ce(t.data);if(!i){me();return}let r="0";const c=i.balanceChange;te=te.map(s=>(c&&c[s.id]&&(s=Ve(ze({},s),{balanceAmount:c[s.id].afterAmount})),r=(parseFloat(s==null?void 0:s.balanceAmount)+parseFloat(r)).toString(),s)),n(1,p.Real=[{amount:(b=te[0])==null?void 0:b.balanceAmount}],p),n(1,p.Bonus=[{amount:(h=te[1])==null?void 0:h.balanceAmount}],p),n(1,p.Total=[{amount:Number(r)}],p)},Be=(t,i,r)=>{let c=null;switch(r.walletAccountType){case"Ordinary":(r.afterAmount!==r.affectedAmount||i.lastOrdinaryAfterAmount===0)&&(i.lastOrdinaryAfterAmount=r.afterAmount,i.showCreditLineAfterAmount||(c=r.afterAmount));break;case"CreditLine":r.afterAmount!==0?(c=r.afterAmount,i.showCreditLineAfterAmount=!0):(c=i.lastOrdinaryAfterAmount,i.showCreditLineAfterAmount=!1);break;default:c=r.afterAmount}return c===null?t:c},_e=()=>{switch(S){case"totalCashAmount":let t=0;for(const r of["Real","Bonus"])for(const c of p[r])t+=Math.max(c.amount,0);n(1,p.Total[0].amount=t,p);break;case"totalRealAmount":if(!U)return;let i=0;for(const r of p.Real)i+=r.amount;n(1,p.Total[0].amount=i,p)}},Te=t=>{const i=Ce(t.data);if(!i){me();return}if(i.type!=="BALANCE_UPDATE_V2")return;const r=i.body.balanceChange;for(const[c,b]of Object.entries(r))if(S==="totalRealAmount"&&c==="Real"&&!U&&n(1,p.Total[0].amount=Be(p.Total[0].amount,le,b),p),!!p[c])for(const h of p[c]){if(!U){h.amount=c==="Real"?Be(h.amount,le,b):b.afterAmount;continue}b.productType===h.productType&&(h.amount=c==="Real"?Be(h.amount,le[h.productType],b):b.afterAmount)}_e()},ge=()=>{$("closebalance"),window.postMessage({type:"GoToDeposit"},window.location.href),typeof gtag=="function"&>ag("event","GoToDeposit",{context:"PlayerAccountBalanceModal"})},fe=()=>{se.includes(S)||(console.error(`Unsupported value ('${S}') for totalcalculationmode parameter. Only the following values are supported ${se}. Using default value ('${se[0]}').`),n(10,S=se[0]))},K=()=>{switch(rt(g),fe(),M){case"gmcore":re();break;case"gm16":be();break;default:throw Error(`Invalid apiversion attribute: ${M}`)}},Ae=t=>t.data&&t.data.type==="LogoutSuccessfull"&&E.close(),Me=()=>{window.postMessage({type:"UpdateBalanceBackground"},window.location.href)};e.onMount(()=>(window.addEventListener("message",Ae,!1),n(5,R=e.isMobile(j)),()=>{window.removeEventListener("message",Ae),E&&E.close()}));const ke=()=>$("balance"),xe=()=>$("closebalance"),o=()=>ge(),d=()=>$("closeBalance");function f(t){e.binding_callbacks[t?"unshift":"push"](()=>{L=t,n(0,L)})}return l.$$set=t=>{"userid"in t&&n(11,m=t.userid),"session"in t&&n(12,u=t.session),"endpoint"in t&&n(13,T=t.endpoint),"lang"in t&&n(14,g=t.lang),"mbsource"in t&&n(15,w=t.mbsource),"clientstyling"in t&&n(16,B=t.clientstyling),"clientstylingurl"in t&&n(17,D=t.clientstylingurl),"translationurl"in t&&n(18,k=t.translationurl),"gmversion"in t&&n(19,M=t.gmversion),"displaybalanceoption"in t&&n(20,_=t.displaybalanceoption),"totalcalculationmode"in t&&n(10,S=t.totalcalculationmode),"currencylocale"in t&&n(21,A=t.currencylocale),"currencydisplay"in t&&n(22,F=t.currencydisplay),"maximumfractiondigits"in t&&n(23,Z=t.maximumfractiondigits),"minimumfractiondigits"in t&&n(24,J=t.minimumfractiondigits),"customdisplayformat"in t&&n(25,N=t.customdisplayformat)},l.$$.update=()=>{l.$$.dirty[0]&1603584&&T&&m&&u&&g&&M&&_&&K(),l.$$.dirty[0]&538624&&T&&m&&u&&M&&me(),l.$$.dirty[0]&262144&&k&&oe(),l.$$.dirty[0]&2&&p.Total&&Me(),l.$$.dirty[0]&65537&&B&&L&&e.setClientStyling(L,B),l.$$.dirty[0]&131073&&D&&L&&e.setClientStylingURL(L,D),l.$$.dirty[0]&32769&&w&&L&&e.setStreamStyling(L,`${w}.Style`)},[L,p,q,ie,O,R,y,$,pe,ge,S,m,u,T,g,w,B,D,k,M,_,A,F,Z,J,N,ke,xe,o,d,f]}class Ze extends e.SvelteComponent{constructor(a){super(),e.init(this,a,ut,dt,e.safe_not_equal,{userid:11,session:12,endpoint:13,lang:14,mbsource:15,clientstyling:16,clientstylingurl:17,translationurl:18,gmversion:19,displaybalanceoption:20,totalcalculationmode:10,currencylocale:21,currencydisplay:22,maximumfractiondigits:23,minimumfractiondigits:24,customdisplayformat:25},lt,[-1,-1])}get userid(){return this.$$.ctx[11]}set userid(a){this.$$set({userid:a}),e.flush()}get session(){return this.$$.ctx[12]}set session(a){this.$$set({session:a}),e.flush()}get endpoint(){return this.$$.ctx[13]}set endpoint(a){this.$$set({endpoint:a}),e.flush()}get lang(){return this.$$.ctx[14]}set lang(a){this.$$set({lang:a}),e.flush()}get mbsource(){return this.$$.ctx[15]}set mbsource(a){this.$$set({mbsource:a}),e.flush()}get clientstyling(){return this.$$.ctx[16]}set clientstyling(a){this.$$set({clientstyling:a}),e.flush()}get clientstylingurl(){return this.$$.ctx[17]}set clientstylingurl(a){this.$$set({clientstylingurl:a}),e.flush()}get translationurl(){return this.$$.ctx[18]}set translationurl(a){this.$$set({translationurl:a}),e.flush()}get gmversion(){return this.$$.ctx[19]}set gmversion(a){this.$$set({gmversion:a}),e.flush()}get displaybalanceoption(){return this.$$.ctx[20]}set displaybalanceoption(a){this.$$set({displaybalanceoption:a}),e.flush()}get totalcalculationmode(){return this.$$.ctx[10]}set totalcalculationmode(a){this.$$set({totalcalculationmode:a}),e.flush()}get currencylocale(){return this.$$.ctx[21]}set currencylocale(a){this.$$set({currencylocale:a}),e.flush()}get currencydisplay(){return this.$$.ctx[22]}set currencydisplay(a){this.$$set({currencydisplay:a}),e.flush()}get maximumfractiondigits(){return this.$$.ctx[23]}set maximumfractiondigits(a){this.$$set({maximumfractiondigits:a}),e.flush()}get minimumfractiondigits(){return this.$$.ctx[24]}set minimumfractiondigits(a){this.$$set({minimumfractiondigits:a}),e.flush()}get customdisplayformat(){return this.$$.ctx[25]}set customdisplayformat(a){this.$$set({customdisplayformat:a}),e.flush()}}e.create_custom_element(Ze,{userid:{},session:{},endpoint:{},lang:{},mbsource:{},clientstyling:{},clientstylingurl:{},translationurl:{},gmversion:{},displaybalanceoption:{},totalcalculationmode:{},currencylocale:{},currencydisplay:{},maximumfractiondigits:{},minimumfractiondigits:{},customdisplayformat:{}},[],[],!0);exports.default=Ze;
|
|
7
|
+
`,ye+=ue):de==="id"?Re=ue:de==="event"?ce=ue:de==="retry"?(r=Te(ue,r),h=r):de==="heartbeatTimeout"&&(c=Te(ue,c),P!==0&&(m(P),P=y(function(){Se()},c)))}if(X===re){if(ye!==""){b=Re,ce===""&&(ce="message");var ve=new te(ce,{data:ye.slice(1),lastEventId:Re});if(o.dispatchEvent(ve),ce==="open"?fe(o,o.onopen,ve):ce==="message"?fe(o,o.onmessage,ve):ce==="error"&&fe(o,o.onerror,ve),ne===pe)return}ye="",ce=""}X=Q===13?we:re}else X===re&&(Le=z,X=be),X===be?Q===58&&(he=z+1,X=me):X===me&&(X=Ce)}}},Ie=function(H){if(ne===$||ne===oe){ne=se,P!==0&&(m(P),P=0),P=y(function(){Se()},h),h=ge(Math.min(r*16,h*2)),o.readyState=oe;var I=new p("error",{error:H});o.dispatchEvent(I),fe(o,o.onerror,I),H!=null&&console.error(H)}},Oe=function(){ne=pe,W!=null&&(W.abort(),W=void 0),P!==0&&(m(P),P=0),o.readyState=pe},Se=function(){if(P=0,ne!==se){if(!s&&W!=null)Ie(new Error("No activity within "+c+" milliseconds. "+(ne===oe?"No response received.":C+" chars received.")+" Reconnecting.")),W!=null&&(W.abort(),W=void 0);else{var H=Math.max((s||Date.now())+c-Date.now(),1);s=!1,P=y(function(){Se()},H)}return}s=!1,C=0,P=y(function(){Se()},c),ne=oe,ye="",ce="",Re=b,Ee="",Le=0,he=0,X=re;var I=d;if(d.slice(0,5)!=="data:"&&d.slice(0,5)!=="blob:"&&b!==""){var Y=d.indexOf("?");I=Y===-1?d:d.slice(0,Y+1)+d.slice(Y+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(ue,ve){return ve===i?"":ue}),I+=(d.indexOf("?")===-1?"?":"&")+i+"="+encodeURIComponent(b)}var Q=o.withCredentials,G={};G.Accept="text/event-stream";var z=o.headers;if(z!=null)for(var de in z)Object.prototype.hasOwnProperty.call(z,de)&&(G[de]=z[de]);try{W=ae.open(ee,Je,$e,Ie,I,Q,G)}catch(ue){throw Oe(),ue}};o.url=d,o.readyState=oe,o.withCredentials=t,o.headers=v,o._close=Oe,Se()}K.prototype=Object.create(j.prototype),K.prototype.CONNECTING=oe,K.prototype.OPEN=$,K.prototype.CLOSED=pe,K.prototype.close=function(){this._close()},K.CONNECTING=oe,K.OPEN=$,K.CLOSED=pe,K.prototype.withCredentials=void 0;var xe=w;u!=null&&(w==null||!("withCredentials"in w.prototype))&&(xe=K),function(o){{var d=o(a);d!==void 0&&(l.exports=d)}}(function(o){o.EventSourcePolyfill=K,o.NativeEventSource=w,o.EventSource=xe})})(typeof globalThis=="undefined"?typeof window!="undefined"?window:typeof self!="undefined"?self:e.commonjsGlobal:globalThis)})(Fe,Fe.exports);var it=Fe.exports;function lt(l){e.append_styles(l,"svelte-lfsn3o",'*,*::before,*::after{font-family:inherit}:host{font-family:inherit}input,textarea,button{font-family:inherit}p{padding:0;margin:0}@keyframes growWidthPercent{from{height:0}to{height:100%}}.ShowBalance{position:relative}.ShowBalance .Loading{font-size:14px;white-space:nowrap;padding-right:10px}.ShowBalance .BalanceValue{font-size:14px;cursor:pointer;background:transparent;border:none;font:inherit;color:inherit;display:flex;flex-wrap:nowrap;white-space:nowrap}.ShowBalance .BalanceValue svg{width:16px;fill:black}.ShowBalance .BalanceValue span{padding-left:5px}.ShowBalance .BalanceValue .TriangleActive,.ShowBalance .BalanceValue .TriangleInactive{display:block;margin:0 3px;transition:all 0.2s}.ShowBalance .BalanceValue .TriangleActive:hover,.ShowBalance .BalanceValue .TriangleInactive:hover{transform:scale(1.2)}.ShowBalance .BalanceValue .TriangleActive svg,.ShowBalance .BalanceValue .TriangleInactive svg{margin:2px 0px}.ShowBalance .BalanceValue .TriangleActive{transform:scale(1.1) rotateX(180deg) translateY(3px)}.ShowBalance .BalanceValue .TriangleActive:hover{transform:scale(1.1) rotateX(180deg) translateY(3px)}@media only screen and (max-width: 360px){.ShowBalance .BalanceValue{font-size:12px}.ShowBalance .BalanceValue svg{width:12px}}.BalanceModalWrapper{background:linear-gradient(90deg, rgb(42, 79, 55) 0%, rgb(0, 61, 92) 100%);position:absolute;top:40px;padding:10px;transform:translateX(-45%);box-shadow:0px 30px 30px var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));border-radius:5px;z-index:17;box-shadow:0px 5px 20px 0px #191919;transition:all 0.2s ease-in;opacity:0}.BalanceModalWrapper:before{content:"";background:linear-gradient(90deg, rgb(42, 79, 55) 0%, rgb(0, 61, 92) 100%);clip-path:polygon(50% 0, 0% 100%, 100% 100%);position:absolute;top:-8px;left:50%;width:25px;height:10px;z-index:1}.BalanceModalWrapper.Open{opacity:1}.BalanceModalClose{position:absolute;top:5px;right:5px;width:20px;height:20px;z-index:1;cursor:pointer;transition:all 0.3s ease;background:transparent;border:none;font:inherit;opacity:0}.BalanceModalClose:before{content:"";background:var(--emw--color-secondary, var(--emw--color-secondary, white));position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(45deg)}.BalanceModalClose:after{content:"";background:var(--emw--color-secondary, var(--emw--color-secondary, white));position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(-45deg)}.BalanceModalClose:hover{transform:scale(1.1)}.BalanceModalClose.Open{opacity:1}.BalanceModal{transition:all 0.2s ease-in;width:270px}.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, white))}.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, white));font-size:14px;text-transform:capitalize}.BalanceModalRowBoth .BalanceModalValue{font-size:14px;font-weight:bold;color:var(--emw--header-contrast, var(--emw--color-contrast, white))}.BalanceModalFooter{display:flex;align-items:center;padding:20px 0 10px}.BalanceModalFooter .BalanceModalAction{background:var(--emw--color-primary);font-size:12px;color:white;text-transform:uppercase;width:100%;border-radius:30px;border:none;padding:10px 0;cursor:pointer;transition:all 0.2s ease-in;box-shadow:0px 3px 7px 0px rgba(0, 0, 0, 0.2)}.BalanceModalFooter .BalanceModalAction:hover{background:rgba(255, 255, 255, 0.1);color:var(--emw--color-primary);box-shadow:0px 0px 0px 2px inset var(--emw--color-primary);font-size:14px}.BalanceModalFooter .BalanceModalAction:active{background:rgba(255, 255, 255, 0.5)}.ShowBalanceModalOverlay{background-color:rgba(0, 0, 0, 0.7);position:fixed;top:0;bottom:0;left:0;right:0;z-index:16;opacity:0;transition:all 0.2s linear}.ShowBalanceModalOverlay.Open{opacity:1}')}function Ge(l,a,n){const y=l.slice();return y[53]=a[n],y}function qe(l,a,n){const y=l.slice();return y[56]=a[n],y}function st(l){let a,n,y=(l[1].Total?l[8](l[1].Total[0].amount):"0")+"",m,u,T,g,w,B,D,k,M,_,S=l[4]&&Ke(l);return{c(){a=e.element("button"),n=e.element("p"),m=e.text(y),u=e.space(),T=e.element("span"),g=e.svg_element("svg"),w=e.svg_element("path"),D=e.space(),S&&S.c(),k=e.empty(),e.attr(w,"id","arrow"),e.attr(w,"d","M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z"),e.attr(w,"transform","translate(-274.511 -441.088)"),e.attr(w,"fill","#d1d1d1"),e.attr(g,"xmlns","http://www.w3.org/2000/svg"),e.attr(g,"width","14"),e.attr(g,"height","6.835"),e.attr(g,"viewBox","0 0 14 6.835"),e.attr(T,"class",B=l[3]?"TriangleActive":"TriangleInactive"),e.attr(a,"class","BalanceValue")},m(A,F){e.insert(A,a,F),e.append(a,n),e.append(n,m),e.append(a,u),e.append(a,T),e.append(T,g),e.append(g,w),e.insert(A,D,F),S&&S.m(A,F),e.insert(A,k,F),M||(_=e.listen(a,"click",l[26]),M=!0)},p(A,F){F[0]&2&&y!==(y=(A[1].Total?A[8](A[1].Total[0].amount):"0")+"")&&e.set_data(m,y),F[0]&8&&B!==(B=A[3]?"TriangleActive":"TriangleInactive")&&e.attr(T,"class",B),A[4]?S?S.p(A,F):(S=Ke(A),S.c(),S.m(k.parentNode,k)):S&&(S.d(1),S=null)},d(A){A&&(e.detach(a),e.detach(D),e.detach(k)),S&&S.d(A),M=!1,_()}}}function ct(l){let a,n=l[6]("Loading")+"",y;return{c(){a=e.element("p"),y=e.text(n),e.attr(a,"class","Loading")},m(m,u){e.insert(m,a,u),e.append(a,y)},p(m,u){u[0]&64&&n!==(n=m[6]("Loading")+"")&&e.set_data(y,n)},d(m){m&&e.detach(a)}}}function Ke(l){let a,n,y,m,u,T,g,w,B=l[6]("Title")+"",D,k,M,_,S,A,F=l[6]("DepositButton")+"",Z,J,N,L,q,ie,U=e.ensure_array_like(Object.keys(l[1])),O=[];for(let R=0;R<U.length;R+=1)O[R]=Ye(Ge(l,U,R));return{c(){a=e.element("div"),n=e.element("button"),m=e.space(),u=e.element("div"),T=e.element("div"),g=e.element("div"),w=e.element("p"),D=e.text(B),k=e.space(),M=e.element("div");for(let R=0;R<O.length;R+=1)O[R].c();_=e.space(),S=e.element("div"),A=e.element("button"),Z=e.text(F),e.attr(n,"class",y="BalanceModalClose "+(l[3]?"Open":"")),e.attr(w,"class","BalanceModalTitle"),e.attr(g,"class","BalanceModalHeader"),e.attr(M,"class","BalanceModalBody"),e.attr(A,"class","BalanceModalAction"),e.attr(S,"class","BalanceModalFooter"),e.attr(T,"class",J="ModalContent "+(l[3]?"Open":"")),e.attr(u,"class",N="BalanceModal "+(l[3]?"Open":"")),e.attr(a,"class",L="BalanceModalWrapper "+(l[3]?"Open":""))},m(R,j){e.insert(R,a,j),e.append(a,n),e.append(a,m),e.append(a,u),e.append(u,T),e.append(T,g),e.append(g,w),e.append(w,D),e.append(T,k),e.append(T,M);for(let E=0;E<O.length;E+=1)O[E]&&O[E].m(M,null);e.append(T,_),e.append(T,S),e.append(S,A),e.append(A,Z),q||(ie=[e.listen(n,"click",l[27]),e.listen(A,"click",l[28])],q=!0)},p(R,j){if(j[0]&8&&y!==(y="BalanceModalClose "+(R[3]?"Open":""))&&e.attr(n,"class",y),j[0]&64&&B!==(B=R[6]("Title")+"")&&e.set_data(D,B),j[0]&322){U=e.ensure_array_like(Object.keys(R[1]));let E;for(E=0;E<U.length;E+=1){const V=Ge(R,U,E);O[E]?O[E].p(V,j):(O[E]=Ye(V),O[E].c(),O[E].m(M,null))}for(;E<O.length;E+=1)O[E].d(1);O.length=U.length}j[0]&64&&F!==(F=R[6]("DepositButton")+"")&&e.set_data(Z,F),j[0]&8&&J!==(J="ModalContent "+(R[3]?"Open":""))&&e.attr(T,"class",J),j[0]&8&&N!==(N="BalanceModal "+(R[3]?"Open":""))&&e.attr(u,"class",N),j[0]&8&&L!==(L="BalanceModalWrapper "+(R[3]?"Open":""))&&e.attr(a,"class",L)},d(R){R&&e.detach(a),e.destroy_each(O,R),q=!1,e.run_all(ie)}}}function We(l){let a,n,y=l[6](l[53])+"",m,u,T=(l[56].productType?l[6](l[56].productType):"")+"",g,w,B,D,k=l[8](l[56].amount)+"",M;return{c(){a=e.element("div"),n=e.element("p"),m=e.text(y),u=e.space(),g=e.text(T),w=e.space(),B=e.element("p"),D=e.element("span"),M=e.text(k),e.attr(n,"class","BalanceModalText"),e.attr(D,"class","BalanceModalAmount"),e.attr(B,"class","BalanceModalValue"),e.attr(a,"class","BalanceModalRowLine")},m(_,S){e.insert(_,a,S),e.append(a,n),e.append(n,m),e.append(n,u),e.append(n,g),e.append(a,w),e.append(a,B),e.append(B,D),e.append(D,M)},p(_,S){S[0]&66&&y!==(y=_[6](_[53])+"")&&e.set_data(m,y),S[0]&66&&T!==(T=(_[56].productType?_[6](_[56].productType):"")+"")&&e.set_data(g,T),S[0]&2&&k!==(k=_[8](_[56].amount)+"")&&e.set_data(M,k)},d(_){_&&e.detach(a)}}}function Ye(l){let a,n,y=e.ensure_array_like(l[1][l[53]]),m=[];for(let u=0;u<y.length;u+=1)m[u]=We(qe(l,y,u));return{c(){a=e.element("div");for(let u=0;u<m.length;u+=1)m[u].c();n=e.space(),e.attr(a,"class","BalanceModalRowBoth")},m(u,T){e.insert(u,a,T);for(let g=0;g<m.length;g+=1)m[g]&&m[g].m(a,null);e.append(a,n)},p(u,T){if(T[0]&322){y=e.ensure_array_like(u[1][u[53]]);let g;for(g=0;g<y.length;g+=1){const w=qe(u,y,g);m[g]?m[g].p(w,T):(m[g]=We(w),m[g].c(),m[g].m(a,n))}for(;g<m.length;g+=1)m[g].d(1);m.length=y.length}},d(u){u&&e.detach(a),e.destroy_each(m,u)}}}function Qe(l){let a,n,y;return{c(){a=e.element("button"),e.attr(a,"class","ShowBalanceModalOverlay")},m(m,u){e.insert(m,a,u),n||(y=e.listen(a,"click",l[29]),n=!0)},p:e.noop,d(m){m&&e.detach(a),n=!1,y()}}}function dt(l){let a,n,y,m;function u(B,D){return B[2]?ct:st}let T=u(l),g=T(l),w=l[4]&&Qe(l);return{c(){a=e.element("div"),n=e.element("div"),g.c(),m=e.space(),w&&w.c(),e.attr(n,"class",y="ShowBalance "+(l[5]?"Mobile":""))},m(B,D){e.insert(B,a,D),e.append(a,n),g.m(n,null),e.append(a,m),w&&w.m(a,null),l[30](a)},p(B,D){T===(T=u(B))&&g?g.p(B,D):(g.d(1),g=T(B),g&&(g.c(),g.m(n,null))),D[0]&32&&y!==(y="ShowBalance "+(B[5]?"Mobile":""))&&e.attr(n,"class",y),B[4]?w?w.p(B,D):(w=Qe(B),w.c(),w.m(a,null)):w&&(w.d(1),w=null)},i:e.noop,o:e.noop,d(B){B&&e.detach(a),g.d(),w&&w.d(),l[30](null)}}}function ut(l,a,n){let y;e.component_subscribe(l,e.$format,t=>n(6,y=t));let{userid:m=""}=a,{session:u=""}=a,{endpoint:T=""}=a,{lang:g="en"}=a,{mbsource:w}=a,{clientstyling:B=""}=a,{clientstylingurl:D=""}=a,{translationurl:k=""}=a,{gmversion:M="gm16"}=a,{displaybalanceoption:_="All"}=a,{totalcalculationmode:S="totalCashAmount"}=a,{currencylocale:A="en"}=a,{currencydisplay:F="symbol"}=a,{maximumfractiondigits:Z="2"}=a,{minimumfractiondigits:J="0"}=a,{customdisplayformat:N=""}=a,L,q=!0,ie=!1,U=!1,O=!1,R=!1,j=window.navigator.userAgent,E,V="",te=[],le;const p={},se=["totalCashAmount","totalRealAmount"],oe=()=>{fetch(k).then(t=>t.json()).then(t=>Object.keys(t).forEach(i=>Pe(i,t[i]))).catch(t=>console.log(t))};Object.keys(Xe).forEach(t=>Pe(t,Xe[t]));const $=t=>{switch(t){case"balance":window.postMessage({type:"BalanceModalStatus",status:"open"},window.location.href),n(4,O=!0),setTimeout(()=>n(3,ie=!0),150);break;case"closebalance":n(3,ie=!1),window.postMessage({type:"BalanceModalStatus",status:"close"},window.location.href),setTimeout(()=>{n(4,O=!1)},150);break}},pe=t=>{if(N)return we(t);const i=A||g,r={style:"currency",currency:V,useGrouping:!0,currencyDisplay:F||"code",maximumFractionDigits:Z===""||isNaN(Number(Z))?2:Number(Z),minimumFractionDigits:J===""||isNaN(Number(J))?0:Number(J)};return new Intl.NumberFormat(i,r).format(t)},we=t=>{const i=[];let r="";for(const c of N)switch(c){default:r+=c;break;case"{":r&&i.push(r),r="";break;case"}":const[b,h]=r.split("|");if(r="",b.toLowerCase()==="currency")r=V;else if(b.toLowerCase()==="amount"){let s=",",C=".",v=2;h&&(h[0]!==" "&&(s=h[0]),h[1]!==" "&&(C=h[1]),h[2]!==" "&&!isNaN(Number(h[2]))&&(v=Number(h[2])));let[x,ee]=String(Math.floor(t*Ne(10,v))/Ne(10,v)).split(".");r+=x[0];for(let ae=1;ae<x.length;++ae)(x.length-ae)%3===0?r+=s+x[ae]:r+=x[ae];ee&&(r+=C+ee)}r&&i.push(r),r="";break}return i.push(r),i.join("")},re=()=>Ue(this,null,function*(){var i,r,c;n(2,q=!0);const t=new URL(`${T}/v1/player/${m}/account`);try{const b=yield fetch(t,{method:"GET",headers:{"X-SessionID":u}}),h=yield b.json();if(b.ok)window.postMessage({type:"BalancedFetched"},window.location.href),te=h.items,V=(i=te.find(s=>s.displayName==="Casino"))==null?void 0:i.currency,n(1,p.Total=[{amount:h.totalAmount[V]}],p),n(1,p.Real=[{amount:(r=te.find(s=>s.displayName==="Casino"))==null?void 0:r.balanceAmount}],p),n(1,p.Bonus=[{amount:(c=te.find(s=>s.displayName==="UBS"))==null?void 0:c.balanceAmount}],p);else throw new Error("Failed to fetch balance data !")}catch(b){console.log("Balance error: ",b)}finally{n(2,q=!1)}}),be=()=>{n(2,q=!0);const t=new URL(`${T}/v2/player/${m}/balance`),i=new Headers;i.append("X-SessionID",u),fetch(t,{method:"GET",headers:i}).then(c=>c.json()).then(c=>{c[S]||n(10,S=se[0]);const b=c.items.find(s=>s.type==="Real"&&s.walletAccountType==="Ordinary");if(V=b.currency,U=!!b.productType,n(1,p.Total=[{amount:0}],p),n(1,p.Real=[],p),n(1,p.Bonus=[],p),n(1,p.Credit=[],p),!U){le={lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1},n(1,p.Total[0].amount=c[S][V],p);for(const s of c.items)switch(s.type){case"Bonus":p.Bonus.length===0?p.Bonus.push({amount:s.amount}):n(1,p.Bonus[0].amount+=s.amount,p);break;case"Real":if(s.creditLine&&p.Credit.length===0&&p.Credit.push({amount:s.creditLine}),S==="totalRealAmount")continue;p.Real.length===0?p.Real.push({amount:s.amount}):n(1,p.Real[0].amount+=s.amount,p);break}for(const[s,C]of Object.entries(p))C.length<1&&delete p[s];n(2,q=!1);return}le={Casino:{lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1},Sports:{lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1}};let h=c.items;_&&_!=="All"&&(h=c.items.filter(s=>s.productType===_));for(const s of h){let C;switch(s.type){case"Bonus":C=p.Bonus.findIndex(v=>v.productType===s.productType),C>0?n(1,p.Bonus[C].amount+=s.amount,p):p.Bonus.push({amount:s.amount,productType:s.productType});break;case"Real":s.creditLine&&p.Credit.push({amount:s.creditLine,productType:s.productType}),C=p.Real.findIndex(v=>v.productType===s.productType),C>0?n(1,p.Real[C].amount+=s.amount,p):p.Real.push({amount:s.amount,productType:s.productType});break}}_e();for(const[s,C]of Object.entries(p))C.length<1&&delete p[s];n(2,q=!1)}).catch(c=>{throw n(2,q=!1),console.log("Balance fetch error",c),new Error("Failed to fetch balance data!")})},me=()=>{if(E&&E.close(),u.length<1)return;let t,i;switch(M){case"gm16":t=new URL(`${T}/v2/player/${m}/information/updates`),i=b=>Te(b);break;case"gmcore":t=new URL(`${T}/v1/player/${m}/balance/updates`),i=b=>De(b);break}const r={accept:"text/event-stream","X-SessionId":u},c=new it.EventSourcePolyfill(t,{headers:r});E=c,c.addEventListener("message",i)},Ce=t=>{let i;try{i=JSON.parse(t)}catch(r){console.log("Balance stream failed: ",r);return}return i},De=t=>{var b,h;const i=Ce(t.data);if(!i){me();return}let r="0";const c=i.balanceChange;te=te.map(s=>(c&&c[s.id]&&(s=Ve(ze({},s),{balanceAmount:c[s.id].afterAmount})),r=(parseFloat(s==null?void 0:s.balanceAmount)+parseFloat(r)).toString(),s)),n(1,p.Real=[{amount:(b=te[0])==null?void 0:b.balanceAmount}],p),n(1,p.Bonus=[{amount:(h=te[1])==null?void 0:h.balanceAmount}],p),n(1,p.Total=[{amount:Number(r)}],p)},Be=(t,i,r)=>{let c=null;switch(r.walletAccountType){case"Ordinary":(r.afterAmount!==r.affectedAmount||i.lastOrdinaryAfterAmount===0)&&(i.lastOrdinaryAfterAmount=r.afterAmount,i.showCreditLineAfterAmount||(c=r.afterAmount));break;case"CreditLine":r.afterAmount!==0?(c=r.afterAmount,i.showCreditLineAfterAmount=!0):(c=i.lastOrdinaryAfterAmount,i.showCreditLineAfterAmount=!1);break;default:c=r.afterAmount}return c===null?t:c},_e=()=>{switch(S){case"totalCashAmount":let t=0;for(const r of["Real","Bonus"])for(const c of p[r])t+=Math.max(c.amount,0);n(1,p.Total[0].amount=t,p);break;case"totalRealAmount":if(!U)return;let i=0;for(const r of p.Real)i+=r.amount;n(1,p.Total[0].amount=i,p)}},Te=t=>{const i=Ce(t.data);if(!i){me();return}if(i.type!=="BALANCE_UPDATE_V2")return;const r=i.body.balanceChange;for(const[c,b]of Object.entries(r))if(S==="totalRealAmount"&&c==="Real"&&!U&&n(1,p.Total[0].amount=Be(p.Total[0].amount,le,b),p),!!p[c])for(const h of p[c]){if(!U){h.amount=c==="Real"?Be(h.amount,le,b):b.afterAmount;continue}b.productType===h.productType&&(h.amount=c==="Real"?Be(h.amount,le[h.productType],b):b.afterAmount)}_e()},ge=()=>{$("closebalance"),window.postMessage({type:"GoToDeposit"},window.location.href),typeof gtag=="function"&>ag("event","GoToDeposit",{context:"PlayerAccountBalanceModal"})},fe=()=>{se.includes(S)||(console.error(`Unsupported value ('${S}') for totalcalculationmode parameter. Only the following values are supported ${se}. Using default value ('${se[0]}').`),n(10,S=se[0]))},K=()=>{switch(rt(g),fe(),M){case"gmcore":re();break;case"gm16":be();break;default:throw Error(`Invalid apiversion attribute: ${M}`)}},Ae=t=>t.data&&t.data.type==="LogoutSuccessfull"&&E.close(),Me=()=>{window.postMessage({type:"UpdateBalanceBackground"},window.location.href)};e.onMount(()=>(window.addEventListener("message",Ae,!1),n(5,R=e.isMobile(j)),()=>{window.removeEventListener("message",Ae),E&&E.close()}));const ke=()=>$("balance"),xe=()=>$("closebalance"),o=()=>ge(),d=()=>$("closebalance");function f(t){e.binding_callbacks[t?"unshift":"push"](()=>{L=t,n(0,L)})}return l.$$set=t=>{"userid"in t&&n(11,m=t.userid),"session"in t&&n(12,u=t.session),"endpoint"in t&&n(13,T=t.endpoint),"lang"in t&&n(14,g=t.lang),"mbsource"in t&&n(15,w=t.mbsource),"clientstyling"in t&&n(16,B=t.clientstyling),"clientstylingurl"in t&&n(17,D=t.clientstylingurl),"translationurl"in t&&n(18,k=t.translationurl),"gmversion"in t&&n(19,M=t.gmversion),"displaybalanceoption"in t&&n(20,_=t.displaybalanceoption),"totalcalculationmode"in t&&n(10,S=t.totalcalculationmode),"currencylocale"in t&&n(21,A=t.currencylocale),"currencydisplay"in t&&n(22,F=t.currencydisplay),"maximumfractiondigits"in t&&n(23,Z=t.maximumfractiondigits),"minimumfractiondigits"in t&&n(24,J=t.minimumfractiondigits),"customdisplayformat"in t&&n(25,N=t.customdisplayformat)},l.$$.update=()=>{l.$$.dirty[0]&1603584&&T&&m&&u&&g&&M&&_&&K(),l.$$.dirty[0]&538624&&T&&m&&u&&M&&me(),l.$$.dirty[0]&262144&&k&&oe(),l.$$.dirty[0]&2&&p.Total&&Me(),l.$$.dirty[0]&65537&&B&&L&&e.setClientStyling(L,B),l.$$.dirty[0]&131073&&D&&L&&e.setClientStylingURL(L,D),l.$$.dirty[0]&32769&&w&&L&&e.setStreamStyling(L,`${w}.Style`)},[L,p,q,ie,O,R,y,$,pe,ge,S,m,u,T,g,w,B,D,k,M,_,A,F,Z,J,N,ke,xe,o,d,f]}class Ze extends e.SvelteComponent{constructor(a){super(),e.init(this,a,ut,dt,e.safe_not_equal,{userid:11,session:12,endpoint:13,lang:14,mbsource:15,clientstyling:16,clientstylingurl:17,translationurl:18,gmversion:19,displaybalanceoption:20,totalcalculationmode:10,currencylocale:21,currencydisplay:22,maximumfractiondigits:23,minimumfractiondigits:24,customdisplayformat:25},lt,[-1,-1])}get userid(){return this.$$.ctx[11]}set userid(a){this.$$set({userid:a}),e.flush()}get session(){return this.$$.ctx[12]}set session(a){this.$$set({session:a}),e.flush()}get endpoint(){return this.$$.ctx[13]}set endpoint(a){this.$$set({endpoint:a}),e.flush()}get lang(){return this.$$.ctx[14]}set lang(a){this.$$set({lang:a}),e.flush()}get mbsource(){return this.$$.ctx[15]}set mbsource(a){this.$$set({mbsource:a}),e.flush()}get clientstyling(){return this.$$.ctx[16]}set clientstyling(a){this.$$set({clientstyling:a}),e.flush()}get clientstylingurl(){return this.$$.ctx[17]}set clientstylingurl(a){this.$$set({clientstylingurl:a}),e.flush()}get translationurl(){return this.$$.ctx[18]}set translationurl(a){this.$$set({translationurl:a}),e.flush()}get gmversion(){return this.$$.ctx[19]}set gmversion(a){this.$$set({gmversion:a}),e.flush()}get displaybalanceoption(){return this.$$.ctx[20]}set displaybalanceoption(a){this.$$set({displaybalanceoption:a}),e.flush()}get totalcalculationmode(){return this.$$.ctx[10]}set totalcalculationmode(a){this.$$set({totalcalculationmode:a}),e.flush()}get currencylocale(){return this.$$.ctx[21]}set currencylocale(a){this.$$set({currencylocale:a}),e.flush()}get currencydisplay(){return this.$$.ctx[22]}set currencydisplay(a){this.$$set({currencydisplay:a}),e.flush()}get maximumfractiondigits(){return this.$$.ctx[23]}set maximumfractiondigits(a){this.$$set({maximumfractiondigits:a}),e.flush()}get minimumfractiondigits(){return this.$$.ctx[24]}set minimumfractiondigits(a){this.$$set({minimumfractiondigits:a}),e.flush()}get customdisplayformat(){return this.$$.ctx[25]}set customdisplayformat(a){this.$$set({customdisplayformat:a}),e.flush()}}e.create_custom_element(Ze,{userid:{},session:{},endpoint:{},lang:{},mbsource:{},clientstyling:{},clientstylingurl:{},translationurl:{},gmversion:{},displaybalanceoption:{},totalcalculationmode:{},currencylocale:{},currencydisplay:{},maximumfractiondigits:{},minimumfractiondigits:{},customdisplayformat:{}},[],[],!0);exports.default=Ze;
|
|
@@ -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/CasinoHeaderControllerNd-
|
|
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/CasinoHeaderControllerNd-BvKTqLpZ.cjs")).then(({default:t})=>{!customElements.get("casino-header-controller-nd")&&customElements.define("casino-header-controller-nd",t.element)})}
|
|
@@ -10,7 +10,7 @@ if (typeof window != "undefined") {
|
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
|
-
customElements.define = n(customElements.define), import("../components/CasinoHeaderControllerNd-
|
|
13
|
+
customElements.define = n(customElements.define), import("../components/CasinoHeaderControllerNd-gILH6sRG.js").then(({ default: t }) => {
|
|
14
14
|
!customElements.get("casino-header-controller-nd") && customElements.define("casino-header-controller-nd", t.element);
|
|
15
15
|
});
|
|
16
16
|
}
|