@everymatrix/lottery-tipping-ticket-history 1.80.11 → 1.80.13

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-d505438d.js');
6
- const lotteryTippingTicketHistory = require('./lottery-tipping-ticket-history-39cd3d64.js');
6
+ const lotteryTippingTicketHistory = require('./lottery-tipping-ticket-history-657d8a10.js');
7
7
 
8
8
  /**
9
9
  * Days in 1 week.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const lotteryTippingTicketHistory = require('./lottery-tipping-ticket-history-39cd3d64.js');
5
+ const lotteryTippingTicketHistory = require('./lottery-tipping-ticket-history-657d8a10.js');
6
6
  require('./index-d505438d.js');
7
7
 
8
8
 
@@ -2347,36 +2347,14 @@ function fetchRequest(url, method = 'GET', body = null, headers = {}) {
2347
2347
  fetch(url, options)
2348
2348
  .then((response) => {
2349
2349
  if (!response.ok) {
2350
- return response.json().then((errorData) => {
2351
- const error = {
2352
- status: response.status,
2353
- statusText: response.statusText,
2354
- code: errorData.code || 'UNKNOWN_ERROR',
2355
- message: errorData.message || 'An unknown error occurred',
2356
- data: errorData.data || null
2357
- };
2358
- reject(error);
2359
- }, () => reject({
2360
- status: response.status,
2361
- statusText: response.statusText,
2362
- code: 'PARSE_ERROR',
2363
- message: 'Failed to parse error response'
2364
- }));
2365
- }
2366
- else {
2367
- return response.json();
2350
+ throw new Error(`HTTP error! Status: ${response.status}`);
2368
2351
  }
2352
+ return response.json();
2369
2353
  })
2370
- .then((data) => resolve(data), (error) => reject(error));
2354
+ .then((data) => resolve(data))
2355
+ .catch((error) => reject(error));
2371
2356
  });
2372
2357
  }
2373
- const fetcher = (url) => fetch(url, {
2374
- method: 'GET',
2375
- headers: {
2376
- 'x-scheme': 'application/json',
2377
- Accept: 'application/json'
2378
- }
2379
- }).then((r) => r.json());
2380
2358
  function isEmptyValueOfArray(arr) {
2381
2359
  if (arr.length === 0) {
2382
2360
  return true;
@@ -2613,7 +2591,7 @@ const LotteryTippingTicketHistory = class {
2613
2591
  try {
2614
2592
  this.isLoading = true;
2615
2593
  let url = new URL(`${this.endpoint}/games/${this.gameId}`);
2616
- const res = await fetcher(url.href);
2594
+ const res = await fetchRequest(url.href, 'GET');
2617
2595
  this.rawData = res;
2618
2596
  }
2619
2597
  catch (e) {
@@ -2835,15 +2813,15 @@ const LotteryTippingTicketHistory = class {
2835
2813
  return name !== null && name !== void 0 ? name : bettingType;
2836
2814
  }
2837
2815
  render() {
2838
- return (index.h("div", { key: '9dbed4dca8e568a334c63748d1768ace33922270', class: "lottery-tipping-ticket-history", ref: (el) => (this.stylingContainer = el) }, index.h("div", { key: '4149c4c6f067be28f1334a8642790d9886d219ef', class: "ticket-history-title" }, translate('ticketsHistory', this.language)), index.h("div", { key: '185ac4ad602e6e8bb0ec025a5cc2c4a9b8418444', class: "filter-wrap" }, index.h("div", { key: 'd136c367780b696403f075b261f2009cc94edc5d', class: "filter-status" }, this.statusOptions.map((status) => (index.h("div", { class: 'filter-status-btn' + (this.activeStatus == status.value ? ' active' : ''), onClick: () => this.changeStatus(status.value) }, status.label)))), index.h("div", { key: 'e6a30ef0f8c957813a7b13238353709cfb9e2dd9', class: "filter-operation" }, index.h("lottery-tipping-filter", { key: '4e1e0ba0eeafd7e64344c2b8e4e7d0c0f097127b', "quick-filters-active": this.quickFiltersActive, language: this.language, "translation-url": this.translationUrl }))), this.isLoading && (index.h("div", { key: 'f572e1bd9cbf97948b9a9bda34f34c1407a8007e', class: "loading-wrap" }, index.h("section", { key: '9198457f400b175e4c9721449e49a987090860d9', class: "dots-container" }, index.h("div", { key: '0b1196e3ad2b05ef91965b2a52728e5386578e4b', class: "dot" }), index.h("div", { key: '19a5b0bc39fd931455a7972d66b640ca36685ea9', class: "dot" }), index.h("div", { key: '8bf3a43540d38c98d27cb7bf61d7595123a4739c', class: "dot" }), index.h("div", { key: '5ed33ee21018c3b2aae97a6b1345fdec2072fefe', class: "dot" }), index.h("div", { key: '2d4404c8e0d39dc82bb25554c242d27e091a9932', class: "dot" })))), !this.isLoading && (!this.ticketHistory || this.ticketHistory.length == 0) && (index.h("div", { key: '4b731612e57d8bde341da7d639dec6f245c7156d', class: "empty-wrap" }, translate('noData', this.language))), !this.isLoading && this.ticketHistory && this.ticketHistory.length != 0 && (index.h("div", { key: 'c9a17cc74f32ae9277d069a8633f38a8478e642c', class: "ticket-list-wrap" }, this.ticketHistory.map((item) => (index.h("lottery-tipping-panel", { "header-title": format(new Date(item.createdAt), 'dd/MM/yyyy HH:mm:ss') + ' ' + item.state }, index.h("div", { class: "panel-content", slot: "content" }, index.h("div", { class: "ticket-info" }, index.h("div", { class: "ticket-info-item" }, index.h("div", { class: "ticket-info-label" }, translate('ticketId', this.language)), index.h("div", { class: "ticket-info-val" }, item.id, " ")), index.h("div", { class: "ticket-info-item" }, index.h("div", { class: "ticket-info-label" }, translate('ticketType', this.language)), index.h("div", { class: "ticket-info-val" }, this.ticketTypeMap[item.wagerType], " ")), index.h("div", { class: "ticket-info-item" }, index.h("div", { class: "ticket-info-label" }, translate('ticketAmount', this.language)), index.h("div", { class: "ticket-info-val" }, `${item.amount} ${item.currency}`)), index.h("div", { class: "ticket-info-item" }, index.h("div", { class: "ticket-info-label" }, translate('lineDetail', this.language)), index.h("div", { class: "ticket-info-val" }, index.h("span", { class: "show-detail-link", onClick: () => this.handleShowTicketLineDetial(item) }, translate('seeDetails', this.language)))), index.h("div", { class: "ticket-info-item" }, index.h("div", { class: "ticket-info-label" }, translate('numberOfDraw', this.language)), index.h("div", { class: "ticket-info-val" }, item.drawCount))), item.state == 'Settled' &&
2839
- item.drawResults.map((drawResultItem) => (index.h("div", { class: "draw-info-container" }, drawResultItem.tempDrawData ? (index.h("div", { class: "draw-info" }, index.h("div", { class: "draw-info-item" }, index.h("div", { class: "draw-info-label" }, translate('ticketResult', this.language)), index.h("div", { class: "draw-info-val" }, this.resultMap[drawResultItem.state])), index.h("div", { class: "draw-info-item" }, index.h("div", { class: "draw-info-label" }, translate('drawId', this.language)), index.h("div", { class: "draw-info-val" }, drawResultItem.drawId)), index.h("div", { class: "draw-info-item" }, index.h("div", { class: "draw-info-label" }, translate('drawDate', this.language)), index.h("div", { class: "draw-info-val" }, format(new Date(drawResultItem.tempDrawData.date), 'dd/MM/yyyy'))), index.h("div", { class: "draw-info-item" }, index.h("div", { class: "draw-info-label" }, translate('result', this.language)), index.h("div", { class: "draw-info-val" }, index.h("span", { class: "show-detail-link", onClick: () => this.handleShowCurrentDraw(drawResultItem.tempDrawData) }, translate('seeDetails', this.language)))), drawResultItem.state === DrawResult.WON && (index.h("div", { class: "draw-info-item" }, index.h("div", { class: "draw-info-label" }, translate('prize', this.language)), index.h("div", { class: "draw-info-val1" }, index.h("div", { style: { height: '20px' } }), drawResultItem.prizeDetails.map((prizeItem) => (index.h("span", null, index.h("div", null, index.h("span", { style: { color: 'rgb(85, 85, 85)' } }, prizeItem.prizeName, prizeItem.times > 1 ? ' x ' + prizeItem.times : '', ":", ' '), index.h("span", { style: { 'margin-right': '4px', color: 'rgb(85, 85, 85)' } }, thousandSeperator(prizeItem.amount)), index.h("span", { style: { color: 'rgb(85, 85, 85)' } }, prizeItem.currency)))))))))) : (index.h("div", { class: "draw-info-skeleton" }, [...Array(5)].map(() => (index.h("div", { class: "skeleton-line" })))))))))))))), index.h("lottery-tipping-dialog", { key: '4ef7d281084bc6441e6a3e666ac52a7df3dfd28c', visible: this.showCurrentTicketLine, width: !isMobile(window.navigator.userAgent) ? '720px' : undefined, fullscreen: isMobile(window.navigator.userAgent), closable: true, showFooter: false, onCancel: () => {
2816
+ return (index.h("div", { key: '0a8574ec1ba181a07043ec0451dfca73f8aaaf9d', class: "lottery-tipping-ticket-history", ref: (el) => (this.stylingContainer = el) }, index.h("div", { key: 'f6f0f989a7b4e598e2d9c3d18c83d4f8b4595d84', class: "ticket-history-title" }, translate('ticketsHistory', this.language)), index.h("div", { key: 'e80a9d6e39d899fe6a210837853aacfea21a6cb3', class: "filter-wrap" }, index.h("div", { key: 'edeaca1e9062a0b9ef264151113bc6130f358017', class: "filter-status" }, this.statusOptions.map((status) => (index.h("div", { class: 'filter-status-btn' + (this.activeStatus == status.value ? ' active' : ''), onClick: () => this.changeStatus(status.value) }, status.label)))), index.h("div", { key: 'fdae8b8a796d62827530955449baf85152b4bd49', class: "filter-operation" }, index.h("lottery-tipping-filter", { key: '004a977ff4460be8e1fbffd22fb6a742401b6597', "quick-filters-active": this.quickFiltersActive, language: this.language, "translation-url": this.translationUrl }))), this.isLoading && (index.h("div", { key: '4142baea434e611b871f7b8712a8ed03961bf929', class: "loading-wrap" }, index.h("section", { key: 'd412ab2648dc168e76d13957b9d654522d0211e4', class: "dots-container" }, index.h("div", { key: '81cca835dff7b6708354d79ecdb804fd768dfdf5', class: "dot" }), index.h("div", { key: '4fd405a231c5560b014bc9dc34e8847daf197ab1', class: "dot" }), index.h("div", { key: 'b89f42119dc855255ffb27b7d12d525dca40ab20', class: "dot" }), index.h("div", { key: 'c9ce133fe12b41639719558922ab0651ed82f605', class: "dot" }), index.h("div", { key: '8a18cbe9892de938f731045c0d8a01a6f58ab19d', class: "dot" })))), !this.isLoading && (!this.ticketHistory || this.ticketHistory.length == 0) && (index.h("div", { key: 'c806d553da2223941f0e1a28a12f96088e0bd45d', class: "empty-wrap" }, translate('noData', this.language))), !this.isLoading && this.ticketHistory && this.ticketHistory.length != 0 && (index.h("div", { key: '4ac929f08ef09e5f18cfcb0424c489f8d513bc9b', class: "ticket-list-wrap" }, this.ticketHistory.map((item) => (index.h("lottery-tipping-panel", { "header-title": format(new Date(item.createdAt), 'dd/MM/yyyy HH:mm:ss') + ' ' + item.state }, index.h("div", { class: "panel-content", slot: "content" }, index.h("div", { class: "ticket-info" }, index.h("div", { class: "ticket-info-item" }, index.h("div", { class: "ticket-info-label" }, translate('ticketId', this.language)), index.h("div", { class: "ticket-info-val" }, item.id, " ")), index.h("div", { class: "ticket-info-item" }, index.h("div", { class: "ticket-info-label" }, translate('ticketType', this.language)), index.h("div", { class: "ticket-info-val" }, this.ticketTypeMap[item.wagerType], " ")), index.h("div", { class: "ticket-info-item" }, index.h("div", { class: "ticket-info-label" }, translate('ticketAmount', this.language)), index.h("div", { class: "ticket-info-val" }, `${item.amount} ${item.currency}`)), index.h("div", { class: "ticket-info-item" }, index.h("div", { class: "ticket-info-label" }, translate('lineDetail', this.language)), index.h("div", { class: "ticket-info-val" }, index.h("span", { class: "show-detail-link", onClick: () => this.handleShowTicketLineDetial(item) }, translate('seeDetails', this.language)))), index.h("div", { class: "ticket-info-item" }, index.h("div", { class: "ticket-info-label" }, translate('numberOfDraw', this.language)), index.h("div", { class: "ticket-info-val" }, item.drawCount))), item.state == 'Settled' &&
2817
+ item.drawResults.map((drawResultItem) => (index.h("div", { class: "draw-info-container" }, drawResultItem.tempDrawData ? (index.h("div", { class: "draw-info" }, index.h("div", { class: "draw-info-item" }, index.h("div", { class: "draw-info-label" }, translate('ticketResult', this.language)), index.h("div", { class: "draw-info-val" }, this.resultMap[drawResultItem.state])), index.h("div", { class: "draw-info-item" }, index.h("div", { class: "draw-info-label" }, translate('drawId', this.language)), index.h("div", { class: "draw-info-val" }, drawResultItem.drawId)), index.h("div", { class: "draw-info-item" }, index.h("div", { class: "draw-info-label" }, translate('drawDate', this.language)), index.h("div", { class: "draw-info-val" }, format(new Date(drawResultItem.tempDrawData.date), 'dd/MM/yyyy'))), index.h("div", { class: "draw-info-item" }, index.h("div", { class: "draw-info-label" }, translate('result', this.language)), index.h("div", { class: "draw-info-val" }, index.h("span", { class: "show-detail-link", onClick: () => this.handleShowCurrentDraw(drawResultItem.tempDrawData) }, translate('seeDetails', this.language)))), drawResultItem.state === DrawResult.WON && (index.h("div", { class: "draw-info-item" }, index.h("div", { class: "draw-info-label" }, translate('prize', this.language)), index.h("div", { class: "draw-info-val1" }, index.h("div", { style: { height: '20px' } }), drawResultItem.prizeDetails.map((prizeItem) => (index.h("span", null, index.h("div", null, index.h("span", { style: { color: 'rgb(85, 85, 85)' } }, prizeItem.prizeName, prizeItem.times > 1 ? ' x ' + prizeItem.times : '', ":", ' '), index.h("span", { style: { 'margin-right': '4px', color: 'rgb(85, 85, 85)' } }, thousandSeperator(prizeItem.amount)), index.h("span", { style: { color: 'rgb(85, 85, 85)' } }, prizeItem.currency)))))))))) : (index.h("div", { class: "draw-info-skeleton" }, [...Array(5)].map(() => (index.h("div", { class: "skeleton-line" })))))))))))))), index.h("lottery-tipping-dialog", { key: 'ef4cff5d933545372cef4f6eb4e7dcd1a8f6f111', visible: this.showCurrentTicketLine, width: !isMobile(window.navigator.userAgent) ? '720px' : undefined, fullscreen: isMobile(window.navigator.userAgent), closable: true, showFooter: false, onCancel: () => {
2840
2818
  this.showCurrentTicketLine = false;
2841
- }, language: this.language, "translation-url": this.translationUrl }, this.curSelection && this.curSelection.length && (index.h("div", { key: '0fe7ae0f7deceb8b3c939a401efafe70124411dd' }, index.h("div", { key: '5418df176032a83dbd05ee545fffc255694413a2', class: "betting-type" }, index.h("div", { key: '8fb74f2041677fe8876a54773451d00f53abe0df', class: "betting-type-title" }, translate('bettingType', this.language)), index.h("div", { key: 'b9bc169c4df854a59606d0ddf330707677720263', class: "betting-type-text" }, this.getBettingTypeName(this.getBettingType(this.curTicketItem.selection[this.curSelectionIdx].betType)))), index.h("lottery-tipping-ticket-bet", { key: 'e76e8c1a24b22668d82f54bfed708afb676f23c9', endpoint: this.endpoint, "session-id": this.sessionId, "game-id": this.curTicketItem.vendorGameId, "draw-id": this.curTicketItem.startingDrawId, "default-bullet-config-line-group": JSON.stringify(this.curSelection), "read-pretty": true, "total-pages": this.curSelection.length, language: this.language, "translation-url": this.translationUrl })))), index.h("lottery-tipping-dialog", { key: 'cf4220d7b9ef7a174ab059574e1d758096cf6f6c', visible: this.showCurrentDrawResult, width: !isMobile(window.navigator.userAgent) ? '720px' : undefined, fullscreen: isMobile(window.navigator.userAgent), closable: true, showFooter: false, onCancel: () => {
2819
+ }, language: this.language, "translation-url": this.translationUrl }, this.curSelection && this.curSelection.length && (index.h("div", { key: '817ee1fe2541a4ed62b944b58b7abb1eda7afdbe' }, index.h("div", { key: '68672db719f3cc643d6b17769c0a786b3c931a42', class: "betting-type" }, index.h("div", { key: 'af264555814c9e3262b64722438ecd449f451ceb', class: "betting-type-title" }, translate('bettingType', this.language)), index.h("div", { key: '25b9bff20eb5a221bed6d345412dd48964890ae7', class: "betting-type-text" }, this.getBettingTypeName(this.getBettingType(this.curTicketItem.selection[this.curSelectionIdx].betType)))), index.h("lottery-tipping-ticket-bet", { key: '4a01e6f1734e5165b06713d3dbb7484463cc1bf4', endpoint: this.endpoint, "session-id": this.sessionId, "game-id": this.curTicketItem.vendorGameId, "draw-id": this.curTicketItem.startingDrawId, "default-bullet-config-line-group": JSON.stringify(this.curSelection), "read-pretty": true, "total-pages": this.curSelection.length, language: this.language, "translation-url": this.translationUrl })))), index.h("lottery-tipping-dialog", { key: '06fd83f481eb08a4601a96353557a925b1205b66', visible: this.showCurrentDrawResult, width: !isMobile(window.navigator.userAgent) ? '720px' : undefined, fullscreen: isMobile(window.navigator.userAgent), closable: true, showFooter: false, onCancel: () => {
2842
2820
  this.showCurrentDrawResult = false;
2843
- }, language: this.language, "translation-url": this.translationUrl }, this.curDrawSelection && this.curDrawSelection.length && (index.h("div", { key: '61214e66f20708cf92fa12d9b3afa3feee2e4335' }, index.h("div", { key: '589010058422524a0b3478cee60fa13703d921e9', class: "betting-type" }, index.h("div", { key: '657e2cede56274839d1e56784e7f85e61c5b3a42', class: "betting-type-title" }, translate('bettingType', this.language)), index.h("div", { key: 'b2b77770d0d439d7a2d062943c1cb114a7e54574', class: "betting-type-text" }, index.h("div", { key: '8a9e0821b8165a9cc04c5be4b3eb7286bdcef21f', class: "LotteryTippingTicketController__segmented-control" }, Object.keys(this.curDrawSelectionMap).map((bettingType) => (index.h("button", { class: {
2821
+ }, language: this.language, "translation-url": this.translationUrl }, this.curDrawSelection && this.curDrawSelection.length && (index.h("div", { key: 'c9161334967e9e5abaae4a3d1df922ee7d8d7945' }, index.h("div", { key: 'c7a3ac60084056b899a2b59a6205cddbc8d4e7fc', class: "betting-type" }, index.h("div", { key: '97aa9e8c9048bb57f70d4230f29f8fde3aa4454a', class: "betting-type-title" }, translate('bettingType', this.language)), index.h("div", { key: '64332b20eabf75e9273bb6f16c16436e90b28346', class: "betting-type-text" }, index.h("div", { key: 'cbd1ec9e723c6a369a98141077e4648d802c76ad', class: "LotteryTippingTicketController__segmented-control" }, Object.keys(this.curDrawSelectionMap).map((bettingType) => (index.h("button", { class: {
2844
2822
  LotteryTippingTicketController__segment: true,
2845
2823
  'LotteryTippingTicketController__segment--active': this.curDrawSelectionBettingType === bettingType
2846
- }, onClick: () => this.handleDrawBettingTypeChange(bettingType) }, this.getBettingTypeName(bettingType))))))), index.h("lottery-tipping-ticket-bet", { key: '313e81c7d8181316896a2a46211d12ede72b5353', endpoint: this.endpoint, "session-id": this.sessionId, "game-id": this.curDrawItem.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, "translation-url": this.translationUrl })))), index.h("div", { key: '374d4a579f634ae631392b9e16a3a9acd0cf029c', class: "pagination-wrap" }, index.h("lottery-tipping-pagination", { key: '0a22fb6a1d59c391f2db3a2e20774a1b19491739', total: this.paginationInfo.total, current: this.paginationInfo.current, "page-size": this.paginationInfo.pageSize, language: this.language, "translation-url": this.translationUrl }))));
2824
+ }, onClick: () => this.handleDrawBettingTypeChange(bettingType) }, this.getBettingTypeName(bettingType))))))), index.h("lottery-tipping-ticket-bet", { key: '8b352410c87858e5629a5524e70134ccc2e1b116', endpoint: this.endpoint, "session-id": this.sessionId, "game-id": this.curDrawItem.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, "translation-url": this.translationUrl })))), index.h("div", { key: 'e730c86100cb47c4c63051174cd9b33dbb8e6ce4', class: "pagination-wrap" }, index.h("lottery-tipping-pagination", { key: 'dce4d6e9a18e783339d0ff545d1bd47bf1b2a33d', total: this.paginationInfo.total, current: this.paginationInfo.current, "page-size": this.paginationInfo.pageSize, language: this.language, "translation-url": this.translationUrl }))));
2847
2825
  }
2848
2826
  static get watchers() { return {
2849
2827
  "clientStyling": ["handleClientStylingChange"],
@@ -5,7 +5,7 @@ import { setClientStyling, setClientStylingURL, setStreamStyling } from "../../.
5
5
  import { format } from "date-fns";
6
6
  import { DrawResult } from "../../models";
7
7
  import { getTranslations, translate } from "../../utils/locale.utils";
8
- import { fetcher, fetchRequest, isMobile, parseEachLineNumber, showNotification, thousandSeperator, toQueryParams } from "../../utils/utils";
8
+ import { fetchRequest, isMobile, parseEachLineNumber, showNotification, thousandSeperator, toQueryParams } from "../../utils/utils";
9
9
  export class LotteryTippingTicketHistory {
10
10
  constructor() {
11
11
  this.ticketTypeMap = {
@@ -112,7 +112,7 @@ export class LotteryTippingTicketHistory {
112
112
  try {
113
113
  this.isLoading = true;
114
114
  let url = new URL(`${this.endpoint}/games/${this.gameId}`);
115
- const res = await fetcher(url.href);
115
+ const res = await fetchRequest(url.href, 'GET');
116
116
  this.rawData = res;
117
117
  }
118
118
  catch (e) {
@@ -334,15 +334,15 @@ export class LotteryTippingTicketHistory {
334
334
  return name !== null && name !== void 0 ? name : bettingType;
335
335
  }
336
336
  render() {
337
- return (h("div", { key: '9dbed4dca8e568a334c63748d1768ace33922270', class: "lottery-tipping-ticket-history", ref: (el) => (this.stylingContainer = el) }, h("div", { key: '4149c4c6f067be28f1334a8642790d9886d219ef', class: "ticket-history-title" }, translate('ticketsHistory', this.language)), h("div", { key: '185ac4ad602e6e8bb0ec025a5cc2c4a9b8418444', class: "filter-wrap" }, h("div", { key: 'd136c367780b696403f075b261f2009cc94edc5d', class: "filter-status" }, this.statusOptions.map((status) => (h("div", { class: 'filter-status-btn' + (this.activeStatus == status.value ? ' active' : ''), onClick: () => this.changeStatus(status.value) }, status.label)))), h("div", { key: 'e6a30ef0f8c957813a7b13238353709cfb9e2dd9', class: "filter-operation" }, h("lottery-tipping-filter", { key: '4e1e0ba0eeafd7e64344c2b8e4e7d0c0f097127b', "quick-filters-active": this.quickFiltersActive, language: this.language, "translation-url": this.translationUrl }))), this.isLoading && (h("div", { key: 'f572e1bd9cbf97948b9a9bda34f34c1407a8007e', class: "loading-wrap" }, h("section", { key: '9198457f400b175e4c9721449e49a987090860d9', class: "dots-container" }, h("div", { key: '0b1196e3ad2b05ef91965b2a52728e5386578e4b', class: "dot" }), h("div", { key: '19a5b0bc39fd931455a7972d66b640ca36685ea9', class: "dot" }), h("div", { key: '8bf3a43540d38c98d27cb7bf61d7595123a4739c', class: "dot" }), h("div", { key: '5ed33ee21018c3b2aae97a6b1345fdec2072fefe', class: "dot" }), h("div", { key: '2d4404c8e0d39dc82bb25554c242d27e091a9932', class: "dot" })))), !this.isLoading && (!this.ticketHistory || this.ticketHistory.length == 0) && (h("div", { key: '4b731612e57d8bde341da7d639dec6f245c7156d', class: "empty-wrap" }, translate('noData', this.language))), !this.isLoading && this.ticketHistory && this.ticketHistory.length != 0 && (h("div", { key: 'c9a17cc74f32ae9277d069a8633f38a8478e642c', class: "ticket-list-wrap" }, this.ticketHistory.map((item) => (h("lottery-tipping-panel", { "header-title": format(new Date(item.createdAt), 'dd/MM/yyyy HH:mm:ss') + ' ' + item.state }, h("div", { class: "panel-content", slot: "content" }, h("div", { class: "ticket-info" }, h("div", { class: "ticket-info-item" }, h("div", { class: "ticket-info-label" }, translate('ticketId', this.language)), h("div", { class: "ticket-info-val" }, item.id, " ")), h("div", { class: "ticket-info-item" }, h("div", { class: "ticket-info-label" }, translate('ticketType', this.language)), h("div", { class: "ticket-info-val" }, this.ticketTypeMap[item.wagerType], " ")), h("div", { class: "ticket-info-item" }, h("div", { class: "ticket-info-label" }, translate('ticketAmount', this.language)), h("div", { class: "ticket-info-val" }, `${item.amount} ${item.currency}`)), h("div", { class: "ticket-info-item" }, h("div", { class: "ticket-info-label" }, translate('lineDetail', this.language)), h("div", { class: "ticket-info-val" }, h("span", { class: "show-detail-link", onClick: () => this.handleShowTicketLineDetial(item) }, translate('seeDetails', this.language)))), h("div", { class: "ticket-info-item" }, h("div", { class: "ticket-info-label" }, translate('numberOfDraw', this.language)), h("div", { class: "ticket-info-val" }, item.drawCount))), item.state == 'Settled' &&
338
- item.drawResults.map((drawResultItem) => (h("div", { class: "draw-info-container" }, drawResultItem.tempDrawData ? (h("div", { class: "draw-info" }, h("div", { class: "draw-info-item" }, h("div", { class: "draw-info-label" }, translate('ticketResult', this.language)), h("div", { class: "draw-info-val" }, this.resultMap[drawResultItem.state])), h("div", { class: "draw-info-item" }, h("div", { class: "draw-info-label" }, translate('drawId', this.language)), h("div", { class: "draw-info-val" }, drawResultItem.drawId)), h("div", { class: "draw-info-item" }, h("div", { class: "draw-info-label" }, translate('drawDate', this.language)), h("div", { class: "draw-info-val" }, format(new Date(drawResultItem.tempDrawData.date), 'dd/MM/yyyy'))), h("div", { class: "draw-info-item" }, h("div", { class: "draw-info-label" }, translate('result', this.language)), h("div", { class: "draw-info-val" }, h("span", { class: "show-detail-link", onClick: () => this.handleShowCurrentDraw(drawResultItem.tempDrawData) }, translate('seeDetails', this.language)))), drawResultItem.state === DrawResult.WON && (h("div", { class: "draw-info-item" }, h("div", { class: "draw-info-label" }, translate('prize', this.language)), h("div", { class: "draw-info-val1" }, h("div", { style: { height: '20px' } }), drawResultItem.prizeDetails.map((prizeItem) => (h("span", null, h("div", null, h("span", { style: { color: 'rgb(85, 85, 85)' } }, prizeItem.prizeName, prizeItem.times > 1 ? ' x ' + prizeItem.times : '', ":", ' '), h("span", { style: { 'margin-right': '4px', color: 'rgb(85, 85, 85)' } }, thousandSeperator(prizeItem.amount)), h("span", { style: { color: 'rgb(85, 85, 85)' } }, prizeItem.currency)))))))))) : (h("div", { class: "draw-info-skeleton" }, [...Array(5)].map(() => (h("div", { class: "skeleton-line" })))))))))))))), h("lottery-tipping-dialog", { key: '4ef7d281084bc6441e6a3e666ac52a7df3dfd28c', visible: this.showCurrentTicketLine, width: !isMobile(window.navigator.userAgent) ? '720px' : undefined, fullscreen: isMobile(window.navigator.userAgent), closable: true, showFooter: false, onCancel: () => {
337
+ return (h("div", { key: '0a8574ec1ba181a07043ec0451dfca73f8aaaf9d', class: "lottery-tipping-ticket-history", ref: (el) => (this.stylingContainer = el) }, h("div", { key: 'f6f0f989a7b4e598e2d9c3d18c83d4f8b4595d84', class: "ticket-history-title" }, translate('ticketsHistory', this.language)), h("div", { key: 'e80a9d6e39d899fe6a210837853aacfea21a6cb3', class: "filter-wrap" }, h("div", { key: 'edeaca1e9062a0b9ef264151113bc6130f358017', class: "filter-status" }, this.statusOptions.map((status) => (h("div", { class: 'filter-status-btn' + (this.activeStatus == status.value ? ' active' : ''), onClick: () => this.changeStatus(status.value) }, status.label)))), h("div", { key: 'fdae8b8a796d62827530955449baf85152b4bd49', class: "filter-operation" }, h("lottery-tipping-filter", { key: '004a977ff4460be8e1fbffd22fb6a742401b6597', "quick-filters-active": this.quickFiltersActive, language: this.language, "translation-url": this.translationUrl }))), this.isLoading && (h("div", { key: '4142baea434e611b871f7b8712a8ed03961bf929', class: "loading-wrap" }, h("section", { key: 'd412ab2648dc168e76d13957b9d654522d0211e4', class: "dots-container" }, h("div", { key: '81cca835dff7b6708354d79ecdb804fd768dfdf5', class: "dot" }), h("div", { key: '4fd405a231c5560b014bc9dc34e8847daf197ab1', class: "dot" }), h("div", { key: 'b89f42119dc855255ffb27b7d12d525dca40ab20', class: "dot" }), h("div", { key: 'c9ce133fe12b41639719558922ab0651ed82f605', class: "dot" }), h("div", { key: '8a18cbe9892de938f731045c0d8a01a6f58ab19d', class: "dot" })))), !this.isLoading && (!this.ticketHistory || this.ticketHistory.length == 0) && (h("div", { key: 'c806d553da2223941f0e1a28a12f96088e0bd45d', class: "empty-wrap" }, translate('noData', this.language))), !this.isLoading && this.ticketHistory && this.ticketHistory.length != 0 && (h("div", { key: '4ac929f08ef09e5f18cfcb0424c489f8d513bc9b', class: "ticket-list-wrap" }, this.ticketHistory.map((item) => (h("lottery-tipping-panel", { "header-title": format(new Date(item.createdAt), 'dd/MM/yyyy HH:mm:ss') + ' ' + item.state }, h("div", { class: "panel-content", slot: "content" }, h("div", { class: "ticket-info" }, h("div", { class: "ticket-info-item" }, h("div", { class: "ticket-info-label" }, translate('ticketId', this.language)), h("div", { class: "ticket-info-val" }, item.id, " ")), h("div", { class: "ticket-info-item" }, h("div", { class: "ticket-info-label" }, translate('ticketType', this.language)), h("div", { class: "ticket-info-val" }, this.ticketTypeMap[item.wagerType], " ")), h("div", { class: "ticket-info-item" }, h("div", { class: "ticket-info-label" }, translate('ticketAmount', this.language)), h("div", { class: "ticket-info-val" }, `${item.amount} ${item.currency}`)), h("div", { class: "ticket-info-item" }, h("div", { class: "ticket-info-label" }, translate('lineDetail', this.language)), h("div", { class: "ticket-info-val" }, h("span", { class: "show-detail-link", onClick: () => this.handleShowTicketLineDetial(item) }, translate('seeDetails', this.language)))), h("div", { class: "ticket-info-item" }, h("div", { class: "ticket-info-label" }, translate('numberOfDraw', this.language)), h("div", { class: "ticket-info-val" }, item.drawCount))), item.state == 'Settled' &&
338
+ item.drawResults.map((drawResultItem) => (h("div", { class: "draw-info-container" }, drawResultItem.tempDrawData ? (h("div", { class: "draw-info" }, h("div", { class: "draw-info-item" }, h("div", { class: "draw-info-label" }, translate('ticketResult', this.language)), h("div", { class: "draw-info-val" }, this.resultMap[drawResultItem.state])), h("div", { class: "draw-info-item" }, h("div", { class: "draw-info-label" }, translate('drawId', this.language)), h("div", { class: "draw-info-val" }, drawResultItem.drawId)), h("div", { class: "draw-info-item" }, h("div", { class: "draw-info-label" }, translate('drawDate', this.language)), h("div", { class: "draw-info-val" }, format(new Date(drawResultItem.tempDrawData.date), 'dd/MM/yyyy'))), h("div", { class: "draw-info-item" }, h("div", { class: "draw-info-label" }, translate('result', this.language)), h("div", { class: "draw-info-val" }, h("span", { class: "show-detail-link", onClick: () => this.handleShowCurrentDraw(drawResultItem.tempDrawData) }, translate('seeDetails', this.language)))), drawResultItem.state === DrawResult.WON && (h("div", { class: "draw-info-item" }, h("div", { class: "draw-info-label" }, translate('prize', this.language)), h("div", { class: "draw-info-val1" }, h("div", { style: { height: '20px' } }), drawResultItem.prizeDetails.map((prizeItem) => (h("span", null, h("div", null, h("span", { style: { color: 'rgb(85, 85, 85)' } }, prizeItem.prizeName, prizeItem.times > 1 ? ' x ' + prizeItem.times : '', ":", ' '), h("span", { style: { 'margin-right': '4px', color: 'rgb(85, 85, 85)' } }, thousandSeperator(prizeItem.amount)), h("span", { style: { color: 'rgb(85, 85, 85)' } }, prizeItem.currency)))))))))) : (h("div", { class: "draw-info-skeleton" }, [...Array(5)].map(() => (h("div", { class: "skeleton-line" })))))))))))))), h("lottery-tipping-dialog", { key: 'ef4cff5d933545372cef4f6eb4e7dcd1a8f6f111', visible: this.showCurrentTicketLine, width: !isMobile(window.navigator.userAgent) ? '720px' : undefined, fullscreen: isMobile(window.navigator.userAgent), closable: true, showFooter: false, onCancel: () => {
339
339
  this.showCurrentTicketLine = false;
340
- }, language: this.language, "translation-url": this.translationUrl }, this.curSelection && this.curSelection.length && (h("div", { key: '0fe7ae0f7deceb8b3c939a401efafe70124411dd' }, h("div", { key: '5418df176032a83dbd05ee545fffc255694413a2', class: "betting-type" }, h("div", { key: '8fb74f2041677fe8876a54773451d00f53abe0df', class: "betting-type-title" }, translate('bettingType', this.language)), h("div", { key: 'b9bc169c4df854a59606d0ddf330707677720263', class: "betting-type-text" }, this.getBettingTypeName(this.getBettingType(this.curTicketItem.selection[this.curSelectionIdx].betType)))), h("lottery-tipping-ticket-bet", { key: 'e76e8c1a24b22668d82f54bfed708afb676f23c9', endpoint: this.endpoint, "session-id": this.sessionId, "game-id": this.curTicketItem.vendorGameId, "draw-id": this.curTicketItem.startingDrawId, "default-bullet-config-line-group": JSON.stringify(this.curSelection), "read-pretty": true, "total-pages": this.curSelection.length, language: this.language, "translation-url": this.translationUrl })))), h("lottery-tipping-dialog", { key: 'cf4220d7b9ef7a174ab059574e1d758096cf6f6c', visible: this.showCurrentDrawResult, width: !isMobile(window.navigator.userAgent) ? '720px' : undefined, fullscreen: isMobile(window.navigator.userAgent), closable: true, showFooter: false, onCancel: () => {
340
+ }, language: this.language, "translation-url": this.translationUrl }, this.curSelection && this.curSelection.length && (h("div", { key: '817ee1fe2541a4ed62b944b58b7abb1eda7afdbe' }, h("div", { key: '68672db719f3cc643d6b17769c0a786b3c931a42', class: "betting-type" }, h("div", { key: 'af264555814c9e3262b64722438ecd449f451ceb', class: "betting-type-title" }, translate('bettingType', this.language)), h("div", { key: '25b9bff20eb5a221bed6d345412dd48964890ae7', class: "betting-type-text" }, this.getBettingTypeName(this.getBettingType(this.curTicketItem.selection[this.curSelectionIdx].betType)))), h("lottery-tipping-ticket-bet", { key: '4a01e6f1734e5165b06713d3dbb7484463cc1bf4', endpoint: this.endpoint, "session-id": this.sessionId, "game-id": this.curTicketItem.vendorGameId, "draw-id": this.curTicketItem.startingDrawId, "default-bullet-config-line-group": JSON.stringify(this.curSelection), "read-pretty": true, "total-pages": this.curSelection.length, language: this.language, "translation-url": this.translationUrl })))), h("lottery-tipping-dialog", { key: '06fd83f481eb08a4601a96353557a925b1205b66', visible: this.showCurrentDrawResult, width: !isMobile(window.navigator.userAgent) ? '720px' : undefined, fullscreen: isMobile(window.navigator.userAgent), closable: true, showFooter: false, onCancel: () => {
341
341
  this.showCurrentDrawResult = false;
342
- }, language: this.language, "translation-url": this.translationUrl }, this.curDrawSelection && this.curDrawSelection.length && (h("div", { key: '61214e66f20708cf92fa12d9b3afa3feee2e4335' }, h("div", { key: '589010058422524a0b3478cee60fa13703d921e9', class: "betting-type" }, h("div", { key: '657e2cede56274839d1e56784e7f85e61c5b3a42', class: "betting-type-title" }, translate('bettingType', this.language)), h("div", { key: 'b2b77770d0d439d7a2d062943c1cb114a7e54574', class: "betting-type-text" }, h("div", { key: '8a9e0821b8165a9cc04c5be4b3eb7286bdcef21f', class: "LotteryTippingTicketController__segmented-control" }, Object.keys(this.curDrawSelectionMap).map((bettingType) => (h("button", { class: {
342
+ }, language: this.language, "translation-url": this.translationUrl }, this.curDrawSelection && this.curDrawSelection.length && (h("div", { key: 'c9161334967e9e5abaae4a3d1df922ee7d8d7945' }, h("div", { key: 'c7a3ac60084056b899a2b59a6205cddbc8d4e7fc', class: "betting-type" }, h("div", { key: '97aa9e8c9048bb57f70d4230f29f8fde3aa4454a', class: "betting-type-title" }, translate('bettingType', this.language)), h("div", { key: '64332b20eabf75e9273bb6f16c16436e90b28346', class: "betting-type-text" }, h("div", { key: 'cbd1ec9e723c6a369a98141077e4648d802c76ad', class: "LotteryTippingTicketController__segmented-control" }, Object.keys(this.curDrawSelectionMap).map((bettingType) => (h("button", { class: {
343
343
  LotteryTippingTicketController__segment: true,
344
344
  'LotteryTippingTicketController__segment--active': this.curDrawSelectionBettingType === bettingType
345
- }, onClick: () => this.handleDrawBettingTypeChange(bettingType) }, this.getBettingTypeName(bettingType))))))), h("lottery-tipping-ticket-bet", { key: '313e81c7d8181316896a2a46211d12ede72b5353', endpoint: this.endpoint, "session-id": this.sessionId, "game-id": this.curDrawItem.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, "translation-url": this.translationUrl })))), h("div", { key: '374d4a579f634ae631392b9e16a3a9acd0cf029c', class: "pagination-wrap" }, h("lottery-tipping-pagination", { key: '0a22fb6a1d59c391f2db3a2e20774a1b19491739', total: this.paginationInfo.total, current: this.paginationInfo.current, "page-size": this.paginationInfo.pageSize, language: this.language, "translation-url": this.translationUrl }))));
345
+ }, onClick: () => this.handleDrawBettingTypeChange(bettingType) }, this.getBettingTypeName(bettingType))))))), h("lottery-tipping-ticket-bet", { key: '8b352410c87858e5629a5524e70134ccc2e1b116', endpoint: this.endpoint, "session-id": this.sessionId, "game-id": this.curDrawItem.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, "translation-url": this.translationUrl })))), h("div", { key: 'e730c86100cb47c4c63051174cd9b33dbb8e6ce4', class: "pagination-wrap" }, h("lottery-tipping-pagination", { key: 'dce4d6e9a18e783339d0ff545d1bd47bf1b2a33d', total: this.paginationInfo.total, current: this.paginationInfo.current, "page-size": this.paginationInfo.pageSize, language: this.language, "translation-url": this.translationUrl }))));
346
346
  }
347
347
  static get is() { return "lottery-tipping-ticket-history"; }
348
348
  static get encapsulation() { return "shadow"; }
@@ -28,36 +28,14 @@ export function fetchRequest(url, method = 'GET', body = null, headers = {}) {
28
28
  fetch(url, options)
29
29
  .then((response) => {
30
30
  if (!response.ok) {
31
- return response.json().then((errorData) => {
32
- const error = {
33
- status: response.status,
34
- statusText: response.statusText,
35
- code: errorData.code || 'UNKNOWN_ERROR',
36
- message: errorData.message || 'An unknown error occurred',
37
- data: errorData.data || null
38
- };
39
- reject(error);
40
- }, () => reject({
41
- status: response.status,
42
- statusText: response.statusText,
43
- code: 'PARSE_ERROR',
44
- message: 'Failed to parse error response'
45
- }));
46
- }
47
- else {
48
- return response.json();
31
+ throw new Error(`HTTP error! Status: ${response.status}`);
49
32
  }
33
+ return response.json();
50
34
  })
51
- .then((data) => resolve(data), (error) => reject(error));
35
+ .then((data) => resolve(data))
36
+ .catch((error) => reject(error));
52
37
  });
53
38
  }
54
- export const fetcher = (url) => fetch(url, {
55
- method: 'GET',
56
- headers: {
57
- 'x-scheme': 'application/json',
58
- Accept: 'application/json'
59
- }
60
- }).then((r) => r.json());
61
39
  function isEmptyValueOfArray(arr) {
62
40
  if (arr.length === 0) {
63
41
  return true;
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, g as getAssetPath, h, a as getElement } from './index-4e926388.js';
2
- import { r as requiredArgs, t as toInteger, s as setClientStyling, a as setClientStylingURL, b as setStreamStyling, g as getTranslations$2, c as translate$2, f as format, i as isMobile } from './lottery-tipping-ticket-history-90df9a64.js';
3
- export { L as lottery_tipping_ticket_history } from './lottery-tipping-ticket-history-90df9a64.js';
2
+ import { r as requiredArgs, t as toInteger, s as setClientStyling, a as setClientStylingURL, b as setStreamStyling, g as getTranslations$2, c as translate$2, f as format, i as isMobile } from './lottery-tipping-ticket-history-a25198d5.js';
3
+ export { L as lottery_tipping_ticket_history } from './lottery-tipping-ticket-history-a25198d5.js';
4
4
 
5
5
  /**
6
6
  * Days in 1 week.
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { L as LotteryTippingTicketHistory } from './lottery-tipping-ticket-history-90df9a64.js';
1
+ export { L as LotteryTippingTicketHistory } from './lottery-tipping-ticket-history-a25198d5.js';
2
2
  import './index-4e926388.js';
@@ -2345,36 +2345,14 @@ function fetchRequest(url, method = 'GET', body = null, headers = {}) {
2345
2345
  fetch(url, options)
2346
2346
  .then((response) => {
2347
2347
  if (!response.ok) {
2348
- return response.json().then((errorData) => {
2349
- const error = {
2350
- status: response.status,
2351
- statusText: response.statusText,
2352
- code: errorData.code || 'UNKNOWN_ERROR',
2353
- message: errorData.message || 'An unknown error occurred',
2354
- data: errorData.data || null
2355
- };
2356
- reject(error);
2357
- }, () => reject({
2358
- status: response.status,
2359
- statusText: response.statusText,
2360
- code: 'PARSE_ERROR',
2361
- message: 'Failed to parse error response'
2362
- }));
2363
- }
2364
- else {
2365
- return response.json();
2348
+ throw new Error(`HTTP error! Status: ${response.status}`);
2366
2349
  }
2350
+ return response.json();
2367
2351
  })
2368
- .then((data) => resolve(data), (error) => reject(error));
2352
+ .then((data) => resolve(data))
2353
+ .catch((error) => reject(error));
2369
2354
  });
2370
2355
  }
2371
- const fetcher = (url) => fetch(url, {
2372
- method: 'GET',
2373
- headers: {
2374
- 'x-scheme': 'application/json',
2375
- Accept: 'application/json'
2376
- }
2377
- }).then((r) => r.json());
2378
2356
  function isEmptyValueOfArray(arr) {
2379
2357
  if (arr.length === 0) {
2380
2358
  return true;
@@ -2611,7 +2589,7 @@ const LotteryTippingTicketHistory = class {
2611
2589
  try {
2612
2590
  this.isLoading = true;
2613
2591
  let url = new URL(`${this.endpoint}/games/${this.gameId}`);
2614
- const res = await fetcher(url.href);
2592
+ const res = await fetchRequest(url.href, 'GET');
2615
2593
  this.rawData = res;
2616
2594
  }
2617
2595
  catch (e) {
@@ -2833,15 +2811,15 @@ const LotteryTippingTicketHistory = class {
2833
2811
  return name !== null && name !== void 0 ? name : bettingType;
2834
2812
  }
2835
2813
  render() {
2836
- return (h("div", { key: '9dbed4dca8e568a334c63748d1768ace33922270', class: "lottery-tipping-ticket-history", ref: (el) => (this.stylingContainer = el) }, h("div", { key: '4149c4c6f067be28f1334a8642790d9886d219ef', class: "ticket-history-title" }, translate('ticketsHistory', this.language)), h("div", { key: '185ac4ad602e6e8bb0ec025a5cc2c4a9b8418444', class: "filter-wrap" }, h("div", { key: 'd136c367780b696403f075b261f2009cc94edc5d', class: "filter-status" }, this.statusOptions.map((status) => (h("div", { class: 'filter-status-btn' + (this.activeStatus == status.value ? ' active' : ''), onClick: () => this.changeStatus(status.value) }, status.label)))), h("div", { key: 'e6a30ef0f8c957813a7b13238353709cfb9e2dd9', class: "filter-operation" }, h("lottery-tipping-filter", { key: '4e1e0ba0eeafd7e64344c2b8e4e7d0c0f097127b', "quick-filters-active": this.quickFiltersActive, language: this.language, "translation-url": this.translationUrl }))), this.isLoading && (h("div", { key: 'f572e1bd9cbf97948b9a9bda34f34c1407a8007e', class: "loading-wrap" }, h("section", { key: '9198457f400b175e4c9721449e49a987090860d9', class: "dots-container" }, h("div", { key: '0b1196e3ad2b05ef91965b2a52728e5386578e4b', class: "dot" }), h("div", { key: '19a5b0bc39fd931455a7972d66b640ca36685ea9', class: "dot" }), h("div", { key: '8bf3a43540d38c98d27cb7bf61d7595123a4739c', class: "dot" }), h("div", { key: '5ed33ee21018c3b2aae97a6b1345fdec2072fefe', class: "dot" }), h("div", { key: '2d4404c8e0d39dc82bb25554c242d27e091a9932', class: "dot" })))), !this.isLoading && (!this.ticketHistory || this.ticketHistory.length == 0) && (h("div", { key: '4b731612e57d8bde341da7d639dec6f245c7156d', class: "empty-wrap" }, translate('noData', this.language))), !this.isLoading && this.ticketHistory && this.ticketHistory.length != 0 && (h("div", { key: 'c9a17cc74f32ae9277d069a8633f38a8478e642c', class: "ticket-list-wrap" }, this.ticketHistory.map((item) => (h("lottery-tipping-panel", { "header-title": format(new Date(item.createdAt), 'dd/MM/yyyy HH:mm:ss') + ' ' + item.state }, h("div", { class: "panel-content", slot: "content" }, h("div", { class: "ticket-info" }, h("div", { class: "ticket-info-item" }, h("div", { class: "ticket-info-label" }, translate('ticketId', this.language)), h("div", { class: "ticket-info-val" }, item.id, " ")), h("div", { class: "ticket-info-item" }, h("div", { class: "ticket-info-label" }, translate('ticketType', this.language)), h("div", { class: "ticket-info-val" }, this.ticketTypeMap[item.wagerType], " ")), h("div", { class: "ticket-info-item" }, h("div", { class: "ticket-info-label" }, translate('ticketAmount', this.language)), h("div", { class: "ticket-info-val" }, `${item.amount} ${item.currency}`)), h("div", { class: "ticket-info-item" }, h("div", { class: "ticket-info-label" }, translate('lineDetail', this.language)), h("div", { class: "ticket-info-val" }, h("span", { class: "show-detail-link", onClick: () => this.handleShowTicketLineDetial(item) }, translate('seeDetails', this.language)))), h("div", { class: "ticket-info-item" }, h("div", { class: "ticket-info-label" }, translate('numberOfDraw', this.language)), h("div", { class: "ticket-info-val" }, item.drawCount))), item.state == 'Settled' &&
2837
- item.drawResults.map((drawResultItem) => (h("div", { class: "draw-info-container" }, drawResultItem.tempDrawData ? (h("div", { class: "draw-info" }, h("div", { class: "draw-info-item" }, h("div", { class: "draw-info-label" }, translate('ticketResult', this.language)), h("div", { class: "draw-info-val" }, this.resultMap[drawResultItem.state])), h("div", { class: "draw-info-item" }, h("div", { class: "draw-info-label" }, translate('drawId', this.language)), h("div", { class: "draw-info-val" }, drawResultItem.drawId)), h("div", { class: "draw-info-item" }, h("div", { class: "draw-info-label" }, translate('drawDate', this.language)), h("div", { class: "draw-info-val" }, format(new Date(drawResultItem.tempDrawData.date), 'dd/MM/yyyy'))), h("div", { class: "draw-info-item" }, h("div", { class: "draw-info-label" }, translate('result', this.language)), h("div", { class: "draw-info-val" }, h("span", { class: "show-detail-link", onClick: () => this.handleShowCurrentDraw(drawResultItem.tempDrawData) }, translate('seeDetails', this.language)))), drawResultItem.state === DrawResult.WON && (h("div", { class: "draw-info-item" }, h("div", { class: "draw-info-label" }, translate('prize', this.language)), h("div", { class: "draw-info-val1" }, h("div", { style: { height: '20px' } }), drawResultItem.prizeDetails.map((prizeItem) => (h("span", null, h("div", null, h("span", { style: { color: 'rgb(85, 85, 85)' } }, prizeItem.prizeName, prizeItem.times > 1 ? ' x ' + prizeItem.times : '', ":", ' '), h("span", { style: { 'margin-right': '4px', color: 'rgb(85, 85, 85)' } }, thousandSeperator(prizeItem.amount)), h("span", { style: { color: 'rgb(85, 85, 85)' } }, prizeItem.currency)))))))))) : (h("div", { class: "draw-info-skeleton" }, [...Array(5)].map(() => (h("div", { class: "skeleton-line" })))))))))))))), h("lottery-tipping-dialog", { key: '4ef7d281084bc6441e6a3e666ac52a7df3dfd28c', visible: this.showCurrentTicketLine, width: !isMobile(window.navigator.userAgent) ? '720px' : undefined, fullscreen: isMobile(window.navigator.userAgent), closable: true, showFooter: false, onCancel: () => {
2814
+ return (h("div", { key: '0a8574ec1ba181a07043ec0451dfca73f8aaaf9d', class: "lottery-tipping-ticket-history", ref: (el) => (this.stylingContainer = el) }, h("div", { key: 'f6f0f989a7b4e598e2d9c3d18c83d4f8b4595d84', class: "ticket-history-title" }, translate('ticketsHistory', this.language)), h("div", { key: 'e80a9d6e39d899fe6a210837853aacfea21a6cb3', class: "filter-wrap" }, h("div", { key: 'edeaca1e9062a0b9ef264151113bc6130f358017', class: "filter-status" }, this.statusOptions.map((status) => (h("div", { class: 'filter-status-btn' + (this.activeStatus == status.value ? ' active' : ''), onClick: () => this.changeStatus(status.value) }, status.label)))), h("div", { key: 'fdae8b8a796d62827530955449baf85152b4bd49', class: "filter-operation" }, h("lottery-tipping-filter", { key: '004a977ff4460be8e1fbffd22fb6a742401b6597', "quick-filters-active": this.quickFiltersActive, language: this.language, "translation-url": this.translationUrl }))), this.isLoading && (h("div", { key: '4142baea434e611b871f7b8712a8ed03961bf929', class: "loading-wrap" }, h("section", { key: 'd412ab2648dc168e76d13957b9d654522d0211e4', class: "dots-container" }, h("div", { key: '81cca835dff7b6708354d79ecdb804fd768dfdf5', class: "dot" }), h("div", { key: '4fd405a231c5560b014bc9dc34e8847daf197ab1', class: "dot" }), h("div", { key: 'b89f42119dc855255ffb27b7d12d525dca40ab20', class: "dot" }), h("div", { key: 'c9ce133fe12b41639719558922ab0651ed82f605', class: "dot" }), h("div", { key: '8a18cbe9892de938f731045c0d8a01a6f58ab19d', class: "dot" })))), !this.isLoading && (!this.ticketHistory || this.ticketHistory.length == 0) && (h("div", { key: 'c806d553da2223941f0e1a28a12f96088e0bd45d', class: "empty-wrap" }, translate('noData', this.language))), !this.isLoading && this.ticketHistory && this.ticketHistory.length != 0 && (h("div", { key: '4ac929f08ef09e5f18cfcb0424c489f8d513bc9b', class: "ticket-list-wrap" }, this.ticketHistory.map((item) => (h("lottery-tipping-panel", { "header-title": format(new Date(item.createdAt), 'dd/MM/yyyy HH:mm:ss') + ' ' + item.state }, h("div", { class: "panel-content", slot: "content" }, h("div", { class: "ticket-info" }, h("div", { class: "ticket-info-item" }, h("div", { class: "ticket-info-label" }, translate('ticketId', this.language)), h("div", { class: "ticket-info-val" }, item.id, " ")), h("div", { class: "ticket-info-item" }, h("div", { class: "ticket-info-label" }, translate('ticketType', this.language)), h("div", { class: "ticket-info-val" }, this.ticketTypeMap[item.wagerType], " ")), h("div", { class: "ticket-info-item" }, h("div", { class: "ticket-info-label" }, translate('ticketAmount', this.language)), h("div", { class: "ticket-info-val" }, `${item.amount} ${item.currency}`)), h("div", { class: "ticket-info-item" }, h("div", { class: "ticket-info-label" }, translate('lineDetail', this.language)), h("div", { class: "ticket-info-val" }, h("span", { class: "show-detail-link", onClick: () => this.handleShowTicketLineDetial(item) }, translate('seeDetails', this.language)))), h("div", { class: "ticket-info-item" }, h("div", { class: "ticket-info-label" }, translate('numberOfDraw', this.language)), h("div", { class: "ticket-info-val" }, item.drawCount))), item.state == 'Settled' &&
2815
+ item.drawResults.map((drawResultItem) => (h("div", { class: "draw-info-container" }, drawResultItem.tempDrawData ? (h("div", { class: "draw-info" }, h("div", { class: "draw-info-item" }, h("div", { class: "draw-info-label" }, translate('ticketResult', this.language)), h("div", { class: "draw-info-val" }, this.resultMap[drawResultItem.state])), h("div", { class: "draw-info-item" }, h("div", { class: "draw-info-label" }, translate('drawId', this.language)), h("div", { class: "draw-info-val" }, drawResultItem.drawId)), h("div", { class: "draw-info-item" }, h("div", { class: "draw-info-label" }, translate('drawDate', this.language)), h("div", { class: "draw-info-val" }, format(new Date(drawResultItem.tempDrawData.date), 'dd/MM/yyyy'))), h("div", { class: "draw-info-item" }, h("div", { class: "draw-info-label" }, translate('result', this.language)), h("div", { class: "draw-info-val" }, h("span", { class: "show-detail-link", onClick: () => this.handleShowCurrentDraw(drawResultItem.tempDrawData) }, translate('seeDetails', this.language)))), drawResultItem.state === DrawResult.WON && (h("div", { class: "draw-info-item" }, h("div", { class: "draw-info-label" }, translate('prize', this.language)), h("div", { class: "draw-info-val1" }, h("div", { style: { height: '20px' } }), drawResultItem.prizeDetails.map((prizeItem) => (h("span", null, h("div", null, h("span", { style: { color: 'rgb(85, 85, 85)' } }, prizeItem.prizeName, prizeItem.times > 1 ? ' x ' + prizeItem.times : '', ":", ' '), h("span", { style: { 'margin-right': '4px', color: 'rgb(85, 85, 85)' } }, thousandSeperator(prizeItem.amount)), h("span", { style: { color: 'rgb(85, 85, 85)' } }, prizeItem.currency)))))))))) : (h("div", { class: "draw-info-skeleton" }, [...Array(5)].map(() => (h("div", { class: "skeleton-line" })))))))))))))), h("lottery-tipping-dialog", { key: 'ef4cff5d933545372cef4f6eb4e7dcd1a8f6f111', visible: this.showCurrentTicketLine, width: !isMobile(window.navigator.userAgent) ? '720px' : undefined, fullscreen: isMobile(window.navigator.userAgent), closable: true, showFooter: false, onCancel: () => {
2838
2816
  this.showCurrentTicketLine = false;
2839
- }, language: this.language, "translation-url": this.translationUrl }, this.curSelection && this.curSelection.length && (h("div", { key: '0fe7ae0f7deceb8b3c939a401efafe70124411dd' }, h("div", { key: '5418df176032a83dbd05ee545fffc255694413a2', class: "betting-type" }, h("div", { key: '8fb74f2041677fe8876a54773451d00f53abe0df', class: "betting-type-title" }, translate('bettingType', this.language)), h("div", { key: 'b9bc169c4df854a59606d0ddf330707677720263', class: "betting-type-text" }, this.getBettingTypeName(this.getBettingType(this.curTicketItem.selection[this.curSelectionIdx].betType)))), h("lottery-tipping-ticket-bet", { key: 'e76e8c1a24b22668d82f54bfed708afb676f23c9', endpoint: this.endpoint, "session-id": this.sessionId, "game-id": this.curTicketItem.vendorGameId, "draw-id": this.curTicketItem.startingDrawId, "default-bullet-config-line-group": JSON.stringify(this.curSelection), "read-pretty": true, "total-pages": this.curSelection.length, language: this.language, "translation-url": this.translationUrl })))), h("lottery-tipping-dialog", { key: 'cf4220d7b9ef7a174ab059574e1d758096cf6f6c', visible: this.showCurrentDrawResult, width: !isMobile(window.navigator.userAgent) ? '720px' : undefined, fullscreen: isMobile(window.navigator.userAgent), closable: true, showFooter: false, onCancel: () => {
2817
+ }, language: this.language, "translation-url": this.translationUrl }, this.curSelection && this.curSelection.length && (h("div", { key: '817ee1fe2541a4ed62b944b58b7abb1eda7afdbe' }, h("div", { key: '68672db719f3cc643d6b17769c0a786b3c931a42', class: "betting-type" }, h("div", { key: 'af264555814c9e3262b64722438ecd449f451ceb', class: "betting-type-title" }, translate('bettingType', this.language)), h("div", { key: '25b9bff20eb5a221bed6d345412dd48964890ae7', class: "betting-type-text" }, this.getBettingTypeName(this.getBettingType(this.curTicketItem.selection[this.curSelectionIdx].betType)))), h("lottery-tipping-ticket-bet", { key: '4a01e6f1734e5165b06713d3dbb7484463cc1bf4', endpoint: this.endpoint, "session-id": this.sessionId, "game-id": this.curTicketItem.vendorGameId, "draw-id": this.curTicketItem.startingDrawId, "default-bullet-config-line-group": JSON.stringify(this.curSelection), "read-pretty": true, "total-pages": this.curSelection.length, language: this.language, "translation-url": this.translationUrl })))), h("lottery-tipping-dialog", { key: '06fd83f481eb08a4601a96353557a925b1205b66', visible: this.showCurrentDrawResult, width: !isMobile(window.navigator.userAgent) ? '720px' : undefined, fullscreen: isMobile(window.navigator.userAgent), closable: true, showFooter: false, onCancel: () => {
2840
2818
  this.showCurrentDrawResult = false;
2841
- }, language: this.language, "translation-url": this.translationUrl }, this.curDrawSelection && this.curDrawSelection.length && (h("div", { key: '61214e66f20708cf92fa12d9b3afa3feee2e4335' }, h("div", { key: '589010058422524a0b3478cee60fa13703d921e9', class: "betting-type" }, h("div", { key: '657e2cede56274839d1e56784e7f85e61c5b3a42', class: "betting-type-title" }, translate('bettingType', this.language)), h("div", { key: 'b2b77770d0d439d7a2d062943c1cb114a7e54574', class: "betting-type-text" }, h("div", { key: '8a9e0821b8165a9cc04c5be4b3eb7286bdcef21f', class: "LotteryTippingTicketController__segmented-control" }, Object.keys(this.curDrawSelectionMap).map((bettingType) => (h("button", { class: {
2819
+ }, language: this.language, "translation-url": this.translationUrl }, this.curDrawSelection && this.curDrawSelection.length && (h("div", { key: 'c9161334967e9e5abaae4a3d1df922ee7d8d7945' }, h("div", { key: 'c7a3ac60084056b899a2b59a6205cddbc8d4e7fc', class: "betting-type" }, h("div", { key: '97aa9e8c9048bb57f70d4230f29f8fde3aa4454a', class: "betting-type-title" }, translate('bettingType', this.language)), h("div", { key: '64332b20eabf75e9273bb6f16c16436e90b28346', class: "betting-type-text" }, h("div", { key: 'cbd1ec9e723c6a369a98141077e4648d802c76ad', class: "LotteryTippingTicketController__segmented-control" }, Object.keys(this.curDrawSelectionMap).map((bettingType) => (h("button", { class: {
2842
2820
  LotteryTippingTicketController__segment: true,
2843
2821
  'LotteryTippingTicketController__segment--active': this.curDrawSelectionBettingType === bettingType
2844
- }, onClick: () => this.handleDrawBettingTypeChange(bettingType) }, this.getBettingTypeName(bettingType))))))), h("lottery-tipping-ticket-bet", { key: '313e81c7d8181316896a2a46211d12ede72b5353', endpoint: this.endpoint, "session-id": this.sessionId, "game-id": this.curDrawItem.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, "translation-url": this.translationUrl })))), h("div", { key: '374d4a579f634ae631392b9e16a3a9acd0cf029c', class: "pagination-wrap" }, h("lottery-tipping-pagination", { key: '0a22fb6a1d59c391f2db3a2e20774a1b19491739', total: this.paginationInfo.total, current: this.paginationInfo.current, "page-size": this.paginationInfo.pageSize, language: this.language, "translation-url": this.translationUrl }))));
2822
+ }, onClick: () => this.handleDrawBettingTypeChange(bettingType) }, this.getBettingTypeName(bettingType))))))), h("lottery-tipping-ticket-bet", { key: '8b352410c87858e5629a5524e70134ccc2e1b116', endpoint: this.endpoint, "session-id": this.sessionId, "game-id": this.curDrawItem.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, "translation-url": this.translationUrl })))), h("div", { key: 'e730c86100cb47c4c63051174cd9b33dbb8e6ce4', class: "pagination-wrap" }, h("lottery-tipping-pagination", { key: 'dce4d6e9a18e783339d0ff545d1bd47bf1b2a33d', total: this.paginationInfo.total, current: this.paginationInfo.current, "page-size": this.paginationInfo.pageSize, language: this.language, "translation-url": this.translationUrl }))));
2845
2823
  }
2846
2824
  static get watchers() { return {
2847
2825
  "clientStyling": ["handleClientStylingChange"],
@@ -1,4 +1,4 @@
1
- import{r as t,c as e,g as i,h as s,a as o}from"./index-4e926388.js";import{r,t as n,s as a,a as l,b as h,g as c,c as d,f as u,i as p}from"./lottery-tipping-ticket-history-90df9a64.js";export{L as lottery_tipping_ticket_history}from"./lottery-tipping-ticket-history-90df9a64.js";var m=36e5;var v={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},f=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,g=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,b=/^([+-])(\d{2})(?::?(\d{2}))?$/;function y(t){return t?parseInt(t):1}function w(t){return t&&parseFloat(t.replace(",","."))||0}var x=[31,null,31,30,31,30,31,31,30,31,30,31];function _(t){return t%400==0||t%4==0&&t%100!=0}const k=class{constructor(s){t(this,s),this.change=e(this,"change",7),this.handleOutsideClick=t=>{t.composedPath().includes(this.el)||(this.dropdownOpen=!1,this.overflowOpen=!1)},this.toggleDropdown=t=>{t.stopPropagation(),this.dropdownOpen=!this.dropdownOpen,this.overflowOpen=!1},this.isSelected=t=>this.selectedValues.includes(t),this.selectItem=t=>{this.isSelected(t.value)||(this.selectedValues=[...this.selectedValues,t.value],this.change.emit(this.selectedValues))},this.toggleItem=t=>{this.isSelected(t.value)?this.removeItem(t.value):this.selectItem(t)},this.removeItem=(t,e)=>{e&&e.stopPropagation(),this.selectedValues=this.selectedValues.filter((e=>e!==t)),this.change.emit(this.selectedValues)},this.downIcon=i("../static/dropdown.svg"),this.upIcon=i("../static/dropup.svg"),this.isTouch="ontouchstart"in window,this.openOverflow=()=>{this.isTouch||(this.computePopoverPosition(),this.overflowOpen=!0)},this.closeOverflow=()=>{this.isTouch||(this.overflowOpen=!1)},this.toggleOverflow=t=>{t.stopPropagation(),this.computePopoverPosition(),this.overflowOpen=!this.overflowOpen},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.options=[],this.maxVisibleChips=2,this.placeholder="",this.selectedValues=[],this.dropdownOpen=!1,this.overflowOpen=!1,this.popoverStyle={top:"0px",left:"0px"}}handleClientStylingChange(t,e){t!=e&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&l(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&l(this.stylingContainer,this.clientStylingUrl))}async clear(){this.selectedValues=[],this.change.emit(this.selectedValues)}componentWillLoad(){document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){document.removeEventListener("click",this.handleOutsideClick),this.stylingSubscription&&this.stylingSubscription.unsubscribe()}get selectedOptions(){return this.options.filter((t=>this.isSelected(t.value)))}get visibleChips(){return this.selectedOptions.slice(0,this.maxVisibleChips)}get hiddenChips(){return this.selectedOptions.slice(this.maxVisibleChips)}computePopoverPosition(){if(this.overflowChipEl&&this.el){const{left:t}=this.overflowChipEl.getBoundingClientRect(),{left:e,height:i}=this.el.getBoundingClientRect();this.popoverStyle={top:i-10+"px",left:t-e+"px"}}}render(){var t;return s("div",{key:"50b48397be3ede1907ab2c2abcd1cf2f43f69c13",class:"general-multi-select-container",ref:t=>this.stylingContainer=t},s("div",{key:"696a1bb1f221f8f5cf290fac040af10e2e5a115e",class:"multi-select-container",ref:t=>this.el=t},s("div",{key:"9ea92f01787b26d43054573a11896cf65065b073",class:"flex-row",onClick:this.toggleDropdown},s("div",{key:"f79720ca3ec383ee7f95b09483698ee18119c79a",class:"control"},this.visibleChips.map((t=>s("span",{class:"chip"},s("div",{class:"chip-text",title:t.text},t.text),s("div",{class:"remove-btn",onClick:e=>this.removeItem(t.value,e)},"×")))),this.hiddenChips.length>0&&s("span",{key:"25e9e527c33dd7a315dacb10cc51084fe69b9b7e",class:"chip overflow-chip",ref:t=>this.overflowChipEl=t,onMouseEnter:this.openOverflow,onMouseLeave:this.closeOverflow,onClick:this.toggleOverflow},"•••"),0===this.selectedValues.length&&s("span",{key:"b061de660a55f7a0d41ce9aa650108d3f38a9dc0",class:"placeholder"},this.placeholder)),s("div",{key:"f83b6517e88b3976cdc18590f8f1233cb2515230",class:"arrow"},s("img",{key:"1b61a49090237057b98e5ce8a4f7c1e3bfc9d4ba",class:"info-icon",src:this.dropdownOpen?this.upIcon:this.downIcon,style:{width:"18px"}}))),this.dropdownOpen&&s("div",{key:"e5b081007bcbdd251ce5ac235c1f19f17852c420",class:"dropdown"},this.options.map((t=>s("div",{class:{"dropdown-item":!0,selected:this.isSelected(t.value)},onClick:()=>this.toggleItem(t)},t.text)))),this.overflowOpen&&!!(null===(t=this.hiddenChips)||void 0===t?void 0:t.length)&&s("div",{key:"f8e3289042c69c569bebcd0a40d90f31261c6c12",class:"overflow-popover",style:{top:this.popoverStyle.top,left:this.popoverStyle.left},onMouseEnter:this.openOverflow,onMouseLeave:this.closeOverflow},this.hiddenChips.map((t=>s("span",{class:"chip"},s("span",{class:"chip-text",title:t.text},t.text),s("span",{class:"remove-btn",onClick:e=>this.removeItem(t.value,e)},"×")))))))}static get assetsDirs(){return["../static"]}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};k.style='.multi-select-container{position:relative;font-family:"Inter", sans-serif;margin-top:4px;width:100%}.flex-row{display:flex;flex-direction:row;align-items:center;flex-wrap:nowrap;padding:8px 12px;padding-right:4px;border-radius:4px;background:var(--emw-selector-color-background, #e8ebef);cursor:pointer}.control{flex:1;display:flex;align-items:center;flex-wrap:nowrap;overflow:hidden}.control:focus-within{border-color:var(--emw--color-primary, #fed275);box-shadow:0 0 0 2px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15))}.chip{display:inline-flex;align-items:center;background:var(--emw--color-gray-50, #f5f5f5);color:var(--emw--color-dialog-typography, #000);border-radius:4px;padding:2px 8px;margin-right:6px;font-size:0.875rem;line-height:1.2;justify-content:space-between;flex:0 1 auto;min-width:0}.chip-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.overflow-chip{background:var(--emw--color-gray-100, #e6e6e6);color:var(--emw--color-gray-300, #333);width:20px;text-align:center;display:block}.remove-btn{background:none;border:none;font-size:1rem;margin-left:6px;cursor:pointer;color:var(--emw--color-gray-150, #6f6f6f)}.remove-btn:hover{color:var(--emw--color-error, red)}.placeholder{color:var(--emw--color-gray-150, #6f6f6f);font-size:0.875rem;padding:3px 8px;line-height:1.2}.arrow{margin-left:auto;font-size:0.8rem;width:20px;color:var(--emw--color-gray-150, #6f6f6f)}.dropdown{position:absolute;top:calc(100% + 4px);left:0;width:100%;max-height:240px;overflow-y:auto;border:1px solid var(--emw--color-gray-100, #e6e6e6);border-radius:6px;background:var(--emw--color-dialog-background, #ffffff);box-shadow:0 4px 12px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15));z-index:10}.dropdown-item{padding:10px 14px;cursor:pointer;font-size:0.875rem;line-height:1.4;transition:background 0.2s}.dropdown-item:hover{background:var(--emw--color-background-tertiary, #ccc);color:var(--emw--color-typography, #000)}.dropdown-item.selected{background:var(--emw--color-background-secondary, #f5f5f5);color:var(--emw--color-typography, #000);font-weight:500}.overflow-popover{position:absolute;top:var(--overflow-top, 0px);left:var(--overflow-left, 0px);max-width:200px;padding:12px;display:flex;flex-wrap:wrap;gap:6px;border:1px solid var(--emw--color-gray-100, #d0d5dd);border-radius:6px;background:var(--emw--color-background, #ffffff);box-shadow:0 4px 12px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15));z-index:20}';const C=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&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&l(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){this._tooltipId=`general-tooltip-${Math.random().toString(36).substring(2,9)}`}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&l(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 s("div",{key:"c0d52518e1e196e0d022789f7c6b7e64173b2c7d",class:"general-tooltip-wrapper"},s("slot",{key:"a935e103e16b0b619a024706e8224f4a937de6b9",name:"trigger"}),s("div",{key:"35c60e35ce3f8d5c2c42cd333fe64a3b289d34d4",class:"general-tooltip-container",role:"tooltip",ref:t=>this.stylingContainer=t},s("div",{key:"9d3fd9f142c1e3bd263dee289a2c1a9e4eebfddc",id:this._tooltipId,class:t,role:"tooltip"},s("slot",{key:"31344f0d4d4139f913d1819cc4f42a39f5113d8a",name:"content"}),s("div",{key:"f5cdd93060baec37b2a2879056efe2d66c5a553a",class:"general-tooltip-arrow"}))))}get hostElement(){return o(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};C.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 S=class{constructor(i){t(this,i),this.lotteryTippingBulletToggleEvent=e(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&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&l(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&l(this.stylingContainer,this.clientStylingUrl))}handleClick(){this.disabled||this.lotteryTippingBulletToggleEvent.emit({positionIdx:this.positionIdx})}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return s("div",{key:"ef0fee38ed62adb7809b5a60668af6a499ebe5a6",ref:t=>this.stylingContainer=t},"text"===this.theme?s("div",{class:{LotteryTippingBullet__segment:!0,"LotteryTippingBullet__segment--text":!0}},this.value):s("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"]}}};S.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 A=class{constructor(i){t(this,i),this.lotteryTippingBulletGroupToggleEvent=e(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&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&l(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&l(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 s("div",{ref:t=>this.stylingContainer=t,key:this.positionIdx},s("div",{key:"68223022eed831932c571378164be913206d98e9",style:{display:"flex",flexDirection:"row",gap:"10px"}},null===(t=this.bulletConfigArr)||void 0===t?void 0:t.map(((t,e)=>s("div",{key:e},s("lottery-tipping-bullet",{value:t.value,isSelected:t.isSelected,"position-idx":e,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"]}}};A.style="";const z=["ro","en","fr","ar","hr"],T={en:{cancel:"Cancel",confirm:"Confirm"},ro:{cancel:"Anulează",confirm:"Confirmă"},fr:{cancel:"Annuler",confirm:"Confirmer"},ar:{cancel:"إلغاء",confirm:"تأكيد"},hr:{cancel:"Odustani",confirm:"Potvrdi"}},I=(t,e)=>{const i=e;return T[void 0!==i&&z.includes(i)?i:"en"][t]},D=class{constructor(i){t(this,i),this.open=e(this,"open",7),this.close=e(this,"close",7),this.confirm=e(this,"confirm",7),this.cancel=e(this,"cancel",7),this.wasVisible=!1,this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.visible=void 0,this.dialogTitle="",this.width="520px",this.closable=!0,this.mask=!0,this.maskClosable=!0,this.animationDuration=300,this.fullscreen=!1,this.showFooter=!0,this.showCancelBtn=!0,this.language="en",this.translationUrl=void 0}handleClientStylingChange(t,e){t!=e&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&l(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])T[e][i]=t[e][i]})))}componentWillUpdate(){this.visible&&!this.wasVisible?this.disableBodyScroll():!this.visible&&this.wasVisible&&this.enableBodyScroll(),this.wasVisible=this.visible}disconnectedCallback(){this.enableBodyScroll()}disableBodyScroll(){document.body.style.overflow="hidden"}enableBodyScroll(){document.body.style.overflow=""}handleClose(){this.visible=!1,this.cancel.emit()}handleMaskClick(t){this.maskClosable&&t.target===this.el.querySelector(".mask")&&(this.visible=!1,this.cancel.emit())}handleConfirm(){this.visible=!1,this.confirm.emit()}render(){const t={width:"number"==typeof this.width?`${this.width}px`:this.width,"--duration":`${this.animationDuration}ms`},e=["dialog-wrapper",this.visible?"dialog-wrapper-visible":""],i=["mask",this.visible?"mask-enter":"mask-leave"],o=["dialog",this.visible?"dialog-enter":"dialog-leave",this.fullscreen?"fullscreen":""].join(" ");return s("div",{key:"af4d92ae4ff3daf4788da45bee54758032f0da46",class:e.join(" "),ref:t=>this.stylingContainer=t},s("div",{key:"481d749fb5372916e1a5c638e1426ea81ba69b89",class:i.join(" "),onClick:this.handleMaskClick.bind(this)}),s("div",{key:"aaa55eb2020f6620479098ce4d73cdefa9545593",class:o,style:t,role:"dialog","aria-modal":"true","aria-labelledby":"dialog-title"},s("div",{key:"615b47331160463846f46d4931df61e432f66974",class:"dialog-header"},s("h2",{key:"138d61646e479c98b91420bf85841f0efd409f0f",id:"dialog-title",class:"dialog-title"},this.dialogTitle),this.closable&&s("button",{key:"0825e53e901c05928538bc53e68213201b72e7c4",class:"close-btn",onClick:this.handleClose.bind(this)},"x")),s("div",{key:"ce28487598c5055c64714daaf889e2761a0b05d0",class:"dialog-content",style:{maxHeight:"calc(100vh - 62px)",overflowY:"auto"}},s("slot",{key:"3f0094e744b50ce4d46493bba9179233516961bb"})),this.showFooter&&s("div",{key:"b9312bf147e522beadadcc45cb5e940614fdbc7a",class:"dialog-footer"},s("slot",{key:"2babe8bbba0bafe867d7035a852451d41016d23f",name:"footer"},this.showCancelBtn&&s("button",{key:"a9a856be2bec40af3557c80e3ead7883a3d4a137",class:"cancel-btn",onClick:this.handleClose.bind(this)},I("cancel",this.language)),s("button",{key:"9d32f271621e2dc076e7ba489e8494b5d0090f46",class:"confirm-btn",onClick:this.handleConfirm.bind(this)},I("confirm",this.language))))))}get el(){return o(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};D.style=".dialog-wrapper{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;visibility:hidden;opacity:1;z-index:199}.dialog-wrapper-visible{visibility:visible}.mask{position:fixed;inset:0;background-color:rgba(0, 0, 0, 0.5);opacity:0;z-index:1000;transition:opacity var(--duration) linear}.mask-enter{opacity:1}.mask-leave{opacity:0}.dialog{position:relative;background:var(--emw--color-dialog-background, #fff);border-radius:12px;box-shadow:0 4px 32px rgba(0, 0, 0, 0.15);opacity:0;transform:scale(0.9);transition:all var(--duration) linear;width:100%;max-width:100vw;min-height:200px;overflow:hidden;z-index:1000}.dialog-enter{opacity:1;transform:scale(1)}.dialog-leave{opacity:0}.dialog.fullscreen{width:100vw !important;height:100vh;overflow:auto;max-height:none;border-radius:0;overflow:hidden}.dialog-header{padding:16px 16px 0 16px;display:flex;justify-content:space-between;align-items:center}.dialog-header .dialog-title{margin:0;font-size:1.25rem;font-weight:500;color:var(--emw--color-dialog-typography, #000)}.dialog-header .close-btn{background:transparent;border:none;font-size:1.5rem;width:2rem;height:2rem;color:var(--emw--color-gray-150, #6f6f6f);cursor:pointer;border-radius:4px}.dialog-header .close-btn:hover{background:var(--emw--color-gray-50, #f5f5f5);color:var(--emw--color-gray-300, #333)}.dialog-content{padding:24px;font-size:0.95rem;line-height:1.6;color:var(--emw--color-dialog-typography, #000);flex:1;overflow-y:auto;max-height:calc(100vh - 200px)}.dialog.fullscreen .dialog-content{max-height:none}.dialog-footer{padding:0 16px 16px 16px;display:flex;justify-content:center;gap:12px}.dialog-footer .cancel-btn,.dialog-footer .confirm-btn{padding:10px 24px;border-radius:6px;font-size:0.9rem;cursor:pointer;transition:all 0.3s linear}.dialog-footer .cancel-btn{border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));color:var(--emw--color-gray-300, #333);background:var(--emw--color-gray-400, #fff)}.dialog-footer .cancel-btn:hover{border-color:var(--emw--color-gray-100, #e6e6e6)}.dialog-footer .confirm-btn{border:none;color:var(--emw--color-gray-400, #fff);background:var(--emw--color-primary, #009993)}.dialog-footer .confirm-btn:hover{background:var(--emw--color-primary-variant, #004d4a)}@media screen and (max-width: 480px){.dialog.fullscreen .dialog-content{padding:12px}}";var O=Object.defineProperty,E=Object.defineProperties,P=Object.getOwnPropertyDescriptors,M=Object.getOwnPropertySymbols,N=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable,j=(t,e,i)=>e in t?O(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,F=(t,e)=>{for(var i in e||(e={}))N.call(e,i)&&j(t,i,e[i]);if(M)for(var i of M(e))B.call(e,i)&&j(t,i,e[i]);return t},$=(t,e)=>E(t,P(e)),V=(t,e,i)=>(j(t,"symbol"!=typeof e?e+"":e,i),i),R=(t,e,i)=>new Promise(((s,o)=>{var r=t=>{try{a(i.next(t))}catch(t){o(t)}},n=t=>{try{a(i.throw(t))}catch(t){o(t)}},a=t=>t.done?s(t.value):Promise.resolve(t.value).then(r,n);a((i=i.apply(t,e)).next())}))
1
+ import{r as t,c as e,g as i,h as s,a as o}from"./index-4e926388.js";import{r,t as n,s as a,a as l,b as h,g as c,c as d,f as u,i as p}from"./lottery-tipping-ticket-history-a25198d5.js";export{L as lottery_tipping_ticket_history}from"./lottery-tipping-ticket-history-a25198d5.js";var m=36e5;var v={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},f=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,g=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,b=/^([+-])(\d{2})(?::?(\d{2}))?$/;function y(t){return t?parseInt(t):1}function w(t){return t&&parseFloat(t.replace(",","."))||0}var x=[31,null,31,30,31,30,31,31,30,31,30,31];function _(t){return t%400==0||t%4==0&&t%100!=0}const k=class{constructor(s){t(this,s),this.change=e(this,"change",7),this.handleOutsideClick=t=>{t.composedPath().includes(this.el)||(this.dropdownOpen=!1,this.overflowOpen=!1)},this.toggleDropdown=t=>{t.stopPropagation(),this.dropdownOpen=!this.dropdownOpen,this.overflowOpen=!1},this.isSelected=t=>this.selectedValues.includes(t),this.selectItem=t=>{this.isSelected(t.value)||(this.selectedValues=[...this.selectedValues,t.value],this.change.emit(this.selectedValues))},this.toggleItem=t=>{this.isSelected(t.value)?this.removeItem(t.value):this.selectItem(t)},this.removeItem=(t,e)=>{e&&e.stopPropagation(),this.selectedValues=this.selectedValues.filter((e=>e!==t)),this.change.emit(this.selectedValues)},this.downIcon=i("../static/dropdown.svg"),this.upIcon=i("../static/dropup.svg"),this.isTouch="ontouchstart"in window,this.openOverflow=()=>{this.isTouch||(this.computePopoverPosition(),this.overflowOpen=!0)},this.closeOverflow=()=>{this.isTouch||(this.overflowOpen=!1)},this.toggleOverflow=t=>{t.stopPropagation(),this.computePopoverPosition(),this.overflowOpen=!this.overflowOpen},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.options=[],this.maxVisibleChips=2,this.placeholder="",this.selectedValues=[],this.dropdownOpen=!1,this.overflowOpen=!1,this.popoverStyle={top:"0px",left:"0px"}}handleClientStylingChange(t,e){t!=e&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&l(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&l(this.stylingContainer,this.clientStylingUrl))}async clear(){this.selectedValues=[],this.change.emit(this.selectedValues)}componentWillLoad(){document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){document.removeEventListener("click",this.handleOutsideClick),this.stylingSubscription&&this.stylingSubscription.unsubscribe()}get selectedOptions(){return this.options.filter((t=>this.isSelected(t.value)))}get visibleChips(){return this.selectedOptions.slice(0,this.maxVisibleChips)}get hiddenChips(){return this.selectedOptions.slice(this.maxVisibleChips)}computePopoverPosition(){if(this.overflowChipEl&&this.el){const{left:t}=this.overflowChipEl.getBoundingClientRect(),{left:e,height:i}=this.el.getBoundingClientRect();this.popoverStyle={top:i-10+"px",left:t-e+"px"}}}render(){var t;return s("div",{key:"50b48397be3ede1907ab2c2abcd1cf2f43f69c13",class:"general-multi-select-container",ref:t=>this.stylingContainer=t},s("div",{key:"696a1bb1f221f8f5cf290fac040af10e2e5a115e",class:"multi-select-container",ref:t=>this.el=t},s("div",{key:"9ea92f01787b26d43054573a11896cf65065b073",class:"flex-row",onClick:this.toggleDropdown},s("div",{key:"f79720ca3ec383ee7f95b09483698ee18119c79a",class:"control"},this.visibleChips.map((t=>s("span",{class:"chip"},s("div",{class:"chip-text",title:t.text},t.text),s("div",{class:"remove-btn",onClick:e=>this.removeItem(t.value,e)},"×")))),this.hiddenChips.length>0&&s("span",{key:"25e9e527c33dd7a315dacb10cc51084fe69b9b7e",class:"chip overflow-chip",ref:t=>this.overflowChipEl=t,onMouseEnter:this.openOverflow,onMouseLeave:this.closeOverflow,onClick:this.toggleOverflow},"•••"),0===this.selectedValues.length&&s("span",{key:"b061de660a55f7a0d41ce9aa650108d3f38a9dc0",class:"placeholder"},this.placeholder)),s("div",{key:"f83b6517e88b3976cdc18590f8f1233cb2515230",class:"arrow"},s("img",{key:"1b61a49090237057b98e5ce8a4f7c1e3bfc9d4ba",class:"info-icon",src:this.dropdownOpen?this.upIcon:this.downIcon,style:{width:"18px"}}))),this.dropdownOpen&&s("div",{key:"e5b081007bcbdd251ce5ac235c1f19f17852c420",class:"dropdown"},this.options.map((t=>s("div",{class:{"dropdown-item":!0,selected:this.isSelected(t.value)},onClick:()=>this.toggleItem(t)},t.text)))),this.overflowOpen&&!!(null===(t=this.hiddenChips)||void 0===t?void 0:t.length)&&s("div",{key:"f8e3289042c69c569bebcd0a40d90f31261c6c12",class:"overflow-popover",style:{top:this.popoverStyle.top,left:this.popoverStyle.left},onMouseEnter:this.openOverflow,onMouseLeave:this.closeOverflow},this.hiddenChips.map((t=>s("span",{class:"chip"},s("span",{class:"chip-text",title:t.text},t.text),s("span",{class:"remove-btn",onClick:e=>this.removeItem(t.value,e)},"×")))))))}static get assetsDirs(){return["../static"]}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};k.style='.multi-select-container{position:relative;font-family:"Inter", sans-serif;margin-top:4px;width:100%}.flex-row{display:flex;flex-direction:row;align-items:center;flex-wrap:nowrap;padding:8px 12px;padding-right:4px;border-radius:4px;background:var(--emw-selector-color-background, #e8ebef);cursor:pointer}.control{flex:1;display:flex;align-items:center;flex-wrap:nowrap;overflow:hidden}.control:focus-within{border-color:var(--emw--color-primary, #fed275);box-shadow:0 0 0 2px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15))}.chip{display:inline-flex;align-items:center;background:var(--emw--color-gray-50, #f5f5f5);color:var(--emw--color-dialog-typography, #000);border-radius:4px;padding:2px 8px;margin-right:6px;font-size:0.875rem;line-height:1.2;justify-content:space-between;flex:0 1 auto;min-width:0}.chip-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.overflow-chip{background:var(--emw--color-gray-100, #e6e6e6);color:var(--emw--color-gray-300, #333);width:20px;text-align:center;display:block}.remove-btn{background:none;border:none;font-size:1rem;margin-left:6px;cursor:pointer;color:var(--emw--color-gray-150, #6f6f6f)}.remove-btn:hover{color:var(--emw--color-error, red)}.placeholder{color:var(--emw--color-gray-150, #6f6f6f);font-size:0.875rem;padding:3px 8px;line-height:1.2}.arrow{margin-left:auto;font-size:0.8rem;width:20px;color:var(--emw--color-gray-150, #6f6f6f)}.dropdown{position:absolute;top:calc(100% + 4px);left:0;width:100%;max-height:240px;overflow-y:auto;border:1px solid var(--emw--color-gray-100, #e6e6e6);border-radius:6px;background:var(--emw--color-dialog-background, #ffffff);box-shadow:0 4px 12px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15));z-index:10}.dropdown-item{padding:10px 14px;cursor:pointer;font-size:0.875rem;line-height:1.4;transition:background 0.2s}.dropdown-item:hover{background:var(--emw--color-background-tertiary, #ccc);color:var(--emw--color-typography, #000)}.dropdown-item.selected{background:var(--emw--color-background-secondary, #f5f5f5);color:var(--emw--color-typography, #000);font-weight:500}.overflow-popover{position:absolute;top:var(--overflow-top, 0px);left:var(--overflow-left, 0px);max-width:200px;padding:12px;display:flex;flex-wrap:wrap;gap:6px;border:1px solid var(--emw--color-gray-100, #d0d5dd);border-radius:6px;background:var(--emw--color-background, #ffffff);box-shadow:0 4px 12px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15));z-index:20}';const C=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&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&l(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){this._tooltipId=`general-tooltip-${Math.random().toString(36).substring(2,9)}`}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&l(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 s("div",{key:"c0d52518e1e196e0d022789f7c6b7e64173b2c7d",class:"general-tooltip-wrapper"},s("slot",{key:"a935e103e16b0b619a024706e8224f4a937de6b9",name:"trigger"}),s("div",{key:"35c60e35ce3f8d5c2c42cd333fe64a3b289d34d4",class:"general-tooltip-container",role:"tooltip",ref:t=>this.stylingContainer=t},s("div",{key:"9d3fd9f142c1e3bd263dee289a2c1a9e4eebfddc",id:this._tooltipId,class:t,role:"tooltip"},s("slot",{key:"31344f0d4d4139f913d1819cc4f42a39f5113d8a",name:"content"}),s("div",{key:"f5cdd93060baec37b2a2879056efe2d66c5a553a",class:"general-tooltip-arrow"}))))}get hostElement(){return o(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};C.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 S=class{constructor(i){t(this,i),this.lotteryTippingBulletToggleEvent=e(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&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&l(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&l(this.stylingContainer,this.clientStylingUrl))}handleClick(){this.disabled||this.lotteryTippingBulletToggleEvent.emit({positionIdx:this.positionIdx})}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return s("div",{key:"ef0fee38ed62adb7809b5a60668af6a499ebe5a6",ref:t=>this.stylingContainer=t},"text"===this.theme?s("div",{class:{LotteryTippingBullet__segment:!0,"LotteryTippingBullet__segment--text":!0}},this.value):s("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"]}}};S.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 A=class{constructor(i){t(this,i),this.lotteryTippingBulletGroupToggleEvent=e(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&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&l(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&l(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 s("div",{ref:t=>this.stylingContainer=t,key:this.positionIdx},s("div",{key:"68223022eed831932c571378164be913206d98e9",style:{display:"flex",flexDirection:"row",gap:"10px"}},null===(t=this.bulletConfigArr)||void 0===t?void 0:t.map(((t,e)=>s("div",{key:e},s("lottery-tipping-bullet",{value:t.value,isSelected:t.isSelected,"position-idx":e,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"]}}};A.style="";const z=["ro","en","fr","ar","hr"],T={en:{cancel:"Cancel",confirm:"Confirm"},ro:{cancel:"Anulează",confirm:"Confirmă"},fr:{cancel:"Annuler",confirm:"Confirmer"},ar:{cancel:"إلغاء",confirm:"تأكيد"},hr:{cancel:"Odustani",confirm:"Potvrdi"}},I=(t,e)=>{const i=e;return T[void 0!==i&&z.includes(i)?i:"en"][t]},D=class{constructor(i){t(this,i),this.open=e(this,"open",7),this.close=e(this,"close",7),this.confirm=e(this,"confirm",7),this.cancel=e(this,"cancel",7),this.wasVisible=!1,this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.visible=void 0,this.dialogTitle="",this.width="520px",this.closable=!0,this.mask=!0,this.maskClosable=!0,this.animationDuration=300,this.fullscreen=!1,this.showFooter=!0,this.showCancelBtn=!0,this.language="en",this.translationUrl=void 0}handleClientStylingChange(t,e){t!=e&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&l(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])T[e][i]=t[e][i]})))}componentWillUpdate(){this.visible&&!this.wasVisible?this.disableBodyScroll():!this.visible&&this.wasVisible&&this.enableBodyScroll(),this.wasVisible=this.visible}disconnectedCallback(){this.enableBodyScroll()}disableBodyScroll(){document.body.style.overflow="hidden"}enableBodyScroll(){document.body.style.overflow=""}handleClose(){this.visible=!1,this.cancel.emit()}handleMaskClick(t){this.maskClosable&&t.target===this.el.querySelector(".mask")&&(this.visible=!1,this.cancel.emit())}handleConfirm(){this.visible=!1,this.confirm.emit()}render(){const t={width:"number"==typeof this.width?`${this.width}px`:this.width,"--duration":`${this.animationDuration}ms`},e=["dialog-wrapper",this.visible?"dialog-wrapper-visible":""],i=["mask",this.visible?"mask-enter":"mask-leave"],o=["dialog",this.visible?"dialog-enter":"dialog-leave",this.fullscreen?"fullscreen":""].join(" ");return s("div",{key:"af4d92ae4ff3daf4788da45bee54758032f0da46",class:e.join(" "),ref:t=>this.stylingContainer=t},s("div",{key:"481d749fb5372916e1a5c638e1426ea81ba69b89",class:i.join(" "),onClick:this.handleMaskClick.bind(this)}),s("div",{key:"aaa55eb2020f6620479098ce4d73cdefa9545593",class:o,style:t,role:"dialog","aria-modal":"true","aria-labelledby":"dialog-title"},s("div",{key:"615b47331160463846f46d4931df61e432f66974",class:"dialog-header"},s("h2",{key:"138d61646e479c98b91420bf85841f0efd409f0f",id:"dialog-title",class:"dialog-title"},this.dialogTitle),this.closable&&s("button",{key:"0825e53e901c05928538bc53e68213201b72e7c4",class:"close-btn",onClick:this.handleClose.bind(this)},"x")),s("div",{key:"ce28487598c5055c64714daaf889e2761a0b05d0",class:"dialog-content",style:{maxHeight:"calc(100vh - 62px)",overflowY:"auto"}},s("slot",{key:"3f0094e744b50ce4d46493bba9179233516961bb"})),this.showFooter&&s("div",{key:"b9312bf147e522beadadcc45cb5e940614fdbc7a",class:"dialog-footer"},s("slot",{key:"2babe8bbba0bafe867d7035a852451d41016d23f",name:"footer"},this.showCancelBtn&&s("button",{key:"a9a856be2bec40af3557c80e3ead7883a3d4a137",class:"cancel-btn",onClick:this.handleClose.bind(this)},I("cancel",this.language)),s("button",{key:"9d32f271621e2dc076e7ba489e8494b5d0090f46",class:"confirm-btn",onClick:this.handleConfirm.bind(this)},I("confirm",this.language))))))}get el(){return o(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};D.style=".dialog-wrapper{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;visibility:hidden;opacity:1;z-index:199}.dialog-wrapper-visible{visibility:visible}.mask{position:fixed;inset:0;background-color:rgba(0, 0, 0, 0.5);opacity:0;z-index:1000;transition:opacity var(--duration) linear}.mask-enter{opacity:1}.mask-leave{opacity:0}.dialog{position:relative;background:var(--emw--color-dialog-background, #fff);border-radius:12px;box-shadow:0 4px 32px rgba(0, 0, 0, 0.15);opacity:0;transform:scale(0.9);transition:all var(--duration) linear;width:100%;max-width:100vw;min-height:200px;overflow:hidden;z-index:1000}.dialog-enter{opacity:1;transform:scale(1)}.dialog-leave{opacity:0}.dialog.fullscreen{width:100vw !important;height:100vh;overflow:auto;max-height:none;border-radius:0;overflow:hidden}.dialog-header{padding:16px 16px 0 16px;display:flex;justify-content:space-between;align-items:center}.dialog-header .dialog-title{margin:0;font-size:1.25rem;font-weight:500;color:var(--emw--color-dialog-typography, #000)}.dialog-header .close-btn{background:transparent;border:none;font-size:1.5rem;width:2rem;height:2rem;color:var(--emw--color-gray-150, #6f6f6f);cursor:pointer;border-radius:4px}.dialog-header .close-btn:hover{background:var(--emw--color-gray-50, #f5f5f5);color:var(--emw--color-gray-300, #333)}.dialog-content{padding:24px;font-size:0.95rem;line-height:1.6;color:var(--emw--color-dialog-typography, #000);flex:1;overflow-y:auto;max-height:calc(100vh - 200px)}.dialog.fullscreen .dialog-content{max-height:none}.dialog-footer{padding:0 16px 16px 16px;display:flex;justify-content:center;gap:12px}.dialog-footer .cancel-btn,.dialog-footer .confirm-btn{padding:10px 24px;border-radius:6px;font-size:0.9rem;cursor:pointer;transition:all 0.3s linear}.dialog-footer .cancel-btn{border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));color:var(--emw--color-gray-300, #333);background:var(--emw--color-gray-400, #fff)}.dialog-footer .cancel-btn:hover{border-color:var(--emw--color-gray-100, #e6e6e6)}.dialog-footer .confirm-btn{border:none;color:var(--emw--color-gray-400, #fff);background:var(--emw--color-primary, #009993)}.dialog-footer .confirm-btn:hover{background:var(--emw--color-primary-variant, #004d4a)}@media screen and (max-width: 480px){.dialog.fullscreen .dialog-content{padding:12px}}";var O=Object.defineProperty,E=Object.defineProperties,P=Object.getOwnPropertyDescriptors,M=Object.getOwnPropertySymbols,N=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable,j=(t,e,i)=>e in t?O(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,F=(t,e)=>{for(var i in e||(e={}))N.call(e,i)&&j(t,i,e[i]);if(M)for(var i of M(e))B.call(e,i)&&j(t,i,e[i]);return t},$=(t,e)=>E(t,P(e)),V=(t,e,i)=>(j(t,"symbol"!=typeof e?e+"":e,i),i),R=(t,e,i)=>new Promise(((s,o)=>{var r=t=>{try{a(i.next(t))}catch(t){o(t)}},n=t=>{try{a(i.throw(t))}catch(t){o(t)}},a=t=>t.done?s(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.
@@ -1 +1 @@
1
- export{L as LotteryTippingTicketHistory}from"./lottery-tipping-ticket-history-90df9a64.js";import"./index-4e926388.js";
1
+ export{L as LotteryTippingTicketHistory}from"./lottery-tipping-ticket-history-a25198d5.js";import"./index-4e926388.js";
@@ -0,0 +1 @@
1
+ import{r as t,c as e,h as i}from"./index-4e926388.js";function n(t,e){if(t){const i=document.createElement("style");i.innerHTML=e,t.appendChild(i)}}function r(t,e){const i=new URL(e);fetch(i.href).then((t=>t.text())).then((e=>{const i=document.createElement("style");i.innerHTML=e,t&&t.appendChild(i)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function a(t,e){if(window.emMessageBus){const i=document.createElement("style");window.emMessageBus.subscribe(e,(e=>{i.innerHTML=e,t&&t.appendChild(i)}))}}function o(t){return o="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},o(t)}function s(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)}function c(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function d(t){c(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===o(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))}var l={};function u(){return l}function h(t){c(1,arguments);var e=d(t),i=e.getUTCDay(),n=(i<1?7:0)+i-1;return e.setUTCDate(e.getUTCDate()-n),e.setUTCHours(0,0,0,0),e}function f(t){c(1,arguments);var e=d(t),i=e.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(i+1,0,4),n.setUTCHours(0,0,0,0);var r=h(n),a=new Date(0);a.setUTCFullYear(i,0,4),a.setUTCHours(0,0,0,0);var o=h(a);return e.getTime()>=r.getTime()?i+1:e.getTime()>=o.getTime()?i:i-1}function g(t,e){var i,n,r,a,o,l,h,f;c(1,arguments);var g=u(),m=s(null!==(i=null!==(n=null!==(r=null!==(a=null==e?void 0:e.weekStartsOn)&&void 0!==a?a:null==e||null===(o=e.locale)||void 0===o||null===(l=o.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==r?r:g.weekStartsOn)&&void 0!==n?n:null===(h=g.locale)||void 0===h||null===(f=h.options)||void 0===f?void 0:f.weekStartsOn)&&void 0!==i?i:0);if(!(m>=0&&m<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=d(t),v=p.getUTCDay(),b=(v<m?7:0)+v-m;return p.setUTCDate(p.getUTCDate()-b),p.setUTCHours(0,0,0,0),p}function m(t,e){var i,n,r,a,o,l,h,f;c(1,arguments);var m=d(t),p=m.getUTCFullYear(),v=u(),b=s(null!==(i=null!==(n=null!==(r=null!==(a=null==e?void 0:e.firstWeekContainsDate)&&void 0!==a?a:null==e||null===(o=e.locale)||void 0===o||null===(l=o.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==r?r:v.firstWeekContainsDate)&&void 0!==n?n:null===(h=v.locale)||void 0===h||null===(f=h.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==i?i:1);if(!(b>=1&&b<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var w=new Date(0);w.setUTCFullYear(p+1,0,b),w.setUTCHours(0,0,0,0);var y=g(w,e),k=new Date(0);k.setUTCFullYear(p,0,b),k.setUTCHours(0,0,0,0);var x=g(k,e);return m.getTime()>=y.getTime()?p+1:m.getTime()>=x.getTime()?p:p-1}function p(t,e){for(var i=t<0?"-":"",n=Math.abs(t).toString();n.length<e;)n="0"+n;return i+n}const v=function(t,e){var i=t.getUTCFullYear(),n=i>0?i:1-i;return p("yy"===e?n%100:n,e.length)},b=function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):p(i+1,2)},w=function(t,e){return p(t.getUTCDate(),e.length)},y=function(t,e){return p(t.getUTCHours()%12||12,e.length)},k=function(t,e){return p(t.getUTCHours(),e.length)},x=function(t,e){return p(t.getUTCMinutes(),e.length)},T=function(t,e){return p(t.getUTCSeconds(),e.length)},M=function(t,e){var i=e.length,n=t.getUTCMilliseconds();return p(Math.floor(n*Math.pow(10,i-3)),e.length)};var S={G:function(t,e,i){var n=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(n,{width:"abbreviated"});case"GGGGG":return i.era(n,{width:"narrow"});default:return i.era(n,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var n=t.getUTCFullYear();return i.ordinalNumber(n>0?n:1-n,{unit:"year"})}return v(t,e)},Y:function(t,e,i,n){var r=m(t,n),a=r>0?r:1-r;return"YY"===e?p(a%100,2):"Yo"===e?i.ordinalNumber(a,{unit:"year"}):p(a,e.length)},R:function(t,e){return p(f(t),e.length)},u:function(t,e){return p(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var n=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return p(n,2);case"Qo":return i.ordinalNumber(n,{unit:"quarter"});case"QQQ":return i.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(n,{width:"narrow",context:"formatting"});default:return i.quarter(n,{width:"wide",context:"formatting"})}},q:function(t,e,i){var n=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return p(n,2);case"qo":return i.ordinalNumber(n,{unit:"quarter"});case"qqq":return i.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(n,{width:"narrow",context:"standalone"});default:return i.quarter(n,{width:"wide",context:"standalone"})}},M:function(t,e,i){var n=t.getUTCMonth();switch(e){case"M":case"MM":return b(t,e);case"Mo":return i.ordinalNumber(n+1,{unit:"month"});case"MMM":return i.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(n,{width:"narrow",context:"formatting"});default:return i.month(n,{width:"wide",context:"formatting"})}},L:function(t,e,i){var n=t.getUTCMonth();switch(e){case"L":return String(n+1);case"LL":return p(n+1,2);case"Lo":return i.ordinalNumber(n+1,{unit:"month"});case"LLL":return i.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(n,{width:"narrow",context:"standalone"});default:return i.month(n,{width:"wide",context:"standalone"})}},w:function(t,e,i,n){var r=function(t,e){c(1,arguments);var i=d(t),n=g(i,e).getTime()-function(t,e){var i,n,r,a,o,d,l,h;c(1,arguments);var f=u(),p=s(null!==(i=null!==(n=null!==(r=null!==(a=null==e?void 0:e.firstWeekContainsDate)&&void 0!==a?a:null==e||null===(o=e.locale)||void 0===o||null===(d=o.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==r?r:f.firstWeekContainsDate)&&void 0!==n?n:null===(l=f.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1),v=m(t,e),b=new Date(0);return b.setUTCFullYear(v,0,p),b.setUTCHours(0,0,0,0),g(b,e)}(i,e).getTime();return Math.round(n/6048e5)+1}(t,n);return"wo"===e?i.ordinalNumber(r,{unit:"week"}):p(r,e.length)},I:function(t,e,i){var n=function(t){c(1,arguments);var e=d(t),i=h(e).getTime()-function(t){c(1,arguments);var e=f(t),i=new Date(0);return i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0),h(i)}(e).getTime();return Math.round(i/6048e5)+1}(t);return"Io"===e?i.ordinalNumber(n,{unit:"week"}):p(n,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):w(t,e)},D:function(t,e,i){var n=function(t){c(1,arguments);var e=d(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var n=e.getTime();return Math.floor((i-n)/864e5)+1}(t);return"Do"===e?i.ordinalNumber(n,{unit:"dayOfYear"}):p(n,e.length)},E:function(t,e,i){var n=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(n,{width:"short",context:"formatting"});default:return i.day(n,{width:"wide",context:"formatting"})}},e:function(t,e,i,n){var r=t.getUTCDay(),a=(r-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(a);case"ee":return p(a,2);case"eo":return i.ordinalNumber(a,{unit:"day"});case"eee":return i.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(r,{width:"short",context:"formatting"});default:return i.day(r,{width:"wide",context:"formatting"})}},c:function(t,e,i,n){var r=t.getUTCDay(),a=(r-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(a);case"cc":return p(a,e.length);case"co":return i.ordinalNumber(a,{unit:"day"});case"ccc":return i.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(r,{width:"narrow",context:"standalone"});case"cccccc":return i.day(r,{width:"short",context:"standalone"});default:return i.day(r,{width:"wide",context:"standalone"})}},i:function(t,e,i){var n=t.getUTCDay(),r=0===n?7:n;switch(e){case"i":return String(r);case"ii":return p(r,e.length);case"io":return i.ordinalNumber(r,{unit:"day"});case"iii":return i.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(n,{width:"short",context:"formatting"});default:return i.day(n,{width:"wide",context:"formatting"})}},a:function(t,e,i){var n=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(n,{width:"narrow",context:"formatting"});default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(t,e,i){var n,r=t.getUTCHours();switch(n=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(n,{width:"narrow",context:"formatting"});default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(t,e,i){var n,r=t.getUTCHours();switch(n=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(n,{width:"narrow",context:"formatting"});default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var n=t.getUTCHours()%12;return 0===n&&(n=12),i.ordinalNumber(n,{unit:"hour"})}return y(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):k(t,e)},K:function(t,e,i){var n=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(n,{unit:"hour"}):p(n,e.length)},k:function(t,e,i){var n=t.getUTCHours();return 0===n&&(n=24),"ko"===e?i.ordinalNumber(n,{unit:"hour"}):p(n,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):x(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):T(t,e)},S:function(t,e){return M(t,e)},X:function(t,e,i,n){var r=(n._originalDate||t).getTimezoneOffset();if(0===r)return"Z";switch(e){case"X":return C(r);case"XXXX":case"XX":return P(r);default:return P(r,":")}},x:function(t,e,i,n){var r=(n._originalDate||t).getTimezoneOffset();switch(e){case"x":return C(r);case"xxxx":case"xx":return P(r);default:return P(r,":")}},O:function(t,e,i,n){var r=(n._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+D(r,":");default:return"GMT"+P(r,":")}},z:function(t,e,i,n){var r=(n._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+D(r,":");default:return"GMT"+P(r,":")}},t:function(t,e,i,n){return p(Math.floor((n._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,i,n){return p((n._originalDate||t).getTime(),e.length)}};function D(t,e){var i=t>0?"-":"+",n=Math.abs(t),r=Math.floor(n/60),a=n%60;if(0===a)return i+String(r);var o=e||"";return i+String(r)+o+p(a,2)}function C(t,e){return t%60==0?(t>0?"-":"+")+p(Math.abs(t)/60,2):P(t,e)}function P(t,e){var i=e||"",n=t>0?"-":"+",r=Math.abs(t);return n+p(Math.floor(r/60),2)+i+p(r%60,2)}const j=S;var E=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"})}},I=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"})}},O={p:I,P:function(t,e){var i,n=t.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return E(t,e);switch(r){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}}",E(r,e)).replace("{{time}}",I(a,e))}};const L=O;var G=["D","DD"],W=["YY","YYYY"];function N(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 z={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 R,q={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"})},A={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function B(t){return function(e,i){var n;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&t.formattingValues){var r=t.defaultFormattingWidth||t.defaultWidth,a=null!=i&&i.width?String(i.width):r;n=t.formattingValues[a]||t.formattingValues[r]}else{var o=t.defaultWidth,s=null!=i&&i.width?String(i.width):t.defaultWidth;n=t.values[s]||t.values[o]}return n[t.argumentCallback?t.argumentCallback(e):e]}}function $(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=i.width,r=e.match(n&&t.matchPatterns[n]||t.matchPatterns[t.defaultMatchWidth]);if(!r)return null;var a,o=r[0],s=n&&t.parsePatterns[n]||t.parsePatterns[t.defaultParseWidth],c=Array.isArray(s)?function(t){for(var e=0;e<t.length;e++)if(t[e].test(o))return e}(s):function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].test(o))return e}(s);return a=t.valueCallback?t.valueCallback(c):c,{value:a=i.valueCallback?i.valueCallback(a):a,rest:e.slice(o.length)}}}const _={code:"en-US",formatDistance:function(t,e,i){var n,r=z[t];return n="string"==typeof r?r:1===e?r.one:r.other.replace("{{count}}",e.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+n:n+" ago":n},formatLong:q,formatRelative:function(t){return A[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:B({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:B({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:B({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:B({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:B({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:(R={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(R.matchPattern);if(!i)return null;var n=i[0],r=t.match(R.parsePattern);if(!r)return null;var a=R.valueCallback?R.valueCallback(r[0]):r[0];return{value:a=e.valueCallback?e.valueCallback(a):a,rest:t.slice(n.length)}}),era:$({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:$({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:$({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:$({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:$({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 Q,X=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,F=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,U=/^'([^]*?)'?$/,H=/''/g,J=/[a-zA-Z]/;function K(t,e,i){var n,r,a,l,h,f,g,m,p,v,b,w,y,k,x,T,M,S;c(2,arguments);var D=String(e),C=u(),P=null!==(n=null!==(r=null==i?void 0:i.locale)&&void 0!==r?r:C.locale)&&void 0!==n?n:_,E=s(null!==(a=null!==(l=null!==(h=null!==(f=null==i?void 0:i.firstWeekContainsDate)&&void 0!==f?f:null==i||null===(g=i.locale)||void 0===g||null===(m=g.options)||void 0===m?void 0:m.firstWeekContainsDate)&&void 0!==h?h:C.firstWeekContainsDate)&&void 0!==l?l:null===(p=C.locale)||void 0===p||null===(v=p.options)||void 0===v?void 0:v.firstWeekContainsDate)&&void 0!==a?a:1);if(!(E>=1&&E<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var I=s(null!==(b=null!==(w=null!==(y=null!==(k=null==i?void 0:i.weekStartsOn)&&void 0!==k?k:null==i||null===(x=i.locale)||void 0===x||null===(T=x.options)||void 0===T?void 0:T.weekStartsOn)&&void 0!==y?y:C.weekStartsOn)&&void 0!==w?w:null===(M=C.locale)||void 0===M||null===(S=M.options)||void 0===S?void 0:S.weekStartsOn)&&void 0!==b?b:0);if(!(I>=0&&I<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!P.localize)throw new RangeError("locale must contain localize property");if(!P.formatLong)throw new RangeError("locale must contain formatLong property");var O=d(t);if(!function(t){if(c(1,arguments),!function(t){return c(1,arguments),t instanceof Date||"object"===o(t)&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t)return!1;var e=d(t);return!isNaN(Number(e))}(O))throw new RangeError("Invalid time value");var z=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),Y=function(t,e){return c(2,arguments),function(t,e){c(2,arguments);var i=d(t).getTime(),n=s(e);return new Date(i+n)}(t,-s(e))}(O,z),R={firstWeekContainsDate:E,weekStartsOn:I,locale:P,_originalDate:O};return D.match(F).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,L[e])(t,P.formatLong):t})).join("").match(X).map((function(n){if("''"===n)return"'";var r,a,o=n[0];if("'"===o)return(a=(r=n).match(U))?a[1].replace(H,"'"):r;var s=j[o];if(s)return null!=i&&i.useAdditionalWeekYearTokens||-1===W.indexOf(n)||N(n,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!(-1!==G.indexOf(n))||N(n,e,String(t)),s(Y,n,P.localize,R);if(o.match(J))throw new RangeError("Format string contains an unescaped latin alphabet character `"+o+"`");return n})).join("")}!function(t){t.WON="Won",t.LOST="Lost"}(Q||(Q={}));const Z=["ro","en","fr","ar","hr"],V={en:{totalItems:"Total {total} items",perPage:"{size} / page",goTo:"Go to",filter:"Filter",clear:"Clear",searchByTicketId:"Search by Ticket ID",enterTicketId:"Enter Ticket ID",searchByTicketType:"Search by Ticket Type",selectTicketType:"Select Ticket Type",searchByDate:"Search by Date",from:"From",to:"To",normal:"Normal",subscription:"Subscription",ticketsHistory:"Tickets History",settled:"Settled",purchased:"Purchased",canceled:"Canceled",noData:"No data Avaliable.",ticketId:"Ticket ID:",ticketType:"Ticket Type:",ticketAmount:"Ticket Amount:",lineDetail:"Line Detail:",seeDetails:"See Details",numberOfDraw:"Number of Draw:",ticketResult:"Ticket Result:",drawId:"Draw ID:",drawDate:"Draw Date:",result:"Result:",prize:"Prize:",bettingType:"Betting Type:"},ro:{},fr:{},ar:{},hr:{}},tt=(t,e,i)=>{const n=e;let r=V[void 0!==n&&Z.includes(n)?n:"en"][t];return i&&Object.keys(i).forEach((t=>{r=r.replace(`{${t}}`,i[t])})),r},et=t=>{Object.keys(t).forEach((e=>{for(let i in t[e])V[e][i]=t[e][i]}))};function it(t,e="GET",i=null,n={}){return new Promise(((r,a)=>{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)})),s=Object.assign({"Content-Type":"application/json"},n);"GET"!==e&&"HEAD"!==e&&(s["X-Idempotency-Key"]=o);const c={method:e,headers:s,body:null};i&&"GET"!==e&&"HEAD"!==e?c.body=JSON.stringify(i):delete c.body,fetch(t,c).then((t=>{if(!t.ok)throw new Error(`HTTP error! Status: ${t.status}`);return t.json()})).then((t=>r(t))).catch((t=>a(t)))}))}function nt(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 i=0;for(let n=0;n<e;n++){if(!nt(t[n]))return!1;i++}return i===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 i=0;for(const e of Object.values(t)){if(!nt(e))return!1;i++}return i===e}(t):!t)}const rt={0:"1",1:"X",2:"2"};function at(t){const e=[],i=[];for(let e=0;e<t.length;e+=2){const[n,r]=[t[e],t[e+1]];i[r]?i[r].push(n):i[r]=[n]}return i.forEach((t=>{e.push(function(t){const e=[];return Object.keys(rt).forEach((i=>{e.push({isSelected:t.includes(Number(i)),value:rt[i]})})),e}(t))})),e}const ot=t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),st=({message:t,theme:e="success"})=>{window.postMessage({type:"ShowNotificationToast",message:t,theme:e})},ct=class{constructor(i){t(this,i),this.logout=e(this,"logout",7),this.ticketTypeMap={NORMAL:"Normal",SYNDICATE:"Syndicate",SUBSCRIPTION:"Subscription"},this.resultMap={[Q.WON]:"Win",[Q.LOST]:"Lose"},this.displayPrizeCategory=t=>{const e=new Map;t.forEach((t=>{let i=t.divisionDisplayName,n=t.amount,r=t.currency;i&&"None"!=i&&(e.has(i)?e.set(i,{amount:e.get(i).amount+n,currency:r,times:e.get(i).times+1}):e.set(i,{amount:n,currency:r,times:1}))}));const i=[];for(let[t,n]of e.entries())i.push({prizeName:t,amount:n.amount,currency:n.currency,times:n.times});return i.sort(((t,e)=>e.prizeName.localeCompare(t.prizeName))),i},this.endpoint=void 0,this.endpointTicket=void 0,this.gameId=void 0,this.playerId=void 0,this.sessionId="",this.drawId=void 0,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.language="en",this.translationUrl="",this.ticketHistory=[],this.activeStatus="",this.statusOptions=void 0,this.isLoading=!1,this.rawData={},this.filterData={offset:0,limit:10,state:"",from:"",to:"",wagerType:"",vendorGameType:"PoolGame",id:""},this.paginationInfo={current:1,total:0,pageSize:10},this.quickFiltersActive=!1,this.showCurrentTicketLine=!1,this.curTicketItem=void 0,this.curSelection=[],this.curSelectionIdx=0,this.showCurrentDrawResult=!1,this.curDrawItem=void 0,this.curDrawSelection=[],this.curDrawSelectionBettingType=void 0,this.curDrawSelectionMap={}}handleClientStylingChange(t,e){t!=e&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&r(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&a(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&r(this.stylingContainer,this.clientStylingUrl))}async fetchGameData(){var t;try{this.isLoading=!0;let t=new URL(`${this.endpoint}/games/${this.gameId}`);const e=await it(t.href,"GET");this.rawData=e}catch(e){st({message:null!==(t=e.message)&&void 0!==t?t:e,theme:"error"})}finally{this.isLoading=!1}}connectedCallback(){this.endpoint&&this.gameId&&this.fetchGameData()}handleGameInfoChange(t,e){t&&t!=e&&this.fetchGameData()}handleTicketInfoChange(t,e){t&&t!=e&&this.fetchTicketList()}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}async fetchTicketList(){this.isLoading=!0;try{const{items:t,total:e}=await it(`${this.endpointTicket}/tickets${function(t){const e={};Object.entries(t).forEach((([t,i])=>{nt(i,!0)||(e[t]=i)}));const i=Object.entries(e).map((([t,e])=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`)).join("&");return i?`?${i}`:""}(this.filterData)}`,"GET",null,{Authorization:`Bearer ${this.sessionId}`});this.ticketHistory=t,this.paginationInfo.total=e,t.length>0&&this.getDrawResult()}catch(t){console.log("in fetchTicketList error is: ",t),401===t.status&&(st({message:t.message,theme:"error"}),this.logout.emit())}finally{this.isLoading=!1}}async fetchDrwaResult(t,e){try{return await it(`${this.endpoint}/games/${t}/draws/${e}`,"GET",{})}catch(t){console.log(t)}}getDivision(t,e){var i;let n=t.division,r=null===(i=e.prizes)||void 0===i?void 0:i.filter((t=>t.order===n));return r&&r.length?r[0].division:null}async getDrawResult(){const t=new Map;this.ticketHistory.forEach(((e,i)=>{e.drawResults.forEach(((n,r)=>{const a=`${n.drawId}-${e.gameId}`;t.has(a)?t.get(a).indices.push({ticketIndex:i,drawIndex:r}):t.set(a,{drawId:n.drawId,gameId:e.gameId,indices:[{ticketIndex:i,drawIndex:r}]})}))}));let e=[...this.ticketHistory];await Promise.all(Array.from(t.values()).map((async({gameId:t,drawId:i,indices:n})=>{try{const r=await this.fetchDrwaResult(t,i);r&&n.forEach((({ticketIndex:t,drawIndex:i})=>{const n=Object.assign(Object.assign({},e[t].drawResults[i]),{tempDrawData:Object.assign(Object.assign({},r),{vendorGameId:e[t].vendorGameId}),prizeDetails:this.displayPrizeCategory(e[t].drawResults[i].details)}),a=[...e[t].drawResults];a[i]=n,e[t]=Object.assign(Object.assign({},e[t]),{drawResults:a})}))}catch(e){console.error(`failed to fetch draw result (gameId: ${t}, drawId: ${i}):`,e)}}))),this.ticketHistory=e}componentWillLoad(){this.translationUrl&&et(JSON.parse(this.translationUrl)),this.statusOptions=[{label:tt("settled",this.language),value:"Settled"},{label:tt("purchased",this.language),value:"Purchased"},{label:tt("canceled",this.language),value:"Canceled"}],this.fetchTicketList()}changeStatus(t){this.activeStatus=t,this.filterData.state=t,this.quickFiltersActive=!0,this.fetchTicketList()}handlePageSizeChange(t){this.filterData.limit=t.detail,this.fetchTicketList()}handlePageChange(t){this.filterData.offset=(t.detail-1)*this.filterData.limit,this.fetchTicketList()}handleShowTicketLineDetial(t){this.curSelectionIdx=0,this.showCurrentTicketLine=!0,this.curTicketItem=t,this.curSelection=this.parseSelection()}handleShowCurrentDraw(t){this.showCurrentDrawResult=!0,this.curDrawItem=t,this.curDrawSelectionBettingType=t.winningNumbers[0].winning_type,this.curDrawItem.winningNumbers.forEach((t=>{this.curDrawSelectionMap[t.winning_type]=[at(t.numbers)]})),this.curDrawSelection=this.curDrawSelectionMap[this.curDrawSelectionBettingType]}parseSelection(){const t=[];return this.curTicketItem.selection.forEach(((e,i)=>{t[i]=at(e.selections)})),t}handleFilterChange(t){const e=t.detail;this.filterData.from=e.filterFromCalendar,this.filterData.to=e.filterToCalendar,this.filterData.id=e.ticketId,this.filterData.wagerType=e.ticketType,this.fetchTicketList()}handleFilterClear(){this.activeStatus="",this.quickFiltersActive=!1,this.filterData={offset:0,limit:10,state:"",from:"",to:"",wagerType:"",vendorGameType:"PoolGame",id:""},this.fetchTicketList()}get playTypeConfig(){var t,e,i;return null===(i=null===(e=null===(t=this.rawData)||void 0===t?void 0:t.rules)||void 0===e?void 0:e.poolGame)||void 0===i?void 0:i.playTypes}get bettingTypeConfig(){var t,e,i;return null===(i=null===(e=null===(t=this.rawData)||void 0===t?void 0:t.rules)||void 0===e?void 0:e.poolGame)||void 0===i?void 0:i.bettingTypes}getBettingType(t){var e;return null!==(e=this.playTypeConfig.find((e=>e.betTypeId===t)).bettingType)&&void 0!==e?e:""}handlePoolGameCurrentPageChange(t){const{currentPage:e}=t.detail;this.curSelectionIdx=e-1}handleDrawBettingTypeChange(t){this.curDrawSelectionBettingType=t,this.curDrawSelection=this.curDrawSelectionMap[this.curDrawSelectionBettingType]}getBettingTypeName(t){var e,i;const n=null===(i=null===(e=this.bettingTypeConfig)||void 0===e?void 0:e.find((e=>e.code===t)))||void 0===i?void 0:i.name;return null!=n?n:t}render(){return i("div",{key:"0a8574ec1ba181a07043ec0451dfca73f8aaaf9d",class:"lottery-tipping-ticket-history",ref:t=>this.stylingContainer=t},i("div",{key:"f6f0f989a7b4e598e2d9c3d18c83d4f8b4595d84",class:"ticket-history-title"},tt("ticketsHistory",this.language)),i("div",{key:"e80a9d6e39d899fe6a210837853aacfea21a6cb3",class:"filter-wrap"},i("div",{key:"edeaca1e9062a0b9ef264151113bc6130f358017",class:"filter-status"},this.statusOptions.map((t=>i("div",{class:"filter-status-btn"+(this.activeStatus==t.value?" active":""),onClick:()=>this.changeStatus(t.value)},t.label)))),i("div",{key:"fdae8b8a796d62827530955449baf85152b4bd49",class:"filter-operation"},i("lottery-tipping-filter",{key:"004a977ff4460be8e1fbffd22fb6a742401b6597","quick-filters-active":this.quickFiltersActive,language:this.language,"translation-url":this.translationUrl}))),this.isLoading&&i("div",{key:"4142baea434e611b871f7b8712a8ed03961bf929",class:"loading-wrap"},i("section",{key:"d412ab2648dc168e76d13957b9d654522d0211e4",class:"dots-container"},i("div",{key:"81cca835dff7b6708354d79ecdb804fd768dfdf5",class:"dot"}),i("div",{key:"4fd405a231c5560b014bc9dc34e8847daf197ab1",class:"dot"}),i("div",{key:"b89f42119dc855255ffb27b7d12d525dca40ab20",class:"dot"}),i("div",{key:"c9ce133fe12b41639719558922ab0651ed82f605",class:"dot"}),i("div",{key:"8a18cbe9892de938f731045c0d8a01a6f58ab19d",class:"dot"}))),!this.isLoading&&(!this.ticketHistory||0==this.ticketHistory.length)&&i("div",{key:"c806d553da2223941f0e1a28a12f96088e0bd45d",class:"empty-wrap"},tt("noData",this.language)),!this.isLoading&&this.ticketHistory&&0!=this.ticketHistory.length&&i("div",{key:"4ac929f08ef09e5f18cfcb0424c489f8d513bc9b",class:"ticket-list-wrap"},this.ticketHistory.map((t=>i("lottery-tipping-panel",{"header-title":K(new Date(t.createdAt),"dd/MM/yyyy HH:mm:ss")+" "+t.state},i("div",{class:"panel-content",slot:"content"},i("div",{class:"ticket-info"},i("div",{class:"ticket-info-item"},i("div",{class:"ticket-info-label"},tt("ticketId",this.language)),i("div",{class:"ticket-info-val"},t.id," ")),i("div",{class:"ticket-info-item"},i("div",{class:"ticket-info-label"},tt("ticketType",this.language)),i("div",{class:"ticket-info-val"},this.ticketTypeMap[t.wagerType]," ")),i("div",{class:"ticket-info-item"},i("div",{class:"ticket-info-label"},tt("ticketAmount",this.language)),i("div",{class:"ticket-info-val"},`${t.amount} ${t.currency}`)),i("div",{class:"ticket-info-item"},i("div",{class:"ticket-info-label"},tt("lineDetail",this.language)),i("div",{class:"ticket-info-val"},i("span",{class:"show-detail-link",onClick:()=>this.handleShowTicketLineDetial(t)},tt("seeDetails",this.language)))),i("div",{class:"ticket-info-item"},i("div",{class:"ticket-info-label"},tt("numberOfDraw",this.language)),i("div",{class:"ticket-info-val"},t.drawCount))),"Settled"==t.state&&t.drawResults.map((t=>i("div",{class:"draw-info-container"},t.tempDrawData?i("div",{class:"draw-info"},i("div",{class:"draw-info-item"},i("div",{class:"draw-info-label"},tt("ticketResult",this.language)),i("div",{class:"draw-info-val"},this.resultMap[t.state])),i("div",{class:"draw-info-item"},i("div",{class:"draw-info-label"},tt("drawId",this.language)),i("div",{class:"draw-info-val"},t.drawId)),i("div",{class:"draw-info-item"},i("div",{class:"draw-info-label"},tt("drawDate",this.language)),i("div",{class:"draw-info-val"},K(new Date(t.tempDrawData.date),"dd/MM/yyyy"))),i("div",{class:"draw-info-item"},i("div",{class:"draw-info-label"},tt("result",this.language)),i("div",{class:"draw-info-val"},i("span",{class:"show-detail-link",onClick:()=>this.handleShowCurrentDraw(t.tempDrawData)},tt("seeDetails",this.language)))),t.state===Q.WON&&i("div",{class:"draw-info-item"},i("div",{class:"draw-info-label"},tt("prize",this.language)),i("div",{class:"draw-info-val1"},i("div",{style:{height:"20px"}}),t.prizeDetails.map((t=>i("span",null,i("div",null,i("span",{style:{color:"rgb(85, 85, 85)"}},t.prizeName,t.times>1?" x "+t.times:"",":"," "),i("span",{style:{"margin-right":"4px",color:"rgb(85, 85, 85)"}},function(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(".")}(t.amount)),i("span",{style:{color:"rgb(85, 85, 85)"}},t.currency)))))))):i("div",{class:"draw-info-skeleton"},[...Array(5)].map((()=>i("div",{class:"skeleton-line"})))))))))))),i("lottery-tipping-dialog",{key:"ef4cff5d933545372cef4f6eb4e7dcd1a8f6f111",visible:this.showCurrentTicketLine,width:ot(window.navigator.userAgent)?void 0:"720px",fullscreen:ot(window.navigator.userAgent),closable:!0,showFooter:!1,onCancel:()=>{this.showCurrentTicketLine=!1},language:this.language,"translation-url":this.translationUrl},this.curSelection&&this.curSelection.length&&i("div",{key:"817ee1fe2541a4ed62b944b58b7abb1eda7afdbe"},i("div",{key:"68672db719f3cc643d6b17769c0a786b3c931a42",class:"betting-type"},i("div",{key:"af264555814c9e3262b64722438ecd449f451ceb",class:"betting-type-title"},tt("bettingType",this.language)),i("div",{key:"25b9bff20eb5a221bed6d345412dd48964890ae7",class:"betting-type-text"},this.getBettingTypeName(this.getBettingType(this.curTicketItem.selection[this.curSelectionIdx].betType)))),i("lottery-tipping-ticket-bet",{key:"4a01e6f1734e5165b06713d3dbb7484463cc1bf4",endpoint:this.endpoint,"session-id":this.sessionId,"game-id":this.curTicketItem.vendorGameId,"draw-id":this.curTicketItem.startingDrawId,"default-bullet-config-line-group":JSON.stringify(this.curSelection),"read-pretty":!0,"total-pages":this.curSelection.length,language:this.language,"translation-url":this.translationUrl}))),i("lottery-tipping-dialog",{key:"06fd83f481eb08a4601a96353557a925b1205b66",visible:this.showCurrentDrawResult,width:ot(window.navigator.userAgent)?void 0:"720px",fullscreen:ot(window.navigator.userAgent),closable:!0,showFooter:!1,onCancel:()=>{this.showCurrentDrawResult=!1},language:this.language,"translation-url":this.translationUrl},this.curDrawSelection&&this.curDrawSelection.length&&i("div",{key:"c9161334967e9e5abaae4a3d1df922ee7d8d7945"},i("div",{key:"c7a3ac60084056b899a2b59a6205cddbc8d4e7fc",class:"betting-type"},i("div",{key:"97aa9e8c9048bb57f70d4230f29f8fde3aa4454a",class:"betting-type-title"},tt("bettingType",this.language)),i("div",{key:"64332b20eabf75e9273bb6f16c16436e90b28346",class:"betting-type-text"},i("div",{key:"cbd1ec9e723c6a369a98141077e4648d802c76ad",class:"LotteryTippingTicketController__segmented-control"},Object.keys(this.curDrawSelectionMap).map((t=>i("button",{class:{LotteryTippingTicketController__segment:!0,"LotteryTippingTicketController__segment--active":this.curDrawSelectionBettingType===t},onClick:()=>this.handleDrawBettingTypeChange(t)},this.getBettingTypeName(t))))))),i("lottery-tipping-ticket-bet",{key:"8b352410c87858e5629a5524e70134ccc2e1b116",endpoint:this.endpoint,"session-id":this.sessionId,"game-id":this.curDrawItem.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,"translation-url":this.translationUrl}))),i("div",{key:"e730c86100cb47c4c63051174cd9b33dbb8e6ce4",class:"pagination-wrap"},i("lottery-tipping-pagination",{key:"dce4d6e9a18e783339d0ff545d1bd47bf1b2a33d",total:this.paginationInfo.total,current:this.paginationInfo.current,"page-size":this.paginationInfo.pageSize,language:this.language,"translation-url":this.translationUrl})))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],gameId:["handleGameInfoChange"],endpoint:["handleGameInfoChange"],endpointTicket:["handleTicketInfoChange"],playerId:["handleTicketInfoChange"],sessionId:["handleTicketInfoChange"]}}};ct.style="@keyframes skeleton-loading{0%{background-position:200% 0}100%{background-position:-200% 0}}.lottery-tipping-ticket-history{padding:12px}.lottery-tipping-ticket-history .ticket-history-title{margin:20px 0;text-align:center;font-size:20px;font-weight:700;color:var(--emw--color-typography, #000)}.lottery-tipping-ticket-history .ticket-info{display:flex;flex-direction:column;gap:12px}.lottery-tipping-ticket-history .ticket-info-item{display:flex;align-items:center;user-select:none}.lottery-tipping-ticket-history .ticket-info-label{margin-right:12px;color:var(--emw--color-typography, #000)}.lottery-tipping-ticket-history .ticket-info-val{color:var(--emw--color-typography-secondary, #555)}.lottery-tipping-ticket-history .ticket-list-wrap{display:flex;flex-direction:column;gap:12px}.lottery-tipping-ticket-history .draw-info-skeleton{width:30%;min-width:300px;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));border-radius:5px;display:flex;flex-direction:column;gap:10px;padding:10px}.lottery-tipping-ticket-history .skeleton-line{height:16px;border-radius:4px;background:linear-gradient(90deg, var(--emw--color-gray-100, #e6e6e6) 25%, var(--emw--color-gray-50, #f5f5f5) 50%, var(--emw--color-gray-100, #e6e6e6) 75%);background-size:200% 100%;animation:skeleton-loading 1.2s infinite}.lottery-tipping-ticket-history .draw-info{width:30%;min-width:300px;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));border-radius:5px;padding:12px;margin-top:20px;display:flex;flex-direction:column;gap:8px;user-select:none}.lottery-tipping-ticket-history .draw-info-item{display:flex}.lottery-tipping-ticket-history .draw-info-label{margin-right:6px;color:var(--emw--color-typography, #000)}.lottery-tipping-ticket-history .draw-info-val{color:var(--emw--color-typography-secondary, #555)}.lottery-tipping-ticket-history .show-detail-link{color:var(--emw-pool-game-acition-normal, #4a90e2);text-decoration:underline;cursor:pointer}.lottery-tipping-ticket-history .filter-wrap{margin-bottom:20px;display:flex;justify-content:space-between;align-items:center}.lottery-tipping-ticket-history .filter-wrap .filter-status{display:flex;gap:12px;align-items:center}.lottery-tipping-ticket-history .filter-wrap .filter-status-btn{background:var(--emw--color-background, #fff);border:2px solid var(--emw--color-primary, #fed275);border-radius:4px;padding:10px 8px;font-size:12px;text-transform:uppercase;color:var(--emw--color-typography, #000);cursor:pointer;transition:all 0.2s linear}.lottery-tipping-ticket-history .filter-wrap .filter-status-btn:hover{background-color:var(--emw--color-secondary, #fff3b9)}.lottery-tipping-ticket-history .filter-wrap .filter-status-btn.active{background:var(--emw--color-secondary, #fff3b9);color:var(--emw--color-typography, #000);border:2px solid var(--emw--color-typography, #000)}.lottery-tipping-ticket-history .pagination-wrap{margin-top:20px;display:flex;justify-content:flex-end}@media screen and (min-width: 1200px){.lottery-tipping-ticket-history{padding:24px;width:60%;margin:0 auto}}@media screen and (max-width: 480px){.lottery-tipping-ticket-history{padding:2px}.lottery-tipping-ticket-history .filter-wrap .filter-status{gap:4px}}.loading-wrap{margin:20px 0;display:flex;align-items:center;justify-content:center;min-height:40vh}.loading-wrap .dots-container{display:flex;align-items:center;justify-content:center;height:100%;width:100%}.loading-wrap .dot{height:14px;width:14px;margin-right:14px;border-radius:14px;background-color:var(--emw-pool-game-ticket-history-loading-normal, #b3d4fc);animation:pulse 1.5s infinite ease-in-out}.loading-wrap .dot:last-child{margin-right:0}.loading-wrap .dot:nth-child(1){animation-delay:-0.3s}.loading-wrap .dot:nth-child(2){animation-delay:-0.1s}.loading-wrap .dot:nth-child(3){animation-delay:0.1s}@keyframes pulse{0%{transform:scale(0.8);background-color:var(--emw-pool-game-ticket-history-loading-normal, #b3d4fc);box-shadow:0 0 0 0 var(--emw-pool-game-ticket-history-loading-box-shadow-normal, rgba(178, 212, 252, 0.7))}50%{transform:scale(1.2);background-color:var(--emw-pool-game-ticket-history-loading-active, #6793fb);box-shadow:0 0 0 10px var(--emw-pool-game-ticket-history-loading-box-shadow-active, rgba(178, 212, 252, 0))}100%{transform:scale(0.8);background-color:var(--emw-pool-game-ticket-history-loading-normal, #b3d4fc);box-shadow:0 0 0 0 rgba(178, 212, 252, 0.7)}}.empty-wrap{margin:20px 0;display:flex;align-items:center;justify-content:center;min-height:40vh;color:var(--emw--color-typography, #000)}.betting-type{margin-bottom:16px;display:flex;align-items:center;gap:20px}.betting-type-title{font-weight:600;font-size:16px}.betting-type-text{font-size:16px}.LotteryTippingTicketController__label{font-weight:500;white-space:nowrap;width:6rem;color:var(--emw--color-typography-secondary, #333)}.LotteryTippingTicketController__segmented-control{height:2.2rem;display:inline-flex;background-color:var(--emw--color-background-secondary, #f5f5f5);border-radius:2rem;padding:0.2rem}.LotteryTippingTicketController__segment{background-color:transparent;border:none;padding:0.3rem 0.8rem;cursor:pointer;font-weight:500;border-radius:2rem;outline:none;transition:background-color 0.25s ease, color 0.25s ease;white-space:nowrap;color:var(--emw--color-typography, #000)}.LotteryTippingTicketController__segment--active{background-color:var(--emw--color-background, #fff);color:var(--emw--color-typography, #000);font-weight:600}.LotteryTippingTicketController__segment:not(.LotteryTippingTicketController__segment--active):hover{background-color:var(--emw--color-background-tertiary, #ccc)}";export{ct as L,r as a,a as b,tt as c,K as f,et as g,ot as i,c as r,n as s,s as t}
@@ -1,7 +1,6 @@
1
1
  export declare function format(first: string, middle: string, last: string): string;
2
2
  export declare const generateUUID: () => string;
3
3
  export declare function fetchRequest(url: string, method?: string, body?: any, headers?: {}): Promise<any>;
4
- export declare const fetcher: (url: string) => Promise<any>;
5
4
  export declare function isEmptyValue(value: any, allowZero?: boolean): boolean;
6
5
  export declare function toQueryParams(params: Record<string, any>): string;
7
6
  export declare function parseBulletNumber(numberArr: Array<number>): any[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/lottery-tipping-ticket-history",
3
- "version": "1.80.11",
3
+ "version": "1.80.13",
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,c as e,h as i}from"./index-4e926388.js";function n(t,e){if(t){const i=document.createElement("style");i.innerHTML=e,t.appendChild(i)}}function r(t,e){const i=new URL(e);fetch(i.href).then((t=>t.text())).then((e=>{const i=document.createElement("style");i.innerHTML=e,t&&t.appendChild(i)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function a(t,e){if(window.emMessageBus){const i=document.createElement("style");window.emMessageBus.subscribe(e,(e=>{i.innerHTML=e,t&&t.appendChild(i)}))}}function o(t){return o="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},o(t)}function s(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)}function c(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function d(t){c(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===o(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))}var l={};function u(){return l}function h(t){c(1,arguments);var e=d(t),i=e.getUTCDay(),n=(i<1?7:0)+i-1;return e.setUTCDate(e.getUTCDate()-n),e.setUTCHours(0,0,0,0),e}function f(t){c(1,arguments);var e=d(t),i=e.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(i+1,0,4),n.setUTCHours(0,0,0,0);var r=h(n),a=new Date(0);a.setUTCFullYear(i,0,4),a.setUTCHours(0,0,0,0);var o=h(a);return e.getTime()>=r.getTime()?i+1:e.getTime()>=o.getTime()?i:i-1}function g(t,e){var i,n,r,a,o,l,h,f;c(1,arguments);var g=u(),m=s(null!==(i=null!==(n=null!==(r=null!==(a=null==e?void 0:e.weekStartsOn)&&void 0!==a?a:null==e||null===(o=e.locale)||void 0===o||null===(l=o.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==r?r:g.weekStartsOn)&&void 0!==n?n:null===(h=g.locale)||void 0===h||null===(f=h.options)||void 0===f?void 0:f.weekStartsOn)&&void 0!==i?i:0);if(!(m>=0&&m<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=d(t),v=p.getUTCDay(),w=(v<m?7:0)+v-m;return p.setUTCDate(p.getUTCDate()-w),p.setUTCHours(0,0,0,0),p}function m(t,e){var i,n,r,a,o,l,h,f;c(1,arguments);var m=d(t),p=m.getUTCFullYear(),v=u(),w=s(null!==(i=null!==(n=null!==(r=null!==(a=null==e?void 0:e.firstWeekContainsDate)&&void 0!==a?a:null==e||null===(o=e.locale)||void 0===o||null===(l=o.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==r?r:v.firstWeekContainsDate)&&void 0!==n?n:null===(h=v.locale)||void 0===h||null===(f=h.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==i?i:1);if(!(w>=1&&w<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(p+1,0,w),y.setUTCHours(0,0,0,0);var b=g(y,e),k=new Date(0);k.setUTCFullYear(p,0,w),k.setUTCHours(0,0,0,0);var x=g(k,e);return m.getTime()>=b.getTime()?p+1:m.getTime()>=x.getTime()?p:p-1}function p(t,e){for(var i=t<0?"-":"",n=Math.abs(t).toString();n.length<e;)n="0"+n;return i+n}const v=function(t,e){var i=t.getUTCFullYear(),n=i>0?i:1-i;return p("yy"===e?n%100:n,e.length)},w=function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):p(i+1,2)},y=function(t,e){return p(t.getUTCDate(),e.length)},b=function(t,e){return p(t.getUTCHours()%12||12,e.length)},k=function(t,e){return p(t.getUTCHours(),e.length)},x=function(t,e){return p(t.getUTCMinutes(),e.length)},T=function(t,e){return p(t.getUTCSeconds(),e.length)},M=function(t,e){var i=e.length,n=t.getUTCMilliseconds();return p(Math.floor(n*Math.pow(10,i-3)),e.length)};var S={G:function(t,e,i){var n=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(n,{width:"abbreviated"});case"GGGGG":return i.era(n,{width:"narrow"});default:return i.era(n,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var n=t.getUTCFullYear();return i.ordinalNumber(n>0?n:1-n,{unit:"year"})}return v(t,e)},Y:function(t,e,i,n){var r=m(t,n),a=r>0?r:1-r;return"YY"===e?p(a%100,2):"Yo"===e?i.ordinalNumber(a,{unit:"year"}):p(a,e.length)},R:function(t,e){return p(f(t),e.length)},u:function(t,e){return p(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var n=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return p(n,2);case"Qo":return i.ordinalNumber(n,{unit:"quarter"});case"QQQ":return i.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(n,{width:"narrow",context:"formatting"});default:return i.quarter(n,{width:"wide",context:"formatting"})}},q:function(t,e,i){var n=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return p(n,2);case"qo":return i.ordinalNumber(n,{unit:"quarter"});case"qqq":return i.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(n,{width:"narrow",context:"standalone"});default:return i.quarter(n,{width:"wide",context:"standalone"})}},M:function(t,e,i){var n=t.getUTCMonth();switch(e){case"M":case"MM":return w(t,e);case"Mo":return i.ordinalNumber(n+1,{unit:"month"});case"MMM":return i.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(n,{width:"narrow",context:"formatting"});default:return i.month(n,{width:"wide",context:"formatting"})}},L:function(t,e,i){var n=t.getUTCMonth();switch(e){case"L":return String(n+1);case"LL":return p(n+1,2);case"Lo":return i.ordinalNumber(n+1,{unit:"month"});case"LLL":return i.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(n,{width:"narrow",context:"standalone"});default:return i.month(n,{width:"wide",context:"standalone"})}},w:function(t,e,i,n){var r=function(t,e){c(1,arguments);var i=d(t),n=g(i,e).getTime()-function(t,e){var i,n,r,a,o,d,l,h;c(1,arguments);var f=u(),p=s(null!==(i=null!==(n=null!==(r=null!==(a=null==e?void 0:e.firstWeekContainsDate)&&void 0!==a?a:null==e||null===(o=e.locale)||void 0===o||null===(d=o.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==r?r:f.firstWeekContainsDate)&&void 0!==n?n:null===(l=f.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1),v=m(t,e),w=new Date(0);return w.setUTCFullYear(v,0,p),w.setUTCHours(0,0,0,0),g(w,e)}(i,e).getTime();return Math.round(n/6048e5)+1}(t,n);return"wo"===e?i.ordinalNumber(r,{unit:"week"}):p(r,e.length)},I:function(t,e,i){var n=function(t){c(1,arguments);var e=d(t),i=h(e).getTime()-function(t){c(1,arguments);var e=f(t),i=new Date(0);return i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0),h(i)}(e).getTime();return Math.round(i/6048e5)+1}(t);return"Io"===e?i.ordinalNumber(n,{unit:"week"}):p(n,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):y(t,e)},D:function(t,e,i){var n=function(t){c(1,arguments);var e=d(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var n=e.getTime();return Math.floor((i-n)/864e5)+1}(t);return"Do"===e?i.ordinalNumber(n,{unit:"dayOfYear"}):p(n,e.length)},E:function(t,e,i){var n=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(n,{width:"short",context:"formatting"});default:return i.day(n,{width:"wide",context:"formatting"})}},e:function(t,e,i,n){var r=t.getUTCDay(),a=(r-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(a);case"ee":return p(a,2);case"eo":return i.ordinalNumber(a,{unit:"day"});case"eee":return i.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(r,{width:"short",context:"formatting"});default:return i.day(r,{width:"wide",context:"formatting"})}},c:function(t,e,i,n){var r=t.getUTCDay(),a=(r-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(a);case"cc":return p(a,e.length);case"co":return i.ordinalNumber(a,{unit:"day"});case"ccc":return i.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(r,{width:"narrow",context:"standalone"});case"cccccc":return i.day(r,{width:"short",context:"standalone"});default:return i.day(r,{width:"wide",context:"standalone"})}},i:function(t,e,i){var n=t.getUTCDay(),r=0===n?7:n;switch(e){case"i":return String(r);case"ii":return p(r,e.length);case"io":return i.ordinalNumber(r,{unit:"day"});case"iii":return i.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(n,{width:"short",context:"formatting"});default:return i.day(n,{width:"wide",context:"formatting"})}},a:function(t,e,i){var n=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(n,{width:"narrow",context:"formatting"});default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(t,e,i){var n,r=t.getUTCHours();switch(n=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(n,{width:"narrow",context:"formatting"});default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(t,e,i){var n,r=t.getUTCHours();switch(n=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(n,{width:"narrow",context:"formatting"});default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var n=t.getUTCHours()%12;return 0===n&&(n=12),i.ordinalNumber(n,{unit:"hour"})}return b(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):k(t,e)},K:function(t,e,i){var n=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(n,{unit:"hour"}):p(n,e.length)},k:function(t,e,i){var n=t.getUTCHours();return 0===n&&(n=24),"ko"===e?i.ordinalNumber(n,{unit:"hour"}):p(n,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):x(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):T(t,e)},S:function(t,e){return M(t,e)},X:function(t,e,i,n){var r=(n._originalDate||t).getTimezoneOffset();if(0===r)return"Z";switch(e){case"X":return C(r);case"XXXX":case"XX":return P(r);default:return P(r,":")}},x:function(t,e,i,n){var r=(n._originalDate||t).getTimezoneOffset();switch(e){case"x":return C(r);case"xxxx":case"xx":return P(r);default:return P(r,":")}},O:function(t,e,i,n){var r=(n._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+D(r,":");default:return"GMT"+P(r,":")}},z:function(t,e,i,n){var r=(n._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+D(r,":");default:return"GMT"+P(r,":")}},t:function(t,e,i,n){return p(Math.floor((n._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,i,n){return p((n._originalDate||t).getTime(),e.length)}};function D(t,e){var i=t>0?"-":"+",n=Math.abs(t),r=Math.floor(n/60),a=n%60;if(0===a)return i+String(r);var o=e||"";return i+String(r)+o+p(a,2)}function C(t,e){return t%60==0?(t>0?"-":"+")+p(Math.abs(t)/60,2):P(t,e)}function P(t,e){var i=e||"",n=t>0?"-":"+",r=Math.abs(t);return n+p(Math.floor(r/60),2)+i+p(r%60,2)}const j=S;var E=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"})}},O=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"})}},I={p:O,P:function(t,e){var i,n=t.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return E(t,e);switch(r){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}}",E(r,e)).replace("{{time}}",O(a,e))}};const L=I;var N=["D","DD"],R=["YY","YYYY"];function W(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 G={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 z(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 A,Y={date:z({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:z({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:z({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},q={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function B(t){return function(e,i){var n;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&t.formattingValues){var r=t.defaultFormattingWidth||t.defaultWidth,a=null!=i&&i.width?String(i.width):r;n=t.formattingValues[a]||t.formattingValues[r]}else{var o=t.defaultWidth,s=null!=i&&i.width?String(i.width):t.defaultWidth;n=t.values[s]||t.values[o]}return n[t.argumentCallback?t.argumentCallback(e):e]}}function $(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=i.width,r=e.match(n&&t.matchPatterns[n]||t.matchPatterns[t.defaultMatchWidth]);if(!r)return null;var a,o=r[0],s=n&&t.parsePatterns[n]||t.parsePatterns[t.defaultParseWidth],c=Array.isArray(s)?function(t){for(var e=0;e<t.length;e++)if(t[e].test(o))return e}(s):function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].test(o))return e}(s);return a=t.valueCallback?t.valueCallback(c):c,{value:a=i.valueCallback?i.valueCallback(a):a,rest:e.slice(o.length)}}}const _={code:"en-US",formatDistance:function(t,e,i){var n,r=G[t];return n="string"==typeof r?r:1===e?r.one:r.other.replace("{{count}}",e.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+n:n+" ago":n},formatLong:Y,formatRelative:function(t){return q[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:B({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:B({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:B({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:B({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:B({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:(A={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(A.matchPattern);if(!i)return null;var n=i[0],r=t.match(A.parsePattern);if(!r)return null;var a=A.valueCallback?A.valueCallback(r[0]):r[0];return{value:a=e.valueCallback?e.valueCallback(a):a,rest:t.slice(n.length)}}),era:$({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:$({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:$({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:$({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:$({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 Q,X=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,F=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,U=/^'([^]*?)'?$/,J=/''/g,H=/[a-zA-Z]/;function K(t,e,i){var n,r,a,l,h,f,g,m,p,v,w,y,b,k,x,T,M,S;c(2,arguments);var D=String(e),C=u(),P=null!==(n=null!==(r=null==i?void 0:i.locale)&&void 0!==r?r:C.locale)&&void 0!==n?n:_,E=s(null!==(a=null!==(l=null!==(h=null!==(f=null==i?void 0:i.firstWeekContainsDate)&&void 0!==f?f:null==i||null===(g=i.locale)||void 0===g||null===(m=g.options)||void 0===m?void 0:m.firstWeekContainsDate)&&void 0!==h?h:C.firstWeekContainsDate)&&void 0!==l?l:null===(p=C.locale)||void 0===p||null===(v=p.options)||void 0===v?void 0:v.firstWeekContainsDate)&&void 0!==a?a:1);if(!(E>=1&&E<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var O=s(null!==(w=null!==(y=null!==(b=null!==(k=null==i?void 0:i.weekStartsOn)&&void 0!==k?k:null==i||null===(x=i.locale)||void 0===x||null===(T=x.options)||void 0===T?void 0:T.weekStartsOn)&&void 0!==b?b:C.weekStartsOn)&&void 0!==y?y:null===(M=C.locale)||void 0===M||null===(S=M.options)||void 0===S?void 0:S.weekStartsOn)&&void 0!==w?w:0);if(!(O>=0&&O<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!P.localize)throw new RangeError("locale must contain localize property");if(!P.formatLong)throw new RangeError("locale must contain formatLong property");var I=d(t);if(!function(t){if(c(1,arguments),!function(t){return c(1,arguments),t instanceof Date||"object"===o(t)&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t)return!1;var e=d(t);return!isNaN(Number(e))}(I))throw new RangeError("Invalid time value");var G=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()}(I),z=function(t,e){return c(2,arguments),function(t,e){c(2,arguments);var i=d(t).getTime(),n=s(e);return new Date(i+n)}(t,-s(e))}(I,G),A={firstWeekContainsDate:E,weekStartsOn:O,locale:P,_originalDate:I};return D.match(F).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,L[e])(t,P.formatLong):t})).join("").match(X).map((function(n){if("''"===n)return"'";var r,a,o=n[0];if("'"===o)return(a=(r=n).match(U))?a[1].replace(J,"'"):r;var s=j[o];if(s)return null!=i&&i.useAdditionalWeekYearTokens||-1===R.indexOf(n)||W(n,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!(-1!==N.indexOf(n))||W(n,e,String(t)),s(z,n,P.localize,A);if(o.match(H))throw new RangeError("Format string contains an unescaped latin alphabet character `"+o+"`");return n})).join("")}!function(t){t.WON="Won",t.LOST="Lost"}(Q||(Q={}));const Z=["ro","en","fr","ar","hr"],V={en:{totalItems:"Total {total} items",perPage:"{size} / page",goTo:"Go to",filter:"Filter",clear:"Clear",searchByTicketId:"Search by Ticket ID",enterTicketId:"Enter Ticket ID",searchByTicketType:"Search by Ticket Type",selectTicketType:"Select Ticket Type",searchByDate:"Search by Date",from:"From",to:"To",normal:"Normal",subscription:"Subscription",ticketsHistory:"Tickets History",settled:"Settled",purchased:"Purchased",canceled:"Canceled",noData:"No data Avaliable.",ticketId:"Ticket ID:",ticketType:"Ticket Type:",ticketAmount:"Ticket Amount:",lineDetail:"Line Detail:",seeDetails:"See Details",numberOfDraw:"Number of Draw:",ticketResult:"Ticket Result:",drawId:"Draw ID:",drawDate:"Draw Date:",result:"Result:",prize:"Prize:",bettingType:"Betting Type:"},ro:{},fr:{},ar:{},hr:{}},tt=(t,e,i)=>{const n=e;let r=V[void 0!==n&&Z.includes(n)?n:"en"][t];return i&&Object.keys(i).forEach((t=>{r=r.replace(`{${t}}`,i[t])})),r},et=t=>{Object.keys(t).forEach((e=>{for(let i in t[e])V[e][i]=t[e][i]}))};function it(t,e="GET",i=null,n={}){return new Promise(((r,a)=>{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)})),s=Object.assign({"Content-Type":"application/json"},n);"GET"!==e&&"HEAD"!==e&&(s["X-Idempotency-Key"]=o);const c={method:e,headers:s,body:null};i&&"GET"!==e&&"HEAD"!==e?c.body=JSON.stringify(i):delete c.body,fetch(t,c).then((t=>t.ok?t.json():t.json().then((e=>{a({status:t.status,statusText:t.statusText,code:e.code||"UNKNOWN_ERROR",message:e.message||"An unknown error occurred",data:e.data||null})}),(()=>a({status:t.status,statusText:t.statusText,code:"PARSE_ERROR",message:"Failed to parse error response"}))))).then((t=>r(t)),(t=>a(t)))}))}function nt(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 i=0;for(let n=0;n<e;n++){if(!nt(t[n]))return!1;i++}return i===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 i=0;for(const e of Object.values(t)){if(!nt(e))return!1;i++}return i===e}(t):!t)}const rt={0:"1",1:"X",2:"2"};function at(t){const e=[],i=[];for(let e=0;e<t.length;e+=2){const[n,r]=[t[e],t[e+1]];i[r]?i[r].push(n):i[r]=[n]}return i.forEach((t=>{e.push(function(t){const e=[];return Object.keys(rt).forEach((i=>{e.push({isSelected:t.includes(Number(i)),value:rt[i]})})),e}(t))})),e}const ot=t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),st=({message:t,theme:e="success"})=>{window.postMessage({type:"ShowNotificationToast",message:t,theme:e})},ct=class{constructor(i){t(this,i),this.logout=e(this,"logout",7),this.ticketTypeMap={NORMAL:"Normal",SYNDICATE:"Syndicate",SUBSCRIPTION:"Subscription"},this.resultMap={[Q.WON]:"Win",[Q.LOST]:"Lose"},this.displayPrizeCategory=t=>{const e=new Map;t.forEach((t=>{let i=t.divisionDisplayName,n=t.amount,r=t.currency;i&&"None"!=i&&(e.has(i)?e.set(i,{amount:e.get(i).amount+n,currency:r,times:e.get(i).times+1}):e.set(i,{amount:n,currency:r,times:1}))}));const i=[];for(let[t,n]of e.entries())i.push({prizeName:t,amount:n.amount,currency:n.currency,times:n.times});return i.sort(((t,e)=>e.prizeName.localeCompare(t.prizeName))),i},this.endpoint=void 0,this.endpointTicket=void 0,this.gameId=void 0,this.playerId=void 0,this.sessionId="",this.drawId=void 0,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.language="en",this.translationUrl="",this.ticketHistory=[],this.activeStatus="",this.statusOptions=void 0,this.isLoading=!1,this.rawData={},this.filterData={offset:0,limit:10,state:"",from:"",to:"",wagerType:"",vendorGameType:"PoolGame",id:""},this.paginationInfo={current:1,total:0,pageSize:10},this.quickFiltersActive=!1,this.showCurrentTicketLine=!1,this.curTicketItem=void 0,this.curSelection=[],this.curSelectionIdx=0,this.showCurrentDrawResult=!1,this.curDrawItem=void 0,this.curDrawSelection=[],this.curDrawSelectionBettingType=void 0,this.curDrawSelectionMap={}}handleClientStylingChange(t,e){t!=e&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&r(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&a(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&r(this.stylingContainer,this.clientStylingUrl))}async fetchGameData(){var t;try{this.isLoading=!0;let t=new URL(`${this.endpoint}/games/${this.gameId}`);const e=await(t=>fetch(t,{method:"GET",headers:{"x-scheme":"application/json",Accept:"application/json"}}).then((t=>t.json())))(t.href);this.rawData=e}catch(e){st({message:null!==(t=e.message)&&void 0!==t?t:e,theme:"error"})}finally{this.isLoading=!1}}connectedCallback(){this.endpoint&&this.gameId&&this.fetchGameData()}handleGameInfoChange(t,e){t&&t!=e&&this.fetchGameData()}handleTicketInfoChange(t,e){t&&t!=e&&this.fetchTicketList()}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}async fetchTicketList(){this.isLoading=!0;try{const{items:t,total:e}=await it(`${this.endpointTicket}/tickets${function(t){const e={};Object.entries(t).forEach((([t,i])=>{nt(i,!0)||(e[t]=i)}));const i=Object.entries(e).map((([t,e])=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`)).join("&");return i?`?${i}`:""}(this.filterData)}`,"GET",null,{Authorization:`Bearer ${this.sessionId}`});this.ticketHistory=t,this.paginationInfo.total=e,t.length>0&&this.getDrawResult()}catch(t){console.log("in fetchTicketList error is: ",t),401===t.status&&(st({message:t.message,theme:"error"}),this.logout.emit())}finally{this.isLoading=!1}}async fetchDrwaResult(t,e){try{return await it(`${this.endpoint}/games/${t}/draws/${e}`,"GET",{})}catch(t){console.log(t)}}getDivision(t,e){var i;let n=t.division,r=null===(i=e.prizes)||void 0===i?void 0:i.filter((t=>t.order===n));return r&&r.length?r[0].division:null}async getDrawResult(){const t=new Map;this.ticketHistory.forEach(((e,i)=>{e.drawResults.forEach(((n,r)=>{const a=`${n.drawId}-${e.gameId}`;t.has(a)?t.get(a).indices.push({ticketIndex:i,drawIndex:r}):t.set(a,{drawId:n.drawId,gameId:e.gameId,indices:[{ticketIndex:i,drawIndex:r}]})}))}));let e=[...this.ticketHistory];await Promise.all(Array.from(t.values()).map((async({gameId:t,drawId:i,indices:n})=>{try{const r=await this.fetchDrwaResult(t,i);r&&n.forEach((({ticketIndex:t,drawIndex:i})=>{const n=Object.assign(Object.assign({},e[t].drawResults[i]),{tempDrawData:Object.assign(Object.assign({},r),{vendorGameId:e[t].vendorGameId}),prizeDetails:this.displayPrizeCategory(e[t].drawResults[i].details)}),a=[...e[t].drawResults];a[i]=n,e[t]=Object.assign(Object.assign({},e[t]),{drawResults:a})}))}catch(e){console.error(`failed to fetch draw result (gameId: ${t}, drawId: ${i}):`,e)}}))),this.ticketHistory=e}componentWillLoad(){this.translationUrl&&et(JSON.parse(this.translationUrl)),this.statusOptions=[{label:tt("settled",this.language),value:"Settled"},{label:tt("purchased",this.language),value:"Purchased"},{label:tt("canceled",this.language),value:"Canceled"}],this.fetchTicketList()}changeStatus(t){this.activeStatus=t,this.filterData.state=t,this.quickFiltersActive=!0,this.fetchTicketList()}handlePageSizeChange(t){this.filterData.limit=t.detail,this.fetchTicketList()}handlePageChange(t){this.filterData.offset=(t.detail-1)*this.filterData.limit,this.fetchTicketList()}handleShowTicketLineDetial(t){this.curSelectionIdx=0,this.showCurrentTicketLine=!0,this.curTicketItem=t,this.curSelection=this.parseSelection()}handleShowCurrentDraw(t){this.showCurrentDrawResult=!0,this.curDrawItem=t,this.curDrawSelectionBettingType=t.winningNumbers[0].winning_type,this.curDrawItem.winningNumbers.forEach((t=>{this.curDrawSelectionMap[t.winning_type]=[at(t.numbers)]})),this.curDrawSelection=this.curDrawSelectionMap[this.curDrawSelectionBettingType]}parseSelection(){const t=[];return this.curTicketItem.selection.forEach(((e,i)=>{t[i]=at(e.selections)})),t}handleFilterChange(t){const e=t.detail;this.filterData.from=e.filterFromCalendar,this.filterData.to=e.filterToCalendar,this.filterData.id=e.ticketId,this.filterData.wagerType=e.ticketType,this.fetchTicketList()}handleFilterClear(){this.activeStatus="",this.quickFiltersActive=!1,this.filterData={offset:0,limit:10,state:"",from:"",to:"",wagerType:"",vendorGameType:"PoolGame",id:""},this.fetchTicketList()}get playTypeConfig(){var t,e,i;return null===(i=null===(e=null===(t=this.rawData)||void 0===t?void 0:t.rules)||void 0===e?void 0:e.poolGame)||void 0===i?void 0:i.playTypes}get bettingTypeConfig(){var t,e,i;return null===(i=null===(e=null===(t=this.rawData)||void 0===t?void 0:t.rules)||void 0===e?void 0:e.poolGame)||void 0===i?void 0:i.bettingTypes}getBettingType(t){var e;return null!==(e=this.playTypeConfig.find((e=>e.betTypeId===t)).bettingType)&&void 0!==e?e:""}handlePoolGameCurrentPageChange(t){const{currentPage:e}=t.detail;this.curSelectionIdx=e-1}handleDrawBettingTypeChange(t){this.curDrawSelectionBettingType=t,this.curDrawSelection=this.curDrawSelectionMap[this.curDrawSelectionBettingType]}getBettingTypeName(t){var e,i;const n=null===(i=null===(e=this.bettingTypeConfig)||void 0===e?void 0:e.find((e=>e.code===t)))||void 0===i?void 0:i.name;return null!=n?n:t}render(){return i("div",{key:"9dbed4dca8e568a334c63748d1768ace33922270",class:"lottery-tipping-ticket-history",ref:t=>this.stylingContainer=t},i("div",{key:"4149c4c6f067be28f1334a8642790d9886d219ef",class:"ticket-history-title"},tt("ticketsHistory",this.language)),i("div",{key:"185ac4ad602e6e8bb0ec025a5cc2c4a9b8418444",class:"filter-wrap"},i("div",{key:"d136c367780b696403f075b261f2009cc94edc5d",class:"filter-status"},this.statusOptions.map((t=>i("div",{class:"filter-status-btn"+(this.activeStatus==t.value?" active":""),onClick:()=>this.changeStatus(t.value)},t.label)))),i("div",{key:"e6a30ef0f8c957813a7b13238353709cfb9e2dd9",class:"filter-operation"},i("lottery-tipping-filter",{key:"4e1e0ba0eeafd7e64344c2b8e4e7d0c0f097127b","quick-filters-active":this.quickFiltersActive,language:this.language,"translation-url":this.translationUrl}))),this.isLoading&&i("div",{key:"f572e1bd9cbf97948b9a9bda34f34c1407a8007e",class:"loading-wrap"},i("section",{key:"9198457f400b175e4c9721449e49a987090860d9",class:"dots-container"},i("div",{key:"0b1196e3ad2b05ef91965b2a52728e5386578e4b",class:"dot"}),i("div",{key:"19a5b0bc39fd931455a7972d66b640ca36685ea9",class:"dot"}),i("div",{key:"8bf3a43540d38c98d27cb7bf61d7595123a4739c",class:"dot"}),i("div",{key:"5ed33ee21018c3b2aae97a6b1345fdec2072fefe",class:"dot"}),i("div",{key:"2d4404c8e0d39dc82bb25554c242d27e091a9932",class:"dot"}))),!this.isLoading&&(!this.ticketHistory||0==this.ticketHistory.length)&&i("div",{key:"4b731612e57d8bde341da7d639dec6f245c7156d",class:"empty-wrap"},tt("noData",this.language)),!this.isLoading&&this.ticketHistory&&0!=this.ticketHistory.length&&i("div",{key:"c9a17cc74f32ae9277d069a8633f38a8478e642c",class:"ticket-list-wrap"},this.ticketHistory.map((t=>i("lottery-tipping-panel",{"header-title":K(new Date(t.createdAt),"dd/MM/yyyy HH:mm:ss")+" "+t.state},i("div",{class:"panel-content",slot:"content"},i("div",{class:"ticket-info"},i("div",{class:"ticket-info-item"},i("div",{class:"ticket-info-label"},tt("ticketId",this.language)),i("div",{class:"ticket-info-val"},t.id," ")),i("div",{class:"ticket-info-item"},i("div",{class:"ticket-info-label"},tt("ticketType",this.language)),i("div",{class:"ticket-info-val"},this.ticketTypeMap[t.wagerType]," ")),i("div",{class:"ticket-info-item"},i("div",{class:"ticket-info-label"},tt("ticketAmount",this.language)),i("div",{class:"ticket-info-val"},`${t.amount} ${t.currency}`)),i("div",{class:"ticket-info-item"},i("div",{class:"ticket-info-label"},tt("lineDetail",this.language)),i("div",{class:"ticket-info-val"},i("span",{class:"show-detail-link",onClick:()=>this.handleShowTicketLineDetial(t)},tt("seeDetails",this.language)))),i("div",{class:"ticket-info-item"},i("div",{class:"ticket-info-label"},tt("numberOfDraw",this.language)),i("div",{class:"ticket-info-val"},t.drawCount))),"Settled"==t.state&&t.drawResults.map((t=>i("div",{class:"draw-info-container"},t.tempDrawData?i("div",{class:"draw-info"},i("div",{class:"draw-info-item"},i("div",{class:"draw-info-label"},tt("ticketResult",this.language)),i("div",{class:"draw-info-val"},this.resultMap[t.state])),i("div",{class:"draw-info-item"},i("div",{class:"draw-info-label"},tt("drawId",this.language)),i("div",{class:"draw-info-val"},t.drawId)),i("div",{class:"draw-info-item"},i("div",{class:"draw-info-label"},tt("drawDate",this.language)),i("div",{class:"draw-info-val"},K(new Date(t.tempDrawData.date),"dd/MM/yyyy"))),i("div",{class:"draw-info-item"},i("div",{class:"draw-info-label"},tt("result",this.language)),i("div",{class:"draw-info-val"},i("span",{class:"show-detail-link",onClick:()=>this.handleShowCurrentDraw(t.tempDrawData)},tt("seeDetails",this.language)))),t.state===Q.WON&&i("div",{class:"draw-info-item"},i("div",{class:"draw-info-label"},tt("prize",this.language)),i("div",{class:"draw-info-val1"},i("div",{style:{height:"20px"}}),t.prizeDetails.map((t=>i("span",null,i("div",null,i("span",{style:{color:"rgb(85, 85, 85)"}},t.prizeName,t.times>1?" x "+t.times:"",":"," "),i("span",{style:{"margin-right":"4px",color:"rgb(85, 85, 85)"}},function(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(".")}(t.amount)),i("span",{style:{color:"rgb(85, 85, 85)"}},t.currency)))))))):i("div",{class:"draw-info-skeleton"},[...Array(5)].map((()=>i("div",{class:"skeleton-line"})))))))))))),i("lottery-tipping-dialog",{key:"4ef7d281084bc6441e6a3e666ac52a7df3dfd28c",visible:this.showCurrentTicketLine,width:ot(window.navigator.userAgent)?void 0:"720px",fullscreen:ot(window.navigator.userAgent),closable:!0,showFooter:!1,onCancel:()=>{this.showCurrentTicketLine=!1},language:this.language,"translation-url":this.translationUrl},this.curSelection&&this.curSelection.length&&i("div",{key:"0fe7ae0f7deceb8b3c939a401efafe70124411dd"},i("div",{key:"5418df176032a83dbd05ee545fffc255694413a2",class:"betting-type"},i("div",{key:"8fb74f2041677fe8876a54773451d00f53abe0df",class:"betting-type-title"},tt("bettingType",this.language)),i("div",{key:"b9bc169c4df854a59606d0ddf330707677720263",class:"betting-type-text"},this.getBettingTypeName(this.getBettingType(this.curTicketItem.selection[this.curSelectionIdx].betType)))),i("lottery-tipping-ticket-bet",{key:"e76e8c1a24b22668d82f54bfed708afb676f23c9",endpoint:this.endpoint,"session-id":this.sessionId,"game-id":this.curTicketItem.vendorGameId,"draw-id":this.curTicketItem.startingDrawId,"default-bullet-config-line-group":JSON.stringify(this.curSelection),"read-pretty":!0,"total-pages":this.curSelection.length,language:this.language,"translation-url":this.translationUrl}))),i("lottery-tipping-dialog",{key:"cf4220d7b9ef7a174ab059574e1d758096cf6f6c",visible:this.showCurrentDrawResult,width:ot(window.navigator.userAgent)?void 0:"720px",fullscreen:ot(window.navigator.userAgent),closable:!0,showFooter:!1,onCancel:()=>{this.showCurrentDrawResult=!1},language:this.language,"translation-url":this.translationUrl},this.curDrawSelection&&this.curDrawSelection.length&&i("div",{key:"61214e66f20708cf92fa12d9b3afa3feee2e4335"},i("div",{key:"589010058422524a0b3478cee60fa13703d921e9",class:"betting-type"},i("div",{key:"657e2cede56274839d1e56784e7f85e61c5b3a42",class:"betting-type-title"},tt("bettingType",this.language)),i("div",{key:"b2b77770d0d439d7a2d062943c1cb114a7e54574",class:"betting-type-text"},i("div",{key:"8a9e0821b8165a9cc04c5be4b3eb7286bdcef21f",class:"LotteryTippingTicketController__segmented-control"},Object.keys(this.curDrawSelectionMap).map((t=>i("button",{class:{LotteryTippingTicketController__segment:!0,"LotteryTippingTicketController__segment--active":this.curDrawSelectionBettingType===t},onClick:()=>this.handleDrawBettingTypeChange(t)},this.getBettingTypeName(t))))))),i("lottery-tipping-ticket-bet",{key:"313e81c7d8181316896a2a46211d12ede72b5353",endpoint:this.endpoint,"session-id":this.sessionId,"game-id":this.curDrawItem.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,"translation-url":this.translationUrl}))),i("div",{key:"374d4a579f634ae631392b9e16a3a9acd0cf029c",class:"pagination-wrap"},i("lottery-tipping-pagination",{key:"0a22fb6a1d59c391f2db3a2e20774a1b19491739",total:this.paginationInfo.total,current:this.paginationInfo.current,"page-size":this.paginationInfo.pageSize,language:this.language,"translation-url":this.translationUrl})))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],gameId:["handleGameInfoChange"],endpoint:["handleGameInfoChange"],endpointTicket:["handleTicketInfoChange"],playerId:["handleTicketInfoChange"],sessionId:["handleTicketInfoChange"]}}};ct.style="@keyframes skeleton-loading{0%{background-position:200% 0}100%{background-position:-200% 0}}.lottery-tipping-ticket-history{padding:12px}.lottery-tipping-ticket-history .ticket-history-title{margin:20px 0;text-align:center;font-size:20px;font-weight:700;color:var(--emw--color-typography, #000)}.lottery-tipping-ticket-history .ticket-info{display:flex;flex-direction:column;gap:12px}.lottery-tipping-ticket-history .ticket-info-item{display:flex;align-items:center;user-select:none}.lottery-tipping-ticket-history .ticket-info-label{margin-right:12px;color:var(--emw--color-typography, #000)}.lottery-tipping-ticket-history .ticket-info-val{color:var(--emw--color-typography-secondary, #555)}.lottery-tipping-ticket-history .ticket-list-wrap{display:flex;flex-direction:column;gap:12px}.lottery-tipping-ticket-history .draw-info-skeleton{width:30%;min-width:300px;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));border-radius:5px;display:flex;flex-direction:column;gap:10px;padding:10px}.lottery-tipping-ticket-history .skeleton-line{height:16px;border-radius:4px;background:linear-gradient(90deg, var(--emw--color-gray-100, #e6e6e6) 25%, var(--emw--color-gray-50, #f5f5f5) 50%, var(--emw--color-gray-100, #e6e6e6) 75%);background-size:200% 100%;animation:skeleton-loading 1.2s infinite}.lottery-tipping-ticket-history .draw-info{width:30%;min-width:300px;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));border-radius:5px;padding:12px;margin-top:20px;display:flex;flex-direction:column;gap:8px;user-select:none}.lottery-tipping-ticket-history .draw-info-item{display:flex}.lottery-tipping-ticket-history .draw-info-label{margin-right:6px;color:var(--emw--color-typography, #000)}.lottery-tipping-ticket-history .draw-info-val{color:var(--emw--color-typography-secondary, #555)}.lottery-tipping-ticket-history .show-detail-link{color:var(--emw-pool-game-acition-normal, #4a90e2);text-decoration:underline;cursor:pointer}.lottery-tipping-ticket-history .filter-wrap{margin-bottom:20px;display:flex;justify-content:space-between;align-items:center}.lottery-tipping-ticket-history .filter-wrap .filter-status{display:flex;gap:12px;align-items:center}.lottery-tipping-ticket-history .filter-wrap .filter-status-btn{background:var(--emw--color-background, #fff);border:2px solid var(--emw--color-primary, #fed275);border-radius:4px;padding:10px 8px;font-size:12px;text-transform:uppercase;color:var(--emw--color-typography, #000);cursor:pointer;transition:all 0.2s linear}.lottery-tipping-ticket-history .filter-wrap .filter-status-btn:hover{background-color:var(--emw--color-secondary, #fff3b9)}.lottery-tipping-ticket-history .filter-wrap .filter-status-btn.active{background:var(--emw--color-secondary, #fff3b9);color:var(--emw--color-typography, #000);border:2px solid var(--emw--color-typography, #000)}.lottery-tipping-ticket-history .pagination-wrap{margin-top:20px;display:flex;justify-content:flex-end}@media screen and (min-width: 1200px){.lottery-tipping-ticket-history{padding:24px;width:60%;margin:0 auto}}@media screen and (max-width: 480px){.lottery-tipping-ticket-history{padding:2px}.lottery-tipping-ticket-history .filter-wrap .filter-status{gap:4px}}.loading-wrap{margin:20px 0;display:flex;align-items:center;justify-content:center;min-height:40vh}.loading-wrap .dots-container{display:flex;align-items:center;justify-content:center;height:100%;width:100%}.loading-wrap .dot{height:14px;width:14px;margin-right:14px;border-radius:14px;background-color:var(--emw-pool-game-ticket-history-loading-normal, #b3d4fc);animation:pulse 1.5s infinite ease-in-out}.loading-wrap .dot:last-child{margin-right:0}.loading-wrap .dot:nth-child(1){animation-delay:-0.3s}.loading-wrap .dot:nth-child(2){animation-delay:-0.1s}.loading-wrap .dot:nth-child(3){animation-delay:0.1s}@keyframes pulse{0%{transform:scale(0.8);background-color:var(--emw-pool-game-ticket-history-loading-normal, #b3d4fc);box-shadow:0 0 0 0 var(--emw-pool-game-ticket-history-loading-box-shadow-normal, rgba(178, 212, 252, 0.7))}50%{transform:scale(1.2);background-color:var(--emw-pool-game-ticket-history-loading-active, #6793fb);box-shadow:0 0 0 10px var(--emw-pool-game-ticket-history-loading-box-shadow-active, rgba(178, 212, 252, 0))}100%{transform:scale(0.8);background-color:var(--emw-pool-game-ticket-history-loading-normal, #b3d4fc);box-shadow:0 0 0 0 rgba(178, 212, 252, 0.7)}}.empty-wrap{margin:20px 0;display:flex;align-items:center;justify-content:center;min-height:40vh;color:var(--emw--color-typography, #000)}.betting-type{margin-bottom:16px;display:flex;align-items:center;gap:20px}.betting-type-title{font-weight:600;font-size:16px}.betting-type-text{font-size:16px}.LotteryTippingTicketController__label{font-weight:500;white-space:nowrap;width:6rem;color:var(--emw--color-typography-secondary, #333)}.LotteryTippingTicketController__segmented-control{height:2.2rem;display:inline-flex;background-color:var(--emw--color-background-secondary, #f5f5f5);border-radius:2rem;padding:0.2rem}.LotteryTippingTicketController__segment{background-color:transparent;border:none;padding:0.3rem 0.8rem;cursor:pointer;font-weight:500;border-radius:2rem;outline:none;transition:background-color 0.25s ease, color 0.25s ease;white-space:nowrap;color:var(--emw--color-typography, #000)}.LotteryTippingTicketController__segment--active{background-color:var(--emw--color-background, #fff);color:var(--emw--color-typography, #000);font-weight:600}.LotteryTippingTicketController__segment:not(.LotteryTippingTicketController__segment--active):hover{background-color:var(--emw--color-background-tertiary, #ccc)}";export{ct as L,r as a,a as b,tt as c,K as f,et as g,ot as i,c as r,n as s,s as t}