@everymatrix/casino-challenges-container 0.17.56 → 0.17.58

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 (23) hide show
  1. package/dist/casino-challenges-container/casino-challenge-card_6.entry.js +1 -1
  2. package/dist/casino-challenges-container/casino-challenges-container-20680610.js +7 -0
  3. package/dist/casino-challenges-container/casino-challenges-container.esm.js +1 -1
  4. package/dist/casino-challenges-container/index-cfebd6c9.js +2 -0
  5. package/dist/casino-challenges-container/index.esm.js +1 -1
  6. package/dist/cjs/casino-challenge-card_6.cjs.entry.js +40 -6
  7. package/dist/cjs/{casino-challenges-container-fa0b3bf1.js → casino-challenges-container-0a0e88e7.js} +14 -9
  8. package/dist/cjs/casino-challenges-container.cjs.js +2 -2
  9. package/dist/cjs/{index-d5f8d1ee.js → index-b8de3094.js} +65 -2
  10. package/dist/cjs/index.cjs.js +2 -2
  11. package/dist/cjs/loader.cjs.js +2 -2
  12. package/dist/collection/components/casino-challenges-container/casino-challenges-container.js +22 -8
  13. package/dist/esm/casino-challenge-card_6.entry.js +41 -7
  14. package/dist/esm/{casino-challenges-container-71016f26.js → casino-challenges-container-20680610.js} +14 -9
  15. package/dist/esm/casino-challenges-container.js +3 -3
  16. package/dist/esm/{index-7720ad93.js → index-cfebd6c9.js} +65 -2
  17. package/dist/esm/index.js +2 -2
  18. package/dist/esm/loader.js +3 -3
  19. package/dist/types/components/casino-challenges-container/casino-challenges-container.d.ts +2 -2
  20. package/dist/types/utils/types.d.ts +1 -0
  21. package/package.json +1 -1
  22. package/dist/casino-challenges-container/casino-challenges-container-71016f26.js +0 -7
  23. package/dist/casino-challenges-container/index-7720ad93.js +0 -2
@@ -2,13 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-d5f8d1ee.js');
5
+ const index = require('./index-b8de3094.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  const defineCustomElements = async (win, options) => {
9
9
  if (typeof window === 'undefined') return undefined;
10
10
  await appGlobals.globalScripts();
11
- return index.bootstrapLazy([["casino-challenge-card_6.cjs",[[1,"casino-challenges-container",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"userId":[513,"user-id"],"activeChallengesTabIndex":[513,"active-challenges-tab-index"],"activeTabIndex":[32],"error":[32],"hasError":[32],"promoChallenges":[32],"activeChallenges":[32],"pendingChallenges":[32],"playerHistory":[32],"loading":[32],"pageNumber":[32],"hasMore":[32],"pageSize":[32],"notification":[32],"statusEventSource":[32],"newProgressEventSource":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"userId":["handleSessionChange"],"activeChallengesTabIndex":["handleActiveChallengesTabIndex"]}],[1,"casino-challenges-list",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"translationUrl":[513,"translation-url"],"challenges":[16],"loading":[516],"hasMore":[516,"has-more"],"activeChallengesTabIndex":[514,"active-challenges-tab-index"],"isUserAuthorized":[516,"is-user-authorized"],"userId":[513,"user-id"],"endpoint":[513],"domain":[513],"session":[513]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"challenges":["handleChallengesChange"]}],[1,"casino-challenges-player-history",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"playerHistory":[16],"loading":[516],"hasMore":[516,"has-more"],"openItems":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"playerHistory":["handlePlayerHistoryChange"]}],[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],"session":[513],"loading":[32],"hasError":[32],"code":[32],"notificationMessage":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"casino-challenge-card",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"challenge":[16],"isUserAuthorized":[516,"is-user-authorized"],"activeChallengesTabIndex":[514,"active-challenges-tab-index"],"userId":[513,"user-id"],"tooltipIndex":[32],"timeLeft":[32],"error":[32],"hasError":[32],"actionLoading":[32],"isChallengePaused":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"challenge":["handleChallengeChange"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}]]]], options);
11
+ return index.bootstrapLazy([["casino-challenge-card_6.cjs",[[1,"casino-challenges-container",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"userId":[513,"user-id"],"activeChallengesTabIndex":[513,"active-challenges-tab-index"],"activeTabIndex":[32],"error":[32],"hasError":[32],"promoChallenges":[32],"activeChallenges":[32],"pendingChallenges":[32],"playerHistory":[32],"loading":[32],"pageNumber":[32],"hasMore":[32],"pageSize":[32],"notification":[32],"statusEventSource":[32],"newProgressEventSource":[32]},[[0,"openNotification","onOpenNotification"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"userId":["handleSessionChange"],"activeChallengesTabIndex":["handleActiveChallengesTabIndex"]}],[1,"casino-challenges-list",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"translationUrl":[513,"translation-url"],"challenges":[16],"loading":[516],"hasMore":[516,"has-more"],"activeChallengesTabIndex":[514,"active-challenges-tab-index"],"isUserAuthorized":[516,"is-user-authorized"],"userId":[513,"user-id"],"endpoint":[513],"domain":[513],"session":[513]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"challenges":["handleChallengesChange"]}],[1,"casino-challenges-player-history",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"playerHistory":[16],"loading":[516],"hasMore":[516,"has-more"],"openItems":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"playerHistory":["handlePlayerHistoryChange"]}],[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],"session":[513],"loading":[32],"hasError":[32],"code":[32],"notificationMessage":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"casino-challenge-card",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"challenge":[16],"isUserAuthorized":[516,"is-user-authorized"],"activeChallengesTabIndex":[514,"active-challenges-tab-index"],"userId":[513,"user-id"],"tooltipIndex":[32],"timeLeft":[32],"error":[32],"hasError":[32],"actionLoading":[32],"isChallengePaused":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"challenge":["handleChallengeChange"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}]]]], options);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;
@@ -14,10 +14,6 @@ import { updateInState, updateInStateByChallengeId } from "../../utils/utils";
14
14
  import { EventSourcePolyfill } from "event-source-polyfill";
