@everymatrix/casino-challenges-container 0.22.32 → 0.22.34

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.
@@ -28,7 +28,13 @@ export class CasinoChallengesContainer {
28
28
  };
29
29
  this.onLoadMore = () => {
30
30
  this.pageNumber += 1;
31
- this.getChallenges(this.activeTabIndex).then((res) => {
31
+ this.getChallenges(this.activeTabIndex)
32
+ .then((res) => {
33
+ var _a;
34
+ if (!(res === null || res === void 0 ? void 0 : res.Success) || !((_a = res.Data) === null || _a === void 0 ? void 0 : _a.length)) {
35
+ this.hasMore = false;
36
+ return;
37
+ }
32
38
  switch (this.activeTabIndex) {
33
39
  case EChallengesTabs.Promo:
34
40
  this.promoChallenges = [...this.promoChallenges, ...res.Data];
@@ -47,6 +53,12 @@ export class CasinoChallengesContainer {
47
53
  this.hasMore = this.playerHistory.length < res.TotalItem;
48
54
  break;
49
55
  }
56
+ })
57
+ .catch(() => {
58
+ // Network error: stop, or the observer re-fires loadMore on every render.
59
+ // Still loading means a newer request superseded this one.
60
+ if (!this.loading)
61
+ this.hasMore = false;
50
62
  });
51
63
  };
52
64
  this.handleTabClick = (index) => () => {
@@ -290,17 +302,26 @@ export class CasinoChallengesContainer {
290
302
  }
291
303
  const url = this.getChallengesUrl(tabIndex);
292
304
  const body = this.getChallengesBody(tabIndex);
305
+ if (this.abortGetChallengesController)
306
+ this.abortGetChallengesController.abort(); // new requests aborts previous
307
+ this.abortGetChallengesController = new AbortController();
308
+ const controller = this.abortGetChallengesController;
309
+ const abortTimeout = setTimeout(() => controller.abort(), 60000);
293
310
  this.loading = true;
294
311
  return fetch(url, {
295
312
  method: 'POST',
296
313
  headers: {
297
314
  'Content-Type': 'application/json'
298
315
  },
299
- body: JSON.stringify(body)
316
+ body: JSON.stringify(body),
317
+ signal: controller.signal
300
318
  })
301
319
  .then((res) => res.json())
302
320
  .finally(() => {
303
- this.loading = false;
321
+ clearTimeout(abortTimeout);
322
+ // aborted request must not clear flag for the one still in flight
323
+ if (this.abortGetChallengesController === controller)
324
+ this.loading = false;
304
325
  });
305
326
  }
306
327
  getChallengesUrl(tabIndex) {
@@ -319,29 +340,36 @@ export class CasinoChallengesContainer {
319
340
  }));
320
341
  }
321
342
  loadData(tabIndex) {
322
- this.getChallenges(tabIndex).then((res) => {
323
- if (res === null || res === void 0 ? void 0 : res.Success) {
343
+ this.pageNumber = 0;
344
+ this.getChallenges(tabIndex)
345
+ .then((res) => {
346
+ const isSuccess = !!(res === null || res === void 0 ? void 0 : res.Success);
347
+ const data = isSuccess ? res.Data : [];
348
+ const total = isSuccess ? res.TotalCount : 0;
349
+ const totalItem = isSuccess ? res.TotalItem : 0;
350
+ if (isSuccess) {
324
351
  this.pageNumber = res.PageNumber;
325
- switch (tabIndex) {
326
- case EChallengesTabs.Promo:
327
- this.promoChallenges = res.Data;
328
- this.hasMore = this.promoChallenges.length < res.TotalCount;
329
- break;
330
- case EChallengesTabs.Active:
331
- this.activeChallenges = res.Data;
332
- this.hasMore = this.activeChallenges.length < res.TotalCount;
333
- break;
334
- case EChallengesTabs.Pending:
335
- this.pendingChallenges = res.Data;
336
- this.hasMore = this.pendingChallenges.length < res.TotalCount;
337
- break;
338
- case EChallengesTabs.Finished:
339
- this.playerHistory = res.Data;
340
- this.hasMore = this.playerHistory.length < res.TotalItem;
341
- break;
342
- }
343
352
  }
344
- });
353
+ switch (tabIndex) {
354
+ case EChallengesTabs.Promo:
355
+ this.promoChallenges = data;
356
+ this.hasMore = this.promoChallenges.length < total;
357
+ break;
358
+ case EChallengesTabs.Active:
359
+ this.activeChallenges = data;
360
+ this.hasMore = this.activeChallenges.length < total;
361
+ break;
362
+ case EChallengesTabs.Pending:
363
+ this.pendingChallenges = data;
364
+ this.hasMore = this.pendingChallenges.length < total;
365
+ break;
366
+ case EChallengesTabs.Finished:
367
+ this.playerHistory = data;
368
+ this.hasMore = this.playerHistory.length < totalItem;
369
+ break;
370
+ }
371
+ })
372
+ .catch(() => { }); // aborted by a newer request, or timed out
345
373
  }
346
374
  componentDidLoad() {
347
375
  this.activeTabIndex = Number(this.activeChallengesTabIndex);
@@ -393,7 +421,7 @@ export class CasinoChallengesContainer {
393
421
  }
394
422
  render() {
395
423
  var _a;
396
- return (h("div", { key: '5812501520bde325e105f9767da9b172e609cba0', ref: (el) => (this.stylingContainer = el) }, h("div", { key: '7e5b64192ee8ff0596d54f3b184f20e2152c93fe', class: "challenges" }, h("div", { key: '23ecacb01780eccef98eabdb3b06251296b22f10', class: "challenges__header" }, h("h1", { key: 'd41d2e6f0584f0e186441b27b35af247cd9c7826', class: "challenges__title" }, h("img", { key: '3d231fa1b7ef0e16a7f47b8aa1fcca275e405b2e', src: titleIcon, alt: "icon" }), translate('containerTitle', this.language)), this.session && (h("div", { key: '6fab350bc6b0074245eee4c22458d63fe4ccfd98', class: "challenges__tabs-scroll-row" }, h("div", { key: '28ed726b28352e189b0615d40a8934f0e12f9f6d', class: "challenges__tabs challenges__tabs--promo" }, h("div", { key: 'feaeafe6f372e008833a4b2dfe877e63beb42a84', class: `challenges__tab challenges__tab--promo ${this.activeTabIndex === EChallengesTabs.Promo ? 'active' : ''}`, onClick: this.handleTabClick(EChallengesTabs.Promo) }, h("span", { key: 'ecc30f9058e13d66904ca4658fef770a11516dff' }, (_a = this.tabs[0]) === null || _a === void 0 ? void 0 : _a.label), h("img", { key: '3c55f6a62b1471f88cf5d933a7e26fc8ba94343e', src: crownIcon }))), h("div", { key: '664d37d6719ff89957e73634f9acd0c3fd5a9c4b', class: "challenges__tabs" }, this.tabs.map((tab, index) => {
424
+ return (h("div", { key: 'e149d6218f182444e6c7f5ff27cd8025a6607bdf', ref: (el) => (this.stylingContainer = el) }, h("div", { key: '44a49ef30f0952f2e67fca0322e848f4ab042835', class: "challenges" }, h("div", { key: 'e3366987c92a86acbf15d240ff5178acf788de0d', class: "challenges__header" }, h("h1", { key: 'f2efe6618d6f0eddbc4eebd299356b8a7859e89a', class: "challenges__title" }, h("img", { key: 'ba727afade0d11fc949540bbae66a7cdfc257d2c', src: titleIcon, alt: "icon" }), translate('containerTitle', this.language)), this.session && (h("div", { key: 'cb2ff8f0b9e1893316aadd58573cc66967f533f1', class: "challenges__tabs-scroll-row" }, h("div", { key: '36d381d9268f0a72a64513dd0fde3dd5cbbe3423', class: "challenges__tabs challenges__tabs--promo" }, h("div", { key: 'a614e281b7667b30b9a103a4e2e170391b46cbea', class: `challenges__tab challenges__tab--promo ${this.activeTabIndex === EChallengesTabs.Promo ? 'active' : ''}`, onClick: this.handleTabClick(EChallengesTabs.Promo) }, h("span", { key: 'fdb5e0d9603460e0ddd43d4f3f1f42e2957e7b23' }, (_a = this.tabs[0]) === null || _a === void 0 ? void 0 : _a.label), h("img", { key: 'da30cc897ca1f34264569080361b5f1adff7c00e', src: crownIcon }))), h("div", { key: '40872d480f5d42b6988cf722b183362e4cc9259e', class: "challenges__tabs" }, this.tabs.map((tab, index) => {
397
425
  if (index === EChallengesTabs.Promo)
398
426
  return;
399
427
  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 })));
@@ -1,6 +1,6 @@
1
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-aa4b9128.js';
3
- export { C as casino_challenges_container } from './casino-challenges-container-aa4b9128.js';
2
+ import { s as setClientStyling, a as setClientStylingURL, b as setStreamStyling } from './casino-challenges-container-b8078e6a.js';
3
+ export { C as casino_challenges_container } from './casino-challenges-container-b8078e6a.js';
4
4
 
5
5
  const DEFAULT_LANGUAGE$3 = 'en';
6
6
  const TRANSLATIONS$3 = {
@@ -35,7 +35,8 @@ const TRANSLATIONS$3 = {
35
35
  times: 'times',
36
36
  winStakeRatio: 'Win/Stake Ratio',
37
37
  cardTerms: 'Terms & Conditions',
38
- grantClaimByButtonSuccessMessage: 'Challenge has been triggered successfully and is now available on the Active tab'
38
+ grantClaimByButtonSuccessMessage: 'Challenge has been triggered successfully and is now available on the Active tab',
39
+ requestErrorMessage: 'Something went wrong. Please try again.'
39
40
  }
40
41
  };
41
42
  const translate$3 = (key, customLang) => {
@@ -226,7 +227,7 @@ const linkSvg$1 = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMTA
226
227
 
227
228
  const MIN_DEPOSIT_AMOUNT = '0';
228
229
 
229
- const casinoChallengeCardCss = ".card {\n background-color: var(--emw--color-card-background, #141515);\n border: 2px solid var(--emw--card-border-color, rgba(221, 255, 207, 0.1019607843));\n border-radius: 16px;\n box-sizing: border-box;\n color: var(--emw--color-black, #000000);\n position: relative;\n width: 308px;\n height: 100%;\n display: flex;\n flex-direction: column;\n}\n@container challenges-container (max-width: 670px) {\n .card {\n width: 100%;\n height: auto;\n padding-bottom: 52px;\n }\n}\n.card:hover {\n background: var(--emw--color-card-background-hover, linear-gradient(90deg, rgb(0, 62, 92) 0%, rgb(17, 59, 33) 100%));\n cursor: pointer;\n}\n.card__image {\n border-radius: 16px 16px 0 0;\n height: 200px;\n object-fit: cover;\n width: 100%;\n}\n@container challenges-container (max-width: 576px) {\n .card__image {\n height: 224px;\n }\n}\n.card__image.grayed {\n opacity: 0.6;\n}\n.card__title {\n -webkit-box-orient: vertical;\n color: var(--emw--color-white, #ffffff);\n display: -webkit-box;\n font-size: var(--emw--font-size-medium, 16px);\n max-height: 39px;\n min-height: 22px;\n -webkit-line-clamp: 2;\n margin: 0 0 8px;\n overflow: hidden;\n padding-right: 32px;\n position: relative;\n text-overflow: ellipsis;\n}\n.card__content {\n padding: 20px;\n}\n.card__button {\n background: transparent;\n border: 2px solid var(--emw--button-border-color-gray, #727672);\n border-radius: var(--emw--button-border-radius, 99px);\n color: var(--emw--color-secondary, #e9931e);\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-bold, 700);\n height: 34px;\n text-transform: uppercase;\n width: calc(100% - 40px);\n margin: auto auto 20px auto;\n}\n.card__button:hover {\n border-color: var(--emw--color-secondary, #e9931e);\n cursor: pointer;\n}\n.card__button.filled {\n background-color: var(--emw--button-background-primary-color, #18ce51);\n border-color: var(--emw--color-green-300, #083b17);\n color: var(--emw--color-white, #ffffff);\n}\n.card__button.filled:hover {\n border-color: transparent;\n box-shadow: 0 0 4px 0 rgba(188, 252, 177, 0.2), 0 0 20px 0 rgba(0, 183, 79, 0.5);\n color: var(--emw--color-green-300, #083b17);\n}\n.card__button.grayed {\n color: var(--emw--color-gray-50, #e2e2e2);\n}\n.card__button.grayed:hover {\n border-color: var(--emw--button-primary-border, #24b24e);\n color: var(--emw--color-white, #ffffff);\n}\n.card__button:hover {\n border-color: var(--emw--color-secondary, #e9931e);\n cursor: pointer;\n}\n.card__button:disabled, .card__button:disabled:hover {\n border: 2px solid var(--emw--button-border-color-gray, #727672);\n color: var(--emw--color-gray-50, #e2e2e2);\n cursor: not-allowed;\n opacity: 0.7;\n}\n.card__badge {\n backdrop-filter: blur(20px);\n background: var(--emw--color-white, #ffffff);\n border-radius: 30px;\n box-shadow: 0 4px 4px 0 var(--emw--button-box-shadow-color, rgba(0, 0, 0, 0.25));\n box-sizing: border-box;\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-medium, 500);\n line-height: 22px;\n padding: 2px 12px;\n position: absolute;\n right: 6px;\n top: 6px;\n}\n.card__badge span {\n font-weight: var(--emw--font-weight-bold, 700);\n}\n.card__badge.unavailable, .card__badge.expired {\n background: var(--emw--background-gray-color, rgba(250, 250, 250, 0.5019607843));\n border: 1px solid var(--emw--border-gray-color, #292c29);\n font-weight: 700;\n}\n.card__badge.completed {\n background: var(--emw--background-success-color, #c9f0d7);\n border: 1px solid var(--emw--border-success-color, #00b74f);\n color: var(--emw--color-green-300, #083b17);\n font-weight: 700;\n}\n.card__badge.forfeited {\n background: var(--emw--background-errored-color, #ffe1df);\n border: 1px solid var(--emw--border-errored-color, #d6421e);\n color: var(--emw--errored-color, #850606);\n font-weight: 700;\n}\n.card__badge.paused {\n background: var(--emw--background-warning-color, #f8e4ad);\n border: 1px solid var(--emw--border-warning-color, #ea9018);\n color: var(--emw--warning-color, #6d460a);\n font-weight: 700;\n}\n.card__icon--casino {\n height: 24px;\n position: absolute;\n right: 0;\n top: 0;\n width: 24px;\n}\n.card__icon--sportsbook {\n height: 22px;\n position: absolute;\n right: 0;\n top: 0;\n width: 22px;\n}\n\n.additional-info-trigger-info {\n background: var(--emw--additional-button-background-color, linear-gradient(180deg, #24b24e 0%, #18ce51 100%));\n background-clip: text;\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n font-size: var(--emw--font-size-small, 14px);\n font-weight: var(--emw--font-weight-bold, 700);\n line-height: 24px;\n margin: 0px;\n word-break: break-word;\n -webkit-box-orient: vertical;\n display: -webkit-box;\n max-height: 48px;\n min-height: 24px;\n -webkit-line-clamp: 2;\n overflow: hidden;\n position: relative;\n text-overflow: ellipsis;\n}\n\n.info-item {\n color: var(--emw--color-primary, #1dbf51);\n font-size: var(--emw--font-size-small, 14px);\n font-weight: var(--emw--font-weight-bold, 700);\n line-height: 24px;\n}\n@container challenges-container (min-width: 576px) {\n .info-item {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n vertical-align: bottom;\n }\n}\n.info-item.grayed {\n color: var(--emw--button-border-color-gray, #727672);\n}\n.info-item__label {\n color: var(--emw--color-gray-150, #c8d6ce);\n font-weight: var(--emw--font-weight-medium, 500);\n margin-right: 3px;\n}\n.info-item__tooltip {\n background-color: var(--emw--color-card-background-secondary, #1b1c2b);\n border-radius: 8px;\n color: var(--emw--color-white, #ffffff);\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-medium, 500);\n line-height: 22px;\n opacity: 1;\n padding: 8px 12px;\n position: absolute;\n white-space: normal;\n z-index: 200;\n}\n.info-item__tooltip::before {\n border-bottom: 6px solid var(--emw--color-card-background-secondary, #1b1c2b);\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n content: \"\";\n height: 0;\n left: 50%;\n position: absolute;\n top: -5px;\n transform: translateX(-50%);\n width: 0;\n z-index: 201;\n}\n\n.progress {\n align-content: center;\n background-color: var(--emw--progress-background, rgba(188, 252, 177, 0.1019607843));\n border-radius: 100px;\n box-sizing: border-box;\n height: 22px;\n margin-bottom: 8px;\n padding: 0 2px;\n position: relative;\n}\n.progress.paused {\n opacity: 0.5;\n}\n.progress.grayed {\n mix-blend-mode: luminosity;\n}\n.progress__placeholder {\n height: 28px;\n}\n.progress__icon {\n width: 11px;\n}\n.progress__point {\n align-items: center;\n border-radius: 50%;\n color: var(--emw--color-gray-150, #c8d6ce);\n display: flex;\n font-size: 12px;\n font-weight: 700;\n height: 19px;\n justify-content: center;\n line-height: 19px;\n position: absolute;\n text-align: center;\n top: 0;\n width: 19px;\n}\n.progress__point.start {\n background: var(--emw--progress-active-level, linear-gradient(90deg, #24aa4d 0%, #113f21 100%));\n border: 2px solid var(--emw--button-background-primary-color, #18ce51);\n left: 0;\n}\n.progress__point.end {\n background: var(--emw--color-green-300, #083b17);\n border: 2px solid var(--emw--dark-green, #1c8d56);\n opacity: 0.7;\n right: 0;\n}\n.progress__point.finished {\n background: var(--emw--progress-active-level, linear-gradient(90deg, #24aa4d 0%, #113f21 100%));\n border: 2px solid var(--emw--button-background-primary-color, #18ce51);\n opacity: 1;\n}\n.progress__point.hidden {\n opacity: 0;\n}\n.progress__bar {\n background: var(--emw--progress-bar-bg, linear-gradient(90deg, #1e654f 0%, #1c8d56 100%));\n border-radius: 73px;\n box-sizing: border-box;\n height: 16px;\n padding-right: 6px;\n}\n.progress__text {\n color: var(--emw--color-gray-50, #e2e2e2);\n font-size: 11px;\n font-weight: 700;\n left: 50%;\n line-height: 16px;\n position: absolute;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n\n.new-label {\n align-items: center;\n background: var(--emw--new-badge-background-color, linear-gradient(0deg, #ff3d3d 0%, #a80000 100%));\n clip-path: polygon(0% 0%, 100% 0%, 100% 70%, 50% 100%, 0% 70%);\n display: flex;\n height: 28px;\n justify-content: center;\n position: absolute;\n right: 16px;\n top: 32px;\n width: 37px;\n}\n.new-label span {\n background: linear-gradient(to bottom right, var(--emw--color-white, #ffffff) 0%, var(--emw--color-gray-100, #d4d4d4) 50%) bottom right/50% 50% no-repeat, linear-gradient(to bottom left, var(--emw--color-white, #ffffff) 0%, var(--emw--color-gray-100, #d4d4d4) 50%) bottom left/50% 50% no-repeat, linear-gradient(to top left, var(--emw--color-white, #ffffff) 0%, var(--emw--color-gray-100, #d4d4d4) 50%) top left/50% 50% no-repeat, linear-gradient(to top right, var(--emw--color-white, #ffffff) 0%, var(--emw--color-gray-100, #d4d4d4) 50%) top right/50% 50% no-repeat;\n -webkit-background-clip: text;\n background-clip: text;\n color: transparent;\n font-size: var(--emw--font-size-small, 14px);\n font-weight: var(--emw--font-weight-bold, 700);\n padding-bottom: 3px;\n}\n\n.conditions {\n color: var(--emw--color-gray-150, #c8d6ce);\n font-family: var(--emw--button-typography, \"PF BeauSans Pro\", sans-serif), serif;\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-medium, 500);\n line-height: 14px;\n margin: 6px 0 0 0;\n word-break: break-word;\n -webkit-box-orient: vertical;\n display: -webkit-box;\n max-height: 28px;\n min-height: 14px;\n -webkit-line-clamp: 2;\n overflow: hidden;\n position: relative;\n text-overflow: ellipsis;\n}\n.conditions .link {\n display: inline-flex;\n align-items: center;\n margin: 0 8px 0 0;\n line-height: 14px;\n color: var(--emw--color-blue, #005fe4);\n padding: 0;\n text-decoration: none;\n border-bottom: 1px solid var(--emw--color-blue, #005fe4);\n}\n.conditions .link .icon {\n margin: 2px 0 0 4px;\n width: 8px;\n height: 8px;\n}";
230
+ const casinoChallengeCardCss = ".card {\n background-color: var(--emw--color-card-background, #141515);\n border: 2px solid var(--emw--card-border-color, rgba(221, 255, 207, 0.1019607843));\n border-radius: 16px;\n box-sizing: border-box;\n color: var(--emw--color-black, #000000);\n position: relative;\n width: 308px;\n height: 100%;\n display: flex;\n flex-direction: column;\n}\n@container challenges-container (max-width: 670px) {\n .card {\n width: 100%;\n height: auto;\n padding-bottom: 52px;\n }\n}\n.card:hover {\n background: var(--emw--color-card-background-hover, linear-gradient(90deg, rgb(0, 62, 92) 0%, rgb(17, 59, 33) 100%));\n cursor: pointer;\n}\n.card__image {\n border-radius: 16px 16px 0 0;\n height: 200px;\n object-fit: cover;\n width: 100%;\n}\n@container challenges-container (max-width: 576px) {\n .card__image {\n height: 224px;\n }\n}\n.card__image.grayed {\n opacity: 0.6;\n}\n.card__title {\n -webkit-box-orient: vertical;\n color: var(--emw--color-white, #ffffff);\n display: -webkit-box;\n font-size: var(--emw--font-size-medium, 16px);\n line-height: 20px;\n max-height: 40px;\n min-height: 22px;\n -webkit-line-clamp: 2;\n margin: 0 0 8px;\n overflow: hidden;\n padding-right: 32px;\n position: relative;\n text-overflow: ellipsis;\n}\n.card__content {\n padding: 20px;\n}\n.card__button {\n background: transparent;\n border: 2px solid var(--emw--button-border-color-gray, #727672);\n border-radius: var(--emw--button-border-radius, 99px);\n color: var(--emw--color-secondary, #e9931e);\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-bold, 700);\n height: 34px;\n text-transform: uppercase;\n width: calc(100% - 40px);\n margin: auto auto 20px auto;\n}\n.card__button:hover {\n border-color: var(--emw--color-secondary, #e9931e);\n cursor: pointer;\n}\n.card__button.filled {\n background-color: var(--emw--button-background-primary-color, #18ce51);\n border-color: var(--emw--color-green-300, #083b17);\n color: var(--emw--color-white, #ffffff);\n}\n.card__button.filled:hover {\n border-color: transparent;\n box-shadow: 0 0 4px 0 rgba(188, 252, 177, 0.2), 0 0 20px 0 rgba(0, 183, 79, 0.5);\n color: var(--emw--color-green-300, #083b17);\n}\n.card__button.grayed {\n color: var(--emw--color-gray-50, #e2e2e2);\n}\n.card__button.grayed:hover {\n border-color: var(--emw--button-primary-border, #24b24e);\n color: var(--emw--color-white, #ffffff);\n}\n.card__button:hover {\n border-color: var(--emw--color-secondary, #e9931e);\n cursor: pointer;\n}\n.card__button:disabled, .card__button:disabled:hover {\n border: 2px solid var(--emw--button-border-color-gray, #727672);\n color: var(--emw--color-gray-50, #e2e2e2);\n cursor: not-allowed;\n opacity: 0.7;\n}\n.card__badge {\n backdrop-filter: blur(20px);\n background: var(--emw--color-white, #ffffff);\n border-radius: 30px;\n box-shadow: 0 4px 4px 0 var(--emw--button-box-shadow-color, rgba(0, 0, 0, 0.25));\n box-sizing: border-box;\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-medium, 500);\n line-height: 22px;\n padding: 2px 12px;\n position: absolute;\n right: 6px;\n top: 6px;\n}\n.card__badge span {\n font-weight: var(--emw--font-weight-bold, 700);\n}\n.card__badge.unavailable, .card__badge.expired {\n background: var(--emw--background-gray-color, rgba(250, 250, 250, 0.5019607843));\n border: 1px solid var(--emw--border-gray-color, #292c29);\n font-weight: 700;\n}\n.card__badge.completed {\n background: var(--emw--background-success-color, #c9f0d7);\n border: 1px solid var(--emw--border-success-color, #00b74f);\n color: var(--emw--color-green-300, #083b17);\n font-weight: 700;\n}\n.card__badge.forfeited {\n background: var(--emw--background-errored-color, #ffe1df);\n border: 1px solid var(--emw--border-errored-color, #d6421e);\n color: var(--emw--errored-color, #850606);\n font-weight: 700;\n}\n.card__badge.paused {\n background: var(--emw--background-warning-color, #f8e4ad);\n border: 1px solid var(--emw--border-warning-color, #ea9018);\n color: var(--emw--warning-color, #6d460a);\n font-weight: 700;\n}\n.card__icon--casino {\n height: 24px;\n position: absolute;\n right: 0;\n top: 0;\n width: 24px;\n}\n.card__icon--sportsbook {\n height: 22px;\n position: absolute;\n right: 0;\n top: 0;\n width: 22px;\n}\n\n.additional-info-trigger-info {\n background: var(--emw--additional-button-background-color, linear-gradient(180deg, #24b24e 0%, #18ce51 100%));\n background-clip: text;\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n font-size: var(--emw--font-size-small, 14px);\n font-weight: var(--emw--font-weight-bold, 700);\n line-height: 24px;\n margin: 0px;\n word-break: break-word;\n -webkit-box-orient: vertical;\n display: -webkit-box;\n max-height: 48px;\n min-height: 24px;\n -webkit-line-clamp: 2;\n overflow: hidden;\n position: relative;\n text-overflow: ellipsis;\n}\n\n.info-item {\n color: var(--emw--color-primary, #1dbf51);\n font-size: var(--emw--font-size-small, 14px);\n font-weight: var(--emw--font-weight-bold, 700);\n line-height: 24px;\n}\n@container challenges-container (min-width: 576px) {\n .info-item {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n vertical-align: bottom;\n }\n}\n.info-item.grayed {\n color: var(--emw--button-border-color-gray, #727672);\n}\n.info-item__label {\n color: var(--emw--color-gray-150, #c8d6ce);\n font-weight: var(--emw--font-weight-medium, 500);\n margin-right: 3px;\n}\n.info-item__tooltip {\n background-color: var(--emw--color-card-background-secondary, #1b1c2b);\n border-radius: 8px;\n color: var(--emw--color-white, #ffffff);\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-medium, 500);\n line-height: 22px;\n opacity: 1;\n padding: 8px 12px;\n position: absolute;\n white-space: normal;\n z-index: 200;\n}\n.info-item__tooltip::before {\n border-bottom: 6px solid var(--emw--color-card-background-secondary, #1b1c2b);\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n content: \"\";\n height: 0;\n left: 50%;\n position: absolute;\n top: -5px;\n transform: translateX(-50%);\n width: 0;\n z-index: 201;\n}\n\n.progress {\n align-content: center;\n background-color: var(--emw--progress-background, rgba(188, 252, 177, 0.1019607843));\n border-radius: 100px;\n box-sizing: border-box;\n height: 22px;\n margin-bottom: 8px;\n padding: 0 2px;\n position: relative;\n}\n.progress.paused {\n opacity: 0.5;\n}\n.progress.grayed {\n mix-blend-mode: luminosity;\n}\n.progress__placeholder {\n height: 28px;\n}\n.progress__icon {\n width: 11px;\n}\n.progress__point {\n align-items: center;\n border-radius: 50%;\n color: var(--emw--color-gray-150, #c8d6ce);\n display: flex;\n font-size: 12px;\n font-weight: 700;\n height: 19px;\n justify-content: center;\n line-height: 19px;\n position: absolute;\n text-align: center;\n top: 0;\n width: 19px;\n}\n.progress__point.start {\n background: var(--emw--progress-active-level, linear-gradient(90deg, #24aa4d 0%, #113f21 100%));\n border: 2px solid var(--emw--button-background-primary-color, #18ce51);\n left: 0;\n}\n.progress__point.end {\n background: var(--emw--color-green-300, #083b17);\n border: 2px solid var(--emw--dark-green, #1c8d56);\n opacity: 0.7;\n right: 0;\n}\n.progress__point.finished {\n background: var(--emw--progress-active-level, linear-gradient(90deg, #24aa4d 0%, #113f21 100%));\n border: 2px solid var(--emw--button-background-primary-color, #18ce51);\n opacity: 1;\n}\n.progress__point.hidden {\n opacity: 0;\n}\n.progress__bar {\n background: var(--emw--progress-bar-bg, linear-gradient(90deg, #1e654f 0%, #1c8d56 100%));\n border-radius: 73px;\n box-sizing: border-box;\n height: 16px;\n padding-right: 6px;\n}\n.progress__text {\n color: var(--emw--color-gray-50, #e2e2e2);\n font-size: 11px;\n font-weight: 700;\n left: 50%;\n line-height: 16px;\n position: absolute;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n\n.new-label {\n align-items: center;\n background: var(--emw--new-badge-background-color, linear-gradient(0deg, #ff3d3d 0%, #a80000 100%));\n clip-path: polygon(0% 0%, 100% 0%, 100% 70%, 50% 100%, 0% 70%);\n display: flex;\n height: 28px;\n justify-content: center;\n position: absolute;\n right: 16px;\n top: 32px;\n width: 37px;\n}\n.new-label span {\n background: linear-gradient(to bottom right, var(--emw--color-white, #ffffff) 0%, var(--emw--color-gray-100, #d4d4d4) 50%) bottom right/50% 50% no-repeat, linear-gradient(to bottom left, var(--emw--color-white, #ffffff) 0%, var(--emw--color-gray-100, #d4d4d4) 50%) bottom left/50% 50% no-repeat, linear-gradient(to top left, var(--emw--color-white, #ffffff) 0%, var(--emw--color-gray-100, #d4d4d4) 50%) top left/50% 50% no-repeat, linear-gradient(to top right, var(--emw--color-white, #ffffff) 0%, var(--emw--color-gray-100, #d4d4d4) 50%) top right/50% 50% no-repeat;\n -webkit-background-clip: text;\n background-clip: text;\n color: transparent;\n font-size: var(--emw--font-size-small, 14px);\n font-weight: var(--emw--font-weight-bold, 700);\n padding-bottom: 3px;\n}\n\n.conditions {\n color: var(--emw--color-gray-150, #c8d6ce);\n font-family: var(--emw--button-typography, \"PF BeauSans Pro\", sans-serif), serif;\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-medium, 500);\n line-height: 14px;\n margin: 6px 0 0 0;\n word-break: break-word;\n -webkit-box-orient: vertical;\n display: -webkit-box;\n max-height: 28px;\n min-height: 14px;\n -webkit-line-clamp: 2;\n overflow: hidden;\n position: relative;\n text-overflow: ellipsis;\n}\n.conditions .link {\n display: inline-flex;\n align-items: center;\n margin: 0 8px 0 0;\n line-height: 14px;\n color: var(--emw--color-blue, #005fe4);\n padding: 0;\n text-decoration: none;\n border-bottom: 1px solid var(--emw--color-blue, #005fe4);\n}\n.conditions .link .icon {\n margin: 2px 0 0 4px;\n width: 8px;\n height: 8px;\n}";
230
231
  const CasinoChallengeCardStyle0 = casinoChallengeCardCss;
231
232
 
232
233
  const CasinoChallengeCard = class {
@@ -523,9 +524,15 @@ const CasinoChallengeCard = class {
523
524
  });
524
525
  }
525
526
  else {
526
- this.openNotification.emit({ message: res.ErrorMessage, errored: true });
527
+ this.openNotification.emit({
528
+ message: res.ErrorMessage || translate$3('requestErrorMessage', this.language),
529
+ errored: true
530
+ });
527
531
  }
528
532
  return res;
533
+ })
534
+ .catch(() => {
535
+ this.openNotification.emit({ message: translate$3('requestErrorMessage', this.language), errored: true });
529
536
  })
530
537
  .finally(() => {
531
538
  this.actionLoading = false;
@@ -605,6 +612,15 @@ const CasinoChallengeCard = class {
605
612
  this.challenge.Status = EChallengeProgressStatus.Paused;
606
613
  }
607
614
  }
615
+ else {
616
+ this.openNotification.emit({
617
+ message: res.ErrorMessage || translate$3('requestErrorMessage', this.language),
618
+ errored: true
619
+ });
620
+ }
621
+ })
622
+ .catch(() => {
623
+ this.openNotification.emit({ message: translate$3('requestErrorMessage', this.language), errored: true });
608
624
  })
609
625
  .finally(() => (this.actionLoading = false));
610
626
  }
@@ -624,10 +640,10 @@ const CasinoChallengeCard = class {
624
640
  }
625
641
  render() {
626
642
  var _a, _b, _c, _d;
627
- return (h("div", { key: 'ac8eea39e679ee4aa004cfb231db064d277a28e8', ref: (el) => (this.stylingContainer = el), style: { height: '100%' } }, h("div", { key: '6624440cde6255fc4d2fd524500d936c324d7024', class: "card", onClick: this.goToDetailsPage(true, EDetailsTabs.Rules) }, h("img", { key: '669e85aa1fc44fe4b6921df1e9d87363f0d425bd', class: {
643
+ return (h("div", { key: '5a6df4098b2b147d25841cfac1fd8126fc1f7e85', ref: (el) => (this.stylingContainer = el), style: { height: '100%' } }, h("div", { key: '6e4c1abf726f145c9d4718de6105a2fb759cc439', class: "card", onClick: this.goToDetailsPage(true, EDetailsTabs.Rules) }, h("img", { key: '958156269e1539b05ab15a44c7b25b2e77cef9a0', class: {
628
644
  card__image: true,
629
645
  grayed: !!this.isChallengeGrayed || this.challenge.Status === EChallengeProgressStatus.Awaiting
630
- }, 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: '51d95f1672112929fdf12972fed50850f40f9f50', class: "card__content" }, h("h1", { key: '72d012d5aa1e7afa62603c96eb84f33acdcfda3b', class: "card__title" }, (_d = (_c = this.challenge) === null || _c === void 0 ? void 0 : _c.ChallengePresentation) === null || _d === void 0 ? void 0 :
646
+ }, 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: '6d4fa1f7957d16c849921f476cd161a1cb757679', class: "card__content" }, h("h1", { key: 'd295fea55265138cd2e61d5bb5d627488f35d088', class: "card__title" }, (_d = (_c = this.challenge) === null || _c === void 0 ? void 0 : _c.ChallengePresentation) === null || _d === void 0 ? void 0 :
631
647
  _d.PresentationName, this.renderCardIcon()), this.getChallengeProgress, this.additionalInfo, this.infoItems.map((x, index) => this.renderInfoItem(x, index)), this.getTermsAndConditions()), this.getCardButton)));
632
648
  }
633
649
  static get watchers() { return {
@@ -644,8 +660,9 @@ const TRANSLATIONS$2 = {
644
660
  en: {
645
661
  claimCodeTitle: 'Enter the secret code to unlock hidden quests and rewards.',
646
662
  claimCodeSuccessMessage: 'The code was successfully applied.',
663
+ requestErrorMessage: 'Something went wrong. Please try again.',
647
664
  claimCodeInputLabel: '3–30 characters, no spaces',
648
- claimCodeBtnText: 'Apply code',
665
+ claimCodeBtnText: 'Apply code'
649
666
  }
650
667
  };
651
668
  const translate$2 = (key, customLang) => {
@@ -689,13 +706,19 @@ const CasinoChallengesClaimCode = class {
689
706
  this.handleSubmit = async () => {
690
707
  if (this.endpoint && this.session && this.domain) {
691
708
  const response = await this.applyCode();
709
+ if (!response)
710
+ return;
692
711
  if (response.Success) {
693
712
  this.openNotification.emit({ message: translate$2('claimCodeSuccessMessage', this.language) });
694
713
  }
695
714
  else {
696
715
  this.hasError = true;
697
716
  const showTabLink = response.ErrorCode === 3002 || response.ErrorCode === 3023 || response.ErrorCode === 3003;
698
- this.openNotification.emit({ message: response.ErrorMessage, errored: true, showTabLink });
717
+ this.openNotification.emit({
718
+ message: response.ErrorMessage || translate$2('requestErrorMessage', this.language),
719
+ errored: true,
720
+ showTabLink
721
+ });
699
722
  }
700
723
  }
701
724
  };
@@ -711,6 +734,10 @@ const CasinoChallengesClaimCode = class {
711
734
  body: JSON.stringify(body)
712
735
  })
713
736
  .then((res) => res.json())
737
+ .catch(() => {
738
+ this.openNotification.emit({ message: translate$2('requestErrorMessage', this.language), errored: true });
739
+ return null;
740
+ })
714
741
  .finally(() => (this.loading = false));
715
742
  };
716
743
  this.handleInput = (event) => {
@@ -772,7 +799,7 @@ const CasinoChallengesClaimCode = class {
772
799
  return val.length >= 3 && val.length <= 30 && this.asciiPrintableRegex.test(val);
773
800
  }
774
801
  render() {
775
- return (h("div", { key: 'c1e0cca9301c0251d306f88dd60fcc1485cf82c8', ref: (el) => (this.stylingContainer = el) }, h("div", { key: 'ea88bcc409341fe7ec90098a183f49fecefb12d5', class: "code-container" }, h("p", { key: '2b89012b42ffba2c4ed8d2ca9f0389458b1e64b2', class: "code-container__title" }, translate$2('claimCodeTitle', this.language)), h("input", { key: 'c558b04e251d907b62c75b3b539e38978efeb0dd', class: `code-input ${this.hasError ? 'errored' : ''}`, type: "text", placeholder: "e.g. SPRING24", onInput: this.handleInput }), h("p", { key: '448b96d9e7c14daac2131795a5ddd04acf98139e', class: "code-input__text" }, translate$2('claimCodeInputLabel', this.language)), h("button", { key: 'b79271e6fb979dbfa698f3b0c7e680f6326f6d7f', class: "code-container__button", onClick: this.handleSubmit, disabled: this.loading || !this.code || this.hasError }, translate$2('claimCodeBtnText', this.language)))));
802
+ return (h("div", { key: '601b5f6a7123b912a6f753879da34759c77033a2', ref: (el) => (this.stylingContainer = el) }, h("div", { key: '5924a51db396bc167d930daa874c571c94c55679', class: "code-container" }, h("p", { key: 'dbbea8c309114aeb458721030b9ef739a2761a87', class: "code-container__title" }, translate$2('claimCodeTitle', this.language)), h("input", { key: '38aaaee10deb9702090c440987a047c9fbc3f856', class: `code-input ${this.hasError ? 'errored' : ''}`, type: "text", placeholder: "e.g. SPRING24", onInput: this.handleInput }), h("p", { key: '6e0c22a813072a20381ddb63e3f97179ecc26e10', class: "code-input__text" }, translate$2('claimCodeInputLabel', this.language)), h("button", { key: 'df63607b59067968e425e2903f00058761a6e35c', class: "code-container__button", onClick: this.handleSubmit, disabled: this.loading || !this.code || this.hasError }, translate$2('claimCodeBtnText', this.language)))));
776
803
  }
777
804
  static get watchers() { return {
778
805
  "clientStyling": ["handleClientStylingChange"],
@@ -1315,7 +1315,13 @@ const CasinoChallengesContainer = class {
1315
1315
  };
1316
1316
  this.onLoadMore = () => {
1317
1317
  this.pageNumber += 1;
1318
- this.getChallenges(this.activeTabIndex).then((res) => {
1318
+ this.getChallenges(this.activeTabIndex)
1319
+ .then((res) => {
1320
+ var _a;
1321
+ if (!(res === null || res === void 0 ? void 0 : res.Success) || !((_a = res.Data) === null || _a === void 0 ? void 0 : _a.length)) {
1322
+ this.hasMore = false;
1323
+ return;
1324
+ }
1319
1325
  switch (this.activeTabIndex) {
1320
1326
  case EChallengesTabs.Promo:
1321
1327
  this.promoChallenges = [...this.promoChallenges, ...res.Data];
@@ -1334,6 +1340,12 @@ const CasinoChallengesContainer = class {
1334
1340
  this.hasMore = this.playerHistory.length < res.TotalItem;
1335
1341
  break;
1336
1342
  }
1343
+ })
1344
+ .catch(() => {
1345
+ // Network error: stop, or the observer re-fires loadMore on every render.
1346
+ // Still loading means a newer request superseded this one.
1347
+ if (!this.loading)
1348
+ this.hasMore = false;
1337
1349
  });
1338
1350
  };
1339
1351
  this.handleTabClick = (index) => () => {
@@ -1577,17 +1589,26 @@ const CasinoChallengesContainer = class {
1577
1589
  }
1578
1590
  const url = this.getChallengesUrl(tabIndex);
1579
1591
  const body = this.getChallengesBody(tabIndex);
1592
+ if (this.abortGetChallengesController)
1593
+ this.abortGetChallengesController.abort(); // new requests aborts previous
1594
+ this.abortGetChallengesController = new AbortController();
1595
+ const controller = this.abortGetChallengesController;
1596
+ const abortTimeout = setTimeout(() => controller.abort(), 60000);
1580
1597
  this.loading = true;
1581
1598
  return fetch(url, {
1582
1599
  method: 'POST',
1583
1600
  headers: {
1584
1601
  'Content-Type': 'application/json'
1585
1602
  },
1586
- body: JSON.stringify(body)
1603
+ body: JSON.stringify(body),
1604
+ signal: controller.signal
1587
1605
  })
1588
1606
  .then((res) => res.json())
1589
1607
  .finally(() => {
1590
- this.loading = false;
1608
+ clearTimeout(abortTimeout);
1609
+ // aborted request must not clear flag for the one still in flight
1610
+ if (this.abortGetChallengesController === controller)
1611
+ this.loading = false;
1591
1612
  });
1592
1613
  }
1593
1614
  getChallengesUrl(tabIndex) {
@@ -1606,29 +1627,36 @@ const CasinoChallengesContainer = class {
1606
1627
  }));
1607
1628
  }
1608
1629
  loadData(tabIndex) {
1609
- this.getChallenges(tabIndex).then((res) => {
1610
- if (res === null || res === void 0 ? void 0 : res.Success) {
1630
+ this.pageNumber = 0;
1631
+ this.getChallenges(tabIndex)
1632
+ .then((res) => {
1633
+ const isSuccess = !!(res === null || res === void 0 ? void 0 : res.Success);
1634
+ const data = isSuccess ? res.Data : [];
1635
+ const total = isSuccess ? res.TotalCount : 0;
1636
+ const totalItem = isSuccess ? res.TotalItem : 0;
1637
+ if (isSuccess) {
1611
1638
  this.pageNumber = res.PageNumber;
1612
- switch (tabIndex) {
1613
- case EChallengesTabs.Promo:
1614
- this.promoChallenges = res.Data;
1615
- this.hasMore = this.promoChallenges.length < res.TotalCount;
1616
- break;
1617
- case EChallengesTabs.Active:
1618
- this.activeChallenges = res.Data;
1619
- this.hasMore = this.activeChallenges.length < res.TotalCount;
1620
- break;
1621
- case EChallengesTabs.Pending:
1622
- this.pendingChallenges = res.Data;
1623
- this.hasMore = this.pendingChallenges.length < res.TotalCount;
1624
- break;
1625
- case EChallengesTabs.Finished:
1626
- this.playerHistory = res.Data;
1627
- this.hasMore = this.playerHistory.length < res.TotalItem;
1628
- break;
1629
- }
1630
1639
  }
1631
- });
1640
+ switch (tabIndex) {
1641
+ case EChallengesTabs.Promo:
1642
+ this.promoChallenges = data;
1643
+ this.hasMore = this.promoChallenges.length < total;
1644
+ break;
1645
+ case EChallengesTabs.Active:
1646
+ this.activeChallenges = data;
1647
+ this.hasMore = this.activeChallenges.length < total;
1648
+ break;
1649
+ case EChallengesTabs.Pending:
1650
+ this.pendingChallenges = data;
1651
+ this.hasMore = this.pendingChallenges.length < total;
1652
+ break;
1653
+ case EChallengesTabs.Finished:
1654
+ this.playerHistory = data;
1655
+ this.hasMore = this.playerHistory.length < totalItem;
1656
+ break;
1657
+ }
1658
+ })
1659
+ .catch(() => { }); // aborted by a newer request, or timed out
1632
1660
  }
1633
1661
  componentDidLoad() {
1634
1662
  this.activeTabIndex = Number(this.activeChallengesTabIndex);
@@ -1680,7 +1708,7 @@ const CasinoChallengesContainer = class {
1680
1708
  }
1681
1709
  render() {
1682
1710
  var _a;
1683
- return (h("div", { key: '5812501520bde325e105f9767da9b172e609cba0', ref: (el) => (this.stylingContainer = el) }, h("div", { key: '7e5b64192ee8ff0596d54f3b184f20e2152c93fe', class: "challenges" }, h("div", { key: '23ecacb01780eccef98eabdb3b06251296b22f10', class: "challenges__header" }, h("h1", { key: 'd41d2e6f0584f0e186441b27b35af247cd9c7826', class: "challenges__title" }, h("img", { key: '3d231fa1b7ef0e16a7f47b8aa1fcca275e405b2e', src: titleIconSvg, alt: "icon" }), translate('containerTitle', this.language)), this.session && (h("div", { key: '6fab350bc6b0074245eee4c22458d63fe4ccfd98', class: "challenges__tabs-scroll-row" }, h("div", { key: '28ed726b28352e189b0615d40a8934f0e12f9f6d', class: "challenges__tabs challenges__tabs--promo" }, h("div", { key: 'feaeafe6f372e008833a4b2dfe877e63beb42a84', class: `challenges__tab challenges__tab--promo ${this.activeTabIndex === EChallengesTabs.Promo ? 'active' : ''}`, onClick: this.handleTabClick(EChallengesTabs.Promo) }, h("span", { key: 'ecc30f9058e13d66904ca4658fef770a11516dff' }, (_a = this.tabs[0]) === null || _a === void 0 ? void 0 : _a.label), h("img", { key: '3c55f6a62b1471f88cf5d933a7e26fc8ba94343e', src: crownSvg }))), h("div", { key: '664d37d6719ff89957e73634f9acd0c3fd5a9c4b', class: "challenges__tabs" }, this.tabs.map((tab, index) => {
1711
+ return (h("div", { key: 'e149d6218f182444e6c7f5ff27cd8025a6607bdf', ref: (el) => (this.stylingContainer = el) }, h("div", { key: '44a49ef30f0952f2e67fca0322e848f4ab042835', class: "challenges" }, h("div", { key: 'e3366987c92a86acbf15d240ff5178acf788de0d', class: "challenges__header" }, h("h1", { key: 'f2efe6618d6f0eddbc4eebd299356b8a7859e89a', class: "challenges__title" }, h("img", { key: 'ba727afade0d11fc949540bbae66a7cdfc257d2c', src: titleIconSvg, alt: "icon" }), translate('containerTitle', this.language)), this.session && (h("div", { key: 'cb2ff8f0b9e1893316aadd58573cc66967f533f1', class: "challenges__tabs-scroll-row" }, h("div", { key: '36d381d9268f0a72a64513dd0fde3dd5cbbe3423', class: "challenges__tabs challenges__tabs--promo" }, h("div", { key: 'a614e281b7667b30b9a103a4e2e170391b46cbea', class: `challenges__tab challenges__tab--promo ${this.activeTabIndex === EChallengesTabs.Promo ? 'active' : ''}`, onClick: this.handleTabClick(EChallengesTabs.Promo) }, h("span", { key: 'fdb5e0d9603460e0ddd43d4f3f1f42e2957e7b23' }, (_a = this.tabs[0]) === null || _a === void 0 ? void 0 : _a.label), h("img", { key: 'da30cc897ca1f34264569080361b5f1adff7c00e', src: crownSvg }))), h("div", { key: '40872d480f5d42b6988cf722b183362e4cc9259e', class: "challenges__tabs" }, this.tabs.map((tab, index) => {
1684
1712
  if (index === EChallengesTabs.Promo)
1685
1713
  return;
1686
1714
  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 })));
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { C as CasinoChallengesContainer } from './casino-challenges-container-aa4b9128.js';
1
+ export { C as CasinoChallengesContainer } from './casino-challenges-container-b8078e6a.js';
2
2
  import './index-cfebd6c9.js';
@@ -60,6 +60,7 @@ export declare class CasinoChallengesContainer {
60
60
  newProgressEventSource: EventSourcePolyfill;
61
61
  private stylingContainer;
62
62
  private stylingSubscription;
63
+ private abortGetChallengesController;
63
64
  get tabs(): {
64
65
  label: string;
65
66
  showNotification?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/casino-challenges-container",
3
- "version": "0.22.32",
3
+ "version": "0.22.34",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",