@everymatrix/casino-header-controller 1.71.0 → 1.72.0

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.
Files changed (61) hide show
  1. package/components/{CasinoHamburgerMenu-eXrOFlvI.js → CasinoHamburgerMenu-CGX_L0rr.js} +907 -886
  2. package/components/CasinoHamburgerMenu-CrZ5l9tM.cjs +21 -0
  3. package/components/{CasinoHamburgerMenu-DyDdli2u.js → CasinoHamburgerMenu-DnyTkCn0.js} +851 -830
  4. package/components/{CasinoHeaderController-CgK8fp9o.js → CasinoHeaderController-B1UkZzjQ.js} +72 -72
  5. package/components/{CasinoHeaderController-MYnY58pH.js → CasinoHeaderController-BEoAjUyt.js} +74 -74
  6. package/components/{CasinoHeaderController-L5B1b3r5.cjs → CasinoHeaderController-BqHTLoTP.cjs} +1 -1
  7. package/components/{CasinoSlider-DMayqVDC.js → CasinoSlider-BpvRqkgi.js} +93 -93
  8. package/components/{CasinoSlider-Cp5_7pzC.js → CasinoSlider-BxhgPzK5.js} +64 -64
  9. package/components/{CasinoSlider-CL_Uac-c.cjs → CasinoSlider-DqTtsMWh.cjs} +1 -1
  10. package/components/PlayerAccountBalanceModal-659pYyyZ.cjs +7 -0
  11. package/components/PlayerAccountBalanceModal-BXu8sVJk.js +1415 -0
  12. package/components/PlayerAccountBalanceModal-zC87EcGg.js +1386 -0
  13. package/components/{PlayerDeposit-BqFur4Gk.js → PlayerDeposit--6Tlhvq3.js} +74 -74
  14. package/components/{PlayerDeposit-Dsn7YQTe.js → PlayerDeposit-BXePx8EL.js} +74 -74
  15. package/components/PlayerDeposit-BXwT7NVp.cjs +1 -0
  16. package/es2015/casino-header-controller.cjs +1 -1
  17. package/es2015/casino-header-controller.js +1 -1
  18. package/esnext/casino-header-controller.js +1 -1
  19. package/package.json +1 -1
  20. package/stencil/{gamification-dropdown-343647b2-B5wZgSL_.cjs → gamification-dropdown-343647b2-B50uewij.cjs} +1 -1
  21. package/stencil/{gamification-dropdown-343647b2-BHtW90Ts.js → gamification-dropdown-343647b2-BtKUznL8.js} +1 -1
  22. package/stencil/{gamification-dropdown-343647b2-CJLHxZkD.js → gamification-dropdown-343647b2-DuhB4qAC.js} +1 -1
  23. package/stencil/{gamification-dropdown-DK7R0JLM.js → gamification-dropdown-BXoXmCVj.js} +1 -1
  24. package/stencil/{gamification-dropdown-BBZl1ErX.cjs → gamification-dropdown-BgQs3qHL.cjs} +1 -1
  25. package/stencil/{gamification-dropdown-BAmEFhHY.js → gamification-dropdown-CHDfyBlq.js} +1 -1
  26. package/stencil/gamification-dropdown_4-BCIlNfU2.cjs +192 -0
  27. package/stencil/{gamification-dropdown_4-COquOuG8.js → gamification-dropdown_4-BMYGUc6f.js} +5 -5
  28. package/stencil/{gamification-dropdown_4-BSpzDDbH.js → gamification-dropdown_4-Bwo0uyQb.js} +5 -5
  29. package/stencil/index-1ef3a64c-83J-RXdm.js +572 -0
  30. package/stencil/index-1ef3a64c-Bi7BfDjU.cjs +1 -0
  31. package/stencil/index-1ef3a64c-hYuFvrwc.js +556 -0
  32. package/stencil/index-71b1bdfa-Br04T1ks.js +753 -0
  33. package/stencil/{index-71b1bdfa-BvmY-gMM.js → index-71b1bdfa-CqHhm_K7.js} +264 -268
  34. package/stencil/index-71b1bdfa-DEOwV3WT.cjs +1 -0
  35. package/stencil/{player-elevate-card-CpA3OCol.cjs → player-elevate-card-CkeeX0Fc.cjs} +1 -1
  36. package/stencil/{player-elevate-card-BlPrmGbq.js → player-elevate-card-Csrn1cq3.js} +2 -2
  37. package/stencil/{player-elevate-card-CcrbSYAa.js → player-elevate-card-Cyj2vrTT.js} +2 -2
  38. package/stencil/{player-elevate-card-items-08c6fbd8-DGhnBoCt.js → player-elevate-card-items-08c6fbd8-DvNcpL9M.js} +235 -237
  39. package/stencil/{player-elevate-card-items-08c6fbd8-BlfM4qDN.js → player-elevate-card-items-08c6fbd8-GG7yo-HJ.js} +235 -237
  40. package/stencil/player-elevate-card-items-08c6fbd8-swAJgFA-.cjs +102 -0
  41. package/stencil/{player-elevate-pointcard-GU7-MHyW.js → player-elevate-pointcard-CDT1deRp.js} +2 -2
  42. package/stencil/{player-elevate-pointcard-BocQ_aKf.js → player-elevate-pointcard-CQ618787.js} +2 -2
  43. package/stencil/{player-elevate-pointcard-Dlzq8dY4.cjs → player-elevate-pointcard-D962b07c.cjs} +1 -1
  44. package/stencil/{player-rakeback-card-DNq03rF4.js → player-rakeback-card-D-wGOAvr.js} +1 -1
  45. package/stencil/{player-rakeback-card-CGdh2tlU.cjs → player-rakeback-card-DI8fIhnW.cjs} +1 -1
  46. package/stencil/{player-rakeback-card-DhCpfqRh.js → player-rakeback-card-r5qjxDTk.js} +1 -1
  47. package/stencil/{user-deposit-withdrawal-DlMsqvhx.js → user-deposit-withdrawal-BvYavTHs.js} +1 -1
  48. package/stencil/{user-deposit-withdrawal-D5ms_YXW.cjs → user-deposit-withdrawal-CrFUxhuF.cjs} +1 -1
  49. package/stencil/{user-deposit-withdrawal-C9wa30iN.js → user-deposit-withdrawal-TfRJdSfc.js} +1 -1
  50. package/components/CasinoHamburgerMenu-CaFkIr3d.cjs +0 -21
  51. package/components/PlayerAccountBalanceModal-BE4Qz_Ii.js +0 -1415
  52. package/components/PlayerAccountBalanceModal-C42UHBou.js +0 -1386
  53. package/components/PlayerAccountBalanceModal-C97PHOzN.cjs +0 -7
  54. package/components/PlayerDeposit-BsUiL_LS.cjs +0 -1
  55. package/stencil/gamification-dropdown_4-y8rTzmfW.cjs +0 -192
  56. package/stencil/index-1ef3a64c-DHrhhG6L.js +0 -572
  57. package/stencil/index-1ef3a64c-DULvne14.js +0 -556
  58. package/stencil/index-1ef3a64c-GssSMT7G.cjs +0 -1
  59. package/stencil/index-71b1bdfa-Bff-QQDU.cjs +0 -1
  60. package/stencil/index-71b1bdfa-CKnxN54o.js +0 -757
  61. package/stencil/player-elevate-card-items-08c6fbd8-Dou03vJ6.cjs +0 -102
