@everymatrix/casino-header-controller-nd 1.55.0 → 1.56.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 (60) hide show
  1. package/components/CasinoHamburgerMenuNd-BXOxWDnU.js +5449 -0
  2. package/components/CasinoHamburgerMenuNd-CDprnR9N.cjs +5 -0
  3. package/components/CasinoHamburgerMenuNd-RHQhri2n.js +5487 -0
  4. package/components/CasinoHeaderControllerNd-CrjISN9T.cjs +1 -0
  5. package/components/{CasinoHeaderControllerNd-bGnLcz2g.js → CasinoHeaderControllerNd-DdRHib4Y.js} +505 -453
  6. package/components/{CasinoHeaderControllerNd-B4Hgo5oq.js → CasinoHeaderControllerNd-DeFJQOBT.js} +525 -473
  7. package/components/PlayerAccountBalanceModalNd-BduIv2jr.js +1553 -0
  8. package/components/PlayerAccountBalanceModalNd-ClQUf9hu.js +1582 -0
  9. package/components/PlayerAccountBalanceModalNd-DB8OTdY6.cjs +13 -0
  10. package/components/PlayerDeposit-D4E7B0VM.cjs +1 -0
  11. package/components/PlayerDeposit-Dn8OMUks.js +391 -0
  12. package/components/PlayerDeposit-Owd9kBaC.js +391 -0
  13. package/es2015/casino-header-controller-nd.cjs +1 -1
  14. package/es2015/casino-header-controller-nd.js +1 -1
  15. package/esnext/casino-header-controller-nd.js +1 -1
  16. package/package.json +1 -1
  17. package/stencil/gamification-dropdown-12tdWeqm.cjs +1 -0
  18. package/stencil/gamification-dropdown-246b88da-BcsKYpR0.js +126 -0
  19. package/stencil/gamification-dropdown-246b88da-Dckk_dCi.js +144 -0
  20. package/stencil/gamification-dropdown-246b88da-ImWNLZys.cjs +1 -0
  21. package/stencil/gamification-dropdown-CGlt7V-H.js +7 -0
  22. package/stencil/gamification-dropdown-GR6HFAZA.js +25 -0
  23. package/stencil/gamification-dropdown_4-BwwlBsis.cjs +192 -0
  24. package/stencil/{gamification-dropdown_4-Cg4EiNTS.js → gamification-dropdown_4-Denu_YbM.js} +21 -21
  25. package/stencil/{gamification-dropdown_4-BZffGACN.js → gamification-dropdown_4-QRIgZIS5.js} +19 -19
  26. package/stencil/index-30fda5fb-CiEO4toK.js +833 -0
  27. package/stencil/index-30fda5fb-DqSvPD7T.cjs +1 -0
  28. package/stencil/index-30fda5fb-XWBRFzl0.js +860 -0
  29. package/stencil/{player-elevate-card-Bo3fCMU8.js → player-elevate-card-BPyvJoKU.js} +4 -4
  30. package/stencil/{player-elevate-card-CGn57laL.js → player-elevate-card-CSXjQ70j.js} +4 -4
  31. package/stencil/player-elevate-card-D5kbh1fR.cjs +64 -0
  32. package/stencil/{player-elevate-card-items-2078bd83-DvW50KrW.js → player-elevate-card-items-be1e68f1-C-idvDlE.js} +1 -3
  33. package/stencil/{player-elevate-card-items-2078bd83-CUXuMGCR.js → player-elevate-card-items-be1e68f1-CF4tyvaU.js} +1 -3
  34. package/stencil/player-elevate-card-items-be1e68f1-CxCehVul.cjs +1 -0
  35. package/stencil/{player-elevate-pointcard-jLOeOCx0.js → player-elevate-pointcard-Baq8OlNX.js} +7 -7
  36. package/stencil/player-elevate-pointcard-DVXsZKCw.cjs +1 -0
  37. package/stencil/{player-elevate-pointcard-teAW1AOh.js → player-elevate-pointcard-jvw6Jdcf.js} +7 -7
  38. package/components/CasinoHamburgerMenuNd-CAV9ARg-.js +0 -5485
  39. package/components/CasinoHamburgerMenuNd-CSCV-5CJ.cjs +0 -5
  40. package/components/CasinoHamburgerMenuNd-DNYzzmAB.js +0 -5447
  41. package/components/CasinoHeaderControllerNd-Cd6hH1wA.cjs +0 -1
  42. package/components/PlayerAccountBalanceModalNd-BJJzPbdP.js +0 -1586
  43. package/components/PlayerAccountBalanceModalNd-Ca8dF_9M.js +0 -1557
  44. package/components/PlayerAccountBalanceModalNd-P1iLuuUG.cjs +0 -13
  45. package/components/PlayerDeposit-B0r58Ypp.js +0 -414
  46. package/components/PlayerDeposit-BkVMpjA9.js +0 -414
  47. package/components/PlayerDeposit-CjEddUaf.cjs +0 -1
  48. package/stencil/gamification-dropdown-456bb56a-BJ9kAxaI.js +0 -103
  49. package/stencil/gamification-dropdown-456bb56a-CldmfDdk.js +0 -121
  50. package/stencil/gamification-dropdown-456bb56a-ClnsHPoT.cjs +0 -1
  51. package/stencil/gamification-dropdown-BdMkPvQc.js +0 -7
  52. package/stencil/gamification-dropdown-CnrQK1ei.cjs +0 -1
  53. package/stencil/gamification-dropdown-FVqK4we0.js +0 -25
  54. package/stencil/gamification-dropdown_4-DNV5b4s7.cjs +0 -192
  55. package/stencil/index-171550cf-BY--MwdX.cjs +0 -1
  56. package/stencil/index-171550cf-CVTOm2AV.js +0 -799
  57. package/stencil/index-171550cf-JwZ7TN-k.js +0 -772
  58. package/stencil/player-elevate-card-CW-95gEJ.cjs +0 -64
  59. package/stencil/player-elevate-card-items-2078bd83-DSxFMBLz.cjs +0 -1
  60. package/stencil/player-elevate-pointcard-DVgy3cq3.cjs +0 -1
