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