@everymatrix/lottery-oddsbom-entrance 0.0.15 → 0.0.17

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-4e91c0c2.js');
6
- const lotteryOddsbomEntrance = require('./lottery-oddsbom-entrance-e6f8db63.js');
6
+ const lotteryOddsbomEntrance = require('./lottery-oddsbom-entrance-e2b0abf7.js');
7
7
 
8
8
  // This icon file is generated automatically.
9
9
  var CalendarOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z" } }] }, "name": "calendar", "theme": "outlined" };
@@ -209,7 +209,7 @@ const HelperDateNavigator = class {
209
209
  }
210
210
  handleMbSourceChange(newValue, oldValue) {
211
211
  if (newValue != oldValue) {
212
- lotteryOddsbomEntrance.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
212
+ lotteryOddsbomEntrance.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
213
213
  }
214
214
  }
215
215
  handleGameIdStringChange(newValue, oldValue) {
@@ -244,7 +244,7 @@ const HelperDateNavigator = class {
244
244
  componentDidLoad() {
245
245
  if (this.stylingContainer) {
246
246
  if (this.mbSource)
247
- lotteryOddsbomEntrance.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
247
+ lotteryOddsbomEntrance.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
248
248
  if (this.clientStyling)
249
249
  lotteryOddsbomEntrance.setClientStyling(this.stylingContainer, this.clientStyling);
250
250
  if (this.clientStylingUrl)
@@ -3285,13 +3285,13 @@ const LotteryOddsbomBomb = class {
3285
3285
  }
3286
3286
  handleMbSourceChange(newValue, oldValue) {
3287
3287
  if (newValue != oldValue) {
3288
- lotteryOddsbomEntrance.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
3288
+ lotteryOddsbomEntrance.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
3289
3289
  }
3290
3290
  }
3291
3291
  componentDidLoad() {
3292
3292
  if (this.stylingContainer) {
3293
3293
  if (this.mbSource)
3294
- lotteryOddsbomEntrance.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
3294
+ lotteryOddsbomEntrance.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
3295
3295
  if (this.clientStyling)
3296
3296
  lotteryOddsbomEntrance.setClientStyling(this.stylingContainer, this.clientStyling);
3297
3297
  if (this.clientStylingUrl)
@@ -3409,13 +3409,13 @@ const LotteryOddsbomBullet = class {
3409
3409
  }
3410
3410
  handleMbSourceChange(newValue, oldValue) {
3411
3411
  if (newValue != oldValue) {
3412
- lotteryOddsbomEntrance.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
3412
+ lotteryOddsbomEntrance.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
3413
3413
  }
3414
3414
  }
3415
3415
  componentDidLoad() {
3416
3416
  if (this.stylingContainer) {
3417
3417
  if (this.mbSource)
3418
- lotteryOddsbomEntrance.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
3418
+ lotteryOddsbomEntrance.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
3419
3419
  if (this.clientStyling)
3420
3420
  lotteryOddsbomEntrance.setClientStyling(this.stylingContainer, this.clientStyling);
3421
3421
  if (this.clientStylingUrl)
@@ -3778,7 +3778,7 @@ const LotteryOddsbomLatestResult = class {
3778
3778
  }
3779
3779
  handleMbSourceChange(newValue, oldValue) {
3780
3780
  if (newValue != oldValue) {
3781
- lotteryOddsbomEntrance.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
3781
+ lotteryOddsbomEntrance.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
3782
3782
  }
3783
3783
  }
3784
3784
  async handleDateChange(n, o) {
@@ -3848,7 +3848,7 @@ const LotteryOddsbomLatestResult = class {
3848
3848
  componentDidLoad() {
3849
3849
  if (this.stylingContainer) {
3850
3850
  if (this.mbSource)
3851
- lotteryOddsbomEntrance.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
3851
+ lotteryOddsbomEntrance.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
3852
3852
  if (this.clientStyling)
3853
3853
  lotteryOddsbomEntrance.setClientStyling(this.stylingContainer, this.clientStyling);
3854
3854
  if (this.clientStylingUrl)
@@ -4133,7 +4133,7 @@ const LotteryOddsbomLatestResultGroup = class {
4133
4133
  }
4134
4134
  handleMbSourceChange(newValue, oldValue) {
4135
4135
  if (newValue != oldValue) {
4136
- lotteryOddsbomEntrance.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
4136
+ lotteryOddsbomEntrance.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
4137
4137
  }
4138
4138
  }
4139
4139
  handleGameIdStringChange(newValue, oldValue) {
@@ -4149,7 +4149,7 @@ const LotteryOddsbomLatestResultGroup = class {
4149
4149
  this.getData();
4150
4150
  if (this.stylingContainer) {
4151
4151
  if (this.mbSource)
4152
- lotteryOddsbomEntrance.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
4152
+ lotteryOddsbomEntrance.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
4153
4153
  if (this.clientStyling)
4154
4154
  lotteryOddsbomEntrance.setClientStyling(this.stylingContainer, this.clientStyling);
4155
4155
  if (this.clientStylingUrl)
@@ -4511,13 +4511,13 @@ const LotteryOddsbomTicketResult = class {
4511
4511
  }
4512
4512
  handleMbSourceChange(newValue, oldValue) {
4513
4513
  if (newValue !== oldValue) {
4514
- lotteryOddsbomEntrance.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
4514
+ lotteryOddsbomEntrance.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
4515
4515
  }
4516
4516
  }
4517
4517
  componentDidLoad() {
4518
4518
  if (this.stylingContainer) {
4519
4519
  if (this.mbSource)
4520
- lotteryOddsbomEntrance.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
4520
+ lotteryOddsbomEntrance.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
4521
4521
  if (this.clientStyling)
4522
4522
  lotteryOddsbomEntrance.setClientStyling(this.stylingContainer, this.clientStyling);
4523
4523
  if (this.clientStylingUrl)
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const lotteryOddsbomEntrance = require('./lottery-oddsbom-entrance-e6f8db63.js');
5
+ const lotteryOddsbomEntrance = require('./lottery-oddsbom-entrance-e2b0abf7.js');
6
6
  require('./index-4e91c0c2.js');
7
7
 
8
8
 
@@ -6662,6 +6662,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
6662
6662
  <div on-click="_scrollForward" part="forward-button" aria-hidden="true"></div>
6663
6663
  `}static get is(){return "vaadin-tabs"}}v(vh);
6664
6664
 
6665
+ const StyleCacheKey = '__WIDGET_GLOBAL_STYLE_CACHE__';
6666
+
6665
6667
  /**
6666
6668
  * @name setClientStyling
6667
6669
  * @description Method used to create and append to the passed element of the widget a style element with the content received
@@ -6707,18 +6709,75 @@ function setClientStylingURL(stylingContainer, clientStylingUrl) {
6707
6709
  * @param {HTMLElement} stylingContainer The highest element of the widget
6708
6710
  * @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
6709
6711
  * @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
6712
+ * @param {boolean} useAdoptedStyleSheets A flag to gradually enable testing of adoptedStyleSheets
6710
6713
  */
6711
- function setStreamStyling(stylingContainer, domain, subscription) {
6712
- if (window.emMessageBus) {
6713
- const sheet = document.createElement('style');
6714
+ function setStreamStyling(stylingContainer, domain, subscription, useAdoptedStyleSheets = false) {
6715
+ if (!window.emMessageBus) return;
6714
6716
 
6715
- window.emMessageBus.subscribe(domain, (data) => {
6716
- sheet.innerHTML = data;
6717
- if (stylingContainer) {
6718
- stylingContainer.appendChild(sheet);
6719
- }
6720
- });
6717
+ const supportAdoptStyle = 'adoptedStyleSheets' in Document.prototype;
6718
+
6719
+ if (!supportAdoptStyle || !useAdoptedStyleSheets) {
6720
+ subscription = getStyleTagSubscription(stylingContainer, domain);
6721
+
6722
+ return subscription;
6723
+ }
6724
+
6725
+ if (!window[StyleCacheKey]) {
6726
+ window[StyleCacheKey] = {};
6721
6727
  }
6728
+ subscription = getAdoptStyleSubscription(stylingContainer, domain);
6729
+
6730
+ const originalUnsubscribe = subscription.unsubscribe.bind(subscription);
6731
+ const wrappedUnsubscribe = () => {
6732
+ if (window[StyleCacheKey][domain]) {
6733
+ const cachedObject = window[StyleCacheKey][domain];
6734
+ cachedObject.refCount > 1
6735
+ ? (cachedObject.refCount = cachedObject.refCount - 1)
6736
+ : delete window[StyleCacheKey][domain];
6737
+ }
6738
+
6739
+ originalUnsubscribe();
6740
+ };
6741
+ subscription.unsubscribe = wrappedUnsubscribe;
6742
+
6743
+ return subscription;
6744
+ }
6745
+
6746
+ function getStyleTagSubscription(stylingContainer, domain) {
6747
+ const sheet = document.createElement('style');
6748
+
6749
+ return window.emMessageBus.subscribe(domain, (data) => {
6750
+ if (stylingContainer) {
6751
+ sheet.innerHTML = data;
6752
+ stylingContainer.appendChild(sheet);
6753
+ }
6754
+ });
6755
+ }
6756
+
6757
+ function getAdoptStyleSubscription(stylingContainer, domain) {
6758
+ return window.emMessageBus.subscribe(domain, (data) => {
6759
+ if (!stylingContainer) return;
6760
+
6761
+ const shadowRoot = stylingContainer.getRootNode();
6762
+ const cacheStyleObject = window[StyleCacheKey];
6763
+ let cachedStyle = cacheStyleObject[domain]?.sheet;
6764
+
6765
+ if (!cachedStyle) {
6766
+ cachedStyle = new CSSStyleSheet();
6767
+ cachedStyle.replaceSync(data);
6768
+ cacheStyleObject[domain] = {
6769
+ sheet: cachedStyle,
6770
+ refCount: 1
6771
+ };
6772
+ } else {
6773
+ cacheStyleObject[domain].refCount = cacheStyleObject[domain].refCount + 1;
6774
+ }
6775
+
6776
+ const currentSheets = shadowRoot.adoptedStyleSheets || [];
6777
+ if (!currentSheets.includes(cachedStyle)) {
6778
+ shadowRoot.adoptedStyleSheets = [...currentSheets, cachedStyle];
6779
+ }
6780
+ });
6722
6781
  }
6723
6782
 
6724
6783
  var Tab;
@@ -6817,13 +6876,13 @@ const LotteryOddsbomEntrance = class {
6817
6876
  }
6818
6877
  handleMbSourceChange(newValue, oldValue) {
6819
6878
  if (newValue != oldValue) {
6820
- setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
6879
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
6821
6880
  }
6822
6881
  }
6823
6882
  componentDidLoad() {
6824
6883
  if (this.stylingContainer) {
6825
6884
  if (this.mbSource)
6826
- setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
6885
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
6827
6886
  if (this.clientStyling)
6828
6887
  setClientStyling(this.stylingContainer, this.clientStyling);
6829
6888
  if (this.clientStylingUrl)
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getAssetPath, H as Host } from './index-068e610e.js';
2
- import { s as setClientStyling, a as setClientStylingURL, b as setStreamStyling } from './lottery-oddsbom-entrance-93563752.js';
3
- export { L as lottery_oddsbom_entrance } from './lottery-oddsbom-entrance-93563752.js';
2
+ import { s as setClientStyling, a as setClientStylingURL, b as setStreamStyling } from './lottery-oddsbom-entrance-ce9b7e21.js';
3
+ export { L as lottery_oddsbom_entrance } from './lottery-oddsbom-entrance-ce9b7e21.js';
4
4
 
5
5
  // This icon file is generated automatically.
6
6
  var CalendarOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z" } }] }, "name": "calendar", "theme": "outlined" };
@@ -206,7 +206,7 @@ const HelperDateNavigator = class {
206
206
  }
207
207
  handleMbSourceChange(newValue, oldValue) {
208
208
  if (newValue != oldValue) {
209
- setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
209
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
210
210
  }
211
211
  }
212
212
  handleGameIdStringChange(newValue, oldValue) {
@@ -241,7 +241,7 @@ const HelperDateNavigator = class {
241
241
  componentDidLoad() {
242
242
  if (this.stylingContainer) {
243
243
  if (this.mbSource)
244
- setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
244
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
245
245
  if (this.clientStyling)
246
246
  setClientStyling(this.stylingContainer, this.clientStyling);
247
247
  if (this.clientStylingUrl)
@@ -3282,13 +3282,13 @@ const LotteryOddsbomBomb = class {
3282
3282
  }
3283
3283
  handleMbSourceChange(newValue, oldValue) {
3284
3284
  if (newValue != oldValue) {
3285
- setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
3285
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
3286
3286
  }
3287
3287
  }
3288
3288
  componentDidLoad() {
3289
3289
  if (this.stylingContainer) {
3290
3290
  if (this.mbSource)
3291
- setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
3291
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
3292
3292
  if (this.clientStyling)
3293
3293
  setClientStyling(this.stylingContainer, this.clientStyling);
3294
3294
  if (this.clientStylingUrl)
@@ -3406,13 +3406,13 @@ const LotteryOddsbomBullet = class {
3406
3406
  }
3407
3407
  handleMbSourceChange(newValue, oldValue) {
3408
3408
  if (newValue != oldValue) {
3409
- setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
3409
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
3410
3410
  }
3411
3411
  }
3412
3412
  componentDidLoad() {
3413
3413
  if (this.stylingContainer) {
3414
3414
  if (this.mbSource)
3415
- setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
3415
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
3416
3416
  if (this.clientStyling)
3417
3417
  setClientStyling(this.stylingContainer, this.clientStyling);
3418
3418
  if (this.clientStylingUrl)
@@ -3775,7 +3775,7 @@ const LotteryOddsbomLatestResult = class {
3775
3775
  }
3776
3776
  handleMbSourceChange(newValue, oldValue) {
3777
3777
  if (newValue != oldValue) {
3778
- setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
3778
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
3779
3779
  }
3780
3780
  }
3781
3781
  async handleDateChange(n, o) {
@@ -3845,7 +3845,7 @@ const LotteryOddsbomLatestResult = class {
3845
3845
  componentDidLoad() {
3846
3846
  if (this.stylingContainer) {
3847
3847
  if (this.mbSource)
3848
- setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
3848
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
3849
3849
  if (this.clientStyling)
3850
3850
  setClientStyling(this.stylingContainer, this.clientStyling);
3851
3851
  if (this.clientStylingUrl)
@@ -4130,7 +4130,7 @@ const LotteryOddsbomLatestResultGroup = class {
4130
4130
  }
4131
4131
  handleMbSourceChange(newValue, oldValue) {
4132
4132
  if (newValue != oldValue) {
4133
- setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
4133
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
4134
4134
  }
4135
4135
  }
4136
4136
  handleGameIdStringChange(newValue, oldValue) {
@@ -4146,7 +4146,7 @@ const LotteryOddsbomLatestResultGroup = class {
4146
4146
  this.getData();
4147
4147
  if (this.stylingContainer) {
4148
4148
  if (this.mbSource)
4149
- setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
4149
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
4150
4150
  if (this.clientStyling)
4151
4151
  setClientStyling(this.stylingContainer, this.clientStyling);
4152
4152
  if (this.clientStylingUrl)
@@ -4508,13 +4508,13 @@ const LotteryOddsbomTicketResult = class {
4508
4508
  }
4509
4509
  handleMbSourceChange(newValue, oldValue) {
4510
4510
  if (newValue !== oldValue) {
4511
- setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
4511
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
4512
4512
  }
4513
4513
  }
4514
4514
  componentDidLoad() {
4515
4515
  if (this.stylingContainer) {
4516
4516
  if (this.mbSource)
4517
- setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
4517
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
4518
4518
  if (this.clientStyling)
4519
4519
  setClientStyling(this.stylingContainer, this.clientStyling);
4520
4520
  if (this.clientStylingUrl)
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { L as LotteryOddsbomEntrance } from './lottery-oddsbom-entrance-93563752.js';
1
+ export { L as LotteryOddsbomEntrance } from './lottery-oddsbom-entrance-ce9b7e21.js';
2
2
  import './index-068e610e.js';
@@ -6660,6 +6660,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
6660
6660
  <div on-click="_scrollForward" part="forward-button" aria-hidden="true"></div>
6661
6661
  `}static get is(){return "vaadin-tabs"}}v(vh);
6662
6662
 
6663
+ const StyleCacheKey = '__WIDGET_GLOBAL_STYLE_CACHE__';
6664
+
6663
6665
  /**
6664
6666
  * @name setClientStyling
6665
6667
  * @description Method used to create and append to the passed element of the widget a style element with the content received
@@ -6705,18 +6707,75 @@ function setClientStylingURL(stylingContainer, clientStylingUrl) {
6705
6707
  * @param {HTMLElement} stylingContainer The highest element of the widget
6706
6708
  * @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
6707
6709
  * @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
6710
+ * @param {boolean} useAdoptedStyleSheets A flag to gradually enable testing of adoptedStyleSheets
6708
6711
  */
6709
- function setStreamStyling(stylingContainer, domain, subscription) {
6710
- if (window.emMessageBus) {
6711
- const sheet = document.createElement('style');
6712
+ function setStreamStyling(stylingContainer, domain, subscription, useAdoptedStyleSheets = false) {
6713
+ if (!window.emMessageBus) return;
6712
6714
 
6713
- window.emMessageBus.subscribe(domain, (data) => {
6714
- sheet.innerHTML = data;
6715
- if (stylingContainer) {
6716
- stylingContainer.appendChild(sheet);
6717
- }
6718
- });
6715
+ const supportAdoptStyle = 'adoptedStyleSheets' in Document.prototype;
6716
+
6717
+ if (!supportAdoptStyle || !useAdoptedStyleSheets) {
6718
+ subscription = getStyleTagSubscription(stylingContainer, domain);
6719
+
6720
+ return subscription;
6721
+ }
6722
+
6723
+ if (!window[StyleCacheKey]) {
6724
+ window[StyleCacheKey] = {};
6719
6725
  }
6726
+ subscription = getAdoptStyleSubscription(stylingContainer, domain);
6727
+
6728
+ const originalUnsubscribe = subscription.unsubscribe.bind(subscription);
6729
+ const wrappedUnsubscribe = () => {
6730
+ if (window[StyleCacheKey][domain]) {
6731
+ const cachedObject = window[StyleCacheKey][domain];
6732
+ cachedObject.refCount > 1
6733
+ ? (cachedObject.refCount = cachedObject.refCount - 1)
6734
+ : delete window[StyleCacheKey][domain];
6735
+ }
6736
+
6737
+ originalUnsubscribe();
6738
+ };
6739
+ subscription.unsubscribe = wrappedUnsubscribe;
6740
+
6741
+ return subscription;
6742
+ }
6743
+
6744
+ function getStyleTagSubscription(stylingContainer, domain) {
6745
+ const sheet = document.createElement('style');
6746
+
6747
+ return window.emMessageBus.subscribe(domain, (data) => {
6748
+ if (stylingContainer) {
6749
+ sheet.innerHTML = data;
6750
+ stylingContainer.appendChild(sheet);
6751
+ }
6752
+ });
6753
+ }
6754
+
6755
+ function getAdoptStyleSubscription(stylingContainer, domain) {
6756
+ return window.emMessageBus.subscribe(domain, (data) => {
6757
+ if (!stylingContainer) return;
6758
+
6759
+ const shadowRoot = stylingContainer.getRootNode();
6760
+ const cacheStyleObject = window[StyleCacheKey];
6761
+ let cachedStyle = cacheStyleObject[domain]?.sheet;
6762
+
6763
+ if (!cachedStyle) {
6764
+ cachedStyle = new CSSStyleSheet();
6765
+ cachedStyle.replaceSync(data);
6766
+ cacheStyleObject[domain] = {
6767
+ sheet: cachedStyle,
6768
+ refCount: 1
6769
+ };
6770
+ } else {
6771
+ cacheStyleObject[domain].refCount = cacheStyleObject[domain].refCount + 1;
6772
+ }
6773
+
6774
+ const currentSheets = shadowRoot.adoptedStyleSheets || [];
6775
+ if (!currentSheets.includes(cachedStyle)) {
6776
+ shadowRoot.adoptedStyleSheets = [...currentSheets, cachedStyle];
6777
+ }
6778
+ });
6720
6779
  }
6721
6780
 
6722
6781
  var Tab;
@@ -6815,13 +6874,13 @@ const LotteryOddsbomEntrance = class {
6815
6874
  }
6816
6875
  handleMbSourceChange(newValue, oldValue) {
6817
6876
  if (newValue != oldValue) {
6818
- setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
6877
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
6819
6878
  }
6820
6879
  }
6821
6880
  componentDidLoad() {
6822
6881
  if (this.stylingContainer) {
6823
6882
  if (this.mbSource)
6824
- setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
6883
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
6825
6884
  if (this.clientStyling)
6826
6885
  setClientStyling(this.stylingContainer, this.clientStyling);
6827
6886
  if (this.clientStylingUrl)
@@ -1 +1 @@
1
- import{r as t,c as e,h as n,g as r,H as i}from"./index-068e610e.js";import{s as a,a as o,b as s}from"./lottery-oddsbom-entrance-93563752.js";export{L as lottery_oddsbom_entrance}from"./lottery-oddsbom-entrance-93563752.js";var l=function(){return l=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},l.apply(this,arguments)},d={primaryColor:"#333",secondaryColor:"#E6E6E6"};function c(t,e){if(void 0===e&&(e={}),"function"==typeof t.icon){var n=e.placeholders||d;return h(t.icon(n.primaryColor,n.secondaryColor),e)}return h(t.icon,e)}function h(t,e){var n="svg"===t.tag?l(l({},t.attrs),e.extraSVGAttrs||{}):t.attrs,r=Object.keys(n).reduce((function(t,e){var r=n[e],i="".concat(e,'="').concat(r,'"');return t.push(i),t}),[]),i=r.length?" "+r.join(" "):"",a=(t.children||[]).map((function(t){return h(t,e)})).join("");return a&&a.length?"<".concat(t.tag).concat(i,">").concat(a,"</").concat(t.tag,">"):"<".concat(t.tag).concat(i," />")}const u=["ro","en","fr","ar","hr"],m={en:{weeks:["Su","Mo","Tu","We","Th","Fr","Sa"]}},g=c({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},{extraSVGAttrs:{width:"16px",height:"16px",fill:"currentColor"}}),p=c({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},{extraSVGAttrs:{width:"16px",height:"16px",fill:"currentColor"}}),f=c({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"},{extraSVGAttrs:{width:"18px",height:"18px",fill:"var(--emw--color-primary-variant, #1367e7)"}}),w=class{constructor(n){t(this,n),this.changeDate=e(this,"changeDate",7),this.handleNext=e(this,"next",7),this.handlePrev=e(this,"prev",7),this.handleOutsideClick=t=>{if(!this.showCalendar)return;const e=t.composedPath?t.composedPath():[],n=e.includes(this.calendarRef),r=e.some((t=>{var e,n;return t instanceof HTMLElement&&((null===(e=t.getAttribute("part"))||void 0===e?void 0:e.includes("item"))||(null===(n=t.getAttribute("part"))||void 0===n?void 0:n.includes("overlay")))}));n||r||(this.showCalendar=!1)},this.onYearMinus=()=>{const t=this.yearOptions.map((t=>Number(t.value)));this.alterDate.year-1<Math.min(...t)||(this.alterDate.year--,this.loadRecords())},this.onYearPlus=()=>{const t=this.yearOptions.map((t=>Number(t.value)));this.alterDate.year+1>Math.max(...t)||(this.alterDate.year++,this.loadRecords())},this.onMonthMinus=()=>{0===this.alterDate.month?(this.onYearMinus(),this.alterDate.month=11):(this.alterDate.month--,this.loadRecords())},this.onMonthPlus=()=>{11===this.alterDate.month?(this.onYearPlus(),this.alterDate.month=0):(this.alterDate.month++,this.loadRecords())},this.onYearChange=t=>{this.alterDate.year=parseInt(t.detail.value),this.loadRecords()},this.onMonthChange=t=>{this.alterDate.month=parseInt(t.detail.value)-1,this.loadRecords()},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.date="",this.defaultHighlightDates=void 0,this.highlightDates=[],this.weeks=void 0,this.days=[],this.alterDate={year:0,month:0,day:0},this.curDate={year:0,month:0,day:0},this.recordInfo=[],this.showCalendar=!1}handleClientStylingChange(t,e){t!=e&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&o(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&s(this.stylingContainer,`${this.mbSource}.Style`)}handleGameIdStringChange(t,e){t!=e&&this.setHighlightDates()}componentWillLoad(){(async t=>{if(t)try{const n=await fetch(t);if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);const r=await n.json();e=r,Object.keys(e).forEach((t=>{for(let n in e[t])m[t][n]=e[t][n]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl),this.weeks=(()=>{const t=this.language;let e=m[void 0!==t&&u.includes(t)?t:"en"].weeks;return e})();const t=this.date?new Date(this.date):new Date;this.alterDate={year:t.getFullYear(),month:t.getMonth(),day:t.getDate()},this.curDate=Object.assign({},this.alterDate),this.loadRecords()}handleDateChange(){const t=this.date?new Date(this.date):new Date;this.alterDate={year:t.getFullYear(),month:t.getMonth(),day:t.getDate()},this.curDate=Object.assign({},this.alterDate),this.loadRecords()}setHighlightDates(){if(this.defaultHighlightDates)try{this.highlightDates=JSON.parse(this.defaultHighlightDates)}catch(t){this.highlightDates=[]}}componentDidLoad(){this.stylingContainer&&(this.mbSource&&s(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&o(this.stylingContainer,this.clientStylingUrl)),this.setHighlightDates(),document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe(),document.removeEventListener("click",this.handleOutsideClick)}get yearOptions(){return Array.from({length:101},((t,e)=>this.alterDate.year-50+e)).map((t=>({label:String(t),value:String(t)})))}get monthOptions(){return Array.from({length:12},((t,e)=>e+1)).map((t=>({label:String(t),value:String(t)})))}loadRecords(){const{year:t,month:e}=this.alterDate;this.setDays(t,e)}setDays(t,e){this.days=[];const n=new Date(t,e,1).getDay(),r=new Date(t,e,1-n);for(let t=0;t<42;t++){const e=new Date(r);e.setDate(r.getDate()+t);const n={date:e.getDate(),month:e.getMonth(),year:e.getFullYear()};this.days.push(n)}}getFullDayOfMonth(t,e){return new Date(t,e,0).getDate()}showFormatedDate(t){return`${t.day}/${t.month+1}/${t.year}`}handleSelectDate(t,e,n){this.alterDate.day=t,this.curDate=Object.assign({},this.alterDate),this.showCalendar=!1;const r=this.highlightDates.map((t=>{const e=new Date(t);return{year:e.getFullYear(),month:e.getMonth(),day:e.getDate()}})).findIndex((r=>{const{year:i,month:a,day:o}=r;return e===a&&n===i&&t===o}));r>-1&&this.changeDate.emit(r)}tellIsCurDay(t,e,n){return this.curDate.day===t&&this.curDate.month===e&&this.curDate.year===n}tellIsHighLight(t,e,n){return!(!this.highlightDates||!this.highlightDates.length)&&this.highlightDates.map((t=>{const e=new Date(t);return{year:e.getFullYear(),month:e.getMonth(),day:e.getDate()}})).some((r=>{const{year:i,month:a,day:o}=r;return e===a&&n===i&&t===o}))}renderInner(){const t=["calendar",this.showCalendar?"calendar-visible":"calendar-leave"];return n("div",{class:"lottery-tipping-calendar",ref:t=>this.calendarRef=t},n("div",{class:"calling-input",onClick:()=>{this.showCalendar=!0}},n("div",{class:"calling-input-text"},this.showFormatedDate(this.curDate)),n("div",{class:"calling-input-icon",innerHTML:f})),n("div",{class:t.join(" ")},n("div",{class:"calendar-header"},n("div",{class:"date-controller year-minus",onClick:this.onYearMinus},"<"),n("div",{class:"date-controller month-minus",onClick:this.onMonthMinus},"<"),n("div",{class:"date-picker"},n("div",{class:"date-picker-year"},n("vaadin-select",{items:this.yearOptions,value:this.alterDate.year,style:{"--vaadin-field-default-width":"90px"},"on-value-changed":this.onYearChange.bind(this)})),n("div",{class:"date-picker-delimiter"},"-"),n("div",{class:"date-picker-month"},n("vaadin-select",{items:this.monthOptions,value:this.alterDate.month+1,style:{"--vaadin-field-default-width":"64px"},"on-value-changed":this.onMonthChange.bind(this)})),n("div",{class:"date-picker-delimiter"},"-"),n("div",{class:"date-picker-day"},this.alterDate.day)),n("div",{class:"date-controller month-plus",onClick:this.onMonthPlus},">"),n("div",{class:"date-controller year-plus",onClick:this.onYearPlus},">")),n("div",{class:"calendar-content"},n("div",{class:"calendar-content-week"},this.weeks.map((t=>n("div",{class:"week-item"},t)))),n("div",{class:"calendar-content-day"},this.days.map((t=>n("div",{class:{"day-item":!0,isCurDay:this.tellIsCurDay(t.date,t.month,t.year),isHighLight:this.tellIsHighLight(t.date,t.month,t.year)},onClick:()=>this.handleSelectDate(t.date,t.month,t.year)},t.date)))))))}render(){return n("div",{key:"da34c4c86cac49411fb15ab8bceda89e379befc6",class:"date-selection"},n("div",{key:"29f06ef7a5df466018ae6561b54fcbdfbab9f23b",class:"date-selection-leftIcon",innerHTML:g,onClick:()=>this.handlePrev.emit()}),n("div",{key:"c6d75d873c2683752c37d4083c57761c4f7e523b",class:"date-selection-calendar"},this.renderInner()),n("div",{key:"8b16b3e0761dd4c877f169aea84d028aaf193b69",class:"date-selection-rightIcon",innerHTML:p,onClick:()=>this.handleNext.emit()}))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],defaultHighlightDates:["handleGameIdStringChange"],date:["handleDateChange"]}}};var v;function b(t){return b="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},b(t)}function y(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 x(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function k(t){x(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===b(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))}w.style='.lottery-tipping-calendar{position:relative;display:inline-block}.calendar-visible{opacity:1;visibility:visible}.calendar-leave{opacity:0;visibility:hidden}.calendar{position:absolute;top:40px;left:-50%;background:var(--emw--color-background, #fff);color:var(--emw--color-typography-secondary, #6f6f6f);padding:16px;width:fit-content;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));border-radius:var(--emw--border-radius-small, 4px);box-shadow:2px 3px 5px rgba(0, 0, 0, 0.1);cursor:pointer;transition:opacity 0.2s ease, visibility 0.2s ease;z-index:99}.calendar-header{display:flex;align-items:center}.calendar-header .date-picker{display:flex;margin:0 18px;align-items:center}.calendar-header .date-picker-delimiter{font-size:16px;margin:auto 4px}.calendar-header .month-plus,.calendar-header .month-minus,.calendar-header .year-plus,.calendar-header .year-minus{cursor:pointer;font-size:14px}.calendar-header .month-plus:hover,.calendar-header .month-minus:hover,.calendar-header .year-plus:hover,.calendar-header .year-minus:hover{color:var(--emw-pool-game-acition-active, #005fdb);transition:color 0.2s}.calendar-header .year-minus,.calendar-header .month-plus{margin-right:6px}.calendar-content{padding:3px;width:fit-content}.calendar-content .day-item{text-align:center;line-height:40px;cursor:not-allowed;position:relative;pointer-events:none}.calendar-content .day-item:hover{background-color:var(--emw--color-background-secondary, #f5f5f5)}.calendar-content .day-item.isCurDay{border-radius:4px;background:var(--emw--color-secondary, #fff3b9);background-size:50%;color:var(--emw--color-typography-secondary, #6f6f6f);font-weight:600;box-shadow:2px 2px 2px var(--emw-calender-curday-box-shadow, rgba(0, 0, 0, 0.09));cursor:pointer;pointer-events:all}.calendar-content .day-item.isHighLight{cursor:pointer;pointer-events:all}.calendar-content .day-item.isHighLight::after{content:"";position:absolute;left:calc(50% - 4px);bottom:0;width:6px;height:6px;border-radius:50%;background-color:var(--emw--color-error, red)}.calendar-content-week{display:grid;grid-template-columns:repeat(7, 40px);grid-template-rows:repeat(1, 36px);justify-items:center;align-items:center;border-bottom:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));color:var(--emw--color-typography-secondary, #6f6f6f)}.calendar-content-day{margin-top:4px;display:grid;grid-template-rows:repeat(6, 40px);grid-template-columns:repeat(7, 40px)}.calling-input{height:36px;width:160px;display:flex;align-items:center;justify-content:space-between;padding:0px 4px;background-color:var(--emw--color-background, #f5f5f5);border-radius:var(--emw--border-radius-small, 4px);border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));cursor:pointer}.calling-input .input{color:var(--emw--color-typography, #000)}.calling-input-text{color:var(--emw--color-typography, #000)}.date-selection{display:flex;align-items:center;justify-content:center;gap:24px}.date-selection-leftIcon,.date-selection-rightIcon{cursor:pointer;color:var(--emw--color-typography, #000)}',function(t){t.Football="Football",t.IceHockey="IceHockey",t.Mixed="Mixed"}(v||(v={}));var S={};function D(){return S}function C(t){x(1,arguments);var e=k(t);return e.setHours(0,0,0,0),e}var T=6e4,O=36e5;function I(t,e){x(2,arguments);var n=C(t),r=C(e);return n.getTime()===r.getTime()}function M(t,e){return x(2,arguments),k(t).getTime()-k(e).getTime()}function N(t){x(1,arguments);var e=k(t),n=e.getUTCDay(),r=(n<1?7:0)+n-1;return e.setUTCDate(e.getUTCDate()-r),e.setUTCHours(0,0,0,0),e}function _(t){x(1,arguments);var e=k(t),n=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=N(r),a=new Date(0);a.setUTCFullYear(n,0,4),a.setUTCHours(0,0,0,0);var o=N(a);return e.getTime()>=i.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function E(t,e){var n,r,i,a,o,s,l,d;x(1,arguments);var c=D(),h=y(null!==(n=null!==(r=null!==(i=null!==(a=null==e?void 0:e.weekStartsOn)&&void 0!==a?a:null==e||null===(o=e.locale)||void 0===o||null===(s=o.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==i?i:c.weekStartsOn)&&void 0!==r?r:null===(l=c.locale)||void 0===l||null===(d=l.options)||void 0===d?void 0:d.weekStartsOn)&&void 0!==n?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var u=k(t),m=u.getUTCDay(),g=(m<h?7:0)+m-h;return u.setUTCDate(u.getUTCDate()-g),u.setUTCHours(0,0,0,0),u}function j(t,e){var n,r,i,a,o,s,l,d;x(1,arguments);var c=k(t),h=c.getUTCFullYear(),u=D(),m=y(null!==(n=null!==(r=null!==(i=null!==(a=null==e?void 0:e.firstWeekContainsDate)&&void 0!==a?a:null==e||null===(o=e.locale)||void 0===o||null===(s=o.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==i?i:u.firstWeekContainsDate)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(d=l.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==n?n:1);if(!(m>=1&&m<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var g=new Date(0);g.setUTCFullYear(h+1,0,m),g.setUTCHours(0,0,0,0);var p=E(g,e),f=new Date(0);f.setUTCFullYear(h,0,m),f.setUTCHours(0,0,0,0);var w=E(f,e);return c.getTime()>=p.getTime()?h+1:c.getTime()>=w.getTime()?h:h-1}function B(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length<e;)r="0"+r;return n+r}const $=function(t,e){var n=t.getUTCFullYear(),r=n>0?n:1-n;return B("yy"===e?r%100:r,e.length)},z=function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):B(n+1,2)},R=function(t,e){return B(t.getUTCDate(),e.length)},A=function(t,e){return B(t.getUTCHours()%12||12,e.length)},P=function(t,e){return B(t.getUTCHours(),e.length)},H=function(t,e){return B(t.getUTCMinutes(),e.length)},W=function(t,e){return B(t.getUTCSeconds(),e.length)},G=function(t,e){var n=e.length,r=t.getUTCMilliseconds();return B(Math.floor(r*Math.pow(10,n-3)),e.length)};var U={G:function(t,e,n){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if("yo"===e){var r=t.getUTCFullYear();return n.ordinalNumber(r>0?r:1-r,{unit:"year"})}return $(t,e)},Y:function(t,e,n,r){var i=j(t,r),a=i>0?i:1-i;return"YY"===e?B(a%100,2):"Yo"===e?n.ordinalNumber(a,{unit:"year"}):B(a,e.length)},R:function(t,e){return B(_(t),e.length)},u:function(t,e){return B(t.getUTCFullYear(),e.length)},Q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return B(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return B(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){var r=t.getUTCMonth();switch(e){case"M":case"MM":return z(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){var r=t.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return B(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){var i=function(t,e){x(1,arguments);var n=k(t),r=E(n,e).getTime()-function(t,e){var n,r,i,a,o,s,l,d;x(1,arguments);var c=D(),h=y(null!==(n=null!==(r=null!==(i=null!==(a=null==e?void 0:e.firstWeekContainsDate)&&void 0!==a?a:null==e||null===(o=e.locale)||void 0===o||null===(s=o.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==i?i:c.firstWeekContainsDate)&&void 0!==r?r:null===(l=c.locale)||void 0===l||null===(d=l.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==n?n:1),u=j(t,e),m=new Date(0);return m.setUTCFullYear(u,0,h),m.setUTCHours(0,0,0,0),E(m,e)}(n,e).getTime();return Math.round(r/6048e5)+1}(t,r);return"wo"===e?n.ordinalNumber(i,{unit:"week"}):B(i,e.length)},I:function(t,e,n){var r=function(t){x(1,arguments);var e=k(t),n=N(e).getTime()-function(t){x(1,arguments);var e=_(t),n=new Date(0);return n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0),N(n)}(e).getTime();return Math.round(n/6048e5)+1}(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):B(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):R(t,e)},D:function(t,e,n){var r=function(t){x(1,arguments);var e=k(t),n=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var r=e.getTime();return Math.floor((n-r)/864e5)+1}(t);return"Do"===e?n.ordinalNumber(r,{unit:"dayOfYear"}):B(r,e.length)},E:function(t,e,n){var r=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){var i=t.getUTCDay(),a=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(a);case"ee":return B(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){var i=t.getUTCDay(),a=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(a);case"cc":return B(a,e.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(t,e,n){var r=t.getUTCDay(),i=0===r?7:r;switch(e){case"i":return String(i);case"ii":return B(i,e.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){var r,i=t.getUTCHours();switch(r=12===i?"noon":0===i?"midnight":i/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,n){var r,i=t.getUTCHours();switch(r=i>=17?"evening":i>=12?"afternoon":i>=4?"morning":"night",e){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){var r=t.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return A(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):P(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):B(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):B(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):H(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):W(t,e)},S:function(t,e){return G(t,e)},X:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();if(0===i)return"Z";switch(e){case"X":return Y(i);case"XXXX":case"XX":return q(i);default:return q(i,":")}},x:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return Y(i);case"xxxx":case"xx":return q(i);default:return q(i,":")}},O:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+F(i,":");default:return"GMT"+q(i,":")}},z:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+F(i,":");default:return"GMT"+q(i,":")}},t:function(t,e,n,r){return B(Math.floor((r._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,n,r){return B((r._originalDate||t).getTime(),e.length)}};function F(t,e){var n=t>0?"-":"+",r=Math.abs(t),i=Math.floor(r/60),a=r%60;if(0===a)return n+String(i);var o=e||"";return n+String(i)+o+B(a,2)}function Y(t,e){return t%60==0?(t>0?"-":"+")+B(Math.abs(t)/60,2):q(t,e)}function q(t,e){var n=e||"",r=t>0?"-":"+",i=Math.abs(t);return r+B(Math.floor(i/60),2)+n+B(i%60,2)}const J=U;var V=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"})}},Q=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"})}},X={p:Q,P:function(t,e){var n,r=t.match(/(P+)(p+)?/)||[],i=r[1],a=r[2];if(!a)return V(t,e);switch(i){case"P":n=e.dateTime({width:"short"});break;case"PP":n=e.dateTime({width:"medium"});break;case"PPP":n=e.dateTime({width:"long"});break;default:n=e.dateTime({width:"full"})}return n.replace("{{date}}",V(i,e)).replace("{{time}}",Q(a,e))}};const Z=X;var K=["D","DD"],tt=["YY","YYYY"];function et(t,e,n){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; 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(n,"`; 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(n,"`; 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(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var nt={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 rt(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}var it,at={date:rt({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:rt({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:rt({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},ot={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function st(t){return function(e,n){var r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&t.formattingValues){var i=t.defaultFormattingWidth||t.defaultWidth,a=null!=n&&n.width?String(n.width):i;r=t.formattingValues[a]||t.formattingValues[i]}else{var o=t.defaultWidth,s=null!=n&&n.width?String(n.width):t.defaultWidth;r=t.values[s]||t.values[o]}return r[t.argumentCallback?t.argumentCallback(e):e]}}function lt(t){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,i=e.match(r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth]);if(!i)return null;var a,o=i[0],s=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],l=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(l):l,{value:a=n.valueCallback?n.valueCallback(a):a,rest:e.slice(o.length)}}}const dt={code:"en-US",formatDistance:function(t,e,n){var r,i=nt[t];return r="string"==typeof i?i:1===e?i.one:i.other.replace("{{count}}",e.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:at,formatRelative:function(t){return ot[t]},localize:{ordinalNumber:function(t){var e=Number(t),n=e%100;if(n>20||n<10)switch(n%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:st({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:st({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:st({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:st({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:st({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:(it={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]:{},n=t.match(it.matchPattern);if(!n)return null;var r=n[0],i=t.match(it.parsePattern);if(!i)return null;var a=it.valueCallback?it.valueCallback(i[0]):i[0];return{value:a=e.valueCallback?e.valueCallback(a):a,rest:t.slice(r.length)}}),era:lt({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:lt({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:lt({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:lt({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:lt({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 ct=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ht=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ut=/^'([^]*?)'?$/,mt=/''/g,gt=/[a-zA-Z]/;function pt(t,e,n){var r,i,a,o,s,l,d,c,h,u,m,g,p,f,w,v,S,C;x(2,arguments);var T=String(e),O=D(),I=null!==(r=null!==(i=null==n?void 0:n.locale)&&void 0!==i?i:O.locale)&&void 0!==r?r:dt,M=y(null!==(a=null!==(o=null!==(s=null!==(l=null==n?void 0:n.firstWeekContainsDate)&&void 0!==l?l:null==n||null===(d=n.locale)||void 0===d||null===(c=d.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==s?s:O.firstWeekContainsDate)&&void 0!==o?o:null===(h=O.locale)||void 0===h||null===(u=h.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==a?a:1);if(!(M>=1&&M<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var N=y(null!==(m=null!==(g=null!==(p=null!==(f=null==n?void 0:n.weekStartsOn)&&void 0!==f?f:null==n||null===(w=n.locale)||void 0===w||null===(v=w.options)||void 0===v?void 0:v.weekStartsOn)&&void 0!==p?p:O.weekStartsOn)&&void 0!==g?g:null===(S=O.locale)||void 0===S||null===(C=S.options)||void 0===C?void 0:C.weekStartsOn)&&void 0!==m?m:0);if(!(N>=0&&N<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!I.localize)throw new RangeError("locale must contain localize property");if(!I.formatLong)throw new RangeError("locale must contain formatLong property");var _=k(t);if(!function(t){if(x(1,arguments),!function(t){return x(1,arguments),t instanceof Date||"object"===b(t)&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t)return!1;var e=k(t);return!isNaN(Number(e))}(_))throw new RangeError("Invalid time value");var E=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()}(_),j=function(t,e){return x(2,arguments),function(t,e){x(2,arguments);var n=k(t).getTime(),r=y(e);return new Date(n+r)}(t,-y(e))}(_,E),B={firstWeekContainsDate:M,weekStartsOn:N,locale:I,_originalDate:_};return T.match(ht).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,Z[e])(t,I.formatLong):t})).join("").match(ct).map((function(r){if("''"===r)return"'";var i,a,o=r[0];if("'"===o)return(a=(i=r).match(ut))?a[1].replace(mt,"'"):i;var s=J[o];if(s)return null!=n&&n.useAdditionalWeekYearTokens||-1===tt.indexOf(r)||et(r,e,String(t)),null!=n&&n.useAdditionalDayOfYearTokens||!(-1!==K.indexOf(r))||et(r,e,String(t)),s(j,r,I.localize,B);if(o.match(gt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+o+"`");return r})).join("")}function ft(t,e){var n;x(1,arguments);var r=y(null!==(n=null==e?void 0:e.additionalDigits)&&void 0!==n?n:2);if(2!==r&&1!==r&&0!==r)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!=typeof t&&"[object String]"!==Object.prototype.toString.call(t))return new Date(NaN);var i,a=function(t){var e,n={},r=t.split(wt.dateTimeDelimiter);if(r.length>2)return n;if(/:/.test(r[0])?e=r[0]:(n.date=r[0],e=r[1],wt.timeZoneDelimiter.test(n.date)&&(n.date=t.split(wt.timeZoneDelimiter)[0],e=t.substr(n.date.length,t.length))),e){var i=wt.timezone.exec(e);i?(n.time=e.replace(i[1],""),n.timezone=i[1]):n.time=e}return n}(t);if(a.date){var o=function(t,e){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=t.match(n);if(!r)return{year:NaN,restDateString:""};var i=r[1]?parseInt(r[1]):null,a=r[2]?parseInt(r[2]):null;return{year:null===a?i:100*a,restDateString:t.slice((r[1]||r[2]).length)}}(a.date,r);i=function(t,e){if(null===e)return new Date(NaN);var n=t.match(vt);if(!n)return new Date(NaN);var r=!!n[4],i=xt(n[1]),a=xt(n[2])-1,o=xt(n[3]),s=xt(n[4]),l=xt(n[5])-1;if(r)return function(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}(0,s,l)?function(t,e,n){var r=new Date(0);r.setUTCFullYear(t,0,4);var i=7*(e-1)+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+i),r}(e,s,l):new Date(NaN);var d=new Date(0);return function(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(St[e]||(Dt(t)?29:28))}(e,a,o)&&function(t,e){return e>=1&&e<=(Dt(t)?366:365)}(e,i)?(d.setUTCFullYear(e,a,Math.max(i,o)),d):new Date(NaN)}(o.restDateString,o.year)}if(!i||isNaN(i.getTime()))return new Date(NaN);var s,l=i.getTime(),d=0;if(a.time&&(d=function(t){var e=t.match(bt);if(!e)return NaN;var n=kt(e[1]),r=kt(e[2]),i=kt(e[3]);return function(t,e,n){return 24===t?0===e&&0===n:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}(n,r,i)?n*O+r*T+1e3*i:NaN}(a.time),isNaN(d)))return new Date(NaN);if(!a.timezone){var c=new Date(l+d),h=new Date(0);return h.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),h.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),h}return s=function(t){if("Z"===t)return 0;var e=t.match(yt);if(!e)return 0;var n="+"===e[1]?-1:1,r=parseInt(e[2]),i=e[3]&&parseInt(e[3])||0;return function(t,e){return e>=0&&e<=59}(0,i)?n*(r*O+i*T):NaN}(a.timezone),isNaN(s)?new Date(NaN):new Date(l+d+s)}var wt={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},vt=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,bt=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,yt=/^([+-])(\d{2})(?::?(\d{2}))?$/;function xt(t){return t?parseInt(t):1}function kt(t){return t&&parseFloat(t.replace(",","."))||0}var St=[31,null,31,30,31,30,31,31,30,31,30,31];function Dt(t){return t%400==0||t%4==0&&t%100!=0}function Ct(t,e="GET",n=null,r={}){return new Promise(((i,a)=>{const o=Object.assign({"Content-Type":"application/json"},r),s={method:e,headers:o,body:null};n&&"GET"!==e&&"HEAD"!==e?s.body=JSON.stringify(n):delete s.body,fetch(t,s).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=>i(t)),(t=>a(t)))}))}function Tt(t){if(!t)return"";const e=ft(t);if(isNaN(e.getTime()))return"";const n=pt(e,"HH:mm");return function(t){return x(1,arguments),I(t,Date.now())}(e)?`Today at ${n}`:function(t){return x(1,arguments),I(t,function(t,e){x(2,arguments);var n=k(t),r=y(e);return isNaN(r)?new Date(NaN):r?(n.setDate(n.getDate()+r),n):n}(Date.now(),1))}(e)?`Tomorrow at ${n}`:`${pt(e,"EEEE")} at ${n}`}function Ot(t,e){return null==t||""===t||(0!==t||!e)&&(Array.isArray(t)?function(t){if(0===t.length)return!0;const e=t.length;let n=0;for(let r=0;r<e;r++){if(!Ot(t[r]))return!1;n++}return n===e}(t):"[object Object]"===Object.prototype.toString.call(t)?function(t){if(0===Object.keys(t).length)return!0;const e=Object.keys(t).length;let n=0;for(const e of Object.values(t)){if(!Ot(e))return!1;n++}return n===e}(t):!t)}const It={name:"All",code:"All"};async function Mt({endpoint:t,groupId:e,params:n={}}){try{const r=await Ct(`${t}/groups/${e}/liveDraws${function(t){const e={};Object.entries(t).forEach((([t,n])=>{Ot(n,!0)||(e[t]=n)}));const n=Object.entries(e).map((([t,e])=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`)).join("&");return n?`?${n}`:""}(n)}`);return r}catch(t){return console.error("Failed to fetch game info:",t),{}}}function Nt(t){return null===t?"":`€${t?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):0}`}const _t=["ro","en","fr","ar","hr"],Et={en:{logout:"Log out",draws:"DRAWS",latestResults:"LATEST RESULTS",instruction:"INSTRUCTION",howToWin:"HOW TO WIN",selectDraws:"Select Draws from the following bars:",gameNotAvailable:"Sorry. The Game is not available now.",instructionContent:"Instruction content goes here.",turnover:"Turnover: "},ro:{logout:"Deconectare",draws:"EXTRAGERI",latestResults:"ULTIMELE REZULTATE",instruction:"INSTRUCȚIUNI",howToWin:"CUM SĂ CÂȘTIGI",selectDraws:"Selectați extrageri din barele următoare:",gameNotAvailable:"Ne pare rău. Jocul nu este disponibil acum.",instructionContent:"Conținutul instrucțiunilor se afișează aici."},fr:{logout:"Se déconnecter",draws:"TIRAGES",latestResults:"DERNIERS RÉSULTATS",instruction:"INSTRUCTION",howToWin:"COMMENT GAGNER",selectDraws:"Sélectionnez les tirages dans les barres suivantes:",gameNotAvailable:"Désolé. Le jeu nest pas disponible pour le moment.",instructionContent:"Le contenu des instructions va ici."},ar:{logout:"تسجيل الخروج",draws:"السحوبات",latestResults:"أحدث النتائج",instruction:"التعليمات",howToWin:"كيفية الفوز",selectDraws:"حدد السحوبات من الأشرطة التالية:",gameNotAvailable:"آسف. اللعبة غير متوفرة الآن.",instructionContent:"محتوى التعليمات يذهب هنا."},hr:{logout:"Odjava",draws:"IZVLAČENJA",latestResults:"NAJNOVIJI REZULTATI",instruction:"UPUTE",howToWin:"KAKO POBIJEDITI",selectDraws:"Odaberite izvlačenja sa sljedećih traka:",gameNotAvailable:"Žao nam je. Igra trenutno nije dostupna.",instructionContent:"Sadržaj uputa ide ovdje."}},jt={[v.Football]:n("svg",{height:"18px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",class:"text-sm"},n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.063 19.072l-.81-.97-.117.083.385-2.43.136-.211 2.23-3.464.037-.057h1.075a9.964 9.964 0 01-2.936 7.049zM4.769 5.112l2.8.877-.072 3.246-2.427 2.95-1.561-.153L2.39 9.26a9.977 9.977 0 012.378-4.148zm7.745-3.086l-.72 1.645-3.798 1.404-2.395-.75A9.953 9.953 0 0112 2c.174 0 .343.017.514.026zm7.346 3.812l-1.128 1.29-3.402-.755-.033-.008-2.446-2.241.057.016.862-1.973a9.996 9.996 0 016.09 3.67zm-1.87 8.894l-3.385-.493-1.358-4.067 2.173-2.755 3.144.698 1.347 3.634-1.921 2.983zm-4.64 5.787l4.304-1.486.62.742a9.945 9.945 0 01-5.878 2.205l.954-1.461zm-6.314-2.84l3.91.873-.001.003 1.509 1.507-1.24 1.898a9.946 9.946 0 01-5.908-2.553l1.73-1.728zm1.16-7.72l4.168.725 1.302 3.9-2.552 2.98-3.97-.885-1.412-3.724L8.196 9.96zM2 12c0-.31.019-.615.047-.92l.485 1.203-.454.907A9.934 9.934 0 012 11.999zM12 1C5.934 1 1 5.935 1 12c0 6.067 4.935 11 11 11 6.066 0 11-4.933 11-11 0-6.065-4.934-11-11-11z",fill:"currentColor"}))},Bt=class{constructor(n){t(this,n),this.handleBombItemClick=e(this,"handleBombItemClick",7),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.endpoint=void 0,this.groupId=void 0,this.activeBomb="All",this.bombList=[],this.gameList=[],this.liveDrawsInfoByGroupId={},this.isLoading=!1}handleClientStylingChange(t,e){t!=e&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&o(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&s(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&s(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&o(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}connectedCallback(){this.doFetchData()}async doFetchData(t={}){try{this.isLoading=!0,this.liveDrawsInfoByGroupId=await async function({endpoint:t,groupId:e,params:n}){try{const{sportTags:r=[],liveDraws:i=[]}=await Mt({endpoint:t,groupId:e,params:n});return{sportTags:r.map((t=>({name:t,code:t}))),liveDraws:i.map((t=>({title:t.gameName,subTitle:t.sportTag,icon:t.sportTag,date:Tt(t.drawCloseTime),turnover:Nt(null),matchList:t.matchs.map((t=>t.eventName)),drawId:t.drawId,gameId:t.gameId})))}}catch(t){return{sportTags:[],liveDraws:[]}}}({endpoint:this.endpoint,groupId:this.groupId,params:t}),this.gameList=this.liveDrawsInfoByGroupId.liveDraws,this.bombList=[It,...this.liveDrawsInfoByGroupId.sportTags],this.isLoading=!1,this.updateTurnoverForAll()}finally{this.isLoading=!1}}async updateTurnoverForAll(){const t=async function({endpoint:t,configs:e}){const n={turnover:Nt(null)},r=e.map((async({gameId:e,drawId:n})=>{var r;const i=await async function({endpoint:t,gameId:e,drawId:n}){try{return await Ct(`${t}/games/${e}/draws/${n}/saleStatistics`)}catch(t){return Promise.reject(t)}}({endpoint:t,gameId:e,drawId:n});return{turnover:Nt(null===(r=null==i?void 0:i.wagerSegment)||void 0===r?void 0:r.totalSalesCrossDraw)}}));return(await Promise.allSettled(r)).map((t=>"fulfilled"===t.status?t.value:n))}({endpoint:this.endpoint,configs:this.gameList.map((t=>({gameId:t.gameId,drawId:t.drawId})))});for(let e=0;e<this.gameList.length;e++)this.gameList[e].turnover=(await t)[e].turnover;this.gameList=[...this.gameList]}handleBombChange(t){this.activeBomb=t,t===It.code?this.doFetchData():this.doFetchData({sportTag:t})}renderLoading(){return n("div",{class:"loading-wrap"},n("section",{class:"dots-container"},n("div",{class:"dot"}),n("div",{class:"dot"}),n("div",{class:"dot"}),n("div",{class:"dot"}),n("div",{class:"dot"})))}renderEmpty(){const t=r("../static/empty-info.svg");return n("div",{class:"empty-draw-wrap"},n("div",{class:"empty-draw"},n("img",{src:t,class:"empty-draw-logo"}),n("div",{class:"empty-draw-content"},n("div",{class:"empty-draw-text"},"ⓘ Sorry. The game is not available now."))))}renderFilter(){return n("div",{class:"OddsbomEntranceController__section"},n("span",{class:"OddsbomEntranceController__label"},"Select Bomb:"),this.bombList.length?n("div",{class:"OddsbomEntranceController__segmented-control"},this.bombList.map((({name:t,code:e})=>n("button",{class:{OddsbomEntranceController__segment:!0,"OddsbomEntranceController__segment--active":this.activeBomb===e},onClick:this.handleBombChange.bind(this,e)},t)))):n("div",{class:"skeleton-content"},n("div",{class:"skeleton-item skeleton-animated"})))}renderMain(){return this.gameList.length?n("div",{class:"bomb-grid"},this.gameList.map((({title:t,subTitle:e,icon:r,date:i,turnover:a,matchList:o,drawId:s,gameId:l})=>n("div",{class:"bomb-card-wrapper"},n("div",{class:"bomb-card",onClick:()=>{this.handleBombItemClick.emit({drawId:s,gameId:l})}},n("div",{class:"card-header"},jt[r]&&n("div",{class:"card-icon football"},jt[r]),n("div",{class:"card-title"},n("h2",null,t),n("p",null,e)),n("div",{class:"card-jackpot"})),n("div",{class:"card-info"},n("span",{class:"card-tag"},i),n("span",{class:"card-tag"},(()=>{const t=this.language;return Et[void 0!==t&&_t.includes(t)?t:"en"].turnover})()+a)),n("div",{class:"card-matches"},n("ol",null,o.map((t=>n("li",null,t)))))))))):this.renderEmpty()}render(){return n("div",{key:"ae8252d8cb1374af9bb8189bcd9edac313c7bc6a",ref:t=>this.stylingContainer=t,class:"lottery-oddsbom-bomb-wrapper"},this.renderFilter(),n("div",{key:"3f673f335248057370e7e57076cc387a86dc4099",class:"bomb-grid-container"},this.isLoading?this.renderLoading():this.renderMain()))}static get assetsDirs(){return["../static"]}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};Bt.style="/* --- Component: Bomb Card Grid --- */\n.lottery-oddsbom-bomb-wrapper {\n background: var(--emw--color-background, #fff);\n color: var(--emw--color-typography, #000);\n height: 100%;\n}\n\n.bomb-grid-container {\n width: 100%;\n display: flex;\n justify-content: center;\n container-type: inline-size;\n container-name: bomb-grid;\n background: var(--emw--color-background, #fff);\n color: var(--emw--color-typography, #000);\n /* --- Component: Bomb Card --- */\n}\n.bomb-grid-container .bomb-grid {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 0.75rem;\n place-items: center;\n}\n.bomb-grid-container .bomb-card-wrapper {\n width: 100%;\n max-width: 30rem;\n height: 100%;\n box-sizing: border-box;\n border-radius: 8px;\n padding: 1rem;\n border: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n.bomb-grid-container .bomb-card {\n height: 100%;\n min-width: 24rem;\n transition: transform 0.3s;\n}\n.bomb-grid-container .bomb-card:hover {\n transform: scale(1.02);\n cursor: pointer;\n}\n.bomb-grid-container .card-header {\n display: flex;\n align-items: center;\n gap: 1rem;\n margin-bottom: 0.8rem;\n}\n.bomb-grid-container .card-icon {\n width: 48px;\n height: 48px;\n border-radius: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.bomb-grid-container .card-icon svg {\n width: 28px;\n height: 28px;\n}\n.bomb-grid-container .card-title {\n flex-grow: 1;\n word-break: break-all;\n}\n.bomb-grid-container .card-title h2 {\n margin: 0;\n font-size: 1.25rem;\n font-weight: 700;\n word-wrap: break-word;\n}\n.bomb-grid-container .card-title p {\n margin: 0;\n color: var(--emw--color-typography-secondary, #333);\n font-size: 0.9rem;\n word-wrap: break-word;\n}\n.bomb-grid-container .card-info {\n display: flex;\n gap: 0.75rem;\n margin-bottom: 0.8rem;\n flex-wrap: wrap;\n}\n.bomb-grid-container .card-tag {\n background-color: var(--emw--color-tertiary, #e3f2fd);\n padding: 0.3rem 0.75rem;\n border-radius: 4px;\n font-size: 0.85rem;\n font-weight: 500;\n max-width: 120px;\n}\n.bomb-grid-container .card-matches {\n max-height: 6.8rem;\n overflow-y: auto;\n}\n.bomb-grid-container .card-matches ol {\n margin: 0;\n padding-left: 1.25rem;\n font-size: 0.85rem;\n line-height: 1.6;\n}\n.bomb-grid-container .card-matches li {\n padding-left: 0.2rem;\n word-wrap: break-word;\n}\n\n/* --- CONTAINER QUERIES FOR RESPONSIVENESS --- */\n@container bomb-grid (max-width: 768px) {\n .bomb-grid-container .bomb-grid {\n /* On smaller containers, switch to a single column */\n grid-template-columns: 1fr;\n }\n .bomb-card-wrapper .bomb-card {\n min-width: 200px;\n }\n}\n/* --- Component: Filter Controls --- */\n.OddsbomEntranceController__section {\n margin: 1.5rem 0;\n display: flex;\n gap: 12px;\n color: var(--emw--color-typography, #000);\n container-type: inline-size;\n container-name: controller;\n justify-content: center;\n}\n.OddsbomEntranceController__label {\n font-weight: 500;\n white-space: nowrap;\n width: 6rem;\n line-height: 2.2rem;\n}\n.OddsbomEntranceController__segmented-control {\n display: inline-flex;\n gap: 1rem;\n flex-wrap: wrap;\n}\n.OddsbomEntranceController__segment {\n height: 2.2rem;\n border: none;\n padding: 0.3rem 0.8rem;\n cursor: pointer;\n font-weight: 500;\n border-radius: 2rem;\n outline: none;\n white-space: nowrap;\n background-color: var(--emw--color-background, #ffffff);\n color: var(--emw--color-typography, #000);\n}\n.OddsbomEntranceController__segment--active {\n background-color: var(--emw--color-primary-variant, #1367e7);\n color: var(--emw--color-typography-reverse, #fff);\n font-weight: 600;\n}\n.OddsbomEntranceController__segment--disabled:hover {\n cursor: not-allowed !important;\n}\n.OddsbomEntranceController__segment:not(.OddsbomEntranceController__segment--active):hover {\n background-color: var(--emw--color-background-tertiary, #ccc);\n}\n\n.skeleton-content {\n display: flex;\n flex-direction: column;\n gap: 29px;\n align-items: center;\n}\n\n.skeleton-item {\n background: var(--emw--color-background-secondary, #f5f5f5);\n border-radius: 4px;\n height: 40px;\n width: 200px;\n}\n\n.skeleton-animated {\n animation: skeleton-shimmer 1.5s infinite linear;\n background: linear-gradient(90deg, var(--emw--color-background-secondary, #f5f5f5) 25%, var(--emw--color-background-tertiary, #ccc) 37%, var(--emw--color-background-secondary, #f5f5f5) 63%);\n background-size: 200% 100%;\n}\n\n@keyframes skeleton-shimmer {\n to {\n background-position: 100% 0;\n }\n}\n.loading-icon.scale {\n animation: scale 1s infinite ease-in-out;\n}\n\n@keyframes scale {\n 0%, 100% {\n transform: scale(1);\n }\n 50% {\n transform: scale(1.2);\n }\n}\n@container controller (max-width: 500px) {\n .OddsbomEntranceController__segmented-control {\n gap: 0rem;\n }\n .OddsbomEntranceController__segment {\n padding: 0.2rem 0.6rem;\n }\n .OddsbomEntranceController__label,\n .OddsbomEntranceController____segment {\n line-height: 1.8rem;\n }\n}\n.loading-wrap {\n margin: 20px 0;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 100px;\n}\n.loading-wrap .dots-container {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n}\n.loading-wrap .dot {\n height: 14px;\n width: 14px;\n margin-right: 14px;\n border-radius: 14px;\n background-color: var(--emw--color-gray-300, #333);\n animation: pulse 1.5s infinite ease-in-out;\n}\n.loading-wrap .dot:last-child {\n margin-right: 0;\n}\n.loading-wrap .dot:nth-child(1) {\n animation-delay: -0.3s;\n}\n.loading-wrap .dot:nth-child(2) {\n animation-delay: -0.1s;\n}\n.loading-wrap .dot:nth-child(3) {\n animation-delay: 0.1s;\n}\n@keyframes pulse {\n 0% {\n transform: scale(0.8);\n background-color: var(--emw--color-gray-300, #333);\n }\n 50% {\n transform: scale(1.2);\n background-color: var(--emw--color-gray-100, #e6e6e6);\n }\n 100% {\n transform: scale(0.8);\n background-color: var(--emw--color-gray-150, #6f6f6f);\n }\n}\n\n.empty-draw-wrap {\n padding-top: 100px;\n}\n.empty-draw-wrap .empty-draw {\n width: 240px;\n height: 160px;\n padding: 18px 12px 12px 12px;\n background: var(--emw--color-secondary-variant, #e3f2fd);\n position: relative;\n margin: 0 auto;\n display: flex;\n justify-content: center;\n align-items: center;\n text-align: center;\n border-radius: 12px;\n}\n.empty-draw-wrap .empty-draw img {\n position: absolute;\n top: -64%;\n left: 50%;\n transform: translateX(-50%);\n width: 200px;\n}\n.empty-draw-wrap .empty-draw-content {\n display: flex;\n gap: 4px;\n}\n.empty-draw-wrap .empty-draw-text {\n font-size: 14px;\n font-weight: bold;\n line-height: 20px;\n}";const $t=c({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 256H736v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zm-200 0H360v-72h304v72z"}}]},name:"delete",theme:"filled"},{extraSVGAttrs:{width:"18px",height:"18px",fill:""}}),zt=class{constructor(n){t(this,n),this.oddsbomBulletToggleEvent=e(this,"oddsbomBulletToggle",7),this.oddsbomBulletDeleteEvent=e(this,"oddsbomBulletDelete",7),this.oddsbomBulletAddedByMoreBtnDeleteEvent=e(this,"oddsbomBulletAddedByMoreBtnDelete",7),this.oddsbomBulletCallDialogEvent=e(this,"oddsbomBulletCallDialog",7),this.isSelected=void 0,this.disabled=void 0,this.text=void 0,this.idx=void 0,this.isReading=void 0,this.isDeleteByIcon=void 0,this.isCallDialogBtn=void 0,this.isAddedByMoreBtn=void 0,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0}handleClientStylingChange(t,e){t!=e&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&o(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&s(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&s(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&o(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleClick(){this.isCallDialogBtn?this.oddsbomBulletCallDialogEvent.emit():this.isDeleteByIcon?this.isAddedByMoreBtn?this.oddsbomBulletAddedByMoreBtnDeleteEvent.emit(this.text):this.oddsbomBulletDeleteEvent.emit(this.idx):this.disabled||this.oddsbomBulletToggleEvent.emit(this.idx)}render(){return n("div",{key:"e21cf46108e35dcbf7d65e8c6a5f12f5d5ae49cb",class:"OddsbomBullet",ref:t=>this.stylingContainer=t},n("button",{key:"4edf5cd481d8283bd71f6806b6f93949e1308095",class:{OddsbomBulletBtn__normal:!0,OddsbomBulletBtn__selected:this.isSelected,OddsbomBulletBtn__disabled:this.disabled,isDeleteByIcon:this.isDeleteByIcon,isCallDialogBtn:this.isCallDialogBtn||this.isReading},onClick:this.handleClick.bind(this),disabled:this.disabled},n("span",{key:"fa1aed0293dc004808e6992c069d6992317b0788",class:"OddsbomBullet--deleteIcon",innerHTML:$t}),n("span",{key:"53ed96f2c2b833d21488049f987b6131718d563e",class:"OddsbomBullet--text"},this.text)))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};zt.style=".OddsbomBullet .OddsbomBulletBtn__normal{width:32px;height:32px;display:flex;align-items:center;justify-content:center;background:var(--emw--color-background, #fff);border:2px solid var(--emw--color-primary, #0d196e);border-radius:var(--emw--border-radius-medium, 8px);color:var(--emw--color-typography, #000);font-weight:bold;cursor:pointer;transition:transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.2s ease, background-color 0.3s;user-select:none;position:relative}.OddsbomBullet .OddsbomBulletBtn__normal:hover{transform:scale(1.15) rotate(-5deg);box-shadow:var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15)) 7px 6px 6px}.OddsbomBullet .OddsbomBulletBtn__normal .OddsbomBullet--deleteIcon{display:none}.OddsbomBullet .OddsbomBulletBtn__normal.isDeleteByIcon:hover{background-color:var(--emw--color-background, #fff)}.OddsbomBullet .OddsbomBulletBtn__normal.isDeleteByIcon:hover .OddsbomBullet--text{display:none}.OddsbomBullet .OddsbomBulletBtn__normal.isDeleteByIcon:hover .OddsbomBullet--deleteIcon{display:inline;fill:var(--emw--color-typography, #000)}.OddsbomBullet .OddsbomBulletBtn__normal.isCallDialogBtn:hover{transform:none;box-shadow:none}.OddsbomBullet .OddsbomBulletBtn__normal.OddsbomBulletBtn__selected{background-color:var(--emw--color-primary, #0d196e);color:var(--emw--color-typography-inverse, #fff);transform:scale(1.05);box-shadow:0 5px 10px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15))}.OddsbomBullet .OddsbomBulletBtn__normal.OddsbomBulletBtn__disabled{background-color:var(--emw--color-gray-50, #f5f5f5);border-color:var(--emw--color-gray-100, #e6e6e6);color:var(--emw--color-gray-150, #6f6f6f);cursor:not-allowed;transform:none;box-shadow:none}.OddsbomBullet .OddsbomBulletBtn__normal.OddsbomBulletBtn__disabled:hover{transform:none;box-shadow:none}";function Rt(t,e="GET",n=null,r={}){return new Promise(((i,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"},r);"GET"!==e&&"HEAD"!==e&&(s["X-Idempotency-Key"]=o);const l={method:e,headers:s,body:null};n&&"GET"!==e&&"HEAD"!==e?l.body=JSON.stringify(n):delete l.body,fetch(t,l).then((t=>{if(!t.ok)throw a(`HTTP error! Status: ${t.status}`),new Error(`HTTP error! Status: ${t.status}`);return t.json()})).then((t=>i(t))).catch((t=>a(t)))}))}function At(t){function e(t,n){return null==t||""===t||(0!==t||!n)&&(Array.isArray(t)?function(t){if(0===t.length)return!0;const n=t.length;let r=0;for(let i=0;i<n;i++){if(!e(t[i]))return!1;r++}return r===n}(t):"[object Object]"===Object.prototype.toString.call(t)?function(t){if(0===Object.keys(t).length)return!0;const n=Object.keys(t).length;let r=0;for(const n of Object.values(t)){if(!e(n))return!1;r++}return r===n}(t):!t)}const n={};Object.entries(t).forEach((([t,r])=>{e(r,!0)||(n[t]=r)}));const r=Object.entries(n).map((([t,e])=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`)).join("&");return r?`?${r}`:""}function Lt(t){if(0===t)return"0";if(!t)return"";const e=(t=t.toString()).split(".");return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),e.join(".")}const Pt=["ro","en","fr","ar","hr"],Ht={en:{weeks:["Su","Mo","Tu","We","Th","Fr","Sa"],bettingType:"Betting Type:",prizeAllocation:"Prize Allocation (Turnover: €{turnover})",prizes:"Prizes",numberOfWinners:"Number of Winners",prizeMoney:"Prize Money",noLatestResult:"No latest result.",loading:"Loading....",turnover:"Turnover:",winners:"winners,",prize:"Prize:"}},Wt=(t,e,n)=>{const r=e;let i=Ht[void 0!==r&&Pt.includes(r)?r:"en"][t];return n&&Object.keys(n).forEach((t=>{i=i.replace(`{${t}}`,n[t])})),i},Gt={Football:n("svg",{height:"18px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",class:"text-sm"},n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.063 19.072l-.81-.97-.117.083.385-2.43.136-.211 2.23-3.464.037-.057h1.075a9.964 9.964 0 01-2.936 7.049zM4.769 5.112l2.8.877-.072 3.246-2.427 2.95-1.561-.153L2.39 9.26a9.977 9.977 0 012.378-4.148zm7.745-3.086l-.72 1.645-3.798 1.404-2.395-.75A9.953 9.953 0 0112 2c.174 0 .343.017.514.026zm7.346 3.812l-1.128 1.29-3.402-.755-.033-.008-2.446-2.241.057.016.862-1.973a9.996 9.996 0 016.09 3.67zm-1.87 8.894l-3.385-.493-1.358-4.067 2.173-2.755 3.144.698 1.347 3.634-1.921 2.983zm-4.64 5.787l4.304-1.486.62.742a9.945 9.945 0 01-5.878 2.205l.954-1.461zm-6.314-2.84l3.91.873-.001.003 1.509 1.507-1.24 1.898a9.946 9.946 0 01-5.908-2.553l1.73-1.728zm1.16-7.72l4.168.725 1.302 3.9-2.552 2.98-3.97-.885-1.412-3.724L8.196 9.96zM2 12c0-.31.019-.615.047-.92l.485 1.203-.454.907A9.934 9.934 0 012 11.999zM12 1C5.934 1 1 5.935 1 12c0 6.067 4.935 11 11 11 6.066 0 11-4.933 11-11 0-6.065-4.934-11-11-11z",fill:"currentColor"}))},Ut=class{constructor(n){t(this,n),this.getGameDrawInfoEvent=e(this,"getGameDrawInfo",7),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.endpoint=void 0,this.gameId=void 0,this.curDate=void 0,this.showLoading=!0,this.hideWrapperEmpty=!1,this.isPassingData=!1,this.drawResults="",this.isEmpty=!0,this._curDate=void 0,this.drawResultsList=[],this.curDrawItem={},this.curTurnOver=0,this.isLoadingTurnover=!1,this.vendorGameId=void 0,this.gameName=void 0,this.isLoading=!1}handleClientStylingChange(t,e){t!=e&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&o(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&s(this.stylingContainer,`${this.mbSource}.Style`)}async handleDateChange(t,e){t!==e&&(await this.setCurItem(t),this.curDrawItem&&this.curDrawItem.drawId&&this.getTurnOver())}async handleDrawResultsChange(t,e){t!==e&&await this.setDrawResults()}async getTurnOver(){var t,e;try{this.isLoadingTurnover=!0;const n=await async function({endpoint:t,gameId:e,drawId:n}){try{return await Rt(`${t}/games/${e}/draws/${n}/saleStatistics`)}catch(t){return Promise.reject(t)}}({endpoint:this.endpoint,gameId:this.vendorGameId,drawId:this.curDrawItem.drawId});this.curTurnOver=null!==(e=null===(t=null==n?void 0:n.wagerSegment)||void 0===t?void 0:t.totalSalesCrossDraw)&&void 0!==e?e:0}catch(t){console.error(t)}finally{this.isLoadingTurnover=!1}}get formattedTurnover(){const t=this.curTurnOver;return null==t?"":`€${t?Lt(t):0}`}async setCurItem(t){var e;try{t&&(null===(e=this.drawResultsList)||void 0===e?void 0:e.length)?(this.curDrawItem=await function(t,e){var n,r,i;const a=e.find((e=>e.date===t));if(!a)return Promise.reject();const o=a.winningNumbers[0].winning_type,s={};a.winningNumbers.forEach((t=>{s[t.winning_type]=function(t){return t&&t.length>0?t.map((t=>null==t?void 0:t[0])):[[]]}(t.poolGameOutcomes)}));const l=s[o],d={};a.prizes.forEach((t=>{const e=t.winningType;d[e]?(d[e].push(t),d[e].sort(((t,e)=>{var n;return(null===(n=e.totalAmount)||void 0===n?void 0:n.value)-(null==t?void 0:t.totalAmount.value)}))):d[e]=[t]}));const c=(null===(n=Object.values(d))||void 0===n?void 0:n[0])||[],h=(null===(i=null===(r=c[0])||void 0===r?void 0:r.totalAmount)||void 0===i?void 0:i.currency)||"",{turnOver:u,winNumber:m,winTurnOver:g}=c.reduce(((t,e)=>{var n;const{turnOver:r,winNumber:i}=t;return{turnOver:0,winNumber:i+Number(null==e?void 0:e.players),winTurnOver:r+Number(null===(n=null==e?void 0:e.totalAmount)||void 0===n?void 0:n.value)}}),{turnOver:0,winNumber:0,winTurnOver:0});return Promise.resolve({date:t,formattedTurnOver:h+" "+Lt(u),winNumber:m,formattedWinTurnOver:h+" "+Lt(g),drawId:a.id,results:l})}(t,this.drawResultsList),this.isEmpty=!1):this.isEmpty=!0}catch(t){this.isEmpty=!0}}async setDrawResults(){try{this.drawResults&&(this.drawResultsList=JSON.parse(this.drawResults),await this.setCurItem(this.curDate))}catch(t){console.error(t)}}componentDidLoad(){this.stylingContainer&&(this.mbSource&&s(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&o(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}async getDrawData(){this.isPassingData?this.setDrawResults():this.fetchData()}async getGameInfo(){return async function({endpoint:t,gameId:e}){if(!t||!e)return;const n=await Rt(`${t}/games/${e}`,"GET",{});return{vendorGameId:null==n?void 0:n.type,gameName:n.name}}({endpoint:this.endpoint,gameId:this.gameId}).then((({vendorGameId:t,gameName:e})=>{this.vendorGameId=t,this.gameName=e}))}async componentWillLoad(){(async t=>{if(t)try{const n=await fetch(t);if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);const r=await n.json();e=r,Object.keys(e).forEach((t=>{for(let n in e[t])Ht[t][n]=e[t][n]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl),await Promise.all([this.getDrawData(),this.getGameInfo()]),this.curDrawItem&&this.curDrawItem.drawId&&this.getTurnOver()}async fetchData(){this.isLoading=!0;try{const t=await async function({endpoint:t,gameId:e}){if(!t||!e)return;const{items:n}=await Rt(`${t}/games/${e}/draws${At({status:"PAYABLE",limit:9999})}`);if(!n||0===n.length)return{};const r=n.filter((t=>t.winningNumbers.length>0)).sort(((t,e)=>null==t?void 0:t.date.localeCompare(null==e?void 0:e.date)));return{drawDatesOptions:r.map((t=>t.date)),drawResultsList:r}}({endpoint:this.endpoint,gameId:this.gameId});this.getGameDrawInfoEvent.emit({drawDatesOptions:t.drawDatesOptions,gameId:this.gameId}),this.drawResultsList=t.drawResultsList,this._curDate=t.drawDatesOptions[function(t){const e=new Date;let n=0,r=1/0;return t.forEach(((t,i)=>{const a=new Date(t),o=Math.abs(M(e,a));o<r&&(r=o,n=i)})),n}(t.drawDatesOptions)],await this.setCurItem(this._curDate)}catch(t){this.getGameDrawInfoEvent.emit({drawDatesOptions:[],gameId:this.gameId})}finally{this.isLoading=!1}}renderLoading(){return n("div",{class:"loading-wrap"},n("section",{class:"dots-container"},n("div",{class:"dot"}),n("div",{class:"dot"}),n("div",{class:"dot"}),n("div",{class:"dot"}),n("div",{class:"dot"})))}renderEmpty(){return null}renderMainContent(){var t,e,r,i,a,o;return!this.curDate&&!this._curDate||this.isEmpty?this.renderEmpty():n("div",{class:"lottery-tipping-latest-result"},n("div",{class:"header-section match-info-section"},n("div",{class:"match-details"},n("span",{class:"title-icon"},Gt.Football),n("span",{class:"title-text"},this.gameName," ",this.isLoadingTurnover?n("div",{class:"loading-turnOver"},n("ui-skeleton",{structure:"rectangle",width:"100px",height:"16px"})):n("span",{class:"title-text__extra"},"(",Wt("turnover",this.language)+" "+this.formattedTurnover||0,")"))),n("div",{class:"prize-details"},n("span",{class:"winners-count"},((null===(t=this.curDrawItem)||void 0===t?void 0:t.winNumber)||0)+" "+Wt("winners",this.language)),n("span",{class:"prize-amount"},Wt("prize",this.language)+" "+((null===(e=this.curDrawItem)||void 0===e?void 0:e.formattedWinTurnOver)||0)))),!(!(null===(r=this.curDrawItem)||void 0===r?void 0:r.drawId)&&!((null===(i=this.curDrawItem)||void 0===i?void 0:i.results)||[]).length)&&n("lottery-oddsbom-ticket-result",{language:this.language,"mb-source":this.mbSource,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"translation-url":this.translationUrl,endpoint:this.endpoint,"game-id":this.vendorGameId,"draw-id":null===(a=this.curDrawItem)||void 0===a?void 0:a.drawId,"default-results":JSON.stringify((null===(o=this.curDrawItem)||void 0===o?void 0:o.results)||[]),"split-view":!1}))}render(){return n("div",{key:"08c7308433c4d55f4cec1540002a03596155fe98",ref:t=>this.stylingContainer=t,class:{"latest-result-wrapper":!0,"game-wrapper":!(this.hideWrapperEmpty&&this.isEmpty)}},this.isLoading&&this.showLoading?this.renderLoading():this.renderMainContent())}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],curDate:["handleDateChange"],drawResults:["handleDrawResultsChange"]}}};Ut.style=".lottery-tipping-latest-result{container-type:inline-size;background:var(--emw--color-background, #fff);color:var(--emw--color-typography, #000)}.lottery-tipping-latest-result .header-section{display:flex;justify-content:center;align-items:center}.lottery-tipping-latest-result .match-info-section{justify-content:space-between;padding:15px 0px;height:18px}.lottery-tipping-latest-result .match-details,.lottery-tipping-latest-result .prize-details{font-weight:600;display:flex;align-items:center}.lottery-tipping-latest-result .match-details .title-icon{margin-right:8px;display:flex}.lottery-tipping-latest-result .match-details .title-text__extra{margin-left:5px}.lottery-tipping-latest-result .prize-details .winners-count{margin-right:5px}.loading-wrap{margin:20px 0;display:flex;align-items:center;justify-content:center;min-height:100px}.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--color-gray-300, #333);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--color-gray-300, #333)}50%{transform:scale(1.2);background-color:var(--emw--color-gray-100, #e6e6e6)}100%{transform:scale(0.8);background-color:var(--emw--color-gray-150, #6f6f6f)}}.latest-result-wrapper{background:var(--emw--color-background, #fff)}.latest-result-wrapper.game-wrapper{border:1px solid var(--emw--color-background-tertiary, #ccc);border-radius:8px;box-shadow:0 2px 4px var(--emw--color-background-tertiary, #ccc);overflow-x:auto;transition:box-shadow 0.3s ease;padding:20px}.latest-result-wrapper.game-wrapper:hover{box-shadow:0 4px 12px var(--emw--color-background-tertiary, #ccc)}.loading-turnOver{display:inline-flex;align-items:center}";function Ft(t){function e(t,n){return null==t||""===t||(0!==t||!n)&&(Array.isArray(t)?function(t){if(0===t.length)return!0;const n=t.length;let r=0;for(let i=0;i<n;i++){if(!e(t[i]))return!1;r++}return r===n}(t):"[object Object]"===Object.prototype.toString.call(t)?function(t){if(0===Object.keys(t).length)return!0;const n=Object.keys(t).length;let r=0;for(const n of Object.values(t)){if(!e(n))return!1;r++}return r===n}(t):!t)}const n={};Object.entries(t).forEach((([t,r])=>{e(r,!0)||(n[t]=r)}));const r=Object.entries(n).map((([t,e])=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`)).join("&");return r?`?${r}`:""}async function Yt({endpoint:t,gameId:e}){if(!t||!e)return;const{items:n}=await function(t,e="GET",n=null,r={}){return new Promise(((i,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"},r);"GET"!==e&&"HEAD"!==e&&(s["X-Idempotency-Key"]=o);const l={method:e,headers:s,body:null};n&&"GET"!==e&&"HEAD"!==e?l.body=JSON.stringify(n):delete l.body,fetch(t,l).then((t=>{if(!t.ok)throw a(`HTTP error! Status: ${t.status}`),new Error(`HTTP error! Status: ${t.status}`);return t.json()})).then((t=>i(t))).catch((t=>a(t)))}))}(`${t}/games/${e}/draws${Ft({status:"PAYABLE",limit:9999})}`);if(!n||0===n.length)return{};const r=n.sort(((t,e)=>null==t?void 0:t.date.localeCompare(null==e?void 0:e.date)));return{drawDatesOptions:r.map((t=>t.date)),drawResultsList:r}}const qt=class{constructor(e){t(this,e),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.endpoint=void 0,this.sessionId=void 0,this.playerId="",this.gameIds=void 0,this.gameIdArr=[],this.drawDatesOptions=[],this.curDate=void 0,this.isLoading=!1,this.drawResultsObj={}}handleClientStylingChange(t,e){t!=e&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&o(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&s(this.stylingContainer,`${this.mbSource}.Style`)}handleGameIdStringChange(t,e){var n;t!=e&&(this.gameIdArr=(null===(n=this.gameIds)||void 0===n?void 0:n.split(","))||[],this.getData())}componentDidLoad(){var t;this.gameIdArr=(null===(t=this.gameIds)||void 0===t?void 0:t.split(","))||[],this.getData(),this.stylingContainer&&(this.mbSource&&s(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&o(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}getData(){this.isLoading=!0,function({endpoint:t,gameIds:e}){if(t&&e)return Promise.allSettled(e.map((e=>Yt({endpoint:t,gameId:e}).then((t=>({gameId:e,drawResultsList:t.drawResultsList,drawDatesOptions:t.drawDatesOptions}))).catch((t=>(console.error(`Failed to fetch data for gameId: ${e}`,t),{gameId:e,drawResultsList:[],drawDatesOptions:[]})))))).then((t=>t.reduce(((t,e)=>{if("fulfilled"===e.status){const{gameId:n,drawResultsList:r,drawDatesOptions:i}=e.value;return t[n]={drawResultsList:r,drawDatesOptions:i},t}}),{})))}({endpoint:this.endpoint,gameIds:this.gameIdArr}).then((t=>{this.drawResultsObj=t;const e=Object.values(t).map((t=>t.drawDatesOptions)).filter(Boolean).flat();this.drawDatesOptions=function(t=[],e=[]){const n=new Set;return e.forEach((e=>{n.has(e)||(n.add(e),t.push(e))})),t.length?[...(r=t,r.slice().sort(((t,e)=>t.localeCompare(e))))]:[];var r}([],e),this.curDate=this.drawDatesOptions[function(t){const e=new Date;let n=0,r=1/0;return t.forEach(((t,i)=>{const a=new Date(t),o=Math.abs(M(e,a));o<r&&(r=o,n=i)})),n}(this.drawDatesOptions)]})).finally((()=>{this.isLoading=!1}))}handleChange(t){this.curDate=this.drawDatesOptions[t.detail]}handleNext(){if(this.curDate){const t=this.drawDatesOptions.findIndex((t=>t===this.curDate));t<this.drawDatesOptions.length-1&&(this.curDate=this.drawDatesOptions[t+1])}}handlePrev(){if(this.curDate){const t=this.drawDatesOptions.findIndex((t=>t===this.curDate));t>0&&(this.curDate=this.drawDatesOptions[t-1])}}renderLoading(){return n("div",{class:"loading-wrap"},n("section",{class:"dots-container"},n("div",{class:"dot"}),n("div",{class:"dot"}),n("div",{class:"dot"}),n("div",{class:"dot"}),n("div",{class:"dot"})))}renderMainContent(){return n("div",null,this.curDate&&n("helper-date-navigator",{language:this.language,"mb-source":this.mbSource,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"translation-url":this.translationUrl,date:this.curDate,"default-highlight-dates":JSON.stringify(this.drawDatesOptions||[]),onNext:this.handleNext.bind(this),onPrev:this.handlePrev.bind(this),onChangeDate:this.handleChange.bind(this)}),n("div",{class:"games-container"},this.gameIdArr.map((t=>{var e,r;return n("lottery-oddsbom-latest-result",{endpoint:this.endpoint,"game-id":t,"cur-date":this.curDate,drawResults:JSON.stringify(null===(r=null===(e=this.drawResultsObj)||void 0===e?void 0:e[t])||void 0===r?void 0:r.drawResultsList),"is-passing-data":!0,"show-loading":!1,"hide-wrapper-empty":!0,language:this.language,"translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource,"session-id":this.sessionId,"player-id":this.playerId})}))))}render(){return n("div",{key:"e576645b260f4a713cce833aae814ce7edad137e",ref:t=>this.stylingContainer=t,class:"lottery-tipping-latest-result-group"},this.isLoading?this.renderLoading():this.renderMainContent())}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],gameIds:["handleGameIdStringChange"]}}};async function Jt({endpoint:t,gameId:e,drawId:n,results:r,splitView:i=!1}){const a=await async function({endpoint:t,gameId:e,drawId:n}){try{return await function(t,e="GET",n=null,r={}){return new Promise(((i,a)=>{const o=Object.assign({"Content-Type":"application/json"},r),s={method:e,headers:o,body:null};n&&"GET"!==e&&"HEAD"!==e?s.body=JSON.stringify(n):delete s.body,fetch(t,s).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=>i(t)),(t=>a(t)))}))}(`${t}/poolgames/${e}/draws/${n}/matchConfig`)||[]}catch(t){console.log(t)}}({endpoint:t,gameId:e,drawId:n});return i?a.reduce(((t,e,n)=>{const[i,a]=(o=e.eventName)?o.split("vs").map((t=>t.trim())):"";var o;const[s,l]=function(t){const e=new Set,n=new Set;for(const r of t){const[t,i]=r.split(":");e.has(t)||e.add(t),n.has(t)||n.add(i)}return[Array.from(e),Array.from(n)]}(r[n]||[]);return null==t||t.push({index:n+1,teamName:i,startTime:e.startTime,results:s}),null==t||t.push({index:n+1,teamName:a,startTime:e.startTime,results:l}),t}),[])||[]:a.map(((t,e)=>({index:e+1,eventName:t.eventName,startTime:t.startTime,results:r[e]||[]})))}qt.style=".lottery-tipping-latest-result-group{container-type:inline-size;padding:16px;background-color:var(--emw--color-background, #fff);height:100%}.games-container{display:flex;flex-direction:column;gap:24px;max-width:800px;margin:0 auto;margin-top:24px}.loading-wrap{margin:20px 0;display:flex;align-items:center;justify-content:center;min-height:100px}.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--color-gray-300, #333);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--color-gray-300, #333)}50%{transform:scale(1.2);background-color:var(--emw--color-gray-100, #e6e6e6)}100%{transform:scale(0.8);background-color:var(--emw--color-gray-150, #6f6f6f)}}";const Vt=["ro","en","fr","ar","hr"],Qt={en:{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:{ticketsHistory:"Istoric bilete",settled:"Decontat",purchased:"Achiziționat",canceled:"Anulat",noData:"Nu sunt date disponibile.",ticketId:"ID bilet:",ticketType:"Tip bilet:",ticketAmount:"Suma biletului:",lineDetail:"Detaliu linie:",seeDetails:"Vezi detalii",numberOfDraw:"Număr de extrageri:",ticketResult:"Rezultat bilet:",drawId:"ID extragere:",drawDate:"Data extragerii:",result:"Rezultat:",prize:"Premiu:",bettingType:"Tip de pariu:"},fr:{ticketsHistory:"Historique des billets",settled:"Réglé",purchased:"Acheté",canceled:"Annulé",noData:"Aucune donnée disponible.",ticketId:"ID du billet:",ticketType:"Type de billet:",ticketAmount:"Montant du billet:",lineDetail:"Détail de la ligne:",seeDetails:"Voir les détails",numberOfDraw:"Nombre de tirages:",ticketResult:"Résultat du billet:",drawId:"ID du tirage:",drawDate:"Date du tirage:",result:"Résultat:",prize:"Prix:",bettingType:"Type de pari:"},ar:{ticketsHistory:"سجل التذاكر",settled:"تمت التسوية",purchased:"تم شراؤها",canceled:"تم الإلغاء",noData:"لا توجد بيانات متاحة.",ticketId:"معرف التذكرة:",ticketType:"نوع التذكرة:",ticketAmount:"مبلغ التذكرة:",lineDetail:"تفاصيل الخط:",seeDetails:"انظر التفاصيل",numberOfDraw:"عدد السحوبات:",ticketResult:"نتيجة التذكرة:",drawId:"معرف السحب:",drawDate:"تاريخ السحب:",result:"النتيجة:",prize:"الجائزة:",bettingType:"نوع الرهان:"},hr:{ticketsHistory:"Povijest listića",settled:"Riješeno",purchased:"Kupljeno",canceled:"Otkazano",noData:"Nema dostupnih podataka.",ticketId:"ID listića:",ticketType:"Vrsta listića:",ticketAmount:"Iznos listića:",lineDetail:"Detalji linije:",seeDetails:"Vidi detalje",numberOfDraw:"Broj izvlačenja:",ticketResult:"Rezultat listića:",drawId:"ID izvlačenja:",drawDate:"Datum izvlačenja:",result:"Rezultat:",prize:"Nagrada:",bettingType:"Vrsta oklade:"}},Xt=class{constructor(e){t(this,e),this.latestRequestId=0,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.sessionId=void 0,this.endpoint="",this.gameId=void 0,this.drawId=void 0,this.defaultResults=void 0,this.splitView=!1,this.allResults=void 0,this.ticketBetDataSource=[],this.isLoading=!1}handleClientStylingChange(t,e){t!==e&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!==e&&o(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!==e&&s(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&s(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&o(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentWillLoad(){(async t=>{if(t)try{const n=await fetch(t);if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);const r=await n.json();e=r,Object.keys(e).forEach((t=>{for(let n in e[t])Qt[t][n]=e[t][n]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl),this.fetchMatchData()}async fetchMatchData(){const t=++this.latestRequestId;if(this.gameId&&this.drawId)try{this.defaultResults&&(this.allResults=JSON.parse(this.defaultResults)),this.isLoading=!0;const e=await Jt({endpoint:this.endpoint,gameId:this.gameId,drawId:this.drawId,results:this.allResults||[[]],splitView:this.splitView});t===this.latestRequestId&&(this.ticketBetDataSource=e)}finally{t===this.latestRequestId&&(this.isLoading=!1)}}get columns(){const t=(t,e)=>(({date:t,type:e="date",format:n})=>{try{const r=ft(t);if(isNaN(r.getTime()))throw new Error(`Invalid date: ${t}`);if(n)return pt(r,n);let i="dd/MM/yyyy";return"time"===e?i="dd/MM/yyyy HH:mm:ss":"week"===e&&(i="ccc dd/MM/yyyy HH:mm:ss"),pt(r,i)}catch(t){return console.error("Error formatting date:",t.message),""}})({date:e,format:"ccc dd/MM HH:mm"});return this.splitView?[{title:"No.",value:"index",width:5,rowSpan:2},{title:"Date",value:"startTime",width:25,rowSpan:2,nowrap:!0,render:t},{title:"Team",value:"teamName",width:30},{title:"Scores",value:"results",width:45,render:(t,e)=>n("div",{class:"flex gap-1"},e.map((t=>n("lottery-oddsbom-bullet",{text:t,"is-reading":!0,"is-selected":!0}))))}]:[{title:"Match",value:"eventName",width:50,render:(t,e)=>n("div",{class:"flex gap-1 eventNameContainer__item"},n("span",{class:"eventNameContainer__item--title"},e))},{title:"Date",value:"startTime",width:25,nowrap:!0,render:t},{title:"Match Result",value:"results",width:25,render:(t,e)=>n("div",null,null==e?void 0:e[0])}]}renderLoading(){return n("div",{class:"loading-wrap"},n("section",{class:"dots-container"},n("div",{class:"dot"}),n("div",{class:"dot"}),n("div",{class:"dot"}),n("div",{class:"dot"}),n("div",{class:"dot"})))}renderEmpty(){return n("div",{class:"LotteryTippingTicketBet__empty"},n("p",null,(()=>{const t=this.language;let e=Qt[void 0!==t&&Vt.includes(t)?t:"en"].noData;return e})()))}renderTable({columns:t,dataSource:e,hideHead:r=!1,grid:i=!0,bordered:a=!0}){const o={};return n("table",{class:{bordered:a,grid:i,"my-table-component":!0}},!r&&n("thead",null,n("tr",null,t.map((t=>{var e;return n("th",{key:t.value,style:{width:t.width+"%",textAlign:t.align}},"string"==typeof t.title?t.title:null===(e=t.title)||void 0===e?void 0:e.call(t))})))),n("tbody",null,e.map(((e,r)=>n("tr",{key:r},t.map((t=>{if(o[t.value]&&o[t.value]>0)return o[t.value]--,null;const i=t.rowSpan;return i&&i>1&&(o[t.value]=i-1),n("td",{key:t.value,rowSpan:i,style:{width:t.width+"%",textAlign:t.align},class:{"no-wrap":t.nowrap}},t.render?t.render(e,e[t.value],r):e[t.value])})))))))}renderContent(){return this.isLoading?this.renderLoading():this.ticketBetDataSource&&0!==this.ticketBetDataSource.length?n("div",{class:"flex align-center LotteryTippingTicketBet__main"},this.renderTable({columns:this.columns,dataSource:this.ticketBetDataSource||[],hideHead:!1,grid:!1,bordered:!1})):this.renderEmpty()}render(){return n("div",{key:"9932926b2958b13636d617cc20a0c77a76a36ebe",ref:t=>this.stylingContainer=t,class:"LotteryTippingTicketBet__container"},this.renderContent())}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],gameId:["fetchMatchData"],drawId:["fetchMatchData"],defaultResults:["fetchMatchData"]}}};Xt.style=".LotteryTippingTicketBet__container {\n display: block; /* Or inline-block, depending on desired layout flow */\n font-size: 14px;\n line-height: 1.5715;\n color: var(--emw--color-typography, #000);\n background: var(--emw--color-background, #fff);\n overflow: hidden;\n min-width: 300px;\n container-type: inline-size;\n}\n@container (max-width: 375px) {\n .LotteryTippingTicketBet__container {\n font-size: 12px;\n }\n}\n\n.my-table-component {\n width: 100%;\n border-collapse: collapse; /* Important for borders */\n text-align: left;\n border-radius: 0.1rem; /* Ant Design like subtle rounding */\n border-spacing: 0;\n}\n\n/* Header */\n.my-table-component th {\n background: var(--emw--color-background-secondary, #f5f5f5);\n color: var(--emw--color-typography, #000);\n font-weight: 600;\n padding: 0.4rem 0.5rem;\n transition: background 0.3s ease;\n}\n\n/* Cells */\n.my-table-component td {\n padding: 0.4rem 0.5rem;\n color: var(--emw--color-typography, #000);\n background: var(--emw--color-background, #fff);\n transition: background 0.3s;\n}\n@container (max-width: 400px) {\n .my-table-component td {\n padding: 0.3rem 0.3rem;\n }\n}\n\n.my-table-component.bordered th,\n.my-table-component.bordered td {\n border-bottom: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n/* Bordered style */\n.my-table-component.grid th,\n.my-table-component.grid td {\n border: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n.my-table-component.grid th {\n border-bottom-width: 1px; /* Ensure bottom border is consistent */\n}\n\n.my-table-component.grid {\n border: 1px solid var(--emw--color-gray-100, #e6e6e6); /* Outer border */\n border-right-width: 0;\n border-bottom-width: 0;\n}\n\n.my-table-component.grid th:last-child,\n.my-table-component.grid td:last-child {\n border-right: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n.my-table-component.grid tr:last-child td {\n border-bottom: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n/* Striped style */\n.my-table-component.striped tbody tr:nth-child(even) td {\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n}\n\n/* Hover (optional, but nice) */\n.my-table-component tbody tr:hover td {\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n}\n\n.flex {\n display: flex;\n}\n\n.justify-end {\n justify-content: flex-end;\n}\n\n.gap-1 {\n gap: 4px;\n}\n\n.justify-between {\n justify-content: space-between;\n}\n\n.align-center {\n align-items: center;\n}\n\n.gap-1 {\n gap: 0.5rem;\n}\n\n.match-info-item {\n display: flex;\n}\n\n.match-info-item-label {\n margin-right: 6px;\n}\n\n.info-icon:hover {\n cursor: pointer;\n}\n\n.LotteryTippingTicketBet__empty p {\n text-align: center;\n color: var(--emw--color-typography, #000);\n}\n\n.no-wrap {\n white-space: nowrap;\n overflow: hidden;\n}\n\n.eventNameContainer__item {\n line-height: 1rem;\n}\n.eventNameContainer__item--title {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 300px;\n}\n@container (max-width: 600px) {\n .eventNameContainer__item--title {\n max-width: 180px;\n }\n}\n@container (max-width: 500px) {\n .eventNameContainer__item--title {\n max-width: 150px;\n }\n}\n@container (max-width: 400px) {\n .eventNameContainer__item--title {\n max-width: 100px;\n }\n}\n@container (max-width: 330px) {\n .eventNameContainer__item--title {\n max-width: 70px;\n }\n}\n\n.LotteryTippingTicketBet__main {\n perspective: 800px;\n will-change: transform, opacity;\n backface-visibility: hidden;\n}\n\n@container (max-width: 520px) {\n .LotteryTippingTicketBet__main {\n flex-wrap: wrap;\n justify-content: center;\n }\n}\n.loading-wrap {\n margin: 20px 0;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 100px;\n}\n.loading-wrap .dots-container {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n}\n.loading-wrap .dot {\n height: 14px;\n width: 14px;\n margin-right: 14px;\n border-radius: 14px;\n background-color: var(--emw--color-gray-300, #333);\n animation: pulse 1.5s infinite ease-in-out;\n}\n.loading-wrap .dot:last-child {\n margin-right: 0;\n}\n.loading-wrap .dot:nth-child(1) {\n animation-delay: -0.3s;\n}\n.loading-wrap .dot:nth-child(2) {\n animation-delay: -0.1s;\n}\n.loading-wrap .dot:nth-child(3) {\n animation-delay: 0.1s;\n}\n@keyframes pulse {\n 0% {\n transform: scale(0.8);\n background-color: var(--emw--color-gray-300, #333);\n }\n 50% {\n transform: scale(1.2);\n background-color: var(--emw--color-gray-100, #e6e6e6);\n }\n 100% {\n transform: scale(0.8);\n background-color: var(--emw--color-gray-150, #6f6f6f);\n }\n}";const Zt=class{constructor(e){t(this,e),this.stylingValue={width:this.handleStylingProps(this.width),height:this.handleStylingProps(this.height),borderRadius:this.handleStylingProps(this.borderRadius),marginBottom:this.handleStylingProps(this.marginBottom),marginTop:this.handleStylingProps(this.marginTop),marginLeft:this.handleStylingProps(this.marginLeft),marginRight:this.handleStylingProps(this.marginRight),size:this.handleStylingProps(this.size)},this.structure=void 0,this.width="unset",this.height="unset",this.borderRadius="unset",this.marginBottom="unset",this.marginTop="unset",this.marginLeft="unset",this.marginRight="unset",this.animation=!0,this.rows=0,this.size="100%"}handleStructureChange(t,e){e!==t&&this.handleStructure(t)}handleStylingProps(t){switch(typeof t){case"number":return 0===t?0:`${t}px`;case"undefined":default:return"unset";case"string":return["auto","unset","none","inherit","initial"].includes(t)||t.endsWith("px")||t.endsWith("%")?t:"unset"}}handleStructure(t){switch(t){case"logo":return this.renderLogo();case"image":return this.renderImage();case"title":return this.renderTitle();case"text":return this.renderText();case"rectangle":return this.renderRectangle();case"circle":return this.renderCircle();default:return null}}renderLogo(){return n("div",{class:"SkeletonContainer"},n("div",{class:"SkeletonLogo "+(this.animation?"Skeleton":"")}))}renderImage(){return n("div",{class:"SkeletonImage "+(this.animation?"Skeleton":"")})}renderTitle(){return n("div",{class:"SkeletonContainer"},n("div",{class:"SkeletonTitle "+(this.animation?"Skeleton":"")}))}renderText(){return n("div",{class:"SkeletonContainer"},Array.from({length:this.rows>0?this.rows:1}).map(((t,e)=>n("div",{key:e,class:"SkeletonText "+(this.animation?"Skeleton":"")}))))}renderRectangle(){return n("div",{class:"SkeletonContainer"},n("div",{class:"SkeletonRectangle "+(this.animation?"Skeleton":"")}))}renderCircle(){return n("div",{class:"SkeletonContainer"},n("div",{class:"SkeletonCircle "+(this.animation?"Skeleton":"")}))}render(){let t="";switch(this.structure){case"logo":t=`\n :host {\n --emw-skeleton-logo-width: ${this.stylingValue.width};\n --emw-skeleton-logo-height: ${this.stylingValue.height};\n --emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"image":t=`\n :host {\n --emw-skeleton-image-width: ${this.stylingValue.width};\n --emw-skeleton-image-height: ${this.stylingValue.height};\n --emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"title":t=`\n :host {\n --emw-skeleton-title-width: ${this.stylingValue.width};\n --emw-skeleton-title-height: ${this.stylingValue.height};\n --emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"text":t=`\n :host {\n --emw-skeleton-text-width: ${this.stylingValue.width};\n --emw-skeleton-text-height: ${this.stylingValue.height};\n --emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"rectangle":t=`\n :host {\n --emw-skeleton-rectangle-width: ${this.stylingValue.width};\n --emw-skeleton-rectangle-height: ${this.stylingValue.height};\n --emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"circle":t=`\n :host {\n --emw-skeleton-circle-size: ${this.stylingValue.size};\n }\n `;break;default:t=""}return n(i,{key:"c2a2650acd416962a2bc4e1a7ee18bc6d8e2def8"},n("style",{key:"9bd7fc1f9e9ed9f17735a7b72fce6f09696f5e19"},t),this.handleStructure(this.structure))}static get watchers(){return{structure:["handleStructureChange"]}}};Zt.style=":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.SkeletonRectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.SkeletonCircle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.SkeletonText{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.SkeletonText:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.SkeletonTitle{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.SkeletonImage{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.SkeletonLogo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}";export{w as helper_date_navigator,Bt as lottery_oddsbom_bomb,zt as lottery_oddsbom_bullet,Ut as lottery_oddsbom_latest_result,qt as lottery_oddsbom_latest_result_group,Xt as lottery_oddsbom_ticket_result,Zt as ui_skeleton}
1
+ import{r as t,c as e,h as n,g as r,H as i}from"./index-068e610e.js";import{s as a,a as o,b as s}from"./lottery-oddsbom-entrance-ce9b7e21.js";export{L as lottery_oddsbom_entrance}from"./lottery-oddsbom-entrance-ce9b7e21.js";var l=function(){return l=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},l.apply(this,arguments)},d={primaryColor:"#333",secondaryColor:"#E6E6E6"};function c(t,e){if(void 0===e&&(e={}),"function"==typeof t.icon){var n=e.placeholders||d;return h(t.icon(n.primaryColor,n.secondaryColor),e)}return h(t.icon,e)}function h(t,e){var n="svg"===t.tag?l(l({},t.attrs),e.extraSVGAttrs||{}):t.attrs,r=Object.keys(n).reduce((function(t,e){var r=n[e],i="".concat(e,'="').concat(r,'"');return t.push(i),t}),[]),i=r.length?" "+r.join(" "):"",a=(t.children||[]).map((function(t){return h(t,e)})).join("");return a&&a.length?"<".concat(t.tag).concat(i,">").concat(a,"</").concat(t.tag,">"):"<".concat(t.tag).concat(i," />")}const u=["ro","en","fr","ar","hr"],m={en:{weeks:["Su","Mo","Tu","We","Th","Fr","Sa"]}},g=c({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},{extraSVGAttrs:{width:"16px",height:"16px",fill:"currentColor"}}),p=c({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},{extraSVGAttrs:{width:"16px",height:"16px",fill:"currentColor"}}),f=c({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"},{extraSVGAttrs:{width:"18px",height:"18px",fill:"var(--emw--color-primary-variant, #1367e7)"}}),w=class{constructor(n){t(this,n),this.changeDate=e(this,"changeDate",7),this.handleNext=e(this,"next",7),this.handlePrev=e(this,"prev",7),this.handleOutsideClick=t=>{if(!this.showCalendar)return;const e=t.composedPath?t.composedPath():[],n=e.includes(this.calendarRef),r=e.some((t=>{var e,n;return t instanceof HTMLElement&&((null===(e=t.getAttribute("part"))||void 0===e?void 0:e.includes("item"))||(null===(n=t.getAttribute("part"))||void 0===n?void 0:n.includes("overlay")))}));n||r||(this.showCalendar=!1)},this.onYearMinus=()=>{const t=this.yearOptions.map((t=>Number(t.value)));this.alterDate.year-1<Math.min(...t)||(this.alterDate.year--,this.loadRecords())},this.onYearPlus=()=>{const t=this.yearOptions.map((t=>Number(t.value)));this.alterDate.year+1>Math.max(...t)||(this.alterDate.year++,this.loadRecords())},this.onMonthMinus=()=>{0===this.alterDate.month?(this.onYearMinus(),this.alterDate.month=11):(this.alterDate.month--,this.loadRecords())},this.onMonthPlus=()=>{11===this.alterDate.month?(this.onYearPlus(),this.alterDate.month=0):(this.alterDate.month++,this.loadRecords())},this.onYearChange=t=>{this.alterDate.year=parseInt(t.detail.value),this.loadRecords()},this.onMonthChange=t=>{this.alterDate.month=parseInt(t.detail.value)-1,this.loadRecords()},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.date="",this.defaultHighlightDates=void 0,this.highlightDates=[],this.weeks=void 0,this.days=[],this.alterDate={year:0,month:0,day:0},this.curDate={year:0,month:0,day:0},this.recordInfo=[],this.showCalendar=!1}handleClientStylingChange(t,e){t!=e&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&o(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&s(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}handleGameIdStringChange(t,e){t!=e&&this.setHighlightDates()}componentWillLoad(){(async t=>{if(t)try{const n=await fetch(t);if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);const r=await n.json();e=r,Object.keys(e).forEach((t=>{for(let n in e[t])m[t][n]=e[t][n]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl),this.weeks=(()=>{const t=this.language;let e=m[void 0!==t&&u.includes(t)?t:"en"].weeks;return e})();const t=this.date?new Date(this.date):new Date;this.alterDate={year:t.getFullYear(),month:t.getMonth(),day:t.getDate()},this.curDate=Object.assign({},this.alterDate),this.loadRecords()}handleDateChange(){const t=this.date?new Date(this.date):new Date;this.alterDate={year:t.getFullYear(),month:t.getMonth(),day:t.getDate()},this.curDate=Object.assign({},this.alterDate),this.loadRecords()}setHighlightDates(){if(this.defaultHighlightDates)try{this.highlightDates=JSON.parse(this.defaultHighlightDates)}catch(t){this.highlightDates=[]}}componentDidLoad(){this.stylingContainer&&(this.mbSource&&s(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&o(this.stylingContainer,this.clientStylingUrl)),this.setHighlightDates(),document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe(),document.removeEventListener("click",this.handleOutsideClick)}get yearOptions(){return Array.from({length:101},((t,e)=>this.alterDate.year-50+e)).map((t=>({label:String(t),value:String(t)})))}get monthOptions(){return Array.from({length:12},((t,e)=>e+1)).map((t=>({label:String(t),value:String(t)})))}loadRecords(){const{year:t,month:e}=this.alterDate;this.setDays(t,e)}setDays(t,e){this.days=[];const n=new Date(t,e,1).getDay(),r=new Date(t,e,1-n);for(let t=0;t<42;t++){const e=new Date(r);e.setDate(r.getDate()+t);const n={date:e.getDate(),month:e.getMonth(),year:e.getFullYear()};this.days.push(n)}}getFullDayOfMonth(t,e){return new Date(t,e,0).getDate()}showFormatedDate(t){return`${t.day}/${t.month+1}/${t.year}`}handleSelectDate(t,e,n){this.alterDate.day=t,this.curDate=Object.assign({},this.alterDate),this.showCalendar=!1;const r=this.highlightDates.map((t=>{const e=new Date(t);return{year:e.getFullYear(),month:e.getMonth(),day:e.getDate()}})).findIndex((r=>{const{year:i,month:a,day:o}=r;return e===a&&n===i&&t===o}));r>-1&&this.changeDate.emit(r)}tellIsCurDay(t,e,n){return this.curDate.day===t&&this.curDate.month===e&&this.curDate.year===n}tellIsHighLight(t,e,n){return!(!this.highlightDates||!this.highlightDates.length)&&this.highlightDates.map((t=>{const e=new Date(t);return{year:e.getFullYear(),month:e.getMonth(),day:e.getDate()}})).some((r=>{const{year:i,month:a,day:o}=r;return e===a&&n===i&&t===o}))}renderInner(){const t=["calendar",this.showCalendar?"calendar-visible":"calendar-leave"];return n("div",{class:"lottery-tipping-calendar",ref:t=>this.calendarRef=t},n("div",{class:"calling-input",onClick:()=>{this.showCalendar=!0}},n("div",{class:"calling-input-text"},this.showFormatedDate(this.curDate)),n("div",{class:"calling-input-icon",innerHTML:f})),n("div",{class:t.join(" ")},n("div",{class:"calendar-header"},n("div",{class:"date-controller year-minus",onClick:this.onYearMinus},"<"),n("div",{class:"date-controller month-minus",onClick:this.onMonthMinus},"<"),n("div",{class:"date-picker"},n("div",{class:"date-picker-year"},n("vaadin-select",{items:this.yearOptions,value:this.alterDate.year,style:{"--vaadin-field-default-width":"90px"},"on-value-changed":this.onYearChange.bind(this)})),n("div",{class:"date-picker-delimiter"},"-"),n("div",{class:"date-picker-month"},n("vaadin-select",{items:this.monthOptions,value:this.alterDate.month+1,style:{"--vaadin-field-default-width":"64px"},"on-value-changed":this.onMonthChange.bind(this)})),n("div",{class:"date-picker-delimiter"},"-"),n("div",{class:"date-picker-day"},this.alterDate.day)),n("div",{class:"date-controller month-plus",onClick:this.onMonthPlus},">"),n("div",{class:"date-controller year-plus",onClick:this.onYearPlus},">")),n("div",{class:"calendar-content"},n("div",{class:"calendar-content-week"},this.weeks.map((t=>n("div",{class:"week-item"},t)))),n("div",{class:"calendar-content-day"},this.days.map((t=>n("div",{class:{"day-item":!0,isCurDay:this.tellIsCurDay(t.date,t.month,t.year),isHighLight:this.tellIsHighLight(t.date,t.month,t.year)},onClick:()=>this.handleSelectDate(t.date,t.month,t.year)},t.date)))))))}render(){return n("div",{key:"da34c4c86cac49411fb15ab8bceda89e379befc6",class:"date-selection"},n("div",{key:"29f06ef7a5df466018ae6561b54fcbdfbab9f23b",class:"date-selection-leftIcon",innerHTML:g,onClick:()=>this.handlePrev.emit()}),n("div",{key:"c6d75d873c2683752c37d4083c57761c4f7e523b",class:"date-selection-calendar"},this.renderInner()),n("div",{key:"8b16b3e0761dd4c877f169aea84d028aaf193b69",class:"date-selection-rightIcon",innerHTML:p,onClick:()=>this.handleNext.emit()}))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],defaultHighlightDates:["handleGameIdStringChange"],date:["handleDateChange"]}}};var v;function b(t){return b="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},b(t)}function y(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 x(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function k(t){x(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===b(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))}w.style='.lottery-tipping-calendar{position:relative;display:inline-block}.calendar-visible{opacity:1;visibility:visible}.calendar-leave{opacity:0;visibility:hidden}.calendar{position:absolute;top:40px;left:-50%;background:var(--emw--color-background, #fff);color:var(--emw--color-typography-secondary, #6f6f6f);padding:16px;width:fit-content;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));border-radius:var(--emw--border-radius-small, 4px);box-shadow:2px 3px 5px rgba(0, 0, 0, 0.1);cursor:pointer;transition:opacity 0.2s ease, visibility 0.2s ease;z-index:99}.calendar-header{display:flex;align-items:center}.calendar-header .date-picker{display:flex;margin:0 18px;align-items:center}.calendar-header .date-picker-delimiter{font-size:16px;margin:auto 4px}.calendar-header .month-plus,.calendar-header .month-minus,.calendar-header .year-plus,.calendar-header .year-minus{cursor:pointer;font-size:14px}.calendar-header .month-plus:hover,.calendar-header .month-minus:hover,.calendar-header .year-plus:hover,.calendar-header .year-minus:hover{color:var(--emw-pool-game-acition-active, #005fdb);transition:color 0.2s}.calendar-header .year-minus,.calendar-header .month-plus{margin-right:6px}.calendar-content{padding:3px;width:fit-content}.calendar-content .day-item{text-align:center;line-height:40px;cursor:not-allowed;position:relative;pointer-events:none}.calendar-content .day-item:hover{background-color:var(--emw--color-background-secondary, #f5f5f5)}.calendar-content .day-item.isCurDay{border-radius:4px;background:var(--emw--color-secondary, #fff3b9);background-size:50%;color:var(--emw--color-typography-secondary, #6f6f6f);font-weight:600;box-shadow:2px 2px 2px var(--emw-calender-curday-box-shadow, rgba(0, 0, 0, 0.09));cursor:pointer;pointer-events:all}.calendar-content .day-item.isHighLight{cursor:pointer;pointer-events:all}.calendar-content .day-item.isHighLight::after{content:"";position:absolute;left:calc(50% - 4px);bottom:0;width:6px;height:6px;border-radius:50%;background-color:var(--emw--color-error, red)}.calendar-content-week{display:grid;grid-template-columns:repeat(7, 40px);grid-template-rows:repeat(1, 36px);justify-items:center;align-items:center;border-bottom:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));color:var(--emw--color-typography-secondary, #6f6f6f)}.calendar-content-day{margin-top:4px;display:grid;grid-template-rows:repeat(6, 40px);grid-template-columns:repeat(7, 40px)}.calling-input{height:36px;width:160px;display:flex;align-items:center;justify-content:space-between;padding:0px 4px;background-color:var(--emw--color-background, #f5f5f5);border-radius:var(--emw--border-radius-small, 4px);border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));cursor:pointer}.calling-input .input{color:var(--emw--color-typography, #000)}.calling-input-text{color:var(--emw--color-typography, #000)}.date-selection{display:flex;align-items:center;justify-content:center;gap:24px}.date-selection-leftIcon,.date-selection-rightIcon{cursor:pointer;color:var(--emw--color-typography, #000)}',function(t){t.Football="Football",t.IceHockey="IceHockey",t.Mixed="Mixed"}(v||(v={}));var S={};function D(){return S}function C(t){x(1,arguments);var e=k(t);return e.setHours(0,0,0,0),e}var T=6e4,O=36e5;function I(t,e){x(2,arguments);var n=C(t),r=C(e);return n.getTime()===r.getTime()}function M(t,e){return x(2,arguments),k(t).getTime()-k(e).getTime()}function N(t){x(1,arguments);var e=k(t),n=e.getUTCDay(),r=(n<1?7:0)+n-1;return e.setUTCDate(e.getUTCDate()-r),e.setUTCHours(0,0,0,0),e}function _(t){x(1,arguments);var e=k(t),n=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=N(r),a=new Date(0);a.setUTCFullYear(n,0,4),a.setUTCHours(0,0,0,0);var o=N(a);return e.getTime()>=i.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function E(t,e){var n,r,i,a,o,s,l,d;x(1,arguments);var c=D(),h=y(null!==(n=null!==(r=null!==(i=null!==(a=null==e?void 0:e.weekStartsOn)&&void 0!==a?a:null==e||null===(o=e.locale)||void 0===o||null===(s=o.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==i?i:c.weekStartsOn)&&void 0!==r?r:null===(l=c.locale)||void 0===l||null===(d=l.options)||void 0===d?void 0:d.weekStartsOn)&&void 0!==n?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var u=k(t),m=u.getUTCDay(),g=(m<h?7:0)+m-h;return u.setUTCDate(u.getUTCDate()-g),u.setUTCHours(0,0,0,0),u}function j(t,e){var n,r,i,a,o,s,l,d;x(1,arguments);var c=k(t),h=c.getUTCFullYear(),u=D(),m=y(null!==(n=null!==(r=null!==(i=null!==(a=null==e?void 0:e.firstWeekContainsDate)&&void 0!==a?a:null==e||null===(o=e.locale)||void 0===o||null===(s=o.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==i?i:u.firstWeekContainsDate)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(d=l.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==n?n:1);if(!(m>=1&&m<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var g=new Date(0);g.setUTCFullYear(h+1,0,m),g.setUTCHours(0,0,0,0);var p=E(g,e),f=new Date(0);f.setUTCFullYear(h,0,m),f.setUTCHours(0,0,0,0);var w=E(f,e);return c.getTime()>=p.getTime()?h+1:c.getTime()>=w.getTime()?h:h-1}function B(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length<e;)r="0"+r;return n+r}const $=function(t,e){var n=t.getUTCFullYear(),r=n>0?n:1-n;return B("yy"===e?r%100:r,e.length)},z=function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):B(n+1,2)},R=function(t,e){return B(t.getUTCDate(),e.length)},A=function(t,e){return B(t.getUTCHours()%12||12,e.length)},P=function(t,e){return B(t.getUTCHours(),e.length)},H=function(t,e){return B(t.getUTCMinutes(),e.length)},W=function(t,e){return B(t.getUTCSeconds(),e.length)},G=function(t,e){var n=e.length,r=t.getUTCMilliseconds();return B(Math.floor(r*Math.pow(10,n-3)),e.length)};var U={G:function(t,e,n){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if("yo"===e){var r=t.getUTCFullYear();return n.ordinalNumber(r>0?r:1-r,{unit:"year"})}return $(t,e)},Y:function(t,e,n,r){var i=j(t,r),a=i>0?i:1-i;return"YY"===e?B(a%100,2):"Yo"===e?n.ordinalNumber(a,{unit:"year"}):B(a,e.length)},R:function(t,e){return B(_(t),e.length)},u:function(t,e){return B(t.getUTCFullYear(),e.length)},Q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return B(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return B(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){var r=t.getUTCMonth();switch(e){case"M":case"MM":return z(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){var r=t.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return B(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){var i=function(t,e){x(1,arguments);var n=k(t),r=E(n,e).getTime()-function(t,e){var n,r,i,a,o,s,l,d;x(1,arguments);var c=D(),h=y(null!==(n=null!==(r=null!==(i=null!==(a=null==e?void 0:e.firstWeekContainsDate)&&void 0!==a?a:null==e||null===(o=e.locale)||void 0===o||null===(s=o.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==i?i:c.firstWeekContainsDate)&&void 0!==r?r:null===(l=c.locale)||void 0===l||null===(d=l.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==n?n:1),u=j(t,e),m=new Date(0);return m.setUTCFullYear(u,0,h),m.setUTCHours(0,0,0,0),E(m,e)}(n,e).getTime();return Math.round(r/6048e5)+1}(t,r);return"wo"===e?n.ordinalNumber(i,{unit:"week"}):B(i,e.length)},I:function(t,e,n){var r=function(t){x(1,arguments);var e=k(t),n=N(e).getTime()-function(t){x(1,arguments);var e=_(t),n=new Date(0);return n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0),N(n)}(e).getTime();return Math.round(n/6048e5)+1}(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):B(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):R(t,e)},D:function(t,e,n){var r=function(t){x(1,arguments);var e=k(t),n=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var r=e.getTime();return Math.floor((n-r)/864e5)+1}(t);return"Do"===e?n.ordinalNumber(r,{unit:"dayOfYear"}):B(r,e.length)},E:function(t,e,n){var r=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){var i=t.getUTCDay(),a=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(a);case"ee":return B(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){var i=t.getUTCDay(),a=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(a);case"cc":return B(a,e.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(t,e,n){var r=t.getUTCDay(),i=0===r?7:r;switch(e){case"i":return String(i);case"ii":return B(i,e.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){var r,i=t.getUTCHours();switch(r=12===i?"noon":0===i?"midnight":i/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,n){var r,i=t.getUTCHours();switch(r=i>=17?"evening":i>=12?"afternoon":i>=4?"morning":"night",e){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){var r=t.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return A(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):P(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):B(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):B(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):H(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):W(t,e)},S:function(t,e){return G(t,e)},X:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();if(0===i)return"Z";switch(e){case"X":return Y(i);case"XXXX":case"XX":return q(i);default:return q(i,":")}},x:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return Y(i);case"xxxx":case"xx":return q(i);default:return q(i,":")}},O:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+F(i,":");default:return"GMT"+q(i,":")}},z:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+F(i,":");default:return"GMT"+q(i,":")}},t:function(t,e,n,r){return B(Math.floor((r._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,n,r){return B((r._originalDate||t).getTime(),e.length)}};function F(t,e){var n=t>0?"-":"+",r=Math.abs(t),i=Math.floor(r/60),a=r%60;if(0===a)return n+String(i);var o=e||"";return n+String(i)+o+B(a,2)}function Y(t,e){return t%60==0?(t>0?"-":"+")+B(Math.abs(t)/60,2):q(t,e)}function q(t,e){var n=e||"",r=t>0?"-":"+",i=Math.abs(t);return r+B(Math.floor(i/60),2)+n+B(i%60,2)}const J=U;var V=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"})}},Q=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"})}},X={p:Q,P:function(t,e){var n,r=t.match(/(P+)(p+)?/)||[],i=r[1],a=r[2];if(!a)return V(t,e);switch(i){case"P":n=e.dateTime({width:"short"});break;case"PP":n=e.dateTime({width:"medium"});break;case"PPP":n=e.dateTime({width:"long"});break;default:n=e.dateTime({width:"full"})}return n.replace("{{date}}",V(i,e)).replace("{{time}}",Q(a,e))}};const Z=X;var K=["D","DD"],tt=["YY","YYYY"];function et(t,e,n){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; 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(n,"`; 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(n,"`; 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(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var nt={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 rt(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}var it,at={date:rt({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:rt({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:rt({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},ot={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function st(t){return function(e,n){var r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&t.formattingValues){var i=t.defaultFormattingWidth||t.defaultWidth,a=null!=n&&n.width?String(n.width):i;r=t.formattingValues[a]||t.formattingValues[i]}else{var o=t.defaultWidth,s=null!=n&&n.width?String(n.width):t.defaultWidth;r=t.values[s]||t.values[o]}return r[t.argumentCallback?t.argumentCallback(e):e]}}function lt(t){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,i=e.match(r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth]);if(!i)return null;var a,o=i[0],s=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],l=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(l):l,{value:a=n.valueCallback?n.valueCallback(a):a,rest:e.slice(o.length)}}}const dt={code:"en-US",formatDistance:function(t,e,n){var r,i=nt[t];return r="string"==typeof i?i:1===e?i.one:i.other.replace("{{count}}",e.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:at,formatRelative:function(t){return ot[t]},localize:{ordinalNumber:function(t){var e=Number(t),n=e%100;if(n>20||n<10)switch(n%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:st({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:st({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:st({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:st({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:st({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:(it={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]:{},n=t.match(it.matchPattern);if(!n)return null;var r=n[0],i=t.match(it.parsePattern);if(!i)return null;var a=it.valueCallback?it.valueCallback(i[0]):i[0];return{value:a=e.valueCallback?e.valueCallback(a):a,rest:t.slice(r.length)}}),era:lt({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:lt({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:lt({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:lt({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:lt({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 ct=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ht=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ut=/^'([^]*?)'?$/,mt=/''/g,gt=/[a-zA-Z]/;function pt(t,e,n){var r,i,a,o,s,l,d,c,h,u,m,g,p,f,w,v,S,C;x(2,arguments);var T=String(e),O=D(),I=null!==(r=null!==(i=null==n?void 0:n.locale)&&void 0!==i?i:O.locale)&&void 0!==r?r:dt,M=y(null!==(a=null!==(o=null!==(s=null!==(l=null==n?void 0:n.firstWeekContainsDate)&&void 0!==l?l:null==n||null===(d=n.locale)||void 0===d||null===(c=d.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==s?s:O.firstWeekContainsDate)&&void 0!==o?o:null===(h=O.locale)||void 0===h||null===(u=h.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==a?a:1);if(!(M>=1&&M<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var N=y(null!==(m=null!==(g=null!==(p=null!==(f=null==n?void 0:n.weekStartsOn)&&void 0!==f?f:null==n||null===(w=n.locale)||void 0===w||null===(v=w.options)||void 0===v?void 0:v.weekStartsOn)&&void 0!==p?p:O.weekStartsOn)&&void 0!==g?g:null===(S=O.locale)||void 0===S||null===(C=S.options)||void 0===C?void 0:C.weekStartsOn)&&void 0!==m?m:0);if(!(N>=0&&N<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!I.localize)throw new RangeError("locale must contain localize property");if(!I.formatLong)throw new RangeError("locale must contain formatLong property");var _=k(t);if(!function(t){if(x(1,arguments),!function(t){return x(1,arguments),t instanceof Date||"object"===b(t)&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t)return!1;var e=k(t);return!isNaN(Number(e))}(_))throw new RangeError("Invalid time value");var E=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()}(_),j=function(t,e){return x(2,arguments),function(t,e){x(2,arguments);var n=k(t).getTime(),r=y(e);return new Date(n+r)}(t,-y(e))}(_,E),B={firstWeekContainsDate:M,weekStartsOn:N,locale:I,_originalDate:_};return T.match(ht).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,Z[e])(t,I.formatLong):t})).join("").match(ct).map((function(r){if("''"===r)return"'";var i,a,o=r[0];if("'"===o)return(a=(i=r).match(ut))?a[1].replace(mt,"'"):i;var s=J[o];if(s)return null!=n&&n.useAdditionalWeekYearTokens||-1===tt.indexOf(r)||et(r,e,String(t)),null!=n&&n.useAdditionalDayOfYearTokens||!(-1!==K.indexOf(r))||et(r,e,String(t)),s(j,r,I.localize,B);if(o.match(gt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+o+"`");return r})).join("")}function ft(t,e){var n;x(1,arguments);var r=y(null!==(n=null==e?void 0:e.additionalDigits)&&void 0!==n?n:2);if(2!==r&&1!==r&&0!==r)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!=typeof t&&"[object String]"!==Object.prototype.toString.call(t))return new Date(NaN);var i,a=function(t){var e,n={},r=t.split(wt.dateTimeDelimiter);if(r.length>2)return n;if(/:/.test(r[0])?e=r[0]:(n.date=r[0],e=r[1],wt.timeZoneDelimiter.test(n.date)&&(n.date=t.split(wt.timeZoneDelimiter)[0],e=t.substr(n.date.length,t.length))),e){var i=wt.timezone.exec(e);i?(n.time=e.replace(i[1],""),n.timezone=i[1]):n.time=e}return n}(t);if(a.date){var o=function(t,e){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=t.match(n);if(!r)return{year:NaN,restDateString:""};var i=r[1]?parseInt(r[1]):null,a=r[2]?parseInt(r[2]):null;return{year:null===a?i:100*a,restDateString:t.slice((r[1]||r[2]).length)}}(a.date,r);i=function(t,e){if(null===e)return new Date(NaN);var n=t.match(vt);if(!n)return new Date(NaN);var r=!!n[4],i=xt(n[1]),a=xt(n[2])-1,o=xt(n[3]),s=xt(n[4]),l=xt(n[5])-1;if(r)return function(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}(0,s,l)?function(t,e,n){var r=new Date(0);r.setUTCFullYear(t,0,4);var i=7*(e-1)+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+i),r}(e,s,l):new Date(NaN);var d=new Date(0);return function(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(St[e]||(Dt(t)?29:28))}(e,a,o)&&function(t,e){return e>=1&&e<=(Dt(t)?366:365)}(e,i)?(d.setUTCFullYear(e,a,Math.max(i,o)),d):new Date(NaN)}(o.restDateString,o.year)}if(!i||isNaN(i.getTime()))return new Date(NaN);var s,l=i.getTime(),d=0;if(a.time&&(d=function(t){var e=t.match(bt);if(!e)return NaN;var n=kt(e[1]),r=kt(e[2]),i=kt(e[3]);return function(t,e,n){return 24===t?0===e&&0===n:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}(n,r,i)?n*O+r*T+1e3*i:NaN}(a.time),isNaN(d)))return new Date(NaN);if(!a.timezone){var c=new Date(l+d),h=new Date(0);return h.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),h.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),h}return s=function(t){if("Z"===t)return 0;var e=t.match(yt);if(!e)return 0;var n="+"===e[1]?-1:1,r=parseInt(e[2]),i=e[3]&&parseInt(e[3])||0;return function(t,e){return e>=0&&e<=59}(0,i)?n*(r*O+i*T):NaN}(a.timezone),isNaN(s)?new Date(NaN):new Date(l+d+s)}var wt={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},vt=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,bt=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,yt=/^([+-])(\d{2})(?::?(\d{2}))?$/;function xt(t){return t?parseInt(t):1}function kt(t){return t&&parseFloat(t.replace(",","."))||0}var St=[31,null,31,30,31,30,31,31,30,31,30,31];function Dt(t){return t%400==0||t%4==0&&t%100!=0}function Ct(t,e="GET",n=null,r={}){return new Promise(((i,a)=>{const o=Object.assign({"Content-Type":"application/json"},r),s={method:e,headers:o,body:null};n&&"GET"!==e&&"HEAD"!==e?s.body=JSON.stringify(n):delete s.body,fetch(t,s).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=>i(t)),(t=>a(t)))}))}function Tt(t){if(!t)return"";const e=ft(t);if(isNaN(e.getTime()))return"";const n=pt(e,"HH:mm");return function(t){return x(1,arguments),I(t,Date.now())}(e)?`Today at ${n}`:function(t){return x(1,arguments),I(t,function(t,e){x(2,arguments);var n=k(t),r=y(e);return isNaN(r)?new Date(NaN):r?(n.setDate(n.getDate()+r),n):n}(Date.now(),1))}(e)?`Tomorrow at ${n}`:`${pt(e,"EEEE")} at ${n}`}function Ot(t,e){return null==t||""===t||(0!==t||!e)&&(Array.isArray(t)?function(t){if(0===t.length)return!0;const e=t.length;let n=0;for(let r=0;r<e;r++){if(!Ot(t[r]))return!1;n++}return n===e}(t):"[object Object]"===Object.prototype.toString.call(t)?function(t){if(0===Object.keys(t).length)return!0;const e=Object.keys(t).length;let n=0;for(const e of Object.values(t)){if(!Ot(e))return!1;n++}return n===e}(t):!t)}const It={name:"All",code:"All"};async function Mt({endpoint:t,groupId:e,params:n={}}){try{const r=await Ct(`${t}/groups/${e}/liveDraws${function(t){const e={};Object.entries(t).forEach((([t,n])=>{Ot(n,!0)||(e[t]=n)}));const n=Object.entries(e).map((([t,e])=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`)).join("&");return n?`?${n}`:""}(n)}`);return r}catch(t){return console.error("Failed to fetch game info:",t),{}}}function Nt(t){return null===t?"":`€${t?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):0}`}const _t=["ro","en","fr","ar","hr"],Et={en:{logout:"Log out",draws:"DRAWS",latestResults:"LATEST RESULTS",instruction:"INSTRUCTION",howToWin:"HOW TO WIN",selectDraws:"Select Draws from the following bars:",gameNotAvailable:"Sorry. The Game is not available now.",instructionContent:"Instruction content goes here.",turnover:"Turnover: "},ro:{logout:"Deconectare",draws:"EXTRAGERI",latestResults:"ULTIMELE REZULTATE",instruction:"INSTRUCȚIUNI",howToWin:"CUM SĂ CÂȘTIGI",selectDraws:"Selectați extrageri din barele următoare:",gameNotAvailable:"Ne pare rău. Jocul nu este disponibil acum.",instructionContent:"Conținutul instrucțiunilor se afișează aici."},fr:{logout:"Se déconnecter",draws:"TIRAGES",latestResults:"DERNIERS RÉSULTATS",instruction:"INSTRUCTION",howToWin:"COMMENT GAGNER",selectDraws:"Sélectionnez les tirages dans les barres suivantes:",gameNotAvailable:"Désolé. Le jeu nest pas disponible pour le moment.",instructionContent:"Le contenu des instructions va ici."},ar:{logout:"تسجيل الخروج",draws:"السحوبات",latestResults:"أحدث النتائج",instruction:"التعليمات",howToWin:"كيفية الفوز",selectDraws:"حدد السحوبات من الأشرطة التالية:",gameNotAvailable:"آسف. اللعبة غير متوفرة الآن.",instructionContent:"محتوى التعليمات يذهب هنا."},hr:{logout:"Odjava",draws:"IZVLAČENJA",latestResults:"NAJNOVIJI REZULTATI",instruction:"UPUTE",howToWin:"KAKO POBIJEDITI",selectDraws:"Odaberite izvlačenja sa sljedećih traka:",gameNotAvailable:"Žao nam je. Igra trenutno nije dostupna.",instructionContent:"Sadržaj uputa ide ovdje."}},jt={[v.Football]:n("svg",{height:"18px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",class:"text-sm"},n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.063 19.072l-.81-.97-.117.083.385-2.43.136-.211 2.23-3.464.037-.057h1.075a9.964 9.964 0 01-2.936 7.049zM4.769 5.112l2.8.877-.072 3.246-2.427 2.95-1.561-.153L2.39 9.26a9.977 9.977 0 012.378-4.148zm7.745-3.086l-.72 1.645-3.798 1.404-2.395-.75A9.953 9.953 0 0112 2c.174 0 .343.017.514.026zm7.346 3.812l-1.128 1.29-3.402-.755-.033-.008-2.446-2.241.057.016.862-1.973a9.996 9.996 0 016.09 3.67zm-1.87 8.894l-3.385-.493-1.358-4.067 2.173-2.755 3.144.698 1.347 3.634-1.921 2.983zm-4.64 5.787l4.304-1.486.62.742a9.945 9.945 0 01-5.878 2.205l.954-1.461zm-6.314-2.84l3.91.873-.001.003 1.509 1.507-1.24 1.898a9.946 9.946 0 01-5.908-2.553l1.73-1.728zm1.16-7.72l4.168.725 1.302 3.9-2.552 2.98-3.97-.885-1.412-3.724L8.196 9.96zM2 12c0-.31.019-.615.047-.92l.485 1.203-.454.907A9.934 9.934 0 012 11.999zM12 1C5.934 1 1 5.935 1 12c0 6.067 4.935 11 11 11 6.066 0 11-4.933 11-11 0-6.065-4.934-11-11-11z",fill:"currentColor"}))},Bt=class{constructor(n){t(this,n),this.handleBombItemClick=e(this,"handleBombItemClick",7),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.endpoint=void 0,this.groupId=void 0,this.activeBomb="All",this.bombList=[],this.gameList=[],this.liveDrawsInfoByGroupId={},this.isLoading=!1}handleClientStylingChange(t,e){t!=e&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&o(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&s(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&s(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&o(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}connectedCallback(){this.doFetchData()}async doFetchData(t={}){try{this.isLoading=!0,this.liveDrawsInfoByGroupId=await async function({endpoint:t,groupId:e,params:n}){try{const{sportTags:r=[],liveDraws:i=[]}=await Mt({endpoint:t,groupId:e,params:n});return{sportTags:r.map((t=>({name:t,code:t}))),liveDraws:i.map((t=>({title:t.gameName,subTitle:t.sportTag,icon:t.sportTag,date:Tt(t.drawCloseTime),turnover:Nt(null),matchList:t.matchs.map((t=>t.eventName)),drawId:t.drawId,gameId:t.gameId})))}}catch(t){return{sportTags:[],liveDraws:[]}}}({endpoint:this.endpoint,groupId:this.groupId,params:t}),this.gameList=this.liveDrawsInfoByGroupId.liveDraws,this.bombList=[It,...this.liveDrawsInfoByGroupId.sportTags],this.isLoading=!1,this.updateTurnoverForAll()}finally{this.isLoading=!1}}async updateTurnoverForAll(){const t=async function({endpoint:t,configs:e}){const n={turnover:Nt(null)},r=e.map((async({gameId:e,drawId:n})=>{var r;const i=await async function({endpoint:t,gameId:e,drawId:n}){try{return await Ct(`${t}/games/${e}/draws/${n}/saleStatistics`)}catch(t){return Promise.reject(t)}}({endpoint:t,gameId:e,drawId:n});return{turnover:Nt(null===(r=null==i?void 0:i.wagerSegment)||void 0===r?void 0:r.totalSalesCrossDraw)}}));return(await Promise.allSettled(r)).map((t=>"fulfilled"===t.status?t.value:n))}({endpoint:this.endpoint,configs:this.gameList.map((t=>({gameId:t.gameId,drawId:t.drawId})))});for(let e=0;e<this.gameList.length;e++)this.gameList[e].turnover=(await t)[e].turnover;this.gameList=[...this.gameList]}handleBombChange(t){this.activeBomb=t,t===It.code?this.doFetchData():this.doFetchData({sportTag:t})}renderLoading(){return n("div",{class:"loading-wrap"},n("section",{class:"dots-container"},n("div",{class:"dot"}),n("div",{class:"dot"}),n("div",{class:"dot"}),n("div",{class:"dot"}),n("div",{class:"dot"})))}renderEmpty(){const t=r("../static/empty-info.svg");return n("div",{class:"empty-draw-wrap"},n("div",{class:"empty-draw"},n("img",{src:t,class:"empty-draw-logo"}),n("div",{class:"empty-draw-content"},n("div",{class:"empty-draw-text"},"ⓘ Sorry. The game is not available now."))))}renderFilter(){return n("div",{class:"OddsbomEntranceController__section"},n("span",{class:"OddsbomEntranceController__label"},"Select Bomb:"),this.bombList.length?n("div",{class:"OddsbomEntranceController__segmented-control"},this.bombList.map((({name:t,code:e})=>n("button",{class:{OddsbomEntranceController__segment:!0,"OddsbomEntranceController__segment--active":this.activeBomb===e},onClick:this.handleBombChange.bind(this,e)},t)))):n("div",{class:"skeleton-content"},n("div",{class:"skeleton-item skeleton-animated"})))}renderMain(){return this.gameList.length?n("div",{class:"bomb-grid"},this.gameList.map((({title:t,subTitle:e,icon:r,date:i,turnover:a,matchList:o,drawId:s,gameId:l})=>n("div",{class:"bomb-card-wrapper"},n("div",{class:"bomb-card",onClick:()=>{this.handleBombItemClick.emit({drawId:s,gameId:l})}},n("div",{class:"card-header"},jt[r]&&n("div",{class:"card-icon football"},jt[r]),n("div",{class:"card-title"},n("h2",null,t),n("p",null,e)),n("div",{class:"card-jackpot"})),n("div",{class:"card-info"},n("span",{class:"card-tag"},i),n("span",{class:"card-tag"},(()=>{const t=this.language;return Et[void 0!==t&&_t.includes(t)?t:"en"].turnover})()+a)),n("div",{class:"card-matches"},n("ol",null,o.map((t=>n("li",null,t)))))))))):this.renderEmpty()}render(){return n("div",{key:"ae8252d8cb1374af9bb8189bcd9edac313c7bc6a",ref:t=>this.stylingContainer=t,class:"lottery-oddsbom-bomb-wrapper"},this.renderFilter(),n("div",{key:"3f673f335248057370e7e57076cc387a86dc4099",class:"bomb-grid-container"},this.isLoading?this.renderLoading():this.renderMain()))}static get assetsDirs(){return["../static"]}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};Bt.style="/* --- Component: Bomb Card Grid --- */\n.lottery-oddsbom-bomb-wrapper {\n background: var(--emw--color-background, #fff);\n color: var(--emw--color-typography, #000);\n height: 100%;\n}\n\n.bomb-grid-container {\n width: 100%;\n display: flex;\n justify-content: center;\n container-type: inline-size;\n container-name: bomb-grid;\n background: var(--emw--color-background, #fff);\n color: var(--emw--color-typography, #000);\n /* --- Component: Bomb Card --- */\n}\n.bomb-grid-container .bomb-grid {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 0.75rem;\n place-items: center;\n}\n.bomb-grid-container .bomb-card-wrapper {\n width: 100%;\n max-width: 30rem;\n height: 100%;\n box-sizing: border-box;\n border-radius: 8px;\n padding: 1rem;\n border: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n.bomb-grid-container .bomb-card {\n height: 100%;\n min-width: 24rem;\n transition: transform 0.3s;\n}\n.bomb-grid-container .bomb-card:hover {\n transform: scale(1.02);\n cursor: pointer;\n}\n.bomb-grid-container .card-header {\n display: flex;\n align-items: center;\n gap: 1rem;\n margin-bottom: 0.8rem;\n}\n.bomb-grid-container .card-icon {\n width: 48px;\n height: 48px;\n border-radius: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.bomb-grid-container .card-icon svg {\n width: 28px;\n height: 28px;\n}\n.bomb-grid-container .card-title {\n flex-grow: 1;\n word-break: break-all;\n}\n.bomb-grid-container .card-title h2 {\n margin: 0;\n font-size: 1.25rem;\n font-weight: 700;\n word-wrap: break-word;\n}\n.bomb-grid-container .card-title p {\n margin: 0;\n color: var(--emw--color-typography-secondary, #333);\n font-size: 0.9rem;\n word-wrap: break-word;\n}\n.bomb-grid-container .card-info {\n display: flex;\n gap: 0.75rem;\n margin-bottom: 0.8rem;\n flex-wrap: wrap;\n}\n.bomb-grid-container .card-tag {\n background-color: var(--emw--color-tertiary, #e3f2fd);\n padding: 0.3rem 0.75rem;\n border-radius: 4px;\n font-size: 0.85rem;\n font-weight: 500;\n max-width: 120px;\n}\n.bomb-grid-container .card-matches {\n max-height: 6.8rem;\n overflow-y: auto;\n}\n.bomb-grid-container .card-matches ol {\n margin: 0;\n padding-left: 1.25rem;\n font-size: 0.85rem;\n line-height: 1.6;\n}\n.bomb-grid-container .card-matches li {\n padding-left: 0.2rem;\n word-wrap: break-word;\n}\n\n/* --- CONTAINER QUERIES FOR RESPONSIVENESS --- */\n@container bomb-grid (max-width: 768px) {\n .bomb-grid-container .bomb-grid {\n /* On smaller containers, switch to a single column */\n grid-template-columns: 1fr;\n }\n .bomb-card-wrapper .bomb-card {\n min-width: 200px;\n }\n}\n/* --- Component: Filter Controls --- */\n.OddsbomEntranceController__section {\n margin: 1.5rem 0;\n display: flex;\n gap: 12px;\n color: var(--emw--color-typography, #000);\n container-type: inline-size;\n container-name: controller;\n justify-content: center;\n}\n.OddsbomEntranceController__label {\n font-weight: 500;\n white-space: nowrap;\n width: 6rem;\n line-height: 2.2rem;\n}\n.OddsbomEntranceController__segmented-control {\n display: inline-flex;\n gap: 1rem;\n flex-wrap: wrap;\n}\n.OddsbomEntranceController__segment {\n height: 2.2rem;\n border: none;\n padding: 0.3rem 0.8rem;\n cursor: pointer;\n font-weight: 500;\n border-radius: 2rem;\n outline: none;\n white-space: nowrap;\n background-color: var(--emw--color-background, #ffffff);\n color: var(--emw--color-typography, #000);\n}\n.OddsbomEntranceController__segment--active {\n background-color: var(--emw--color-primary-variant, #1367e7);\n color: var(--emw--color-typography-reverse, #fff);\n font-weight: 600;\n}\n.OddsbomEntranceController__segment--disabled:hover {\n cursor: not-allowed !important;\n}\n.OddsbomEntranceController__segment:not(.OddsbomEntranceController__segment--active):hover {\n background-color: var(--emw--color-background-tertiary, #ccc);\n}\n\n.skeleton-content {\n display: flex;\n flex-direction: column;\n gap: 29px;\n align-items: center;\n}\n\n.skeleton-item {\n background: var(--emw--color-background-secondary, #f5f5f5);\n border-radius: 4px;\n height: 40px;\n width: 200px;\n}\n\n.skeleton-animated {\n animation: skeleton-shimmer 1.5s infinite linear;\n background: linear-gradient(90deg, var(--emw--color-background-secondary, #f5f5f5) 25%, var(--emw--color-background-tertiary, #ccc) 37%, var(--emw--color-background-secondary, #f5f5f5) 63%);\n background-size: 200% 100%;\n}\n\n@keyframes skeleton-shimmer {\n to {\n background-position: 100% 0;\n }\n}\n.loading-icon.scale {\n animation: scale 1s infinite ease-in-out;\n}\n\n@keyframes scale {\n 0%, 100% {\n transform: scale(1);\n }\n 50% {\n transform: scale(1.2);\n }\n}\n@container controller (max-width: 500px) {\n .OddsbomEntranceController__segmented-control {\n gap: 0rem;\n }\n .OddsbomEntranceController__segment {\n padding: 0.2rem 0.6rem;\n }\n .OddsbomEntranceController__label,\n .OddsbomEntranceController____segment {\n line-height: 1.8rem;\n }\n}\n.loading-wrap {\n margin: 20px 0;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 100px;\n}\n.loading-wrap .dots-container {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n}\n.loading-wrap .dot {\n height: 14px;\n width: 14px;\n margin-right: 14px;\n border-radius: 14px;\n background-color: var(--emw--color-gray-300, #333);\n animation: pulse 1.5s infinite ease-in-out;\n}\n.loading-wrap .dot:last-child {\n margin-right: 0;\n}\n.loading-wrap .dot:nth-child(1) {\n animation-delay: -0.3s;\n}\n.loading-wrap .dot:nth-child(2) {\n animation-delay: -0.1s;\n}\n.loading-wrap .dot:nth-child(3) {\n animation-delay: 0.1s;\n}\n@keyframes pulse {\n 0% {\n transform: scale(0.8);\n background-color: var(--emw--color-gray-300, #333);\n }\n 50% {\n transform: scale(1.2);\n background-color: var(--emw--color-gray-100, #e6e6e6);\n }\n 100% {\n transform: scale(0.8);\n background-color: var(--emw--color-gray-150, #6f6f6f);\n }\n}\n\n.empty-draw-wrap {\n padding-top: 100px;\n}\n.empty-draw-wrap .empty-draw {\n width: 240px;\n height: 160px;\n padding: 18px 12px 12px 12px;\n background: var(--emw--color-secondary-variant, #e3f2fd);\n position: relative;\n margin: 0 auto;\n display: flex;\n justify-content: center;\n align-items: center;\n text-align: center;\n border-radius: 12px;\n}\n.empty-draw-wrap .empty-draw img {\n position: absolute;\n top: -64%;\n left: 50%;\n transform: translateX(-50%);\n width: 200px;\n}\n.empty-draw-wrap .empty-draw-content {\n display: flex;\n gap: 4px;\n}\n.empty-draw-wrap .empty-draw-text {\n font-size: 14px;\n font-weight: bold;\n line-height: 20px;\n}";const $t=c({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 256H736v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zm-200 0H360v-72h304v72z"}}]},name:"delete",theme:"filled"},{extraSVGAttrs:{width:"18px",height:"18px",fill:""}}),zt=class{constructor(n){t(this,n),this.oddsbomBulletToggleEvent=e(this,"oddsbomBulletToggle",7),this.oddsbomBulletDeleteEvent=e(this,"oddsbomBulletDelete",7),this.oddsbomBulletAddedByMoreBtnDeleteEvent=e(this,"oddsbomBulletAddedByMoreBtnDelete",7),this.oddsbomBulletCallDialogEvent=e(this,"oddsbomBulletCallDialog",7),this.isSelected=void 0,this.disabled=void 0,this.text=void 0,this.idx=void 0,this.isReading=void 0,this.isDeleteByIcon=void 0,this.isCallDialogBtn=void 0,this.isAddedByMoreBtn=void 0,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0}handleClientStylingChange(t,e){t!=e&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&o(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&s(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&s(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&o(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleClick(){this.isCallDialogBtn?this.oddsbomBulletCallDialogEvent.emit():this.isDeleteByIcon?this.isAddedByMoreBtn?this.oddsbomBulletAddedByMoreBtnDeleteEvent.emit(this.text):this.oddsbomBulletDeleteEvent.emit(this.idx):this.disabled||this.oddsbomBulletToggleEvent.emit(this.idx)}render(){return n("div",{key:"e21cf46108e35dcbf7d65e8c6a5f12f5d5ae49cb",class:"OddsbomBullet",ref:t=>this.stylingContainer=t},n("button",{key:"4edf5cd481d8283bd71f6806b6f93949e1308095",class:{OddsbomBulletBtn__normal:!0,OddsbomBulletBtn__selected:this.isSelected,OddsbomBulletBtn__disabled:this.disabled,isDeleteByIcon:this.isDeleteByIcon,isCallDialogBtn:this.isCallDialogBtn||this.isReading},onClick:this.handleClick.bind(this),disabled:this.disabled},n("span",{key:"fa1aed0293dc004808e6992c069d6992317b0788",class:"OddsbomBullet--deleteIcon",innerHTML:$t}),n("span",{key:"53ed96f2c2b833d21488049f987b6131718d563e",class:"OddsbomBullet--text"},this.text)))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};zt.style=".OddsbomBullet .OddsbomBulletBtn__normal{width:32px;height:32px;display:flex;align-items:center;justify-content:center;background:var(--emw--color-background, #fff);border:2px solid var(--emw--color-primary, #0d196e);border-radius:var(--emw--border-radius-medium, 8px);color:var(--emw--color-typography, #000);font-weight:bold;cursor:pointer;transition:transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.2s ease, background-color 0.3s;user-select:none;position:relative}.OddsbomBullet .OddsbomBulletBtn__normal:hover{transform:scale(1.15) rotate(-5deg);box-shadow:var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15)) 7px 6px 6px}.OddsbomBullet .OddsbomBulletBtn__normal .OddsbomBullet--deleteIcon{display:none}.OddsbomBullet .OddsbomBulletBtn__normal.isDeleteByIcon:hover{background-color:var(--emw--color-background, #fff)}.OddsbomBullet .OddsbomBulletBtn__normal.isDeleteByIcon:hover .OddsbomBullet--text{display:none}.OddsbomBullet .OddsbomBulletBtn__normal.isDeleteByIcon:hover .OddsbomBullet--deleteIcon{display:inline;fill:var(--emw--color-typography, #000)}.OddsbomBullet .OddsbomBulletBtn__normal.isCallDialogBtn:hover{transform:none;box-shadow:none}.OddsbomBullet .OddsbomBulletBtn__normal.OddsbomBulletBtn__selected{background-color:var(--emw--color-primary, #0d196e);color:var(--emw--color-typography-inverse, #fff);transform:scale(1.05);box-shadow:0 5px 10px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15))}.OddsbomBullet .OddsbomBulletBtn__normal.OddsbomBulletBtn__disabled{background-color:var(--emw--color-gray-50, #f5f5f5);border-color:var(--emw--color-gray-100, #e6e6e6);color:var(--emw--color-gray-150, #6f6f6f);cursor:not-allowed;transform:none;box-shadow:none}.OddsbomBullet .OddsbomBulletBtn__normal.OddsbomBulletBtn__disabled:hover{transform:none;box-shadow:none}";function Rt(t,e="GET",n=null,r={}){return new Promise(((i,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"},r);"GET"!==e&&"HEAD"!==e&&(s["X-Idempotency-Key"]=o);const l={method:e,headers:s,body:null};n&&"GET"!==e&&"HEAD"!==e?l.body=JSON.stringify(n):delete l.body,fetch(t,l).then((t=>{if(!t.ok)throw a(`HTTP error! Status: ${t.status}`),new Error(`HTTP error! Status: ${t.status}`);return t.json()})).then((t=>i(t))).catch((t=>a(t)))}))}function At(t){function e(t,n){return null==t||""===t||(0!==t||!n)&&(Array.isArray(t)?function(t){if(0===t.length)return!0;const n=t.length;let r=0;for(let i=0;i<n;i++){if(!e(t[i]))return!1;r++}return r===n}(t):"[object Object]"===Object.prototype.toString.call(t)?function(t){if(0===Object.keys(t).length)return!0;const n=Object.keys(t).length;let r=0;for(const n of Object.values(t)){if(!e(n))return!1;r++}return r===n}(t):!t)}const n={};Object.entries(t).forEach((([t,r])=>{e(r,!0)||(n[t]=r)}));const r=Object.entries(n).map((([t,e])=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`)).join("&");return r?`?${r}`:""}function Lt(t){if(0===t)return"0";if(!t)return"";const e=(t=t.toString()).split(".");return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),e.join(".")}const Pt=["ro","en","fr","ar","hr"],Ht={en:{weeks:["Su","Mo","Tu","We","Th","Fr","Sa"],bettingType:"Betting Type:",prizeAllocation:"Prize Allocation (Turnover: €{turnover})",prizes:"Prizes",numberOfWinners:"Number of Winners",prizeMoney:"Prize Money",noLatestResult:"No latest result.",loading:"Loading....",turnover:"Turnover:",winners:"winners,",prize:"Prize:"}},Wt=(t,e,n)=>{const r=e;let i=Ht[void 0!==r&&Pt.includes(r)?r:"en"][t];return n&&Object.keys(n).forEach((t=>{i=i.replace(`{${t}}`,n[t])})),i},Gt={Football:n("svg",{height:"18px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",class:"text-sm"},n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.063 19.072l-.81-.97-.117.083.385-2.43.136-.211 2.23-3.464.037-.057h1.075a9.964 9.964 0 01-2.936 7.049zM4.769 5.112l2.8.877-.072 3.246-2.427 2.95-1.561-.153L2.39 9.26a9.977 9.977 0 012.378-4.148zm7.745-3.086l-.72 1.645-3.798 1.404-2.395-.75A9.953 9.953 0 0112 2c.174 0 .343.017.514.026zm7.346 3.812l-1.128 1.29-3.402-.755-.033-.008-2.446-2.241.057.016.862-1.973a9.996 9.996 0 016.09 3.67zm-1.87 8.894l-3.385-.493-1.358-4.067 2.173-2.755 3.144.698 1.347 3.634-1.921 2.983zm-4.64 5.787l4.304-1.486.62.742a9.945 9.945 0 01-5.878 2.205l.954-1.461zm-6.314-2.84l3.91.873-.001.003 1.509 1.507-1.24 1.898a9.946 9.946 0 01-5.908-2.553l1.73-1.728zm1.16-7.72l4.168.725 1.302 3.9-2.552 2.98-3.97-.885-1.412-3.724L8.196 9.96zM2 12c0-.31.019-.615.047-.92l.485 1.203-.454.907A9.934 9.934 0 012 11.999zM12 1C5.934 1 1 5.935 1 12c0 6.067 4.935 11 11 11 6.066 0 11-4.933 11-11 0-6.065-4.934-11-11-11z",fill:"currentColor"}))},Ut=class{constructor(n){t(this,n),this.getGameDrawInfoEvent=e(this,"getGameDrawInfo",7),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.endpoint=void 0,this.gameId=void 0,this.curDate=void 0,this.showLoading=!0,this.hideWrapperEmpty=!1,this.isPassingData=!1,this.drawResults="",this.isEmpty=!0,this._curDate=void 0,this.drawResultsList=[],this.curDrawItem={},this.curTurnOver=0,this.isLoadingTurnover=!1,this.vendorGameId=void 0,this.gameName=void 0,this.isLoading=!1}handleClientStylingChange(t,e){t!=e&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&o(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&s(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}async handleDateChange(t,e){t!==e&&(await this.setCurItem(t),this.curDrawItem&&this.curDrawItem.drawId&&this.getTurnOver())}async handleDrawResultsChange(t,e){t!==e&&await this.setDrawResults()}async getTurnOver(){var t,e;try{this.isLoadingTurnover=!0;const n=await async function({endpoint:t,gameId:e,drawId:n}){try{return await Rt(`${t}/games/${e}/draws/${n}/saleStatistics`)}catch(t){return Promise.reject(t)}}({endpoint:this.endpoint,gameId:this.vendorGameId,drawId:this.curDrawItem.drawId});this.curTurnOver=null!==(e=null===(t=null==n?void 0:n.wagerSegment)||void 0===t?void 0:t.totalSalesCrossDraw)&&void 0!==e?e:0}catch(t){console.error(t)}finally{this.isLoadingTurnover=!1}}get formattedTurnover(){const t=this.curTurnOver;return null==t?"":`€${t?Lt(t):0}`}async setCurItem(t){var e;try{t&&(null===(e=this.drawResultsList)||void 0===e?void 0:e.length)?(this.curDrawItem=await function(t,e){var n,r,i;const a=e.find((e=>e.date===t));if(!a)return Promise.reject();const o=a.winningNumbers[0].winning_type,s={};a.winningNumbers.forEach((t=>{s[t.winning_type]=function(t){return t&&t.length>0?t.map((t=>null==t?void 0:t[0])):[[]]}(t.poolGameOutcomes)}));const l=s[o],d={};a.prizes.forEach((t=>{const e=t.winningType;d[e]?(d[e].push(t),d[e].sort(((t,e)=>{var n;return(null===(n=e.totalAmount)||void 0===n?void 0:n.value)-(null==t?void 0:t.totalAmount.value)}))):d[e]=[t]}));const c=(null===(n=Object.values(d))||void 0===n?void 0:n[0])||[],h=(null===(i=null===(r=c[0])||void 0===r?void 0:r.totalAmount)||void 0===i?void 0:i.currency)||"",{turnOver:u,winNumber:m,winTurnOver:g}=c.reduce(((t,e)=>{var n;const{turnOver:r,winNumber:i}=t;return{turnOver:0,winNumber:i+Number(null==e?void 0:e.players),winTurnOver:r+Number(null===(n=null==e?void 0:e.totalAmount)||void 0===n?void 0:n.value)}}),{turnOver:0,winNumber:0,winTurnOver:0});return Promise.resolve({date:t,formattedTurnOver:h+" "+Lt(u),winNumber:m,formattedWinTurnOver:h+" "+Lt(g),drawId:a.id,results:l})}(t,this.drawResultsList),this.isEmpty=!1):this.isEmpty=!0}catch(t){this.isEmpty=!0}}async setDrawResults(){try{this.drawResults&&(this.drawResultsList=JSON.parse(this.drawResults),await this.setCurItem(this.curDate))}catch(t){console.error(t)}}componentDidLoad(){this.stylingContainer&&(this.mbSource&&s(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&o(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}async getDrawData(){this.isPassingData?this.setDrawResults():this.fetchData()}async getGameInfo(){return async function({endpoint:t,gameId:e}){if(!t||!e)return;const n=await Rt(`${t}/games/${e}`,"GET",{});return{vendorGameId:null==n?void 0:n.type,gameName:n.name}}({endpoint:this.endpoint,gameId:this.gameId}).then((({vendorGameId:t,gameName:e})=>{this.vendorGameId=t,this.gameName=e}))}async componentWillLoad(){(async t=>{if(t)try{const n=await fetch(t);if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);const r=await n.json();e=r,Object.keys(e).forEach((t=>{for(let n in e[t])Ht[t][n]=e[t][n]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl),await Promise.all([this.getDrawData(),this.getGameInfo()]),this.curDrawItem&&this.curDrawItem.drawId&&this.getTurnOver()}async fetchData(){this.isLoading=!0;try{const t=await async function({endpoint:t,gameId:e}){if(!t||!e)return;const{items:n}=await Rt(`${t}/games/${e}/draws${At({status:"PAYABLE",limit:9999})}`);if(!n||0===n.length)return{};const r=n.filter((t=>t.winningNumbers.length>0)).sort(((t,e)=>null==t?void 0:t.date.localeCompare(null==e?void 0:e.date)));return{drawDatesOptions:r.map((t=>t.date)),drawResultsList:r}}({endpoint:this.endpoint,gameId:this.gameId});this.getGameDrawInfoEvent.emit({drawDatesOptions:t.drawDatesOptions,gameId:this.gameId}),this.drawResultsList=t.drawResultsList,this._curDate=t.drawDatesOptions[function(t){const e=new Date;let n=0,r=1/0;return t.forEach(((t,i)=>{const a=new Date(t),o=Math.abs(M(e,a));o<r&&(r=o,n=i)})),n}(t.drawDatesOptions)],await this.setCurItem(this._curDate)}catch(t){this.getGameDrawInfoEvent.emit({drawDatesOptions:[],gameId:this.gameId})}finally{this.isLoading=!1}}renderLoading(){return n("div",{class:"loading-wrap"},n("section",{class:"dots-container"},n("div",{class:"dot"}),n("div",{class:"dot"}),n("div",{class:"dot"}),n("div",{class:"dot"}),n("div",{class:"dot"})))}renderEmpty(){return null}renderMainContent(){var t,e,r,i,a,o;return!this.curDate&&!this._curDate||this.isEmpty?this.renderEmpty():n("div",{class:"lottery-tipping-latest-result"},n("div",{class:"header-section match-info-section"},n("div",{class:"match-details"},n("span",{class:"title-icon"},Gt.Football),n("span",{class:"title-text"},this.gameName," ",this.isLoadingTurnover?n("div",{class:"loading-turnOver"},n("ui-skeleton",{structure:"rectangle",width:"100px",height:"16px"})):n("span",{class:"title-text__extra"},"(",Wt("turnover",this.language)+" "+this.formattedTurnover||0,")"))),n("div",{class:"prize-details"},n("span",{class:"winners-count"},((null===(t=this.curDrawItem)||void 0===t?void 0:t.winNumber)||0)+" "+Wt("winners",this.language)),n("span",{class:"prize-amount"},Wt("prize",this.language)+" "+((null===(e=this.curDrawItem)||void 0===e?void 0:e.formattedWinTurnOver)||0)))),!(!(null===(r=this.curDrawItem)||void 0===r?void 0:r.drawId)&&!((null===(i=this.curDrawItem)||void 0===i?void 0:i.results)||[]).length)&&n("lottery-oddsbom-ticket-result",{language:this.language,"mb-source":this.mbSource,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"translation-url":this.translationUrl,endpoint:this.endpoint,"game-id":this.vendorGameId,"draw-id":null===(a=this.curDrawItem)||void 0===a?void 0:a.drawId,"default-results":JSON.stringify((null===(o=this.curDrawItem)||void 0===o?void 0:o.results)||[]),"split-view":!1}))}render(){return n("div",{key:"08c7308433c4d55f4cec1540002a03596155fe98",ref:t=>this.stylingContainer=t,class:{"latest-result-wrapper":!0,"game-wrapper":!(this.hideWrapperEmpty&&this.isEmpty)}},this.isLoading&&this.showLoading?this.renderLoading():this.renderMainContent())}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],curDate:["handleDateChange"],drawResults:["handleDrawResultsChange"]}}};Ut.style=".lottery-tipping-latest-result{container-type:inline-size;background:var(--emw--color-background, #fff);color:var(--emw--color-typography, #000)}.lottery-tipping-latest-result .header-section{display:flex;justify-content:center;align-items:center}.lottery-tipping-latest-result .match-info-section{justify-content:space-between;padding:15px 0px;height:18px}.lottery-tipping-latest-result .match-details,.lottery-tipping-latest-result .prize-details{font-weight:600;display:flex;align-items:center}.lottery-tipping-latest-result .match-details .title-icon{margin-right:8px;display:flex}.lottery-tipping-latest-result .match-details .title-text__extra{margin-left:5px}.lottery-tipping-latest-result .prize-details .winners-count{margin-right:5px}.loading-wrap{margin:20px 0;display:flex;align-items:center;justify-content:center;min-height:100px}.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--color-gray-300, #333);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--color-gray-300, #333)}50%{transform:scale(1.2);background-color:var(--emw--color-gray-100, #e6e6e6)}100%{transform:scale(0.8);background-color:var(--emw--color-gray-150, #6f6f6f)}}.latest-result-wrapper{background:var(--emw--color-background, #fff)}.latest-result-wrapper.game-wrapper{border:1px solid var(--emw--color-background-tertiary, #ccc);border-radius:8px;box-shadow:0 2px 4px var(--emw--color-background-tertiary, #ccc);overflow-x:auto;transition:box-shadow 0.3s ease;padding:20px}.latest-result-wrapper.game-wrapper:hover{box-shadow:0 4px 12px var(--emw--color-background-tertiary, #ccc)}.loading-turnOver{display:inline-flex;align-items:center}";function Ft(t){function e(t,n){return null==t||""===t||(0!==t||!n)&&(Array.isArray(t)?function(t){if(0===t.length)return!0;const n=t.length;let r=0;for(let i=0;i<n;i++){if(!e(t[i]))return!1;r++}return r===n}(t):"[object Object]"===Object.prototype.toString.call(t)?function(t){if(0===Object.keys(t).length)return!0;const n=Object.keys(t).length;let r=0;for(const n of Object.values(t)){if(!e(n))return!1;r++}return r===n}(t):!t)}const n={};Object.entries(t).forEach((([t,r])=>{e(r,!0)||(n[t]=r)}));const r=Object.entries(n).map((([t,e])=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`)).join("&");return r?`?${r}`:""}async function Yt({endpoint:t,gameId:e}){if(!t||!e)return;const{items:n}=await function(t,e="GET",n=null,r={}){return new Promise(((i,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"},r);"GET"!==e&&"HEAD"!==e&&(s["X-Idempotency-Key"]=o);const l={method:e,headers:s,body:null};n&&"GET"!==e&&"HEAD"!==e?l.body=JSON.stringify(n):delete l.body,fetch(t,l).then((t=>{if(!t.ok)throw a(`HTTP error! Status: ${t.status}`),new Error(`HTTP error! Status: ${t.status}`);return t.json()})).then((t=>i(t))).catch((t=>a(t)))}))}(`${t}/games/${e}/draws${Ft({status:"PAYABLE",limit:9999})}`);if(!n||0===n.length)return{};const r=n.sort(((t,e)=>null==t?void 0:t.date.localeCompare(null==e?void 0:e.date)));return{drawDatesOptions:r.map((t=>t.date)),drawResultsList:r}}const qt=class{constructor(e){t(this,e),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.endpoint=void 0,this.sessionId=void 0,this.playerId="",this.gameIds=void 0,this.gameIdArr=[],this.drawDatesOptions=[],this.curDate=void 0,this.isLoading=!1,this.drawResultsObj={}}handleClientStylingChange(t,e){t!=e&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&o(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&s(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}handleGameIdStringChange(t,e){var n;t!=e&&(this.gameIdArr=(null===(n=this.gameIds)||void 0===n?void 0:n.split(","))||[],this.getData())}componentDidLoad(){var t;this.gameIdArr=(null===(t=this.gameIds)||void 0===t?void 0:t.split(","))||[],this.getData(),this.stylingContainer&&(this.mbSource&&s(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&o(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}getData(){this.isLoading=!0,function({endpoint:t,gameIds:e}){if(t&&e)return Promise.allSettled(e.map((e=>Yt({endpoint:t,gameId:e}).then((t=>({gameId:e,drawResultsList:t.drawResultsList,drawDatesOptions:t.drawDatesOptions}))).catch((t=>(console.error(`Failed to fetch data for gameId: ${e}`,t),{gameId:e,drawResultsList:[],drawDatesOptions:[]})))))).then((t=>t.reduce(((t,e)=>{if("fulfilled"===e.status){const{gameId:n,drawResultsList:r,drawDatesOptions:i}=e.value;return t[n]={drawResultsList:r,drawDatesOptions:i},t}}),{})))}({endpoint:this.endpoint,gameIds:this.gameIdArr}).then((t=>{this.drawResultsObj=t;const e=Object.values(t).map((t=>t.drawDatesOptions)).filter(Boolean).flat();this.drawDatesOptions=function(t=[],e=[]){const n=new Set;return e.forEach((e=>{n.has(e)||(n.add(e),t.push(e))})),t.length?[...(r=t,r.slice().sort(((t,e)=>t.localeCompare(e))))]:[];var r}([],e),this.curDate=this.drawDatesOptions[function(t){const e=new Date;let n=0,r=1/0;return t.forEach(((t,i)=>{const a=new Date(t),o=Math.abs(M(e,a));o<r&&(r=o,n=i)})),n}(this.drawDatesOptions)]})).finally((()=>{this.isLoading=!1}))}handleChange(t){this.curDate=this.drawDatesOptions[t.detail]}handleNext(){if(this.curDate){const t=this.drawDatesOptions.findIndex((t=>t===this.curDate));t<this.drawDatesOptions.length-1&&(this.curDate=this.drawDatesOptions[t+1])}}handlePrev(){if(this.curDate){const t=this.drawDatesOptions.findIndex((t=>t===this.curDate));t>0&&(this.curDate=this.drawDatesOptions[t-1])}}renderLoading(){return n("div",{class:"loading-wrap"},n("section",{class:"dots-container"},n("div",{class:"dot"}),n("div",{class:"dot"}),n("div",{class:"dot"}),n("div",{class:"dot"}),n("div",{class:"dot"})))}renderMainContent(){return n("div",null,this.curDate&&n("helper-date-navigator",{language:this.language,"mb-source":this.mbSource,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"translation-url":this.translationUrl,date:this.curDate,"default-highlight-dates":JSON.stringify(this.drawDatesOptions||[]),onNext:this.handleNext.bind(this),onPrev:this.handlePrev.bind(this),onChangeDate:this.handleChange.bind(this)}),n("div",{class:"games-container"},this.gameIdArr.map((t=>{var e,r;return n("lottery-oddsbom-latest-result",{endpoint:this.endpoint,"game-id":t,"cur-date":this.curDate,drawResults:JSON.stringify(null===(r=null===(e=this.drawResultsObj)||void 0===e?void 0:e[t])||void 0===r?void 0:r.drawResultsList),"is-passing-data":!0,"show-loading":!1,"hide-wrapper-empty":!0,language:this.language,"translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource,"session-id":this.sessionId,"player-id":this.playerId})}))))}render(){return n("div",{key:"e576645b260f4a713cce833aae814ce7edad137e",ref:t=>this.stylingContainer=t,class:"lottery-tipping-latest-result-group"},this.isLoading?this.renderLoading():this.renderMainContent())}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],gameIds:["handleGameIdStringChange"]}}};async function Jt({endpoint:t,gameId:e,drawId:n,results:r,splitView:i=!1}){const a=await async function({endpoint:t,gameId:e,drawId:n}){try{return await function(t,e="GET",n=null,r={}){return new Promise(((i,a)=>{const o=Object.assign({"Content-Type":"application/json"},r),s={method:e,headers:o,body:null};n&&"GET"!==e&&"HEAD"!==e?s.body=JSON.stringify(n):delete s.body,fetch(t,s).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=>i(t)),(t=>a(t)))}))}(`${t}/poolgames/${e}/draws/${n}/matchConfig`)||[]}catch(t){console.log(t)}}({endpoint:t,gameId:e,drawId:n});return i?a.reduce(((t,e,n)=>{const[i,a]=(o=e.eventName)?o.split("vs").map((t=>t.trim())):"";var o;const[s,l]=function(t){const e=new Set,n=new Set;for(const r of t){const[t,i]=r.split(":");e.has(t)||e.add(t),n.has(t)||n.add(i)}return[Array.from(e),Array.from(n)]}(r[n]||[]);return null==t||t.push({index:n+1,teamName:i,startTime:e.startTime,results:s}),null==t||t.push({index:n+1,teamName:a,startTime:e.startTime,results:l}),t}),[])||[]:a.map(((t,e)=>({index:e+1,eventName:t.eventName,startTime:t.startTime,results:r[e]||[]})))}qt.style=".lottery-tipping-latest-result-group{container-type:inline-size;padding:16px;background-color:var(--emw--color-background, #fff);height:100%}.games-container{display:flex;flex-direction:column;gap:24px;max-width:800px;margin:0 auto;margin-top:24px}.loading-wrap{margin:20px 0;display:flex;align-items:center;justify-content:center;min-height:100px}.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--color-gray-300, #333);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--color-gray-300, #333)}50%{transform:scale(1.2);background-color:var(--emw--color-gray-100, #e6e6e6)}100%{transform:scale(0.8);background-color:var(--emw--color-gray-150, #6f6f6f)}}";const Vt=["ro","en","fr","ar","hr"],Qt={en:{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:{ticketsHistory:"Istoric bilete",settled:"Decontat",purchased:"Achiziționat",canceled:"Anulat",noData:"Nu sunt date disponibile.",ticketId:"ID bilet:",ticketType:"Tip bilet:",ticketAmount:"Suma biletului:",lineDetail:"Detaliu linie:",seeDetails:"Vezi detalii",numberOfDraw:"Număr de extrageri:",ticketResult:"Rezultat bilet:",drawId:"ID extragere:",drawDate:"Data extragerii:",result:"Rezultat:",prize:"Premiu:",bettingType:"Tip de pariu:"},fr:{ticketsHistory:"Historique des billets",settled:"Réglé",purchased:"Acheté",canceled:"Annulé",noData:"Aucune donnée disponible.",ticketId:"ID du billet:",ticketType:"Type de billet:",ticketAmount:"Montant du billet:",lineDetail:"Détail de la ligne:",seeDetails:"Voir les détails",numberOfDraw:"Nombre de tirages:",ticketResult:"Résultat du billet:",drawId:"ID du tirage:",drawDate:"Date du tirage:",result:"Résultat:",prize:"Prix:",bettingType:"Type de pari:"},ar:{ticketsHistory:"سجل التذاكر",settled:"تمت التسوية",purchased:"تم شراؤها",canceled:"تم الإلغاء",noData:"لا توجد بيانات متاحة.",ticketId:"معرف التذكرة:",ticketType:"نوع التذكرة:",ticketAmount:"مبلغ التذكرة:",lineDetail:"تفاصيل الخط:",seeDetails:"انظر التفاصيل",numberOfDraw:"عدد السحوبات:",ticketResult:"نتيجة التذكرة:",drawId:"معرف السحب:",drawDate:"تاريخ السحب:",result:"النتيجة:",prize:"الجائزة:",bettingType:"نوع الرهان:"},hr:{ticketsHistory:"Povijest listića",settled:"Riješeno",purchased:"Kupljeno",canceled:"Otkazano",noData:"Nema dostupnih podataka.",ticketId:"ID listića:",ticketType:"Vrsta listića:",ticketAmount:"Iznos listića:",lineDetail:"Detalji linije:",seeDetails:"Vidi detalje",numberOfDraw:"Broj izvlačenja:",ticketResult:"Rezultat listića:",drawId:"ID izvlačenja:",drawDate:"Datum izvlačenja:",result:"Rezultat:",prize:"Nagrada:",bettingType:"Vrsta oklade:"}},Xt=class{constructor(e){t(this,e),this.latestRequestId=0,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.sessionId=void 0,this.endpoint="",this.gameId=void 0,this.drawId=void 0,this.defaultResults=void 0,this.splitView=!1,this.allResults=void 0,this.ticketBetDataSource=[],this.isLoading=!1}handleClientStylingChange(t,e){t!==e&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!==e&&o(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!==e&&s(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&s(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&o(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentWillLoad(){(async t=>{if(t)try{const n=await fetch(t);if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);const r=await n.json();e=r,Object.keys(e).forEach((t=>{for(let n in e[t])Qt[t][n]=e[t][n]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl),this.fetchMatchData()}async fetchMatchData(){const t=++this.latestRequestId;if(this.gameId&&this.drawId)try{this.defaultResults&&(this.allResults=JSON.parse(this.defaultResults)),this.isLoading=!0;const e=await Jt({endpoint:this.endpoint,gameId:this.gameId,drawId:this.drawId,results:this.allResults||[[]],splitView:this.splitView});t===this.latestRequestId&&(this.ticketBetDataSource=e)}finally{t===this.latestRequestId&&(this.isLoading=!1)}}get columns(){const t=(t,e)=>(({date:t,type:e="date",format:n})=>{try{const r=ft(t);if(isNaN(r.getTime()))throw new Error(`Invalid date: ${t}`);if(n)return pt(r,n);let i="dd/MM/yyyy";return"time"===e?i="dd/MM/yyyy HH:mm:ss":"week"===e&&(i="ccc dd/MM/yyyy HH:mm:ss"),pt(r,i)}catch(t){return console.error("Error formatting date:",t.message),""}})({date:e,format:"ccc dd/MM HH:mm"});return this.splitView?[{title:"No.",value:"index",width:5,rowSpan:2},{title:"Date",value:"startTime",width:25,rowSpan:2,nowrap:!0,render:t},{title:"Team",value:"teamName",width:30},{title:"Scores",value:"results",width:45,render:(t,e)=>n("div",{class:"flex gap-1"},e.map((t=>n("lottery-oddsbom-bullet",{text:t,"is-reading":!0,"is-selected":!0}))))}]:[{title:"Match",value:"eventName",width:50,render:(t,e)=>n("div",{class:"flex gap-1 eventNameContainer__item"},n("span",{class:"eventNameContainer__item--title"},e))},{title:"Date",value:"startTime",width:25,nowrap:!0,render:t},{title:"Match Result",value:"results",width:25,render:(t,e)=>n("div",null,null==e?void 0:e[0])}]}renderLoading(){return n("div",{class:"loading-wrap"},n("section",{class:"dots-container"},n("div",{class:"dot"}),n("div",{class:"dot"}),n("div",{class:"dot"}),n("div",{class:"dot"}),n("div",{class:"dot"})))}renderEmpty(){return n("div",{class:"LotteryTippingTicketBet__empty"},n("p",null,(()=>{const t=this.language;let e=Qt[void 0!==t&&Vt.includes(t)?t:"en"].noData;return e})()))}renderTable({columns:t,dataSource:e,hideHead:r=!1,grid:i=!0,bordered:a=!0}){const o={};return n("table",{class:{bordered:a,grid:i,"my-table-component":!0}},!r&&n("thead",null,n("tr",null,t.map((t=>{var e;return n("th",{key:t.value,style:{width:t.width+"%",textAlign:t.align}},"string"==typeof t.title?t.title:null===(e=t.title)||void 0===e?void 0:e.call(t))})))),n("tbody",null,e.map(((e,r)=>n("tr",{key:r},t.map((t=>{if(o[t.value]&&o[t.value]>0)return o[t.value]--,null;const i=t.rowSpan;return i&&i>1&&(o[t.value]=i-1),n("td",{key:t.value,rowSpan:i,style:{width:t.width+"%",textAlign:t.align},class:{"no-wrap":t.nowrap}},t.render?t.render(e,e[t.value],r):e[t.value])})))))))}renderContent(){return this.isLoading?this.renderLoading():this.ticketBetDataSource&&0!==this.ticketBetDataSource.length?n("div",{class:"flex align-center LotteryTippingTicketBet__main"},this.renderTable({columns:this.columns,dataSource:this.ticketBetDataSource||[],hideHead:!1,grid:!1,bordered:!1})):this.renderEmpty()}render(){return n("div",{key:"9932926b2958b13636d617cc20a0c77a76a36ebe",ref:t=>this.stylingContainer=t,class:"LotteryTippingTicketBet__container"},this.renderContent())}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],gameId:["fetchMatchData"],drawId:["fetchMatchData"],defaultResults:["fetchMatchData"]}}};Xt.style=".LotteryTippingTicketBet__container {\n display: block; /* Or inline-block, depending on desired layout flow */\n font-size: 14px;\n line-height: 1.5715;\n color: var(--emw--color-typography, #000);\n background: var(--emw--color-background, #fff);\n overflow: hidden;\n min-width: 300px;\n container-type: inline-size;\n}\n@container (max-width: 375px) {\n .LotteryTippingTicketBet__container {\n font-size: 12px;\n }\n}\n\n.my-table-component {\n width: 100%;\n border-collapse: collapse; /* Important for borders */\n text-align: left;\n border-radius: 0.1rem; /* Ant Design like subtle rounding */\n border-spacing: 0;\n}\n\n/* Header */\n.my-table-component th {\n background: var(--emw--color-background-secondary, #f5f5f5);\n color: var(--emw--color-typography, #000);\n font-weight: 600;\n padding: 0.4rem 0.5rem;\n transition: background 0.3s ease;\n}\n\n/* Cells */\n.my-table-component td {\n padding: 0.4rem 0.5rem;\n color: var(--emw--color-typography, #000);\n background: var(--emw--color-background, #fff);\n transition: background 0.3s;\n}\n@container (max-width: 400px) {\n .my-table-component td {\n padding: 0.3rem 0.3rem;\n }\n}\n\n.my-table-component.bordered th,\n.my-table-component.bordered td {\n border-bottom: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n/* Bordered style */\n.my-table-component.grid th,\n.my-table-component.grid td {\n border: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n.my-table-component.grid th {\n border-bottom-width: 1px; /* Ensure bottom border is consistent */\n}\n\n.my-table-component.grid {\n border: 1px solid var(--emw--color-gray-100, #e6e6e6); /* Outer border */\n border-right-width: 0;\n border-bottom-width: 0;\n}\n\n.my-table-component.grid th:last-child,\n.my-table-component.grid td:last-child {\n border-right: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n.my-table-component.grid tr:last-child td {\n border-bottom: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n/* Striped style */\n.my-table-component.striped tbody tr:nth-child(even) td {\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n}\n\n/* Hover (optional, but nice) */\n.my-table-component tbody tr:hover td {\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n}\n\n.flex {\n display: flex;\n}\n\n.justify-end {\n justify-content: flex-end;\n}\n\n.gap-1 {\n gap: 4px;\n}\n\n.justify-between {\n justify-content: space-between;\n}\n\n.align-center {\n align-items: center;\n}\n\n.gap-1 {\n gap: 0.5rem;\n}\n\n.match-info-item {\n display: flex;\n}\n\n.match-info-item-label {\n margin-right: 6px;\n}\n\n.info-icon:hover {\n cursor: pointer;\n}\n\n.LotteryTippingTicketBet__empty p {\n text-align: center;\n color: var(--emw--color-typography, #000);\n}\n\n.no-wrap {\n white-space: nowrap;\n overflow: hidden;\n}\n\n.eventNameContainer__item {\n line-height: 1rem;\n}\n.eventNameContainer__item--title {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 300px;\n}\n@container (max-width: 600px) {\n .eventNameContainer__item--title {\n max-width: 180px;\n }\n}\n@container (max-width: 500px) {\n .eventNameContainer__item--title {\n max-width: 150px;\n }\n}\n@container (max-width: 400px) {\n .eventNameContainer__item--title {\n max-width: 100px;\n }\n}\n@container (max-width: 330px) {\n .eventNameContainer__item--title {\n max-width: 70px;\n }\n}\n\n.LotteryTippingTicketBet__main {\n perspective: 800px;\n will-change: transform, opacity;\n backface-visibility: hidden;\n}\n\n@container (max-width: 520px) {\n .LotteryTippingTicketBet__main {\n flex-wrap: wrap;\n justify-content: center;\n }\n}\n.loading-wrap {\n margin: 20px 0;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 100px;\n}\n.loading-wrap .dots-container {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n}\n.loading-wrap .dot {\n height: 14px;\n width: 14px;\n margin-right: 14px;\n border-radius: 14px;\n background-color: var(--emw--color-gray-300, #333);\n animation: pulse 1.5s infinite ease-in-out;\n}\n.loading-wrap .dot:last-child {\n margin-right: 0;\n}\n.loading-wrap .dot:nth-child(1) {\n animation-delay: -0.3s;\n}\n.loading-wrap .dot:nth-child(2) {\n animation-delay: -0.1s;\n}\n.loading-wrap .dot:nth-child(3) {\n animation-delay: 0.1s;\n}\n@keyframes pulse {\n 0% {\n transform: scale(0.8);\n background-color: var(--emw--color-gray-300, #333);\n }\n 50% {\n transform: scale(1.2);\n background-color: var(--emw--color-gray-100, #e6e6e6);\n }\n 100% {\n transform: scale(0.8);\n background-color: var(--emw--color-gray-150, #6f6f6f);\n }\n}";const Zt=class{constructor(e){t(this,e),this.stylingValue={width:this.handleStylingProps(this.width),height:this.handleStylingProps(this.height),borderRadius:this.handleStylingProps(this.borderRadius),marginBottom:this.handleStylingProps(this.marginBottom),marginTop:this.handleStylingProps(this.marginTop),marginLeft:this.handleStylingProps(this.marginLeft),marginRight:this.handleStylingProps(this.marginRight),size:this.handleStylingProps(this.size)},this.structure=void 0,this.width="unset",this.height="unset",this.borderRadius="unset",this.marginBottom="unset",this.marginTop="unset",this.marginLeft="unset",this.marginRight="unset",this.animation=!0,this.rows=0,this.size="100%"}handleStructureChange(t,e){e!==t&&this.handleStructure(t)}handleStylingProps(t){switch(typeof t){case"number":return 0===t?0:`${t}px`;case"undefined":default:return"unset";case"string":return["auto","unset","none","inherit","initial"].includes(t)||t.endsWith("px")||t.endsWith("%")?t:"unset"}}handleStructure(t){switch(t){case"logo":return this.renderLogo();case"image":return this.renderImage();case"title":return this.renderTitle();case"text":return this.renderText();case"rectangle":return this.renderRectangle();case"circle":return this.renderCircle();default:return null}}renderLogo(){return n("div",{class:"SkeletonContainer"},n("div",{class:"SkeletonLogo "+(this.animation?"Skeleton":"")}))}renderImage(){return n("div",{class:"SkeletonImage "+(this.animation?"Skeleton":"")})}renderTitle(){return n("div",{class:"SkeletonContainer"},n("div",{class:"SkeletonTitle "+(this.animation?"Skeleton":"")}))}renderText(){return n("div",{class:"SkeletonContainer"},Array.from({length:this.rows>0?this.rows:1}).map(((t,e)=>n("div",{key:e,class:"SkeletonText "+(this.animation?"Skeleton":"")}))))}renderRectangle(){return n("div",{class:"SkeletonContainer"},n("div",{class:"SkeletonRectangle "+(this.animation?"Skeleton":"")}))}renderCircle(){return n("div",{class:"SkeletonContainer"},n("div",{class:"SkeletonCircle "+(this.animation?"Skeleton":"")}))}render(){let t="";switch(this.structure){case"logo":t=`\n :host {\n --emw-skeleton-logo-width: ${this.stylingValue.width};\n --emw-skeleton-logo-height: ${this.stylingValue.height};\n --emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"image":t=`\n :host {\n --emw-skeleton-image-width: ${this.stylingValue.width};\n --emw-skeleton-image-height: ${this.stylingValue.height};\n --emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"title":t=`\n :host {\n --emw-skeleton-title-width: ${this.stylingValue.width};\n --emw-skeleton-title-height: ${this.stylingValue.height};\n --emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"text":t=`\n :host {\n --emw-skeleton-text-width: ${this.stylingValue.width};\n --emw-skeleton-text-height: ${this.stylingValue.height};\n --emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"rectangle":t=`\n :host {\n --emw-skeleton-rectangle-width: ${this.stylingValue.width};\n --emw-skeleton-rectangle-height: ${this.stylingValue.height};\n --emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"circle":t=`\n :host {\n --emw-skeleton-circle-size: ${this.stylingValue.size};\n }\n `;break;default:t=""}return n(i,{key:"c2a2650acd416962a2bc4e1a7ee18bc6d8e2def8"},n("style",{key:"9bd7fc1f9e9ed9f17735a7b72fce6f09696f5e19"},t),this.handleStructure(this.structure))}static get watchers(){return{structure:["handleStructureChange"]}}};Zt.style=":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.SkeletonRectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.SkeletonCircle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.SkeletonText{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.SkeletonText:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.SkeletonTitle{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.SkeletonImage{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.SkeletonLogo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}";export{w as helper_date_navigator,Bt as lottery_oddsbom_bomb,zt as lottery_oddsbom_bullet,Ut as lottery_oddsbom_latest_result,qt as lottery_oddsbom_latest_result_group,Xt as lottery_oddsbom_ticket_result,Zt as ui_skeleton}
@@ -1 +1 @@
1
- export{L as LotteryOddsbomEntrance}from"./lottery-oddsbom-entrance-93563752.js";import"./index-068e610e.js";
1
+ export{L as LotteryOddsbomEntrance}from"./lottery-oddsbom-entrance-ce9b7e21.js";import"./index-068e610e.js";
@@ -6654,4 +6654,4 @@ Mt("vaadin-tabs",w`
6654
6654
  </div>
6655
6655
 
6656
6656
  <div on-click="_scrollForward" part="forward-button" aria-hidden="true"></div>
6657
- `}static get is(){return"vaadin-tabs"}}function ml(t,e){if(t){const i=document.createElement("style");i.innerHTML=e,t.appendChild(i)}}function vl(t,e){if(!t||!e)return;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 fl(t,e){if(window.emMessageBus){const i=document.createElement("style");window.emMessageBus.subscribe(e,(e=>{i.innerHTML=e,t&&t.appendChild(i)}))}}var bl;m(pl),function(t){t.DRAWS="0",t.LATEST_RESULTS="1",t.INSTRUCTION="2"}(bl||(bl={}));const gl=["ro","en","fr","ar","hr"],yl={en:{logout:"Log out",draws:"DRAWS",latestResults:"LATEST RESULTS",instruction:"INSTRUCTION",howToWin:"HOW TO WIN",selectDraws:"Select Draws from the following bars:",gameNotAvailable:"Sorry. The Game is not available now.",instructionContent:"Instruction content goes here."},ro:{logout:"Deconectare",draws:"EXTRAGERI",latestResults:"ULTIMELE REZULTATE",instruction:"INSTRUCȚIUNI",howToWin:"CUM SĂ CÂȘTIGI",selectDraws:"Selectați extrageri din barele următoare:",gameNotAvailable:"Ne pare rău. Jocul nu este disponibil acum.",instructionContent:"Conținutul instrucțiunilor se afișează aici."},fr:{logout:"Se déconnecter",draws:"TIRAGES",latestResults:"DERNIERS RÉSULTATS",instruction:"INSTRUCTION",howToWin:"COMMENT GAGNER",selectDraws:"Sélectionnez les tirages dans les barres suivantes:",gameNotAvailable:"Désolé. Le jeu nest pas disponible pour le moment.",instructionContent:"Le contenu des instructions va ici."},ar:{logout:"تسجيل الخروج",draws:"السحوبات",latestResults:"أحدث النتائج",instruction:"التعليمات",howToWin:"كيفية الفوز",selectDraws:"حدد السحوبات من الأشرطة التالية:",gameNotAvailable:"آسف. اللعبة غير متوفرة الآن.",instructionContent:"محتوى التعليمات يذهب هنا."},hr:{logout:"Odjava",draws:"IZVLAČENJA",latestResults:"NAJNOVIJI REZULTATI",instruction:"UPUTE",howToWin:"KAKO POBIJEDITI",selectDraws:"Odaberite izvlačenja sa sljedećih traka:",gameNotAvailable:"Žao nam je. Igra trenutno nije dostupna.",instructionContent:"Sadržaj uputa ide ovdje."}},_l=class{constructor(e){t(this,e),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.endpoint=void 0,this.groupId=void 0,this.gameIds=void 0,this.sessionId=void 0,this.playerId="",this.activeTab=bl.DRAWS}handleClientStylingChange(t,e){t!=e&&ml(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&vl(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&fl(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&fl(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&ml(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&vl(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}renderTabs(){const t=[{name:"DRAWS",code:bl.DRAWS},{name:"LATEST RESULTS",code:bl.LATEST_RESULTS},{name:"INSTRUCTION",code:bl.INSTRUCTION}],s=e("../static/oddsbomben-negative.svg");return i("div",{class:"lottery-oddsbom-entrance__header"},i("div",{class:"header"},i("div",{class:"header-logo"},i("img",{src:s,class:"logo"})),i("div",{class:"header-btns"},i("div",{class:"header-btns--left"},i("slot",{name:"backGameSelectionBtn"})),i("div",{class:"header-btns--right"},i("slot",{name:"themeBtn"}),i("slot",{name:"logoutBtn"})))),i("div",{class:"tabs-wrap"},i("vaadin-tabs",{theme:"equal-width-tabs",selected:this.activeTab,"on-selected-changed":t=>{this.activeTab=`${t.detail.value}`}},t.map((t=>i("vaadin-tab",{class:"tabs-item",value:t.code},t.name))))))}renderContent(){return this.activeTab===bl.DRAWS?this.groupId?i("lottery-oddsbom-bomb",{endpoint:this.endpoint,"group-id":this.groupId,language:this.language,"translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource,"session-id":this.sessionId,"player-id":this.playerId}):i("div",null,"Error: Require Group ID"):this.activeTab===bl.LATEST_RESULTS?i("lottery-oddsbom-latest-result-group",{endpoint:this.endpoint,language:this.language,"translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource,"session-id":this.sessionId,"player-id":this.playerId,"game-ids":this.gameIds,"group-id":this.groupId}):this.activeTab===bl.INSTRUCTION?i("div",{class:"instruction-content-wrapper"},(()=>{const t=this.language;return yl[void 0!==t&&gl.includes(t)?t:"en"].instructionContent})()):null}render(){return i("div",{key:"a062a337155738bbee43d2b73ba9f219f1dad887",ref:t=>this.stylingContainer=t,class:"lottery-oddsbom-entrance__wrapper"},i("div",{key:"17d1c3fa142bd80d7fd1ec40fb913f0ff4845ea4",class:"lottery-oddsbom-entrance__container"},this.renderTabs(),i("main",{key:"7871da438b8cea7b098b62c15c1034531605ed38",class:"main-content"},this.renderContent())))}static get assetsDirs(){return["../static"]}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};_l.style=".lottery-oddsbom-entrance__wrapper {\n container-type: inline-size;\n container-name: oddsbom-entrance;\n background: var(--emw--color-background, #fff);\n height: 100%;\n}\n.lottery-oddsbom-entrance__wrapper .lottery-oddsbom-entrance__container {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n.lottery-oddsbom-entrance__wrapper .lottery-oddsbom-entrance__container .main-content {\n flex: 1;\n margin-bottom: 20px;\n}\n.lottery-oddsbom-entrance__wrapper .lottery-oddsbom-entrance__header {\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n.lottery-oddsbom-entrance__wrapper .lottery-oddsbom-entrance__header .header {\n background: var(--emw--color-primary, #13237c);\n position: relative;\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n height: 52px;\n}\n.lottery-oddsbom-entrance__wrapper .lottery-oddsbom-entrance__header .header-logo {\n text-align: center;\n margin: 0 auto;\n}\n.lottery-oddsbom-entrance__wrapper .lottery-oddsbom-entrance__header .header-logo .logo {\n height: 40px;\n}\n.lottery-oddsbom-entrance__wrapper .lottery-oddsbom-entrance__header .header-btns--left {\n left: 10px;\n top: calc(50% - 10px);\n position: absolute;\n}\n.lottery-oddsbom-entrance__wrapper .lottery-oddsbom-entrance__header .header-btns--right {\n right: 10px;\n top: calc(50% - 17px);\n position: absolute;\n display: flex;\n align-items: center;\n gap: 14px;\n}\n.lottery-oddsbom-entrance__wrapper .lottery-oddsbom-entrance__header .tabs-wrap {\n width: 100%;\n}\n.lottery-oddsbom-entrance__wrapper .lottery-oddsbom-entrance__header .tabs-wrap .tabs-item {\n margin: 2rem 0;\n}\n.lottery-oddsbom-entrance__wrapper vaadin-tab {\n color: var(--emw--color-typography-secondary, #333);\n}\n.lottery-oddsbom-entrance__wrapper vaadin-tab[selected] {\n color: var(--emw--color-typography, #000);\n font-weight: bold;\n}\n.lottery-oddsbom-entrance__wrapper vaadin-tab::after[selected] {\n background-color: var(--emw--color-typography, #000);\n}\n@container oddsbom-entrance (max-width: 500px) {\n .lottery-oddsbom-entrance__wrapper .tabs-item {\n font-size: 0.8rem;\n }\n}\n\n.instruction-content-wrapper {\n color: var(--emw--color-typography, #000);\n height: 100%;\n padding: 24px;\n text-align: center;\n}";export{_l as L,vl as a,fl as b,ml as s}
6657
+ `}static get is(){return"vaadin-tabs"}}m(pl);const ml="__WIDGET_GLOBAL_STYLE_CACHE__";function vl(t,e){if(t){const i=document.createElement("style");i.innerHTML=e,t.appendChild(i)}}function fl(t,e){if(!t||!e)return;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 bl(t,e,i,s=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!s)return i=function(t,e){const i=document.createElement("style");return window.emMessageBus.subscribe(e,(e=>{t&&(i.innerHTML=e,t.appendChild(i))}))}(t,e),i;window[ml]||(window[ml]={}),i=function(t,e){return window.emMessageBus.subscribe(e,(i=>{if(!t)return;const s=t.getRootNode(),o=window[ml];let r=o[e]?.sheet;r?o[e].refCount=o[e].refCount+1:(r=new CSSStyleSheet,r.replaceSync(i),o[e]={sheet:r,refCount:1});const n=s.adoptedStyleSheets||[];n.includes(r)||(s.adoptedStyleSheets=[...n,r])}))}(t,e);const o=i.unsubscribe.bind(i);return i.unsubscribe=()=>{if(window[ml][e]){const t=window[ml][e];t.refCount>1?t.refCount=t.refCount-1:delete window[ml][e]}o()},i}var gl;!function(t){t.DRAWS="0",t.LATEST_RESULTS="1",t.INSTRUCTION="2"}(gl||(gl={}));const yl=["ro","en","fr","ar","hr"],_l={en:{logout:"Log out",draws:"DRAWS",latestResults:"LATEST RESULTS",instruction:"INSTRUCTION",howToWin:"HOW TO WIN",selectDraws:"Select Draws from the following bars:",gameNotAvailable:"Sorry. The Game is not available now.",instructionContent:"Instruction content goes here."},ro:{logout:"Deconectare",draws:"EXTRAGERI",latestResults:"ULTIMELE REZULTATE",instruction:"INSTRUCȚIUNI",howToWin:"CUM SĂ CÂȘTIGI",selectDraws:"Selectați extrageri din barele următoare:",gameNotAvailable:"Ne pare rău. Jocul nu este disponibil acum.",instructionContent:"Conținutul instrucțiunilor se afișează aici."},fr:{logout:"Se déconnecter",draws:"TIRAGES",latestResults:"DERNIERS RÉSULTATS",instruction:"INSTRUCTION",howToWin:"COMMENT GAGNER",selectDraws:"Sélectionnez les tirages dans les barres suivantes:",gameNotAvailable:"Désolé. Le jeu nest pas disponible pour le moment.",instructionContent:"Le contenu des instructions va ici."},ar:{logout:"تسجيل الخروج",draws:"السحوبات",latestResults:"أحدث النتائج",instruction:"التعليمات",howToWin:"كيفية الفوز",selectDraws:"حدد السحوبات من الأشرطة التالية:",gameNotAvailable:"آسف. اللعبة غير متوفرة الآن.",instructionContent:"محتوى التعليمات يذهب هنا."},hr:{logout:"Odjava",draws:"IZVLAČENJA",latestResults:"NAJNOVIJI REZULTATI",instruction:"UPUTE",howToWin:"KAKO POBIJEDITI",selectDraws:"Odaberite izvlačenja sa sljedećih traka:",gameNotAvailable:"Žao nam je. Igra trenutno nije dostupna.",instructionContent:"Sadržaj uputa ide ovdje."}},wl=class{constructor(e){t(this,e),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.endpoint=void 0,this.groupId=void 0,this.gameIds=void 0,this.sessionId=void 0,this.playerId="",this.activeTab=gl.DRAWS}handleClientStylingChange(t,e){t!=e&&vl(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&fl(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&bl(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&bl(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&vl(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&fl(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}renderTabs(){const t=[{name:"DRAWS",code:gl.DRAWS},{name:"LATEST RESULTS",code:gl.LATEST_RESULTS},{name:"INSTRUCTION",code:gl.INSTRUCTION}],s=e("../static/oddsbomben-negative.svg");return i("div",{class:"lottery-oddsbom-entrance__header"},i("div",{class:"header"},i("div",{class:"header-logo"},i("img",{src:s,class:"logo"})),i("div",{class:"header-btns"},i("div",{class:"header-btns--left"},i("slot",{name:"backGameSelectionBtn"})),i("div",{class:"header-btns--right"},i("slot",{name:"themeBtn"}),i("slot",{name:"logoutBtn"})))),i("div",{class:"tabs-wrap"},i("vaadin-tabs",{theme:"equal-width-tabs",selected:this.activeTab,"on-selected-changed":t=>{this.activeTab=`${t.detail.value}`}},t.map((t=>i("vaadin-tab",{class:"tabs-item",value:t.code},t.name))))))}renderContent(){return this.activeTab===gl.DRAWS?this.groupId?i("lottery-oddsbom-bomb",{endpoint:this.endpoint,"group-id":this.groupId,language:this.language,"translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource,"session-id":this.sessionId,"player-id":this.playerId}):i("div",null,"Error: Require Group ID"):this.activeTab===gl.LATEST_RESULTS?i("lottery-oddsbom-latest-result-group",{endpoint:this.endpoint,language:this.language,"translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource,"session-id":this.sessionId,"player-id":this.playerId,"game-ids":this.gameIds,"group-id":this.groupId}):this.activeTab===gl.INSTRUCTION?i("div",{class:"instruction-content-wrapper"},(()=>{const t=this.language;return _l[void 0!==t&&yl.includes(t)?t:"en"].instructionContent})()):null}render(){return i("div",{key:"a062a337155738bbee43d2b73ba9f219f1dad887",ref:t=>this.stylingContainer=t,class:"lottery-oddsbom-entrance__wrapper"},i("div",{key:"17d1c3fa142bd80d7fd1ec40fb913f0ff4845ea4",class:"lottery-oddsbom-entrance__container"},this.renderTabs(),i("main",{key:"7871da438b8cea7b098b62c15c1034531605ed38",class:"main-content"},this.renderContent())))}static get assetsDirs(){return["../static"]}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};wl.style=".lottery-oddsbom-entrance__wrapper {\n container-type: inline-size;\n container-name: oddsbom-entrance;\n background: var(--emw--color-background, #fff);\n height: 100%;\n}\n.lottery-oddsbom-entrance__wrapper .lottery-oddsbom-entrance__container {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n.lottery-oddsbom-entrance__wrapper .lottery-oddsbom-entrance__container .main-content {\n flex: 1;\n margin-bottom: 20px;\n}\n.lottery-oddsbom-entrance__wrapper .lottery-oddsbom-entrance__header {\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n.lottery-oddsbom-entrance__wrapper .lottery-oddsbom-entrance__header .header {\n background: var(--emw--color-primary, #13237c);\n position: relative;\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n height: 52px;\n}\n.lottery-oddsbom-entrance__wrapper .lottery-oddsbom-entrance__header .header-logo {\n text-align: center;\n margin: 0 auto;\n}\n.lottery-oddsbom-entrance__wrapper .lottery-oddsbom-entrance__header .header-logo .logo {\n height: 40px;\n}\n.lottery-oddsbom-entrance__wrapper .lottery-oddsbom-entrance__header .header-btns--left {\n left: 10px;\n top: calc(50% - 10px);\n position: absolute;\n}\n.lottery-oddsbom-entrance__wrapper .lottery-oddsbom-entrance__header .header-btns--right {\n right: 10px;\n top: calc(50% - 17px);\n position: absolute;\n display: flex;\n align-items: center;\n gap: 14px;\n}\n.lottery-oddsbom-entrance__wrapper .lottery-oddsbom-entrance__header .tabs-wrap {\n width: 100%;\n}\n.lottery-oddsbom-entrance__wrapper .lottery-oddsbom-entrance__header .tabs-wrap .tabs-item {\n margin: 2rem 0;\n}\n.lottery-oddsbom-entrance__wrapper vaadin-tab {\n color: var(--emw--color-typography-secondary, #333);\n}\n.lottery-oddsbom-entrance__wrapper vaadin-tab[selected] {\n color: var(--emw--color-typography, #000);\n font-weight: bold;\n}\n.lottery-oddsbom-entrance__wrapper vaadin-tab::after[selected] {\n background-color: var(--emw--color-typography, #000);\n}\n@container oddsbom-entrance (max-width: 500px) {\n .lottery-oddsbom-entrance__wrapper .tabs-item {\n font-size: 0.8rem;\n }\n}\n\n.instruction-content-wrapper {\n color: var(--emw--color-typography, #000);\n height: 100%;\n padding: 24px;\n text-align: center;\n}";export{wl as L,fl as a,bl as b,vl as s}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/lottery-oddsbom-entrance",
3
- "version": "0.0.15",
3
+ "version": "0.0.17",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",