@@ -0,0 +1,391 @@
1
+ import { b as K, $ as V, S as X, i as Z, s as J, f as w, d as $, z as U, g as S, D as L, P as z, m as x, n as h, p as M, q as E, E as C, r as d, v as ee, I as te, w as ie, o as ae, F as k, A as se, B as W, L as re, M as ne, N as oe, c as le, K as ce } from "./CasinoHamburgerMenuNd-RHQhri2n.js";
2
+ function H(a, e) {
3
+ K(a, e);
4
+ }
5
+ function de(a) {
6
+ V.set(a);
7
+ }
8
+ const j = {
9
+ en: {
10
+ titleDeposit: "Deposit",
11
+ loading: "Loading, please wait ..."
12
+ },
13
+ "zh-hk": {
14
+ titleDeposit: "訂金",
15
+ loading: "加載請稍候…"
16
+ },
17
+ fr: {
18
+ titleDeposit: "Dépôt",
19
+ loading: "Chargement, veuillez patienter ..."
20
+ },
21
+ tr: {
22
+ titleDeposit: "PARA YATIR",
23
+ loading: "Yükleniyor ..."
24
+ },
25
+ ro: {
26
+ titleDeposit: "Depunere",
27
+ loading: "Se încarcă..."
28
+ },
29
+ es: {
30
+ titleDeposit: "Deposita",
31
+ loading: "Cargando ..."
32
+ },
33
+ pt: {
34
+ titleDeposit: "Depósito",
35
+ loading: "Carregando, por favor espere ..."
36
+ },
37
+ hr: {
38
+ titleDeposit: "Uplata",
39
+ loading: "Učitavanje"
40
+ },
41
+ "pt-br": {
42
+ titleDeposit: "Depositar",
43
+ Loading: "Carregando, por favor espere..."
44
+ },
45
+ "es-mx": {
46
+ titleDeposit: "Depositar",
47
+ Loading: "Cargando, por favor espere..."
48
+ }
49
+ };
50
+ function ue(a) {
51
+ $(a, "svelte-lvm6lo", "button{font-family:var(--emw--button-typography)}input,select,option{font-family:inherit}.DepositWrapper{background-color:var(--emw--color-pale, var(--emw--color-gray-50, #F1F1F1));border-radius:var(--emw--border-radius-large, 20px);color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));padding:50px 50px 30px 50px;max-width:100%;height:var(--dynamic-height)}.DepositWrapper.DepositWrapperMobile{padding:20px 15px;max-width:unset;height:var(--dynamic-height)}.MenuReturnButton{color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));display:inline-flex;align-items:center;column-gap:10px;margin-bottom:10px}.MenuReturnButton svg{fill:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E))}.DepositTitle{font-size:var(--emw--font-size-x-large, 26px);color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));font-weight:var(--emw--font-weigh-normal, 400)}.DepositTitleMobile{font-size:var(--emw--size-standard, 16px)}.DepositTitleNone{display:none}.DepositIframeWrapper iframe{border:none;width:100%;height:85vh;border-radius:var(--emw--border-radius-large, 20px)}");
52
+ }
53
+ function he(a) {
54
+ let e, i, n, s, l, m, c, p, y, o, r = (
55
+ /*$_*/
56
+ a[4]("titleDeposit") + ""
57
+ ), u, b, _;
58
+ return {
59
+ c() {
60
+ e = M("div"), i = k("svg"), n = k("defs"), s = k("style"), l = C(".aaa{fill:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));}"), m = k("g"), c = k("g"), p = k("path"), y = E(), o = M("h2"), u = C(r), d(p, "class", "aaa"), d(p, "d", "M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z"), d(p, "transform", "translate(15 15) rotate(180)"), d(c, "transform", "translate(20 158)"), d(m, "transform", "translate(-20 -158)"), d(i, "xmlns", "http://www.w3.org/2000/svg"), d(i, "width", "15"), d(i, "height", "15"), d(i, "viewBox", "0 0 15 15"), d(o, "class", "DepositTitleMobile"), d(e, "class", "MenuReturnButton");
61
+ },
62
+ m(f, g) {
63
+ x(f, e, g), h(e, i), h(i, n), h(n, s), h(s, l), h(i, m), h(m, c), h(c, p), h(e, y), h(e, o), h(o, u), b || (_ = ae(
64
+ e,
65
+ "click",
66
+ /*click_handler*/
67
+ a[18]
68
+ ), b = !0);
69
+ },
70
+ p(f, g) {
71
+ g & /*$_*/
72
+ 16 && r !== (r = /*$_*/
73
+ f[4]("titleDeposit") + "") && L(u, r);
74
+ },
75
+ d(f) {
76
+ f && S(e), b = !1, _();
77
+ }
78
+ };
79
+ }
80
+ function pe(a) {
81
+ let e, i, n;
82
+ return {
83
+ c() {
84
+ e = M("div"), i = M("iframe"), W(i.src, n = /*iframeUrl*/
85
+ a[3]) || d(i, "src", n), d(i, "title", "Deposit Iframe"), d(e, "class", "DepositIframeWrapper");
86
+ },
87
+ m(s, l) {
88
+ x(s, e, l), h(e, i);
89
+ },
90
+ p(s, l) {
91
+ l & /*iframeUrl*/
92
+ 8 && !W(i.src, n = /*iframeUrl*/
93
+ s[3]) && d(i, "src", n);
94
+ },
95
+ d(s) {
96
+ s && S(e);
97
+ }
98
+ };
99
+ }
100
+ function ge(a) {
101
+ let e, i = (
102
+ /*$_*/
103
+ a[4]("loading") + ""
104
+ ), n;
105
+ return {
106
+ c() {
107
+ e = M("p"), n = C(i);
108
+ },
109
+ m(s, l) {
110
+ x(s, e, l), h(e, n);
111
+ },
112
+ p(s, l) {
113
+ l & /*$_*/
114
+ 16 && i !== (i = /*$_*/
115
+ s[4]("loading") + "") && L(n, i);
116
+ },
117
+ d(s) {
118
+ s && S(e);
119
+ }
120
+ };
121
+ }
122
+ function me(a) {
123
+ let e, i, n, s = (
124
+ /*$_*/
125
+ a[4]("titleDeposit") + ""
126
+ ), l, m, c = (
127
+ /*isMobile*/
128
+ a[5] && he(a)
129
+ );
130
+ function p(r, u) {
131
+ return (
132
+ /*isLoading*/
133
+ r[1] ? ge : pe
134
+ );
135
+ }
136
+ let y = p(a), o = y(a);
137
+ return {
138
+ c() {
139
+ e = M("div"), c && c.c(), i = E(), n = M("h2"), l = C(s), m = E(), o.c(), d(n, "class", "DepositTitle " + /*isMobile*/
140
+ (a[5] ? "DepositTitleNone" : "")), d(e, "class", "DepositWrapper " + /*isMobile*/
141
+ (a[5] ? "DepositWrapperMobile" : "")), z(
142
+ e,
143
+ "--dynamic-height",
144
+ /*dynamicHeight*/
145
+ a[2]
146
+ );
147
+ },
148
+ m(r, u) {
149
+ x(r, e, u), c && c.m(e, null), h(e, i), h(e, n), h(n, l), h(e, m), o.m(e, null), a[19](e);
150
+ },
151
+ p(r, [u]) {
152
+ /*isMobile*/
153
+ r[5] && c.p(r, u), u & /*$_*/
154
+ 16 && s !== (s = /*$_*/
155
+ r[4]("titleDeposit") + "") && L(l, s), y === (y = p(r)) && o ? o.p(r, u) : (o.d(1), o = y(r), o && (o.c(), o.m(e, null))), u & /*dynamicHeight*/
156
+ 4 && z(
157
+ e,
158
+ "--dynamic-height",
159
+ /*dynamicHeight*/
160
+ r[2]
161
+ );
162
+ },
163
+ i: U,
164
+ o: U,
165
+ d(r) {
166
+ r && S(e), c && c.d(), o.d(), a[19](null);
167
+ }
168
+ };
169
+ }
170
+ function fe(a, e, i) {
171
+ let n, s;
172
+ ee(a, ce, (t) => i(4, s = t));
173
+ let { endpoint: l = "" } = e, { session: m = "" } = e, { playerid: c = "" } = e, { lang: p = "en" } = e, { hasdefaultamount: y = "" } = e, { clientstyling: o = "" } = e, { clientstylingurl: r = "" } = e, { translationurl: u = "" } = e, { playercurrency: b = "" } = e, { mbsource: _ } = e, { shortcashierenabled: f = "false" } = e, g, G = window.navigator.userAgent, R = te(G) !== "PC", B = !0, I, T = 0, P = "";
174
+ const N = () => {
175
+ fetch(u).then((D) => D.json()).then((D) => {
176
+ Object.keys(D).forEach((v) => {
177
+ H(v, D[v]);
178
+ });
179
+ }).catch((D) => {
180
+ console.log(D);
181
+ });
182
+ };
183
+ Object.keys(j).forEach((t) => {
184
+ H(t, j[t]);
185
+ });
186
+ const A = () => {
187
+ window.postMessage({ type: "GoToPreviousRoute", isMobile: R }, window.location.href);
188
+ }, F = (t) => {
189
+ if (t.data) {
190
+ switch (t.data.type) {
191
+ case "ProfileDetailsData":
192
+ i(7, b = t.data.profileDetails.currency);
193
+ break;
194
+ }
195
+ switch (t.data["MMFE:setQuickDepositHeight"] && i(2, I = t.data["MMFE:setQuickDepositHeight"].toString() + "px"), t.data["MMFE:openFullCashier"] === "true" && (window.postMessage({ type: "GoToDeposit" }, window.location.href), window.postMessage({ type: "CloseShortCashier" }, window.location.href)), t.data.redirect) {
196
+ case "mm-hc-casino":
197
+ window.postMessage({ type: "GoToCasino" }, window.location.href);
198
+ break;
199
+ case "mm-hc-sports":
200
+ window.postMessage({ type: "GoToSports" }, window.location.href);
201
+ break;
202
+ case "mm-hc-contact":
203
+ window.postMessage({ type: "GoToCustomerSupport" }, window.location.href), window.postMessage({ type: "CloseShortCashier" }, window.location.href);
204
+ break;
205
+ case "mm-hc-back-to-merchant":
206
+ window.postMessage({ type: "GoToHomepage" }, window.location.href);
207
+ break;
208
+ case "mm-wm-hc-init-deposit":
209
+ window.postMessage(
210
+ {
211
+ type: "RedirectWithdrawDepositCloseModal"
212
+ },
213
+ window.location.href
214
+ );
215
+ break;
216
+ case "mm-wm-hc-init-deposit-quick":
217
+ window.postMessage({ type: "CloseShortCashier" }, window.location.href);
218
+ break;
219
+ }
220
+ }
221
+ }, q = () => {
222
+ let t = new URL(`${l}/v1/player/${c}/hostedcashier/initializedeposit?showBonusSelectionInput=true`);
223
+ if (t.searchParams.append("language", p), n && t.searchParams.append("isShortCashier", f), y)
224
+ switch (b) {
225
+ case "USD":
226
+ T = 0.4;
227
+ break;
228
+ case "CDF":
229
+ T = 1e3;
230
+ break;
231
+ }
232
+ let D = {
233
+ method: "POST",
234
+ headers: {
235
+ "X-SessionId": m,
236
+ currency: b || "EUR",
237
+ amount: T,
238
+ cashierMode: "Default",
239
+ IsShortCashier: f,
240
+ accept: "application/json"
241
+ }
242
+ };
243
+ fetch(t.href, D).then((v) => v.json()).then(
244
+ (v) => {
245
+ i(1, B = !1), i(3, P = v.CashierUrl);
246
+ },
247
+ (v) => {
248
+ console.error(v);
249
+ }
250
+ );
251
+ }, O = () => {
252
+ de(p);
253
+ };
254
+ ie(() => (window.addEventListener("message", F, !1), () => {
255
+ window.removeEventListener("message", F);
256
+ }));
257
+ const Q = () => A();
258
+ function Y(t) {
259
+ se[t ? "unshift" : "push"](() => {
260
+ g = t, i(0, g);
261
+ });
262
+ }
263
+ return a.$$set = (t) => {
264
+ "endpoint" in t && i(8, l = t.endpoint), "session" in t && i(9, m = t.session), "playerid" in t && i(10, c = t.playerid), "lang" in t && i(11, p = t.lang), "hasdefaultamount" in t && i(12, y = t.hasdefaultamount), "clientstyling" in t && i(13, o = t.clientstyling), "clientstylingurl" in t && i(14, r = t.clientstylingurl), "translationurl" in t && i(15, u = t.translationurl), "playercurrency" in t && i(7, b = t.playercurrency), "mbsource" in t && i(16, _ = t.mbsource), "shortcashierenabled" in t && i(17, f = t.shortcashierenabled);
265
+ }, a.$$.update = () => {
266
+ a.$$.dirty & /*lang*/
267
+ 2048 && p && O(), a.$$.dirty & /*shortcashierenabled*/
268
+ 131072 && (n = f.toLocaleLowerCase() === "true"), a.$$.dirty & /*clientstyling, customStylingContainer*/
269
+ 8193 && o && g && re(g, o), a.$$.dirty & /*clientstylingurl, customStylingContainer*/
270
+ 16385 && r && g && ne(g, r), a.$$.dirty & /*mbsource, customStylingContainer*/
271
+ 65537 && _ && g && oe(g, `${_}.Style`), a.$$.dirty & /*translationurl*/
272
+ 32768 && u && N(), a.$$.dirty & /*session, playerid, endpoint, playercurrency, lang, shortcashierenabled*/
273
+ 135040 && m && c && l && b && p && f && q();
274
+ }, [
275
+ g,
276
+ B,
277
+ I,
278
+ P,
279
+ s,
280
+ R,
281
+ A,
282
+ b,
283
+ l,
284
+ m,
285
+ c,
286
+ p,
287
+ y,
288
+ o,
289
+ r,
290
+ u,
291
+ _,
292
+ f,
293
+ Q,
294
+ Y
295
+ ];
296
+ }
297
+ class ye extends X {
298
+ constructor(e) {
299
+ super(), Z(
300
+ this,
301
+ e,
302
+ fe,
303
+ me,
304
+ J,
305
+ {
306
+ endpoint: 8,
307
+ session: 9,
308
+ playerid: 10,
309
+ lang: 11,
310
+ hasdefaultamount: 12,
311
+ clientstyling: 13,
312
+ clientstylingurl: 14,
313
+ translationurl: 15,
314
+ playercurrency: 7,
315
+ mbsource: 16,
316
+ shortcashierenabled: 17
317
+ },
318
+ ue
319
+ );
320
+ }
321
+ get endpoint() {
322
+ return this.$$.ctx[8];
323
+ }
324
+ set endpoint(e) {
325
+ this.$$set({ endpoint: e }), w();
326
+ }
327
+ get session() {
328
+ return this.$$.ctx[9];
329
+ }
330
+ set session(e) {
331
+ this.$$set({ session: e }), w();
332
+ }
333
+ get playerid() {
334
+ return this.$$.ctx[10];
335
+ }
336
+ set playerid(e) {
337
+ this.$$set({ playerid: e }), w();
338
+ }
339
+ get lang() {
340
+ return this.$$.ctx[11];
341
+ }
342
+ set lang(e) {
343
+ this.$$set({ lang: e }), w();
344
+ }
345
+ get hasdefaultamount() {
346
+ return this.$$.ctx[12];
347
+ }
348
+ set hasdefaultamount(e) {
349
+ this.$$set({ hasdefaultamount: e }), w();
350
+ }
351
+ get clientstyling() {
352
+ return this.$$.ctx[13];
353
+ }
354
+ set clientstyling(e) {
355
+ this.$$set({ clientstyling: e }), w();
356
+ }
357
+ get clientstylingurl() {
358
+ return this.$$.ctx[14];
359
+ }
360
+ set clientstylingurl(e) {
361
+ this.$$set({ clientstylingurl: e }), w();
362
+ }
363
+ get translationurl() {
364
+ return this.$$.ctx[15];
365
+ }
366
+ set translationurl(e) {
367
+ this.$$set({ translationurl: e }), w();
368
+ }
369
+ get playercurrency() {
370
+ return this.$$.ctx[7];
371
+ }
372
+ set playercurrency(e) {
373
+ this.$$set({ playercurrency: e }), w();
374
+ }
375
+ get mbsource() {
376
+ return this.$$.ctx[16];
377
+ }
378
+ set mbsource(e) {
379
+ this.$$set({ mbsource: e }), w();
380
+ }
381
+ get shortcashierenabled() {
382
+ return this.$$.ctx[17];
383
+ }
384
+ set shortcashierenabled(e) {
385
+ this.$$set({ shortcashierenabled: e }), w();
386
+ }
387
+ }
388
+ le(ye, { endpoint: {}, session: {}, playerid: {}, lang: {}, hasdefaultamount: {}, clientstyling: {}, clientstylingurl: {}, translationurl: {}, playercurrency: {}, mbsource: {}, shortcashierenabled: {} }, [], [], !0);
389
+ export {
390
+ ye as default
391
+ };
@@ -1 +1 @@
1
- "use strict";if(typeof window!="undefined"){let n=function(t){return function(...s){try{return t.apply(this,s)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw e}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>require("../components/CasinoHeaderControllerNd-Cd6hH1wA.cjs")).then(({default:t})=>{!customElements.get("casino-header-controller-nd")&&customElements.define("casino-header-controller-nd",t.element)})}
1
+ "use strict";if(typeof window!="undefined"){let n=function(t){return function(...s){try{return t.apply(this,s)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw e}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>require("../components/CasinoHeaderControllerNd-CrjISN9T.cjs")).then(({default:t})=>{!customElements.get("casino-header-controller-nd")&&customElements.define("casino-header-controller-nd",t.element)})}
@@ -10,7 +10,7 @@ if (typeof window != "undefined") {
10
10
  }
11
11
  };
12
12
  };
