@everymatrix/casino-header-controller 1.83.2 → 1.83.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1386 @@
1
+ import { b as rt, $ as it, Q as st, S as lt, i as ct, s as dt, f as j, d as ut, n as Xe, e as de, h as ue, x as L, k as O, j as fe, v as H, l as ft, o as pt, y as Ne, p as ht, w as we, A as be, r as mt, B as Ie, C as nt, t as yt, J as gt, K as vt, L as wt, c as bt, I as Bt } from "./CasinoHamburgerMenu-DFge6wNk.js";
2
+ function We(u, a) {
3
+ rt(u, a);
4
+ }
5
+ function Tt(u) {
6
+ it.set(u);
7
+ }
8
+ const Ye = {
9
+ en: {
10
+ Title: "Your Balance",
11
+ Total: "Total Balance",
12
+ Real: "Cash Balance",
13
+ Bonus: "Bonus Balance",
14
+ Credit: "Credit Balance",
15
+ Casino: "Casino",
16
+ Sports: "Sports",
17
+ DepositButton: "Deposit",
18
+ Loading: "Loading ..."
19
+ },
20
+ "zh-hk": {
21
+ Title: "您的結餘",
22
+ Total: "總結餘",
23
+ Real: "現金結餘",
24
+ Bonus: "紅利結餘",
25
+ Credit: "信用結餘",
26
+ Casino: "賭場",
27
+ Sports: "體育",
28
+ DepositButton: "存款",
29
+ Loading: "載入中 ..."
30
+ },
31
+ de: {
32
+ Title: "Ihr Guthaben",
33
+ Total: "Gesamtguthaben",
34
+ Real: "Barguthaben",
35
+ Bonus: "Bonusguthaben",
36
+ Credit: "Kreditguthaben",
37
+ Casino: "Casino",
38
+ Sports: "Sport",
39
+ DepositButton: "Einzahlen",
40
+ Loading: "Wird geladen ..."
41
+ },
42
+ it: {
43
+ Title: "Il tuo saldo",
44
+ Total: "Saldo totale",
45
+ Real: "Saldo in contanti",
46
+ Bonus: "Saldo bonus",
47
+ Credit: "Saldo di credito",
48
+ Casino: "Casinò",
49
+ Sports: "Sport",
50
+ DepositButton: "Deposita",
51
+ Loading: "Caricamento ..."
52
+ },
53
+ fr: {
54
+ Title: "Votre solde",
55
+ Total: "Solde total",
56
+ Real: "Solde en espèces",
57
+ Bonus: "Solde bonus",
58
+ Credit: "Solde de crédit",
59
+ Casino: "Casino",
60
+ Sports: "Sports",
61
+ DepositButton: "Dépôt",
62
+ Loading: "Chargement ..."
63
+ },
64
+ es: {
65
+ Title: "Tu saldo",
66
+ Total: "Saldo total",
67
+ Real: "Saldo en efectivo",
68
+ Bonus: "Saldo de bono",
69
+ Credit: "Saldo de crédito",
70
+ Casino: "Casino",
71
+ Sports: "Deportes",
72
+ DepositButton: "Depósito",
73
+ Loading: "Cargando ..."
74
+ },
75
+ tr: {
76
+ Title: "Bakiyeniz",
77
+ Total: "Toplam Bakiye",
78
+ Real: "Nakit Bakiye",
79
+ Bonus: "Bonus Bakiyesi",
80
+ Credit: "Kredi Bakiyesi",
81
+ Casino: "Kumarhane",
82
+ Sports: "Spor",
83
+ DepositButton: "Yatır",
84
+ Loading: "Yükleniyor ..."
85
+ },
86
+ ru: {
87
+ Title: "Ваш баланс",
88
+ Total: "Общий баланс",
89
+ Real: "Денежный баланс",
90
+ Bonus: "Бонусный баланс",
91
+ Credit: "Кредитный баланс",
92
+ Casino: "Казино",
93
+ Sports: "Спорт",
94
+ DepositButton: "Депозит",
95
+ Loading: "Загружается ..."
96
+ },
97
+ ro: {
98
+ Title: "Soldul tău",
99
+ Total: "Sold total",
100
+ Real: "Sold în numerar",
101
+ Bonus: "Sold bonus",
102
+ Credit: "Sold credit",
103
+ Casino: "Cazinou",
104
+ Sports: "Sporturi",
105
+ DepositButton: "Depozit",
106
+ Loading: "Se încarcă ..."
107
+ },
108
+ hr: {
109
+ Title: "Vaš saldo",
110
+ Total: "Ukupni saldo",
111
+ Real: "Gotovinski saldo",
112
+ Bonus: "Bonus saldo",
113
+ Credit: "Kreditni saldo",
114
+ Casino: "Casino",
115
+ Sports: "Sportovi",
116
+ DepositButton: "Depozit",
117
+ Loading: "Učitavanje ..."
118
+ },
119
+ hu: {
120
+ Title: "Az egyenleged",
121
+ Total: "Teljes egyenleg",
122
+ Real: "Készpénz egyenleg",
123
+ Bonus: "Bónusz egyenleg",
124
+ Credit: "Hitel egyenleg",
125
+ Casino: "Kaszinó",
126
+ Sports: "Sport",
127
+ DepositButton: "Befizetés",
128
+ Loading: "Betöltés ..."
129
+ },
130
+ pl: {
131
+ Title: "Twoje saldo",
132
+ Total: "Całkowite saldo",
133
+ Real: "Saldo gotówkowe",
134
+ Bonus: "Saldo bonusowe",
135
+ Credit: "Saldo kredytowe",
136
+ Casino: "Kasyno",
137
+ Sports: "Sport",
138
+ DepositButton: "Wpłać",
139
+ Loading: "Ładowanie ..."
140
+ },
141
+ pt: {
142
+ Title: "Seu Saldo",
143
+ Total: "Saldo Total",
144
+ Real: "Saldo em Dinheiro",
145
+ Bonus: "Saldo de Bônus",
146
+ Credit: "Saldo de Crédito",
147
+ Casino: "Cassino",
148
+ Sports: "Esportes",
149
+ DepositButton: "Depositar",
150
+ Loading: "Carregando ..."
151
+ },
152
+ sl: {
153
+ Title: "Vaš saldo",
154
+ Total: "Skupni saldo",
155
+ Real: "Gotovinski saldo",
156
+ Bonus: "Bonus saldo",
157
+ Credit: "Kreditni saldo",
158
+ Casino: "Kasino",
159
+ Sports: "Šport",
160
+ DepositButton: "Depozit",
161
+ Loading: "Nalaganje ..."
162
+ },
163
+ sr: {
164
+ Title: "Vaš saldo",
165
+ Total: "Ukupan saldo",
166
+ Real: "Gotovinski saldo",
167
+ Bonus: "Bonus saldo",
168
+ Credit: "Kreditni saldo",
169
+ Casino: "Kasino",
170
+ Sports: "Sport",
171
+ DepositButton: "Depozit",
172
+ Loading: "Učitavanje ..."
173
+ },
174
+ "pt-br": {
175
+ Title: "Seu Saldo",
176
+ Total: "Saldo Total",
177
+ Real: "Saldo em Dinheiro",
178
+ Bonus: "Saldo de Bônus",
179
+ Credit: "Saldo de Crédito",
180
+ Casino: "Cassino",
181
+ Sports: "Esportes",
182
+ DepositButton: "Depositar",
183
+ Loading: "Carregando ..."
184
+ },
185
+ "es-mx": {
186
+ Title: "Tu saldo",
187
+ Total: "Saldo total",
188
+ Real: "Saldo en efectivo",
189
+ Bonus: "Saldo de bono",
190
+ Credit: "Saldo de crédito",
191
+ Casino: "Casino",
192
+ Sports: "Deportes",
193
+ DepositButton: "Depósito",
194
+ Loading: "Cargando ..."
195
+ },
196
+ "en-us": {
197
+ Title: "Your Balance",
198
+ Total: "Total Balance",
199
+ Real: "Cash Balance",
200
+ Bonus: "Bonus Balance",
201
+ Credit: "Credit Balance",
202
+ Casino: "Casino",
203
+ Sports: "Sports",
204
+ DepositButton: "Deposit",
205
+ Loading: "Loading ..."
206
+ }
207
+ };
208
+ var Ke = { exports: {} };
209
+ /** @license
210
+ * eventsource.js
211
+ * Available under MIT License (MIT)
212
+ * https://github.com/Yaffle/EventSource/
213
+ */
214
+ (function(u, a) {
215
+ (function(r) {
216
+ var y = r.setTimeout, c = r.clearTimeout, l = r.XMLHttpRequest, v = r.XDomainRequest, f = r.ActiveXObject, b = r.EventSource, _ = r.document, T = r.Promise, S = r.fetch, D = r.Response, R = r.TextDecoder, M = r.TextEncoder, Q = r.AbortController;
217
+ if (typeof window < "u" && typeof _ < "u" && !("readyState" in _) && _.body == null && (_.readyState = "loading", window.addEventListener("load", function(n) {
218
+ _.readyState = "complete";
219
+ }, !1)), l == null && f != null && (l = function() {
220
+ return new f("Microsoft.XMLHTTP");
221
+ }), Object.create == null && (Object.create = function(n) {
222
+ function e() {
223
+ }
224
+ return e.prototype = n, new e();
225
+ }), Date.now || (Date.now = function() {
226
+ return (/* @__PURE__ */ new Date()).getTime();
227
+ }), Q == null) {
228
+ var ne = S;
229
+ S = function(n, e) {
230
+ var o = e.signal;
231
+ return ne(n, { headers: e.headers, credentials: e.credentials, cache: e.cache }).then(function(t) {
232
+ var i = t.body.getReader();
233
+ return o._reader = i, o._aborted && o._reader.cancel(), {
234
+ status: t.status,
235
+ statusText: t.statusText,
236
+ headers: t.headers,
237
+ body: {
238
+ getReader: function() {
239
+ return i;
240
+ }
241
+ }
242
+ };
243
+ });
244
+ }, Q = function() {
245
+ this.signal = {
246
+ _reader: null,
247
+ _aborted: !1
248
+ }, this.abort = function() {
249
+ this.signal._reader != null && this.signal._reader.cancel(), this.signal._aborted = !0;
250
+ };
251
+ };
252
+ }
253
+ function ae() {
254
+ this.bitsNeeded = 0, this.codePoint = 0;
255
+ }
256
+ ae.prototype.decode = function(n) {
257
+ function e(w, C, g) {
258
+ if (g === 1)
259
+ return w >= 128 >> C && w << C <= 2047;
260
+ if (g === 2)
261
+ return w >= 2048 >> C && w << C <= 55295 || w >= 57344 >> C && w << C <= 65535;
262
+ if (g === 3)
263
+ return w >= 65536 >> C && w << C <= 1114111;
264
+ throw new Error();
265
+ }
266
+ function o(w, C) {
267
+ if (w === 6 * 1)
268
+ return C >> 6 > 15 ? 3 : C > 31 ? 2 : 1;
269
+ if (w === 6 * 2)
270
+ return C > 15 ? 3 : 2;
271
+ if (w === 6 * 3)
272
+ return 3;
273
+ throw new Error();
274
+ }
275
+ for (var t = 65533, i = "", s = this.bitsNeeded, p = this.codePoint, h = 0; h < n.length; h += 1) {
276
+ var m = n[h];
277
+ s !== 0 && (m < 128 || m > 191 || !e(p << 6 | m & 63, s - 6, o(s, p))) && (s = 0, p = t, i += String.fromCharCode(p)), s === 0 ? (m >= 0 && m <= 127 ? (s = 0, p = m) : m >= 192 && m <= 223 ? (s = 6 * 1, p = m & 31) : m >= 224 && m <= 239 ? (s = 6 * 2, p = m & 15) : m >= 240 && m <= 247 ? (s = 6 * 3, p = m & 7) : (s = 0, p = t), s !== 0 && !e(p, s, o(s, p)) && (s = 0, p = t)) : (s -= 6, p = p << 6 | m & 63), s === 0 && (p <= 65535 ? i += String.fromCharCode(p) : (i += String.fromCharCode(55296 + (p - 65535 - 1 >> 10)), i += String.fromCharCode(56320 + (p - 65535 - 1 & 1023))));
278
+ }
279
+ return this.bitsNeeded = s, this.codePoint = p, i;
280
+ };
281
+ var V = function() {
282
+ try {
283
+ return new R().decode(new M().encode("test"), { stream: !0 }) === "test";
284
+ } catch (n) {
285
+ console.debug("TextDecoder does not support streaming option. Using polyfill instead: " + n);
286
+ }
287
+ return !1;
288
+ };
289
+ (R == null || M == null || !V()) && (R = ae);
290
+ var B = function() {
291
+ };
292
+ function A(n) {
293
+ this.withCredentials = !1, this.readyState = 0, this.status = 0, this.statusText = "", this.responseText = "", this.onprogress = B, this.onload = B, this.onerror = B, this.onreadystatechange = B, this._contentType = "", this._xhr = n, this._sendTimeout = 0, this._abort = B;
294
+ }
295
+ A.prototype.open = function(n, e) {
296
+ this._abort(!0);
297
+ var o = this, t = this._xhr, i = 1, s = 0;
298
+ this._abort = function(g) {
299
+ o._sendTimeout !== 0 && (c(o._sendTimeout), o._sendTimeout = 0), (i === 1 || i === 2 || i === 3) && (i = 4, t.onload = B, t.onerror = B, t.onabort = B, t.onprogress = B, t.onreadystatechange = B, t.abort(), s !== 0 && (c(s), s = 0), g || (o.readyState = 4, o.onabort(null), o.onreadystatechange())), i = 0;
300
+ };
301
+ var p = function() {
302
+ if (i === 1) {
303
+ var g = 0, x = "", ie = void 0;
304
+ if ("contentType" in t)
305
+ g = 200, x = "OK", ie = t.contentType;
306
+ else
307
+ try {
308
+ g = t.status, x = t.statusText, ie = t.getResponseHeader("Content-Type");
309
+ } catch {
310
+ g = 0, x = "", ie = void 0;
311
+ }
312
+ g !== 0 && (i = 2, o.readyState = 2, o.status = g, o.statusText = x, o._contentType = ie, o.onreadystatechange());
313
+ }
314
+ }, h = function() {
315
+ if (p(), i === 2 || i === 3) {
316
+ i = 3;
317
+ var g = "";
318
+ try {
319
+ g = t.responseText;
320
+ } catch {
321
+ }
322
+ o.readyState = 3, o.responseText = g, o.onprogress();
323
+ }
324
+ }, m = function(g, x) {
325
+ if ((x == null || x.preventDefault == null) && (x = {
326
+ preventDefault: B
327
+ }), h(), i === 1 || i === 2 || i === 3) {
328
+ if (i = 4, s !== 0 && (c(s), s = 0), o.readyState = 4, g === "load")
329
+ o.onload(x);
330
+ else if (g === "error")
331
+ o.onerror(x);
332
+ else if (g === "abort")
333
+ o.onabort(x);
334
+ else
335
+ throw new TypeError();
336
+ o.onreadystatechange();
337
+ }
338
+ }, w = function(g) {
339
+ t != null && (t.readyState === 4 ? (!("onload" in t) || !("onerror" in t) || !("onabort" in t)) && m(t.responseText === "" ? "error" : "load", g) : t.readyState === 3 ? "onprogress" in t || h() : t.readyState === 2 && p());
340
+ }, C = function() {
341
+ s = y(function() {
342
+ C();
343
+ }, 500), t.readyState === 3 && h();
344
+ };
345
+ "onload" in t && (t.onload = function(g) {
346
+ m("load", g);
347
+ }), "onerror" in t && (t.onerror = function(g) {
348
+ m("error", g);
349
+ }), "onabort" in t && (t.onabort = function(g) {
350
+ m("abort", g);
351
+ }), "onprogress" in t && (t.onprogress = h), "onreadystatechange" in t && (t.onreadystatechange = function(g) {
352
+ w(g);
353
+ }), ("contentType" in t || !("ontimeout" in l.prototype)) && (e += (e.indexOf("?") === -1 ? "?" : "&") + "padding=true"), t.open(n, e, !0), "readyState" in t && (s = y(function() {
354
+ C();
355
+ }, 0));
356
+ }, A.prototype.abort = function() {
357
+ this._abort(!1);
358
+ }, A.prototype.getResponseHeader = function(n) {
359
+ return this._contentType;
360
+ }, A.prototype.setRequestHeader = function(n, e) {
361
+ var o = this._xhr;
362
+ "setRequestHeader" in o && o.setRequestHeader(n, e);
363
+ }, A.prototype.getAllResponseHeaders = function() {
364
+ return this._xhr.getAllResponseHeaders != null && this._xhr.getAllResponseHeaders() || "";
365
+ }, A.prototype.send = function() {
366
+ if ((!("ontimeout" in l.prototype) || !("sendAsBinary" in l.prototype) && !("mozAnon" in l.prototype)) && _ != null && _.readyState != null && _.readyState !== "complete") {
367
+ var n = this;
368
+ n._sendTimeout = y(function() {
369
+ n._sendTimeout = 0, n.send();
370
+ }, 4);
371
+ return;
372
+ }
373
+ var e = this._xhr;
374
+ "withCredentials" in e && (e.withCredentials = this.withCredentials);
375
+ try {
376
+ e.send(void 0);
377
+ } catch (o) {
378
+ throw o;
379
+ }
380
+ };
381
+ function F(n) {
382
+ return n.replace(/[A-Z]/g, function(e) {
383
+ return String.fromCharCode(e.charCodeAt(0) + 32);
384
+ });
385
+ }
386
+ function E(n) {
387
+ for (var e = /* @__PURE__ */ Object.create(null), o = n.split(`\r
388
+ `), t = 0; t < o.length; t += 1) {
389
+ var i = o[t], s = i.split(": "), p = s.shift(), h = s.join(": ");
390
+ e[F(p)] = h;
391
+ }
392
+ this._map = e;
393
+ }
394
+ E.prototype.get = function(n) {
395
+ return this._map[F(n)];
396
+ }, l != null && l.HEADERS_RECEIVED == null && (l.HEADERS_RECEIVED = 2);
397
+ function J() {
398
+ }
399
+ J.prototype.open = function(n, e, o, t, i, s, p) {
400
+ n.open("GET", i);
401
+ var h = 0;
402
+ n.onprogress = function() {
403
+ var w = n.responseText, C = w.slice(h);
404
+ h += C.length, o(C);
405
+ }, n.onerror = function(w) {
406
+ w.preventDefault(), t(new Error("NetworkError"));
407
+ }, n.onload = function() {
408
+ t(null);
409
+ }, n.onabort = function() {
410
+ t(null);
411
+ }, n.onreadystatechange = function() {
412
+ if (n.readyState === l.HEADERS_RECEIVED) {
413
+ var w = n.status, C = n.statusText, g = n.getResponseHeader("Content-Type"), x = n.getAllResponseHeaders();
414
+ e(w, C, g, new E(x));
415
+ }
416
+ }, n.withCredentials = s;
417
+ for (var m in p)
418
+ Object.prototype.hasOwnProperty.call(p, m) && n.setRequestHeader(m, p[m]);
419
+ return n.send(), n;
420
+ };
421
+ function pe(n) {
422
+ this._headers = n;
423
+ }
424
+ pe.prototype.get = function(n) {
425
+ return this._headers.get(n);
426
+ };
427
+ function oe() {
428
+ }
429
+ oe.prototype.open = function(n, e, o, t, i, s, p) {
430
+ var h = null, m = new Q(), w = m.signal, C = new R();
431
+ return S(i, {
432
+ headers: p,
433
+ credentials: s ? "include" : "same-origin",
434
+ signal: w,
435
+ cache: "no-store"
436
+ }).then(function(g) {
437
+ return h = g.body.getReader(), e(g.status, g.statusText, g.headers.get("Content-Type"), new pe(g.headers)), new T(function(x, ie) {
438
+ var Re = function() {
439
+ h.read().then(function(X) {
440
+ if (X.done)
441
+ x(void 0);
442
+ else {
443
+ var z = C.decode(X.value, { stream: !0 });
444
+ o(z), Re();
445
+ }
446
+ }).catch(function(X) {
447
+ ie(X);
448
+ });
449
+ };
450
+ Re();
451
+ });
452
+ }).catch(function(g) {
453
+ if (g.name !== "AbortError")
454
+ return g;
455
+ }).then(function(g) {
456
+ t(g);
457
+ }), {
458
+ abort: function() {
459
+ h?.cancel(), m.abort();
460
+ }
461
+ };
462
+ };
463
+ function W() {
464
+ this._listeners = /* @__PURE__ */ Object.create(null);
465
+ }
466
+ function Z(n) {
467
+ y(function() {
468
+ throw n;
469
+ }, 0);
470
+ }
471
+ W.prototype.dispatchEvent = function(n) {
472
+ n.target = this;
473
+ var e = this._listeners[n.type];
474
+ if (e != null)
475
+ for (var o = e.length, t = 0; t < o; t += 1) {
476
+ var i = e[t];
477
+ try {
478
+ typeof i.handleEvent == "function" ? i.handleEvent(n) : i.call(this, n);
479
+ } catch (s) {
480
+ Z(s);
481
+ }
482
+ }
483
+ }, W.prototype.addEventListener = function(n, e) {
484
+ n = String(n);
485
+ var o = this._listeners, t = o[n];
486
+ t == null && (t = [], o[n] = t);
487
+ for (var i = !1, s = 0; s < t.length; s += 1)
488
+ t[s] === e && (i = !0);
489
+ i || t.push(e);
490
+ }, W.prototype.removeEventListener = function(n, e) {
491
+ n = String(n);
492
+ var o = this._listeners, t = o[n];
493
+ if (t != null) {
494
+ for (var i = [], s = 0; s < t.length; s += 1)
495
+ t[s] !== e && i.push(t[s]);
496
+ i.length === 0 ? delete o[n] : o[n] = i;
497
+ }
498
+ };
499
+ function Y(n) {
500
+ this.type = n, this.target = void 0;
501
+ }
502
+ function d(n, e) {
503
+ Y.call(this, n), this.data = e.data, this.lastEventId = e.lastEventId;
504
+ }
505
+ d.prototype = Object.create(Y.prototype);
506
+ function re(n, e) {
507
+ Y.call(this, n), this.status = e.status, this.statusText = e.statusText, this.headers = e.headers;
508
+ }
509
+ re.prototype = Object.create(Y.prototype);
510
+ function De(n, e) {
511
+ Y.call(this, n), this.error = e.error;
512
+ }
513
+ De.prototype = Object.create(Y.prototype);
514
+ var Ce = -1, te = 0, he = 1, ye = 2, ge = -1, $ = 0, Ae = 1, Be = 2, Le = 3, je = /^text\/event\-stream(;.*)?$/i, Me = 1e3, He = 18e6, _e = function(n, e) {
515
+ var o = n == null ? e : parseInt(n, 10);
516
+ return o !== o && (o = e), xe(o);
517
+ }, xe = function(n) {
518
+ return Math.min(Math.max(n, Me), He);
519
+ }, me = function(n, e, o) {
520
+ try {
521
+ typeof e == "function" && e.call(n, o);
522
+ } catch (t) {
523
+ Z(t);
524
+ }
525
+ };
526
+ function G(n, e) {
527
+ W.call(this), e = e || {}, 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, Pe(this, n, e);
528
+ }
529
+ function ze() {
530
+ return l != null && "withCredentials" in l.prototype || v == null ? new l() : new v();
531
+ }
532
+ var Ue = S != null && D != null && "body" in D.prototype;
533
+ function Pe(n, e, o) {
534
+ e = String(e);
535
+ var t = !!o.withCredentials, i = o.lastEventIdQueryParameterName || "lastEventId", s = xe(1e3), p = _e(o.heartbeatTimeout, 45e3), h = "", m = s, w = !1, C = 0, g = o.headers || {}, x = o.Transport, ie = Ue && x == null ? void 0 : new A(x != null ? new x() : ze()), Re = x != null && typeof x != "string" ? new x() : ie == null ? new oe() : new J(), X = void 0, z = 0, ee = Ce, Te = "", ke = "", se = "", Oe = "", U = $, Ve = 0, ve = 0, at = function(N, k, K, q) {
536
+ if (ee === te)
537
+ if (N === 200 && K != null && je.test(K)) {
538
+ ee = he, w = Date.now(), m = s, n.readyState = he;
539
+ var P = new re("open", {
540
+ status: N,
541
+ statusText: k,
542
+ headers: q
543
+ });
544
+ n.dispatchEvent(P), me(n, n.onopen, P);
545
+ } else {
546
+ var I = "";
547
+ N !== 200 ? (k && (k = k.replace(/\s+/g, " ")), I = "EventSource's response has a status " + N + " " + k + " that is not 200. Aborting the connection.") : I = "EventSource's response has a Content-Type specifying an unsupported type: " + (K == null ? "-" : K.replace(/\s+/g, " ")) + ". Aborting the connection.", Ge();
548
+ var P = new re("error", {
549
+ status: N,
550
+ statusText: k,
551
+ headers: q
552
+ });
553
+ n.dispatchEvent(P), me(n, n.onerror, P), console.error(I);
554
+ }
555
+ }, ot = function(N) {
556
+ if (ee === he) {
557
+ for (var k = -1, K = 0; K < N.length; K += 1) {
558
+ var q = N.charCodeAt(K);
559
+ (q === 10 || q === 13) && (k = K);
560
+ }
561
+ var P = (k !== -1 ? Oe : "") + N.slice(0, k + 1);
562
+ Oe = (k === -1 ? Oe : "") + N.slice(k + 1), N !== "" && (w = Date.now(), C += N.length);
563
+ for (var I = 0; I < P.length; I += 1) {
564
+ var q = P.charCodeAt(I);
565
+ if (U === ge && q === 10)
566
+ U = $;
567
+ else if (U === ge && (U = $), q === 13 || q === 10) {
568
+ if (U !== $) {
569
+ U === Ae && (ve = I + 1);
570
+ var le = P.slice(Ve, ve - 1), ce = P.slice(ve + (ve < I && P.charCodeAt(ve) === 32 ? 1 : 0), I);
571
+ le === "data" ? (Te += `
572
+ `, Te += ce) : le === "id" ? ke = ce : le === "event" ? se = ce : le === "retry" ? (s = _e(ce, s), m = s) : le === "heartbeatTimeout" && (p = _e(ce, p), z !== 0 && (c(z), z = y(function() {
573
+ Ee();
574
+ }, p)));
575
+ }
576
+ if (U === $) {
577
+ if (Te !== "") {
578
+ h = ke, se === "" && (se = "message");
579
+ var Se = new d(se, {
580
+ data: Te.slice(1),
581
+ lastEventId: ke
582
+ });
583
+ if (n.dispatchEvent(Se), se === "open" ? me(n, n.onopen, Se) : se === "message" ? me(n, n.onmessage, Se) : se === "error" && me(n, n.onerror, Se), ee === ye)
584
+ return;
585
+ }
586
+ Te = "", se = "";
587
+ }
588
+ U = q === 13 ? ge : $;
589
+ } else
590
+ U === $ && (Ve = I, U = Ae), U === Ae ? q === 58 && (ve = I + 1, U = Be) : U === Be && (U = Le);
591
+ }
592
+ }
593
+ }, qe = function(N) {
594
+ if (ee === he || ee === te) {
595
+ ee = Ce, z !== 0 && (c(z), z = 0), z = y(function() {
596
+ Ee();
597
+ }, m), m = xe(Math.min(s * 16, m * 2)), n.readyState = te;
598
+ var k = new De("error", { error: N });
599
+ n.dispatchEvent(k), me(n, n.onerror, k), N != null && console.error(N);
600
+ }
601
+ }, Ge = function() {
602
+ ee = ye, X != null && (X.abort(), X = void 0), z !== 0 && (c(z), z = 0), n.readyState = ye;
603
+ }, Ee = function() {
604
+ if (z = 0, ee !== Ce) {
605
+ if (!w && X != null)
606
+ qe(new Error("No activity within " + p + " milliseconds. " + (ee === te ? "No response received." : C + " chars received.") + " Reconnecting.")), X != null && (X.abort(), X = void 0);
607
+ else {
608
+ var N = Math.max((w || Date.now()) + p - Date.now(), 1);
609
+ w = !1, z = y(function() {
610
+ Ee();
611
+ }, N);
612
+ }
613
+ return;
614
+ }
615
+ w = !1, C = 0, z = y(function() {
616
+ Ee();
617
+ }, p), ee = te, Te = "", se = "", ke = h, Oe = "", Ve = 0, ve = 0, U = $;
618
+ var k = e;
619
+ if (e.slice(0, 5) !== "data:" && e.slice(0, 5) !== "blob:" && h !== "") {
620
+ var K = e.indexOf("?");
621
+ k = K === -1 ? e : e.slice(0, K + 1) + e.slice(K + 1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g, function(ce, Se) {
622
+ return Se === i ? "" : ce;
623
+ }), k += (e.indexOf("?") === -1 ? "?" : "&") + i + "=" + encodeURIComponent(h);
624
+ }
625
+ var q = n.withCredentials, P = {};
626
+ P.Accept = "text/event-stream";
627
+ var I = n.headers;
628
+ if (I != null)
629
+ for (var le in I)
630
+ Object.prototype.hasOwnProperty.call(I, le) && (P[le] = I[le]);
631
+ try {
632
+ X = Re.open(ie, at, ot, qe, k, q, P);
633
+ } catch (ce) {
634
+ throw Ge(), ce;
635
+ }
636
+ };
637
+ n.url = e, n.readyState = te, n.withCredentials = t, n.headers = g, n._close = Ge, Ee();
638
+ }
639
+ G.prototype = Object.create(W.prototype), G.prototype.CONNECTING = te, G.prototype.OPEN = he, G.prototype.CLOSED = ye, G.prototype.close = function() {
640
+ this._close();
641
+ }, G.CONNECTING = te, G.OPEN = he, G.CLOSED = ye, G.prototype.withCredentials = void 0;
642
+ var Fe = b;
643
+ l != null && (b == null || !("withCredentials" in b.prototype)) && (Fe = G), function(n) {
644
+ {
645
+ var e = n(a);
646
+ e !== void 0 && (u.exports = e);
647
+ }
648
+ }(function(n) {
649
+ n.EventSourcePolyfill = G, n.NativeEventSource = b, n.EventSource = Fe;
650
+ });
651
+ })(typeof globalThis > "u" ? typeof window < "u" ? window : typeof self < "u" ? self : st : globalThis);
652
+ })(Ke, Ke.exports);
653
+ var St = Ke.exports;
654
+ function Ct(u) {
655
+ ut(u, "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}');
656
+ }
657
+ function Qe(u, a, r) {
658
+ const y = u.slice();
659
+ return y[51] = a[r], y;
660
+ }
661
+ function Je(u, a, r) {
662
+ const y = u.slice();
663
+ return y[54] = a[r], y;
664
+ }
665
+ function At(u) {
666
+ let a, r = (
667
+ /*balances*/
668
+ (u[3].Total ? (
669
+ /*formatBalance*/
670
+ u[5](
671
+ /*balances*/
672
+ u[3].Total[0].amount
673
+ )
674
+ ) : "0") + ""
675
+ ), y, c, l, v, f, b, _, T = (
676
+ /*isModalDisplayed*/
677
+ u[2] && Ze(u)
678
+ );
679
+ return {
680
+ c() {
681
+ a = O("button"), y = be(r), c = fe(), l = O("span"), l.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>', v = fe(), T && T.c(), f = mt(), H(a, "class", "BalanceValue");
682
+ },
683
+ m(S, D) {
684
+ ue(S, a, D), L(a, y), L(a, c), L(a, l), ue(S, v, D), T && T.m(S, D), ue(S, f, D), b || (_ = Ne(
685
+ a,
686
+ "click",
687
+ /*click_handler*/
688
+ u[25]
689
+ ), b = !0);
690
+ },
691
+ p(S, D) {
692
+ D[0] & /*balances*/
693
+ 8 && r !== (r = /*balances*/
694
+ (S[3].Total ? (
695
+ /*formatBalance*/
696
+ S[5](
697
+ /*balances*/
698
+ S[3].Total[0].amount
699
+ )
700
+ ) : "0") + "") && we(y, r), /*isModalDisplayed*/
701
+ S[2] ? T ? T.p(S, D) : (T = Ze(S), T.c(), T.m(f.parentNode, f)) : T && (T.d(1), T = null);
702
+ },
703
+ d(S) {
704
+ S && (de(a), de(v), de(f)), T && T.d(S), b = !1, _();
705
+ }
706
+ };
707
+ }
708
+ function _t(u) {
709
+ let a, r = (
710
+ /*$_*/
711
+ u[4]("Loading") + ""
712
+ ), y;
713
+ return {
714
+ c() {
715
+ a = O("p"), y = be(r);
716
+ },
717
+ m(c, l) {
718
+ ue(c, a, l), L(a, y);
719
+ },
720
+ p(c, l) {
721
+ l[0] & /*$_*/
722
+ 16 && r !== (r = /*$_*/
723
+ c[4]("Loading") + "") && we(y, r);
724
+ },
725
+ d(c) {
726
+ c && de(a);
727
+ }
728
+ };
729
+ }
730
+ function Ze(u) {
731
+ let a, r, y, c, l, v, f = (
732
+ /*$_*/
733
+ u[4]("Title") + ""
734
+ ), b, _, T, S, D, R, M = (
735
+ /*$_*/
736
+ u[4]("DepositButton") + ""
737
+ ), Q, ne, ae, V = Ie(Object.keys(
738
+ /*balances*/
739
+ u[3]
740
+ )), B = [];
741
+ for (let A = 0; A < V.length; A += 1)
742
+ B[A] = et(Qe(u, V, A));
743
+ return {
744
+ c() {
745
+ a = O("div"), r = O("button"), y = fe(), c = O("div"), l = O("div"), v = O("p"), b = be(f), _ = fe(), T = O("div");
746
+ for (let A = 0; A < B.length; A += 1)
747
+ B[A].c();
748
+ S = fe(), D = O("div"), R = O("button"), Q = be(M), H(r, "class", "BalanceModalClose"), H(v, "class", "BalanceModalTitle"), H(l, "class", "BalanceModalHeader"), H(T, "class", "BalanceModalBody"), H(R, "class", "BalanceModalAction"), H(D, "class", "BalanceModalFooter"), H(c, "class", "BalanceModal"), H(a, "class", "BalanceModalWrapper");
749
+ },
750
+ m(A, F) {
751
+ ue(A, a, F), L(a, r), L(a, y), L(a, c), L(c, l), L(l, v), L(v, b), L(c, _), L(c, T);
752
+ for (let E = 0; E < B.length; E += 1)
753
+ B[E] && B[E].m(T, null);
754
+ L(c, S), L(c, D), L(D, R), L(R, Q), ne || (ae = [
755
+ Ne(
756
+ r,
757
+ "click",
758
+ /*click_handler_1*/
759
+ u[26]
760
+ ),
761
+ Ne(
762
+ R,
763
+ "click",
764
+ /*click_handler_2*/
765
+ u[27]
766
+ )
767
+ ], ne = !0);
768
+ },
769
+ p(A, F) {
770
+ if (F[0] & /*$_*/
771
+ 16 && f !== (f = /*$_*/
772
+ A[4]("Title") + "") && we(b, f), F[0] & /*balances, formatBalance, getProductType, $_*/
773
+ 184) {
774
+ V = Ie(Object.keys(
775
+ /*balances*/
776
+ A[3]
777
+ ));
778
+ let E;
779
+ for (E = 0; E < V.length; E += 1) {
780
+ const J = Qe(A, V, E);
781
+ B[E] ? B[E].p(J, F) : (B[E] = et(J), B[E].c(), B[E].m(T, null));
782
+ }
783
+ for (; E < B.length; E += 1)
784
+ B[E].d(1);
785
+ B.length = V.length;
786
+ }
787
+ F[0] & /*$_*/
788
+ 16 && M !== (M = /*$_*/
789
+ A[4]("DepositButton") + "") && we(Q, M);
790
+ },
791
+ d(A) {
792
+ A && de(a), nt(B, A), ne = !1, yt(ae);
793
+ }
794
+ };
795
+ }
796
+ function $e(u) {
797
+ let a, r, y = (
798
+ /*$_*/
799
+ u[4](
800
+ /*k*/
801
+ u[51]
802
+ ) + ""
803
+ ), c, l, v = (
804
+ /*getProductType*/
805
+ u[7](
806
+ /*balance*/
807
+ u[54]
808
+ ) + ""
809
+ ), f, b, _, T, S = (
810
+ /*formatBalance*/
811
+ u[5](
812
+ /*balance*/
813
+ u[54].amount
814
+ ) + ""
815
+ ), D;
816
+ return {
817
+ c() {
818
+ a = O("div"), r = O("p"), c = be(y), l = fe(), f = be(v), b = fe(), _ = O("p"), T = O("span"), D = be(S), H(r, "class", "BalanceModalText"), H(T, "class", "BalanceModalAmount"), H(_, "class", "BalanceModalValue"), H(a, "class", "BalanceModalRowLine");
819
+ },
820
+ m(R, M) {
821
+ ue(R, a, M), L(a, r), L(r, c), L(r, l), L(r, f), L(a, b), L(a, _), L(_, T), L(T, D);
822
+ },
823
+ p(R, M) {
824
+ M[0] & /*$_, balances*/
825
+ 24 && y !== (y = /*$_*/
826
+ R[4](
827
+ /*k*/
828
+ R[51]
829
+ ) + "") && we(c, y), M[0] & /*balances*/
830
+ 8 && v !== (v = /*getProductType*/
831
+ R[7](
832
+ /*balance*/
833
+ R[54]
834
+ ) + "") && we(f, v), M[0] & /*balances*/
835
+ 8 && S !== (S = /*formatBalance*/
836
+ R[5](
837
+ /*balance*/
838
+ R[54].amount
839
+ ) + "") && we(D, S);
840
+ },
841
+ d(R) {
842
+ R && de(a);
843
+ }
844
+ };
845
+ }
846
+ function et(u) {
847
+ let a, r, y = Ie(
848
+ /*balances*/
849
+ u[3][
850
+ /*k*/
851
+ u[51]
852
+ ]
853
+ ), c = [];
854
+ for (let l = 0; l < y.length; l += 1)
855
+ c[l] = $e(Je(u, y, l));
856
+ return {
857
+ c() {
858
+ a = O("div");
859
+ for (let l = 0; l < c.length; l += 1)
860
+ c[l].c();
861
+ r = fe(), H(a, "class", "BalanceModalRowBoth");
862
+ },
863
+ m(l, v) {
864
+ ue(l, a, v);
865
+ for (let f = 0; f < c.length; f += 1)
866
+ c[f] && c[f].m(a, null);
867
+ L(a, r);
868
+ },
869
+ p(l, v) {
870
+ if (v[0] & /*formatBalance, balances, getProductType, $_*/
871
+ 184) {
872
+ y = Ie(
873
+ /*balances*/
874
+ l[3][
875
+ /*k*/
876
+ l[51]
877
+ ]
878
+ );
879
+ let f;
880
+ for (f = 0; f < y.length; f += 1) {
881
+ const b = Je(l, y, f);
882
+ c[f] ? c[f].p(b, v) : (c[f] = $e(b), c[f].c(), c[f].m(a, r));
883
+ }
884
+ for (; f < c.length; f += 1)
885
+ c[f].d(1);
886
+ c.length = y.length;
887
+ }
888
+ },
889
+ d(l) {
890
+ l && de(a), nt(c, l);
891
+ }
892
+ };
893
+ }
894
+ function tt(u) {
895
+ let a, r, y;
896
+ return {
897
+ c() {
898
+ a = O("button"), H(a, "class", "ShowBalanceModalOverlay");
899
+ },
900
+ m(c, l) {
901
+ ue(c, a, l), r || (y = Ne(
902
+ a,
903
+ "click",
904
+ /*click_handler_3*/
905
+ u[28]
906
+ ), r = !0);
907
+ },
908
+ p: Xe,
909
+ d(c) {
910
+ c && de(a), r = !1, y();
911
+ }
912
+ };
913
+ }
914
+ function xt(u) {
915
+ let a, r, y;
916
+ function c(b, _) {
917
+ return (
918
+ /*isLoading*/
919
+ b[1] ? _t : At
920
+ );
921
+ }
922
+ let l = c(u), v = l(u), f = (
923
+ /*isModalDisplayed*/
924
+ u[2] && tt(u)
925
+ );
926
+ return {
927
+ c() {
928
+ a = O("div"), r = O("div"), v.c(), y = fe(), f && f.c(), H(r, "class", "ShowBalance");
929
+ },
930
+ m(b, _) {
931
+ ue(b, a, _), L(a, r), v.m(r, null), L(a, y), f && f.m(a, null), u[29](a);
932
+ },
933
+ p(b, _) {
934
+ l === (l = c(b)) && v ? v.p(b, _) : (v.d(1), v = l(b), v && (v.c(), v.m(r, null))), /*isModalDisplayed*/
935
+ b[2] ? f ? f.p(b, _) : (f = tt(b), f.c(), f.m(a, null)) : f && (f.d(1), f = null);
936
+ },
937
+ i: Xe,
938
+ o: Xe,
939
+ d(b) {
940
+ b && de(a), v.d(), f && f.d(), u[29](null);
941
+ }
942
+ };
943
+ }
944
+ function Rt(u, a, r) {
945
+ let y;
946
+ ft(u, Bt, (e) => r(4, y = e));
947
+ let { userid: c = "" } = a, { session: l = "" } = a, { endpoint: v = "" } = a, { lang: f = "en" } = a, { mbsource: b } = a, { clientstyling: _ = "" } = a, { clientstylingurl: T = "" } = a, { translationurl: S = "" } = a, { gmversion: D = "gm16" } = a, { displaybalanceoption: R = "All" } = a, { totalcalculationmode: M = "totalCashAmount" } = a, { hideproducttype: Q } = a, { currencylocale: ne = "en" } = a, { currencydisplay: ae = "symbol" } = a, { maximumfractiondigits: V = "2" } = a, { minimumfractiondigits: B = "0" } = a, { customdisplayformat: A = "" } = a, F, E = !0, J = !1, pe = !1, oe, W = "", Z = [], Y;
948
+ const d = {}, re = ["totalCashAmount", "totalRealAmount"], De = () => {
949
+ fetch(S).then((e) => e.json()).then((e) => Object.keys(e).forEach((o) => We(o, e[o]))).catch((e) => console.log(e));
950
+ };
951
+ Object.keys(Ye).forEach((e) => We(e, Ye[e]));
952
+ const Ce = (e) => {
953
+ if (A)
954
+ return te(e);
955
+ const o = ne || f, t = {
956
+ style: "currency",
957
+ currency: W,
958
+ useGrouping: !0,
959
+ currencyDisplay: ae || "code",
960
+ maximumFractionDigits: V === "" || isNaN(Number(V)) ? 2 : Number(V),
961
+ minimumFractionDigits: B === "" || isNaN(Number(B)) ? 0 : Number(B)
962
+ };
963
+ return new Intl.NumberFormat(o, t).format(e);
964
+ }, te = (e) => {
965
+ const o = [];
966
+ let t = "";
967
+ for (const i of A)
968
+ switch (i) {
969
+ default:
970
+ t += i;
971
+ break;
972
+ case "{":
973
+ t && o.push(t), t = "";
974
+ break;
975
+ case "}":
976
+ const [s, p] = t.split("|");
977
+ if (t = "", s.toLowerCase() === "currency")
978
+ t = W;
979
+ else if (s.toLowerCase() === "amount") {
980
+ let h = ",", m = ".", w = 2;
981
+ p && (p[0] !== " " && (h = p[0]), p[1] !== " " && (m = p[1]), p[2] !== " " && !isNaN(Number(p[2])) && (w = Number(p[2])));
982
+ let [C, g] = String(Math.floor(e * 10 ** w) / 10 ** w).split(".");
983
+ t += C[0];
984
+ for (let x = 1; x < C.length; ++x)
985
+ (C.length - x) % 3 === 0 ? t += h + C[x] : t += C[x];
986
+ g && (t += m + g);
987
+ }
988
+ t && o.push(t), t = "";
989
+ break;
990
+ }
991
+ return o.push(t), o.join("");
992
+ }, he = async () => {
993
+ r(1, E = !0);
994
+ const e = new URL(`${v}/v1/player/${c}/account`);
995
+ try {
996
+ const o = await fetch(e, {
997
+ method: "GET",
998
+ headers: { "X-SessionID": l }
999
+ }), t = await o.json();
1000
+ if (o.ok)
1001
+ Z = t.items, W = Z.find((i) => i.displayName === "Casino")?.currency, r(3, d.Total = [{ amount: t.totalAmount[W] }], d), r(
1002
+ 3,
1003
+ d.Real = [
1004
+ {
1005
+ amount: Z.find((i) => i.displayName === "Casino")?.balanceAmount
1006
+ }
1007
+ ],
1008
+ d
1009
+ ), r(
1010
+ 3,
1011
+ d.Bonus = [
1012
+ {
1013
+ amount: Z.find((i) => i.displayName === "UBS")?.balanceAmount
1014
+ }
1015
+ ],
1016
+ d
1017
+ );
1018
+ else
1019
+ throw new Error("Failed to fetch balance data !");
1020
+ } catch (o) {
1021
+ console.log("Balance error: ", o);
1022
+ } finally {
1023
+ r(1, E = !1);
1024
+ }
1025
+ }, ye = () => {
1026
+ r(1, E = !0);
1027
+ const e = new URL(`${v}/v2/player/${c}/balance`), o = new Headers();
1028
+ o.append("X-SessionID", l), fetch(e, { method: "GET", headers: o }).then((i) => i.json()).then((i) => {
1029
+ i[M] || r(8, M = re[0]);
1030
+ const s = i.items.find((h) => h.type === "Real" && h.walletAccountType === "Ordinary");
1031
+ if (W = s.currency, pe = !!s.productType, r(3, d.Total = [{ amount: 0 }], d), r(3, d.Real = [], d), r(3, d.Bonus = [], d), r(3, d.Credit = [], d), !pe) {
1032
+ Y = {
1033
+ lastOrdinaryAfterAmount: 0,
1034
+ showCreditLineAfterAmount: !1
1035
+ }, r(3, d.Total[0].amount = i[M][W], d);
1036
+ for (const h of i.items)
1037
+ switch (h.type) {
1038
+ case "Bonus":
1039
+ d.Bonus.length === 0 ? d.Bonus.push({ amount: h.amount }) : r(3, d.Bonus[0].amount += h.amount, d);
1040
+ break;
1041
+ case "Real":
1042
+ if (h.creditLine && d.Credit.length === 0 && d.Credit.push({ amount: h.creditLine }), M === "totalRealAmount")
1043
+ continue;
1044
+ d.Real.length === 0 ? d.Real.push({ amount: h.amount }) : r(3, d.Real[0].amount += h.amount, d);
1045
+ break;
1046
+ }
1047
+ for (const [h, m] of Object.entries(d))
1048
+ m.length < 1 && delete d[h];
1049
+ r(1, E = !1);
1050
+ return;
1051
+ }
1052
+ Y = {
1053
+ Casino: {
1054
+ lastOrdinaryAfterAmount: 0,
1055
+ showCreditLineAfterAmount: !1
1056
+ },
1057
+ Sports: {
1058
+ lastOrdinaryAfterAmount: 0,
1059
+ showCreditLineAfterAmount: !1
1060
+ }
1061
+ };
1062
+ let p = i.items;
1063
+ R && R !== "All" && (p = i.items.filter((h) => h.productType === R));
1064
+ for (const h of p) {
1065
+ let m;
1066
+ switch (h.type) {
1067
+ case "Bonus":
1068
+ m = d.Bonus.findIndex((w) => w.productType === h.productType), m > 0 ? r(3, d.Bonus[m].amount += h.amount, d) : d.Bonus.push({
1069
+ amount: h.amount,
1070
+ productType: h.productType
1071
+ });
1072
+ break;
1073
+ case "Real":
1074
+ h.creditLine && d.Credit.push({
1075
+ amount: h.creditLine,
1076
+ productType: h.productType
1077
+ }), m = d.Real.findIndex((w) => w.productType === h.productType), m > 0 ? r(3, d.Real[m].amount += h.amount, d) : d.Real.push({
1078
+ amount: h.amount,
1079
+ productType: h.productType
1080
+ });
1081
+ break;
1082
+ }
1083
+ }
1084
+ Le();
1085
+ for (const [h, m] of Object.entries(d))
1086
+ m.length < 1 && delete d[h];
1087
+ r(1, E = !1);
1088
+ }).catch(() => {
1089
+ throw r(1, E = !1), new Error("Failed to fetch balance data !");
1090
+ });
1091
+ }, ge = () => {
1092
+ if (oe && oe.close(), l.length < 1)
1093
+ return;
1094
+ let e, o;
1095
+ switch (D) {
1096
+ case "gm16":
1097
+ e = new URL(`${v}/v2/player/${c}/information/updates`), o = (s) => je(s);
1098
+ break;
1099
+ case "gmcore":
1100
+ e = new URL(`${v}/v1/player/${c}/balance/updates`), o = (s) => Ae(s);
1101
+ break;
1102
+ }
1103
+ const t = {
1104
+ accept: "text/event-stream",
1105
+ "X-SessionId": l
1106
+ }, i = new St.EventSourcePolyfill(e, { headers: t });
1107
+ oe = i, i.addEventListener("message", o);
1108
+ }, $ = (e) => {
1109
+ let o;
1110
+ try {
1111
+ o = JSON.parse(e);
1112
+ } catch (t) {
1113
+ console.log("Balance stream failed: ", t);
1114
+ return;
1115
+ }
1116
+ return o;
1117
+ }, Ae = (e) => {
1118
+ const o = $(e.data);
1119
+ if (!o) {
1120
+ ge();
1121
+ return;
1122
+ }
1123
+ let t = "0";
1124
+ const i = o.balanceChange;
1125
+ Z = Z.map((s) => (i && i[s.id] && (s = {
1126
+ ...s,
1127
+ balanceAmount: i[s.id].afterAmount
1128
+ }), t = (parseFloat(s?.balanceAmount) + parseFloat(t)).toString(), s)), r(3, d.Real = [{ amount: Z[0]?.balanceAmount }], d), r(3, d.Bonus = [{ amount: Z[1]?.balanceAmount }], d), r(3, d.Total = [{ amount: Number(t) }], d);
1129
+ }, Be = (e, o, t) => {
1130
+ let i = null;
1131
+ switch (t.walletAccountType) {
1132
+ case "Ordinary":
1133
+ (t.afterAmount !== t.affectedAmount || o.lastOrdinaryAfterAmount === 0) && (o.lastOrdinaryAfterAmount = t.afterAmount, o.showCreditLineAfterAmount || (i = t.afterAmount));
1134
+ break;
1135
+ case "CreditLine":
1136
+ t.afterAmount !== 0 ? (i = t.afterAmount, o.showCreditLineAfterAmount = !0) : (i = o.lastOrdinaryAfterAmount, o.showCreditLineAfterAmount = !1);
1137
+ break;
1138
+ default:
1139
+ i = t.afterAmount;
1140
+ }
1141
+ return i === null ? e : i;
1142
+ }, Le = () => {
1143
+ switch (M) {
1144
+ case "totalCashAmount":
1145
+ let e = 0;
1146
+ for (const t of ["Real", "Bonus"])
1147
+ for (const i of d[t])
1148
+ e += Math.max(i.amount, 0);
1149
+ r(3, d.Total[0].amount = e, d);
1150
+ break;
1151
+ case "totalRealAmount":
1152
+ if (!pe)
1153
+ return;
1154
+ let o = 0;
1155
+ for (const t of d.Real)
1156
+ o += t.amount;
1157
+ r(3, d.Total[0].amount = o, d);
1158
+ }
1159
+ }, je = (e) => {
1160
+ const o = $(e.data);
1161
+ if (!o) {
1162
+ ge();
1163
+ return;
1164
+ }
1165
+ if (He(o?.type) || o.type !== "BALANCE_UPDATE_V2")
1166
+ return;
1167
+ const t = o.body.balanceChange;
1168
+ for (const [i, s] of Object.entries(t))
1169
+ if (M === "totalRealAmount" && i === "Real" && !pe && r(3, d.Total[0].amount = Be(d.Total[0].amount, Y, s), d), !!d[i])
1170
+ for (const p of d[i]) {
1171
+ if (!pe) {
1172
+ p.amount = i === "Real" ? Be(p.amount, Y, s) : s.afterAmount;
1173
+ continue;
1174
+ }
1175
+ s.productType === p.productType && (p.amount = i === "Real" ? Be(p.amount, Y[p.productType], s) : s.afterAmount);
1176
+ }
1177
+ Le();
1178
+ }, Me = () => {
1179
+ r(2, J = !1), window.postMessage({ type: "GoToDeposit" }, window.location.href), typeof gtag == "function" && gtag("event", "GoToDeposit", { context: "PlayerAccountBalanceModal" });
1180
+ }, He = (e) => e === "SESSION_EXPIRATION" ? (window.postMessage({ type: "SessionExpiration" }, window.location.href), !0) : !1, _e = () => {
1181
+ re.includes(M) || (console.error(`Unsupported value ('${M}') for totalcalculationmode parameter. Only the following values are supported ${re}. Using default value ('${re[0]}').`), r(8, M = re[0]));
1182
+ }, xe = (e) => {
1183
+ const o = Q.split(",").map((t) => t.trim());
1184
+ return !e.productType || o.includes(e.productType) ? "" : y(e.productType);
1185
+ }, me = () => {
1186
+ switch (Tt(f), _e(), D) {
1187
+ case "gmcore":
1188
+ he();
1189
+ break;
1190
+ case "gm16":
1191
+ ye();
1192
+ break;
1193
+ default:
1194
+ throw Error(`Invalid apiversion attribute: ${D}`);
1195
+ }
1196
+ }, G = (e) => e.data && e.data.type === "LogoutSuccessfull" && oe.close();
1197
+ pt(() => (window.addEventListener("message", G, !1), () => {
1198
+ window.removeEventListener("message", G), oe && oe.close();
1199
+ }));
1200
+ const ze = () => r(2, J = !0), Ue = () => r(2, J = !1), Pe = () => Me(), Fe = () => r(2, J = !1);
1201
+ function n(e) {
1202
+ ht[e ? "unshift" : "push"](() => {
1203
+ F = e, r(0, F);
1204
+ });
1205
+ }
1206
+ return u.$$set = (e) => {
1207
+ "userid" in e && r(9, c = e.userid), "session" in e && r(10, l = e.session), "endpoint" in e && r(11, v = e.endpoint), "lang" in e && r(12, f = e.lang), "mbsource" in e && r(13, b = e.mbsource), "clientstyling" in e && r(14, _ = e.clientstyling), "clientstylingurl" in e && r(15, T = e.clientstylingurl), "translationurl" in e && r(16, S = e.translationurl), "gmversion" in e && r(17, D = e.gmversion), "displaybalanceoption" in e && r(18, R = e.displaybalanceoption), "totalcalculationmode" in e && r(8, M = e.totalcalculationmode), "hideproducttype" in e && r(19, Q = e.hideproducttype), "currencylocale" in e && r(20, ne = e.currencylocale), "currencydisplay" in e && r(21, ae = e.currencydisplay), "maximumfractiondigits" in e && r(22, V = e.maximumfractiondigits), "minimumfractiondigits" in e && r(23, B = e.minimumfractiondigits), "customdisplayformat" in e && r(24, A = e.customdisplayformat);
1208
+ }, u.$$.update = () => {
1209
+ u.$$.dirty[0] & /*endpoint, userid, session, lang, gmversion, displaybalanceoption*/
1210
+ 400896 && v && c && l && f && D && R && me(), u.$$.dirty[0] & /*endpoint, userid, session, gmversion*/
1211
+ 134656 && v && c && l && D && ge(), u.$$.dirty[0] & /*clientstyling, customStylingContainer*/
1212
+ 16385 && _ && F && gt(F, _), u.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/
1213
+ 32769 && T && F && vt(F, T), u.$$.dirty[0] & /*customStylingContainer, mbsource*/
1214
+ 8193 && F && wt(F, `${b}.Style`), u.$$.dirty[0] & /*translationurl*/
1215
+ 65536 && S && De();
1216
+ }, [
1217
+ F,
1218
+ E,
1219
+ J,
1220
+ d,
1221
+ y,
1222
+ Ce,
1223
+ Me,
1224
+ xe,
1225
+ M,
1226
+ c,
1227
+ l,
1228
+ v,
1229
+ f,
1230
+ b,
1231
+ _,
1232
+ T,
1233
+ S,
1234
+ D,
1235
+ R,
1236
+ Q,
1237
+ ne,
1238
+ ae,
1239
+ V,
1240
+ B,
1241
+ A,
1242
+ ze,
1243
+ Ue,
1244
+ Pe,
1245
+ Fe,
1246
+ n
1247
+ ];
1248
+ }
1249
+ class Et extends lt {
1250
+ constructor(a) {
1251
+ super(), ct(
1252
+ this,
1253
+ a,
1254
+ Rt,
1255
+ xt,
1256
+ dt,
1257
+ {
1258
+ userid: 9,
1259
+ session: 10,
1260
+ endpoint: 11,
1261
+ lang: 12,
1262
+ mbsource: 13,
1263
+ clientstyling: 14,
1264
+ clientstylingurl: 15,
1265
+ translationurl: 16,
1266
+ gmversion: 17,
1267
+ displaybalanceoption: 18,
1268
+ totalcalculationmode: 8,
1269
+ hideproducttype: 19,
1270
+ currencylocale: 20,
1271
+ currencydisplay: 21,
1272
+ maximumfractiondigits: 22,
1273
+ minimumfractiondigits: 23,
1274
+ customdisplayformat: 24
1275
+ },
1276
+ Ct,
1277
+ [-1, -1]
1278
+ );
1279
+ }
1280
+ get userid() {
1281
+ return this.$$.ctx[9];
1282
+ }
1283
+ set userid(a) {
1284
+ this.$$set({ userid: a }), j();
1285
+ }
1286
+ get session() {
1287
+ return this.$$.ctx[10];
1288
+ }
1289
+ set session(a) {
1290
+ this.$$set({ session: a }), j();
1291
+ }
1292
+ get endpoint() {
1293
+ return this.$$.ctx[11];
1294
+ }
1295
+ set endpoint(a) {
1296
+ this.$$set({ endpoint: a }), j();
1297
+ }
1298
+ get lang() {
1299
+ return this.$$.ctx[12];
1300
+ }
1301
+ set lang(a) {
1302
+ this.$$set({ lang: a }), j();
1303
+ }
1304
+ get mbsource() {
1305
+ return this.$$.ctx[13];
1306
+ }
1307
+ set mbsource(a) {
1308
+ this.$$set({ mbsource: a }), j();
1309
+ }
1310
+ get clientstyling() {
1311
+ return this.$$.ctx[14];
1312
+ }
1313
+ set clientstyling(a) {
1314
+ this.$$set({ clientstyling: a }), j();
1315
+ }
1316
+ get clientstylingurl() {
1317
+ return this.$$.ctx[15];
1318
+ }
1319
+ set clientstylingurl(a) {
1320
+ this.$$set({ clientstylingurl: a }), j();
1321
+ }
1322
+ get translationurl() {
1323
+ return this.$$.ctx[16];
1324
+ }
1325
+ set translationurl(a) {
1326
+ this.$$set({ translationurl: a }), j();
1327
+ }
1328
+ get gmversion() {
1329
+ return this.$$.ctx[17];
1330
+ }
1331
+ set gmversion(a) {
1332
+ this.$$set({ gmversion: a }), j();
1333
+ }
1334
+ get displaybalanceoption() {
1335
+ return this.$$.ctx[18];
1336
+ }
1337
+ set displaybalanceoption(a) {
1338
+ this.$$set({ displaybalanceoption: a }), j();
1339
+ }
1340
+ get totalcalculationmode() {
1341
+ return this.$$.ctx[8];
1342
+ }
1343
+ set totalcalculationmode(a) {
1344
+ this.$$set({ totalcalculationmode: a }), j();
1345
+ }
1346
+ get hideproducttype() {
1347
+ return this.$$.ctx[19];
1348
+ }
1349
+ set hideproducttype(a) {
1350
+ this.$$set({ hideproducttype: a }), j();
1351
+ }
1352
+ get currencylocale() {
1353
+ return this.$$.ctx[20];
1354
+ }
1355
+ set currencylocale(a) {
1356
+ this.$$set({ currencylocale: a }), j();
1357
+ }
1358
+ get currencydisplay() {
1359
+ return this.$$.ctx[21];
1360
+ }
1361
+ set currencydisplay(a) {
1362
+ this.$$set({ currencydisplay: a }), j();
1363
+ }
1364
+ get maximumfractiondigits() {
1365
+ return this.$$.ctx[22];
1366
+ }
1367
+ set maximumfractiondigits(a) {
1368
+ this.$$set({ maximumfractiondigits: a }), j();
1369
+ }
1370
+ get minimumfractiondigits() {
1371
+ return this.$$.ctx[23];
1372
+ }
1373
+ set minimumfractiondigits(a) {
1374
+ this.$$set({ minimumfractiondigits: a }), j();
1375
+ }
1376
+ get customdisplayformat() {
1377
+ return this.$$.ctx[24];
1378
+ }
1379
+ set customdisplayformat(a) {
1380
+ this.$$set({ customdisplayformat: a }), j();
1381
+ }
1382
+ }
1383
+ bt(Et, { userid: {}, session: {}, endpoint: {}, lang: {}, mbsource: {}, clientstyling: {}, clientstylingurl: {}, translationurl: {}, gmversion: {}, displaybalanceoption: {}, totalcalculationmode: {}, hideproducttype: {}, currencylocale: {}, currencydisplay: {}, maximumfractiondigits: {}, minimumfractiondigits: {}, customdisplayformat: {} }, [], [], !0);
1384
+ export {
1385
+ Et as default
1386
+ };