@everymatrix/lottery-hakuna-ticket-history 0.0.1 → 0.0.3

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.
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, h, g as getElement, c as createEvent, H as Host } from './index-50addd47.js';
2
- import { s as setClientStyling, a as setClientStylingURL, b as setStreamStyling, r as renderIconDefinitionToSVGElement } from './lottery-hakuna-ticket-history-cdab50d9.js';
3
- export { L as lottery_hakuna_ticket_history } from './lottery-hakuna-ticket-history-cdab50d9.js';
2
+ import { s as setClientStyling, a as setClientStylingURL, b as setStreamStyling, r as renderIconDefinitionToSVGElement } from './lottery-hakuna-ticket-history-4cb107bf.js';
3
+ export { L as lottery_hakuna_ticket_history } from './lottery-hakuna-ticket-history-4cb107bf.js';
4
4
 
5
5
  // This icon file is generated automatically.
6
6
  var DeleteFilled = { "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" };
@@ -320,18 +320,9 @@ const LotteryInfiniteScroll = class {
320
320
  registerInstance(this, hostRef);
321
321
  this.loadMore = createEvent(this, "loadMore", 7);
322
322
  this.refresh = createEvent(this, "refresh", 7);
323
- /** Y-coordinate of the touch start event. */
323
+ // Touch event vars
324
324
  this.startY = 0;
325
- /** Indicates if a touch event is currently active for pull-to-refresh. */
326
325
  this.isTouching = false;
327
- // --- Virtual Scroll Core Logic ---
328
- this.onScroll = () => {
329
- if (this.enableVirtualScroll) {
330
- if (this.rafId)
331
- cancelAnimationFrame(this.rafId);
332
- this.rafId = requestAnimationFrame(() => this.calculateVisibleRange());
333
- }
334
- };
335
326
  // --- Pull to Refresh Logic (Touch handling) ---
336
327
  this.handleTouchStart = (e) => {
337
328
  // Only allow pull-down when scrollbar is at the top
@@ -376,28 +367,16 @@ const LotteryInfiniteScroll = class {
376
367
  this.isLoading = false;
377
368
  this.isRefreshing = false;
378
369
  this.threshold = '0px 0px 200px 0px';
379
- this.estimatedItemHeight = 200;
380
370
  this.containerHeight = '100%';
381
- this.enableVirtualScroll = false;
382
371
  this.renderItem = undefined;
383
372
  this.renderSkeleton = undefined;
384
373
  this.skeletonCount = 6;
385
374
  this.pullTriggerDistance = 60;
386
375
  this.minItemWidth = 340;
387
376
  this.gridGap = 10;
388
- this.visibleStartIndex = 0;
389
- this.visibleEndIndex = 10;
390
377
  this.pullDistance = 0;
391
- this.columns = 1;
392
378
  }
393
379
  componentDidLoad() {
394
- if (this.enableVirtualScroll) {
395
- // Listen for container size changes, recalculate columns
396
- this.initResizeObserver();
397
- // Initial calculation
398
- this.calculateMetrics();
399
- }
400
- // Initialize observer on component load
401
380
  this.initObserver();
402
381
  }
403
382
  componentDidUpdate() {
@@ -407,49 +386,12 @@ const LotteryInfiniteScroll = class {
407
386
  }
408
387
  disconnectedCallback() {
409
388
  this.disconnectObserver();
410
- if (this.resizeObserver)
411
- this.resizeObserver.disconnect();
412
- if (this.rafId)
413
- cancelAnimationFrame(this.rafId);
414
- }
415
- initResizeObserver() {
416
- if (!window.ResizeObserver || !this.scrollContainer)
417
- return;
418
- this.resizeObserver = new ResizeObserver((entries) => {
419
- for (let entry of entries) {
420
- // When width changes, recalculate the number of columns
421
- const width = entry.contentRect.width;
422
- this.recalcColumns(width);
423
- this.calculateVisibleRange();
424
- }
425
- });
426
- this.resizeObserver.observe(this.scrollContainer);
427
- }
428
- recalcColumns(containerWidth) {
429
- if (!this.enableVirtualScroll)
430
- return;
431
- // Calculation logic must be consistent with CSS grid-template-columns: repeat(auto-fill, ...)
432
- // Considering the gap
433
- const effectiveWidth = containerWidth + this.gridGap;
434
- const itemOccupancy = this.minItemWidth + this.gridGap;
435
- // At least 1 column
436
- const newColumns = Math.max(1, Math.floor(effectiveWidth / itemOccupancy));
437
- if (this.columns !== newColumns) {
438
- this.columns = newColumns;
439
- }
440
- }
441
- // --- Watchers ---
442
- handleItemsChange() {
443
- if (this.enableVirtualScroll) {
444
- this.calculateVisibleRange();
445
- }
446
389
  }
447
390
  handleRefreshingChange(newValue) {
448
391
  if (!newValue) {
449
392
  this.pullDistance = 0;
450
393
  }
451
394
  }
452
- // --- Observer Logic ---
453
395
  disconnectObserver() {
454
396
  if (this.observer) {
455
397
  this.observer.disconnect();
@@ -461,109 +403,44 @@ const LotteryInfiniteScroll = class {
461
403
  if (!this.hasMore || this.isLoading || !this.sentinel)
462
404
  return;
463
405
  const options = {
464
- root: this.scrollContainer === this.el.shadowRoot.querySelector('.lottery-infinite-scroll__container')
465
- ? this.scrollContainer
466
- : null,
406
+ root: this.scrollContainer,
467
407
  rootMargin: this.threshold,
468
408
  threshold: 0.1
469
409
  };
470
410
  this.observer = new IntersectionObserver((entries) => {
471
- // When scrolled to bottom and not currently loading
472
411
  if (entries[0].isIntersecting && this.hasMore && !this.isLoading) {
473
412
  this.loadMore.emit();
474
413
  }
475
414
  }, options);
476
415
  this.observer.observe(this.sentinel);
477
416
  }
478
- calculateMetrics() {
479
- if (!this.scrollContainer)
480
- return;
481
- this.recalcColumns(this.scrollContainer.clientWidth);
482
- this.calculateVisibleRange();
483
- }
484
- calculateVisibleRange() {
485
- if (!this.scrollContainer || !this.enableVirtualScroll)
486
- return;
487
- const scrollTop = this.scrollContainer.scrollTop;
488
- const viewportHeight = this.scrollContainer.clientHeight;
489
- // 1. Calculate the current "Row" index
490
- // We assume each row has a height of estimatedItemHeight (although it may differ in reality, this is sufficient for visible window calculation)
491
- const startRow = Math.floor(scrollTop / this.estimatedItemHeight);
492
- // 2. Buffer row count
493
- const bufferRows = 3;
494
- // 3. Calculate visible rows
495
- const visibleRows = Math.ceil(viewportHeight / this.estimatedItemHeight);
496
- // 4. Calculate start and end rows for rendering
497
- const renderStartRow = Math.max(0, startRow - bufferRows);
498
- const renderEndRow = startRow + visibleRows + bufferRows;
499
- // 5. Convert to Item indices (Row * Columns)
500
- const startIndex = renderStartRow * this.columns;
501
- const endIndex = Math.min(this.items.length, renderEndRow * this.columns);
502
- if (this.visibleStartIndex !== startIndex || this.visibleEndIndex !== endIndex) {
503
- this.visibleStartIndex = startIndex;
504
- this.visibleEndIndex = endIndex;
505
- }
506
- }
507
417
  render() {
508
- const { items, visibleStartIndex, visibleEndIndex, estimatedItemHeight, columns, gridGap, minItemWidth } = this;
509
- // Check if we should show skeleton: items are empty, loading is true, and renderSkeleton is provided
418
+ const { items, minItemWidth, gridGap } = this;
510
419
  const showSkeleton = items.length === 0 && !!this.renderSkeleton && this.isLoading;
511
- // Virtual Scroll Calculations for Spacer
512
- let paddingTop = 0;
513
- let paddingBottom = 0;
514
- let visibleItems = [];
515
- if (this.enableVirtualScroll && !showSkeleton) {
516
- const totalRows = Math.ceil(items.length / columns);
517
- const startRow = Math.floor(visibleStartIndex / columns);
518
- // Note: Here we calculate how many rows are actually rendered based on the number of slices, for calculating bottom padding.
519
- const renderedCount = visibleEndIndex - visibleStartIndex;
520
- const renderedRows = Math.ceil(renderedCount / columns);
521
- // Top Spacer: Number of rows hidden at the top * Estimated height
522
- paddingTop = startRow * estimatedItemHeight;
523
- // Bottom Spacer: Total rows - (Top rows + Rendered rows) * Estimated height
524
- // Ensure the total scroll height is roughly correct
525
- paddingBottom = Math.max(0, (totalRows - startRow - renderedRows) * estimatedItemHeight);
526
- visibleItems = items.slice(visibleStartIndex, visibleEndIndex);
527
- }
528
- else {
529
- visibleItems = showSkeleton ? new Array(this.skeletonCount).fill(null) : items;
530
- }
531
- // Styles
420
+ const listToRender = showSkeleton ? new Array(this.skeletonCount).fill(null) : items;
532
421
  const contentTransform = {
533
422
  transform: `translateY(${this.pullDistance}px)`,
534
423
  transition: this.isTouching ? 'none' : 'transform 0.3s ease-out'
535
424
  };
536
- // Grid Layout Style
537
425
  const listStyle = {
538
426
  display: 'grid',
539
- // Responsive column width
540
427
  gridTemplateColumns: `repeat(auto-fill, minmax(${minItemWidth}px, 1fr))`,
541
428
  gap: `${gridGap}px`,
542
- // Even with Flex/Grid, we don't need absolute positioning, use margin/padding for spacing
543
- paddingTop: `${paddingTop}px`,
544
- paddingBottom: `${paddingBottom}px`,
545
429
  boxSizing: 'border-box'
546
430
  };
547
- return (h("div", { key: '366232c373082c1a825da935fd02039c3cef5653', class: "lottery-infinite-scroll__container", style: {
431
+ return (h("div", { key: 'eab20294c6af2caafbf03ddefb58947398b5c6e1', class: "lottery-infinite-scroll__container", style: {
548
432
  height: this.containerHeight,
549
433
  overflowY: 'auto',
550
- position: 'relative',
551
- contain: 'strict' // Performance optimization
552
- }, ref: (el) => (this.scrollContainer = el), onScroll: this.onScroll, onTouchStart: this.handleTouchStart, onTouchMove: this.handleTouchMove, onTouchEnd: this.handleTouchEnd }, h("div", { key: '1dbe68c185299f989101ad2489319ebab82c44da', class: "ptr-indicator", style: Object.assign(Object.assign({}, contentTransform), { position: 'absolute', top: '0', left: '0', width: '100%', height: `${this.pullTriggerDistance}px`, display: 'flex', alignItems: 'center', justifyContent: 'center', marginTop: `-${this.pullTriggerDistance}px`, pointerEvents: 'none' }) }, this.isRefreshing ? (h("slot", { name: "refresh-loading" }, "Refreshing...")) : (h("slot", { name: "pull-hint" }, this.pullDistance > this.pullTriggerDistance ? 'Release' : 'Pull'))), h("div", { key: 'd058018d407dd0e003571e0c1259f837deb093be', class: "scroll-content-wrapper", style: contentTransform }, h("div", { key: '1041eb5548bc79c2a507477013e3e34f35e25c22', class: "list-content", style: listStyle }, visibleItems.map((item, i) => {
553
- /* Pass the real index to renderItem */
554
- const realIndex = this.enableVirtualScroll && !showSkeleton ? visibleStartIndex + i : i;
555
- return (h("div", { key: realIndex, class: "list-item-wrapper" }, showSkeleton
556
- ? this.renderSkeleton
557
- ? this.renderSkeleton(realIndex)
558
- : null
559
- : this.renderItem
560
- ? this.renderItem(item, realIndex)
561
- : null));
562
- })), (this.hasMore || (this.isLoading && !showSkeleton)) && (h("div", { key: '0af2a85096fc16e9071ec0363a4eb58753324247', class: "lottery-infinite-scroll__sentinel", ref: (el) => (this.sentinel = el), style: { height: '20px', display: 'flex', justifyContent: 'center' } }, this.isLoading ? h("slot", { name: "loading-more" }, "Loading...") : null)), !this.hasMore && !this.isLoading && items.length > 0 && (h("div", { key: 'e6e814a96727e2442137412c25ec09908b2f9015', class: "end-message", style: { textAlign: 'center', padding: '10px' } }, h("slot", { key: '02831150b863992dabd59ab01f7bbb23066877bf', name: "end-message" }, "No more data"))))));
434
+ position: 'relative'
435
+ }, ref: (el) => (this.scrollContainer = el), onTouchStart: this.handleTouchStart, onTouchMove: this.handleTouchMove, onTouchEnd: this.handleTouchEnd }, h("div", { key: 'd2bf17db3948ef45cf9d77c663d7a6b6075e8125', class: "ptr-indicator", style: Object.assign(Object.assign({}, contentTransform), { position: 'absolute', top: '0', left: '0', width: '100%', height: `${this.pullTriggerDistance}px`, display: 'flex', alignItems: 'center', justifyContent: 'center', marginTop: `-${this.pullTriggerDistance}px`, pointerEvents: 'none' }) }, this.isRefreshing ? (h("slot", { name: "refresh-loading" }, "Refreshing...")) : (h("slot", { name: "pull-hint" }, this.pullDistance > this.pullTriggerDistance ? 'Release' : 'Pull'))), h("div", { key: '48e8997513bf547a0aa8eac7d036ce29f294fff0', class: "scroll-content-wrapper", style: contentTransform }, h("div", { key: '31c4de5010e1357239ccef2c9c009f7e2cfb5287', class: "list-content", style: listStyle }, listToRender.map((item, index) => (h("div", { key: index, class: "list-item-wrapper" }, showSkeleton ? this.renderSkeleton(index) : this.renderItem(item, index))))), h("div", { key: '6b0235f48d4c909c2edd400c3eb1d7efd030458e', class: "lottery-infinite-scroll__sentinel", ref: (el) => (this.sentinel = el), style: {
436
+ height: '20px',
437
+ display: 'flex',
438
+ justifyContent: 'center',
439
+ visibility: (this.hasMore || (this.isLoading && !showSkeleton)) ? 'visible' : 'hidden'
440
+ } }, this.isLoading ? h("slot", { name: "loading-more" }, "Loading...") : null), !this.hasMore && !this.isLoading && items.length > 0 && (h("div", { key: '24406925b5f96f2e9be9d06a2d87166e94d2bdad', class: "end-message", style: { textAlign: 'center', padding: '10px' } }, h("slot", { key: '189fe2d6f00551cac97267f2047fd76402b862bb', name: "end-message" }, "No more data"))))));
563
441
  }
564
442
  get el() { return getElement(this); }
565
443
  static get watchers() { return {
566
- "items": ["handleItemsChange"],
567
444
  "isRefreshing": ["handleRefreshingChange"]
568
445
  }; }
569
446
  };
@@ -2574,7 +2574,6 @@ const LotteryHakunaTicketHistory = class {
2574
2574
  this.playerId = undefined;
2575
2575
  this.sessionId = '';
2576
2576
  this.scrollThreshold = '0px 0px 200px 0px';
2577
- this.scrollItemHeight = 110;
2578
2577
  this.scrollContainerHeight = 500;
2579
2578
  this.ticketHistoryTitle = 'YOUR TICKET';
2580
2579
  this.ticketHistoryItemImageSrc = undefined;
@@ -2678,7 +2677,7 @@ const LotteryHakunaTicketHistory = class {
2678
2677
  return (h("svg", { width: "45", height: "45", viewBox: "0 0 45 45", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", fill: "currentColor", d: "M22.5 5.625C13.1802 5.625 5.625 13.1802 5.625 22.5C5.625 31.8198 13.1802 39.375 22.5 39.375C31.8198 39.375 39.375 31.8198 39.375 22.5C39.375 13.1802 31.8198 5.625 22.5 5.625ZM1.875 22.5C1.875 11.1091 11.1091 1.875 22.5 1.875C33.8909 1.875 43.125 11.1091 43.125 22.5C43.125 33.8909 33.8909 43.125 22.5 43.125C11.1091 43.125 1.875 33.8909 1.875 22.5ZM22.5 13.125C23.5355 13.125 24.375 13.9645 24.375 15V22.5C24.375 23.5355 23.5355 24.375 22.5 24.375C21.4645 24.375 20.625 23.5355 20.625 22.5V15C20.625 13.9645 21.4645 13.125 22.5 13.125ZM20.625 30C20.625 28.9645 21.4645 28.125 22.5 28.125H22.5188C23.5543 28.125 24.3938 28.9645 24.3938 30C24.3938 31.0355 23.5543 31.875 22.5188 31.875H22.5C21.4645 31.875 20.625 31.0355 20.625 30Z" })));
2679
2678
  }
2680
2679
  render() {
2681
- return (h("div", { key: 'f150fbefd3394af032c600f9b939357bc07ef7db', class: "lottery-hakuna-ticket-history__container", ref: (el) => (this.stylingContainer = el) }, h("div", { key: '67e83eb97dbb358b1d057c1c7948fc8f6e4bc363', class: "lottery-hakuna-ticket-history__title" }, this.ticketHistoryTitle), this.errorMessage && (h("div", { key: 'cae8e46734e5ac71874dbd3d28a861218b5c67eb', class: "lottery-hakuna-ticket-history__error-message" }, this.renderInfoIcon(), h("span", { key: '7c8feec0afda57a6546da5ad9ddc5e35d52683ac' }, this.errorMessage))), h("lottery-infinite-scroll", { key: '828de5559807ea0314d05be5e17ce2340b494a5f', "client-styling": this.clientStyling, "client-styling-url": this.clientStylingUrl, "mb-source": this.mbSource, hasMore: this.hasMore, enableVirtualScroll: true, items: [...this.visibleTickets], estimatedItemHeight: this.scrollItemHeight, minItemWidth: this.minItemWidth, threshold: this.scrollThreshold, gridGap: 10, isLoading: this.isLoading, isRefreshing: this.isRefreshing, onLoadMore: this.handleLoadMore, onRefresh: this.handleRefresh, renderItem: this.renderItem, renderSkeleton: this.showSkeleton ? this.renderSkeleton : null, skeletonCount: this.limit }, h("div", { key: '833b363afc9d355fd6ec1e50a848f759f4f7c1b9', slot: "loading-more", class: "lottery-hakuna-ticket-history__loading-more" }, h("span", { key: '8cf28988956c1710e4adfc6c169761bf3c833e6a', class: "loading-spinner", innerHTML: loadingOutLinedSvg })), h("div", { key: '9faed4a64236ff2a7ae920499fe236aec3393433', slot: "refresh-loading", class: "lottery-hakuna-ticket-history__refresh-loading" }, this.listRefreshingText || translate('releaseToRefresh', this.language)), h("div", { key: 'b61b6aeaadda6e8e0b48d58e2f9ad7f77e57badf', slot: "end-message", class: "lottery-hakuna-ticket-history__end-message" }, this.listEndText || translate('youHaveReachedTheEnd', this.language)))));
2680
+ return (h("div", { key: 'f670a3429de4b967f7ea6de648e91201f08611c3', class: "lottery-hakuna-ticket-history__container", ref: (el) => (this.stylingContainer = el) }, h("div", { key: 'e1f7c9acdfccf3b059af66f6be956027fe9157a9', class: "lottery-hakuna-ticket-history__title" }, this.ticketHistoryTitle), this.errorMessage && (h("div", { key: 'db36df4b9e6277883149a7dfd905b458656c6956', class: "lottery-hakuna-ticket-history__error-message" }, this.renderInfoIcon(), h("span", { key: 'bf55f6af11f8760b75b76c3866714ca311671ef4' }, this.errorMessage))), h("lottery-infinite-scroll", { key: '33d57ff5205e065ce989d88a5f4ab22ed8ce8520', "client-styling": this.clientStyling, "client-styling-url": this.clientStylingUrl, "mb-source": this.mbSource, hasMore: this.hasMore, items: [...this.visibleTickets], minItemWidth: this.minItemWidth, threshold: this.scrollThreshold, gridGap: 10, isLoading: this.isLoading, isRefreshing: this.isRefreshing, onLoadMore: this.handleLoadMore, onRefresh: this.handleRefresh, renderItem: this.renderItem, renderSkeleton: this.showSkeleton ? this.renderSkeleton : null, skeletonCount: this.limit }, h("div", { key: '3c64ee5287ec0e1be431890c2a2a1e9011fb41f0', slot: "loading-more", class: "lottery-hakuna-ticket-history__loading-more" }, h("span", { key: '23f990cea7385a6de85cc246d2e9c8d942d9838d', class: "loading-spinner", innerHTML: loadingOutLinedSvg })), h("div", { key: '74a90a269101258ac8e8e642773c57fe1aef7971', slot: "refresh-loading", class: "lottery-hakuna-ticket-history__refresh-loading" }, this.listRefreshingText || translate('releaseToRefresh', this.language)), h("div", { key: 'ffa6650f925314df9ea067422ce60f38bee01f0e', slot: "end-message", class: "lottery-hakuna-ticket-history__end-message" }, this.listEndText || translate('youHaveReachedTheEnd', this.language)))));
2682
2681
  }
2683
2682
  static get watchers() { return {
2684
2683
  "clientStyling": ["handleClientStylingChange"],
@@ -16,5 +16,5 @@ var patchBrowser = () => {
16
16
 
17
17
  patchBrowser().then(async (options) => {
18
18
  await globalScripts();
19
- return bootstrapLazy([["lottery-button_8",[[1,"lottery-hakuna-ticket-history",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"translationUrl":[513,"translation-url"],"endpoint":[513],"gameId":[513,"game-id"],"playerId":[514,"player-id"],"sessionId":[513,"session-id"],"scrollThreshold":[1,"scroll-threshold"],"scrollItemHeight":[2,"scroll-item-height"],"scrollContainerHeight":[2,"scroll-container-height"],"ticketHistoryTitle":[1,"ticket-history-title"],"ticketHistoryItemImageSrc":[1,"ticket-history-item-image-src"],"ticketHistoryItemName":[1,"ticket-history-item-name"],"ticketHistoryItemCurrency":[1,"ticket-history-item-currency"],"listLoadingText":[1,"list-loading-text"],"listRefreshingText":[1,"list-refreshing-text"],"listEndText":[1,"list-end-text"],"limit":[2],"minItemWidth":[2,"min-item-width"],"showSkeleton":[4,"show-skeleton"],"visibleTickets":[32],"hasMore":[32],"isLoading":[32],"isRefreshing":[32],"errorMessage":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-hakuna-ticket-history-item",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"translationUrl":[513,"translation-url"],"historyItemName":[1,"history-item-name"],"historyItemImageSrc":[1,"history-item-image-src"],"ticketId":[8,"ticket-id"],"totalAmount":[1,"total-amount"],"date":[1],"time":[1],"selectedNumbers":[1,"selected-numbers"],"showSkeleton":[4,"show-skeleton"],"selectedNumbersCount":[2,"selected-numbers-count"]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-infinite-scroll",{"items":[16],"hasMore":[4,"has-more"],"isLoading":[4,"is-loading"],"isRefreshing":[4,"is-refreshing"],"threshold":[1],"estimatedItemHeight":[2,"estimated-item-height"],"containerHeight":[1,"container-height"],"enableVirtualScroll":[4,"enable-virtual-scroll"],"renderItem":[16],"renderSkeleton":[16],"skeletonCount":[2,"skeleton-count"],"pullTriggerDistance":[2,"pull-trigger-distance"],"minItemWidth":[2,"min-item-width"],"gridGap":[2,"grid-gap"],"visibleStartIndex":[32],"visibleEndIndex":[32],"pullDistance":[32],"columns":[32]},null,{"items":["handleItemsChange"],"isRefreshing":["handleRefreshingChange"]}],[1,"lottery-selection-group",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"translationUrl":[513,"translation-url"],"splitToken":[513,"split-token"],"selectionGroupId":[513,"selection-group-id"],"selectionGroupLabel":[513,"selection-group-label"],"type":[513],"selectedBulletTexts":[513,"selected-bullet-texts"],"maxSelectedCount":[514,"max-selected-count"],"maxDisplayBulletsCount":[514,"max-display-bullets-count"],"bulletTexts":[513,"bullet-texts"],"maxIntegerBulletText":[514,"max-integer-bullet-text"],"minIntegerBulletText":[514,"min-integer-bullet-text"],"bulletTextType":[513,"bullet-text-type"],"hasBorder":[516,"has-border"],"hasBackground":[516,"has-background"],"dialogTitle":[513,"dialog-title"],"dialogInputPlaceholder":[513,"dialog-input-placeholder"],"dialogConfig":[32],"inputInfo":[32]},[[0,"lotteryBulletClick","lotteryBulletClickHandler"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}],[1,"lottery-button",{"variant":[513],"size":[513],"color":[513],"disabled":[516],"loading":[516],"text":[513],"mbSource":[513,"mb-source"],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"ripples":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-selection",{"value":[520],"text":[513],"idx":[514],"type":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"hasBorder":[516,"has-border"],"hasBackground":[516,"has-background"],"deleteIconSvg":[513,"delete-icon-svg"],"deleteIconWidth":[513,"delete-icon-width"],"deleteIconHeight":[513,"delete-icon-height"]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-tipping-dialog",{"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"visible":[516],"dialogTitle":[1,"dialog-title"],"width":[1],"closable":[4],"mask":[4],"maskClosable":[4,"mask-closable"],"animationDuration":[2,"animation-duration"],"fullscreen":[4],"showFooter":[4,"show-footer"],"showCancelBtn":[4,"show-cancel-btn"],"language":[513],"translationUrl":[520,"translation-url"],"dialogClass":[1,"dialog-class"],"dialogStyle":[16]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
19
+ return bootstrapLazy([["lottery-button_8",[[1,"lottery-hakuna-ticket-history",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"translationUrl":[513,"translation-url"],"endpoint":[513],"gameId":[513,"game-id"],"playerId":[514,"player-id"],"sessionId":[513,"session-id"],"scrollThreshold":[1,"scroll-threshold"],"scrollContainerHeight":[2,"scroll-container-height"],"ticketHistoryTitle":[1,"ticket-history-title"],"ticketHistoryItemImageSrc":[1,"ticket-history-item-image-src"],"ticketHistoryItemName":[1,"ticket-history-item-name"],"ticketHistoryItemCurrency":[1,"ticket-history-item-currency"],"listLoadingText":[1,"list-loading-text"],"listRefreshingText":[1,"list-refreshing-text"],"listEndText":[1,"list-end-text"],"limit":[2],"minItemWidth":[2,"min-item-width"],"showSkeleton":[4,"show-skeleton"],"visibleTickets":[32],"hasMore":[32],"isLoading":[32],"isRefreshing":[32],"errorMessage":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-hakuna-ticket-history-item",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"translationUrl":[513,"translation-url"],"historyItemName":[1,"history-item-name"],"historyItemImageSrc":[1,"history-item-image-src"],"ticketId":[8,"ticket-id"],"totalAmount":[1,"total-amount"],"date":[1],"time":[1],"selectedNumbers":[1,"selected-numbers"],"showSkeleton":[4,"show-skeleton"],"selectedNumbersCount":[2,"selected-numbers-count"]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-infinite-scroll",{"items":[16],"hasMore":[4,"has-more"],"isLoading":[4,"is-loading"],"isRefreshing":[4,"is-refreshing"],"threshold":[1],"containerHeight":[1,"container-height"],"renderItem":[16],"renderSkeleton":[16],"skeletonCount":[2,"skeleton-count"],"pullTriggerDistance":[2,"pull-trigger-distance"],"minItemWidth":[2,"min-item-width"],"gridGap":[2,"grid-gap"],"pullDistance":[32]},null,{"isRefreshing":["handleRefreshingChange"]}],[1,"lottery-selection-group",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"translationUrl":[513,"translation-url"],"splitToken":[513,"split-token"],"selectionGroupId":[513,"selection-group-id"],"selectionGroupLabel":[513,"selection-group-label"],"type":[513],"selectedBulletTexts":[513,"selected-bullet-texts"],"maxSelectedCount":[514,"max-selected-count"],"maxDisplayBulletsCount":[514,"max-display-bullets-count"],"bulletTexts":[513,"bullet-texts"],"maxIntegerBulletText":[514,"max-integer-bullet-text"],"minIntegerBulletText":[514,"min-integer-bullet-text"],"bulletTextType":[513,"bullet-text-type"],"hasBorder":[516,"has-border"],"hasBackground":[516,"has-background"],"dialogTitle":[513,"dialog-title"],"dialogInputPlaceholder":[513,"dialog-input-placeholder"],"dialogConfig":[32],"inputInfo":[32]},[[0,"lotteryBulletClick","lotteryBulletClickHandler"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}],[1,"lottery-button",{"variant":[513],"size":[513],"color":[513],"disabled":[516],"loading":[516],"text":[513],"mbSource":[513,"mb-source"],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"ripples":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-selection",{"value":[520],"text":[513],"idx":[514],"type":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"hasBorder":[516,"has-border"],"hasBackground":[516,"has-background"],"deleteIconSvg":[513,"delete-icon-svg"],"deleteIconWidth":[513,"delete-icon-width"],"deleteIconHeight":[513,"delete-icon-height"]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-tipping-dialog",{"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"visible":[516],"dialogTitle":[1,"dialog-title"],"width":[1],"closable":[4],"mask":[4],"maskClosable":[4,"mask-closable"],"animationDuration":[2,"animation-duration"],"fullscreen":[4],"showFooter":[4,"show-footer"],"showCancelBtn":[4,"show-cancel-btn"],"language":[513],"translationUrl":[520,"translation-url"],"dialogClass":[1,"dialog-class"],"dialogStyle":[16]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
20
20
  });
@@ -1 +1 @@
1
- export{L as LotteryHakunaTicketHistory}from"./lottery-hakuna-ticket-history-cdab50d9.js";import"./index-50addd47.js";
1
+ export{L as LotteryHakunaTicketHistory}from"./lottery-hakuna-ticket-history-4cb107bf.js";import"./index-50addd47.js";
@@ -1 +1 @@
1
- import{r as t,h as e,g as i,c as r,H as o}from"./index-50addd47.js";import{s as n,a as s,b as a,r as l}from"./lottery-hakuna-ticket-history-cdab50d9.js";export{L as lottery_hakuna_ticket_history}from"./lottery-hakuna-ticket-history-cdab50d9.js";const h={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"},c=["ro","en","fr","ar","hr","zh"],d={en:{loading:"Loading"},ro:{},fr:{},ar:{},hr:{}},u=class{constructor(e){t(this,e),this.handleClick=t=>{if(this.disabled)return;const e=this.host.shadowRoot.querySelector(".btn");if(!e)return;const i=e.getBoundingClientRect(),r=Math.max(i.width,i.height),o={top:t.clientY-i.top-r/2,left:t.clientX-i.left-r/2,size:r};this.ripples=[...this.ripples,o],setTimeout((()=>{this.ripples=this.ripples.filter((t=>t!==o))}),600)},this.variant="primary",this.size="medium",this.color=void 0,this.disabled=!1,this.loading=!1,this.text=void 0,this.mbSource=void 0,this.language="en",this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.ripples=[]}handleClientStylingChange(t,e){t!=e&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&a(this.stylingContainer,`${this.mbSource}.Style`)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}componentWillLoad(){this.translationUrl&&(async t=>{if(t)try{const i=await fetch(t);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const r=await i.json();e=r,Object.keys(e).forEach((t=>{for(let i in e[t])d[t][i]=e[t][i]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl)}render(){const{variant:t,disabled:i,size:r,color:o}=this,n=i||this.loading,s={};if(o)switch(t){case"primary":default:Object.assign(s,{backgroundColor:o,borderColor:o});break;case"outline":case"dashed":Object.assign(s,{color:o,borderColor:o});break;case"text":Object.assign(s,{color:o})}return e("button",{key:"aa74ad98c90e7548228557bf8a8d26b125d4a83a",class:{btn:!0,[`btn--${t}`]:!0,[`btn--${r}`]:!0,"btn--loading":this.loading},style:o?s:void 0,disabled:n,onClick:this.handleClick,ref:t=>this.stylingContainer=t},this.loading?e("div",{class:"loading-container"},e("span",{class:"content"},this.text||(()=>{const t=this.language;let e=d[void 0!==t&&c.includes(t)?t:"en"].loading;return e})()),e("span",{class:"spinner"})):e("span",{class:"content"},e("slot",{name:"icon-left"}),this.text||e("slot",null),e("slot",{name:"icon-right"})),e("div",{key:"302ea02be395bb24989d4abc040a513e23fa029a",class:"ripple-container"},this.ripples.map(((t,i)=>e("span",{key:i,class:"ripple",style:{top:`${t.top}px`,left:`${t.left}px`,width:`${t.size}px`,height:`${t.size}px`}})))))}get host(){return i(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};u.style=":host{display:inline-block}.btn{font:inherit;position:relative;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:var(--lottery-button-border-radius, 6px);font-weight:var(--lottery-button-font-weight, 500);cursor:pointer;outline:none;overflow:hidden;transition:var(--lottery-button-transition, background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s);user-select:none;-webkit-tap-highlight-color:transparent;box-shadow:var(--lottery-button-box-shadow, 0 2px 4px 0 rgba(0, 0, 0, 0.5))}.btn .content{position:relative;display:inline-flex;align-items:center;gap:var(--lottery-button-content-gap, 0.5em)}.btn .content ::slotted(span){display:inline-flex;align-items:center}.btn:hover:not(:disabled){box-shadow:var(--lottery-button-hover-box-shadow, 0 4px 8px 0 rgba(0, 0, 0, 0.5))}.btn:disabled{cursor:not-allowed;opacity:var(--lottery-button-disabled-opacity, 0.5)}.btn .loading-container{display:flex;align-items:center}.btn--loading{position:relative}.btn .spinner{display:inline-block;width:1em;height:1em;border:var(--lottery-button-spinner-border, 2px solid rgba(255, 255, 255, 0.3));border-radius:50%;border-top-color:var(--lottery-button-spinner-color, white);animation:spin 1s ease-in-out infinite;margin-left:0.5em;vertical-align:middle}.btn--small .spinner{width:0.8em;height:0.8em}.btn--large .spinner{width:1.2em;height:1.2em}@keyframes spin{to{transform:rotate(360deg)}}.btn--primary{background-color:var(--emw--color-primary, #0d196e);color:var(--emw--color-typography-inverse, #fff)}.btn--primary:hover:not(:disabled){background-color:var(--emw--color-primary-variant, #1367e7)}.btn--primary:active:not(:disabled){background-color:var(--lottery-button-primary-active-bg, #08104a)}.btn--outline .spinner,.btn--dashed .spinner,.btn--text .spinner{border-top-color:currentColor;border-color:var(--lottery-button-spinner-inverse-border-color, rgba(0, 0, 0, 0.2))}.btn--outline{background-color:var(--emw--color-background, #fff);border-color:var(--lottery-button-outline-border-color, #dcdcdc);color:var(--emw--color-typography, #000)}.btn--outline:hover:not(:disabled){background-color:var(--emw--color-background-tertiary, #ccc);border-color:var(--lottery-button-outline-hover-border-color, #a6a6a6)}.btn--outline:active:not(:disabled){background-color:var(--lottery-button-outline-active-bg, #e6e6e6)}.btn--dashed{background-color:transparent;border-style:dashed;border-color:var(--lottery-button-dashed-border-color, #dcdcdc);color:var(--lottery-button-dashed-color, #333)}.btn--dashed:hover:not(:disabled){border-color:var(--lottery-button-dashed-hover-border-color, #a6a6a6);color:var(--lottery-button-dashed-hover-color, #0052d9)}.btn--text{background-color:transparent;color:var(--lottery-button-text-color, #0052d9);border-color:transparent}.btn--text:hover:not(:disabled){background-color:var(--lottery-button-text-hover-bg, #f2f2f2)}.btn--text:active:not(:disabled){background-color:var(--lottery-button-text-active-bg, #e6e6e6)}.btn--custom-color:hover:not(:disabled){opacity:var(--lottery-button-custom-hover-opacity, 0.9)}.btn--custom-color:active:not(:disabled){opacity:var(--lottery-button-custom-active-opacity, 0.8)}.btn--small{height:var(--lottery-button-small-height, 28px);font-size:var(--lottery-button-small-font-size, 12px);padding:var(--lottery-button-small-padding, 0 12px)}.btn--medium{height:var(--lottery-button-medium-height, 34px);font-size:var(--lottery-button-medium-font-size, 14px);padding:var(--lottery-button-medium-padding, 0 18px)}.btn--large{height:var(--lottery-button-large-height, 40px);font-size:var(--lottery-button-large-font-size, 16px);padding:var(--lottery-button-large-padding, 0 24px)}.ripple-container{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;pointer-events:none;border-radius:inherit}.ripple{position:absolute;border-radius:50%;background-color:var(--lottery-button-ripple-light, rgba(255, 255, 255, 0.3));transform:scale(0);animation:ripple-animation 600ms linear}.btn--outline .ripple,.btn--dashed .ripple,.btn--text .ripple{background-color:var(--lottery-button-ripple-dark, rgba(0, 0, 0, 0.03))}@keyframes ripple-animation{to{transform:scale(4);opacity:0}}";const g=["ro","en","fr","ar","hr"],b={en:{total:"Total:"}},p=class{constructor(i){t(this,i),this.selectionGroupStyle="\n :host{\n --lottery-selection-width: 24px;\n --lottery-selection-height: 24px;\n --lottery-selection-padding: 10px;\n --lottery-selection-border-radius: 6px;\n --lottery-selection-border-width: 1px;\n --lottery-selection-border-color: var(--emw-hakuna-color-primary, #c52217);\n\n --lottery-selection-color: var(--emw-hakuna-text-primary, #ffffff);\n --lottery-selection-font-size: 14px;\n --lottery-selection-font-weight: 500;\n\n --lottery-selection-hover-background: transparent;\n --lottery-selection-hover-border-color: var(--emw-hakuna-color-primary, #c52217);\n --lottery-selection-hover-color: var(--emw-hakuna-text-primary, #ffffff);\n\n .lottery-selection__button{\n box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.15);\n line-height: normal;\n }\n .lottery-selection__button:hover{\n cursor: default;\n }\n --lottery-selection-group-item-gap:6px;\n }\n ",this.renderSkeleton=()=>e("div",{class:"lottery-hakuna-ticket-history-item__container"},e("div",{class:"lottery-hakuna-ticket-history-item__top"},e("div",{class:"lottery-hakuna-ticket-history-item__country-wrapper"},e("ui-skeleton",{structure:"image",width:"30px",height:"20px"}),e("ui-skeleton",{structure:"title",width:"86px",height:"17px",marginBottom:0})),e("div",{class:"lottery-hakuna-ticket-history-item__details"},e("ui-skeleton",{structure:"text",width:"60%",height:"20px"}))),e("div",{class:"lottery-hakuna-ticket-history-item__bottom"},e("div",{class:"lottery-hakuna-ticket-history-item__numbers-wrapper"},new Array(this.selectedNumbersCount).fill(e("ui-skeleton",{borderRadius:"8px",structure:"rectangle",width:"24px",height:"24px"}))),e("div",{class:"lottery-hakuna-ticket-history-item__date-wrapper"},e("ui-skeleton",{structure:"text",width:"180px",height:"14px"})))),this.renderMain=()=>e("div",{class:"lottery-hakuna-ticket-history-item__container"},e("div",{class:"lottery-hakuna-ticket-history-item__top"},e("div",{class:"lottery-hakuna-ticket-history-item__country-wrapper"},this.historyItemImageSrc&&e("img",{src:this.historyItemImageSrc,alt:this.historyItemName,class:"lottery-hakuna-ticket-history-item__country-flag"}),e("span",{class:"lottery-hakuna-ticket-history-item__country-name"},this.historyItemName)),e("div",{class:"lottery-hakuna-ticket-history-item__details"},e("span",{class:"lottery-hakuna-ticket-history-item__meta"},(()=>{const t=this.language;let e=b[void 0!==t&&g.includes(t)?t:"en"].total;return e})(),e("span",{class:"lottery-hakuna-ticket-history-item__meta-value"},this.totalAmount)))),e("div",{class:"lottery-hakuna-ticket-history-item__bottom"},e("div",{class:"lottery-hakuna-ticket-history-item__numbers-wrapper"},this.selectedNumbers&&e("lottery-selection-group",{type:"preview",bulletTexts:this.selectedNumbers,clientStyling:this.selectionGroupStyle+(this.clientStyling||""),clientStylingUrl:this.clientStylingUrl,mbSource:this.mbSource,hasBorder:!0,hasBackground:!1,selectionGroupId:this.ticketId?this.ticketId.toString():void 0})),e("div",{class:"lottery-hakuna-ticket-history-item__date-wrapper"},this.date&&e("div",null,this.date),this.time&&e("div",null,this.time)))),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.language="en",this.translationUrl="",this.historyItemName=void 0,this.historyItemImageSrc=void 0,this.ticketId=void 0,this.totalAmount=void 0,this.date=void 0,this.time=void 0,this.selectedNumbers=void 0,this.showSkeleton=!1,this.selectedNumbersCount=6}handleClientStylingChange(t,e){t!=e&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&a(this.stylingContainer,`${this.mbSource}.Style`)}async componentWillLoad(){(async t=>{if(t)try{const i=await fetch(t);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const r=await i.json();e=r,Object.keys(e).forEach((t=>{for(let i in e[t])b[t][i]=e[t][i]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return e("div",{key:"d22e301e9824aa3539e0c11ed52a1bddc5e1fb9c",ref:t=>this.stylingContainer=t,class:"lottery-hakuna-ticket-history-item__container-wrapper"},this.showSkeleton?this.renderSkeleton():this.renderMain())}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};p.style=".lottery-hakuna-ticket-history-item__container{display:flex;padding:var(--lottery-hakuna-ticket-history-item-container-padding, 20px);flex-direction:column;justify-content:center;gap:var(--lottery-hakuna-ticket-history-item-container-gap, 16px);border-radius:var(--lottery-hakuna-ticket-history-item-container-border-radius, 12px);border:1px solid transparent;min-width:var(--lottery-hakuna-ticket-history-item-container-min-width, 200px);background-origin:border-box;background-clip:padding-box, border-box;background-image:linear-gradient(var(--emw-hakuna-bg-secondary, #120505), var(--emw-hakuna-bg-secondary, #120505)), linear-gradient(to top left, var(--emw-hakuna-color-primary, #c52217) var(--lottery-hakuna-ticket-history-item-border-gradient-start-stop, 22%), var(--emw-hakuna-bg-primary, #2c2525) var(--lottery-hakuna-ticket-history-item-border-gradient-end-stop, 68%))}.lottery-hakuna-ticket-history-item__top{display:flex;justify-content:space-between;align-items:center}.lottery-hakuna-ticket-history-item__country-wrapper{display:flex;align-items:center;gap:10px}.lottery-hakuna-ticket-history-item__country-flag{width:var(--lottery-hakuna-ticket-history-item-country-flag-width, 30px);object-fit:cover;aspect-ratio:var(--lottery-hakuna-ticket-history-item-country-flag-aspect-ratio, 3/2)}.lottery-hakuna-ticket-history-item__country-name{color:var(--lottery-hakuna-ticket-history-item-country-name-color, #fff);font-size:var(--lottery-hakuna-ticket-history-item-country-name-font-size, 14px);font-style:normal;font-weight:var(--lottery-hakuna-ticket-history-item-country-name-font-weight, 700);line-height:var(--lottery-hakuna-ticket-history-item-country-name-line-height, normal)}.lottery-hakuna-ticket-history-item__details{display:flex;gap:var(--lottery-hakuna-ticket-history-item-details-gap, 13px);color:var(--emw-hakuna-text-secondary, #b4a5a5);font-size:var(--lottery-hakuna-ticket-history-item-details-font-size, 10px);font-style:normal;font-weight:var(--lottery-hakuna-ticket-history-item-details-font-weight, 700);line-height:var(--lottery-hakuna-ticket-history-item-details-line-height, normal)}.lottery-hakuna-ticket-history-item__meta{display:flex;gap:var(--lottery-hakuna-ticket-history-item-meta-gap, 10px)}.lottery-hakuna-ticket-history-item__meta-value{color:var(--lottery-hakuna-ticket-history-item-meta-value-color, inherit)}.lottery-hakuna-ticket-history-item__bottom{display:flex;justify-content:space-between;align-items:center;align-self:stretch}.lottery-hakuna-ticket-history-item__numbers-wrapper{flex:1;display:flex;align-items:flex-start;gap:var(--lottery-hakuna-ticket-history-item-numbers-wrapper-gap, 8px);box-shadow:var(--lottery-hakuna-ticket-history-item-numbers-wrapper-box-shadow, 0 1px 2px 0 rgba(0, 0, 0, 0.25))}.lottery-hakuna-ticket-history-item__date-wrapper{color:var(--lottery-hakuna-ticket-history-item-date-wrapper-color, #fffefe);text-align:var(--lottery-hakuna-ticket-history-item-date-wrapper-text-align, right);font-size:var(--lottery-hakuna-ticket-history-item-date-wrapper-font-size, 8px);font-style:normal;font-weight:var(--lottery-hakuna-ticket-history-item-date-wrapper-font-weight, 400);line-height:var(--lottery-hakuna-ticket-history-item-date-wrapper-line-height, 125%);min-width:var(--lottery-hakuna-ticket-history-item-date-wrapper-min-width, 70px);max-width:var(--lottery-hakuna-ticket-history-item-date-wrapper-max-width, 100px)}lottery-selection-group{width:100%}ui-skeleton{--emw-skeleton-primary-color:#414141;--emw-skeleton-secondary-color:#2f2929}";const y=class{constructor(e){t(this,e),this.loadMore=r(this,"loadMore",7),this.refresh=r(this,"refresh",7),this.startY=0,this.isTouching=!1,this.onScroll=()=>{this.enableVirtualScroll&&(this.rafId&&cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame((()=>this.calculateVisibleRange())))},this.handleTouchStart=t=>{this.scrollContainer.scrollTop<=0&&(this.startY=t.touches[0].clientY,this.isTouching=!0)},this.handleTouchMove=t=>{if(!this.isTouching||this.isRefreshing)return;const e=t.touches[0].clientY-this.startY;e>0&&this.scrollContainer.scrollTop<=0?(t.cancelable&&t.preventDefault(),this.pullDistance=Math.pow(e,.8)):(this.isTouching=!1,this.pullDistance=0)},this.handleTouchEnd=()=>{this.isTouching=!1,this.pullDistance>=this.pullTriggerDistance?(this.pullDistance=this.pullTriggerDistance,this.refresh.emit()):this.pullDistance=0},this.items=[],this.hasMore=!1,this.isLoading=!1,this.isRefreshing=!1,this.threshold="0px 0px 200px 0px",this.estimatedItemHeight=200,this.containerHeight="100%",this.enableVirtualScroll=!1,this.renderItem=void 0,this.renderSkeleton=void 0,this.skeletonCount=6,this.pullTriggerDistance=60,this.minItemWidth=340,this.gridGap=10,this.visibleStartIndex=0,this.visibleEndIndex=10,this.pullDistance=0,this.columns=1}componentDidLoad(){this.enableVirtualScroll&&(this.initResizeObserver(),this.calculateMetrics()),this.initObserver()}componentDidUpdate(){this.hasMore&&!this.isLoading&&this.initObserver()}disconnectedCallback(){this.disconnectObserver(),this.resizeObserver&&this.resizeObserver.disconnect(),this.rafId&&cancelAnimationFrame(this.rafId)}initResizeObserver(){window.ResizeObserver&&this.scrollContainer&&(this.resizeObserver=new ResizeObserver((t=>{for(let e of t)this.recalcColumns(e.contentRect.width),this.calculateVisibleRange()})),this.resizeObserver.observe(this.scrollContainer))}recalcColumns(t){if(!this.enableVirtualScroll)return;const e=Math.max(1,Math.floor((t+this.gridGap)/(this.minItemWidth+this.gridGap)));this.columns!==e&&(this.columns=e)}handleItemsChange(){this.enableVirtualScroll&&this.calculateVisibleRange()}handleRefreshingChange(t){t||(this.pullDistance=0)}disconnectObserver(){this.observer&&(this.observer.disconnect(),this.observer=null)}initObserver(){if(this.disconnectObserver(),!this.hasMore||this.isLoading||!this.sentinel)return;const t={root:this.scrollContainer===this.el.shadowRoot.querySelector(".lottery-infinite-scroll__container")?this.scrollContainer:null,rootMargin:this.threshold,threshold:.1};this.observer=new IntersectionObserver((t=>{t[0].isIntersecting&&this.hasMore&&!this.isLoading&&this.loadMore.emit()}),t),this.observer.observe(this.sentinel)}calculateMetrics(){this.scrollContainer&&(this.recalcColumns(this.scrollContainer.clientWidth),this.calculateVisibleRange())}calculateVisibleRange(){if(!this.scrollContainer||!this.enableVirtualScroll)return;const t=this.scrollContainer.clientHeight,e=Math.floor(this.scrollContainer.scrollTop/this.estimatedItemHeight),i=Math.ceil(t/this.estimatedItemHeight),r=Math.max(0,e-3)*this.columns,o=Math.min(this.items.length,(e+i+3)*this.columns);this.visibleStartIndex===r&&this.visibleEndIndex===o||(this.visibleStartIndex=r,this.visibleEndIndex=o)}render(){const{items:t,visibleStartIndex:i,visibleEndIndex:r,estimatedItemHeight:o,columns:n,gridGap:s,minItemWidth:a}=this,l=0===t.length&&!!this.renderSkeleton&&this.isLoading;let h=0,c=0,d=[];if(this.enableVirtualScroll&&!l){const e=Math.ceil(t.length/n),s=Math.floor(i/n),a=Math.ceil((r-i)/n);h=s*o,c=Math.max(0,(e-s-a)*o),d=t.slice(i,r)}else d=l?new Array(this.skeletonCount).fill(null):t;const u={transform:`translateY(${this.pullDistance}px)`,transition:this.isTouching?"none":"transform 0.3s ease-out"},g={display:"grid",gridTemplateColumns:`repeat(auto-fill, minmax(${a}px, 1fr))`,gap:`${s}px`,paddingTop:`${h}px`,paddingBottom:`${c}px`,boxSizing:"border-box"};return e("div",{key:"366232c373082c1a825da935fd02039c3cef5653",class:"lottery-infinite-scroll__container",style:{height:this.containerHeight,overflowY:"auto",position:"relative",contain:"strict"},ref:t=>this.scrollContainer=t,onScroll:this.onScroll,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd},e("div",{key:"1dbe68c185299f989101ad2489319ebab82c44da",class:"ptr-indicator",style:Object.assign(Object.assign({},u),{position:"absolute",top:"0",left:"0",width:"100%",height:`${this.pullTriggerDistance}px`,display:"flex",alignItems:"center",justifyContent:"center",marginTop:`-${this.pullTriggerDistance}px`,pointerEvents:"none"})},this.isRefreshing?e("slot",{name:"refresh-loading"},"Refreshing..."):e("slot",{name:"pull-hint"},this.pullDistance>this.pullTriggerDistance?"Release":"Pull")),e("div",{key:"d058018d407dd0e003571e0c1259f837deb093be",class:"scroll-content-wrapper",style:u},e("div",{key:"1041eb5548bc79c2a507477013e3e34f35e25c22",class:"list-content",style:g},d.map(((t,r)=>{const o=this.enableVirtualScroll&&!l?i+r:r;return e("div",{key:o,class:"list-item-wrapper"},l?this.renderSkeleton?this.renderSkeleton(o):null:this.renderItem?this.renderItem(t,o):null)}))),(this.hasMore||this.isLoading&&!l)&&e("div",{key:"0af2a85096fc16e9071ec0363a4eb58753324247",class:"lottery-infinite-scroll__sentinel",ref:t=>this.sentinel=t,style:{height:"20px",display:"flex",justifyContent:"center"}},this.isLoading?e("slot",{name:"loading-more"},"Loading..."):null),!this.hasMore&&!this.isLoading&&t.length>0&&e("div",{key:"e6e814a96727e2442137412c25ec09908b2f9015",class:"end-message",style:{textAlign:"center",padding:"10px"}},e("slot",{key:"02831150b863992dabd59ab01f7bbb23066877bf",name:"end-message"},"No more data"))))}get el(){return i(this)}static get watchers(){return{items:["handleItemsChange"],isRefreshing:["handleRefreshingChange"]}}};y.style=":host{display:block;width:100%}.lottery-infinite-scroll__container{display:block;width:100%;overflow-x:hidden;-webkit-overflow-scrolling:touch;padding-right:10px;box-sizing:border-box;scrollbar-width:thin;scrollbar-color:var(--emw-hakuna-bg-secondary, #120505) var(--lottery-infinite-scroll-scrollbar-track-background, transparent);}.lottery-infinite-scroll__container::-webkit-scrollbar{width:var(--lottery-infinite-scroll-scrollbar-width, 2px)}.lottery-infinite-scroll__container::-webkit-scrollbar-track{background:var(--lottery-infinite-scroll-scrollbar-track-background, transparent)}.lottery-infinite-scroll__container::-webkit-scrollbar-thumb{background:var(--emw-hakuna-bg-secondary, #120505);border-radius:var(--lottery-infinite-scroll-scrollbar-thumb-border-radius, 2px)}.lottery-infinite-scroll__sentinel{width:100%;display:block;text-align:center;}.lottery-infinite-scroll__sentinel.virtual-scroll-sentinel{height:1px;pointer-events:none;opacity:0;position:absolute;width:100%}.lottery-infinite-scroll__sentinel:not(.virtual-scroll-sentinel){height:1px;}.lottery-infinite-scroll__end-message{width:100%;display:block;text-align:center;}.lottery-infinite-scroll__end-message.virtual-scroll-end-message{position:absolute;width:100%}.ptr-indicator{height:var(--pull-trigger-distance, 60px);margin-top:calc(-1 * var(--pull-trigger-distance, 60px));display:flex;align-items:center;justify-content:center;position:absolute;top:0;width:100%;z-index:10;font-size:14px;color:#666;}";const m=class{constructor(e){t(this,e),this.lotteryBulletClickHandler=r(this,"lotteryBulletClick",7),this.value=0,this.text=void 0,this.idx=void 0,this.type="toggle",this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.hasBorder=!0,this.hasBackground=!0,this.deleteIconSvg="",this.deleteIconWidth="16px",this.deleteIconHeight="16px"}handleClientStylingChange(t,e){t!==e&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!==e&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!==e&&a(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleClick(){"disabled"!==this.type&&"readonly"!==this.type&&(console.log("bullet clicked",this.type,this.idx,this.text,this.value),this.lotteryBulletClickHandler.emit({type:this.type,idx:this.idx,text:this.text,value:this.value}))}render(){let t;return t=this.deleteIconSvg?function(t){let e=t.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"");return e=e.replace(/on[a-z]+=[\"'][^\"']*[\"']/gi,""),e=e.replace(/javascript:/gi,""),e}(this.deleteIconSvg):l(h,{extraSVGAttrs:{width:this.deleteIconWidth,height:this.deleteIconHeight,fill:"currentColor"}}),e("div",{key:"0d1e8aaa80a907a7467410f6b27b4b6175e82299",class:"lottery-selection",ref:t=>this.stylingContainer=t},e("button",{key:"11a2402abbc290dc877ad95f3433092c3a0d8419",class:{"lottery-selection__button":!0,"lottery-selection__button--selected":1==this.value,"lottery-selection__button--disabled":"disabled"===this.type,"lottery-selection__button--no-border":!this.hasBorder,"lottery-selection__button--no-background":!this.hasBackground,isDeleteByIcon:"delete"===this.type,isCallDialogBtn:"input"===this.type||"readonly"===this.type},onClick:this.handleClick.bind(this),disabled:"disabled"===this.type},"delete"===this.type&&e("span",{key:"f99001d936a8f7bdf8adc5c46e82caf730a9442a",class:"lottery-selection__delete-icon",innerHTML:t}),e("span",{key:"55775e2492a1fe45cc8a457ac0a0d206744461ab",class:"lottery-selection__text"},this.text)))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};m.style=":host{display:inline-block}.lottery-selection__button{display:flex;align-items:center;justify-content:center;width:var(--lottery-selection-width, 32px);height:var(--lottery-selection-height, 32px);padding:var(--lottery-selection-padding, 0);box-sizing:border-box;background:var(--lottery-selection-background, var(--emw--color-background, #fff));border:var(--lottery-selection-border-width, 2px) var(--lottery-selection-border-style, solid) var(--lottery-selection-border-color, var(--emw--color-primary, #0d196e));border-radius:var(--lottery-selection-border-radius, var(--emw--border-radius-medium, 8px));color:var(--lottery-selection-color, var(--emw--color-typography, #000));font-weight:var(--lottery-selection-font-weight, bold);font-size:var(--lottery-selection-font-size, 1em);cursor:pointer;user-select:none;}.lottery-selection__button:hover{background:var(--lottery-selection-hover-background, var(--emw--color-background, #fff));border-color:var(--lottery-selection-hover-border-color, var(--emw--color-primary, #0d196e));color:var(--lottery-selection-hover-color, var(--emw--color-typography, #000))}.lottery-selection__button .lottery-selection__delete-icon{display:none}.lottery-selection__button.isDeleteByIcon:hover .lottery-selection__text{display:none}.lottery-selection__button.isDeleteByIcon:hover .lottery-selection__delete-icon{display:flex;align-items:center;justify-content:center;fill:var(--lottery-selection-delete-icon-color, var(--emw--color-typography, #000));vertical-align:middle}.lottery-selection__button.lottery-selection__button--selected{background-color:var(--lottery-selection-selected-background, var(--emw--color-primary, #0d196e));border-color:var(--lottery-selection-selected-border-color, var(--emw--color-primary, #0d196e));color:var(--lottery-selection-selected-color, var(--emw--color-typography-inverse, #fff))}.lottery-selection__button.lottery-selection__button--disabled{background-color:var(--lottery-selection-disabled-background, var(--emw--color-gray-50, #f5f5f5));border-color:var(--lottery-selection-disabled-border-color, var(--emw--color-gray-100, #e6e6e6));color:var(--lottery-selection-disabled-color, var(--emw--color-gray-150, #6f6f6f));cursor:not-allowed;pointer-events:none;}.lottery-selection__button.lottery-selection__button--no-border{border:none}.lottery-selection__button.lottery-selection__button--no-background{background:transparent}";const f=["ro","en","fr","ar","hr","zh"],v={en:{noTicketBoard:"No ticket board available.",selectionCleared:"Your selection has been cleared.",clearAll:"Clear All",stopAt:"Stop at",turnover:"Turnover: ",pleaseFillIn:"Please fill in all the selection input!",fillIn:"Fill in",noBets:"Sorry. No bets have been placed so far. Check back later!",search:"Search",clear:"Clear",oddsChart:"Odds Chart",ticketSuccess:"Ticket purchased successfully.",stakePerLine:"Stake per Line:",lowestOdds:"Lowest Odds:",highestOdds:"Highest Odds:",orderSummary:"ORDER SUMMARY",ticket:"Ticket",lines:"Lines",total:"Total",submit:"Submit",loading:"Loading",enterValidNumber:"Please enter a valid number.",enterNumberBetween:"Please enter a number between {min} and {max}.",numberAlreadySelected:"This number has already been selected.",enterScoreUpTo:"Please enter the score (Up to {maxScore})",enterValue:"Please enter a value",myChoices:"My Choices",teams:"Teams",scores:"Scores",euro:"Euro",cancel:"Cancel",confirm:"Confirm"},ro:{},fr:{},ar:{},hr:{}},k=(t,e,i)=>{const r=e;let o=v[void 0!==r&&f.includes(r)?r:"en"][t];return i&&Object.keys(i).forEach((t=>{o=o.replace(`{${t}}`,i[t])})),o};function w(t,e){return new Set(t?t.split(e):[])}function x(t,e){return e.filter((e=>e!==t))}function _(t,e){return e.concat([t])}const S=class{constructor(e){t(this,e),this.bulletGroupUpdateSelectedBulletTexts=r(this,"bulletGroupUpdateSelection",7),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.language="en",this.translationUrl="",this.splitToken=",",this.selectionGroupId=void 0,this.selectionGroupLabel=void 0,this.type="bet",this.selectedBulletTexts=null,this.maxSelectedCount=null,this.maxDisplayBulletsCount=11,this.bulletTexts=null,this.maxIntegerBulletText=null,this.minIntegerBulletText=0,this.bulletTextType="integer",this.hasBorder=!0,this.hasBackground=!0,this.dialogTitle=void 0,this.dialogInputPlaceholder=void 0,this.dialogConfig={width:"400px",visible:!1,onConfirm:()=>this.handleFillInAddMore(),onCancel:()=>this.handleCloseAddMoreDialog()},this.inputInfo={valid:!0,errorMessage:"",value:""}}handleClientStylingChange(t,e){t!=e&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&a(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])v[e][i]=t[e][i]})))}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}lotteryBulletClickHandler(t){if(t.stopPropagation(),"input"!==t.detail.type)if(["delete","toggle"].includes(t.detail.type))this.bulletGroupUpdateSelectedBulletTexts.emit({newSelectedBulletTexts:(e=t.detail,i=Array.from(this.selectedSet),r=this.maxSelectedCount,"delete"===e.type?x(e.text,i):"toggle"===e.type?i.includes(e.text)?x(e.text,i):i.length>=r?function(t,e,i){return e.slice(e.length-(i-1)).concat([t])}(e.text,i,r):_(e.text,i):[]).join(this.splitToken),selectionGroupId:this.selectionGroupId});else var e,i,r;else this.dialogConfig=Object.assign(Object.assign({},this.dialogConfig),{visible:!0})}get selectedSet(){return w(this.selectedBulletTexts,this.splitToken)}get bulletTextsSet(){return this.bulletTexts?w(this.bulletTexts,this.splitToken):"integer"===this.bulletTextType&&null!=this.maxIntegerBulletText?w(Array.from({length:Number(this.lastDisplayBulletText)-this.minIntegerBulletText+1},((t,e)=>this.minIntegerBulletText+e)).join(this.splitToken),this.splitToken):new Set}get lastDisplayBulletText(){if("integer"===this.bulletTextType)return null!=this.maxIntegerBulletText?Math.min(this.maxIntegerBulletText,this.minIntegerBulletText+this.maxDisplayBulletsCount-1):this.minIntegerBulletText+this.maxDisplayBulletsCount-1;if(this.bulletTextsSet.size>0){const t=Array.from(this.bulletTextsSet);return t.length>=this.maxDisplayBulletsCount?t[this.maxDisplayBulletsCount-1]:t[t.length-1]}return null}get isSingleSelectionMode(){return 1===this.maxSelectedCount}getBulletToRender(){const t=Array.from(this.bulletTextsSet);let e=t,i=!1;return"text"===this.bulletTextType?t.length>this.maxDisplayBulletsCount?(i=!0,e=t.slice(0,this.maxDisplayBulletsCount-1)):e=t:(i=null!=this.maxIntegerBulletText&&this.maxIntegerBulletText>Number(this.lastDisplayBulletText),e=t),{bulletsToRender:e,showInputButton:i}}renderBulletGroup(){let t=[];if("bet"===this.type){const e=null!==this.maxSelectedCount&&this.selectedSet.size>=this.maxSelectedCount,{bulletsToRender:i,showInputButton:r}=this.getBulletToRender();if(i.forEach(((i,r)=>{let o="toggle";this.selectedSet.has(String(i))||!e||this.isSingleSelectionMode||(o="disabled"),t.push({value:this.selectedSet.has(String(i))?1:0,text:String(i),idx:r,type:o})})),r){let i="input";e&&!this.isSingleSelectionMode&&(i="disabled");const r="text"===this.bulletTextType?"...":`${this.lastDisplayBulletText}+`,o="text"===this.bulletTextType?-1:Number(this.lastDisplayBulletText)+1;"integer"===this.bulletTextType&&t.length>=this.maxDisplayBulletsCount&&t.pop(),t.push({value:0,text:r,idx:o,type:i})}}else if(["choice","preview"].includes(this.type)){const{bulletsToRender:e}=this.getBulletToRender();e.forEach(((e,i)=>{let r="toggle";"preview"===this.type?r="readonly":this.selectedSet.has(String(e))&&(r="delete"),t.push({value:this.selectedSet.has(String(e))?1:0,text:e,idx:i,type:r})}))}return e("div",{class:"lottery-selection-group__item--right"},t.map((t=>e("lottery-selection",{clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,mbSource:this.mbSource,text:t.text,idx:t.idx,value:t.value,type:t.type,hasBorder:this.hasBorder,hasBackground:this.hasBackground}))))}handleCloseAddMoreDialog(){this.dialogConfig=Object.assign(Object.assign({},this.dialogConfig),{visible:!1}),this.inputInfo={value:"",errorMessage:"",valid:!0}}handleInputChange(t){const e=t.target.value;this.inputInfo=Object.assign(Object.assign({},this.inputInfo),{value:e}),this.inputInfo=function({value:t,selectedSet:e,maxValue:i,minValue:r,language:o,type:n="integer"}){const s=t.trim();if("integer"===n){if(!/^-?\d+$/.test(s))return{valid:!1,errorMessage:k("enterValidNumber",o),value:t};const n=Number(s);if(isNaN(n))return{valid:!1,errorMessage:k("enterValidNumber",o),value:t};if(void 0!==r&&n<r||void 0!==i&&n>i)return{valid:!1,errorMessage:k("enterNumberBetween",o,{min:r,max:i}),value:t};const a=String(n);if(e.has(a))return{valid:!1,errorMessage:k("numberAlreadySelected",o),value:t}}else if(e.has(s))return{valid:!1,errorMessage:k("numberAlreadySelected",o),value:t};return{valid:!0,errorMessage:"",value:t}}({value:e,selectedSet:this.selectedSet,maxValue:this.maxIntegerBulletText,minValue:"integer"===this.bulletTextType?Number(this.lastDisplayBulletText)+1:void 0,language:this.language,type:this.bulletTextType})}handleFillInAddMore(){if(this.inputInfo.valid){const{value:t}=this.inputInfo;let e,i=t;i="integer"===this.bulletTextType?String(Number(t)):t.trim(),e=this.isSingleSelectionMode?i:_(i,Array.from(this.selectedSet)).join(this.splitToken),this.bulletGroupUpdateSelectedBulletTexts.emit({newSelectedBulletTexts:e,selectionGroupId:this.selectionGroupId}),this.handleCloseAddMoreDialog()}}render(){return e("div",{key:"66b8e9c63d948eb2f7eb37adb80892dbedd7df9a",class:"lottery-selection-group",ref:t=>this.stylingContainer=t},e("div",{key:"6562fdcad0f352b5e2d03edcc980a9aeab32277e",class:"lottery-selection-group__item"},this.selectionGroupLabel&&e("div",{key:"43c2132e4904a2b69b970d9b2074f120ed4d0986",class:"lottery-selection-group__item--left"},this.selectionGroupLabel),this.renderBulletGroup()),e("lottery-tipping-dialog",{key:"cb693d10e6b499628909571021d8508cdebbe29a",visible:this.dialogConfig.visible,width:this.dialogConfig.width,onCancel:this.dialogConfig.onCancel},e("div",{key:"dd312634574bbe1b4d3de7e82a9c58f58f846c1a",class:"addSelectionDialog"},e("div",{key:"b371b1090598f0219a7c652bab51e9d349703c34",class:"addSelectionDialog-title"},this.dialogTitle||("text"===this.bulletTextType?k("enterValue",this.language):k("enterScoreUpTo",this.language,{maxScore:this.maxIntegerBulletText}))),e("input",{key:"b5f1bb74999246dac8dc20f04e3af893deae6654",type:"text",class:{"dialog-input":!0,invalid:!this.inputInfo.valid},value:this.inputInfo.value,onInput:this.handleInputChange.bind(this),placeholder:this.dialogInputPlaceholder}),e("div",{key:"f33970a6dffdc881ffa9cf2c0bb54b26b27cccd6",class:"error-message"},this.inputInfo.errorMessage)),e("div",{key:"4c580dae14b38aff03e17067b2c0b72d01aa4f42",slot:"footer",class:"addSelectionDialog-footer"},e("lottery-button",{key:"874aa0ffde8fe2d0b08efea0cf951f101ab8dad0",onClick:this.dialogConfig.onCancel,text:k("cancel",this.language),variant:"outline"}),e("lottery-button",{key:"63a556eb5f9ad1cdd357c017756be274d40ef235",onClick:this.dialogConfig.onConfirm,text:k("confirm",this.language),variant:"primary",disabled:!this.inputInfo.valid||!this.inputInfo.value}))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};S.style=":host {\n width: 100%;\n}\n\n.lottery-selection-group {\n container-type: inline-size;\n padding: var(--lottery-selection-group-padding, 0);\n background: var(--lottery-selection-group-background, transparent);\n border: var(--lottery-selection-group-border, none);\n border-radius: var(--lottery-selection-group-border-radius, 0);\n}\n.lottery-selection-group__item {\n display: flex;\n flex-direction: var(--lottery-selection-group-flex-direction, row);\n align-items: var(--lottery-selection-group-item-align, center);\n justify-content: var(--lottery-selection-group-item-justify, flex-start);\n gap: var(--lottery-selection-group-item-gap, 16px);\n width: 100%;\n}\n.lottery-selection-group__item--left {\n width: var(--lottery-selection-group-label-width, 130px);\n min-width: var(--lottery-selection-group-label-min-width, auto);\n max-width: var(--lottery-selection-group-label-max-width, none);\n color: var(--lottery-selection-group-label-color, var(--emw--color-typography, #000));\n font-size: var(--lottery-selection-group-label-font-size, 1em);\n font-weight: var(--lottery-selection-group-label-font-weight, bold);\n text-align: var(--lottery-selection-group-label-align, left);\n white-space: var(--lottery-selection-group-label-white-space, normal);\n}\n.lottery-selection-group__item--right {\n flex: 1;\n display: flex;\n flex-wrap: var(--lottery-selection-group-bullets-wrap, wrap); /* Allow items to wrap */\n gap: var(--lottery-selection-group-bullets-gap, 8px); /* Gap between bullets */\n align-items: var(--lottery-selection-group-bullets-align, center);\n justify-content: var(--lottery-selection-group-bullets-justify, flex-start); /* Align bullets to start */\n}\n@container (max-width: 320px) {\n .lottery-selection-group__item--left {\n width: 100px;\n max-width: 100px;\n }\n}\n\n.dialog-input {\n width: 100%;\n padding: var(--lottery-selection-group-input-padding, 8px);\n border: var(--lottery-selection-group-input-border-width, 1px) var(--lottery-selection-group-input-border-style, solid) var(--lottery-selection-group-input-border-color, var(--emw--color-gray-100, #e6e6e6));\n border-radius: var(--lottery-selection-group-input-radius, 4px);\n background-color: var(--lottery-selection-group-input-bg, #fff);\n color: var(--lottery-selection-group-input-color, #000);\n box-sizing: border-box;\n margin-top: var(--lottery-selection-group-input-margin-top, 10px);\n font-size: var(--lottery-selection-group-input-font-size, 1em);\n}\n.dialog-input::placeholder {\n color: var(--lottery-selection-group-input-placeholder-color, #999);\n}\n\n.dialog-input.invalid,\n.dialog-input.invalid:focus {\n border-color: var(--emw--color-error, #ff3d00);\n outline-color: var(--emw--color-error, #ff3d00);\n}\n\n.error-message {\n color: var(--lottery-selection-group-error-color, var(--emw--color-error, #ff3d00));\n font-size: var(--lottery-selection-group-error-font-size, 12px);\n font-weight: var(--lottery-selection-group-error-font-weight, normal);\n margin-top: 4px;\n}\n\n.addSelectionDialog-title {\n color: var(--lottery-selection-group-dialog-title-color, var(--emw--color-typography, #000));\n font-size: var(--lottery-selection-group-dialog-title-font-size, 1.2em);\n font-weight: var(--lottery-selection-group-dialog-title-font-weight, bold);\n margin-bottom: var(--lottery-selection-group-dialog-title-margin-bottom, 0);\n}\n.addSelectionDialog-footer {\n display: flex;\n justify-content: var(--lottery-selection-group-dialog-footer-justify, flex-end);\n gap: var(--lottery-selection-group-dialog-footer-gap, 18px);\n margin-top: var(--lottery-selection-group-dialog-footer-margin-top, 0);\n}";const C=["ro","en","fr","ar","hr"],$={en:{cancel:"Cancel",confirm:"Confirm"},ro:{cancel:"Anulează",confirm:"Confirmă"},fr:{cancel:"Annuler",confirm:"Confirmer"},ar:{cancel:"إلغاء",confirm:"تأكيد"},hr:{cancel:"Odustani",confirm:"Potvrdi"}},z=(t,e)=>{const i=e;return $[void 0!==i&&C.includes(i)?i:"en"][t]},M=class{constructor(e){t(this,e),this.open=r(this,"open",7),this.close=r(this,"close",7),this.confirm=r(this,"confirm",7),this.cancel=r(this,"cancel",7),this.wasVisible=!1,this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.visible=void 0,this.dialogTitle="",this.width="520px",this.closable=!0,this.mask=!0,this.maskClosable=!0,this.animationDuration=300,this.fullscreen=!1,this.showFooter=!0,this.showCancelBtn=!0,this.language="en",this.translationUrl=void 0,this.dialogClass=void 0,this.dialogStyle=void 0}handleClientStylingChange(t,e){t!=e&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&a(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){this.translationUrl&&(async t=>{if(t)try{const i=await fetch(t);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const r=await i.json();e=r,Object.keys(e).forEach((t=>{for(let i in e[t])$[t][i]=e[t][i]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl)}componentWillUpdate(){this.visible&&!this.wasVisible?this.disableBodyScroll():!this.visible&&this.wasVisible&&this.enableBodyScroll(),this.wasVisible=this.visible}disconnectedCallback(){this.enableBodyScroll(),this.stylingSubscription&&this.stylingSubscription.unsubscribe()}disableBodyScroll(){document.body.style.overflow="hidden"}enableBodyScroll(){document.body.style.overflow=""}handleClose(){this.cancel.emit()}handleMaskClick(){this.maskClosable&&this.cancel.emit()}handleConfirm(){this.confirm.emit()}render(){const t=Object.assign({width:"number"==typeof this.width?`${this.width}px`:this.width,"--duration":`${this.animationDuration}ms`},this.dialogStyle||{}),i=["dialog-wrapper",this.visible?"dialog-wrapper-visible":""],r=["mask",this.visible?"mask-enter":"mask-leave"],o=["dialog",this.visible?"dialog-enter":"dialog-leave",this.fullscreen?"fullscreen":"",this.dialogClass].filter(Boolean).join(" ");return e("div",{key:"306683c5190fa6dca57dcf75e52eca575c0215e7",class:i.join(" "),ref:t=>this.stylingContainer=t},e("div",{key:"8be097f3a86fcd9ad4e18c6ac56cafdcf249049b",class:r.join(" "),onClick:this.handleMaskClick.bind(this)}),e("div",{key:"87d2206d3e3d75fe0e0ef8a6afd8de5c20892ae6",part:"dialog",class:o,style:t,role:"dialog","aria-modal":"true","aria-labelledby":"dialog-title"},e("div",{key:"30ca33b925ff2525ead8aae83e72031258367b40",class:"dialog-header"},e("h2",{key:"492c3e864ac1547da58b0a47e4cc8d45470bde54",id:"dialog-title",class:"dialog-title"},this.dialogTitle),this.closable&&e("button",{key:"8ae4b872d18ce82d33292dc794e8a1f714a96ba9",class:"close-btn",onClick:this.handleClose.bind(this)},"x")),e("div",{key:"d661c78b333f78b9dee92e0975f8b136ef5a3071",class:"dialog-content",style:{maxHeight:"calc(100vh - 62px)",overflowY:"auto"}},e("slot",{key:"f32a6f6e4962239e0148e61c4bb70f6b5d3a2c82"})),this.showFooter&&e("div",{key:"40b5e9fd1c9221eb4d6c87d053c5d018f540d8e7",class:"dialog-footer"},e("slot",{key:"91539def47d118a69735ec229e7a6b36fc1db40b",name:"footer"},this.showCancelBtn&&e("button",{key:"f3b3add23f150c660159a906c2ef23b5fbe3b4c5",class:"cancel-btn",onClick:this.handleClose.bind(this)},z("cancel",this.language)),e("button",{key:"5fc33e89b6c55ac9e2162302e128bce0e79c5f89",class:"confirm-btn",onClick:this.handleConfirm.bind(this)},z("confirm",this.language))))))}get el(){return i(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};M.style=".dialog-wrapper{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;visibility:hidden;opacity:1;z-index:199}.dialog-wrapper-visible{visibility:visible}.mask{position:fixed;inset:0;background-color:rgba(0, 0, 0, 0.5);opacity:0;z-index:1000;transition:opacity var(--duration) linear}.mask-enter{opacity:1}.mask-leave{opacity:0}.dialog{position:relative;background:var(--emw--color-background, #fff);border-radius:12px;box-shadow:0 4px 32px rgba(0, 0, 0, 0.15);opacity:0;transform:scale(0.9);transition:all var(--duration) linear;width:100%;max-width:100vw;overflow:hidden;z-index:1000}.dialog-enter{opacity:1;transform:scale(1)}.dialog-leave{opacity:0}.dialog.fullscreen{width:100vw !important;height:100vh;overflow:auto;max-height:none;border-radius:0;overflow:hidden}.dialog-header{padding:16px 16px 0 16px;display:flex;justify-content:space-between;align-items:center}.dialog-header .dialog-title{margin:0;font-size:1.25rem;font-weight:500;color:var(--emw--color-typography, #000)}.dialog-header .close-btn{background:transparent;border:none;font-size:1.5rem;width:2rem;height:2rem;color:var(--emw--color-gray-150, #6f6f6f);cursor:pointer;border-radius:4px}.dialog-header .close-btn:hover{background:var(--emw--color-gray-50, #f5f5f5);color:var(--emw--color-gray-300, #333)}.dialog-content{padding:24px;font-size:0.95rem;line-height:1.6;color:var(--emw--color-dialog-typography, #000);flex:1;overflow-y:auto;max-height:calc(100vh - 200px)}.dialog.fullscreen .dialog-content{max-height:none}.dialog-footer{padding:0 16px 16px 16px;display:flex;justify-content:center;gap:12px}.dialog-footer .cancel-btn,.dialog-footer .confirm-btn{padding:10px 24px;border-radius:6px;font-size:0.9rem;cursor:pointer;transition:all 0.3s linear}.dialog-footer .cancel-btn{border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));background-color:var(--emw--color-background, #fff);color:var(--emw--color-typography, #000)}.dialog-footer .cancel-btn:hover{background-color:var(--emw--color-background-tertiary, #ccc)}.dialog-footer .confirm-btn{border:none;color:var(--emw--color-typography-normalized, #ffffff);background:var(--emw--color-primary, #009993)}.dialog-footer .confirm-btn:hover{background:var(--emw--color-primary-variant, #004d4a)}@media screen and (max-width: 480px){.dialog.fullscreen .dialog-content{padding:12px}}.Loading{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.Loading svg{animation:spin 1s linear infinite;transform-origin:center}@keyframes spin{100%{transform:rotate(360deg)}}";const j=class{constructor(e){t(this,e),this.stylingValue={width:this.handleStylingProps(this.width),height:this.handleStylingProps(this.height),borderRadius:this.handleStylingProps(this.borderRadius),marginBottom:this.handleStylingProps(this.marginBottom),marginTop:this.handleStylingProps(this.marginTop),marginLeft:this.handleStylingProps(this.marginLeft),marginRight:this.handleStylingProps(this.marginRight),size:this.handleStylingProps(this.size)},this.structure=void 0,this.width="unset",this.height="unset",this.borderRadius="unset",this.marginBottom="unset",this.marginTop="unset",this.marginLeft="unset",this.marginRight="unset",this.animation=!0,this.rows=0,this.size="100%"}handleStructureChange(t,e){e!==t&&this.handleStructure(t)}handleStylingProps(t){switch(typeof t){case"number":return 0===t?0:`${t}px`;case"undefined":default:return"unset";case"string":return["auto","unset","none","inherit","initial"].includes(t)||t.endsWith("px")||t.endsWith("%")?t:"unset"}}handleStructure(t){switch(t){case"logo":return this.renderLogo();case"image":return this.renderImage();case"title":return this.renderTitle();case"text":return this.renderText();case"rectangle":return this.renderRectangle();case"circle":return this.renderCircle();default:return null}}renderLogo(){return e("div",{class:"SkeletonContainer"},e("div",{class:"SkeletonLogo "+(this.animation?"Skeleton":"")}))}renderImage(){return e("div",{class:"SkeletonImage "+(this.animation?"Skeleton":"")})}renderTitle(){return e("div",{class:"SkeletonContainer"},e("div",{class:"SkeletonTitle "+(this.animation?"Skeleton":"")}))}renderText(){return e("div",{class:"SkeletonContainer"},Array.from({length:this.rows>0?this.rows:1}).map(((t,i)=>e("div",{key:i,class:"SkeletonText "+(this.animation?"Skeleton":"")}))))}renderRectangle(){return e("div",{class:"SkeletonContainer"},e("div",{class:"SkeletonRectangle "+(this.animation?"Skeleton":"")}))}renderCircle(){return e("div",{class:"SkeletonContainer"},e("div",{class:"SkeletonCircle "+(this.animation?"Skeleton":"")}))}render(){let t="";switch(this.structure){case"logo":t=`\n :host {\n --emw-skeleton-logo-width: ${this.stylingValue.width};\n --emw-skeleton-logo-height: ${this.stylingValue.height};\n --emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"image":t=`\n :host {\n --emw-skeleton-image-width: ${this.stylingValue.width};\n --emw-skeleton-image-height: ${this.stylingValue.height};\n --emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"title":t=`\n :host {\n --emw-skeleton-title-width: ${this.stylingValue.width};\n --emw-skeleton-title-height: ${this.stylingValue.height};\n --emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"text":t=`\n :host {\n --emw-skeleton-text-width: ${this.stylingValue.width};\n --emw-skeleton-text-height: ${this.stylingValue.height};\n --emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"rectangle":t=`\n :host {\n --emw-skeleton-rectangle-width: ${this.stylingValue.width};\n --emw-skeleton-rectangle-height: ${this.stylingValue.height};\n --emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"circle":t=`\n :host {\n --emw-skeleton-circle-size: ${this.stylingValue.size};\n }\n `;break;default:t=""}return e(o,{key:"c2a2650acd416962a2bc4e1a7ee18bc6d8e2def8"},e("style",{key:"9bd7fc1f9e9ed9f17735a7b72fce6f09696f5e19"},t),this.handleStructure(this.structure))}static get watchers(){return{structure:["handleStructureChange"]}}};j.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{u as lottery_button,p as lottery_hakuna_ticket_history_item,y as lottery_infinite_scroll,m as lottery_selection,S as lottery_selection_group,M as lottery_tipping_dialog,j as ui_skeleton}
1
+ import{r as t,h as e,g as i,c as r,H as o}from"./index-50addd47.js";import{s as n,a,b as l,r as s}from"./lottery-hakuna-ticket-history-4cb107bf.js";export{L as lottery_hakuna_ticket_history}from"./lottery-hakuna-ticket-history-4cb107bf.js";const 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"},h=["ro","en","fr","ar","hr","zh"],d={en:{loading:"Loading"},ro:{},fr:{},ar:{},hr:{}},u=class{constructor(e){t(this,e),this.handleClick=t=>{if(this.disabled)return;const e=this.host.shadowRoot.querySelector(".btn");if(!e)return;const i=e.getBoundingClientRect(),r=Math.max(i.width,i.height),o={top:t.clientY-i.top-r/2,left:t.clientX-i.left-r/2,size:r};this.ripples=[...this.ripples,o],setTimeout((()=>{this.ripples=this.ripples.filter((t=>t!==o))}),600)},this.variant="primary",this.size="medium",this.color=void 0,this.disabled=!1,this.loading=!1,this.text=void 0,this.mbSource=void 0,this.language="en",this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.ripples=[]}handleClientStylingChange(t,e){t!=e&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&l(this.stylingContainer,`${this.mbSource}.Style`)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentDidLoad(){this.stylingContainer&&(this.mbSource&&l(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}componentWillLoad(){this.translationUrl&&(async t=>{if(t)try{const i=await fetch(t);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const r=await i.json();e=r,Object.keys(e).forEach((t=>{for(let i in e[t])d[t][i]=e[t][i]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl)}render(){const{variant:t,disabled:i,size:r,color:o}=this,n=i||this.loading,a={};if(o)switch(t){case"primary":default:Object.assign(a,{backgroundColor:o,borderColor:o});break;case"outline":case"dashed":Object.assign(a,{color:o,borderColor:o});break;case"text":Object.assign(a,{color:o})}return e("button",{key:"aa74ad98c90e7548228557bf8a8d26b125d4a83a",class:{btn:!0,[`btn--${t}`]:!0,[`btn--${r}`]:!0,"btn--loading":this.loading},style:o?a:void 0,disabled:n,onClick:this.handleClick,ref:t=>this.stylingContainer=t},this.loading?e("div",{class:"loading-container"},e("span",{class:"content"},this.text||(()=>{const t=this.language;let e=d[void 0!==t&&h.includes(t)?t:"en"].loading;return e})()),e("span",{class:"spinner"})):e("span",{class:"content"},e("slot",{name:"icon-left"}),this.text||e("slot",null),e("slot",{name:"icon-right"})),e("div",{key:"302ea02be395bb24989d4abc040a513e23fa029a",class:"ripple-container"},this.ripples.map(((t,i)=>e("span",{key:i,class:"ripple",style:{top:`${t.top}px`,left:`${t.left}px`,width:`${t.size}px`,height:`${t.size}px`}})))))}get host(){return i(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};u.style=":host{display:inline-block}.btn{font:inherit;position:relative;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:var(--lottery-button-border-radius, 6px);font-weight:var(--lottery-button-font-weight, 500);cursor:pointer;outline:none;overflow:hidden;transition:var(--lottery-button-transition, background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s);user-select:none;-webkit-tap-highlight-color:transparent;box-shadow:var(--lottery-button-box-shadow, 0 2px 4px 0 rgba(0, 0, 0, 0.5))}.btn .content{position:relative;display:inline-flex;align-items:center;gap:var(--lottery-button-content-gap, 0.5em)}.btn .content ::slotted(span){display:inline-flex;align-items:center}.btn:hover:not(:disabled){box-shadow:var(--lottery-button-hover-box-shadow, 0 4px 8px 0 rgba(0, 0, 0, 0.5))}.btn:disabled{cursor:not-allowed;opacity:var(--lottery-button-disabled-opacity, 0.5)}.btn .loading-container{display:flex;align-items:center}.btn--loading{position:relative}.btn .spinner{display:inline-block;width:1em;height:1em;border:var(--lottery-button-spinner-border, 2px solid rgba(255, 255, 255, 0.3));border-radius:50%;border-top-color:var(--lottery-button-spinner-color, white);animation:spin 1s ease-in-out infinite;margin-left:0.5em;vertical-align:middle}.btn--small .spinner{width:0.8em;height:0.8em}.btn--large .spinner{width:1.2em;height:1.2em}@keyframes spin{to{transform:rotate(360deg)}}.btn--primary{background-color:var(--emw--color-primary, #0d196e);color:var(--emw--color-typography-inverse, #fff)}.btn--primary:hover:not(:disabled){background-color:var(--emw--color-primary-variant, #1367e7)}.btn--primary:active:not(:disabled){background-color:var(--lottery-button-primary-active-bg, #08104a)}.btn--outline .spinner,.btn--dashed .spinner,.btn--text .spinner{border-top-color:currentColor;border-color:var(--lottery-button-spinner-inverse-border-color, rgba(0, 0, 0, 0.2))}.btn--outline{background-color:var(--emw--color-background, #fff);border-color:var(--lottery-button-outline-border-color, #dcdcdc);color:var(--emw--color-typography, #000)}.btn--outline:hover:not(:disabled){background-color:var(--emw--color-background-tertiary, #ccc);border-color:var(--lottery-button-outline-hover-border-color, #a6a6a6)}.btn--outline:active:not(:disabled){background-color:var(--lottery-button-outline-active-bg, #e6e6e6)}.btn--dashed{background-color:transparent;border-style:dashed;border-color:var(--lottery-button-dashed-border-color, #dcdcdc);color:var(--lottery-button-dashed-color, #333)}.btn--dashed:hover:not(:disabled){border-color:var(--lottery-button-dashed-hover-border-color, #a6a6a6);color:var(--lottery-button-dashed-hover-color, #0052d9)}.btn--text{background-color:transparent;color:var(--lottery-button-text-color, #0052d9);border-color:transparent}.btn--text:hover:not(:disabled){background-color:var(--lottery-button-text-hover-bg, #f2f2f2)}.btn--text:active:not(:disabled){background-color:var(--lottery-button-text-active-bg, #e6e6e6)}.btn--custom-color:hover:not(:disabled){opacity:var(--lottery-button-custom-hover-opacity, 0.9)}.btn--custom-color:active:not(:disabled){opacity:var(--lottery-button-custom-active-opacity, 0.8)}.btn--small{height:var(--lottery-button-small-height, 28px);font-size:var(--lottery-button-small-font-size, 12px);padding:var(--lottery-button-small-padding, 0 12px)}.btn--medium{height:var(--lottery-button-medium-height, 34px);font-size:var(--lottery-button-medium-font-size, 14px);padding:var(--lottery-button-medium-padding, 0 18px)}.btn--large{height:var(--lottery-button-large-height, 40px);font-size:var(--lottery-button-large-font-size, 16px);padding:var(--lottery-button-large-padding, 0 24px)}.ripple-container{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;pointer-events:none;border-radius:inherit}.ripple{position:absolute;border-radius:50%;background-color:var(--lottery-button-ripple-light, rgba(255, 255, 255, 0.3));transform:scale(0);animation:ripple-animation 600ms linear}.btn--outline .ripple,.btn--dashed .ripple,.btn--text .ripple{background-color:var(--lottery-button-ripple-dark, rgba(0, 0, 0, 0.03))}@keyframes ripple-animation{to{transform:scale(4);opacity:0}}";const g=["ro","en","fr","ar","hr"],b={en:{total:"Total:"}},p=class{constructor(i){t(this,i),this.selectionGroupStyle="\n :host{\n --lottery-selection-width: 24px;\n --lottery-selection-height: 24px;\n --lottery-selection-padding: 10px;\n --lottery-selection-border-radius: 6px;\n --lottery-selection-border-width: 1px;\n --lottery-selection-border-color: var(--emw-hakuna-color-primary, #c52217);\n\n --lottery-selection-color: var(--emw-hakuna-text-primary, #ffffff);\n --lottery-selection-font-size: 14px;\n --lottery-selection-font-weight: 500;\n\n --lottery-selection-hover-background: transparent;\n --lottery-selection-hover-border-color: var(--emw-hakuna-color-primary, #c52217);\n --lottery-selection-hover-color: var(--emw-hakuna-text-primary, #ffffff);\n\n .lottery-selection__button{\n box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.15);\n line-height: normal;\n }\n .lottery-selection__button:hover{\n cursor: default;\n }\n --lottery-selection-group-item-gap:6px;\n }\n ",this.renderSkeleton=()=>e("div",{class:"lottery-hakuna-ticket-history-item__container"},e("div",{class:"lottery-hakuna-ticket-history-item__top"},e("div",{class:"lottery-hakuna-ticket-history-item__country-wrapper"},e("ui-skeleton",{structure:"image",width:"30px",height:"20px"}),e("ui-skeleton",{structure:"title",width:"86px",height:"17px",marginBottom:0})),e("div",{class:"lottery-hakuna-ticket-history-item__details"},e("ui-skeleton",{structure:"text",width:"60%",height:"20px"}))),e("div",{class:"lottery-hakuna-ticket-history-item__bottom"},e("div",{class:"lottery-hakuna-ticket-history-item__numbers-wrapper"},new Array(this.selectedNumbersCount).fill(e("ui-skeleton",{borderRadius:"8px",structure:"rectangle",width:"24px",height:"24px"}))),e("div",{class:"lottery-hakuna-ticket-history-item__date-wrapper"},e("ui-skeleton",{structure:"text",width:"180px",height:"14px"})))),this.renderMain=()=>e("div",{class:"lottery-hakuna-ticket-history-item__container"},e("div",{class:"lottery-hakuna-ticket-history-item__top"},e("div",{class:"lottery-hakuna-ticket-history-item__country-wrapper"},this.historyItemImageSrc&&e("img",{src:this.historyItemImageSrc,alt:this.historyItemName,class:"lottery-hakuna-ticket-history-item__country-flag"}),e("span",{class:"lottery-hakuna-ticket-history-item__country-name"},this.historyItemName)),e("div",{class:"lottery-hakuna-ticket-history-item__details"},e("span",{class:"lottery-hakuna-ticket-history-item__meta"},(()=>{const t=this.language;let e=b[void 0!==t&&g.includes(t)?t:"en"].total;return e})(),e("span",{class:"lottery-hakuna-ticket-history-item__meta-value"},this.totalAmount)))),e("div",{class:"lottery-hakuna-ticket-history-item__bottom"},e("div",{class:"lottery-hakuna-ticket-history-item__numbers-wrapper"},this.selectedNumbers&&e("lottery-selection-group",{type:"preview",bulletTexts:this.selectedNumbers,clientStyling:this.selectionGroupStyle+(this.clientStyling||""),clientStylingUrl:this.clientStylingUrl,mbSource:this.mbSource,hasBorder:!0,hasBackground:!1,selectionGroupId:this.ticketId?this.ticketId.toString():void 0})),e("div",{class:"lottery-hakuna-ticket-history-item__date-wrapper"},this.date&&e("div",null,this.date),this.time&&e("div",null,this.time)))),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.language="en",this.translationUrl="",this.historyItemName=void 0,this.historyItemImageSrc=void 0,this.ticketId=void 0,this.totalAmount=void 0,this.date=void 0,this.time=void 0,this.selectedNumbers=void 0,this.showSkeleton=!1,this.selectedNumbersCount=6}handleClientStylingChange(t,e){t!=e&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&l(this.stylingContainer,`${this.mbSource}.Style`)}async componentWillLoad(){(async t=>{if(t)try{const i=await fetch(t);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const r=await i.json();e=r,Object.keys(e).forEach((t=>{for(let i in e[t])b[t][i]=e[t][i]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&l(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return e("div",{key:"d22e301e9824aa3539e0c11ed52a1bddc5e1fb9c",ref:t=>this.stylingContainer=t,class:"lottery-hakuna-ticket-history-item__container-wrapper"},this.showSkeleton?this.renderSkeleton():this.renderMain())}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};p.style=".lottery-hakuna-ticket-history-item__container{display:flex;padding:var(--lottery-hakuna-ticket-history-item-container-padding, 20px);flex-direction:column;justify-content:center;gap:var(--lottery-hakuna-ticket-history-item-container-gap, 16px);border-radius:var(--lottery-hakuna-ticket-history-item-container-border-radius, 12px);border:1px solid transparent;min-width:var(--lottery-hakuna-ticket-history-item-container-min-width, 200px);background-origin:border-box;background-clip:padding-box, border-box;background-image:linear-gradient(var(--emw-hakuna-bg-secondary, #120505), var(--emw-hakuna-bg-secondary, #120505)), linear-gradient(to top left, var(--emw-hakuna-color-primary, #c52217) var(--lottery-hakuna-ticket-history-item-border-gradient-start-stop, 22%), var(--emw-hakuna-bg-primary, #2c2525) var(--lottery-hakuna-ticket-history-item-border-gradient-end-stop, 68%))}.lottery-hakuna-ticket-history-item__top{display:flex;justify-content:space-between;align-items:center}.lottery-hakuna-ticket-history-item__country-wrapper{display:flex;align-items:center;gap:10px}.lottery-hakuna-ticket-history-item__country-flag{width:var(--lottery-hakuna-ticket-history-item-country-flag-width, 30px);object-fit:cover;aspect-ratio:var(--lottery-hakuna-ticket-history-item-country-flag-aspect-ratio, 3/2)}.lottery-hakuna-ticket-history-item__country-name{color:var(--lottery-hakuna-ticket-history-item-country-name-color, #fff);font-size:var(--lottery-hakuna-ticket-history-item-country-name-font-size, 14px);font-style:normal;font-weight:var(--lottery-hakuna-ticket-history-item-country-name-font-weight, 700);line-height:var(--lottery-hakuna-ticket-history-item-country-name-line-height, normal)}.lottery-hakuna-ticket-history-item__details{display:flex;gap:var(--lottery-hakuna-ticket-history-item-details-gap, 13px);color:var(--emw-hakuna-text-secondary, #b4a5a5);font-size:var(--lottery-hakuna-ticket-history-item-details-font-size, 10px);font-style:normal;font-weight:var(--lottery-hakuna-ticket-history-item-details-font-weight, 700);line-height:var(--lottery-hakuna-ticket-history-item-details-line-height, normal)}.lottery-hakuna-ticket-history-item__meta{display:flex;gap:var(--lottery-hakuna-ticket-history-item-meta-gap, 10px)}.lottery-hakuna-ticket-history-item__meta-value{color:var(--lottery-hakuna-ticket-history-item-meta-value-color, inherit)}.lottery-hakuna-ticket-history-item__bottom{display:flex;justify-content:space-between;align-items:center;align-self:stretch}.lottery-hakuna-ticket-history-item__numbers-wrapper{flex:1;display:flex;align-items:flex-start;gap:var(--lottery-hakuna-ticket-history-item-numbers-wrapper-gap, 8px);box-shadow:var(--lottery-hakuna-ticket-history-item-numbers-wrapper-box-shadow, 0 1px 2px 0 rgba(0, 0, 0, 0.25))}.lottery-hakuna-ticket-history-item__date-wrapper{color:var(--lottery-hakuna-ticket-history-item-date-wrapper-color, #fffefe);text-align:var(--lottery-hakuna-ticket-history-item-date-wrapper-text-align, right);font-size:var(--lottery-hakuna-ticket-history-item-date-wrapper-font-size, 8px);font-style:normal;font-weight:var(--lottery-hakuna-ticket-history-item-date-wrapper-font-weight, 400);line-height:var(--lottery-hakuna-ticket-history-item-date-wrapper-line-height, 125%);min-width:var(--lottery-hakuna-ticket-history-item-date-wrapper-min-width, 70px);max-width:var(--lottery-hakuna-ticket-history-item-date-wrapper-max-width, 100px)}lottery-selection-group{width:100%}ui-skeleton{--emw-skeleton-primary-color:#414141;--emw-skeleton-secondary-color:#2f2929}";const y=class{constructor(e){t(this,e),this.loadMore=r(this,"loadMore",7),this.refresh=r(this,"refresh",7),this.startY=0,this.isTouching=!1,this.handleTouchStart=t=>{this.scrollContainer.scrollTop<=0&&(this.startY=t.touches[0].clientY,this.isTouching=!0)},this.handleTouchMove=t=>{if(!this.isTouching||this.isRefreshing)return;const e=t.touches[0].clientY-this.startY;e>0&&this.scrollContainer.scrollTop<=0?(t.cancelable&&t.preventDefault(),this.pullDistance=Math.pow(e,.8)):(this.isTouching=!1,this.pullDistance=0)},this.handleTouchEnd=()=>{this.isTouching=!1,this.pullDistance>=this.pullTriggerDistance?(this.pullDistance=this.pullTriggerDistance,this.refresh.emit()):this.pullDistance=0},this.items=[],this.hasMore=!1,this.isLoading=!1,this.isRefreshing=!1,this.threshold="0px 0px 200px 0px",this.containerHeight="100%",this.renderItem=void 0,this.renderSkeleton=void 0,this.skeletonCount=6,this.pullTriggerDistance=60,this.minItemWidth=340,this.gridGap=10,this.pullDistance=0}componentDidLoad(){this.initObserver()}componentDidUpdate(){this.hasMore&&!this.isLoading&&this.initObserver()}disconnectedCallback(){this.disconnectObserver()}handleRefreshingChange(t){t||(this.pullDistance=0)}disconnectObserver(){this.observer&&(this.observer.disconnect(),this.observer=null)}initObserver(){this.disconnectObserver(),this.hasMore&&!this.isLoading&&this.sentinel&&(this.observer=new IntersectionObserver((t=>{t[0].isIntersecting&&this.hasMore&&!this.isLoading&&this.loadMore.emit()}),{root:this.scrollContainer,rootMargin:this.threshold,threshold:.1}),this.observer.observe(this.sentinel))}render(){const{items:t,minItemWidth:i,gridGap:r}=this,o=0===t.length&&!!this.renderSkeleton&&this.isLoading,n=o?new Array(this.skeletonCount).fill(null):t,a={transform:`translateY(${this.pullDistance}px)`,transition:this.isTouching?"none":"transform 0.3s ease-out"},l={display:"grid",gridTemplateColumns:`repeat(auto-fill, minmax(${i}px, 1fr))`,gap:`${r}px`,boxSizing:"border-box"};return e("div",{key:"eab20294c6af2caafbf03ddefb58947398b5c6e1",class:"lottery-infinite-scroll__container",style:{height:this.containerHeight,overflowY:"auto",position:"relative"},ref:t=>this.scrollContainer=t,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd},e("div",{key:"d2bf17db3948ef45cf9d77c663d7a6b6075e8125",class:"ptr-indicator",style:Object.assign(Object.assign({},a),{position:"absolute",top:"0",left:"0",width:"100%",height:`${this.pullTriggerDistance}px`,display:"flex",alignItems:"center",justifyContent:"center",marginTop:`-${this.pullTriggerDistance}px`,pointerEvents:"none"})},this.isRefreshing?e("slot",{name:"refresh-loading"},"Refreshing..."):e("slot",{name:"pull-hint"},this.pullDistance>this.pullTriggerDistance?"Release":"Pull")),e("div",{key:"48e8997513bf547a0aa8eac7d036ce29f294fff0",class:"scroll-content-wrapper",style:a},e("div",{key:"31c4de5010e1357239ccef2c9c009f7e2cfb5287",class:"list-content",style:l},n.map(((t,i)=>e("div",{key:i,class:"list-item-wrapper"},o?this.renderSkeleton(i):this.renderItem(t,i))))),e("div",{key:"6b0235f48d4c909c2edd400c3eb1d7efd030458e",class:"lottery-infinite-scroll__sentinel",ref:t=>this.sentinel=t,style:{height:"20px",display:"flex",justifyContent:"center",visibility:this.hasMore||this.isLoading&&!o?"visible":"hidden"}},this.isLoading?e("slot",{name:"loading-more"},"Loading..."):null),!this.hasMore&&!this.isLoading&&t.length>0&&e("div",{key:"24406925b5f96f2e9be9d06a2d87166e94d2bdad",class:"end-message",style:{textAlign:"center",padding:"10px"}},e("slot",{key:"189fe2d6f00551cac97267f2047fd76402b862bb",name:"end-message"},"No more data"))))}get el(){return i(this)}static get watchers(){return{isRefreshing:["handleRefreshingChange"]}}};y.style=":host{display:block;width:100%}.lottery-infinite-scroll__container{display:block;width:100%;overflow-x:hidden;-webkit-overflow-scrolling:touch;padding-right:10px;box-sizing:border-box;scrollbar-width:thin;scrollbar-color:var(--emw-hakuna-bg-secondary, #120505) var(--lottery-infinite-scroll-scrollbar-track-background, transparent);}.lottery-infinite-scroll__container::-webkit-scrollbar{width:var(--lottery-infinite-scroll-scrollbar-width, 2px)}.lottery-infinite-scroll__container::-webkit-scrollbar-track{background:var(--lottery-infinite-scroll-scrollbar-track-background, transparent)}.lottery-infinite-scroll__container::-webkit-scrollbar-thumb{background:var(--emw-hakuna-bg-secondary, #120505);border-radius:var(--lottery-infinite-scroll-scrollbar-thumb-border-radius, 2px)}.lottery-infinite-scroll__sentinel{width:100%;display:block;text-align:center;}.lottery-infinite-scroll__sentinel.virtual-scroll-sentinel{height:1px;pointer-events:none;opacity:0;position:absolute;width:100%}.lottery-infinite-scroll__sentinel:not(.virtual-scroll-sentinel){height:1px;}.lottery-infinite-scroll__end-message{width:100%;display:block;text-align:center;}.lottery-infinite-scroll__end-message.virtual-scroll-end-message{position:absolute;width:100%}.ptr-indicator{height:var(--pull-trigger-distance, 60px);margin-top:calc(-1 * var(--pull-trigger-distance, 60px));display:flex;align-items:center;justify-content:center;position:absolute;top:0;width:100%;z-index:10;font-size:14px;color:#666;}";const m=class{constructor(e){t(this,e),this.lotteryBulletClickHandler=r(this,"lotteryBulletClick",7),this.value=0,this.text=void 0,this.idx=void 0,this.type="toggle",this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.hasBorder=!0,this.hasBackground=!0,this.deleteIconSvg="",this.deleteIconWidth="16px",this.deleteIconHeight="16px"}handleClientStylingChange(t,e){t!==e&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!==e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!==e&&l(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&l(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleClick(){"disabled"!==this.type&&"readonly"!==this.type&&(console.log("bullet clicked",this.type,this.idx,this.text,this.value),this.lotteryBulletClickHandler.emit({type:this.type,idx:this.idx,text:this.text,value:this.value}))}render(){let t;return t=this.deleteIconSvg?function(t){let e=t.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"");return e=e.replace(/on[a-z]+=[\"'][^\"']*[\"']/gi,""),e=e.replace(/javascript:/gi,""),e}(this.deleteIconSvg):s(c,{extraSVGAttrs:{width:this.deleteIconWidth,height:this.deleteIconHeight,fill:"currentColor"}}),e("div",{key:"0d1e8aaa80a907a7467410f6b27b4b6175e82299",class:"lottery-selection",ref:t=>this.stylingContainer=t},e("button",{key:"11a2402abbc290dc877ad95f3433092c3a0d8419",class:{"lottery-selection__button":!0,"lottery-selection__button--selected":1==this.value,"lottery-selection__button--disabled":"disabled"===this.type,"lottery-selection__button--no-border":!this.hasBorder,"lottery-selection__button--no-background":!this.hasBackground,isDeleteByIcon:"delete"===this.type,isCallDialogBtn:"input"===this.type||"readonly"===this.type},onClick:this.handleClick.bind(this),disabled:"disabled"===this.type},"delete"===this.type&&e("span",{key:"f99001d936a8f7bdf8adc5c46e82caf730a9442a",class:"lottery-selection__delete-icon",innerHTML:t}),e("span",{key:"55775e2492a1fe45cc8a457ac0a0d206744461ab",class:"lottery-selection__text"},this.text)))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};m.style=":host{display:inline-block}.lottery-selection__button{display:flex;align-items:center;justify-content:center;width:var(--lottery-selection-width, 32px);height:var(--lottery-selection-height, 32px);padding:var(--lottery-selection-padding, 0);box-sizing:border-box;background:var(--lottery-selection-background, var(--emw--color-background, #fff));border:var(--lottery-selection-border-width, 2px) var(--lottery-selection-border-style, solid) var(--lottery-selection-border-color, var(--emw--color-primary, #0d196e));border-radius:var(--lottery-selection-border-radius, var(--emw--border-radius-medium, 8px));color:var(--lottery-selection-color, var(--emw--color-typography, #000));font-weight:var(--lottery-selection-font-weight, bold);font-size:var(--lottery-selection-font-size, 1em);cursor:pointer;user-select:none;}.lottery-selection__button:hover{background:var(--lottery-selection-hover-background, var(--emw--color-background, #fff));border-color:var(--lottery-selection-hover-border-color, var(--emw--color-primary, #0d196e));color:var(--lottery-selection-hover-color, var(--emw--color-typography, #000))}.lottery-selection__button .lottery-selection__delete-icon{display:none}.lottery-selection__button.isDeleteByIcon:hover .lottery-selection__text{display:none}.lottery-selection__button.isDeleteByIcon:hover .lottery-selection__delete-icon{display:flex;align-items:center;justify-content:center;fill:var(--lottery-selection-delete-icon-color, var(--emw--color-typography, #000));vertical-align:middle}.lottery-selection__button.lottery-selection__button--selected{background-color:var(--lottery-selection-selected-background, var(--emw--color-primary, #0d196e));border-color:var(--lottery-selection-selected-border-color, var(--emw--color-primary, #0d196e));color:var(--lottery-selection-selected-color, var(--emw--color-typography-inverse, #fff))}.lottery-selection__button.lottery-selection__button--disabled{background-color:var(--lottery-selection-disabled-background, var(--emw--color-gray-50, #f5f5f5));border-color:var(--lottery-selection-disabled-border-color, var(--emw--color-gray-100, #e6e6e6));color:var(--lottery-selection-disabled-color, var(--emw--color-gray-150, #6f6f6f));cursor:not-allowed;pointer-events:none;}.lottery-selection__button.lottery-selection__button--no-border{border:none}.lottery-selection__button.lottery-selection__button--no-background{background:transparent}";const f=["ro","en","fr","ar","hr","zh"],v={en:{noTicketBoard:"No ticket board available.",selectionCleared:"Your selection has been cleared.",clearAll:"Clear All",stopAt:"Stop at",turnover:"Turnover: ",pleaseFillIn:"Please fill in all the selection input!",fillIn:"Fill in",noBets:"Sorry. No bets have been placed so far. Check back later!",search:"Search",clear:"Clear",oddsChart:"Odds Chart",ticketSuccess:"Ticket purchased successfully.",stakePerLine:"Stake per Line:",lowestOdds:"Lowest Odds:",highestOdds:"Highest Odds:",orderSummary:"ORDER SUMMARY",ticket:"Ticket",lines:"Lines",total:"Total",submit:"Submit",loading:"Loading",enterValidNumber:"Please enter a valid number.",enterNumberBetween:"Please enter a number between {min} and {max}.",numberAlreadySelected:"This number has already been selected.",enterScoreUpTo:"Please enter the score (Up to {maxScore})",enterValue:"Please enter a value",myChoices:"My Choices",teams:"Teams",scores:"Scores",euro:"Euro",cancel:"Cancel",confirm:"Confirm"},ro:{},fr:{},ar:{},hr:{}},k=(t,e,i)=>{const r=e;let o=v[void 0!==r&&f.includes(r)?r:"en"][t];return i&&Object.keys(i).forEach((t=>{o=o.replace(`{${t}}`,i[t])})),o};function w(t,e){return new Set(t?t.split(e):[])}function x(t,e){return e.filter((e=>e!==t))}function _(t,e){return e.concat([t])}const S=class{constructor(e){t(this,e),this.bulletGroupUpdateSelectedBulletTexts=r(this,"bulletGroupUpdateSelection",7),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.language="en",this.translationUrl="",this.splitToken=",",this.selectionGroupId=void 0,this.selectionGroupLabel=void 0,this.type="bet",this.selectedBulletTexts=null,this.maxSelectedCount=null,this.maxDisplayBulletsCount=11,this.bulletTexts=null,this.maxIntegerBulletText=null,this.minIntegerBulletText=0,this.bulletTextType="integer",this.hasBorder=!0,this.hasBackground=!0,this.dialogTitle=void 0,this.dialogInputPlaceholder=void 0,this.dialogConfig={width:"400px",visible:!1,onConfirm:()=>this.handleFillInAddMore(),onCancel:()=>this.handleCloseAddMoreDialog()},this.inputInfo={valid:!0,errorMessage:"",value:""}}handleClientStylingChange(t,e){t!=e&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&l(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])v[e][i]=t[e][i]})))}componentDidLoad(){this.stylingContainer&&(this.mbSource&&l(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}lotteryBulletClickHandler(t){if(t.stopPropagation(),"input"!==t.detail.type)if(["delete","toggle"].includes(t.detail.type))this.bulletGroupUpdateSelectedBulletTexts.emit({newSelectedBulletTexts:(e=t.detail,i=Array.from(this.selectedSet),r=this.maxSelectedCount,"delete"===e.type?x(e.text,i):"toggle"===e.type?i.includes(e.text)?x(e.text,i):i.length>=r?function(t,e,i){return e.slice(e.length-(i-1)).concat([t])}(e.text,i,r):_(e.text,i):[]).join(this.splitToken),selectionGroupId:this.selectionGroupId});else var e,i,r;else this.dialogConfig=Object.assign(Object.assign({},this.dialogConfig),{visible:!0})}get selectedSet(){return w(this.selectedBulletTexts,this.splitToken)}get bulletTextsSet(){return this.bulletTexts?w(this.bulletTexts,this.splitToken):"integer"===this.bulletTextType&&null!=this.maxIntegerBulletText?w(Array.from({length:Number(this.lastDisplayBulletText)-this.minIntegerBulletText+1},((t,e)=>this.minIntegerBulletText+e)).join(this.splitToken),this.splitToken):new Set}get lastDisplayBulletText(){if("integer"===this.bulletTextType)return null!=this.maxIntegerBulletText?Math.min(this.maxIntegerBulletText,this.minIntegerBulletText+this.maxDisplayBulletsCount-1):this.minIntegerBulletText+this.maxDisplayBulletsCount-1;if(this.bulletTextsSet.size>0){const t=Array.from(this.bulletTextsSet);return t.length>=this.maxDisplayBulletsCount?t[this.maxDisplayBulletsCount-1]:t[t.length-1]}return null}get isSingleSelectionMode(){return 1===this.maxSelectedCount}getBulletToRender(){const t=Array.from(this.bulletTextsSet);let e=t,i=!1;return"text"===this.bulletTextType?t.length>this.maxDisplayBulletsCount?(i=!0,e=t.slice(0,this.maxDisplayBulletsCount-1)):e=t:(i=null!=this.maxIntegerBulletText&&this.maxIntegerBulletText>Number(this.lastDisplayBulletText),e=t),{bulletsToRender:e,showInputButton:i}}renderBulletGroup(){let t=[];if("bet"===this.type){const e=null!==this.maxSelectedCount&&this.selectedSet.size>=this.maxSelectedCount,{bulletsToRender:i,showInputButton:r}=this.getBulletToRender();if(i.forEach(((i,r)=>{let o="toggle";this.selectedSet.has(String(i))||!e||this.isSingleSelectionMode||(o="disabled"),t.push({value:this.selectedSet.has(String(i))?1:0,text:String(i),idx:r,type:o})})),r){let i="input";e&&!this.isSingleSelectionMode&&(i="disabled");const r="text"===this.bulletTextType?"...":`${this.lastDisplayBulletText}+`,o="text"===this.bulletTextType?-1:Number(this.lastDisplayBulletText)+1;"integer"===this.bulletTextType&&t.length>=this.maxDisplayBulletsCount&&t.pop(),t.push({value:0,text:r,idx:o,type:i})}}else if(["choice","preview"].includes(this.type)){const{bulletsToRender:e}=this.getBulletToRender();e.forEach(((e,i)=>{let r="toggle";"preview"===this.type?r="readonly":this.selectedSet.has(String(e))&&(r="delete"),t.push({value:this.selectedSet.has(String(e))?1:0,text:e,idx:i,type:r})}))}return e("div",{class:"lottery-selection-group__item--right"},t.map((t=>e("lottery-selection",{clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,mbSource:this.mbSource,text:t.text,idx:t.idx,value:t.value,type:t.type,hasBorder:this.hasBorder,hasBackground:this.hasBackground}))))}handleCloseAddMoreDialog(){this.dialogConfig=Object.assign(Object.assign({},this.dialogConfig),{visible:!1}),this.inputInfo={value:"",errorMessage:"",valid:!0}}handleInputChange(t){const e=t.target.value;this.inputInfo=Object.assign(Object.assign({},this.inputInfo),{value:e}),this.inputInfo=function({value:t,selectedSet:e,maxValue:i,minValue:r,language:o,type:n="integer"}){const a=t.trim();if("integer"===n){if(!/^-?\d+$/.test(a))return{valid:!1,errorMessage:k("enterValidNumber",o),value:t};const n=Number(a);if(isNaN(n))return{valid:!1,errorMessage:k("enterValidNumber",o),value:t};if(void 0!==r&&n<r||void 0!==i&&n>i)return{valid:!1,errorMessage:k("enterNumberBetween",o,{min:r,max:i}),value:t};const l=String(n);if(e.has(l))return{valid:!1,errorMessage:k("numberAlreadySelected",o),value:t}}else if(e.has(a))return{valid:!1,errorMessage:k("numberAlreadySelected",o),value:t};return{valid:!0,errorMessage:"",value:t}}({value:e,selectedSet:this.selectedSet,maxValue:this.maxIntegerBulletText,minValue:"integer"===this.bulletTextType?Number(this.lastDisplayBulletText)+1:void 0,language:this.language,type:this.bulletTextType})}handleFillInAddMore(){if(this.inputInfo.valid){const{value:t}=this.inputInfo;let e,i=t;i="integer"===this.bulletTextType?String(Number(t)):t.trim(),e=this.isSingleSelectionMode?i:_(i,Array.from(this.selectedSet)).join(this.splitToken),this.bulletGroupUpdateSelectedBulletTexts.emit({newSelectedBulletTexts:e,selectionGroupId:this.selectionGroupId}),this.handleCloseAddMoreDialog()}}render(){return e("div",{key:"66b8e9c63d948eb2f7eb37adb80892dbedd7df9a",class:"lottery-selection-group",ref:t=>this.stylingContainer=t},e("div",{key:"6562fdcad0f352b5e2d03edcc980a9aeab32277e",class:"lottery-selection-group__item"},this.selectionGroupLabel&&e("div",{key:"43c2132e4904a2b69b970d9b2074f120ed4d0986",class:"lottery-selection-group__item--left"},this.selectionGroupLabel),this.renderBulletGroup()),e("lottery-tipping-dialog",{key:"cb693d10e6b499628909571021d8508cdebbe29a",visible:this.dialogConfig.visible,width:this.dialogConfig.width,onCancel:this.dialogConfig.onCancel},e("div",{key:"dd312634574bbe1b4d3de7e82a9c58f58f846c1a",class:"addSelectionDialog"},e("div",{key:"b371b1090598f0219a7c652bab51e9d349703c34",class:"addSelectionDialog-title"},this.dialogTitle||("text"===this.bulletTextType?k("enterValue",this.language):k("enterScoreUpTo",this.language,{maxScore:this.maxIntegerBulletText}))),e("input",{key:"b5f1bb74999246dac8dc20f04e3af893deae6654",type:"text",class:{"dialog-input":!0,invalid:!this.inputInfo.valid},value:this.inputInfo.value,onInput:this.handleInputChange.bind(this),placeholder:this.dialogInputPlaceholder}),e("div",{key:"f33970a6dffdc881ffa9cf2c0bb54b26b27cccd6",class:"error-message"},this.inputInfo.errorMessage)),e("div",{key:"4c580dae14b38aff03e17067b2c0b72d01aa4f42",slot:"footer",class:"addSelectionDialog-footer"},e("lottery-button",{key:"874aa0ffde8fe2d0b08efea0cf951f101ab8dad0",onClick:this.dialogConfig.onCancel,text:k("cancel",this.language),variant:"outline"}),e("lottery-button",{key:"63a556eb5f9ad1cdd357c017756be274d40ef235",onClick:this.dialogConfig.onConfirm,text:k("confirm",this.language),variant:"primary",disabled:!this.inputInfo.valid||!this.inputInfo.value}))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};S.style=":host {\n width: 100%;\n}\n\n.lottery-selection-group {\n container-type: inline-size;\n padding: var(--lottery-selection-group-padding, 0);\n background: var(--lottery-selection-group-background, transparent);\n border: var(--lottery-selection-group-border, none);\n border-radius: var(--lottery-selection-group-border-radius, 0);\n}\n.lottery-selection-group__item {\n display: flex;\n flex-direction: var(--lottery-selection-group-flex-direction, row);\n align-items: var(--lottery-selection-group-item-align, center);\n justify-content: var(--lottery-selection-group-item-justify, flex-start);\n gap: var(--lottery-selection-group-item-gap, 16px);\n width: 100%;\n}\n.lottery-selection-group__item--left {\n width: var(--lottery-selection-group-label-width, 130px);\n min-width: var(--lottery-selection-group-label-min-width, auto);\n max-width: var(--lottery-selection-group-label-max-width, none);\n color: var(--lottery-selection-group-label-color, var(--emw--color-typography, #000));\n font-size: var(--lottery-selection-group-label-font-size, 1em);\n font-weight: var(--lottery-selection-group-label-font-weight, bold);\n text-align: var(--lottery-selection-group-label-align, left);\n white-space: var(--lottery-selection-group-label-white-space, normal);\n}\n.lottery-selection-group__item--right {\n flex: 1;\n display: flex;\n flex-wrap: var(--lottery-selection-group-bullets-wrap, wrap); /* Allow items to wrap */\n gap: var(--lottery-selection-group-bullets-gap, 8px); /* Gap between bullets */\n align-items: var(--lottery-selection-group-bullets-align, center);\n justify-content: var(--lottery-selection-group-bullets-justify, flex-start); /* Align bullets to start */\n}\n@container (max-width: 320px) {\n .lottery-selection-group__item--left {\n width: 100px;\n max-width: 100px;\n }\n}\n\n.dialog-input {\n width: 100%;\n padding: var(--lottery-selection-group-input-padding, 8px);\n border: var(--lottery-selection-group-input-border-width, 1px) var(--lottery-selection-group-input-border-style, solid) var(--lottery-selection-group-input-border-color, var(--emw--color-gray-100, #e6e6e6));\n border-radius: var(--lottery-selection-group-input-radius, 4px);\n background-color: var(--lottery-selection-group-input-bg, #fff);\n color: var(--lottery-selection-group-input-color, #000);\n box-sizing: border-box;\n margin-top: var(--lottery-selection-group-input-margin-top, 10px);\n font-size: var(--lottery-selection-group-input-font-size, 1em);\n}\n.dialog-input::placeholder {\n color: var(--lottery-selection-group-input-placeholder-color, #999);\n}\n\n.dialog-input.invalid,\n.dialog-input.invalid:focus {\n border-color: var(--emw--color-error, #ff3d00);\n outline-color: var(--emw--color-error, #ff3d00);\n}\n\n.error-message {\n color: var(--lottery-selection-group-error-color, var(--emw--color-error, #ff3d00));\n font-size: var(--lottery-selection-group-error-font-size, 12px);\n font-weight: var(--lottery-selection-group-error-font-weight, normal);\n margin-top: 4px;\n}\n\n.addSelectionDialog-title {\n color: var(--lottery-selection-group-dialog-title-color, var(--emw--color-typography, #000));\n font-size: var(--lottery-selection-group-dialog-title-font-size, 1.2em);\n font-weight: var(--lottery-selection-group-dialog-title-font-weight, bold);\n margin-bottom: var(--lottery-selection-group-dialog-title-margin-bottom, 0);\n}\n.addSelectionDialog-footer {\n display: flex;\n justify-content: var(--lottery-selection-group-dialog-footer-justify, flex-end);\n gap: var(--lottery-selection-group-dialog-footer-gap, 18px);\n margin-top: var(--lottery-selection-group-dialog-footer-margin-top, 0);\n}";const C=["ro","en","fr","ar","hr"],$={en:{cancel:"Cancel",confirm:"Confirm"},ro:{cancel:"Anulează",confirm:"Confirmă"},fr:{cancel:"Annuler",confirm:"Confirmer"},ar:{cancel:"إلغاء",confirm:"تأكيد"},hr:{cancel:"Odustani",confirm:"Potvrdi"}},z=(t,e)=>{const i=e;return $[void 0!==i&&C.includes(i)?i:"en"][t]},j=class{constructor(e){t(this,e),this.open=r(this,"open",7),this.close=r(this,"close",7),this.confirm=r(this,"confirm",7),this.cancel=r(this,"cancel",7),this.wasVisible=!1,this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.visible=void 0,this.dialogTitle="",this.width="520px",this.closable=!0,this.mask=!0,this.maskClosable=!0,this.animationDuration=300,this.fullscreen=!1,this.showFooter=!0,this.showCancelBtn=!0,this.language="en",this.translationUrl=void 0,this.dialogClass=void 0,this.dialogStyle=void 0}handleClientStylingChange(t,e){t!=e&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&l(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){this.translationUrl&&(async t=>{if(t)try{const i=await fetch(t);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const r=await i.json();e=r,Object.keys(e).forEach((t=>{for(let i in e[t])$[t][i]=e[t][i]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl)}componentWillUpdate(){this.visible&&!this.wasVisible?this.disableBodyScroll():!this.visible&&this.wasVisible&&this.enableBodyScroll(),this.wasVisible=this.visible}disconnectedCallback(){this.enableBodyScroll(),this.stylingSubscription&&this.stylingSubscription.unsubscribe()}disableBodyScroll(){document.body.style.overflow="hidden"}enableBodyScroll(){document.body.style.overflow=""}handleClose(){this.cancel.emit()}handleMaskClick(){this.maskClosable&&this.cancel.emit()}handleConfirm(){this.confirm.emit()}render(){const t=Object.assign({width:"number"==typeof this.width?`${this.width}px`:this.width,"--duration":`${this.animationDuration}ms`},this.dialogStyle||{}),i=["dialog-wrapper",this.visible?"dialog-wrapper-visible":""],r=["mask",this.visible?"mask-enter":"mask-leave"],o=["dialog",this.visible?"dialog-enter":"dialog-leave",this.fullscreen?"fullscreen":"",this.dialogClass].filter(Boolean).join(" ");return e("div",{key:"306683c5190fa6dca57dcf75e52eca575c0215e7",class:i.join(" "),ref:t=>this.stylingContainer=t},e("div",{key:"8be097f3a86fcd9ad4e18c6ac56cafdcf249049b",class:r.join(" "),onClick:this.handleMaskClick.bind(this)}),e("div",{key:"87d2206d3e3d75fe0e0ef8a6afd8de5c20892ae6",part:"dialog",class:o,style:t,role:"dialog","aria-modal":"true","aria-labelledby":"dialog-title"},e("div",{key:"30ca33b925ff2525ead8aae83e72031258367b40",class:"dialog-header"},e("h2",{key:"492c3e864ac1547da58b0a47e4cc8d45470bde54",id:"dialog-title",class:"dialog-title"},this.dialogTitle),this.closable&&e("button",{key:"8ae4b872d18ce82d33292dc794e8a1f714a96ba9",class:"close-btn",onClick:this.handleClose.bind(this)},"x")),e("div",{key:"d661c78b333f78b9dee92e0975f8b136ef5a3071",class:"dialog-content",style:{maxHeight:"calc(100vh - 62px)",overflowY:"auto"}},e("slot",{key:"f32a6f6e4962239e0148e61c4bb70f6b5d3a2c82"})),this.showFooter&&e("div",{key:"40b5e9fd1c9221eb4d6c87d053c5d018f540d8e7",class:"dialog-footer"},e("slot",{key:"91539def47d118a69735ec229e7a6b36fc1db40b",name:"footer"},this.showCancelBtn&&e("button",{key:"f3b3add23f150c660159a906c2ef23b5fbe3b4c5",class:"cancel-btn",onClick:this.handleClose.bind(this)},z("cancel",this.language)),e("button",{key:"5fc33e89b6c55ac9e2162302e128bce0e79c5f89",class:"confirm-btn",onClick:this.handleConfirm.bind(this)},z("confirm",this.language))))))}get el(){return i(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};j.style=".dialog-wrapper{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;visibility:hidden;opacity:1;z-index:199}.dialog-wrapper-visible{visibility:visible}.mask{position:fixed;inset:0;background-color:rgba(0, 0, 0, 0.5);opacity:0;z-index:1000;transition:opacity var(--duration) linear}.mask-enter{opacity:1}.mask-leave{opacity:0}.dialog{position:relative;background:var(--emw--color-background, #fff);border-radius:12px;box-shadow:0 4px 32px rgba(0, 0, 0, 0.15);opacity:0;transform:scale(0.9);transition:all var(--duration) linear;width:100%;max-width:100vw;overflow:hidden;z-index:1000}.dialog-enter{opacity:1;transform:scale(1)}.dialog-leave{opacity:0}.dialog.fullscreen{width:100vw !important;height:100vh;overflow:auto;max-height:none;border-radius:0;overflow:hidden}.dialog-header{padding:16px 16px 0 16px;display:flex;justify-content:space-between;align-items:center}.dialog-header .dialog-title{margin:0;font-size:1.25rem;font-weight:500;color:var(--emw--color-typography, #000)}.dialog-header .close-btn{background:transparent;border:none;font-size:1.5rem;width:2rem;height:2rem;color:var(--emw--color-gray-150, #6f6f6f);cursor:pointer;border-radius:4px}.dialog-header .close-btn:hover{background:var(--emw--color-gray-50, #f5f5f5);color:var(--emw--color-gray-300, #333)}.dialog-content{padding:24px;font-size:0.95rem;line-height:1.6;color:var(--emw--color-dialog-typography, #000);flex:1;overflow-y:auto;max-height:calc(100vh - 200px)}.dialog.fullscreen .dialog-content{max-height:none}.dialog-footer{padding:0 16px 16px 16px;display:flex;justify-content:center;gap:12px}.dialog-footer .cancel-btn,.dialog-footer .confirm-btn{padding:10px 24px;border-radius:6px;font-size:0.9rem;cursor:pointer;transition:all 0.3s linear}.dialog-footer .cancel-btn{border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));background-color:var(--emw--color-background, #fff);color:var(--emw--color-typography, #000)}.dialog-footer .cancel-btn:hover{background-color:var(--emw--color-background-tertiary, #ccc)}.dialog-footer .confirm-btn{border:none;color:var(--emw--color-typography-normalized, #ffffff);background:var(--emw--color-primary, #009993)}.dialog-footer .confirm-btn:hover{background:var(--emw--color-primary-variant, #004d4a)}@media screen and (max-width: 480px){.dialog.fullscreen .dialog-content{padding:12px}}.Loading{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.Loading svg{animation:spin 1s linear infinite;transform-origin:center}@keyframes spin{100%{transform:rotate(360deg)}}";const T=class{constructor(e){t(this,e),this.stylingValue={width:this.handleStylingProps(this.width),height:this.handleStylingProps(this.height),borderRadius:this.handleStylingProps(this.borderRadius),marginBottom:this.handleStylingProps(this.marginBottom),marginTop:this.handleStylingProps(this.marginTop),marginLeft:this.handleStylingProps(this.marginLeft),marginRight:this.handleStylingProps(this.marginRight),size:this.handleStylingProps(this.size)},this.structure=void 0,this.width="unset",this.height="unset",this.borderRadius="unset",this.marginBottom="unset",this.marginTop="unset",this.marginLeft="unset",this.marginRight="unset",this.animation=!0,this.rows=0,this.size="100%"}handleStructureChange(t,e){e!==t&&this.handleStructure(t)}handleStylingProps(t){switch(typeof t){case"number":return 0===t?0:`${t}px`;case"undefined":default:return"unset";case"string":return["auto","unset","none","inherit","initial"].includes(t)||t.endsWith("px")||t.endsWith("%")?t:"unset"}}handleStructure(t){switch(t){case"logo":return this.renderLogo();case"image":return this.renderImage();case"title":return this.renderTitle();case"text":return this.renderText();case"rectangle":return this.renderRectangle();case"circle":return this.renderCircle();default:return null}}renderLogo(){return e("div",{class:"SkeletonContainer"},e("div",{class:"SkeletonLogo "+(this.animation?"Skeleton":"")}))}renderImage(){return e("div",{class:"SkeletonImage "+(this.animation?"Skeleton":"")})}renderTitle(){return e("div",{class:"SkeletonContainer"},e("div",{class:"SkeletonTitle "+(this.animation?"Skeleton":"")}))}renderText(){return e("div",{class:"SkeletonContainer"},Array.from({length:this.rows>0?this.rows:1}).map(((t,i)=>e("div",{key:i,class:"SkeletonText "+(this.animation?"Skeleton":"")}))))}renderRectangle(){return e("div",{class:"SkeletonContainer"},e("div",{class:"SkeletonRectangle "+(this.animation?"Skeleton":"")}))}renderCircle(){return e("div",{class:"SkeletonContainer"},e("div",{class:"SkeletonCircle "+(this.animation?"Skeleton":"")}))}render(){let t="";switch(this.structure){case"logo":t=`\n :host {\n --emw-skeleton-logo-width: ${this.stylingValue.width};\n --emw-skeleton-logo-height: ${this.stylingValue.height};\n --emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"image":t=`\n :host {\n --emw-skeleton-image-width: ${this.stylingValue.width};\n --emw-skeleton-image-height: ${this.stylingValue.height};\n --emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"title":t=`\n :host {\n --emw-skeleton-title-width: ${this.stylingValue.width};\n --emw-skeleton-title-height: ${this.stylingValue.height};\n --emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"text":t=`\n :host {\n --emw-skeleton-text-width: ${this.stylingValue.width};\n --emw-skeleton-text-height: ${this.stylingValue.height};\n --emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"rectangle":t=`\n :host {\n --emw-skeleton-rectangle-width: ${this.stylingValue.width};\n --emw-skeleton-rectangle-height: ${this.stylingValue.height};\n --emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"circle":t=`\n :host {\n --emw-skeleton-circle-size: ${this.stylingValue.size};\n }\n `;break;default:t=""}return e(o,{key:"c2a2650acd416962a2bc4e1a7ee18bc6d8e2def8"},e("style",{key:"9bd7fc1f9e9ed9f17735a7b72fce6f09696f5e19"},t),this.handleStructure(this.structure))}static get watchers(){return{structure:["handleStructureChange"]}}};T.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{u as lottery_button,p as lottery_hakuna_ticket_history_item,y as lottery_infinite_scroll,m as lottery_selection,S as lottery_selection_group,j as lottery_tipping_dialog,T as ui_skeleton}