@everymatrix/lottery-tipping-latest-result 1.87.27 → 1.87.29

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.
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-6a03d840.js');
6
- const lotteryTippingLatestResult = require('./lottery-tipping-latest-result-0d47d1bd.js');
6
+ const lotteryTippingLatestResult = require('./lottery-tipping-latest-result-0b76c2c3.js');
7
7
 
8
8
  // This icon file is generated automatically.
9
9
  var CalendarOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z" } }] }, "name": "calendar", "theme": "outlined" };
@@ -9706,7 +9706,7 @@ const LotteryTippingTicketBet = class {
9706
9706
  this.defaultBulletConfigLineGroup = undefined;
9707
9707
  this.bulletConfigLineGroup = [[[]]];
9708
9708
  this.currentPage = 1;
9709
- this.isLoading = true;
9709
+ this.isLoading = false;
9710
9710
  this.hasErrors = false;
9711
9711
  this.dialogConfig = { visible: false };
9712
9712
  this.ticketDataSource = [];
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const lotteryTippingLatestResult = require('./lottery-tipping-latest-result-0d47d1bd.js');
5
+ const lotteryTippingLatestResult = require('./lottery-tipping-latest-result-0b76c2c3.js');
6
6
  require('./index-6a03d840.js');
7
7
 
8
8
 
@@ -478,10 +478,9 @@ function thousandSeperator(value) {
478
478
  parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',');
479
479
  return parts.join('.');
480
480
  }
