@everymatrix/casino-engagement-suite-modal-container 1.44.0 → 1.45.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/casino-engagement-suite-modal-container/casino-engagement-suite-modal-container.esm.js +1 -1
  2. package/dist/casino-engagement-suite-modal-container/p-ac43a734.js +2 -0
  3. package/dist/casino-engagement-suite-modal-container/p-e1255160.js +1 -0
  4. package/dist/casino-engagement-suite-modal-container/p-f56ae83a.entry.js +1 -0
  5. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  6. package/dist/cjs/casino-engagement-suite-modal-container.cjs.js +16 -10
  7. package/dist/cjs/casino-engagement-suite-modal_2.cjs.entry.js +173 -183
  8. package/dist/cjs/index-00ddb955.js +1279 -0
  9. package/dist/cjs/loader.cjs.js +6 -12
  10. package/dist/collection/collection-manifest.json +3 -3
  11. package/dist/collection/components/casino-engagement-suite-modal-container/casino-engagement-suite-modal-container.css +15 -15
  12. package/dist/collection/components/casino-engagement-suite-modal-container/casino-engagement-suite-modal-container.js +234 -259
  13. package/dist/collection/components/casino-engagement-suite-modal-container/index.js +1 -0
  14. package/dist/collection/utils/locale.utils.js +26 -26
  15. package/dist/collection/utils/utils.js +2 -2
  16. package/dist/esm/app-globals-0f993ce5.js +3 -0
  17. package/dist/esm/casino-engagement-suite-modal-container.js +13 -10
  18. package/dist/esm/casino-engagement-suite-modal_2.entry.js +173 -183
  19. package/dist/esm/index-896654aa.js +1251 -0
  20. package/dist/esm/loader.js +6 -12
  21. package/dist/stencil.config.dev.js +17 -0
  22. package/dist/stencil.config.js +14 -19
  23. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-engagement-suite-modal-container/.stencil/packages/stencil/casino-engagement-suite-modal-container/stencil.config.d.ts +2 -0
  24. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-engagement-suite-modal-container/.stencil/packages/stencil/casino-engagement-suite-modal-container/stencil.config.dev.d.ts +2 -0
  25. package/dist/types/components/casino-engagement-suite-modal-container/casino-engagement-suite-modal-container.d.ts +40 -40
  26. package/dist/types/components/casino-engagement-suite-modal-container/index.d.ts +1 -0
  27. package/dist/types/components.d.ts +16 -1
  28. package/dist/types/models/index.d.ts +8 -8
  29. package/dist/types/stencil-public-runtime.d.ts +142 -33
  30. package/loader/cdn.js +1 -3
  31. package/loader/index.cjs.js +1 -3
  32. package/loader/index.d.ts +13 -1
  33. package/loader/index.es2017.js +1 -3
  34. package/loader/index.js +1 -3
  35. package/loader/package.json +1 -0
  36. package/package.json +12 -2
  37. package/dist/casino-engagement-suite-modal-container/p-b206f149.entry.js +0 -1
  38. package/dist/casino-engagement-suite-modal-container/p-b944b831.js +0 -1
  39. package/dist/cjs/index-2394967b.js +0 -1253
  40. package/dist/components/casino-engagement-suite-modal-container.d.ts +0 -11
  41. package/dist/components/casino-engagement-suite-modal-container.js +0 -181
  42. package/dist/components/casino-engagement-suite-modal.js +0 -6
  43. package/dist/components/casino-engagement-suite-modal2.js +0 -91
  44. package/dist/components/index.d.ts +0 -26
  45. package/dist/components/index.js +0 -1
  46. package/dist/esm/index-89c6c4a4.js +0 -1226
  47. package/dist/esm/polyfills/core-js.js +0 -11
  48. package/dist/esm/polyfills/css-shim.js +0 -1
  49. package/dist/esm/polyfills/dom.js +0 -79
  50. package/dist/esm/polyfills/es5-html-element.js +0 -1
  51. package/dist/esm/polyfills/index.js +0 -34
  52. package/dist/esm/polyfills/system.js +0 -6
  53. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/casino-engagement-suite-modal-container/.stencil/packages/casino-engagement-suite-modal-container/stencil.config.d.ts +0 -2
