@everymatrix/casino-header-controller-nd 1.54.0 → 1.54.4
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-B1RMQpdw.js → CasinoHamburgerMenuNd-CkPg6ouB.js} +1200 -1238
- package/components/{CasinoHeaderControllerNd-Bl26nr2z.js → CasinoHeaderControllerNd-BX0AvD48.js} +265 -284
- package/components/{PlayerAccountBalanceModalNd-CivjuTyh.js → PlayerAccountBalanceModalNd-K5u0ko-m.js} +487 -516
- package/components/{PlayerDeposit-C1xb413z.js → PlayerDeposit-DsOspOgB.js} +1 -1
- package/esnext/casino-header-controller-nd.js +14 -0
- package/package.json +10 -14
- package/stencil/gamification-dropdown-Rl66gqyp.js +7 -0
- package/stencil/{gamification-dropdown-ae7b7c69-DHIEd3U5.js → gamification-dropdown-ae7b7c69-C61VnAKy.js} +42 -60
- package/stencil/{gamification-dropdown_4-DJIAHy0R.js → gamification-dropdown_4-AbKMnPZ5.js} +71 -89
- package/stencil/{index-ea7720e4-q-tkv4M2.js → index-ea7720e4-FqoOOnHW.js} +204 -231
- package/stencil/{player-elevate-card-lt9Sqflt.js → player-elevate-card-B4AMnqub.js} +2 -2
- package/stencil/{player-elevate-card-items-9d490a3b-BaYWiFCE.js → player-elevate-card-items-9d490a3b-BxciIvXh.js} +5 -5
- package/stencil/{player-elevate-pointcard-BYjxOwm5.js → player-elevate-pointcard-BeXukLE-.js} +2 -2
- package/components/CasinoHamburgerMenuNd-BGgAAyRV.cjs +0 -5
- package/components/CasinoHeaderControllerNd-DjK9vryV.cjs +0 -1
- package/components/PlayerAccountBalanceModalNd-DODZKkC4.cjs +0 -13
- package/components/PlayerDeposit-2TMJs9YE.cjs +0 -1
- package/es2015/casino-header-controller-nd.cjs +0 -1
- package/es2015/casino-header-controller-nd.js +0 -16
- package/stencil/app-globals-0f993ce5-sCt45RkC.cjs +0 -1
- package/stencil/gamification-dropdown-BOIBSmd0.cjs +0 -1
- package/stencil/gamification-dropdown-DZ47pXyT.js +0 -25
- package/stencil/gamification-dropdown-ae7b7c69-38_9Tb2L.cjs +0 -1
- package/stencil/gamification-dropdown_4-DIRJt3N_.cjs +0 -192
- package/stencil/index-ea7720e4-WHyF1VYs.cjs +0 -1
- package/stencil/player-elevate-card-DA96MB5K.cjs +0 -64
- package/stencil/player-elevate-card-items-9d490a3b-My4ySrE8.cjs +0 -1
- package/stencil/player-elevate-pointcard-B7l2JzLx.cjs +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as K, $ as V, S as X, i as Z, f as b, c as $, s as ee, d as te, g as _, h as L, B as k, j as d, M as P, l as S, m as p, C as E, D as z, r as T, v as ie, K as ae, w as se, z as M, n as re, F as ne, G as A, J as oe } from "./CasinoHamburgerMenuNd-
|
|
1
|
+
import { b as K, $ as V, S as X, i as Z, f as b, c as $, s as ee, d as te, g as _, h as L, B as k, j as d, M as P, l as S, m as p, C as E, D as z, r as T, v as ie, K as ae, w as se, z as M, n as re, F as ne, G as A, J as oe } from "./CasinoHamburgerMenuNd-CkPg6ouB.js";
|
|
2
2
|
function W(a, e) {
|
|
3
3
|
K(a, e);
|
|
4
4
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { C as s } from "../components/CasinoHeaderControllerNd-BX0AvD48.js";
|
|
2
|
+
function r(t) {
|
|
3
|
+
return function(...n) {
|
|
4
|
+
try {
|
|
5
|
+
return t.apply(this, n);
|
|
6
|
+
} catch (e) {
|
|
7
|
+
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"))
|
|
8
|
+
return !1;
|
|
9
|
+
throw e;
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
customElements.define = r(customElements.define);
|
|
14
|
+
!customElements.get("casino-header-controller-nd") && customElements.define("casino-header-controller-nd", s.element);
|
package/package.json
CHANGED
|
@@ -1,28 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@everymatrix/casino-header-controller-nd",
|
|
3
|
-
"version": "1.54.
|
|
3
|
+
"version": "1.54.4",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"main": "
|
|
6
|
-
"module": "
|
|
5
|
+
"main": "esnext/casino-header-controller-nd.js",
|
|
6
|
+
"module": "esnext/casino-header-controller-nd.js",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
9
|
-
"import": "./
|
|
10
|
-
"require": "./es2015/casino-header-controller-nd.cjs"
|
|
9
|
+
"import": "./esnext/casino-header-controller-nd.js"
|
|
11
10
|
},
|
|
12
|
-
"./es2015/casino-header-controller-nd.cjs": "./es2015/casino-header-controller-nd.cjs"
|
|
11
|
+
"./es2015/casino-header-controller-nd.cjs": "./es2015/casino-header-controller-nd.cjs",
|
|
12
|
+
"./es2015/casino-header-controller-nd.js": "./es2015/casino-header-controller-nd.js"
|
|
13
13
|
},
|
|
14
14
|
"files": [
|
|
15
|
+
"components/",
|
|
15
16
|
"es2015/",
|
|
16
|
-
"
|
|
17
|
-
"
|
|
17
|
+
"stencil",
|
|
18
|
+
"angular",
|
|
19
|
+
"esnext/"
|
|
18
20
|
],
|
|
19
21
|
"publishConfig": {
|
|
20
22
|
"access": "public"
|
|
21
|
-
},
|
|
22
|
-
"dependencies": {
|
|
23
|
-
"@everymatrix/casino-hamburger-menu-nd": "1.45.7",
|
|
24
|
-
"@everymatrix/player-account-balance-modal-nd": "1.45.7",
|
|
25
|
-
"@everymatrix/player-deposit": "1.45.7",
|
|
26
|
-
"@everymatrix/gamification-dropdown": "*"
|
|
27
23
|
}
|
|
28
24
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { b as n, p as t } from "./index-ea7720e4-FqoOOnHW.js";
|
|
2
|
+
import { g as l } from "./app-globals-0f993ce5-D-kw1sls.js";
|
|
3
|
+
var r = () => {
|
|
4
|
+
const e = import.meta.url, a = {};
|
|
5
|
+
return e !== "" && (a.resourcesUrl = new URL(".", e).href), t(a);
|
|
6
|
+
};
|
|
7
|
+
r().then(async (e) => (await l(), n([["gamification-dropdown_4", [[1, "gamification-dropdown", { endpoint: [513], language: [513], session: [513], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], isOpen: [32], isLoading: [32], stylingAppends: [32], loyaltyPoints: [32] }, null, { translationUrl: ["handleNewTranslations"] }], [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"], 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"] }]]]], e)));
|
|
@@ -1,22 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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 g, h as r, g as m } from "./index-ea7720e4-q-tkv4M2.js";
|
|
18
|
-
const u = "en";
|
|
19
|
-
let h = {
|
|
1
|
+
import { r as d, h as s, g as p } from "./index-ea7720e4-FqoOOnHW.js";
|
|
2
|
+
const f = "en";
|
|
3
|
+
let a = {
|
|
20
4
|
en: {
|
|
21
5
|
gamificationNoPoints: "No points"
|
|
22
6
|
},
|
|
@@ -36,49 +20,47 @@ let h = {
|
|
|
36
20
|
gamificationNoPoints: "No points"
|
|
37
21
|
}
|
|
38
22
|
};
|
|
39
|
-
const
|
|
40
|
-
fetch(e).then((
|
|
41
|
-
Object.keys(
|
|
42
|
-
|
|
43
|
-
for (let
|
|
44
|
-
|
|
45
|
-
}),
|
|
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);
|
|
46
30
|
});
|
|
47
|
-
}),
|
|
48
|
-
const
|
|
49
|
-
return
|
|
50
|
-
},
|
|
31
|
+
}), g = (e, t) => {
|
|
32
|
+
const i = t;
|
|
33
|
+
return a[i !== void 0 && i in a ? i : f][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}", u = m, y = class {
|
|
51
35
|
constructor(e) {
|
|
52
|
-
|
|
53
|
-
let
|
|
54
|
-
|
|
36
|
+
d(this, e), this.language = "en", this.session = "", this.clientStyling = "", this.clientStylingUrl = "", this.translationUrl = "", this.isOpen = !1, this.isLoading = !1, this.stylingAppends = !1, this.setClientStyling = () => {
|
|
37
|
+
let t = document.createElement("style");
|
|
38
|
+
t.innerHTML = this.clientStyling, this.stylingContainer.prepend(t);
|
|
55
39
|
}, this.setClientStylingURL = () => {
|
|
56
|
-
let
|
|
57
|
-
fetch(
|
|
58
|
-
|
|
59
|
-
this.stylingContainer.prepend(
|
|
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);
|
|
60
44
|
}, 1);
|
|
61
45
|
}).catch((n) => {
|
|
62
46
|
console.log("error ", n);
|
|
63
47
|
});
|
|
64
48
|
}, this.navigateToGamification = () => {
|
|
65
49
|
window.postMessage({ type: "NavigateToGamification" }, window.location.href), this.isOpen = !1;
|
|
66
|
-
}, this.handleOutsideClick = (
|
|
67
|
-
|
|
68
|
-
}, this.handleDropdownClick = (
|
|
69
|
-
|
|
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);
|
|
70
54
|
};
|
|
71
55
|
}
|
|
72
56
|
handleNewTranslations() {
|
|
73
|
-
this.isLoading = !0,
|
|
57
|
+
this.isLoading = !0, h(this.translationUrl).then(() => {
|
|
74
58
|
this.isLoading = !1;
|
|
75
59
|
});
|
|
76
60
|
}
|
|
77
|
-
componentWillLoad() {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
return this.fetchPointsData();
|
|
81
|
-
});
|
|
61
|
+
async componentWillLoad() {
|
|
62
|
+
if (this.translationUrl.length > 2 && await h(this.translationUrl), this.endpoint && this.language)
|
|
63
|
+
return this.fetchPointsData();
|
|
82
64
|
}
|
|
83
65
|
componentDidRender() {
|
|
84
66
|
!this.stylingAppends && this.stylingContainer && (this.clientStyling && this.setClientStyling(), this.clientStylingUrl && this.setClientStylingURL(), this.stylingAppends = !0);
|
|
@@ -86,28 +68,28 @@ const f = (e) => new Promise((i) => {
|
|
|
86
68
|
fetchPointsData() {
|
|
87
69
|
let e = new URL(`${this.endpoint}/v1/elevate/playerInfo`);
|
|
88
70
|
e.searchParams.append("language", this.language);
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
const
|
|
71
|
+
const t = new Headers();
|
|
72
|
+
t.append("X-SessionId", this.session);
|
|
73
|
+
const i = {
|
|
92
74
|
method: "GET",
|
|
93
|
-
headers:
|
|
75
|
+
headers: t
|
|
94
76
|
};
|
|
95
|
-
return new Promise((n,
|
|
96
|
-
this.isLoading = !0, fetch(e.href,
|
|
97
|
-
var
|
|
98
|
-
this.loyaltyPoints = (
|
|
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);
|
|
99
81
|
}).catch((o) => {
|
|
100
|
-
console.error(o),
|
|
82
|
+
console.error(o), l(o);
|
|
101
83
|
}).finally(() => {
|
|
102
84
|
this.isLoading = !1;
|
|
103
85
|
});
|
|
104
86
|
});
|
|
105
87
|
}
|
|
106
88
|
render() {
|
|
107
|
-
return this.isLoading ? null :
|
|
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) : g("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 })));
|
|
108
90
|
}
|
|
109
91
|
get el() {
|
|
110
|
-
return
|
|
92
|
+
return p(this);
|
|
111
93
|
}
|
|
112
94
|
static get watchers() {
|
|
113
95
|
return {
|
|
@@ -115,7 +97,7 @@ const f = (e) => new Promise((i) => {
|
|
|
115
97
|
};
|
|
116
98
|
}
|
|
117
99
|
};
|
|
118
|
-
|
|
100
|
+
y.style = u;
|
|
119
101
|
export {
|
|
120
|
-
|
|
102
|
+
y as G
|
|
121
103
|
};
|
|
@@ -1,23 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
} catch (v) {
|
|
6
|
-
r(v);
|
|
7
|
-
}
|
|
8
|
-
}, d = (s) => {
|
|
9
|
-
try {
|
|
10
|
-
o(a.throw(s));
|
|
11
|
-
} catch (v) {
|
|
12
|
-
r(v);
|
|
13
|
-
}
|
|
14
|
-
}, o = (s) => s.done ? n(s.value) : Promise.resolve(s.value).then(l, d);
|
|
15
|
-
o((a = a.apply(e, t)).next());
|
|
16
|
-
});
|
|
17
|
-
import { G as pe } from "./gamification-dropdown-ae7b7c69-DHIEd3U5.js";
|
|
18
|
-
import { r as u, h as i, g as P, c as O, a as m, F as N } from "./index-ea7720e4-q-tkv4M2.js";
|
|
19
|
-
import { t as k, T as $, P as W, a as z, b as L, c as U, r as p, g as E, d as h } from "./player-elevate-card-items-9d490a3b-BaYWiFCE.js";
|
|
20
|
-
const q = (e, t) => new Promise((a) => {
|
|
1
|
+
import { G as ce } from "./gamification-dropdown-ae7b7c69-C61VnAKy.js";
|
|
2
|
+
import { r as u, h as i, g as I, c as M, a as b, F as O } from "./index-ea7720e4-FqoOOnHW.js";
|
|
3
|
+
import { t as P, T as N, P as $, a as W, b as m, c as z, r as v, g as L, d as p } from "./player-elevate-card-items-9d490a3b-BxciIvXh.js";
|
|
4
|
+
const U = (e, t) => new Promise((a) => {
|
|
21
5
|
fetch(e).then((n) => n.json()).then((n) => {
|
|
22
6
|
Object.keys(n).forEach((r) => {
|
|
23
7
|
t[r] = t[r] ? t[r] : {};
|
|
@@ -25,7 +9,7 @@ const q = (e, t) => new Promise((a) => {
|
|
|
25
9
|
t[r][l] = n[r][l];
|
|
26
10
|
}), a(!0);
|
|
27
11
|
});
|
|
28
|
-
}),
|
|
12
|
+
}), q = ":host{display:block}", F = q, H = class {
|
|
29
13
|
constructor(e) {
|
|
30
14
|
u(this, e), this.clientStyling = "", this.clientStylingUrl = "", this.translationUrl = "", this.stylingAppends = !1, this.setClientStyling = () => {
|
|
31
15
|
let t = document.createElement("style");
|
|
@@ -44,40 +28,38 @@ const q = (e, t) => new Promise((a) => {
|
|
|
44
28
|
componentDidRender() {
|
|
45
29
|
this.stylingAppends || (this.clientStyling && this.setClientStyling(), this.clientStylingUrl && this.setClientStylingURL(), this.stylingAppends = !0);
|
|
46
30
|
}
|
|
47
|
-
componentWillLoad() {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
return yield Promise.all(e);
|
|
55
|
-
});
|
|
31
|
+
async componentWillLoad() {
|
|
32
|
+
const e = [];
|
|
33
|
+
if (this.translationUrl) {
|
|
34
|
+
const t = U(this.translationUrl, this.targetTranslations);
|
|
35
|
+
e.push(t);
|
|
36
|
+
}
|
|
37
|
+
return await Promise.all(e);
|
|
56
38
|
}
|
|
57
39
|
render() {
|
|
58
40
|
return i("div", { key: "4d3414408c7662f88331dbe655966237f74d6958", class: "StyleShell" }, i("slot", { key: "1d004644d84602c4314bdf5dfc26b55b160f57df", name: "mainContent" }));
|
|
59
41
|
}
|
|
60
42
|
get el() {
|
|
61
|
-
return
|
|
43
|
+
return I(this);
|
|
62
44
|
}
|
|
63
45
|
};
|
|
64
|
-
|
|
65
|
-
function
|
|
66
|
-
|
|
67
|
-
var t =
|
|
46
|
+
H.style = F;
|
|
47
|
+
function E(e) {
|
|
48
|
+
v(1, arguments);
|
|
49
|
+
var t = p(e);
|
|
68
50
|
return t.setHours(0, 0, 0, 0), t;
|
|
69
51
|
}
|
|
70
|
-
var
|
|
71
|
-
function
|
|
72
|
-
|
|
73
|
-
var a =
|
|
74
|
-
return Math.round((r - l) /
|
|
52
|
+
var j = 864e5;
|
|
53
|
+
function G(e, t) {
|
|
54
|
+
v(2, arguments);
|
|
55
|
+
var a = E(e), n = E(t), r = a.getTime() - L(a), l = n.getTime() - L(n);
|
|
56
|
+
return Math.round((r - l) / j);
|
|
75
57
|
}
|
|
76
|
-
var
|
|
77
|
-
function
|
|
78
|
-
return
|
|
58
|
+
var X = 6e4, K = 36e5;
|
|
59
|
+
function k(e, t) {
|
|
60
|
+
return v(2, arguments), p(e).getTime() - p(t).getTime();
|
|
79
61
|
}
|
|
80
|
-
var
|
|
62
|
+
var w = {
|
|
81
63
|
ceil: Math.ceil,
|
|
82
64
|
round: Math.round,
|
|
83
65
|
floor: Math.floor,
|
|
@@ -85,32 +67,32 @@ var I = {
|
|
|
85
67
|
return t < 0 ? Math.ceil(t) : Math.floor(t);
|
|
86
68
|
}
|
|
87
69
|
// Math.trunc is not supported by IE
|
|
88
|
-
},
|
|
89
|
-
function
|
|
90
|
-
return e ?
|
|
70
|
+
}, Y = "trunc";
|
|
71
|
+
function C(e) {
|
|
72
|
+
return e ? w[e] : w[Y];
|
|
91
73
|
}
|
|
92
|
-
function
|
|
93
|
-
|
|
94
|
-
var n =
|
|
95
|
-
return
|
|
74
|
+
function J(e, t, a) {
|
|
75
|
+
v(2, arguments);
|
|
76
|
+
var n = k(e, t) / K;
|
|
77
|
+
return C(a?.roundingMethod)(n);
|
|
96
78
|
}
|
|
97
|
-
function
|
|
98
|
-
|
|
99
|
-
var n =
|
|
100
|
-
return
|
|
79
|
+
function Q(e, t, a) {
|
|
80
|
+
v(2, arguments);
|
|
81
|
+
var n = k(e, t) / X;
|
|
82
|
+
return C(a?.roundingMethod)(n);
|
|
101
83
|
}
|
|
102
|
-
function
|
|
103
|
-
|
|
104
|
-
var a =
|
|
84
|
+
function V(e, t) {
|
|
85
|
+
v(2, arguments);
|
|
86
|
+
var a = p(e), n = p(t);
|
|
105
87
|
return a.getTime() < n.getTime();
|
|
106
88
|
}
|
|
107
|
-
function
|
|
108
|
-
const a = e.querySelector("#total_level"), n = 17, r = 6.5, l = a.getBBox().width,
|
|
109
|
-
a.setAttribute("viewbox", `0 0 ${
|
|
110
|
-
const y = e.querySelector("#lock"),
|
|
111
|
-
y.setAttribute("cx", `${
|
|
89
|
+
function Z(e, t) {
|
|
90
|
+
const a = e.querySelector("#total_level"), n = 17, r = 6.5, l = a.getBBox().width, s = t > 1 ? 1 : t, d = s * l - n < 0 ? 0 : s * l - n, c = e.querySelector("#current_level"), h = e.querySelector("#filter_current_level"), g = e.querySelector("#circle_current_level");
|
|
91
|
+
a.setAttribute("viewbox", `0 0 ${d} 28`), c.setAttribute("width", `${d}`), g.setAttribute("cx", `${d < r ? r : d}`), h.setAttribute("x", `${d - 8}`);
|
|
92
|
+
const y = e.querySelector("#lock"), S = e.querySelector("#filter_heart_ball"), T = e.querySelector("#filter_ball"), A = e.querySelector("#filter_heart"), B = e.querySelector("#filter_lock"), f = e.querySelector("#paint0_linear_ball"), x = e.querySelector("#paint1_linear_lock"), D = e.querySelector("#lock_box"), _ = e.querySelector("#heart_box"), R = 10, o = l - R;
|
|
93
|
+
y.setAttribute("cx", `${o}`), x.setAttribute("x1", `${o}`), x.setAttribute("x2", `${o}`), f.setAttribute("x1", `${o - 6}`), f.setAttribute("x2", `${o - 6 + 11.2}`), B.setAttribute("x", `${o - 6}`), A.setAttribute("x", `${o - 6 - 2}`), T.setAttribute("x", `${o - 6 - 2 - 2}`), S.setAttribute("x", `${o - 6 - 2 - 2 - 4}`), D.setAttribute("x", `${o - 6}`), _.setAttribute("x", `${o - 6}`), a.parentElement.style.opacity = "1";
|
|
112
94
|
}
|
|
113
|
-
const
|
|
95
|
+
const ee = `:host {
|
|
114
96
|
display: block;
|
|
115
97
|
width: 360px;
|
|
116
98
|
height: 230px;
|
|
@@ -301,9 +283,9 @@ const te = `:host {
|
|
|
301
283
|
text-align: right;
|
|
302
284
|
font-weight: bold;
|
|
303
285
|
color: var(--emw--color-red, #9e595f);
|
|
304
|
-
}`,
|
|
286
|
+
}`, te = ee, ne = class {
|
|
305
287
|
constructor(e) {
|
|
306
|
-
u(this, e), this.playerElevateLeveLoaded =
|
|
288
|
+
u(this, e), this.playerElevateLeveLoaded = M(this, "playerElevateLeveLoaded");
|
|
307
289
|
}
|
|
308
290
|
handleWindowResizs() {
|
|
309
291
|
this.initLevelProgressbar();
|
|
@@ -331,10 +313,10 @@ const te = `:host {
|
|
|
331
313
|
let t = "";
|
|
332
314
|
if (!e || !e.aboutToExpire || e.aboutToExpire.length == 0 || e.aboutToExpire[0].points <= 0)
|
|
333
315
|
return t;
|
|
334
|
-
e.aboutToExpire.sort((
|
|
335
|
-
const a = e.aboutToExpire[0], n =
|
|
336
|
-
let r = 0, l = 0,
|
|
337
|
-
return n <= 0 && (r =
|
|
316
|
+
e.aboutToExpire.sort((d, c) => V(new Date(d.expireTime), new Date(c.expireTime)) ? -1 : 1);
|
|
317
|
+
const a = e.aboutToExpire[0], n = G(new Date(a.expireTime), /* @__PURE__ */ new Date());
|
|
318
|
+
let r = 0, l = 0, s = n === 0 ? "pointsToBeExpiredDay" : "pointsToBeExpired";
|
|
319
|
+
return n <= 0 && (r = J(new Date(a.expireTime), /* @__PURE__ */ new Date(), { roundingMethod: "floor" }), s = r > 1 ? "pointsToBeExpiredHours" : "pointsToBeExpiredHour", r <= 0 && (l = Q(new Date(a.expireTime), /* @__PURE__ */ new Date(), { roundingMethod: "floor" }), s = l > 1 ? "pointsToBeExpiredMinutes" : "pointsToBeExpiredMinute")), t = P(s, {
|
|
338
320
|
expirationPoints: a.points,
|
|
339
321
|
expireDay: Math.max(n, r, l)
|
|
340
322
|
}), t;
|
|
@@ -348,19 +330,19 @@ const te = `:host {
|
|
|
348
330
|
"Content-Type": "application/json"
|
|
349
331
|
}
|
|
350
332
|
}).then((n) => n.json()).then((n) => {
|
|
351
|
-
var r, l,
|
|
333
|
+
var r, l, s;
|
|
352
334
|
if (!n.success) {
|
|
353
335
|
console.error("Exception when fetch user elevateinfo, ", n.errorCode, n.errorMessage), a(!0);
|
|
354
336
|
return;
|
|
355
337
|
}
|
|
356
|
-
let
|
|
357
|
-
this.playerElevateLevel =
|
|
358
|
-
const
|
|
338
|
+
let d = n.data;
|
|
339
|
+
this.playerElevateLevel = d.level, this.playerElevateLevel.name = this.playerElevateLevel.presentation.displayName || this.playerElevateLevel.name, this.playerElevateLevel.spendablePoints = ((r = d.spendableWallet) === null || r === void 0 ? void 0 : r.total.points) || 0, this.playerElevateLeveLoaded.emit({ elevateLevel: this.playerElevateLevel });
|
|
340
|
+
const c = (l = n.data.spendableWallet) === null || l === void 0 ? void 0 : l.total, h = (s = n.data.loyaltyWallet) === null || s === void 0 ? void 0 : s.total;
|
|
359
341
|
this.playerElevateLeveLoaded.emit({
|
|
360
|
-
elevateLevelWalletTotal:
|
|
361
|
-
loyaltyWalletTotal:
|
|
342
|
+
elevateLevelWalletTotal: c,
|
|
343
|
+
loyaltyWalletTotal: h
|
|
362
344
|
});
|
|
363
|
-
let g = this.calcuatePointsToBeExpired(
|
|
345
|
+
let g = this.calcuatePointsToBeExpired(c), y = this.calcuatePointsToBeExpired(h);
|
|
364
346
|
(g || y) && this.playerElevateLeveLoaded.emit({
|
|
365
347
|
pointExpireString: g,
|
|
366
348
|
xpExpireString: y
|
|
@@ -370,7 +352,7 @@ const te = `:host {
|
|
|
370
352
|
}));
|
|
371
353
|
}
|
|
372
354
|
setLoyaltyProgress(e) {
|
|
373
|
-
|
|
355
|
+
Z(this.loyaltyProgressEle, e);
|
|
374
356
|
}
|
|
375
357
|
initLevelProgressbar() {
|
|
376
358
|
setTimeout(() => {
|
|
@@ -401,7 +383,7 @@ const te = `:host {
|
|
|
401
383
|
this.loadElevateInfo();
|
|
402
384
|
}
|
|
403
385
|
get elevateCardRef() {
|
|
404
|
-
return
|
|
386
|
+
return I(this);
|
|
405
387
|
}
|
|
406
388
|
static get watchers() {
|
|
407
389
|
return {
|
|
@@ -409,8 +391,8 @@ const te = `:host {
|
|
|
409
391
|
};
|
|
410
392
|
}
|
|
411
393
|
};
|
|
412
|
-
|
|
413
|
-
const
|
|
394
|
+
ne.style = te;
|
|
395
|
+
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}", re = ae, le = class {
|
|
414
396
|
constructor(e) {
|
|
415
397
|
u(this, e), this.theme = "Dark", this.language = "en", this.dateFormat = "yyyy-MM-dd", this.clientStyling = "", this.clientStylingUrl = "", this.translationUrl = "";
|
|
416
398
|
}
|
|
@@ -439,7 +421,7 @@ const re = ":host{display:block}@media screen and (min-width: 501px){.LoyaltyCar
|
|
|
439
421
|
let t = (e = this.playerElevateLevel) === null || e === void 0 ? void 0 : e.nextLevel;
|
|
440
422
|
if (this.playerElevateLevel && t) {
|
|
441
423
|
const a = (t.entryPoints - this.playerElevateLevel.loyaltyPoints).toFixed(2);
|
|
442
|
-
return
|
|
424
|
+
return P("tipsForNextLevel", {
|
|
443
425
|
pointsToReach: a,
|
|
444
426
|
levelName: t.name,
|
|
445
427
|
lang: this.language
|
|
@@ -448,8 +430,8 @@ const re = ":host{display:block}@media screen and (min-width: 501px){.LoyaltyCar
|
|
|
448
430
|
return "";
|
|
449
431
|
}
|
|
450
432
|
render() {
|
|
451
|
-
const e =
|
|
452
|
-
return i("div", { key: "2b0944f8317a94621e1bc65bbbb3726654b8963b", class: `ElevateCardWrapper ${this.theme}` }, i("div", { key: "c6d4dbba143435b4485d7fde91ab0a48a2f6688b", class: "LoyaltyCard Outer", style: { backgroundImage: `url(${e}` } }, i("general-styling-wrapper", { key: "e47a4efe925eb35d4449c6ff33a0afef9d284e55", clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations:
|
|
433
|
+
const e = b("../static/card-ground.svg"), t = b("../static/card-ground-over.svg");
|
|
434
|
+
return i("div", { key: "2b0944f8317a94621e1bc65bbbb3726654b8963b", class: `ElevateCardWrapper ${this.theme}` }, i("div", { key: "c6d4dbba143435b4485d7fde91ab0a48a2f6688b", class: "LoyaltyCard Outer", style: { backgroundImage: `url(${e}` } }, i("general-styling-wrapper", { key: "e47a4efe925eb35d4449c6ff33a0afef9d284e55", clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: N, translationUrl: this.translationUrl }), i("player-elevate-card-data", { key: "a560991893305894ddd41756cd7b3c32d0ef9e03", params: this.paramProxy }), i("div", { key: "ceb8b71386f84f54518a3694535aa16c2c3d3951", class: "OuterCover Inner", style: { backgroundImage: `url(${t}` } }, i("div", { key: "1df9647c3de42e74adee0f8895511442118ae381", class: "Content Row" }, this.playerElevateLevel && i(O, { key: "569bcd5fc3c578d2e6cc7442d28444e29688660c" }, i("div", { key: "aa40032bff99c5462b906e4427232ca2d4019017", class: "PlayerImg" }, i($, { key: "7a2d535b0c2029c90b9f1c123f9feebafca6bdde", onlyBadge: !0, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), i("div", { key: "90999da8fc2a3102eac235fcbc8afbec2a2bbdf8", class: `LevelInfo ${this.playerElevateLevel.name}` }, i(W, { key: "67e8bf370b1b77e776fb6d955ae63928fd1338d8", hideInfo: !0, level: this.playerElevateLevel.name, expireTime: this.playerElevateLevel.expireTime, dateFormat: this.dateFormat }), i("div", { key: "1e0fefc6a23f4aeeef5e19828399fe1229a3fc81", class: "PointsRange" }, i(m, { key: "dd176e624cde3b6f517101d7702a15465305174d", loyaltyPoints: this.playerElevateLevel.loyaltyPoints, language: this.language }), i(m, { key: "6cddb64c92545803d08fbbc513cc951b2691a42e", loyaltyPoints: this.getNextLevelPoints(), language: this.language })), i(z, { key: "08817ca979ea784aeb735579b0d52e5150eb0852" }), i("div", { key: "be9a1b40a8145d5e6d329d8e9f047296e84dd24b", class: "NextLevelTip" }, this.getNextLevelTips()), this.pointExpireString && i("div", { key: "f9cbb7d06e34717cb9f74cb8d2e506e49969e775", class: "PointsInfo ExpirationPoints" }, this.pointExpireString, " ")))))));
|
|
453
435
|
}
|
|
454
436
|
static get watchers() {
|
|
455
437
|
return {
|
|
@@ -459,10 +441,10 @@ const re = ":host{display:block}@media screen and (min-width: 501px){.LoyaltyCar
|
|
|
459
441
|
};
|
|
460
442
|
}
|
|
461
443
|
};
|
|
462
|
-
|
|
444
|
+
le.style = re;
|
|
463
445
|
export {
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
446
|
+
ce as gamification_dropdown,
|
|
447
|
+
H as general_styling_wrapper,
|
|
448
|
+
ne as player_elevate_card_data,
|
|
449
|
+
le as player_elevate_loyaltycard
|
|
468
450
|
};
|