@everymatrix/casino-header-controller-nd 1.65.1 → 1.65.3
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-CZ6VNaW1.cjs +18 -0
- package/components/{CasinoHamburgerMenuNd-kNSb5kzp.js → CasinoHamburgerMenuNd-D_l-_9wt.js} +1025 -1060
- package/components/{CasinoHamburgerMenuNd-CRHTyzLa.js → CasinoHamburgerMenuNd-GN2-xEq0.js} +1034 -1069
- package/components/{CasinoHeaderControllerNd-WEq7tT9f.cjs → CasinoHeaderControllerNd-BWmryDnI.cjs} +1 -1
- package/components/{CasinoHeaderControllerNd-CyoAz7Qo.js → CasinoHeaderControllerNd-CB12swSz.js} +90 -90
- package/components/{CasinoHeaderControllerNd-DzJg_p4v.js → CasinoHeaderControllerNd-aeo9h9EF.js} +88 -88
- package/components/{PlayerAccountBalanceModalNd-D5LR7cHC.js → PlayerAccountBalanceModalNd-BN47kJKM.js} +122 -122
- package/components/{PlayerAccountBalanceModalNd-CKkqacyC.cjs → PlayerAccountBalanceModalNd-BNusvanr.cjs} +1 -1
- package/components/{PlayerAccountBalanceModalNd-C_-z_ILo.js → PlayerAccountBalanceModalNd-CqWCOtxL.js} +122 -122
- package/components/{PlayerDeposit-8bunmKNP.js → PlayerDeposit-CH6X2HzT.js} +43 -43
- package/components/{PlayerDeposit-OEh7dNO5.cjs → PlayerDeposit-DP4_U-Vn.cjs} +1 -1
- package/components/{PlayerDeposit-CGZwpLsA.js → PlayerDeposit-nAWT6R27.js} +43 -43
- package/es2015/casino-header-controller-nd.cjs +1 -1
- package/es2015/casino-header-controller-nd.js +1 -1
- package/esnext/casino-header-controller-nd.js +1 -1
- package/package.json +1 -1
- package/stencil/{gamification-dropdown-8eb8a896-Dpy7kYRl.js → gamification-dropdown-8eb8a896-B1IK7mlM.js} +7 -7
- package/stencil/{gamification-dropdown-8eb8a896-wUq7QkNM.cjs → gamification-dropdown-8eb8a896-C94_wdAW.cjs} +1 -1
- package/stencil/{gamification-dropdown-8eb8a896-B80HjrXs.js → gamification-dropdown-8eb8a896-D5R5F9LE.js} +3 -3
- package/stencil/{gamification-dropdown-N2ywJkem.js → gamification-dropdown-BraOg6Uc.js} +1 -1
- package/stencil/{gamification-dropdown-DkDy6E4e.cjs → gamification-dropdown-CrMpkB52.cjs} +1 -1
- package/stencil/{gamification-dropdown-DJjY7-I6.js → gamification-dropdown-DrIchqVb.js} +1 -1
- package/stencil/{gamification-dropdown_4-CmDM3hBS.js → gamification-dropdown_4-CK6IolmG.js} +59 -56
- package/stencil/{gamification-dropdown_4-CcWOoutw.js → gamification-dropdown_4-Cl5eOIaD.js} +58 -55
- package/stencil/gamification-dropdown_4-DKpiKr-s.cjs +192 -0
- package/stencil/index-71b1bdfa-CaHfgY-G.cjs +1 -0
- package/stencil/{index-71b1bdfa-DBUT8z-D.js → index-71b1bdfa-DTrMzwed.js} +235 -235
- package/stencil/{index-71b1bdfa-BWeAgaw2.js → index-71b1bdfa-ZRt5ReAy.js} +226 -226
- package/stencil/locale-B_6Rn5-v.cjs +1 -0
- package/stencil/{locale-DuSXBQwH.js → locale-TxlOHoKi.js} +11 -5
- package/stencil/{player-elevate-card-DqZR4w--.js → player-elevate-card-AM1BCXua.js} +3 -3
- package/stencil/{player-elevate-card-B70rn287.js → player-elevate-card-CWt6FvdJ.js} +3 -3
- package/stencil/{player-elevate-card-W6LcGGe8.cjs → player-elevate-card-TfRVu77N.cjs} +1 -1
- package/stencil/player-elevate-card-items-5071deed-AlJJIZWb.js +1393 -0
- package/stencil/player-elevate-card-items-5071deed-B3nmpFdz.js +1393 -0
- package/stencil/player-elevate-card-items-5071deed-BJ_oxWgG.cjs +102 -0
- package/stencil/{player-elevate-pointcard-CBapQeNI.js → player-elevate-pointcard-CHncK0Ig.js} +3 -3
- package/stencil/{player-elevate-pointcard-DREgIjCm.js → player-elevate-pointcard-Ckg55VX8.js} +3 -3
- package/stencil/{player-elevate-pointcard-DwDhlXwq.cjs → player-elevate-pointcard-D2BXgs9M.cjs} +1 -1
- package/stencil/{player-rakeback-card-tP823Fs8.js → player-rakeback-card-CYg1vJa6.js} +2 -2
- package/stencil/{player-rakeback-card-B0P7gHIA.cjs → player-rakeback-card-Di0yfbE9.cjs} +1 -1
- package/stencil/{player-rakeback-card-z_ugBu0q.js → player-rakeback-card-DieV8mJW.js} +2 -2
- package/components/CasinoHamburgerMenuNd-BMOc3TVZ.cjs +0 -18
- package/stencil/gamification-dropdown_4-B2a2BjCo.cjs +0 -192
- package/stencil/index-71b1bdfa-BeszNvNP.cjs +0 -1
- package/stencil/locale-DHn5ZpQu.cjs +0 -1
- package/stencil/player-elevate-card-items-66be34fb-D7zHppoa.js +0 -1290
- package/stencil/player-elevate-card-items-66be34fb-DBIZuvGZ.cjs +0 -1
- package/stencil/player-elevate-card-items-66be34fb-aPLlnN0e.js +0 -1290
|
@@ -1 +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-71b1bdfa-
|
|
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-71b1bdfa-CaHfgY-G.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 f=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 g(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 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}",C=S,m=class{constructor(i){a.registerInstance(this,i),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)},this.endpoint=void 0,this.language="en",this.session="",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.isOpen=!1,this.isLoading=!1,this.loyaltyPoints=void 0}handleNewTranslations(){this.isLoading=!0,f(this.translationUrl).then(()=>{this.isLoading=!1})}handleClientStylingChange(i,n){i!=n&&g(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 f(this.translationUrl)),this.endpoint&&this.language)return this.fetchPointsData()})}componentDidLoad(){this.stylingContainer&&(window.emMessageBus!=null?v(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&g(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=C;exports.GamificationDropdown=m;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as
|
|
1
|
+
import { r as f, h as a, g } from "./index-71b1bdfa-ZRt5ReAy.js";
|
|
2
2
|
const u = "en";
|
|
3
3
|
let l = {
|
|
4
4
|
en: {
|
|
@@ -57,7 +57,7 @@ function y(i, t, n) {
|
|
|
57
57
|
}
|
|
58
58
|
const w = ":host{display:block}.GamificationDropdownContainer{position:relative}.GamificationDropdownContainer .GamificationDropdown{position:absolute;left:0;z-index:200;overflow:hidden;cursor:pointer}.GamificationDropdownButton{cursor:pointer;font-size:14px;height:20px;background-color:unset;color:var(--emw--color-typography, #FFFFFF);padding:0;border:none;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:flex;align-items:center;justify-content:center;line-height:0}.GamificationDropdownButton:hover{color:var(--emw--color-primary, #52d004)}.GamificationDropdownButton:hover svg{fill:var(--emw--color-primary, #52d004)}.GamificationDropdownButton.IsOpen{color:var(--emw--color-primary, #52d004)}.GamificationDropdownButton.IsOpen svg{fill:var(--emw--color-primary, #52d004)}.GamificationDropdownButton .TriangleActive,.GamificationDropdownButton .TriangleInactive{display:block;transition:all 0.2s}.GamificationDropdownButton .TriangleActive{transform:scale(1.1) rotateX(180deg) translateY(3px);fill:var(--emw--color-primary, #52d004);margin-top:4px}.GamificationDropdownButton svg{fill:var(--emw--color-typography, #FFFFFF);margin-left:8px;width:16px}", v = w, S = class {
|
|
59
59
|
constructor(i) {
|
|
60
|
-
|
|
60
|
+
f(this, i), this.navigateToGamification = () => {
|
|
61
61
|
window.postMessage({ type: "NavigateToGamification" }, window.location.href), this.isOpen = !1;
|
|
62
62
|
}, this.handleOutsideClick = (t) => {
|
|
63
63
|
t.composedPath().includes(this.el) || (this.isOpen = !1, document.removeEventListener("click", this.handleOutsideClick));
|
|
@@ -110,7 +110,7 @@ const w = ":host{display:block}.GamificationDropdownContainer{position:relative}
|
|
|
110
110
|
return this.isLoading ? null : a("div", { ref: (i) => this.stylingContainer = i, class: "GamificationDropdownContainer" }, a("button", { class: `GamificationDropdownButton ${this.isOpen ? "IsOpen" : ""}`, type: "button", onClick: (i) => this.handleDropdownClick(i), title: typeof this.loyaltyPoints == "number" ? String(this.loyaltyPoints) : m("gamificationNoPoints", this.language) }, typeof this.loyaltyPoints == "number" ? `${this.loyaltyPoints} XP` : "...", a("span", { class: this.isOpen ? "TriangleActive" : "TriangleInactive" }, a("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "6.835", viewBox: "0 0 14 6.835" }, a("path", { id: "arrow", d: "M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z", transform: "translate(-274.511 -441.088)" })))), this.isOpen && a("div", { class: "GamificationDropdown", onClick: this.navigateToGamification }, a("player-elevate-loyaltycard", { endpoint: this.endpoint, session: this.session, language: this.language, "client-styling-url": this.clientStylingUrl, "client-styling": this.clientStyling })));
|
|
111
111
|
}
|
|
112
112
|
get el() {
|
|
113
|
-
return
|
|
113
|
+
return g(this);
|
|
114
114
|
}
|
|
115
115
|
static get watchers() {
|
|
116
116
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var s=(n,a,t)=>new Promise((d,o)=>{var g=e=>{try{l(t.next(e))}catch(r){o(r)}},c=e=>{try{l(t.throw(e))}catch(r){o(r)}},l=e=>e.done?d(e.value):Promise.resolve(e.value).then(g,c);l((t=t.apply(n,a)).next())});const p=require("./index-71b1bdfa-
|
|
1
|
+
"use strict";var s=(n,a,t)=>new Promise((d,o)=>{var g=e=>{try{l(t.next(e))}catch(r){o(r)}},c=e=>{try{l(t.throw(e))}catch(r){o(r)}},l=e=>e.done?d(e.value):Promise.resolve(e.value).then(g,c);l((t=t.apply(n,a)).next())});const p=require("./index-71b1bdfa-CaHfgY-G.cjs"),y=require("./app-globals-0f993ce5-sCt45RkC.cjs");var i=typeof document!="undefined"?document.currentScript:null,u=()=>{const n=typeof document=="undefined"?require("url").pathToFileURL(__filename).href:i&&i.tagName.toUpperCase()==="SCRIPT"&&i.src||new URL("stencil/gamification-dropdown-CrMpkB52.cjs",document.baseURI).href,a={};return n!==""&&(a.resourcesUrl=new URL(".",n).href),p.promiseResolve(a)};u().then(n=>s(exports,null,function*(){return yield y.globalScripts(),p.bootstrapLazy([["gamification-dropdown_4",[[1,"gamification-dropdown",{endpoint:[513],language:[513],session:[513],mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],isOpen:[32],isLoading:[32],loyaltyPoints:[32]},null,{translationUrl:["handleNewTranslations"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}],[1,"player-elevate-loyaltycard",{endpoint:[513],theme:[513],session:[513],playerAvatarUrl:[513,"player-avatar-url"],language:[513],playerName:[513,"player-name"],dateFormat:[513,"date-format"],mbSource:[1,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],pointExpireString:[32],playerElevateLevel:[32],elevateWalletTotal:[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}],[0,"player-elevate-card-data",{params:[8],playerElevateLevel:[32],pointExpireString:[32]},[[9,"resize","handleWindowResizs"],[8,"redeemGiftButton","redeemGiftButtonHandler"]],{params:["onParamsChanged"]}],[4,"general-styling-wrapper",{clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],translationUrl:[1,"translation-url"],targetTranslations:[16]}]]],["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"]}]]],["player-rakeback-card",[[1,"player-rakeback-card",{endpoint:[513],theme:[513],session:[513],language:[513],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],show:[516],rakebackInfo:[32],isLoading:[32],coolingOffPeriod:[32],showTheWidget:[32]},[[8,"message","handleMessage"]],{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"],show:["onShowOrHasRakebackWalletChange"],rakebackInfo:["onShowOrHasRakebackWalletChange"]}]]]],n)}));
|
|
@@ -14,7 +14,7 @@ var o = (n, a, l) => new Promise((s, i) => {
|
|
|
14
14
|
}, t = (e) => e.done ? s(e.value) : Promise.resolve(e.value).then(g, p);
|
|
15
15
|
t((l = l.apply(n, a)).next());
|
|
16
16
|
});
|
|
17
|
-
import { b as d, p as y } from "./index-71b1bdfa-
|
|
17
|
+
import { b as d, p as y } from "./index-71b1bdfa-DTrMzwed.js";
|
|
18
18
|
import { g as c } from "./app-globals-0f993ce5-D-kw1sls.js";
|
|
19
19
|
var v = () => {
|
|
20
20
|
const n = import.meta.url, a = {};
|
|
@@ -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-D5R5F9LE.js";
|
|
2
|
+
import { r as u, h as i, g as I, c as M, a as m, F as $ } from "./index-71b1bdfa-ZRt5ReAy.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, g as L, t as h } from "./player-elevate-card-items-5071deed-AlJJIZWb.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;
|
|
@@ -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
|
};
|
|
@@ -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-B1IK7mlM.js";
|
|
18
|
+
import { r as u, h as i, g as P, c as $, a as b, F as O } from "./index-71b1bdfa-DTrMzwed.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, g as E, t as h } from "./player-elevate-card-items-5071deed-B3nmpFdz.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
|
};
|