@everymatrix/casino-engagement-suite-jackpot-details 1.44.0 → 1.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/casino-engagement-suite-jackpot-details/casino-engagement-suite-jackpot-details.esm.js +1 -1
  2. package/dist/casino-engagement-suite-jackpot-details/p-5a599b1a.entry.js +1 -0
  3. package/dist/casino-engagement-suite-jackpot-details/p-be66309f.entry.js +1 -0
  4. package/dist/casino-engagement-suite-jackpot-details/p-c7ee604a.js +2 -0
  5. package/dist/casino-engagement-suite-jackpot-details/p-e1255160.js +1 -0
  6. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  7. package/dist/cjs/casino-engagement-suite-jackpot-details.cjs.entry.js +274 -284
  8. package/dist/cjs/casino-engagement-suite-jackpot-details.cjs.js +17 -11
  9. package/dist/cjs/casino-engagement-suite-progress-bar.cjs.entry.js +58 -75
  10. package/dist/cjs/index-d83151b6.js +1331 -0
  11. package/dist/cjs/loader.cjs.js +7 -13
  12. package/dist/collection/collection-manifest.json +3 -3
  13. package/dist/collection/components/casino-engagement-suite-jackpot-details/casino-engagement-suite-jackpot-details.css +95 -104
  14. package/dist/collection/components/casino-engagement-suite-jackpot-details/casino-engagement-suite-jackpot-details.js +466 -526
  15. package/dist/collection/components/casino-engagement-suite-jackpot-details/index.js +1 -0
  16. package/dist/collection/utils/index.js +3 -3
  17. package/dist/collection/utils/locale.utils.js +22 -22
  18. package/dist/collection/utils/utils.js +3 -0
  19. package/dist/esm/app-globals-0f993ce5.js +3 -0
  20. package/dist/esm/casino-engagement-suite-jackpot-details.entry.js +274 -284
  21. package/dist/esm/casino-engagement-suite-jackpot-details.js +14 -11
  22. package/dist/esm/casino-engagement-suite-progress-bar.entry.js +58 -75
  23. package/dist/esm/index-0237d1e2.js +1303 -0
  24. package/dist/esm/loader.js +7 -13
  25. package/dist/stencil.config.dev.js +17 -0
  26. package/dist/stencil.config.js +14 -19
  27. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-engagement-suite-jackpot-details/.stencil/packages/stencil/casino-engagement-suite-jackpot-details/stencil.config.d.ts +2 -0
  28. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-engagement-suite-jackpot-details/.stencil/packages/stencil/casino-engagement-suite-jackpot-details/stencil.config.dev.d.ts +2 -0
  29. package/dist/types/components/casino-engagement-suite-jackpot-details/casino-engagement-suite-jackpot-details.d.ts +88 -88
  30. package/dist/types/components/casino-engagement-suite-jackpot-details/index.d.ts +1 -0
  31. package/dist/types/components.d.ts +19 -2
  32. package/dist/types/models/index.d.ts +37 -37
  33. package/dist/types/stencil-public-runtime.d.ts +142 -33
  34. package/dist/types/utils/utils.d.ts +1 -0
  35. package/loader/cdn.js +1 -3
  36. package/loader/index.cjs.js +1 -3
  37. package/loader/index.d.ts +13 -1
  38. package/loader/index.es2017.js +1 -3
  39. package/loader/index.js +1 -3
  40. package/loader/package.json +1 -0
  41. package/package.json +12 -2
  42. package/dist/casino-engagement-suite-jackpot-details/p-0135e830.js +0 -1
  43. package/dist/casino-engagement-suite-jackpot-details/p-8fee813c.entry.js +0 -1
  44. package/dist/casino-engagement-suite-jackpot-details/p-b361748c.entry.js +0 -1
  45. package/dist/cjs/index-84a14c86.js +0 -1349
  46. package/dist/components/casino-engagement-suite-jackpot-details.d.ts +0 -11
  47. package/dist/components/casino-engagement-suite-jackpot-details.js +0 -439
  48. package/dist/components/casino-engagement-suite-progress-bar.js +0 -110
  49. package/dist/components/index.d.ts +0 -26
  50. package/dist/components/index.js +0 -1
  51. package/dist/esm/index-5707e619.js +0 -1322
  52. package/dist/esm/polyfills/core-js.js +0 -11
  53. package/dist/esm/polyfills/css-shim.js +0 -1
  54. package/dist/esm/polyfills/dom.js +0 -79
  55. package/dist/esm/polyfills/es5-html-element.js +0 -1
  56. package/dist/esm/polyfills/index.js +0 -34
  57. package/dist/esm/polyfills/system.js +0 -6
  58. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/casino-engagement-suite-jackpot-details/.stencil/packages/casino-engagement-suite-jackpot-details/stencil.config.d.ts +0 -2
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, c as createEvent, h, g as getElement } from './index-5707e619.js';
1
+ import { r as registerInstance, c as createEvent, h, g as getElement } from './index-0237d1e2.js';
2
2
 