13
- customElements.define = n(customElements.define), import("../components/CasinoHeaderControllerNd-B4Hgo5oq.js").then(({ default: t }) => {
13
+ customElements.define = n(customElements.define), import("../components/CasinoHeaderControllerNd-DeFJQOBT.js").then(({ default: t }) => {
14
14
  !customElements.get("casino-header-controller-nd") && customElements.define("casino-header-controller-nd", t.element);
15
15
  });
16
16
  }
@@ -1,4 +1,4 @@
1
- import { C as s } from "../components/CasinoHeaderControllerNd-bGnLcz2g.js";
1
+ import { C as s } from "../components/CasinoHeaderControllerNd-DdRHib4Y.js";
2
2
  function r(t) {
3
3
  return function(...n) {
4
4
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/casino-header-controller-nd",
3
- "version": "1.55.0",
3
+ "version": "1.56.0",
4
4
  "type": "module",
5
5
  "main": "esnext/casino-header-controller-nd.js",
6
6
  "module": "esnext/casino-header-controller-nd.js",
@@ -0,0 +1 @@
1
+ "use strict";var s=(n,a,t)=>new Promise((d,o)=>{var g=e=>{try{l(t.next(e))}catch(r){o(r)}},y=e=>{try{l(t.throw(e))}catch(r){o(r)}},l=e=>e.done?d(e.value):Promise.resolve(e.value).then(g,y);l((t=t.apply(n,a)).next())});const p=require("./index-30fda5fb-DqSvPD7T.cjs"),c=require("./app-globals-0f993ce5-sCt45RkC.cjs");var i=typeof document!="undefined"?document.currentScript:null,u=()=>{const n=typeof document=="undefined"?require("url").pathToFileURL(__filename).href:i&&i.tagName.toUpperCase()==="SCRIPT"&&i.src||new URL("stencil/gamification-dropdown-12tdWeqm.cjs",document.baseURI).href,a={};return n!==""&&(a.resourcesUrl=new URL(".",n).href),p.promiseResolve(a)};u().then(n=>s(exports,null,function*(){return yield c.globalScripts(),p.bootstrapLazy([["gamification-dropdown_4",[[1,"gamification-dropdown",{endpoint:[513],language:[513],session:[513],mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],isOpen:[32],isLoading:[32],loyaltyPoints:[32]},null,{translationUrl:["handleNewTranslations"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}],[1,"player-elevate-loyaltycard",{endpoint:[513],theme:[513],session:[513],playerAvatarUrl:[513,"player-avatar-url"],language:[513],playerName:[513,"player-name"],dateFormat:[513,"date-format"],mbSource:[1,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],pointExpireString:[32],playerElevateLevel:[32],elevateWalletTotal:[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}],[4,"general-styling-wrapper",{clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],translationUrl:[1,"translation-url"],targetTranslations:[16]}],[0,"player-elevate-card-data",{params:[8],playerElevateLevel:[32],pointExpireString:[32]},[[9,"resize","handleWindowResizs"],[8,"redeemGiftButton","redeemGiftButtonHandler"]],{params:["onParamsChanged"]}]]],["player-elevate-card",[[1,"player-elevate-card",{endpoint:[513],theme:[513],session:[513],playerAvatarUrl:[513,"player-avatar-url"],language:[513],playerName:[513,"player-name"],dateFormat:[513,"date-format"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],pointExpireString:[32],playerLevelFlag:[32],playerElevateLevel:[32],elevateWalletTotal:[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}]]],["player-elevate-pointcard",[[1,"player-elevate-pointcard",{endpoint:[513],theme:[513],session:[513],playerAvatarUrl:[513,"player-avatar-url"],language:[513],playerName:[513,"player-name"],cardTitle:[513,"card-title"],buttonType:[513,"button-type"],dateFormat:[513,"date-format"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],pointExpireString:[32],playerElevateLevel:[32],elevateWalletTotal:[32],elevateSPTotal:[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}]]]],n)}));
@@ -0,0 +1,126 @@
1
+ import { r as g, h as a, g as f } from "./index-30fda5fb-CiEO4toK.js";
2
+ const m = "en";
3
+ let l = {
4
+ en: {
5
+ gamificationNoPoints: "No points"
6
+ },
7
+ de: {
8
+ gamificationNoPoints: "No points"
9
+ },
10
+ ro: {
11
+ gamificationNoPoints: "No points"
12
+ },
13
+ fr: {
14
+ gamificationNoPoints: "No points"
15
+ },
16
+ ar: {
17
+ gamificationNoPoints: "No points"
18
+ },
19
+ hr: {
20
+ gamificationNoPoints: "No points"
21
+ }
22
+ };
23
+ const h = (i) => new Promise((t) => {
24
+ fetch(i).then((n) => n.json()).then((n) => {
25
+ Object.keys(n).forEach((e) => {
26
+ l[e] || (l[e] = {});
27
+ for (let o in n[e])
28
+ l[e][o] = n[e][o];
29
+ }), t(!0);
30
+ });
31
+ }), u = (i, t) => {
32
+ const n = t;
33
+ return l[n !== void 0 && n in l ? n : m][i];
34
+ };
35
+ function d(i, t) {
36
+ if (i) {
37
+ const n = document.createElement("style");
38
+ n.innerHTML = t, i.appendChild(n);
39
+ }
40
+ }
41
+ function p(i, t) {
42
+ const n = new URL(t);
43
+ fetch(n.href).then((e) => e.text()).then((e) => {
44
+ const o = document.createElement("style");
45
+ o.innerHTML = e, i && i.appendChild(o);
46
+ }).catch((e) => {
47
+ console.error("There was an error while trying to load client styling from URL", e);
48
+ });
49
+ }
50
+ function y(i, t, n) {
51
+ if (window.emMessageBus) {
52
+ const e = document.createElement("style");
53
+ window.emMessageBus.subscribe(t, (o) => {
54
+ e.innerHTML = o, i && i.appendChild(e);
55
+ });
56
+ }
57
+ }
58
+ const w = ":host{display:block}.GamificationDropdownContainer{position:relative}.GamificationDropdownContainer .GamificationDropdown{position:absolute;left:0;z-index:200;overflow:hidden;cursor:pointer}.GamificationDropdownButton{cursor:pointer;font-size:14px;height:20px;background-color:unset;color:var(--emw--color-typography, #FFFFFF);padding:0;border:none;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:flex;align-items:center;justify-content:center;line-height:0}.GamificationDropdownButton:hover{color:var(--emw--color-primary, #52d004)}.GamificationDropdownButton:hover svg{fill:var(--emw--color-primary, #52d004)}.GamificationDropdownButton.IsOpen{color:var(--emw--color-primary, #52d004)}.GamificationDropdownButton.IsOpen svg{fill:var(--emw--color-primary, #52d004)}.GamificationDropdownButton .TriangleActive,.GamificationDropdownButton .TriangleInactive{display:block;transition:all 0.2s}.GamificationDropdownButton .TriangleActive{transform:scale(1.1) rotateX(180deg) translateY(3px);fill:var(--emw--color-primary, #52d004);margin-top:4px}.GamificationDropdownButton svg{fill:var(--emw--color-typography, #FFFFFF);margin-left:8px;width:16px}", v = w, C = class {
59
+ constructor(i) {
60
+ g(this, i), this.language = "en", this.session = "", this.clientStyling = "", this.clientStylingUrl = "", this.translationUrl = "", this.isOpen = !1, this.isLoading = !1, this.navigateToGamification = () => {
61
+ window.postMessage({ type: "NavigateToGamification" }, window.location.href), this.isOpen = !1;
62
+ }, this.handleOutsideClick = (t) => {
63
+ t.composedPath().includes(this.el) || (this.isOpen = !1, document.removeEventListener("click", this.handleOutsideClick));
64
+ }, this.handleDropdownClick = (t) => {
65
+ t.stopPropagation(), this.isOpen = !this.isOpen, this.isOpen ? document.addEventListener("click", this.handleOutsideClick) : document.removeEventListener("click", this.handleOutsideClick);
66
+ };
67
+ }
68
+ handleNewTranslations() {
69
+ this.isLoading = !0, h(this.translationUrl).then(() => {
70
+ this.isLoading = !1;
71
+ });
72
+ }
73
+ handleClientStylingChange(i, t) {
74
+ i != t && d(this.stylingContainer, this.clientStyling);
75
+ }
76
+ handleClientStylingChangeURL(i, t) {
77
+ i != t && this.clientStylingUrl && p(this.stylingContainer, this.clientStylingUrl);
78
+ }
79
+ async componentWillLoad() {
80
+ if (this.translationUrl.length > 2 && await h(this.translationUrl), this.endpoint && this.language)
81
+ return this.fetchPointsData();
82
+ }
83
+ componentDidLoad() {
84
+ this.stylingContainer && (window.emMessageBus != null ? y(this.stylingContainer, `${this.mbSource}.Style`) : (this.clientStyling && d(this.stylingContainer, this.clientStyling), this.clientStylingUrl && p(this.stylingContainer, this.clientStylingUrl)));
85
+ }
86
+ disconnectedCallback() {
87
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
88
+ }
89
+ fetchPointsData() {
90
+ let i = new URL(`${this.endpoint}/v1/elevate/playerInfo`);
91
+ i.searchParams.append("language", this.language);
92
+ const t = new Headers();
93
+ t.append("X-SessionId", this.session);
94
+ const n = {
95
+ method: "GET",
96
+ headers: t
97
+ };
98
+ return new Promise((e, o) => {
99
+ this.isLoading = !0, fetch(i.href, n).then((s) => s.json()).then((s) => {
100
+ var r, c;
101
+ this.loyaltyPoints = (c = (r = s?.data) === null || r === void 0 ? void 0 : r.level) === null || c === void 0 ? void 0 : c.loyaltyPoints, e(!0);
102
+ }).catch((s) => {
103
+ console.error(s), o(s);
104
+ }).finally(() => {
105
+ this.isLoading = !1;
106
+ });
107
+ });
108
+ }
109
+ render() {
110
+ return this.isLoading ? null : a("div", { ref: (i) => this.stylingContainer = i, class: "GamificationDropdownContainer" }, a("button", { class: `GamificationDropdownButton ${this.isOpen ? "IsOpen" : ""}`, type: "button", onClick: (i) => this.handleDropdownClick(i), title: typeof this.loyaltyPoints == "number" ? String(this.loyaltyPoints) : u("gamificationNoPoints", this.language) }, typeof this.loyaltyPoints == "number" ? `${this.loyaltyPoints} XP` : "...", a("span", { class: this.isOpen ? "TriangleActive" : "TriangleInactive" }, a("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "6.835", viewBox: "0 0 14 6.835" }, a("path", { id: "arrow", d: "M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z", transform: "translate(-274.511 -441.088)" })))), this.isOpen && a("div", { class: "GamificationDropdown", onClick: this.navigateToGamification }, a("player-elevate-loyaltycard", { endpoint: this.endpoint, session: this.session, language: this.language, "client-styling-url": this.clientStylingUrl, "client-styling": this.clientStyling })));
111
+ }
112
+ get el() {
113
+ return f(this);
114
+ }
115
+ static get watchers() {
116
+ return {
117
+ translationUrl: ["handleNewTranslations"],
118
+ clientStyling: ["handleClientStylingChange"],
119
+ clientStylingUrl: ["handleClientStylingChangeURL"]
120
+ };
121
+ }
122
+ };
123
+ C.style = v;
124
+ export {
125
+ C as G
126
+ };