@everymatrix/casino-challenges-overlay-drawer 0.4.0 → 0.4.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 (26) hide show
  1. package/dist/casino-challenges-overlay-drawer/casino-challenge-details-events_21.entry.js +1 -1
  2. package/dist/casino-challenges-overlay-drawer/casino-challenges-overlay-drawer-22f199a0.js +1 -0
  3. package/dist/casino-challenges-overlay-drawer/casino-challenges-overlay-drawer.esm.js +1 -1
  4. package/dist/casino-challenges-overlay-drawer/index.esm.js +1 -1
  5. package/dist/cjs/casino-challenge-details-events_21.cjs.entry.js +32 -14
  6. package/dist/cjs/{casino-challenges-overlay-drawer-fc0f80db.js → casino-challenges-overlay-drawer-47aaa28f.js} +12 -3
  7. package/dist/cjs/casino-challenges-overlay-drawer.cjs.js +1 -1
  8. package/dist/cjs/index.cjs.js +1 -1
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/collection/components/casino-challenges-overlay-drawer/casino-challenges-overlay-drawer.js +27 -4
  11. package/dist/collection/components/components/casino-challenges-overlay-tabs/casino-challenges-overlay-tabs.css +5 -2
  12. package/dist/collection/components/components/casino-challenges-overlay-tabs/casino-challenges-overlay-tabs.js +41 -9
  13. package/dist/collection/components/components/swipe-up/swipe-up.css +22 -0
  14. package/dist/collection/components/components/swipe-up/swipe-up.js +9 -2
  15. package/dist/collection/utils/types.js +7 -0
  16. package/dist/esm/casino-challenge-details-events_21.entry.js +33 -15
  17. package/dist/esm/{casino-challenges-overlay-drawer-7f1fbfff.js → casino-challenges-overlay-drawer-22f199a0.js} +13 -4
  18. package/dist/esm/casino-challenges-overlay-drawer.js +1 -1
  19. package/dist/esm/index.js +1 -1
  20. package/dist/esm/loader.js +1 -1
  21. package/dist/types/components/casino-challenges-overlay-drawer/casino-challenges-overlay-drawer.d.ts +2 -1
  22. package/dist/types/components/components/casino-challenges-overlay-tabs/casino-challenges-overlay-tabs.d.ts +3 -1
  23. package/dist/types/components.d.ts +6 -2
  24. package/dist/types/utils/types.d.ts +6 -0
  25. package/package.json +1 -1
  26. package/dist/casino-challenges-overlay-drawer/casino-challenges-overlay-drawer-7f1fbfff.js +0 -1
@@ -16,5 +16,5 @@ var patchBrowser = () => {
16
16
 
17
17
  patchBrowser().then(async (options) => {
18
18
  await globalScripts();
19
- return bootstrapLazy([["casino-challenge-details-events_21",[[1,"casino-challenges-overlay-drawer",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"isOpen":[516,"is-open"],"handleClose":[16],"challenges":[16],"initialProgressId":[513,"initial-progress-id"],"activeChallenge":[32],"activeProgressId":[32],"activeTabIndex":[32],"error":[32],"hasError":[32],"swipped":[32],"detailsSubPageInfo":[32],"progress":[32],"loading":[32],"notification":[32],"optOutModaIsOpen":[32],"isOptedOut":[32],"prevUpdateEvent":[32],"challengeGames":[32],"activeChallenges":[32],"pendingChallenges":[32],"promoChallenges":[32],"playerHistory":[32],"hasMorePlayerHistory":[32],"emptyState":[32]},[[0,"openOptOutModal","onOpenOptOut"],[0,"closeOptOutModal","onCloseOptOut"],[0,"confirmOptOut","onConfirmOptOut"],[0,"challengeExpired","onChallengeExpired"],[8,"message","handleEvent"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"isOpen":["handleIsOpenChange"],"activeChallenge":["onActiveChallengeChanged"]}],[1,"casino-challenges-overlay-drawer-details",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"challenge":[16],"language":[513],"isMobile":[516,"is-mobile"],"isUnique":[516,"is-unique"],"swipped":[516],"progress":[514],"activeChallengesTabIndex":[513,"active-challenges-tab-index"],"detailsSubPageInfo":[16],"isOptedOut":[516,"is-opted-out"],"challengeGames":[16],"swipping":[32],"actionLoading":[32],"error":[32],"isChallengePaused":[32],"timeLeft":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"progress":["onSwipeChange"],"challenge":["onChallengeChange"]}],[0,"casino-challenge-opt-out-modal",{"language":[1],"isMobile":[4,"is-mobile"],"open":[4]}],[1,"casino-challenges-overlay-drawer-history",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"isMobile":[516,"is-mobile"],"loading":[516],"hasMore":[516,"has-more"],"historyItems":[16],"openItems":[32],"pageSize":[32],"pageNumber":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"historyItems":["handlePlayerHistoryChange"]}],[1,"casino-challenges-overlay-slider",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"isMobile":[516,"is-mobile"],"challenges":[16],"initialProgressId":[1,"initial-progress-id"],"activeTabIndex":[1,"active-tab-index"],"currentIndex":[32],"slideWidth":[32],"slideHeight":[32],"isOneSlide":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"currentIndex":["onCurrentIndexChange"],"challenges":["onChallengesChange"],"initialProgressId":["onInitialProgressIdChange"]}],[0,"casino-challenge-overlay-background",{"empty":[4]}],[1,"casino-challenges-claim-code",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"isMobile":[516,"is-mobile"],"loading":[32],"hasError":[32],"code":[32],"notificationMessage":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[0,"casino-challenges-empty-state",{"header":[1],"description":[1],"isMobile":[516,"is-mobile"]}],[0,"casino-challenges-overlay-loader",{"fullSize":[4,"full-size"],"isMobile":[516,"is-mobile"]}],[0,"casino-challenges-overlay-tabs",{"language":[513],"isMobile":[516,"is-mobile"],"activeTabIndex":[514,"active-tab-index"],"activeTabHasNotification":[516,"active-tab-has-notification"],"pendingTabHasNotification":[516,"pending-tab-has-notification"]}],[4,"swipe-up",{"isMobile":[516,"is-mobile"],"isOneSlider":[516,"is-one-slider"],"progress":[32]},null,{"isOneSlider":["onIsOneSliderChange"],"progress":["onSwipeChange"]}],[0,"casino-challenge-details-levels",{"challenge":[16],"language":[1],"isMobile":[4,"is-mobile"],"isChallengePaused":[4,"is-challenge-paused"],"isOptedOut":[4,"is-opted-out"],"open":[4]}],[0,"casino-challenge-details-events",{"challenge":[16],"language":[1],"isMobile":[4,"is-mobile"],"open":[4]}],[0,"casino-challenge-details-games",{"challenge":[16],"language":[1],"isMobile":[4,"is-mobile"],"games":[16]}],[0,"casino-challenge-details-progress-bar",{"challenge":[16],"language":[1],"isMobile":[4,"is-mobile"]}],[0,"casino-challenge-details-rules",{"challenge":[16],"language":[1],"isMobile":[4,"is-mobile"],"isOptedOut":[4,"is-opted-out"],"open":[4]}],[0,"casino-challenge-drawer-history-item",{"language":[513],"index":[514],"historyItem":[16],"itemRef":[16],"isOpen":[4,"is-open"],"isMobile":[4,"is-mobile"],"toggle":[16]}],[1,"casino-challenges-modal",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"isOpen":[516,"is-open"],"showWinAnimation":[516,"show-win-animation"],"showBackdrop":[516,"show-backdrop"],"showCloseButton":[516,"show-close-button"]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[0,"casino-challenges-overlay-card",{"challenge":[16],"index":[2],"arrLength":[2,"arr-length"],"currentIndex":[2,"current-index"],"language":[1],"isOptedOut":[4,"is-opted-out"],"slideWidth":[2,"slide-width"],"slideHeight":[2,"slide-height"],"timeLeft":[32]}],[4,"casino-challenge-expandable-paragraph",{"maxHeight":[2,"max-height"],"active":[4],"expanded":[32],"needsTruncation":[32]}],[0,"casino-challenge-level-progress-bar",{"height":[1],"active":[4],"value":[2]}]]]], options);
19
+ return bootstrapLazy([["casino-challenge-details-events_21",[[1,"casino-challenges-overlay-drawer",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"isOpen":[516,"is-open"],"handleClose":[16],"challenges":[16],"initialProgressId":[513,"initial-progress-id"],"enabledWidgetTabs":[16],"activeChallenge":[32],"activeProgressId":[32],"activeTabIndex":[32],"error":[32],"hasError":[32],"swipped":[32],"detailsSubPageInfo":[32],"progress":[32],"loading":[32],"notification":[32],"optOutModaIsOpen":[32],"isOptedOut":[32],"prevUpdateEvent":[32],"challengeGames":[32],"activeChallenges":[32],"pendingChallenges":[32],"promoChallenges":[32],"playerHistory":[32],"hasMorePlayerHistory":[32],"emptyState":[32]},[[0,"openOptOutModal","onOpenOptOut"],[0,"closeOptOutModal","onCloseOptOut"],[0,"confirmOptOut","onConfirmOptOut"],[0,"challengeExpired","onChallengeExpired"],[8,"message","handleEvent"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"isOpen":["handleIsOpenChange"],"activeChallenge":["onActiveChallengeChanged"]}],[1,"casino-challenges-overlay-drawer-details",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"challenge":[16],"language":[513],"isMobile":[516,"is-mobile"],"isUnique":[516,"is-unique"],"swipped":[516],"progress":[514],"activeChallengesTabIndex":[513,"active-challenges-tab-index"],"detailsSubPageInfo":[16],"isOptedOut":[516,"is-opted-out"],"challengeGames":[16],"swipping":[32],"actionLoading":[32],"error":[32],"isChallengePaused":[32],"timeLeft":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"progress":["onSwipeChange"],"challenge":["onChallengeChange"]}],[0,"casino-challenge-opt-out-modal",{"language":[1],"isMobile":[4,"is-mobile"],"open":[4]}],[1,"casino-challenges-overlay-drawer-history",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"isMobile":[516,"is-mobile"],"loading":[516],"hasMore":[516,"has-more"],"historyItems":[16],"openItems":[32],"pageSize":[32],"pageNumber":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"historyItems":["handlePlayerHistoryChange"]}],[1,"casino-challenges-overlay-slider",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"isMobile":[516,"is-mobile"],"challenges":[16],"initialProgressId":[1,"initial-progress-id"],"activeTabIndex":[1,"active-tab-index"],"currentIndex":[32],"slideWidth":[32],"slideHeight":[32],"isOneSlide":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"currentIndex":["onCurrentIndexChange"],"challenges":["onChallengesChange"],"initialProgressId":["onInitialProgressIdChange"]}],[0,"casino-challenge-overlay-background",{"empty":[4]}],[1,"casino-challenges-claim-code",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"isMobile":[516,"is-mobile"],"loading":[32],"hasError":[32],"code":[32],"notificationMessage":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[0,"casino-challenges-empty-state",{"header":[1],"description":[1],"isMobile":[516,"is-mobile"]}],[0,"casino-challenges-overlay-loader",{"fullSize":[4,"full-size"],"isMobile":[516,"is-mobile"]}],[0,"casino-challenges-overlay-tabs",{"language":[513],"isMobile":[516,"is-mobile"],"activeTabIndex":[514,"active-tab-index"],"activeTabHasNotification":[516,"active-tab-has-notification"],"pendingTabHasNotification":[516,"pending-tab-has-notification"],"enabledWidgetTabs":[16]}],[4,"swipe-up",{"isMobile":[516,"is-mobile"],"isOneSlider":[516,"is-one-slider"],"progress":[32]},null,{"isOneSlider":["onIsOneSliderChange"],"progress":["onSwipeChange"]}],[0,"casino-challenge-details-levels",{"challenge":[16],"language":[1],"isMobile":[4,"is-mobile"],"isChallengePaused":[4,"is-challenge-paused"],"isOptedOut":[4,"is-opted-out"],"open":[4]}],[0,"casino-challenge-details-events",{"challenge":[16],"language":[1],"isMobile":[4,"is-mobile"],"open":[4]}],[0,"casino-challenge-details-games",{"challenge":[16],"language":[1],"isMobile":[4,"is-mobile"],"games":[16]}],[0,"casino-challenge-details-progress-bar",{"challenge":[16],"language":[1],"isMobile":[4,"is-mobile"]}],[0,"casino-challenge-details-rules",{"challenge":[16],"language":[1],"isMobile":[4,"is-mobile"],"isOptedOut":[4,"is-opted-out"],"open":[4]}],[0,"casino-challenge-drawer-history-item",{"language":[513],"index":[514],"historyItem":[16],"itemRef":[16],"isOpen":[4,"is-open"],"isMobile":[4,"is-mobile"],"toggle":[16]}],[1,"casino-challenges-modal",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"isOpen":[516,"is-open"],"showWinAnimation":[516,"show-win-animation"],"showBackdrop":[516,"show-backdrop"],"showCloseButton":[516,"show-close-button"]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[0,"casino-challenges-overlay-card",{"challenge":[16],"index":[2],"arrLength":[2,"arr-length"],"currentIndex":[2,"current-index"],"language":[1],"isOptedOut":[4,"is-opted-out"],"slideWidth":[2,"slide-width"],"slideHeight":[2,"slide-height"],"timeLeft":[32]}],[4,"casino-challenge-expandable-paragraph",{"maxHeight":[2,"max-height"],"active":[4],"expanded":[32],"needsTruncation":[32]}],[0,"casino-challenge-level-progress-bar",{"height":[1],"active":[4],"value":[2]}]]]], options);
20
20
  });
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { C as CasinoChallengesOverlayDrawer } from './casino-challenges-overlay-drawer-7f1fbfff.js';
1
+ export { C as CasinoChallengesOverlayDrawer } from './casino-challenges-overlay-drawer-22f199a0.js';
2
2
  import './index-25fd45d2.js';
