@everymatrix/casino-engagement-suite-challenges-details 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 (57) hide show
  1. package/dist/casino-engagement-suite-challenges-details/casino-engagement-suite-challenges-details.esm.js +1 -1
  2. package/dist/casino-engagement-suite-challenges-details/p-11d8b487.js +2 -0
  3. package/dist/casino-engagement-suite-challenges-details/p-8bbfff73.entry.js +1 -0
  4. package/dist/casino-engagement-suite-challenges-details/p-e1255160.js +1 -0
  5. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  6. package/dist/cjs/casino-engagement-suite-challenges-details.cjs.js +17 -11
  7. package/dist/cjs/casino-engagement-suite-challenges-details_2.cjs.entry.js +293 -323
  8. package/dist/cjs/index-a758ba24.js +1249 -0
  9. package/dist/cjs/loader.cjs.js +7 -13
  10. package/dist/collection/collection-manifest.json +3 -3
  11. package/dist/collection/components/casino-engagement-suite-challenges-details/casino-engagement-suite-challenges-details.css +63 -61
  12. package/dist/collection/components/casino-engagement-suite-challenges-details/casino-engagement-suite-challenges-details.js +438 -493
  13. package/dist/collection/components/casino-engagement-suite-challenges-details/index.js +1 -0
  14. package/dist/collection/models/casino-challenges-details.js +10 -10
  15. package/dist/collection/utils/index.js +8 -2
  16. package/dist/collection/utils/locale.utils.js +18 -18
  17. package/dist/collection/utils/utils.js +3 -0
  18. package/dist/esm/app-globals-0f993ce5.js +3 -0
  19. package/dist/esm/casino-engagement-suite-challenges-details.js +14 -11
  20. package/dist/esm/casino-engagement-suite-challenges-details_2.entry.js +293 -323
  21. package/dist/esm/index-c193b756.js +1221 -0
  22. package/dist/esm/loader.js +7 -13
  23. package/dist/stencil.config.dev.js +17 -0
  24. package/dist/stencil.config.js +14 -19
  25. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-engagement-suite-challenges-details/.stencil/packages/stencil/casino-engagement-suite-challenges-details/stencil.config.d.ts +2 -0
  26. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-engagement-suite-challenges-details/.stencil/packages/stencil/casino-engagement-suite-challenges-details/stencil.config.dev.d.ts +2 -0
  27. package/dist/types/components/casino-engagement-suite-challenges-details/casino-engagement-suite-challenges-details.d.ts +70 -70
  28. package/dist/types/components/casino-engagement-suite-challenges-details/index.d.ts +1 -0
  29. package/dist/types/components.d.ts +21 -3
  30. package/dist/types/models/casino-challenges-details.d.ts +46 -46
  31. package/dist/types/stencil-public-runtime.d.ts +142 -33
  32. package/dist/types/utils/index.d.ts +1 -0
  33. package/dist/types/utils/utils.d.ts +1 -0
  34. package/loader/cdn.js +1 -3
  35. package/loader/index.cjs.js +1 -3
  36. package/loader/index.d.ts +13 -1
  37. package/loader/index.es2017.js +1 -3
  38. package/loader/index.js +1 -3
  39. package/loader/package.json +1 -0
  40. package/package.json +12 -2
  41. package/dist/casino-engagement-suite-challenges-details/p-80848cd8.entry.js +0 -1
  42. package/dist/casino-engagement-suite-challenges-details/p-808a7dc5.js +0 -1
  43. package/dist/cjs/index-a0eb9215.js +0 -1279
  44. package/dist/components/casino-engagement-suite-challenges-details.d.ts +0 -11
  45. package/dist/components/casino-engagement-suite-challenges-details.js +0 -318
  46. package/dist/components/casino-engagement-suite-progress-bar.js +0 -6
  47. package/dist/components/casino-engagement-suite-progress-bar2.js +0 -107
  48. package/dist/components/index.d.ts +0 -26
  49. package/dist/components/index.js +0 -1
  50. package/dist/esm/index-c5abae48.js +0 -1252
  51. package/dist/esm/polyfills/core-js.js +0 -11
  52. package/dist/esm/polyfills/css-shim.js +0 -1
  53. package/dist/esm/polyfills/dom.js +0 -79
  54. package/dist/esm/polyfills/es5-html-element.js +0 -1
  55. package/dist/esm/polyfills/index.js +0 -34
  56. package/dist/esm/polyfills/system.js +0 -6
  57. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/casino-engagement-suite-challenges-details/.stencil/packages/casino-engagement-suite-challenges-details/stencil.config.d.ts +0 -2
@@ -2,365 +2,335 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-a0eb9215.js');
5
+ const index = require('./index-a758ba24.js');
6
6
 
7
7
  const DEFAULT_LANGUAGE = 'en';
8
8
  const SUPPORTED_LANGUAGES = ['en'];
9
9
  const TRANSLATIONS = {
10
- en: {
11
- missions: 'Missions',
12
- join: 'Join',
13
- unjoin: 'Unjoin',
14
- new: 'new',
15
- details: 'Mission Details',
16
- tc: 'Terms & Conditions',
17
- level: 'Level',
18
- place: 'Place',
19
- bet: 'bet',
20
- bets: 'bets',
21
- win: 'Win',
22
- minBet: 'Min Bet',
23
- maxBet: 'Max Bet',
24
- contribution: 'Contribution'
25
- }
10
+ en: {
11
+ missions: 'Missions',
12
+ join: 'Join',
13
+ unjoin: 'Unjoin',
14
+ new: 'new',
15
+ details: 'Mission Details',
16
+ tc: 'Terms & Conditions',
17
+ level: 'Level',
18
+ place: 'Place',
19
+ bet: 'bet',
20
+ bets: 'bets',
21
+ win: 'Win',
22
+ minBet: 'Min Bet',
23
+ maxBet: 'Max Bet',
24
+ contribution: 'Contribution'
25
+ }
26
26
  };
27
27
  const translate = (key, customLang) => {
28
- const lang = customLang;
29
- return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
28
+ const lang = customLang;
29
+ return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
30
30
  };
31
31
 
32
32
  var ChallengeLevelProgressStatus;
33
33
  (function (ChallengeLevelProgressStatus) {
34
- ChallengeLevelProgressStatus[ChallengeLevelProgressStatus["Closed"] = 0] = "Closed";
35
- ChallengeLevelProgressStatus[ChallengeLevelProgressStatus["InProgress"] = 1] = "InProgress";
36
- ChallengeLevelProgressStatus[ChallengeLevelProgressStatus["Fillup"] = 2] = "Fillup";
37
- ChallengeLevelProgressStatus[ChallengeLevelProgressStatus["Completed"] = 3] = "Completed";
34
+ ChallengeLevelProgressStatus[ChallengeLevelProgressStatus["Closed"] = 0] = "Closed";
35
+ ChallengeLevelProgressStatus[ChallengeLevelProgressStatus["InProgress"] = 1] = "InProgress";
36
+ ChallengeLevelProgressStatus[ChallengeLevelProgressStatus["Fillup"] = 2] = "Fillup";
37
+ ChallengeLevelProgressStatus[ChallengeLevelProgressStatus["Completed"] = 3] = "Completed";
38
38
  })(ChallengeLevelProgressStatus || (ChallengeLevelProgressStatus = {}));
39
39
  var ChallengeProgressStatus;