15
15
  export class CasinoChallengesContainer {
16
16
  constructor() {
17
- this.onOpenNotification = (event) => {
18
- this.notification = event.detail;
19
- setTimeout(() => (this.notification = null), 10000);
20
- };
21
17
  this.checkAttrs = () => {
22
18
  if (!this.endpoint) {
23
19
  this.error = 'Endpoint is missing! Please provide a valid endpointURL.';
@@ -65,7 +61,8 @@ export class CasinoChallengesContainer {
65
61
  }
66
62
  };
67
63
  this.renderNotification = () => {
68
- return (h("div", { class: `notification ${this.notification.errored ? 'errored' : ''}` }, h("img", { src: this.notification.errored ? errorIcon : checkIcon, class: "notification__icon" }), h("p", { class: "notification__message" }, this.notification.message + ' ', this.notification.showTabLink && (h("span", { class: "active-tab", onClick: this.handleTabClick(EChallengesTabs.Active) }, translate('activeTab', this.language))))));
64
+ var _a, _b, _c, _d;
65
+ return (h("div", { class: `notification ${((_a = this.notification) === null || _a === void 0 ? void 0 : _a.errored) ? 'errored' : ''}` }, h("img", { src: ((_b = this.notification) === null || _b === void 0 ? void 0 : _b.errored) ? errorIcon : checkIcon, class: "notification__icon" }), h("p", { class: "notification__message" }, ((_c = this.notification) === null || _c === void 0 ? void 0 : _c.message) + ' ', ((_d = this.notification) === null || _d === void 0 ? void 0 : _d.showTabLink) && (h("span", { class: "active-tab", onClick: this.handleTabClick(EChallengesTabs.Active) }, translate('activeTab', this.language))))));
69
66
  };
70
67
  this.onTimerExpired = (e) => {
71
68
  const currentTabIndex = this.activeTabIndex;
@@ -151,7 +148,6 @@ export class CasinoChallengesContainer {
151
148
  this.statusEventSource = undefined;
152
149
  }
153
150
  if (this.newProgressEventSource) {
154
- console.log('newProgressEventSource disconeection !!!');
155
151
  this.newProgressEventSource.removeEventListener('message');
156
152
  this.newProgressEventSource.close();
157
153
  this.newProgressEventSource = undefined;
@@ -279,6 +275,15 @@ export class CasinoChallengesContainer {
279
275
  this.activeTabIndex = Number(newValue);
280
276
  }
281
277
  }
278
+ onOpenNotification(event) {
279
+ var _a, _b;
280
+ if ((_a = event.detail) === null || _a === void 0 ? void 0 : _a.tab) {
281
+ this.activeTabIndex = Number((_b = event.detail) === null || _b === void 0 ? void 0 : _b.tab);
282
+ this.loadData(this.activeTabIndex);
283
+ }
284
+ this.notification = event.detail;
285
+ setTimeout(() => (this.notification = null), 10000);
286
+ }
282
287
  async getChallenges(tabIndex) {
283
288
  if (!this.checkAttrs()) {
284
289
  const path = tabIndex === EChallengesTabs.Finished ? 'PlayerHistory' : 'GetChallengesInfo';
@@ -358,12 +363,12 @@ export class CasinoChallengesContainer {
358
363
  case EChallengesTabs.Finished:
359
364
  return (h("casino-challenges-player-history", { mbSource: this.mbSource, clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, translationUrl: this.translationUrl, language: this.language, loading: this.loading, playerHistory: this.playerHistory, onLoadMore: this.onLoadMore, hasMore: this.hasMore }));
360
365
  case EChallengesTabs.Code:
361
- return (h("casino-challenges-claim-code", { mbSource: this.mbSource, clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, translationUrl: this.translationUrl, language: this.language, endpoint: this.endpoint, session: this.session, domain: this.domain, onOpenNotification: this.onOpenNotification }));
366
+ return (h("casino-challenges-claim-code", { mbSource: this.mbSource, clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, translationUrl: this.translationUrl, language: this.language, endpoint: this.endpoint, session: this.session, domain: this.domain }));
362
367
  }
363
368
  }
364
369
  render() {
365
370
  var _a;
366
- return (h("div", { key: '90844784133ba254c5d8bfe8151bbd924f82c26b', ref: (el) => (this.stylingContainer = el) }, h("div", { key: '975c25eeffdefdfb2e2ddcb10d5df88f84d3caab', class: "challenges" }, h("div", { key: '356aa8d728524feb76a70f74b08255d1769b3fc3', class: "challenges__header" }, h("h1", { key: 'd498b6d61e0e41c067deb90164df78b4a4ab6e03', class: "challenges__title" }, h("img", { key: '838f4d695cb3edef9a18fa29d700e7717a6a7f66', src: titleIcon, alt: "icon" }), translate('containerTitle', this.language)), this.session && (h("div", { key: 'dee7ac7ec25146c3f99568993cfa16786e918f36', class: "challenges__tabs-scroll-row" }, h("div", { key: '58511a23756d50d8ead65ae9f11282960bebfe86', class: "challenges__tabs challenges__tabs--promo" }, h("div", { key: '40eb38d5211d1d02a5145be57b05bc4f972549f8', class: `challenges__tab challenges__tab--promo ${this.activeTabIndex === EChallengesTabs.Promo ? 'active' : ''}`, onClick: this.handleTabClick(EChallengesTabs.Promo) }, h("span", { key: '3d4faf64d0e9e6f55742a4e4f8386cc094060aac' }, (_a = this.tabs[0]) === null || _a === void 0 ? void 0 : _a.label), h("img", { key: '64199239fb09ddae4d0648bbc9c48569fd6e9ba7', src: crownIcon }))), h("div", { key: 'a871ff69fcc1a1765b47592ace216545263c86b5', class: "challenges__tabs" }, this.tabs.map((tab, index) => {
371
+ return (h("div", { key: '2a55522503cbe3d7ca189c7b8363fa149867ae67', ref: (el) => (this.stylingContainer = el) }, h("div", { key: 'bb1cbf81216e50731d8def16c89c5655928a946a', class: "challenges" }, h("div", { key: '4bd6f9925c3edaa4aa9d97feffe9ff14f119f13d', class: "challenges__header" }, h("h1", { key: '38d2d0efcce0d51423ae2113015d0c0a249c6fda', class: "challenges__title" }, h("img", { key: 'cbd7bab09bf8cf49583ee596e8602998dcbb7db6', src: titleIcon, alt: "icon" }), translate('containerTitle', this.language)), this.session && (h("div", { key: '86cd0613d0a5fd8bf827d2d130279e3ccc9ffef3', class: "challenges__tabs-scroll-row" }, h("div", { key: '0145546ffaf681281ea352f490ed43a569a55442', class: "challenges__tabs challenges__tabs--promo" }, h("div", { key: 'f9ea47ca7489d8074b670a17f69ebb7b100b3473', class: `challenges__tab challenges__tab--promo ${this.activeTabIndex === EChallengesTabs.Promo ? 'active' : ''}`, onClick: this.handleTabClick(EChallengesTabs.Promo) }, h("span", { key: '40c5ea6b5486eb3dd67de71a980e36ccb53ff467' }, (_a = this.tabs[0]) === null || _a === void 0 ? void 0 : _a.label), h("img", { key: '109203516055890bcd09bb68e0187f46f4373be3', src: crownIcon }))), h("div", { key: '12546c515674f221ec3863e387de9f8087c49bda', class: "challenges__tabs" }, this.tabs.map((tab, index) => {
367
372
  if (index === EChallengesTabs.Promo)
368
373
  return;
369
374
  return (h("div", { class: `challenges__tab ${index === this.activeTabIndex ? 'active' : ''}`, onClick: this.handleTabClick(index) }, tab.label, (tab === null || tab === void 0 ? void 0 : tab.showNotification) && h("img", { src: notificationIcon })));
@@ -598,4 +603,13 @@ export class CasinoChallengesContainer {
598
603
  "methodName": "handleActiveChallengesTabIndex"
599
604
  }];
600
605
  }
606
+ static get listeners() {
607
+ return [{
608
+ "name": "openNotification",
609
+ "method": "onOpenNotification",
610
+ "target": undefined,
611
+ "capture": false,
612
+ "passive": false
613
+ }];
614
+ }
601
615
  }
@@ -1,6 +1,6 @@
1
- import { r as registerInstance, c as createEvent, h, g as getElement, H as Host } from './index-7720ad93.js';
2
- import { s as setClientStyling, a as setClientStylingURL, b as setStreamStyling } from './casino-challenges-container-71016f26.js';
3
- export { C as casino_challenges_container } from './casino-challenges-container-71016f26.js';
1
+ import { r as registerInstance, c as createEvent, h, g as getElement, H as Host } from './index-cfebd6c9.js';
2
+ import { s as setClientStyling, a as setClientStylingURL, b as setStreamStyling } from './casino-challenges-container-20680610.js';
3
+ export { C as casino_challenges_container } from './casino-challenges-container-20680610.js';
4
4
 
5
5
  const DEFAULT_LANGUAGE$3 = 'en';
6
6
  const TRANSLATIONS$3 = {
@@ -34,7 +34,8 @@ const TRANSLATIONS$3 = {
34
34
  time: 'time',
35
35
  times: 'times',
36
36
  winStakeRatio: 'Win/Stake Ratio',
37
- terms: 'Terms & Conditions'
37
+ terms: 'Terms & Conditions',
38
+ grantClaimByButtonSuccessMessage: 'Challenge has been triggered successfully and is now available on the Active tab'
38
39
  }
39
40
  };
40
41
  const translate$3 = (key, customLang) => {
@@ -231,6 +232,7 @@ const CasinoChallengeCard = class {
231
232
  registerInstance(this, hostRef);
232
233
  this.timerExpired = createEvent(this, "timerExpired", 7);
233
234
  this.itemViewed = createEvent(this, "itemViewed", 7);
235
+ this.openNotification = createEvent(this, "openNotification", 7);
234
236
  this.calculateTargetValue = (level, currencySymbol) => {
235
237
  var _a, _b;
236
238
  if (!level)
@@ -489,6 +491,38 @@ const CasinoChallengeCard = class {
489
491
  finished: Status === EChallengeProgressStatus.Completed
490
492
  } }, secondImgSrc ? h("img", { class: "progress__icon", src: secondImgSrc }) : currLevel.OrderNumber + 2)));
491
493
  }
494
+ async grantClaimByButton() {
495
+ if (!this.checkAttrs() && this.challenge) {
496
+ const url = `${this.endpoint}/challenge/ChallengePlayerClaimByButtonGrant`;
497
+ const body = {
498
+ DomainId: this.domain,
499
+ ChallengeId: this.challenge.Id,
500
+ PlayerSession: this.session
501
+ };
502
+ this.actionLoading = true;
503
+ return fetch(url, {
504
+ method: 'POST',
505
+ headers: {
506
+ 'Content-Type': 'application/json'
507
+ },
508
+ body: JSON.stringify(body)
509
+ })
510
+ .then((res) => res.json())
511
+ .then((res) => {
512
+ if (res.Success) {
513
+ window.postMessage({ type: 'GoToChallengesPage', tabIndex: EChallengesTabs.Active }, window.location.href);
514
+ this.openNotification.emit({ message: translate$3('grantClaimByButtonSuccessMessage', this.language), errored: false, tab: EChallengesTabs.Active });
515
+ }
516
+ else {
517
+ this.openNotification.emit({ message: res.ErrorMessage, errored: true, });
518
+ }
519
+ return res;
520
+ })
521
+ .finally(() => {
522
+ this.actionLoading = false;
523
+ });
524
+ }
525
+ }
492
526
  get getCardButton() {
493
527
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
494
528
  if (this.activeChallengesTabIndex === EChallengesTabs.Promo &&
@@ -509,7 +543,7 @@ const CasinoChallengeCard = class {
509
543
  else if (isClaimByButtonTriggerType) {
510
544
  return (h("button", { class: "card__button filled", disabled: this.actionLoading, onClick: (e) => {
511
545
  e.stopPropagation();
512
- this.goToDetailsPage(false, EDetailsTabs.GamesOrEvents)();
546
+ this.grantClaimByButton();
513
547
  } }, translate$3('claim', this.language)));
514
548
  }
515
549
  else if (isGameLaunchTriggerType) {
@@ -578,10 +612,10 @@ const CasinoChallengeCard = class {
578
612
  }
579
613
  render() {
580
614
  var _a, _b, _c, _d;
581
- return (h("div", { key: 'dcb2efc2a6e0b8f93ffd9b39e24f349d2ff36042', ref: (el) => (this.stylingContainer = el), style: { height: '100%' } }, h("div", { key: 'e3aff26abf7148f2fbf6bbe4e3c9ee5ea5daf1bf', class: "card", onClick: this.goToDetailsPage(true, EDetailsTabs.Rules) }, h("img", { key: 'c09fc4776fc2e15e1d5578529596bb99e6c8861b', class: {
615
+ return (h("div", { key: 'a6fb07b2fbd0daafb74d79aadf5ba5fffbcedc48', ref: (el) => (this.stylingContainer = el), style: { height: '100%' } }, h("div", { key: 'c5ee2fb7f82de38bfddf44988dfca53cc2d43a7f', class: "card", onClick: this.goToDetailsPage(true, EDetailsTabs.Rules) }, h("img", { key: 'ee9b514c762563cf945683b4a09913597c9283e9', class: {
582
616
  card__image: true,
583
617
  grayed: !!this.isChallengeGrayed || this.challenge.Status === EChallengeProgressStatus.Awaiting
584
- }, src: (_b = (_a = this.challenge) === null || _a === void 0 ? void 0 : _a.ChallengePresentation) === null || _b === void 0 ? void 0 : _b.BannerUrl }), this.getCardBadge, this.challenge.IsNew && this.renderNewLabel(), h("div", { key: 'c55783dc61d4f91d157880533cdf984a4eab6621', class: "card__content" }, h("h1", { key: '2cf3c28dce945721a4172fc20af3d51c04d67aec', class: "card__title" }, (_d = (_c = this.challenge) === null || _c === void 0 ? void 0 : _c.ChallengePresentation) === null || _d === void 0 ? void 0 :
618
+ }, src: (_b = (_a = this.challenge) === null || _a === void 0 ? void 0 : _a.ChallengePresentation) === null || _b === void 0 ? void 0 : _b.BannerUrl }), this.getCardBadge, this.challenge.IsNew && this.renderNewLabel(), h("div", { key: '86cd00434687dd4a865e2bcb1cbe3ba1224a57c0', class: "card__content" }, h("h1", { key: '693135eb505d6e3d37d3378753e6e04498080f99', class: "card__title" }, (_d = (_c = this.challenge) === null || _c === void 0 ? void 0 : _c.ChallengePresentation) === null || _d === void 0 ? void 0 :
585
619
  _d.PresentationName, this.renderCardIcon()), this.getChallengeProgress, this.additionalInfo, this.infoItems.map((x, index) => this.renderInfoItem(x, index)), this.getTermsAndConditions()), this.getCardButton)));
586
620
  }
587
621
  static get watchers() { return {
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h } from './index-7720ad93.js';
1
+ import { r as registerInstance, h } from './index-cfebd6c9.js';
2
2
 
3
3
  const StyleCacheKey = '__WIDGET_GLOBAL_STYLE_CACHE__';
4
4
 
@@ -1300,10 +1300,6 @@ const CasinoChallengesContainerStyle0 = casinoChallengesContainerCss;
1300
1300
  const CasinoChallengesContainer = class {
1301
1301
  constructor(hostRef) {
1302
1302
  registerInstance(this, hostRef);
1303
- this.onOpenNotification = (event) => {
1304
- this.notification = event.detail;
1305
- setTimeout(() => (this.notification = null), 10000);
1306
- };
1307
1303
  this.checkAttrs = () => {
1308
1304
  if (!this.endpoint) {
1309
1305
  this.error = 'Endpoint is missing! Please provide a valid endpointURL.';
@@ -1351,7 +1347,8 @@ const CasinoChallengesContainer = class {
1351
1347
  }
1352
1348
  };
1353
1349
  this.renderNotification = () => {
1354
- return (h("div", { class: `notification ${this.notification.errored ? 'errored' : ''}` }, h("img", { src: this.notification.errored ? errorCircleSvg : checkCircleSvg, class: "notification__icon" }), h("p", { class: "notification__message" }, this.notification.message + ' ', this.notification.showTabLink && (h("span", { class: "active-tab", onClick: this.handleTabClick(EChallengesTabs.Active) }, translate('activeTab', this.language))))));
1350
+ var _a, _b, _c, _d;
1351
+ return (h("div", { class: `notification ${((_a = this.notification) === null || _a === void 0 ? void 0 : _a.errored) ? 'errored' : ''}` }, h("img", { src: ((_b = this.notification) === null || _b === void 0 ? void 0 : _b.errored) ? errorCircleSvg : checkCircleSvg, class: "notification__icon" }), h("p", { class: "notification__message" }, ((_c = this.notification) === null || _c === void 0 ? void 0 : _c.message) + ' ', ((_d = this.notification) === null || _d === void 0 ? void 0 : _d.showTabLink) && (h("span", { class: "active-tab", onClick: this.handleTabClick(EChallengesTabs.Active) }, translate('activeTab', this.language))))));
1355
1352
  };
1356
1353
  this.onTimerExpired = (e) => {
1357
1354
  const currentTabIndex = this.activeTabIndex;
@@ -1437,7 +1434,6 @@ const CasinoChallengesContainer = class {
1437
1434
  this.statusEventSource = undefined;
1438
1435
  }
1439
1436
  if (this.newProgressEventSource) {
1440
- console.log('newProgressEventSource disconeection !!!');
1441
1437
  this.newProgressEventSource.removeEventListener('message');
1442
1438
  this.newProgressEventSource.close();
1443
1439
  this.newProgressEventSource = undefined;
@@ -1565,6 +1561,15 @@ const CasinoChallengesContainer = class {
1565
1561
  this.activeTabIndex = Number(newValue);
1566
1562
  }
1567
1563
  }
1564
+ onOpenNotification(event) {
1565
+ var _a, _b;
1566
+ if ((_a = event.detail) === null || _a === void 0 ? void 0 : _a.tab) {
1567
+ this.activeTabIndex = Number((_b = event.detail) === null || _b === void 0 ? void 0 : _b.tab);
1568
+ this.loadData(this.activeTabIndex);
1569
+ }
1570
+ this.notification = event.detail;
1571
+ setTimeout(() => (this.notification = null), 10000);
1572
+ }
1568
1573
  async getChallenges(tabIndex) {
1569
1574
  if (!this.checkAttrs()) {
1570
1575
  const path = tabIndex === EChallengesTabs.Finished ? 'PlayerHistory' : 'GetChallengesInfo';
@@ -1644,12 +1649,12 @@ const CasinoChallengesContainer = class {
1644
1649
  case EChallengesTabs.Finished:
1645
1650
  return (h("casino-challenges-player-history", { mbSource: this.mbSource, clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, translationUrl: this.translationUrl, language: this.language, loading: this.loading, playerHistory: this.playerHistory, onLoadMore: this.onLoadMore, hasMore: this.hasMore }));
1646
1651
  case EChallengesTabs.Code:
1647
- return (h("casino-challenges-claim-code", { mbSource: this.mbSource, clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, translationUrl: this.translationUrl, language: this.language, endpoint: this.endpoint, session: this.session, domain: this.domain, onOpenNotification: this.onOpenNotification }));
1652
+ return (h("casino-challenges-claim-code", { mbSource: this.mbSource, clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, translationUrl: this.translationUrl, language: this.language, endpoint: this.endpoint, session: this.session, domain: this.domain }));
1648
1653
  }
1649
1654
  }
1650
1655
  render() {
1651
1656
  var _a;
1652
- return (h("div", { key: '90844784133ba254c5d8bfe8151bbd924f82c26b', ref: (el) => (this.stylingContainer = el) }, h("div", { key: '975c25eeffdefdfb2e2ddcb10d5df88f84d3caab', class: "challenges" }, h("div", { key: '356aa8d728524feb76a70f74b08255d1769b3fc3', class: "challenges__header" }, h("h1", { key: 'd498b6d61e0e41c067deb90164df78b4a4ab6e03', class: "challenges__title" }, h("img", { key: '838f4d695cb3edef9a18fa29d700e7717a6a7f66', src: titleIconSvg, alt: "icon" }), translate('containerTitle', this.language)), this.session && (h("div", { key: 'dee7ac7ec25146c3f99568993cfa16786e918f36', class: "challenges__tabs-scroll-row" }, h("div", { key: '58511a23756d50d8ead65ae9f11282960bebfe86', class: "challenges__tabs challenges__tabs--promo" }, h("div", { key: '40eb38d5211d1d02a5145be57b05bc4f972549f8', class: `challenges__tab challenges__tab--promo ${this.activeTabIndex === EChallengesTabs.Promo ? 'active' : ''}`, onClick: this.handleTabClick(EChallengesTabs.Promo) }, h("span", { key: '3d4faf64d0e9e6f55742a4e4f8386cc094060aac' }, (_a = this.tabs[0]) === null || _a === void 0 ? void 0 : _a.label), h("img", { key: '64199239fb09ddae4d0648bbc9c48569fd6e9ba7', src: crownSvg }))), h("div", { key: 'a871ff69fcc1a1765b47592ace216545263c86b5', class: "challenges__tabs" }, this.tabs.map((tab, index) => {
1657
+ return (h("div", { key: '2a55522503cbe3d7ca189c7b8363fa149867ae67', ref: (el) => (this.stylingContainer = el) }, h("div", { key: 'bb1cbf81216e50731d8def16c89c5655928a946a', class: "challenges" }, h("div", { key: '4bd6f9925c3edaa4aa9d97feffe9ff14f119f13d', class: "challenges__header" }, h("h1", { key: '38d2d0efcce0d51423ae2113015d0c0a249c6fda', class: "challenges__title" }, h("img", { key: 'cbd7bab09bf8cf49583ee596e8602998dcbb7db6', src: titleIconSvg, alt: "icon" }), translate('containerTitle', this.language)), this.session && (h("div", { key: '86cd0613d0a5fd8bf827d2d130279e3ccc9ffef3', class: "challenges__tabs-scroll-row" }, h("div", { key: '0145546ffaf681281ea352f490ed43a569a55442', class: "challenges__tabs challenges__tabs--promo" }, h("div", { key: 'f9ea47ca7489d8074b670a17f69ebb7b100b3473', class: `challenges__tab challenges__tab--promo ${this.activeTabIndex === EChallengesTabs.Promo ? 'active' : ''}`, onClick: this.handleTabClick(EChallengesTabs.Promo) }, h("span", { key: '40c5ea6b5486eb3dd67de71a980e36ccb53ff467' }, (_a = this.tabs[0]) === null || _a === void 0 ? void 0 : _a.label), h("img", { key: '109203516055890bcd09bb68e0187f46f4373be3', src: crownSvg }))), h("div", { key: '12546c515674f221ec3863e387de9f8087c49bda', class: "challenges__tabs" }, this.tabs.map((tab, index) => {
1653
1658
  if (index === EChallengesTabs.Promo)
1654
1659
  return;
1655
1660
  return (h("div", { class: `challenges__tab ${index === this.activeTabIndex ? 'active' : ''}`, onClick: this.handleTabClick(index) }, tab.label, (tab === null || tab === void 0 ? void 0 : tab.showNotification) && h("img", { src: notificationSvg })));
@@ -1,5 +1,5 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-7720ad93.js';
2
- export { s as setNonce } from './index-7720ad93.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-cfebd6c9.js';
2
+ export { s as setNonce } from './index-cfebd6c9.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  /*
@@ -16,5 +16,5 @@ var patchBrowser = () => {
16
16
 
17
17
  patchBrowser().then(async (options) => {
18
18
  await globalScripts();
19
- return bootstrapLazy([["casino-challenge-card_6",[[1,"casino-challenges-container",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"userId":[513,"user-id"],"activeChallengesTabIndex":[513,"active-challenges-tab-index"],"activeTabIndex":[32],"error":[32],"hasError":[32],"promoChallenges":[32],"activeChallenges":[32],"pendingChallenges":[32],"playerHistory":[32],"loading":[32],"pageNumber":[32],"hasMore":[32],"pageSize":[32],"notification":[32],"statusEventSource":[32],"newProgressEventSource":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"userId":["handleSessionChange"],"activeChallengesTabIndex":["handleActiveChallengesTabIndex"]}],[1,"casino-challenges-list",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"translationUrl":[513,"translation-url"],"challenges":[16],"loading":[516],"hasMore":[516,"has-more"],"activeChallengesTabIndex":[514,"active-challenges-tab-index"],"isUserAuthorized":[516,"is-user-authorized"],"userId":[513,"user-id"],"endpoint":[513],"domain":[513],"session":[513]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"challenges":["handleChallengesChange"]}],[1,"casino-challenges-player-history",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"playerHistory":[16],"loading":[516],"hasMore":[516,"has-more"],"openItems":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"playerHistory":["handlePlayerHistoryChange"]}],[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],"session":[513],"loading":[32],"hasError":[32],"code":[32],"notificationMessage":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"casino-challenge-card",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"challenge":[16],"isUserAuthorized":[516,"is-user-authorized"],"activeChallengesTabIndex":[514,"active-challenges-tab-index"],"userId":[513,"user-id"],"tooltipIndex":[32],"timeLeft":[32],"error":[32],"hasError":[32],"actionLoading":[32],"isChallengePaused":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"challenge":["handleChallengeChange"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}]]]], options);
19
+ return bootstrapLazy([["casino-challenge-card_6",[[1,"casino-challenges-container",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"userId":[513,"user-id"],"activeChallengesTabIndex":[513,"active-challenges-tab-index"],"activeTabIndex":[32],"error":[32],"hasError":[32],"promoChallenges":[32],"activeChallenges":[32],"pendingChallenges":[32],"playerHistory":[32],"loading":[32],"pageNumber":[32],"hasMore":[32],"pageSize":[32],"notification":[32],"statusEventSource":[32],"newProgressEventSource":[32]},[[0,"openNotification","onOpenNotification"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"userId":["handleSessionChange"],"activeChallengesTabIndex":["handleActiveChallengesTabIndex"]}],[1,"casino-challenges-list",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"translationUrl":[513,"translation-url"],"challenges":[16],"loading":[516],"hasMore":[516,"has-more"],"activeChallengesTabIndex":[514,"active-challenges-tab-index"],"isUserAuthorized":[516,"is-user-authorized"],"userId":[513,"user-id"],"endpoint":[513],"domain":[513],"session":[513]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"challenges":["handleChallengesChange"]}],[1,"casino-challenges-player-history",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"playerHistory":[16],"loading":[516],"hasMore":[516,"has-more"],"openItems":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"playerHistory":["handlePlayerHistoryChange"]}],[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],"session":[513],"loading":[32],"hasError":[32],"code":[32],"notificationMessage":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"casino-challenge-card",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"challenge":[16],"isUserAuthorized":[516,"is-user-authorized"],"activeChallengesTabIndex":[514,"active-challenges-tab-index"],"userId":[513,"user-id"],"tooltipIndex":[32],"timeLeft":[32],"error":[32],"hasError":[32],"actionLoading":[32],"isChallengePaused":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"challenge":["handleChallengeChange"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}]]]], options);
20
20
  });
@@ -1,5 +1,5 @@
1
1
  const NAMESPACE = 'casino-challenges-container';
2
- const BUILD = /* casino-challenges-container */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
2
+ const BUILD = /* casino-challenges-container */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
3
3
 
4
4
  /*
5
5
  Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
@@ -84,6 +84,22 @@ var plt = {
84
84
  rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
85
85
  ce: (eventName, opts) => new CustomEvent(eventName, opts)
86
86
  };
87
+ var supportsListenerOptions = /* @__PURE__ */ (() => {
88
+ let supportsListenerOptions2 = false;
89
+ try {
90
+ doc.addEventListener(
91
+ "e",
92
+ null,
93
+ Object.defineProperty({}, "passive", {
94
+ get() {
95
+ supportsListenerOptions2 = true;
96
+ }
97
+ })
98
+ );
99
+ } catch (e) {
100
+ }
101
+ return supportsListenerOptions2;
102
+ })();
87
103
  var promiseResolve = (v) => Promise.resolve(v);
88
104
  var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
89
105
  try {
@@ -738,6 +754,13 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
738
754
  }
739
755
  let maybePromise;
740
756
  if (isInitialLoad) {
757
+ {
758
+ hostRef.$flags$ |= 256 /* isListenReady */;
759
+ if (hostRef.$queuedListeners$) {
760
+ hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
761
+ hostRef.$queuedListeners$ = void 0;
762
+ }
763
+ }
741
764
  {
742
765
  maybePromise = safeCall(instance, "componentWillLoad");
743
766
  }
@@ -1072,6 +1095,7 @@ var connectedCallback = (elm) => {
1072
1095
  initializeComponent(elm, hostRef, cmpMeta);
1073
1096
  }
1074
1097
  } else {
1098
+ addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1075
1099
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1076
1100
  fireConnectedCallback(hostRef.$lazyInstance$);
1077
1101
  } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
@@ -1089,6 +1113,12 @@ var disconnectInstance = (instance) => {
1089
1113
  var disconnectedCallback = async (elm) => {
1090
1114
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1091
1115
  const hostRef = getHostRef(elm);
1116
+ {
1117
+ if (hostRef.$rmListeners$) {
1118
+ hostRef.$rmListeners$.map((rmListener) => rmListener());
1119
+ hostRef.$rmListeners$ = void 0;
1120
+ }
1121
+ }
1092
1122
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1093
1123
  disconnectInstance(hostRef.$lazyInstance$);
1094
1124
  } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
@@ -1128,6 +1158,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1128
1158
  {
1129
1159
  cmpMeta.$members$ = compactMeta[2];
1130
1160
  }
1161
+ {
1162
+ cmpMeta.$listeners$ = compactMeta[3];
1163
+ }
1131
1164
  {
1132
1165
  cmpMeta.$attrsToReflect$ = [];
1133
1166
  }
@@ -1159,9 +1192,10 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1159
1192
  }
1160
1193
  }
1161
1194
  connectedCallback() {
1162
- getHostRef(this);
1195
+ const hostRef = getHostRef(this);
1163
1196
  if (!this.hasRegisteredEventListeners) {
1164
1197
  this.hasRegisteredEventListeners = true;
1198
+ addHostEventListeners(this, hostRef, cmpMeta.$listeners$);
1165
1199
  }
1166
1200
  if (appLoadFallback) {
1167
1201
  clearTimeout(appLoadFallback);
@@ -1216,6 +1250,35 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1216
1250
  }
1217
1251
  endBootstrap();
1218
1252
  };
1253
+ var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
1254
+ if (listeners) {
1255
+ listeners.map(([flags, name, method]) => {
1256
+ const target = elm;
1257
+ const handler = hostListenerProxy(hostRef, method);
1258
+ const opts = hostListenerOpts(flags);
1259
+ plt.ael(target, name, handler, opts);
1260
+ (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
1261
+ });
1262
+ }
1263
+ };
1264
+ var hostListenerProxy = (hostRef, methodName) => (ev) => {
1265
+ var _a;
1266
+ try {
1267
+ {
1268
+ if (hostRef.$flags$ & 256 /* isListenReady */) {
1269
+ (_a = hostRef.$lazyInstance$) == null ? void 0 : _a[methodName](ev);
1270
+ } else {
1271
+ (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
1272
+ }
1273
+ }
1274
+ } catch (e) {
1275
+ consoleError(e);
1276
+ }
1277
+ };
1278
+ var hostListenerOpts = (flags) => supportsListenerOptions ? {
1279
+ passive: (flags & 1 /* Passive */) !== 0,
1280
+ capture: (flags & 2 /* Capture */) !== 0
1281
+ } : (flags & 2 /* Capture */) !== 0;
1219
1282
 
1220
1283
  // src/runtime/nonce.ts
1221
1284
  var setNonce = (nonce) => plt.$nonce$ = nonce;
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { C as CasinoChallengesContainer } from './casino-challenges-container-71016f26.js';
2
- import './index-7720ad93.js';
1
+ export { C as CasinoChallengesContainer } from './casino-challenges-container-20680610.js';
2
+ import './index-cfebd6c9.js';
@@ -1,11 +1,11 @@
1
- import { b as bootstrapLazy } from './index-7720ad93.js';
2
- export { s as setNonce } from './index-7720ad93.js';
1
+ import { b as bootstrapLazy } from './index-cfebd6c9.js';
2
+ export { s as setNonce } from './index-cfebd6c9.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  const defineCustomElements = async (win, options) => {
6
6
  if (typeof window === 'undefined') return undefined;
7
7
  await globalScripts();
8
- return bootstrapLazy([["casino-challenge-card_6",[[1,"casino-challenges-container",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"userId":[513,"user-id"],"activeChallengesTabIndex":[513,"active-challenges-tab-index"],"activeTabIndex":[32],"error":[32],"hasError":[32],"promoChallenges":[32],"activeChallenges":[32],"pendingChallenges":[32],"playerHistory":[32],"loading":[32],"pageNumber":[32],"hasMore":[32],"pageSize":[32],"notification":[32],"statusEventSource":[32],"newProgressEventSource":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"userId":["handleSessionChange"],"activeChallengesTabIndex":["handleActiveChallengesTabIndex"]}],[1,"casino-challenges-list",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"translationUrl":[513,"translation-url"],"challenges":[16],"loading":[516],"hasMore":[516,"has-more"],"activeChallengesTabIndex":[514,"active-challenges-tab-index"],"isUserAuthorized":[516,"is-user-authorized"],"userId":[513,"user-id"],"endpoint":[513],"domain":[513],"session":[513]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"challenges":["handleChallengesChange"]}],[1,"casino-challenges-player-history",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"playerHistory":[16],"loading":[516],"hasMore":[516,"has-more"],"openItems":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"playerHistory":["handlePlayerHistoryChange"]}],[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],"session":[513],"loading":[32],"hasError":[32],"code":[32],"notificationMessage":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"casino-challenge-card",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"challenge":[16],"isUserAuthorized":[516,"is-user-authorized"],"activeChallengesTabIndex":[514,"active-challenges-tab-index"],"userId":[513,"user-id"],"tooltipIndex":[32],"timeLeft":[32],"error":[32],"hasError":[32],"actionLoading":[32],"isChallengePaused":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"challenge":["handleChallengeChange"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}]]]], options);
8
+ return bootstrapLazy([["casino-challenge-card_6",[[1,"casino-challenges-container",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"userId":[513,"user-id"],"activeChallengesTabIndex":[513,"active-challenges-tab-index"],"activeTabIndex":[32],"error":[32],"hasError":[32],"promoChallenges":[32],"activeChallenges":[32],"pendingChallenges":[32],"playerHistory":[32],"loading":[32],"pageNumber":[32],"hasMore":[32],"pageSize":[32],"notification":[32],"statusEventSource":[32],"newProgressEventSource":[32]},[[0,"openNotification","onOpenNotification"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"userId":["handleSessionChange"],"activeChallengesTabIndex":["handleActiveChallengesTabIndex"]}],[1,"casino-challenges-list",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"translationUrl":[513,"translation-url"],"challenges":[16],"loading":[516],"hasMore":[516,"has-more"],"activeChallengesTabIndex":[514,"active-challenges-tab-index"],"isUserAuthorized":[516,"is-user-authorized"],"userId":[513,"user-id"],"endpoint":[513],"domain":[513],"session":[513]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"challenges":["handleChallengesChange"]}],[1,"casino-challenges-player-history",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"playerHistory":[16],"loading":[516],"hasMore":[516,"has-more"],"openItems":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"playerHistory":["handlePlayerHistoryChange"]}],[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],"session":[513],"loading":[32],"hasError":[32],"code":[32],"notificationMessage":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"casino-challenge-card",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"challenge":[16],"isUserAuthorized":[516,"is-user-authorized"],"activeChallengesTabIndex":[514,"active-challenges-tab-index"],"userId":[513,"user-id"],"tooltipIndex":[32],"timeLeft":[32],"error":[32],"hasError":[32],"actionLoading":[32],"isChallengePaused":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"challenge":["handleChallengeChange"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}]]]], options);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };
@@ -55,7 +55,7 @@ export declare class CasinoChallengesContainer {
55
55
  pageNumber: number;
56
56
  hasMore: boolean;
57
57
  pageSize: number;
58
- notification: INotificationOptions;
58
+ notification: INotificationOptions | null;
59
59
  statusEventSource: EventSourcePolyfill;
60
60
  newProgressEventSource: EventSourcePolyfill;
61
61
  private stylingContainer;
@@ -74,7 +74,7 @@ export declare class CasinoChallengesContainer {
74
74
  handleMbSourceChange(newValue: any, oldValue: any): void;
75
75
  handleSessionChange(newValue: any, oldValue: any): void;
76
76
  handleActiveChallengesTabIndex(newValue: any, oldValue: any): void;
77
- onOpenNotification: (event: CustomEvent<INotificationOptions>) => void;
77
+ onOpenNotification(event: CustomEvent<INotificationOptions>): void;
78
78
  checkAttrs: () => boolean;
79
79
  getChallenges(tabIndex: number): Promise<any>;
80
80
  loadData(tabIndex: number): void;
@@ -180,6 +180,7 @@ export interface INotificationOptions {
180
180
  message: string;
181
181
  errored?: boolean;
182
182
  showTabLink?: boolean;
183
+ tab?: EChallengesTabs;
183
184
  }
184
185
  export declare enum EChallengesTabs {
185
186
  Promo = 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/casino-challenges-container",
3
- "version": "0.17.56",
3
+ "version": "0.17.58",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",