@@ -1,207 +1,197 @@
1
- import { r as registerInstance, c as createEvent, h, g as getElement } from './index-89c6c4a4.js';
1
+ import { r as registerInstance, c as createEvent, h, g as getElement } from './index-896654aa.js';
2
2
 
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}.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}.ModalOverlay.Open{display:flex}.IconCloseContainer{width:100%;display:flex;justify-content:end}.IconCloseButton img{width:24px;height:24px}.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:4px;background-color:var(--emw--color-background, #666178)}.ModalContent{display:flex;flex-direction:column;align-items:center;font-family:\"Montserrat\", sans-serif;position:relative;color:var(--emw--color-typography, #FFFFFF);background-color:var(--emw--color-background, #1E1638);padding:24px;border-radius: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: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, 24px);padding:0 16px;margin-bottom:16px}.ModalIcon{width:44px;height:44px;border-radius:50%;background-size:cover;margin:12px 0}.ModalBody{font-size:16px;font-family:\"Inter\", sans-serif;font-weight:var(--emw--font-weight-normal, 400);color:var(--emw--color-gray-100, #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 .IconCloseButton img{width:16px;height:16px}.ModalOverlay.Mobile .ModalBody{font-size:14px}.ModalOverlay.Mobile .ModalContent{width:318px;padding:12px}.ModalOverlay.Mobile .ModalHeader h1{font-size:20px;padding:0 60px}.ModalOverlay.Mobile.ShowAnimation .ModalWinAnimation{background-size:400px}";
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
+ const CasinoEngagementSuiteModalStyle0 = casinoEngagementSuiteModalCss;
4
5
 
5
6
  const CasinoEngagementSuiteModal = class {
6
- constructor(hostRef) {
7
- registerInstance(this, hostRef);
8
- this.closeModal = createEvent(this, "closeModal", 7);
9
- /**
10
- * Client custom styling via string
11
- */
12
- this.clientStyling = '';
13
- /**
14
- * Client custom styling via url
15
- */
16
- this.clientStylingUrl = '';
17
- this.device = 'Mobile';
18
- /**
19
- * Show win animation
20
- */
21
- this.showAnimation = false;
22
- this.limitStylingAppends = false;
23
- this.handleCloseClick = () => {
24
- if (this.isLoading)
25
- return;
26
- this.closeModal.emit(this.modalType);
27
- };
28
- this.setClientStyling = () => {
29
- let sheet = document.createElement('style');
30
- sheet.innerHTML = this.clientStyling;
31
- this.host.prepend(sheet);
32
- };
33
- this.setClientStylingURL = () => {
34
- let url = new URL(this.clientStylingUrl);
35
- let cssFile = document.createElement('style');
36
- fetch(url.href)
37
- .then((res) => res.text())
38
- .then((data) => {
39
- cssFile.innerHTML = data;
40
- setTimeout(() => { this.host.prepend(cssFile); }, 1);
41
- })
42
- .catch((err) => {
43
- console.log('Error ', err);
44
- });
45
- };
46
- }
47
- componentDidRender() {
48
- if (!this.limitStylingAppends && this.host) {
49
- if (this.clientStyling)
50
- this.setClientStyling();
51
- if (this.clientStylingUrl)
52
- this.setClientStylingURL();
53
- this.limitStylingAppends = true;
7
+ constructor(hostRef) {
8
+ registerInstance(this, hostRef);
9
+ this.closeModal = createEvent(this, "closeModal", 7);
10
+ this.handleCloseClick = () => {
11
+ if (this.isLoading)
12
+ return;
13
+ this.closeModal.emit(this.modalType);
14
+ };
15
+ this.setClientStyling = () => {
16
+ let sheet = document.createElement('style');
17
+ sheet.innerHTML = this.clientStyling;
18
+ this.host.prepend(sheet);
19
+ };
20
+ this.setClientStylingURL = () => {
21
+ let url = new URL(this.clientStylingUrl);
22
+ let cssFile = document.createElement('style');
23
+ fetch(url.href)
24
+ .then((res) => res.text())
25
+ .then((data) => {
26
+ cssFile.innerHTML = data;
27
+ setTimeout(() => { this.host.prepend(cssFile); }, 1);
28
+ })
29
+ .catch((err) => {
30
+ console.log('Error ', err);
31
+ });
32
+ };
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;
54
43
  }
55
- }
56
- render() {
57
- return (h("div", { class: `ModalOverlay ${this.isOpen && 'Open'} ${this.device} ${this.showAnimation && 'ShowAnimation'}` }, h("div", { class: "ModalWinAnimation" }), h("div", { class: "ModalContent GradientBorder" }, h("div", { class: 'IconCloseContainer' }, h("button", { class: "IconCloseButton", onClick: this.handleCloseClick }, h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/close.svg", alt: "\u0421lose modal" }))), this.contentIcon ? (h("div", { class: "ModalIcon", style: {
58
- background: `url(${this.contentIcon}) no-repeat center, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%)`
59
- } })) : null, h("div", { class: "ModalHeader" }, h("h1", null, this.header)), h("div", { class: "ModalBodyWrapper" }, h("div", { class: "ModalBody" }, h("slot", { name: "body" })), h("div", { class: "ModalFooter" }, h("slot", { name: "footer" }))))));
60
- }
61
- get host() { return getElement(this); }
44
+ componentDidRender() {
45
+ if (!this.limitStylingAppends && this.host) {
46
+ if (this.clientStyling)
47
+ this.setClientStyling();
48
+ if (this.clientStylingUrl)
49
+ this.setClientStylingURL();
50
+ this.limitStylingAppends = true;
51
+ }
52
+ }
53
+ render() {
54
+ return (h("div", { key: '570a2289e990efeae5cceac8bc2152cbb9bb5221', class: `ModalOverlay ${this.isOpen && 'Open'} ${this.device} ${this.showAnimation && 'ShowAnimation'}` }, h("div", { key: '9d40898f29b5a539907a7e50f3fdee02636aced6', class: "ModalWinAnimation" }), h("div", { key: '724ffe5cd946b40aa12f99ac926a6c832c1633da', class: "ModalContent GradientBorder" }, h("div", { key: '14bb1463ba0b5e9cdb545a81c13873a3e124f4c3', class: 'IconCloseContainer' }, h("button", { key: '1640c3c0881c65199a26f3f2217610189d626f91', class: "EngagementSuiteIconButton Close", onClick: this.handleCloseClick })), this.contentIcon ? (h("div", { class: "ModalIcon", style: {
55
+ background: `url(${this.contentIcon}) no-repeat center, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%)`
56
+ } })) : null, h("div", { key: 'c49ddc1152bb9c8af76ff11874816da8477ba821', class: "ModalHeader" }, h("h1", { key: '08352f25028b0b08c2c1a77b91ea80cc968aa4e1' }, this.header)), h("div", { key: '3420427d531aceb3861c1876394443ad664ff68b', class: "ModalBodyWrapper" }, h("div", { key: '3e453586b727029f5fca9688b376d4b3e8298dbf', class: "ModalBody" }, h("slot", { key: '0d82c3fa9b0faa9012005ccca85350313a684326', name: "body" })), h("div", { key: '9e7a078e4c912869f2e3573a533bb3cf82454a4c', class: "ModalFooter" }, h("slot", { key: 'df8e0568aeca79889cf8eb8f7fb33caf685b092e', name: "footer" }))))));
57
+ }
58
+ get host() { return getElement(this); }
62
59
  };