40
40
  (function (ChallengeProgressStatus) {
41
- ChallengeProgressStatus[ChallengeProgressStatus["Started"] = 0] = "Started";
42
- ChallengeProgressStatus[ChallengeProgressStatus["InProgress"] = 1] = "InProgress";
43
- ChallengeProgressStatus[ChallengeProgressStatus["PendingLevelReward"] = 2] = "PendingLevelReward";
44
- ChallengeProgressStatus[ChallengeProgressStatus["Completed"] = 3] = "Completed";
45
- ChallengeProgressStatus[ChallengeProgressStatus["Expired"] = 4] = "Expired";
46
- ChallengeProgressStatus[ChallengeProgressStatus["Forfeited"] = 5] = "Forfeited";
41
+ ChallengeProgressStatus[ChallengeProgressStatus["Started"] = 0] = "Started";
42
+ ChallengeProgressStatus[ChallengeProgressStatus["InProgress"] = 1] = "InProgress";
43
+ ChallengeProgressStatus[ChallengeProgressStatus["PendingLevelReward"] = 2] = "PendingLevelReward";
44
+ ChallengeProgressStatus[ChallengeProgressStatus["Completed"] = 3] = "Completed";
45
+ ChallengeProgressStatus[ChallengeProgressStatus["Expired"] = 4] = "Expired";
46
+ ChallengeProgressStatus[ChallengeProgressStatus["Forfeited"] = 5] = "Forfeited";
47
47
  })(ChallengeProgressStatus || (ChallengeProgressStatus = {}));
48
48
 
49
49
  function formatBalance(amount, currency) {
50
- return `${currency}${new Intl.NumberFormat('en', { minimumFractionDigits: 2, maximumFractionDigits: 2 })
51
- .format(amount)}`;
50
+ return `${currency}${new Intl.NumberFormat('en', { minimumFractionDigits: 2, maximumFractionDigits: 2 })
51
+ .format(amount)}`;
52
52
  }
53
53
 
