@everymatrix/casino-header-controller-nd 1.55.0 → 1.56.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/components/CasinoHamburgerMenuNd-BXOxWDnU.js +5449 -0
  2. package/components/CasinoHamburgerMenuNd-CDprnR9N.cjs +5 -0
  3. package/components/CasinoHamburgerMenuNd-RHQhri2n.js +5487 -0
  4. package/components/CasinoHeaderControllerNd-CrjISN9T.cjs +1 -0
  5. package/components/{CasinoHeaderControllerNd-bGnLcz2g.js → CasinoHeaderControllerNd-DdRHib4Y.js} +505 -453
  6. package/components/{CasinoHeaderControllerNd-B4Hgo5oq.js → CasinoHeaderControllerNd-DeFJQOBT.js} +525 -473
  7. package/components/PlayerAccountBalanceModalNd-BduIv2jr.js +1553 -0
  8. package/components/PlayerAccountBalanceModalNd-ClQUf9hu.js +1582 -0
  9. package/components/PlayerAccountBalanceModalNd-DB8OTdY6.cjs +13 -0
  10. package/components/PlayerDeposit-D4E7B0VM.cjs +1 -0
  11. package/components/PlayerDeposit-Dn8OMUks.js +391 -0
  12. package/components/PlayerDeposit-Owd9kBaC.js +391 -0
  13. package/es2015/casino-header-controller-nd.cjs +1 -1
  14. package/es2015/casino-header-controller-nd.js +1 -1
  15. package/esnext/casino-header-controller-nd.js +1 -1
  16. package/package.json +1 -1
  17. package/stencil/gamification-dropdown-12tdWeqm.cjs +1 -0
  18. package/stencil/gamification-dropdown-246b88da-BcsKYpR0.js +126 -0
  19. package/stencil/gamification-dropdown-246b88da-Dckk_dCi.js +144 -0
  20. package/stencil/gamification-dropdown-246b88da-ImWNLZys.cjs +1 -0
  21. package/stencil/gamification-dropdown-CGlt7V-H.js +7 -0
  22. package/stencil/gamification-dropdown-GR6HFAZA.js +25 -0
  23. package/stencil/gamification-dropdown_4-BwwlBsis.cjs +192 -0
  24. package/stencil/{gamification-dropdown_4-Cg4EiNTS.js → gamification-dropdown_4-Denu_YbM.js} +21 -21
  25. package/stencil/{gamification-dropdown_4-BZffGACN.js → gamification-dropdown_4-QRIgZIS5.js} +19 -19
  26. package/stencil/index-30fda5fb-CiEO4toK.js +833 -0
  27. package/stencil/index-30fda5fb-DqSvPD7T.cjs +1 -0
  28. package/stencil/index-30fda5fb-XWBRFzl0.js +860 -0
  29. package/stencil/{player-elevate-card-Bo3fCMU8.js → player-elevate-card-BPyvJoKU.js} +4 -4
  30. package/stencil/{player-elevate-card-CGn57laL.js → player-elevate-card-CSXjQ70j.js} +4 -4
  31. package/stencil/player-elevate-card-D5kbh1fR.cjs +64 -0
  32. package/stencil/{player-elevate-card-items-2078bd83-DvW50KrW.js → player-elevate-card-items-be1e68f1-C-idvDlE.js} +1 -3
  33. package/stencil/{player-elevate-card-items-2078bd83-CUXuMGCR.js → player-elevate-card-items-be1e68f1-CF4tyvaU.js} +1 -3
  34. package/stencil/player-elevate-card-items-be1e68f1-CxCehVul.cjs +1 -0
  35. package/stencil/{player-elevate-pointcard-jLOeOCx0.js → player-elevate-pointcard-Baq8OlNX.js} +7 -7
  36. package/stencil/player-elevate-pointcard-DVXsZKCw.cjs +1 -0
  37. package/stencil/{player-elevate-pointcard-teAW1AOh.js → player-elevate-pointcard-jvw6Jdcf.js} +7 -7
  38. package/components/CasinoHamburgerMenuNd-CAV9ARg-.js +0 -5485
  39. package/components/CasinoHamburgerMenuNd-CSCV-5CJ.cjs +0 -5
  40. package/components/CasinoHamburgerMenuNd-DNYzzmAB.js +0 -5447
  41. package/components/CasinoHeaderControllerNd-Cd6hH1wA.cjs +0 -1
  42. package/components/PlayerAccountBalanceModalNd-BJJzPbdP.js +0 -1586
  43. package/components/PlayerAccountBalanceModalNd-Ca8dF_9M.js +0 -1557
  44. package/components/PlayerAccountBalanceModalNd-P1iLuuUG.cjs +0 -13
  45. package/components/PlayerDeposit-B0r58Ypp.js +0 -414
  46. package/components/PlayerDeposit-BkVMpjA9.js +0 -414
  47. package/components/PlayerDeposit-CjEddUaf.cjs +0 -1
  48. package/stencil/gamification-dropdown-456bb56a-BJ9kAxaI.js +0 -103
  49. package/stencil/gamification-dropdown-456bb56a-CldmfDdk.js +0 -121
  50. package/stencil/gamification-dropdown-456bb56a-ClnsHPoT.cjs +0 -1
  51. package/stencil/gamification-dropdown-BdMkPvQc.js +0 -7
  52. package/stencil/gamification-dropdown-CnrQK1ei.cjs +0 -1
  53. package/stencil/gamification-dropdown-FVqK4we0.js +0 -25
  54. package/stencil/gamification-dropdown_4-DNV5b4s7.cjs +0 -192
  55. package/stencil/index-171550cf-BY--MwdX.cjs +0 -1
  56. package/stencil/index-171550cf-CVTOm2AV.js +0 -799
  57. package/stencil/index-171550cf-JwZ7TN-k.js +0 -772
  58. package/stencil/player-elevate-card-CW-95gEJ.cjs +0 -64
  59. package/stencil/player-elevate-card-items-2078bd83-DSxFMBLz.cjs +0 -1
  60. package/stencil/player-elevate-pointcard-DVgy3cq3.cjs +0 -1