63
- CasinoEngagementSuiteModal.style = casinoEngagementSuiteModalCss;
60
+ CasinoEngagementSuiteModal.style = CasinoEngagementSuiteModalStyle0;
64
61
 
65
62
  const DEFAULT_LANGUAGE = 'en';
66
63
  const SUPPORTED_LANGUAGES = ['en'];
67
64
  const TRANSLATIONS = {
68
- en: {
69
- joinHeader: 'Choose another mission?',
70
- desc: 'Any progress on the current mission will be kept and you can rejoin the mission at any time.',
71
- joinQuestion: 'Would you still like to join another mission?',
72
- joinConfirm: 'Yes, join another mission',
73
- joinReject: 'No, stay at this mission',
74
- unJoinHeader: 'Quit Mission?',
75
- unJoinQuestion: 'Would you still like to quit the mission?',
76
- unJoinConfirm: 'Yes, I want to quit this mission',
77
- unJoinReject: 'No, stay at this mission',
78
- join: 'Unjoin',
79
- unJoin: 'Unjoin',
80
- continue: 'Continue',
81
- okContinue: 'Ok, continue',
82
- won: 'You won',
83
- supportInfo: 'However, some rewards cannot be issued. Please, contact support.',
84
- noReward: 'Reward cannot be issued',
85
- contactSupport: 'Please contact support.',
86
- noMissions: 'No Missions yet',
87
- tryOtherGames: 'Try winning Missions as rewards or launching other booster games',
88
- tooltip: 'Mission where your real money bets contribute towards the level progress to achieve the level reward',
89
- jackpotWin: 'Total Jackpot Win!',
90
- jackpotWinInfo: 'Please refresh game page or place any bet to update game balance'
91
- }
65
+ en: {
66
+ joinHeader: 'Choose another mission?',
67
+ desc: 'Any progress on the current mission will be kept and you can rejoin the mission at any time.',
68
+ joinQuestion: 'Would you still like to join another mission?',
69
+ joinConfirm: 'Yes, join another mission',
70
+ joinReject: 'No, stay at this mission',
71
+ unJoinHeader: 'Quit Mission?',
72
+ unJoinQuestion: 'Would you still like to quit the mission?',
73
+ unJoinConfirm: 'Yes, I want to quit this mission',
74
+ unJoinReject: 'No, stay at this mission',
75
+ join: 'Unjoin',
76
+ unJoin: 'Unjoin',
77
+ continue: 'Continue',
78
+ okContinue: 'Ok, continue',
79
+ won: 'You won',
80
+ supportInfo: 'However, some rewards cannot be issued. Please, contact support.',
81
+ noReward: 'Reward cannot be issued',
82
+ contactSupport: 'Please contact support.',
83
+ noMissions: 'No Missions yet',
84
+ tryOtherGames: 'Try winning Missions as rewards or launching other booster games',
85
+ tooltip: 'Mission where your real money bets contribute towards the level progress to achieve the level reward',
86
+ jackpotWin: 'Total Jackpot Win!',
87
+ jackpotWinInfo: 'Please refresh game page or place any bet to update game balance'
88
+ }
92
89
  };