54
- const casinoEngagementSuiteChallengesDetailsCss = "@import url(\"https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;900&display=swap\"); :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}.ChallengeDetailsPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:8px;overflow:hidden;flex-direction:column;position:relative}.ChallengeActions{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.ChallengeActions .ChallengeIconButton{width:16px;height:16px;cursor:pointer}.ChallengeActions .ChallengeIconButton img{width:100%;height:100%}.ChallengeLabel{min-width:35px;height:18px;background:linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%);border-radius:2px;display:none;position:absolute;top:-23px;right:0px;padding:0 2px;align-items:center;justify-content:center}.ChallengeLabel span{display:inline-block;text-transform:uppercase;font-size:var(--emw--font-size-x-small, 10px);line-height:10px;font-weight:var(--emw--font-weight-bold, 700);font-family:\"Montserrat\", sans-serif;color:var(--emw--color-typography, #1E1638)}.ShowChallengeLabel{display:inline-flex}.ChallengeDetails{padding:0px 19px 10px;overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.ChallengeDetails::-webkit-scrollbar{display:none}.ChallengeDetails.IsNewChallenge{padding-top:25px}.ChallengeDetailsHeader{position:relative;display:flex;justify-content:space-between;gap:12px}.ChallengeDetailsHeader .ChallengeName{font-family:\"Montserrat\", sans-serif;font-size:var(--emw--font-size-medium, 18px);font-weight:var(--emw--font-weight-bold, 700);line-height:22px;color:var(--emfe-w-color-white, #FFF);word-break:break-word}.ChallengeJoinButton.Joined::before{content:\"\";position:absolute;inset:0;border-radius:var(--emw--button-border-radius, 4px);padding:1px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.ChallengeJoinButton{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:88px;height:32px;font-size:14px;font-weight:700;position:relative;font-family:\"Montserrat\", sans-serif}.ChallengeJoinButton.Joined{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ChallengeJoinButton.Joined::before{border-radius:99px}.Disabled{opacity:0.5;pointer-events:none;cursor:auto}.ChallengeCountdown{font-weight:var(--emw--font-weight-normal, 400);font-size:var(--emw--font-size-x-small, 12px);line-height:12px;margin-top:12px;color:var(--emw--color-gray-150, #BBB9C3)}.ChallengeCountdown.Expired{font-weight:var(--emw--font-weight-normal, 700);color:var(--emfe-w-color-white, #FFF)}.ChallengeCollapseButton{margin:24px 0 14px;display:flex;flex-direction:row;align-items:center;font-size:var(--emw--font-size-x-small, 12px);line-height:12px;color:var(--emw--color-primary-variant, #666178);cursor:pointer}.ChallengeCollapseButton .Toggle{width:16px;height:16px;display:block;margin-right:4px}.ChallengeCollapseButton .Closed{background:url(\"https://static.everymatrix.com/gic/img/engagement-suite/eye-closed.svg\") no-repeat center/contain}.ChallengeCollapseButton .Open{background:url(\"https://static.everymatrix.com/gic/img/engagement-suite/eye-open.svg\") no-repeat center/contain}.CollapseDetails{display:none;font-size:var(--emw--font-size-small, 14px);line-height:17px;font-weight:var(--emw--font-weight-normal, 400)}.CollapseDetails .ChallengeDescription{color:var(--emfe-w-color-white, #FFF);margin:12px 0}.CollapseDetails .TC{margin:12px 0 16px}.CollapseDetails .TC a{color:var(--emw--color-secondary, #59D1FF);text-underline-offset:3px}.CollapseDetails .ChallengeGames{width:100%;overflow-y:auto;display:flex;gap:4px}.CollapseDetails .ChallengeGames::-webkit-scrollbar{height:2px;background:none}.CollapseDetails .ChallengeGames::-webkit-scrollbar-thumb{border-radius:4px;background-color:var(--emw--color-background, #666178)}.CollapseDetails .ChallengeGames .Game img{width:96px;height:50px;border-radius:2px;cursor:pointer}.ShowDetails{display:block}.ChallengeLevels{display:flex;flex-direction:column;gap:16px;margin-top:24px;color:var(--emw--color-primary, #8F8B9C);font-size:var(--emw--font-size-small, 12px);font-weight:var(--emw--font-weight-normal, 400);line-height:12px}.ChallengeLevels .ChallengeLevelCard{border:1px solid var(--emw--button-border-color, #403956);padding:16px;border-radius:8px}.ChallengeLevels .ChallengeLevelCard .ChallengeLevelBetDetails{margin-top:25px;display:flex;flex-wrap:wrap;gap:8px}.ChallengeLevels .ChallengeLevelCard .ChallengeLevelBetDetail:not(:last-of-type){margin-right:8px}.ChallengeLevels .ChallengeLevelCard .ChallengeLevelBetRange,.ChallengeLevels .ChallengeLevelCard .ChallengeLevelBetContribution{font-weight:var(--emw--font-weight-semibold, 600)}.ChallengeLevels .ChallengeLevelCard .ChallengeLevelTitle{margin-bottom:2px}.ChallengeLevels .ChallengeLevelCard .ChallengeRewardMessage{margin-top:10px;line-height:15px;display:flex;flex-direction:row;align-items:center;gap:4px}.ChallengeLevels .ChallengeLevelCard .ChallengeRewardMessage .CustomRewardMessage{font-weight:var(--emw--font-weight-semibold, 600);word-break:break-word}.ChallengeLevels .InProgress{position:relative;border:none}.ChallengeLevels .InProgress .ChallengeLevelTarget,.ChallengeLevels .InProgress .CustomRewardMessage{color:var(--emfe-w-color-white, #FFF)}.ChallengeLevels .InProgress::before{content:\"\";position:absolute;inset:0;border-radius:8px;padding:1px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-mask:linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.ChallengeDetailsPopup.Tablet .ChallengeActions,.ChallengeDetailsPopup.Desktop .ChallengeActions{padding-top:16px}.ChallengeDetailsPopup.Tablet .ChallengeIconButton,.ChallengeDetailsPopup.Desktop .ChallengeIconButton{width:24px;height:24px}.ChallengeDetailsPopup.Tablet .ChallengeDetails,.ChallengeDetailsPopup.Desktop .ChallengeDetails{padding:20px 24px}.ChallengeDetailsPopup.Tablet .ChallengeDetails.IsNewChallenge,.ChallengeDetailsPopup.Desktop .ChallengeDetails.IsNewChallenge{padding-top:25px}.ChallengeDetailsPopup.Tablet .ChallengeName,.ChallengeDetailsPopup.Desktop .ChallengeName{line-height:27px;font-size:22px}.ChallengeDetailsPopup.Tablet .ChallengeJoinButton,.ChallengeDetailsPopup.Desktop .ChallengeJoinButton{min-width:100px;height:36px;font-size:16px}.ChallengeDetailsPopup.Tablet .ChallengeCountdown,.ChallengeDetailsPopup.Tablet .ChallengeLevels,.ChallengeDetailsPopup.Desktop .ChallengeCountdown,.ChallengeDetailsPopup.Desktop .ChallengeLevels{font-size:var(--emw--font-size-small, 14px);line-height:14px}.ChallengeDetailsPopup.Tablet .ChallengeCollapseButton,.ChallengeDetailsPopup.Desktop .ChallengeCollapseButton{margin-bottom:12px}.ChallengeDetailsPopup.Tablet .CollapseDetails .ChallengeDescription,.ChallengeDetailsPopup.Desktop .CollapseDetails .ChallengeDescription{font-size:var(--emw--font-size-medium, 16px);line-height:19px}.ChallengeDetailsPopup.Tablet .ChallengeLevels .ChallengeLevelTitle,.ChallengeDetailsPopup.Desktop .ChallengeLevels .ChallengeLevelTitle{margin-bottom:4px}.ChallengeDetailsPopup.Tablet .ChallengeLevels .ChallengeRewardMessage,.ChallengeDetailsPopup.Desktop .ChallengeLevels .ChallengeRewardMessage{margin-top:12px;line-height:17px}";
54
+ const casinoEngagementSuiteChallengesDetailsCss = ":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:16px;height:16px}.EngagementSuiteIconButton.Back{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/back.svg) no-repeat;cursor:pointer}.EngagementSuiteIconButton.Close{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/close.svg) no-repeat;cursor:pointer}.EngagementSuiteIconButton.Reward{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/reward.svg) no-repeat}.ChallengeDetailsPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);overflow:hidden;flex-direction:column;position:relative}.ChallengeActions{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.ChallengeLabel{min-width:35px;height:18px;background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));border-radius:var(--emw--border-radius-x-small, 2px);display:none;position:absolute;top:-23px;right:0px;padding:0 2px;align-items:center;justify-content:center}.ChallengeLabel span{display:inline-block;text-transform:uppercase;font-size:var(--emw--font-size-2x-small, 10px);line-height:10px;font-weight:var(--emw--font-weight-bold, 700);font-family:var(--emw--font-family-secondary, \"Montserrat\", sans-serif);color:var(--emw--color-background, #1E1638)}.ShowChallengeLabel{display:inline-flex}.ChallengeDetails{padding:0px 19px 10px;overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.ChallengeDetails::-webkit-scrollbar{display:none}.ChallengeDetails.IsNewChallenge{padding-top:25px}.ChallengeDetailsHeader{position:relative;display:flex;justify-content:space-between;gap:12px}.ChallengeDetailsHeader .ChallengeName{font-family:var(--emw--font-family-secondary, \"Montserrat\", sans-serif);font-size:var(--emw--font-size-medium-plus, 18px);font-weight:var(--emw--font-weight-bold, 700);line-height:22px;color:var(--emw--color-typography, #FFF);word-break:break-word}.EngagementSuiteButton{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:88px;height:32px;font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-bold, 700);position:relative;font-family:var(--emw--font-family-secondary, \"Montserrat\", sans-serif)}.EngagementSuiteButton.Active{background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.EngagementSuiteButton.Active::before{content:\"\";position:absolute;inset:0;padding:1px;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude;border-radius:99px}.Disabled{opacity:0.5;pointer-events:none;cursor:auto}.ChallengeCountdown{font-weight:var(--emw--font-weight-normal, 400);font-size:var(--emw--font-size-x-small, 12px);line-height:12px;margin-top:12px;color:var(--emw--color-secondary, #BBB9C3)}.ChallengeCountdown.Expired{font-weight:var(--emw--font-weight-bold, 700);color:var(--emw--color-typography, #FFF)}.ChallengeCollapseButton{margin:24px 0 14px;display:flex;flex-direction:row;align-items:center;font-size:var(--emw--font-size-x-small, 12px);line-height:12px;color:var(--emw--color-gray-300, #666178);cursor:pointer}.ChallengeCollapseButton .Toggle{width:16px;height:16px;display:block;margin-right:4px}.ChallengeCollapseButton .Closed{background:url(\"https://static.everymatrix.com/gic/img/engagement-suite/eye-closed.svg\") no-repeat center/contain}.ChallengeCollapseButton .Open{background:url(\"https://static.everymatrix.com/gic/img/engagement-suite/eye-open.svg\") no-repeat center/contain}.CollapseDetails{display:none;font-size:var(--emw--font-size-small, 14px);line-height:17px;font-weight:var(--emw--font-weight-normal, 400)}.CollapseDetails .ChallengeDescription{color:var(--emw--color-typography, #FFF);margin:12px 0}.CollapseDetails .TC{margin:12px 0 16px}.CollapseDetails .TC a{color:var(--emw--color-contrast, #59D1FF);text-underline-offset:3px}.CollapseDetails .ChallengeGames{width:100%;overflow-y:auto;display:flex;gap:4px}.CollapseDetails .ChallengeGames::-webkit-scrollbar{height:2px;background:none}.CollapseDetails .ChallengeGames::-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))}.CollapseDetails .ChallengeGames .Game img{width:96px;height:50px;border-radius:var(--emw--border-radius-x-small, 2px);cursor:pointer}.ShowDetails{display:block}.ChallengeLevels{display:flex;flex-direction:column;gap:16px;margin-top:24px;color:var(--emw--color-gray-150, #8F8B9C);font-size:var(--emw--font-size-x-small, 12px);font-weight:var(--emw--font-weight-normal, 400);line-height:12px}.ChallengeLevels .ChallengeLevelCard{border:1px solid var(--emw--button-border-color, #403956);padding:16px;border-radius:var(--emw--border-radius-large, 8px)}.ChallengeLevels .ChallengeLevelCard .ChallengeLevelBetDetails{margin-top:25px;display:flex;flex-wrap:wrap;gap:8px}.ChallengeLevels .ChallengeLevelCard .ChallengeLevelBetDetail:not(:last-of-type){margin-right:8px}.ChallengeLevels .ChallengeLevelCard .ChallengeLevelBetRange,.ChallengeLevels .ChallengeLevelCard .ChallengeLevelBetContribution{font-weight:var(--emw--font-weight-semibold, 600)}.ChallengeLevels .ChallengeLevelCard .ChallengeLevelTitle{margin-bottom:2px}.ChallengeLevels .ChallengeLevelCard .ChallengeRewardMessage{margin-top:10px;line-height:15px;display:flex;flex-direction:row;align-items:center;gap:4px}.ChallengeLevels .ChallengeLevelCard .ChallengeRewardMessage .CustomRewardMessage{font-weight:var(--emw--font-weight-semibold, 600);word-break:break-word}.ChallengeLevels .InProgress{position:relative;border:none}.ChallengeLevels .InProgress .ChallengeLevelTarget,.ChallengeLevels .InProgress .CustomRewardMessage{color:var(--emw--color-typography, #FFF)}.ChallengeLevels .InProgress::before{content:\"\";position:absolute;inset:0;border-radius:var(--emw--border-radius-large, 8px);padding:1px;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-mask:linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.ChallengeDetailsPopup.Tablet .ChallengeActions,.ChallengeDetailsPopup.Desktop .ChallengeActions{padding-top:16px}.ChallengeDetailsPopup.Tablet .EngagementSuiteIconButton,.ChallengeDetailsPopup.Desktop .EngagementSuiteIconButton{width:24px;height:24px}.ChallengeDetailsPopup.Tablet .ChallengeDetails,.ChallengeDetailsPopup.Desktop .ChallengeDetails{padding:20px 24px}.ChallengeDetailsPopup.Tablet .ChallengeDetails.IsNewChallenge,.ChallengeDetailsPopup.Desktop .ChallengeDetails.IsNewChallenge{padding-top:25px}.ChallengeDetailsPopup.Tablet .ChallengeName,.ChallengeDetailsPopup.Desktop .ChallengeName{line-height:27px;font-size:var(--emw--font-size-large-plus, 22px)}.ChallengeDetailsPopup.Tablet .EngagementSuiteButton,.ChallengeDetailsPopup.Desktop .EngagementSuiteButton{min-width:100px;height:36px;font-size:var(--emw--font-size-medium, 16px)}.ChallengeDetailsPopup.Tablet .ChallengeCountdown,.ChallengeDetailsPopup.Tablet .ChallengeLevels,.ChallengeDetailsPopup.Desktop .ChallengeCountdown,.ChallengeDetailsPopup.Desktop .ChallengeLevels{font-size:var(--emw--font-size-small, 14px);line-height:14px}.ChallengeDetailsPopup.Tablet .ChallengeCollapseButton,.ChallengeDetailsPopup.Desktop .ChallengeCollapseButton{margin-bottom:12px}.ChallengeDetailsPopup.Tablet .CollapseDetails .ChallengeDescription,.ChallengeDetailsPopup.Desktop .CollapseDetails .ChallengeDescription{font-size:var(--emw--font-size-medium, 16px);line-height:19px}.ChallengeDetailsPopup.Tablet .ChallengeLevels .ChallengeLevelTitle,.ChallengeDetailsPopup.Desktop .ChallengeLevels .ChallengeLevelTitle{margin-bottom:4px}.ChallengeDetailsPopup.Tablet .ChallengeLevels .ChallengeRewardMessage,.ChallengeDetailsPopup.Desktop .ChallengeLevels .ChallengeRewardMessage{margin-top:12px;line-height:17px}";
55
+ const CasinoEngagementSuiteChallengesDetailsStyle0 = casinoEngagementSuiteChallengesDetailsCss;
55
56
 
