@everymatrix/player-elevate-card 1.44.0 → 1.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/general-styling-wrapper_5.cjs.entry.js +649 -785
- package/dist/cjs/index-b1cf5517.js +1634 -0
- package/dist/cjs/loader.cjs.js +7 -13
- package/dist/cjs/player-elevate-card.cjs.js +17 -11
- package/dist/collection/collection-manifest.json +6 -6
- package/dist/collection/components/player-elevate-card/index.js +1 -0
- package/dist/collection/components/player-elevate-card/player-elevate-card-items.js +17 -38
- package/dist/collection/components/player-elevate-card/player-elevate-card.css +0 -1
- package/dist/collection/components/player-elevate-card/player-elevate-card.js +271 -287
- package/dist/collection/components/player-elevate-card-data/player-elevate-card-data.css +1 -1
- package/dist/collection/components/player-elevate-card-data/player-elevate-card-data.js +224 -215
- package/dist/collection/components/player-elevate-loyaltycard/player-elevate-loyaltycard.css +0 -7
- package/dist/collection/components/player-elevate-loyaltycard/player-elevate-loyaltycard.js +277 -297
- package/dist/collection/components/player-elevate-pointcard/player-elevate-pointcard.js +309 -329
- package/dist/collection/utils/locale.utils.js +133 -133
- package/dist/collection/utils/utils.js +49 -49
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/general-styling-wrapper_5.entry.js +649 -785
- package/dist/esm/index-cd7a4beb.js +1604 -0
- package/dist/esm/loader.js +7 -13
- package/dist/esm/player-elevate-card.js +14 -11
- package/dist/player-elevate-card/p-37a424ba.entry.js +1 -0
- package/dist/player-elevate-card/p-ba534fa2.js +2 -0
- package/dist/player-elevate-card/p-e1255160.js +1 -0
- package/dist/player-elevate-card/player-elevate-card.esm.js +1 -1
- package/dist/stencil.config.dev.js +17 -0
- package/dist/stencil.config.js +12 -27
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/player-elevate-card/.stencil/packages/stencil/player-elevate-card/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/player-elevate-card/.stencil/packages/stencil/player-elevate-card/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/player-elevate-card/index.d.ts +1 -0
- package/dist/types/components/player-elevate-card/player-elevate-card-items.d.ts +6 -6
- package/dist/types/components/player-elevate-card/player-elevate-card.d.ts +51 -51
- package/dist/types/components/player-elevate-card-data/player-elevate-card-data.d.ts +19 -20
- package/dist/types/components/player-elevate-loyaltycard/player-elevate-loyaltycard.d.ts +51 -51
- package/dist/types/components/player-elevate-pointcard/player-elevate-pointcard.d.ts +64 -64
- package/dist/types/components.d.ts +16 -1
- package/dist/types/models/player-elevate.d.ts +26 -26
- package/dist/types/stencil-public-runtime.d.ts +142 -33
- package/dist/types/utils/locale.utils.d.ts +6 -6
- package/loader/cdn.js +1 -3
- package/loader/index.cjs.js +1 -3
- package/loader/index.d.ts +13 -1
- package/loader/index.es2017.js +1 -3
- package/loader/index.js +1 -3
- package/loader/package.json +1 -0
- package/package.json +8 -6
- package/dist/cjs/index-b6d0684c.js +0 -1674
- package/dist/components/general-styling-wrapper.js +0 -6
- package/dist/components/general-styling-wrapper2.js +0 -103
- package/dist/components/index.d.ts +0 -26
- package/dist/components/index.js +0 -1
- package/dist/components/player-elevate-card-data.d.ts +0 -11
- package/dist/components/player-elevate-card-data.js +0 -6
- package/dist/components/player-elevate-card-data2.js +0 -635
- package/dist/components/player-elevate-card-items.js +0 -2250
- package/dist/components/player-elevate-card.d.ts +0 -11
- package/dist/components/player-elevate-card.js +0 -126
- package/dist/components/player-elevate-loyaltycard.d.ts +0 -11
- package/dist/components/player-elevate-loyaltycard.js +0 -132
- package/dist/components/player-elevate-pointcard.d.ts +0 -11
- package/dist/components/player-elevate-pointcard.js +0 -135
- package/dist/components/static/button-default.svg +0 -42
- package/dist/components/static/button-disabled.svg +0 -4
- package/dist/components/static/button-hover.svg +0 -4
- package/dist/components/static/button-level.svg +0 -27
- package/dist/components/static/button-pressed.svg +0 -18
- package/dist/components/static/button-redeem.svg +0 -36
- package/dist/components/static/card-ground-over.png +0 -0
- package/dist/components/static/card-ground-over.svg +0 -903
- package/dist/components/static/card-ground.png +0 -0
- package/dist/components/static/card-ground.svg +0 -34
- package/dist/components/static/info.svg +0 -4
- package/dist/components/static/level-badge.png +0 -0
- package/dist/components/static/level-percent.svg +0 -80
- package/dist/components/static/tips-info.svg +0 -21
- package/dist/components/static/user.svg +0 -3
- package/dist/esm/index-6beb1563.js +0 -1645
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/player-elevate-card/p-10bf1b0e.entry.js +0 -1
- package/dist/player-elevate-card/p-523c2803.js +0 -1
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/player-elevate-card/.stencil/packages/player-elevate-card/stencil.config.d.ts +0 -2
|
@@ -1,297 +1,210 @@
|
|
|
1
|
-
import { r as registerInstance, h, g as getElement, a as getAssetPath, F as Fragment, c as createEvent } from './index-
|
|
1
|
+
import { r as registerInstance, h, g as getElement, a as getAssetPath, F as Fragment, c as createEvent } from './index-cd7a4beb.js';
|
|
2
2
|
|
|
3
3
|
const mergeTranslations = (url, target) => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
4
|
+
return new Promise((resolve) => {
|
|
5
|
+
fetch(url)
|
|
6
|
+
.then((res) => res.json())
|
|
7
|
+
.then((data) => {
|
|
8
|
+
Object.keys(data).forEach((item) => {
|
|
9
|
+
target[item] = target[item] ? target[item] : {};
|
|
10
|
+
for (let key in data[item]) {
|
|
11
|
+
target[item][key] = data[item][key];
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
resolve(true);
|
|
15
|
+
});
|
|
15
16
|
});
|
|
16
|
-
});
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
const generalStylingWrapperCss = ":host{display:block}";
|
|
20
|
+
const GeneralStylingWrapperStyle0 = generalStylingWrapperCss;
|
|
20
21
|
|
|
21
22
|
const GeneralStylingWrapper = class {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
.
|
|
47
|
-
.
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
if (!this.stylingAppends) {
|
|
61
|
-
if (this.clientStyling)
|
|
62
|
-
this.setClientStyling();
|
|
63
|
-
if (this.clientStylingUrl)
|
|
64
|
-
this.setClientStylingURL();
|
|
65
|
-
this.stylingAppends = true;
|
|
66
|
-
}
|
|
67
|
-
// end custom styling area
|
|
68
|
-
}
|
|
69
|
-
async componentWillLoad() {
|
|
70
|
-
const promises = [];
|
|
71
|
-
if (this.translationUrl) {
|
|
72
|
-
const translationPromise = mergeTranslations(this.translationUrl, this.targetTranslations);
|
|
73
|
-
promises.push(translationPromise);
|
|
23
|
+
constructor(hostRef) {
|
|
24
|
+
registerInstance(this, hostRef);
|
|
25
|
+
this.stylingAppends = false;
|
|
26
|
+
this.setClientStyling = () => {
|
|
27
|
+
let sheet = document.createElement('style');
|
|
28
|
+
sheet.innerHTML = this.clientStyling;
|
|
29
|
+
this.el.prepend(sheet);
|
|
30
|
+
};
|
|
31
|
+
this.setClientStylingURL = () => {
|
|
32
|
+
let url = new URL(this.clientStylingUrl);
|
|
33
|
+
let cssFile = document.createElement('style');
|
|
34
|
+
fetch(url.href)
|
|
35
|
+
.then((res) => res.text())
|
|
36
|
+
.then((data) => {
|
|
37
|
+
cssFile.innerHTML = data;
|
|
38
|
+
setTimeout(() => {
|
|
39
|
+
this.el.prepend(cssFile);
|
|
40
|
+
}, 1);
|
|
41
|
+
})
|
|
42
|
+
.catch((err) => {
|
|
43
|
+
console.log('error ', err);
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
this.clientStyling = '';
|
|
47
|
+
this.clientStylingUrl = '';
|
|
48
|
+
this.translationUrl = '';
|
|
49
|
+
this.targetTranslations = undefined;
|
|
50
|
+
}
|
|
51
|
+
componentDidRender() {
|
|
52
|
+
// start custom styling area
|
|
53
|
+
if (!this.stylingAppends) {
|
|
54
|
+
if (this.clientStyling)
|
|
55
|
+
this.setClientStyling();
|
|
56
|
+
if (this.clientStylingUrl)
|
|
57
|
+
this.setClientStylingURL();
|
|
58
|
+
this.stylingAppends = true;
|
|
59
|
+
}
|
|
60
|
+
// end custom styling area
|
|
74
61
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
62
|
+
async componentWillLoad() {
|
|
63
|
+
const promises = [];
|
|
64
|
+
if (this.translationUrl) {
|
|
65
|
+
const translationPromise = mergeTranslations(this.translationUrl, this.targetTranslations);
|
|
66
|
+
promises.push(translationPromise);
|
|
67
|
+
}
|
|
68
|
+
return await Promise.all(promises);
|
|
69
|
+
}
|
|
70
|
+
render() {
|
|
71
|
+
return (h("div", { key: '4d3414408c7662f88331dbe655966237f74d6958', class: "StyleShell" }, h("slot", { key: '1d004644d84602c4314bdf5dfc26b55b160f57df', name: "mainContent" })));
|
|
72
|
+
}
|
|
73
|
+
get el() { return getElement(this); }
|
|
81
74
|
};
|
|
82
|
-
GeneralStylingWrapper.style =
|
|
83
|
-
|
|
84
|
-
const LoyaltyProgress = `<svg width="100%" height="28" style="opacity: 0" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
85
|
-
<rect y="12" x="2" width="100%" id="total_level" height="5" rx="2.5" fill="white" fill-opacity="0.5"/>
|
|
86
|
-
<rect y="12" x="2" id="current_level" width="64" height="5" rx="2.5" fill="white"/>
|
|
87
|
-
<g filter="url(#filter_current_level)">
|
|
88
|
-
<circle id="circle_current_level" cx="74.5" cy="14.5" r="6.5" fill="white"/>
|
|
89
|
-
</g>
|
|
90
|
-
<g filter="url(#filter_heart_ball)">
|
|
91
|
-
<g filter="url(#filter_ball)">
|
|
92
|
-
<circle cx="169" cy="14" r="10" id="lock" fill="url(#paint0_linear_ball)"/>
|
|
93
|
-
</g>
|
|
94
|
-
<g filter="url(#filter_heart)">
|
|
95
|
-
<svg x="0" y="4" id="lock_box">
|
|
96
|
-
<path d="M10.217 6.42442c-0.713,-0.574,-1.304,-1.083,-1.928,-1.622c-0.348,-0.299,-0.707,-0.611,-1.101,-0.943l-0.013,-0.01c0,0,-0.023,-0.017,-0.04,-0.027l-0.167,-0.095l-0.15,0.12c0,0,-0.015,0.012,-0.024,0.02c-0.391,0.33,-0.749,0.64,-1.094,0.939c-0.622,0.539,-1.211,1.048,-1.924,1.624c-1.816,1.463,-3.598,3.263,-3.033,5.506c0.404,1.601,2.104,2.905,3.789,2.905c0.211,0,0.423,-0.02,0.626,-0.061c0.286,-0.058,0.572,-0.145,0.864,-0.265c-0.079,0.962,-0.413,1.864,-0.881,2.369l-0.423,0.459h0.633c0.633,0,1.018,-0.007,1.356,-0.013c0.248,-0.004,0.462,-0.008,0.72,-0.008c0.335,0,0.709,0.006,1.215,0.021l0.686,0.02l-0.474,-0.483c-0.504,-0.514,-0.847,-1.403,-0.923,-2.385c0.311,0.132,0.616,0.227,0.916,0.287c0.204,0.039,0.411,0.059,0.623,0.059c1.687,0,3.386,-1.304,3.789,-2.909c0.56,-2.243,-1.224,-4.041,-3.042,-5.504v-0.004z" fill="#933CBF"/>
|
|
97
|
-
<path d="M9.727,6.98459c-1.004,-0.83,-1.741,-1.515,-2.723,-2.365c-0.002,0,-0.004,-0.004,-0.007,-0.006c-0.002,0,-0.004,0.004,-0.006,0.006c-0.98,0.85,-1.715,1.537,-2.721,2.367c-1.455,1.202,-3.126,2.821,-2.638,4.81c0.37,1.511,2.091,2.751,3.665,2.43c0.389,-0.08,0.75,-0.224,1.094,-0.402c0,0.116,-0.004,0.233,-0.012,0.353c-0.064,0.991,-0.398,1.892,-0.86,2.401c1.481,0,1.481,-0.043,2.961,0c-0.481,-0.503,-0.834,-1.382,-0.9,-2.401c-0.008,-0.127,-0.012,-0.253,-0.012,-0.378c0.357,0.19,0.733,0.342,1.14,0.425c1.574,0.319,3.292,-0.922,3.661,-2.433c0.486,-1.992,-1.189,-3.609,-2.644,
|
|
98
|
-
-4.809l0.002,0.002z" fill="url(#paint1_linear_lock)"/>
|
|
99
|
-
<path d="M9.255,7.551c-0.844,-0.716,-1.462,-1.309,-2.286,-2.045c-0.002,0,-0.004,-0.004,-0.006,-0.006c0,0,-0.004,0.004,-0.006,0.006c-0.824,0.736,-1.44,1.329,-2.284,2.047c-0.919,0.782,-1.94,1.769,-2.214,2.943c-0.115,0.021,-0.914,0.044,-0.914,0.044l0.887,0.083c-0.039,0.206,-0.055,0.418,-0.041,0.638c0.087,-1.371,1.25,-2.507,2.282,-3.384c0.844,-0.718,1.462,-1.313,2.284,-2.047c0.002,-0.002,0.004,-0.004,0.006,-0.006c0.002,0,0.004,0.004,0.006,0.004c0.824,0.734,1.442,1.329,2.286,2.045c1.034,0.879,2.198,2.013,2.286,3.386c0.093,-1.517,-1.173,-2.761,-2.286,-3.708z" fill="#9040C9"/>
|
|
100
|
-
</svg>
|
|
101
|
-
</g>
|
|
102
|
-
</g>
|
|
103
|
-
<g filter="url(#filter_lock)">
|
|
104
|
-
<svg x="100%" y="9" id="heart_box">
|
|
105
|
-
<path d="M7,6c-0.19,-0.002,-0.377,0.052,-0.534,0.154c-0.158,0.103,-0.278,0.25,-0.346,0.42c-0.069,0.171,-0.081,0.357,-0.035,0.535c0.046,0.177,0.147,0.337,0.29,0.457v0.834c0,0.159,0.066,0.312,0.183,0.424c0.117,0.113,0.276,0.176,0.442,0.176c0.166,0,0.325,-0.063,0.442,-0.176c0.117,-0.112,0.183,-0.265,0.183,-0.424v-0.834c0.143,-0.12,0.244,-0.28,0.29,-0.457c0.046,-0.178,0.034,-0.364,-0.035,-0.535c-0.068,-0.17,-0.188,-0.317,-0.346,-0.42c-0.157,-0.102,-0.344,-0.156,-0.534,-0.154zm3.125,-2.4v-1.2c0,-0.796,-0.329,-1.559,-0.915,-2.121c-0.586,-0.563,-1.381,-0.879,-2.21,-0.879c-0.829,0,-1.624,0.316,-2.21,0.879c-0.586,0.562,-0.915,1.325,-0.915,2.121v1.2c-0.497,0,-0.974,0.19,-1.326,0.527c-0.351,0.338,-0.549,0.796,-0.549,1.273v4.2c0,0.477,0.198,0.935,0.549,1.273c0.352,0.337,0.829,0.527,1.326,0.527h6.25c0.497,0,0.974,-0.19,1.326,-0.527c0.351,-0.338,0.549,-0.796,0.549,-1.273v-4.2c0,-0.477,-0.198,-0.935,-0.549,-1.273c-0.352,-0.337,-0.829,-0.527,-1.326,-0.527zm-5,-1.2c0,-0.477,0.198,-0.935,0.549,-1.273c0.352,-0.337,0.829,-0.527,1.326,-0.527c0.497,0,0.974,0.19,1.326,0.527c0.351,0.338,0.549,0.796,0.549,1.273v1.2h-3.75v-1.2zm5.625,7.2c0,0.159,-0.066,0.312,-0.183,0.424c-0.117,0.113,-0.276,0.176,-0.442,0.176h-6.25c-0.166,0,-0.325,-0.063,-0.442,-0.176c-0.117,-0.112,-0.183,-0.265,-0.183,-0.424v-4.2c0,-0.159,0.066,-0.312,0.183,-0.424c0.117,-0.113,0.276,-0.176,0.442,-0.176h6.25c0.166,0,0.325,0.063,0.442,0.176c0.117,0.112,0.183,0.265,0.183,0.424v4.2z" fill="white"/>
|
|
106
|
-
</svg>
|
|
107
|
-
</g>
|
|
108
|
-
<defs>
|
|
109
|
-
<filter id="filter_current_level" x="64" y="4" width="21" height="21" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
110
|
-
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
111
|
-
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
|
|
112
|
-
<feGaussianBlur stdDeviation="2" result="effect1_foregroundBlur_305_23"/>
|
|
113
|
-
</filter>
|
|
114
|
-
<filter id="filter_heart_ball" x="155" y="0" width="28" height="28" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
115
|
-
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
116
|
-
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
117
|
-
<feOffset/>
|
|
118
|
-
<feGaussianBlur stdDeviation="2"/>
|
|
119
|
-
<feComposite in2="hardAlpha" operator="out"/>
|
|
120
|
-
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
|
|
121
|
-
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_305_23"/>
|
|
122
|
-
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_305_23" result="shape"/>
|
|
123
|
-
</filter>
|
|
124
|
-
<filter id="filter_ball" x="159" y="4" width="20" height="21" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
125
|
-
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
126
|
-
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
|
|
127
|
-
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
128
|
-
<feOffset dy="1"/>
|
|
129
|
-
<feGaussianBlur stdDeviation="1"/>
|
|
130
|
-
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
|
|
131
|
-
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.55 0"/>
|
|
132
|
-
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_305_23"/>
|
|
133
|
-
</filter>
|
|
134
|
-
<filter id="filter_heart" x="161.636" y="5.72727" width="14.7271" height="15.6364" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
135
|
-
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
136
|
-
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
137
|
-
<feOffset/>
|
|
138
|
-
<feGaussianBlur stdDeviation="0.5"/>
|
|
139
|
-
<feComposite in2="hardAlpha" operator="out"/>
|
|
140
|
-
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
|
|
141
|
-
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_305_23"/>
|
|
142
|
-
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_305_23" result="shape"/>
|
|
143
|
-
</filter>
|
|
144
|
-
<filter id="filter_lock" x="50" y="7" width="12" height="14" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
145
|
-
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
146
|
-
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
147
|
-
<feOffset/>
|
|
148
|
-
<feGaussianBlur stdDeviation="0.5"/>
|
|
149
|
-
<feComposite in2="hardAlpha" operator="out"/>
|
|
150
|
-
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
|
|
151
|
-
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_305_23"/>
|
|
152
|
-
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_305_23" result="shape"/>
|
|
153
|
-
</filter>
|
|
154
|
-
<linearGradient id="paint0_linear_ball" x1="163" y1="6" x2="174.2" y2="22.6" gradientUnits="userSpaceOnUse">
|
|
155
|
-
<stop stop-color="#946AD7"/>
|
|
156
|
-
<stop offset="1" stop-color="#EFABEB"/>
|
|
157
|
-
</linearGradient>
|
|
158
|
-
<linearGradient id="paint1_linear_lock" x1="100%" y1="18.4056" x2="169.002" y2="10.2845" gradientUnits="userSpaceOnUse">
|
|
159
|
-
<stop stop-color="#814FD6"/>
|
|
160
|
-
<stop offset="1" stop-color="#D679D8"/>
|
|
161
|
-
</linearGradient>
|
|
162
|
-
</defs>
|
|
163
|
-
</svg>
|
|
164
|
-
`;
|
|
75
|
+
GeneralStylingWrapper.style = GeneralStylingWrapperStyle0;
|
|
76
|
+
|
|
77
|
+
const levelPercentSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIyOCIgc3R5bGU9Im9wYWNpdHk6IDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8cmVjdCB5PSIxMiIgeD0iMiIgd2lkdGg9IjEwMCUiIGlkPSJ0b3RhbF9sZXZlbCIgaGVpZ2h0PSI1IiByeD0iMi41IiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIwLjUiLz4KICAgIDxyZWN0IHk9IjEyIiAgeD0iMiIgaWQ9ImN1cnJlbnRfbGV2ZWwiIHdpZHRoPSI2NCIgaGVpZ2h0PSI1IiByeD0iMi41IiBmaWxsPSJ3aGl0ZSIvPgogIC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VuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiM4MTRGRDYiLz4KICAgICAgICAgICAgPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjRDY3OUQ4Ii8+CiAgICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KPC9zdmc+Cg==';
|
|
165
78
|
|
|
166
79
|
const DEFAULT_LANGUAGE = 'en';
|
|
167
80
|
const SUPPORTED_LANGUAGES = ['ro', 'en'];
|
|
168
81
|
const TRANSLATIONS = {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
82
|
+
en: {
|
|
83
|
+
redeem: 'Redeem',
|
|
84
|
+
expireOn: 'Expire on ',
|
|
85
|
+
pointsToBeExpired: '${expirationPoints} points to expire in ${expireDay} days',
|
|
86
|
+
pointsToBeExpiredDay: '${expirationPoints} points to expire in ${expireDay} day',
|
|
87
|
+
pointsToBeExpiredHours: '${expirationPoints} points to expire in ${expireDay} hours',
|
|
88
|
+
pointsToBeExpiredHour: '${expirationPoints} points to expire in ${expireDay} hour',
|
|
89
|
+
tipsForNextLevel: 'Need ${pointsToReach} to reach ${levelName}',
|
|
90
|
+
spendablePoints: 'Spendable Points:',
|
|
91
|
+
details: 'Details',
|
|
92
|
+
earningRules: 'Earning Rules',
|
|
93
|
+
xp: 'XP',
|
|
94
|
+
sp: 'Coins',
|
|
95
|
+
termAndConditions: 'Term & Conditions',
|
|
96
|
+
},
|
|
97
|
+
'zh-hk': {
|
|
98
|
+
redeem: '兑奖',
|
|
99
|
+
expireOn: 'Expire on ',
|
|
100
|
+
pointsToBeExpired: '${expirationPoints} points to expire in ${expireDay} days',
|
|
101
|
+
pointsToBeExpiredDay: '${expirationPoints} points to expire in ${expireDay} day',
|
|
102
|
+
pointsToBeExpiredHours: '${expirationPoints} points to expire in ${expireDay} hours',
|
|
103
|
+
pointsToBeExpiredHour: '${expirationPoints} points to expire in ${expireDay} hour',
|
|
104
|
+
tipsForNextLevel: 'Need ${pointsToReach} to reach ${levelName}',
|
|
105
|
+
spendablePoints: 'Spendable Points:',
|
|
106
|
+
details: '明细',
|
|
107
|
+
earningRules: 'Earning Rules',
|
|
108
|
+
xp: 'XP',
|
|
109
|
+
sp: 'Coins',
|
|
110
|
+
termAndConditions: 'Term & Conditions',
|
|
111
|
+
},
|
|
112
|
+
de: {
|
|
113
|
+
redeem: 'Redeem',
|
|
114
|
+
expireOn: 'Expire on ',
|
|
115
|
+
pointsToBeExpired: '${expirationPoints} points to expire in ${expireDay} days',
|
|
116
|
+
pointsToBeExpiredDay: '${expirationPoints} points to expire in ${expireDay} day',
|
|
117
|
+
pointsToBeExpiredHours: '${expirationPoints} points to expire in ${expireDay} hours',
|
|
118
|
+
pointsToBeExpiredHour: '${expirationPoints} points to expire in ${expireDay} hour',
|
|
119
|
+
tipsForNextLevel: 'Need ${pointsToReach} to reach ${levelName}',
|
|
120
|
+
spendablePoints: 'Spendable Points:',
|
|
121
|
+
details: 'Details',
|
|
122
|
+
earningRules: 'Earning Rules',
|
|
123
|
+
xp: 'XP',
|
|
124
|
+
sp: 'Coins',
|
|
125
|
+
termAndConditions: 'Term & Conditions',
|
|
126
|
+
},
|
|
127
|
+
it: {
|
|
128
|
+
redeem: 'Redeem',
|
|
129
|
+
expireOn: 'Expire on ',
|
|
130
|
+
pointsToBeExpired: '${expirationPoints} points to expire in ${expireDay} days',
|
|
131
|
+
pointsToBeExpiredDay: '${expirationPoints} points to expire in ${expireDay} day',
|
|
132
|
+
pointsToBeExpiredHours: '${expirationPoints} points to expire in ${expireDay} hours',
|
|
133
|
+
pointsToBeExpiredHour: '${expirationPoints} points to expire in ${expireDay} hour',
|
|
134
|
+
tipsForNextLevel: 'Need ${pointsToReach} to reach ${levelName}',
|
|
135
|
+
spendablePoints: 'Spendable Points:',
|
|
136
|
+
details: 'Details',
|
|
137
|
+
earningRules: 'Earning Rules',
|
|
138
|
+
xp: 'XP',
|
|
139
|
+
sp: 'Coins',
|
|
140
|
+
termAndConditions: 'Term & Conditions',
|
|
141
|
+
},
|
|
142
|
+
fr: {
|
|
143
|
+
redeem: 'Redeem',
|
|
144
|
+
expireOn: 'Expire on ',
|
|
145
|
+
pointsToBeExpired: '${expirationPoints} points to expire in ${expireDay} days',
|
|
146
|
+
pointsToBeExpiredDay: '${expirationPoints} points to expire in ${expireDay} day',
|
|
147
|
+
pointsToBeExpiredHours: '${expirationPoints} points to expire in ${expireDay} hours',
|
|
148
|
+
pointsToBeExpiredHour: '${expirationPoints} points to expire in ${expireDay} hour',
|
|
149
|
+
tipsForNextLevel: 'Need ${pointsToReach} to reach ${levelName}',
|
|
150
|
+
spendablePoints: 'Spendable Points:',
|
|
151
|
+
details: 'Details',
|
|
152
|
+
earningRules: 'Earning Rules',
|
|
153
|
+
xp: 'XP',
|
|
154
|
+
sp: 'Coins',
|
|
155
|
+
termAndConditions: 'Term & Conditions',
|
|
156
|
+
},
|
|
157
|
+
es: {
|
|
158
|
+
redeem: 'Redeem'
|
|
159
|
+
},
|
|
160
|
+
tr: {
|
|
161
|
+
redeem: 'Redeem'
|
|
162
|
+
},
|
|
163
|
+
ru: {
|
|
164
|
+
redeem: 'Redeem'
|
|
165
|
+
},
|
|
166
|
+
ro: {
|
|
167
|
+
redeem: 'Redeem'
|
|
168
|
+
},
|
|
169
|
+
hr: {
|
|
170
|
+
redeem: 'Otkupiti',
|
|
171
|
+
expireOn: 'Istječe',
|
|
172
|
+
pointsToBeExpired: '${expirationPoints} bodova ističe za ${expireDay} dana',
|
|
173
|
+
tipsForNextLevel: 'Trebate ${pointsToReach} da dosegnete razinu ${levelName}',
|
|
174
|
+
spendablePoints: 'Bodovi za potrošit:',
|
|
175
|
+
details: 'Detalji',
|
|
176
|
+
xp: 'XP',
|
|
177
|
+
},
|
|
178
|
+
hu: {
|
|
179
|
+
redeem: 'Redeem'
|
|
180
|
+
},
|
|
181
|
+
pl: {
|
|
182
|
+
redeem: 'Redeem'
|
|
183
|
+
},
|
|
184
|
+
pt: {
|
|
185
|
+
redeem: 'Redeem'
|
|
186
|
+
},
|
|
187
|
+
sl: {
|
|
188
|
+
redeem: 'Redeem'
|
|
189
|
+
},
|
|
190
|
+
sr: {
|
|
191
|
+
redeem: 'Redeem'
|
|
192
|
+
}
|
|
280
193
|
};
|
|
281
194
|
const translate = (key, customLang) => {
|
|
282
|
-
|
|
283
|
-
|
|
195
|
+
const lang = customLang;
|
|
196
|
+
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
284
197
|
};
|
|
285
198
|
const translateWithParams = (key, params) => {
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
199
|
+
const lang = params['lang'];
|
|
200
|
+
let templateString = TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
201
|
+
if (!params) {
|
|
202
|
+
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
203
|
+
}
|
|
204
|
+
Object.keys(params).forEach((paramName) => {
|
|
205
|
+
templateString = templateString.replace(new RegExp('\\$\{' + paramName + '\}', 'gm'), params[paramName]);
|
|
206
|
+
});
|
|
207
|
+
return templateString;
|
|
295
208
|
};
|
|
296
209
|
|
|
297
210
|
function _typeof(o) {
|
|
@@ -662,7 +575,7 @@ function addLeadingZeros(number, targetLength) {
|
|
|
662
575
|
*
|
|
663
576
|
* Letters marked by * are not implemented but reserved by Unicode standard.
|
|
664
577
|
*/
|
|
665
|
-
var formatters$
|
|
578
|
+
var formatters$2 = {
|
|
666
579
|
// Year
|
|
667
580
|
y: function y(date, token) {
|
|
668
581
|
// From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens
|
|
@@ -728,6 +641,7 @@ var formatters$1 = {
|
|
|
728
641
|
return addLeadingZeros(fractionalSeconds, token.length);
|
|
729
642
|
}
|
|
730
643
|
};
|
|
644
|
+
const formatters$3 = formatters$2;
|
|
731
645
|
|
|
732
646
|
var dayPeriodEnum = {
|
|
733
647
|
am: 'am',
|
|
@@ -821,7 +735,7 @@ var formatters = {
|
|
|
821
735
|
unit: 'year'
|
|
822
736
|
});
|
|
823
737
|
}
|
|
824
|
-
return formatters$
|
|
738
|
+
return formatters$3.y(date, token);
|
|
825
739
|
},
|
|
826
740
|
// Local week-numbering year
|
|
827
741
|
Y: function Y(date, token, localize, options) {
|
|
@@ -943,7 +857,7 @@ var formatters = {
|
|
|
943
857
|
switch (token) {
|
|
944
858
|
case 'M':
|
|
945
859
|
case 'MM':
|
|
946
|
-
return formatters$
|
|
860
|
+
return formatters$3.M(date, token);
|
|
947
861
|
// 1st, 2nd, ..., 12th
|
|
948
862
|
case 'Mo':
|
|
949
863
|
return localize.ordinalNumber(month + 1, {
|
|
@@ -1033,7 +947,7 @@ var formatters = {
|
|
|
1033
947
|
unit: 'date'
|
|
1034
948
|
});
|
|
1035
949
|
}
|
|
1036
|
-
return formatters$
|
|
950
|
+
return formatters$3.d(date, token);
|
|
1037
951
|
},
|
|
1038
952
|
// Day of year
|
|
1039
953
|
D: function D(date, token, localize) {
|
|
@@ -1313,7 +1227,7 @@ var formatters = {
|
|
|
1313
1227
|
unit: 'hour'
|
|
1314
1228
|
});
|
|
1315
1229
|
}
|
|
1316
|
-
return formatters$
|
|
1230
|
+
return formatters$3.h(date, token);
|
|
1317
1231
|
},
|
|
1318
1232
|
// Hour [0-23]
|
|
1319
1233
|
H: function H(date, token, localize) {
|
|
@@ -1322,7 +1236,7 @@ var formatters = {
|
|
|
1322
1236
|
unit: 'hour'
|
|
1323
1237
|
});
|
|
1324
1238
|
}
|
|
1325
|
-
return formatters$
|
|
1239
|
+
return formatters$3.H(date, token);
|
|
1326
1240
|
},
|
|
1327
1241
|
// Hour [0-11]
|
|
1328
1242
|
K: function K(date, token, localize) {
|
|
@@ -1352,7 +1266,7 @@ var formatters = {
|
|
|
1352
1266
|
unit: 'minute'
|
|
1353
1267
|
});
|
|
1354
1268
|
}
|
|
1355
|
-
return formatters$
|
|
1269
|
+
return formatters$3.m(date, token);
|
|
1356
1270
|
},
|
|
1357
1271
|
// Second
|
|
1358
1272
|
s: function s(date, token, localize) {
|
|
@@ -1361,11 +1275,11 @@ var formatters = {
|
|
|
1361
1275
|
unit: 'second'
|
|
1362
1276
|
});
|
|
1363
1277
|
}
|
|
1364
|
-
return formatters$
|
|
1278
|
+
return formatters$3.s(date, token);
|
|
1365
1279
|
},
|
|
1366
1280
|
// Fraction of second
|
|
1367
1281
|
S: function S(date, token) {
|
|
1368
|
-
return formatters$
|
|
1282
|
+
return formatters$3.S(date, token);
|
|
1369
1283
|
},
|
|
1370
1284
|
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
1371
1285
|
X: function X(date, token, _localize, options) {
|
|
@@ -1493,6 +1407,7 @@ function formatTimezone(offset, dirtyDelimiter) {
|
|
|
1493
1407
|
var minutes = addLeadingZeros(absOffset % 60, 2);
|
|
1494
1408
|
return sign + hours + delimiter + minutes;
|
|
1495
1409
|
}
|
|
1410
|
+
const formatters$1 = formatters;
|
|
1496
1411
|
|
|
1497
1412
|
var dateLongFormatter = function dateLongFormatter(pattern, formatLong) {
|
|
1498
1413
|
switch (pattern) {
|
|
@@ -1573,6 +1488,7 @@ var longFormatters = {
|
|
|
1573
1488
|
p: timeLongFormatter,
|
|
1574
1489
|
P: dateTimeLongFormatter
|
|
1575
1490
|
};
|
|
1491
|
+
const longFormatters$1 = longFormatters;
|
|
1576
1492
|
|
|
1577
1493
|
/**
|
|
1578
1494
|
* Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.
|
|
@@ -1693,6 +1609,7 @@ var formatDistance = function formatDistance(token, count, options) {
|
|
|
1693
1609
|
}
|
|
1694
1610
|
return result;
|
|
1695
1611
|
};
|
|
1612
|
+
const formatDistance$1 = formatDistance;
|
|
1696
1613
|
|
|
1697
1614
|
function buildFormatLongFn(args) {
|
|
1698
1615
|
return function () {
|
|
@@ -1736,6 +1653,7 @@ var formatLong = {
|
|
|
1736
1653
|
defaultWidth: 'full'
|
|
1737
1654
|
})
|
|
1738
1655
|
};
|
|
1656
|
+
const formatLong$1 = formatLong;
|
|
1739
1657
|
|
|
1740
1658
|
var formatRelativeLocale = {
|
|
1741
1659
|
lastWeek: "'last' eeee 'at' p",
|
|
@@ -1748,6 +1666,7 @@ var formatRelativeLocale = {
|
|
|
1748
1666
|
var formatRelative = function formatRelative(token, _date, _baseDate, _options) {
|
|
1749
1667
|
return formatRelativeLocale[token];
|
|
1750
1668
|
};
|
|
1669
|
+
const formatRelative$1 = formatRelative;
|
|
1751
1670
|
|
|
1752
1671
|
function buildLocalizeFn(args) {
|
|
1753
1672
|
return function (dirtyIndex, options) {
|
|
@@ -1909,6 +1828,7 @@ var localize = {
|
|
|
1909
1828
|
defaultFormattingWidth: 'wide'
|
|
1910
1829
|
})
|
|
1911
1830
|
};
|
|
1831
|
+
const localize$1 = localize;
|
|
1912
1832
|
|
|
1913
1833
|
function buildMatchFn(args) {
|
|
1914
1834
|
return function (string) {
|
|
@@ -2066,6 +1986,7 @@ var match = {
|
|
|
2066
1986
|
defaultParseWidth: 'any'
|
|
2067
1987
|
})
|
|
2068
1988
|
};
|
|
1989
|
+
const match$1 = match;
|
|
2069
1990
|
|
|
2070
1991
|
/**
|
|
2071
1992
|
* @type {Locale}
|
|
@@ -2078,16 +1999,17 @@ var match = {
|
|
|
2078
1999
|
*/
|
|
2079
2000
|
var locale = {
|
|
2080
2001
|
code: 'en-US',
|
|
2081
|
-
formatDistance: formatDistance,
|
|
2082
|
-
formatLong: formatLong,
|
|
2083
|
-
formatRelative: formatRelative,
|
|
2084
|
-
localize: localize,
|
|
2085
|
-
match: match,
|
|
2002
|
+
formatDistance: formatDistance$1,
|
|
2003
|
+
formatLong: formatLong$1,
|
|
2004
|
+
formatRelative: formatRelative$1,
|
|
2005
|
+
localize: localize$1,
|
|
2006
|
+
match: match$1,
|
|
2086
2007
|
options: {
|
|
2087
2008
|
weekStartsOn: 0 /* Sunday */,
|
|
2088
2009
|
firstWeekContainsDate: 1
|
|
2089
2010
|
}
|
|
2090
2011
|
};
|
|
2012
|
+
const defaultLocale = locale;
|
|
2091
2013
|
|
|
2092
2014
|
// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token
|
|
2093
2015
|
// (one of the certain letters followed by `o`)
|
|
@@ -2405,7 +2327,7 @@ function format(dirtyDate, dirtyFormatStr, options) {
|
|
|
2405
2327
|
requiredArgs(2, arguments);
|
|
2406
2328
|
var formatStr = String(dirtyFormatStr);
|
|
2407
2329
|
var defaultOptions = getDefaultOptions();
|
|
2408
|
-
var locale
|
|
2330
|
+
var locale = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : defaultLocale;
|
|
2409
2331
|
var firstWeekContainsDate = toInteger((_ref2 = (_ref3 = (_ref4 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale2 = options.locale) === null || _options$locale2 === void 0 ? void 0 : (_options$locale2$opti = _options$locale2.options) === null || _options$locale2$opti === void 0 ? void 0 : _options$locale2$opti.firstWeekContainsDate) !== null && _ref4 !== void 0 ? _ref4 : defaultOptions.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : 1);
|
|
2410
2332
|
|
|
2411
2333
|
// Test if weekStartsOn is between 1 and 7 _and_ is not NaN
|
|
@@ -2418,10 +2340,10 @@ function format(dirtyDate, dirtyFormatStr, options) {
|
|
|
2418
2340
|
if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
|
|
2419
2341
|
throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');
|
|
2420
2342
|
}
|
|
2421
|
-
if (!locale
|
|
2343
|
+
if (!locale.localize) {
|
|
2422
2344
|
throw new RangeError('locale must contain localize property');
|
|
2423
2345
|
}
|
|
2424
|
-
if (!locale
|
|
2346
|
+
if (!locale.formatLong) {
|
|
2425
2347
|
throw new RangeError('locale must contain formatLong property');
|
|
2426
2348
|
}
|
|
2427
2349
|
var originalDate = toDate(dirtyDate);
|
|
@@ -2437,14 +2359,14 @@ function format(dirtyDate, dirtyFormatStr, options) {
|
|
|
2437
2359
|
var formatterOptions = {
|
|
2438
2360
|
firstWeekContainsDate: firstWeekContainsDate,
|
|
2439
2361
|
weekStartsOn: weekStartsOn,
|
|
2440
|
-
locale: locale
|
|
2362
|
+
locale: locale,
|
|
2441
2363
|
_originalDate: originalDate
|
|
2442
2364
|
};
|
|
2443
2365
|
var result = formatStr.match(longFormattingTokensRegExp).map(function (substring) {
|
|
2444
2366
|
var firstCharacter = substring[0];
|
|
2445
2367
|
if (firstCharacter === 'p' || firstCharacter === 'P') {
|
|
2446
|
-
var longFormatter = longFormatters[firstCharacter];
|
|
2447
|
-
return longFormatter(substring, locale
|
|
2368
|
+
var longFormatter = longFormatters$1[firstCharacter];
|
|
2369
|
+
return longFormatter(substring, locale.formatLong);
|
|
2448
2370
|
}
|
|
2449
2371
|
return substring;
|
|
2450
2372
|
}).join('').match(formattingTokensRegExp).map(function (substring) {
|
|
@@ -2456,7 +2378,7 @@ function format(dirtyDate, dirtyFormatStr, options) {
|
|
|
2456
2378
|
if (firstCharacter === "'") {
|
|
2457
2379
|
return cleanEscapedString(substring);
|
|
2458
2380
|
}
|
|
2459
|
-
var formatter = formatters[firstCharacter];
|
|
2381
|
+
var formatter = formatters$1[firstCharacter];
|
|
2460
2382
|
if (formatter) {
|
|
2461
2383
|
if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(substring)) {
|
|
2462
2384
|
throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
|
|
@@ -2464,7 +2386,7 @@ function format(dirtyDate, dirtyFormatStr, options) {
|
|
|
2464
2386
|
if (!(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(substring)) {
|
|
2465
2387
|
throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
|
|
2466
2388
|
}
|
|
2467
|
-
return formatter(utcDate, substring, locale
|
|
2389
|
+
return formatter(utcDate, substring, locale.localize, formatterOptions);
|
|
2468
2390
|
}
|
|
2469
2391
|
if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
|
|
2470
2392
|
throw new RangeError('Format string contains an unescaped latin alphabet character `' + firstCharacter + '`');
|
|
@@ -2481,143 +2403,111 @@ function cleanEscapedString(input) {
|
|
|
2481
2403
|
return matched[1].replace(doubleQuoteRegExp, "'");
|
|
2482
2404
|
}
|
|
2483
2405
|
|
|
2484
|
-
const
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
<path d="M24 24C24 21.7909 25.7909 20 28 20H64V56H28C25.7909 56 24 54.2091 24 52V24Z" fill="#464646"/>
|
|
2488
|
-
<path d="M51 56H37L43.2474 63.1399C43.6458 63.5952 44.3542 63.5952 44.7526 63.1399L51 56Z" fill="#464646"/>
|
|
2489
|
-
<circle cx="44" cy="38" r="7" fill="white"/>
|
|
2490
|
-
<path d="M43.9405 34C44.5456 34 45.0362 34.4906 45.0362 35.0957C45.0362 35.7009 44.5456 36.1915 43.9405 36.1915C43.3353 36.1915 42.8447 35.7009 42.8447 35.0957C42.8447 34.4906 43.3353 34 43.9405 34Z" fill="#464646"/>
|
|
2491
|
-
<path d="M45.8801 41.3737C45.8801 41.7617 45.5626 42.0791 45.1746 42.0791H44.3233H43.551H42.7055C42.3175 42.0791 42 41.7617 42 41.3737V41.3575C42 40.9695 42.3175 40.6521 42.7055 40.6521H42.8455V37.8714H42.3528C42.1588 37.8714 42 37.7127 42 37.5187V37.4936C42 37.2996 42.1588 37.1409 42.3528 37.1409H43.551H44.031H44.3233C44.7113 37.1409 45.0287 37.4583 45.0287 37.8463V40.6521H45.1746C45.5626 40.6521 45.8801 40.9696 45.8801 41.3576V41.3737Z" fill="#464646"/>
|
|
2492
|
-
</g>
|
|
2493
|
-
<defs>
|
|
2494
|
-
<filter id="filter0_d_242_4231" x="0" y="0" width="126" height="91.4814" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
2495
|
-
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
2496
|
-
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
2497
|
-
<feOffset dy="4"/>
|
|
2498
|
-
<feGaussianBlur stdDeviation="12"/>
|
|
2499
|
-
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
|
|
2500
|
-
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_242_4231"/>
|
|
2501
|
-
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_242_4231" result="shape"/>
|
|
2502
|
-
</filter>
|
|
2503
|
-
</defs>
|
|
2504
|
-
</svg>
|
|
2505
|
-
`;
|
|
2506
|
-
|
|
2507
|
-
const PlayerLoyaltyProcess = () => (h("span", { class: "LevelProgress", id: 'LevelProgress', innerHTML: LoyaltyProgress }));
|
|
2406
|
+
const tipsInfoSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTI2IiBoZWlnaHQ9IjkyIiB2aW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IDAgMCAwIDAgMCAwIDAgMC4yNSAwIi8+CjxmZUJsZW5kIG1vZGU9Im5vcm1hbCIgaW4yPSJCYWNrZ3JvdW5kSW1hZ2VGaXgiIHJlc3VsdD0iZWZmZWN0MV9kcm9wU2hhZG93XzI0Ml80MjMxIi8+CjxmZUJsZW5kIG1vZGU9Im5vcm1hbCIgaW49IlNvdXJjZUdyYXBoaWMiIGluMj0iZWZmZWN0MV9kcm9wU2hhZG93XzI0Ml80MjMxIiByZXN1bHQ9InNoYXBlIi8+CjwvZmlsdGVyPgo8L2RlZnM+Cjwvc3ZnPgo=';
|
|
2407
|
+
|
|
2408
|
+
const PlayerLoyaltyProcess = () => (h("span", { class: "LevelProgress", id: 'LevelProgress', innerHTML: levelPercentSvg }));
|
|
2508
2409
|
const PlayerPoints = ({ loyaltyPoints, spendablePoints, pointExpireString, language, }) => (h("div", { class: "PointsInfo" },
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2410
|
+
loyaltyPoints &&
|
|
2411
|
+
h("div", { class: 'Points' },
|
|
2412
|
+
loyaltyPoints,
|
|
2413
|
+
" ",
|
|
2414
|
+
h("sub", { class: "XP" }, translate('xp', language))),
|
|
2415
|
+
spendablePoints &&
|
|
2416
|
+
h("div", { class: 'Points' },
|
|
2417
|
+
spendablePoints,
|
|
2418
|
+
" ",
|
|
2419
|
+
h("sub", { class: "XP" }, translate('sp', language))),
|
|
2420
|
+
pointExpireString && (h("div", { class: 'ExpirationPoints' },
|
|
2421
|
+
pointExpireString,
|
|
2422
|
+
" "))));
|
|
2522
2423
|
const PlayerElevateCardRedeem = ({ language, onRedeemClick }) => (h("div", { class: "CardCell Redeem" },
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2424
|
+
h("div", { class: "RedeemButton", onClick: () => {
|
|
2425
|
+
onRedeemClick();
|
|
2426
|
+
} },
|
|
2427
|
+
h("span", null, translate('redeem', language)))));
|
|
2527
2428
|
const PlayerNameDiv = (props) => (h("div", { class: 'CardCell PlayerName Txt' }, props.playerName));
|
|
2528
2429
|
const PlayerElevateLoyaltyLevel = (props) => (h("div", { class: 'CardCell ElevateLevel' },
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2430
|
+
h("span", { class: "LevelName", title: props.level }, props.level),
|
|
2431
|
+
props.expireTime && (h("div", { class: "CardCell ExpirationDate Txt" },
|
|
2432
|
+
translate('expireOn', props.language),
|
|
2433
|
+
h("span", { class: "ExpireTime" }, format(new Date(props.expireTime), props.dateFormat || 'yyyy-MM-dd')),
|
|
2434
|
+
!props.hideInfo && (h("span", { class: "fa Info", style: { 'background': `url(${getAssetPath('../static/info.svg')})` } },
|
|
2435
|
+
h("span", { class: "InfoTips", innerHTML: tipsInfoSvg })))))));
|
|
2535
2436
|
const PlayerAvatar = (props) => {
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2437
|
+
const badge = props.loyaltyIconUrl
|
|
2438
|
+
? h("img", { class: "Badge", src: props.loyaltyIconUrl })
|
|
2439
|
+
: props.hideIfNull ? '' : h("div", { class: "Badge" });
|
|
2440
|
+
const avatarSrc = props.playerAvatarUrl || getAssetPath('../static/user.svg');
|
|
2441
|
+
return h("div", { class: "PlayerAvatar", style: { 'position': `${props.onlyBadge ? '' : 'relative'}` } },
|
|
2442
|
+
!props.onlyBadge && h("img", { class: "Avatar", src: avatarSrc }),
|
|
2443
|
+
badge);
|
|
2543
2444
|
};
|
|
2544
2445
|
|
|
2545
|
-
const playerElevateCardCss = "@container (max-width: 270px) {\n .Card .Inner {\n flex-direction: column;\n }\n .Card .Inner .Content {\n padding: 9px;\n }\n
|
|
2446
|
+
const playerElevateCardCss = "@container (max-width: 270px) {\n .Card .Inner {\n flex-direction: column;\n }\n .Card .Inner .Content {\n padding: 9px;\n }\n .Inner .Row .ExpirationPoints {\n order: 1;\n }\n}\n.Card .PlayerImg {\n order: 0;\n}\n.Card .ExpirationPoints {\n order: 3;\n}\n.Card .LevelInfo {\n order: 2;\n}\n.Card .Inner .Row .PlayerImg {\n flex-direction: column;\n}\n.Card .Inner .Row .PointsInfo {\n width: 100%;\n text-align: center;\n display: flex;\n flex-direction: column;\n max-height: 50%;\n}\n.Card .Inner .PlayerAvatar .Badge {\n background-size: contain;\n background-repeat: no-repeat;\n position: absolute;\n right: 5px;\n bottom: -5px;\n width: 40%;\n height: 40%;\n overflow: visible;\n}\n.Card .Inner .Row .ExpirationPoints {\n text-align: left;\n color: var(--emfe-w-color-red, red);\n}\n.Card .Inner .Row .Points {\n text-wrap: nowrap;\n}\n.Card .Inner .LevelInfo .ElevateLevel {\n flex-direction: column;\n}\n.Card .Inner .LevelInfo .ElevateLevel .LevelName {\n width: calc(100% - 20px);\n text-align: left;\n font-size: 13px;\n padding-left: 20px;\n margin: 10px 0;\n}\n.Card .Inner .LevelInfo .ElevateLevel .ExpirationDate {\n text-align: center;\n font-size: smaller;\n}\n.Card .Inner .LevelInfo .ElevateLevel .ExpireTime {\n margin-left: 5px;\n}";
|
|
2447
|
+
const PlayerElevateCardStyle0 = playerElevateCardCss;
|
|
2546
2448
|
|
|
2547
2449
|
const PlayerElevateCard = class {
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
if (event.detail['elevateLevelWalletTotal']) {
|
|
2585
|
-
this.elevateWalletTotal = event.detail['elevateLevelWalletTotal'];
|
|
2586
|
-
}
|
|
2587
|
-
if (event.detail['elevateLevel']) {
|
|
2588
|
-
this.playerElevateLevel = event.detail['elevateLevel'];
|
|
2589
|
-
}
|
|
2590
|
-
if (event.detail['pointExpireString']) {
|
|
2591
|
-
this.pointExpireString = event.detail.xpExpireString;
|
|
2592
|
-
}
|
|
2593
|
-
if (event.detail.calculatedLevelFlag) {
|
|
2594
|
-
this.playerLevelFlag = event.detail.calculatedLevelFlag;
|
|
2450
|
+
constructor(hostRef) {
|
|
2451
|
+
registerInstance(this, hostRef);
|
|
2452
|
+
this.endpoint = undefined;
|
|
2453
|
+
this.theme = 'Dark';
|
|
2454
|
+
this.session = undefined;
|
|
2455
|
+
this.playerAvatarUrl = undefined;
|
|
2456
|
+
this.language = 'en';
|
|
2457
|
+
this.playerName = undefined;
|
|
2458
|
+
this.dateFormat = 'yyyy-MM-dd';
|
|
2459
|
+
this.clientStyling = '';
|
|
2460
|
+
this.clientStylingUrl = '';
|
|
2461
|
+
this.translationUrl = '';
|
|
2462
|
+
this.pointExpireString = undefined;
|
|
2463
|
+
this.playerLevelFlag = 0;
|
|
2464
|
+
this.playerElevateLevel = undefined;
|
|
2465
|
+
this.elevateWalletTotal = undefined;
|
|
2466
|
+
}
|
|
2467
|
+
onSessionOrEndpointChange() {
|
|
2468
|
+
this.paramProxy = Object.assign(Object.assign({}, this.paramProxy), { session: this.session, endpoint: this.endpoint, language: this.language });
|
|
2469
|
+
}
|
|
2470
|
+
playerElevateLeveLoadedHandler(event) {
|
|
2471
|
+
if (!event.detail) {
|
|
2472
|
+
return;
|
|
2473
|
+
}
|
|
2474
|
+
if (event.detail['elevateLevelWalletTotal']) {
|
|
2475
|
+
this.elevateWalletTotal = event.detail['elevateLevelWalletTotal'];
|
|
2476
|
+
}
|
|
2477
|
+
if (event.detail['elevateLevel']) {
|
|
2478
|
+
this.playerElevateLevel = event.detail['elevateLevel'];
|
|
2479
|
+
}
|
|
2480
|
+
if (event.detail['pointExpireString']) {
|
|
2481
|
+
this.pointExpireString = event.detail.xpExpireString;
|
|
2482
|
+
}
|
|
2483
|
+
if (event.detail.calculatedLevelFlag) {
|
|
2484
|
+
this.playerLevelFlag = event.detail.calculatedLevelFlag;
|
|
2485
|
+
}
|
|
2595
2486
|
}
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
}
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
}; }
|
|
2487
|
+
onRedeemClick() {
|
|
2488
|
+
window.postMessage({ type: 'BEERedeemClicked' }, window.location.href);
|
|
2489
|
+
}
|
|
2490
|
+
componentWillLoad() {
|
|
2491
|
+
this.paramProxy = {
|
|
2492
|
+
endpoint: this.endpoint,
|
|
2493
|
+
session: this.session,
|
|
2494
|
+
language: this.language,
|
|
2495
|
+
calculateLevelFlag: true,
|
|
2496
|
+
};
|
|
2497
|
+
}
|
|
2498
|
+
render() {
|
|
2499
|
+
const backgroundOuterImagePath = getAssetPath('../static/card-ground.svg');
|
|
2500
|
+
const backgroundInnerImagePath = getAssetPath('../static/card-ground-over.svg');
|
|
2501
|
+
return (h("div", { key: '278a328dd084ee73b2707b93a57bccae64a2c9c7', class: `ElevateCardWrapper ${this.theme}` }, h("div", { key: '68c885baf533447a7c77fd887bbec11e53768277', class: "Card Outer", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, h("general-styling-wrapper", { key: '4066253a70cdd5e712ca244a708e7c1600c83071', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl }), h("player-elevate-card-data", { key: '64cda2a267c752056b3c7e3134cc324fa96bc261', params: this.paramProxy }), h("div", { key: 'c63ae83b401a35f5a78acd83dc3d7296c25141d7', class: "OuterCover Inner", style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, this.playerElevateLevel && (h(Fragment, { key: 'ba16e5bb54259c17fd9e5aa0e3c03c2ec5d4263c' }, h("div", { key: 'fa1bf74f45e28318c95266cc42c54541bde92718', class: 'Content Row' }, h("div", { key: '7ede46f91bcc0d894b2b633627a4ca97d15fbe90', class: "PlayerImg" }, h(PlayerAvatar, { key: 'b6d0bac085e0178512b8a63ba8fccae7d4cc8399', playerAvatarUrl: this.playerAvatarUrl, loyaltyIconUrl: this.playerElevateLevel.presentation.asset }), h(PlayerPoints, { key: '88c445dbcd7dbe426a8de18beea02aecc03e26f3', loyaltyPoints: this.playerElevateLevel.loyaltyPoints, language: this.language })), this.pointExpireString && (h("div", { key: '4d985e486ecb74a6c916b28e619de83cb3d77ac1', class: 'PointsInfo ExpirationPoints' }, this.pointExpireString, " ")), h("div", { key: '34e051ee1ff79b825fca57db958e1e5684a0aca1', class: `LevelInfo Level${this.playerLevelFlag} ${this.playerElevateLevel.presentation.displayName}` }, h(PlayerNameDiv, { key: 'fa1b1f16e0b25c6adfba4c215e4ed377e05699b2', playerName: this.playerName }), h(PlayerElevateLoyaltyLevel, { key: '6d18b1422db202363ebcd56cc56946e0e071937b', hideInfo: true, level: this.playerElevateLevel.name, expireTime: this.playerElevateLevel.expireTime, dateFormat: this.dateFormat }), h(PlayerLoyaltyProcess, { key: '7dae355c4a5a9e28c70dced0ac061608f1753020' }), h(PlayerElevateCardRedeem, { key: '7e5f830b612c962a828c58f20a88dc97d315c910', onRedeemClick: this.onRedeemClick, language: this.language })))))))));
|
|
2502
|
+
}
|
|
2503
|
+
static get assetsDirs() { return ["../static"]; }
|
|
2504
|
+
static get watchers() { return {
|
|
2505
|
+
"session": ["onSessionOrEndpointChange"],
|
|
2506
|
+
"endpoint": ["onSessionOrEndpointChange"],
|
|
2507
|
+
"language": ["onSessionOrEndpointChange"]
|
|
2508
|
+
}; }
|
|
2619
2509
|
};
|
|
2620
|
-
PlayerElevateCard.style =
|
|
2510
|
+
PlayerElevateCard.style = PlayerElevateCardStyle0;
|
|
2621
2511
|
|
|
2622
2512
|
/**
|
|
2623
2513
|
* @name startOfDay
|
|
@@ -2804,386 +2694,360 @@ function isBefore(dirtyDate, dirtyDateToCompare) {
|
|
|
2804
2694
|
}
|
|
2805
2695
|
|
|
2806
2696
|
function updateProgressSvg(progressElementRef, percent) {
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2697
|
+
const svgElement = progressElementRef.querySelector('#total_level');
|
|
2698
|
+
const endLockWidth = 17, pointR = 6.5;
|
|
2699
|
+
//Total Widget of the progress
|
|
2700
|
+
const barWidth = svgElement.getBBox().width;
|
|
2701
|
+
//The filled width according to current progress
|
|
2702
|
+
const levelPercent = percent > 1 ? 1 : percent;
|
|
2703
|
+
const widthOnBar = (levelPercent * barWidth - endLockWidth) < 0 ? 0 : levelPercent * barWidth - endLockWidth;
|
|
2704
|
+
//update bar's width, widthOnBar
|
|
2705
|
+
const levelBar = progressElementRef.querySelector('#current_level');
|
|
2706
|
+
//update filters, x = widthOnBar
|
|
2707
|
+
const levelFilter = progressElementRef.querySelector('#filter_current_level');
|
|
2708
|
+
//update circle, widthOnBar+10
|
|
2709
|
+
const levelCircle = progressElementRef.querySelector('#circle_current_level');
|
|
2710
|
+
svgElement.setAttribute('viewbox', `0 0 ${widthOnBar} 28`);
|
|
2711
|
+
levelBar.setAttribute('width', `${widthOnBar}`);
|
|
2712
|
+
levelCircle.setAttribute('cx', `${(widthOnBar < pointR ? pointR : widthOnBar)}`);
|
|
2713
|
+
levelFilter.setAttribute('x', `${widthOnBar - 8}`);
|
|
2714
|
+
//update lock location
|
|
2715
|
+
const endLockElement = progressElementRef.querySelector('#lock');
|
|
2716
|
+
// wrapper of endLock, include ball and heatfilter1_d_305_23
|
|
2717
|
+
const filter1 = progressElementRef.querySelector('#filter_heart_ball');
|
|
2718
|
+
// ball in endlockfilter2_i_305_23
|
|
2719
|
+
const filter2 = progressElementRef.querySelector('#filter_ball');
|
|
2720
|
+
// heart in endlockfilter3_d_305_23
|
|
2721
|
+
const filter3 = progressElementRef.querySelector('#filter_heart');
|
|
2722
|
+
//wrapper of lockfilter4_d_305_23
|
|
2723
|
+
const filterLock = progressElementRef.querySelector('#filter_lock');
|
|
2724
|
+
// shadow of ball paint0_linear_305_23
|
|
2725
|
+
const paint0 = progressElementRef.querySelector('#paint0_linear_ball');
|
|
2726
|
+
//paint in lockpaint1_linear_305_23
|
|
2727
|
+
const paint1 = progressElementRef.querySelector('#paint1_linear_lock');
|
|
2728
|
+
// box of lock and heart, for move position dynamically
|
|
2729
|
+
const lockBox = progressElementRef.querySelector('#lock_box');
|
|
2730
|
+
const heartBox = progressElementRef.querySelector('#heart_box');
|
|
2731
|
+
const rightPaddingOfLockWidth = 10, cxOfEndLockEle = barWidth - rightPaddingOfLockWidth;
|
|
2732
|
+
//set cx of lockElement
|
|
2733
|
+
endLockElement.setAttribute('cx', `${cxOfEndLockEle}`);
|
|
2734
|
+
//set cx of sub Elements
|
|
2735
|
+
paint1.setAttribute('x1', `${cxOfEndLockEle}`);
|
|
2736
|
+
paint1.setAttribute('x2', `${cxOfEndLockEle}`);
|
|
2737
|
+
paint0.setAttribute('x1', `${cxOfEndLockEle - 6}`);
|
|
2738
|
+
paint0.setAttribute('x2', `${cxOfEndLockEle - 6 + 11.2}`);
|
|
2739
|
+
filterLock.setAttribute('x', `${cxOfEndLockEle - 6}`);
|
|
2740
|
+
filter3.setAttribute('x', `${cxOfEndLockEle - 6 - 2}`);
|
|
2741
|
+
filter2.setAttribute('x', `${cxOfEndLockEle - 6 - 2 - 2}`);
|
|
2742
|
+
filter1.setAttribute('x', `${cxOfEndLockEle - 6 - 2 - 2 - 4}`);
|
|
2743
|
+
lockBox.setAttribute('x', `${cxOfEndLockEle - 6}`);
|
|
2744
|
+
heartBox.setAttribute('x', `${cxOfEndLockEle - 6}`);
|
|
2745
|
+
svgElement.parentElement.style.opacity = '1';
|
|
2856
2746
|
}
|
|
2857
2747
|
|
|
2858
|
-
const playerElevateCardDataCss = ":host {\n display: block;\n width: 360px;\n height: 230px;\n}\n\n.ElevateCardWrapper {\n contain: layout inline-size;\n width: 100%;\n height: fit-content;\n min-height: 218px;\n}\n\n.Outer {\n container-type: inline-size;\n font-size: 12px;\n background-size: cover;\n background-repeat: no-repeat;\n line-height: initial;\n width: 100%;\n height: 100%;\n}\n\n.Dark {\n color: var(--emfe-w-color-gray150, #efefef);\n}\n\n.Light {\n color: var(--emfe-w-color-black, #0e0e0e);\n}\n\n@container (min-width: 381px) {\n .Outer {\n background-size: cover;\n }\n .Outer .OuterCover {\n min-height: 190px;\n }\n}\n@container (min-width: 260px) {\n .Outer {\n background-size: contain;\n }\n}\n.OuterCover {\n width: 100%;\n height: 100%;\n content: \"\";\n background-repeat: no-repeat;\n background-size: cover;\n border-radius: 15px;\n}\n\n.Inner {\n display: flex;\n flex-direction: column;\n min-height: 158px;\n}\n.Inner .Content {\n padding: 15px;\n flex-wrap: wrap;\n gap: 8px;\n}\n.Inner .Row {\n display: flex;\n flex-direction: row;\n}\n.Inner .CardCell {\n display: flex;\n}\n.Inner .LevelProgress svg {\n transition: opacity 0.4s;\n}\n.Inner .LevelInfo {\n display: flex;\n flex-direction: column;\n}\n.Inner .LevelInfo .ElevateLevel .LevelName {\n height: 28px;\n border-radius: 5px;\n line-height: 28px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.Inner .LevelInfo.Level0 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level0button-shadow, rgba(191, 84, 6, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level0-bg0, #E2792C) 0%, var(--emfe-w-elevate-color-level0-bg1, rgba(242, 151, 99, 0)) 100%);\n}\n.Inner .LevelInfo.Level1 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level1button-shadow, rgba(151, 151, 151, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level1-bg0, #BEBFED) 0%, var(--emfe-w-elevate-color-level1-bg1, rgba(216, 217, 233, 0)) 100%);\n}\n.Inner .LevelInfo.Level2 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level2button-shadow, rgba(191, 120, 6, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level2-bg0, #FCC410) 0%, var(--emfe-w-elevate-color-level2-bg1, rgba(255, 189, 43, 0)) 100%);\n}\n.Inner .LevelInfo.Level3 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level3button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level3-bg0, #B1A2DB) 0%, var(--emfe-w-elevate-color-level3-bg1, rgba(203, 202, 245, 0)) 100%);\n}\n.Inner .LevelInfo.Level4 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level4button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level4-bg0, #B1A2DB) 0%, var(--emfe-w-elevate-color-level4-bg1, rgba(203, 202, 245, 0)) 100%);\n}\n.Inner .LevelInfo .ElevateLevel {\n display: flex;\n}\n.Inner .LevelInfo {\n flex: 1;\n flex-grow: 1;\n min-width: 150px;\n}\n.Inner .PlayerImg {\n width: 29%;\n margin: auto;\n max-width: 100px;\n min-width: 30px;\n order: 0;\n}\n.Inner .PlayerAvatar {\n max-width: 100px;\n flex-basis: 100px;\n height: auto;\n margin: auto;\n padding-top: 10px;\n}\n.Inner .PlayerAvatar .Avatar, .Inner .PlayerAvatar .Badge {\n width: 100%;\n height: 100%;\n}\n.Inner .PlayerAvatar .Avatar {\n border-radius: 50%;\n background-size: contain;\n background-repeat: no-repeat;\n}\n.Inner .ElevateLevel .ExpirationDate {\n max-width: 138px;\n min-width: 118px;\n}\n.Inner .PlayerName, .Inner .RedeemButton, .Inner .ElevateLevel {\n text-transform: capitalize;\n width: 100%;\n}\n.Inner .PlayerName {\n font-size: 16px;\n}\n.Inner .Row .PointsInfo {\n display: table;\n font-weight: 600;\n}\n.Inner .Row .Redeem {\n justify-content: flex-end;\n margin-left: auto;\n}\n.Inner .Row .Redeem:hover {\n color: var(--emfe-w-elevate-color-redeem-hover, #00ABA4);\n cursor: pointer;\n}\n.Inner .Row .RedeemButton:hover span {\n color: var(emfe-w-elevate-color-redeem-text-hover, #f1f1f1);\n font-weight: bold;\n}\n.Inner .Row .RedeemButton {\n width: 95px;\n height: 35px;\n display: flex;\n align-items: center;\n border-radius: 10px;\n background: var(--emfe-w-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%);\n box-shadow: 0px 4px 4px 0px
|
|
2748
|
+
const playerElevateCardDataCss = ":host {\n display: block;\n width: 360px;\n height: 230px;\n}\n\n.ElevateCardWrapper {\n contain: layout inline-size;\n width: 100%;\n height: fit-content;\n min-height: 218px;\n}\n\n.Outer {\n container-type: inline-size;\n font-size: 12px;\n background-size: cover;\n background-repeat: no-repeat;\n line-height: initial;\n width: 100%;\n height: 100%;\n}\n\n.Dark {\n color: var(--emfe-w-color-gray150, #efefef);\n}\n\n.Light {\n color: var(--emfe-w-color-black, #0e0e0e);\n}\n\n@container (min-width: 381px) {\n .Outer {\n background-size: cover;\n }\n .Outer .OuterCover {\n min-height: 190px;\n }\n}\n@container (min-width: 260px) {\n .Outer {\n background-size: contain;\n }\n}\n.OuterCover {\n width: 100%;\n height: 100%;\n content: \"\";\n background-repeat: no-repeat;\n background-size: cover;\n border-radius: 15px;\n}\n\n.Inner {\n display: flex;\n flex-direction: column;\n min-height: 158px;\n}\n.Inner .Content {\n padding: 15px;\n flex-wrap: wrap;\n gap: 8px;\n}\n.Inner .Row {\n display: flex;\n flex-direction: row;\n}\n.Inner .CardCell {\n display: flex;\n}\n.Inner .LevelProgress svg {\n transition: opacity 0.4s;\n}\n.Inner .LevelInfo {\n display: flex;\n flex-direction: column;\n}\n.Inner .LevelInfo .ElevateLevel .LevelName {\n height: 28px;\n border-radius: 5px;\n line-height: 28px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.Inner .LevelInfo.Level0 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level0button-shadow, rgba(191, 84, 6, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level0-bg0, #E2792C) 0%, var(--emfe-w-elevate-color-level0-bg1, rgba(242, 151, 99, 0)) 100%);\n}\n.Inner .LevelInfo.Level1 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level1button-shadow, rgba(151, 151, 151, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level1-bg0, #BEBFED) 0%, var(--emfe-w-elevate-color-level1-bg1, rgba(216, 217, 233, 0)) 100%);\n}\n.Inner .LevelInfo.Level2 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level2button-shadow, rgba(191, 120, 6, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level2-bg0, #FCC410) 0%, var(--emfe-w-elevate-color-level2-bg1, rgba(255, 189, 43, 0)) 100%);\n}\n.Inner .LevelInfo.Level3 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level3button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level3-bg0, #B1A2DB) 0%, var(--emfe-w-elevate-color-level3-bg1, rgba(203, 202, 245, 0)) 100%);\n}\n.Inner .LevelInfo.Level4 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level4button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level4-bg0, #B1A2DB) 0%, var(--emfe-w-elevate-color-level4-bg1, rgba(203, 202, 245, 0)) 100%);\n}\n.Inner .LevelInfo .ElevateLevel {\n display: flex;\n}\n.Inner .LevelInfo {\n flex: 1;\n flex-grow: 1;\n min-width: 150px;\n}\n.Inner .PlayerImg {\n width: 29%;\n margin: auto;\n max-width: 100px;\n min-width: 30px;\n order: 0;\n}\n.Inner .PlayerAvatar {\n max-width: 100px;\n flex-basis: 100px;\n height: auto;\n margin: auto;\n padding-top: 10px;\n}\n.Inner .PlayerAvatar .Avatar, .Inner .PlayerAvatar .Badge {\n width: 100%;\n height: 100%;\n}\n.Inner .PlayerAvatar .Avatar {\n border-radius: 50%;\n background-size: contain;\n background-repeat: no-repeat;\n}\n.Inner .ElevateLevel .ExpirationDate {\n max-width: 138px;\n min-width: 118px;\n}\n.Inner .PlayerName, .Inner .RedeemButton, .Inner .ElevateLevel {\n text-transform: capitalize;\n width: 100%;\n}\n.Inner .PlayerName {\n font-size: 16px;\n}\n.Inner .Row .PointsInfo {\n display: table;\n font-weight: 600;\n}\n.Inner .Row .Redeem {\n justify-content: flex-end;\n margin-left: auto;\n}\n.Inner .Row .Redeem:hover {\n color: var(--emfe-w-elevate-color-redeem-hover, #00ABA4);\n cursor: pointer;\n}\n.Inner .Row .RedeemButton:hover span {\n color: var(emfe-w-elevate-color-redeem-text-hover, #f1f1f1);\n font-weight: bold;\n}\n.Inner .Row .RedeemButton {\n width: 95px;\n height: 35px;\n display: flex;\n align-items: center;\n border-radius: 10px;\n background: var(--emfe-w-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%);\n box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.2509803922);\n}\n.Inner .Row .RedeemButton span {\n color: var(--emfe-w-color-white, #fff);\n line-height: 18px;\n font-size: 15px;\n text-align: center;\n width: 100%;\n}\n.Inner .Row .Points {\n font-size: large;\n vertical-align: middle;\n}\n.Inner .Row .Points .XP {\n font-size: x-small;\n}\n.Inner .Row .ExpirationPoints {\n font-size: small;\n text-align: right;\n font-weight: bold;\n color: var(--emfe-w-color-red, #9e595f);\n}";
|
|
2749
|
+
const PlayerElevateCardDataStyle0 = playerElevateCardDataCss;
|
|
2859
2750
|
|
|
2860
2751
|
const PlayerElevateCardData = class {
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
}
|
|
2900
|
-
walletTotalInfo.aboutToExpire.sort((expire1, expire2) => {
|
|
2901
|
-
return isBefore(new Date(expire1.expireTime), new Date(expire2.expireTime))
|
|
2902
|
-
? -1
|
|
2903
|
-
: 1;
|
|
2904
|
-
});
|
|
2905
|
-
const aboutToExpire = walletTotalInfo.aboutToExpire[0];
|
|
2906
|
-
const daysToExpried = differenceInCalendarDays(new Date(aboutToExpire.expireTime), new Date());
|
|
2907
|
-
let hoursToExpired = 0, expiredTranslationKey = daysToExpried === 0 ? 'pointsToBeExpiredDay' : 'pointsToBeExpired';
|
|
2908
|
-
if (daysToExpried == 0) {
|
|
2909
|
-
hoursToExpired = differenceInHours(new Date(aboutToExpire.expireTime), new Date());
|
|
2910
|
-
expiredTranslationKey = hoursToExpired > 1 ? 'pointsToBeExpiredHours' : 'pointsToBeExpiredHour';
|
|
2911
|
-
}
|
|
2912
|
-
pointExpireInfoAsString = translateWithParams(expiredTranslationKey, {
|
|
2913
|
-
expirationPoints: aboutToExpire.points,
|
|
2914
|
-
expireDay: daysToExpried,
|
|
2915
|
-
});
|
|
2916
|
-
return pointExpireInfoAsString;
|
|
2917
|
-
}
|
|
2918
|
-
loadPlayerLevelInfo() {
|
|
2919
|
-
let url = new URL(`${this.params.endpoint}/v1/elevate/playerInfo?language=${this.params.language}`);
|
|
2920
|
-
return new Promise((resolve, reject) => {
|
|
2921
|
-
return fetch(url.href, {
|
|
2922
|
-
method: 'GET',
|
|
2923
|
-
headers: {
|
|
2924
|
-
'X-Sessionid': this.params.session,
|
|
2925
|
-
'Content-Type': 'application/json',
|
|
2926
|
-
},
|
|
2927
|
-
})
|
|
2928
|
-
.then((res) => res.json())
|
|
2929
|
-
.then((res) => {
|
|
2930
|
-
var _a, _b, _c;
|
|
2931
|
-
if (!res.success) {
|
|
2932
|
-
console.error('Exception when fetch user elevateinfo, ', res.errorCode, res.errorMessage);
|
|
2933
|
-
reject(true);
|
|
2934
|
-
return;
|
|
2752
|
+
constructor(hostRef) {
|
|
2753
|
+
registerInstance(this, hostRef);
|
|
2754
|
+
this.playerElevateLeveLoaded = createEvent(this, "playerElevateLeveLoaded", 7);
|
|
2755
|
+
this.params = undefined;
|
|
2756
|
+
this.playerElevateLevel = undefined;
|
|
2757
|
+
this.pointExpireString = undefined;
|
|
2758
|
+
}
|
|
2759
|
+
handleWindowResizs() {
|
|
2760
|
+
this.initLevelProgressbar();
|
|
2761
|
+
}
|
|
2762
|
+
onParamsChanged() {
|
|
2763
|
+
this.loadElevateInfo();
|
|
2764
|
+
}
|
|
2765
|
+
onRedeemClick() {
|
|
2766
|
+
window.postMessage({ type: 'BEERedeemClicked' }, window.location.href);
|
|
2767
|
+
}
|
|
2768
|
+
loadLevels() {
|
|
2769
|
+
let url = new URL(`${this.params.endpoint}/v1/elevate/levels?language=${this.params.language}`);
|
|
2770
|
+
return new Promise((resolve, reject) => {
|
|
2771
|
+
return fetch(url.href, {
|
|
2772
|
+
method: 'GET',
|
|
2773
|
+
})
|
|
2774
|
+
.then((res) => res.json())
|
|
2775
|
+
.then((res) => {
|
|
2776
|
+
this.levels = res.data;
|
|
2777
|
+
resolve(true);
|
|
2778
|
+
})
|
|
2779
|
+
.catch((err) => {
|
|
2780
|
+
reject(err);
|
|
2781
|
+
});
|
|
2782
|
+
});
|
|
2783
|
+
}
|
|
2784
|
+
calcuatePointsToBeExpired(walletTotalInfo) {
|
|
2785
|
+
let pointExpireInfoAsString = '';
|
|
2786
|
+
if (!walletTotalInfo || !walletTotalInfo.aboutToExpire ||
|
|
2787
|
+
walletTotalInfo.aboutToExpire.length == 0 ||
|
|
2788
|
+
walletTotalInfo.aboutToExpire[0].points <= 0) {
|
|
2789
|
+
return pointExpireInfoAsString;
|
|
2935
2790
|
}
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
this.playerElevateLeveLoaded.emit({ elevateLevel: this.playerElevateLevel });
|
|
2941
|
-
const spendableTotal = (_b = res.data.spendableWallet) === null || _b === void 0 ? void 0 : _b.total;
|
|
2942
|
-
const loyaltyWalletTotal = (_c = res.data.loyaltyWallet) === null || _c === void 0 ? void 0 : _c.total;
|
|
2943
|
-
this.playerElevateLeveLoaded.emit({
|
|
2944
|
-
elevateLevelWalletTotal: spendableTotal,
|
|
2945
|
-
loyaltyWalletTotal
|
|
2791
|
+
walletTotalInfo.aboutToExpire.sort((expire1, expire2) => {
|
|
2792
|
+
return isBefore(new Date(expire1.expireTime), new Date(expire2.expireTime))
|
|
2793
|
+
? -1
|
|
2794
|
+
: 1;
|
|
2946
2795
|
});
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
});
|
|
2796
|
+
const aboutToExpire = walletTotalInfo.aboutToExpire[0];
|
|
2797
|
+
const daysToExpried = differenceInCalendarDays(new Date(aboutToExpire.expireTime), new Date());
|
|
2798
|
+
let hoursToExpired = 0, expiredTranslationKey = daysToExpried === 0 ? 'pointsToBeExpiredDay' : 'pointsToBeExpired';
|
|
2799
|
+
if (daysToExpried == 0) {
|
|
2800
|
+
hoursToExpired = differenceInHours(new Date(aboutToExpire.expireTime), new Date());
|
|
2801
|
+
expiredTranslationKey = hoursToExpired > 1 ? 'pointsToBeExpiredHours' : 'pointsToBeExpiredHour';
|
|
2954
2802
|
}
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
2803
|
+
pointExpireInfoAsString = translateWithParams(expiredTranslationKey, {
|
|
2804
|
+
expirationPoints: aboutToExpire.points,
|
|
2805
|
+
expireDay: daysToExpried,
|
|
2806
|
+
});
|
|
2807
|
+
return pointExpireInfoAsString;
|
|
2808
|
+
}
|
|
2809
|
+
loadPlayerLevelInfo() {
|
|
2810
|
+
let url = new URL(`${this.params.endpoint}/v1/elevate/playerInfo?language=${this.params.language}`);
|
|
2811
|
+
return new Promise((resolve, reject) => {
|
|
2812
|
+
return fetch(url.href, {
|
|
2813
|
+
method: 'GET',
|
|
2814
|
+
headers: {
|
|
2815
|
+
'X-Sessionid': this.params.session,
|
|
2816
|
+
'Content-Type': 'application/json',
|
|
2817
|
+
},
|
|
2818
|
+
})
|
|
2819
|
+
.then((res) => res.json())
|
|
2820
|
+
.then((res) => {
|
|
2821
|
+
var _a, _b, _c;
|
|
2822
|
+
if (!res.success) {
|
|
2823
|
+
console.error('Exception when fetch user elevateinfo, ', res.errorCode, res.errorMessage);
|
|
2824
|
+
reject(true);
|
|
2825
|
+
return;
|
|
2826
|
+
}
|
|
2827
|
+
let playerElevateInfo = res.data;
|
|
2828
|
+
this.playerElevateLevel = playerElevateInfo.level;
|
|
2829
|
+
this.playerElevateLevel.name = this.playerElevateLevel.presentation.displayName || this.playerElevateLevel.name;
|
|
2830
|
+
this.playerElevateLevel.spendablePoints = ((_a = playerElevateInfo.spendableWallet) === null || _a === void 0 ? void 0 : _a.total.points) || 0;
|
|
2831
|
+
this.playerElevateLeveLoaded.emit({ elevateLevel: this.playerElevateLevel });
|
|
2832
|
+
const spendableTotal = (_b = res.data.spendableWallet) === null || _b === void 0 ? void 0 : _b.total;
|
|
2833
|
+
const loyaltyWalletTotal = (_c = res.data.loyaltyWallet) === null || _c === void 0 ? void 0 : _c.total;
|
|
2834
|
+
this.playerElevateLeveLoaded.emit({
|
|
2835
|
+
elevateLevelWalletTotal: spendableTotal,
|
|
2836
|
+
loyaltyWalletTotal
|
|
2837
|
+
});
|
|
2838
|
+
let spExpireInfoAsString = this.calcuatePointsToBeExpired(spendableTotal);
|
|
2839
|
+
let xpExpireInfoAsString = this.calcuatePointsToBeExpired(loyaltyWalletTotal);
|
|
2840
|
+
if (spExpireInfoAsString || xpExpireInfoAsString) {
|
|
2841
|
+
this.playerElevateLeveLoaded.emit({
|
|
2842
|
+
pointExpireString: spExpireInfoAsString,
|
|
2843
|
+
xpExpireString: xpExpireInfoAsString
|
|
2844
|
+
});
|
|
2845
|
+
}
|
|
2846
|
+
resolve(this.playerElevateLevel);
|
|
2847
|
+
})
|
|
2848
|
+
.catch((err) => {
|
|
2849
|
+
console.log('error ', err);
|
|
2850
|
+
reject(true);
|
|
2851
|
+
});
|
|
2852
|
+
});
|
|
2853
|
+
}
|
|
2854
|
+
setLoyaltyProgress(percent) {
|
|
2855
|
+
updateProgressSvg(this.loyaltyProgressEle, percent);
|
|
2856
|
+
}
|
|
2857
|
+
initLevelProgressbar() {
|
|
2858
|
+
setTimeout(() => {
|
|
2859
|
+
this.loyaltyProgressEle =
|
|
2860
|
+
this.elevateCardRef.parentElement.querySelector('#LevelProgress');
|
|
2861
|
+
if (!this.loyaltyProgressEle) {
|
|
2862
|
+
return;
|
|
2863
|
+
}
|
|
2864
|
+
this.setLoyaltyProgress(!this.playerElevateLevel.nextLevel
|
|
2865
|
+
? 1 : (this.playerElevateLevel.loyaltyPoints / this.playerElevateLevel.nextLevel.entryPoints));
|
|
2866
|
+
this.params['playerElevateLevel'] = this.playerElevateLevel;
|
|
2867
|
+
}, 80);
|
|
2868
|
+
}
|
|
2869
|
+
componentDidRender() {
|
|
2870
|
+
this.initLevelProgressbar();
|
|
2871
|
+
}
|
|
2872
|
+
loadElevateInfo() {
|
|
2873
|
+
if (!this.params.endpoint || !this.params.session) {
|
|
2874
|
+
return;
|
|
3004
2875
|
}
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
2876
|
+
const promises = [];
|
|
2877
|
+
promises.push(this.loadPlayerLevelInfo());
|
|
2878
|
+
if (this.params.calculateLevelFlag) {
|
|
2879
|
+
promises.push(this.loadLevels());
|
|
2880
|
+
}
|
|
2881
|
+
Promise.all(promises).then((res) => {
|
|
2882
|
+
console.log('elevate-init', res);
|
|
2883
|
+
this.initLevelProgressbar();
|
|
2884
|
+
if (!this.levels) {
|
|
2885
|
+
return;
|
|
2886
|
+
}
|
|
2887
|
+
this.levels.sort((level1, level2) => {
|
|
2888
|
+
return level1.firstEntryPoints > level2.firstEntryPoints ? 1 : -1;
|
|
2889
|
+
});
|
|
2890
|
+
const playerPoints = this.playerElevateLevel.loyaltyPoints;
|
|
2891
|
+
let playerLevelNumber = 0;
|
|
2892
|
+
this.levels.forEach((elevateLevel, idx) => {
|
|
2893
|
+
if (playerPoints > elevateLevel.firstEntryPoints) {
|
|
2894
|
+
playerLevelNumber = idx;
|
|
2895
|
+
}
|
|
2896
|
+
});
|
|
2897
|
+
this.playerElevateLeveLoaded.emit({
|
|
2898
|
+
calculatedLevelFlag: playerLevelNumber,
|
|
2899
|
+
});
|
|
2900
|
+
});
|
|
2901
|
+
}
|
|
2902
|
+
componentWillLoad() {
|
|
2903
|
+
this.loadElevateInfo();
|
|
2904
|
+
}
|
|
2905
|
+
get elevateCardRef() { return getElement(this); }
|
|
2906
|
+
static get watchers() { return {
|
|
2907
|
+
"params": ["onParamsChanged"]
|
|
2908
|
+
}; }
|
|
3018
2909
|
};
|
|
3019
|
-
PlayerElevateCardData.style =
|
|
2910
|
+
PlayerElevateCardData.style = PlayerElevateCardDataStyle0;
|
|
3020
2911
|
|
|
3021
|
-
const playerElevateLoyaltycardCss = ":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{width:100%}.LoyaltyCard .Inner .Row .PointsInfo.ExpirationPoints{text-align:left;color:var(--emfe-w-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(--emfe-w-elevate-fontsize-2xlarge, 21px);position:relative;width:auto;color:var(--emfe-w-elevate-color-levelname, #FFBD2B);font-weight:bold}.LoyaltyCard .
|
|
2912
|
+
const playerElevateLoyaltycardCss = ":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{width:100%}.LoyaltyCard .Inner .Row .PointsInfo.ExpirationPoints{text-align:left;color:var(--emfe-w-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(--emfe-w-elevate-fontsize-2xlarge, 21px);position:relative;width:auto;color:var(--emfe-w-elevate-color-levelname, #FFBD2B);font-weight:bold}.LoyaltyCard .NextLevelTip{text-align:right;font-size:11px;color:var(--emfe-w-color-black, #000);opacity:0.8;font-weight:bold}";
|
|
2913
|
+
const PlayerElevateLoyaltycardStyle0 = playerElevateLoyaltycardCss;
|
|
3022
2914
|
|
|
3023
2915
|
const PlayerElevateLoyaltycard = class {
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
if (!event.detail) {
|
|
3057
|
-
return;
|
|
3058
|
-
}
|
|
3059
|
-
if (event.detail['elevateLevelWalletTotal']) {
|
|
3060
|
-
this.elevateWalletTotal = event.detail['elevateLevelWalletTotal'];
|
|
3061
|
-
}
|
|
3062
|
-
if (event.detail['elevateLevel']) {
|
|
3063
|
-
this.playerElevateLevel = event.detail['elevateLevel'];
|
|
3064
|
-
}
|
|
3065
|
-
if (event.detail['pointExpireString']) {
|
|
3066
|
-
this.pointExpireString = event.detail.xpExpireString;
|
|
3067
|
-
}
|
|
3068
|
-
}
|
|
3069
|
-
onRedeemClick() {
|
|
3070
|
-
window.postMessage({ type: 'BEERedeemClicked' }, window.location.href);
|
|
3071
|
-
}
|
|
3072
|
-
componentWillLoad() {
|
|
3073
|
-
this.paramProxy = {
|
|
3074
|
-
endpoint: this.endpoint,
|
|
3075
|
-
session: this.session,
|
|
3076
|
-
language: this.language,
|
|
3077
|
-
};
|
|
3078
|
-
}
|
|
3079
|
-
getNextLevelTips() {
|
|
3080
|
-
var _a;
|
|
3081
|
-
//need xx to reach Diamond
|
|
3082
|
-
let nextLevel = (_a = this.playerElevateLevel) === null || _a === void 0 ? void 0 : _a.nextLevel;
|
|
3083
|
-
if (this.playerElevateLevel && nextLevel) {
|
|
3084
|
-
const pointsToReach = (nextLevel.entryPoints - this.playerElevateLevel.loyaltyPoints).toFixed(2);
|
|
3085
|
-
return translateWithParams('tipsForNextLevel', {
|
|
3086
|
-
pointsToReach,
|
|
3087
|
-
levelName: nextLevel.name,
|
|
3088
|
-
});
|
|
2916
|
+
constructor(hostRef) {
|
|
2917
|
+
registerInstance(this, hostRef);
|
|
2918
|
+
this.endpoint = undefined;
|
|
2919
|
+
this.theme = 'Dark';
|
|
2920
|
+
this.session = undefined;
|
|
2921
|
+
this.playerAvatarUrl = undefined;
|
|
2922
|
+
this.language = 'en';
|
|
2923
|
+
this.playerName = undefined;
|
|
2924
|
+
this.dateFormat = 'yyyy-MM-dd';
|
|
2925
|
+
this.clientStyling = '';
|
|
2926
|
+
this.clientStylingUrl = '';
|
|
2927
|
+
this.translationUrl = '';
|
|
2928
|
+
this.pointExpireString = undefined;
|
|
2929
|
+
this.playerElevateLevel = undefined;
|
|
2930
|
+
this.elevateWalletTotal = undefined;
|
|
2931
|
+
}
|
|
2932
|
+
onSessionOrEndpointChange() {
|
|
2933
|
+
this.paramProxy = Object.assign(Object.assign({}, this.paramProxy), { session: this.session, endpoint: this.endpoint, language: this.language });
|
|
2934
|
+
}
|
|
2935
|
+
playerElevateLeveLoadedHandler(event) {
|
|
2936
|
+
if (!event.detail) {
|
|
2937
|
+
return;
|
|
2938
|
+
}
|
|
2939
|
+
if (event.detail['elevateLevelWalletTotal']) {
|
|
2940
|
+
this.elevateWalletTotal = event.detail['elevateLevelWalletTotal'];
|
|
2941
|
+
}
|
|
2942
|
+
if (event.detail['elevateLevel']) {
|
|
2943
|
+
this.playerElevateLevel = event.detail['elevateLevel'];
|
|
2944
|
+
}
|
|
2945
|
+
if (event.detail['pointExpireString']) {
|
|
2946
|
+
this.pointExpireString = event.detail.xpExpireString;
|
|
2947
|
+
}
|
|
3089
2948
|
}
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
2949
|
+
onRedeemClick() {
|
|
2950
|
+
window.postMessage({ type: 'BEERedeemClicked' }, window.location.href);
|
|
2951
|
+
}
|
|
2952
|
+
componentWillLoad() {
|
|
2953
|
+
this.paramProxy = {
|
|
2954
|
+
endpoint: this.endpoint,
|
|
2955
|
+
session: this.session,
|
|
2956
|
+
language: this.language,
|
|
2957
|
+
};
|
|
2958
|
+
}
|
|
2959
|
+
getNextLevelTips() {
|
|
2960
|
+
var _a;
|
|
2961
|
+
//need xx to reach Diamond
|
|
2962
|
+
let nextLevel = (_a = this.playerElevateLevel) === null || _a === void 0 ? void 0 : _a.nextLevel;
|
|
2963
|
+
if (this.playerElevateLevel && nextLevel) {
|
|
2964
|
+
const pointsToReach = (nextLevel.entryPoints - this.playerElevateLevel.loyaltyPoints).toFixed(2);
|
|
2965
|
+
return translateWithParams('tipsForNextLevel', {
|
|
2966
|
+
pointsToReach,
|
|
2967
|
+
levelName: nextLevel.name,
|
|
2968
|
+
});
|
|
2969
|
+
}
|
|
2970
|
+
return '';
|
|
2971
|
+
}
|
|
2972
|
+
render() {
|
|
2973
|
+
const backgroundOuterImagePath = getAssetPath('../static/card-ground.svg');
|
|
2974
|
+
const backgroundInnerImagePath = getAssetPath('../static/card-ground-over.svg');
|
|
2975
|
+
return (h("div", { key: 'd32d09786bf66e0abef026482e7ea04a53c051b1', class: `ElevateCardWrapper ${this.theme}` }, h("div", { key: 'dd2685eb840341b8823f24db9b72d0f6b7d340ae', class: "LoyaltyCard Outer", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, h("general-styling-wrapper", { key: '3e2a00d1697c89441a8254cb81c6dc72e5b9f534', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl }), h("player-elevate-card-data", { key: '56221e6d50df3b09c4269000637818009807c994', params: this.paramProxy }), h("div", { key: 'f11201024b280d6beb2ce1978ebfa7f2c7c59678', class: 'OuterCover Inner', style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, h("div", { key: '948a023268fad3945b5069686eb29312111042a2', class: 'Content Row' }, this.playerElevateLevel && (h(Fragment, { key: 'de7c52faa07386949ce1ca728968534922e9d880' }, h("div", { key: '7c1a0c6ea5dbe7ee2375813b3819efa61e283232', class: "PlayerImg" }, h(PlayerAvatar, { key: '70ae13ee168c6de7bf4618f6ab8761462c8812b2', onlyBadge: true, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), h("div", { key: 'c11f916999b52e43e04ee472b0f54691012409a5', class: `LevelInfo ${this.playerElevateLevel.name}` }, h(PlayerElevateLoyaltyLevel, { key: '6aa61d117b24f9abbee9c5d33e882d6f023f205b', hideInfo: true, level: this.playerElevateLevel.name, expireTime: this.playerElevateLevel.expireTime, dateFormat: this.dateFormat }), h(PlayerPoints, { key: '7cc02e34d4682c25095dbf6a3077b314410d8093', loyaltyPoints: this.playerElevateLevel.loyaltyPoints, language: this.language }), this.pointExpireString && (h("div", { key: '793e388644891e15b32e003ac8914e57e758e86b', class: 'PointsInfo ExpirationPoints' }, this.pointExpireString, " ")), h(PlayerLoyaltyProcess, { key: 'a4f6c3b9f9cd5e8c6a025c26154702f9495bbe5b' }), h("div", { key: 'd91eda0f963ba9ffd481237f4b16bd4ef638d25e', class: "NextLevelTip" }, this.getNextLevelTips())))))))));
|
|
2976
|
+
}
|
|
2977
|
+
static get watchers() { return {
|
|
2978
|
+
"session": ["onSessionOrEndpointChange"],
|
|
2979
|
+
"endpoint": ["onSessionOrEndpointChange"],
|
|
2980
|
+
"language": ["onSessionOrEndpointChange"]
|
|
2981
|
+
}; }
|
|
3102
2982
|
};
|
|
3103
|
-
PlayerElevateLoyaltycard.style =
|
|
2983
|
+
PlayerElevateLoyaltycard.style = PlayerElevateLoyaltycardStyle0;
|
|
3104
2984
|
|
|
3105
2985
|
const playerElevatePointcardCss = ":host{display:block}.PointsCard .Inner .Row .ExpirationPoints{text-align:left}.PointsCard .Inner .PlayerAvatar .Avatar{display:none}.PointsCard .Inner .PlayerAvatar .Badge{border-radius:50%;background-size:contain;width:100%;height:100%;position:inherit}.PointsCard .Inner .PointsTxt{display:flex;flex-direction:row;justify-content:space-between}.PointsCard .Inner .DetailButton{background:linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%), linear-gradient(0deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.6));border-radius:5px;box-shadow:0px 4px 4px 0px rgba(0, 0, 0, 0.25);border:2px solid;font-size:11px;width:108px;padding:4px;cursor:pointer;margin-top:5px;height:16px;min-width:45px;text-align:center}.PointsCard .Inner .DetailButton span{color:var(--emfe-w-color-gray-150, #6D6D6D)}.PointsCard .Inner .DetailButton span{display:inline-block;vertical-align:middle}.PointsCard .Inner .DetailButton:hover span{color:var(--emfe-w-color-gray-150, #6D6D6D)}.PointsCard .Inner .LevelInfo{gap:15px;width:70%}.PointsCard .Inner .LevelInfo .PointsTxt{font-size:15px}.PointsCard .Inner .LevelInfo .PointsTxt.Label{display:none}.PointsCard .Inner .LevelInfo .PointsTxt.SPPoints{padding-top:15px}.PointsCard .Inner .LevelInfo .PointsTxt .TC{font-size:x-small;color:var(--emw--color-gray-300, #58586B);display:flex;align-content:center;height:100%;flex-wrap:wrap;text-decoration:underline;cursor:pointer;display:none}";
|
|
2986
|
+
const PlayerElevatePointcardStyle0 = playerElevatePointcardCss;
|
|
3106
2987
|
|
|
3107
2988
|
const PlayerElevatePointcard = class {
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
onSessionOrEndpointChange() {
|
|
3146
|
-
this.paramProxy = Object.assign(Object.assign({}, this.paramProxy), { session: this.session, endpoint: this.endpoint, language: this.language });
|
|
3147
|
-
}
|
|
3148
|
-
playerElevateLeveLoadedHandler(event) {
|
|
3149
|
-
if (!event.detail) {
|
|
3150
|
-
return;
|
|
3151
|
-
}
|
|
3152
|
-
if (event.detail['elevateLevelWalletTotal']) {
|
|
3153
|
-
this.elevateWalletTotal = event.detail['elevateLevelWalletTotal'];
|
|
3154
|
-
this.elevateSPTotal = event.detail['loyaltyWalletTotal'];
|
|
3155
|
-
}
|
|
3156
|
-
if (event.detail['elevateLevel']) {
|
|
3157
|
-
this.playerElevateLevel = event.detail['elevateLevel'];
|
|
3158
|
-
}
|
|
3159
|
-
if (event.detail['pointExpireString']) {
|
|
3160
|
-
this.pointExpireString = event.detail.pointExpireString;
|
|
2989
|
+
constructor(hostRef) {
|
|
2990
|
+
registerInstance(this, hostRef);
|
|
2991
|
+
this.isPointDetailCard = this.buttonType === 'earningRule';
|
|
2992
|
+
this.endpoint = undefined;
|
|
2993
|
+
this.theme = 'Dark';
|
|
2994
|
+
this.session = undefined;
|
|
2995
|
+
this.playerAvatarUrl = undefined;
|
|
2996
|
+
this.language = 'en';
|
|
2997
|
+
this.playerName = undefined;
|
|
2998
|
+
this.cardTitle = undefined;
|
|
2999
|
+
this.buttonType = 'earningRule';
|
|
3000
|
+
this.dateFormat = 'yyyy-MM-dd';
|
|
3001
|
+
this.clientStyling = '';
|
|
3002
|
+
this.clientStylingUrl = '';
|
|
3003
|
+
this.translationUrl = '';
|
|
3004
|
+
this.pointExpireString = undefined;
|
|
3005
|
+
this.playerElevateLevel = undefined;
|
|
3006
|
+
this.elevateWalletTotal = undefined;
|
|
3007
|
+
this.elevateSPTotal = undefined;
|
|
3008
|
+
}
|
|
3009
|
+
onSessionOrEndpointChange() {
|
|
3010
|
+
this.paramProxy = Object.assign(Object.assign({}, this.paramProxy), { session: this.session, endpoint: this.endpoint, language: this.language });
|
|
3011
|
+
}
|
|
3012
|
+
playerElevateLeveLoadedHandler(event) {
|
|
3013
|
+
if (!event.detail) {
|
|
3014
|
+
return;
|
|
3015
|
+
}
|
|
3016
|
+
if (event.detail['elevateLevelWalletTotal']) {
|
|
3017
|
+
this.elevateWalletTotal = event.detail['elevateLevelWalletTotal'];
|
|
3018
|
+
this.elevateSPTotal = event.detail['loyaltyWalletTotal'];
|
|
3019
|
+
}
|
|
3020
|
+
if (event.detail['elevateLevel']) {
|
|
3021
|
+
this.playerElevateLevel = event.detail['elevateLevel'];
|
|
3022
|
+
}
|
|
3023
|
+
if (event.detail['pointExpireString']) {
|
|
3024
|
+
this.pointExpireString = event.detail.pointExpireString;
|
|
3025
|
+
}
|
|
3161
3026
|
}
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
}
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
}; }
|
|
3027
|
+
onDetailsClick() {
|
|
3028
|
+
window.postMessage({ type: this.isPointDetailCard ? 'BEEPointRulesClicked' : 'BEEDetailsClicked',
|
|
3029
|
+
path: this.isPointDetailCard ? 'player-elevate-level' : 'player-elevate-point-details' }, window.location.href);
|
|
3030
|
+
}
|
|
3031
|
+
componentWillLoad() {
|
|
3032
|
+
this.paramProxy = {
|
|
3033
|
+
endpoint: this.endpoint,
|
|
3034
|
+
session: this.session,
|
|
3035
|
+
language: this.language,
|
|
3036
|
+
};
|
|
3037
|
+
}
|
|
3038
|
+
render() {
|
|
3039
|
+
const backgroundOuterImagePath = getAssetPath('../static/card-ground.svg');
|
|
3040
|
+
const backgroundInnerImagePath = getAssetPath('../static/card-ground-over.svg');
|
|
3041
|
+
return (h("div", { key: '13461fc9cf8b777337a539c15da4bb2781f5a837', class: `ElevateCardWrapper ${this.theme}` }, h("div", { key: '526e72c0ada871f74ba4a07f0a125bc25840c09c', class: "PointsCard Outer ", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, h("general-styling-wrapper", { key: '95e358ceb8fa3c247660f7ca15a4684b132874be', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl }), h("player-elevate-card-data", { key: '24c765d743446ac597a9dcc9cd22515e7e39e6db', params: this.paramProxy }), h("div", { key: '309db4bbfc244a7fb97827774d9d4383109ca0d7', class: 'OuterCover Inner', style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, h("div", { key: '9d5614ded2f73b505e60900675a7d95b3cfbcbc6', class: 'Content Row' }, this.playerElevateLevel && (h(Fragment, { key: '9a17e809083e61aad19f7ffef5d5ee5885ae8b4d' }, h("div", { key: '47068df3c0070ee2785b0d0201b08766fe0d71e8', class: "PlayerImg" }, h(PlayerAvatar, { key: '40115f8b190d871c85f9531fbf0bafb8fbd739e2', onlyBadge: true, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), h("div", { key: '278cd70c23ecb48655e90810af570ce5366d13d5', class: `LevelInfo ${this.playerElevateLevel.name}` }, h("div", { key: 'ce682ff881c5b12ed0b736ffcc67ad07b3713999', class: "PointsTxt Label" }, this.cardTitle ? this.cardTitle : translate('spendablePoints')), h("div", { key: 'eeebc5c468cf6e3d566f708fd47a19956ad9defe', class: 'PointsTxt SPPoints' }, h(PlayerPoints, { key: 'ad58990b7fa789cf2d5c524191447196e97c8a16', spendablePoints: this.playerElevateLevel.spendablePoints, language: this.language }), h("a", { key: '0dbdd6cd84e1cb43dac4485f4e3eec3130d6c65c', class: "TC", onClick: () => {
|
|
3042
|
+
this.onDetailsClick();
|
|
3043
|
+
} }, translate('termAndConditions', this.language))), this.pointExpireString && (h("div", { key: '45c3267d390995fabe34974913adf97b112cf8c2', class: 'ExpirationPoints' }, this.pointExpireString, " "))))))))));
|
|
3044
|
+
}
|
|
3045
|
+
static get watchers() { return {
|
|
3046
|
+
"session": ["onSessionOrEndpointChange"],
|
|
3047
|
+
"endpoint": ["onSessionOrEndpointChange"],
|
|
3048
|
+
"language": ["onSessionOrEndpointChange"]
|
|
3049
|
+
}; }
|
|
3186
3050
|
};
|
|
3187
|
-
PlayerElevatePointcard.style =
|
|
3051
|
+
PlayerElevatePointcard.style = PlayerElevatePointcardStyle0;
|
|
3188
3052
|
|
|
3189
3053
|
export { GeneralStylingWrapper as general_styling_wrapper, PlayerElevateCard as player_elevate_card, PlayerElevateCardData as player_elevate_card_data, PlayerElevateLoyaltycard as player_elevate_loyaltycard, PlayerElevatePointcard as player_elevate_pointcard };
|