93
90
  const translate = (key, customLang) => {
94
- const lang = customLang;
95
- return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
91
+ const lang = customLang;
92
+ return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
96
93
  };
97
94
 
98
95
  function formatBalance(amount, currency) {
99
- return `${currency} ${new Intl.NumberFormat('en', { minimumFractionDigits: 2, maximumFractionDigits: 2 })
100
- .format(amount)}`;
96
+ return `${currency} ${new Intl.NumberFormat('en', { minimumFractionDigits: 2, maximumFractionDigits: 2 })
97
+ .format(amount)}`;
101
98
  }
102
99
 
103
- const casinoEngagementSuiteModalContainerCss = ":host{display:block;font-family:inherit}.ModalFooterButton,.ModalFooterButtonOutlined{transition:all 0.5s ease-out;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);color:var(--emw--color-typography, #1E1638);border-radius:99px;min-width:160px;height:36px;font-size:var(--emw--font-size-small-plus, 16px);font-weight:var(--emw--font-weight-bold, 700);position:relative;font-family:\"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, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%) border-box;border:2px solid transparent}.GradientText{background-image: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-bold, 600);font-size:16px;line-height:20px;color:var(--emw--color-typography, #FFF)}.JackpotWinAmount{margin-top:8px;background: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:900;font-size: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-gray-100, #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:14px;line-height:16px}.ModalContainer.Mobile .JackpotWinAmount{font-size: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-gray-100, #BBB9C3)}.LeftAlign,.LeftAlignQuestion{text-align:left;line-height:1.2}.LeftAlignQuestion{margin-top:20px}";
100
+ const casinoEngagementSuiteModalContainerCss = ":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}";
101
+ const CasinoEngagementSuiteModalContainerStyle0 = casinoEngagementSuiteModalContainerCss;
104
102
 