@@ -0,0 +1,144 @@
1
+ var p = (i, n, t) => new Promise((e, o) => {
2
+ var s = (l) => {
3
+ try {
4
+ a(t.next(l));
5
+ } catch (d) {
6
+ o(d);
7
+ }
8
+ }, c = (l) => {
9
+ try {
10
+ a(t.throw(l));
11
+ } catch (d) {
12
+ o(d);
13
+ }
14
+ }, a = (l) => l.done ? e(l.value) : Promise.resolve(l.value).then(s, c);
15
+ a((t = t.apply(i, n)).next());
16
+ });
17
+ import { r as u, h as r, g as y } from "./index-30fda5fb-XWBRFzl0.js";
18
+ const w = "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 = (i) => new Promise((n) => {
40
+ fetch(i).then((t) => t.json()).then((t) => {
41
+ Object.keys(t).forEach((e) => {
42
+ h[e] || (h[e] = {});
43
+ for (let o in t[e])
44
+ h[e][o] = t[e][o];
45
+ }), n(!0);
46
+ });
47
+ }), v = (i, n) => {
48
+ const t = n;
49
+ return h[t !== void 0 && t in h ? t : w][i];
50
+ };
51
+ function f(i, n) {
52
+ if (i) {
53
+ const t = document.createElement("style");
54
+ t.innerHTML = n, i.appendChild(t);
55
+ }
56
+ }
57
+ function m(i, n) {
58
+ const t = new URL(n);
59
+ fetch(t.href).then((e) => e.text()).then((e) => {
60
+ const o = document.createElement("style");
61
+ o.innerHTML = e, i && i.appendChild(o);
62
+ }).catch((e) => {
63
+ console.error("There was an error while trying to load client styling from URL", e);
64
+ });
65
+ }
66
+ function C(i, n, t) {
67
+ if (window.emMessageBus) {
68
+ const e = document.createElement("style");
69
+ window.emMessageBus.subscribe(n, (o) => {
70
+ e.innerHTML = o, i && i.appendChild(e);
71
+ });
72
+ }
73
+ }
74
+ const S = ":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}", D = S, G = class {
75
+ constructor(i) {
76
+ u(this, i), this.language = "en", this.session = "", this.clientStyling = "", this.clientStylingUrl = "", this.translationUrl = "", this.isOpen = !1, this.isLoading = !1, this.navigateToGamification = () => {
77
+ window.postMessage({ type: "NavigateToGamification" }, window.location.href), this.isOpen = !1;
78
+ }, this.handleOutsideClick = (n) => {
79
+ n.composedPath().includes(this.el) || (this.isOpen = !1, document.removeEventListener("click", this.handleOutsideClick));
80
+ }, this.handleDropdownClick = (n) => {
81
+ n.stopPropagation(), this.isOpen = !this.isOpen, this.isOpen ? document.addEventListener("click", this.handleOutsideClick) : document.removeEventListener("click", this.handleOutsideClick);
82
+ };
83
+ }
84
+ handleNewTranslations() {
85
+ this.isLoading = !0, g(this.translationUrl).then(() => {
86
+ this.isLoading = !1;
87
+ });
88
+ }
89
+ handleClientStylingChange(i, n) {
90
+ i != n && f(this.stylingContainer, this.clientStyling);
91
+ }
92
+ handleClientStylingChangeURL(i, n) {
93
+ i != n && this.clientStylingUrl && m(this.stylingContainer, this.clientStylingUrl);
94
+ }
95
+ componentWillLoad() {
96
+ return p(this, null, function* () {
97
+ if (this.translationUrl.length > 2 && (yield g(this.translationUrl)), this.endpoint && this.language)
98
+ return this.fetchPointsData();
99
+ });
100
+ }
101
+ componentDidLoad() {
102
+ this.stylingContainer && (window.emMessageBus != null ? C(this.stylingContainer, `${this.mbSource}.Style`) : (this.clientStyling && f(this.stylingContainer, this.clientStyling), this.clientStylingUrl && m(this.stylingContainer, this.clientStylingUrl)));
103
+ }
104
+ disconnectedCallback() {
105
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
106
+ }
107
+ fetchPointsData() {
108
+ let i = new URL(`${this.endpoint}/v1/elevate/playerInfo`);
109
+ i.searchParams.append("language", this.language);
110
+ const n = new Headers();
111
+ n.append("X-SessionId", this.session);
112
+ const t = {
113
+ method: "GET",
114
+ headers: n
115
+ };
116
+ return new Promise((e, o) => {
117
+ this.isLoading = !0, fetch(i.href, t).then((s) => s.json()).then((s) => {
118
+ var c, a;
119
+ this.loyaltyPoints = (a = (c = s == null ? void 0 : s.data) === null || c === void 0 ? void 0 : c.level) === null || a === void 0 ? void 0 : a.loyaltyPoints, e(!0);
120
+ }).catch((s) => {
121
+ console.error(s), o(s);
122
+ }).finally(() => {
123
+ this.isLoading = !1;
124
+ });
125
+ });
126
+ }
127
+ render() {
128
+ return this.isLoading ? null : r("div", { ref: (i) => this.stylingContainer = i, class: "GamificationDropdownContainer" }, r("button", { class: `GamificationDropdownButton ${this.isOpen ? "IsOpen" : ""}`, type: "button", onClick: (i) => this.handleDropdownClick(i), title: typeof this.loyaltyPoints == "number" ? String(this.loyaltyPoints) : v("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 })));
129
+ }
130
+ get el() {
131
+ return y(this);
132
+ }
133
+ static get watchers() {
134
+ return {
135
+ translationUrl: ["handleNewTranslations"],
136
+ clientStyling: ["handleClientStylingChange"],
137
+ clientStylingUrl: ["handleClientStylingChangeURL"]
138
+ };
139
+ }
140
+ };
141
+ G.style = D;
142
+ export {
143
+ G
144
+ };
@@ -0,0 +1 @@
1
+ "use strict";var p=(i,n,t)=>new Promise((e,o)=>{var s=r=>{try{l(t.next(r))}catch(d){o(d)}},c=r=>{try{l(t.throw(r))}catch(d){o(d)}},l=r=>r.done?e(r.value):Promise.resolve(r.value).then(s,c);l((t=t.apply(i,n)).next())});const a=require("./index-30fda5fb-DqSvPD7T.cjs"),y="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=i=>new Promise(n=>{fetch(i).then(t=>t.json()).then(t=>{Object.keys(t).forEach(e=>{h[e]||(h[e]={});for(let o in t[e])h[e][o]=t[e][o]}),n(!0)})}),w=(i,n)=>{const t=n;return h[t!==void 0&&t in h?t:y][i]};function f(i,n){if(i){const t=document.createElement("style");t.innerHTML=n,i.appendChild(t)}}function u(i,n){const t=new URL(n);fetch(t.href).then(e=>e.text()).then(e=>{const o=document.createElement("style");o.innerHTML=e,i&&i.appendChild(o)}).catch(e=>{console.error("There was an error while trying to load client styling from URL",e)})}function v(i,n,t){if(window.emMessageBus){const e=document.createElement("style");window.emMessageBus.subscribe(n,o=>{e.innerHTML=o,i&&i.appendChild(e)})}}const C=":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}",S=C,m=class{constructor(i){a.registerInstance(this,i),this.language="en",this.session="",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.isOpen=!1,this.isLoading=!1,this.navigateToGamification=()=>{window.postMessage({type:"NavigateToGamification"},window.location.href),this.isOpen=!1},this.handleOutsideClick=n=>{n.composedPath().includes(this.el)||(this.isOpen=!1,document.removeEventListener("click",this.handleOutsideClick))},this.handleDropdownClick=n=>{n.stopPropagation(),this.isOpen=!this.isOpen,this.isOpen?document.addEventListener("click",this.handleOutsideClick):document.removeEventListener("click",this.handleOutsideClick)}}handleNewTranslations(){this.isLoading=!0,g(this.translationUrl).then(()=>{this.isLoading=!1})}handleClientStylingChange(i,n){i!=n&&f(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(i,n){i!=n&&this.clientStylingUrl&&u(this.stylingContainer,this.clientStylingUrl)}componentWillLoad(){return p(this,null,function*(){if(this.translationUrl.length>2&&(yield g(this.translationUrl)),this.endpoint&&this.language)return this.fetchPointsData()})}componentDidLoad(){this.stylingContainer&&(window.emMessageBus!=null?v(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&f(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&u(this.stylingContainer,this.clientStylingUrl)))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}fetchPointsData(){let i=new URL(`${this.endpoint}/v1/elevate/playerInfo`);i.searchParams.append("language",this.language);const n=new Headers;n.append("X-SessionId",this.session);const t={method:"GET",headers:n};return new Promise((e,o)=>{this.isLoading=!0,fetch(i.href,t).then(s=>s.json()).then(s=>{var c,l;this.loyaltyPoints=(l=(c=s==null?void 0:s.data)===null||c===void 0?void 0:c.level)===null||l===void 0?void 0:l.loyaltyPoints,e(!0)}).catch(s=>{console.error(s),o(s)}).finally(()=>{this.isLoading=!1})})}render(){return this.isLoading?null:a.h("div",{ref:i=>this.stylingContainer=i,class:"GamificationDropdownContainer"},a.h("button",{class:`GamificationDropdownButton ${this.isOpen?"IsOpen":""}`,type:"button",onClick:i=>this.handleDropdownClick(i),title:typeof this.loyaltyPoints=="number"?String(this.loyaltyPoints):w("gamificationNoPoints",this.language)},typeof this.loyaltyPoints=="number"?`${this.loyaltyPoints} XP`:"...",a.h("span",{class:this.isOpen?"TriangleActive":"TriangleInactive"},a.h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"6.835",viewBox:"0 0 14 6.835"},a.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&&a.h("div",{class:"GamificationDropdown",onClick:this.navigateToGamification},a.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 a.getElement(this)}static get watchers(){return{translationUrl:["handleNewTranslations"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};m.style=S;exports.GamificationDropdown=m;
@@ -0,0 +1,7 @@
1
+ import { b as n, p as t } from "./index-30fda5fb-CiEO4toK.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], mbSource: [513, "mb-source"], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], isOpen: [32], isLoading: [32], loyaltyPoints: [32] }, null, { translationUrl: ["handleNewTranslations"], clientStyling: ["handleClientStylingChange"], clientStylingUrl: ["handleClientStylingChangeURL"] }], [1, "player-elevate-loyaltycard", { endpoint: [513], theme: [513], session: [513], playerAvatarUrl: [513, "player-avatar-url"], language: [513], playerName: [513, "player-name"], dateFormat: [513, "date-format"], mbSource: [1, "mb-source"], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], pointExpireString: [32], playerElevateLevel: [32], elevateWalletTotal: [32] }, [[0, "playerElevateLeveLoaded", "playerElevateLeveLoadedHandler"]], { session: ["onSessionOrEndpointChange"], endpoint: ["onSessionOrEndpointChange"], language: ["onSessionOrEndpointChange"] }], [4, "general-styling-wrapper", { clientStyling: [1, "client-styling"], clientStylingUrl: [1, "client-styling-url"], translationUrl: [1, "translation-url"], targetTranslations: [16] }], [0, "player-elevate-card-data", { params: [8], playerElevateLevel: [32], pointExpireString: [32] }, [[9, "resize", "handleWindowResizs"], [8, "redeemGiftButton", "redeemGiftButtonHandler"]], { params: ["onParamsChanged"] }]]], ["player-elevate-card", [[1, "player-elevate-card", { endpoint: [513], theme: [513], session: [513], playerAvatarUrl: [513, "player-avatar-url"], language: [513], playerName: [513, "player-name"], dateFormat: [513, "date-format"], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], pointExpireString: [32], playerLevelFlag: [32], playerElevateLevel: [32], elevateWalletTotal: [32] }, [[0, "playerElevateLeveLoaded", "playerElevateLeveLoadedHandler"]], { session: ["onSessionOrEndpointChange"], endpoint: ["onSessionOrEndpointChange"], language: ["onSessionOrEndpointChange"] }]]], ["player-elevate-pointcard", [[1, "player-elevate-pointcard", { endpoint: [513], theme: [513], session: [513], playerAvatarUrl: [513, "player-avatar-url"], language: [513], playerName: [513, "player-name"], cardTitle: [513, "card-title"], buttonType: [513, "button-type"], dateFormat: [513, "date-format"], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], pointExpireString: [32], playerElevateLevel: [32], elevateWalletTotal: [32], elevateSPTotal: [32] }, [[0, "playerElevateLeveLoaded", "playerElevateLeveLoadedHandler"]], { session: ["onSessionOrEndpointChange"], endpoint: ["onSessionOrEndpointChange"], language: ["onSessionOrEndpointChange"] }]]]], e)));
@@ -0,0 +1,25 @@
1
+ var o = (a, n, t) => new Promise((s, i) => {
2
+ var p = (e) => {
3
+ try {
4
+ l(t.next(e));
5
+ } catch (r) {
6
+ i(r);
7
+ }
8
+ }, g = (e) => {
9
+ try {
10
+ l(t.throw(e));
11
+ } catch (r) {
12
+ i(r);
13
+ }
14
+ }, l = (e) => e.done ? s(e.value) : Promise.resolve(e.value).then(p, g);
15
+ l((t = t.apply(a, n)).next());
16
+ });
17
+ import { b as y, p as d } from "./index-30fda5fb-XWBRFzl0.js";
18
+ import { g as c } from "./app-globals-0f993ce5-D-kw1sls.js";
19
+ var v = () => {
20
+ const a = import.meta.url, n = {};
21
+ return a !== "" && (n.resourcesUrl = new URL(".", a).href), d(n);
22
+ };
23
+ v().then((a) => o(void 0, null, function* () {
24
+ return yield c(), y([["gamification-dropdown_4", [[1, "gamification-dropdown", { endpoint: [513], language: [513], session: [513], mbSource: [513, "mb-source"], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], isOpen: [32], isLoading: [32], loyaltyPoints: [32] }, null, { translationUrl: ["handleNewTranslations"], clientStyling: ["handleClientStylingChange"], clientStylingUrl: ["handleClientStylingChangeURL"] }], [1, "player-elevate-loyaltycard", { endpoint: [513], theme: [513], session: [513], playerAvatarUrl: [513, "player-avatar-url"], language: [513], playerName: [513, "player-name"], dateFormat: [513, "date-format"], mbSource: [1, "mb-source"], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], pointExpireString: [32], playerElevateLevel: [32], elevateWalletTotal: [32] }, [[0, "playerElevateLeveLoaded", "playerElevateLeveLoadedHandler"]], { session: ["onSessionOrEndpointChange"], endpoint: ["onSessionOrEndpointChange"], language: ["onSessionOrEndpointChange"] }], [4, "general-styling-wrapper", { clientStyling: [1, "client-styling"], clientStylingUrl: [1, "client-styling-url"], translationUrl: [1, "translation-url"], targetTranslations: [16] }], [0, "player-elevate-card-data", { params: [8], playerElevateLevel: [32], pointExpireString: [32] }, [[9, "resize", "handleWindowResizs"], [8, "redeemGiftButton", "redeemGiftButtonHandler"]], { params: ["onParamsChanged"] }]]], ["player-elevate-card", [[1, "player-elevate-card", { endpoint: [513], theme: [513], session: [513], playerAvatarUrl: [513, "player-avatar-url"], language: [513], playerName: [513, "player-name"], dateFormat: [513, "date-format"], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], pointExpireString: [32], playerLevelFlag: [32], playerElevateLevel: [32], elevateWalletTotal: [32] }, [[0, "playerElevateLeveLoaded", "playerElevateLeveLoadedHandler"]], { session: ["onSessionOrEndpointChange"], endpoint: ["onSessionOrEndpointChange"], language: ["onSessionOrEndpointChange"] }]]], ["player-elevate-pointcard", [[1, "player-elevate-pointcard", { endpoint: [513], theme: [513], session: [513], playerAvatarUrl: [513, "player-avatar-url"], language: [513], playerName: [513, "player-name"], cardTitle: [513, "card-title"], buttonType: [513, "button-type"], dateFormat: [513, "date-format"], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], pointExpireString: [32], playerElevateLevel: [32], elevateWalletTotal: [32], elevateSPTotal: [32] }, [[0, "playerElevateLeveLoaded", "playerElevateLeveLoadedHandler"]], { session: ["onSessionOrEndpointChange"], endpoint: ["onSessionOrEndpointChange"], language: ["onSessionOrEndpointChange"] }]]]], a);
25
+ }));
@@ -0,0 +1,192 @@
1
+ "use strict";var f=(e,t,a)=>new Promise((n,l)=>{var i=d=>{try{s(a.next(d))}catch(p){l(p)}},c=d=>{try{s(a.throw(d))}catch(p){l(p)}},s=d=>d.done?n(d.value):Promise.resolve(d.value).then(i,c);s((a=a.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("./gamification-dropdown-246b88da-ImWNLZys.cjs"),r=require("./index-30fda5fb-DqSvPD7T.cjs"),o=require("./player-elevate-card-items-be1e68f1-CxCehVul.cjs"),_=(e,t)=>new Promise(a=>{fetch(e).then(n=>n.json()).then(n=>{Object.keys(n).forEach(l=>{t[l]=t[l]?t[l]:{};for(let i in n[l])t[l][i]=n[l][i]}),a(!0)})}),M=":host{display:block}",R=M,b=class{constructor(e){r.registerInstance(this,e),this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.stylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.el.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),a=document.createElement("style");fetch(t.href).then(n=>n.text()).then(n=>{a.innerHTML=n,setTimeout(()=>{this.el.prepend(a)},1)}).catch(n=>{console.log("error ",n)})}}componentDidRender(){this.stylingAppends||(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}componentWillLoad(){return f(this,null,function*(){const e=[];if(this.translationUrl){const t=_(this.translationUrl,this.targetTranslations);e.push(t)}return yield Promise.all(e)})}render(){return r.h("div",{key:"4d3414408c7662f88331dbe655966237f74d6958",class:"StyleShell"},r.h("slot",{key:"1d004644d84602c4314bdf5dfc26b55b160f57df",name:"mainContent"}))}get el(){return r.getElement(this)}};b.style=R;function x(e){o.requiredArgs(1,arguments);var t=o.toDate(e);return t.setHours(0,0,0,0),t}var O=864e5;function q(e,t){o.requiredArgs(2,arguments);var a=x(e),n=x(t),l=a.getTime()-o.getTimezoneOffsetInMilliseconds(a),i=n.getTime()-o.getTimezoneOffsetInMilliseconds(n);return Math.round((l-i)/O)}var N=6e4,$=36e5;function L(e,t){return o.requiredArgs(2,arguments),o.toDate(e).getTime()-o.toDate(t).getTime()}var m={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},W="trunc";function E(e){return e?m[e]:m[W]}function z(e,t,a){o.requiredArgs(2,arguments);var n=L(e,t)/$;return E(a==null?void 0:a.roundingMethod)(n)}function U(e,t,a){o.requiredArgs(2,arguments);var n=L(e,t)/N;return E(a==null?void 0:a.roundingMethod)(n)}function F(e,t){o.requiredArgs(2,arguments);var a=o.toDate(e),n=o.toDate(t);return a.getTime()<n.getTime()}function j(e,t){const a=e.querySelector("#total_level"),n=17,l=6.5,i=a.getBBox().width,c=t>1?1:t,s=c*i-n<0?0:c*i-n,d=e.querySelector("#current_level"),p=e.querySelector("#filter_current_level"),h=e.querySelector("#circle_current_level");a.setAttribute("viewbox",`0 0 ${s} 28`),d.setAttribute("width",`${s}`),h.setAttribute("cx",`${s<l?l:s}`),p.setAttribute("x",`${s-8}`);const g=e.querySelector("#lock"),P=e.querySelector("#filter_heart_ball"),C=e.querySelector("#filter_ball"),k=e.querySelector("#filter_heart"),S=e.querySelector("#filter_lock"),y=e.querySelector("#paint0_linear_ball"),u=e.querySelector("#paint1_linear_lock"),T=e.querySelector("#lock_box"),A=e.querySelector("#heart_box"),D=10,v=i-D;g.setAttribute("cx",`${v}`),u.setAttribute("x1",`${v}`),u.setAttribute("x2",`${v}`),y.setAttribute("x1",`${v-6}`),y.setAttribute("x2",`${v-6+11.2}`),S.setAttribute("x",`${v-6}`),k.setAttribute("x",`${v-6-2}`),C.setAttribute("x",`${v-6-2-2}`),P.setAttribute("x",`${v-6-2-2-4}`),T.setAttribute("x",`${v-6}`),A.setAttribute("x",`${v-6}`),a.parentElement.style.opacity="1"}const H=`:host {
2
+ display: block;
3
+ width: 360px;
4
+ height: 230px;
5
+ }
6
+
7
+ .ElevateCardWrapper {
8
+ contain: layout inline-size;
9
+ width: 100%;
10
+ height: fit-content;
11
+ min-height: 218px;
12
+ }
13
+
14
+ .Outer {
15
+ container-type: inline-size;
16
+ font-size: 12px;
17
+ background-size: cover;
18
+ background-repeat: no-repeat;
19
+ line-height: initial;
20
+ width: 100%;
21
+ height: 100%;
22
+ }
23
+
24
+ .Dark {
25
+ color: var(--emw--color-gray150, #efefef);
26
+ }
27
+
28
+ .Light {
29
+ color: var(--emw--color-black, #0e0e0e);
30
+ }
31
+
32
+ @container (min-width: 381px) {
33
+ .Outer {
34
+ background-size: cover;
35
+ }
36
+ .Outer .OuterCover {
37
+ min-height: 190px;
38
+ }
39
+ }
40
+ @container (min-width: 260px) {
41
+ .Outer {
42
+ background-size: contain;
43
+ }
44
+ }
45
+ .OuterCover {
46
+ width: 100%;
47
+ height: 100%;
48
+ content: "";
49
+ background-repeat: no-repeat;
50
+ background-size: cover;
51
+ border-radius: 15px;
52
+ }
53
+
54
+ .Inner {
55
+ display: flex;
56
+ flex-direction: column;
57
+ min-height: 158px;
58
+ }
59
+ .Inner .Content {
60
+ padding: 15px;
61
+ flex-wrap: wrap;
62
+ gap: 8px;
63
+ }
64
+ .Inner .Row {
65
+ display: flex;
66
+ flex-direction: row;
67
+ }
68
+ .Inner .CardCell {
69
+ display: flex;
70
+ }
71
+ .Inner .LevelProgress svg {
72
+ transition: opacity 0.4s;
73
+ }
74
+ .Inner .LevelInfo {
75
+ display: flex;
76
+ flex-direction: column;
77
+ }
78
+ .Inner .LevelInfo .ElevateLevel .LevelName {
79
+ height: 28px;
80
+ border-radius: 5px;
81
+ line-height: 28px;
82
+ overflow: hidden;
83
+ text-overflow: ellipsis;
84
+ white-space: nowrap;
85
+ }
86
+ .Inner .LevelInfo.Level0 .ElevateLevel .LevelName {
87
+ box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level0button-shadow, rgba(191, 84, 6, 0.75));
88
+ background: linear-gradient(180deg, var(--emw--elevate-color-level0-bg0, #E2792C) 0%, var(--emw--elevate-color-level0-bg1, rgba(242, 151, 99, 0)) 100%);
89
+ }
90
+ .Inner .LevelInfo.Level1 .ElevateLevel .LevelName {
91
+ box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level1button-shadow, rgba(151, 151, 151, 0.75));
92
+ background: linear-gradient(180deg, var(--emw--elevate-color-level1-bg0, #BEBFED) 0%, var(--emw--elevate-color-level1-bg1, rgba(216, 217, 233, 0)) 100%);
93
+ }
94
+ .Inner .LevelInfo.Level2 .ElevateLevel .LevelName {
95
+ box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level2button-shadow, rgba(191, 120, 6, 0.75));
96
+ background: linear-gradient(180deg, var(--emw--elevate-color-level2-bg0, #FCC410) 0%, var(--emw--elevate-color-level2-bg1, rgba(255, 189, 43, 0)) 100%);
97
+ }
98
+ .Inner .LevelInfo.Level3 .ElevateLevel .LevelName {
99
+ box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level3button-shadow, rgba(65, 6, 191, 0.75));
100
+ background: linear-gradient(180deg, var(--emw--elevate-color-level3-bg0, #B1A2DB) 0%, var(--emw--elevate-color-level3-bg1, rgba(203, 202, 245, 0)) 100%);
101
+ }
102
+ .Inner .LevelInfo.Level4 .ElevateLevel .LevelName {
103
+ box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level4button-shadow, rgba(65, 6, 191, 0.75));
104
+ background: linear-gradient(180deg, var(--emw--elevate-color-level4-bg0, #B1A2DB) 0%, var(--emw--elevate-color-level4-bg1, rgba(203, 202, 245, 0)) 100%);
105
+ }
106
+ .Inner .LevelInfo .ElevateLevel {
107
+ display: flex;
108
+ }
109
+ .Inner .LevelInfo {
110
+ flex: 1;
111
+ flex-grow: 1;
112
+ min-width: 150px;
113
+ }
114
+ .Inner .PlayerImg {
115
+ width: 29%;
116
+ margin: auto;
117
+ max-width: 100px;
118
+ min-width: 30px;
119
+ order: 0;
120
+ }
121
+ .Inner .PlayerAvatar {
122
+ max-width: 100px;
123
+ flex-basis: 100px;
124
+ height: auto;
125
+ margin: auto;
126
+ padding-top: 10px;
127
+ }
128
+ .Inner .PlayerAvatar .Avatar, .Inner .PlayerAvatar .Badge {
129
+ width: 100%;
130
+ height: 100%;
131
+ }
132
+ .Inner .PlayerAvatar .Avatar {
133
+ border-radius: 50%;
134
+ background-size: contain;
135
+ background-repeat: no-repeat;
136
+ }
137
+ .Inner .ElevateLevel .ExpirationDate {
138
+ max-width: 138px;
139
+ min-width: 118px;
140
+ }
141
+ .Inner .PlayerName, .Inner .RedeemButton, .Inner .ElevateLevel {
142
+ text-transform: capitalize;
143
+ width: 100%;
144
+ }
145
+ .Inner .PlayerName {
146
+ font-size: 16px;
147
+ }
148
+ .Inner .Row .PointsInfo {
149
+ display: table;
150
+ font-weight: 600;
151
+ }
152
+ .Inner .Row .Redeem {
153
+ justify-content: flex-end;
154
+ margin-left: auto;
155
+ }
156
+ .Inner .Row .Redeem:hover {
157
+ color: var(--emw--elevate-color-redeem-hover, #00ABA4);
158
+ cursor: pointer;
159
+ }
160
+ .Inner .Row .RedeemButton:hover span {
161
+ color: var(emfe-w-elevate-color-redeem-text-hover, #f1f1f1);
162
+ font-weight: bold;
163
+ }
164
+ .Inner .Row .RedeemButton {
165
+ width: 95px;
166
+ height: 35px;
167
+ display: flex;
168
+ align-items: center;
169
+ border-radius: 10px;
170
+ background: var(--emw--elevate-color-redeem-bg, linear-gradient(0deg, #26CC37, #26CC37)), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%);
171
+ box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.2509803922);
172
+ }
173
+ .Inner .Row .RedeemButton span {
174
+ color: var(--emw--color-white, #fff);
175
+ line-height: 18px;
176
+ font-size: 15px;
177
+ text-align: center;
178
+ width: 100%;
179
+ }
180
+ .Inner .Row .Points {
181
+ font-size: large;
182
+ vertical-align: middle;
183
+ }
184
+ .Inner .Row .Points .XP {
185
+ font-size: x-small;
186
+ }
187
+ .Inner .Row .ExpirationPoints {
188
+ font-size: small;
189
+ text-align: right;
190
+ font-weight: bold;
191
+ color: var(--emw--color-red, #9e595f);
192
+ }`,G=H,w=class{constructor(e){r.registerInstance(this,e),this.playerElevateLeveLoaded=r.createEvent(this,"playerElevateLeveLoaded")}handleWindowResizs(){this.initLevelProgressbar()}onParamsChanged(){this.loadElevateInfo()}redeemGiftButtonHandler(){this.loadElevateInfo()}onRedeemClick(){window.postMessage({type:"BEERedeemClicked"},window.location.href)}loadLevels(){let e=new URL(`${this.params.endpoint}/v1/elevate/levels?language=${this.params.language}`);return new Promise((t,a)=>fetch(e.href,{method:"GET"}).then(n=>n.json()).then(n=>{this.levels=n.data,t(!0)}).catch(n=>{a(n)}))}calcuatePointsToBeExpired(e){let t="";if(!e||!e.aboutToExpire||e.aboutToExpire.length==0||e.aboutToExpire[0].points<=0)return t;e.aboutToExpire.sort((s,d)=>F(new Date(s.expireTime),new Date(d.expireTime))?-1:1);const a=e.aboutToExpire[0],n=q(new Date(a.expireTime),new Date);let l=0,i=0,c=n===0?"pointsToBeExpiredDay":"pointsToBeExpired";return n<=0&&(l=z(new Date(a.expireTime),new Date,{roundingMethod:"floor"}),c=l>1?"pointsToBeExpiredHours":"pointsToBeExpiredHour",l<=0&&(i=U(new Date(a.expireTime),new Date,{roundingMethod:"floor"}),c=i>1?"pointsToBeExpiredMinutes":"pointsToBeExpiredMinute")),t=o.translateWithParams(c,{expirationPoints:a.points,expireDay:Math.max(n,l,i)}),t}loadPlayerLevelInfo(){let e=new URL(`${this.params.endpoint}/v1/elevate/playerInfo?language=${this.params.language}`);return new Promise((t,a)=>fetch(e.href,{method:"GET",headers:{"X-Sessionid":this.params.session,"Content-Type":"application/json"}}).then(n=>n.json()).then(n=>{var l,i,c;if(!n.success){console.error("Exception when fetch user elevateinfo, ",n.errorCode,n.errorMessage),a(!0);return}let s=n.data;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});const d=(i=n.data.spendableWallet)===null||i===void 0?void 0:i.total,p=(c=n.data.loyaltyWallet)===null||c===void 0?void 0:c.total;this.playerElevateLeveLoaded.emit({elevateLevelWalletTotal:d,loyaltyWalletTotal:p});let h=this.calcuatePointsToBeExpired(d),g=this.calcuatePointsToBeExpired(p);(h||g)&&this.playerElevateLeveLoaded.emit({pointExpireString:h,xpExpireString:g}),t(this.playerElevateLevel)}).catch(n=>{console.log("error ",n),a(!0)}))}setLoyaltyProgress(e){j(this.loyaltyProgressEle,e)}initLevelProgressbar(){setTimeout(()=>{this.loyaltyProgressEle=this.elevateCardRef.parentElement.querySelector("#LevelProgress"),this.loyaltyProgressEle&&(this.setLoyaltyProgress(this.playerElevateLevel.nextLevel?this.playerElevateLevel.loyaltyPoints/this.playerElevateLevel.nextLevel.entryPoints:1),this.params.playerElevateLevel=this.playerElevateLevel)},80)}componentDidRender(){this.initLevelProgressbar()}loadElevateInfo(){if(!this.params.endpoint||!this.params.session)return;const e=[];e.push(this.loadPlayerLevelInfo()),this.params.calculateLevelFlag&&e.push(this.loadLevels()),Promise.all(e).then(t=>{if(console.log("elevate-init",t),this.initLevelProgressbar(),!this.levels)return;this.levels.sort((l,i)=>l.firstEntryPoints>i.firstEntryPoints?1:-1);const a=this.playerElevateLevel.loyaltyPoints;let n=0;this.levels.forEach((l,i)=>{a>l.firstEntryPoints&&(n=i)}),this.playerElevateLeveLoaded.emit({calculatedLevelFlag:n})})}componentWillLoad(){this.loadElevateInfo()}get elevateCardRef(){return r.getElement(this)}static get watchers(){return{params:["onParamsChanged"]}}};w.style=G;const X=":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}",K=X,I=class{constructor(e){r.registerInstance(this,e),this.theme="Dark",this.language="en",this.dateFormat="yyyy-MM-dd",this.clientStyling="",this.clientStylingUrl="",this.translationUrl=""}onSessionOrEndpointChange(){this.paramProxy=Object.assign(Object.assign({},this.paramProxy),{session:this.session,endpoint:this.endpoint,language:this.language})}playerElevateLeveLoadedHandler(e){e.detail&&(e.detail.elevateLevelWalletTotal&&(this.elevateWalletTotal=e.detail.elevateLevelWalletTotal),e.detail.elevateLevel&&(this.playerElevateLevel=e.detail.elevateLevel),e.detail.pointExpireString&&(this.pointExpireString=e.detail.xpExpireString))}onRedeemClick(){window.postMessage({type:"BEERedeemClicked"},window.location.href)}componentWillLoad(){this.paramProxy={endpoint:this.endpoint,session:this.session,language:this.language}}getNextLevelPoints(){var e,t;return!((e=this.playerElevateLevel)===null||e===void 0)&&e.nextLevel?(t=this.playerElevateLevel)===null||t===void 0?void 0:t.nextLevel.entryPoints:-1}getNextLevelTips(){var e;let t=(e=this.playerElevateLevel)===null||e===void 0?void 0:e.nextLevel;if(this.playerElevateLevel&&t){const a=(t.entryPoints-this.playerElevateLevel.loyaltyPoints).toFixed(2);return o.translateWithParams("tipsForNextLevel",{pointsToReach:a,levelName:t.name,lang:this.language})}return""}render(){const e=r.getAssetPath("../static/card-ground.svg"),t=r.getAssetPath("../static/card-ground-over.svg");return r.h("div",{key:"39295a651da66747a20554699bba5f96b8ad5c35",class:`ElevateCardWrapper ${this.theme}`},r.h("div",{key:"78c34fe054fc2459f8af3354116cd21a68ce01be",class:"LoyaltyCard Outer",style:{backgroundImage:`url(${e}`}},r.h("general-styling-wrapper",{key:"be6efc6da4c3ccf4cc3ece8ecc73561bae75aa20",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:o.TRANSLATIONS,translationUrl:this.translationUrl}),r.h("player-elevate-card-data",{key:"b53e4b59d4ee55a2f567efa09afab3d72969e6e4",params:this.paramProxy}),r.h("div",{key:"1f3e504440bab2df3a181058fad7149c85c48c14",class:"OuterCover Inner",style:{backgroundImage:`url(${t}`}},r.h("div",{key:"a07c6cd95770dc1bfd3da78b1c7cc8e1367321b1",class:"Content Row"},this.playerElevateLevel&&r.h(r.Fragment,{key:"5c104f5ba1a018219c6ed5f6e50af99b035a0344"},r.h("div",{key:"bd94591e6ab9298ab7c769fa48efaf314dc1a63b",class:"PlayerImg"},r.h(o.PlayerAvatar,{key:"928849ce86d8c7a483eba7850efc83f8149bae43",onlyBadge:!0,loyaltyIconUrl:this.playerElevateLevel.presentation.asset})),r.h("div",{key:"37192c9b8502eb3c7d93914369df2d784c17e9f7",class:`LevelInfo ${this.playerElevateLevel.name}`},r.h(o.PlayerElevateLoyaltyLevel,{key:"2684a177f4bb1053c4587fd4158666fb35ca23f4",hideInfo:!0,level:this.playerElevateLevel.name,expireTime:this.playerElevateLevel.expireTime,dateFormat:this.dateFormat}),r.h("div",{key:"173a37c63868f2d900c12af3ffc2d9a4a57550e4",class:"PointsRange"},r.h(o.PlayerPoints,{key:"a7111154f7dc547e0b05c70d24508bdd75c5d882",loyaltyPoints:this.playerElevateLevel.loyaltyPoints,language:this.language}),r.h(o.PlayerPoints,{key:"ad31574e7db81a7ecb7a06b28b1d4968cbcab93e",loyaltyPoints:this.getNextLevelPoints(),language:this.language})),r.h(o.PlayerLoyaltyProcess,{key:"88ddfdb326edfb1de9519da6b3d0e5b514725e27"}),r.h("div",{key:"b9c79555a8001bd2c754d7573df04016da235c84",class:"NextLevelTip"},this.getNextLevelTips()),this.pointExpireString&&r.h("div",{key:"02da725060c9db4a8c1c2e8bad3426894d7f8f2c",class:"PointsInfo ExpirationPoints"},this.pointExpireString," ")))))))}static get watchers(){return{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}}};I.style=K;exports.gamification_dropdown=B.GamificationDropdown;exports.general_styling_wrapper=b;exports.player_elevate_card_data=w;exports.player_elevate_loyaltycard=I;
@@ -1,6 +1,6 @@
1
- import { G as ve } from "./gamification-dropdown-456bb56a-BJ9kAxaI.js";
2
- import { r as u, h as i, g as I, c as M, a as m, F as O } from "./index-171550cf-JwZ7TN-k.js";
3
- import { t as P, T as N, P as $, a as W, b, c as z, r as c, g as L, d as p } from "./player-elevate-card-items-2078bd83-CUXuMGCR.js";
1
+ import { G as ce } from "./gamification-dropdown-246b88da-BcsKYpR0.js";
2
+ import { r as u, h as i, g as I, c as M, a as m, F as O } from "./index-30fda5fb-CiEO4toK.js";
3
+ import { t as P, T as N, P as $, a as W, b, c as z, r as v, d as p, g as L } from "./player-elevate-card-items-be1e68f1-CF4tyvaU.js";
4
4
  const U = (e, t) => new Promise((a) => {
5
5
  fetch(e).then((n) => n.json()).then((n) => {
6
6
  Object.keys(n).forEach((r) => {
@@ -11,7 +11,7 @@ const U = (e, t) => new Promise((a) => {
11
11
  });
12
12
  }), q = ":host{display:block}", F = q, H = class {
13
13
  constructor(e) {
14
- u(this, e), this.stylingAppends = !1, this.setClientStyling = () => {
14
+ u(this, e), this.clientStyling = "", this.clientStylingUrl = "", this.translationUrl = "", this.stylingAppends = !1, this.setClientStyling = () => {
15
15
  let t = document.createElement("style");
16
16
  t.innerHTML = this.clientStyling, this.el.prepend(t);
17
17
  }, this.setClientStylingURL = () => {
@@ -23,7 +23,7 @@ const U = (e, t) => new Promise((a) => {
23
23
  }).catch((n) => {
24
24
  console.log("error ", n);
25
25
  });
26
- }, this.clientStyling = "", this.clientStylingUrl = "", this.translationUrl = "", this.targetTranslations = void 0;
26
+ };
27
27
  }
28
28
  componentDidRender() {
29
29
  this.stylingAppends || (this.clientStyling && this.setClientStyling(), this.clientStylingUrl && this.setClientStylingURL(), this.stylingAppends = !0);
@@ -45,19 +45,19 @@ const U = (e, t) => new Promise((a) => {
45
45
  };
46
46
  H.style = F;
47
47
  function E(e) {
48
- c(1, arguments);
48
+ v(1, arguments);
49
49
  var t = p(e);
50
50
  return t.setHours(0, 0, 0, 0), t;
51
51
  }
52
52
  var j = 864e5;
53
53
  function G(e, t) {
54
- c(2, arguments);
54
+ v(2, arguments);
55
55
  var a = E(e), n = E(t), r = a.getTime() - L(a), l = n.getTime() - L(n);
56
56
  return Math.round((r - l) / j);
57
57
  }
58
58
  var X = 6e4, K = 36e5;
59
59
  function k(e, t) {
60
- return c(2, arguments), p(e).getTime() - p(t).getTime();
60
+ return v(2, arguments), p(e).getTime() - p(t).getTime();
61
61
  }
62
62
  var w = {
63
63
  ceil: Math.ceil,
@@ -72,23 +72,23 @@ function C(e) {
72
72
  return e ? w[e] : w[Y];
73
73
  }
74
74
  function J(e, t, a) {
75
- c(2, arguments);
75
+ v(2, arguments);
76
76
  var n = k(e, t) / K;
77
77
  return C(a?.roundingMethod)(n);
78
78
  }
79
79
  function Q(e, t, a) {
80
- c(2, arguments);
80
+ v(2, arguments);
81
81
  var n = k(e, t) / X;
82
82
  return C(a?.roundingMethod)(n);
83
83
  }
84
84
  function V(e, t) {
85
- c(2, arguments);
85
+ v(2, arguments);
86
86
  var a = p(e), n = p(t);
87
87
  return a.getTime() < n.getTime();
88
88
  }
89
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, v = e.querySelector("#current_level"), h = e.querySelector("#filter_current_level"), g = e.querySelector("#circle_current_level");
91
- a.setAttribute("viewbox", `0 0 ${d} 28`), v.setAttribute("width", `${d}`), g.setAttribute("cx", `${d < r ? r : d}`), h.setAttribute("x", `${d - 8}`);
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
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
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";
94
94
  }
@@ -285,7 +285,7 @@ const ee = `:host {
285
285
  color: var(--emw--color-red, #9e595f);
286
286
  }`, te = ee, ne = class {
287
287
  constructor(e) {
288
- u(this, e), this.playerElevateLeveLoaded = M(this, "playerElevateLeveLoaded", 7), this.params = void 0, this.playerElevateLevel = void 0, this.pointExpireString = void 0;
288
+ u(this, e), this.playerElevateLeveLoaded = M(this, "playerElevateLeveLoaded");
289
289
  }
290
290
  handleWindowResizs() {
291
291
  this.initLevelProgressbar();
@@ -313,7 +313,7 @@ const ee = `:host {
313
313
  let t = "";
314
314
  if (!e || !e.aboutToExpire || e.aboutToExpire.length == 0 || e.aboutToExpire[0].points <= 0)
315
315
  return t;
316
- e.aboutToExpire.sort((d, v) => V(new Date(d.expireTime), new Date(v.expireTime)) ? -1 : 1);
316
+ e.aboutToExpire.sort((d, c) => V(new Date(d.expireTime), new Date(c.expireTime)) ? -1 : 1);
317
317
  const a = e.aboutToExpire[0], n = G(new Date(a.expireTime), /* @__PURE__ */ new Date());
318
318
  let r = 0, l = 0, s = n === 0 ? "pointsToBeExpiredDay" : "pointsToBeExpired";
319
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, {
@@ -337,12 +337,12 @@ const ee = `:host {
337
337
  }
338
338
  let d = n.data;
339
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 v = (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;
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;
341
341
  this.playerElevateLeveLoaded.emit({
342
- elevateLevelWalletTotal: v,
342
+ elevateLevelWalletTotal: c,
343
343
  loyaltyWalletTotal: h
344
344
  });
345
- let g = this.calcuatePointsToBeExpired(v), y = this.calcuatePointsToBeExpired(h);
345
+ let g = this.calcuatePointsToBeExpired(c), y = this.calcuatePointsToBeExpired(h);
346
346
  (g || y) && this.playerElevateLeveLoaded.emit({
347
347
  pointExpireString: g,
348
348
  xpExpireString: y
@@ -394,7 +394,7 @@ const ee = `:host {
394
394
  ne.style = te;
395
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 {
396
396
  constructor(e) {
397
- 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.clientStyling = "", this.clientStylingUrl = "", this.translationUrl = "", this.pointExpireString = void 0, this.playerElevateLevel = void 0, this.elevateWalletTotal = void 0;
397
+ u(this, e), this.theme = "Dark", this.language = "en", this.dateFormat = "yyyy-MM-dd", this.clientStyling = "", this.clientStylingUrl = "", this.translationUrl = "";
398
398
  }
399
399
  onSessionOrEndpointChange() {
400
400
  this.paramProxy = Object.assign(Object.assign({}, this.paramProxy), { session: this.session, endpoint: this.endpoint, language: this.language });
@@ -431,7 +431,7 @@ const ae = ":host{display:block}@media screen and (min-width: 501px){.LoyaltyCar
431
431
  }
432
432
  render() {
433
433
  const e = m("../static/card-ground.svg"), t = m("../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(b, { key: "dd176e624cde3b6f517101d7702a15465305174d", loyaltyPoints: this.playerElevateLevel.loyaltyPoints, language: this.language }), i(b, { 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, " ")))))));
434
+ 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($, { 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, " ")))))));
435
435
  }
436
436
  static get watchers() {
437
437
  return {
@@ -443,7 +443,7 @@ const ae = ":host{display:block}@media screen and (min-width: 501px){.LoyaltyCar
443
443
  };
444
444
  le.style = re;
445
445
  export {
446
- ve as gamification_dropdown,
446
+ ce as gamification_dropdown,
447
447
  H as general_styling_wrapper,
448
448
  ne as player_elevate_card_data,
449
449
  le as player_elevate_loyaltycard