@@ -1,1386 +0,0 @@
1
- import { b as rt, $ as it, O as st, S as lt, i as ct, f as H, c as dt, s as ut, d as ft, g as O, e as ue, y as I, j as fe, z as L, n as Xe, k as pe, l as pt, o as ht, m as mt, A as Ne, q as gt, t as yt, u as vt, w as we, F as bt, B as Be, v as je, C as nt, D as wt, H as Bt } from "./CasinoHamburgerMenu-DyDdli2u.js";
2
- function We(d, n) {
3
- rt(d, n);
4
- }
5
- function Tt(d) {
6
- it.set(d);
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 qe = { exports: {} };
209
- /** @license
210
- * eventsource.js
211
- * Available under MIT License (MIT)
212
- * https://github.com/Yaffle/EventSource/
213
- */
214
- (function(d, n) {
215
- (function(a) {
216
- var m = a.setTimeout, u = a.clearTimeout, l = a.XMLHttpRequest, y = a.XDomainRequest, p = a.ActiveXObject, w = a.EventSource, R = a.document, B = a.Promise, T = a.fetch, D = a.Response, E = a.TextDecoder, F = a.TextEncoder, Z = a.AbortController;
217
- if (typeof window < "u" && typeof R < "u" && !("readyState" in R) && R.body == null && (R.readyState = "loading", window.addEventListener("load", function(e) {
218
- R.readyState = "complete";
219
- }, !1)), l == null && p != null && (l = function() {
220
- return new p("Microsoft.XMLHTTP");
221
- }), Object.create == null && (Object.create = function(e) {
222
- function t() {
223
- }
224
- return t.prototype = e, new t();
225
- }), Date.now || (Date.now = function() {
226
- return (/* @__PURE__ */ new Date()).getTime();
227
- }), Z == null) {
228
- var oe = T;
229
- T = function(e, t) {
230
- var o = t.signal;
231
- return oe(e, { headers: t.headers, credentials: t.credentials, cache: t.cache }).then(function(r) {
232
- var c = r.body.getReader();
233
- return o._reader = c, o._aborted && o._reader.cancel(), {
234
- status: r.status,
235
- statusText: r.statusText,
236
- headers: r.headers,
237
- body: {
238
- getReader: function() {
239
- return c;
240
- }
241
- }
242
- };
243
- });
244
- }, Z = 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 J() {
254
- this.bitsNeeded = 0, this.codePoint = 0;
255
- }
256
- J.prototype.decode = function(e) {
257
- function t(C, A, g) {
258
- if (g === 1)
259
- return C >= 128 >> A && C << A <= 2047;
260
- if (g === 2)
261
- return C >= 2048 >> A && C << A <= 55295 || C >= 57344 >> A && C << A <= 65535;
262
- if (g === 3)
263
- return C >= 65536 >> A && C << A <= 1114111;
264
- throw new Error();
265
- }
266
- function o(C, A) {
267
- if (C === 6 * 1)
268
- return A >> 6 > 15 ? 3 : A > 31 ? 2 : 1;
269
- if (C === 6 * 2)
270
- return A > 15 ? 3 : 2;
271
- if (C === 6 * 3)
272
- return 3;
273
- throw new Error();
274
- }
275
- for (var r = 65533, c = "", i = this.bitsNeeded, h = this.codePoint, _ = 0; _ < e.length; _ += 1) {
276
- var v = e[_];
277
- i !== 0 && (v < 128 || v > 191 || !t(h << 6 | v & 63, i - 6, o(i, h))) && (i = 0, h = r, c += String.fromCharCode(h)), i === 0 ? (v >= 0 && v <= 127 ? (i = 0, h = v) : v >= 192 && v <= 223 ? (i = 6 * 1, h = v & 31) : v >= 224 && v <= 239 ? (i = 6 * 2, h = v & 15) : v >= 240 && v <= 247 ? (i = 6 * 3, h = v & 7) : (i = 0, h = r), i !== 0 && !t(h, i, o(i, h)) && (i = 0, h = r)) : (i -= 6, h = h << 6 | v & 63), i === 0 && (h <= 65535 ? c += String.fromCharCode(h) : (c += String.fromCharCode(55296 + (h - 65535 - 1 >> 10)), c += String.fromCharCode(56320 + (h - 65535 - 1 & 1023))));
278
- }
279
- return this.bitsNeeded = i, this.codePoint = h, c;
280
- };
281
- var V = function() {
282
- try {
283
- return new E().decode(new F().encode("test"), { stream: !0 }) === "test";
284
- } catch (e) {
285
- console.debug("TextDecoder does not support streaming option. Using polyfill instead: " + e);
286
- }
287
- return !1;
288
- };
289
- (E == null || F == null || !V()) && (E = J);
290
- var S = function() {
291
- };
292
- function b(e) {
293
- this.withCredentials = !1, this.readyState = 0, this.status = 0, this.statusText = "", this.responseText = "", this.onprogress = S, this.onload = S, this.onerror = S, this.onreadystatechange = S, this._contentType = "", this._xhr = e, this._sendTimeout = 0, this._abort = S;
294
- }
295
- b.prototype.open = function(e, t) {
296
- this._abort(!0);
297
- var o = this, r = this._xhr, c = 1, i = 0;
298
- this._abort = function(g) {
299
- o._sendTimeout !== 0 && (u(o._sendTimeout), o._sendTimeout = 0), (c === 1 || c === 2 || c === 3) && (c = 4, r.onload = S, r.onerror = S, r.onabort = S, r.onprogress = S, r.onreadystatechange = S, r.abort(), i !== 0 && (u(i), i = 0), g || (o.readyState = 4, o.onabort(null), o.onreadystatechange())), c = 0;
300
- };
301
- var h = function() {
302
- if (c === 1) {
303
- var g = 0, M = "", se = void 0;
304
- if ("contentType" in r)
305
- g = 200, M = "OK", se = r.contentType;
306
- else
307
- try {
308
- g = r.status, M = r.statusText, se = r.getResponseHeader("Content-Type");
309
- } catch {
310
- g = 0, M = "", se = void 0;
311
- }
312
- g !== 0 && (c = 2, o.readyState = 2, o.status = g, o.statusText = M, o._contentType = se, o.onreadystatechange());
313
- }
314
- }, _ = function() {
315
- if (h(), c === 2 || c === 3) {
316
- c = 3;
317
- var g = "";
318
- try {
319
- g = r.responseText;
320
- } catch {
321
- }
322
- o.readyState = 3, o.responseText = g, o.onprogress();
323
- }
324
- }, v = function(g, M) {
325
- if ((M == null || M.preventDefault == null) && (M = {
326
- preventDefault: S
327
- }), _(), c === 1 || c === 2 || c === 3) {
328
- if (c = 4, i !== 0 && (u(i), i = 0), o.readyState = 4, g === "load")
329
- o.onload(M);
330
- else if (g === "error")
331
- o.onerror(M);
332
- else if (g === "abort")
333
- o.onabort(M);
334
- else
335
- throw new TypeError();
336
- o.onreadystatechange();
337
- }
338
- }, C = function(g) {
339
- r != null && (r.readyState === 4 ? (!("onload" in r) || !("onerror" in r) || !("onabort" in r)) && v(r.responseText === "" ? "error" : "load", g) : r.readyState === 3 ? "onprogress" in r || _() : r.readyState === 2 && h());
340
- }, A = function() {
341
- i = m(function() {
342
- A();
343
- }, 500), r.readyState === 3 && _();
344
- };
345
- "onload" in r && (r.onload = function(g) {
346
- v("load", g);
347
- }), "onerror" in r && (r.onerror = function(g) {
348
- v("error", g);
349
- }), "onabort" in r && (r.onabort = function(g) {
350
- v("abort", g);
351
- }), "onprogress" in r && (r.onprogress = _), "onreadystatechange" in r && (r.onreadystatechange = function(g) {
352
- C(g);
353
- }), ("contentType" in r || !("ontimeout" in l.prototype)) && (t += (t.indexOf("?") === -1 ? "?" : "&") + "padding=true"), r.open(e, t, !0), "readyState" in r && (i = m(function() {
354
- A();
355
- }, 0));
356
- }, b.prototype.abort = function() {
357
- this._abort(!1);
358
- }, b.prototype.getResponseHeader = function(e) {
359
- return this._contentType;
360
- }, b.prototype.setRequestHeader = function(e, t) {
361
- var o = this._xhr;
362
- "setRequestHeader" in o && o.setRequestHeader(e, t);
363
- }, b.prototype.getAllResponseHeaders = function() {
364
- return this._xhr.getAllResponseHeaders != null && this._xhr.getAllResponseHeaders() || "";
365
- }, b.prototype.send = function() {
366
- if ((!("ontimeout" in l.prototype) || !("sendAsBinary" in l.prototype) && !("mozAnon" in l.prototype)) && R != null && R.readyState != null && R.readyState !== "complete") {
367
- var e = this;
368
- e._sendTimeout = m(function() {
369
- e._sendTimeout = 0, e.send();
370
- }, 4);
371
- return;
372
- }
373
- var t = this._xhr;
374
- "withCredentials" in t && (t.withCredentials = this.withCredentials);
375
- try {
376
- t.send(void 0);
377
- } catch (o) {
378
- throw o;
379
- }
380
- };
381
- function W(e) {
382
- return e.replace(/[A-Z]/g, function(t) {
383
- return String.fromCharCode(t.charCodeAt(0) + 32);
384
- });
385
- }
386
- function x(e) {
387
- for (var t = /* @__PURE__ */ Object.create(null), o = e.split(`\r
388
- `), r = 0; r < o.length; r += 1) {
389
- var c = o[r], i = c.split(": "), h = i.shift(), _ = i.join(": ");
390
- t[W(h)] = _;
391
- }
392
- this._map = t;
393
- }
394
- x.prototype.get = function(e) {
395
- return this._map[W(e)];
396
- }, l != null && l.HEADERS_RECEIVED == null && (l.HEADERS_RECEIVED = 2);
397
- function $() {
398
- }
399
- $.prototype.open = function(e, t, o, r, c, i, h) {
400
- e.open("GET", c);
401
- var _ = 0;
402
- e.onprogress = function() {
403
- var C = e.responseText, A = C.slice(_);
404
- _ += A.length, o(A);
405
- }, e.onerror = function(C) {
406
- C.preventDefault(), r(new Error("NetworkError"));
407
- }, e.onload = function() {
408
- r(null);
409
- }, e.onabort = function() {
410
- r(null);
411
- }, e.onreadystatechange = function() {
412
- if (e.readyState === l.HEADERS_RECEIVED) {
413
- var C = e.status, A = e.statusText, g = e.getResponseHeader("Content-Type"), M = e.getAllResponseHeaders();
414
- t(C, A, g, new x(M));
415
- }
416
- }, e.withCredentials = i;
417
- for (var v in h)
418
- Object.prototype.hasOwnProperty.call(h, v) && e.setRequestHeader(v, h[v]);
419
- return e.send(), e;
420
- };
421
- function he(e) {
422
- this._headers = e;
423
- }
424
- he.prototype.get = function(e) {
425
- return this._headers.get(e);
426
- };
427
- function re() {
428
- }
429
- re.prototype.open = function(e, t, o, r, c, i, h) {
430
- var _ = null, v = new Z(), C = v.signal, A = new E();
431
- return T(c, {
432
- headers: h,
433
- credentials: i ? "include" : "same-origin",
434
- signal: C,
435
- cache: "no-store"
436
- }).then(function(g) {
437
- return _ = g.body.getReader(), t(g.status, g.statusText, g.headers.get("Content-Type"), new he(g.headers)), new B(function(M, se) {
438
- var xe = function() {
439
- _.read().then(function(X) {
440
- if (X.done)
441
- M(void 0);
442
- else {
443
- var z = A.decode(X.value, { stream: !0 });
444
- o(z), xe();
445
- }
446
- }).catch(function(X) {
447
- se(X);
448
- });
449
- };
450
- xe();
451
- });
452
- }).catch(function(g) {
453
- if (g.name !== "AbortError")
454
- return g;
455
- }).then(function(g) {
456
- r(g);
457
- }), {
458
- abort: function() {
459
- _?.cancel(), v.abort();
460
- }
461
- };
462
- };
463
- function Y() {
464
- this._listeners = /* @__PURE__ */ Object.create(null);
465
- }
466
- function ee(e) {
467
- m(function() {
468
- throw e;
469
- }, 0);
470
- }
471
- Y.prototype.dispatchEvent = function(e) {
472
- e.target = this;
473
- var t = this._listeners[e.type];
474
- if (t != null)
475
- for (var o = t.length, r = 0; r < o; r += 1) {
476
- var c = t[r];
477
- try {
478
- typeof c.handleEvent == "function" ? c.handleEvent(e) : c.call(this, e);
479
- } catch (i) {
480
- ee(i);
481
- }
482
- }
483
- }, Y.prototype.addEventListener = function(e, t) {
484
- e = String(e);
485
- var o = this._listeners, r = o[e];
486
- r == null && (r = [], o[e] = r);
487
- for (var c = !1, i = 0; i < r.length; i += 1)
488
- r[i] === t && (c = !0);
489
- c || r.push(t);
490
- }, Y.prototype.removeEventListener = function(e, t) {
491
- e = String(e);
492
- var o = this._listeners, r = o[e];
493
- if (r != null) {
494
- for (var c = [], i = 0; i < r.length; i += 1)
495
- r[i] !== t && c.push(r[i]);
496
- c.length === 0 ? delete o[e] : o[e] = c;
497
- }
498
- };
499
- function Q(e) {
500
- this.type = e, this.target = void 0;
501
- }
502
- function f(e, t) {
503
- Q.call(this, e), this.data = t.data, this.lastEventId = t.lastEventId;
504
- }
505
- f.prototype = Object.create(Q.prototype);
506
- function ie(e, t) {
507
- Q.call(this, e), this.status = t.status, this.statusText = t.statusText, this.headers = t.headers;
508
- }
509
- ie.prototype = Object.create(Q.prototype);
510
- function Le(e, t) {
511
- Q.call(this, e), this.error = t.error;
512
- }
513
- Le.prototype = Object.create(Q.prototype);
514
- var _e = -1, ae = 0, me = 1, ye = 2, ve = -1, te = 0, Re = 1, Te = 2, Fe = 3, He = /^text\/event\-stream(;.*)?$/i, Me = 1e3, Ie = 18e6, Ee = function(e, t) {
515
- var o = e == null ? t : parseInt(e, 10);
516
- return o !== o && (o = t), Se(o);
517
- }, Se = function(e) {
518
- return Math.min(Math.max(e, Me), Ie);
519
- }, ge = function(e, t, o) {
520
- try {
521
- typeof t == "function" && t.call(e, o);
522
- } catch (r) {
523
- ee(r);
524
- }
525
- };
526
- function G(e, t) {
527
- Y.call(this), t = t || {}, 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, e, t);
528
- }
529
- function ze() {
530
- return l != null && "withCredentials" in l.prototype || y == null ? new l() : new y();
531
- }
532
- var Ue = T != null && D != null && "body" in D.prototype;
533
- function Pe(e, t, o) {
534
- t = String(t);
535
- var r = !!o.withCredentials, c = o.lastEventIdQueryParameterName || "lastEventId", i = Se(1e3), h = Ee(o.heartbeatTimeout, 45e3), _ = "", v = i, C = !1, A = 0, g = o.headers || {}, M = o.Transport, se = Ue && M == null ? void 0 : new b(M != null ? new M() : ze()), xe = M != null && typeof M != "string" ? new M() : se == null ? new re() : new $(), X = void 0, z = 0, ne = _e, Ce = "", ke = "", le = "", Oe = "", U = te, Ve = 0, be = 0, at = function(N, k, q, K) {
536
- if (ne === ae)
537
- if (N === 200 && q != null && He.test(q)) {
538
- ne = me, C = Date.now(), v = i, e.readyState = me;
539
- var P = new ie("open", {
540
- status: N,
541
- statusText: k,
542
- headers: K
543
- });
544
- e.dispatchEvent(P), ge(e, e.onopen, P);
545
- } else {
546
- var j = "";
547
- N !== 200 ? (k && (k = k.replace(/\s+/g, " ")), j = "EventSource's response has a status " + N + " " + k + " that is not 200. Aborting the connection.") : j = "EventSource's response has a Content-Type specifying an unsupported type: " + (q == null ? "-" : q.replace(/\s+/g, " ")) + ". Aborting the connection.", Ge();
548
- var P = new ie("error", {
549
- status: N,
550
- statusText: k,
551
- headers: K
552
- });
553
- e.dispatchEvent(P), ge(e, e.onerror, P), console.error(j);
554
- }
555
- }, ot = function(N) {
556
- if (ne === me) {
557
- for (var k = -1, q = 0; q < N.length; q += 1) {
558
- var K = N.charCodeAt(q);
559
- (K === 10 || K === 13) && (k = q);
560
- }
561
- var P = (k !== -1 ? Oe : "") + N.slice(0, k + 1);
562
- Oe = (k === -1 ? Oe : "") + N.slice(k + 1), N !== "" && (C = Date.now(), A += N.length);
563
- for (var j = 0; j < P.length; j += 1) {
564
- var K = P.charCodeAt(j);
565
- if (U === ve && K === 10)
566
- U = te;
567
- else if (U === ve && (U = te), K === 13 || K === 10) {
568
- if (U !== te) {
569
- U === Re && (be = j + 1);
570
- var ce = P.slice(Ve, be - 1), de = P.slice(be + (be < j && P.charCodeAt(be) === 32 ? 1 : 0), j);
571
- ce === "data" ? (Ce += `
572
- `, Ce += de) : ce === "id" ? ke = de : ce === "event" ? le = de : ce === "retry" ? (i = Ee(de, i), v = i) : ce === "heartbeatTimeout" && (h = Ee(de, h), z !== 0 && (u(z), z = m(function() {
573
- De();
574
- }, h)));
575
- }
576
- if (U === te) {
577
- if (Ce !== "") {
578
- _ = ke, le === "" && (le = "message");
579
- var Ae = new f(le, {
580
- data: Ce.slice(1),
581
- lastEventId: ke
582
- });
583
- if (e.dispatchEvent(Ae), le === "open" ? ge(e, e.onopen, Ae) : le === "message" ? ge(e, e.onmessage, Ae) : le === "error" && ge(e, e.onerror, Ae), ne === ye)
584
- return;
585
- }
586
- Ce = "", le = "";
587
- }
588
- U = K === 13 ? ve : te;
589
- } else
590
- U === te && (Ve = j, U = Re), U === Re ? K === 58 && (be = j + 1, U = Te) : U === Te && (U = Fe);
591
- }
592
- }
593
- }, Ke = function(N) {
594
- if (ne === me || ne === ae) {
595
- ne = _e, z !== 0 && (u(z), z = 0), z = m(function() {
596
- De();
597
- }, v), v = Se(Math.min(i * 16, v * 2)), e.readyState = ae;
598
- var k = new Le("error", { error: N });
599
- e.dispatchEvent(k), ge(e, e.onerror, k), N != null && console.error(N);
600
- }
601
- }, Ge = function() {
602
- ne = ye, X != null && (X.abort(), X = void 0), z !== 0 && (u(z), z = 0), e.readyState = ye;
603
- }, De = function() {
604
- if (z = 0, ne !== _e) {
605
- if (!C && X != null)
606
- Ke(new Error("No activity within " + h + " milliseconds. " + (ne === ae ? "No response received." : A + " chars received.") + " Reconnecting.")), X != null && (X.abort(), X = void 0);
607
- else {
608
- var N = Math.max((C || Date.now()) + h - Date.now(), 1);
609
- C = !1, z = m(function() {
610
- De();
611
- }, N);
612
- }
613
- return;
614
- }
615
- C = !1, A = 0, z = m(function() {
616
- De();
617
- }, h), ne = ae, Ce = "", le = "", ke = _, Oe = "", Ve = 0, be = 0, U = te;
618
- var k = t;
619
- if (t.slice(0, 5) !== "data:" && t.slice(0, 5) !== "blob:" && _ !== "") {
620
- var q = t.indexOf("?");
621
- k = q === -1 ? t : t.slice(0, q + 1) + t.slice(q + 1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g, function(de, Ae) {
622
- return Ae === c ? "" : de;
623
- }), k += (t.indexOf("?") === -1 ? "?" : "&") + c + "=" + encodeURIComponent(_);
624
- }
625
- var K = e.withCredentials, P = {};
626
- P.Accept = "text/event-stream";
627
- var j = e.headers;
628
- if (j != null)
629
- for (var ce in j)
630
- Object.prototype.hasOwnProperty.call(j, ce) && (P[ce] = j[ce]);
631
- try {
632
- X = xe.open(se, at, ot, Ke, k, K, P);
633
- } catch (de) {
634
- throw Ge(), de;
635
- }
636
- };
637
- e.url = t, e.readyState = ae, e.withCredentials = r, e.headers = g, e._close = Ge, De();
638
- }
639
- G.prototype = Object.create(Y.prototype), G.prototype.CONNECTING = ae, G.prototype.OPEN = me, G.prototype.CLOSED = ye, G.prototype.close = function() {
640
- this._close();
641
- }, G.CONNECTING = ae, G.OPEN = me, G.CLOSED = ye, G.prototype.withCredentials = void 0;
642
- var s = w;
643
- l != null && (w == null || !("withCredentials" in w.prototype)) && (s = G), function(e) {
644
- {
645
- var t = e(n);
646
- t !== void 0 && (d.exports = t);
647
- }
648
- }(function(e) {
649
- e.EventSourcePolyfill = G, e.NativeEventSource = w, e.EventSource = s;
650
- });
651
- })(typeof globalThis > "u" ? typeof window < "u" ? window : typeof self < "u" ? self : st : globalThis);
652
- })(qe, qe.exports);
653
- var St = qe.exports;
654
- function Ct(d) {
655
- ft(d, "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(d, n, a) {
658
- const m = d.slice();
659
- return m[48] = n[a], m;
660
- }
661
- function Ze(d, n, a) {
662
- const m = d.slice();
663
- return m[51] = n[a], m;
664
- }
665
- function At(d) {
666
- let n, a = (
667
- /*balances*/
668
- (d[3].Total ? (
669
- /*formatBalance*/
670
- d[5](
671
- /*balances*/
672
- d[3].Total[0].amount
673
- )
674
- ) : "0") + ""
675
- ), m, u, l, y, p, w, R, B = (
676
- /*isModalDisplayed*/
677
- d[2] && Je(d)
678
- );
679
- return {
680
- c() {
681
- n = O("button"), m = we(a), u = ue(), 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>', y = ue(), B && B.c(), p = bt(), I(n, "class", "BalanceValue");
682
- },
683
- m(T, D) {
684
- fe(T, n, D), L(n, m), L(n, u), L(n, l), fe(T, y, D), B && B.m(T, D), fe(T, p, D), w || (R = Ne(
685
- n,
686
- "click",
687
- /*click_handler*/
688
- d[23]
689
- ), w = !0);
690
- },
691
- p(T, D) {
692
- D[0] & /*balances*/
693
- 8 && a !== (a = /*balances*/
694
- (T[3].Total ? (
695
- /*formatBalance*/
696
- T[5](
697
- /*balances*/
698
- T[3].Total[0].amount
699
- )
700
- ) : "0") + "") && Be(m, a), /*isModalDisplayed*/
701
- T[2] ? B ? B.p(T, D) : (B = Je(T), B.c(), B.m(p.parentNode, p)) : B && (B.d(1), B = null);
702
- },
703
- d(T) {
704
- T && (pe(n), pe(y), pe(p)), B && B.d(T), w = !1, R();
705
- }
706
- };
707
- }
708
- function _t(d) {
709
- let n, a = (
710
- /*$_*/
711
- d[4]("Loading") + ""
712
- ), m;
713
- return {
714
- c() {
715
- n = O("p"), m = we(a);
716
- },
717
- m(u, l) {
718
- fe(u, n, l), L(n, m);
719
- },
720
- p(u, l) {
721
- l[0] & /*$_*/
722
- 16 && a !== (a = /*$_*/
723
- u[4]("Loading") + "") && Be(m, a);
724
- },
725
- d(u) {
726
- u && pe(n);
727
- }
728
- };
729
- }
730
- function Je(d) {
731
- let n, a, m, u, l, y, p = (
732
- /*$_*/
733
- d[4]("Title") + ""
734
- ), w, R, B, T, D, E, F = (
735
- /*$_*/
736
- d[4]("DepositButton") + ""
737
- ), Z, oe, J, V = je(Object.keys(
738
- /*balances*/
739
- d[3]
740
- )), S = [];
741
- for (let b = 0; b < V.length; b += 1)
742
- S[b] = et(Qe(d, V, b));
743
- return {
744
- c() {
745
- n = O("div"), a = O("button"), m = ue(), u = O("div"), l = O("div"), y = O("p"), w = we(p), R = ue(), B = O("div");
746
- for (let b = 0; b < S.length; b += 1)
747
- S[b].c();
748
- T = ue(), D = O("div"), E = O("button"), Z = we(F), I(a, "class", "BalanceModalClose"), I(y, "class", "BalanceModalTitle"), I(l, "class", "BalanceModalHeader"), I(B, "class", "BalanceModalBody"), I(E, "class", "BalanceModalAction"), I(D, "class", "BalanceModalFooter"), I(u, "class", "BalanceModal"), I(n, "class", "BalanceModalWrapper");
749
- },
750
- m(b, W) {
751
- fe(b, n, W), L(n, a), L(n, m), L(n, u), L(u, l), L(l, y), L(y, w), L(u, R), L(u, B);
752
- for (let x = 0; x < S.length; x += 1)
753
- S[x] && S[x].m(B, null);
754
- L(u, T), L(u, D), L(D, E), L(E, Z), oe || (J = [
755
- Ne(
756
- a,
757
- "click",
758
- /*click_handler_1*/
759
- d[24]
760
- ),
761
- Ne(
762
- E,
763
- "click",
764
- /*click_handler_2*/
765
- d[25]
766
- )
767
- ], oe = !0);
768
- },
769
- p(b, W) {
770
- if (W[0] & /*$_*/
771
- 16 && p !== (p = /*$_*/
772
- b[4]("Title") + "") && Be(w, p), W[0] & /*balances, formatBalance, $_*/
773
- 56) {
774
- V = je(Object.keys(
775
- /*balances*/
776
- b[3]
777
- ));
778
- let x;
779
- for (x = 0; x < V.length; x += 1) {
780
- const $ = Qe(b, V, x);
781
- S[x] ? S[x].p($, W) : (S[x] = et($), S[x].c(), S[x].m(B, null));
782
- }
783
- for (; x < S.length; x += 1)
784
- S[x].d(1);
785
- S.length = V.length;
786
- }
787
- W[0] & /*$_*/
788
- 16 && F !== (F = /*$_*/
789
- b[4]("DepositButton") + "") && Be(Z, F);
790
- },
791
- d(b) {
792
- b && pe(n), nt(S, b), oe = !1, wt(J);
793
- }
794
- };
795
- }
796
- function $e(d) {
797
- let n, a, m = (
798
- /*$_*/
799
- d[4](
800
- /*k*/
801
- d[48]
802
- ) + ""
803
- ), u, l, y = (
804
- /*b*/
805
- (d[51].productType ? (
806
- /*$_*/
807
- d[4](
808
- /*b*/
809
- d[51].productType
810
- )
811
- ) : "") + ""
812
- ), p, w, R, B, T = (
813
- /*b*/
814
- (d[51].amount ? (
815
- /*formatBalance*/
816
- d[5](
817
- /*b*/
818
- d[51].amount
819
- )
820
- ) : "0") + ""
821
- ), D;
822
- return {
823
- c() {
824
- n = O("div"), a = O("p"), u = we(m), l = ue(), p = we(y), w = ue(), R = O("p"), B = O("span"), D = we(T), I(a, "class", "BalanceModalText"), I(B, "class", "BalanceModalAmount"), I(R, "class", "BalanceModalValue"), I(n, "class", "BalanceModalRowLine");
825
- },
826
- m(E, F) {
827
- fe(E, n, F), L(n, a), L(a, u), L(a, l), L(a, p), L(n, w), L(n, R), L(R, B), L(B, D);
828
- },
829
- p(E, F) {
830
- F[0] & /*$_, balances*/
831
- 24 && m !== (m = /*$_*/
832
- E[4](
833
- /*k*/
834
- E[48]
835
- ) + "") && Be(u, m), F[0] & /*balances, $_*/
836
- 24 && y !== (y = /*b*/
837
- (E[51].productType ? (
838
- /*$_*/
839
- E[4](
840
- /*b*/
841
- E[51].productType
842
- )
843
- ) : "") + "") && Be(p, y), F[0] & /*balances*/
844
- 8 && T !== (T = /*b*/
845
- (E[51].amount ? (
846
- /*formatBalance*/
847
- E[5](
848
- /*b*/
849
- E[51].amount
850
- )
851
- ) : "0") + "") && Be(D, T);
852
- },
853
- d(E) {
854
- E && pe(n);
855
- }
856
- };
857
- }
858
- function et(d) {
859
- let n, a, m = je(
860
- /*balances*/
861
- d[3][
862
- /*k*/
863
- d[48]
864
- ]
865
- ), u = [];
866
- for (let l = 0; l < m.length; l += 1)
867
- u[l] = $e(Ze(d, m, l));
868
- return {
869
- c() {
870
- n = O("div");
871
- for (let l = 0; l < u.length; l += 1)
872
- u[l].c();
873
- a = ue(), I(n, "class", "BalanceModalRowBoth");
874
- },
875
- m(l, y) {
876
- fe(l, n, y);
877
- for (let p = 0; p < u.length; p += 1)
878
- u[p] && u[p].m(n, null);
879
- L(n, a);
880
- },
881
- p(l, y) {
882
- if (y[0] & /*balances, formatBalance, $_*/
883
- 56) {
884
- m = je(
885
- /*balances*/
886
- l[3][
887
- /*k*/
888
- l[48]
889
- ]
890
- );
891
- let p;
892
- for (p = 0; p < m.length; p += 1) {
893
- const w = Ze(l, m, p);
894
- u[p] ? u[p].p(w, y) : (u[p] = $e(w), u[p].c(), u[p].m(n, a));
895
- }
896
- for (; p < u.length; p += 1)
897
- u[p].d(1);
898
- u.length = m.length;
899
- }
900
- },
901
- d(l) {
902
- l && pe(n), nt(u, l);
903
- }
904
- };
905
- }
906
- function tt(d) {
907
- let n, a, m;
908
- return {
909
- c() {
910
- n = O("button"), I(n, "class", "ShowBalanceModalOverlay");
911
- },
912
- m(u, l) {
913
- fe(u, n, l), a || (m = Ne(
914
- n,
915
- "click",
916
- /*click_handler_3*/
917
- d[26]
918
- ), a = !0);
919
- },
920
- p: Xe,
921
- d(u) {
922
- u && pe(n), a = !1, m();
923
- }
924
- };
925
- }
926
- function Rt(d) {
927
- let n, a, m;
928
- function u(w, R) {
929
- return (
930
- /*isLoading*/
931
- w[1] ? _t : At
932
- );
933
- }
934
- let l = u(d), y = l(d), p = (
935
- /*isModalDisplayed*/
936
- d[2] && tt(d)
937
- );
938
- return {
939
- c() {
940
- n = O("div"), a = O("div"), y.c(), m = ue(), p && p.c(), I(a, "class", "ShowBalance");
941
- },
942
- m(w, R) {
943
- fe(w, n, R), L(n, a), y.m(a, null), L(n, m), p && p.m(n, null), d[27](n);
944
- },
945
- p(w, R) {
946
- l === (l = u(w)) && y ? y.p(w, R) : (y.d(1), y = l(w), y && (y.c(), y.m(a, null))), /*isModalDisplayed*/
947
- w[2] ? p ? p.p(w, R) : (p = tt(w), p.c(), p.m(n, null)) : p && (p.d(1), p = null);
948
- },
949
- i: Xe,
950
- o: Xe,
951
- d(w) {
952
- w && pe(n), y.d(), p && p.d(), d[27](null);
953
- }
954
- };
955
- }
956
- function Et(d, n, a) {
957
- let m;
958
- pt(d, Bt, (s) => a(4, m = s));
959
- let { userid: u = "" } = n, { session: l = "" } = n, { endpoint: y = "" } = n, { lang: p = "en" } = n, { mbsource: w } = n, { clientstyling: R = "" } = n, { clientstylingurl: B = "" } = n, { translationurl: T = "" } = n, { gmversion: D = "gm16" } = n, { displaybalanceoption: E = "All" } = n, { totalcalculationmode: F = "totalCashAmount" } = n, { currencylocale: Z = "en" } = n, { currencydisplay: oe = "symbol" } = n, { maximumfractiondigits: J = "2" } = n, { minimumfractiondigits: V = "0" } = n, { customdisplayformat: S = "" } = n, b, W, x = !0, $ = !1, he = !1, re, Y = "", ee = [], Q;
960
- const f = {}, ie = ["totalCashAmount", "totalRealAmount"], Le = () => {
961
- fetch(T).then((s) => s.json()).then((s) => Object.keys(s).forEach((e) => We(e, s[e]))).catch((s) => console.log(s));
962
- };
963
- Object.keys(Ye).forEach((s) => We(s, Ye[s]));
964
- const _e = (s) => {
965
- if (S)
966
- return ae(s);
967
- const e = Z || p, t = {
968
- style: "currency",
969
- currency: Y,
970
- useGrouping: !0,
971
- currencyDisplay: oe || "code",
972
- maximumFractionDigits: J === "" || isNaN(Number(J)) ? 2 : Number(J),
973
- minimumFractionDigits: V === "" || isNaN(Number(V)) ? 0 : Number(V)
974
- };
975
- return new Intl.NumberFormat(e, t).format(s);
976
- }, ae = (s) => {
977
- const e = [];
978
- let t = "";
979
- for (const o of S)
980
- switch (o) {
981
- default:
982
- t += o;
983
- break;
984
- case "{":
985
- t && e.push(t), t = "";
986
- break;
987
- case "}":
988
- const [r, c] = t.split("|");
989
- if (t = "", r.toLowerCase() === "currency")
990
- t = Y;
991
- else if (r.toLowerCase() === "amount") {
992
- let i = ",", h = ".", _ = 2;
993
- c && (c[0] !== " " && (i = c[0]), c[1] !== " " && (h = c[1]), c[2] !== " " && !isNaN(Number(c[2])) && (_ = Number(c[2])));
994
- let [v, C] = String(Math.floor(s * 10 ** _) / 10 ** _).split(".");
995
- t += v[0];
996
- for (let A = 1; A < v.length; ++A)
997
- (v.length - A) % 3 === 0 ? t += i + v[A] : t += v[A];
998
- C && (t += h + C);
999
- }
1000
- t && e.push(t), t = "";
1001
- break;
1002
- }
1003
- return e.push(t), e.join("");
1004
- }, me = async () => {
1005
- a(1, x = !0);
1006
- const s = new URL(`${y}/v1/player/${u}/account`);
1007
- try {
1008
- const e = await fetch(s, {
1009
- method: "GET",
1010
- headers: { "X-SessionID": l }
1011
- }), t = await e.json();
1012
- if (e.ok)
1013
- ee = t.items, Y = ee.find((o) => o.displayName === "Casino")?.currency, a(3, f.Total = [{ amount: t.totalAmount[Y] }], f), a(
1014
- 3,
1015
- f.Real = [
1016
- {
1017
- amount: ee.find((o) => o.displayName === "Casino")?.balanceAmount
1018
- }
1019
- ],
1020
- f
1021
- ), a(
1022
- 3,
1023
- f.Bonus = [
1024
- {
1025
- amount: ee.find((o) => o.displayName === "UBS")?.balanceAmount
1026
- }
1027
- ],
1028
- f
1029
- );
1030
- else
1031
- throw new Error("Failed to fetch balance data !");
1032
- } catch (e) {
1033
- console.log("Balance error: ", e);
1034
- } finally {
1035
- a(1, x = !1);
1036
- }
1037
- }, ye = () => {
1038
- a(1, x = !0);
1039
- const s = new URL(`${y}/v2/player/${u}/balance`), e = new Headers();
1040
- e.append("X-SessionID", l), fetch(s, { method: "GET", headers: e }).then((o) => o.json()).then((o) => {
1041
- o[F] || a(7, F = ie[0]);
1042
- const r = o.items.find((i) => i.type === "Real" && i.walletAccountType === "Ordinary");
1043
- if (Y = r.currency, he = !!r.productType, a(3, f.Total = [{ amount: 0 }], f), a(3, f.Real = [], f), a(3, f.Bonus = [], f), a(3, f.Credit = [], f), !he) {
1044
- Q = {
1045
- lastOrdinaryAfterAmount: 0,
1046
- showCreditLineAfterAmount: !1
1047
- }, a(3, f.Total[0].amount = o[F][Y], f);
1048
- for (const i of o.items)
1049
- switch (i.type) {
1050
- case "Bonus":
1051
- f.Bonus.length === 0 ? f.Bonus.push({ amount: i.amount }) : a(3, f.Bonus[0].amount += i.amount, f);
1052
- break;
1053
- case "Real":
1054
- if (i.creditLine && f.Credit.length === 0 && f.Credit.push({ amount: i.creditLine }), F === "totalRealAmount")
1055
- continue;
1056
- f.Real.length === 0 ? f.Real.push({ amount: i.amount }) : a(3, f.Real[0].amount += i.amount, f);
1057
- break;
1058
- }
1059
- for (const [i, h] of Object.entries(f))
1060
- h.length < 1 && delete f[i];
1061
- a(1, x = !1);
1062
- return;
1063
- }
1064
- Q = {
1065
- Casino: {
1066
- lastOrdinaryAfterAmount: 0,
1067
- showCreditLineAfterAmount: !1
1068
- },
1069
- Sports: {
1070
- lastOrdinaryAfterAmount: 0,
1071
- showCreditLineAfterAmount: !1
1072
- }
1073
- };
1074
- let c = o.items;
1075
- E && E !== "All" && (c = o.items.filter((i) => i.productType === E));
1076
- for (const i of c) {
1077
- let h;
1078
- switch (i.type) {
1079
- case "Bonus":
1080
- h = f.Bonus.findIndex((_) => _.productType === i.productType), h > 0 ? a(3, f.Bonus[h].amount += i.amount, f) : f.Bonus.push({
1081
- amount: i.amount,
1082
- productType: i.productType
1083
- });
1084
- break;
1085
- case "Real":
1086
- i.creditLine && f.Credit.push({
1087
- amount: i.creditLine,
1088
- productType: i.productType
1089
- }), h = f.Real.findIndex((_) => _.productType === i.productType), h > 0 ? a(3, f.Real[h].amount += i.amount, f) : f.Real.push({
1090
- amount: i.amount,
1091
- productType: i.productType
1092
- });
1093
- break;
1094
- }
1095
- }
1096
- Fe();
1097
- for (const [i, h] of Object.entries(f))
1098
- h.length < 1 && delete f[i];
1099
- a(1, x = !1);
1100
- }).catch(() => {
1101
- throw a(1, x = !1), new Error("Failed to fetch balance data !");
1102
- });
1103
- }, ve = () => {
1104
- if (re && re.close(), l.length < 1)
1105
- return;
1106
- let s, e;
1107
- switch (D) {
1108
- case "gm16":
1109
- s = new URL(`${y}/v2/player/${u}/information/updates`), e = (r) => He(r);
1110
- break;
1111
- case "gmcore":
1112
- s = new URL(`${y}/v1/player/${u}/balance/updates`), e = (r) => Re(r);
1113
- break;
1114
- }
1115
- const t = {
1116
- accept: "text/event-stream",
1117
- "X-SessionId": l
1118
- }, o = new St.EventSourcePolyfill(s, { headers: t });
1119
- re = o, o.addEventListener("message", e);
1120
- }, te = (s) => {
1121
- let e;
1122
- try {
1123
- e = JSON.parse(s);
1124
- } catch (t) {
1125
- console.log("Balance stream failed: ", t);
1126
- return;
1127
- }
1128
- return e;
1129
- }, Re = (s) => {
1130
- const e = te(s.data);
1131
- if (!e) {
1132
- ve();
1133
- return;
1134
- }
1135
- let t = "0";
1136
- const o = e.balanceChange;
1137
- ee = ee.map((r) => (o && o[r.id] && (r = {
1138
- ...r,
1139
- balanceAmount: o[r.id].afterAmount
1140
- }), t = (parseFloat(r?.balanceAmount) + parseFloat(t)).toString(), r)), a(3, f.Real = [{ amount: ee[0]?.balanceAmount }], f), a(3, f.Bonus = [{ amount: ee[1]?.balanceAmount }], f), a(3, f.Total = [{ amount: Number(t) }], f);
1141
- }, Te = (s, e, t) => {
1142
- let o = null;
1143
- switch (t.walletAccountType) {
1144
- case "Ordinary":
1145
- (t.afterAmount !== t.affectedAmount || e.lastOrdinaryAfterAmount === 0) && (e.lastOrdinaryAfterAmount = t.afterAmount, e.showCreditLineAfterAmount || (o = t.afterAmount));
1146
- break;
1147
- case "CreditLine":
1148
- t.afterAmount !== 0 ? (o = t.afterAmount, e.showCreditLineAfterAmount = !0) : (o = e.lastOrdinaryAfterAmount, e.showCreditLineAfterAmount = !1);
1149
- break;
1150
- default:
1151
- o = t.afterAmount;
1152
- }
1153
- return o === null ? s : o;
1154
- }, Fe = () => {
1155
- switch (F) {
1156
- case "totalCashAmount":
1157
- let s = 0;
1158
- for (const t of ["Real", "Bonus"])
1159
- for (const o of f[t])
1160
- s += Math.max(o.amount, 0);
1161
- a(3, f.Total[0].amount = s, f);
1162
- break;
1163
- case "totalRealAmount":
1164
- if (!he)
1165
- return;
1166
- let e = 0;
1167
- for (const t of f.Real)
1168
- e += t.amount;
1169
- a(3, f.Total[0].amount = e, f);
1170
- }
1171
- }, He = (s) => {
1172
- const e = te(s.data);
1173
- if (!e) {
1174
- ve();
1175
- return;
1176
- }
1177
- if (e.type !== "BALANCE_UPDATE_V2")
1178
- return;
1179
- const t = e.body.balanceChange;
1180
- for (const [o, r] of Object.entries(t))
1181
- if (F === "totalRealAmount" && o === "Real" && !he && a(3, f.Total[0].amount = Te(f.Total[0].amount, Q, r), f), !!f[o])
1182
- for (const c of f[o]) {
1183
- if (!he) {
1184
- c.amount = o === "Real" ? Te(c.amount, Q, r) : r.afterAmount;
1185
- continue;
1186
- }
1187
- r.productType === c.productType && (c.amount = o === "Real" ? Te(c.amount, Q[c.productType], r) : r.afterAmount);
1188
- }
1189
- Fe();
1190
- }, Me = () => {
1191
- a(2, $ = !1), window.postMessage({ type: "GoToDeposit" }, window.location.href), typeof gtag == "function" && gtag("event", "GoToDeposit", { context: "PlayerAccountBalanceModal" });
1192
- }, Ie = () => {
1193
- ie.includes(F) || (console.error(`Unsupported value ('${F}') for totalcalculationmode parameter. Only the following values are supported ${ie}. Using default value ('${ie[0]}').`), a(7, F = ie[0]));
1194
- }, Ee = () => {
1195
- switch (Tt(p), Ie(), D) {
1196
- case "gmcore":
1197
- me();
1198
- break;
1199
- case "gm16":
1200
- ye();
1201
- break;
1202
- default:
1203
- throw Error(`Invalid apiversion attribute: ${D}`);
1204
- }
1205
- }, Se = (s) => s.data && s.data.type === "LogoutSuccessfull" && re.close();
1206
- ht(() => (window.addEventListener("message", Se, !1), () => {
1207
- window.emMessageBus && W && W.unsubscribe(), window.removeEventListener("message", Se), re && re.close();
1208
- }));
1209
- const ge = () => a(2, $ = !0), G = () => a(2, $ = !1), ze = () => Me(), Ue = () => a(2, $ = !1);
1210
- function Pe(s) {
1211
- gt[s ? "unshift" : "push"](() => {
1212
- b = s, a(0, b);
1213
- });
1214
- }
1215
- return d.$$set = (s) => {
1216
- "userid" in s && a(8, u = s.userid), "session" in s && a(9, l = s.session), "endpoint" in s && a(10, y = s.endpoint), "lang" in s && a(11, p = s.lang), "mbsource" in s && a(12, w = s.mbsource), "clientstyling" in s && a(13, R = s.clientstyling), "clientstylingurl" in s && a(14, B = s.clientstylingurl), "translationurl" in s && a(15, T = s.translationurl), "gmversion" in s && a(16, D = s.gmversion), "displaybalanceoption" in s && a(17, E = s.displaybalanceoption), "totalcalculationmode" in s && a(7, F = s.totalcalculationmode), "currencylocale" in s && a(18, Z = s.currencylocale), "currencydisplay" in s && a(19, oe = s.currencydisplay), "maximumfractiondigits" in s && a(20, J = s.maximumfractiondigits), "minimumfractiondigits" in s && a(21, V = s.minimumfractiondigits), "customdisplayformat" in s && a(22, S = s.customdisplayformat);
1217
- }, d.$$.update = () => {
1218
- d.$$.dirty[0] & /*endpoint, userid, session, lang, gmversion, displaybalanceoption*/
1219
- 200448 && y && u && l && p && D && E && Ee(), d.$$.dirty[0] & /*endpoint, userid, session, gmversion*/
1220
- 67328 && y && u && l && D && ve(), d.$$.dirty[0] & /*clientstyling, customStylingContainer*/
1221
- 8193 && R && b && yt(b, R), d.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/
1222
- 16385 && B && b && mt(b, B), d.$$.dirty[0] & /*customStylingContainer, mbsource*/
1223
- 4097 && b && vt(b, `${w}.Style`), d.$$.dirty[0] & /*translationurl*/
1224
- 32768 && T && Le();
1225
- }, [
1226
- b,
1227
- x,
1228
- $,
1229
- f,
1230
- m,
1231
- _e,
1232
- Me,
1233
- F,
1234
- u,
1235
- l,
1236
- y,
1237
- p,
1238
- w,
1239
- R,
1240
- B,
1241
- T,
1242
- D,
1243
- E,
1244
- Z,
1245
- oe,
1246
- J,
1247
- V,
1248
- S,
1249
- ge,
1250
- G,
1251
- ze,
1252
- Ue,
1253
- Pe
1254
- ];
1255
- }
1256
- class xt extends lt {
1257
- constructor(n) {
1258
- super(), ct(
1259
- this,
1260
- n,
1261
- Et,
1262
- Rt,
1263
- ut,
1264
- {
1265
- userid: 8,
1266
- session: 9,
1267
- endpoint: 10,
1268
- lang: 11,
1269
- mbsource: 12,
1270
- clientstyling: 13,
1271
- clientstylingurl: 14,
1272
- translationurl: 15,
1273
- gmversion: 16,
1274
- displaybalanceoption: 17,
1275
- totalcalculationmode: 7,
1276
- currencylocale: 18,
1277
- currencydisplay: 19,
1278
- maximumfractiondigits: 20,
1279
- minimumfractiondigits: 21,
1280
- customdisplayformat: 22
1281
- },
1282
- Ct,
1283
- [-1, -1]
1284
- );
1285
- }
1286
- get userid() {
1287
- return this.$$.ctx[8];
1288
- }
1289
- set userid(n) {
1290
- this.$$set({ userid: n }), H();
1291
- }
1292
- get session() {
1293
- return this.$$.ctx[9];
1294
- }
1295
- set session(n) {
1296
- this.$$set({ session: n }), H();
1297
- }
1298
- get endpoint() {
1299
- return this.$$.ctx[10];
1300
- }
1301
- set endpoint(n) {
1302
- this.$$set({ endpoint: n }), H();
1303
- }
1304
- get lang() {
1305
- return this.$$.ctx[11];
1306
- }
1307
- set lang(n) {
1308
- this.$$set({ lang: n }), H();
1309
- }
1310
- get mbsource() {
1311
- return this.$$.ctx[12];
1312
- }
1313
- set mbsource(n) {
1314
- this.$$set({ mbsource: n }), H();
1315
- }
1316
- get clientstyling() {
1317
- return this.$$.ctx[13];
1318
- }
1319
- set clientstyling(n) {
1320
- this.$$set({ clientstyling: n }), H();
1321
- }
1322
- get clientstylingurl() {
1323
- return this.$$.ctx[14];
1324
- }
1325
- set clientstylingurl(n) {
1326
- this.$$set({ clientstylingurl: n }), H();
1327
- }
1328
- get translationurl() {
1329
- return this.$$.ctx[15];
1330
- }
1331
- set translationurl(n) {
1332
- this.$$set({ translationurl: n }), H();
1333
- }
1334
- get gmversion() {
1335
- return this.$$.ctx[16];
1336
- }
1337
- set gmversion(n) {
1338
- this.$$set({ gmversion: n }), H();
1339
- }
1340
- get displaybalanceoption() {
1341
- return this.$$.ctx[17];
1342
- }
1343
- set displaybalanceoption(n) {
1344
- this.$$set({ displaybalanceoption: n }), H();
1345
- }
1346
- get totalcalculationmode() {
1347
- return this.$$.ctx[7];
1348
- }
1349
- set totalcalculationmode(n) {
1350
- this.$$set({ totalcalculationmode: n }), H();
1351
- }
1352
- get currencylocale() {
1353
- return this.$$.ctx[18];
1354
- }
1355
- set currencylocale(n) {
1356
- this.$$set({ currencylocale: n }), H();
1357
- }
1358
- get currencydisplay() {
1359
- return this.$$.ctx[19];
1360
- }
1361
- set currencydisplay(n) {
1362
- this.$$set({ currencydisplay: n }), H();
1363
- }
1364
- get maximumfractiondigits() {
1365
- return this.$$.ctx[20];
1366
- }
1367
- set maximumfractiondigits(n) {
1368
- this.$$set({ maximumfractiondigits: n }), H();
1369
- }
1370
- get minimumfractiondigits() {
1371
- return this.$$.ctx[21];
1372
- }
1373
- set minimumfractiondigits(n) {
1374
- this.$$set({ minimumfractiondigits: n }), H();
1375
- }
1376
- get customdisplayformat() {
1377
- return this.$$.ctx[22];
1378
- }
1379
- set customdisplayformat(n) {
1380
- this.$$set({ customdisplayformat: n }), H();
1381
- }
1382
- }
1383
- dt(xt, { userid: {}, session: {}, endpoint: {}, lang: {}, mbsource: {}, clientstyling: {}, clientstylingurl: {}, translationurl: {}, gmversion: {}, displaybalanceoption: {}, totalcalculationmode: {}, currencylocale: {}, currencydisplay: {}, maximumfractiondigits: {}, minimumfractiondigits: {}, customdisplayformat: {} }, [], [], !0);
1384
- export {
1385
- xt as default
1386
- };