105
103
  const CasinoEngagementSuiteModalContainer = class {
106
- constructor(hostRef) {
107
- registerInstance(this, hostRef);
108
- this.closeModal = createEvent(this, "closeModal", 7);
109
- /**
110
- * Client custom styling via string
111
- */
112
- this.clientStyling = '';
113
- /**
114
- * Client custom styling via url
115
- */
116
- this.clientStylingUrl = '';
117
- /**
118
- * Language of the widget
119
- */
120
- this.language = 'en';
121
- this.device = 'Mobile';
122
- this.limitStylingAppends = false;
123
- this.openModals = [];
124
- this.rewardMessage = '';
125
- this.hasError = false;
126
- this.confirmationData = null;
127
- this.winAmount = { amount: 0, currency: '' };
128
- this.handleCloseClick = (e) => {
129
- const type = e.currentTarget.getAttribute('data-type');
130
- this.closeModal.emit(type);
131
- };
132
- this.handleChallengeAttendance = () => {
133
- window.postMessage({
134
- type: 'ChallengeJoinRequest',
135
- data: this.confirmationData,
136
- });
137
- };
138
- this.setClientStyling = () => {
139
- let sheet = document.createElement('style');
140
- sheet.innerHTML = this.clientStyling;
141
- this.host.prepend(sheet);
142
- };
143
- this.setClientStylingURL = () => {
144
- let url = new URL(this.clientStylingUrl);
145
- let cssFile = document.createElement('style');
146
- fetch(url.href)
147
- .then((res) => res.text())
148
- .then((data) => {
149
- cssFile.innerHTML = data;
150
- setTimeout(() => { this.host.prepend(cssFile); }, 1);
151
- })
152
- .catch((err) => {
153
- console.log('Error ', err);
154
- });
155
- };
156
- this.isModalOpen = (type) => {
157
- return Boolean(this.openModals.find(el => el === type));
158
- };
159
- }
160
- openModalHandler(event) {
161
- const { modalType, rewardMessage, hasError, confirmationData, winAmount } = event.detail;
162
- if (winAmount) {
163
- // If jackpot win modal is already opened
164
- // add won amount to the previous amount
165
- if (this.isModalOpen('JACKPOT_REWARD_MODAL')) {
166
- this.winAmount = { amount: this.winAmount.amount + winAmount.amount, currency: winAmount.currency };
167
- }
168
- else {
169
- this.winAmount = winAmount;
170
- }
104
+ constructor(hostRef) {
105
+ registerInstance(this, hostRef);
106
+ this.closeModal = createEvent(this, "closeModal", 7);
107
+ this.handleCloseClick = (e) => {
108
+ const type = e.currentTarget.getAttribute('data-type');
109
+ this.closeModal.emit(type);
110
+ };
111
+ this.handleChallengeAttendance = () => {
112
+ window.postMessage({
113
+ type: 'ChallengeJoinRequest',
114
+ data: this.confirmationData,
115
+ });
116
+ };
117
+ this.setClientStyling = () => {
118
+ let sheet = document.createElement('style');
119
+ sheet.innerHTML = this.clientStyling;
120
+ this.host.prepend(sheet);
121
+ };
122
+ this.setClientStylingURL = () => {
123
+ let url = new URL(this.clientStylingUrl);
124
+ let cssFile = document.createElement('style');
125
+ fetch(url.href)
126
+ .then((res) => res.text())
127
+ .then((data) => {
128
+ cssFile.innerHTML = data;
129
+ setTimeout(() => { this.host.prepend(cssFile); }, 1);
130
+ })
131
+ .catch((err) => {
132
+ console.log('Error ', err);
133
+ });
134
+ };
135
+ this.isModalOpen = (type) => {
136
+ return Boolean(this.openModals.find(el => el === type));
137
+ };
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
+ }
150
+ openModalHandler(event) {
151
+ const { modalType, rewardMessage, hasError, confirmationData, winAmount } = event.detail;
152
+ if (winAmount) {
153
+ // If jackpot win modal is already opened
154
+ // add won amount to the previous amount
155
+ if (this.isModalOpen('JACKPOT_REWARD_MODAL')) {
156
+ this.winAmount = { amount: this.winAmount.amount + winAmount.amount, currency: winAmount.currency };
157
+ }
158
+ else {
159
+ this.winAmount = winAmount;
160
+ }
161
+ }
162
+ this.openModals = [...this.openModals, modalType];
163
+ this.rewardMessage = rewardMessage;
164
+ this.hasError = hasError;
165
+ if (confirmationData) {
166
+ this.confirmationData = confirmationData;
167
+ }
168
+ }
169
+ closeModalHandler(event) {
170
+ this.openModals = this.openModals.filter(el => el !== event.detail);
171
171
  }
172
- this.openModals = [...this.openModals, modalType];
173
- this.rewardMessage = rewardMessage;
174
- this.hasError = hasError;
175
- if (confirmationData) {
176
- this.confirmationData = confirmationData;
172
+ componentDidRender() {
173
+ if (!this.limitStylingAppends && this.host) {
174
+ if (this.clientStyling)
175
+ this.setClientStyling();
176
+ if (this.clientStylingUrl)
177
+ this.setClientStylingURL();
178
+ this.limitStylingAppends = true;
179
+ }
177
180
  }
178
- }
179
- closeModalHandler(event) {
180
- this.openModals = this.openModals.filter(el => el !== event.detail);
181
- }
182
- componentDidRender() {
183
- if (!this.limitStylingAppends && this.host) {
184
- if (this.clientStyling)
185
- this.setClientStyling();
186
- if (this.clientStylingUrl)
187
- this.setClientStylingURL();
188
- this.limitStylingAppends = true;
181
+ render() {
182
+ const { ProgressToActivate } = this.confirmationData || {};
183
+ return (h("div", { key: 'e9a8acb94d06f7c7f551de2fa61d601d3a0eeac8', class: `ModalContainer ${this.device}` }, h("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": true, device: this.device }, h("div", { key: '6ef8750352a10fcbffbbe09c8bfba46b96c2098a', slot: "body" }, h("div", { key: 'c7b0c5c5202185a4001fbd23a60077e5b4484cfd' }, translate('won', this.language), " ", h("span", { key: 'a4635cada0b6b4bb54a73377fcd0165a12400c5f', class: 'ModalReward' }, this.rewardMessage)), this.hasError && (h("div", { key: 'e06df98ca254006caf79ff443da7e7c4dc7c8e46', class: "SupportInfo" }, translate('supportInfo', this.language)))), h("div", { key: '434d5bf025fe0222f8d73d94e26bfe465492eacb', slot: "footer" }, h("button", { key: '6927f9a1ee16c3b50abd62fe5bc736800b18d8f8', class: 'ModalFooterButton', onClick: this.handleCloseClick, "data-type": 'REWARD_MODAL' }, translate('continue', this.language)))), h("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": true, modalType: "JACKPOT_REWARD_MODAL", device: this.device }, h("div", { key: '70fe768de685e857cdf3cc889ec9f7a841ed4c09', slot: "body" }, h("div", { key: 'bfafa6ea6d1d200d4c4c1a1e2a9d5bc43a0fbfa1', class: "JackpotWinText" }, translate('jackpotWin', this.language)), h("div", { key: '62d3c8a92e0d0e0b2178087f421701a00b23bd32', class: "JackpotWinAmount" }, formatBalance(this.winAmount.amount, this.winAmount.currency))), h("div", { key: 'a062a76ba5d7d5ccb9defc85697b69d59ef1af5a', slot: "footer" }, h("button", { key: '9fa028e9f0857539e66007b1ac5f5f005dd03267', class: 'ModalFooterButton', onClick: this.handleCloseClick, "data-type": 'JACKPOT_REWARD_MODAL' }, translate('continue', this.language)), h("div", { key: '483eb12b73245887e6ebc251e2e93db7e6d7dbc3', class: "JackpotWinInfoText" }, translate('jackpotWinInfo', this.language)))), h("casino-engagement-suite-modal", { key: '898dc39daf3ee36027a080364042e8653df9c390', clientStylingUrl: this.clientStylingUrl, isOpen: this.isModalOpen("TARGET_MODAL"), header: ProgressToActivate ?
184
+ translate('joinHeader', this.language) :
185
+ translate('unJoinHeader', this.language), modalType: "TARGET_MODAL", device: this.device, isLoading: this.isJoiningToChallenge }, h("div", { key: '08bcfbe6506982e393c92b0f776629dc336b751a', slot: "body" }, h("div", { key: '58e20c9775e690344804f505ef30c5a4d59940ce', class: 'LeftAlign' }, translate('desc', this.language)), h("div", { key: '8081f426a1c5556b3d95e875da12e9fb214937db', class: 'LeftAlignQuestion' }, ProgressToActivate ?
186
+ translate('joinQuestion', this.language) :
187
+ translate('unJoinQuestion', this.language))), h("div", { key: '44614b02fd105bbe4a698460696a7842c85e3c49', slot: "footer", class: 'ManyActions' }, h("button", { key: '21b8b45fd8e28625d2ece9124bca65fb5429eb12', class: `ModalFooterButton ${this.isJoiningToChallenge ? 'Disabled' : ''}`, onClick: this.handleChallengeAttendance }, ProgressToActivate ?
188
+ translate('joinConfirm', this.language) :
189
+ 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
+ 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))))));
189
192
  }
190
- }
191
- render() {
192
- const { ProgressToActivate } = this.confirmationData || {};
193
- return (h("div", { class: `ModalContainer ${this.device}` }, h("casino-engagement-suite-modal", { isOpen: this.isModalOpen("REWARD_MODAL"), header: "Congratulations!", contentIcon: "https://static.everymatrix.com/gic/img/engagement-suite/cup-reward.svg", modalType: "REWARD_MODAL", "show-animation": true, device: this.device }, h("div", { slot: "body" }, h("div", null, translate('won', this.language), " ", h("span", { class: 'ModalReward' }, this.rewardMessage)), this.hasError && (h("div", { class: "SupportInfo" }, translate('supportInfo', this.language)))), h("div", { slot: "footer" }, h("button", { class: 'ModalFooterButton', onClick: this.handleCloseClick, "data-type": 'REWARD_MODAL' }, translate('continue', this.language)))), h("casino-engagement-suite-modal", { isOpen: this.isModalOpen("JACKPOT_REWARD_MODAL"), header: "Congratulations!", contentIcon: "https://static.everymatrix.com/gic/img/engagement-suite/cup-reward.svg", "show-animation": true, modalType: "JACKPOT_REWARD_MODAL", device: this.device }, h("div", { slot: "body" }, h("div", { class: "JackpotWinText" }, translate('jackpotWin', this.language)), h("div", { class: "JackpotWinAmount" }, formatBalance(this.winAmount.amount, this.winAmount.currency))), h("div", { slot: "footer" }, h("button", { class: 'ModalFooterButton', onClick: this.handleCloseClick, "data-type": 'JACKPOT_REWARD_MODAL' }, translate('continue', this.language)), h("div", { class: "JackpotWinInfoText" }, translate('jackpotWinInfo', this.language)))), h("casino-engagement-suite-modal", { isOpen: this.isModalOpen("TARGET_MODAL"), header: ProgressToActivate ?
194
- translate('joinHeader', this.language) :
195
- translate('unJoinHeader', this.language), modalType: "TARGET_MODAL", device: this.device, isLoading: this.isJoiningToChallenge }, h("div", { slot: "body" }, h("div", { class: 'LeftAlign' }, translate('desc', this.language)), h("div", { class: 'LeftAlignQuestion' }, ProgressToActivate ?
196
- translate('joinQuestion', this.language) :
197
- translate('unJoinQuestion', this.language))), h("div", { slot: "footer", class: 'ManyActions' }, h("button", { class: `ModalFooterButton ${this.isJoiningToChallenge ? 'Disabled' : ''}`, onClick: this.handleChallengeAttendance }, ProgressToActivate ?
198
- translate('joinConfirm', this.language) :
199
- translate('unJoinConfirm', this.language)), h("button", { class: `ModalFooterButtonOutlined ${this.isJoiningToChallenge ? 'Disabled' : ''}`, onClick: this.handleCloseClick, "data-type": 'TARGET_MODAL' }, h("div", { class: 'GradientText' }, ProgressToActivate ?
200
- translate('joinReject', this.language) :
201
- translate('unJoinReject', this.language))))), h("casino-engagement-suite-modal", { 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", { slot: "body" }, h("span", null, translate('contactSupport', this.language))), h("div", { slot: "footer" }, h("button", { class: 'ModalFooterButton', onClick: this.handleCloseClick, "data-type": 'SUPPORT_MODAL' }, translate('okContinue', this.language))))));
202
- }
203
- get host() { return getElement(this); }
193
+ get host() { return getElement(this); }
204
194
  };
205
- CasinoEngagementSuiteModalContainer.style = casinoEngagementSuiteModalContainerCss;
195
+ CasinoEngagementSuiteModalContainer.style = CasinoEngagementSuiteModalContainerStyle0;
206
196
 
207
197
  export { CasinoEngagementSuiteModal as casino_engagement_suite_modal, CasinoEngagementSuiteModalContainer as casino_engagement_suite_modal_container };