@everymatrix/casino-engagement-suite-modal-container 1.52.6 → 1.53.10
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/casino-engagement-suite-modal-container/casino-engagement-suite-modal-container.esm.js +1 -1
- package/dist/casino-engagement-suite-modal-container/p-6aa0de4d.js +2 -0
- package/dist/casino-engagement-suite-modal-container/p-d29ac3f0.entry.js +1 -0
- package/dist/cjs/casino-engagement-suite-modal-container.cjs.js +2 -2
- package/dist/cjs/casino-engagement-suite-modal_2.cjs.entry.js +38 -24
- package/dist/cjs/{index-abe824ad.js → index-54ab4402.js} +162 -67
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/casino-engagement-suite-modal-container/casino-engagement-suite-modal-container.js +30 -12
- package/dist/collection/utils/locale.utils.js +3 -1
- package/dist/esm/casino-engagement-suite-modal-container.js +3 -3
- package/dist/esm/casino-engagement-suite-modal_2.entry.js +38 -24
- package/dist/esm/{index-6c6d5eed.js → index-579ab8d9.js} +162 -67
- package/dist/esm/loader.js +2 -2
- package/package.json +1 -1
- package/dist/casino-engagement-suite-modal-container/p-4bda3963.entry.js +0 -1
- package/dist/casino-engagement-suite-modal-container/p-9bc17463.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-579ab8d9.js';
|
|
2
2
|
|
|
3
3
|
const casinoEngagementSuiteModalCss = ":host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer;touch-action:manipulation}button:focus{outline:none}.EngagementSuiteIconButton{width:24px;height:24px}.EngagementSuiteIconButton.Close{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/close.svg) no-repeat}.ModalOverlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);justify-content:center;align-items:center;z-index:1}.ModalOverlay.Open{display:flex}.IconCloseContainer{width:100%;display:flex;justify-content:end}.ModalBodyWrapper{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden}.ModalBodyWrapper::-webkit-scrollbar{width:3px;background:none}.ModalBodyWrapper::-webkit-scrollbar-thumb{border-radius:var(--emw--border-radius-small, 4px);background-color:var(--emw--color-gray-transparency-30, rgba(255, 255, 255, 0.3))}.ModalContent{display:flex;flex-direction:column;align-items:center;font-family:var(--emw--font-family-secondary, \"Montserrat\", sans-serif);position:relative;color:var(--emw--color-typography, #FFFFFF);background-color:var(--emw--color-background, #1E1638);padding:24px;border-radius:var(--emw--border-radius-large, 8px);width:450px;max-width:100%;text-align:center;max-height:90dvh}.GradientBorder::before{content:\"\";position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;border-radius:var(--emw--border-radius-large, 9px);background:linear-gradient(143.2deg, #FF9401 -0.41%, #FFD32D 45.61%, #FF9401 82.77%);z-index:-1}.ModalHeader h1{font-weight:var(--emw--font-weight-semibold, 600);font-size:var(--emw--font-size-large-plus, 24px);padding:0 16px;margin-bottom:16px}.ModalIcon{width:44px;height:44px;border-radius:50%;background-size:cover;margin:12px 0}.ModalBody{font-size:var(--emw--font-size-medium, 16px);font-weight:var(--emw--font-weight-normal, 400);color:var(--emw--color-secondary, #BBB9C3);padding:0 16px}.ModalFooter{margin-top:40px;margin-bottom:28px;padding:0 16px;width:100%}@keyframes rotate{100%{transform:rotate(1turn)}}.ModalOverlay .ModalWinAnimation{display:none}.ModalOverlay.ShowAnimation .ModalWinAnimation{display:block;position:absolute;width:100%;height:100%;inset:0;background:center/550px url(https://static.everymatrix.com/gic/img/engagement-suite/light.svg) no-repeat, center/550px url(https://static.everymatrix.com/gic/img/engagement-suite/win.svg) no-repeat;animation:6s rotate linear infinite}.ModalOverlay.Mobile .EngagementSuiteIconButton{width:16px;height:16px}.ModalOverlay.Mobile .ModalBody{font-size:var(--emw--font-size-small, 14px)}.ModalOverlay.Mobile .ModalContent{width:318px;padding:12px}.ModalOverlay.Mobile .ModalHeader h1{font-size:var(--emw--font-size-large, 20px);padding:0 60px}.ModalOverlay.Mobile.ShowAnimation .ModalWinAnimation{background-size:400px}";
|
|
4
4
|
const CasinoEngagementSuiteModalStyle0 = casinoEngagementSuiteModalCss;
|
|
@@ -7,6 +7,20 @@ const CasinoEngagementSuiteModal = class {
|
|
|
7
7
|
constructor(hostRef) {
|
|
8
8
|
registerInstance(this, hostRef);
|
|
9
9
|
this.closeModal = createEvent(this, "closeModal", 7);
|
|
10
|
+
/**
|
|
11
|
+
* Client custom styling via string
|
|
12
|
+
*/
|
|
13
|
+
this.clientStyling = '';
|
|
14
|
+
/**
|
|
15
|
+
* Client custom styling via url
|
|
16
|
+
*/
|
|
17
|
+
this.clientStylingUrl = '';
|
|
18
|
+
this.device = 'Mobile';
|
|
19
|
+
/**
|
|
20
|
+
* Show win animation
|
|
21
|
+
*/
|
|
22
|
+
this.showAnimation = false;
|
|
23
|
+
this.limitStylingAppends = false;
|
|
10
24
|
this.handleCloseClick = () => {
|
|
11
25
|
if (this.isLoading)
|
|
12
26
|
return;
|
|
@@ -30,16 +44,6 @@ const CasinoEngagementSuiteModal = class {
|
|
|
30
44
|
console.log('Error ', err);
|
|
31
45
|
});
|
|
32
46
|
};
|
|
33
|
-
this.clientStyling = '';
|
|
34
|
-
this.clientStylingUrl = '';
|
|
35
|
-
this.isOpen = undefined;
|
|
36
|
-
this.isLoading = undefined;
|
|
37
|
-
this.header = undefined;
|
|
38
|
-
this.contentIcon = undefined;
|
|
39
|
-
this.modalType = undefined;
|
|
40
|
-
this.device = 'Mobile';
|
|
41
|
-
this.showAnimation = false;
|
|
42
|
-
this.limitStylingAppends = false;
|
|
43
47
|
}
|
|
44
48
|
componentDidRender() {
|
|
45
49
|
if (!this.limitStylingAppends && this.host) {
|
|
@@ -84,7 +88,9 @@ const TRANSLATIONS = {
|
|
|
84
88
|
tryOtherGames: 'Try winning Missions as rewards or launching other booster games',
|
|
85
89
|
tooltip: 'Mission where your real money bets contribute towards the level progress to achieve the level reward',
|
|
86
90
|
jackpotWin: 'Total Jackpot Win!',
|
|
87
|
-
jackpotWinInfo: 'Please refresh game page or place any bet to update game balance'
|
|
91
|
+
jackpotWinInfo: 'Please refresh game page or place any bet to update game balance',
|
|
92
|
+
seeYouLater: 'See you later',
|
|
93
|
+
noSpinsLeft: 'You used all spins here',
|
|
88
94
|
}
|
|
89
95
|
};
|
|
90
96
|
const translate = (key, customLang) => {
|
|
@@ -104,6 +110,25 @@ const CasinoEngagementSuiteModalContainer = class {
|
|
|
104
110
|
constructor(hostRef) {
|
|
105
111
|
registerInstance(this, hostRef);
|
|
106
112
|
this.closeModal = createEvent(this, "closeModal", 7);
|
|
113
|
+
/**
|
|
114
|
+
* Client custom styling via string
|
|
115
|
+
*/
|
|
116
|
+
this.clientStyling = '';
|
|
117
|
+
/**
|
|
118
|
+
* Client custom styling via url
|
|
119
|
+
*/
|
|
120
|
+
this.clientStylingUrl = '';
|
|
121
|
+
/**
|
|
122
|
+
* Language of the widget
|
|
123
|
+
*/
|
|
124
|
+
this.language = 'en';
|
|
125
|
+
this.device = 'Mobile';
|
|
126
|
+
this.limitStylingAppends = false;
|
|
127
|
+
this.openModals = [];
|
|
128
|
+
this.rewardMessage = '';
|
|
129
|
+
this.hasError = false;
|
|
130
|
+
this.confirmationData = null;
|
|
131
|
+
this.winAmount = { amount: 0, currency: '' };
|
|
107
132
|
this.handleCloseClick = (e) => {
|
|
108
133
|
const type = e.currentTarget.getAttribute('data-type');
|
|
109
134
|
this.closeModal.emit(type);
|
|
@@ -135,17 +160,6 @@ const CasinoEngagementSuiteModalContainer = class {
|
|
|
135
160
|
this.isModalOpen = (type) => {
|
|
136
161
|
return Boolean(this.openModals.find(el => el === type));
|
|
137
162
|
};
|
|
138
|
-
this.clientStyling = '';
|
|
139
|
-
this.clientStylingUrl = '';
|
|
140
|
-
this.language = 'en';
|
|
141
|
-
this.isJoiningToChallenge = undefined;
|
|
142
|
-
this.device = 'Mobile';
|
|
143
|
-
this.limitStylingAppends = false;
|
|
144
|
-
this.openModals = [];
|
|
145
|
-
this.rewardMessage = '';
|
|
146
|
-
this.hasError = false;
|
|
147
|
-
this.confirmationData = null;
|
|
148
|
-
this.winAmount = { amount: 0, currency: '' };
|
|
149
163
|
}
|
|
150
164
|
openModalHandler(event) {
|
|
151
165
|
const { modalType, rewardMessage, hasError, confirmationData, winAmount } = event.detail;
|
|
@@ -188,7 +202,7 @@ const CasinoEngagementSuiteModalContainer = class {
|
|
|
188
202
|
translate('joinConfirm', this.language) :
|
|
189
203
|
translate('unJoinConfirm', this.language)), h("button", { key: 'e01e434afa2e1129c325042a37b1ac76be5a28c7', class: `ModalFooterButtonOutlined ${this.isJoiningToChallenge ? 'Disabled' : ''}`, onClick: this.handleCloseClick, "data-type": 'TARGET_MODAL' }, h("div", { key: '622d587b43206691f4f67b7f13c18f4187560b15', class: 'GradientText' }, ProgressToActivate ?
|
|
190
204
|
translate('joinReject', this.language) :
|
|
191
|
-
translate('unJoinReject', this.language))))), h("casino-engagement-suite-modal", { key: '8310ae114d8eefd5d91fb07c5d7cca34c70bffa3', clientStylingUrl: this.clientStylingUrl, isOpen: this.isModalOpen("SUPPORT_MODAL"), header: translate('noReward', this.language), contentIcon: "https://static.everymatrix.com/gic/img/engagement-suite/alert.svg", modalType: "SUPPORT_MODAL", device: this.device }, h("div", { key: 'f6cc0be359c4cdbe0c2a3dd3ff3dbfb0841e65fe', slot: "body" }, h("span", { key: 'd4229846b65de554ba68c2c4545e2ac1fcc4fabe' }, translate('contactSupport', this.language))), h("div", { key: '55a91614a32feca8f3ea613b2ea27bb0f37145e9', slot: "footer" }, h("button", { key: '9ea26fa1b55d7fe1201e460c11ec46e8ea673240', class: 'ModalFooterButton', onClick: this.handleCloseClick, "data-type": 'SUPPORT_MODAL' }, translate('okContinue', this.language))))));
|
|
205
|
+
translate('unJoinReject', this.language))))), h("casino-engagement-suite-modal", { key: '8310ae114d8eefd5d91fb07c5d7cca34c70bffa3', clientStylingUrl: this.clientStylingUrl, isOpen: this.isModalOpen("SUPPORT_MODAL"), header: translate('noReward', this.language), contentIcon: "https://static.everymatrix.com/gic/img/engagement-suite/alert.svg", modalType: "SUPPORT_MODAL", device: this.device }, h("div", { key: 'f6cc0be359c4cdbe0c2a3dd3ff3dbfb0841e65fe', slot: "body" }, h("span", { key: 'd4229846b65de554ba68c2c4545e2ac1fcc4fabe' }, translate('contactSupport', this.language))), h("div", { key: '55a91614a32feca8f3ea613b2ea27bb0f37145e9', slot: "footer" }, h("button", { key: '9ea26fa1b55d7fe1201e460c11ec46e8ea673240', class: 'ModalFooterButton', onClick: this.handleCloseClick, "data-type": 'SUPPORT_MODAL' }, translate('okContinue', this.language)))), h("casino-engagement-suite-modal", { key: 'd4e5b152a9599c3464d2f810dc2795cd482c1a1d', clientStylingUrl: this.clientStylingUrl, isOpen: this.isModalOpen("NO_SPIN_LEFT_MODAL"), header: translate('noSpinsLeft', this.language), contentIcon: "https://static.everymatrix.com/gic/img/engagement-suite/cup-reward.svg", modalType: "NO_SPIN_LEFT_MODAL", "show-animation": false, device: this.device }, h("div", { key: 'ad796a55fe5078c31a595c0bd98787594cd58bec', slot: "body" }, h("div", { key: '256ec7b9f143778c02e33e37a28b0d26c7ae2fa0' }, translate('seeYouLater', this.language))), h("div", { key: '0c861dd0e84b81730a3c56338ac38007b19cb70e', slot: "footer" }, h("button", { key: '1ecd10f264a158b58a6e7d5db900175dcd36e65d', class: 'ModalFooterButton', onClick: this.handleCloseClick, "data-type": 'NO_SPIN_LEFT_MODAL' }, "OK")))));
|
|
192
206
|
}
|
|
193
207
|
get host() { return getElement(this); }
|
|
194
208
|
};
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
const NAMESPACE = 'casino-engagement-suite-modal-container';
|
|
2
|
-
const BUILD = /* casino-engagement-suite-modal-container */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: true, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: false };
|
|
2
|
+
const BUILD = /* casino-engagement-suite-modal-container */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: true, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: false };
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
|
-
Stencil Client Platform v4.
|
|
5
|
+
Stencil Client Platform v4.25.1 | MIT Licensed | https://stenciljs.com
|
|
6
6
|
*/
|
|
7
7
|
var __defProp = Object.defineProperty;
|
|
8
8
|
var __export = (target, all) => {
|
|
9
9
|
for (var name in all)
|
|
10
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
11
|
};
|
|
12
|
+
|
|
13
|
+
// src/client/client-host-ref.ts
|
|
12
14
|
var hostRefs = /* @__PURE__ */ new WeakMap();
|
|
13
15
|
var getHostRef = (ref) => hostRefs.get(ref);
|
|
14
|
-
var registerInstance = (lazyInstance, hostRef) =>
|
|
16
|
+
var registerInstance = (lazyInstance, hostRef) => {
|
|
17
|
+
hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
18
|
+
};
|
|
15
19
|
var registerHost = (hostElement, cmpMeta) => {
|
|
16
20
|
const hostRef = {
|
|
17
21
|
$flags$: 0,
|
|
@@ -24,7 +28,8 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
24
28
|
hostElement["s-p"] = [];
|
|
25
29
|
hostElement["s-rc"] = [];
|
|
26
30
|
}
|
|
27
|
-
|
|
31
|
+
const ref = hostRefs.set(hostElement, hostRef);
|
|
32
|
+
return ref;
|
|
28
33
|
};
|
|
29
34
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
30
35
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -61,16 +66,22 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
61
66
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
62
67
|
/* webpackMode: "lazy" */
|
|
63
68
|
`./${bundleId}.entry.js${""}`
|
|
64
|
-
).then(
|
|
65
|
-
{
|
|
66
|
-
|
|
69
|
+
).then(
|
|
70
|
+
(importedModule) => {
|
|
71
|
+
{
|
|
72
|
+
cmpModules.set(bundleId, importedModule);
|
|
73
|
+
}
|
|
74
|
+
return importedModule[exportName];
|
|
75
|
+
},
|
|
76
|
+
(e) => {
|
|
77
|
+
consoleError(e, hostRef.$hostElement$);
|
|
67
78
|
}
|
|
68
|
-
|
|
69
|
-
}, consoleError);
|
|
79
|
+
);
|
|
70
80
|
};
|
|
71
81
|
|
|
72
82
|
// src/client/client-style.ts
|
|
73
83
|
var styles = /* @__PURE__ */ new Map();
|
|
84
|
+
var HYDRATED_STYLE_ID = "sty-id";
|
|
74
85
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
75
86
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
76
87
|
var win = typeof window !== "undefined" ? window : {};
|
|
@@ -144,12 +155,6 @@ var flush = () => {
|
|
|
144
155
|
};
|
|
145
156
|
var nextTick = (cb) => promiseResolve().then(cb);
|
|
146
157
|
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
147
|
-
|
|
148
|
-
// src/utils/constants.ts
|
|
149
|
-
var EMPTY_OBJ = {};
|
|
150
|
-
|
|
151
|
-
// src/utils/helpers.ts
|
|
152
|
-
var isDef = (v) => v != null;
|
|
153
158
|
var isComplexType = (o) => {
|
|
154
159
|
o = typeof o;
|
|
155
160
|
return o === "object" || o === "function";
|
|
@@ -350,7 +355,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
350
355
|
}
|
|
351
356
|
if (!appliedStyles.has(scopeId2)) {
|
|
352
357
|
{
|
|
353
|
-
styleElm = doc.createElement("style");
|
|
358
|
+
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
|
|
354
359
|
styleElm.innerHTML = style;
|
|
355
360
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
356
361
|
if (nonce != null) {
|
|
@@ -360,7 +365,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
360
365
|
if (styleContainerNode.nodeName === "HEAD") {
|
|
361
366
|
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
362
367
|
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
363
|
-
styleContainerNode.insertBefore(
|
|
368
|
+
styleContainerNode.insertBefore(
|
|
369
|
+
styleElm,
|
|
370
|
+
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
371
|
+
);
|
|
364
372
|
} else if ("host" in styleContainerNode) {
|
|
365
373
|
if (supportsConstructableStylesheets) {
|
|
366
374
|
const stylesheet = new CSSStyleSheet();
|
|
@@ -410,16 +418,18 @@ var attachStyles = (hostRef) => {
|
|
|
410
418
|
endAttachStyles();
|
|
411
419
|
};
|
|
412
420
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
413
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
421
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
414
422
|
if (oldValue !== newValue) {
|
|
415
423
|
let isProp = isMemberInElement(elm, memberName);
|
|
416
424
|
let ln = memberName.toLowerCase();
|
|
417
425
|
if (memberName === "class") {
|
|
418
426
|
const classList = elm.classList;
|
|
419
427
|
const oldClasses = parseClassList(oldValue);
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
428
|
+
let newClasses = parseClassList(newValue);
|
|
429
|
+
{
|
|
430
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
431
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
432
|
+
}
|
|
423
433
|
} else if (memberName === "style") {
|
|
424
434
|
{
|
|
425
435
|
for (const prop in oldValue) {
|
|
@@ -474,7 +484,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
474
484
|
elm.setAttribute(memberName, n);
|
|
475
485
|
}
|
|
476
486
|
}
|
|
477
|
-
} else {
|
|
487
|
+
} else if (elm[memberName] !== newValue) {
|
|
478
488
|
elm[memberName] = newValue;
|
|
479
489
|
}
|
|
480
490
|
} catch (e) {
|
|
@@ -496,24 +506,44 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
496
506
|
}
|
|
497
507
|
};
|
|
498
508
|
var parseClassListRegex = /\s/;
|
|
499
|
-
var parseClassList = (value) =>
|
|
509
|
+
var parseClassList = (value) => {
|
|
510
|
+
if (typeof value === "object" && value && "baseVal" in value) {
|
|
511
|
+
value = value.baseVal;
|
|
512
|
+
}
|
|
513
|
+
if (!value || typeof value !== "string") {
|
|
514
|
+
return [];
|
|
515
|
+
}
|
|
516
|
+
return value.split(parseClassListRegex);
|
|
517
|
+
};
|
|
500
518
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
501
519
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
502
520
|
|
|
503
521
|
// src/runtime/vdom/update-element.ts
|
|
504
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
522
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
505
523
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
506
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
507
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
524
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
|
|
525
|
+
const newVnodeAttrs = newVnode.$attrs$ || {};
|
|
508
526
|
{
|
|
509
527
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
510
528
|
if (!(memberName in newVnodeAttrs)) {
|
|
511
|
-
setAccessor(
|
|
529
|
+
setAccessor(
|
|
530
|
+
elm,
|
|
531
|
+
memberName,
|
|
532
|
+
oldVnodeAttrs[memberName],
|
|
533
|
+
void 0,
|
|
534
|
+
isSvgMode2,
|
|
535
|
+
newVnode.$flags$);
|
|
512
536
|
}
|
|
513
537
|
}
|
|
514
538
|
}
|
|
515
539
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
516
|
-
setAccessor(
|
|
540
|
+
setAccessor(
|
|
541
|
+
elm,
|
|
542
|
+
memberName,
|
|
543
|
+
oldVnodeAttrs[memberName],
|
|
544
|
+
newVnodeAttrs[memberName],
|
|
545
|
+
isSvgMode2,
|
|
546
|
+
newVnode.$flags$);
|
|
517
547
|
}
|
|
518
548
|
};
|
|
519
549
|
function sortedAttrNames(attrNames) {
|
|
@@ -525,13 +555,10 @@ function sortedAttrNames(attrNames) {
|
|
|
525
555
|
attrNames
|
|
526
556
|
);
|
|
527
557
|
}
|
|
528
|
-
|
|
529
|
-
// src/runtime/vdom/vdom-render.ts
|
|
530
|
-
var scopeId;
|
|
531
558
|
var hostTagName;
|
|
532
559
|
var useNativeShadowDom = false;
|
|
533
560
|
var isSvgMode = false;
|
|
534
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex
|
|
561
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
535
562
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
536
563
|
let i2 = 0;
|
|
537
564
|
let elm;
|
|
@@ -545,11 +572,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
545
572
|
{
|
|
546
573
|
updateElement(null, newVNode2, isSvgMode);
|
|
547
574
|
}
|
|
548
|
-
const rootNode = elm.getRootNode();
|
|
549
|
-
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
550
|
-
if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
551
|
-
elm.classList.add(elm["s-si"] = scopeId);
|
|
552
|
-
}
|
|
553
575
|
if (newVNode2.$children$) {
|
|
554
576
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
555
577
|
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
@@ -678,6 +700,9 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
|
678
700
|
if (!isInitialRender) {
|
|
679
701
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
680
702
|
}
|
|
703
|
+
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
704
|
+
leftVNode.$key$ = rightVNode.$key$;
|
|
705
|
+
}
|
|
681
706
|
return true;
|
|
682
707
|
}
|
|
683
708
|
return false;
|
|
@@ -712,8 +737,9 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
712
737
|
}
|
|
713
738
|
};
|
|
714
739
|
var insertBefore = (parent, newNode, reference) => {
|
|
715
|
-
|
|
716
|
-
|
|
740
|
+
{
|
|
741
|
+
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
742
|
+
}
|
|
717
743
|
};
|
|
718
744
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
719
745
|
const hostElm = hostRef.$hostElement$;
|
|
@@ -738,9 +764,6 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
738
764
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
739
765
|
hostRef.$vnode$ = rootVnode;
|
|
740
766
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
741
|
-
{
|
|
742
|
-
scopeId = hostElm["s-sc"];
|
|
743
|
-
}
|
|
744
767
|
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
745
768
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
746
769
|
};
|
|
@@ -748,7 +771,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
748
771
|
// src/runtime/update-component.ts
|
|
749
772
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
750
773
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
751
|
-
ancestorComponent["s-p"].push(
|
|
774
|
+
const index = ancestorComponent["s-p"].push(
|
|
775
|
+
new Promise(
|
|
776
|
+
(r) => hostRef.$onRenderResolve$ = () => {
|
|
777
|
+
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
778
|
+
r();
|
|
779
|
+
}
|
|
780
|
+
)
|
|
781
|
+
);
|
|
752
782
|
}
|
|
753
783
|
};
|
|
754
784
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -777,7 +807,7 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
777
807
|
{
|
|
778
808
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
779
809
|
if (hostRef.$queuedListeners$) {
|
|
780
|
-
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
810
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
|
|
781
811
|
hostRef.$queuedListeners$ = void 0;
|
|
782
812
|
}
|
|
783
813
|
}
|
|
@@ -848,7 +878,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
848
878
|
const instance = hostRef.$lazyInstance$ ;
|
|
849
879
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
850
880
|
{
|
|
851
|
-
safeCall(instance, "componentDidRender");
|
|
881
|
+
safeCall(instance, "componentDidRender", void 0, elm);
|
|
852
882
|
}
|
|
853
883
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
854
884
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
@@ -882,12 +912,12 @@ var appDidLoad = (who) => {
|
|
|
882
912
|
}
|
|
883
913
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
884
914
|
};
|
|
885
|
-
var safeCall = (instance, method, arg) => {
|
|
915
|
+
var safeCall = (instance, method, arg, elm) => {
|
|
886
916
|
if (instance && instance[method]) {
|
|
887
917
|
try {
|
|
888
918
|
return instance[method](arg);
|
|
889
919
|
} catch (e) {
|
|
890
|
-
consoleError(e);
|
|
920
|
+
consoleError(e, elm);
|
|
891
921
|
}
|
|
892
922
|
}
|
|
893
923
|
return void 0;
|
|
@@ -930,15 +960,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
930
960
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
931
961
|
members.map(([memberName, [memberFlags]]) => {
|
|
932
962
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
963
|
+
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
964
|
+
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
965
|
+
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
966
|
+
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
967
|
+
Object.defineProperty(prototype, memberName, {
|
|
968
|
+
get() {
|
|
969
|
+
{
|
|
970
|
+
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
971
|
+
return getValue(this, memberName);
|
|
972
|
+
}
|
|
973
|
+
const ref = getHostRef(this);
|
|
974
|
+
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
975
|
+
if (!instance) return;
|
|
976
|
+
return instance[memberName];
|
|
977
|
+
}
|
|
978
|
+
},
|
|
979
|
+
configurable: true,
|
|
980
|
+
enumerable: true
|
|
981
|
+
});
|
|
982
|
+
}
|
|
933
983
|
Object.defineProperty(prototype, memberName, {
|
|
934
|
-
get() {
|
|
935
|
-
return getValue(this, memberName);
|
|
936
|
-
},
|
|
937
984
|
set(newValue) {
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
985
|
+
const ref = getHostRef(this);
|
|
986
|
+
if (origSetter) {
|
|
987
|
+
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
988
|
+
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
989
|
+
newValue = ref.$instanceValues$.get(memberName);
|
|
990
|
+
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
991
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
992
|
+
}
|
|
993
|
+
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
994
|
+
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
995
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
996
|
+
return;
|
|
997
|
+
}
|
|
998
|
+
{
|
|
999
|
+
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
1000
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1001
|
+
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
1002
|
+
ref.$onReadyPromise$.then(() => {
|
|
1003
|
+
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
1004
|
+
ref.$lazyInstance$[memberName] = newValue;
|
|
1005
|
+
}
|
|
1006
|
+
});
|
|
1007
|
+
}
|
|
1008
|
+
return;
|
|
1009
|
+
}
|
|
1010
|
+
const setterSetVal = () => {
|
|
1011
|
+
const currentValue = ref.$lazyInstance$[memberName];
|
|
1012
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1013
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1014
|
+
}
|
|
1015
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
1016
|
+
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1017
|
+
};
|
|
1018
|
+
if (ref.$lazyInstance$) {
|
|
1019
|
+
setterSetVal();
|
|
1020
|
+
} else {
|
|
1021
|
+
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
942
1025
|
});
|
|
943
1026
|
}
|
|
944
1027
|
});
|
|
@@ -948,7 +1031,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
948
1031
|
plt.jmp(() => {
|
|
949
1032
|
var _a2;
|
|
950
1033
|
const propName = attrNameToPropName.get(attrName);
|
|
951
|
-
if (this.hasOwnProperty(propName)) {
|
|
1034
|
+
if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
|
|
952
1035
|
newValue = this[propName];
|
|
953
1036
|
delete this[propName];
|
|
954
1037
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -968,7 +1051,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
968
1051
|
}
|
|
969
1052
|
return;
|
|
970
1053
|
}
|
|
971
|
-
|
|
1054
|
+
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1055
|
+
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1056
|
+
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1057
|
+
this[propName] = newValue;
|
|
1058
|
+
}
|
|
972
1059
|
});
|
|
973
1060
|
};
|
|
974
1061
|
Cstr.observedAttributes = Array.from(
|
|
@@ -995,9 +1082,8 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
995
1082
|
let Cstr;
|
|
996
1083
|
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
997
1084
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
const CstrImport = loadModule(cmpMeta);
|
|
1085
|
+
{
|
|
1086
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
1001
1087
|
if (CstrImport && "then" in CstrImport) {
|
|
1002
1088
|
const endLoad = uniqueTime();
|
|
1003
1089
|
Cstr = await CstrImport;
|
|
@@ -1019,16 +1105,12 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1019
1105
|
try {
|
|
1020
1106
|
new Cstr(hostRef);
|
|
1021
1107
|
} catch (e) {
|
|
1022
|
-
consoleError(e);
|
|
1108
|
+
consoleError(e, elm);
|
|
1023
1109
|
}
|
|
1024
1110
|
{
|
|
1025
1111
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
1026
1112
|
}
|
|
1027
1113
|
endNewInstance();
|
|
1028
|
-
} else {
|
|
1029
|
-
Cstr = elm.constructor;
|
|
1030
|
-
const cmpTag = elm.localName;
|
|
1031
|
-
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
|
1032
1114
|
}
|
|
1033
1115
|
if (Cstr && Cstr.style) {
|
|
1034
1116
|
let style;
|
|
@@ -1051,7 +1133,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1051
1133
|
schedule();
|
|
1052
1134
|
}
|
|
1053
1135
|
};
|
|
1054
|
-
var fireConnectedCallback = (instance) => {
|
|
1136
|
+
var fireConnectedCallback = (instance, elm) => {
|
|
1055
1137
|
};
|
|
1056
1138
|
|
|
1057
1139
|
// src/runtime/connected-callback.ts
|
|
@@ -1092,7 +1174,7 @@ var connectedCallback = (elm) => {
|
|
|
1092
1174
|
endConnected();
|
|
1093
1175
|
}
|
|
1094
1176
|
};
|
|
1095
|
-
var disconnectInstance = (instance) => {
|
|
1177
|
+
var disconnectInstance = (instance, elm) => {
|
|
1096
1178
|
};
|
|
1097
1179
|
var disconnectedCallback = async (elm) => {
|
|
1098
1180
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
@@ -1107,6 +1189,12 @@ var disconnectedCallback = async (elm) => {
|
|
|
1107
1189
|
hostRef.$onReadyPromise$.then(() => disconnectInstance());
|
|
1108
1190
|
}
|
|
1109
1191
|
}
|
|
1192
|
+
if (rootAppliedStyles.has(elm)) {
|
|
1193
|
+
rootAppliedStyles.delete(elm);
|
|
1194
|
+
}
|
|
1195
|
+
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1196
|
+
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1197
|
+
}
|
|
1110
1198
|
};
|
|
1111
1199
|
|
|
1112
1200
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1187,6 +1275,13 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1187
1275
|
}
|
|
1188
1276
|
disconnectedCallback() {
|
|
1189
1277
|
plt.jmp(() => disconnectedCallback(this));
|
|
1278
|
+
plt.raf(() => {
|
|
1279
|
+
var _a3;
|
|
1280
|
+
const hostRef = getHostRef(this);
|
|
1281
|
+
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1282
|
+
delete hostRef.$vnode$.$elm$;
|
|
1283
|
+
}
|
|
1284
|
+
});
|
|
1190
1285
|
}
|
|
1191
1286
|
componentOnReady() {
|
|
1192
1287
|
return getHostRef(this).$onReadyPromise$;
|
|
@@ -1250,7 +1345,7 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
1250
1345
|
}
|
|
1251
1346
|
}
|
|
1252
1347
|
} catch (e) {
|
|
1253
|
-
consoleError(e);
|
|
1348
|
+
consoleError(e, hostRef.$hostElement$);
|
|
1254
1349
|
}
|
|
1255
1350
|
};
|
|
1256
1351
|
var getHostListenerTarget = (elm, flags) => {
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { b as bootstrapLazy } from './index-579ab8d9.js';
|
|
2
|
+
export { s as setNonce } from './index-579ab8d9.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
4
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,c as t,h as o,g as i}from"./p-9bc17463.js";const a=class{constructor(o){e(this,o),this.closeModal=t(this,"closeModal",7),this.handleCloseClick=()=>{this.isLoading||this.closeModal.emit(this.modalType)},this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.host.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.host.prepend(t)}),1)})).catch((e=>{console.log("Error ",e)}))},this.clientStyling="",this.clientStylingUrl="",this.isOpen=void 0,this.isLoading=void 0,this.header=void 0,this.contentIcon=void 0,this.modalType=void 0,this.device="Mobile",this.showAnimation=!1,this.limitStylingAppends=!1}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return o("div",{key:"570a2289e990efeae5cceac8bc2152cbb9bb5221",class:`ModalOverlay ${this.isOpen&&"Open"} ${this.device} ${this.showAnimation&&"ShowAnimation"}`},o("div",{key:"9d40898f29b5a539907a7e50f3fdee02636aced6",class:"ModalWinAnimation"}),o("div",{key:"724ffe5cd946b40aa12f99ac926a6c832c1633da",class:"ModalContent GradientBorder"},o("div",{key:"14bb1463ba0b5e9cdb545a81c13873a3e124f4c3",class:"IconCloseContainer"},o("button",{key:"1640c3c0881c65199a26f3f2217610189d626f91",class:"EngagementSuiteIconButton Close",onClick:this.handleCloseClick})),this.contentIcon?o("div",{class:"ModalIcon",style:{background:`url(${this.contentIcon}) no-repeat center, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%)`}}):null,o("div",{key:"c49ddc1152bb9c8af76ff11874816da8477ba821",class:"ModalHeader"},o("h1",{key:"08352f25028b0b08c2c1a77b91ea80cc968aa4e1"},this.header)),o("div",{key:"3420427d531aceb3861c1876394443ad664ff68b",class:"ModalBodyWrapper"},o("div",{key:"3e453586b727029f5fca9688b376d4b3e8298dbf",class:"ModalBody"},o("slot",{key:"0d82c3fa9b0faa9012005ccca85350313a684326",name:"body"})),o("div",{key:"9e7a078e4c912869f2e3573a533bb3cf82454a4c",class:"ModalFooter"},o("slot",{key:"df8e0568aeca79889cf8eb8f7fb33caf685b092e",name:"footer"})))))}get host(){return i(this)}};a.style=':host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer;touch-action:manipulation}button:focus{outline:none}.EngagementSuiteIconButton{width:24px;height:24px}.EngagementSuiteIconButton.Close{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/close.svg) no-repeat}.ModalOverlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);justify-content:center;align-items:center;z-index:1}.ModalOverlay.Open{display:flex}.IconCloseContainer{width:100%;display:flex;justify-content:end}.ModalBodyWrapper{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden}.ModalBodyWrapper::-webkit-scrollbar{width:3px;background:none}.ModalBodyWrapper::-webkit-scrollbar-thumb{border-radius:var(--emw--border-radius-small, 4px);background-color:var(--emw--color-gray-transparency-30, rgba(255, 255, 255, 0.3))}.ModalContent{display:flex;flex-direction:column;align-items:center;font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);position:relative;color:var(--emw--color-typography, #FFFFFF);background-color:var(--emw--color-background, #1E1638);padding:24px;border-radius:var(--emw--border-radius-large, 8px);width:450px;max-width:100%;text-align:center;max-height:90dvh}.GradientBorder::before{content:"";position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;border-radius:var(--emw--border-radius-large, 9px);background:linear-gradient(143.2deg, #FF9401 -0.41%, #FFD32D 45.61%, #FF9401 82.77%);z-index:-1}.ModalHeader h1{font-weight:var(--emw--font-weight-semibold, 600);font-size:var(--emw--font-size-large-plus, 24px);padding:0 16px;margin-bottom:16px}.ModalIcon{width:44px;height:44px;border-radius:50%;background-size:cover;margin:12px 0}.ModalBody{font-size:var(--emw--font-size-medium, 16px);font-weight:var(--emw--font-weight-normal, 400);color:var(--emw--color-secondary, #BBB9C3);padding:0 16px}.ModalFooter{margin-top:40px;margin-bottom:28px;padding:0 16px;width:100%}@keyframes rotate{100%{transform:rotate(1turn)}}.ModalOverlay .ModalWinAnimation{display:none}.ModalOverlay.ShowAnimation .ModalWinAnimation{display:block;position:absolute;width:100%;height:100%;inset:0;background:center/550px url(https://static.everymatrix.com/gic/img/engagement-suite/light.svg) no-repeat, center/550px url(https://static.everymatrix.com/gic/img/engagement-suite/win.svg) no-repeat;animation:6s rotate linear infinite}.ModalOverlay.Mobile .EngagementSuiteIconButton{width:16px;height:16px}.ModalOverlay.Mobile .ModalBody{font-size:var(--emw--font-size-small, 14px)}.ModalOverlay.Mobile .ModalContent{width:318px;padding:12px}.ModalOverlay.Mobile .ModalHeader h1{font-size:var(--emw--font-size-large, 20px);padding:0 60px}.ModalOverlay.Mobile.ShowAnimation .ModalWinAnimation{background-size:400px}';const n=["en"],s={en:{joinHeader:"Choose another mission?",desc:"Any progress on the current mission will be kept and you can rejoin the mission at any time.",joinQuestion:"Would you still like to join another mission?",joinConfirm:"Yes, join another mission",joinReject:"No, stay at this mission",unJoinHeader:"Quit Mission?",unJoinQuestion:"Would you still like to quit the mission?",unJoinConfirm:"Yes, I want to quit this mission",unJoinReject:"No, stay at this mission",join:"Unjoin",unJoin:"Unjoin",continue:"Continue",okContinue:"Ok, continue",won:"You won",supportInfo:"However, some rewards cannot be issued. Please, contact support.",noReward:"Reward cannot be issued",contactSupport:"Please contact support.",noMissions:"No Missions yet",tryOtherGames:"Try winning Missions as rewards or launching other booster games",tooltip:"Mission where your real money bets contribute towards the level progress to achieve the level reward",jackpotWin:"Total Jackpot Win!",jackpotWinInfo:"Please refresh game page or place any bet to update game balance"}},r=(e,t)=>{const o=t;return s[void 0!==o&&n.includes(o)?o:"en"][e]},d=class{constructor(o){e(this,o),this.closeModal=t(this,"closeModal",7),this.handleCloseClick=e=>{const t=e.currentTarget.getAttribute("data-type");this.closeModal.emit(t)},this.handleChallengeAttendance=()=>{window.postMessage({type:"ChallengeJoinRequest",data:this.confirmationData})},this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.host.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.host.prepend(t)}),1)})).catch((e=>{console.log("Error ",e)}))},this.isModalOpen=e=>Boolean(this.openModals.find((t=>t===e))),this.clientStyling="",this.clientStylingUrl="",this.language="en",this.isJoiningToChallenge=void 0,this.device="Mobile",this.limitStylingAppends=!1,this.openModals=[],this.rewardMessage="",this.hasError=!1,this.confirmationData=null,this.winAmount={amount:0,currency:""}}openModalHandler(e){const{modalType:t,rewardMessage:o,hasError:i,confirmationData:a,winAmount:n}=e.detail;n&&(this.winAmount=this.isModalOpen("JACKPOT_REWARD_MODAL")?{amount:this.winAmount.amount+n.amount,currency:n.currency}:n),this.openModals=[...this.openModals,t],this.rewardMessage=o,this.hasError=i,a&&(this.confirmationData=a)}closeModalHandler(e){this.openModals=this.openModals.filter((t=>t!==e.detail))}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){const{ProgressToActivate:e}=this.confirmationData||{};return o("div",{key:"e9a8acb94d06f7c7f551de2fa61d601d3a0eeac8",class:`ModalContainer ${this.device}`},o("casino-engagement-suite-modal",{key:"5d28d01520bb671c4c932b6e53d6b1075f9c3378",clientStylingUrl:this.clientStylingUrl,isOpen:this.isModalOpen("REWARD_MODAL"),header:"Congratulations!",contentIcon:"https://static.everymatrix.com/gic/img/engagement-suite/cup-reward.svg",modalType:"REWARD_MODAL","show-animation":!0,device:this.device},o("div",{key:"6ef8750352a10fcbffbbe09c8bfba46b96c2098a",slot:"body"},o("div",{key:"c7b0c5c5202185a4001fbd23a60077e5b4484cfd"},r("won",this.language)," ",o("span",{key:"a4635cada0b6b4bb54a73377fcd0165a12400c5f",class:"ModalReward"},this.rewardMessage)),this.hasError&&o("div",{key:"e06df98ca254006caf79ff443da7e7c4dc7c8e46",class:"SupportInfo"},r("supportInfo",this.language))),o("div",{key:"434d5bf025fe0222f8d73d94e26bfe465492eacb",slot:"footer"},o("button",{key:"6927f9a1ee16c3b50abd62fe5bc736800b18d8f8",class:"ModalFooterButton",onClick:this.handleCloseClick,"data-type":"REWARD_MODAL"},r("continue",this.language)))),o("casino-engagement-suite-modal",{key:"802cb8c9e712f387f26ea4411f3bb0a1497fba80",clientStylingUrl:this.clientStylingUrl,isOpen:this.isModalOpen("JACKPOT_REWARD_MODAL"),header:"Congratulations!",contentIcon:"https://static.everymatrix.com/gic/img/engagement-suite/cup-reward.svg","show-animation":!0,modalType:"JACKPOT_REWARD_MODAL",device:this.device},o("div",{key:"70fe768de685e857cdf3cc889ec9f7a841ed4c09",slot:"body"},o("div",{key:"bfafa6ea6d1d200d4c4c1a1e2a9d5bc43a0fbfa1",class:"JackpotWinText"},r("jackpotWin",this.language)),o("div",{key:"62d3c8a92e0d0e0b2178087f421701a00b23bd32",class:"JackpotWinAmount"},(t=this.winAmount.amount,`${this.winAmount.currency} ${new Intl.NumberFormat("en",{minimumFractionDigits:2,maximumFractionDigits:2}).format(t)}`))),o("div",{key:"a062a76ba5d7d5ccb9defc85697b69d59ef1af5a",slot:"footer"},o("button",{key:"9fa028e9f0857539e66007b1ac5f5f005dd03267",class:"ModalFooterButton",onClick:this.handleCloseClick,"data-type":"JACKPOT_REWARD_MODAL"},r("continue",this.language)),o("div",{key:"483eb12b73245887e6ebc251e2e93db7e6d7dbc3",class:"JackpotWinInfoText"},r("jackpotWinInfo",this.language)))),o("casino-engagement-suite-modal",{key:"898dc39daf3ee36027a080364042e8653df9c390",clientStylingUrl:this.clientStylingUrl,isOpen:this.isModalOpen("TARGET_MODAL"),header:r(e?"joinHeader":"unJoinHeader",this.language),modalType:"TARGET_MODAL",device:this.device,isLoading:this.isJoiningToChallenge},o("div",{key:"08bcfbe6506982e393c92b0f776629dc336b751a",slot:"body"},o("div",{key:"58e20c9775e690344804f505ef30c5a4d59940ce",class:"LeftAlign"},r("desc",this.language)),o("div",{key:"8081f426a1c5556b3d95e875da12e9fb214937db",class:"LeftAlignQuestion"},r(e?"joinQuestion":"unJoinQuestion",this.language))),o("div",{key:"44614b02fd105bbe4a698460696a7842c85e3c49",slot:"footer",class:"ManyActions"},o("button",{key:"21b8b45fd8e28625d2ece9124bca65fb5429eb12",class:"ModalFooterButton "+(this.isJoiningToChallenge?"Disabled":""),onClick:this.handleChallengeAttendance},r(e?"joinConfirm":"unJoinConfirm",this.language)),o("button",{key:"e01e434afa2e1129c325042a37b1ac76be5a28c7",class:"ModalFooterButtonOutlined "+(this.isJoiningToChallenge?"Disabled":""),onClick:this.handleCloseClick,"data-type":"TARGET_MODAL"},o("div",{key:"622d587b43206691f4f67b7f13c18f4187560b15",class:"GradientText"},r(e?"joinReject":"unJoinReject",this.language))))),o("casino-engagement-suite-modal",{key:"8310ae114d8eefd5d91fb07c5d7cca34c70bffa3",clientStylingUrl:this.clientStylingUrl,isOpen:this.isModalOpen("SUPPORT_MODAL"),header:r("noReward",this.language),contentIcon:"https://static.everymatrix.com/gic/img/engagement-suite/alert.svg",modalType:"SUPPORT_MODAL",device:this.device},o("div",{key:"f6cc0be359c4cdbe0c2a3dd3ff3dbfb0841e65fe",slot:"body"},o("span",{key:"d4229846b65de554ba68c2c4545e2ac1fcc4fabe"},r("contactSupport",this.language))),o("div",{key:"55a91614a32feca8f3ea613b2ea27bb0f37145e9",slot:"footer"},o("button",{key:"9ea26fa1b55d7fe1201e460c11ec46e8ea673240",class:"ModalFooterButton",onClick:this.handleCloseClick,"data-type":"SUPPORT_MODAL"},r("okContinue",this.language)))));var t}get host(){return i(this)}};d.style=':host{display:block;font-family:inherit}.ModalFooterButton,.ModalFooterButtonOutlined{transition:all 0.5s ease-out;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));color:var(--emw--color-background, #1E1638);border-radius:99px;min-width:160px;height:36px;font-size:var(--emw--font-size-medium, 16px);font-weight:var(--emw--font-weight-bold, 700);position:relative;font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);padding:0 12px;box-sizing:border-box;margin:auto;border:none;cursor:pointer}.ModalFooterButtonOutlined{background:linear-gradient(var(--emw--color-background, #1E1638) 0 0) padding-box, var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%)) border-box;border:2px solid transparent}.GradientText{background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));color:transparent;background-clip:text}.ManyActions{display:flex;width:100%;flex-direction:column;align-items:stretch}.ManyActions .ModalFooterButton,.ManyActions .ModalFooterButtonOutlined{width:280px}.ManyActions button:first-child{margin-bottom:16px}.Disabled{opacity:0.5;pointer-events:none;cursor:auto}.ModalReward{font-weight:var(--emw--font-weight-semibold, 600);color:var(--emw--color-typography, #FFFFFF);word-break:break-word}.JackpotWinText{margin:0;font-weight:var(--emw--font-weight-semibold, 600);font-size:var(--emw--font-size-medium, 16px);line-height:20px;color:var(--emw--color-typography, #FFF)}.JackpotWinAmount{margin-top:8px;background:var(--emw--linear-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));-webkit-text-fill-color:transparent;-webkit-background-clip:text;font-weight:var(--emw--font-weight-black, 900);font-size:var(--emw--font-size-medium, 16px);line-height:16px}.JackpotWinInfoText{padding:0 50px;margin-top:20px;font-size:var(--emw--font-size-small, 14px);line-height:16px;color:var(--emw--color-secondary, #BBB9C3)}.SupportInfo{margin-top:20px}.ModalContainer.Mobile .ModalFooterButton,.ModalContainer.Mobile .ModalFooterButtonOutlined{font-size:var(--emw--font-size-small, 14px);min-width:140px;height:32px}.ModalContainer.Mobile .ManyActions .ModalFooterButton,.ModalContainer.Mobile .ManyActions .ModalFooterButtonOutlined{width:100%;height:32px}.ModalContainer.Mobile .ManyActions button:first-child{margin-bottom:8px}.ModalContainer.Mobile .JackpotWinText{font-size:var(--emw--font-size-small, 14px);line-height:16px}.ModalContainer.Mobile .JackpotWinAmount{font-size:var(--emw--font-size-small, 14px);line-height:14px}.ModalContainer.Mobile .JackpotWinInfoText{padding:0;margin-top:20px;font-size:var(--emw--font-size-small, 14px);line-height:16px;color:var(--emw--color-secondary, #BBB9C3)}.LeftAlign,.LeftAlignQuestion{text-align:left;line-height:1.2}.LeftAlignQuestion{margin-top:20px}';export{a as casino_engagement_suite_modal,d as casino_engagement_suite_modal_container}
|