@everymatrix/casino-header-controller 1.65.0 → 1.65.2
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/{CasinoHamburgerMenu-B1dY3jHB.js → CasinoHamburgerMenu-BMkeLxFw.js} +907 -886
- package/components/{CasinoHamburgerMenu-pBvrxlJy.js → CasinoHamburgerMenu-CTVc2-UF.js} +851 -830
- package/components/CasinoHamburgerMenu-CrZ5l9tM.cjs +21 -0
- package/components/{CasinoHeaderController-B0cFJgaJ.cjs → CasinoHeaderController-B0lLuqqY.cjs} +1 -1
- package/components/{CasinoHeaderController-DOdeXoey.js → CasinoHeaderController-CGZStHGm.js} +88 -88
- package/components/{CasinoHeaderController-Bn2AwIyI.js → CasinoHeaderController-Cspimubt.js} +90 -90
- package/components/{CasinoSlider-CKGPxibK.js → CasinoSlider-CTcAOyCp.js} +57 -57
- package/components/{CasinoSlider-BEx_hpVM.js → CasinoSlider-Deb0x84t.js} +88 -88
- package/components/{CasinoSlider-CL_Uac-c.cjs → CasinoSlider-DqTtsMWh.cjs} +1 -1
- package/components/PlayerAccountBalanceModal-BFDpI9Sy.cjs +13 -0
- package/components/PlayerAccountBalanceModal-CNXuqjqU.js +1539 -0
- package/components/PlayerAccountBalanceModal-DbULiu-f.js +1510 -0
- package/components/PlayerDeposit-BXwT7NVp.cjs +1 -0
- package/components/{PlayerDeposit-Byf7G3yu.js → PlayerDeposit-BZuTQSyp.js} +72 -72
- package/components/{PlayerDeposit-C-Fbg92q.js → PlayerDeposit-eY_YGhMJ.js} +72 -72
- package/es2015/casino-header-controller.cjs +1 -1
- package/es2015/casino-header-controller.js +1 -1
- package/esnext/casino-header-controller.js +1 -1
- package/package.json +1 -1
- package/stencil/{gamification-dropdown-8eb8a896-CxTBD8Oq.js → gamification-dropdown-8eb8a896-Bcdjx9jM.js} +1 -1
- package/stencil/{gamification-dropdown-8eb8a896-BXV0d81L.cjs → gamification-dropdown-8eb8a896-CJqychmF.cjs} +1 -1
- package/stencil/{gamification-dropdown-8eb8a896-DsjvIRRh.js → gamification-dropdown-8eb8a896-zfRPKKB2.js} +1 -1
- package/stencil/{gamification-dropdown-DG0vAJtO.js → gamification-dropdown-Dv6JCzCW.js} +1 -1
- package/stencil/{gamification-dropdown-DUk8bbFT.cjs → gamification-dropdown-DztjiKq7.cjs} +1 -1
- package/stencil/{gamification-dropdown-C_xYxEL8.js → gamification-dropdown-TiS6_s4J.js} +1 -1
- package/stencil/{gamification-dropdown_4-zImC9hF9.js → gamification-dropdown_4-BUCLkjbf.js} +58 -55
- package/stencil/{gamification-dropdown_4-Be_N4EeF.js → gamification-dropdown_4-SROB8ZNq.js} +60 -57
- package/stencil/gamification-dropdown_4-_zijAT3T.cjs +192 -0
- package/stencil/index-1ef3a64c-AMSfdX4B.js +556 -0
- package/stencil/index-1ef3a64c-BlUWL6ud.cjs +1 -0
- package/stencil/index-1ef3a64c-CTdxbgr0.js +572 -0
- package/stencil/index-71b1bdfa-CSjh2jcj.cjs +1 -0
- package/stencil/{index-71b1bdfa-Dm7yvsrK.js → index-71b1bdfa-DL3YG9Ud.js} +264 -268
- package/stencil/index-71b1bdfa-DdHPuS3A.js +753 -0
- package/stencil/locale-B_6Rn5-v.cjs +1 -0
- package/stencil/{locale-DuSXBQwH.js → locale-TxlOHoKi.js} +11 -5
- package/stencil/{player-elevate-card-DL6XwNnq.js → player-elevate-card-CRl63tuY.js} +3 -3
- package/stencil/{player-elevate-card-Cmxvkrge.js → player-elevate-card-DX8jjll6.js} +3 -3
- package/stencil/{player-elevate-card-C6V7VROS.cjs → player-elevate-card-DtTKg95m.cjs} +1 -1
- package/stencil/player-elevate-card-items-5071deed-A_RG9TpE.cjs +102 -0
- package/stencil/player-elevate-card-items-5071deed-Ce0Sstbi.js +1391 -0
- package/stencil/player-elevate-card-items-5071deed-DG6rUxm1.js +1391 -0
- package/stencil/{player-elevate-pointcard-dDiPwAiV.js → player-elevate-pointcard-Bcq1MXZc.js} +3 -3
- package/stencil/{player-elevate-pointcard-CbCIvh8I.cjs → player-elevate-pointcard-CEXHhV9c.cjs} +1 -1
- package/stencil/{player-elevate-pointcard-DYOUbwi3.js → player-elevate-pointcard-hzoziusU.js} +3 -3
- package/stencil/{player-rakeback-card-BMHeEc3P.cjs → player-rakeback-card-BwjstuRr.cjs} +1 -1
- package/stencil/{player-rakeback-card-CxD8OOP-.js → player-rakeback-card-DYjFUdkd.js} +2 -2
- package/stencil/{player-rakeback-card-CixEJCwY.js → player-rakeback-card-Dtat6ZLL.js} +2 -2
- package/stencil/{user-deposit-withdrawal-Ck524nr-.cjs → user-deposit-withdrawal-BRpNiBnR.cjs} +1 -1
- package/stencil/{user-deposit-withdrawal-CXMt1MVo.js → user-deposit-withdrawal-Dy3WkB23.js} +1 -1
- package/stencil/{user-deposit-withdrawal-DU6VQt9M.js → user-deposit-withdrawal-c_bH3eje.js} +1 -1
- package/components/CasinoHamburgerMenu-CaFkIr3d.cjs +0 -21
- package/components/PlayerAccountBalanceModal-BKMugmnm.js +0 -1539
- package/components/PlayerAccountBalanceModal-CK68FRSV.js +0 -1510
- package/components/PlayerAccountBalanceModal-iP2HDeoz.cjs +0 -13
- package/components/PlayerDeposit-BsUiL_LS.cjs +0 -1
- package/stencil/gamification-dropdown_4-DuMaGjcI.cjs +0 -192
- package/stencil/index-1ef3a64c-C31PLQx3.js +0 -572
- package/stencil/index-1ef3a64c-CkoGfMtU.cjs +0 -1
- package/stencil/index-1ef3a64c-WzZ9mlMM.js +0 -556
- package/stencil/index-71b1bdfa-DzyepuUf.js +0 -757
- package/stencil/index-71b1bdfa-urw3SgKF.cjs +0 -1
- package/stencil/locale-DHn5ZpQu.cjs +0 -1
- package/stencil/player-elevate-card-items-66be34fb-BUkxBwF8.js +0 -1292
- package/stencil/player-elevate-card-items-66be34fb-BjQeJ-p9.js +0 -1292
- package/stencil/player-elevate-card-items-66be34fb-DeUY02M2.cjs +0 -1
@@ -1,32 +1,34 @@
|
|
1
|
-
var m = (e, t, a) => new Promise((n,
|
2
|
-
var
|
1
|
+
var m = (e, t, a) => new Promise((n, l) => {
|
2
|
+
var r = (d) => {
|
3
3
|
try {
|
4
|
-
o(a.next(
|
5
|
-
} catch (
|
6
|
-
|
4
|
+
o(a.next(d));
|
5
|
+
} catch (v) {
|
6
|
+
l(v);
|
7
7
|
}
|
8
|
-
},
|
8
|
+
}, s = (d) => {
|
9
9
|
try {
|
10
|
-
o(a.throw(
|
11
|
-
} catch (
|
12
|
-
|
10
|
+
o(a.throw(d));
|
11
|
+
} catch (v) {
|
12
|
+
l(v);
|
13
13
|
}
|
14
|
-
}, o = (
|
14
|
+
}, o = (d) => d.done ? n(d.value) : Promise.resolve(d.value).then(r, s);
|
15
15
|
o((a = a.apply(e, t)).next());
|
16
16
|
});
|
17
|
-
import { G as he } from "./gamification-dropdown-8eb8a896-
|
18
|
-
import { r as u, h as i, g as P, c as
|
19
|
-
import { t as k, T as
|
20
|
-
import { P as W, a as z, b as L, c as U, r as p,
|
17
|
+
import { G as he } from "./gamification-dropdown-8eb8a896-Bcdjx9jM.js";
|
18
|
+
import { r as u, h as i, g as P, c as $, a as b, F as O } from "./index-71b1bdfa-DL3YG9Ud.js";
|
19
|
+
import { t as k, T as N } from "./locale-TxlOHoKi.js";
|
20
|
+
import { P as W, a as z, b as L, c as U, r as p, t as h, g as E } from "./player-elevate-card-items-5071deed-Ce0Sstbi.js";
|
21
21
|
const q = (e, t) => new Promise((a) => {
|
22
22
|
fetch(e).then((n) => n.json()).then((n) => {
|
23
|
-
Object.keys(n).forEach((
|
24
|
-
t[
|
25
|
-
for (let
|
26
|
-
|
23
|
+
Object.keys(n).forEach((l) => {
|
24
|
+
t[l] = t[l] ? t[l] : t.en;
|
25
|
+
for (let r in n[l])
|
26
|
+
typeof n[l][r] == "object" ? Object.keys(n[l][r]).forEach((s) => {
|
27
|
+
t[l][r][s] = n[l][r][s];
|
28
|
+
}) : t[l][r] = n[l][r];
|
27
29
|
}), a(!0);
|
28
30
|
});
|
29
|
-
}), F = ":host{display:block}",
|
31
|
+
}), F = ":host{display:block}", j = F, H = class {
|
30
32
|
constructor(e) {
|
31
33
|
u(this, e), this.stylingAppends = !1, this.setClientStyling = () => {
|
32
34
|
let t = document.createElement("style");
|
@@ -62,7 +64,7 @@ const q = (e, t) => new Promise((a) => {
|
|
62
64
|
return P(this);
|
63
65
|
}
|
64
66
|
};
|
65
|
-
|
67
|
+
H.style = j;
|
66
68
|
function w(e) {
|
67
69
|
p(1, arguments);
|
68
70
|
var t = h(e);
|
@@ -71,10 +73,10 @@ function w(e) {
|
|
71
73
|
var G = 864e5;
|
72
74
|
function X(e, t) {
|
73
75
|
p(2, arguments);
|
74
|
-
var a = w(e), n = w(t),
|
75
|
-
return Math.round((
|
76
|
+
var a = w(e), n = w(t), l = a.getTime() - E(a), r = n.getTime() - E(n);
|
77
|
+
return Math.round((l - r) / G);
|
76
78
|
}
|
77
|
-
var
|
79
|
+
var Y = 6e4, J = 36e5;
|
78
80
|
function C(e, t) {
|
79
81
|
return p(2, arguments), h(e).getTime() - h(t).getTime();
|
80
82
|
}
|
@@ -86,18 +88,18 @@ var I = {
|
|
86
88
|
return t < 0 ? Math.ceil(t) : Math.floor(t);
|
87
89
|
}
|
88
90
|
// Math.trunc is not supported by IE
|
89
|
-
},
|
91
|
+
}, K = "trunc";
|
90
92
|
function S(e) {
|
91
|
-
return e ? I[e] : I[
|
93
|
+
return e ? I[e] : I[K];
|
92
94
|
}
|
93
95
|
function Q(e, t, a) {
|
94
96
|
p(2, arguments);
|
95
|
-
var n = C(e, t) /
|
97
|
+
var n = C(e, t) / J;
|
96
98
|
return S(a == null ? void 0 : a.roundingMethod)(n);
|
97
99
|
}
|
98
100
|
function V(e, t, a) {
|
99
101
|
p(2, arguments);
|
100
|
-
var n = C(e, t) /
|
102
|
+
var n = C(e, t) / Y;
|
101
103
|
return S(a == null ? void 0 : a.roundingMethod)(n);
|
102
104
|
}
|
103
105
|
function Z(e, t) {
|
@@ -106,10 +108,10 @@ function Z(e, t) {
|
|
106
108
|
return a.getTime() < n.getTime();
|
107
109
|
}
|
108
110
|
function ee(e, t) {
|
109
|
-
const a = e.querySelector("#total_level"), n = 17,
|
110
|
-
a.setAttribute("viewbox", `0 0 ${o} 28`),
|
111
|
-
const y = e.querySelector("#lock"), T = e.querySelector("#filter_heart_ball"), A = e.querySelector("#filter_ball"),
|
112
|
-
y.setAttribute("cx", `${
|
111
|
+
const a = e.querySelector("#total_level"), n = 17, l = 6.5, r = a.getBBox().width, s = t > 1 ? 1 : t, o = s * r - n < 0 ? 0 : s * r - n, d = e.querySelector("#current_level"), v = e.querySelector("#filter_current_level"), g = e.querySelector("#circle_current_level");
|
112
|
+
a.setAttribute("viewbox", `0 0 ${o} 28`), d.setAttribute("width", `${o}`), g.setAttribute("cx", `${o < l ? l : o}`), v.setAttribute("x", `${o - 8}`);
|
113
|
+
const y = e.querySelector("#lock"), T = e.querySelector("#filter_heart_ball"), A = e.querySelector("#filter_ball"), D = e.querySelector("#filter_heart"), _ = e.querySelector("#filter_lock"), f = e.querySelector("#paint0_linear_ball"), x = e.querySelector("#paint1_linear_lock"), B = e.querySelector("#lock_box"), R = e.querySelector("#heart_box"), M = 10, c = r - M;
|
114
|
+
y.setAttribute("cx", `${c}`), x.setAttribute("x1", `${c}`), x.setAttribute("x2", `${c}`), f.setAttribute("x1", `${c - 6}`), f.setAttribute("x2", `${c - 6 + 11.2}`), _.setAttribute("x", `${c - 6}`), D.setAttribute("x", `${c - 6 - 2}`), A.setAttribute("x", `${c - 6 - 2 - 2}`), T.setAttribute("x", `${c - 6 - 2 - 2 - 4}`), B.setAttribute("x", `${c - 6}`), R.setAttribute("x", `${c - 6}`), a.parentElement.style.opacity = "1";
|
113
115
|
}
|
114
116
|
const te = `:host {
|
115
117
|
display: block;
|
@@ -304,7 +306,7 @@ const te = `:host {
|
|
304
306
|
color: var(--emw--color-red, #9e595f);
|
305
307
|
}`, ne = te, ae = class {
|
306
308
|
constructor(e) {
|
307
|
-
u(this, e), this.playerElevateLeveLoaded =
|
309
|
+
u(this, e), this.playerElevateLeveLoaded = $(this, "playerElevateLeveLoaded"), this.params = void 0, this.playerElevateLevel = void 0, this.pointExpireString = void 0;
|
308
310
|
}
|
309
311
|
handleWindowResizs() {
|
310
312
|
this.initLevelProgressbar();
|
@@ -328,17 +330,18 @@ const te = `:host {
|
|
328
330
|
a(n);
|
329
331
|
}));
|
330
332
|
}
|
331
|
-
calcuatePointsToBeExpired(e) {
|
332
|
-
let
|
333
|
+
calcuatePointsToBeExpired(e, t) {
|
334
|
+
let a = "";
|
333
335
|
if (!e || !e.aboutToExpire || e.aboutToExpire.length == 0 || e.aboutToExpire[0].points <= 0)
|
334
|
-
return
|
335
|
-
e.aboutToExpire.sort((
|
336
|
-
const
|
337
|
-
let r = 0,
|
338
|
-
return
|
339
|
-
expirationPoints:
|
340
|
-
expireDay: Math.max(
|
341
|
-
|
336
|
+
return a;
|
337
|
+
e.aboutToExpire.sort((d, v) => Z(new Date(d.expireTime), new Date(v.expireTime)) ? -1 : 1);
|
338
|
+
const n = e.aboutToExpire[0], l = X(new Date(n.expireTime), /* @__PURE__ */ new Date());
|
339
|
+
let r = 0, s = 0, o = l === 0 ? `${t}Day` : t;
|
340
|
+
return l <= 0 && (r = Q(new Date(n.expireTime), /* @__PURE__ */ new Date(), { roundingMethod: "floor" }), o = r > 1 ? `${t}Hours` : `${t}Hour`, r <= 0 && (s = V(new Date(n.expireTime), /* @__PURE__ */ new Date(), { roundingMethod: "floor" }), o = s > 1 ? `${t}Minutes` : `${t}Minute`)), a = k(o, {
|
341
|
+
expirationPoints: n.points,
|
342
|
+
expireDay: Math.max(l, r, s),
|
343
|
+
lang: this.params.language
|
344
|
+
}), a;
|
342
345
|
}
|
343
346
|
loadPlayerLevelInfo() {
|
344
347
|
let e = new URL(`${this.params.endpoint}/v1/elevate/playerInfo?language=${this.params.language}`);
|
@@ -349,19 +352,19 @@ const te = `:host {
|
|
349
352
|
"Content-Type": "application/json"
|
350
353
|
}
|
351
354
|
}).then((n) => n.json()).then((n) => {
|
352
|
-
var
|
355
|
+
var l, r, s;
|
353
356
|
if (!n.success) {
|
354
357
|
console.error("Exception when fetch user elevateinfo, ", n.errorCode, n.errorMessage), a(!0);
|
355
358
|
return;
|
356
359
|
}
|
357
360
|
let o = n.data;
|
358
|
-
this.playerElevateLevel = o.level, this.playerElevateLevel.name = this.playerElevateLevel.presentation.displayName || this.playerElevateLevel.name, this.playerElevateLevel.spendablePoints = ((
|
359
|
-
const
|
361
|
+
this.playerElevateLevel = o.level, this.playerElevateLevel.name = this.playerElevateLevel.presentation.displayName || this.playerElevateLevel.name, this.playerElevateLevel.spendablePoints = ((l = o.spendableWallet) === null || l === void 0 ? void 0 : l.total.points) || 0, this.playerElevateLeveLoaded.emit({ elevateLevel: this.playerElevateLevel });
|
362
|
+
const d = (r = n.data.spendableWallet) === null || r === void 0 ? void 0 : r.total, v = (s = n.data.loyaltyWallet) === null || s === void 0 ? void 0 : s.total;
|
360
363
|
this.playerElevateLeveLoaded.emit({
|
361
|
-
elevateLevelWalletTotal:
|
362
|
-
loyaltyWalletTotal:
|
364
|
+
elevateLevelWalletTotal: d,
|
365
|
+
loyaltyWalletTotal: v
|
363
366
|
});
|
364
|
-
let g = this.calcuatePointsToBeExpired(
|
367
|
+
let g = this.calcuatePointsToBeExpired(d, "coinsToBeExpired"), y = this.calcuatePointsToBeExpired(v, "pointsToBeExpired");
|
365
368
|
(g || y) && this.playerElevateLeveLoaded.emit({
|
366
369
|
pointExpireString: g,
|
367
370
|
xpExpireString: y
|
@@ -388,11 +391,11 @@ const te = `:host {
|
|
388
391
|
e.push(this.loadPlayerLevelInfo()), this.params.calculateLevelFlag && e.push(this.loadLevels()), Promise.all(e).then((t) => {
|
389
392
|
if (console.log("elevate-init", t), this.initLevelProgressbar(), !this.levels)
|
390
393
|
return;
|
391
|
-
this.levels.sort((
|
394
|
+
this.levels.sort((l, r) => l.firstEntryPoints > r.firstEntryPoints ? 1 : -1);
|
392
395
|
const a = this.playerElevateLevel.loyaltyPoints;
|
393
396
|
let n = 0;
|
394
|
-
this.levels.forEach((
|
395
|
-
a >
|
397
|
+
this.levels.forEach((l, r) => {
|
398
|
+
a > l.firstEntryPoints && (n = r);
|
396
399
|
}), this.playerElevateLeveLoaded.emit({
|
397
400
|
calculatedLevelFlag: n
|
398
401
|
});
|
@@ -411,7 +414,7 @@ const te = `:host {
|
|
411
414
|
}
|
412
415
|
};
|
413
416
|
ae.style = ne;
|
414
|
-
const
|
417
|
+
const le = ":host{display:block}@media screen and (min-width: 501px){.LoyaltyCard .Inner .LevelInfo .ElevateLevel{flex-wrap:nowrap}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{padding-top:11px;margin-left:5px}}@media screen and (max-width: 500px){.LoyaltyCard .Inner .LevelInfo .ElevateLevel{flex-wrap:wrap}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{padding-top:0px;margin-left:0px}}.LoyaltyCard .Inner .LevelProgress{margin-left:0px}.LoyaltyCard .Inner .Row .PointsInfo.ExpirationPoints{text-align:left;color:var(--emw--color-red-50, red)}.LoyaltyCard .Inner .PlayerAvatar .Avatar{display:none}.LoyaltyCard .Inner .PlayerAvatar .Badge{border-radius:50%;background-size:contain;width:100%;height:100%}.LoyaltyCard .Inner .LevelInfo .ElevateLevel{display:flex;flex:1;align-items:center}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{position:relative;padding-left:5px}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate .ExpireTime{margin-left:5px}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .LevelName{padding-left:0;font-size:var(--emw--elevate-fontsize-2xlarge, 21px);position:relative;width:auto;color:var(--emw--elevate-color-levelname, #FFBD2B);font-weight:bold}.LoyaltyCard .PointsRange{display:flex;justify-content:space-between}.LoyaltyCard .PointsRange .PointsInfo{width:auto}.LoyaltyCard .NextLevelTip{text-align:right;font-size:11px;color:var(--emw--color-black, #000);opacity:0.8;font-weight:bold}", re = le, ie = class {
|
415
418
|
constructor(e) {
|
416
419
|
u(this, e), this.endpoint = void 0, this.theme = "Dark", this.session = void 0, this.playerAvatarUrl = void 0, this.language = "en", this.playerName = void 0, this.dateFormat = "yyyy-MM-dd", this.mbSource = void 0, this.clientStyling = "", this.clientStylingUrl = "", this.translationUrl = "", this.pointExpireString = void 0, this.playerElevateLevel = void 0, this.elevateWalletTotal = void 0;
|
417
420
|
}
|
@@ -450,7 +453,7 @@ const re = ":host{display:block}@media screen and (min-width: 501px){.LoyaltyCar
|
|
450
453
|
}
|
451
454
|
render() {
|
452
455
|
const e = b("../static/card-ground.svg"), t = b("../static/card-ground-over.svg");
|
453
|
-
return i("div", { key: "39295a651da66747a20554699bba5f96b8ad5c35", class: `ElevateCardWrapper ${this.theme}` }, i("div", { key: "78c34fe054fc2459f8af3354116cd21a68ce01be", class: "LoyaltyCard Outer", style: { backgroundImage: `url(${e}` } }, i("general-styling-wrapper", { key: "be6efc6da4c3ccf4cc3ece8ecc73561bae75aa20", clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations:
|
456
|
+
return i("div", { key: "39295a651da66747a20554699bba5f96b8ad5c35", class: `ElevateCardWrapper ${this.theme}` }, i("div", { key: "78c34fe054fc2459f8af3354116cd21a68ce01be", class: "LoyaltyCard Outer", style: { backgroundImage: `url(${e}` } }, i("general-styling-wrapper", { key: "be6efc6da4c3ccf4cc3ece8ecc73561bae75aa20", clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: N, translationUrl: this.translationUrl }), i("player-elevate-card-data", { key: "b53e4b59d4ee55a2f567efa09afab3d72969e6e4", params: this.paramProxy }), i("div", { key: "1f3e504440bab2df3a181058fad7149c85c48c14", class: "OuterCover Inner", style: { backgroundImage: `url(${t}` } }, i("div", { key: "a07c6cd95770dc1bfd3da78b1c7cc8e1367321b1", class: "Content Row" }, this.playerElevateLevel && i(O, { key: "5c104f5ba1a018219c6ed5f6e50af99b035a0344" }, i("div", { key: "bd94591e6ab9298ab7c769fa48efaf314dc1a63b", class: "PlayerImg" }, i(W, { key: "928849ce86d8c7a483eba7850efc83f8149bae43", onlyBadge: !0, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), i("div", { key: "37192c9b8502eb3c7d93914369df2d784c17e9f7", class: `LevelInfo ${this.playerElevateLevel.name}` }, i(z, { key: "2684a177f4bb1053c4587fd4158666fb35ca23f4", hideInfo: !0, level: this.playerElevateLevel.name, expireTime: this.playerElevateLevel.expireTime, dateFormat: this.dateFormat }), i("div", { key: "173a37c63868f2d900c12af3ffc2d9a4a57550e4", class: "PointsRange" }, i(L, { key: "a7111154f7dc547e0b05c70d24508bdd75c5d882", loyaltyPoints: this.playerElevateLevel.loyaltyPoints, language: this.language }), i(L, { key: "ad31574e7db81a7ecb7a06b28b1d4968cbcab93e", loyaltyPoints: this.getNextLevelPoints(), language: this.language })), i(U, { key: "88ddfdb326edfb1de9519da6b3d0e5b514725e27" }), i("div", { key: "b9c79555a8001bd2c754d7573df04016da235c84", class: "NextLevelTip" }, this.getNextLevelTips()), this.pointExpireString && i("div", { key: "02da725060c9db4a8c1c2e8bad3426894d7f8f2c", class: "PointsInfo ExpirationPoints" }, this.pointExpireString, " ")))))));
|
454
457
|
}
|
455
458
|
static get watchers() {
|
456
459
|
return {
|
@@ -460,10 +463,10 @@ const re = ":host{display:block}@media screen and (min-width: 501px){.LoyaltyCar
|
|
460
463
|
};
|
461
464
|
}
|
462
465
|
};
|
463
|
-
ie.style =
|
466
|
+
ie.style = re;
|
464
467
|
export {
|
465
468
|
he as gamification_dropdown,
|
466
|
-
|
469
|
+
H as general_styling_wrapper,
|
467
470
|
ae as player_elevate_card_data,
|
468
471
|
ie as player_elevate_loyaltycard
|
469
472
|
};
|
@@ -1,16 +1,18 @@
|
|
1
|
-
import { G as
|
2
|
-
import { r as u, h as i, g as I, c as M, a as m, F as
|
3
|
-
import { t as P, T as
|
4
|
-
import { P as
|
1
|
+
import { G as ve } from "./gamification-dropdown-8eb8a896-zfRPKKB2.js";
|
2
|
+
import { r as u, h as i, g as I, c as M, a as m, F as $ } from "./index-71b1bdfa-DdHPuS3A.js";
|
3
|
+
import { t as P, T as O } from "./locale-TxlOHoKi.js";
|
4
|
+
import { P as N, a as W, b, c as z, r as p, t as h, g as L } from "./player-elevate-card-items-5071deed-DG6rUxm1.js";
|
5
5
|
const U = (e, t) => new Promise((a) => {
|
6
6
|
fetch(e).then((n) => n.json()).then((n) => {
|
7
|
-
Object.keys(n).forEach((
|
8
|
-
t[
|
9
|
-
for (let
|
10
|
-
|
7
|
+
Object.keys(n).forEach((l) => {
|
8
|
+
t[l] = t[l] ? t[l] : t.en;
|
9
|
+
for (let r in n[l])
|
10
|
+
typeof n[l][r] == "object" ? Object.keys(n[l][r]).forEach((o) => {
|
11
|
+
t[l][r][o] = n[l][r][o];
|
12
|
+
}) : t[l][r] = n[l][r];
|
11
13
|
}), a(!0);
|
12
14
|
});
|
13
|
-
}), q = ":host{display:block}", F = q,
|
15
|
+
}), q = ":host{display:block}", F = q, j = class {
|
14
16
|
constructor(e) {
|
15
17
|
u(this, e), this.stylingAppends = !1, this.setClientStyling = () => {
|
16
18
|
let t = document.createElement("style");
|
@@ -44,21 +46,21 @@ const U = (e, t) => new Promise((a) => {
|
|
44
46
|
return I(this);
|
45
47
|
}
|
46
48
|
};
|
47
|
-
|
49
|
+
j.style = F;
|
48
50
|
function E(e) {
|
49
|
-
|
50
|
-
var t =
|
51
|
+
p(1, arguments);
|
52
|
+
var t = h(e);
|
51
53
|
return t.setHours(0, 0, 0, 0), t;
|
52
54
|
}
|
53
|
-
var
|
55
|
+
var H = 864e5;
|
54
56
|
function G(e, t) {
|
55
|
-
|
56
|
-
var a = E(e), n = E(t),
|
57
|
-
return Math.round((
|
57
|
+
p(2, arguments);
|
58
|
+
var a = E(e), n = E(t), l = a.getTime() - L(a), r = n.getTime() - L(n);
|
59
|
+
return Math.round((l - r) / H);
|
58
60
|
}
|
59
|
-
var X = 6e4,
|
61
|
+
var X = 6e4, Y = 36e5;
|
60
62
|
function k(e, t) {
|
61
|
-
return
|
63
|
+
return p(2, arguments), h(e).getTime() - h(t).getTime();
|
62
64
|
}
|
63
65
|
var w = {
|
64
66
|
ceil: Math.ceil,
|
@@ -68,30 +70,30 @@ var w = {
|
|
68
70
|
return t < 0 ? Math.ceil(t) : Math.floor(t);
|
69
71
|
}
|
70
72
|
// Math.trunc is not supported by IE
|
71
|
-
},
|
73
|
+
}, J = "trunc";
|
72
74
|
function C(e) {
|
73
|
-
return e ? w[e] : w[
|
75
|
+
return e ? w[e] : w[J];
|
74
76
|
}
|
75
|
-
function
|
76
|
-
|
77
|
-
var n = k(e, t) /
|
77
|
+
function K(e, t, a) {
|
78
|
+
p(2, arguments);
|
79
|
+
var n = k(e, t) / Y;
|
78
80
|
return C(a?.roundingMethod)(n);
|
79
81
|
}
|
80
82
|
function Q(e, t, a) {
|
81
|
-
|
83
|
+
p(2, arguments);
|
82
84
|
var n = k(e, t) / X;
|
83
85
|
return C(a?.roundingMethod)(n);
|
84
86
|
}
|
85
87
|
function V(e, t) {
|
86
|
-
|
87
|
-
var a =
|
88
|
+
p(2, arguments);
|
89
|
+
var a = h(e), n = h(t);
|
88
90
|
return a.getTime() < n.getTime();
|
89
91
|
}
|
90
92
|
function Z(e, t) {
|
91
|
-
const a = e.querySelector("#total_level"), n = 17,
|
92
|
-
a.setAttribute("viewbox", `0 0 ${
|
93
|
-
const y = e.querySelector("#lock"), S = e.querySelector("#filter_heart_ball"), T = e.querySelector("#filter_ball"), A = e.querySelector("#filter_heart"),
|
94
|
-
y.setAttribute("cx", `${
|
93
|
+
const a = e.querySelector("#total_level"), n = 17, l = 6.5, r = a.getBBox().width, o = t > 1 ? 1 : t, s = o * r - n < 0 ? 0 : o * r - n, c = e.querySelector("#current_level"), v = e.querySelector("#filter_current_level"), g = e.querySelector("#circle_current_level");
|
94
|
+
a.setAttribute("viewbox", `0 0 ${s} 28`), c.setAttribute("width", `${s}`), g.setAttribute("cx", `${s < l ? l : s}`), v.setAttribute("x", `${s - 8}`);
|
95
|
+
const y = e.querySelector("#lock"), S = e.querySelector("#filter_heart_ball"), T = e.querySelector("#filter_ball"), A = e.querySelector("#filter_heart"), D = e.querySelector("#filter_lock"), f = e.querySelector("#paint0_linear_ball"), x = e.querySelector("#paint1_linear_lock"), _ = e.querySelector("#lock_box"), B = e.querySelector("#heart_box"), R = 10, d = r - R;
|
96
|
+
y.setAttribute("cx", `${d}`), x.setAttribute("x1", `${d}`), x.setAttribute("x2", `${d}`), f.setAttribute("x1", `${d - 6}`), f.setAttribute("x2", `${d - 6 + 11.2}`), D.setAttribute("x", `${d - 6}`), A.setAttribute("x", `${d - 6 - 2}`), T.setAttribute("x", `${d - 6 - 2 - 2}`), S.setAttribute("x", `${d - 6 - 2 - 2 - 4}`), _.setAttribute("x", `${d - 6}`), B.setAttribute("x", `${d - 6}`), a.parentElement.style.opacity = "1";
|
95
97
|
}
|
96
98
|
const ee = `:host {
|
97
99
|
display: block;
|
@@ -286,7 +288,7 @@ const ee = `:host {
|
|
286
288
|
color: var(--emw--color-red, #9e595f);
|
287
289
|
}`, te = ee, ne = class {
|
288
290
|
constructor(e) {
|
289
|
-
u(this, e), this.playerElevateLeveLoaded = M(this, "playerElevateLeveLoaded"
|
291
|
+
u(this, e), this.playerElevateLeveLoaded = M(this, "playerElevateLeveLoaded"), this.params = void 0, this.playerElevateLevel = void 0, this.pointExpireString = void 0;
|
290
292
|
}
|
291
293
|
handleWindowResizs() {
|
292
294
|
this.initLevelProgressbar();
|
@@ -310,17 +312,18 @@ const ee = `:host {
|
|
310
312
|
a(n);
|
311
313
|
}));
|
312
314
|
}
|
313
|
-
calcuatePointsToBeExpired(e) {
|
314
|
-
let
|
315
|
+
calcuatePointsToBeExpired(e, t) {
|
316
|
+
let a = "";
|
315
317
|
if (!e || !e.aboutToExpire || e.aboutToExpire.length == 0 || e.aboutToExpire[0].points <= 0)
|
316
|
-
return
|
317
|
-
e.aboutToExpire.sort((
|
318
|
-
const
|
319
|
-
let r = 0,
|
320
|
-
return
|
321
|
-
expirationPoints:
|
322
|
-
expireDay: Math.max(
|
323
|
-
|
318
|
+
return a;
|
319
|
+
e.aboutToExpire.sort((c, v) => V(new Date(c.expireTime), new Date(v.expireTime)) ? -1 : 1);
|
320
|
+
const n = e.aboutToExpire[0], l = G(new Date(n.expireTime), /* @__PURE__ */ new Date());
|
321
|
+
let r = 0, o = 0, s = l === 0 ? `${t}Day` : t;
|
322
|
+
return l <= 0 && (r = K(new Date(n.expireTime), /* @__PURE__ */ new Date(), { roundingMethod: "floor" }), s = r > 1 ? `${t}Hours` : `${t}Hour`, r <= 0 && (o = Q(new Date(n.expireTime), /* @__PURE__ */ new Date(), { roundingMethod: "floor" }), s = o > 1 ? `${t}Minutes` : `${t}Minute`)), a = P(s, {
|
323
|
+
expirationPoints: n.points,
|
324
|
+
expireDay: Math.max(l, r, o),
|
325
|
+
lang: this.params.language
|
326
|
+
}), a;
|
324
327
|
}
|
325
328
|
loadPlayerLevelInfo() {
|
326
329
|
let e = new URL(`${this.params.endpoint}/v1/elevate/playerInfo?language=${this.params.language}`);
|
@@ -331,19 +334,19 @@ const ee = `:host {
|
|
331
334
|
"Content-Type": "application/json"
|
332
335
|
}
|
333
336
|
}).then((n) => n.json()).then((n) => {
|
334
|
-
var
|
337
|
+
var l, r, o;
|
335
338
|
if (!n.success) {
|
336
339
|
console.error("Exception when fetch user elevateinfo, ", n.errorCode, n.errorMessage), a(!0);
|
337
340
|
return;
|
338
341
|
}
|
339
|
-
let
|
340
|
-
this.playerElevateLevel =
|
341
|
-
const
|
342
|
+
let s = n.data;
|
343
|
+
this.playerElevateLevel = s.level, this.playerElevateLevel.name = this.playerElevateLevel.presentation.displayName || this.playerElevateLevel.name, this.playerElevateLevel.spendablePoints = ((l = s.spendableWallet) === null || l === void 0 ? void 0 : l.total.points) || 0, this.playerElevateLeveLoaded.emit({ elevateLevel: this.playerElevateLevel });
|
344
|
+
const c = (r = n.data.spendableWallet) === null || r === void 0 ? void 0 : r.total, v = (o = n.data.loyaltyWallet) === null || o === void 0 ? void 0 : o.total;
|
342
345
|
this.playerElevateLeveLoaded.emit({
|
343
|
-
elevateLevelWalletTotal:
|
344
|
-
loyaltyWalletTotal:
|
346
|
+
elevateLevelWalletTotal: c,
|
347
|
+
loyaltyWalletTotal: v
|
345
348
|
});
|
346
|
-
let g = this.calcuatePointsToBeExpired(
|
349
|
+
let g = this.calcuatePointsToBeExpired(c, "coinsToBeExpired"), y = this.calcuatePointsToBeExpired(v, "pointsToBeExpired");
|
347
350
|
(g || y) && this.playerElevateLeveLoaded.emit({
|
348
351
|
pointExpireString: g,
|
349
352
|
xpExpireString: y
|
@@ -370,11 +373,11 @@ const ee = `:host {
|
|
370
373
|
e.push(this.loadPlayerLevelInfo()), this.params.calculateLevelFlag && e.push(this.loadLevels()), Promise.all(e).then((t) => {
|
371
374
|
if (console.log("elevate-init", t), this.initLevelProgressbar(), !this.levels)
|
372
375
|
return;
|
373
|
-
this.levels.sort((
|
376
|
+
this.levels.sort((l, r) => l.firstEntryPoints > r.firstEntryPoints ? 1 : -1);
|
374
377
|
const a = this.playerElevateLevel.loyaltyPoints;
|
375
378
|
let n = 0;
|
376
|
-
this.levels.forEach((
|
377
|
-
a >
|
379
|
+
this.levels.forEach((l, r) => {
|
380
|
+
a > l.firstEntryPoints && (n = r);
|
378
381
|
}), this.playerElevateLeveLoaded.emit({
|
379
382
|
calculatedLevelFlag: n
|
380
383
|
});
|
@@ -393,7 +396,7 @@ const ee = `:host {
|
|
393
396
|
}
|
394
397
|
};
|
395
398
|
ne.style = te;
|
396
|
-
const ae = ":host{display:block}@media screen and (min-width: 501px){.LoyaltyCard .Inner .LevelInfo .ElevateLevel{flex-wrap:nowrap}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{padding-top:11px;margin-left:5px}}@media screen and (max-width: 500px){.LoyaltyCard .Inner .LevelInfo .ElevateLevel{flex-wrap:wrap}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{padding-top:0px;margin-left:0px}}.LoyaltyCard .Inner .LevelProgress{margin-left:0px}.LoyaltyCard .Inner .Row .PointsInfo.ExpirationPoints{text-align:left;color:var(--emw--color-red-50, red)}.LoyaltyCard .Inner .PlayerAvatar .Avatar{display:none}.LoyaltyCard .Inner .PlayerAvatar .Badge{border-radius:50%;background-size:contain;width:100%;height:100%}.LoyaltyCard .Inner .LevelInfo .ElevateLevel{display:flex;flex:1;align-items:center}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{position:relative;padding-left:5px}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate .ExpireTime{margin-left:5px}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .LevelName{padding-left:0;font-size:var(--emw--elevate-fontsize-2xlarge, 21px);position:relative;width:auto;color:var(--emw--elevate-color-levelname, #FFBD2B);font-weight:bold}.LoyaltyCard .PointsRange{display:flex;justify-content:space-between}.LoyaltyCard .PointsRange .PointsInfo{width:auto}.LoyaltyCard .NextLevelTip{text-align:right;font-size:11px;color:var(--emw--color-black, #000);opacity:0.8;font-weight:bold}",
|
399
|
+
const ae = ":host{display:block}@media screen and (min-width: 501px){.LoyaltyCard .Inner .LevelInfo .ElevateLevel{flex-wrap:nowrap}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{padding-top:11px;margin-left:5px}}@media screen and (max-width: 500px){.LoyaltyCard .Inner .LevelInfo .ElevateLevel{flex-wrap:wrap}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{padding-top:0px;margin-left:0px}}.LoyaltyCard .Inner .LevelProgress{margin-left:0px}.LoyaltyCard .Inner .Row .PointsInfo.ExpirationPoints{text-align:left;color:var(--emw--color-red-50, red)}.LoyaltyCard .Inner .PlayerAvatar .Avatar{display:none}.LoyaltyCard .Inner .PlayerAvatar .Badge{border-radius:50%;background-size:contain;width:100%;height:100%}.LoyaltyCard .Inner .LevelInfo .ElevateLevel{display:flex;flex:1;align-items:center}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{position:relative;padding-left:5px}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate .ExpireTime{margin-left:5px}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .LevelName{padding-left:0;font-size:var(--emw--elevate-fontsize-2xlarge, 21px);position:relative;width:auto;color:var(--emw--elevate-color-levelname, #FFBD2B);font-weight:bold}.LoyaltyCard .PointsRange{display:flex;justify-content:space-between}.LoyaltyCard .PointsRange .PointsInfo{width:auto}.LoyaltyCard .NextLevelTip{text-align:right;font-size:11px;color:var(--emw--color-black, #000);opacity:0.8;font-weight:bold}", le = ae, re = class {
|
397
400
|
constructor(e) {
|
398
401
|
u(this, e), this.endpoint = void 0, this.theme = "Dark", this.session = void 0, this.playerAvatarUrl = void 0, this.language = "en", this.playerName = void 0, this.dateFormat = "yyyy-MM-dd", this.mbSource = void 0, this.clientStyling = "", this.clientStylingUrl = "", this.translationUrl = "", this.pointExpireString = void 0, this.playerElevateLevel = void 0, this.elevateWalletTotal = void 0;
|
399
402
|
}
|
@@ -432,7 +435,7 @@ const ae = ":host{display:block}@media screen and (min-width: 501px){.LoyaltyCar
|
|
432
435
|
}
|
433
436
|
render() {
|
434
437
|
const e = m("../static/card-ground.svg"), t = m("../static/card-ground-over.svg");
|
435
|
-
return i("div", { key: "39295a651da66747a20554699bba5f96b8ad5c35", class: `ElevateCardWrapper ${this.theme}` }, i("div", { key: "78c34fe054fc2459f8af3354116cd21a68ce01be", class: "LoyaltyCard Outer", style: { backgroundImage: `url(${e}` } }, i("general-styling-wrapper", { key: "be6efc6da4c3ccf4cc3ece8ecc73561bae75aa20", clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations:
|
438
|
+
return i("div", { key: "39295a651da66747a20554699bba5f96b8ad5c35", class: `ElevateCardWrapper ${this.theme}` }, i("div", { key: "78c34fe054fc2459f8af3354116cd21a68ce01be", class: "LoyaltyCard Outer", style: { backgroundImage: `url(${e}` } }, i("general-styling-wrapper", { key: "be6efc6da4c3ccf4cc3ece8ecc73561bae75aa20", clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: O, translationUrl: this.translationUrl }), i("player-elevate-card-data", { key: "b53e4b59d4ee55a2f567efa09afab3d72969e6e4", params: this.paramProxy }), i("div", { key: "1f3e504440bab2df3a181058fad7149c85c48c14", class: "OuterCover Inner", style: { backgroundImage: `url(${t}` } }, i("div", { key: "a07c6cd95770dc1bfd3da78b1c7cc8e1367321b1", class: "Content Row" }, this.playerElevateLevel && i($, { key: "5c104f5ba1a018219c6ed5f6e50af99b035a0344" }, i("div", { key: "bd94591e6ab9298ab7c769fa48efaf314dc1a63b", class: "PlayerImg" }, i(N, { key: "928849ce86d8c7a483eba7850efc83f8149bae43", onlyBadge: !0, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), i("div", { key: "37192c9b8502eb3c7d93914369df2d784c17e9f7", class: `LevelInfo ${this.playerElevateLevel.name}` }, i(W, { key: "2684a177f4bb1053c4587fd4158666fb35ca23f4", hideInfo: !0, level: this.playerElevateLevel.name, expireTime: this.playerElevateLevel.expireTime, dateFormat: this.dateFormat }), i("div", { key: "173a37c63868f2d900c12af3ffc2d9a4a57550e4", class: "PointsRange" }, i(b, { key: "a7111154f7dc547e0b05c70d24508bdd75c5d882", loyaltyPoints: this.playerElevateLevel.loyaltyPoints, language: this.language }), i(b, { key: "ad31574e7db81a7ecb7a06b28b1d4968cbcab93e", loyaltyPoints: this.getNextLevelPoints(), language: this.language })), i(z, { key: "88ddfdb326edfb1de9519da6b3d0e5b514725e27" }), i("div", { key: "b9c79555a8001bd2c754d7573df04016da235c84", class: "NextLevelTip" }, this.getNextLevelTips()), this.pointExpireString && i("div", { key: "02da725060c9db4a8c1c2e8bad3426894d7f8f2c", class: "PointsInfo ExpirationPoints" }, this.pointExpireString, " ")))))));
|
436
439
|
}
|
437
440
|
static get watchers() {
|
438
441
|
return {
|
@@ -442,10 +445,10 @@ const ae = ":host{display:block}@media screen and (min-width: 501px){.LoyaltyCar
|
|
442
445
|
};
|
443
446
|
}
|
444
447
|
};
|
445
|
-
|
448
|
+
re.style = le;
|
446
449
|
export {
|
447
|
-
|
448
|
-
|
450
|
+
ve as gamification_dropdown,
|
451
|
+
j as general_styling_wrapper,
|
449
452
|
ne as player_elevate_card_data,
|
450
|
-
|
453
|
+
re as player_elevate_loyaltycard
|
451
454
|
};
|