56
57
  const CasinoEngagementSuiteChallengesDetails = class {
57
- constructor(hostRef) {
58
- index.registerInstance(this, hostRef);
59
- this.close = index.createEvent(this, "close", 7);
60
- this.back = index.createEvent(this, "back", 7);
61
- this.resetNewChallengeLabel = index.createEvent(this, "resetNewChallengeLabel", 7);
62
- /**
63
- * Client custom styling via string
64
- */
65
- this.clientStyling = '';
66
- /**
67
- * Client custom styling via url
68
- */
69
- this.clientStylingUrl = '';
70
- /**
71
- * Language of the widget
72
- */
73
- this.language = 'en';
74
- /**
75
- * Current game slug
76
- */
77
- this.gameSlug = '';
78
- /**
79
- * User's device type
80
- */
81
- this.device = 'Mobile';
82
- /**
83
- *Paused Challenge Ids
84
- */
85
- this.pausedChallengeIds = [];
86
- this.limitStylingAppends = false;
87
- this.timer = '';
88
- this.showDetails = false;
89
- this.isExpiredChallenge = false;
90
- this.setClientStyling = () => {
91
- let sheet = document.createElement('style');
92
- sheet.innerHTML = this.clientStyling;
93
- this.host.prepend(sheet);
94
- };
95
- this.setClientStylingURL = () => {
96
- let url = new URL(this.clientStylingUrl);
97
- let cssFile = document.createElement('style');
98
- fetch(url.href)
99
- .then((res) => res.text())
100
- .then((data) => {
101
- cssFile.innerHTML = data;
102
- setTimeout(() => { this.host.prepend(cssFile); }, 1);
103
- })
104
- .catch((err) => {
105
- console.log('Error ', err);
106
- });
107
- };
108
- this.handleCloseClick = () => {
109
- this.resetNewLabel();
110
- this.close.emit();
111
- };
112
- this.handleBackClick = () => {
113
- this.resetNewLabel();
114
- this.back.emit();
115
- };
116
- this.onGameClick = (ev) => {
117
- const slug = ev.currentTarget.getAttribute('data-slug');
118
- if (slug) {
119
- window.postMessage({
120
- type: 'EngagementSuiteGameRedirect',
121
- data: {
122
- Slug: slug
123
- }
124
- });
125
- }
126
- };
127
- this.changeChallengeStatus = (e) => {
128
- var _a, _b;
129
- const id = e.currentTarget.getAttribute('data-id');
130
- if ((_a = this.inProgressChallenges) === null || _a === void 0 ? void 0 : _a.includes(id)) {
131
- window.postMessage({
132
- type: 'ShowConfirmationModal',
133
- ProgressToDeactivate: id,
134
- });
135
- return;
136
- }
137
- if (((_b = this.inProgressChallenges) === null || _b === void 0 ? void 0 : _b.length) > 0) {
138
- window.postMessage({
139
- type: 'ShowConfirmationModal',
140
- ProgressToActivate: id,
141
- ProgressToDeactivate: this.inProgressChallenges[0],
142
- });
143
- return;
144
- }
145
- window.postMessage({
146
- type: 'ChallengeJoinRequest',
147
- data: {
148
- ProgressToActivate: id,
149
- },
150
- });
151
- };
152
- this.toggle = () => {
153
- this.showDetails = !this.showDetails;
154
- };
155
- }
156
- challengePropHandler(value) {
157
- if (!this.interval && value) {
158
- this.updateTimer();
159
- this.startCountdown();
58
+ constructor(hostRef) {
59
+ index.registerInstance(this, hostRef);
60
+ this.close = index.createEvent(this, "close", 7);
61
+ this.back = index.createEvent(this, "back", 7);
62
+ this.resetNewChallengeLabel = index.createEvent(this, "resetNewChallengeLabel", 7);
63
+ this.setClientStyling = () => {
64
+ let sheet = document.createElement('style');
65
+ sheet.innerHTML = this.clientStyling;
66
+ this.host.prepend(sheet);
67
+ };
68
+ this.setClientStylingURL = () => {
69
+ let url = new URL(this.clientStylingUrl);
70
+ let cssFile = document.createElement('style');
71
+ fetch(url.href)
72
+ .then((res) => res.text())
73
+ .then((data) => {
74
+ cssFile.innerHTML = data;
75
+ setTimeout(() => { this.host.prepend(cssFile); }, 1);
76
+ })
77
+ .catch((err) => {
78
+ console.log('Error ', err);
79
+ });
80
+ };
81
+ this.handleCloseClick = () => {
82
+ this.resetNewLabel();
83
+ this.close.emit();
84
+ };
85
+ this.handleBackClick = () => {
86
+ this.resetNewLabel();
87
+ this.back.emit();
88
+ };
89
+ this.onGameClick = (ev) => {
90
+ const slug = ev.currentTarget.getAttribute('data-slug');
91
+ if (slug) {
92
+ window.postMessage({
93
+ type: 'EngagementSuiteGameRedirect',
94
+ data: {
95
+ Slug: slug
96
+ }
97
+ });
98
+ }
99
+ };
100
+ this.changeChallengeStatus = (e) => {
101
+ var _a, _b;
102
+ const id = e.currentTarget.getAttribute('data-id');
103
+ if ((_a = this.inProgressChallenges) === null || _a === void 0 ? void 0 : _a.includes(id)) {
104
+ window.postMessage({
105
+ type: 'ShowConfirmationModal',
106
+ ProgressToDeactivate: id,
107
+ });
108
+ return;
109
+ }
110
+ if (((_b = this.inProgressChallenges) === null || _b === void 0 ? void 0 : _b.length) > 0) {
111
+ window.postMessage({
112
+ type: 'ShowConfirmationModal',
113
+ ProgressToActivate: id,
114
+ ProgressToDeactivate: this.inProgressChallenges[0],
115
+ });
116
+ return;
117
+ }
118
+ window.postMessage({
119
+ type: 'ChallengeJoinRequest',
120
+ data: {
121
+ ProgressToActivate: id,
122
+ },
123
+ });
124
+ };
125
+ this.toggle = () => {
126
+ this.showDetails = !this.showDetails;
127
+ };
128
+ this.clientStyling = '';
129
+ this.clientStylingUrl = '';
130
+ this.challenge = undefined;
131
+ this.inProgressChallenges = undefined;
132
+ this.language = 'en';
133
+ this.gameSlug = '';
134
+ this.device = 'Mobile';
135
+ this.isJoiningToChallenge = undefined;
136
+ this.pausedChallengeIds = [];
137
+ this.limitStylingAppends = false;
138
+ this.timer = '';
139
+ this.showDetails = false;
140
+ this.isExpiredChallenge = false;
141
+ }
142
+ challengePropHandler(value) {
143
+ if (!this.interval && value) {
144
+ this.updateTimer();
145
+ this.startCountdown();
146
+ }
147
+ if (this.interval && !value) {
148
+ clearInterval(this.interval);
149
+ }
150
+ }
151
+ componentWillLoad() {
152
+ this.challengePropHandler(this.challenge);
153
+ }
154
+ componentDidRender() {
155
+ if (!this.limitStylingAppends && this.host) {
156
+ if (this.clientStyling)
157
+ this.setClientStyling();
158
+ if (this.clientStylingUrl)
159
+ this.setClientStylingURL();
160
+ this.limitStylingAppends = true;
161
+ }
160
162
  }
161
- if (this.interval && !value) {
162
- clearInterval(this.interval);
163
+ disconnectedCallback() {
164
+ this.interval && clearInterval(this.interval);
163
165
  }
164
- }
165
- componentWillLoad() {
166
- this.challengePropHandler(this.challenge);
167
- }
168
- componentDidRender() {
169
- if (!this.limitStylingAppends && this.host) {
170
- if (this.clientStyling)
171
- this.setClientStyling();
172
- if (this.clientStylingUrl)
173
- this.setClientStylingURL();
174
- this.limitStylingAppends = true;
166
+ getActionsTemplate() {
167
+ return (index.h("header", { class: "ChallengeActions" }, index.h("button", { class: "EngagementSuiteIconButton Back", onClick: this.handleBackClick }), index.h("button", { class: "EngagementSuiteIconButton Close", onClick: this.handleCloseClick })));
175
168
  }
176
- }
177
- disconnectedCallback() {
178
- this.interval && clearInterval(this.interval);
179
- }
180
- getActionsTemplate() {
181
- return (index.h("header", { class: "ChallengeActions" }, index.h("button", { class: "ChallengeIconButton", onClick: this.handleBackClick }, index.h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/back.svg", alt: "back" })), index.h("button", { class: "ChallengeIconButton", onClick: this.handleCloseClick }, index.h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/close.svg", alt: "close" }))));
182
- }
183
- getChallengeHeader() {
184
- const presentationName = this.challenge.ChallengePresentation.PresentationName;
185
- const inProgressChallenge = this.challenge.Status === ChallengeProgressStatus.InProgress
186
- || this.challenge.Status === ChallengeProgressStatus.PendingLevelReward;
187
- const isDisabledButton = this.isExpiredChallenge || this.isJoiningToChallenge ||
188
- this.pausedChallengeIds.includes(this.challenge.ChallengeId);
189
- const showJoinButton = ![ChallengeProgressStatus.Completed, ChallengeProgressStatus.Forfeited]
190
- .includes(this.challenge.Status);
191
- return (index.h("div", { class: "ChallengeDetailsHeader" }, index.h("span", { class: "ChallengeName" }, presentationName), showJoinButton ? (index.h("button", { onClick: this.changeChallengeStatus, class: `ChallengeJoinButton ${inProgressChallenge ? 'Joined' : ''}
169
+ getChallengeHeader() {
170
+ const presentationName = this.challenge.ChallengePresentation.PresentationName;
171
+ const inProgressChallenge = this.challenge.Status === ChallengeProgressStatus.InProgress
172
+ || this.challenge.Status === ChallengeProgressStatus.PendingLevelReward;
173
+ const isDisabledButton = this.isExpiredChallenge || this.isJoiningToChallenge ||
174
+ this.pausedChallengeIds.includes(this.challenge.ChallengeId);
175
+ const showJoinButton = ![ChallengeProgressStatus.Completed, ChallengeProgressStatus.Forfeited]
176
+ .includes(this.challenge.Status);
177
+ const showNewLabel = this.challenge.Status !== ChallengeProgressStatus.Forfeited;
178
+ return (index.h("div", { class: "ChallengeDetailsHeader" }, index.h("span", { class: "ChallengeName" }, presentationName), showJoinButton ? (index.h("button", { onClick: this.changeChallengeStatus, class: `EngagementSuiteButton ${inProgressChallenge ? 'Active' : ''}
192
179
  ${isDisabledButton ? 'Disabled' : ''}`, "data-id": this.challenge.Id }, inProgressChallenge
193
- ? translate('unjoin', this.language)
194
- : translate('join', this.language))) : null, index.h("div", { class: `ChallengeLabel ${this.challenge.IsNew ? 'ShowChallengeLabel' : ''}` }, index.h("span", null, translate('new', this.language)))));
195
- }
196
- getChallengeCountdown() {
197
- const timerMessage = this.isExpiredChallenge ? 'Expired' : this.timer;
198
- const showChallengeCountdown = this.challenge.Status !== ChallengeProgressStatus.Forfeited;
199
- return (showChallengeCountdown ? (index.h("div", { class: `ChallengeCountdown ${this.isExpiredChallenge ? 'Expired' : ''}` }, timerMessage)) : null);
200
- }
201
- getChallengeDetails() {
202
- const description = this.challenge.ChallengePresentation.Description;
203
- const url = this.challenge.ChallengePresentation.Url;
204
- const games = this.challenge.Games;
205
- return (index.h("div", { class: `CollapseDetails ${this.showDetails ? 'ShowDetails' : ''}` }, description && index.h("div", { class: "ChallengeDescription" }, description), url && (index.h("div", { class: "TC" }, index.h("a", { href: url, target: "_blank" }, translate('tc', this.language)))), (games === null || games === void 0 ? void 0 : games.length) && (index.h("div", { class: "ChallengeGames" }, games.map((game) => (index.h("div", { class: "Game", key: game.CasinoGameId }, index.h("img", { src: game.GameIcon, alt: game.GameName, onClick: this.onGameClick, class: `${game.GameSlug === this.gameSlug ? 'Disabled' : ''}`, "data-slug": game.GameSlug }))))))));
206
- }
207
- resetNewLabel() {
208
- this.resetNewChallengeLabel.emit(this.challenge.Id);
209
- }
210
- startCountdown() {
211
- this.interval = setInterval(() => {
212
- this.updateTimer();
213
- }, 1000);
214
- }
215
- updateTimer() {
216
- const expirationTime = new Date(this.challenge.ExpirationTime).getTime();
217
- const now = new Date().getTime();
218
- const distance = expirationTime - now;
219
- if (distance < 1) {
220
- clearInterval(this.interval);
221
- this.timer = '';
222
- this.isExpiredChallenge = true;
223
- return;
180
+ ? translate('unjoin', this.language)
181
+ : translate('join', this.language))) : null, showNewLabel ? (index.h("div", { class: `ChallengeLabel ${this.challenge.IsNew ? 'ShowChallengeLabel' : ''}` }, index.h("span", null, translate('new', this.language)))) : null));
182
+ }
183
+ getChallengeCountdown() {
184
+ const timerMessage = this.isExpiredChallenge ? 'Expired' : this.timer;
185
+ const showChallengeCountdown = this.challenge.Status !== ChallengeProgressStatus.Forfeited;
186
+ return (showChallengeCountdown ? (index.h("div", { class: `ChallengeCountdown ${this.isExpiredChallenge ? 'Expired' : ''}` }, timerMessage)) : null);
187
+ }
188
+ getChallengeDetails() {
189
+ const description = this.challenge.ChallengePresentation.Description;
190
+ const url = this.challenge.ChallengePresentation.Url;
191
+ const games = this.challenge.Games;
192
+ return (index.h("div", { class: `CollapseDetails ${this.showDetails ? 'ShowDetails' : ''}` }, description && index.h("div", { class: "ChallengeDescription" }, description), url && (index.h("div", { class: "TC" }, index.h("a", { href: url, target: "_blank" }, translate('tc', this.language)))), (games === null || games === void 0 ? void 0 : games.length) && (index.h("div", { class: "ChallengeGames" }, games.map((game) => (index.h("div", { class: "Game", key: game.CasinoGameId }, index.h("img", { src: game.GameIcon, alt: game.GameName, onClick: this.onGameClick, class: `${game.GameSlug === this.gameSlug ? 'Disabled' : ''}`, "data-slug": game.GameSlug }))))))));
193
+ }
194
+ resetNewLabel() {
195
+ this.resetNewChallengeLabel.emit(this.challenge.Id);
224
196
  }
225
- const { days, hours, minutes, seconds } = {
226
- days: String(Math.floor(distance / (1000 * 60 * 60 * 24))).padStart(2, '0'),
227
- hours: String(Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60))).padStart(2, '0'),
228
- minutes: String(Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60))).padStart(2, '0'),
229
- seconds: String(Math.floor((distance % (1000 * 60)) / 1000)).padStart(2, '0')
230
- };
231
- this.timer = days === '00'
232
- ? `${hours}h:${minutes}m:${seconds}s`
233
- : `${days}d:${hours}h:${minutes}m`;
234
- }
235
- getLevelTarget(level) {
236
- const targetTurnover = formatBalance(level.DisplayCurrencyTargetTurnover, this.challenge.CurrencySymbol);
237
- let levelTarget = `${translate('place', this.language)} ${targetTurnover}`;
238
- if (level.LevelTargetType === 1) {
239
- levelTarget += ` ${translate('bet', this.language)}`;
197
+ startCountdown() {
198
+ this.interval = setInterval(() => {
199
+ this.updateTimer();
200
+ }, 1000);
240
201
  }
241
- else if (level.LevelTargetType === 2) {
242
- levelTarget += ` ${translate('bets', this.language)} X ${level.TargetBetCount}`;
202
+ updateTimer() {
203
+ const expirationTime = new Date(this.challenge.ExpirationTime).getTime();
204
+ const now = new Date().getTime();
205
+ const distance = expirationTime - now;
206
+ if (distance < 1) {
207
+ clearInterval(this.interval);
208
+ this.timer = '';
209
+ this.isExpiredChallenge = true;
210
+ return;
211
+ }
212
+ const { days, hours, minutes, seconds } = {
213
+ days: String(Math.floor(distance / (1000 * 60 * 60 * 24))).padStart(2, '0'),
214
+ hours: String(Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60))).padStart(2, '0'),
215
+ minutes: String(Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60))).padStart(2, '0'),
216
+ seconds: String(Math.floor((distance % (1000 * 60)) / 1000)).padStart(2, '0')
217
+ };
218
+ this.timer = days === '00'
219
+ ? `${hours}h:${minutes}m:${seconds}s`
220
+ : `${days}d:${hours}h:${minutes}m`;
243
221
  }
244
- return (index.h("span", { class: "ChallengeLevelTarget" }, levelTarget));
245
- }
246
- getLevelBetRangesDetails(level) {
247
- var _a, _b, _c, _d;
248
- const isAccumulativeLevelType = level.LevelTargetType === 0;
249
- if (isAccumulativeLevelType) {
250
- const formattedMinBet = formatBalance((_a = level.BetRange) === null || _a === void 0 ? void 0 : _a.MinBet, this.challenge.CurrencySymbol);
251
- const formattedMaxBet = formatBalance((_b = level.BetRange) === null || _b === void 0 ? void 0 : _b.MaxBet, this.challenge.CurrencySymbol);
252
- const formattedContributionPercentage = level.LevelContributionPercent + '%';
253
- const showMinBet = !!((_c = level.BetRange) === null || _c === void 0 ? void 0 : _c.MinBet);
254
- const showMaxBet = !!((_d = level.BetRange) === null || _d === void 0 ? void 0 : _d.MaxBet);
255
- const showContributionPercentage = level.LevelContributionPercent !== 100;
256
- if (showMinBet || showMaxBet || showContributionPercentage) {
257
- return (index.h("div", { class: 'ChallengeLevelBetDetails' }, showMinBet &&
258
- index.h("div", { class: 'ChallengeLevelBetDetail' }, index.h("span", null, translate('minBet', this.language), ": "), index.h("span", { class: 'ChallengeLevelBetRange' }, formattedMinBet)), showMaxBet &&
259
- index.h("div", { class: 'ChallengeLevelBetDetail' }, index.h("span", null, translate('maxBet', this.language), ": "), index.h("span", { class: 'ChallengeLevelBetRange' }, formattedMaxBet)), showContributionPercentage &&
260
- index.h("div", { class: 'ChallengeLevelBetDetail' }, index.h("span", null, translate('contribution', this.language), ": "), index.h("span", { class: 'ChallengeLevelBetContribution' }, formattedContributionPercentage))));
261
- }
222
+ getLevelTarget(level) {
223
+ const targetTurnover = formatBalance(level.DisplayCurrencyTargetTurnover, this.challenge.CurrencySymbol);
224
+ let levelTarget = `${translate('place', this.language)} ${targetTurnover}`;
225
+ if (level.LevelTargetType === 1) {
226
+ levelTarget += ` ${translate('bet', this.language)}`;
227
+ }
228
+ else if (level.LevelTargetType === 2) {
229
+ levelTarget += ` ${translate('bets', this.language)} X ${level.TargetBetCount}`;
230
+ }
231
+ return (index.h("span", { class: "ChallengeLevelTarget" }, levelTarget));
262
232
  }
263
- }
264
- getChallengeLevels() {
265
- const isChallengePaused = this.pausedChallengeIds.includes(this.challenge.ChallengeId);
266
- const InProgressLevel = (level) => {
267
- return level.ProgressStatus === 1 && !this.isExpiredChallenge && !isChallengePaused;
268
- };
269
- return (index.h("div", { class: "ChallengeLevels" }, this.challenge.LevelProgresses.map((level, index$1) => (index.h("div", { class: `ChallengeLevelCard ${InProgressLevel(level) ? 'InProgress' : ''}` }, index.h("casino-engagement-suite-progress-bar", { class: this.device, value: level.ProgressPercentage, "hide-percent": (level.ProgressPercentage === 0 && !InProgressLevel(level)) || level.ProgressPercentage === 100, disabled: this.isExpiredChallenge || isChallengePaused }, index.h("span", { slot: "Title", class: "ChallengeLevelTitle" }, index.h("span", null, "Level ", index$1 + 1, ": "), this.getLevelTarget(level))), index.h("div", { class: "ChallengeRewardMessage" }, index.h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/reward.svg", alt: "win" }), index.h("span", null, translate('win', this.language), ": "), index.h("span", { class: "CustomRewardMessage" }, level.CustomRewardMessage)), this.getLevelBetRangesDetails(level))))));
270
- }
271
- getToggleButton() {
272
- return (index.h("div", { class: "ChallengeCollapseButton", onClick: this.toggle }, index.h("span", { class: `Toggle ${this.showDetails ? 'Closed' : 'Open'}` }), index.h("span", null, translate('details', this.language))));
273
- }
274
- render() {
275
- return index.h("div", { class: `ChallengeDetailsPopup ${this.device}` }, this.getActionsTemplate(), index.h("div", { class: `ChallengeDetails ${this.challenge.IsNew ? 'IsNewChallenge' : ''}` }, this.getChallengeHeader(), this.getChallengeCountdown(), this.getToggleButton(), this.getChallengeDetails(), this.getChallengeLevels()));
276
- }
277
- get host() { return index.getElement(this); }
278
- static get watchers() { return {
279
- "challenge": ["challengePropHandler"]
280
- }; }
233
+ getLevelBetRangesDetails(level) {
234
+ var _a, _b, _c, _d;
235
+ const isAccumulativeLevelType = level.LevelTargetType === 0;
236
+ if (isAccumulativeLevelType) {
237
+ const formattedMinBet = formatBalance((_a = level.BetRange) === null || _a === void 0 ? void 0 : _a.MinBet, this.challenge.CurrencySymbol);
238
+ const formattedMaxBet = formatBalance((_b = level.BetRange) === null || _b === void 0 ? void 0 : _b.MaxBet, this.challenge.CurrencySymbol);
239
+ const formattedContributionPercentage = level.LevelContributionPercent + '%';
240
+ const showMinBet = !!((_c = level.BetRange) === null || _c === void 0 ? void 0 : _c.MinBet);
241
+ const showMaxBet = !!((_d = level.BetRange) === null || _d === void 0 ? void 0 : _d.MaxBet);
242
+ const showContributionPercentage = level.LevelContributionPercent !== 100;
243
+ if (showMinBet || showMaxBet || showContributionPercentage) {
244
+ return (index.h("div", { class: 'ChallengeLevelBetDetails' }, showMinBet &&
245
+ index.h("div", { class: 'ChallengeLevelBetDetail' }, index.h("span", null, translate('minBet', this.language), ": "), index.h("span", { class: 'ChallengeLevelBetRange' }, formattedMinBet)), showMaxBet &&
246
+ index.h("div", { class: 'ChallengeLevelBetDetail' }, index.h("span", null, translate('maxBet', this.language), ": "), index.h("span", { class: 'ChallengeLevelBetRange' }, formattedMaxBet)), showContributionPercentage &&
247
+ index.h("div", { class: 'ChallengeLevelBetDetail' }, index.h("span", null, translate('contribution', this.language), ": "), index.h("span", { class: 'ChallengeLevelBetContribution' }, formattedContributionPercentage))));
248
+ }
249
+ }
250
+ }
251
+ getChallengeLevels() {
252
+ const isChallengePaused = this.pausedChallengeIds.includes(this.challenge.ChallengeId);
253
+ const InProgressLevel = (level) => {
254
+ return level.ProgressStatus === 1 && !this.isExpiredChallenge && !isChallengePaused;
255
+ };
256
+ return (index.h("div", { class: "ChallengeLevels" }, this.challenge.LevelProgresses.map((level, index$1) => (index.h("div", { class: `ChallengeLevelCard ${InProgressLevel(level) ? 'InProgress' : ''}` }, index.h("casino-engagement-suite-progress-bar", { clientStylingUrl: this.clientStylingUrl, class: this.device, value: level.ProgressPercentage, "hide-percent": (level.ProgressPercentage === 0 && !InProgressLevel(level)) || level.ProgressPercentage === 100, disabled: this.isExpiredChallenge || isChallengePaused }, index.h("span", { slot: "Title", class: "ChallengeLevelTitle" }, index.h("span", null, "Level ", index$1 + 1, ": "), this.getLevelTarget(level))), index.h("div", { class: "ChallengeRewardMessage" }, index.h("div", { class: "EngagementSuiteIconButton Reward" }), index.h("span", null, translate('win', this.language), ": "), index.h("span", { class: "CustomRewardMessage" }, level.CustomRewardMessage)), this.getLevelBetRangesDetails(level))))));
257
+ }
258
+ getToggleButton() {
259
+ return (index.h("div", { class: "ChallengeCollapseButton", onClick: this.toggle }, index.h("span", { class: `Toggle ${this.showDetails ? 'Closed' : 'Open'}` }), index.h("span", null, translate('details', this.language))));
260
+ }
261
+ render() {
262
+ return index.h("div", { key: '413a8354c03545a336b044a26f33275423548ee2', class: `ChallengeDetailsPopup ${this.device}` }, this.getActionsTemplate(), index.h("div", { key: 'e58aac0709effc8ed9df011c07b52ee6a0c4fa66', class: `ChallengeDetails ${this.challenge.IsNew ? 'IsNewChallenge' : ''}` }, this.getChallengeHeader(), this.getChallengeCountdown(), this.getToggleButton(), this.getChallengeDetails(), this.getChallengeLevels()));
263
+ }
264
+ get host() { return index.getElement(this); }
265
+ static get watchers() { return {
266
+ "challenge": ["challengePropHandler"]
267
+ }; }
281
268
  };
282
- CasinoEngagementSuiteChallengesDetails.style = casinoEngagementSuiteChallengesDetailsCss;
269
+ CasinoEngagementSuiteChallengesDetails.style = CasinoEngagementSuiteChallengesDetailsStyle0;
283
270
 
284
- const casinoEngagementSuiteProgressBarCss = ":host{display:block;font-family:inherit}:host(.Desktop) .ProgressBarPercent{font-size:14px;line-height:14px}@keyframes indeterminate{0%{left:-200%;right:100%}60%{left:110%;right:-10%}to{left:110%;right:-10%}}.ProgressBarBackground{height:8px;background-color:var(--emw--color-background, #666178);border-radius:4px;position:relative;overflow:hidden}.ProgressBarLine{position:absolute;left:0;top:0;bottom:0;border-radius:4px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);transition:width ease-out 0.3s}.ProgressBarLine.Indeterminate{animation:indeterminate 1s linear infinite}.ProgressBarInfo{margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}.ProgressBarPercent{font-weight:700;font-size:12px;line-height:12px}.HidePercent .ProgressBarPercent{display:none}.ProgressBar:not(.Disabled) .ProgressBarPercent{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ProgressBar.Disabled .ProgressBarPercent{color:var(--emw--color-background, #666178)}.ProgressBar.Disabled .ProgressBarLine{background:var(--emw--color-background-secondary, #474668)}";
271
+ const casinoEngagementSuiteProgressBarCss = ":host{display:block;font-family:inherit}:host(.Desktop) .ProgressBarPercent{font-size:var(--emw--font-size-small, 14px);line-height:14px}@keyframes indeterminate{0%{left:-200%;right:100%}60%{left:110%;right:-10%}to{left:110%;right:-10%}}.ProgressBarBackground{height:8px;background-color:var(--emw--color-gray-300, #666178);border-radius:var(--emw--border-radius-small, 4px);position:relative;overflow:hidden}.ProgressBarLine{position:absolute;left:0;top:0;bottom:0;border-radius:var(--emw--border-radius-small, 4px);background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));transition:width ease-out 0.3s}.ProgressBarLine.Indeterminate{animation:indeterminate 1s linear infinite}.ProgressBarInfo{margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}.ProgressBarPercent{font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-x-small, 12px);line-height:12px}.HidePercent .ProgressBarPercent{display:none}.ProgressBar:not(.Disabled) .ProgressBarPercent{background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ProgressBar.Disabled .ProgressBarPercent{color:var(--emw--color-gray-300, #666178)}.ProgressBar.Disabled .ProgressBarLine{background:var(--emw--color-background-secondary, #474668)}";
272
+ const CasinoEngagementSuiteProgressBarStyle0 = casinoEngagementSuiteProgressBarCss;
285
273
 
286
274
  const CasinoEngagementSuiteProgressBar = class {
287
- constructor(hostRef) {
288
- index.registerInstance(this, hostRef);
289
- /**
290
- * Value for the widget
291
- */
292
- this.value = 0;
293
- /**
294
- * Shows disabled styles
295
- */
296
- this.disabled = false;
297
- /**
298
- * Hide percent value
299
- */
300
- this.hidePercent = false;
301
- /**
302
- * Constantly animates
303
- */
304
- this.indeterminate = false;
305
- /**
306
- * Client custom styling via string
307
- */
308
- this.clientStyling = '';
309
- /**
310
- * Client custom styling via url
311
- */
312
- this.clientStylingUrl = '';
313
- this.limitStylingAppends = false;
314
- this.setClientStyling = () => {
315
- let sheet = document.createElement('style');
316
- sheet.innerHTML = this.clientStyling;
317
- this.host.prepend(sheet);
318
- };
319
- this.setClientStylingURL = () => {
320
- let url = new URL(this.clientStylingUrl);
321
- let cssFile = document.createElement('style');
322
- fetch(url.href)
323
- .then((res) => res.text())
324
- .then((data) => {
325
- cssFile.innerHTML = data;
326
- setTimeout(() => { this.host.prepend(cssFile); }, 1);
327
- })
328
- .catch((err) => {
329
- console.log('Error ', err);
330
- });
331
- };
332
- }
333
- componentDidRender() {
334
- if (!this.limitStylingAppends && this.host) {
335
- if (this.clientStyling)
336
- this.setClientStyling();
337
- if (this.clientStylingUrl)
338
- this.setClientStylingURL();
339
- this.limitStylingAppends = true;
275
+ constructor(hostRef) {
276
+ index.registerInstance(this, hostRef);
277
+ this.setClientStyling = () => {
278
+ let sheet = document.createElement('style');
279
+ sheet.innerHTML = this.clientStyling;
280
+ this.host.prepend(sheet);
281
+ };
282
+ this.setClientStylingURL = () => {
283
+ let url = new URL(this.clientStylingUrl);
284
+ let cssFile = document.createElement('style');
285
+ fetch(url.href)
286
+ .then((res) => res.text())
287
+ .then((data) => {
288
+ cssFile.innerHTML = data;
289
+ setTimeout(() => { this.host.prepend(cssFile); }, 1);
290
+ })
291
+ .catch((err) => {
292
+ console.log('Error ', err);
293
+ });
294
+ };
295
+ this.value = 0;
296
+ this.disabled = false;
297
+ this.hidePercent = false;
298
+ this.indeterminate = false;
299
+ this.clientStyling = '';
300
+ this.clientStylingUrl = '';
301
+ this.limitStylingAppends = false;
302
+ }
303
+ componentDidRender() {
304
+ if (!this.limitStylingAppends && this.host) {
305
+ if (this.clientStyling)
306
+ this.setClientStyling();
307
+ if (this.clientStylingUrl)
308
+ this.setClientStylingURL();
309
+ this.limitStylingAppends = true;
310
+ }
311
+ }
312
+ getProgressBarClasses() {
313
+ return {
314
+ ProgressBar: true,
315
+ Completed: this.value === 100,
316
+ Disabled: this.disabled,
317
+ HidePercent: this.hidePercent || this.indeterminate
318
+ };
340
319
  }
341
- }
342
- getProgressBarClasses() {
343
- return {
344
- ProgressBar: true,
345
- Completed: this.value === 100,
346
- Disabled: this.disabled,
347
- HidePercent: this.hidePercent || this.indeterminate
348
- };
349
- }
350
- getProgressBarLineTemplate() {
351
- if (this.indeterminate) {
352
- return index.h("div", { class: "ProgressBarLine Indeterminate", part: "ProgressBarLine Indeterminate" });
320
+ getProgressBarLineTemplate() {
321
+ if (this.indeterminate) {
322
+ return index.h("div", { class: "ProgressBarLine Indeterminate", part: "ProgressBarLine Indeterminate" });
323
+ }
324
+ else {
325
+ return index.h("div", { class: "ProgressBarLine", part: "ProgressBarLine", style: { width: this.value + '%' } });
326
+ }
353
327
  }
354
- else {
355
- return index.h("div", { class: "ProgressBarLine", part: "ProgressBarLine", style: { width: this.value + '%' } });
328
+ render() {
329
+ return index.h("div", { key: 'ecce3a26a92d2e090c1db84bdc1bdbeb505080ed', class: this.getProgressBarClasses(), part: "ProgressBar" }, index.h("div", { key: '649fe1103d222200f2a1ad3b5967e37da1f1ab3d', class: "ProgressBarInfo", part: "ProgressBarInfo" }, index.h("slot", { key: '49dc180eedd823f0027f75099813fb9d91bcd938', name: "Title" }, index.h("div", { key: 'e6e59da3fe7bbcb37e118e7fd23a8ff35587aca5' })), index.h("slot", { key: '3dc8e5fd1dbc8c268b9c76e393b751cb53605e7e', name: "Percent" }, index.h("div", { key: '6a9e880f3ee3c4f26e8577c69be5db5f8e2d10ad', class: "ProgressBarPercent", part: "ProgressBarPercent" }, this.value, "%"))), index.h("div", { key: '141106e77caad7b04bb199f911e87c0c6f0adc2d', class: "ProgressBarBackground", part: "ProgressBarBackground" }, this.getProgressBarLineTemplate()));
356
330
  }
357
- }
358
- render() {
359
- return index.h("div", { class: this.getProgressBarClasses(), part: "ProgressBar" }, index.h("div", { class: "ProgressBarInfo", part: "ProgressBarInfo" }, index.h("slot", { name: "Title" }, index.h("div", null)), index.h("slot", { name: "Percent" }, index.h("div", { class: "ProgressBarPercent", part: "ProgressBarPercent" }, this.value, "%"))), index.h("div", { class: "ProgressBarBackground", part: "ProgressBarBackground" }, this.getProgressBarLineTemplate()));
360
- }
361
- get host() { return index.getElement(this); }
331
+ get host() { return index.getElement(this); }
362
332
  };
363
- CasinoEngagementSuiteProgressBar.style = casinoEngagementSuiteProgressBarCss;
333
+ CasinoEngagementSuiteProgressBar.style = CasinoEngagementSuiteProgressBarStyle0;
364
334
 
365
335
  exports.casino_engagement_suite_challenges_details = CasinoEngagementSuiteChallengesDetails;
366
336
  exports.casino_engagement_suite_progress_bar = CasinoEngagementSuiteProgressBar;