@@ -5,7 +5,7 @@ import { g as globalScripts } from './app-globals-0f993ce5.js';
5
5
  const defineCustomElements = async (win, options) => {
6
6
  if (typeof window === 'undefined') return undefined;
7
7
  await globalScripts();
8
- return bootstrapLazy([["casino-challenge-details-events_21",[[1,"casino-challenges-overlay-drawer",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"isOpen":[516,"is-open"],"handleClose":[16],"challenges":[16],"initialProgressId":[513,"initial-progress-id"],"activeChallenge":[32],"activeProgressId":[32],"activeTabIndex":[32],"error":[32],"hasError":[32],"swipped":[32],"detailsSubPageInfo":[32],"progress":[32],"loading":[32],"notification":[32],"optOutModaIsOpen":[32],"isOptedOut":[32],"prevUpdateEvent":[32],"challengeGames":[32],"activeChallenges":[32],"pendingChallenges":[32],"promoChallenges":[32],"playerHistory":[32],"hasMorePlayerHistory":[32],"emptyState":[32]},[[0,"openOptOutModal","onOpenOptOut"],[0,"closeOptOutModal","onCloseOptOut"],[0,"confirmOptOut","onConfirmOptOut"],[0,"challengeExpired","onChallengeExpired"],[8,"message","handleEvent"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"isOpen":["handleIsOpenChange"],"activeChallenge":["onActiveChallengeChanged"]}],[1,"casino-challenges-overlay-drawer-details",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"challenge":[16],"language":[513],"isMobile":[516,"is-mobile"],"isUnique":[516,"is-unique"],"swipped":[516],"progress":[514],"activeChallengesTabIndex":[513,"active-challenges-tab-index"],"detailsSubPageInfo":[16],"isOptedOut":[516,"is-opted-out"],"challengeGames":[16],"swipping":[32],"actionLoading":[32],"error":[32],"isChallengePaused":[32],"timeLeft":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"progress":["onSwipeChange"],"challenge":["onChallengeChange"]}],[0,"casino-challenge-opt-out-modal",{"language":[1],"isMobile":[4,"is-mobile"],"open":[4]}],[1,"casino-challenges-overlay-drawer-history",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"isMobile":[516,"is-mobile"],"loading":[516],"hasMore":[516,"has-more"],"historyItems":[16],"openItems":[32],"pageSize":[32],"pageNumber":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"historyItems":["handlePlayerHistoryChange"]}],[1,"casino-challenges-overlay-slider",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"isMobile":[516,"is-mobile"],"challenges":[16],"initialProgressId":[1,"initial-progress-id"],"activeTabIndex":[1,"active-tab-index"],"currentIndex":[32],"slideWidth":[32],"slideHeight":[32],"isOneSlide":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"currentIndex":["onCurrentIndexChange"],"challenges":["onChallengesChange"],"initialProgressId":["onInitialProgressIdChange"]}],[0,"casino-challenge-overlay-background",{"empty":[4]}],[1,"casino-challenges-claim-code",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"isMobile":[516,"is-mobile"],"loading":[32],"hasError":[32],"code":[32],"notificationMessage":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[0,"casino-challenges-empty-state",{"header":[1],"description":[1],"isMobile":[516,"is-mobile"]}],[0,"casino-challenges-overlay-loader",{"fullSize":[4,"full-size"],"isMobile":[516,"is-mobile"]}],[0,"casino-challenges-overlay-tabs",{"language":[513],"isMobile":[516,"is-mobile"],"activeTabIndex":[514,"active-tab-index"],"activeTabHasNotification":[516,"active-tab-has-notification"],"pendingTabHasNotification":[516,"pending-tab-has-notification"]}],[4,"swipe-up",{"isMobile":[516,"is-mobile"],"isOneSlider":[516,"is-one-slider"],"progress":[32]},null,{"isOneSlider":["onIsOneSliderChange"],"progress":["onSwipeChange"]}],[0,"casino-challenge-details-levels",{"challenge":[16],"language":[1],"isMobile":[4,"is-mobile"],"isChallengePaused":[4,"is-challenge-paused"],"isOptedOut":[4,"is-opted-out"],"open":[4]}],[0,"casino-challenge-details-events",{"challenge":[16],"language":[1],"isMobile":[4,"is-mobile"],"open":[4]}],[0,"casino-challenge-details-games",{"challenge":[16],"language":[1],"isMobile":[4,"is-mobile"],"games":[16]}],[0,"casino-challenge-details-progress-bar",{"challenge":[16],"language":[1],"isMobile":[4,"is-mobile"]}],[0,"casino-challenge-details-rules",{"challenge":[16],"language":[1],"isMobile":[4,"is-mobile"],"isOptedOut":[4,"is-opted-out"],"open":[4]}],[0,"casino-challenge-drawer-history-item",{"language":[513],"index":[514],"historyItem":[16],"itemRef":[16],"isOpen":[4,"is-open"],"isMobile":[4,"is-mobile"],"toggle":[16]}],[1,"casino-challenges-modal",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"isOpen":[516,"is-open"],"showWinAnimation":[516,"show-win-animation"],"showBackdrop":[516,"show-backdrop"],"showCloseButton":[516,"show-close-button"]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[0,"casino-challenges-overlay-card",{"challenge":[16],"index":[2],"arrLength":[2,"arr-length"],"currentIndex":[2,"current-index"],"language":[1],"isOptedOut":[4,"is-opted-out"],"slideWidth":[2,"slide-width"],"slideHeight":[2,"slide-height"],"timeLeft":[32]}],[4,"casino-challenge-expandable-paragraph",{"maxHeight":[2,"max-height"],"active":[4],"expanded":[32],"needsTruncation":[32]}],[0,"casino-challenge-level-progress-bar",{"height":[1],"active":[4],"value":[2]}]]]], options);
8
+ return bootstrapLazy([["casino-challenge-details-events_21",[[1,"casino-challenges-overlay-drawer",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"isOpen":[516,"is-open"],"handleClose":[16],"challenges":[16],"initialProgressId":[513,"initial-progress-id"],"enabledWidgetTabs":[16],"activeChallenge":[32],"activeProgressId":[32],"activeTabIndex":[32],"error":[32],"hasError":[32],"swipped":[32],"detailsSubPageInfo":[32],"progress":[32],"loading":[32],"notification":[32],"optOutModaIsOpen":[32],"isOptedOut":[32],"prevUpdateEvent":[32],"challengeGames":[32],"activeChallenges":[32],"pendingChallenges":[32],"promoChallenges":[32],"playerHistory":[32],"hasMorePlayerHistory":[32],"emptyState":[32]},[[0,"openOptOutModal","onOpenOptOut"],[0,"closeOptOutModal","onCloseOptOut"],[0,"confirmOptOut","onConfirmOptOut"],[0,"challengeExpired","onChallengeExpired"],[8,"message","handleEvent"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"isOpen":["handleIsOpenChange"],"activeChallenge":["onActiveChallengeChanged"]}],[1,"casino-challenges-overlay-drawer-details",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"challenge":[16],"language":[513],"isMobile":[516,"is-mobile"],"isUnique":[516,"is-unique"],"swipped":[516],"progress":[514],"activeChallengesTabIndex":[513,"active-challenges-tab-index"],"detailsSubPageInfo":[16],"isOptedOut":[516,"is-opted-out"],"challengeGames":[16],"swipping":[32],"actionLoading":[32],"error":[32],"isChallengePaused":[32],"timeLeft":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"progress":["onSwipeChange"],"challenge":["onChallengeChange"]}],[0,"casino-challenge-opt-out-modal",{"language":[1],"isMobile":[4,"is-mobile"],"open":[4]}],[1,"casino-challenges-overlay-drawer-history",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"isMobile":[516,"is-mobile"],"loading":[516],"hasMore":[516,"has-more"],"historyItems":[16],"openItems":[32],"pageSize":[32],"pageNumber":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"historyItems":["handlePlayerHistoryChange"]}],[1,"casino-challenges-overlay-slider",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"isMobile":[516,"is-mobile"],"challenges":[16],"initialProgressId":[1,"initial-progress-id"],"activeTabIndex":[1,"active-tab-index"],"currentIndex":[32],"slideWidth":[32],"slideHeight":[32],"isOneSlide":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"currentIndex":["onCurrentIndexChange"],"challenges":["onChallengesChange"],"initialProgressId":["onInitialProgressIdChange"]}],[0,"casino-challenge-overlay-background",{"empty":[4]}],[1,"casino-challenges-claim-code",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"isMobile":[516,"is-mobile"],"loading":[32],"hasError":[32],"code":[32],"notificationMessage":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[0,"casino-challenges-empty-state",{"header":[1],"description":[1],"isMobile":[516,"is-mobile"]}],[0,"casino-challenges-overlay-loader",{"fullSize":[4,"full-size"],"isMobile":[516,"is-mobile"]}],[0,"casino-challenges-overlay-tabs",{"language":[513],"isMobile":[516,"is-mobile"],"activeTabIndex":[514,"active-tab-index"],"activeTabHasNotification":[516,"active-tab-has-notification"],"pendingTabHasNotification":[516,"pending-tab-has-notification"],"enabledWidgetTabs":[16]}],[4,"swipe-up",{"isMobile":[516,"is-mobile"],"isOneSlider":[516,"is-one-slider"],"progress":[32]},null,{"isOneSlider":["onIsOneSliderChange"],"progress":["onSwipeChange"]}],[0,"casino-challenge-details-levels",{"challenge":[16],"language":[1],"isMobile":[4,"is-mobile"],"isChallengePaused":[4,"is-challenge-paused"],"isOptedOut":[4,"is-opted-out"],"open":[4]}],[0,"casino-challenge-details-events",{"challenge":[16],"language":[1],"isMobile":[4,"is-mobile"],"open":[4]}],[0,"casino-challenge-details-games",{"challenge":[16],"language":[1],"isMobile":[4,"is-mobile"],"games":[16]}],[0,"casino-challenge-details-progress-bar",{"challenge":[16],"language":[1],"isMobile":[4,"is-mobile"]}],[0,"casino-challenge-details-rules",{"challenge":[16],"language":[1],"isMobile":[4,"is-mobile"],"isOptedOut":[4,"is-opted-out"],"open":[4]}],[0,"casino-challenge-drawer-history-item",{"language":[513],"index":[514],"historyItem":[16],"itemRef":[16],"isOpen":[4,"is-open"],"isMobile":[4,"is-mobile"],"toggle":[16]}],[1,"casino-challenges-modal",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"isOpen":[516,"is-open"],"showWinAnimation":[516,"show-win-animation"],"showBackdrop":[516,"show-backdrop"],"showCloseButton":[516,"show-close-button"]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[0,"casino-challenges-overlay-card",{"challenge":[16],"index":[2],"arrLength":[2,"arr-length"],"currentIndex":[2,"current-index"],"language":[1],"isOptedOut":[4,"is-opted-out"],"slideWidth":[2,"slide-width"],"slideHeight":[2,"slide-height"],"timeLeft":[32]}],[4,"casino-challenge-expandable-paragraph",{"maxHeight":[2,"max-height"],"active":[4],"expanded":[32],"needsTruncation":[32]}],[0,"casino-challenge-level-progress-bar",{"height":[1],"active":[4],"value":[2]}]]]], options);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };
@@ -1,4 +1,4 @@
1
- import { EChallengesTabs, IChallenge, IGameDetails, IHistoryItem, INotificationOptions, IUpdateChallengeProgressData } from '../../utils/types';
1
+ import { EChallengesTabs, EFeatureFlags, IChallenge, IGameDetails, IHistoryItem, INotificationOptions, IUpdateChallengeProgressData } from '../../utils/types';
2
2
  import "../../../../../../dist/packages/stencil/casino-challenges-overlay-slider/dist/types/index";