481
- function formattedTurnover(turnover) {
481
+ function formattedTurnover(turnover, unit = '€') {
482
482
  if (turnover === null || turnover === undefined)
483
483
  return '';
484
- const unit = '€';
485
484
  return `${unit}${turnover ? thousandSeperator(turnover) : 0}`;
486
485
  }
487
486
  async function fetchGameInfo(endpoint, gameId) {
@@ -517,6 +516,7 @@ const rightArrowIcon = renderIconDefinitionToSVGElement(RightOutlined$1, {
517
516
  const LotteryTippingLatestResult = class {
518
517
  constructor(hostRef) {
519
518
  index.registerInstance(this, hostRef);
519
+ this.lotteryTippingFetchDataError = index.createEvent(this, "lotteryTippingLatestResultError", 7);
520
520
  this.mbSource = undefined;
521
521
  this.clientStyling = undefined;
522
522
  this.clientStylingUrl = undefined;
@@ -572,6 +572,7 @@ const LotteryTippingLatestResult = class {
572
572
  }
573
573
  catch (e) {
574
574
  console.error(e);
575
+ this.lotteryTippingFetchDataError.emit(e);
575
576
  }
576
577
  finally {
577
578
  this.isLoading = false;
@@ -732,10 +733,10 @@ const LotteryTippingLatestResult = class {
732
733
  return name !== null && name !== void 0 ? name : bettingType;
733
734
  }
734
735
  render() {
735
- return (index.h("div", { key: 'e104fc35ddcdaad1e461bcc867f779dc90254bc6', class: "lottery-tipping-latest-result", ref: (el) => (this.stylingContainer = el) }, this.curDrawSelection && this.curDrawSelection.length > 0 && (index.h("div", { key: '085e418338a52262e8866f300be8e67f4d3bbfc7', class: "result-wrapper" }, index.h("div", { key: '7cf61f06f845fb6aabe53896163fa402b1e52a26', class: "date-selection" }, index.h("div", { key: 'da4abd68318c454324a665f6e02257dda4f224be', class: "date-selection-leftIcon", innerHTML: leftArrowIcon, onClick: this.preDraw.bind(this) }), index.h("div", { key: '938f8f160c10eae2678dc7a98027a3421409f096', class: "date-selection-calendar" }, index.h("lottery-tipping-calendar", { key: 'c8048c6977b3740b8d2e0e7eff3292c329cdc4be', date: this.lastestDate, highLightDates: this.hasDrawDates, language: this.language, "mb-source": this.mbSource, "client-styling-url": this.clientStylingUrl, "translation-url": this.translationUrl })), index.h("div", { key: 'eb17af80ec1b1c38f9d51b878013477290c824d7', class: "date-selection-rightIcon", innerHTML: rightArrowIcon, onClick: this.nextDraw.bind(this) })), index.h("div", { key: 'ab7ad2efffe5f9437db6a77b0b0c60e3d9454c5e', class: "winning-result" }, index.h("div", { key: 'e6a7ae5ba4c6c967858bb6e4e9a7a75246ec86f2', class: "betting-type" }, index.h("div", { key: '341e5ee07c3e588b154d3a73373bed40a8e51a90', class: "betting-type-title" }, translate('bettingType', this.language)), index.h("div", { key: 'f824ded5140f92aee54748939fecb5aac692cd6f', class: "betting-type-text" }, index.h("div", { key: '85cb8c0a387b378b36f05af6703c023d9b0819f9', class: "LotteryTippingTicketController__segmented-control" }, Object.keys(this.curDrawSelectionMap).map((bettingType) => (index.h("button", { class: {
736
+ return (index.h("div", { key: '516bc959365fa133d2dcff466e24c932628f3d55', class: "lottery-tipping-latest-result", ref: (el) => (this.stylingContainer = el) }, this.curDrawSelection && this.curDrawSelection.length > 0 && (index.h("div", { key: 'f059aa26c5aaa24b6b6c8896a8faef64e4787ddb', class: "result-wrapper" }, index.h("div", { key: '510c2e70ddd92bee503fa4dce06171640ddc6a49', class: "date-selection" }, index.h("div", { key: '53a38dca7a49f64e6f17588008ff2917af5862c6', class: "date-selection-leftIcon", innerHTML: leftArrowIcon, onClick: this.preDraw.bind(this) }), index.h("div", { key: '8038c06d44dadf692dc43c7e32573777682fdf64', class: "date-selection-calendar" }, index.h("lottery-tipping-calendar", { key: 'c73630103acd314e5ad36f7e2e432909c8b6bd82', date: this.lastestDate, highLightDates: this.hasDrawDates, language: this.language, "mb-source": this.mbSource, "client-styling-url": this.clientStylingUrl, "translation-url": this.translationUrl })), index.h("div", { key: '439399feaf89a3ec2d02721eacac3f072a6cce6c', class: "date-selection-rightIcon", innerHTML: rightArrowIcon, onClick: this.nextDraw.bind(this) })), index.h("div", { key: '889338084aaba2061e22f4ba6432fe776ca965e5', class: "winning-result" }, index.h("div", { key: '4f32680505bdde15fdb30072e0cbeff5f05c122d', class: "betting-type" }, index.h("div", { key: 'bcbab767beac80766f944790023d6a6025bbb5c3', class: "betting-type-title" }, translate('bettingType', this.language)), index.h("div", { key: 'fb4fe1ad80c557f934b49e9c33916432c9633d57', class: "betting-type-text" }, index.h("div", { key: '76fb553eb922d6b48926a087aa7217a8cc188248', class: "LotteryTippingTicketController__segmented-control" }, Object.keys(this.curDrawSelectionMap).map((bettingType) => (index.h("button", { class: {
736
737
  LotteryTippingTicketController__segment: true,
737
738
  'LotteryTippingTicketController__segment--active': this.curDrawSelectionBettingType === bettingType
738
- }, onClick: this.handleDrawBettingTypeChange.bind(this, bettingType) }, this.getBettingTypeName(bettingType))))))), index.h("lottery-tipping-ticket-bet", { key: '06293a063a9ac5f0f59ab8ec9033df764eadd511', "session-id": this.sessionId, endpoint: this.endpoint, "game-id": this.vendorGameId, "draw-id": this.curDrawItem.id, "default-bullet-config-line-group": JSON.stringify(this.curDrawSelection), "read-pretty": true, "total-pages": this.curDrawSelection.length, language: this.language, "mb-source": this.mbSource, "client-styling-url": this.clientStylingUrl, "translation-url": this.translationUrl })), this.isLoadingTurnover ? (index.h("div", { class: "loading-wrap" }, index.h("ui-skeleton", { structure: "title", width: "140px", height: "30px" }), index.h("ui-skeleton", { structure: "rectangle", width: "100%", height: "30px" }), index.h("ui-skeleton", { structure: "rectangle", width: "100%", height: "30px" }), index.h("ui-skeleton", { structure: "rectangle", width: "100%", height: "30px" }), index.h("ui-skeleton", { structure: "rectangle", width: "100%", height: "30px" }))) : (index.h("div", { class: "prize-result" }, index.h("div", { class: "prize-result-title" }, translate('prizeAllocation', this.language, { turnover: formattedTurnover(this.curTurnOver) })), index.h("div", { class: "prize-result-table" }, index.h("div", { class: "prize-result-table-header" }, index.h("div", { class: "prize-result-table-row" }, index.h("div", { class: "prize-result-table-column" }, translate('prizes', this.language)), index.h("div", { class: "prize-result-table-column" }, translate('numberOfWinners', this.language)), index.h("div", { class: "prize-result-table-column" }, translate('prizeMoney', this.language)))), index.h("div", { class: "prize-result-table-body" }, this.displayedPrizes.map((prize) => (index.h("div", { class: "prize-result-table-row" }, index.h("div", { class: "prize-result-table-column" }, prize.divisionDisplayName), index.h("div", { class: "prize-result-table-column" }, prize.players), index.h("div", { class: "prize-result-table-column" }, thousandSeperator(prize.totalAmount.value))))))))))), this.curDrawSelection.length == 0 && !this.isLoading && (index.h("div", { key: '9aa470442a1f2b4600d0f7727210e71cebf934c8' }, translate('noLatestResult', this.language))), this.isLoading && index.h("div", { key: '4568a1cda8eca35552d84075fbc4507d397e3178', class: "loading-wrap" }, translate('loading', this.language))));
739
+ }, onClick: this.handleDrawBettingTypeChange.bind(this, bettingType) }, this.getBettingTypeName(bettingType))))))), index.h("lottery-tipping-ticket-bet", { key: '4c7f8f1078974c0bc7f0297cff32483c780b4f49', "session-id": this.sessionId, endpoint: this.endpoint, "game-id": this.vendorGameId, "draw-id": this.curDrawItem.id, "default-bullet-config-line-group": JSON.stringify(this.curDrawSelection), "read-pretty": true, "total-pages": this.curDrawSelection.length, language: this.language, "mb-source": this.mbSource, "client-styling-url": this.clientStylingUrl, "translation-url": this.translationUrl })), this.isLoadingTurnover ? (index.h("div", { class: "loading-wrap" }, index.h("ui-skeleton", { structure: "title", width: "140px", height: "30px" }), index.h("ui-skeleton", { structure: "rectangle", width: "100%", height: "30px" }), index.h("ui-skeleton", { structure: "rectangle", width: "100%", height: "30px" }), index.h("ui-skeleton", { structure: "rectangle", width: "100%", height: "30px" }), index.h("ui-skeleton", { structure: "rectangle", width: "100%", height: "30px" }))) : (index.h("div", { class: "prize-result" }, index.h("div", { class: "prize-result-title" }, translate('prizeAllocation', this.language, { turnover: formattedTurnover(this.curTurnOver) })), index.h("div", { class: "prize-result-table" }, index.h("div", { class: "prize-result-table-header" }, index.h("div", { class: "prize-result-table-row" }, index.h("div", { class: "prize-result-table-column" }, translate('prizes', this.language)), index.h("div", { class: "prize-result-table-column" }, translate('numberOfWinners', this.language)), index.h("div", { class: "prize-result-table-column" }, translate('prizeMoney', this.language)))), index.h("div", { class: "prize-result-table-body" }, this.displayedPrizes.map((prize) => (index.h("div", { class: "prize-result-table-row" }, index.h("div", { class: "prize-result-table-column" }, prize.divisionDisplayName), index.h("div", { class: "prize-result-table-column" }, prize.players), index.h("div", { class: "prize-result-table-column" }, thousandSeperator(prize.totalAmount.value))))))))))), this.curDrawSelection.length == 0 && !this.isLoading && (index.h("div", { key: '93fd51e592eff954015ffbc6bf7230713441f7dd' }, translate('noLatestResult', this.language))), this.isLoading && index.h("div", { key: 'eb1a90026da5e7cd92936f18840acdc3ce95ebf4', class: "loading-wrap" }, translate('loading', this.language))));
739
740
  }
740
741
  static get watchers() { return {
741
742
  "clientStyling": ["handleClientStylingChange"],
@@ -71,6 +71,7 @@ export class LotteryTippingLatestResult {
71
71
  }
72
72
  catch (e) {
73
73
  console.error(e);
74
+ this.lotteryTippingFetchDataError.emit(e);
74
75
  }
75
76
  finally {
76
77
  this.isLoading = false;
@@ -231,10 +232,10 @@ export class LotteryTippingLatestResult {
231
232
  return name !== null && name !== void 0 ? name : bettingType;
232
233
  }
233
234
  render() {
234
- return (h("div", { key: 'e104fc35ddcdaad1e461bcc867f779dc90254bc6', class: "lottery-tipping-latest-result", ref: (el) => (this.stylingContainer = el) }, this.curDrawSelection && this.curDrawSelection.length > 0 && (h("div", { key: '085e418338a52262e8866f300be8e67f4d3bbfc7', class: "result-wrapper" }, h("div", { key: '7cf61f06f845fb6aabe53896163fa402b1e52a26', class: "date-selection" }, h("div", { key: 'da4abd68318c454324a665f6e02257dda4f224be', class: "date-selection-leftIcon", innerHTML: leftArrowIcon, onClick: this.preDraw.bind(this) }), h("div", { key: '938f8f160c10eae2678dc7a98027a3421409f096', class: "date-selection-calendar" }, h("lottery-tipping-calendar", { key: 'c8048c6977b3740b8d2e0e7eff3292c329cdc4be', date: this.lastestDate, highLightDates: this.hasDrawDates, language: this.language, "mb-source": this.mbSource, "client-styling-url": this.clientStylingUrl, "translation-url": this.translationUrl })), h("div", { key: 'eb17af80ec1b1c38f9d51b878013477290c824d7', class: "date-selection-rightIcon", innerHTML: rightArrowIcon, onClick: this.nextDraw.bind(this) })), h("div", { key: 'ab7ad2efffe5f9437db6a77b0b0c60e3d9454c5e', class: "winning-result" }, h("div", { key: 'e6a7ae5ba4c6c967858bb6e4e9a7a75246ec86f2', class: "betting-type" }, h("div", { key: '341e5ee07c3e588b154d3a73373bed40a8e51a90', class: "betting-type-title" }, translate('bettingType', this.language)), h("div", { key: 'f824ded5140f92aee54748939fecb5aac692cd6f', class: "betting-type-text" }, h("div", { key: '85cb8c0a387b378b36f05af6703c023d9b0819f9', class: "LotteryTippingTicketController__segmented-control" }, Object.keys(this.curDrawSelectionMap).map((bettingType) => (h("button", { class: {
235
+ return (h("div", { key: '516bc959365fa133d2dcff466e24c932628f3d55', class: "lottery-tipping-latest-result", ref: (el) => (this.stylingContainer = el) }, this.curDrawSelection && this.curDrawSelection.length > 0 && (h("div", { key: 'f059aa26c5aaa24b6b6c8896a8faef64e4787ddb', class: "result-wrapper" }, h("div", { key: '510c2e70ddd92bee503fa4dce06171640ddc6a49', class: "date-selection" }, h("div", { key: '53a38dca7a49f64e6f17588008ff2917af5862c6', class: "date-selection-leftIcon", innerHTML: leftArrowIcon, onClick: this.preDraw.bind(this) }), h("div", { key: '8038c06d44dadf692dc43c7e32573777682fdf64', class: "date-selection-calendar" }, h("lottery-tipping-calendar", { key: 'c73630103acd314e5ad36f7e2e432909c8b6bd82', date: this.lastestDate, highLightDates: this.hasDrawDates, language: this.language, "mb-source": this.mbSource, "client-styling-url": this.clientStylingUrl, "translation-url": this.translationUrl })), h("div", { key: '439399feaf89a3ec2d02721eacac3f072a6cce6c', class: "date-selection-rightIcon", innerHTML: rightArrowIcon, onClick: this.nextDraw.bind(this) })), h("div", { key: '889338084aaba2061e22f4ba6432fe776ca965e5', class: "winning-result" }, h("div", { key: '4f32680505bdde15fdb30072e0cbeff5f05c122d', class: "betting-type" }, h("div", { key: 'bcbab767beac80766f944790023d6a6025bbb5c3', class: "betting-type-title" }, translate('bettingType', this.language)), h("div", { key: 'fb4fe1ad80c557f934b49e9c33916432c9633d57', class: "betting-type-text" }, h("div", { key: '76fb553eb922d6b48926a087aa7217a8cc188248', class: "LotteryTippingTicketController__segmented-control" }, Object.keys(this.curDrawSelectionMap).map((bettingType) => (h("button", { class: {
235
236
  LotteryTippingTicketController__segment: true,
236
237
  'LotteryTippingTicketController__segment--active': this.curDrawSelectionBettingType === bettingType
237
- }, onClick: this.handleDrawBettingTypeChange.bind(this, bettingType) }, this.getBettingTypeName(bettingType))))))), h("lottery-tipping-ticket-bet", { key: '06293a063a9ac5f0f59ab8ec9033df764eadd511', "session-id": this.sessionId, endpoint: this.endpoint, "game-id": this.vendorGameId, "draw-id": this.curDrawItem.id, "default-bullet-config-line-group": JSON.stringify(this.curDrawSelection), "read-pretty": true, "total-pages": this.curDrawSelection.length, language: this.language, "mb-source": this.mbSource, "client-styling-url": this.clientStylingUrl, "translation-url": this.translationUrl })), this.isLoadingTurnover ? (h("div", { class: "loading-wrap" }, h("ui-skeleton", { structure: "title", width: "140px", height: "30px" }), h("ui-skeleton", { structure: "rectangle", width: "100%", height: "30px" }), h("ui-skeleton", { structure: "rectangle", width: "100%", height: "30px" }), h("ui-skeleton", { structure: "rectangle", width: "100%", height: "30px" }), h("ui-skeleton", { structure: "rectangle", width: "100%", height: "30px" }))) : (h("div", { class: "prize-result" }, h("div", { class: "prize-result-title" }, translate('prizeAllocation', this.language, { turnover: formattedTurnover(this.curTurnOver) })), h("div", { class: "prize-result-table" }, h("div", { class: "prize-result-table-header" }, h("div", { class: "prize-result-table-row" }, h("div", { class: "prize-result-table-column" }, translate('prizes', this.language)), h("div", { class: "prize-result-table-column" }, translate('numberOfWinners', this.language)), h("div", { class: "prize-result-table-column" }, translate('prizeMoney', this.language)))), h("div", { class: "prize-result-table-body" }, this.displayedPrizes.map((prize) => (h("div", { class: "prize-result-table-row" }, h("div", { class: "prize-result-table-column" }, prize.divisionDisplayName), h("div", { class: "prize-result-table-column" }, prize.players), h("div", { class: "prize-result-table-column" }, thousandSeperator(prize.totalAmount.value))))))))))), this.curDrawSelection.length == 0 && !this.isLoading && (h("div", { key: '9aa470442a1f2b4600d0f7727210e71cebf934c8' }, translate('noLatestResult', this.language))), this.isLoading && h("div", { key: '4568a1cda8eca35552d84075fbc4507d397e3178', class: "loading-wrap" }, translate('loading', this.language))));
238
+ }, onClick: this.handleDrawBettingTypeChange.bind(this, bettingType) }, this.getBettingTypeName(bettingType))))))), h("lottery-tipping-ticket-bet", { key: '4c7f8f1078974c0bc7f0297cff32483c780b4f49', "session-id": this.sessionId, endpoint: this.endpoint, "game-id": this.vendorGameId, "draw-id": this.curDrawItem.id, "default-bullet-config-line-group": JSON.stringify(this.curDrawSelection), "read-pretty": true, "total-pages": this.curDrawSelection.length, language: this.language, "mb-source": this.mbSource, "client-styling-url": this.clientStylingUrl, "translation-url": this.translationUrl })), this.isLoadingTurnover ? (h("div", { class: "loading-wrap" }, h("ui-skeleton", { structure: "title", width: "140px", height: "30px" }), h("ui-skeleton", { structure: "rectangle", width: "100%", height: "30px" }), h("ui-skeleton", { structure: "rectangle", width: "100%", height: "30px" }), h("ui-skeleton", { structure: "rectangle", width: "100%", height: "30px" }), h("ui-skeleton", { structure: "rectangle", width: "100%", height: "30px" }))) : (h("div", { class: "prize-result" }, h("div", { class: "prize-result-title" }, translate('prizeAllocation', this.language, { turnover: formattedTurnover(this.curTurnOver) })), h("div", { class: "prize-result-table" }, h("div", { class: "prize-result-table-header" }, h("div", { class: "prize-result-table-row" }, h("div", { class: "prize-result-table-column" }, translate('prizes', this.language)), h("div", { class: "prize-result-table-column" }, translate('numberOfWinners', this.language)), h("div", { class: "prize-result-table-column" }, translate('prizeMoney', this.language)))), h("div", { class: "prize-result-table-body" }, this.displayedPrizes.map((prize) => (h("div", { class: "prize-result-table-row" }, h("div", { class: "prize-result-table-column" }, prize.divisionDisplayName), h("div", { class: "prize-result-table-column" }, prize.players), h("div", { class: "prize-result-table-column" }, thousandSeperator(prize.totalAmount.value))))))))))), this.curDrawSelection.length == 0 && !this.isLoading && (h("div", { key: '93fd51e592eff954015ffbc6bf7230713441f7dd' }, translate('noLatestResult', this.language))), this.isLoading && h("div", { key: 'eb1a90026da5e7cd92936f18840acdc3ce95ebf4', class: "loading-wrap" }, translate('loading', this.language))));
238
239
  }
239
240
  static get is() { return "lottery-tipping-latest-result"; }
240
241
  static get encapsulation() { return "shadow"; }
@@ -427,6 +428,24 @@ export class LotteryTippingLatestResult {
427
428
  "isLoadingTurnover": {}
428
429
  };
429
430
  }
431
+ static get events() {
432
+ return [{
433
+ "method": "lotteryTippingFetchDataError",
434
+ "name": "lotteryTippingLatestResultError",
435
+ "bubbles": true,
436
+ "cancelable": true,
437
+ "composed": true,
438
+ "docs": {
439
+ "tags": [],
440
+ "text": ""
441
+ },
442
+ "complexType": {
443
+ "original": "any",
444
+ "resolved": "any",
445
+ "references": {}
446
+ }
447
+ }];
448
+ }
430
449
  static get watchers() {
431
450
  return [{
432
451
  "propName": "clientStyling",
@@ -144,10 +144,9 @@ export function thousandSeperator(value) {
144
144
  parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',');
145
145
  return parts.join('.');
146
146
  }
147
- export function formattedTurnover(turnover) {
147
+ export function formattedTurnover(turnover, unit = '€') {
148
148
  if (turnover === null || turnover === undefined)
149
149
  return '';
150
- const unit = '€';
151
150
  return `${unit}${turnover ? thousandSeperator(turnover) : 0}`;
152
151
  }
153
152
  export async function fetchGameInfo(endpoint, gameId) {
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, h, g as getElement, c as createEvent, H as Host } from './index-52961f92.js';
2
- import { r as requiredArgs, t as toDate, _ as _typeof, s as setClientStyling, a as setClientStylingURL, b as setStreamStyling, c as renderIconDefinitionToSVGElement, g as getTranslations$1, d as translate$1, e as LeftOutlined, R as RightOutlined } from './lottery-tipping-latest-result-59d74574.js';
3
- export { L as lottery_tipping_latest_result } from './lottery-tipping-latest-result-59d74574.js';
2
+ import { r as requiredArgs, t as toDate, _ as _typeof, s as setClientStyling, a as setClientStylingURL, b as setStreamStyling, c as renderIconDefinitionToSVGElement, g as getTranslations$1, d as translate$1, e as LeftOutlined, R as RightOutlined } from './lottery-tipping-latest-result-8e6e386d.js';
3
+ export { L as lottery_tipping_latest_result } from './lottery-tipping-latest-result-8e6e386d.js';
4
4
 
5
5
  // This icon file is generated automatically.
6
6
  var CalendarOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z" } }] }, "name": "calendar", "theme": "outlined" };
@@ -9703,7 +9703,7 @@ const LotteryTippingTicketBet = class {
9703
9703
  this.defaultBulletConfigLineGroup = undefined;
9704
9704
  this.bulletConfigLineGroup = [[[]]];
9705
9705
  this.currentPage = 1;
9706
- this.isLoading = true;
9706
+ this.isLoading = false;
9707
9707
  this.hasErrors = false;
9708
9708
  this.dialogConfig = { visible: false };
9709
9709
  this.ticketDataSource = [];
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { L as LotteryTippingLatestResult } from './lottery-tipping-latest-result-59d74574.js';
1
+ export { L as LotteryTippingLatestResult } from './lottery-tipping-latest-result-8e6e386d.js';
2
2
  import './index-52961f92.js';
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h } from './index-52961f92.js';
1
+ import { r as registerInstance, c as createEvent, h } from './index-52961f92.js';
2
2
 
3
3
  // This icon file is generated automatically.
4
4
  var LeftOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z" } }] }, "name": "left", "theme": "outlined" };
@@ -476,10 +476,9 @@ function thousandSeperator(value) {
476
476
  parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',');
477
477
  return parts.join('.');
478
478
  }
479
- function formattedTurnover(turnover) {
479
+ function formattedTurnover(turnover, unit = '€') {
480
480
  if (turnover === null || turnover === undefined)
481
481
  return '';
482
- const unit = '€';
483
482
  return `${unit}${turnover ? thousandSeperator(turnover) : 0}`;
484
483
  }
485
484
  async function fetchGameInfo(endpoint, gameId) {
@@ -515,6 +514,7 @@ const rightArrowIcon = renderIconDefinitionToSVGElement(RightOutlined$1, {
515
514
  const LotteryTippingLatestResult = class {
516
515
  constructor(hostRef) {
517
516
  registerInstance(this, hostRef);
517
+ this.lotteryTippingFetchDataError = createEvent(this, "lotteryTippingLatestResultError", 7);
518
518
  this.mbSource = undefined;
519
519
  this.clientStyling = undefined;
520
520
  this.clientStylingUrl = undefined;
@@ -570,6 +570,7 @@ const LotteryTippingLatestResult = class {
570
570
  }
571
571
  catch (e) {
572
572
  console.error(e);
573
+ this.lotteryTippingFetchDataError.emit(e);
573
574
  }
574
575
  finally {
575
576
  this.isLoading = false;
@@ -730,10 +731,10 @@ const LotteryTippingLatestResult = class {
730
731
  return name !== null && name !== void 0 ? name : bettingType;
731
732
  }
732
733
  render() {
733
- return (h("div", { key: 'e104fc35ddcdaad1e461bcc867f779dc90254bc6', class: "lottery-tipping-latest-result", ref: (el) => (this.stylingContainer = el) }, this.curDrawSelection && this.curDrawSelection.length > 0 && (h("div", { key: '085e418338a52262e8866f300be8e67f4d3bbfc7', class: "result-wrapper" }, h("div", { key: '7cf61f06f845fb6aabe53896163fa402b1e52a26', class: "date-selection" }, h("div", { key: 'da4abd68318c454324a665f6e02257dda4f224be', class: "date-selection-leftIcon", innerHTML: leftArrowIcon, onClick: this.preDraw.bind(this) }), h("div", { key: '938f8f160c10eae2678dc7a98027a3421409f096', class: "date-selection-calendar" }, h("lottery-tipping-calendar", { key: 'c8048c6977b3740b8d2e0e7eff3292c329cdc4be', date: this.lastestDate, highLightDates: this.hasDrawDates, language: this.language, "mb-source": this.mbSource, "client-styling-url": this.clientStylingUrl, "translation-url": this.translationUrl })), h("div", { key: 'eb17af80ec1b1c38f9d51b878013477290c824d7', class: "date-selection-rightIcon", innerHTML: rightArrowIcon, onClick: this.nextDraw.bind(this) })), h("div", { key: 'ab7ad2efffe5f9437db6a77b0b0c60e3d9454c5e', class: "winning-result" }, h("div", { key: 'e6a7ae5ba4c6c967858bb6e4e9a7a75246ec86f2', class: "betting-type" }, h("div", { key: '341e5ee07c3e588b154d3a73373bed40a8e51a90', class: "betting-type-title" }, translate('bettingType', this.language)), h("div", { key: 'f824ded5140f92aee54748939fecb5aac692cd6f', class: "betting-type-text" }, h("div", { key: '85cb8c0a387b378b36f05af6703c023d9b0819f9', class: "LotteryTippingTicketController__segmented-control" }, Object.keys(this.curDrawSelectionMap).map((bettingType) => (h("button", { class: {
734
+ return (h("div", { key: '516bc959365fa133d2dcff466e24c932628f3d55', class: "lottery-tipping-latest-result", ref: (el) => (this.stylingContainer = el) }, this.curDrawSelection && this.curDrawSelection.length > 0 && (h("div", { key: 'f059aa26c5aaa24b6b6c8896a8faef64e4787ddb', class: "result-wrapper" }, h("div", { key: '510c2e70ddd92bee503fa4dce06171640ddc6a49', class: "date-selection" }, h("div", { key: '53a38dca7a49f64e6f17588008ff2917af5862c6', class: "date-selection-leftIcon", innerHTML: leftArrowIcon, onClick: this.preDraw.bind(this) }), h("div", { key: '8038c06d44dadf692dc43c7e32573777682fdf64', class: "date-selection-calendar" }, h("lottery-tipping-calendar", { key: 'c73630103acd314e5ad36f7e2e432909c8b6bd82', date: this.lastestDate, highLightDates: this.hasDrawDates, language: this.language, "mb-source": this.mbSource, "client-styling-url": this.clientStylingUrl, "translation-url": this.translationUrl })), h("div", { key: '439399feaf89a3ec2d02721eacac3f072a6cce6c', class: "date-selection-rightIcon", innerHTML: rightArrowIcon, onClick: this.nextDraw.bind(this) })), h("div", { key: '889338084aaba2061e22f4ba6432fe776ca965e5', class: "winning-result" }, h("div", { key: '4f32680505bdde15fdb30072e0cbeff5f05c122d', class: "betting-type" }, h("div", { key: 'bcbab767beac80766f944790023d6a6025bbb5c3', class: "betting-type-title" }, translate('bettingType', this.language)), h("div", { key: 'fb4fe1ad80c557f934b49e9c33916432c9633d57', class: "betting-type-text" }, h("div", { key: '76fb553eb922d6b48926a087aa7217a8cc188248', class: "LotteryTippingTicketController__segmented-control" }, Object.keys(this.curDrawSelectionMap).map((bettingType) => (h("button", { class: {
734
735
  LotteryTippingTicketController__segment: true,
735
736
  'LotteryTippingTicketController__segment--active': this.curDrawSelectionBettingType === bettingType
736
- }, onClick: this.handleDrawBettingTypeChange.bind(this, bettingType) }, this.getBettingTypeName(bettingType))))))), h("lottery-tipping-ticket-bet", { key: '06293a063a9ac5f0f59ab8ec9033df764eadd511', "session-id": this.sessionId, endpoint: this.endpoint, "game-id": this.vendorGameId, "draw-id": this.curDrawItem.id, "default-bullet-config-line-group": JSON.stringify(this.curDrawSelection), "read-pretty": true, "total-pages": this.curDrawSelection.length, language: this.language, "mb-source": this.mbSource, "client-styling-url": this.clientStylingUrl, "translation-url": this.translationUrl })), this.isLoadingTurnover ? (h("div", { class: "loading-wrap" }, h("ui-skeleton", { structure: "title", width: "140px", height: "30px" }), h("ui-skeleton", { structure: "rectangle", width: "100%", height: "30px" }), h("ui-skeleton", { structure: "rectangle", width: "100%", height: "30px" }), h("ui-skeleton", { structure: "rectangle", width: "100%", height: "30px" }), h("ui-skeleton", { structure: "rectangle", width: "100%", height: "30px" }))) : (h("div", { class: "prize-result" }, h("div", { class: "prize-result-title" }, translate('prizeAllocation', this.language, { turnover: formattedTurnover(this.curTurnOver) })), h("div", { class: "prize-result-table" }, h("div", { class: "prize-result-table-header" }, h("div", { class: "prize-result-table-row" }, h("div", { class: "prize-result-table-column" }, translate('prizes', this.language)), h("div", { class: "prize-result-table-column" }, translate('numberOfWinners', this.language)), h("div", { class: "prize-result-table-column" }, translate('prizeMoney', this.language)))), h("div", { class: "prize-result-table-body" }, this.displayedPrizes.map((prize) => (h("div", { class: "prize-result-table-row" }, h("div", { class: "prize-result-table-column" }, prize.divisionDisplayName), h("div", { class: "prize-result-table-column" }, prize.players), h("div", { class: "prize-result-table-column" }, thousandSeperator(prize.totalAmount.value))))))))))), this.curDrawSelection.length == 0 && !this.isLoading && (h("div", { key: '9aa470442a1f2b4600d0f7727210e71cebf934c8' }, translate('noLatestResult', this.language))), this.isLoading && h("div", { key: '4568a1cda8eca35552d84075fbc4507d397e3178', class: "loading-wrap" }, translate('loading', this.language))));
737
+ }, onClick: this.handleDrawBettingTypeChange.bind(this, bettingType) }, this.getBettingTypeName(bettingType))))))), h("lottery-tipping-ticket-bet", { key: '4c7f8f1078974c0bc7f0297cff32483c780b4f49', "session-id": this.sessionId, endpoint: this.endpoint, "game-id": this.vendorGameId, "draw-id": this.curDrawItem.id, "default-bullet-config-line-group": JSON.stringify(this.curDrawSelection), "read-pretty": true, "total-pages": this.curDrawSelection.length, language: this.language, "mb-source": this.mbSource, "client-styling-url": this.clientStylingUrl, "translation-url": this.translationUrl })), this.isLoadingTurnover ? (h("div", { class: "loading-wrap" }, h("ui-skeleton", { structure: "title", width: "140px", height: "30px" }), h("ui-skeleton", { structure: "rectangle", width: "100%", height: "30px" }), h("ui-skeleton", { structure: "rectangle", width: "100%", height: "30px" }), h("ui-skeleton", { structure: "rectangle", width: "100%", height: "30px" }), h("ui-skeleton", { structure: "rectangle", width: "100%", height: "30px" }))) : (h("div", { class: "prize-result" }, h("div", { class: "prize-result-title" }, translate('prizeAllocation', this.language, { turnover: formattedTurnover(this.curTurnOver) })), h("div", { class: "prize-result-table" }, h("div", { class: "prize-result-table-header" }, h("div", { class: "prize-result-table-row" }, h("div", { class: "prize-result-table-column" }, translate('prizes', this.language)), h("div", { class: "prize-result-table-column" }, translate('numberOfWinners', this.language)), h("div", { class: "prize-result-table-column" }, translate('prizeMoney', this.language)))), h("div", { class: "prize-result-table-body" }, this.displayedPrizes.map((prize) => (h("div", { class: "prize-result-table-row" }, h("div", { class: "prize-result-table-column" }, prize.divisionDisplayName), h("div", { class: "prize-result-table-column" }, prize.players), h("div", { class: "prize-result-table-column" }, thousandSeperator(prize.totalAmount.value))))))))))), this.curDrawSelection.length == 0 && !this.isLoading && (h("div", { key: '93fd51e592eff954015ffbc6bf7230713441f7dd' }, translate('noLatestResult', this.language))), this.isLoading && h("div", { key: 'eb1a90026da5e7cd92936f18840acdc3ce95ebf4', class: "loading-wrap" }, translate('loading', this.language))));
737
738
  }
738
739
  static get watchers() { return {
739
740
  "clientStyling": ["handleClientStylingChange"],
@@ -1,4 +1,4 @@
1
- import{r as t,h as e,g as i,c as o,H as s}from"./index-52961f92.js";import{r,t as n,_ as a,s as l,a as h,b as c,c as d,g as u,d as p,e as m,R as v}from"./lottery-tipping-latest-result-59d74574.js";export{L as lottery_tipping_latest_result}from"./lottery-tipping-latest-result-59d74574.js";function f(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}var g={};function b(){return g}var y=36e5;function w(t){r(1,arguments);var e=n(t),i=e.getUTCDay(),o=(i<1?7:0)+i-1;return e.setUTCDate(e.getUTCDate()-o),e.setUTCHours(0,0,0,0),e}function x(t){r(1,arguments);var e=n(t),i=e.getUTCFullYear(),o=new Date(0);o.setUTCFullYear(i+1,0,4),o.setUTCHours(0,0,0,0);var s=w(o),a=new Date(0);a.setUTCFullYear(i,0,4),a.setUTCHours(0,0,0,0);var l=w(a);return e.getTime()>=s.getTime()?i+1:e.getTime()>=l.getTime()?i:i-1}function _(t,e){var i,o,s,a,l,h,c,d;r(1,arguments);var u=b(),p=f(null!==(i=null!==(o=null!==(s=null!==(a=null==e?void 0:e.weekStartsOn)&&void 0!==a?a:null==e||null===(l=e.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==s?s:u.weekStartsOn)&&void 0!==o?o:null===(c=u.locale)||void 0===c||null===(d=c.options)||void 0===d?void 0:d.weekStartsOn)&&void 0!==i?i:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=n(t),v=m.getUTCDay(),g=(v<p?7:0)+v-p;return m.setUTCDate(m.getUTCDate()-g),m.setUTCHours(0,0,0,0),m}function k(t,e){var i,o,s,a,l,h,c,d;r(1,arguments);var u=n(t),p=u.getUTCFullYear(),m=b(),v=f(null!==(i=null!==(o=null!==(s=null!==(a=null==e?void 0:e.firstWeekContainsDate)&&void 0!==a?a:null==e||null===(l=e.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==s?s:m.firstWeekContainsDate)&&void 0!==o?o:null===(c=m.locale)||void 0===c||null===(d=c.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==i?i:1);if(!(v>=1&&v<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var g=new Date(0);g.setUTCFullYear(p+1,0,v),g.setUTCHours(0,0,0,0);var y=_(g,e),w=new Date(0);w.setUTCFullYear(p,0,v),w.setUTCHours(0,0,0,0);var x=_(w,e);return u.getTime()>=y.getTime()?p+1:u.getTime()>=x.getTime()?p:p-1}function C(t,e){for(var i=t<0?"-":"",o=Math.abs(t).toString();o.length<e;)o="0"+o;return i+o}const S=function(t,e){var i=t.getUTCFullYear(),o=i>0?i:1-i;return C("yy"===e?o%100:o,e.length)},A=function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):C(i+1,2)},z=function(t,e){return C(t.getUTCDate(),e.length)},T=function(t,e){return C(t.getUTCHours()%12||12,e.length)},I=function(t,e){return C(t.getUTCHours(),e.length)},D=function(t,e){return C(t.getUTCMinutes(),e.length)},O=function(t,e){return C(t.getUTCSeconds(),e.length)},M=function(t,e){var i=e.length,o=t.getUTCMilliseconds();return C(Math.floor(o*Math.pow(10,i-3)),e.length)};var E={G:function(t,e,i){var o=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(o,{width:"abbreviated"});case"GGGGG":return i.era(o,{width:"narrow"});default:return i.era(o,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var o=t.getUTCFullYear();return i.ordinalNumber(o>0?o:1-o,{unit:"year"})}return S(t,e)},Y:function(t,e,i,o){var s=k(t,o),r=s>0?s:1-s;return"YY"===e?C(r%100,2):"Yo"===e?i.ordinalNumber(r,{unit:"year"}):C(r,e.length)},R:function(t,e){return C(x(t),e.length)},u:function(t,e){return C(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var o=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(o);case"QQ":return C(o,2);case"Qo":return i.ordinalNumber(o,{unit:"quarter"});case"QQQ":return i.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(o,{width:"narrow",context:"formatting"});default:return i.quarter(o,{width:"wide",context:"formatting"})}},q:function(t,e,i){var o=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(o);case"qq":return C(o,2);case"qo":return i.ordinalNumber(o,{unit:"quarter"});case"qqq":return i.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(o,{width:"narrow",context:"standalone"});default:return i.quarter(o,{width:"wide",context:"standalone"})}},M:function(t,e,i){var o=t.getUTCMonth();switch(e){case"M":case"MM":return A(t,e);case"Mo":return i.ordinalNumber(o+1,{unit:"month"});case"MMM":return i.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(o,{width:"narrow",context:"formatting"});default:return i.month(o,{width:"wide",context:"formatting"})}},L:function(t,e,i){var o=t.getUTCMonth();switch(e){case"L":return String(o+1);case"LL":return C(o+1,2);case"Lo":return i.ordinalNumber(o+1,{unit:"month"});case"LLL":return i.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(o,{width:"narrow",context:"standalone"});default:return i.month(o,{width:"wide",context:"standalone"})}},w:function(t,e,i,o){var s=function(t,e){r(1,arguments);var i=n(t),o=_(i,e).getTime()-function(t,e){var i,o,s,n,a,l,h,c;r(1,arguments);var d=b(),u=f(null!==(i=null!==(o=null!==(s=null!==(n=null==e?void 0:e.firstWeekContainsDate)&&void 0!==n?n:null==e||null===(a=e.locale)||void 0===a||null===(l=a.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==s?s:d.firstWeekContainsDate)&&void 0!==o?o:null===(h=d.locale)||void 0===h||null===(c=h.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==i?i:1),p=k(t,e),m=new Date(0);return m.setUTCFullYear(p,0,u),m.setUTCHours(0,0,0,0),_(m,e)}(i,e).getTime();return Math.round(o/6048e5)+1}(t,o);return"wo"===e?i.ordinalNumber(s,{unit:"week"}):C(s,e.length)},I:function(t,e,i){var o=function(t){r(1,arguments);var e=n(t),i=w(e).getTime()-function(t){r(1,arguments);var e=x(t),i=new Date(0);return i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0),w(i)}(e).getTime();return Math.round(i/6048e5)+1}(t);return"Io"===e?i.ordinalNumber(o,{unit:"week"}):C(o,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):z(t,e)},D:function(t,e,i){var o=function(t){r(1,arguments);var e=n(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var o=e.getTime();return Math.floor((i-o)/864e5)+1}(t);return"Do"===e?i.ordinalNumber(o,{unit:"dayOfYear"}):C(o,e.length)},E:function(t,e,i){var o=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},e:function(t,e,i,o){var s=t.getUTCDay(),r=(s-o.weekStartsOn+8)%7||7;switch(e){case"e":return String(r);case"ee":return C(r,2);case"eo":return i.ordinalNumber(r,{unit:"day"});case"eee":return i.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(s,{width:"short",context:"formatting"});default:return i.day(s,{width:"wide",context:"formatting"})}},c:function(t,e,i,o){var s=t.getUTCDay(),r=(s-o.weekStartsOn+8)%7||7;switch(e){case"c":return String(r);case"cc":return C(r,e.length);case"co":return i.ordinalNumber(r,{unit:"day"});case"ccc":return i.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(s,{width:"narrow",context:"standalone"});case"cccccc":return i.day(s,{width:"short",context:"standalone"});default:return i.day(s,{width:"wide",context:"standalone"})}},i:function(t,e,i){var o=t.getUTCDay(),s=0===o?7:o;switch(e){case"i":return String(s);case"ii":return C(s,e.length);case"io":return i.ordinalNumber(s,{unit:"day"});case"iii":return i.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},a:function(t,e,i){var o=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,e,i){var o,s=t.getUTCHours();switch(o=12===s?"noon":0===s?"midnight":s/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,e,i){var o,s=t.getUTCHours();switch(o=s>=17?"evening":s>=12?"afternoon":s>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var o=t.getUTCHours()%12;return 0===o&&(o=12),i.ordinalNumber(o,{unit:"hour"})}return T(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):I(t,e)},K:function(t,e,i){var o=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(o,{unit:"hour"}):C(o,e.length)},k:function(t,e,i){var o=t.getUTCHours();return 0===o&&(o=24),"ko"===e?i.ordinalNumber(o,{unit:"hour"}):C(o,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):D(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):O(t,e)},S:function(t,e){return M(t,e)},X:function(t,e,i,o){var s=(o._originalDate||t).getTimezoneOffset();if(0===s)return"Z";switch(e){case"X":return N(s);case"XXXX":case"XX":return B(s);default:return B(s,":")}},x:function(t,e,i,o){var s=(o._originalDate||t).getTimezoneOffset();switch(e){case"x":return N(s);case"xxxx":case"xx":return B(s);default:return B(s,":")}},O:function(t,e,i,o){var s=(o._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+P(s,":");default:return"GMT"+B(s,":")}},z:function(t,e,i,o){var s=(o._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+P(s,":");default:return"GMT"+B(s,":")}},t:function(t,e,i,o){return C(Math.floor((o._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,i,o){return C((o._originalDate||t).getTime(),e.length)}};function P(t,e){var i=t>0?"-":"+",o=Math.abs(t),s=Math.floor(o/60),r=o%60;if(0===r)return i+String(s);var n=e||"";return i+String(s)+n+C(r,2)}function N(t,e){return t%60==0?(t>0?"-":"+")+C(Math.abs(t)/60,2):B(t,e)}function B(t,e){var i=e||"",o=t>0?"-":"+",s=Math.abs(t);return o+C(Math.floor(s/60),2)+i+C(s%60,2)}const j=E;var $=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},F=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},R={p:F,P:function(t,e){var i,o=t.match(/(P+)(p+)?/)||[],s=o[1],r=o[2];if(!r)return $(t,e);switch(s){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",$(s,e)).replace("{{time}}",F(r,e))}};const V=R;var q=["D","DD"],W=["YY","YYYY"];function H(t,e,i){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var U={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function Y(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}var G,X={date:Y({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Y({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Y({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},J={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function K(t){return function(e,i){var o;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&t.formattingValues){var s=t.defaultFormattingWidth||t.defaultWidth,r=null!=i&&i.width?String(i.width):s;o=t.formattingValues[r]||t.formattingValues[s]}else{var n=t.defaultWidth,a=null!=i&&i.width?String(i.width):t.defaultWidth;o=t.values[a]||t.values[n]}return o[t.argumentCallback?t.argumentCallback(e):e]}}function Z(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.width,s=e.match(o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth]);if(!s)return null;var r,n=s[0],a=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?function(t){for(var e=0;e<t.length;e++)if(t[e].test(n))return e}(a):function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].test(n))return e}(a);return r=t.valueCallback?t.valueCallback(l):l,{value:r=i.valueCallback?i.valueCallback(r):r,rest:e.slice(n.length)}}}const Q={code:"en-US",formatDistance:function(t,e,i){var o,s=U[t];return o="string"==typeof s?s:1===e?s.one:s.other.replace("{{count}}",e.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+o:o+" ago":o},formatLong:X,formatRelative:function(t){return J[t]},localize:{ordinalNumber:function(t){var e=Number(t),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:K({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:K({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:K({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:K({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:K({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(G={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(G.matchPattern);if(!i)return null;var o=i[0],s=t.match(G.parsePattern);if(!s)return null;var r=G.valueCallback?G.valueCallback(s[0]):s[0];return{value:r=e.valueCallback?e.valueCallback(r):r,rest:t.slice(o.length)}}),era:Z({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Z({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Z({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Z({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Z({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};var tt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,et=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,it=/^'([^]*?)'?$/,ot=/''/g,st=/[a-zA-Z]/;function rt(t,e,i){var o,s,l,h,c,d,u,p,m,v,g,y,w,x,_,k,C,S;r(2,arguments);var A=String(e),z=b(),T=null!==(o=null!==(s=null==i?void 0:i.locale)&&void 0!==s?s:z.locale)&&void 0!==o?o:Q,I=f(null!==(l=null!==(h=null!==(c=null!==(d=null==i?void 0:i.firstWeekContainsDate)&&void 0!==d?d:null==i||null===(u=i.locale)||void 0===u||null===(p=u.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==c?c:z.firstWeekContainsDate)&&void 0!==h?h:null===(m=z.locale)||void 0===m||null===(v=m.options)||void 0===v?void 0:v.firstWeekContainsDate)&&void 0!==l?l:1);if(!(I>=1&&I<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var D=f(null!==(g=null!==(y=null!==(w=null!==(x=null==i?void 0:i.weekStartsOn)&&void 0!==x?x:null==i||null===(_=i.locale)||void 0===_||null===(k=_.options)||void 0===k?void 0:k.weekStartsOn)&&void 0!==w?w:z.weekStartsOn)&&void 0!==y?y:null===(C=z.locale)||void 0===C||null===(S=C.options)||void 0===S?void 0:S.weekStartsOn)&&void 0!==g?g:0);if(!(D>=0&&D<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!T.localize)throw new RangeError("locale must contain localize property");if(!T.formatLong)throw new RangeError("locale must contain formatLong property");var O=n(t);if(!function(t){if(r(1,arguments),!function(t){return r(1,arguments),t instanceof Date||"object"===a(t)&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t)return!1;var e=n(t);return!isNaN(Number(e))}(O))throw new RangeError("Invalid time value");var M=function(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}(O),E=function(t,e){return r(2,arguments),function(t,e){r(2,arguments);var i=n(t).getTime(),o=f(e);return new Date(i+o)}(t,-f(e))}(O,M),P={firstWeekContainsDate:I,weekStartsOn:D,locale:T,_originalDate:O};return A.match(et).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,V[e])(t,T.formatLong):t})).join("").match(tt).map((function(o){if("''"===o)return"'";var s,r,n=o[0];if("'"===n)return(r=(s=o).match(it))?r[1].replace(ot,"'"):s;var a=j[n];if(a)return null!=i&&i.useAdditionalWeekYearTokens||-1===W.indexOf(o)||H(o,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!(-1!==q.indexOf(o))||H(o,e,String(t)),a(E,o,T.localize,P);if(n.match(st))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");return o})).join("")}var nt={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},at=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,lt=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,ht=/^([+-])(\d{2})(?::?(\d{2}))?$/;function ct(t){return t?parseInt(t):1}function dt(t){return t&&parseFloat(t.replace(",","."))||0}var ut=[31,null,31,30,31,30,31,31,30,31,30,31];function pt(t){return t%400==0||t%4==0&&t%100!=0}const mt=class{constructor(e){t(this,e),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.position="top",this.delay=200,this.isVisible=!1,this._tooltipId=void 0}handleClientStylingChange(t,e){t!=e&&l(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&h(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&c(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentWillLoad(){this._tooltipId=`general-tooltip-${Math.random().toString(36).substring(2,9)}`}componentDidLoad(){this.stylingContainer&&(this.mbSource&&c(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&l(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&h(this.stylingContainer,this.clientStylingUrl))}handleMouseEnterOrFocus(){clearTimeout(this.hideTimeout),this.showTimeout&&clearTimeout(this.showTimeout),this.showTimeout=setTimeout((()=>{this.isVisible=!0}),this.delay)}handleMouseLeaveOrBlur(){this.showTimeout&&clearTimeout(this.showTimeout),this.hideTimeout=setTimeout((()=>{this.isVisible=!1}),100)}handleKeyDown(t){"Escape"===t.key&&this.isVisible&&(this.isVisible=!1)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe(),clearTimeout(this.showTimeout),clearTimeout(this.hideTimeout)}render(){const t={"general-tooltip-popup":!0,visible:this.isVisible,[`general-tooltip-${this.position}`]:!0};return e("div",{key:"c0d52518e1e196e0d022789f7c6b7e64173b2c7d",class:"general-tooltip-wrapper"},e("slot",{key:"a935e103e16b0b619a024706e8224f4a937de6b9",name:"trigger"}),e("div",{key:"35c60e35ce3f8d5c2c42cd333fe64a3b289d34d4",class:"general-tooltip-container",role:"tooltip",ref:t=>this.stylingContainer=t},e("div",{key:"9d3fd9f142c1e3bd263dee289a2c1a9e4eebfddc",id:this._tooltipId,class:t,role:"tooltip"},e("slot",{key:"31344f0d4d4139f913d1819cc4f42a39f5113d8a",name:"content"}),e("div",{key:"f5cdd93060baec37b2a2879056efe2d66c5a553a",class:"general-tooltip-arrow"}))))}get hostElement(){return i(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};mt.style=".general-tooltip-wrapper{display:inline-block;position:relative;line-height:0}.general-tooltip-container{display:contents;}.general-tooltip-popup{position:absolute;color:var(--emw--color-typography-inverse, #fff);background:var(--emw--color-background-inverse, #000);padding:8px 12px;border-radius:4px;font-size:0.875em;line-height:1.4;z-index:1000;opacity:0;visibility:hidden;transition:opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;white-space:nowrap;pointer-events:none;}.general-tooltip-popup.visible{opacity:1;visibility:visible}.general-tooltip-arrow{position:absolute;width:0;height:0;border-style:solid}.general-tooltip-top{bottom:100%;left:50%;transform:translateX(-50%);margin-bottom:8px;}.general-tooltip-top .general-tooltip-arrow{top:100%;left:50%;transform:translateX(-50%);border-width:6px 6px 0 6px;border-color:var(--emw--color-gray-300, #333) transparent transparent transparent}.general-tooltip-bottom{top:100%;left:50%;transform:translateX(-50%);margin-top:8px;}.general-tooltip-bottom .general-tooltip-arrow{bottom:100%;left:50%;transform:translateX(-50%);border-width:0 6px 6px 6px;border-color:transparent transparent var(--emw--color-gray-300, #333) transparent}.general-tooltip-left{right:100%;top:50%;transform:translateY(-50%);margin-right:8px;}.general-tooltip-left .general-tooltip-arrow{left:100%;top:50%;transform:translateY(-50%);border-width:6px 0 6px 6px;border-color:transparent transparent transparent var(--emw--color-gray-300, #333)}.general-tooltip-right{left:100%;top:50%;transform:translateY(-50%);margin-left:8px;}.general-tooltip-right .general-tooltip-arrow{right:100%;top:50%;transform:translateY(-50%);border-width:6px 6px 6px 0;border-color:transparent var(--emw--color-gray-300, #333) transparent transparent}";const vt=class{constructor(e){t(this,e),this.lotteryTippingBulletToggleEvent=o(this,"lotteryTippingBulletToggle",7),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.positionIdx=void 0,this.theme="default",this.value="",this.disabled=!1,this.isSelected=!1}handleClientStylingChange(t,e){t!=e&&l(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&h(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&c(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&c(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&l(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&h(this.stylingContainer,this.clientStylingUrl))}handleClick(){this.disabled||this.lotteryTippingBulletToggleEvent.emit({positionIdx:this.positionIdx})}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return e("div",{key:"ef0fee38ed62adb7809b5a60668af6a499ebe5a6",ref:t=>this.stylingContainer=t},"text"===this.theme?e("div",{class:{LotteryTippingBullet__segment:!0,"LotteryTippingBullet__segment--text":!0}},this.value):e("button",{class:{LotteryTippingBullet__segment:!0,"LotteryTippingBullet__segment--disabled":this.disabled,"LotteryTippingBullet__segment--active":this.isSelected},onClick:this.handleClick.bind(this)},this.isSelected?"X":this.value))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};vt.style=".LotteryTippingBullet__segment{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;font-size:16px;line-height:1;font-weight:500;color:var(--emw--color-typography, #000);background:var(--emw--color-background, #fff);border:1px solid var(--emw--color-gray-100, #e6e6e6);border-radius:6px;cursor:pointer;transition:all 0.2s ease;user-select:none}.LotteryTippingBullet__segment:not(.LotteryTippingBullet__segment--disabled):hover{cursor:pointer;animation:jelly 0.3s ease-in-out;transform:scale(1.02)}.LotteryTippingBullet__segment--text{border:none;color:var(--emw--color-typography, #000);background:transparent;font-weight:400}.LotteryTippingBullet__segment--text:hover{cursor:not-allowed !important}.LotteryTippingBullet__segment--active{font-weight:600;background-color:var(--emw--color-background-inverse, #000);color:var(--emw--color-primary, #fed275)}.LotteryTippingBullet__segment--disabled:not(.LotteryTippingBullet__segment--active){background-color:var(--emw--color-background-tertiary, #ccc);color:var(--emw--color-gray-150, #6f6f6f);border-color:var(--emw--color-gray-100, #e6e6e6)}.LotteryTippingBullet__segment--disabled:hover{cursor:not-allowed}@keyframes jelly{0%{transform:translate(0, 0)}20%{transform:translate(-0.5px, -0.5px)}40%{transform:translate(0.5px, 0.5px)}60%{transform:translate(-0.25px, -0.25px)}80%{transform:translate(0.25px, 0.25px)}100%{transform:translate(0, 0)}}";const ft=class{constructor(e){t(this,e),this.lotteryTippingBulletGroupToggleEvent=o(this,"lotteryTippingBulletGroupToggle",7),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.positionIdx=void 0,this.theme="default",this.mode="single",this.bulletConfigContent=""}get bulletConfigArr(){const t=[{value:"1"},{value:"X"},{value:"2"}];if("string"!=typeof this.bulletConfigContent||!this.bulletConfigContent)return t;try{return JSON.parse(this.bulletConfigContent)}catch(e){return console.error("Error parsing bulletConfigContent:",e),t}}handleClientStylingChange(t,e){t!=e&&l(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&h(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&c(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&c(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&l(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&h(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}lotteryTippingBulletSelectionHandler(t){const{positionIdx:e}=t.detail;this.handleToggle(e)}handleToggle(t){let e=[...this.bulletConfigArr];"single"===this.mode?(e=e.map((t=>Object.assign(Object.assign({},t),{isSelected:!1}))),e[t].isSelected=!0):(e=e.map((t=>Object.assign({},t))),e[t].isSelected=!e[t].isSelected),this.lotteryTippingBulletGroupToggleEvent.emit({bulletConfigArr:e,positionIdx:this.positionIdx+"-"+t})}render(){var t;return e("div",{ref:t=>this.stylingContainer=t,key:this.positionIdx},e("div",{key:"68223022eed831932c571378164be913206d98e9",style:{display:"flex",flexDirection:"row",gap:"10px"}},null===(t=this.bulletConfigArr)||void 0===t?void 0:t.map(((t,i)=>e("div",{key:i},e("lottery-tipping-bullet",{value:t.value,isSelected:t.isSelected,"position-idx":i,disabled:t.disabled,theme:this.theme,clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,mbSource:this.mbSource}))))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};ft.style="";var gt=Object.defineProperty,bt=Object.defineProperties,yt=Object.getOwnPropertyDescriptors,wt=Object.getOwnPropertySymbols,xt=Object.prototype.hasOwnProperty,_t=Object.prototype.propertyIsEnumerable,kt=(t,e,i)=>e in t?gt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Ct=(t,e)=>{for(var i in e||(e={}))xt.call(e,i)&&kt(t,i,e[i]);if(wt)for(var i of wt(e))_t.call(e,i)&&kt(t,i,e[i]);return t},St=(t,e)=>bt(t,yt(e)),At=(t,e,i)=>(kt(t,"symbol"!=typeof e?e+"":e,i),i),zt=(t,e,i)=>new Promise(((o,s)=>{var r=t=>{try{a(i.next(t))}catch(t){s(t)}},n=t=>{try{a(i.throw(t))}catch(t){s(t)}},a=t=>t.done?o(t.value):Promise.resolve(t.value).then(r,n);a((i=i.apply(t,e)).next())}))
1
+ import{r as t,h as e,g as i,c as o,H as s}from"./index-52961f92.js";import{r,t as n,_ as a,s as l,a as h,b as c,c as d,g as u,d as p,e as m,R as v}from"./lottery-tipping-latest-result-8e6e386d.js";export{L as lottery_tipping_latest_result}from"./lottery-tipping-latest-result-8e6e386d.js";function f(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}var g={};function b(){return g}var y=36e5;function w(t){r(1,arguments);var e=n(t),i=e.getUTCDay(),o=(i<1?7:0)+i-1;return e.setUTCDate(e.getUTCDate()-o),e.setUTCHours(0,0,0,0),e}function x(t){r(1,arguments);var e=n(t),i=e.getUTCFullYear(),o=new Date(0);o.setUTCFullYear(i+1,0,4),o.setUTCHours(0,0,0,0);var s=w(o),a=new Date(0);a.setUTCFullYear(i,0,4),a.setUTCHours(0,0,0,0);var l=w(a);return e.getTime()>=s.getTime()?i+1:e.getTime()>=l.getTime()?i:i-1}function _(t,e){var i,o,s,a,l,h,c,d;r(1,arguments);var u=b(),p=f(null!==(i=null!==(o=null!==(s=null!==(a=null==e?void 0:e.weekStartsOn)&&void 0!==a?a:null==e||null===(l=e.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==s?s:u.weekStartsOn)&&void 0!==o?o:null===(c=u.locale)||void 0===c||null===(d=c.options)||void 0===d?void 0:d.weekStartsOn)&&void 0!==i?i:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=n(t),v=m.getUTCDay(),g=(v<p?7:0)+v-p;return m.setUTCDate(m.getUTCDate()-g),m.setUTCHours(0,0,0,0),m}function k(t,e){var i,o,s,a,l,h,c,d;r(1,arguments);var u=n(t),p=u.getUTCFullYear(),m=b(),v=f(null!==(i=null!==(o=null!==(s=null!==(a=null==e?void 0:e.firstWeekContainsDate)&&void 0!==a?a:null==e||null===(l=e.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==s?s:m.firstWeekContainsDate)&&void 0!==o?o:null===(c=m.locale)||void 0===c||null===(d=c.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==i?i:1);if(!(v>=1&&v<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var g=new Date(0);g.setUTCFullYear(p+1,0,v),g.setUTCHours(0,0,0,0);var y=_(g,e),w=new Date(0);w.setUTCFullYear(p,0,v),w.setUTCHours(0,0,0,0);var x=_(w,e);return u.getTime()>=y.getTime()?p+1:u.getTime()>=x.getTime()?p:p-1}function C(t,e){for(var i=t<0?"-":"",o=Math.abs(t).toString();o.length<e;)o="0"+o;return i+o}const S=function(t,e){var i=t.getUTCFullYear(),o=i>0?i:1-i;return C("yy"===e?o%100:o,e.length)},A=function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):C(i+1,2)},z=function(t,e){return C(t.getUTCDate(),e.length)},T=function(t,e){return C(t.getUTCHours()%12||12,e.length)},I=function(t,e){return C(t.getUTCHours(),e.length)},D=function(t,e){return C(t.getUTCMinutes(),e.length)},O=function(t,e){return C(t.getUTCSeconds(),e.length)},M=function(t,e){var i=e.length,o=t.getUTCMilliseconds();return C(Math.floor(o*Math.pow(10,i-3)),e.length)};var E={G:function(t,e,i){var o=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(o,{width:"abbreviated"});case"GGGGG":return i.era(o,{width:"narrow"});default:return i.era(o,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var o=t.getUTCFullYear();return i.ordinalNumber(o>0?o:1-o,{unit:"year"})}return S(t,e)},Y:function(t,e,i,o){var s=k(t,o),r=s>0?s:1-s;return"YY"===e?C(r%100,2):"Yo"===e?i.ordinalNumber(r,{unit:"year"}):C(r,e.length)},R:function(t,e){return C(x(t),e.length)},u:function(t,e){return C(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var o=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(o);case"QQ":return C(o,2);case"Qo":return i.ordinalNumber(o,{unit:"quarter"});case"QQQ":return i.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(o,{width:"narrow",context:"formatting"});default:return i.quarter(o,{width:"wide",context:"formatting"})}},q:function(t,e,i){var o=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(o);case"qq":return C(o,2);case"qo":return i.ordinalNumber(o,{unit:"quarter"});case"qqq":return i.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(o,{width:"narrow",context:"standalone"});default:return i.quarter(o,{width:"wide",context:"standalone"})}},M:function(t,e,i){var o=t.getUTCMonth();switch(e){case"M":case"MM":return A(t,e);case"Mo":return i.ordinalNumber(o+1,{unit:"month"});case"MMM":return i.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(o,{width:"narrow",context:"formatting"});default:return i.month(o,{width:"wide",context:"formatting"})}},L:function(t,e,i){var o=t.getUTCMonth();switch(e){case"L":return String(o+1);case"LL":return C(o+1,2);case"Lo":return i.ordinalNumber(o+1,{unit:"month"});case"LLL":return i.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(o,{width:"narrow",context:"standalone"});default:return i.month(o,{width:"wide",context:"standalone"})}},w:function(t,e,i,o){var s=function(t,e){r(1,arguments);var i=n(t),o=_(i,e).getTime()-function(t,e){var i,o,s,n,a,l,h,c;r(1,arguments);var d=b(),u=f(null!==(i=null!==(o=null!==(s=null!==(n=null==e?void 0:e.firstWeekContainsDate)&&void 0!==n?n:null==e||null===(a=e.locale)||void 0===a||null===(l=a.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==s?s:d.firstWeekContainsDate)&&void 0!==o?o:null===(h=d.locale)||void 0===h||null===(c=h.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==i?i:1),p=k(t,e),m=new Date(0);return m.setUTCFullYear(p,0,u),m.setUTCHours(0,0,0,0),_(m,e)}(i,e).getTime();return Math.round(o/6048e5)+1}(t,o);return"wo"===e?i.ordinalNumber(s,{unit:"week"}):C(s,e.length)},I:function(t,e,i){var o=function(t){r(1,arguments);var e=n(t),i=w(e).getTime()-function(t){r(1,arguments);var e=x(t),i=new Date(0);return i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0),w(i)}(e).getTime();return Math.round(i/6048e5)+1}(t);return"Io"===e?i.ordinalNumber(o,{unit:"week"}):C(o,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):z(t,e)},D:function(t,e,i){var o=function(t){r(1,arguments);var e=n(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var o=e.getTime();return Math.floor((i-o)/864e5)+1}(t);return"Do"===e?i.ordinalNumber(o,{unit:"dayOfYear"}):C(o,e.length)},E:function(t,e,i){var o=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},e:function(t,e,i,o){var s=t.getUTCDay(),r=(s-o.weekStartsOn+8)%7||7;switch(e){case"e":return String(r);case"ee":return C(r,2);case"eo":return i.ordinalNumber(r,{unit:"day"});case"eee":return i.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(s,{width:"short",context:"formatting"});default:return i.day(s,{width:"wide",context:"formatting"})}},c:function(t,e,i,o){var s=t.getUTCDay(),r=(s-o.weekStartsOn+8)%7||7;switch(e){case"c":return String(r);case"cc":return C(r,e.length);case"co":return i.ordinalNumber(r,{unit:"day"});case"ccc":return i.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(s,{width:"narrow",context:"standalone"});case"cccccc":return i.day(s,{width:"short",context:"standalone"});default:return i.day(s,{width:"wide",context:"standalone"})}},i:function(t,e,i){var o=t.getUTCDay(),s=0===o?7:o;switch(e){case"i":return String(s);case"ii":return C(s,e.length);case"io":return i.ordinalNumber(s,{unit:"day"});case"iii":return i.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},a:function(t,e,i){var o=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,e,i){var o,s=t.getUTCHours();switch(o=12===s?"noon":0===s?"midnight":s/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,e,i){var o,s=t.getUTCHours();switch(o=s>=17?"evening":s>=12?"afternoon":s>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var o=t.getUTCHours()%12;return 0===o&&(o=12),i.ordinalNumber(o,{unit:"hour"})}return T(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):I(t,e)},K:function(t,e,i){var o=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(o,{unit:"hour"}):C(o,e.length)},k:function(t,e,i){var o=t.getUTCHours();return 0===o&&(o=24),"ko"===e?i.ordinalNumber(o,{unit:"hour"}):C(o,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):D(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):O(t,e)},S:function(t,e){return M(t,e)},X:function(t,e,i,o){var s=(o._originalDate||t).getTimezoneOffset();if(0===s)return"Z";switch(e){case"X":return N(s);case"XXXX":case"XX":return B(s);default:return B(s,":")}},x:function(t,e,i,o){var s=(o._originalDate||t).getTimezoneOffset();switch(e){case"x":return N(s);case"xxxx":case"xx":return B(s);default:return B(s,":")}},O:function(t,e,i,o){var s=(o._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+P(s,":");default:return"GMT"+B(s,":")}},z:function(t,e,i,o){var s=(o._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+P(s,":");default:return"GMT"+B(s,":")}},t:function(t,e,i,o){return C(Math.floor((o._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,i,o){return C((o._originalDate||t).getTime(),e.length)}};function P(t,e){var i=t>0?"-":"+",o=Math.abs(t),s=Math.floor(o/60),r=o%60;if(0===r)return i+String(s);var n=e||"";return i+String(s)+n+C(r,2)}function N(t,e){return t%60==0?(t>0?"-":"+")+C(Math.abs(t)/60,2):B(t,e)}function B(t,e){var i=e||"",o=t>0?"-":"+",s=Math.abs(t);return o+C(Math.floor(s/60),2)+i+C(s%60,2)}const j=E;var $=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},F=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},R={p:F,P:function(t,e){var i,o=t.match(/(P+)(p+)?/)||[],s=o[1],r=o[2];if(!r)return $(t,e);switch(s){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",$(s,e)).replace("{{time}}",F(r,e))}};const V=R;var q=["D","DD"],W=["YY","YYYY"];function H(t,e,i){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var U={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function Y(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}var G,X={date:Y({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Y({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Y({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},J={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function K(t){return function(e,i){var o;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&t.formattingValues){var s=t.defaultFormattingWidth||t.defaultWidth,r=null!=i&&i.width?String(i.width):s;o=t.formattingValues[r]||t.formattingValues[s]}else{var n=t.defaultWidth,a=null!=i&&i.width?String(i.width):t.defaultWidth;o=t.values[a]||t.values[n]}return o[t.argumentCallback?t.argumentCallback(e):e]}}function Z(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.width,s=e.match(o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth]);if(!s)return null;var r,n=s[0],a=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?function(t){for(var e=0;e<t.length;e++)if(t[e].test(n))return e}(a):function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].test(n))return e}(a);return r=t.valueCallback?t.valueCallback(l):l,{value:r=i.valueCallback?i.valueCallback(r):r,rest:e.slice(n.length)}}}const Q={code:"en-US",formatDistance:function(t,e,i){var o,s=U[t];return o="string"==typeof s?s:1===e?s.one:s.other.replace("{{count}}",e.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+o:o+" ago":o},formatLong:X,formatRelative:function(t){return J[t]},localize:{ordinalNumber:function(t){var e=Number(t),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:K({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:K({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:K({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:K({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:K({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(G={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(G.matchPattern);if(!i)return null;var o=i[0],s=t.match(G.parsePattern);if(!s)return null;var r=G.valueCallback?G.valueCallback(s[0]):s[0];return{value:r=e.valueCallback?e.valueCallback(r):r,rest:t.slice(o.length)}}),era:Z({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Z({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Z({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Z({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Z({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};var tt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,et=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,it=/^'([^]*?)'?$/,ot=/''/g,st=/[a-zA-Z]/;function rt(t,e,i){var o,s,l,h,c,d,u,p,m,v,g,y,w,x,_,k,C,S;r(2,arguments);var A=String(e),z=b(),T=null!==(o=null!==(s=null==i?void 0:i.locale)&&void 0!==s?s:z.locale)&&void 0!==o?o:Q,I=f(null!==(l=null!==(h=null!==(c=null!==(d=null==i?void 0:i.firstWeekContainsDate)&&void 0!==d?d:null==i||null===(u=i.locale)||void 0===u||null===(p=u.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==c?c:z.firstWeekContainsDate)&&void 0!==h?h:null===(m=z.locale)||void 0===m||null===(v=m.options)||void 0===v?void 0:v.firstWeekContainsDate)&&void 0!==l?l:1);if(!(I>=1&&I<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var D=f(null!==(g=null!==(y=null!==(w=null!==(x=null==i?void 0:i.weekStartsOn)&&void 0!==x?x:null==i||null===(_=i.locale)||void 0===_||null===(k=_.options)||void 0===k?void 0:k.weekStartsOn)&&void 0!==w?w:z.weekStartsOn)&&void 0!==y?y:null===(C=z.locale)||void 0===C||null===(S=C.options)||void 0===S?void 0:S.weekStartsOn)&&void 0!==g?g:0);if(!(D>=0&&D<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!T.localize)throw new RangeError("locale must contain localize property");if(!T.formatLong)throw new RangeError("locale must contain formatLong property");var O=n(t);if(!function(t){if(r(1,arguments),!function(t){return r(1,arguments),t instanceof Date||"object"===a(t)&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t)return!1;var e=n(t);return!isNaN(Number(e))}(O))throw new RangeError("Invalid time value");var M=function(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}(O),E=function(t,e){return r(2,arguments),function(t,e){r(2,arguments);var i=n(t).getTime(),o=f(e);return new Date(i+o)}(t,-f(e))}(O,M),P={firstWeekContainsDate:I,weekStartsOn:D,locale:T,_originalDate:O};return A.match(et).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,V[e])(t,T.formatLong):t})).join("").match(tt).map((function(o){if("''"===o)return"'";var s,r,n=o[0];if("'"===n)return(r=(s=o).match(it))?r[1].replace(ot,"'"):s;var a=j[n];if(a)return null!=i&&i.useAdditionalWeekYearTokens||-1===W.indexOf(o)||H(o,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!(-1!==q.indexOf(o))||H(o,e,String(t)),a(E,o,T.localize,P);if(n.match(st))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");return o})).join("")}var nt={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},at=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,lt=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,ht=/^([+-])(\d{2})(?::?(\d{2}))?$/;function ct(t){return t?parseInt(t):1}function dt(t){return t&&parseFloat(t.replace(",","."))||0}var ut=[31,null,31,30,31,30,31,31,30,31,30,31];function pt(t){return t%400==0||t%4==0&&t%100!=0}const mt=class{constructor(e){t(this,e),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.position="top",this.delay=200,this.isVisible=!1,this._tooltipId=void 0}handleClientStylingChange(t,e){t!=e&&l(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&h(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&c(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentWillLoad(){this._tooltipId=`general-tooltip-${Math.random().toString(36).substring(2,9)}`}componentDidLoad(){this.stylingContainer&&(this.mbSource&&c(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&l(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&h(this.stylingContainer,this.clientStylingUrl))}handleMouseEnterOrFocus(){clearTimeout(this.hideTimeout),this.showTimeout&&clearTimeout(this.showTimeout),this.showTimeout=setTimeout((()=>{this.isVisible=!0}),this.delay)}handleMouseLeaveOrBlur(){this.showTimeout&&clearTimeout(this.showTimeout),this.hideTimeout=setTimeout((()=>{this.isVisible=!1}),100)}handleKeyDown(t){"Escape"===t.key&&this.isVisible&&(this.isVisible=!1)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe(),clearTimeout(this.showTimeout),clearTimeout(this.hideTimeout)}render(){const t={"general-tooltip-popup":!0,visible:this.isVisible,[`general-tooltip-${this.position}`]:!0};return e("div",{key:"c0d52518e1e196e0d022789f7c6b7e64173b2c7d",class:"general-tooltip-wrapper"},e("slot",{key:"a935e103e16b0b619a024706e8224f4a937de6b9",name:"trigger"}),e("div",{key:"35c60e35ce3f8d5c2c42cd333fe64a3b289d34d4",class:"general-tooltip-container",role:"tooltip",ref:t=>this.stylingContainer=t},e("div",{key:"9d3fd9f142c1e3bd263dee289a2c1a9e4eebfddc",id:this._tooltipId,class:t,role:"tooltip"},e("slot",{key:"31344f0d4d4139f913d1819cc4f42a39f5113d8a",name:"content"}),e("div",{key:"f5cdd93060baec37b2a2879056efe2d66c5a553a",class:"general-tooltip-arrow"}))))}get hostElement(){return i(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};mt.style=".general-tooltip-wrapper{display:inline-block;position:relative;line-height:0}.general-tooltip-container{display:contents;}.general-tooltip-popup{position:absolute;color:var(--emw--color-typography-inverse, #fff);background:var(--emw--color-background-inverse, #000);padding:8px 12px;border-radius:4px;font-size:0.875em;line-height:1.4;z-index:1000;opacity:0;visibility:hidden;transition:opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;white-space:nowrap;pointer-events:none;}.general-tooltip-popup.visible{opacity:1;visibility:visible}.general-tooltip-arrow{position:absolute;width:0;height:0;border-style:solid}.general-tooltip-top{bottom:100%;left:50%;transform:translateX(-50%);margin-bottom:8px;}.general-tooltip-top .general-tooltip-arrow{top:100%;left:50%;transform:translateX(-50%);border-width:6px 6px 0 6px;border-color:var(--emw--color-gray-300, #333) transparent transparent transparent}.general-tooltip-bottom{top:100%;left:50%;transform:translateX(-50%);margin-top:8px;}.general-tooltip-bottom .general-tooltip-arrow{bottom:100%;left:50%;transform:translateX(-50%);border-width:0 6px 6px 6px;border-color:transparent transparent var(--emw--color-gray-300, #333) transparent}.general-tooltip-left{right:100%;top:50%;transform:translateY(-50%);margin-right:8px;}.general-tooltip-left .general-tooltip-arrow{left:100%;top:50%;transform:translateY(-50%);border-width:6px 0 6px 6px;border-color:transparent transparent transparent var(--emw--color-gray-300, #333)}.general-tooltip-right{left:100%;top:50%;transform:translateY(-50%);margin-left:8px;}.general-tooltip-right .general-tooltip-arrow{right:100%;top:50%;transform:translateY(-50%);border-width:6px 6px 6px 0;border-color:transparent var(--emw--color-gray-300, #333) transparent transparent}";const vt=class{constructor(e){t(this,e),this.lotteryTippingBulletToggleEvent=o(this,"lotteryTippingBulletToggle",7),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.positionIdx=void 0,this.theme="default",this.value="",this.disabled=!1,this.isSelected=!1}handleClientStylingChange(t,e){t!=e&&l(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&h(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&c(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&c(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&l(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&h(this.stylingContainer,this.clientStylingUrl))}handleClick(){this.disabled||this.lotteryTippingBulletToggleEvent.emit({positionIdx:this.positionIdx})}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return e("div",{key:"ef0fee38ed62adb7809b5a60668af6a499ebe5a6",ref:t=>this.stylingContainer=t},"text"===this.theme?e("div",{class:{LotteryTippingBullet__segment:!0,"LotteryTippingBullet__segment--text":!0}},this.value):e("button",{class:{LotteryTippingBullet__segment:!0,"LotteryTippingBullet__segment--disabled":this.disabled,"LotteryTippingBullet__segment--active":this.isSelected},onClick:this.handleClick.bind(this)},this.isSelected?"X":this.value))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};vt.style=".LotteryTippingBullet__segment{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;font-size:16px;line-height:1;font-weight:500;color:var(--emw--color-typography, #000);background:var(--emw--color-background, #fff);border:1px solid var(--emw--color-gray-100, #e6e6e6);border-radius:6px;cursor:pointer;transition:all 0.2s ease;user-select:none}.LotteryTippingBullet__segment:not(.LotteryTippingBullet__segment--disabled):hover{cursor:pointer;animation:jelly 0.3s ease-in-out;transform:scale(1.02)}.LotteryTippingBullet__segment--text{border:none;color:var(--emw--color-typography, #000);background:transparent;font-weight:400}.LotteryTippingBullet__segment--text:hover{cursor:not-allowed !important}.LotteryTippingBullet__segment--active{font-weight:600;background-color:var(--emw--color-background-inverse, #000);color:var(--emw--color-primary, #fed275)}.LotteryTippingBullet__segment--disabled:not(.LotteryTippingBullet__segment--active){background-color:var(--emw--color-background-tertiary, #ccc);color:var(--emw--color-gray-150, #6f6f6f);border-color:var(--emw--color-gray-100, #e6e6e6)}.LotteryTippingBullet__segment--disabled:hover{cursor:not-allowed}@keyframes jelly{0%{transform:translate(0, 0)}20%{transform:translate(-0.5px, -0.5px)}40%{transform:translate(0.5px, 0.5px)}60%{transform:translate(-0.25px, -0.25px)}80%{transform:translate(0.25px, 0.25px)}100%{transform:translate(0, 0)}}";const ft=class{constructor(e){t(this,e),this.lotteryTippingBulletGroupToggleEvent=o(this,"lotteryTippingBulletGroupToggle",7),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.positionIdx=void 0,this.theme="default",this.mode="single",this.bulletConfigContent=""}get bulletConfigArr(){const t=[{value:"1"},{value:"X"},{value:"2"}];if("string"!=typeof this.bulletConfigContent||!this.bulletConfigContent)return t;try{return JSON.parse(this.bulletConfigContent)}catch(e){return console.error("Error parsing bulletConfigContent:",e),t}}handleClientStylingChange(t,e){t!=e&&l(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&h(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&c(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&c(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&l(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&h(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}lotteryTippingBulletSelectionHandler(t){const{positionIdx:e}=t.detail;this.handleToggle(e)}handleToggle(t){let e=[...this.bulletConfigArr];"single"===this.mode?(e=e.map((t=>Object.assign(Object.assign({},t),{isSelected:!1}))),e[t].isSelected=!0):(e=e.map((t=>Object.assign({},t))),e[t].isSelected=!e[t].isSelected),this.lotteryTippingBulletGroupToggleEvent.emit({bulletConfigArr:e,positionIdx:this.positionIdx+"-"+t})}render(){var t;return e("div",{ref:t=>this.stylingContainer=t,key:this.positionIdx},e("div",{key:"68223022eed831932c571378164be913206d98e9",style:{display:"flex",flexDirection:"row",gap:"10px"}},null===(t=this.bulletConfigArr)||void 0===t?void 0:t.map(((t,i)=>e("div",{key:i},e("lottery-tipping-bullet",{value:t.value,isSelected:t.isSelected,"position-idx":i,disabled:t.disabled,theme:this.theme,clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,mbSource:this.mbSource}))))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};ft.style="";var gt=Object.defineProperty,bt=Object.defineProperties,yt=Object.getOwnPropertyDescriptors,wt=Object.getOwnPropertySymbols,xt=Object.prototype.hasOwnProperty,_t=Object.prototype.propertyIsEnumerable,kt=(t,e,i)=>e in t?gt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Ct=(t,e)=>{for(var i in e||(e={}))xt.call(e,i)&&kt(t,i,e[i]);if(wt)for(var i of wt(e))_t.call(e,i)&&kt(t,i,e[i]);return t},St=(t,e)=>bt(t,yt(e)),At=(t,e,i)=>(kt(t,"symbol"!=typeof e?e+"":e,i),i),zt=(t,e,i)=>new Promise(((o,s)=>{var r=t=>{try{a(i.next(t))}catch(t){s(t)}},n=t=>{try{a(i.throw(t))}catch(t){s(t)}},a=t=>t.done?o(t.value):Promise.resolve(t.value).then(r,n);a((i=i.apply(t,e)).next())}))
2
2
  /**
3
3
  * @license
4
4
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
@@ -6654,4 +6654,4 @@ Xe("vaadin-tabs",Nt`
6654
6654
  </div>
6655
6655
 
6656
6656
  <div on-click="_scrollForward" part="forward-button" aria-hidden="true"></div>
6657
- `}static get is(){return"vaadin-tabs"}}Tt(zh);const Th=d({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"},{extraSVGAttrs:{width:"18px",height:"18px"}}),Ih=class{constructor(e){t(this,e),this.changeDate=o(this,"changeDate",7),this.handleOutsideClick=t=>{if(!this.showCalendar)return;const e=t.composedPath?t.composedPath():[],i=e.includes(this.calendarRef),o=e.some((t=>{var e,i;return t instanceof HTMLElement&&((null===(e=t.getAttribute("part"))||void 0===e?void 0:e.includes("item"))||(null===(i=t.getAttribute("part"))||void 0===i?void 0:i.includes("overlay")))}));i||o||(this.showCalendar=!1)},this.onYearMinus=()=>{const t=this.yearOptions.map((t=>Number(t.value)));this.alterDate.year-1<Math.min(...t)||(this.alterDate.year--,this.loadRecords())},this.onYearPlus=()=>{const t=this.yearOptions.map((t=>Number(t.value)));this.alterDate.year+1>Math.max(...t)||(this.alterDate.year++,this.loadRecords())},this.onMonthMinus=()=>{0===this.alterDate.month?(this.onYearMinus(),this.alterDate.month=11):(this.alterDate.month--,this.loadRecords())},this.onMonthPlus=()=>{11===this.alterDate.month?(this.onYearPlus(),this.alterDate.month=0):(this.alterDate.month++,this.loadRecords())},this.onYearChange=t=>{this.alterDate.year=parseInt(t.detail.value),this.loadRecords()},this.onMonthChange=t=>{this.alterDate.month=parseInt(t.detail.value)-1,this.loadRecords()},this.date="2025-05-19T02:00:00Z",this.highLightDates=void 0,this.language="en",this.translationUrl=void 0,this.weeks=void 0,this.days=[],this.alterDate={year:0,month:0,day:0},this.curDate={year:0,month:0,day:0},this.recordInfo=[],this.showCalendar=!1}componentWillLoad(){this.translationUrl&&u(JSON.parse(this.translationUrl)),this.weeks=p("weeks",this.language);const t=this.date?new Date(this.date):new Date;this.alterDate={year:t.getFullYear(),month:t.getMonth(),day:t.getDate()},this.curDate=Object.assign({},this.alterDate),this.loadRecords()}handleDateChange(){const t=this.date?new Date(this.date):new Date;this.alterDate={year:t.getFullYear(),month:t.getMonth(),day:t.getDate()},this.curDate=Object.assign({},this.alterDate),this.loadRecords()}componentDidLoad(){document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){document.removeEventListener("click",this.handleOutsideClick)}get yearOptions(){return Array.from({length:101},((t,e)=>this.alterDate.year-50+e)).map((t=>({label:String(t),value:String(t)})))}get monthOptions(){return Array.from({length:12},((t,e)=>e+1)).map((t=>({label:String(t),value:String(t)})))}loadRecords(){const{year:t,month:e}=this.alterDate;this.setDays(t,e)}setDays(t,e){this.days=[];const i=new Date(t,e,1).getDay(),o=new Date(t,e,1-i);for(let t=0;t<42;t++){const e=new Date(o);e.setDate(o.getDate()+t);const i={date:e.getDate(),month:e.getMonth(),year:e.getFullYear()};this.days.push(i)}}getFullDayOfMonth(t,e){return new Date(t,e,0).getDate()}showFormatedDate(t){return`${t.day}/${t.month+1}/${t.year}`}handleSelectDate(t,e,i){this.alterDate.day=t,this.curDate=Object.assign({},this.alterDate),this.showCalendar=!1;const o=this.highLightDates.map((t=>{const e=new Date(t);return{year:e.getFullYear(),month:e.getMonth(),day:e.getDate()}})).findIndex((o=>{const{year:s,month:r,day:n}=o;return e===r&&i===s&&t===n}));console.log("idx",o),o>-1&&this.changeDate.emit(o)}tellIsCurDay(t,e,i){return this.curDate.day===t&&this.curDate.month===e&&this.curDate.year===i}tellIsHighLight(t,e,i){return!(!this.highLightDates||!this.highLightDates.length)&&this.highLightDates.map((t=>{const e=new Date(t);return{year:e.getFullYear(),month:e.getMonth(),day:e.getDate()}})).some((o=>{const{year:s,month:r,day:n}=o;return e===r&&i===s&&t===n}))}render(){const t=["calendar",this.showCalendar?"calendar-visible":"calendar-leave"];return e("div",{key:"eda2c6b211647dfd9c26f5dd53dd8f18a2205be2",class:"lottery-tipping-calendar",ref:t=>this.calendarRef=t},e("div",{key:"b8a516ae17b8de7aaa4a72284848295546239937",class:"calling-input",onClick:()=>{this.showCalendar=!0}},e("div",{key:"4e384c0e1989f76b995bbc3df572eeab8ae120f6",class:"calling-input-text"},this.showFormatedDate(this.curDate)),e("div",{key:"a489600f9b90e4ea865606dddd4997ad9cf1558a",class:"calling-input-icon",innerHTML:Th})),e("div",{key:"7c17232151a8ae775e4a35000e7992695ce1f9dd",class:t.join(" ")},e("div",{key:"6951e3aa3fedb236514b57d6cdf830b074deb928",class:"calendar-header"},e("div",{key:"7d9735ab6d40d9010ac32a2b776ceacd9ee8ebb8",class:"date-controller year-minus",onClick:this.onYearMinus},"<"),e("div",{key:"e0f3e6958187120e4441c4c4961fda4a74294cca",class:"date-controller month-minus",onClick:this.onMonthMinus},"<"),e("div",{key:"e1840f3d0f9e4860a03467bbc782a6306c591ad4",class:"date-picker"},e("div",{key:"44d3b63aebcadaa42682e77f9d84c9ae155ec546",class:"date-picker-year"},e("vaadin-select",{key:"d462e0c076b1da5cdfa4a2ce47c5c3cb0d6e86bd",items:this.yearOptions,value:this.alterDate.year,style:{"--vaadin-field-default-width":"90px"},"on-value-changed":this.onYearChange.bind(this)})),e("div",{key:"0a405edb23487297ab91e0a6ce304e907d7cfa62",class:"date-picker-delimiter"},"-"),e("div",{key:"cc81efef542d370f4e03a7d7fa138a36b900d801",class:"date-picker-month"},e("vaadin-select",{key:"d7a9636262121dd8008588eef61aacd092ec07c8",items:this.monthOptions,value:this.alterDate.month+1,style:{"--vaadin-field-default-width":"64px"},"on-value-changed":this.onMonthChange.bind(this)})),e("div",{key:"f862d5d3d665c97bc74f7eda209822cc5ceb558e",class:"date-picker-delimiter"},"-"),e("div",{key:"9b2dca353b3708ad561af1bebb24c93dd1194384",class:"date-picker-day"},this.alterDate.day)),e("div",{key:"4e2d6c599a6c03aa1852b65c86f2db50cea02d6d",class:"date-controller month-plus",onClick:this.onMonthPlus},">"),e("div",{key:"18e4e92486507065a5e0771ffde5050f4ffff3f1",class:"date-controller year-plus",onClick:this.onYearPlus},">")),e("div",{key:"ef1115ce79c83cf4689779e55f046a70f733bc6c",class:"calendar-content"},e("div",{key:"0a6fe5ec8ee10f03a2547f942207f6ceaaa99618",class:"calendar-content-week"},this.weeks.map((t=>e("div",{class:"week-item"},t)))),e("div",{key:"971bc904f76e33c6503be7d223759f2ab7cb0ad6",class:"calendar-content-day"},this.days.map((t=>e("div",{class:{"day-item":!0,isCurDay:this.tellIsCurDay(t.date,t.month,t.year),isHighLight:this.tellIsHighLight(t.date,t.month,t.year)},onClick:()=>this.handleSelectDate(t.date,t.month,t.year)},t.date)))))))}static get watchers(){return{date:["handleDateChange"]}}};Ih.style='.lottery-tipping-calendar{position:relative;display:inline-block}.calendar-visible{opacity:1;visibility:visible}.calendar-leave{opacity:0;visibility:hidden}.calendar{position:absolute;top:40px;left:-50%;background:var(--emw--color-background, #fff);color:var(--emw--color-typography-secondary, #6f6f6f);padding:16px;width:fit-content;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));border-radius:var(--emw--border-radius-small, 4px);box-shadow:2px 3px 5px rgba(0, 0, 0, 0.1);cursor:pointer;transition:opacity 0.2s ease, visibility 0.2s ease;z-index:99}.calendar-header{display:flex;align-items:center}.calendar-header .date-picker{display:flex;margin:0 18px;align-items:center}.calendar-header .date-picker-delimiter{font-size:16px;margin:auto 4px}.calendar-header .month-plus,.calendar-header .month-minus,.calendar-header .year-plus,.calendar-header .year-minus{cursor:pointer;font-size:14px}.calendar-header .month-plus:hover,.calendar-header .month-minus:hover,.calendar-header .year-plus:hover,.calendar-header .year-minus:hover{color:var(--emw-pool-game-acition-active, #005fdb);transition:color 0.2s}.calendar-header .year-minus,.calendar-header .month-plus{margin-right:6px}.calendar-content{padding:3px;width:fit-content}.calendar-content .day-item{text-align:center;line-height:40px;cursor:not-allowed;position:relative;pointer-events:none}.calendar-content .day-item:hover{background-color:var(--emw--color-background-secondary, #f5f5f5)}.calendar-content .day-item.isCurDay{border-radius:4px;background:var(--emw--color-secondary, #fff3b9);background-size:50%;color:var(--emw--color-typography-secondary, #6f6f6f);font-weight:600;box-shadow:2px 2px 2px var(--emw-calender-curday-box-shadow, rgba(0, 0, 0, 0.09));cursor:pointer;pointer-events:all}.calendar-content .day-item.isHighLight{cursor:pointer;pointer-events:all}.calendar-content .day-item.isHighLight::after{content:"";position:absolute;left:calc(50% - 4px);bottom:0;width:6px;height:6px;border-radius:50%;background-color:var(--emw--color-error, red)}.calendar-content-week{display:grid;grid-template-columns:repeat(7, 40px);grid-template-rows:repeat(1, 36px);justify-items:center;align-items:center;border-bottom:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));color:var(--emw--color-typography-secondary, #6f6f6f)}.calendar-content-day{margin-top:4px;display:grid;grid-template-rows:repeat(6, 40px);grid-template-columns:repeat(7, 40px)}.calling-input{height:36px;width:160px;display:flex;align-items:center;justify-content:space-between;padding:0px 4px;background-color:var(--emw--color-background, #f5f5f5);border-radius:var(--emw--border-radius-small, 4px);border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));cursor:pointer}.calling-input .input{color:var(--emw--color-typography, #000)}.calling-input-text{color:var(--emw--color-typography, #000)}.calling-input-icon svg{fill:var(--emw--color-secondary, #fff3b9)}';const Dh=["ro","en","fr","ar","hr"],Oh={en:{homeTeam:"Home team:",awayTeam:"Away team:",selectionCleared:"Your selection has been cleared.",selectionOnLineCleared:"Your selection on this line will be cleared.",loading:"Loading...",error:"Error!",noData:"No data available.",lineInfo:"Line {currentPage} of {totalPages}",clearAll:"Clear All",cancel:"Cancel",confirm:"Confirm"},ro:{homeTeam:"Echipa gazdă:",awayTeam:"Echipa oaspete:",selectionCleared:"Selecția dvs. a fost ștearsă.",selectionOnLineCleared:"Selecția dvs. de pe această linie va fi ștearsă.",loading:"Se încarcă...',n error: 'Eroare!",noData:"Nu sunt date disponibile.",lineInfo:"Linia {currentPage} din {totalPages}",clearAll:"Șterge tot",cancel:"Anulează",confirm:"Confirmă"},fr:{homeTeam:"Équipe à domicile:",awayTeam:"Équipe à l'extérieur:",selectionCleared:"Votre sélection a été effacée.",selectionOnLineCleared:"Votre sélection sur cette ligne sera effacée.",loading:"Chargement...',n error: 'Erreur!",noData:"Aucune donnée disponible.",lineInfo:"Ligne {currentPage} sur {totalPages}",clearAll:"Tout effacer",cancel:"Annuler",confirm:"Confirmer"},ar:{homeTeam:"الفريق المضيف:",awayTeam:"الفريق الضيف:",selectionCleared:"تم مسح اختيارك.",selectionOnLineCleared:"سيتم مسح اختيارك في هذا السطر.",loading:"جار التحميل...',n error: 'خطأ!",noData:"لا توجد بيانات متاحة.",lineInfo:"السطر {currentPage} من {totalPages}",clearAll:"مسح الكل",cancel:"إلغاء",confirm:"تأكيد"},hr:{homeTeam:"Domaći tim:",awayTeam:"Gostujući tim:",selectionCleared:"Vaš odabir je obrisan.",selectionOnLineCleared:"Vaš odabir na ovoj liniji bit će obrisan.",loading:"Učitavanje...',n error: 'Greška!",noData:"Nema dostupnih podataka.",lineInfo:"Linija {currentPage} od {totalPages}",clearAll:"Očisti sve",cancel:"Odustani",confirm:"Potvrdi"}},Mh=(t,e,i)=>{const o=e;let s=Oh[void 0!==o&&Dh.includes(o)?o:"en"][t];return i&&Object.keys(i).forEach((t=>{s=s.replace(`{${t}}`,i[t])})),s},Eh=t=>{Object.keys(t).forEach((e=>{for(let i in t[e])Oh[e][i]=t[e][i]}))},Ph=[{value:"1"},{value:"X"},{value:"2"}],Nh=d({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"},{extraSVGAttrs:{width:"20px",height:"20px",fill:"currentColor"}}),Bh=d({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},{extraSVGAttrs:{width:"20px",height:"20px",fill:"currentColor"}}),jh=d({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"},{extraSVGAttrs:{width:"16px",height:"16px",fill:"currentColor"}}),Lh=d(m,{extraSVGAttrs:{width:"20px",height:"20px",fill:"currentColor"}}),$h=d(v,{extraSVGAttrs:{width:"20px",height:"20px",fill:"currentColor"}}),Fh=class{constructor(i){t(this,i),this.lotteryTippingBulletBetEvent=o(this,"lotteryTippingBulletBetSelect",7),this.lotteryTippingCurrentPageChangeEvent=o(this,"lotteryTippingCurrentPageChange",7),this.eventNameRender=(t,i)=>e("div",{class:"flex gap-1 eventNameContainer__item"},e("span",{class:"eventNameContainer__item--title"},i),e("general-tooltip",null,e("span",{slot:"trigger",class:"icon info-icon",innerHTML:jh,style:{width:"18px"}}),e("div",{slot:"content"},e("div",{class:"match-info"},e("div",{class:"match-info-item"},e("div",{class:"match-info-item-label"},Mh("homeTeam",this.language)),e("div",{class:"match-info-item-value"},t.homeName)),e("div",{class:"match-info-item"},e("div",{class:"match-info-item-label"},Mh("awayTeam",this.language)),e("div",{class:"match-info-item-value"},t.awayName)))))),this.columns=[{title:"",value:"index",width:3},{title:"",value:"eventName",width:70,render:this.eventNameRender},{title:"",value:"startTime",width:22,align:"right",nowrap:!0,render:(t,e)=>(({date:t,type:e="date",format:i})=>{try{const o=function(t,e){var i;r(1,arguments);var o=f(null!==(i=null==e?void 0:e.additionalDigits)&&void 0!==i?i:2);if(2!==o&&1!==o&&0!==o)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!=typeof t&&"[object String]"!==Object.prototype.toString.call(t))return new Date(NaN);var s,n=function(t){var e,i={},o=t.split(nt.dateTimeDelimiter);if(o.length>2)return i;if(/:/.test(o[0])?e=o[0]:(i.date=o[0],e=o[1],nt.timeZoneDelimiter.test(i.date)&&(i.date=t.split(nt.timeZoneDelimiter)[0],e=t.substr(i.date.length,t.length))),e){var s=nt.timezone.exec(e);s?(i.time=e.replace(s[1],""),i.timezone=s[1]):i.time=e}return i}(t);if(n.date){var a=function(t,e){var i=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),o=t.match(i);if(!o)return{year:NaN,restDateString:""};var s=o[1]?parseInt(o[1]):null,r=o[2]?parseInt(o[2]):null;return{year:null===r?s:100*r,restDateString:t.slice((o[1]||o[2]).length)}}(n.date,o);s=function(t,e){if(null===e)return new Date(NaN);var i=t.match(at);if(!i)return new Date(NaN);var o=!!i[4],s=ct(i[1]),r=ct(i[2])-1,n=ct(i[3]),a=ct(i[4]),l=ct(i[5])-1;if(o)return function(t,e,i){return e>=1&&e<=53&&i>=0&&i<=6}(0,a,l)?function(t,e,i){var o=new Date(0);o.setUTCFullYear(t,0,4);var s=7*(e-1)+i+1-(o.getUTCDay()||7);return o.setUTCDate(o.getUTCDate()+s),o}(e,a,l):new Date(NaN);var h=new Date(0);return function(t,e,i){return e>=0&&e<=11&&i>=1&&i<=(ut[e]||(pt(t)?29:28))}(e,r,n)&&function(t,e){return e>=1&&e<=(pt(t)?366:365)}(e,s)?(h.setUTCFullYear(e,r,Math.max(s,n)),h):new Date(NaN)}(a.restDateString,a.year)}if(!s||isNaN(s.getTime()))return new Date(NaN);var l,h=s.getTime(),c=0;if(n.time&&(c=function(t){var e=t.match(lt);if(!e)return NaN;var i=dt(e[1]),o=dt(e[2]),s=dt(e[3]);return function(t,e,i){return 24===t?0===e&&0===i:i>=0&&i<60&&e>=0&&e<60&&t>=0&&t<25}(i,o,s)?i*y+6e4*o+1e3*s:NaN}(n.time),isNaN(c)))return new Date(NaN);if(!n.timezone){var d=new Date(h+c),u=new Date(0);return u.setFullYear(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()),u.setHours(d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()),u}return l=function(t){if("Z"===t)return 0;var e=t.match(ht);if(!e)return 0;var i="+"===e[1]?-1:1,o=parseInt(e[2]),s=e[3]&&parseInt(e[3])||0;return function(t,e){return e>=0&&e<=59}(0,s)?i*(o*y+6e4*s):NaN}(n.timezone),isNaN(l)?new Date(NaN):new Date(h+c+l)}(t);if(isNaN(o.getTime()))throw new Error(`Invalid date: ${t}`);if(i)return rt(o,i);let s="dd/MM/yyyy";return"time"===e?s="dd/MM/yyyy HH:mm:ss":"week"===e&&(s="ccc dd/MM/yyyy HH:mm:ss"),rt(o,s)}catch(t){return console.error("Error formatting date:",t.message),""}})({date:e,format:"ccc HH:mm"})},{title:()=>e("lottery-tipping-bullet-group",{theme:"text",bulletConfigContent:JSON.stringify(Ph)}),value:"results",width:5,render:(t,i,o)=>{var s,r;return e("lottery-tipping-bullet-group",{mode:this.mode,bulletConfigContent:JSON.stringify(null===(r=null===(s=this.bulletConfigLineGroup)||void 0===s?void 0:s[this.currentPage-1])||void 0===r?void 0:r[o]),"position-idx":`${this.currentPage-1}-${o}`})}}],this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.translationData=void 0,this.clientStylingUrlContent="",this.sessionId=void 0,this.endpoint="",this.gameId=void 0,this.drawId=void 0,this.totalPages=void 0,this.minTotalPages=0,this.maxTotalPages=0,this.mode="multi",this.readPretty=!1,this.defaultBulletConfigLineGroup=void 0,this.bulletConfigLineGroup=[[[]]],this.currentPage=1,this.isLoading=!0,this.hasErrors=!1,this.dialogConfig={visible:!1},this.ticketDataSource=[]}handleNewTranslations(){this.isLoading=!0,Eh(JSON.parse(this.translationUrl)),this.isLoading=!1}handleClientStylingChange(t,e){t!=e&&l(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&h(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&c(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentWillLoad(){this.translationUrl&&Eh(JSON.parse(this.translationUrl))}componentDidLoad(){this.stylingContainer&&(this.mbSource&&c(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&l(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&h(this.stylingContainer,this.clientStylingUrl))}get parsedDefaultBulletConfigLineGroup(){if("string"==typeof this.defaultBulletConfigLineGroup&&this.defaultBulletConfigLineGroup)try{const t=JSON.parse(this.defaultBulletConfigLineGroup);return this.readPrettyHandler(t)}catch(t){return void console.error("Error parsing defaultBulletConfigLineGroup:",t)}}readPrettyHandler(t){return this.readPretty?(this.currentPage=1,this.minTotalPages=1,this.maxTotalPages=this.totalPages,null==t?void 0:t.map((t=>null==t?void 0:t.map((t=>null==t?void 0:t.map((t=>Object.assign(Object.assign({},t),{disabled:!0})))))))):t}initLineForBulletConfig(){var t;return Array.from({length:null===(t=this.ticketDataSource)||void 0===t?void 0:t.length},(()=>[...Ph]))}_resetBulletConfig(){this.bulletConfigLineGroup=Array.from({length:this.totalPages}).map(this.initLineForBulletConfig.bind(this))}fetchMatchData(){let t=new URL(`${this.endpoint}/poolgames/${this.gameId}/draws/${this.drawId}/matchConfig`);this.gameId&&this.drawId&&(this.isLoading=!0,(t=>fetch(t).then((t=>t.json())))(t.href).then((t=>{this.ticketDataSource=t||[],this.isLoading=!1,this.updateBulletConfigLineGroup()})).catch((t=>{this.isLoading=!1,this.hasErrors=!0,console.error("Error!",t)})))}updateBulletConfigLineGroup(){this.parsedDefaultBulletConfigLineGroup&&this.parsedDefaultBulletConfigLineGroup.length>0?this.bulletConfigLineGroup=this.parsedDefaultBulletConfigLineGroup:this._resetBulletConfig()}connectedCallback(){this.fetchMatchData()}handleClearAll(){this._resetBulletConfig(),(({message:t,theme:e="success"})=>{window.postMessage({type:"ShowNotificationToast",message:t,theme:e})})({message:Mh("selectionCleared",this.language)}),this.lotteryTippingBulletBetEvent.emit({hasSelectBullet:!1})}async resetBulletConfig({minLineNumber:t,maxLineNumber:e,defaultBoards:i}){this.totalPages=i,this.minTotalPages=t,this.maxTotalPages=e,this.currentPage=1,this._resetBulletConfig(),this.lotteryTippingBulletBetEvent.emit({hasSelectBullet:!1})}lotteryTippingBulletGroupSelectionHandler(t){const{bulletConfigArr:e,positionIdx:i}=t.detail,[o,s]=i.split("-");this.bulletConfigLineGroup[o][s]=e,this.bulletConfigLineGroup=[...this.bulletConfigLineGroup],this.lotteryTippingBulletBetEvent.emit({hasSelectBullet:!0})}async getData(){return await this.validateBulletConfigLineGroup(),this.bulletConfigLineGroup}validateBulletConfigLineGroup(){if("[[[]]]"===JSON.stringify(this.bulletConfigLineGroup))return Promise.resolve(this.bulletConfigLineGroup);const t=this.bulletConfigLineGroup.length;return t!==this.totalPages||t<this.minTotalPages||t>this.maxTotalPages?(this._resetBulletConfig(),Promise.reject(new Error("Invalid bullet config line group length"))):Promise.resolve(this.bulletConfigLineGroup)}prevPage(){this.swapCard("prev",(()=>{this.currentPage>1&&this.currentPage--}))}nextPage(){this.swapCard("next",(()=>{this.currentPage<this.totalPages&&this.currentPage++}))}handleAddLine(){this.swapCard("add",(()=>{this.totalPages<=this.maxTotalPages-1&&(this.bulletConfigLineGroup.push(this.initLineForBulletConfig()),this.totalPages++,this.currentPage++,this.lotteryTippingBulletBetEvent.emit())}))}handleRemoveLine(){(()=>{if(this.totalPages>=this.minTotalPages+1){const t=()=>{this.dialogConfig={visible:!1}},e=()=>{this.bulletConfigLineGroup.splice(this.currentPage-1,1),this.totalPages--,1!==this.currentPage&&this.currentPage--,this.lotteryTippingBulletBetEvent.emit(),this.swapCard("remove",t)};this.dialogConfig={visible:!0,content:Mh("selectionOnLineCleared",this.language),onConfirm:e,onCancel:t}}})()}swapCard(t,e){const i=this.mainContainer;if(!i)return;const{out:o,in:s}={next:{out:"card-out-left",in:"card-in-left"},prev:{out:"card-out-right",in:"card-in-right"},remove:{out:"card-out-down",in:"card-in-right"},add:{out:"card-out-left",in:"card-in-up"}}[t];i.classList.add(o),i.addEventListener("animationend",(()=>{i.classList.remove(o),e();const t=this.mainContainer;t&&(t.classList.add(s),t.addEventListener("animationend",(()=>t.classList.remove(s)),{once:!0}))}),{once:!0})}handleCurrentPageChange(){this.lotteryTippingCurrentPageChangeEvent.emit({currentPage:this.currentPage})}renderLoading(){return e("div",{class:"loading-wrap"},e("section",{class:"dots-container"},e("div",{class:"dot"}),e("div",{class:"dot"}),e("div",{class:"dot"}),e("div",{class:"dot"}),e("div",{class:"dot"})))}render(){var t,i,o,s;if(this.isLoading)return this.renderLoading();if(this.hasErrors)return e("div",{ref:t=>this.stylingContainer=t,class:"LotteryTippingTicketBet__container"},e("p",null,Mh("error",this.language)));const r=({columns:t,dataSource:i,hideHead:o=!1,grid:s=!0,bordered:r=!0})=>e("table",{class:{bordered:r,grid:s,"my-table-component":!0}},!o&&e("thead",null,e("tr",null,t.map((t=>{var i;return e("th",{key:t.value,style:{width:t.width+"%",textAlign:t.align}},"string"==typeof t.title?t.title:null===(i=t.title)||void 0===i?void 0:i.call(t))})))),e("tbody",null,i.map(((i,o)=>e("tr",{key:o},t.map((t=>e("td",{key:t.value,style:{width:t.width+"%",textAlign:t.align},class:{"no-wrap":t.nowrap}},t.render?t.render(i,i[t.value],o):i[t.value])))))))),n=this.totalPages<this.maxTotalPages&&this.currentPage===this.totalPages,a=this.totalPages>this.minTotalPages;return 0===this.ticketDataSource.length||0===this.minTotalPages||0===this.maxTotalPages?e("div",{class:"LotteryTippingTicketBet__container",ref:t=>this.stylingContainer=t},e("div",{class:"LotteryTippingTicketBet__empty"},e("p",null,Mh("noData",this.language)))):this.readPretty?e("div",{class:"LotteryTippingTicketBet__container",ref:t=>this.stylingContainer=t},e("div",{class:"LotteryTippingTicketBet__main",ref:t=>this.mainContainer=t},e(r,{columns:this.columns,dataSource:(null===(t=this.ticketDataSource)||void 0===t?void 0:t.map(((t,e)=>Object.assign(Object.assign({},t),{index:e+1}))))||[],hideHead:!1,grid:!1,bordered:!1}),this.totalPages>1&&e("div",null,e("div",{class:"border-line"}),e("div",{class:"LotteryTippingTicketBet__footer"},e("div",{class:"my-pagination flex justify-between"},e("span",null,Mh("lineInfo",this.language,{currentPage:this.currentPage,totalPages:this.totalPages})),e("div",{class:"flex gap-1"},e("span",{class:"btn "+(1===this.currentPage?"disabled":""),onClick:this.prevPage.bind(this)},e("span",{class:"icon",innerHTML:Lh})),e("span",{class:"btn "+(this.currentPage===this.totalPages?"disabled":""),onClick:this.nextPage.bind(this)},e("span",{class:"icon",innerHTML:$h})))))))):e("div",{ref:t=>this.stylingContainer=t,class:"LotteryTippingTicketBet__container"},e("div",{class:"LotteryTippingTicketBet__tableToolbar flex justify-end gap-1"},e("button",{class:{"LotteryTippingTicketBet__tableToolbar--item":!0,"mr-0":!(n||a)},onClick:this.handleClearAll.bind(this)},Mh("clearAll",this.language))),e("div",{class:"flex align-center LotteryTippingTicketBet__main",ref:t=>this.mainContainer=t},e(r,{columns:this.columns,dataSource:(null===(i=this.ticketDataSource)||void 0===i?void 0:i.map(((t,e)=>Object.assign(Object.assign({},t),{index:e+1}))))||[],hideHead:!1,grid:!1,bordered:!1}),(n||a)&&e("div",{class:"LotteryTippingTicketBet__lineOperatorGroup"},n&&e("div",{class:{"LotteryTippingTicketBet__lineOperatorGroup--item":!0},onClick:this.handleAddLine.bind(this)},e("span",{class:"icon",innerHTML:Nh})),a&&e("div",{class:{"LotteryTippingTicketBet__lineOperatorGroup--item":!0},onClick:this.handleRemoveLine.bind(this)},e("span",{class:"icon",innerHTML:Bh})))),e("div",{class:"border-line"}),e("div",{class:"LotteryTippingTicketBet__footer"},e("div",{class:"my-pagination flex justify-between"},e("span",null,Mh("lineInfo",this.language,{currentPage:this.currentPage,totalPages:this.totalPages})),e("div",{class:"flex gap-1"},e("span",{class:"btn "+(1===this.currentPage?"disabled":""),onClick:this.prevPage.bind(this)},e("span",{class:"icon",innerHTML:Lh})),e("span",{class:"btn "+(this.currentPage===this.totalPages?"disabled":""),onClick:this.nextPage.bind(this)},e("span",{class:"icon",innerHTML:$h}))))),this.dialogConfig.visible&&e("vaadin-confirm-dialog",{rejectButtonVisible:!0,rejectText:Mh("cancel",this.language),confirmText:Mh("confirm",this.language),opened:null===(o=this.dialogConfig)||void 0===o?void 0:o.visible,onConfirm:this.dialogConfig.onConfirm,onReject:this.dialogConfig.onCancel},null===(s=this.dialogConfig)||void 0===s?void 0:s.content))}static get assetsDirs(){return["../static"]}static get watchers(){return{translationUrl:["handleNewTranslations"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],gameId:["fetchMatchData"],sessionId:["fetchMatchData"],drawId:["fetchMatchData"],defaultBulletConfigLineGroup:["fetchMatchData"],currentPage:["handleCurrentPageChange"]}}};Fh.style=".LotteryTippingTicketBet__container {\n display: block; /* Or inline-block, depending on desired layout flow */\n font-size: 14px;\n line-height: 1.5715;\n color: var(--emw--color-typography, #000);\n background: var(--emw--color-background, #fff);\n overflow: hidden;\n min-width: 300px;\n container-type: inline-size;\n}\n@container (max-width: 375px) {\n .LotteryTippingTicketBet__container {\n font-size: 12px;\n }\n}\n\n.table-wrapper {\n overflow-x: auto; /* Handle horizontal scroll if content overflows */\n}\n\n.my-table-component {\n width: 100%;\n border-collapse: collapse; /* Important for borders */\n text-align: left;\n border-radius: 0.1rem; /* Ant Design like subtle rounding */\n border-spacing: 0;\n}\n\n/* Header */\n.my-table-component th {\n background: var(--emw--color-background-secondary, #f5f5f5);\n color: var(--emw--color-typography, #000);\n font-weight: 500;\n padding: 0.4rem 0.5rem;\n transition: background 0.3s ease;\n}\n\n/* Cells */\n.my-table-component td {\n padding: 0.4rem 0.5rem;\n color: var(--emw--color-typography, #000);\n background: var(--emw--color-background, #fff);\n transition: background 0.3s;\n}\n@container (max-width: 400px) {\n .my-table-component td {\n padding: 0.3rem 0.3rem;\n }\n}\n\n.my-table-component.bordered th,\n.my-table-component.bordered td {\n border-bottom: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n/* Bordered style */\n.my-table-component.grid th,\n.my-table-component.grid td {\n border: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n.my-table-component.grid th {\n border-bottom-width: 1px; /* Ensure bottom border is consistent */\n}\n\n.my-table-component.grid {\n border: 1px solid var(--emw--color-gray-100, #e6e6e6); /* Outer border */\n border-right-width: 0;\n border-bottom-width: 0;\n}\n\n.my-table-component.grid th:last-child,\n.my-table-component.grid td:last-child {\n border-right: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n.my-table-component.grid tr:last-child td {\n border-bottom: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n/* Striped style */\n.my-table-component.striped tbody tr:nth-child(even) td {\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n}\n\n/* Hover (optional, but nice) */\n.my-table-component tbody tr:hover td {\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n}\n\n.flex {\n display: flex;\n}\n\n.justify-end {\n justify-content: flex-end;\n}\n\n.gap-1 {\n gap: 4px;\n}\n\n.justify-between {\n justify-content: space-between;\n}\n\n.align-center {\n align-items: center;\n}\n\n.gap-1 {\n gap: 0.5rem;\n}\n\n.btn {\n color: var(--emw--color-typography, #000);\n background: var(--emw--color-background, #fff);\n font-size: 14px;\n transition: all 0.2s ease;\n}\n.btn:hover {\n cursor: pointer;\n}\n\n.btn:hover {\n background-color: var(--emw--color-gray-100, #e6e6e6);\n}\n\n.btn.disabled {\n opacity: 0.5;\n pointer-events: none;\n}\n.btn.disabled:hover {\n cursor: not-allowed !important;\n}\n\n.LotteryTippingTicketBet__tableToolbar {\n width: 100%;\n margin-bottom: 1rem;\n}\n\n.LotteryTippingTicketBet__tableToolbar--item {\n background-color: transparent;\n cursor: pointer;\n font-weight: 500;\n white-space: nowrap;\n display: inline-flex;\n border-radius: 1.6rem;\n border: 1px solid var(--emw--color-gray-100, #e6e6e6);\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n padding-left: 1rem;\n padding-right: 1rem;\n margin-right: 2rem;\n color: var(--emw--color-typography, #000);\n}\n.LotteryTippingTicketBet__tableToolbar--item.mr-0 {\n margin-right: 0rem !important;\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup {\n flex-basis: 2rem;\n display: flex;\n flex-direction: column;\n gap: 1rem;\n border-radius: 8px;\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup--item {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 2rem;\n height: 2rem;\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n color: var(--emw--color-typography, #000);\n border-radius: 8px;\n transition: all 0.2s ease-in-out;\n cursor: pointer;\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup--item:hover {\n transform: scale(1.1);\n box-shadow: 0 6px 14px var(--emw-calender-curday-box-shadow, rgba(0, 0, 0, 0.09));\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup--item .icon {\n width: 20px;\n height: 20px;\n transition: filter 0.2s ease-in-out;\n filter: grayscale(0.3);\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup--item:hover .icon {\n filter: grayscale(0);\n transform: rotate(3deg);\n}\n\ndiv.border-line {\n margin-top: 1rem;\n height: 1px;\n width: 100%;\n box-sizing: border-box;\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n transition: all 0.3s ease;\n}\n\n.LotteryTippingTicketBet__footer {\n padding: 0.5rem;\n}\n\n.my-pagination {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 1rem;\n font-size: 0.8rem;\n color: var(--emw--color-typography-secondary, #333);\n}\n\n.my-pagination span {\n font-weight: 500;\n user-select: none;\n}\n\n.my-pagination .btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n border-radius: 50%;\n transition: all 0.3s ease;\n cursor: pointer;\n opacity: 0.9;\n color: var(--emw--color-typography, #000);\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n}\n\n.my-pagination .btn .icon {\n width: 20px;\n height: 20px;\n transition: transform 0.2s ease;\n}\n\n.my-pagination .btn:hover {\n transform: scale(1.1);\n box-shadow: 0 6px 14px var(--emw-calender-curday-box-shadow, rgba(0, 0, 0, 0.09));\n}\n\n.my-pagination .btn.disabled {\n background-color: var(--emw--color-background-tertiary, #ccc);\n cursor: not-allowed;\n opacity: 0.5;\n transform: scale(1);\n}\n\n.match-info-item {\n display: flex;\n}\n\n.match-info-item-label {\n margin-right: 6px;\n}\n\n.info-icon:hover {\n cursor: pointer;\n}\n\n.LotteryTippingTicketBet__empty p {\n text-align: center;\n}\n\n.no-wrap {\n white-space: nowrap;\n overflow: hidden;\n}\n\n.eventNameContainer__item--title {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 300px;\n}\n@container (max-width: 600px) {\n .eventNameContainer__item--title {\n max-width: 180px;\n }\n}\n@container (max-width: 500px) {\n .eventNameContainer__item--title {\n max-width: 150px;\n }\n}\n@container (max-width: 400px) {\n .eventNameContainer__item--title {\n max-width: 100px;\n }\n}\n@container (max-width: 330px) {\n .eventNameContainer__item--title {\n max-width: 70px;\n }\n}\n\n.LotteryTippingTicketBet__main {\n perspective: 800px;\n will-change: transform, opacity;\n backface-visibility: hidden;\n}\n\n@container (max-width: 520px) {\n .LotteryTippingTicketBet__main {\n flex-wrap: wrap;\n justify-content: center;\n }\n .LotteryTippingTicketBet__tableToolbar--item {\n margin-right: 0 !important;\n }\n}\n/* Fade-In Keyframes */\n@keyframes fadeInLeft {\n from {\n opacity: 0;\n transform: translateX(100%);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n/* Fade-Out Keyframes */\n@keyframes fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n@keyframes fadeInRight {\n from {\n opacity: 0;\n transform: translateX(-100%);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n@keyframes fadeInUp {\n from {\n opacity: 0;\n transform: translateY(100%);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n@-webkit-keyframes slide-left {\n 0% {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n }\n 100% {\n -webkit-transform: translateX(-100px);\n transform: translateX(-100px);\n }\n}\n@keyframes slide-left {\n 0% {\n -webkit-transform: translateX(100%);\n transform: translateX(100%);\n }\n 100% {\n -webkit-transform: translateX(0px);\n transform: translateX(0px);\n }\n}\n@-webkit-keyframes slide-right {\n 0% {\n -webkit-transform: translateX(-100%);\n transform: translateX(-100%);\n }\n 100% {\n -webkit-transform: translateX(0px);\n transform: translateX(0px);\n }\n}\n@keyframes slide-right {\n 0% {\n -webkit-transform: translateX(-100px);\n transform: translateX(-100px);\n }\n 100% {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n }\n}\n@-webkit-keyframes slide-top {\n 0% {\n -webkit-transform: translateY(-100px);\n transform: translateY(-100px);\n }\n 100% {\n -webkit-transform: translateY(0px);\n transform: translateY(0px);\n }\n}\n@keyframes slide-top {\n 0% {\n -webkit-transform: translateY(-100px);\n transform: translateY(-100px);\n }\n 100% {\n -webkit-transform: translateY(0px);\n transform: translateY(0px);\n }\n}\n/* Apply to your card classes */\n.card-in-left {\n -webkit-animation: slide-left 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n animation: slide-left 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n}\n\n.card-out-left {\n animation: fadeOut 0.2s ease-out both;\n}\n\n.card-in-right {\n -webkit-animation: slide-right 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n animation: slide-right 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n}\n\n.card-out-right {\n animation: fadeOut 0.2s ease-out both;\n}\n\n.card-in-up {\n -webkit-animation: slide-top 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n animation: slide-top 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n}\n\n.card-out-down {\n animation: fadeOut 0.2s ease-out both;\n}\n\n.loading-wrap {\n margin: 20px 0;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 40vh;\n}\n.loading-wrap .dots-container {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n}\n.loading-wrap .dot {\n height: 14px;\n width: 14px;\n margin-right: 14px;\n border-radius: 14px;\n background-color: var(--emw--color-gray-300, #333);\n animation: pulse 1.5s infinite ease-in-out;\n}\n.loading-wrap .dot:last-child {\n margin-right: 0;\n}\n.loading-wrap .dot:nth-child(1) {\n animation-delay: -0.3s;\n}\n.loading-wrap .dot:nth-child(2) {\n animation-delay: -0.1s;\n}\n.loading-wrap .dot:nth-child(3) {\n animation-delay: 0.1s;\n}\n@keyframes pulse {\n 0% {\n transform: scale(0.8);\n background-color: var(--emw--color-gray-300, #333);\n }\n 50% {\n transform: scale(1.2);\n background-color: var(--emw--color-gray-100, #e6e6e6);\n }\n 100% {\n transform: scale(0.8);\n background-color: var(--emw--color-gray-150, #6f6f6f);\n }\n}";const Rh=class{constructor(e){t(this,e),this.stylingValue={width:this.handleStylingProps(this.width),height:this.handleStylingProps(this.height),borderRadius:this.handleStylingProps(this.borderRadius),marginBottom:this.handleStylingProps(this.marginBottom),marginTop:this.handleStylingProps(this.marginTop),marginLeft:this.handleStylingProps(this.marginLeft),marginRight:this.handleStylingProps(this.marginRight),size:this.handleStylingProps(this.size)},this.structure=void 0,this.width="unset",this.height="unset",this.borderRadius="unset",this.marginBottom="unset",this.marginTop="unset",this.marginLeft="unset",this.marginRight="unset",this.animation=!0,this.rows=0,this.size="100%"}handleStructureChange(t,e){e!==t&&this.handleStructure(t)}handleStylingProps(t){switch(typeof t){case"number":return 0===t?0:`${t}px`;case"undefined":default:return"unset";case"string":return["auto","unset","none","inherit","initial"].includes(t)||t.endsWith("px")||t.endsWith("%")?t:"unset"}}handleStructure(t){switch(t){case"logo":return this.renderLogo();case"image":return this.renderImage();case"title":return this.renderTitle();case"text":return this.renderText();case"rectangle":return this.renderRectangle();case"circle":return this.renderCircle();default:return null}}renderLogo(){return e("div",{class:"SkeletonContainer"},e("div",{class:"SkeletonLogo "+(this.animation?"Skeleton":"")}))}renderImage(){return e("div",{class:"SkeletonImage "+(this.animation?"Skeleton":"")})}renderTitle(){return e("div",{class:"SkeletonContainer"},e("div",{class:"SkeletonTitle "+(this.animation?"Skeleton":"")}))}renderText(){return e("div",{class:"SkeletonContainer"},Array.from({length:this.rows>0?this.rows:1}).map(((t,i)=>e("div",{key:i,class:"SkeletonText "+(this.animation?"Skeleton":"")}))))}renderRectangle(){return e("div",{class:"SkeletonContainer"},e("div",{class:"SkeletonRectangle "+(this.animation?"Skeleton":"")}))}renderCircle(){return e("div",{class:"SkeletonContainer"},e("div",{class:"SkeletonCircle "+(this.animation?"Skeleton":"")}))}render(){let t="";switch(this.structure){case"logo":t=`\n :host {\n --emw-skeleton-logo-width: ${this.stylingValue.width};\n --emw-skeleton-logo-height: ${this.stylingValue.height};\n --emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"image":t=`\n :host {\n --emw-skeleton-image-width: ${this.stylingValue.width};\n --emw-skeleton-image-height: ${this.stylingValue.height};\n --emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"title":t=`\n :host {\n --emw-skeleton-title-width: ${this.stylingValue.width};\n --emw-skeleton-title-height: ${this.stylingValue.height};\n --emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"text":t=`\n :host {\n --emw-skeleton-text-width: ${this.stylingValue.width};\n --emw-skeleton-text-height: ${this.stylingValue.height};\n --emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"rectangle":t=`\n :host {\n --emw-skeleton-rectangle-width: ${this.stylingValue.width};\n --emw-skeleton-rectangle-height: ${this.stylingValue.height};\n --emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"circle":t=`\n :host {\n --emw-skeleton-circle-size: ${this.stylingValue.size};\n }\n `;break;default:t=""}return e(s,{key:"c2a2650acd416962a2bc4e1a7ee18bc6d8e2def8"},e("style",{key:"9bd7fc1f9e9ed9f17735a7b72fce6f09696f5e19"},t),this.handleStructure(this.structure))}static get watchers(){return{structure:["handleStructureChange"]}}};Rh.style=":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.SkeletonRectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.SkeletonCircle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.SkeletonText{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.SkeletonText:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.SkeletonTitle{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.SkeletonImage{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.SkeletonLogo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}";export{mt as general_tooltip,vt as lottery_tipping_bullet,ft as lottery_tipping_bullet_group,Ih as lottery_tipping_calendar,Fh as lottery_tipping_ticket_bet,Rh as ui_skeleton}
6657
+ `}static get is(){return"vaadin-tabs"}}Tt(zh);const Th=d({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"},{extraSVGAttrs:{width:"18px",height:"18px"}}),Ih=class{constructor(e){t(this,e),this.changeDate=o(this,"changeDate",7),this.handleOutsideClick=t=>{if(!this.showCalendar)return;const e=t.composedPath?t.composedPath():[],i=e.includes(this.calendarRef),o=e.some((t=>{var e,i;return t instanceof HTMLElement&&((null===(e=t.getAttribute("part"))||void 0===e?void 0:e.includes("item"))||(null===(i=t.getAttribute("part"))||void 0===i?void 0:i.includes("overlay")))}));i||o||(this.showCalendar=!1)},this.onYearMinus=()=>{const t=this.yearOptions.map((t=>Number(t.value)));this.alterDate.year-1<Math.min(...t)||(this.alterDate.year--,this.loadRecords())},this.onYearPlus=()=>{const t=this.yearOptions.map((t=>Number(t.value)));this.alterDate.year+1>Math.max(...t)||(this.alterDate.year++,this.loadRecords())},this.onMonthMinus=()=>{0===this.alterDate.month?(this.onYearMinus(),this.alterDate.month=11):(this.alterDate.month--,this.loadRecords())},this.onMonthPlus=()=>{11===this.alterDate.month?(this.onYearPlus(),this.alterDate.month=0):(this.alterDate.month++,this.loadRecords())},this.onYearChange=t=>{this.alterDate.year=parseInt(t.detail.value),this.loadRecords()},this.onMonthChange=t=>{this.alterDate.month=parseInt(t.detail.value)-1,this.loadRecords()},this.date="2025-05-19T02:00:00Z",this.highLightDates=void 0,this.language="en",this.translationUrl=void 0,this.weeks=void 0,this.days=[],this.alterDate={year:0,month:0,day:0},this.curDate={year:0,month:0,day:0},this.recordInfo=[],this.showCalendar=!1}componentWillLoad(){this.translationUrl&&u(JSON.parse(this.translationUrl)),this.weeks=p("weeks",this.language);const t=this.date?new Date(this.date):new Date;this.alterDate={year:t.getFullYear(),month:t.getMonth(),day:t.getDate()},this.curDate=Object.assign({},this.alterDate),this.loadRecords()}handleDateChange(){const t=this.date?new Date(this.date):new Date;this.alterDate={year:t.getFullYear(),month:t.getMonth(),day:t.getDate()},this.curDate=Object.assign({},this.alterDate),this.loadRecords()}componentDidLoad(){document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){document.removeEventListener("click",this.handleOutsideClick)}get yearOptions(){return Array.from({length:101},((t,e)=>this.alterDate.year-50+e)).map((t=>({label:String(t),value:String(t)})))}get monthOptions(){return Array.from({length:12},((t,e)=>e+1)).map((t=>({label:String(t),value:String(t)})))}loadRecords(){const{year:t,month:e}=this.alterDate;this.setDays(t,e)}setDays(t,e){this.days=[];const i=new Date(t,e,1).getDay(),o=new Date(t,e,1-i);for(let t=0;t<42;t++){const e=new Date(o);e.setDate(o.getDate()+t);const i={date:e.getDate(),month:e.getMonth(),year:e.getFullYear()};this.days.push(i)}}getFullDayOfMonth(t,e){return new Date(t,e,0).getDate()}showFormatedDate(t){return`${t.day}/${t.month+1}/${t.year}`}handleSelectDate(t,e,i){this.alterDate.day=t,this.curDate=Object.assign({},this.alterDate),this.showCalendar=!1;const o=this.highLightDates.map((t=>{const e=new Date(t);return{year:e.getFullYear(),month:e.getMonth(),day:e.getDate()}})).findIndex((o=>{const{year:s,month:r,day:n}=o;return e===r&&i===s&&t===n}));console.log("idx",o),o>-1&&this.changeDate.emit(o)}tellIsCurDay(t,e,i){return this.curDate.day===t&&this.curDate.month===e&&this.curDate.year===i}tellIsHighLight(t,e,i){return!(!this.highLightDates||!this.highLightDates.length)&&this.highLightDates.map((t=>{const e=new Date(t);return{year:e.getFullYear(),month:e.getMonth(),day:e.getDate()}})).some((o=>{const{year:s,month:r,day:n}=o;return e===r&&i===s&&t===n}))}render(){const t=["calendar",this.showCalendar?"calendar-visible":"calendar-leave"];return e("div",{key:"eda2c6b211647dfd9c26f5dd53dd8f18a2205be2",class:"lottery-tipping-calendar",ref:t=>this.calendarRef=t},e("div",{key:"b8a516ae17b8de7aaa4a72284848295546239937",class:"calling-input",onClick:()=>{this.showCalendar=!0}},e("div",{key:"4e384c0e1989f76b995bbc3df572eeab8ae120f6",class:"calling-input-text"},this.showFormatedDate(this.curDate)),e("div",{key:"a489600f9b90e4ea865606dddd4997ad9cf1558a",class:"calling-input-icon",innerHTML:Th})),e("div",{key:"7c17232151a8ae775e4a35000e7992695ce1f9dd",class:t.join(" ")},e("div",{key:"6951e3aa3fedb236514b57d6cdf830b074deb928",class:"calendar-header"},e("div",{key:"7d9735ab6d40d9010ac32a2b776ceacd9ee8ebb8",class:"date-controller year-minus",onClick:this.onYearMinus},"<"),e("div",{key:"e0f3e6958187120e4441c4c4961fda4a74294cca",class:"date-controller month-minus",onClick:this.onMonthMinus},"<"),e("div",{key:"e1840f3d0f9e4860a03467bbc782a6306c591ad4",class:"date-picker"},e("div",{key:"44d3b63aebcadaa42682e77f9d84c9ae155ec546",class:"date-picker-year"},e("vaadin-select",{key:"d462e0c076b1da5cdfa4a2ce47c5c3cb0d6e86bd",items:this.yearOptions,value:this.alterDate.year,style:{"--vaadin-field-default-width":"90px"},"on-value-changed":this.onYearChange.bind(this)})),e("div",{key:"0a405edb23487297ab91e0a6ce304e907d7cfa62",class:"date-picker-delimiter"},"-"),e("div",{key:"cc81efef542d370f4e03a7d7fa138a36b900d801",class:"date-picker-month"},e("vaadin-select",{key:"d7a9636262121dd8008588eef61aacd092ec07c8",items:this.monthOptions,value:this.alterDate.month+1,style:{"--vaadin-field-default-width":"64px"},"on-value-changed":this.onMonthChange.bind(this)})),e("div",{key:"f862d5d3d665c97bc74f7eda209822cc5ceb558e",class:"date-picker-delimiter"},"-"),e("div",{key:"9b2dca353b3708ad561af1bebb24c93dd1194384",class:"date-picker-day"},this.alterDate.day)),e("div",{key:"4e2d6c599a6c03aa1852b65c86f2db50cea02d6d",class:"date-controller month-plus",onClick:this.onMonthPlus},">"),e("div",{key:"18e4e92486507065a5e0771ffde5050f4ffff3f1",class:"date-controller year-plus",onClick:this.onYearPlus},">")),e("div",{key:"ef1115ce79c83cf4689779e55f046a70f733bc6c",class:"calendar-content"},e("div",{key:"0a6fe5ec8ee10f03a2547f942207f6ceaaa99618",class:"calendar-content-week"},this.weeks.map((t=>e("div",{class:"week-item"},t)))),e("div",{key:"971bc904f76e33c6503be7d223759f2ab7cb0ad6",class:"calendar-content-day"},this.days.map((t=>e("div",{class:{"day-item":!0,isCurDay:this.tellIsCurDay(t.date,t.month,t.year),isHighLight:this.tellIsHighLight(t.date,t.month,t.year)},onClick:()=>this.handleSelectDate(t.date,t.month,t.year)},t.date)))))))}static get watchers(){return{date:["handleDateChange"]}}};Ih.style='.lottery-tipping-calendar{position:relative;display:inline-block}.calendar-visible{opacity:1;visibility:visible}.calendar-leave{opacity:0;visibility:hidden}.calendar{position:absolute;top:40px;left:-50%;background:var(--emw--color-background, #fff);color:var(--emw--color-typography-secondary, #6f6f6f);padding:16px;width:fit-content;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));border-radius:var(--emw--border-radius-small, 4px);box-shadow:2px 3px 5px rgba(0, 0, 0, 0.1);cursor:pointer;transition:opacity 0.2s ease, visibility 0.2s ease;z-index:99}.calendar-header{display:flex;align-items:center}.calendar-header .date-picker{display:flex;margin:0 18px;align-items:center}.calendar-header .date-picker-delimiter{font-size:16px;margin:auto 4px}.calendar-header .month-plus,.calendar-header .month-minus,.calendar-header .year-plus,.calendar-header .year-minus{cursor:pointer;font-size:14px}.calendar-header .month-plus:hover,.calendar-header .month-minus:hover,.calendar-header .year-plus:hover,.calendar-header .year-minus:hover{color:var(--emw-pool-game-acition-active, #005fdb);transition:color 0.2s}.calendar-header .year-minus,.calendar-header .month-plus{margin-right:6px}.calendar-content{padding:3px;width:fit-content}.calendar-content .day-item{text-align:center;line-height:40px;cursor:not-allowed;position:relative;pointer-events:none}.calendar-content .day-item:hover{background-color:var(--emw--color-background-secondary, #f5f5f5)}.calendar-content .day-item.isCurDay{border-radius:4px;background:var(--emw--color-secondary, #fff3b9);background-size:50%;color:var(--emw--color-typography-secondary, #6f6f6f);font-weight:600;box-shadow:2px 2px 2px var(--emw-calender-curday-box-shadow, rgba(0, 0, 0, 0.09));cursor:pointer;pointer-events:all}.calendar-content .day-item.isHighLight{cursor:pointer;pointer-events:all}.calendar-content .day-item.isHighLight::after{content:"";position:absolute;left:calc(50% - 4px);bottom:0;width:6px;height:6px;border-radius:50%;background-color:var(--emw--color-error, red)}.calendar-content-week{display:grid;grid-template-columns:repeat(7, 40px);grid-template-rows:repeat(1, 36px);justify-items:center;align-items:center;border-bottom:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));color:var(--emw--color-typography-secondary, #6f6f6f)}.calendar-content-day{margin-top:4px;display:grid;grid-template-rows:repeat(6, 40px);grid-template-columns:repeat(7, 40px)}.calling-input{height:36px;width:160px;display:flex;align-items:center;justify-content:space-between;padding:0px 4px;background-color:var(--emw--color-background, #f5f5f5);border-radius:var(--emw--border-radius-small, 4px);border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));cursor:pointer}.calling-input .input{color:var(--emw--color-typography, #000)}.calling-input-text{color:var(--emw--color-typography, #000)}.calling-input-icon svg{fill:var(--emw--color-secondary, #fff3b9)}';const Dh=["ro","en","fr","ar","hr"],Oh={en:{homeTeam:"Home team:",awayTeam:"Away team:",selectionCleared:"Your selection has been cleared.",selectionOnLineCleared:"Your selection on this line will be cleared.",loading:"Loading...",error:"Error!",noData:"No data available.",lineInfo:"Line {currentPage} of {totalPages}",clearAll:"Clear All",cancel:"Cancel",confirm:"Confirm"},ro:{homeTeam:"Echipa gazdă:",awayTeam:"Echipa oaspete:",selectionCleared:"Selecția dvs. a fost ștearsă.",selectionOnLineCleared:"Selecția dvs. de pe această linie va fi ștearsă.",loading:"Se încarcă...',n error: 'Eroare!",noData:"Nu sunt date disponibile.",lineInfo:"Linia {currentPage} din {totalPages}",clearAll:"Șterge tot",cancel:"Anulează",confirm:"Confirmă"},fr:{homeTeam:"Équipe à domicile:",awayTeam:"Équipe à l'extérieur:",selectionCleared:"Votre sélection a été effacée.",selectionOnLineCleared:"Votre sélection sur cette ligne sera effacée.",loading:"Chargement...',n error: 'Erreur!",noData:"Aucune donnée disponible.",lineInfo:"Ligne {currentPage} sur {totalPages}",clearAll:"Tout effacer",cancel:"Annuler",confirm:"Confirmer"},ar:{homeTeam:"الفريق المضيف:",awayTeam:"الفريق الضيف:",selectionCleared:"تم مسح اختيارك.",selectionOnLineCleared:"سيتم مسح اختيارك في هذا السطر.",loading:"جار التحميل...',n error: 'خطأ!",noData:"لا توجد بيانات متاحة.",lineInfo:"السطر {currentPage} من {totalPages}",clearAll:"مسح الكل",cancel:"إلغاء",confirm:"تأكيد"},hr:{homeTeam:"Domaći tim:",awayTeam:"Gostujući tim:",selectionCleared:"Vaš odabir je obrisan.",selectionOnLineCleared:"Vaš odabir na ovoj liniji bit će obrisan.",loading:"Učitavanje...',n error: 'Greška!",noData:"Nema dostupnih podataka.",lineInfo:"Linija {currentPage} od {totalPages}",clearAll:"Očisti sve",cancel:"Odustani",confirm:"Potvrdi"}},Mh=(t,e,i)=>{const o=e;let s=Oh[void 0!==o&&Dh.includes(o)?o:"en"][t];return i&&Object.keys(i).forEach((t=>{s=s.replace(`{${t}}`,i[t])})),s},Eh=t=>{Object.keys(t).forEach((e=>{for(let i in t[e])Oh[e][i]=t[e][i]}))},Ph=[{value:"1"},{value:"X"},{value:"2"}],Nh=d({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"},{extraSVGAttrs:{width:"20px",height:"20px",fill:"currentColor"}}),Bh=d({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},{extraSVGAttrs:{width:"20px",height:"20px",fill:"currentColor"}}),jh=d({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"},{extraSVGAttrs:{width:"16px",height:"16px",fill:"currentColor"}}),Lh=d(m,{extraSVGAttrs:{width:"20px",height:"20px",fill:"currentColor"}}),$h=d(v,{extraSVGAttrs:{width:"20px",height:"20px",fill:"currentColor"}}),Fh=class{constructor(i){t(this,i),this.lotteryTippingBulletBetEvent=o(this,"lotteryTippingBulletBetSelect",7),this.lotteryTippingCurrentPageChangeEvent=o(this,"lotteryTippingCurrentPageChange",7),this.eventNameRender=(t,i)=>e("div",{class:"flex gap-1 eventNameContainer__item"},e("span",{class:"eventNameContainer__item--title"},i),e("general-tooltip",null,e("span",{slot:"trigger",class:"icon info-icon",innerHTML:jh,style:{width:"18px"}}),e("div",{slot:"content"},e("div",{class:"match-info"},e("div",{class:"match-info-item"},e("div",{class:"match-info-item-label"},Mh("homeTeam",this.language)),e("div",{class:"match-info-item-value"},t.homeName)),e("div",{class:"match-info-item"},e("div",{class:"match-info-item-label"},Mh("awayTeam",this.language)),e("div",{class:"match-info-item-value"},t.awayName)))))),this.columns=[{title:"",value:"index",width:3},{title:"",value:"eventName",width:70,render:this.eventNameRender},{title:"",value:"startTime",width:22,align:"right",nowrap:!0,render:(t,e)=>(({date:t,type:e="date",format:i})=>{try{const o=function(t,e){var i;r(1,arguments);var o=f(null!==(i=null==e?void 0:e.additionalDigits)&&void 0!==i?i:2);if(2!==o&&1!==o&&0!==o)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!=typeof t&&"[object String]"!==Object.prototype.toString.call(t))return new Date(NaN);var s,n=function(t){var e,i={},o=t.split(nt.dateTimeDelimiter);if(o.length>2)return i;if(/:/.test(o[0])?e=o[0]:(i.date=o[0],e=o[1],nt.timeZoneDelimiter.test(i.date)&&(i.date=t.split(nt.timeZoneDelimiter)[0],e=t.substr(i.date.length,t.length))),e){var s=nt.timezone.exec(e);s?(i.time=e.replace(s[1],""),i.timezone=s[1]):i.time=e}return i}(t);if(n.date){var a=function(t,e){var i=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),o=t.match(i);if(!o)return{year:NaN,restDateString:""};var s=o[1]?parseInt(o[1]):null,r=o[2]?parseInt(o[2]):null;return{year:null===r?s:100*r,restDateString:t.slice((o[1]||o[2]).length)}}(n.date,o);s=function(t,e){if(null===e)return new Date(NaN);var i=t.match(at);if(!i)return new Date(NaN);var o=!!i[4],s=ct(i[1]),r=ct(i[2])-1,n=ct(i[3]),a=ct(i[4]),l=ct(i[5])-1;if(o)return function(t,e,i){return e>=1&&e<=53&&i>=0&&i<=6}(0,a,l)?function(t,e,i){var o=new Date(0);o.setUTCFullYear(t,0,4);var s=7*(e-1)+i+1-(o.getUTCDay()||7);return o.setUTCDate(o.getUTCDate()+s),o}(e,a,l):new Date(NaN);var h=new Date(0);return function(t,e,i){return e>=0&&e<=11&&i>=1&&i<=(ut[e]||(pt(t)?29:28))}(e,r,n)&&function(t,e){return e>=1&&e<=(pt(t)?366:365)}(e,s)?(h.setUTCFullYear(e,r,Math.max(s,n)),h):new Date(NaN)}(a.restDateString,a.year)}if(!s||isNaN(s.getTime()))return new Date(NaN);var l,h=s.getTime(),c=0;if(n.time&&(c=function(t){var e=t.match(lt);if(!e)return NaN;var i=dt(e[1]),o=dt(e[2]),s=dt(e[3]);return function(t,e,i){return 24===t?0===e&&0===i:i>=0&&i<60&&e>=0&&e<60&&t>=0&&t<25}(i,o,s)?i*y+6e4*o+1e3*s:NaN}(n.time),isNaN(c)))return new Date(NaN);if(!n.timezone){var d=new Date(h+c),u=new Date(0);return u.setFullYear(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()),u.setHours(d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()),u}return l=function(t){if("Z"===t)return 0;var e=t.match(ht);if(!e)return 0;var i="+"===e[1]?-1:1,o=parseInt(e[2]),s=e[3]&&parseInt(e[3])||0;return function(t,e){return e>=0&&e<=59}(0,s)?i*(o*y+6e4*s):NaN}(n.timezone),isNaN(l)?new Date(NaN):new Date(h+c+l)}(t);if(isNaN(o.getTime()))throw new Error(`Invalid date: ${t}`);if(i)return rt(o,i);let s="dd/MM/yyyy";return"time"===e?s="dd/MM/yyyy HH:mm:ss":"week"===e&&(s="ccc dd/MM/yyyy HH:mm:ss"),rt(o,s)}catch(t){return console.error("Error formatting date:",t.message),""}})({date:e,format:"ccc HH:mm"})},{title:()=>e("lottery-tipping-bullet-group",{theme:"text",bulletConfigContent:JSON.stringify(Ph)}),value:"results",width:5,render:(t,i,o)=>{var s,r;return e("lottery-tipping-bullet-group",{mode:this.mode,bulletConfigContent:JSON.stringify(null===(r=null===(s=this.bulletConfigLineGroup)||void 0===s?void 0:s[this.currentPage-1])||void 0===r?void 0:r[o]),"position-idx":`${this.currentPage-1}-${o}`})}}],this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.translationData=void 0,this.clientStylingUrlContent="",this.sessionId=void 0,this.endpoint="",this.gameId=void 0,this.drawId=void 0,this.totalPages=void 0,this.minTotalPages=0,this.maxTotalPages=0,this.mode="multi",this.readPretty=!1,this.defaultBulletConfigLineGroup=void 0,this.bulletConfigLineGroup=[[[]]],this.currentPage=1,this.isLoading=!1,this.hasErrors=!1,this.dialogConfig={visible:!1},this.ticketDataSource=[]}handleNewTranslations(){this.isLoading=!0,Eh(JSON.parse(this.translationUrl)),this.isLoading=!1}handleClientStylingChange(t,e){t!=e&&l(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&h(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&c(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentWillLoad(){this.translationUrl&&Eh(JSON.parse(this.translationUrl))}componentDidLoad(){this.stylingContainer&&(this.mbSource&&c(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&l(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&h(this.stylingContainer,this.clientStylingUrl))}get parsedDefaultBulletConfigLineGroup(){if("string"==typeof this.defaultBulletConfigLineGroup&&this.defaultBulletConfigLineGroup)try{const t=JSON.parse(this.defaultBulletConfigLineGroup);return this.readPrettyHandler(t)}catch(t){return void console.error("Error parsing defaultBulletConfigLineGroup:",t)}}readPrettyHandler(t){return this.readPretty?(this.currentPage=1,this.minTotalPages=1,this.maxTotalPages=this.totalPages,null==t?void 0:t.map((t=>null==t?void 0:t.map((t=>null==t?void 0:t.map((t=>Object.assign(Object.assign({},t),{disabled:!0})))))))):t}initLineForBulletConfig(){var t;return Array.from({length:null===(t=this.ticketDataSource)||void 0===t?void 0:t.length},(()=>[...Ph]))}_resetBulletConfig(){this.bulletConfigLineGroup=Array.from({length:this.totalPages}).map(this.initLineForBulletConfig.bind(this))}fetchMatchData(){let t=new URL(`${this.endpoint}/poolgames/${this.gameId}/draws/${this.drawId}/matchConfig`);this.gameId&&this.drawId&&(this.isLoading=!0,(t=>fetch(t).then((t=>t.json())))(t.href).then((t=>{this.ticketDataSource=t||[],this.isLoading=!1,this.updateBulletConfigLineGroup()})).catch((t=>{this.isLoading=!1,this.hasErrors=!0,console.error("Error!",t)})))}updateBulletConfigLineGroup(){this.parsedDefaultBulletConfigLineGroup&&this.parsedDefaultBulletConfigLineGroup.length>0?this.bulletConfigLineGroup=this.parsedDefaultBulletConfigLineGroup:this._resetBulletConfig()}connectedCallback(){this.fetchMatchData()}handleClearAll(){this._resetBulletConfig(),(({message:t,theme:e="success"})=>{window.postMessage({type:"ShowNotificationToast",message:t,theme:e})})({message:Mh("selectionCleared",this.language)}),this.lotteryTippingBulletBetEvent.emit({hasSelectBullet:!1})}async resetBulletConfig({minLineNumber:t,maxLineNumber:e,defaultBoards:i}){this.totalPages=i,this.minTotalPages=t,this.maxTotalPages=e,this.currentPage=1,this._resetBulletConfig(),this.lotteryTippingBulletBetEvent.emit({hasSelectBullet:!1})}lotteryTippingBulletGroupSelectionHandler(t){const{bulletConfigArr:e,positionIdx:i}=t.detail,[o,s]=i.split("-");this.bulletConfigLineGroup[o][s]=e,this.bulletConfigLineGroup=[...this.bulletConfigLineGroup],this.lotteryTippingBulletBetEvent.emit({hasSelectBullet:!0})}async getData(){return await this.validateBulletConfigLineGroup(),this.bulletConfigLineGroup}validateBulletConfigLineGroup(){if("[[[]]]"===JSON.stringify(this.bulletConfigLineGroup))return Promise.resolve(this.bulletConfigLineGroup);const t=this.bulletConfigLineGroup.length;return t!==this.totalPages||t<this.minTotalPages||t>this.maxTotalPages?(this._resetBulletConfig(),Promise.reject(new Error("Invalid bullet config line group length"))):Promise.resolve(this.bulletConfigLineGroup)}prevPage(){this.swapCard("prev",(()=>{this.currentPage>1&&this.currentPage--}))}nextPage(){this.swapCard("next",(()=>{this.currentPage<this.totalPages&&this.currentPage++}))}handleAddLine(){this.swapCard("add",(()=>{this.totalPages<=this.maxTotalPages-1&&(this.bulletConfigLineGroup.push(this.initLineForBulletConfig()),this.totalPages++,this.currentPage++,this.lotteryTippingBulletBetEvent.emit())}))}handleRemoveLine(){(()=>{if(this.totalPages>=this.minTotalPages+1){const t=()=>{this.dialogConfig={visible:!1}},e=()=>{this.bulletConfigLineGroup.splice(this.currentPage-1,1),this.totalPages--,1!==this.currentPage&&this.currentPage--,this.lotteryTippingBulletBetEvent.emit(),this.swapCard("remove",t)};this.dialogConfig={visible:!0,content:Mh("selectionOnLineCleared",this.language),onConfirm:e,onCancel:t}}})()}swapCard(t,e){const i=this.mainContainer;if(!i)return;const{out:o,in:s}={next:{out:"card-out-left",in:"card-in-left"},prev:{out:"card-out-right",in:"card-in-right"},remove:{out:"card-out-down",in:"card-in-right"},add:{out:"card-out-left",in:"card-in-up"}}[t];i.classList.add(o),i.addEventListener("animationend",(()=>{i.classList.remove(o),e();const t=this.mainContainer;t&&(t.classList.add(s),t.addEventListener("animationend",(()=>t.classList.remove(s)),{once:!0}))}),{once:!0})}handleCurrentPageChange(){this.lotteryTippingCurrentPageChangeEvent.emit({currentPage:this.currentPage})}renderLoading(){return e("div",{class:"loading-wrap"},e("section",{class:"dots-container"},e("div",{class:"dot"}),e("div",{class:"dot"}),e("div",{class:"dot"}),e("div",{class:"dot"}),e("div",{class:"dot"})))}render(){var t,i,o,s;if(this.isLoading)return this.renderLoading();if(this.hasErrors)return e("div",{ref:t=>this.stylingContainer=t,class:"LotteryTippingTicketBet__container"},e("p",null,Mh("error",this.language)));const r=({columns:t,dataSource:i,hideHead:o=!1,grid:s=!0,bordered:r=!0})=>e("table",{class:{bordered:r,grid:s,"my-table-component":!0}},!o&&e("thead",null,e("tr",null,t.map((t=>{var i;return e("th",{key:t.value,style:{width:t.width+"%",textAlign:t.align}},"string"==typeof t.title?t.title:null===(i=t.title)||void 0===i?void 0:i.call(t))})))),e("tbody",null,i.map(((i,o)=>e("tr",{key:o},t.map((t=>e("td",{key:t.value,style:{width:t.width+"%",textAlign:t.align},class:{"no-wrap":t.nowrap}},t.render?t.render(i,i[t.value],o):i[t.value])))))))),n=this.totalPages<this.maxTotalPages&&this.currentPage===this.totalPages,a=this.totalPages>this.minTotalPages;return 0===this.ticketDataSource.length||0===this.minTotalPages||0===this.maxTotalPages?e("div",{class:"LotteryTippingTicketBet__container",ref:t=>this.stylingContainer=t},e("div",{class:"LotteryTippingTicketBet__empty"},e("p",null,Mh("noData",this.language)))):this.readPretty?e("div",{class:"LotteryTippingTicketBet__container",ref:t=>this.stylingContainer=t},e("div",{class:"LotteryTippingTicketBet__main",ref:t=>this.mainContainer=t},e(r,{columns:this.columns,dataSource:(null===(t=this.ticketDataSource)||void 0===t?void 0:t.map(((t,e)=>Object.assign(Object.assign({},t),{index:e+1}))))||[],hideHead:!1,grid:!1,bordered:!1}),this.totalPages>1&&e("div",null,e("div",{class:"border-line"}),e("div",{class:"LotteryTippingTicketBet__footer"},e("div",{class:"my-pagination flex justify-between"},e("span",null,Mh("lineInfo",this.language,{currentPage:this.currentPage,totalPages:this.totalPages})),e("div",{class:"flex gap-1"},e("span",{class:"btn "+(1===this.currentPage?"disabled":""),onClick:this.prevPage.bind(this)},e("span",{class:"icon",innerHTML:Lh})),e("span",{class:"btn "+(this.currentPage===this.totalPages?"disabled":""),onClick:this.nextPage.bind(this)},e("span",{class:"icon",innerHTML:$h})))))))):e("div",{ref:t=>this.stylingContainer=t,class:"LotteryTippingTicketBet__container"},e("div",{class:"LotteryTippingTicketBet__tableToolbar flex justify-end gap-1"},e("button",{class:{"LotteryTippingTicketBet__tableToolbar--item":!0,"mr-0":!(n||a)},onClick:this.handleClearAll.bind(this)},Mh("clearAll",this.language))),e("div",{class:"flex align-center LotteryTippingTicketBet__main",ref:t=>this.mainContainer=t},e(r,{columns:this.columns,dataSource:(null===(i=this.ticketDataSource)||void 0===i?void 0:i.map(((t,e)=>Object.assign(Object.assign({},t),{index:e+1}))))||[],hideHead:!1,grid:!1,bordered:!1}),(n||a)&&e("div",{class:"LotteryTippingTicketBet__lineOperatorGroup"},n&&e("div",{class:{"LotteryTippingTicketBet__lineOperatorGroup--item":!0},onClick:this.handleAddLine.bind(this)},e("span",{class:"icon",innerHTML:Nh})),a&&e("div",{class:{"LotteryTippingTicketBet__lineOperatorGroup--item":!0},onClick:this.handleRemoveLine.bind(this)},e("span",{class:"icon",innerHTML:Bh})))),e("div",{class:"border-line"}),e("div",{class:"LotteryTippingTicketBet__footer"},e("div",{class:"my-pagination flex justify-between"},e("span",null,Mh("lineInfo",this.language,{currentPage:this.currentPage,totalPages:this.totalPages})),e("div",{class:"flex gap-1"},e("span",{class:"btn "+(1===this.currentPage?"disabled":""),onClick:this.prevPage.bind(this)},e("span",{class:"icon",innerHTML:Lh})),e("span",{class:"btn "+(this.currentPage===this.totalPages?"disabled":""),onClick:this.nextPage.bind(this)},e("span",{class:"icon",innerHTML:$h}))))),this.dialogConfig.visible&&e("vaadin-confirm-dialog",{rejectButtonVisible:!0,rejectText:Mh("cancel",this.language),confirmText:Mh("confirm",this.language),opened:null===(o=this.dialogConfig)||void 0===o?void 0:o.visible,onConfirm:this.dialogConfig.onConfirm,onReject:this.dialogConfig.onCancel},null===(s=this.dialogConfig)||void 0===s?void 0:s.content))}static get assetsDirs(){return["../static"]}static get watchers(){return{translationUrl:["handleNewTranslations"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],gameId:["fetchMatchData"],sessionId:["fetchMatchData"],drawId:["fetchMatchData"],defaultBulletConfigLineGroup:["fetchMatchData"],currentPage:["handleCurrentPageChange"]}}};Fh.style=".LotteryTippingTicketBet__container {\n display: block; /* Or inline-block, depending on desired layout flow */\n font-size: 14px;\n line-height: 1.5715;\n color: var(--emw--color-typography, #000);\n background: var(--emw--color-background, #fff);\n overflow: hidden;\n min-width: 300px;\n container-type: inline-size;\n}\n@container (max-width: 375px) {\n .LotteryTippingTicketBet__container {\n font-size: 12px;\n }\n}\n\n.table-wrapper {\n overflow-x: auto; /* Handle horizontal scroll if content overflows */\n}\n\n.my-table-component {\n width: 100%;\n border-collapse: collapse; /* Important for borders */\n text-align: left;\n border-radius: 0.1rem; /* Ant Design like subtle rounding */\n border-spacing: 0;\n}\n\n/* Header */\n.my-table-component th {\n background: var(--emw--color-background-secondary, #f5f5f5);\n color: var(--emw--color-typography, #000);\n font-weight: 500;\n padding: 0.4rem 0.5rem;\n transition: background 0.3s ease;\n}\n\n/* Cells */\n.my-table-component td {\n padding: 0.4rem 0.5rem;\n color: var(--emw--color-typography, #000);\n background: var(--emw--color-background, #fff);\n transition: background 0.3s;\n}\n@container (max-width: 400px) {\n .my-table-component td {\n padding: 0.3rem 0.3rem;\n }\n}\n\n.my-table-component.bordered th,\n.my-table-component.bordered td {\n border-bottom: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n/* Bordered style */\n.my-table-component.grid th,\n.my-table-component.grid td {\n border: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n.my-table-component.grid th {\n border-bottom-width: 1px; /* Ensure bottom border is consistent */\n}\n\n.my-table-component.grid {\n border: 1px solid var(--emw--color-gray-100, #e6e6e6); /* Outer border */\n border-right-width: 0;\n border-bottom-width: 0;\n}\n\n.my-table-component.grid th:last-child,\n.my-table-component.grid td:last-child {\n border-right: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n.my-table-component.grid tr:last-child td {\n border-bottom: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n/* Striped style */\n.my-table-component.striped tbody tr:nth-child(even) td {\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n}\n\n/* Hover (optional, but nice) */\n.my-table-component tbody tr:hover td {\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n}\n\n.flex {\n display: flex;\n}\n\n.justify-end {\n justify-content: flex-end;\n}\n\n.gap-1 {\n gap: 4px;\n}\n\n.justify-between {\n justify-content: space-between;\n}\n\n.align-center {\n align-items: center;\n}\n\n.gap-1 {\n gap: 0.5rem;\n}\n\n.btn {\n color: var(--emw--color-typography, #000);\n background: var(--emw--color-background, #fff);\n font-size: 14px;\n transition: all 0.2s ease;\n}\n.btn:hover {\n cursor: pointer;\n}\n\n.btn:hover {\n background-color: var(--emw--color-gray-100, #e6e6e6);\n}\n\n.btn.disabled {\n opacity: 0.5;\n pointer-events: none;\n}\n.btn.disabled:hover {\n cursor: not-allowed !important;\n}\n\n.LotteryTippingTicketBet__tableToolbar {\n width: 100%;\n margin-bottom: 1rem;\n}\n\n.LotteryTippingTicketBet__tableToolbar--item {\n background-color: transparent;\n cursor: pointer;\n font-weight: 500;\n white-space: nowrap;\n display: inline-flex;\n border-radius: 1.6rem;\n border: 1px solid var(--emw--color-gray-100, #e6e6e6);\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n padding-left: 1rem;\n padding-right: 1rem;\n margin-right: 2rem;\n color: var(--emw--color-typography, #000);\n}\n.LotteryTippingTicketBet__tableToolbar--item.mr-0 {\n margin-right: 0rem !important;\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup {\n flex-basis: 2rem;\n display: flex;\n flex-direction: column;\n gap: 1rem;\n border-radius: 8px;\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup--item {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 2rem;\n height: 2rem;\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n color: var(--emw--color-typography, #000);\n border-radius: 8px;\n transition: all 0.2s ease-in-out;\n cursor: pointer;\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup--item:hover {\n transform: scale(1.1);\n box-shadow: 0 6px 14px var(--emw-calender-curday-box-shadow, rgba(0, 0, 0, 0.09));\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup--item .icon {\n width: 20px;\n height: 20px;\n transition: filter 0.2s ease-in-out;\n filter: grayscale(0.3);\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup--item:hover .icon {\n filter: grayscale(0);\n transform: rotate(3deg);\n}\n\ndiv.border-line {\n margin-top: 1rem;\n height: 1px;\n width: 100%;\n box-sizing: border-box;\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n transition: all 0.3s ease;\n}\n\n.LotteryTippingTicketBet__footer {\n padding: 0.5rem;\n}\n\n.my-pagination {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 1rem;\n font-size: 0.8rem;\n color: var(--emw--color-typography-secondary, #333);\n}\n\n.my-pagination span {\n font-weight: 500;\n user-select: none;\n}\n\n.my-pagination .btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n border-radius: 50%;\n transition: all 0.3s ease;\n cursor: pointer;\n opacity: 0.9;\n color: var(--emw--color-typography, #000);\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n}\n\n.my-pagination .btn .icon {\n width: 20px;\n height: 20px;\n transition: transform 0.2s ease;\n}\n\n.my-pagination .btn:hover {\n transform: scale(1.1);\n box-shadow: 0 6px 14px var(--emw-calender-curday-box-shadow, rgba(0, 0, 0, 0.09));\n}\n\n.my-pagination .btn.disabled {\n background-color: var(--emw--color-background-tertiary, #ccc);\n cursor: not-allowed;\n opacity: 0.5;\n transform: scale(1);\n}\n\n.match-info-item {\n display: flex;\n}\n\n.match-info-item-label {\n margin-right: 6px;\n}\n\n.info-icon:hover {\n cursor: pointer;\n}\n\n.LotteryTippingTicketBet__empty p {\n text-align: center;\n}\n\n.no-wrap {\n white-space: nowrap;\n overflow: hidden;\n}\n\n.eventNameContainer__item--title {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 300px;\n}\n@container (max-width: 600px) {\n .eventNameContainer__item--title {\n max-width: 180px;\n }\n}\n@container (max-width: 500px) {\n .eventNameContainer__item--title {\n max-width: 150px;\n }\n}\n@container (max-width: 400px) {\n .eventNameContainer__item--title {\n max-width: 100px;\n }\n}\n@container (max-width: 330px) {\n .eventNameContainer__item--title {\n max-width: 70px;\n }\n}\n\n.LotteryTippingTicketBet__main {\n perspective: 800px;\n will-change: transform, opacity;\n backface-visibility: hidden;\n}\n\n@container (max-width: 520px) {\n .LotteryTippingTicketBet__main {\n flex-wrap: wrap;\n justify-content: center;\n }\n .LotteryTippingTicketBet__tableToolbar--item {\n margin-right: 0 !important;\n }\n}\n/* Fade-In Keyframes */\n@keyframes fadeInLeft {\n from {\n opacity: 0;\n transform: translateX(100%);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n/* Fade-Out Keyframes */\n@keyframes fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n@keyframes fadeInRight {\n from {\n opacity: 0;\n transform: translateX(-100%);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n@keyframes fadeInUp {\n from {\n opacity: 0;\n transform: translateY(100%);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n@-webkit-keyframes slide-left {\n 0% {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n }\n 100% {\n -webkit-transform: translateX(-100px);\n transform: translateX(-100px);\n }\n}\n@keyframes slide-left {\n 0% {\n -webkit-transform: translateX(100%);\n transform: translateX(100%);\n }\n 100% {\n -webkit-transform: translateX(0px);\n transform: translateX(0px);\n }\n}\n@-webkit-keyframes slide-right {\n 0% {\n -webkit-transform: translateX(-100%);\n transform: translateX(-100%);\n }\n 100% {\n -webkit-transform: translateX(0px);\n transform: translateX(0px);\n }\n}\n@keyframes slide-right {\n 0% {\n -webkit-transform: translateX(-100px);\n transform: translateX(-100px);\n }\n 100% {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n }\n}\n@-webkit-keyframes slide-top {\n 0% {\n -webkit-transform: translateY(-100px);\n transform: translateY(-100px);\n }\n 100% {\n -webkit-transform: translateY(0px);\n transform: translateY(0px);\n }\n}\n@keyframes slide-top {\n 0% {\n -webkit-transform: translateY(-100px);\n transform: translateY(-100px);\n }\n 100% {\n -webkit-transform: translateY(0px);\n transform: translateY(0px);\n }\n}\n/* Apply to your card classes */\n.card-in-left {\n -webkit-animation: slide-left 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n animation: slide-left 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n}\n\n.card-out-left {\n animation: fadeOut 0.2s ease-out both;\n}\n\n.card-in-right {\n -webkit-animation: slide-right 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n animation: slide-right 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n}\n\n.card-out-right {\n animation: fadeOut 0.2s ease-out both;\n}\n\n.card-in-up {\n -webkit-animation: slide-top 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n animation: slide-top 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n}\n\n.card-out-down {\n animation: fadeOut 0.2s ease-out both;\n}\n\n.loading-wrap {\n margin: 20px 0;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 40vh;\n}\n.loading-wrap .dots-container {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n}\n.loading-wrap .dot {\n height: 14px;\n width: 14px;\n margin-right: 14px;\n border-radius: 14px;\n background-color: var(--emw--color-gray-300, #333);\n animation: pulse 1.5s infinite ease-in-out;\n}\n.loading-wrap .dot:last-child {\n margin-right: 0;\n}\n.loading-wrap .dot:nth-child(1) {\n animation-delay: -0.3s;\n}\n.loading-wrap .dot:nth-child(2) {\n animation-delay: -0.1s;\n}\n.loading-wrap .dot:nth-child(3) {\n animation-delay: 0.1s;\n}\n@keyframes pulse {\n 0% {\n transform: scale(0.8);\n background-color: var(--emw--color-gray-300, #333);\n }\n 50% {\n transform: scale(1.2);\n background-color: var(--emw--color-gray-100, #e6e6e6);\n }\n 100% {\n transform: scale(0.8);\n background-color: var(--emw--color-gray-150, #6f6f6f);\n }\n}";const Rh=class{constructor(e){t(this,e),this.stylingValue={width:this.handleStylingProps(this.width),height:this.handleStylingProps(this.height),borderRadius:this.handleStylingProps(this.borderRadius),marginBottom:this.handleStylingProps(this.marginBottom),marginTop:this.handleStylingProps(this.marginTop),marginLeft:this.handleStylingProps(this.marginLeft),marginRight:this.handleStylingProps(this.marginRight),size:this.handleStylingProps(this.size)},this.structure=void 0,this.width="unset",this.height="unset",this.borderRadius="unset",this.marginBottom="unset",this.marginTop="unset",this.marginLeft="unset",this.marginRight="unset",this.animation=!0,this.rows=0,this.size="100%"}handleStructureChange(t,e){e!==t&&this.handleStructure(t)}handleStylingProps(t){switch(typeof t){case"number":return 0===t?0:`${t}px`;case"undefined":default:return"unset";case"string":return["auto","unset","none","inherit","initial"].includes(t)||t.endsWith("px")||t.endsWith("%")?t:"unset"}}handleStructure(t){switch(t){case"logo":return this.renderLogo();case"image":return this.renderImage();case"title":return this.renderTitle();case"text":return this.renderText();case"rectangle":return this.renderRectangle();case"circle":return this.renderCircle();default:return null}}renderLogo(){return e("div",{class:"SkeletonContainer"},e("div",{class:"SkeletonLogo "+(this.animation?"Skeleton":"")}))}renderImage(){return e("div",{class:"SkeletonImage "+(this.animation?"Skeleton":"")})}renderTitle(){return e("div",{class:"SkeletonContainer"},e("div",{class:"SkeletonTitle "+(this.animation?"Skeleton":"")}))}renderText(){return e("div",{class:"SkeletonContainer"},Array.from({length:this.rows>0?this.rows:1}).map(((t,i)=>e("div",{key:i,class:"SkeletonText "+(this.animation?"Skeleton":"")}))))}renderRectangle(){return e("div",{class:"SkeletonContainer"},e("div",{class:"SkeletonRectangle "+(this.animation?"Skeleton":"")}))}renderCircle(){return e("div",{class:"SkeletonContainer"},e("div",{class:"SkeletonCircle "+(this.animation?"Skeleton":"")}))}render(){let t="";switch(this.structure){case"logo":t=`\n :host {\n --emw-skeleton-logo-width: ${this.stylingValue.width};\n --emw-skeleton-logo-height: ${this.stylingValue.height};\n --emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"image":t=`\n :host {\n --emw-skeleton-image-width: ${this.stylingValue.width};\n --emw-skeleton-image-height: ${this.stylingValue.height};\n --emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"title":t=`\n :host {\n --emw-skeleton-title-width: ${this.stylingValue.width};\n --emw-skeleton-title-height: ${this.stylingValue.height};\n --emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"text":t=`\n :host {\n --emw-skeleton-text-width: ${this.stylingValue.width};\n --emw-skeleton-text-height: ${this.stylingValue.height};\n --emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"rectangle":t=`\n :host {\n --emw-skeleton-rectangle-width: ${this.stylingValue.width};\n --emw-skeleton-rectangle-height: ${this.stylingValue.height};\n --emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"circle":t=`\n :host {\n --emw-skeleton-circle-size: ${this.stylingValue.size};\n }\n `;break;default:t=""}return e(s,{key:"c2a2650acd416962a2bc4e1a7ee18bc6d8e2def8"},e("style",{key:"9bd7fc1f9e9ed9f17735a7b72fce6f09696f5e19"},t),this.handleStructure(this.structure))}static get watchers(){return{structure:["handleStructureChange"]}}};Rh.style=":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.SkeletonRectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.SkeletonCircle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.SkeletonText{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.SkeletonText:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.SkeletonTitle{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.SkeletonImage{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.SkeletonLogo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}";export{mt as general_tooltip,vt as lottery_tipping_bullet,ft as lottery_tipping_bullet_group,Ih as lottery_tipping_calendar,Fh as lottery_tipping_ticket_bet,Rh as ui_skeleton}
@@ -1 +1 @@
1
- export{L as LotteryTippingLatestResult}from"./lottery-tipping-latest-result-59d74574.js";import"./index-52961f92.js";
1
+ export{L as LotteryTippingLatestResult}from"./lottery-tipping-latest-result-8e6e386d.js";import"./index-52961f92.js";
@@ -0,0 +1 @@
1
+ import{r as t,c as e,h as n}from"./index-52961f92.js";const i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};var s=function(){return s=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},s.apply(this,arguments)},o={primaryColor:"#333",secondaryColor:"#E6E6E6"};function a(t,e){if(void 0===e&&(e={}),"function"==typeof t.icon){var n=e.placeholders||o;return l(t.icon(n.primaryColor,n.secondaryColor),e)}return l(t.icon,e)}function l(t,e){var n="svg"===t.tag?s(s({},t.attrs),e.extraSVGAttrs||{}):t.attrs,i=Object.keys(n).reduce((function(t,e){var i=n[e],r="".concat(e,'="').concat(i,'"');return t.push(r),t}),[]),r=i.length?" "+i.join(" "):"",o=(t.children||[]).map((function(t){return l(t,e)})).join("");return o&&o.length?"<".concat(t.tag).concat(r,">").concat(o,"</").concat(t.tag,">"):"<".concat(t.tag).concat(r," />")}const c="__WIDGET_GLOBAL_STYLE_CACHE__";function d(t,e){if(t){const n=document.createElement("style");n.innerHTML=e,t.appendChild(n)}}function h(t,e){if(!t||!e)return;const n=new URL(e);fetch(n.href).then((t=>t.text())).then((e=>{const n=document.createElement("style");n.innerHTML=e,t&&t.appendChild(n)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function u(t,e,n,i=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!i)return n=function(t,e){const n=document.createElement("style");return window.emMessageBus.subscribe(e,(e=>{t&&(n.innerHTML=e,t.appendChild(n))}))}(t,e),n;window[c]||(window[c]={}),n=function(t,e){return window.emMessageBus.subscribe(e,(n=>{if(!t)return;const i=t.getRootNode(),r=window[c];let s=r[e]?.sheet;s?r[e].refCount=r[e].refCount+1:(s=new CSSStyleSheet,s.replaceSync(n),r[e]={sheet:s,refCount:1});const o=i.adoptedStyleSheets||[];o.includes(s)||(i.adoptedStyleSheets=[...o,s])}))}(t,e);const r=n.unsubscribe.bind(n);return n.unsubscribe=()=>{if(window[c][e]){const t=window[c][e];t.refCount>1?t.refCount=t.refCount-1:delete window[c][e]}r()},n}function p(t){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p(t)}function f(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function g(t){f(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===p(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}const b=["ro","en","fr","ar","hr"],y={en:{weeks:["Su","Mo","Tu","We","Th","Fr","Sa"],bettingType:"Betting Type:",prizeAllocation:"Prize Allocation (Turnover: {turnover})",prizes:"Prizes",numberOfWinners:"Number of Winners",prizeMoney:"Prize Money",noLatestResult:"No latest result.",loading:"Loading...."},ro:{bettingType:"Tip de pariu:",prizeAllocation:"Alocarea premiilor (Cifră de afaceri: €{turnover})",prizes:"Premii",numberOfWinners:"Număr de câștigători",prizeMoney:"Bani de premiu",noLatestResult:"Niciun rezultat recent.",loading:"Se încarcă...."},fr:{bettingType:"Type de pari:",prizeAllocation:"Répartition des prix (Chiffre d'affaires: € {turnover})",prizes:"Prix",numberOfWinners:"Nombre de gagnants",prizeMoney:"Prix en argent",noLatestResult:"Aucun résultat récent.",loading:"Chargement...."},ar:{bettingType:"نوع الرهان:",prizeAllocation:"تخصيص الجائزة (دوران: € {turnover})",prizes:"الجوائز",numberOfWinners:"عدد الفائزين",prizeMoney:"أموال الجائزة",noLatestResult:"لا يوجد أحدث نتيجة.",loading:"جار التحميل...."},hr:{bettingType:"Vrsta oklade:",prizeAllocation:"Raspodjela nagrada (Promet: € {turnover})",prizes:"Nagrade",numberOfWinners:"Broj pobjednika",prizeMoney:"Novčana nagrada",noLatestResult:"Nema najnovijih rezultata.",loading:"Učitavanje...."}},w=(t,e,n)=>{const i=e;let r=y[void 0!==i&&b.includes(i)?i:"en"][t];return n&&Object.keys(n).forEach((t=>{r=r.replace(`{${t}}`,n[t])})),r},m=t=>{Object.keys(t).forEach((e=>{for(let n in t[e])y[e][n]=t[e][n]}))};function v(t,e="GET",n=null,i={}){return new Promise(((r,s)=>{const o="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})),a=Object.assign({"Content-Type":"application/json"},i);"GET"!==e&&"HEAD"!==e&&(a["X-Idempotency-Key"]=o);const l={method:e,headers:a,body:null};n&&"GET"!==e&&"HEAD"!==e?l.body=JSON.stringify(n):delete l.body,fetch(t,l).then((t=>{if(!t.ok)throw new Error(`HTTP error! Status: ${t.status}`);return t.json()})).then((t=>r(t))).catch((t=>s(t)))}))}function x(t,e){return null==t||""===t||(0!==t||!e)&&(Array.isArray(t)?function(t){if(0===t.length)return!0;const e=t.length;let n=0;for(let i=0;i<e;i++){if(!x(t[i]))return!1;n++}return n===e}(t):"[object Object]"===Object.prototype.toString.call(t)?function(t){if(0===Object.keys(t).length)return!0;const e=Object.keys(t).length;let n=0;for(const e of Object.values(t)){if(!x(e))return!1;n++}return n===e}(t):!t)}const z={0:"1",1:"X",2:"2"},k={H:0,D:1,A:2},T=t=>t.map((t=>{const e=[0,0,0];return t[0].forEach((t=>{const n=k[t];void 0!==n&&(e[n]=1)})),e.map(((t,e)=>({isSelected:1===t,value:z[e]})))}));function C(t){if(0===t)return"0";if(!t)return"";const e=(t=t.toString()).split(".");return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),e.join(".")}function S(t,e="€"){return null==t?"":`${e}${t?C(t):0}`}const L=a(i,{extraSVGAttrs:{width:"16px",height:"16px",fill:""}}),j=a(r,{extraSVGAttrs:{width:"16px",height:"16px",fill:""}}),O=class{constructor(n){t(this,n),this.lotteryTippingFetchDataError=e(this,"lotteryTippingLatestResultError",7),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.endpoint=void 0,this.gameId=void 0,this.playerId=void 0,this.sessionId=void 0,this.hasDrawDates=["2025-05-28T02:00:00Z","2025-05-16T02:00:00Z"],this.lastestDate="2025-05-28T02:00:00Z",this.drawList=void 0,this.curDrawItem=void 0,this.curDrawItemIdx=0,this.curDrawSelection=[],this.curDrawSelectionBettingType=void 0,this.curDrawSelectionMap={},this.curPrizes=void 0,this.curPrizeMap={},this.curTurnOver=0,this.isLoading=!0,this.playTypes=null,this.bettingTypes=void 0,this.vendorGameId=void 0,this.isLoadingTurnover=!1}handleClientStylingChange(t,e){t!=e&&d(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&h(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&u(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentWillLoad(){this.translationUrl&&m(JSON.parse(this.translationUrl)),this.initData()}async initData(){try{this.isLoading=!0,await Promise.all([this.getGameById(),this.fetDrawList()]),this.getTurnOver()}catch(t){console.error(t),this.lotteryTippingFetchDataError.emit(t)}finally{this.isLoading=!1}}componentDidLoad(){this.stylingContainer&&(this.mbSource&&u(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&d(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&h(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}async getGameById(){var t,e,n,i;try{const r=await async function(t,e){try{return await v(`${t}/games/${e}`,"GET",{})}catch(t){throw console.error("Failed to fetch game info:",t),new Error("The game is currently not available. Please try again later.")}}(this.endpoint,this.gameId);this.vendorGameId=null==r?void 0:r.type,this.playTypes=null===(e=null===(t=null==r?void 0:r.rules)||void 0===t?void 0:t.poolGame)||void 0===e?void 0:e.playTypes,this.bettingTypes=null===(i=null===(n=null==r?void 0:r.rules)||void 0===n?void 0:n.poolGame)||void 0===i?void 0:i.bettingTypes}catch(t){console.log(t)}}findLatestDateIdx(t){const e=new Date;let n=0,i=1/0;return t.forEach(((t,r)=>{const s=new Date(t),o=Math.abs(function(t,e){return f(2,arguments),g(t).getTime()-g(e).getTime()}(e,s));o<i&&(i=o,n=r)})),n}async fetDrawList(){try{const t={status:"PAYABLE",limit:9999},{items:e}=await v(`${this.endpoint}/games/${this.gameId}/draws${function(t){const e={};Object.entries(t).forEach((([t,n])=>{x(n,!0)||(e[t]=n)}));const n=Object.entries(e).map((([t,e])=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`)).join("&");return n?`?${n}`:""}(t)}`,"GET");if(!e||0===e.length)return;const n=e;n.sort(((t,e)=>t.date.localeCompare(e.date))),this.drawList=n,this.hasDrawDates=n.map((t=>t.date)),this.curDrawItemIdx=this.findLatestDateIdx(this.hasDrawDates),this.lastestDate=this.hasDrawDates[this.curDrawItemIdx],this.curDrawItem=n[this.curDrawItemIdx],this.curDrawSelectionBettingType=n[this.curDrawItemIdx].winningNumbers[0].winning_type,this.curDrawItem.winningNumbers.forEach((t=>{this.curDrawSelectionMap[t.winning_type]=[T(t.poolGameOutcomes)]})),this.curDrawItem.prizes.forEach((t=>{const e=t.winningType;this.curPrizeMap[e]?(this.curPrizeMap[e].push(t),this.curPrizeMap[e].sort(((t,e)=>e.totalAmount.value-t.totalAmount.value))):this.curPrizeMap[e]=[t]})),this.curDrawSelection=this.curDrawSelectionMap[this.curDrawSelectionBettingType],this.curPrizes=this.curPrizeMap[this.curDrawSelectionBettingType]}catch(t){console.log(t)}}get displayedPrizes(){return[...this.curPrizes.filter((t=>t.divisionDisplayName.includes("Correct"))).sort(((t,e)=>{const n=Number(t.divisionDisplayName.match(/\d+/)[0]);return Number(null==e?void 0:e.divisionDisplayName.match(/\d+/)[0])-n})),...this.curPrizes.filter((t=>"Bonus"===t.divisionDisplayName))]}changeCurDateItem(t){this.lastestDate=this.hasDrawDates[t],this.curDrawItemIdx=t,this.curDrawItem=this.drawList[t],this.curDrawSelectionBettingType=this.curDrawItem.winningNumbers[0].winning_type,this.curDrawItem.winningNumbers.forEach((t=>{this.curDrawSelectionMap[t.winning_type]=[T(t.poolGameOutcomes)]})),this.curPrizeMap={},this.curDrawItem.prizes.forEach((t=>{const e=t.winningType;this.curPrizeMap[e]?(this.curPrizeMap[e].push(t),this.curPrizeMap[e].sort(((t,e)=>e.totalAmount.value-t.totalAmount.value))):this.curPrizeMap[e]=[t]})),this.curDrawSelection=this.curDrawSelectionMap[this.curDrawSelectionBettingType],this.curPrizes=this.curPrizeMap[this.curDrawSelectionBettingType],this.getTurnOver()}handleChangeDate(t){this.changeCurDateItem(t.detail)}preDraw(){this.curDrawItemIdx>0&&this.changeCurDateItem(--this.curDrawItemIdx)}nextDraw(){this.curDrawItemIdx<this.drawList.length-1&&this.changeCurDateItem(++this.curDrawItemIdx)}async getTurnOver(){var t,e,n;if(null===(t=this.curDrawItem)||void 0===t?void 0:t.id)try{this.isLoadingTurnover=!0;const t=await async function({endpoint:t,gameId:e,drawId:n}){try{return await v(`${t}/games/${e}/draws/${n}/saleStatistics`)}catch(t){return Promise.reject(t)}}({endpoint:this.endpoint,gameId:this.vendorGameId,drawId:this.curDrawItem.id});this.curTurnOver=null!==(n=null===(e=null==t?void 0:t.wagerSegment)||void 0===e?void 0:e.totalSalesCrossDraw)&&void 0!==n?n:0}catch(t){console.error(t)}finally{this.isLoadingTurnover=!1}}handleDrawBettingTypeChange(t){this.curDrawSelectionBettingType=t,this.curDrawSelection=this.curDrawSelectionMap[this.curDrawSelectionBettingType],this.curPrizes=this.curPrizeMap[this.curDrawSelectionBettingType],this.getTurnOver()}getBettingTypeName(t){var e,n;const i=null===(n=null===(e=this.bettingTypes)||void 0===e?void 0:e.find((e=>e.code===t)))||void 0===n?void 0:n.name;return null!=i?i:t}render(){return n("div",{key:"516bc959365fa133d2dcff466e24c932628f3d55",class:"lottery-tipping-latest-result",ref:t=>this.stylingContainer=t},this.curDrawSelection&&this.curDrawSelection.length>0&&n("div",{key:"f059aa26c5aaa24b6b6c8896a8faef64e4787ddb",class:"result-wrapper"},n("div",{key:"510c2e70ddd92bee503fa4dce06171640ddc6a49",class:"date-selection"},n("div",{key:"53a38dca7a49f64e6f17588008ff2917af5862c6",class:"date-selection-leftIcon",innerHTML:L,onClick:this.preDraw.bind(this)}),n("div",{key:"8038c06d44dadf692dc43c7e32573777682fdf64",class:"date-selection-calendar"},n("lottery-tipping-calendar",{key:"c73630103acd314e5ad36f7e2e432909c8b6bd82",date:this.lastestDate,highLightDates:this.hasDrawDates,language:this.language,"mb-source":this.mbSource,"client-styling-url":this.clientStylingUrl,"translation-url":this.translationUrl})),n("div",{key:"439399feaf89a3ec2d02721eacac3f072a6cce6c",class:"date-selection-rightIcon",innerHTML:j,onClick:this.nextDraw.bind(this)})),n("div",{key:"889338084aaba2061e22f4ba6432fe776ca965e5",class:"winning-result"},n("div",{key:"4f32680505bdde15fdb30072e0cbeff5f05c122d",class:"betting-type"},n("div",{key:"bcbab767beac80766f944790023d6a6025bbb5c3",class:"betting-type-title"},w("bettingType",this.language)),n("div",{key:"fb4fe1ad80c557f934b49e9c33916432c9633d57",class:"betting-type-text"},n("div",{key:"76fb553eb922d6b48926a087aa7217a8cc188248",class:"LotteryTippingTicketController__segmented-control"},Object.keys(this.curDrawSelectionMap).map((t=>n("button",{class:{LotteryTippingTicketController__segment:!0,"LotteryTippingTicketController__segment--active":this.curDrawSelectionBettingType===t},onClick:this.handleDrawBettingTypeChange.bind(this,t)},this.getBettingTypeName(t))))))),n("lottery-tipping-ticket-bet",{key:"4c7f8f1078974c0bc7f0297cff32483c780b4f49","session-id":this.sessionId,endpoint:this.endpoint,"game-id":this.vendorGameId,"draw-id":this.curDrawItem.id,"default-bullet-config-line-group":JSON.stringify(this.curDrawSelection),"read-pretty":!0,"total-pages":this.curDrawSelection.length,language:this.language,"mb-source":this.mbSource,"client-styling-url":this.clientStylingUrl,"translation-url":this.translationUrl})),this.isLoadingTurnover?n("div",{class:"loading-wrap"},n("ui-skeleton",{structure:"title",width:"140px",height:"30px"}),n("ui-skeleton",{structure:"rectangle",width:"100%",height:"30px"}),n("ui-skeleton",{structure:"rectangle",width:"100%",height:"30px"}),n("ui-skeleton",{structure:"rectangle",width:"100%",height:"30px"}),n("ui-skeleton",{structure:"rectangle",width:"100%",height:"30px"})):n("div",{class:"prize-result"},n("div",{class:"prize-result-title"},w("prizeAllocation",this.language,{turnover:S(this.curTurnOver)})),n("div",{class:"prize-result-table"},n("div",{class:"prize-result-table-header"},n("div",{class:"prize-result-table-row"},n("div",{class:"prize-result-table-column"},w("prizes",this.language)),n("div",{class:"prize-result-table-column"},w("numberOfWinners",this.language)),n("div",{class:"prize-result-table-column"},w("prizeMoney",this.language)))),n("div",{class:"prize-result-table-body"},this.displayedPrizes.map((t=>n("div",{class:"prize-result-table-row"},n("div",{class:"prize-result-table-column"},t.divisionDisplayName),n("div",{class:"prize-result-table-column"},t.players),n("div",{class:"prize-result-table-column"},C(t.totalAmount.value))))))))),0==this.curDrawSelection.length&&!this.isLoading&&n("div",{key:"93fd51e592eff954015ffbc6bf7230713441f7dd"},w("noLatestResult",this.language)),this.isLoading&&n("div",{key:"eb1a90026da5e7cd92936f18840acdc3ce95ebf4",class:"loading-wrap"},w("loading",this.language)))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};O.style=".lottery-tipping-latest-result {\n padding: 16px;\n container-type: inline-size;\n background-color: var(--emw--color-background, #fff);\n}\n.lottery-tipping-latest-result .date-selection {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 24px;\n width: 400px;\n}\n.lottery-tipping-latest-result .date-selection-leftIcon, .lottery-tipping-latest-result .date-selection-rightIcon {\n cursor: pointer;\n}\n\n.LotteryTippingTicketController__segmented-control {\n height: 2.2rem;\n display: inline-flex;\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n border-radius: 2rem;\n padding: 0.2rem;\n}\n.LotteryTippingTicketController__segment {\n background-color: transparent;\n border: none;\n padding: 0.3rem 0.8rem;\n cursor: pointer;\n font-weight: 500;\n border-radius: 2rem;\n outline: none;\n transition: background-color 0.25s ease, color 0.25s ease;\n white-space: nowrap;\n color: var(--emw--color-typography, #000);\n}\n.LotteryTippingTicketController__segment--active {\n background-color: var(--emw--color-background, #fff);\n color: var(--emw--color-typography, #000);\n font-weight: 600;\n}\n.LotteryTippingTicketController__segment:not(.LotteryTippingTicketController__segment--active):hover {\n background-color: var(--emw--color-background-tertiary, #ccc);\n}\n\n.betting-type {\n margin-bottom: 16px;\n display: flex;\n align-items: center;\n gap: 20px;\n}\n.betting-type-title {\n font-weight: 600;\n font-size: 16px;\n color: var(--emw--color-typography-secondary, #333);\n}\n.betting-type-text {\n font-size: 16px;\n}\n\n.result-wrapper {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 60%;\n margin: 0 auto;\n}\n.result-wrapper .winning-result {\n width: 100%;\n margin-top: 20px;\n}\n.result-wrapper .loading-wrap {\n width: 100%;\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n.result-wrapper .prize-result {\n width: 100%;\n margin-top: 20px;\n}\n.result-wrapper .prize-result-title {\n font-size: 16px;\n font-weight: 600;\n margin-bottom: 12px;\n color: var(--emw--color-typography-secondary, #333);\n}\n.result-wrapper .prize-result-table {\n width: 100%;\n}\n.result-wrapper .prize-result-table-row {\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-evenly;\n}\n.result-wrapper .prize-result-table-column {\n text-align: left;\n padding: 12px 14px;\n width: 160px;\n font-size: 14px;\n width: calc((100% - 2px) / 3);\n color: var(--emw--color-typography, #000);\n}\n.result-wrapper .prize-result-table-header {\n width: 100%;\n background-color: var(--emw--color-background-secondary, #e6e6e6);\n border-radius: 4px;\n}\n.result-wrapper .prize-result-table-body {\n background-color: var(--emw--color-background-tertiary, #fff);\n}\n.result-wrapper .prize-result-table .prize-result-table-header .prize-result-table-column {\n color: var(--emw--color-typography, #000);\n font-weight: 600;\n border-right: 1px solid var(--emw--color-background, #fff);\n}\n.result-wrapper .prize-result-table .prize-result-table-body .prize-result-table-row:hover {\n color: var(--emw--color-typography, #000);\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n}\n\n@container (max-width: 980px) and (min-width: 780px) {\n .result-wrapper {\n width: 84%;\n }\n}\n@container (max-width: 780px) and (min-width: 480px) {\n .result-wrapper {\n width: 100%;\n }\n}\n@container (max-width: 480px) {\n .result-wrapper {\n width: 100%;\n }\n .result-wrapper .winning-result {\n width: 100%;\n margin-top: 14px;\n }\n .result-wrapper .prize-result {\n width: 100%;\n }\n .result-wrapper .prize-result-table-column {\n padding: 6px;\n width: 100px;\n }\n}";export{O as L,r as R,p as _,h as a,u as b,a as c,w as d,i as e,m as g,f as r,d as s,g as t}
@@ -1,4 +1,5 @@
1
1
  import "../../../../../../dist/packages/stencil/lottery-tipping-ticket-bet/dist/types/index";
2
+ import { EventEmitter } from '../../stencil-public-runtime';
2
3
  import { BettingType, DrawItem, PlayType, Prize } from '../../models';
3
4
  import "../../../../../../dist/packages/stencil/ui-skeleton/dist/types/index";
4
5
  export declare class LotteryTippingLatestResult {
@@ -53,6 +54,7 @@ export declare class LotteryTippingLatestResult {
53
54
  isLoadingTurnover: boolean;
54
55
  private stylingContainer;
55
56
  private stylingSubscription;
57
+ lotteryTippingFetchDataError: EventEmitter<any>;
56
58
  handleClientStylingChange(newValue: any, oldValue: any): void;
57
59
  handleClientStylingUrlChange(newValue: any, oldValue: any): void;
58
60
  handleMbSourceChange(newValue: any, oldValue: any): void;
@@ -52,6 +52,10 @@ export interface LotteryTippingCalendarCustomEvent<T> extends CustomEvent<T> {
52
52
  detail: T;
53
53
  target: HTMLLotteryTippingCalendarElement;
54
54
  }
55
+ export interface LotteryTippingLatestResultCustomEvent<T> extends CustomEvent<T> {
56
+ detail: T;
57
+ target: HTMLLotteryTippingLatestResultElement;
58
+ }
55
59
  declare global {
56
60
  interface HTMLLotteryTippingCalendarElementEventMap {
57
61
  "changeDate": number;
@@ -70,7 +74,18 @@ declare global {
70
74
  prototype: HTMLLotteryTippingCalendarElement;
71
75
  new (): HTMLLotteryTippingCalendarElement;
72
76
  };
77
+ interface HTMLLotteryTippingLatestResultElementEventMap {
78
+ "lotteryTippingLatestResultError": any;
79
+ }
73
80
  interface HTMLLotteryTippingLatestResultElement extends Components.LotteryTippingLatestResult, HTMLStencilElement {
81
+ addEventListener<K extends keyof HTMLLotteryTippingLatestResultElementEventMap>(type: K, listener: (this: HTMLLotteryTippingLatestResultElement, ev: LotteryTippingLatestResultCustomEvent<HTMLLotteryTippingLatestResultElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
82
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
83
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
84
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
85
+ removeEventListener<K extends keyof HTMLLotteryTippingLatestResultElementEventMap>(type: K, listener: (this: HTMLLotteryTippingLatestResultElement, ev: LotteryTippingLatestResultCustomEvent<HTMLLotteryTippingLatestResultElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
86
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
87
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
88
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
74
89
  }
75
90
  var HTMLLotteryTippingLatestResultElement: {
76
91
  prototype: HTMLLotteryTippingLatestResultElement;
@@ -111,6 +126,7 @@ declare namespace LocalJSX {
111
126
  * Client custom styling via message bus
112
127
  */
113
128
  "mbSource"?: string;
129
+ "onLotteryTippingLatestResultError"?: (event: LotteryTippingLatestResultCustomEvent<any>) => void;
114
130
  /**
115
131
  * Player ID
116
132
  */
@@ -9,5 +9,5 @@ export declare const parseEachLineNumber: (outcomes: string[][][]) => {
9
9
  value: any;
10
10
  }[][];
11
11
  export declare function thousandSeperator(value: number | string): string;
12
- export declare function formattedTurnover(turnover: number | null | undefined): string;
12
+ export declare function formattedTurnover(turnover: number | null | undefined, unit?: string): string;
13
13
  export declare function fetchGameInfo(endpoint: string, gameId: string): Promise<GameInfo>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/lottery-tipping-latest-result",
3
- "version": "1.87.27",
3
+ "version": "1.87.29",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1 +0,0 @@
1
- import{r as t,h as e}from"./index-52961f92.js";const n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};var r=function(){return r=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},r.apply(this,arguments)},s={primaryColor:"#333",secondaryColor:"#E6E6E6"};function o(t,e){if(void 0===e&&(e={}),"function"==typeof t.icon){var n=e.placeholders||s;return a(t.icon(n.primaryColor,n.secondaryColor),e)}return a(t.icon,e)}function a(t,e){var n="svg"===t.tag?r(r({},t.attrs),e.extraSVGAttrs||{}):t.attrs,i=Object.keys(n).reduce((function(t,e){var i=n[e],r="".concat(e,'="').concat(i,'"');return t.push(r),t}),[]),s=i.length?" "+i.join(" "):"",o=(t.children||[]).map((function(t){return a(t,e)})).join("");return o&&o.length?"<".concat(t.tag).concat(s,">").concat(o,"</").concat(t.tag,">"):"<".concat(t.tag).concat(s," />")}const l="__WIDGET_GLOBAL_STYLE_CACHE__";function c(t,e){if(t){const n=document.createElement("style");n.innerHTML=e,t.appendChild(n)}}function d(t,e){if(!t||!e)return;const n=new URL(e);fetch(n.href).then((t=>t.text())).then((e=>{const n=document.createElement("style");n.innerHTML=e,t&&t.appendChild(n)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function h(t,e,n,i=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!i)return n=function(t,e){const n=document.createElement("style");return window.emMessageBus.subscribe(e,(e=>{t&&(n.innerHTML=e,t.appendChild(n))}))}(t,e),n;window[l]||(window[l]={}),n=function(t,e){return window.emMessageBus.subscribe(e,(n=>{if(!t)return;const i=t.getRootNode(),r=window[l];let s=r[e]?.sheet;s?r[e].refCount=r[e].refCount+1:(s=new CSSStyleSheet,s.replaceSync(n),r[e]={sheet:s,refCount:1});const o=i.adoptedStyleSheets||[];o.includes(s)||(i.adoptedStyleSheets=[...o,s])}))}(t,e);const r=n.unsubscribe.bind(n);return n.unsubscribe=()=>{if(window[l][e]){const t=window[l][e];t.refCount>1?t.refCount=t.refCount-1:delete window[l][e]}r()},n}function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function p(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function g(t){p(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===u(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}const f=["ro","en","fr","ar","hr"],b={en:{weeks:["Su","Mo","Tu","We","Th","Fr","Sa"],bettingType:"Betting Type:",prizeAllocation:"Prize Allocation (Turnover: {turnover})",prizes:"Prizes",numberOfWinners:"Number of Winners",prizeMoney:"Prize Money",noLatestResult:"No latest result.",loading:"Loading...."},ro:{bettingType:"Tip de pariu:",prizeAllocation:"Alocarea premiilor (Cifră de afaceri: €{turnover})",prizes:"Premii",numberOfWinners:"Număr de câștigători",prizeMoney:"Bani de premiu",noLatestResult:"Niciun rezultat recent.",loading:"Se încarcă...."},fr:{bettingType:"Type de pari:",prizeAllocation:"Répartition des prix (Chiffre d'affaires: € {turnover})",prizes:"Prix",numberOfWinners:"Nombre de gagnants",prizeMoney:"Prix en argent",noLatestResult:"Aucun résultat récent.",loading:"Chargement...."},ar:{bettingType:"نوع الرهان:",prizeAllocation:"تخصيص الجائزة (دوران: € {turnover})",prizes:"الجوائز",numberOfWinners:"عدد الفائزين",prizeMoney:"أموال الجائزة",noLatestResult:"لا يوجد أحدث نتيجة.",loading:"جار التحميل...."},hr:{bettingType:"Vrsta oklade:",prizeAllocation:"Raspodjela nagrada (Promet: € {turnover})",prizes:"Nagrade",numberOfWinners:"Broj pobjednika",prizeMoney:"Novčana nagrada",noLatestResult:"Nema najnovijih rezultata.",loading:"Učitavanje...."}},y=(t,e,n)=>{const i=e;let r=b[void 0!==i&&f.includes(i)?i:"en"][t];return n&&Object.keys(n).forEach((t=>{r=r.replace(`{${t}}`,n[t])})),r},w=t=>{Object.keys(t).forEach((e=>{for(let n in t[e])b[e][n]=t[e][n]}))};function m(t,e="GET",n=null,i={}){return new Promise(((r,s)=>{const o="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})),a=Object.assign({"Content-Type":"application/json"},i);"GET"!==e&&"HEAD"!==e&&(a["X-Idempotency-Key"]=o);const l={method:e,headers:a,body:null};n&&"GET"!==e&&"HEAD"!==e?l.body=JSON.stringify(n):delete l.body,fetch(t,l).then((t=>{if(!t.ok)throw new Error(`HTTP error! Status: ${t.status}`);return t.json()})).then((t=>r(t))).catch((t=>s(t)))}))}function v(t,e){return null==t||""===t||(0!==t||!e)&&(Array.isArray(t)?function(t){if(0===t.length)return!0;const e=t.length;let n=0;for(let i=0;i<e;i++){if(!v(t[i]))return!1;n++}return n===e}(t):"[object Object]"===Object.prototype.toString.call(t)?function(t){if(0===Object.keys(t).length)return!0;const e=Object.keys(t).length;let n=0;for(const e of Object.values(t)){if(!v(e))return!1;n++}return n===e}(t):!t)}const x={0:"1",1:"X",2:"2"},z={H:0,D:1,A:2},k=t=>t.map((t=>{const e=[0,0,0];return t[0].forEach((t=>{const n=z[t];void 0!==n&&(e[n]=1)})),e.map(((t,e)=>({isSelected:1===t,value:x[e]})))}));function T(t){if(0===t)return"0";if(!t)return"";const e=(t=t.toString()).split(".");return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),e.join(".")}const C=o(n,{extraSVGAttrs:{width:"16px",height:"16px",fill:""}}),S=o(i,{extraSVGAttrs:{width:"16px",height:"16px",fill:""}}),L=class{constructor(e){t(this,e),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.endpoint=void 0,this.gameId=void 0,this.playerId=void 0,this.sessionId=void 0,this.hasDrawDates=["2025-05-28T02:00:00Z","2025-05-16T02:00:00Z"],this.lastestDate="2025-05-28T02:00:00Z",this.drawList=void 0,this.curDrawItem=void 0,this.curDrawItemIdx=0,this.curDrawSelection=[],this.curDrawSelectionBettingType=void 0,this.curDrawSelectionMap={},this.curPrizes=void 0,this.curPrizeMap={},this.curTurnOver=0,this.isLoading=!0,this.playTypes=null,this.bettingTypes=void 0,this.vendorGameId=void 0,this.isLoadingTurnover=!1}handleClientStylingChange(t,e){t!=e&&c(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&d(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentWillLoad(){this.translationUrl&&w(JSON.parse(this.translationUrl)),this.initData()}async initData(){try{this.isLoading=!0,await Promise.all([this.getGameById(),this.fetDrawList()]),this.getTurnOver()}catch(t){console.error(t)}finally{this.isLoading=!1}}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&c(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&d(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}async getGameById(){var t,e,n,i;try{const r=await async function(t,e){try{return await m(`${t}/games/${e}`,"GET",{})}catch(t){throw console.error("Failed to fetch game info:",t),new Error("The game is currently not available. Please try again later.")}}(this.endpoint,this.gameId);this.vendorGameId=null==r?void 0:r.type,this.playTypes=null===(e=null===(t=null==r?void 0:r.rules)||void 0===t?void 0:t.poolGame)||void 0===e?void 0:e.playTypes,this.bettingTypes=null===(i=null===(n=null==r?void 0:r.rules)||void 0===n?void 0:n.poolGame)||void 0===i?void 0:i.bettingTypes}catch(t){console.log(t)}}findLatestDateIdx(t){const e=new Date;let n=0,i=1/0;return t.forEach(((t,r)=>{const s=new Date(t),o=Math.abs(function(t,e){return p(2,arguments),g(t).getTime()-g(e).getTime()}(e,s));o<i&&(i=o,n=r)})),n}async fetDrawList(){try{const t={status:"PAYABLE",limit:9999},{items:e}=await m(`${this.endpoint}/games/${this.gameId}/draws${function(t){const e={};Object.entries(t).forEach((([t,n])=>{v(n,!0)||(e[t]=n)}));const n=Object.entries(e).map((([t,e])=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`)).join("&");return n?`?${n}`:""}(t)}`,"GET");if(!e||0===e.length)return;const n=e;n.sort(((t,e)=>t.date.localeCompare(e.date))),this.drawList=n,this.hasDrawDates=n.map((t=>t.date)),this.curDrawItemIdx=this.findLatestDateIdx(this.hasDrawDates),this.lastestDate=this.hasDrawDates[this.curDrawItemIdx],this.curDrawItem=n[this.curDrawItemIdx],this.curDrawSelectionBettingType=n[this.curDrawItemIdx].winningNumbers[0].winning_type,this.curDrawItem.winningNumbers.forEach((t=>{this.curDrawSelectionMap[t.winning_type]=[k(t.poolGameOutcomes)]})),this.curDrawItem.prizes.forEach((t=>{const e=t.winningType;this.curPrizeMap[e]?(this.curPrizeMap[e].push(t),this.curPrizeMap[e].sort(((t,e)=>e.totalAmount.value-t.totalAmount.value))):this.curPrizeMap[e]=[t]})),this.curDrawSelection=this.curDrawSelectionMap[this.curDrawSelectionBettingType],this.curPrizes=this.curPrizeMap[this.curDrawSelectionBettingType]}catch(t){console.log(t)}}get displayedPrizes(){return[...this.curPrizes.filter((t=>t.divisionDisplayName.includes("Correct"))).sort(((t,e)=>{const n=Number(t.divisionDisplayName.match(/\d+/)[0]);return Number(null==e?void 0:e.divisionDisplayName.match(/\d+/)[0])-n})),...this.curPrizes.filter((t=>"Bonus"===t.divisionDisplayName))]}changeCurDateItem(t){this.lastestDate=this.hasDrawDates[t],this.curDrawItemIdx=t,this.curDrawItem=this.drawList[t],this.curDrawSelectionBettingType=this.curDrawItem.winningNumbers[0].winning_type,this.curDrawItem.winningNumbers.forEach((t=>{this.curDrawSelectionMap[t.winning_type]=[k(t.poolGameOutcomes)]})),this.curPrizeMap={},this.curDrawItem.prizes.forEach((t=>{const e=t.winningType;this.curPrizeMap[e]?(this.curPrizeMap[e].push(t),this.curPrizeMap[e].sort(((t,e)=>e.totalAmount.value-t.totalAmount.value))):this.curPrizeMap[e]=[t]})),this.curDrawSelection=this.curDrawSelectionMap[this.curDrawSelectionBettingType],this.curPrizes=this.curPrizeMap[this.curDrawSelectionBettingType],this.getTurnOver()}handleChangeDate(t){this.changeCurDateItem(t.detail)}preDraw(){this.curDrawItemIdx>0&&this.changeCurDateItem(--this.curDrawItemIdx)}nextDraw(){this.curDrawItemIdx<this.drawList.length-1&&this.changeCurDateItem(++this.curDrawItemIdx)}async getTurnOver(){var t,e,n;if(null===(t=this.curDrawItem)||void 0===t?void 0:t.id)try{this.isLoadingTurnover=!0;const t=await async function({endpoint:t,gameId:e,drawId:n}){try{return await m(`${t}/games/${e}/draws/${n}/saleStatistics`)}catch(t){return Promise.reject(t)}}({endpoint:this.endpoint,gameId:this.vendorGameId,drawId:this.curDrawItem.id});this.curTurnOver=null!==(n=null===(e=null==t?void 0:t.wagerSegment)||void 0===e?void 0:e.totalSalesCrossDraw)&&void 0!==n?n:0}catch(t){console.error(t)}finally{this.isLoadingTurnover=!1}}handleDrawBettingTypeChange(t){this.curDrawSelectionBettingType=t,this.curDrawSelection=this.curDrawSelectionMap[this.curDrawSelectionBettingType],this.curPrizes=this.curPrizeMap[this.curDrawSelectionBettingType],this.getTurnOver()}getBettingTypeName(t){var e,n;const i=null===(n=null===(e=this.bettingTypes)||void 0===e?void 0:e.find((e=>e.code===t)))||void 0===n?void 0:n.name;return null!=i?i:t}render(){return e("div",{key:"e104fc35ddcdaad1e461bcc867f779dc90254bc6",class:"lottery-tipping-latest-result",ref:t=>this.stylingContainer=t},this.curDrawSelection&&this.curDrawSelection.length>0&&e("div",{key:"085e418338a52262e8866f300be8e67f4d3bbfc7",class:"result-wrapper"},e("div",{key:"7cf61f06f845fb6aabe53896163fa402b1e52a26",class:"date-selection"},e("div",{key:"da4abd68318c454324a665f6e02257dda4f224be",class:"date-selection-leftIcon",innerHTML:C,onClick:this.preDraw.bind(this)}),e("div",{key:"938f8f160c10eae2678dc7a98027a3421409f096",class:"date-selection-calendar"},e("lottery-tipping-calendar",{key:"c8048c6977b3740b8d2e0e7eff3292c329cdc4be",date:this.lastestDate,highLightDates:this.hasDrawDates,language:this.language,"mb-source":this.mbSource,"client-styling-url":this.clientStylingUrl,"translation-url":this.translationUrl})),e("div",{key:"eb17af80ec1b1c38f9d51b878013477290c824d7",class:"date-selection-rightIcon",innerHTML:S,onClick:this.nextDraw.bind(this)})),e("div",{key:"ab7ad2efffe5f9437db6a77b0b0c60e3d9454c5e",class:"winning-result"},e("div",{key:"e6a7ae5ba4c6c967858bb6e4e9a7a75246ec86f2",class:"betting-type"},e("div",{key:"341e5ee07c3e588b154d3a73373bed40a8e51a90",class:"betting-type-title"},y("bettingType",this.language)),e("div",{key:"f824ded5140f92aee54748939fecb5aac692cd6f",class:"betting-type-text"},e("div",{key:"85cb8c0a387b378b36f05af6703c023d9b0819f9",class:"LotteryTippingTicketController__segmented-control"},Object.keys(this.curDrawSelectionMap).map((t=>e("button",{class:{LotteryTippingTicketController__segment:!0,"LotteryTippingTicketController__segment--active":this.curDrawSelectionBettingType===t},onClick:this.handleDrawBettingTypeChange.bind(this,t)},this.getBettingTypeName(t))))))),e("lottery-tipping-ticket-bet",{key:"06293a063a9ac5f0f59ab8ec9033df764eadd511","session-id":this.sessionId,endpoint:this.endpoint,"game-id":this.vendorGameId,"draw-id":this.curDrawItem.id,"default-bullet-config-line-group":JSON.stringify(this.curDrawSelection),"read-pretty":!0,"total-pages":this.curDrawSelection.length,language:this.language,"mb-source":this.mbSource,"client-styling-url":this.clientStylingUrl,"translation-url":this.translationUrl})),this.isLoadingTurnover?e("div",{class:"loading-wrap"},e("ui-skeleton",{structure:"title",width:"140px",height:"30px"}),e("ui-skeleton",{structure:"rectangle",width:"100%",height:"30px"}),e("ui-skeleton",{structure:"rectangle",width:"100%",height:"30px"}),e("ui-skeleton",{structure:"rectangle",width:"100%",height:"30px"}),e("ui-skeleton",{structure:"rectangle",width:"100%",height:"30px"})):e("div",{class:"prize-result"},e("div",{class:"prize-result-title"},y("prizeAllocation",this.language,{turnover:(t=this.curTurnOver,null==t?"":`€${t?T(t):0}`)})),e("div",{class:"prize-result-table"},e("div",{class:"prize-result-table-header"},e("div",{class:"prize-result-table-row"},e("div",{class:"prize-result-table-column"},y("prizes",this.language)),e("div",{class:"prize-result-table-column"},y("numberOfWinners",this.language)),e("div",{class:"prize-result-table-column"},y("prizeMoney",this.language)))),e("div",{class:"prize-result-table-body"},this.displayedPrizes.map((t=>e("div",{class:"prize-result-table-row"},e("div",{class:"prize-result-table-column"},t.divisionDisplayName),e("div",{class:"prize-result-table-column"},t.players),e("div",{class:"prize-result-table-column"},T(t.totalAmount.value))))))))),0==this.curDrawSelection.length&&!this.isLoading&&e("div",{key:"9aa470442a1f2b4600d0f7727210e71cebf934c8"},y("noLatestResult",this.language)),this.isLoading&&e("div",{key:"4568a1cda8eca35552d84075fbc4507d397e3178",class:"loading-wrap"},y("loading",this.language)));var t}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};L.style=".lottery-tipping-latest-result {\n padding: 16px;\n container-type: inline-size;\n background-color: var(--emw--color-background, #fff);\n}\n.lottery-tipping-latest-result .date-selection {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 24px;\n width: 400px;\n}\n.lottery-tipping-latest-result .date-selection-leftIcon, .lottery-tipping-latest-result .date-selection-rightIcon {\n cursor: pointer;\n}\n\n.LotteryTippingTicketController__segmented-control {\n height: 2.2rem;\n display: inline-flex;\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n border-radius: 2rem;\n padding: 0.2rem;\n}\n.LotteryTippingTicketController__segment {\n background-color: transparent;\n border: none;\n padding: 0.3rem 0.8rem;\n cursor: pointer;\n font-weight: 500;\n border-radius: 2rem;\n outline: none;\n transition: background-color 0.25s ease, color 0.25s ease;\n white-space: nowrap;\n color: var(--emw--color-typography, #000);\n}\n.LotteryTippingTicketController__segment--active {\n background-color: var(--emw--color-background, #fff);\n color: var(--emw--color-typography, #000);\n font-weight: 600;\n}\n.LotteryTippingTicketController__segment:not(.LotteryTippingTicketController__segment--active):hover {\n background-color: var(--emw--color-background-tertiary, #ccc);\n}\n\n.betting-type {\n margin-bottom: 16px;\n display: flex;\n align-items: center;\n gap: 20px;\n}\n.betting-type-title {\n font-weight: 600;\n font-size: 16px;\n color: var(--emw--color-typography-secondary, #333);\n}\n.betting-type-text {\n font-size: 16px;\n}\n\n.result-wrapper {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 60%;\n margin: 0 auto;\n}\n.result-wrapper .winning-result {\n width: 100%;\n margin-top: 20px;\n}\n.result-wrapper .loading-wrap {\n width: 100%;\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n.result-wrapper .prize-result {\n width: 100%;\n margin-top: 20px;\n}\n.result-wrapper .prize-result-title {\n font-size: 16px;\n font-weight: 600;\n margin-bottom: 12px;\n color: var(--emw--color-typography-secondary, #333);\n}\n.result-wrapper .prize-result-table {\n width: 100%;\n}\n.result-wrapper .prize-result-table-row {\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-evenly;\n}\n.result-wrapper .prize-result-table-column {\n text-align: left;\n padding: 12px 14px;\n width: 160px;\n font-size: 14px;\n width: calc((100% - 2px) / 3);\n color: var(--emw--color-typography, #000);\n}\n.result-wrapper .prize-result-table-header {\n width: 100%;\n background-color: var(--emw--color-background-secondary, #e6e6e6);\n border-radius: 4px;\n}\n.result-wrapper .prize-result-table-body {\n background-color: var(--emw--color-background-tertiary, #fff);\n}\n.result-wrapper .prize-result-table .prize-result-table-header .prize-result-table-column {\n color: var(--emw--color-typography, #000);\n font-weight: 600;\n border-right: 1px solid var(--emw--color-background, #fff);\n}\n.result-wrapper .prize-result-table .prize-result-table-body .prize-result-table-row:hover {\n color: var(--emw--color-typography, #000);\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n}\n\n@container (max-width: 980px) and (min-width: 780px) {\n .result-wrapper {\n width: 84%;\n }\n}\n@container (max-width: 780px) and (min-width: 480px) {\n .result-wrapper {\n width: 100%;\n }\n}\n@container (max-width: 480px) {\n .result-wrapper {\n width: 100%;\n }\n .result-wrapper .winning-result {\n width: 100%;\n margin-top: 14px;\n }\n .result-wrapper .prize-result {\n width: 100%;\n }\n .result-wrapper .prize-result-table-column {\n padding: 6px;\n width: 100px;\n }\n}";export{L,i as R,u as _,d as a,h as b,o as c,y as d,n as e,w as g,p as r,c as s,g as t}