3
3
  function _typeof(o) {
4
4
  "@babel/helpers - typeof";
@@ -95,308 +95,298 @@ function isBefore(dirtyDate, dirtyDateToCompare) {
95
95
  const DEFAULT_LANGUAGE = 'en';
96
96
  const SUPPORTED_LANGUAGES = ['en'];
97
97
  const TRANSLATIONS = {
98
- en: {
99
- jackpots: 'Jackpots',
100
- join: 'Join',
101
- unjoin: 'Unjoin',
102
- info: 'Info',
103
- games: 'Games',
104
- operatorContribution: 'Operator Contribution',
105
- betContribution: 'Bet Contribution',
106
- type: 'Type',
107
- winningProbability: 'Winning Probability',
108
- tc: 'Terms & Conditions',
109
- jackpotIsWon: 'Jackpot is won!',
110
- loadMore: 'Load More',
111
- jackpotDetails: 'Jackpot Details',
112
- minBet: 'Min Bet',
113
- maxBet: 'Max Bet',
114
- Suspended: 'Suspended',
115
- Closed: 'Closed',
116
- contributionTooltip: 'A % of the bet that will be contributed by the casino to the jackpot amount.'
117
- }
98
+ en: {
99
+ jackpots: 'Jackpots',
100
+ join: 'Join',
101
+ unjoin: 'Unjoin',
102
+ info: 'Info',
103
+ games: 'Games',
104
+ operatorContribution: 'Operator Contribution',
105
+ betContribution: 'Bet Contribution',
106
+ type: 'Type',
107
+ winningProbability: 'Winning Probability',
108
+ tc: 'Terms & Conditions',
109
+ jackpotIsWon: 'Jackpot is won!',
110
+ loadMore: 'Load More',
111
+ jackpotDetails: 'Jackpot Details',
112
+ minBet: 'Min Bet',
113
+ maxBet: 'Max Bet',
114
+ Suspended: 'Suspended',
115
+ Closed: 'Closed',
116
+ contributionTooltip: 'A % of the bet that will be contributed by the casino to the jackpot amount.'
117
+ }
118
118
  };
119
119
  const translate = (key, customLang) => {
120
- const lang = customLang;
121
- return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
120
+ const lang = customLang;
121
+ return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
122
122
  };
123
123
 
124
124
  function formatBalance(amount, currency, maxAmount = 99999999) {
125
- amount = Math.min(amount, maxAmount);
126
- return `${currency} ${new Intl.NumberFormat('en', { minimumFractionDigits: 2, maximumFractionDigits: 2 })
127
- .format(amount)}`;
125
+ amount = Math.min(amount, maxAmount);
126
+ return `${currency} ${new Intl.NumberFormat('en', { minimumFractionDigits: 2, maximumFractionDigits: 2 })
127
+ .format(amount)}`;
128
128
  }
129
129
 
130
- const casinoEngagementSuiteJackpotDetailsCss = ":host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;touch-action:manipulation}button:focus{outline:none}button:not(:disabled){cursor:pointer}.PopupButton{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;min-height:32px;font-size:14px;font-weight:700;position:relative;font-family:\"Montserrat\", sans-serif}.PopupButton.Active{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}.PopupButton.Active::before{content:\"\";position:absolute;inset:0;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;border-radius:99px}.PopupButton.Loading{opacity:0.5;pointer-events:none}.JackpotDetailsPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:8px;overflow:hidden;flex-direction:column;position:relative}.JackpotDetailsPopup.Disabled .JackpotDetailsHeader{opacity:0.5}.JackpotDetailsPopup.Disabled .JackpotDetailsTabs{cursor:default;pointer-events:none}.JackpotDetailsPopup.Disabled .JackpotDescription,.JackpotDetailsPopup.Disabled .TermsAndConditions,.JackpotDetailsPopup.Disabled .JackpotInfoItem{color:var(--emw--color-primary, #8F8B9C)}.JackpotGamesListWrapper,.JackpotInfoTabContent{overflow-x:auto;scrollbar-gutter:stable}.JackpotGamesListWrapper::-webkit-scrollbar,.JackpotInfoTabContent::-webkit-scrollbar{width:3px;background:none}.JackpotGamesListWrapper::-webkit-scrollbar-thumb,.JackpotInfoTabContent::-webkit-scrollbar-thumb{border-radius:4px;background:var(--emw--color-gray-transparency-30, rgba(255, 255, 255, 0.3))}.JackpotDetailsNavigation{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.JackpotDetailsNavigation .JackpotIconButton{width:16px;height:16px;cursor:pointer;display:flex;justify-content:center;align-items:center}.JackpotDetailsNavigation .JackpotPopupName{color:var(--emw--color-gray-100, #BBB9C3);font-size:16px;font-weight:500;line-height:16px;display:none}.JackpotDetailsPopupContent{padding:8px 18px 18px;overflow:hidden;height:100%;display:flex;flex-direction:column}.JackpotDetailsHeader{display:flex;justify-content:space-between;align-items:center;gap:12px}.JackpotDetailsHeader .JackpotDetailsHeaderSecondCol{text-align:right}.JackpotDetailsHeader .JackpotType{text-transform:uppercase;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-all}.JackpotDetailsHeader .JackpotBalance{margin-top:8px;font-family:Montserrat, sans-serif;font-size:18px;font-weight:var(--emw--font-weight-bold, 800);line-height:18px}.JackpotDetailsHeader .JackpotIsWon{margin-top:8px;font-family:Montserrat, sans-serif;font-weight:var(--emw--font-weight-bold, 700);font-size:12px;line-height:15px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotDetailsPopup.Mega .JackpotBalance{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}.JackpotDetailsPopup.Major .JackpotBalance{background:linear-gradient(180deg, #A19FA0 5.36%, #E1DBDB 28.86%, #FEFFFF 36.86%, #E1DBDB 44.36%, #5E5B5F 91.86%);-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotDetailsPopup.Minor .JackpotBalance{background:linear-gradient(180deg, #A0522C 5.36%, #FFAB8C 28.86%, #FFEEDF 36.86%, #FFAB8C 44.36%, #6A3A21 91.86%);-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotGamesLoadMore::before,.JackpotJoinButton.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}.JackpotGamesButton{margin-top:12px;align-self:center;min-width:140px}.JackpotCountdown{font-size:var(--emw--font-size-x-small, 12px);line-height:12px;margin-top:12px;color:var(--emw--color-gray-150, #BBB9C3)}.JackpotCountdown.Suspended{font-weight:var(--emw--font-weight-bold, 700);color:var(--emfe-w-color-white, #FFF);text-transform:capitalize}.JackpotDetailsTabsWrapper{display:flex;flex-direction:column}.JackpotDetailsTabs{margin-top:20px;display:flex;position:relative}.JackpotDetailsTabs .JackpotDetailsTab{padding:9px 16px 7px;font-weight:500;font-size:12px;line-height:15px;color:var(--emw--color-background, #666178);border-bottom:2px solid transparent;cursor:pointer}.JackpotDetailsTabs .JackpotDetailsTab.Active{color:var(--emw--color-typography, #FFF);border-color:var(--emw--color-typography, #FFF)}.JackpotDetailsTabs::after{content:\"\";position:absolute;bottom:0;left:0;width:100%;height:1px;background-color:var(--emw--color-typography, #FFF);opacity:0.1}.JackpotInfoItem{margin-bottom:8px;color:var(--emw--color-typography, #FFF);font-size:14px;line-height:17px;display:flex;align-items:center}.JackpotInfoItem span{font-weight:var(--emw--font-weight-bold, 700)}.JackpotContributionTooltipButton{margin-left:5px;width:16px;height:16px;background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/help.svg)}.JackpotGamesListWrapper{overflow:auto;flex-grow:1}.JackpotGamesList{display:flex;gap:10px;flex-wrap:wrap}.JackpotGamesList .JackpotGamesListItem{width:calc(25% - 8px);aspect-ratio:74/40;cursor:pointer}.JackpotGamesList .JackpotGamesListItem.Disabled{opacity:0.5;pointer-events:none;cursor:auto}.JackpotDetailsButton{margin-top:12px;display:flex;align-items:center;font-size:var(--emw--font-size-x-small, 12px);line-height:12px;color:var(--emw--color-primary-variant, #666178);cursor:pointer}.JackpotDetailsButton .Toggle{width:16px;height:16px;margin-right:4px}.JackpotDetailsButton .Closed{background:center/100% url(\"https://static.everymatrix.com/gic/img/engagement-suite/eye-closed.svg\")}.JackpotDetailsButton .Open{background:center/100% url(\"https://static.everymatrix.com/gic/img/engagement-suite/eye-open.svg\")}.JackpotInfo{margin-top:24px}.JackpotDescription{margin-top:12px;color:var(--emw--color-typography, #FFF);font-size:var(--emw--font-size-small, 14px);line-height:17px}.TermsAndConditions{display:block;margin-top:12px;color:var(--emw--color-primary, #59D1FF);font-size:var(--emw--font-size-small, 14px);line-height:17px}.JackpotsTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.JackpotsTooltipBackdrop .JackpotsTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:8px;padding:32px;font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-gray-100, #BBB9C3);position:relative}.JackpotsTooltipBackdrop .JackpotsTooltip .JackpotsIconButton{top:12px;right:12px;position:absolute}.JackpotDetailsPopup.Tablet .JackpotsTooltipBackdrop,.JackpotDetailsPopup.Desktop .JackpotsTooltipBackdrop{padding:90px 75px 0}.JackpotDetailsPopup.Tablet .JackpotsTooltip,.JackpotDetailsPopup.Desktop .JackpotsTooltip{padding:60px 65px;font-size:var(--emw--font-size-small, 16px);line-height:20px}.JackpotDetailsPopup.Tablet .JackpotsTooltip .JackpotsIconButton,.JackpotDetailsPopup.Desktop .JackpotsTooltip .JackpotsIconButton{top:24px;right:24px}.JackpotDetailsPopup.Tablet .JackpotDetailsButton,.JackpotDetailsPopup.Desktop .JackpotDetailsButton{margin-top:20px}.JackpotDetailsPopup.Tablet .JackpotDescription,.JackpotDetailsPopup.Desktop .JackpotDescription{font-size:var(--emw--font-size-medium, 16px);line-height:22px}.JackpotDetailsPopup.Tablet .JackpotPopupName,.JackpotDetailsPopup.Desktop .JackpotPopupName{display:block}.JackpotDetailsPopup.Tablet .JackpotDetailsNavigation,.JackpotDetailsPopup.Desktop .JackpotDetailsNavigation{padding-top:16px}.JackpotDetailsPopup.Tablet .JackpotContributionTooltipButton,.JackpotDetailsPopup.Tablet .JackpotIconButton,.JackpotDetailsPopup.Desktop .JackpotContributionTooltipButton,.JackpotDetailsPopup.Desktop .JackpotIconButton{width:24px;height:24px}.JackpotDetailsPopup.Tablet .JackpotDetailsPopupContent,.JackpotDetailsPopup.Desktop .JackpotDetailsPopupContent{padding:20px 24px 30px}.JackpotDetailsPopup.Tablet .JackpotBalance,.JackpotDetailsPopup.Tablet .JackpotType,.JackpotDetailsPopup.Desktop .JackpotBalance,.JackpotDetailsPopup.Desktop .JackpotType{line-height:27px;font-size:22px}.JackpotDetailsPopup.Tablet .JackpotBalance,.JackpotDetailsPopup.Desktop .JackpotBalance{font-weight:var(--emw--font-weight-bold, 700)}.JackpotDetailsPopup.Tablet .PopupButton,.JackpotDetailsPopup.Desktop .PopupButton{min-height:36px;font-size:16px}.JackpotDetailsPopup.Tablet .JackpotCountdown,.JackpotDetailsPopup.Desktop .JackpotCountdown{font-size:var(--emw--font-size-small, 14px);line-height:14px}.JackpotDetailsPopup.Tablet .JackpotInfoItem,.JackpotDetailsPopup.Desktop .JackpotInfoItem{font-size:16px;line-height:20px}.JackpotDetailsPopup.Tablet .JackpotIsWon,.JackpotDetailsPopup.Desktop .JackpotIsWon{font-size:14px;line-height:17px}.JackpotDetailsPopup.Tablet .JackpotGamesList,.JackpotDetailsPopup.Desktop .JackpotGamesList{gap:12px}.JackpotDetailsPopup.Tablet .JackpotGamesList .JackpotGamesListItem,.JackpotDetailsPopup.Desktop .JackpotGamesList .JackpotGamesListItem{width:calc(20% - 10px)}.JackpotDetailsPopup.Tablet .JackpotDetailsTabs .JackpotDetailsTab,.JackpotDetailsPopup.Desktop .JackpotDetailsTabs .JackpotDetailsTab{font-size:16px;line-height:20px}";
130
+ const casinoEngagementSuiteJackpotDetailsCss = ":host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;touch-action:manipulation}button:focus{outline:none}button:not(:disabled){cursor:pointer}.EngagementSuiteIconButton{width:16px;height:16px;cursor:pointer}.EngagementSuiteIconButton.Back{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/back.svg) no-repeat}.EngagementSuiteIconButton.Close{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/close.svg) no-repeat}.EngagementSuiteIconButton.Help{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/help.svg) no-repeat}.EngagementSuiteButton{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;min-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}.EngagementSuiteButton.Loading{opacity:0.5;pointer-events:none}.EngagementSuiteButton.JackpotGamesButton{margin-top:12px;align-self:center;min-width:140px}.JackpotDetailsPopup{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}.JackpotDetailsPopup.Disabled .JackpotDetailsHeader{opacity:0.5}.JackpotDetailsPopup.Disabled .EngagementSuiteTabs{cursor:default;pointer-events:none}.JackpotDetailsPopup.Disabled .JackpotDescription,.JackpotDetailsPopup.Disabled .TermsAndConditions,.JackpotDetailsPopup.Disabled .JackpotInfoItem{color:var(--emw--color-gray-150, #8F8B9C)}.JackpotGamesListWrapper,.JackpotInfoTabContent{overflow-x:auto;scrollbar-gutter:stable}.JackpotGamesListWrapper::-webkit-scrollbar,.JackpotInfoTabContent::-webkit-scrollbar{width:3px;background:none}.JackpotGamesListWrapper::-webkit-scrollbar-thumb,.JackpotInfoTabContent::-webkit-scrollbar-thumb{border-radius:var(--emw--border-radius-small, 4px);background:var(--emw--color-gray-transparency-30, rgba(255, 255, 255, 0.3))}.JackpotDetailsNavigation{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.JackpotDetailsNavigation .JackpotPopupName{color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-medium, 16px);font-weight:var(--emw--font-weight-medium, 500);line-height:16px;display:none}.JackpotDetailsPopupContent{padding:8px 18px 18px;overflow:hidden;height:100%;display:flex;flex-direction:column}.JackpotDetailsHeader{display:flex;justify-content:space-between;gap:12px}.JackpotDetailsHeader .JackpotDetailsHeaderSecondCol{text-align:right}.JackpotDetailsHeader .JackpotType{text-transform:uppercase;font-family:var(--emw--font-family-secondary, \"Montserrat\", sans-serif);font-size:var(--emw--font-size-medium, 18px);font-weight:var(--emw--font-weight-bold, 700);line-height:22px;color:var(--emw--color-typography, #FFF);word-break:break-all}.JackpotDetailsHeader .JackpotBalance{margin-top:8px;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-extra-bold, 800);line-height:18px}.JackpotDetailsHeader .JackpotIsWon{margin-top:8px;font-family:var(--emw--font-family-secondary, \"Montserrat\", sans-serif);font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-x-small, 12px);line-height:15px;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotDetailsPopup.Mega .JackpotBalance{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%));-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotDetailsPopup.Major .JackpotBalance{background:var(--emw--engagement-suite-gradient-silver, linear-gradient(180deg, #A19FA0 5.36%, #E1DBDB 28.86%, #FEFFFF 36.86%, #E1DBDB 44.36%, #5E5B5F 91.86%));-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotDetailsPopup.Minor .JackpotBalance{background:var(--emw--engagement-suite-gradient-bronze, linear-gradient(180deg, #A0522C 5.36%, #FFAB8C 28.86%, #FFEEDF 36.86%, #FFAB8C 44.36%, #6A3A21 91.86%));-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotCountdown{font-size:var(--emw--font-size-x-small, 12px);line-height:12px;margin-top:12px;color:var(--emw--color-secondary, #BBB9C3)}.JackpotCountdown.Suspended{font-weight:var(--emw--font-weight-bold, 700);color:var(--emw--color-typography, #FFF);text-transform:capitalize}.EngagementSuiteTabs{margin-top:20px;display:flex;position:relative}.EngagementSuiteTabs .EngagementSuiteTab{padding:9px 16px 7px;font-weight:var(--emw--font-weight-medium, 500);font-size:var(--emw--font-size-x-small, 12px);line-height:15px;color:var(--emw--color-gray-300, #666178);border-bottom:2px solid transparent;cursor:pointer}.EngagementSuiteTabs .EngagementSuiteTab.Active{color:var(--emw--color-typography, #FFF);border-color:var(--emw--color-typography, #FFF)}.EngagementSuiteTabs::after{content:\"\";position:absolute;bottom:0;left:0;width:100%;height:1px;background-color:var(--emw--color-typography, #FFF);opacity:0.1}.JackpotInfoItem{margin-bottom:8px;color:var(--emw--color-typography, #FFF);font-size:var(--emw--font-size-small, 14px);line-height:17px;display:flex;align-items:center}.JackpotInfoItem span{font-weight:var(--emw--font-weight-bold, 700)}.JackpotInfoItem .EngagementSuiteIconButton.Help{margin-left:5px}.JackpotGamesListWrapper{margin-top:12px;overflow:auto;flex-grow:1}.JackpotGamesList{display:flex;gap:10px;flex-wrap:wrap}.JackpotGamesList .JackpotGamesListItem{width:calc(25% - 8px);aspect-ratio:74/40;cursor:pointer}.JackpotGamesList .JackpotGamesListItem.Disabled{opacity:0.5;pointer-events:none;cursor:auto}.JackpotDetailsButton{margin-top:12px;display:flex;align-items:center;font-size:var(--emw--font-size-x-small, 12px);line-height:12px;color:var(--emw--color-gray-300, #666178);cursor:pointer}.JackpotDetailsButton .Toggle{width:16px;height:16px;margin-right:4px}.JackpotDetailsButton .Closed{background:center/100% url(\"https://static.everymatrix.com/gic/img/engagement-suite/eye-closed.svg\")}.JackpotDetailsButton .Open{background:center/100% url(\"https://static.everymatrix.com/gic/img/engagement-suite/eye-open.svg\")}.JackpotInfo{margin-top:24px}.JackpotDescription{margin-top:12px;color:var(--emw--color-typography, #FFF);font-size:var(--emw--font-size-small, 14px);line-height:17px}.TermsAndConditions{display:block;margin-top:12px;color:var(--emw--color-contrast, #59D1FF);font-size:var(--emw--font-size-small, 14px);line-height:17px}.EngagementSuiteTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);padding:32px;font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-secondary, #BBB9C3);position:relative}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:12px;right:12px;position:absolute}.JackpotDetailsPopup.Tablet .EngagementSuiteTooltipBackdrop,.JackpotDetailsPopup.Desktop .EngagementSuiteTooltipBackdrop{padding:90px 75px 0}.JackpotDetailsPopup.Tablet .EngagementSuiteTooltip,.JackpotDetailsPopup.Desktop .EngagementSuiteTooltip{padding:60px 65px;font-size:var(--emw--font-size-medium, 16px);line-height:20px}.JackpotDetailsPopup.Tablet .EngagementSuiteTooltip .EngagementSuiteIconButton,.JackpotDetailsPopup.Desktop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:24px;right:24px}.JackpotDetailsPopup.Tablet .JackpotDetailsButton,.JackpotDetailsPopup.Desktop .JackpotDetailsButton{margin-top:20px}.JackpotDetailsPopup.Tablet .JackpotDescription,.JackpotDetailsPopup.Desktop .JackpotDescription{font-size:var(--emw--font-size-medium, 16px);line-height:22px}.JackpotDetailsPopup.Tablet .JackpotPopupName,.JackpotDetailsPopup.Desktop .JackpotPopupName{display:block}.JackpotDetailsPopup.Tablet .JackpotDetailsNavigation,.JackpotDetailsPopup.Desktop .JackpotDetailsNavigation{padding-top:16px}.JackpotDetailsPopup.Tablet .EngagementSuiteIconButton,.JackpotDetailsPopup.Desktop .EngagementSuiteIconButton{width:24px;height:24px}.JackpotDetailsPopup.Tablet .JackpotDetailsPopupContent,.JackpotDetailsPopup.Desktop .JackpotDetailsPopupContent{padding:20px 24px 30px}.JackpotDetailsPopup.Tablet .JackpotBalance,.JackpotDetailsPopup.Tablet .JackpotType,.JackpotDetailsPopup.Desktop .JackpotBalance,.JackpotDetailsPopup.Desktop .JackpotType{line-height:27px;font-size:var(--emw--font-size-large-plus, 22px)}.JackpotDetailsPopup.Tablet .JackpotBalance,.JackpotDetailsPopup.Desktop .JackpotBalance{font-weight:var(--emw--font-weight-bold, 700)}.JackpotDetailsPopup.Tablet .EngagementSuiteButton,.JackpotDetailsPopup.Desktop .EngagementSuiteButton{min-width:98px;min-height:36px;font-size:var(--emw--font-size-medium, 16px)}.JackpotDetailsPopup.Tablet .EngagementSuiteButton.JackpotGamesButton,.JackpotDetailsPopup.Desktop .EngagementSuiteButton.JackpotGamesButton{min-width:140px}.JackpotDetailsPopup.Tablet .JackpotCountdown,.JackpotDetailsPopup.Desktop .JackpotCountdown{font-size:var(--emw--font-size-small, 14px);line-height:14px}.JackpotDetailsPopup.Tablet .JackpotInfoItem,.JackpotDetailsPopup.Desktop .JackpotInfoItem{font-size:var(--emw--font-size-medium, 16px);line-height:20px}.JackpotDetailsPopup.Tablet .JackpotIsWon,.JackpotDetailsPopup.Desktop .JackpotIsWon{font-size:var(--emw--font-size-small, 14px);line-height:17px}.JackpotDetailsPopup.Tablet .JackpotGamesList,.JackpotDetailsPopup.Desktop .JackpotGamesList{gap:12px}.JackpotDetailsPopup.Tablet .JackpotGamesList .JackpotGamesListItem,.JackpotDetailsPopup.Desktop .JackpotGamesList .JackpotGamesListItem{width:calc(20% - 10px)}.JackpotDetailsPopup.Tablet .EngagementSuiteTabs .EngagementSuiteTab,.JackpotDetailsPopup.Desktop .EngagementSuiteTabs .EngagementSuiteTab{font-size:var(--emw--font-size-medium, 16px);line-height:20px}.JackpotDetailsPopup.Tablet .JackpotGamesListWrapper,.JackpotDetailsPopup.Desktop .JackpotGamesListWrapper{margin-top:20px}";
131
+ const CasinoEngagementSuiteJackpotDetailsStyle0 = casinoEngagementSuiteJackpotDetailsCss;
131
132
 
132
133
  const CasinoEngagementSuiteJackpotDetails = class {
133
- constructor(hostRef) {
134
- registerInstance(this, hostRef);
135
- this.close = createEvent(this, "close", 7);
136
- this.back = createEvent(this, "back", 7);
137
- /**
138
- * Client custom styling via string
139
- */
140
- this.clientStyling = '';
141
- /**
142
- * Client custom styling via url
143
- */
144
- this.clientStylingUrl = '';
145
- /**
146
- * Language of the widget
147
- */
148
- this.language = 'en';
149
- /**
150
- * Current game slug
151
- */
152
- this.gameSlug = '';
153
- /**
154
- * User's device type
155
- */
156
- this.device = 'Mobile';
157
- this.limitStylingAppends = false;
158
- this.timer = '';
159
- this.disabledStatus = '';
160
- this.activeTab = 1;
161
- this.visibleGames = [];
162
- this.enabled = false;
163
- this.showDetails = false;
164
- this.jackpotEndTime = '';
165
- this.showTooltip = false;
166
- this.maxVisibleGames = 0;
167
- this.handleTabChange = (e) => {
168
- this.activeTab = +(e.target.getAttribute('data-index'));
169
- this.visibleGames = [];
170
- this.maxVisibleGames = 0;
171
- };
172
- this.handleLoadMore = () => {
173
- this.visibleGames = this.jackpot.GamesInfo.slice(0, this.visibleGames.length + this.maxVisibleGames);
174
- };
175
- this.toggleShowDetails = () => {
176
- this.showDetails = !this.showDetails;
177
- };
178
- this.toggleTooltip = () => {
179
- this.showTooltip = !this.showTooltip;
180
- };
181
- this.setClientStyling = () => {
182
- let sheet = document.createElement('style');
183
- sheet.innerHTML = this.clientStyling;
184
- this.host.prepend(sheet);
185
- };
186
- this.setClientStylingURL = () => {
187
- let url = new URL(this.clientStylingUrl);
188
- let cssFile = document.createElement('style');
189
- fetch(url.href)
190
- .then((res) => res.text())
191
- .then((data) => {
192
- cssFile.innerHTML = data;
193
- setTimeout(() => { this.host.prepend(cssFile); }, 1);
194
- })
195
- .catch((err) => {
196
- console.log('Error ', err);
197
- });
198
- };
199
- this.handleCloseClick = () => {
200
- this.close.emit();
201
- };
202
- this.handleBackClick = () => {
203
- this.back.emit();
204
- };
205
- this.onGameClick = (ev) => {
206
- const slug = ev.currentTarget.getAttribute('data-slug');
207
- if (slug) {
208
- window.postMessage({
209
- type: 'EngagementSuiteGameRedirect',
210
- data: {
211
- Slug: slug
212
- }
213
- });
214
- }
215
- };
216
- }
217
- handleEvent(e) {
218
- const { type, data } = e === null || e === void 0 ? void 0 : e.data;
219
- switch (type) {
220
- case 'UpdateJackpotStatus': {
221
- const data = e.data.data;
222
- if (this.jackpot.JackpotId === data.JackpotId) {
223
- this.updateJackpotStatus(e.data.data);
134
+ constructor(hostRef) {
135
+ registerInstance(this, hostRef);
136
+ this.close = createEvent(this, "close", 7);
137
+ this.back = createEvent(this, "back", 7);
138
+ this.maxVisibleGames = 0;
139
+ this.handleTabChange = (e) => {
140
+ this.activeTab = +(e.target.getAttribute('data-index'));
141
+ this.visibleGames = [];
142
+ this.maxVisibleGames = 0;
143
+ };
144
+ this.handleLoadMore = () => {
145
+ this.visibleGames = this.jackpot.GamesInfo.slice(0, this.visibleGames.length + this.maxVisibleGames);
146
+ };
147
+ this.toggleShowDetails = () => {
148
+ this.showDetails = !this.showDetails;
149
+ };
150
+ this.toggleTooltip = () => {
151
+ this.showTooltip = !this.showTooltip;
152
+ };
153
+ this.setClientStyling = () => {
154
+ let sheet = document.createElement('style');
155
+ sheet.innerHTML = this.clientStyling;
156
+ this.host.prepend(sheet);
157
+ };
158
+ this.setClientStylingURL = () => {
159
+ let url = new URL(this.clientStylingUrl);
160
+ let cssFile = document.createElement('style');
161
+ fetch(url.href)
162
+ .then((res) => res.text())
163
+ .then((data) => {
164
+ cssFile.innerHTML = data;
165
+ setTimeout(() => { this.host.prepend(cssFile); }, 1);
166
+ })
167
+ .catch((err) => {
168
+ console.log('Error ', err);
169
+ });
170
+ };
171
+ this.handleCloseClick = () => {
172
+ this.close.emit();
173
+ };
174
+ this.handleBackClick = () => {
175
+ this.back.emit();
176
+ };
177
+ this.onGameClick = (ev) => {
178
+ const slug = ev.currentTarget.getAttribute('data-slug');
179
+ if (slug) {
180
+ window.postMessage({
181
+ type: 'EngagementSuiteGameRedirect',
182
+ data: {
183
+ Slug: slug
184
+ }
185
+ });
186
+ }
187
+ };
188
+ this.clientStyling = '';
189
+ this.clientStylingUrl = '';
190
+ this.jackpot = undefined;
191
+ this.jackpotChangeStatusRequest = undefined;
192
+ this.language = 'en';
193
+ this.gameSlug = '';
194
+ this.device = 'Mobile';
195
+ this.limitStylingAppends = false;
196
+ this.timer = '';
197
+ this.disabledStatus = '';
198
+ this.activeTab = 1;
199
+ this.visibleGames = [];
200
+ this.enabled = false;
201
+ this.balance = undefined;
202
+ this.winBalance = undefined;
203
+ this.showDetails = false;
204
+ this.jackpotEndTime = '';
205
+ this.showTooltip = false;
206
+ }
207
+ handleEvent(e) {
208
+ const { type, data } = e === null || e === void 0 ? void 0 : e.data;
209
+ switch (type) {
210
+ case 'UpdateJackpotStatus': {
211
+ const data = e.data.data;
212
+ if (this.jackpot.JackpotId === data.JackpotId) {
213
+ this.updateJackpotStatus(e.data.data);
214
+ }
215
+ break;
216
+ }
217
+ case 'JoinJackpotResult': {
218
+ const res = data;
219
+ if (res.Success && this.jackpot.JackpotId in res.JackpotIds) {
220
+ this.enabled = this.jackpot.Enabled = res.JackpotIds[this.jackpot.JackpotId];
221
+ }
222
+ break;
223
+ }
224
+ }
225
+ }
226
+ handleJackpotUpdate() {
227
+ this.balance = this.jackpot.Balance;
228
+ this.winBalance = this.jackpot.WinBalance;
229
+ }
230
+ handleResize() {
231
+ this.activeTab === 2 && this.setVisibleGames();
232
+ this.showTooltip = false;
233
+ }
234
+ componentWillLoad() {
235
+ this.enabled = this.jackpot.Enabled;
236
+ this.balance = this.jackpot.Balance;
237
+ this.winBalance = this.jackpot.WinBalance;
238
+ this.jackpotEndTime = this.jackpot.JackpotEndTime;
239
+ this.disabledStatus = this.jackpot.Reason || '';
240
+ this.startCountdown();
241
+ }
242
+ componentDidRender() {
243
+ if (!this.limitStylingAppends && this.host) {
244
+ if (this.clientStyling)
245
+ this.setClientStyling();
246
+ if (this.clientStylingUrl)
247
+ this.setClientStylingURL();
248
+ this.limitStylingAppends = true;
224
249
  }
225
- break;
226
- }
227
- case 'JoinJackpotResult': {
228
- const res = data;
229
- if (res.Success && this.jackpot.JackpotId in res.JackpotIds) {
230
- this.enabled = this.jackpot.Enabled = res.JackpotIds[this.jackpot.JackpotId];
250
+ if (this.activeTab === 2 && !this.maxVisibleGames) {
251
+ this.setVisibleGames();
231
252
  }
232
- break;
233
- }
234
253
  }
235
- }
236
- handleJackpotUpdate() {
237
- this.balance = this.jackpot.Balance;
238
- this.winBalance = this.jackpot.WinBalance;
239
- }
240
- handleResize() {
241
- this.activeTab === 2 && this.setVisibleGames();
242
- this.showTooltip = false;
243
- }
244
- componentWillLoad() {
245
- this.enabled = this.jackpot.Enabled;
246
- this.balance = this.jackpot.Balance;
247
- this.winBalance = this.jackpot.WinBalance;
248
- this.jackpotEndTime = this.jackpot.JackpotEndTime;
249
- this.disabledStatus = this.jackpot.Reason || '';
250
- this.startCountdown();
251
- }
252
- componentDidRender() {
253
- if (!this.limitStylingAppends && this.host) {
254
- if (this.clientStyling)
255
- this.setClientStyling();
256
- if (this.clientStylingUrl)
257
- this.setClientStylingURL();
258
- this.limitStylingAppends = true;
254
+ disconnectedCallback() {
255
+ this.clearInterval();
259
256
  }
260
- if (this.activeTab === 2 && !this.maxVisibleGames) {
261
- this.setVisibleGames();
257
+ clearInterval() {
258
+ if (this.interval) {
259
+ clearInterval(this.interval);
260
+ this.interval = null;
261
+ }
262
262
  }
263
- }
264
- disconnectedCallback() {
265
- this.clearInterval();
266
- }
267
- clearInterval() {
268
- if (this.interval) {
269
- clearInterval(this.interval);
270
- this.interval = null;
263
+ setVisibleGames() {
264
+ const gap = this.device === 'Mobile' ? 10 : 12;
265
+ const gamesPerRow = this.device === 'Mobile' ? 4 : 5;
266
+ const availableWidth = this.gamesListWrapperEl.offsetWidth - (gap * (gamesPerRow - 1));
267
+ const gameElWidth = availableWidth / gamesPerRow;
268
+ const gameElHeight = (gameElWidth / 74 * 40) + gap;
269
+ this.maxVisibleGames = Math.max(Math.floor(this.gamesListWrapperEl.offsetHeight / gameElHeight) * gamesPerRow, gamesPerRow);
270
+ this.visibleGames = this.jackpot.GamesInfo.slice(0, this.maxVisibleGames);
271
271
  }
272
- }
273
- setVisibleGames() {
274
- const gap = this.device === 'Mobile' ? 10 : 12;
275
- const gamesPerRow = this.device === 'Mobile' ? 4 : 5;
276
- const availableWidth = this.gamesListWrapperEl.offsetWidth - (gap * (gamesPerRow - 1));
277
- const gameElWidth = availableWidth / gamesPerRow;
278
- const gameElHeight = (gameElWidth / 74 * 40) + gap;
279
- this.maxVisibleGames = Math.max(Math.floor(this.gamesListWrapperEl.offsetHeight / gameElHeight) * gamesPerRow, gamesPerRow);
280
- this.visibleGames = this.jackpot.GamesInfo.slice(0, this.maxVisibleGames);
281
- }
282
- updateJackpotStatus(event) {
283
- if (event.IsClosed) {
284
- this.clearInterval();
285
- this.disabledStatus = event.Reason;
286
- this.activeTab = 1;
272
+ updateJackpotStatus(event) {
273
+ if (event.IsClosed) {
274
+ this.clearInterval();
275
+ this.disabledStatus = event.Reason;
276
+ this.activeTab = 1;
277
+ }
278
+ else {
279
+ this.disabledStatus = '';
280
+ this.jackpotEndTime = event.JackpotEndTime;
281
+ this.startCountdown();
282
+ }
287
283
  }
288
- else {
289
- this.disabledStatus = '';
290
- this.jackpotEndTime = event.JackpotEndTime;
291
- this.startCountdown();
284
+ getTopNavigationTemplate() {
285
+ return (h("div", { class: "JackpotDetailsNavigation" }, h("button", { class: "EngagementSuiteIconButton Back", onClick: this.handleBackClick }), h("div", { class: "JackpotPopupName" }, translate('jackpots', this.language)), h("button", { class: "EngagementSuiteIconButton Close", onClick: this.handleCloseClick })));
292
286
  }
293
- }
294
- getTopNavigationTemplate() {
295
- return (h("div", { class: "JackpotDetailsNavigation" }, h("button", { class: "JackpotIconButton", onClick: this.handleBackClick }, h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/back.svg", alt: "back" })), h("div", { class: "JackpotPopupName" }, translate('jackpots', this.language)), h("button", { class: "JackpotIconButton", onClick: this.handleCloseClick }, h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/close.svg", alt: "close" }))));
296
- }
297
- getJackpotBalance() {
298
- return formatBalance(this.balance, this.jackpot.Currency);
299
- }
300
- getJoinButtonClasses() {
301
- return {
302
- PopupButton: true,
303
- Active: this.enabled,
304
- Loading: this.jackpot.Pending
305
- };
306
- }
307
- getJackpotDetailsHeaderTemplate() {
308
- const joinButtonDisabled = isBefore(new Date(this.jackpot.JackpotEndTime), new Date()) || !!this.disabledStatus;
309
- return (h("div", { class: "JackpotDetailsHeader" }, h("div", null, h("div", { class: "JackpotType" }, this.jackpot.Type), h("div", { class: "JackpotBalance" }, this.getJackpotBalance())), h("div", { class: "JackpotDetailsHeaderSecondCol" }, h("button", { disabled: joinButtonDisabled, onClick: this.jackpotChangeStatusRequest, class: this.getJoinButtonClasses(), "data-id": this.jackpot.JackpotId }, this.enabled
310
- ? translate('unjoin', this.language)
311
- : translate('join', this.language)), !!this.winBalance && h("div", { class: "JackpotIsWon" }, translate('jackpotIsWon', this.language)))));
312
- }
313
- getTabsTemplate() {
314
- return h("div", { class: "JackpotDetailsTabs" }, h("div", { "data-index": "1", onClick: this.handleTabChange, class: `JackpotDetailsTab ${this.activeTab === 1 ? 'Active' : ''}` }, translate('info', this.language)), h("div", { "data-index": "2", onClick: this.handleTabChange, class: `JackpotDetailsTab ${this.activeTab === 2 ? 'Active' : ''}` }, translate('games', this.language)));
315
- }
316
- getTabsContentTemplate() {
317
- return this.activeTab === 1
318
- ? this.getJackpotInfoTemplate()
319
- : this.getGamesTemplate();
320
- }
321
- getJackpotDetailsTemplate() {
322
- return h("div", null, h("div", { class: "JackpotDetailsButton", onClick: this.toggleShowDetails }, h("div", { class: `Toggle ${this.showDetails ? 'Closed' : 'Open'}` }), h("span", null, translate('jackpotDetails', this.language))), this.showDetails && h("div", { class: "JackpotDetailsContent" }, this.jackpot.Description && h("p", { class: "JackpotDescription" }, this.jackpot.Description), this.jackpot.JackpotRulesUrl && h("a", { class: "TermsAndConditions", href: this.jackpot.JackpotRulesUrl, target: "_blank" }, translate('tc', this.jackpot.JackpotRulesUrl))));
323
- }
324
- getBetLimitsRange() {
325
- var _a, _b, _c, _d;
326
- if (this.jackpot.BetLimits) {
327
- const playerCurrency = this.jackpot.Currency;
328
- const betCurrencies = Object.keys(this.jackpot.BetLimits);
329
- const matchedCurrency = betCurrencies.find(currency => currency === playerCurrency);
330
- const betCurrency = matchedCurrency ? matchedCurrency : betCurrencies[0];
331
- const showMinBet = this.jackpot.BetLimits && !!((_a = this.jackpot.BetLimits[betCurrency]) === null || _a === void 0 ? void 0 : _a.MinBet);
332
- const showMaxBet = this.jackpot.BetLimits && !!((_b = this.jackpot.BetLimits[betCurrency]) === null || _b === void 0 ? void 0 : _b.MaxBet);
333
- const formattedMinBet = formatBalance((_c = this.jackpot.BetLimits[betCurrency]) === null || _c === void 0 ? void 0 : _c.MinBet, betCurrency);
334
- const formattedMaxBet = formatBalance((_d = this.jackpot.BetLimits[betCurrency]) === null || _d === void 0 ? void 0 : _d.MaxBet, betCurrency);
335
- return h("div", null, showMinBet && h("div", { class: "JackpotInfoItem" }, translate('minBet', this.language), ":\u00A0", h("span", null, formattedMinBet)), showMaxBet && h("div", { class: "JackpotInfoItem" }, translate('maxBet', this.language), ":\u00A0", h("span", null, formattedMaxBet)));
287
+ getJackpotBalance() {
288
+ return formatBalance(this.balance, this.jackpot.Currency);
336
289
  }
337
- }
338
- getJackpotInfoTemplate() {
339
- const showDetails = !!(this.jackpot.Description || this.jackpot.JackpotRulesUrl);
340
- return h("div", { class: "JackpotInfoTabContent" }, showDetails && this.getJackpotDetailsTemplate(), h("div", { class: "JackpotInfo" }, h("div", { class: "JackpotInfoItem" }, translate('betContribution', this.language), ":\u00A0", h("span", null, +this.jackpot.ContributionPercent, "%")), h("div", { class: "JackpotInfoItem" }, translate('type', this.language), ":\u00A0", h("span", null, this.jackpot.JackpotTypePresentation)), h("div", { class: "JackpotInfoItem" }, translate('winningProbability', this.language), ":\u00A0", h("span", null, "1:", this.jackpot.Probability)), h("div", { class: "JackpotInfoItem" }, translate('operatorContribution', this.language), ":\u00A0", h("span", null, +this.jackpot.OperatorContributionPercent, "%"), h("button", { class: "JackpotContributionTooltipButton", onClick: this.toggleTooltip })), this.getBetLimitsRange()));
341
- }
342
- getGamesTemplate() {
343
- const list = this.visibleGames.map((game) => {
344
- return h("div", { onClick: this.onGameClick, class: `JackpotGamesListItem ${game.GameSlug === this.gameSlug ? 'Disabled' : ''}`, key: game.CasinoGameId, "data-slug": game.GameSlug, style: { background: `center / cover url(${game.GameIcon}) no-repeat` }, title: game.GameName });
345
- });
346
- return [
347
- h("div", { class: "JackpotGamesListWrapper", ref: el => this.gamesListWrapperEl = el }, h("div", { class: "JackpotGamesList" }, list)),
348
- this.visibleGames.length < this.jackpot.GamesInfo.length
349
- ? h("button", { class: "PopupButton Active JackpotGamesButton", onClick: this.handleLoadMore }, translate('loadMore', this.language))
350
- : ''
351
- ];
352
- }
353
- getJackpotCountdown() {
354
- const timerMessage = translate(this.disabledStatus, this.language) || this.timer;
355
- return (h("div", { class: `JackpotCountdown ${this.disabledStatus ? 'Suspended' : ''}` }, timerMessage));
356
- }
357
- startCountdown() {
358
- this.updateTimer();
359
- this.interval = setInterval(() => {
360
- this.updateTimer();
361
- }, 1000);
362
- }
363
- updateTimer() {
364
- const expirationTime = new Date(this.jackpotEndTime).getTime();
365
- const now = new Date().getTime();
366
- const distance = expirationTime - now;
367
- if (distance < 1) {
368
- this.clearInterval();
369
- return;
290
+ getJoinButtonClasses() {
291
+ return {
292
+ EngagementSuiteButton: true,
293
+ Active: this.enabled,
294
+ Loading: this.jackpot.Pending
295
+ };
370
296
  }
371
- const { days, hours, minutes, seconds } = {
372
- days: String(Math.floor(distance / (1000 * 60 * 60 * 24))).padStart(2, '0'),
373
- hours: String(Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60))).padStart(2, '0'),
374
- minutes: String(Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60))).padStart(2, '0'),
375
- seconds: String(Math.floor((distance % (1000 * 60)) / 1000)).padStart(2, '0')
376
- };
377
- this.timer = days === '00'
378
- ? `${hours}h:${minutes}m:${seconds}s`
379
- : `${days}d:${hours}h:${minutes}m`;
380
- }
381
- getPopupClasses() {
382
- return {
383
- JackpotDetailsPopup: true,
384
- Disabled: !!this.disabledStatus || isBefore(new Date(this.jackpot.JackpotEndTime), new Date()),
385
- [this.device]: true,
386
- [this.jackpot.Type.charAt(0).toUpperCase() + this.jackpot.Type.slice(1)]: true
387
- };
388
- }
389
- getTooltipTemplate() {
390
- return (h("div", { class: "JackpotsTooltipBackdrop" }, h("div", { class: "JackpotsTooltip" }, h("button", { class: "JackpotsIconButton", onClick: this.toggleTooltip }, h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/close.svg", alt: "Close tooltip" })), translate('contributionTooltip', this.language))));
391
- }
392
- render() {
393
- return h("div", { class: this.getPopupClasses() }, this.getTopNavigationTemplate(), h("div", { class: "JackpotDetailsPopupContent" }, this.getJackpotDetailsHeaderTemplate(), this.getJackpotCountdown(), this.getTabsTemplate(), this.getTabsContentTemplate(), this.showTooltip && this.getTooltipTemplate()));
394
- }
395
- get host() { return getElement(this); }
396
- static get watchers() { return {
397
- "jackpot": ["handleJackpotUpdate"]
398
- }; }
297
+ getJackpotDetailsHeaderTemplate() {
298
+ const joinButtonDisabled = isBefore(new Date(this.jackpot.JackpotEndTime), new Date()) || !!this.disabledStatus;
299
+ return (h("div", { class: "JackpotDetailsHeader" }, h("div", null, h("div", { class: "JackpotType" }, this.jackpot.Type), h("div", { class: "JackpotBalance" }, this.getJackpotBalance())), h("div", { class: "JackpotDetailsHeaderSecondCol" }, h("button", { disabled: joinButtonDisabled, onClick: this.jackpotChangeStatusRequest, class: this.getJoinButtonClasses(), "data-id": this.jackpot.JackpotId }, this.enabled
300
+ ? translate('unjoin', this.language)
301
+ : translate('join', this.language)), !!this.winBalance && h("div", { class: "JackpotIsWon" }, translate('jackpotIsWon', this.language)))));
302
+ }
303
+ getTabsTemplate() {
304
+ return h("div", { class: "EngagementSuiteTabs" }, h("div", { "data-index": "1", onClick: this.handleTabChange, class: `EngagementSuiteTab ${this.activeTab === 1 ? 'Active' : ''}` }, translate('info', this.language)), h("div", { "data-index": "2", onClick: this.handleTabChange, class: `EngagementSuiteTab ${this.activeTab === 2 ? 'Active' : ''}` }, translate('games', this.language)));
305
+ }
306
+ getTabsContentTemplate() {
307
+ return this.activeTab === 1
308
+ ? this.getJackpotInfoTemplate()
309
+ : this.getGamesTemplate();
310
+ }
311
+ getJackpotDetailsTemplate() {
312
+ return h("div", null, h("div", { class: "JackpotDetailsButton", onClick: this.toggleShowDetails }, h("div", { class: `Toggle ${this.showDetails ? 'Closed' : 'Open'}` }), h("span", null, translate('jackpotDetails', this.language))), this.showDetails && h("div", { class: "JackpotDetailsContent" }, this.jackpot.Description && h("p", { class: "JackpotDescription" }, this.jackpot.Description), this.jackpot.JackpotRulesUrl && h("a", { class: "TermsAndConditions", href: this.jackpot.JackpotRulesUrl, target: "_blank" }, translate('tc', this.jackpot.JackpotRulesUrl))));
313
+ }
314
+ getBetLimitsRange() {
315
+ var _a, _b, _c, _d;
316
+ if (this.jackpot.BetLimits) {
317
+ const playerCurrency = this.jackpot.Currency;
318
+ const betCurrencies = Object.keys(this.jackpot.BetLimits);
319
+ const matchedCurrency = betCurrencies.find(currency => currency === playerCurrency);
320
+ const betCurrency = matchedCurrency ? matchedCurrency : betCurrencies[0];
321
+ const showMinBet = this.jackpot.BetLimits && !!((_a = this.jackpot.BetLimits[betCurrency]) === null || _a === void 0 ? void 0 : _a.MinBet);
322
+ const showMaxBet = this.jackpot.BetLimits && !!((_b = this.jackpot.BetLimits[betCurrency]) === null || _b === void 0 ? void 0 : _b.MaxBet);
323
+ const formattedMinBet = formatBalance((_c = this.jackpot.BetLimits[betCurrency]) === null || _c === void 0 ? void 0 : _c.MinBet, betCurrency);
324
+ const formattedMaxBet = formatBalance((_d = this.jackpot.BetLimits[betCurrency]) === null || _d === void 0 ? void 0 : _d.MaxBet, betCurrency);
325
+ return h("div", null, showMinBet && h("div", { class: "JackpotInfoItem" }, translate('minBet', this.language), ":\u00A0", h("span", null, formattedMinBet)), showMaxBet && h("div", { class: "JackpotInfoItem" }, translate('maxBet', this.language), ":\u00A0", h("span", null, formattedMaxBet)));
326
+ }
327
+ }
328
+ getJackpotInfoTemplate() {
329
+ const showDetails = !!(this.jackpot.Description || this.jackpot.JackpotRulesUrl);
330
+ return h("div", { class: "JackpotInfoTabContent" }, showDetails && this.getJackpotDetailsTemplate(), h("div", { class: "JackpotInfo" }, h("div", { class: "JackpotInfoItem" }, translate('betContribution', this.language), ":\u00A0", h("span", null, +this.jackpot.ContributionPercent, "%")), h("div", { class: "JackpotInfoItem" }, translate('type', this.language), ":\u00A0", h("span", null, this.jackpot.JackpotTypePresentation)), h("div", { class: "JackpotInfoItem" }, translate('winningProbability', this.language), ":\u00A0", h("span", null, "1:", this.jackpot.Probability)), h("div", { class: "JackpotInfoItem" }, translate('operatorContribution', this.language), ":\u00A0", h("span", null, +this.jackpot.OperatorContributionPercent, "%"), h("button", { class: "EngagementSuiteIconButton Help", onClick: this.toggleTooltip })), this.getBetLimitsRange()));
331
+ }
332
+ getGamesTemplate() {
333
+ const list = this.visibleGames.map((game) => {
334
+ return h("div", { onClick: this.onGameClick, class: `JackpotGamesListItem ${game.GameSlug === this.gameSlug ? 'Disabled' : ''}`, key: game.CasinoGameId, "data-slug": game.GameSlug, style: { background: `center / cover url(${game.GameIcon}) no-repeat` }, title: game.GameName });
335
+ });
336
+ return [
337
+ h("div", { class: "JackpotGamesListWrapper", ref: el => this.gamesListWrapperEl = el }, h("div", { class: "JackpotGamesList" }, list)),
338
+ this.visibleGames.length < this.jackpot.GamesInfo.length
339
+ ? h("button", { class: "EngagementSuiteButton Active JackpotGamesButton", onClick: this.handleLoadMore }, translate('loadMore', this.language))
340
+ : ''
341
+ ];
342
+ }
343
+ getJackpotCountdown() {
344
+ const timerMessage = translate(this.disabledStatus, this.language) || this.timer;
345
+ return (h("div", { class: `JackpotCountdown ${this.disabledStatus ? 'Suspended' : ''}` }, timerMessage));
346
+ }
347
+ startCountdown() {
348
+ this.updateTimer();
349
+ this.interval = setInterval(() => {
350
+ this.updateTimer();
351
+ }, 1000);
352
+ }
353
+ updateTimer() {
354
+ const expirationTime = new Date(this.jackpotEndTime).getTime();
355
+ const now = new Date().getTime();
356
+ const distance = expirationTime - now;
357
+ if (distance < 1) {
358
+ this.clearInterval();
359
+ return;
360
+ }
361
+ const { days, hours, minutes, seconds } = {
362
+ days: String(Math.floor(distance / (1000 * 60 * 60 * 24))).padStart(2, '0'),
363
+ hours: String(Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60))).padStart(2, '0'),
364
+ minutes: String(Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60))).padStart(2, '0'),
365
+ seconds: String(Math.floor((distance % (1000 * 60)) / 1000)).padStart(2, '0')
366
+ };
367
+ this.timer = days === '00'
368
+ ? `${hours}h:${minutes}m:${seconds}s`
369
+ : `${days}d:${hours}h:${minutes}m`;
370
+ }
371
+ getPopupClasses() {
372
+ return {
373
+ JackpotDetailsPopup: true,
374
+ Disabled: !!this.disabledStatus || isBefore(new Date(this.jackpot.JackpotEndTime), new Date()),
375
+ [this.device]: true,
376
+ [this.jackpot.Type.charAt(0).toUpperCase() + this.jackpot.Type.slice(1)]: true
377
+ };
378
+ }
379
+ getTooltipTemplate() {
380
+ return (h("div", { class: "EngagementSuiteTooltipBackdrop" }, h("div", { class: "EngagementSuiteTooltip" }, h("button", { class: "EngagementSuiteIconButton Close", onClick: this.toggleTooltip }), translate('contributionTooltip', this.language))));
381
+ }
382
+ render() {
383
+ return h("div", { key: '96e68ef1594d185301719b8c8f4c6cb0c32307e9', class: this.getPopupClasses() }, this.getTopNavigationTemplate(), h("div", { key: '8eb282874b1efc99a05dfcf479b8b1be51402caa', class: "JackpotDetailsPopupContent" }, this.getJackpotDetailsHeaderTemplate(), this.getJackpotCountdown(), this.getTabsTemplate(), this.getTabsContentTemplate(), this.showTooltip && this.getTooltipTemplate()));
384
+ }
385
+ get host() { return getElement(this); }
386
+ static get watchers() { return {
387
+ "jackpot": ["handleJackpotUpdate"]
388
+ }; }
399
389
  };
400
- CasinoEngagementSuiteJackpotDetails.style = casinoEngagementSuiteJackpotDetailsCss;
390
+ CasinoEngagementSuiteJackpotDetails.style = CasinoEngagementSuiteJackpotDetailsStyle0;
401
391
 
402
392
  export { CasinoEngagementSuiteJackpotDetails as casino_engagement_suite_jackpot_details };