3
3
  import "../../../../../../dist/packages/stencil/casino-challenges-overlay-drawer-details/dist/types/index";
4
4
  import "../../../../../../dist/packages/stencil/casino-challenges-modal/dist/types/index";
@@ -12,6 +12,7 @@ export declare class CasinoChallengesOverlayDrawer {
12
12
  handleClose: () => void;
13
13
  challenges: IChallenge[];
14
14
  initialProgressId: string;
15
+ enabledWidgetTabs: EFeatureFlags[];
15
16
  activeChallenge?: IChallenge | null;
16
17
  activeProgressId: string;
17
18
  activeTabIndex: EChallengesTabs;
@@ -1,15 +1,17 @@
1
1
  import { EventEmitter } from '../../../stencil-public-runtime';
2
- import { EChallengesTabs } from '../../../utils/types';
2
+ import { EChallengesTabs, EFeatureFlags } from '../../../utils/types';
3
3
  export declare class CasinoChallengeOverlayTabs {
4
4
  language: string;
5
5
  isMobile: boolean;
6
6
  activeTabIndex: EChallengesTabs;
7
7
  activeTabHasNotification: boolean;
8
8
  pendingTabHasNotification: boolean;
9
+ enabledWidgetTabs: EFeatureFlags[];
9
10
  tabClick: EventEmitter;
10
11
  get tabs(): {
11
12
  label: string;
12
13
  showNotification?: boolean;
14
+ shown?: boolean;
13
15
  }[];
14
16
  private handleTabClick;
15
17
  render(): any;
@@ -5,8 +5,8 @@
5
5
  * It contains typing information for all components that exist in this project.
6
6
  */
7
7
  import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
- import { EChallengesTabs, IChallenge, IHistoryItem, IPaginationOptions } from "./utils/types";
9
- export { EChallengesTabs, IChallenge, IHistoryItem, IPaginationOptions } from "./utils/types";
8
+ import { EChallengesTabs, EFeatureFlags, IChallenge, IHistoryItem, IPaginationOptions } from "./utils/types";
9
+ export { EChallengesTabs, EFeatureFlags, IChallenge, IHistoryItem, IPaginationOptions } from "./utils/types";
10
10
  export namespace Components {
11
11
  interface CasinoChallengeDrawerHistoryItem {
12
12
  "historyItem": IHistoryItem;
@@ -65,6 +65,7 @@ export namespace Components {
65
65
  "challenges": IChallenge[];
66
66
  "clientStyling"?: string;
67
67
  "clientStylingUrl"?: string;
68
+ "enabledWidgetTabs": EFeatureFlags[];
68
69
  "handleClose": () => void;
69
70
  "initialProgressId": string;
70
71
  "isOpen": boolean;
@@ -90,6 +91,7 @@ export namespace Components {
90
91
  interface CasinoChallengesOverlayTabs {
91
92
  "activeTabHasNotification": boolean;
92
93
  "activeTabIndex": EChallengesTabs;
94
+ "enabledWidgetTabs": EFeatureFlags[];
93
95
  "isMobile": boolean;
94
96
  "language": string;
95
97
  "pendingTabHasNotification": boolean;
@@ -294,6 +296,7 @@ declare namespace LocalJSX {
294
296
  "challenges"?: IChallenge[];
295
297
  "clientStyling"?: string;
296
298
  "clientStylingUrl"?: string;
299
+ "enabledWidgetTabs"?: EFeatureFlags[];
297
300
  "handleClose"?: () => void;
298
301
  "initialProgressId"?: string;
299
302
  "isOpen"?: boolean;
@@ -320,6 +323,7 @@ declare namespace LocalJSX {
320
323
  interface CasinoChallengesOverlayTabs {
321
324
  "activeTabHasNotification"?: boolean;
322
325
  "activeTabIndex"?: EChallengesTabs;
326
+ "enabledWidgetTabs"?: EFeatureFlags[];
323
327
  "isMobile"?: boolean;
324
328
  "language"?: string;
325
329
  "onTabClick"?: (event: CasinoChallengesOverlayTabsCustomEvent<any>) => void;
@@ -324,4 +324,10 @@ export interface IUpdateChallengeProgressData {
324
324
  Status: EChallengeProgressStatus;
325
325
  Levels: ILevelProgress[];
326
326
  }
327
+ export declare enum EFeatureFlags {
328
+ PromoTab = "promo",
329
+ PendingTab = "pending",
330
+ FinishedTab = "finished",
331
+ CodeTab = "code"
332
+ }
327
333
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/casino-challenges-overlay-drawer",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1 +0,0 @@
1
- import{r as e,h as t}from"./index-25fd45d2.js";const i="__WIDGET_GLOBAL_STYLE_CACHE__";function n(e,t){if(e){const i=document.createElement("style");i.innerHTML=t,e.appendChild(i)}}function s(e,t){if(!e||!t)return;const i=new URL(t);fetch(i.href).then((e=>e.text())).then((t=>{const i=document.createElement("style");i.innerHTML=t,e&&e.appendChild(i)})).catch((e=>{console.error("There was an error while trying to load client styling from URL",e)}))}function o(e,t,n,s=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!s)return n=function(e,t){const i=document.createElement("style");return window.emMessageBus.subscribe(t,(t=>{e&&(i.innerHTML=t,e.appendChild(i))}))}(e,t),n;window[i]||(window[i]={}),n=function(e,t){return window.emMessageBus.subscribe(t,(n=>{if(!e)return;const s=e.getRootNode(),o=window[i];let a=o[t]&&o[t].sheet;a?o[t].refCount=o[t].refCount+1:(a=new CSSStyleSheet,a.replaceSync(n),o[t]={sheet:a,refCount:1});const l=s.adoptedStyleSheets||[];l.includes(a)||(s.adoptedStyleSheets=[...l,a])}))}(e,t);const o=n.unsubscribe.bind(n);return n.unsubscribe=()=>{if(window[i][t]){const e=window[i][t];e.refCount>1?e.refCount=e.refCount-1:delete window[i][t]}o()},n}const a={en:{title:"Challenges",promo:"Promo",active:"Active",pendingTab:"Pending",finishedTab:"Finished",levels:"Levels",level:"Level",seeAll:"See All",games:"Games",rules:"Rules",events:"Events",codeTab:"Code",endsIn:"Ends In",expired:"Expired",placeBetsOf:"Place bets of",place:"Place",bet:"bet",bets:"bets",minBet:"min bet",forfeited:"Forfeited",finished:"Finished",suspended:"Suspended",completed:"Completed",unavailable:"Unavailable",optIn:"Opt In",optOutLeavingText:"Leaving the challenge will cancel your progress and disqualify from future participation",optOutLeavingActionText:"Opt out of Challenge",optOutModalTitle:"Opt out of challenge?",optOudModalDescription:"Current progress will be lost, but you will keep earned rewards. You will not be able to opt in for this challenge again.",optOutModalConfirm:"Opt Out",optOutModalCancel:"Cancel",optOutSuccessMessage:"You’ve opted out of the challenge.",resume:"Resume",pause:"Pause",join:"Join to Start",deposit:"Deposit",launchGame:"Launch Game",launchDescription:"Launch any game from the Games tab to unlock the Challenge",depositAmountDescription:"to unlock the Challenge",noDepositAmountDescription:"Deposit any amount to unlock the Challenge",claimByButton:"Claim",claimDescription:"Click Claim button to unlock the Challenge",resumeDescription:"Your progress is saved while Challenge is suspended",optInDescription:"You are ready to opt-in!",pausedDescription:"Your progress is saved while Challenge is paused",congrats:"Congratulations!",forfeitNotification:"Unfortunately, your progress has been forfeited, and you are no longer eligible to continue this challenge. Check out other available challenges!",optedOutNotification:"You’ve left this challenge. Your progress has been lost, and rejoining is no longer possible. Discover other available challenges.",completedNofitication:"You've successfully completed this challenge! Explore the next one and keep playing to earn more rewards!",expiredNotification:"Unfortunately, this challenge has expired and is no longer available to complete. Try another one that’s still active!",pendingDescription:"You can join this challenge once you've finished the previous progress in the Active tab",terms:"Terms & Conditions",readFullTerms:"Read full Terms & Conditions",contribution:"contribution",endDate:"End Date",back:"Back",all:"All Challenges",sports:"Sports",casino:"Casino",contributionType:"Contribution Type",contributionRule:"Contribution Rule",isContributeToOne:"Bets contribute only to the earliest started challenge (if there are multiple started challenges)",isNotContributeToOne:"Bets contribute to all started challenges",bonusMoney:"Bonus Money",realMoney:"Real Money",mixedMoney:"Real and Bonus Money contribution",defaultRule:"All events - ",fundsUsed:"Funds Used",sportsbookRealMoney:"Only Real Money bets can contribute",sportsbookBonusMoney:"Only Bonus bets can contribute",sportsbookMixMoney:"Both Real Money and Bonus bets can contribute",eligibleMatchTypes:"Eligible Match Types",preLiveMatchType:"Only Pre-Match bets can contribute",liveMatchType:"Only Live bets can contribute",mixMatchType:"Both Pre-Match and Live bets can contribute",eligibleBetTypes:"Eligible Bet Types",single:"Single",multi:"Multi/Combi",betBuilder:"Only Bet Builder Bets",nonBetBuilder:"Only Non-Bet Builder Bets",mixBetBuilder:"Bet Builder & Non-Bet Builder Bets",system:"System",banker:"Only Banker Bets",nonBanker:"Only Non-Banker Bets",mixBanker:"Banker & Non-Banker Bets",oddsPerSection:"Odds per Selection",totalOdds:"Total Odds",totalLevels:"Total Levels",selections:"Selections",time:"time",times:"times",winStakeRatio:"Win/Stake Ratio",promoTabEmptyHeader:"Nothing here - yet!",promoTabEmptyDescription:"No challenges at the moment. Try exploring events or keep playing to unlock new ones.",activeTabEmptyHeader:"No active challenges yet",activeTabEmptyDescription:"Check Promo tab to find available offers",pendingTabEmptyHeader:"No pending challenges yet",pendingTabEmptyDescription:"Check Promo tab to find available offers",finishedTabEmptyHeader:"No finished challenges yet",finishedTabEmptyDescription:"Check Promo tab to find available offers",yourProgress:"Your Progress",claimCodeTitle:"Enter the secret code to unlock hidden quests and rewards.",claimCodeSuccessMessage:"The code was successfully applied.",claimCodeInputLabel:"3–30 characters, no spaces",claimCodeBtnText:"Apply Code",claimCodeError:"Invalid format. Use Latin letters, numbers, or symbols.",claimCodeDescription:"Enter code to unlock the challenge",status:"Status",grantClaimByButtonSuccessMessage:"Challenge has been triggered successfully and is now available on the Active tab"},da:{title:""}},l=(e,t)=>a[void 0!==t&&t in a?t:"en"][e],r=async e=>{if(e)try{const i=await fetch(e);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const n=await i.json();t=n,Object.keys(t).forEach((e=>{a[e]||(a[e]={});for(let i in t[e])a[e][i]=t[e][i]}))}catch(e){console.error("Failed to fetch or parse translations from URL:",e)}var t};var h,c,d,g,u,M,p,b,m,v,z,y,w,f,x,C;!function(e){e[e.Accumulative=0]="Accumulative",e[e.SingleBet=1]="SingleBet",e[e.MultipleOneBetSize=2]="MultipleOneBetSize",e[e.BetMultiplier=3]="BetMultiplier"}(h||(h={})),function(e){e[e.Single=0]="Single",e[e.Daily=1]="Daily",e[e.Weekly=2]="Weekly",e[e.Monthly=3]="Monthly"}(c||(c={})),function(e){e[e.FreeSpins=0]="FreeSpins",e[e.LuckyWheel=1]="LuckyWheel",e[e.Leaderboard=2]="Leaderboard",e[e.Challenge=3]="Challenge",e[e.Custom=4]="Custom"}(d||(d={})),function(e){e[e.Closed=0]="Closed",e[e.InProgress=1]="InProgress",e[e.Fillup=2]="Fillup",e[e.Completed=3]="Completed"}(g||(g={})),function(e){e[e.Started=0]="Started",e[e.InProgress=1]="InProgress",e[e.PendingLevelReward=2]="PendingLevelReward",e[e.Completed=3]="Completed",e[e.Expired=4]="Expired",e[e.Forfeited=5]="Forfeited",e[e.Awaiting=6]="Awaiting",e[e.Paused=7]="Paused"}(u||(u={})),function(e){e[e.Draft=0]="Draft",e[e.Enabled=1]="Enabled",e[e.Paused=2]="Paused",e[e.Closed=3]="Closed",e[e.Deleted=4]="Deleted"}(M||(M={})),function(e){e[e.GameLaunch=0]="GameLaunch",e[e.Reward=1]="Reward",e[e.Manual=2]="Manual",e[e.Claim=3]="Claim",e[e.Event=4]="Event",e[e.Deposit=5]="Deposit",e[e.ClaimByButton=6]="ClaimByButton"}(p||(p={})),function(e){e[e.Period=0]="Period",e[e.Date=1]="Date"}(b||(b={})),function(e){e[e.Casino=0]="Casino",e[e.Any=1]="Any",e[e.Sportsbook=2]="Sportsbook"}(m||(m={})),function(e){e[e.Any=0]="Any",e[e.Live=1]="Live",e[e.PreLive=2]="PreLive"}(v||(v={})),function(e){e[e.Single=0]="Single",e[e.Multiple=1]="Multiple",e[e.System=2]="System"}(z||(z={})),function(e){e[e.Any=0]="Any",e[e.BankerOnly=1]="BankerOnly",e[e.NotBankerOnly=2]="NotBankerOnly"}(y||(y={})),function(e){e[e.Any=0]="Any",e[e.BetBuilderOnly=1]="BetBuilderOnly",e[e.NotBetBuilderOnly=2]="NotBetBuilderOnly"}(w||(w={})),function(e){e[e.RealCash=0]="RealCash",e[e.BonusMoney=1]="BonusMoney",e[e.Mixed=2]="Mixed"}(f||(f={})),function(e){e[e.Promo=0]="Promo",e[e.Active=1]="Active",e[e.Pending=2]="Pending",e[e.Finished=3]="Finished",e[e.Code=4]="Code"}(x||(x={})),function(e){e[e.Levels=0]="Levels",e[e.Games=1]="Games",e[e.Events=2]="Events",e[e.Rules=3]="Rules"}(C||(C={}));const N=["Completed","Expired","Forfeited"];var j,D,I;!function(e){e[e.Completed=0]="Completed",e[e.Expired=1]="Expired",e[e.Forfeited=2]="Forfeited"}(j||(j={})),function(e){e.ChallengesHistory="ChallengesHistoryRequest",e.ChallengePromoTab="ChallengePromoTabRequest",e.ClaimChallengeByCode="ClaimChallengeByCodeRequest",e.ChallengeJoin="ChallengeJoinRequest",e.RedirectToDepositPage="RedirectToDepositPage",e.ClaimChallengeByButton="ClaimChallengeByButtonRequest",e.GetChallengeGames="GetChallengeGamesRequest",e.ChallengeIsNew="ChallengeIsNewRequest",e.ChallengeInGameRedirect="ChallengeInGameRedirect",e.ForfeitChallenge="ForfeitChallengeRequest"}(D||(D={})),function(e){e.ChallengesHistory="ChallengesHistoryResponse",e.ChallengePromoTab="ChallengePromoTabResponse",e.ClaimChallengeByCode="ClaimChallengeByCodeResponse",e.ChallengeJoin="ChallengeJoinResponse",e.ClaimChallengeByButton="ClaimChallengeByButtonResponse",e.GetChallengeGames="GetChallengeGamesResponse",e.ChallengeIsNew="ChallengeIsNewResponse",e.ForfeitChallenge="ForfeitChallengeResponse",e.ChangeChallengeProgressStatus="ChangeChallengeProgressStatus",e.ChallengeChangeStatusNotification="ChallengeChangeStatusNotification",e.ChallengeForfeitNotification="ChallengeForfeitNotification",e.UpdateChallengeProgress="UpdateChallengeProgress",e.NewChallengeProgressGranted="NewChallengeProgressGranted"}(I||(I={}));const _=class{constructor(i){var n,s,o,r,h,c,d,g,p,b;e(this,i),this.EMPTY_STATE_PAGE_DESCRIPTION_MAP={[x.Promo]:{header:null===(n=a[this.language])||void 0===n?void 0:n.promoTabEmptyHeader,description:null===(s=a[this.language])||void 0===s?void 0:s.promoTabEmptyDescription},[x.Active]:{header:null===(o=a[this.language])||void 0===o?void 0:o.activeTabEmptyHeader,description:null===(r=a[this.language])||void 0===r?void 0:r.activeTabEmptyDescription},[x.Pending]:{header:null===(h=a[this.language])||void 0===h?void 0:h.pendingTabEmptyHeader,description:null===(c=a[this.language])||void 0===c?void 0:c.pendingTabEmptyDescription},[x.Finished]:{header:null===(d=a[this.language])||void 0===d?void 0:d.finishedTabEmptyHeader,description:null===(g=a[this.language])||void 0===g?void 0:g.finishedTabEmptyDescription}},this.onActiveChallengeChange=e=>{var t,i,n;(null==e?void 0:e.detail)&&(this.removeOptedOutChallenge(),this.updateActiveChallenge(this.activeTabIndex===x.Active?null===(t=this.activeChallenges)||void 0===t?void 0:t.find((t=>(null==t?void 0:t.Id)===e.detail)):this.activeTabIndex===x.Pending?null===(i=this.pendingChallenges)||void 0===i?void 0:i.find((t=>(null==t?void 0:t.Id)===e.detail)):null===(n=this.promoChallenges)||void 0===n?void 0:n.find((t=>(null==t?void 0:t.Id)===e.detail))))},this.onSeeMoreClick=e=>{this.detailsSubPageInfo={open:e.detail.open,tab:e.detail.tab}},this.onLoadMorePlayerHistory=e=>{window.postMessage({type:D.ChallengesHistory,data:e.detail})},this.isInactiveChallenge=e=>[u.Awaiting,u.Forfeited,u.Completed,u.Expired].includes(e.Status)||e.ChallengeStatus===M.Paused,this.updateActiveChallenge=e=>{var t;this.activeChallenge=e,this.activeProgressId=null===(t=this.activeChallenge)||void 0===t?void 0:t.Id},this.removeOptedOutChallenge=()=>{var e;this.isOptedOut&&(this.isOptedOut=!1,this.activeChallenges=null===(e=this.activeChallenges)||void 0===e?void 0:e.filter((e=>{var t;return(null==e?void 0:e.Id)!==(null===(t=this.activeChallenge)||void 0===t?void 0:t.Id)})),this.activeChallenge=null)},this.handleTabClick=e=>{e.detail!==this.activeTabIndex&&(this.removeOptedOutChallenge(),this.activeTabIndex=e.detail,this.activeTabIndex===x.Promo&&window.postMessage({type:D.ChallengePromoTab,data:{}}),this.activeTabIndex===x.Active&&this.updateActiveChallenge(this.activeChallenges[0]),this.activeTabIndex===x.Pending&&this.updateActiveChallenge(this.pendingChallenges[0]),this.activeTabIndex===x.Finished&&window.postMessage({type:D.ChallengesHistory,data:{PageSize:20,PageNumber:0}}),e.detail!==x.Code&&(this.emptyState=this.EMPTY_STATE_PAGE_DESCRIPTION_MAP[e.detail]))},this.openNotification=e=>{this.notification=e,setTimeout((()=>this.notification=null),1e4)},this.renderNotification=()=>{var e,i,n;return t("div",{class:"notification "+((null===(e=this.notification)||void 0===e?void 0:e.errored)?"errored":"")},t("div",{class:"row"},t("img",{src:(null===(i=this.notification)||void 0===i?void 0:i.errored)?"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHZpZXdCb3g9IjAgMCAxNSAxNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik03LjMzMzMzIDEuMzMzMzNDNC4wMTk2MiAxLjMzMzMzIDEuMzMzMzMgNC4wMTk2MiAxLjMzMzMzIDcuMzMzMzNDMS4zMzMzMyAxMC42NDcgNC4wMTk2MiAxMy4zMzMzIDcuMzMzMzMgMTMuMzMzM0MxMC42NDcgMTMuMzMzMyAxMy4zMzMzIDEwLjY0NyAxMy4zMzMzIDcuMzMzMzNDMTMuMzMzMyA0LjAxOTYyIDEwLjY0NyAxLjMzMzMzIDcuMzMzMzMgMS4zMzMzM1pNMCA3LjMzMzMzQzAgMy4yODMyNSAzLjI4MzI1IDAgNy4zMzMzMyAwQzExLjM4MzQgMCAxNC42NjY3IDMuMjgzMjUgMTQuNjY2NyA3LjMzMzMzQzE0LjY2NjcgMTEuMzgzNCAxMS4zODM0IDE0LjY2NjcgNy4zMzMzMyAxNC42NjY3QzMuMjgzMjUgMTQuNjY2NyAwIDExLjM4MzQgMCA3LjMzMzMzWk03LjMzMzMzIDRDNy43MDE1MiA0IDggNC4yOTg0OCA4IDQuNjY2NjdWNy4zMzMzM0M4IDcuNzAxNTIgNy43MDE1MiA4IDcuMzMzMzMgOEM2Ljk2NTE0IDggNi42NjY2NyA3LjcwMTUyIDYuNjY2NjcgNy4zMzMzM1Y0LjY2NjY3QzYuNjY2NjcgNC4yOTg0OCA2Ljk2NTE0IDQgNy4zMzMzMyA0Wk02LjY2NjY3IDEwQzYuNjY2NjcgOS42MzE4MSA2Ljk2NTE0IDkuMzMzMzMgNy4zMzMzMyA5LjMzMzMzSDcuMzRDNy43MDgxOSA5LjMzMzMzIDguMDA2NjcgOS42MzE4MSA4LjAwNjY3IDEwQzguMDA2NjcgMTAuMzY4MiA3LjcwODE5IDEwLjY2NjcgNy4zNCAxMC42NjY3SDcuMzMzMzNDNi45NjUxNCAxMC42NjY3IDYuNjY2NjcgMTAuMzY4MiA2LjY2NjY3IDEwWiIgZmlsbD0iI0ZGNEQ0RiIvPgo8L3N2Zz4K":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHZpZXdCb3g9IjAgMCAxNSAxNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik03LjMzMzMzIDEuMzMzMzNDNC4wMTk2MiAxLjMzMzMzIDEuMzMzMzMgNC4wMTk2MiAxLjMzMzMzIDcuMzMzMzNDMS4zMzMzMyAxMC42NDcgNC4wMTk2MiAxMy4zMzMzIDcuMzMzMzMgMTMuMzMzM0MxMC42NDcgMTMuMzMzMyAxMy4zMzMzIDEwLjY0NyAxMy4zMzMzIDcuMzMzMzNDMTMuMzMzMyA0LjAxOTYyIDEwLjY0NyAxLjMzMzMzIDcuMzMzMzMgMS4zMzMzM1pNMCA3LjMzMzMzQzAgMy4yODMyNSAzLjI4MzI1IDAgNy4zMzMzMyAwQzExLjM4MzQgMCAxNC42NjY3IDMuMjgzMjUgMTQuNjY2NyA3LjMzMzMzQzE0LjY2NjcgMTEuMzgzNCAxMS4zODM0IDE0LjY2NjcgNy4zMzMzMyAxNC42NjY3QzMuMjgzMjUgMTQuNjY2NyAwIDExLjM4MzQgMCA3LjMzMzMzWk0xMC44MDQ3IDQuODYxOTNDMTEuMDY1MSA1LjEyMjI4IDExLjA2NTEgNS41NDQzOSAxMC44MDQ3IDUuODA0NzRMNi44MDQ3NCA5LjgwNDc0QzYuNTQ0MzkgMTAuMDY1MSA2LjEyMjI4IDEwLjA2NTEgNS44NjE5MyA5LjgwNDc0TDMuODYxOTMgNy44MDQ3NEMzLjYwMTU4IDcuNTQ0MzkgMy42MDE1OCA3LjEyMjI4IDMuODYxOTMgNi44NjE5M0M0LjEyMjI4IDYuNjAxNTggNC41NDQzOSA2LjYwMTU4IDQuODA0NzQgNi44NjE5M0w2LjMzMzMzIDguMzkwNTJMOS44NjE5MyA0Ljg2MTkzQzEwLjEyMjMgNC42MDE1OCAxMC41NDQ0IDQuNjAxNTggMTAuODA0NyA0Ljg2MTkzWiIgZmlsbD0iIzAwRkE1QSIvPgo8L3N2Zz4K",class:"notification__icon",alt:""}),t("p",{class:"notification__message"},null===(n=this.notification)||void 0===n?void 0:n.message)))},this.renderHeader=e=>t("div",null,t("h1",{class:"challenges__drawer__title"},t("span",null,l("title",this.language)),t("button",{class:"challenges__drawer__close",onClick:this.onCloseClick},t("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIuNSAxNy41TDE3LjUgMi41IiBzdHJva2U9IndoaXRlIiBzdHJva2Utd2lkdGg9IjEuMDA0NTkiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0yLjUgMi41TDE3LjUgMTcuNSIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIxLjAwNDU5IiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4K",alt:""}))),t("casino-challenges-overlay-tabs",{onTabClick:this.handleTabClick,activeTabIndex:this.activeTabIndex,activeTabHasNotification:!1,pendingTabHasNotification:!1,language:this.language,"is-mobile":e})),this.isEmptyState=()=>{if(!this.loading&&this.activeTabIndex!==x.Code){if(this.activeTabIndex===x.Active&&!this.activeChallenges.length)return!0;if(this.activeTabIndex===x.Pending&&!this.pendingChallenges.length)return!0;if(this.activeTabIndex===x.Promo&&!this.promoChallenges.length)return!0;if(this.activeTabIndex===x.Finished&&!this.playerHistory.length)return!0}return!1},this.renderEmptyState=e=>{var i,n;return t("div",null,this.renderHeader(e),t("casino-challenges-empty-state",{header:null===(i=this.emptyState)||void 0===i?void 0:i.header,description:null===(n=this.emptyState)||void 0===n?void 0:n.description,"is-mobile":e}))},this.renderFinishedTab=e=>t("div",null,this.renderHeader(e),t("casino-challenges-overlay-drawer-history",{mbSource:this.mbSource,clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,translationUrl:this.translationUrl,language:this.language,isMobile:e,historyItems:this.playerHistory,hasMore:this.hasMorePlayerHistory,onLoadMore:this.onLoadMorePlayerHistory,loading:this.loading})),this.renderCodeTab=e=>t("div",null,this.renderHeader(e),t("casino-challenges-claim-code",{"is-mobile":e})),this.renderChallengeDetails=(e,i=!1)=>t("casino-challenges-overlay-drawer-details",{challenge:this.activeChallenge,swipped:this.swipped,progress:this.progress,"is-mobile":e,"is-unique":i,"is-opted-out":this.isOptedOut,"active-challenges-tab-index":this.activeTabIndex,onSeeMoreClick:this.onSeeMoreClick,detailsSubPageInfo:this.detailsSubPageInfo,challengeGames:this.challengeGames,onCloseClick:this.onCloseClick}),this.renderChallengesTabs=e=>{const i=this.activeTabIndex===x.Active?this.activeChallenges:this.activeTabIndex===x.Pending?this.pendingChallenges:this.promoChallenges,n=1===i.length;return t("swipe-up",{onSwippedUp:e=>{this.swipped=e.detail.swipped,this.progress=e.detail.progress},isMobile:e,isOneSlider:n},t("div",{class:"content-header",slot:"header"},this.renderHeader(e),t("div",{class:{"content-spacer":this.swipped||!e,"one-slide":n&&this.swipped}},t("casino-challenges-overlay-slider",{mbSource:this.mbSource,clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,translationUrl:this.translationUrl,language:this.language,challenges:i,isMobile:e,onActiveChallengeChange:this.onActiveChallengeChange,initialProgressId:this.activeProgressId,activeTabIndex:this.activeTabIndex}))),t("div",{class:"content-details",slot:"details"},this.renderChallengeDetails(e,n)))},this.onCloseClick=()=>{var e,t;this.pendingChallenges=null===(e=this.pendingChallenges)||void 0===e?void 0:e.filter((e=>e.Status===u.Awaiting)),this.activeChallenges=null===(t=this.activeChallenges)||void 0===t?void 0:t.filter((e=>!this.isInactiveChallenge(e))),this.detailsSubPageInfo={open:!1,tab:null},this.loading=!1,this.isOptedOut=!1,this.handleClose()},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.isOpen=!1,this.handleClose=()=>{},this.challenges=[],this.initialProgressId="",this.activeChallenge=null,this.activeProgressId="",this.activeTabIndex=x.Active,this.error="",this.hasError=!1,this.swipped=!1,this.detailsSubPageInfo=void 0,this.progress=0,this.loading=!1,this.notification=null,this.optOutModaIsOpen=!1,this.isOptedOut=!1,this.prevUpdateEvent=void 0,this.challengeGames=[],this.activeChallenges=[],this.pendingChallenges=[],this.promoChallenges=[],this.playerHistory=[],this.hasMorePlayerHistory=!1,this.emptyState={header:null===(p=a[this.language])||void 0===p?void 0:p.activeTabEmptyHeader,description:null===(b=a[this.language])||void 0===b?void 0:b.activeTabEmptyDescription}}handleClientStylingChange(e,t){e!=t&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(e,t){e!=t&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(e,t){e!=t&&o(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}handleIsOpenChange(e){var t;if(e)if(this.initialProgressId&&this.challenges.length){this.activeTabIndex=x.Active,this.activeProgressId=this.initialProgressId;const e=(null===(t=this.activeChallenges)||void 0===t?void 0:t.find((e=>e.Id===this.activeProgressId)))||this.activeChallenges[0];this.updateActiveChallenge(e||null)}else this.activeTabIndex=x.Promo,window.postMessage({type:D.ChallengePromoTab,data:{}})}onActiveChallengeChanged(){this.challengeGames=[]}onOpenOptOut(){this.optOutModaIsOpen=!0}onCloseOptOut(){this.optOutModaIsOpen=!1}onConfirmOptOut(){window.postMessage({type:D.ForfeitChallenge,data:{ChallengeId:this.activeChallenge.ChallengeId}})}onChallengeExpired(e){if(null==e?void 0:e.detail)switch(this.activeTabIndex){case x.Active:this.activeChallenges=this.updateChallenge(this.activeChallenges,e.detail,{Status:u.Expired});break;case x.Pending:this.pendingChallenges=this.updateChallenge(this.pendingChallenges,e.detail,{Status:u.Expired});break;case x.Promo:this.promoChallenges=this.updateChallenge(this.promoChallenges,e.detail,{Status:u.Expired})}}handleEvent(e){var t,i,n,s;const{type:o,data:a,success:r,errorMessage:h}=null==e?void 0:e.data;switch(console.log("\nReceived event: ",null==e?void 0:e.data.type),console.log(e),o){case I.ChallengePromoTab:r?(this.promoChallenges=a||[],this.updateActiveChallenge(this.promoChallenges[0])):(this.promoChallenges=[],this.updateActiveChallenge(null),this.openNotification({message:h,errored:!0})),this.loading=!1;break;case I.ChallengesHistory:r?(this.playerHistory=this.playerHistory.length<(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.totalItem)?[...this.playerHistory,...a]:a,this.hasMorePlayerHistory=(null===(i=null==e?void 0:e.data)||void 0===i?void 0:i.totalItem)>this.playerHistory.length):this.openNotification({message:h,errored:!0}),this.loading=!1;break;case I.ClaimChallengeByCode:r?(this.openNotification({message:l("claimCodeSuccessMessage",this.language)}),this.activeChallenges=[...this.activeChallenges,a]):this.openNotification({message:h,errored:!0}),this.loading=!1;break;case I.ChallengeJoin:if(r){const e=[u.Paused,u.Started].includes(null===(n=this.activeChallenge)||void 0===n?void 0:n.Status);this.activeChallenges=this.updateChallenge(this.activeChallenges,e?null==a?void 0:a.joinId:null==a?void 0:a.unjoinId,{Status:e?u.InProgress:u.Paused})}else this.openNotification({message:h,errored:!0});this.loading=!1;break;case I.ChallengeIsNew:r?this.updateChallengeByProgressId(null==a?void 0:a.challengeProgressId,{IsNew:!1}):this.openNotification({message:h,errored:!0});break;case I.GetChallengeGames:r?this.challengeGames=a:this.openNotification({message:h,errored:!0}),this.loading=!1;break;case I.ClaimChallengeByButton:if(r){const e=Array.isArray(a)?a[0]:a;e&&(e.IsNew=!1,this.activeChallenges=[...this.activeChallenges,e],this.updateActiveChallenge(e),this.activeTabIndex=x.Active,this.openNotification({message:l("grantClaimByButtonSuccessMessage",this.language)}))}else this.openNotification({message:h,errored:!0});this.loading=!1;break;case I.ForfeitChallenge:this.optOutModaIsOpen=!1,r?(this.openNotification({message:l("optOutSuccessMessage",this.language)}),this.detailsSubPageInfo={open:!1,tab:null},this.isOptedOut=!0):this.openNotification({message:h,errored:!0}),this.loading=!1;break;case I.ChangeChallengeProgressStatus:this.updateChallengeByProgressId(null==a?void 0:a.ChallengeProgressId,{Status:null==a?void 0:a.ChallengeProgressStatus});break;case I.ChallengeChangeStatusNotification:this.updateChallengeById(null==a?void 0:a.ChallengeId,{ChallengeStatus:(null==a?void 0:a.IsEnabled)?M.Enabled:M.Paused});break;case I.ChallengeForfeitNotification:this.updateChallengeById(null==a?void 0:a.ChallengeId,{Status:u.Forfeited});break;case I.UpdateChallengeProgress:{const e=a;if(!((e,t)=>{if(!e)return!0;if(e.ProgressId!==t.ProgressId)return!0;if(e.Levels.length!==t.Levels.length)return!0;for(let i=0;i<t.Levels.length;i++){const n=e.Levels[i],s=t.Levels[i];if(n.LevelId!==s.LevelId||n.ProgressStatus!==s.ProgressStatus||n.ProgressPercentage!==s.ProgressPercentage)return!0}return!1})(this.prevUpdateEvent,e))return;this.prevUpdateEvent=e,this.activeChallenges=null===(s=this.activeChallenges)||void 0===s?void 0:s.map((t=>{if(t.Id!==(null==e?void 0:e.ProgressId))return t;const i=t.LevelProgresses.map((t=>{const i=null==e?void 0:e.Levels.find((e=>e.LevelId===t.LevelId));return i?Object.assign(Object.assign({},t),{ProgressStatus:i.ProgressStatus,ProgressPercentage:i.ProgressPercentage}):t}));return Object.assign(Object.assign({},t),{Status:null==e?void 0:e.Status,LevelProgresses:i})}));break}case I.NewChallengeProgressGranted:const o=(null==a?void 0:a.Status)===u.Awaiting,c=o?this.pendingChallenges:this.activeChallenges;if(null==c?void 0:c.some((e=>e.Id===(null==a?void 0:a.Id))))break;o?(this.pendingChallenges=[...c,a],this.activeTabIndex===x.Pending&&1===this.pendingChallenges.length&&this.updateActiveChallenge(a)):(this.activeChallenges=[...c,a],this.activeTabIndex===x.Active&&1===this.activeChallenges.length&&this.updateActiveChallenge(a));break;case D.ChallengeJoin:case D.GetChallengeGames:case D.ClaimChallengeByButton:case D.RedirectToDepositPage:case D.ChallengeInGameRedirect:case D.ChallengesHistory:case D.ChallengePromoTab:case D.ClaimChallengeByCode:case D.ForfeitChallenge:this.loading=!0}}componentWillLoad(){var e;if(this.translationUrl&&r(this.translationUrl),null===(e=this.challenges)||void 0===e?void 0:e.length){const e=[...this.challenges];this.pendingChallenges=e.filter((e=>e.Status===u.Awaiting)),this.activeChallenges=e.filter((e=>!this.isInactiveChallenge(e)))}}componentDidLoad(){this.stylingContainer&&(this.mbSource&&o(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}updateChallenge(e,t,i){var n;return(null===(n=this.activeChallenge)||void 0===n?void 0:n.Id)===t&&(this.activeChallenge=Object.assign(Object.assign({},this.activeChallenge),i)),e.map((e=>e.Id===t?Object.assign(Object.assign({},e),i):e))}updateChallengeList(e,t,i){let n=!1;const s=e.map((e=>e.ChallengeId===t?(n=!0,Object.assign(Object.assign({},e),i)):e));return n?s:e}updateChallengeById(e,t){var i;(null===(i=this.activeChallenge)||void 0===i?void 0:i.ChallengeId)===e&&(this.activeChallenge=Object.assign(Object.assign({},this.activeChallenge),t)),this.activeChallenges=this.updateChallengeList(this.activeChallenges,e,t),this.pendingChallenges=this.updateChallengeList(this.pendingChallenges,e,t),this.promoChallenges=this.updateChallengeList(this.promoChallenges,e,t)}updateChallengeByProgressId(e,t){var i;(null===(i=this.activeChallenge)||void 0===i?void 0:i.Id)===e&&(this.activeChallenge=Object.assign(Object.assign({},this.activeChallenge),t)),this.activeChallenges.find((t=>t.Id===e))?this.activeChallenges=this.activeChallenges.map((i=>i.Id===e?Object.assign(Object.assign({},i),t):i)):this.pendingChallenges.find((t=>t.Id===e))?this.pendingChallenges=this.pendingChallenges.map((i=>i.Id===e?Object.assign(Object.assign({},i),t):i)):this.promoChallenges=this.promoChallenges.map((i=>i.Id===e?Object.assign(Object.assign({},i),t):i))}renderContent(e,i){var n;if(i)return this.renderEmptyState(e);if(null===(n=this.detailsSubPageInfo)||void 0===n?void 0:n.open)return t("div",{class:"content-sub-page",slot:"details"},this.renderChallengeDetails(e));switch(this.activeTabIndex){case x.Promo:case x.Active:case x.Pending:return this.renderChallengesTabs(e);case x.Code:return this.renderCodeTab(e);case x.Finished:return this.renderFinishedTab(e);default:return}}render(){if(!this.isOpen)return;const e=(()=>{let e=window.navigator.userAgent;return!!(e.toLowerCase().match(/android/i)||e.toLowerCase().match(/blackberry|bb/i)||e.toLowerCase().match(/iphone|ipad|ipod/i)||e.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i))})()||window.innerWidth<=768,i=this.isEmptyState();return t("div",{ref:e=>this.stylingContainer=e,class:{container:!0,mobile:e}},t("div",{class:"challenges__backdrop",onClick:this.onCloseClick}),t("div",{class:"challenges__drawer"},t("casino-challenge-overlay-background",{empty:i}),t("div",{class:"challenges__drawer__content"},this.renderContent(e,i)),this.loading&&t("casino-challenges-overlay-loader",{"full-size":!0,"is-mobile":e}),t("casino-challenge-opt-out-modal",{open:this.optOutModaIsOpen,"is-mobile":e,language:this.language})),this.notification&&this.renderNotification())}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],isOpen:["handleIsOpenChange"],activeChallenge:["onActiveChallengeChanged"]}}};_.style='@import url("https://fonts.googleapis.com/css2?family=Teachers:ital,wght@0,400..800;1,400..800&display=swap");\n.container {\n z-index: 301;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n container-name: challenges-game-page;\n container-type: size;\n}\n\n.mobile .challenges__drawer {\n width: 100%;\n height: 100%;\n left: 0;\n bottom: 0;\n border-radius: 0;\n backdrop-filter: blur(16px);\n border: none;\n max-width: none;\n min-width: initial;\n}\n.mobile .challenges__drawer .content-spacer {\n margin-bottom: 32px;\n}\n.mobile .challenges__drawer .content-spacer.one-slide {\n margin-bottom: 38px;\n}\n.mobile .challenges__drawer__content {\n padding: 16px 0 0;\n}\n.mobile .challenges__drawer__content .content-details {\n height: calc(100% - 30px);\n}\n.mobile .challenges__drawer__title {\n height: 26px;\n font-size: var(--emw--font-size-large, 18px);\n}\n.mobile .challenges__drawer__close {\n right: 16px;\n width: 26px;\n height: 26px;\n}\n.mobile .challenges__drawer__close img {\n width: 14px;\n}\n.mobile .challenges__backdrop {\n display: none;\n}\n.mobile .notification {\n padding: 8px 16px;\n gap: 8px;\n}\n.mobile .notification .row {\n margin: 15px 0 14px 0;\n}\n.mobile .notification__icon {\n width: 16px;\n height: 16px;\n}\n.mobile .notification__message {\n font-size: var(--emw--font-size-small, 14px);\n}\n\n.challenges__drawer {\n z-index: 302;\n position: fixed;\n left: 62px;\n bottom: 76px;\n border: 1px solid var(--emw--color-container-border, rgba(255, 255, 255, 0.0705882353));\n background: var(--emw--color-Overlay-Background, rgba(9, 9, 9, 0.8));\n backdrop-filter: blur(11px);\n box-sizing: border-box;\n width: 35%;\n min-width: 400px;\n max-width: 600px;\n height: calc(100% - 20px - 76px);\n border-radius: 30px;\n opacity: 1;\n font-family: var(--emw--font-family-primary, "Teachers"), sans-serif;\n container-name: challenges-drawer;\n container-type: size;\n}\n.challenges__drawer__title {\n height: 36px;\n color: var(--emw--color-title, #edeff2);\n text-align: center;\n font-size: var(--emw--font-size-large-xl, 22px);\n font-weight: var(--emw--font-weight-semibold, 600);\n margin: 0;\n position: relative;\n z-index: 1;\n align-content: center;\n}\n.challenges__drawer__close {\n outline: none;\n background: transparent;\n border-radius: 20px;\n border: 1.5px solid var(--emw--color-container-border, rgba(255, 255, 255, 0.0705882353));\n background: var(--emw--color-container-background, rgba(9, 9, 9, 0.5019607843));\n backdrop-filter: blur(6.882352829px);\n cursor: pointer;\n width: 36px;\n height: 36px;\n min-width: 36px;\n min-height: 36px;\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n top: 0;\n right: 24px;\n}\n.challenges__drawer__content {\n height: 100%;\n position: relative;\n z-index: 2;\n padding: 24px 0 0;\n box-sizing: border-box;\n}\n.challenges__drawer__content .content-header {\n width: 100%;\n flex-shrink: 0;\n}\n.challenges__drawer__content .content-details {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n}\n.challenges__drawer__content .content-sub-page {\n display: flex;\n height: 100%;\n}\n.challenges__drawer .content-spacer {\n margin-bottom: 24px;\n}\n.challenges__drawer, .challenges__drawer * {\n scrollbar-width: thin;\n scrollbar-color: var(--emw--color-gray-250, rgba(255, 255, 255, 0.3)) transparent;\n}\n.challenges__drawer::-webkit-scrollbar, .challenges__drawer *::-webkit-scrollbar {\n width: 3px;\n}\n.challenges__drawer::-webkit-scrollbar-track, .challenges__drawer *::-webkit-scrollbar-track {\n background: transparent;\n}\n.challenges__drawer::-webkit-scrollbar-thumb, .challenges__drawer *::-webkit-scrollbar-thumb {\n background: var(--emw--color-gray-250, rgba(255, 255, 255, 0.3));\n opacity: 0.3;\n border-radius: 999px;\n transition: none;\n width: 3px;\n}\n.challenges__drawer::-webkit-scrollbar-thumb:hover, .challenges__drawer *::-webkit-scrollbar-thumb:hover {\n background: var(--emw--color-gray-250, rgba(255, 255, 255, 0.3));\n opacity: 0.3;\n width: 3px;\n}\n.challenges__drawer::-webkit-scrollbar-button, .challenges__drawer *::-webkit-scrollbar-button {\n display: none;\n}\n.challenges__backdrop {\n border: none;\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: var(--emw--color-gray-backdrop, rgba(0, 0, 0, 0.6));\n z-index: 301;\n opacity: 1;\n}\n\n.notification {\n display: flex;\n position: fixed;\n z-index: 400;\n align-items: center;\n bottom: 76px;\n right: 0;\n padding: 24px;\n gap: 12px;\n max-width: 445px;\n box-sizing: border-box;\n border-radius: 20px 0 0 20px;\n border-top: 1px solid var(--emw--status-badge-success-color, #d6fff0);\n border-bottom: 1px solid var(--emw--status-badge-success-color, #d6fff0);\n border-left: 1px solid var(--emw--status-badge-success-color, #d6fff0);\n background: var(--emw--background-success-notification, linear-gradient(112deg, rgba(74, 255, 135, 0.2) 0%, rgba(74, 255, 135, 0) 100%));\n backdrop-filter: blur(16px);\n color: var(--emw--color-white, #ffffff);\n font-family: var(--emw--font-family-primary, "Teachers"), sans-serif;\n}\n.notification.errored {\n border-top: 1px solid var(--emw--status-badge-red-bg, #d63d1e);\n border-bottom: 1px solid var(--emw--status-badge-red-bg, #d63d1e);\n border-left: 1px solid var(--emw--status-badge-red-bg, #d63d1e);\n background: var(--emw--background-error-notification, rgba(9, 9, 9, 0.4));\n}\n.notification .row {\n display: flex;\n align-items: flex-start;\n}\n.notification__icon {\n width: 18px;\n height: 18px;\n margin-right: 12px;\n}\n.notification__message {\n margin: 0;\n font-size: var(--emw--font-size-medium, 16px);\n font-weight: var(--emw--font-weight-medium, 500);\n}\n.notification__message .active-tab {\n color: var(--emw--border-success-color, #00b74f);\n text-decoration-line: underline;\n cursor: pointer;\n}\n\ncasino-challenges-overlay-drawer-details {\n flex: 1;\n}\n\n@container challenges-game-page (width <= 1430px) {\n .challenges__drawer {\n width: 40%;\n left: 45px;\n }\n}\n@container challenges-game-page (width <= 1250px) {\n .challenges__drawer {\n width: 45%;\n }\n}\n@container challenges-game-page (width <= 1000px) {\n .challenges__drawer {\n width: 50%;\n left: 25px;\n }\n}\n@container challenges-game-page (width <= 800px) {\n .challenges__drawer__content {\n padding: 20px 0 0;\n }\n}\n@container challenges-game-page (height <= 850px) {\n .challenges__drawer {\n bottom: 36px;\n height: calc(100% - 20px - 36px);\n }\n .challenges__drawer .content-spacer {\n margin-bottom: 18px;\n }\n}\n@container challenges-drawer (height <= 760px) {\n .challenges__drawer .content-spacer {\n margin-bottom: 12px;\n }\n}';export{_ as C,j as E,N as H,D as a,s as b,o as c,x as d,r,n as s,l as t}