@everymatrix/lottery-tipping-page 1.99.57 → 1.99.59

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.
@@ -4826,7 +4826,7 @@ const LotteryTippingDialog = class {
4826
4826
  };
4827
4827
  LotteryTippingDialog.style = LotteryTippingDialogStyle0;
4828
4828
 
4829
- var qr=Object.defineProperty,Yr=Object.defineProperties;var Kr=Object.getOwnPropertyDescriptors;var lo=Object.getOwnPropertySymbols;var Gr=Object.prototype.hasOwnProperty,Xr=Object.prototype.propertyIsEnumerable;var Mt=(s,t,e)=>t in s?qr(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e,we=(s,t)=>{for(var e in t||(t={}))Gr.call(t,e)&&Mt(s,e,t[e]);if(lo)for(var e of lo(t))Xr.call(t,e)&&Mt(s,e,t[e]);return s},Nt=(s,t)=>Yr(s,Kr(t));var k=(s,t,e)=>(Mt(s,typeof t!="symbol"?t+"":t,e),e);var Ce=(s,t,e)=>new Promise((i,o)=>{var r=l=>{try{a(e.next(l));}catch(d){o(d);}},n=l=>{try{a(e.throw(l));}catch(d){o(d);}},a=l=>l.done?i(l.value):Promise.resolve(l.value).then(r,n);a((e=e.apply(s,t)).next());});/**
4829
+ var qr=Object.defineProperty,Yr=Object.defineProperties;var Kr=Object.getOwnPropertyDescriptors;var lo=Object.getOwnPropertySymbols;var Gr=Object.prototype.hasOwnProperty,Xr=Object.prototype.propertyIsEnumerable;var Mt=(s,t,e)=>t in s?qr(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e,we=(s,t)=>{for(var e in t||(t={}))Gr.call(t,e)&&Mt(s,e,t[e]);if(lo)for(var e of lo(t))Xr.call(t,e)&&Mt(s,e,t[e]);return s},Nt=(s,t)=>Yr(s,Kr(t));var k=(s,t,e)=>Mt(s,typeof t!="symbol"?t+"":t,e);var Ce=(s,t,e)=>new Promise((i,o)=>{var r=l=>{try{a(e.next(l));}catch(d){o(d);}},n=l=>{try{a(e.throw(l));}catch(d){o(d);}},a=l=>l.done?i(l.value):Promise.resolve(l.value).then(r,n);a((e=e.apply(s,t)).next());});/**
4830
4830
  * @license
4831
4831
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4832
4832
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
@@ -4823,7 +4823,7 @@ const LotteryTippingDialog = class {
4823
4823
  };
4824
4824
  LotteryTippingDialog.style = LotteryTippingDialogStyle0;
4825
4825
 
4826
- var qr=Object.defineProperty,Yr=Object.defineProperties;var Kr=Object.getOwnPropertyDescriptors;var lo=Object.getOwnPropertySymbols;var Gr=Object.prototype.hasOwnProperty,Xr=Object.prototype.propertyIsEnumerable;var Mt=(s,t,e)=>t in s?qr(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e,we=(s,t)=>{for(var e in t||(t={}))Gr.call(t,e)&&Mt(s,e,t[e]);if(lo)for(var e of lo(t))Xr.call(t,e)&&Mt(s,e,t[e]);return s},Nt=(s,t)=>Yr(s,Kr(t));var k=(s,t,e)=>(Mt(s,typeof t!="symbol"?t+"":t,e),e);var Ce=(s,t,e)=>new Promise((i,o)=>{var r=l=>{try{a(e.next(l));}catch(d){o(d);}},n=l=>{try{a(e.throw(l));}catch(d){o(d);}},a=l=>l.done?i(l.value):Promise.resolve(l.value).then(r,n);a((e=e.apply(s,t)).next());});/**
4826
+ var qr=Object.defineProperty,Yr=Object.defineProperties;var Kr=Object.getOwnPropertyDescriptors;var lo=Object.getOwnPropertySymbols;var Gr=Object.prototype.hasOwnProperty,Xr=Object.prototype.propertyIsEnumerable;var Mt=(s,t,e)=>t in s?qr(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e,we=(s,t)=>{for(var e in t||(t={}))Gr.call(t,e)&&Mt(s,e,t[e]);if(lo)for(var e of lo(t))Xr.call(t,e)&&Mt(s,e,t[e]);return s},Nt=(s,t)=>Yr(s,Kr(t));var k=(s,t,e)=>Mt(s,typeof t!="symbol"?t+"":t,e);var Ce=(s,t,e)=>new Promise((i,o)=>{var r=l=>{try{a(e.next(l));}catch(d){o(d);}},n=l=>{try{a(e.throw(l));}catch(d){o(d);}},a=l=>l.done?i(l.value):Promise.resolve(l.value).then(r,n);a((e=e.apply(s,t)).next());});/**
4827
4827
  * @license
4828
4828
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4829
4829
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
@@ -1,4 +1,4 @@
1
- import{r as t,h as e,g as i,c as o,a as n}from"./index-de792262.js";import{s as r,a as s,b as a}from"./lottery-tipping-page-54ab9176.js";export{L as lottery_tipping_page}from"./lottery-tipping-page-54ab9176.js";const l=class{constructor(e){t(this,e),this.show=()=>this.visible=!0,this.hide=()=>this.visible=!1,this.visible=!1}componentDidLoad(){this.trigger=this.host.querySelector('[slot="trigger"]'),this.trigger&&(this.trigger.addEventListener("mouseenter",this.show),this.trigger.addEventListener("mouseleave",this.hide),this.trigger.addEventListener("focus",this.show),this.trigger.addEventListener("blur",this.hide))}disconnectedCallback(){this.trigger&&(this.trigger.removeEventListener("mouseenter",this.show),this.trigger.removeEventListener("mouseleave",this.hide),this.trigger.removeEventListener("focus",this.show),this.trigger.removeEventListener("blur",this.hide))}render(){return e("div",{key:"e56695ac60fcd7903127179423e9954ef40f05c0",class:"tooltip-wrapper"},e("slot",{key:"4e2472a395ceeb2b911692739d326c031df07e29",name:"trigger"}),e("div",{key:"f77bd72da94eb17d12e42ebb86c395c55801b728",class:{"tooltip-content-wrapper":!0,visible:this.visible}},e("div",{key:"988399e2b42988622d46eaf255f17c6221eb9697",class:"tooltip-content"},e("slot",{key:"05de0572ab1331d965e61947c5c15775e225197a",name:"content"}))))}get host(){return i(this)}};l.style=":host{display:inline-flex;position:relative}.tooltip-wrapper{position:relative;display:inline-flex}.tooltip-content-wrapper{position:absolute;z-index:10;bottom:125%;left:50%;transform:translateX(-50%);opacity:0;visibility:hidden;transition:opacity 0.2s, visibility 0.2s}.tooltip-content-wrapper.visible{opacity:1;visibility:visible}.tooltip-content{background-color:var(--emw--tooltip-background-color, #000);color:var(--emw--tooltip-text-color, #fff);border-radius:4px;box-shadow:0 2px 8px rgba(0, 0, 0, 0.15);white-space:nowrap;padding:4px}";const h=class{constructor(e){t(this,e),this.change=o(this,"change",7),this.handleOutsideClick=t=>{t.composedPath().includes(this.el)||(this.dropdownOpen=!1,this.overflowOpen=!1)},this.toggleDropdown=t=>{t.stopPropagation(),this.dropdownOpen=!this.dropdownOpen,this.overflowOpen=!1},this.isSelected=t=>this.selectedValues.includes(t),this.selectItem=t=>{this.isSelected(t.value)||(this.selectedValues=[...this.selectedValues,t.value],this.change.emit(this.selectedValues))},this.toggleItem=t=>{this.isSelected(t.value)?this.removeItem(t.value):this.selectItem(t)},this.removeItem=(t,e)=>{e&&e.stopPropagation(),this.selectedValues=this.selectedValues.filter((e=>e!==t)),this.change.emit(this.selectedValues)},this.downIcon=n("../static/dropdown.svg"),this.upIcon=n("../static/dropup.svg"),this.isTouch="ontouchstart"in window,this.openOverflow=()=>{this.isTouch||(this.computePopoverPosition(),this.overflowOpen=!0)},this.closeOverflow=()=>{this.isTouch||(this.overflowOpen=!1)},this.toggleOverflow=t=>{t.stopPropagation(),this.computePopoverPosition(),this.overflowOpen=!this.overflowOpen},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.options=[],this.maxVisibleChips=2,this.placeholder="",this.selectedValues=[],this.dropdownOpen=!1,this.overflowOpen=!1,this.popoverStyle={top:"0px",left:"0px"}}handleClientStylingChange(t,e){t!=e&&r(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`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}async clear(){this.selectedValues=[],this.change.emit(this.selectedValues)}componentWillLoad(){document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){document.removeEventListener("click",this.handleOutsideClick),this.stylingSubscription&&this.stylingSubscription.unsubscribe()}get selectedOptions(){return this.options.filter((t=>this.isSelected(t.value)))}get visibleChips(){return this.selectedOptions.slice(0,this.maxVisibleChips)}get hiddenChips(){return this.selectedOptions.slice(this.maxVisibleChips)}computePopoverPosition(){if(this.overflowChipEl&&this.el){const{left:t}=this.overflowChipEl.getBoundingClientRect(),{left:e,height:i}=this.el.getBoundingClientRect();this.popoverStyle={top:i-10+"px",left:t-e+"px"}}}render(){var t;return e("div",{key:"50b48397be3ede1907ab2c2abcd1cf2f43f69c13",class:"general-multi-select-container",ref:t=>this.stylingContainer=t},e("div",{key:"696a1bb1f221f8f5cf290fac040af10e2e5a115e",class:"multi-select-container",ref:t=>this.el=t},e("div",{key:"9ea92f01787b26d43054573a11896cf65065b073",class:"flex-row",onClick:this.toggleDropdown},e("div",{key:"f79720ca3ec383ee7f95b09483698ee18119c79a",class:"control"},this.visibleChips.map((t=>e("span",{class:"chip"},e("div",{class:"chip-text",title:t.text},t.text),e("div",{class:"remove-btn",onClick:e=>this.removeItem(t.value,e)},"×")))),this.hiddenChips.length>0&&e("span",{key:"25e9e527c33dd7a315dacb10cc51084fe69b9b7e",class:"chip overflow-chip",ref:t=>this.overflowChipEl=t,onMouseEnter:this.openOverflow,onMouseLeave:this.closeOverflow,onClick:this.toggleOverflow},"•••"),0===this.selectedValues.length&&e("span",{key:"b061de660a55f7a0d41ce9aa650108d3f38a9dc0",class:"placeholder"},this.placeholder)),e("div",{key:"f83b6517e88b3976cdc18590f8f1233cb2515230",class:"arrow"},e("img",{key:"1b61a49090237057b98e5ce8a4f7c1e3bfc9d4ba",class:"info-icon",src:this.dropdownOpen?this.upIcon:this.downIcon,style:{width:"18px"}}))),this.dropdownOpen&&e("div",{key:"e5b081007bcbdd251ce5ac235c1f19f17852c420",class:"dropdown"},this.options.map((t=>e("div",{class:{"dropdown-item":!0,selected:this.isSelected(t.value)},onClick:()=>this.toggleItem(t)},t.text)))),this.overflowOpen&&!!(null===(t=this.hiddenChips)||void 0===t?void 0:t.length)&&e("div",{key:"f8e3289042c69c569bebcd0a40d90f31261c6c12",class:"overflow-popover",style:{top:this.popoverStyle.top,left:this.popoverStyle.left},onMouseEnter:this.openOverflow,onMouseLeave:this.closeOverflow},this.hiddenChips.map((t=>e("span",{class:"chip"},e("span",{class:"chip-text",title:t.text},t.text),e("span",{class:"remove-btn",onClick:e=>this.removeItem(t.value,e)},"×")))))))}static get assetsDirs(){return["../static"]}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};h.style='.multi-select-container{position:relative;font-family:"Inter", sans-serif;margin-top:4px;width:100%}.flex-row{display:flex;flex-direction:row;align-items:center;flex-wrap:nowrap;padding:6px 10px;padding-right:6px;border-radius:0.25em;background:var(--emw-selector-color-background, #e8ebef);cursor:pointer}.control{flex:1;display:flex;align-items:center;flex-wrap:nowrap;overflow:hidden}.control:focus-within{border-color:var(--emw--color-primary, #fed275);box-shadow:0 0 0 2px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15))}.chip{display:inline-flex;align-items:center;background:var(--emw--color-gray-50, #f5f5f5);color:var(--emw--color-dialog-typography, #000);border-radius:4px;padding:2px 8px;margin-right:6px;font-size:0.875rem;line-height:1.2;justify-content:space-between;flex:0 1 auto;min-width:0}.chip-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.overflow-chip{background:var(--emw--color-gray-100, #e6e6e6);color:var(--emw--color-gray-300, #333);width:20px;text-align:center;display:block}.remove-btn{background:none;border:none;font-size:1rem;margin-left:6px;cursor:pointer;color:var(--emw--color-gray-150, #6f6f6f)}.remove-btn:hover{color:var(--emw--color-error, red)}.placeholder{color:var(--emw--color-gray-150, #6f6f6f);font-size:0.875rem;padding:3px 8px;padding-left:0;line-height:1.2}.arrow{margin-left:auto;font-size:0.8rem;width:20px;color:var(--emw--color-gray-150, #6f6f6f)}.dropdown{position:absolute;top:calc(100% + 4px);left:0;width:100%;max-height:240px;overflow-y:auto;border:1px solid var(--emw--color-gray-100, #e6e6e6);border-radius:6px;background:var(--emw--color-dialog-background, #ffffff);box-shadow:0 4px 12px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15));z-index:10}.dropdown-item{padding:10px 14px;cursor:pointer;font-size:0.875rem;line-height:1.4;transition:background 0.2s}.dropdown-item:hover{background:var(--emw--color-background-tertiary, #ccc);color:var(--emw--color-typography, #000)}.dropdown-item.selected{background:var(--emw--color-background-secondary, #f5f5f5);color:var(--emw--color-typography, #000);font-weight:500}.overflow-popover{position:absolute;top:var(--overflow-top, 0px);left:var(--overflow-left, 0px);max-width:200px;padding:12px;display:flex;flex-wrap:wrap;gap:6px;border:1px solid var(--emw--color-gray-100, #d0d5dd);border-radius:6px;background:var(--emw--color-background, #ffffff);box-shadow:0 4px 12px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15));z-index:20}';const c=class{constructor(e){t(this,e),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.position="top",this.delay=200,this.isVisible=!1,this._tooltipId=void 0}handleClientStylingChange(t,e){t!=e&&r(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`,this.stylingSubscription)}componentWillLoad(){this._tooltipId=`general-tooltip-${Math.random().toString(36).substring(2,9)}`}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}handleMouseEnterOrFocus(){clearTimeout(this.hideTimeout),this.showTimeout&&clearTimeout(this.showTimeout),this.showTimeout=setTimeout((()=>{this.isVisible=!0}),this.delay)}handleMouseLeaveOrBlur(){this.showTimeout&&clearTimeout(this.showTimeout),this.hideTimeout=setTimeout((()=>{this.isVisible=!1}),100)}handleKeyDown(t){"Escape"===t.key&&this.isVisible&&(this.isVisible=!1)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe(),clearTimeout(this.showTimeout),clearTimeout(this.hideTimeout)}render(){const t={"general-tooltip-popup":!0,visible:this.isVisible,[`general-tooltip-${this.position}`]:!0};return e("div",{key:"c0d52518e1e196e0d022789f7c6b7e64173b2c7d",class:"general-tooltip-wrapper"},e("slot",{key:"a935e103e16b0b619a024706e8224f4a937de6b9",name:"trigger"}),e("div",{key:"35c60e35ce3f8d5c2c42cd333fe64a3b289d34d4",class:"general-tooltip-container",role:"tooltip",ref:t=>this.stylingContainer=t},e("div",{key:"9d3fd9f142c1e3bd263dee289a2c1a9e4eebfddc",id:this._tooltipId,class:t,role:"tooltip"},e("slot",{key:"31344f0d4d4139f913d1819cc4f42a39f5113d8a",name:"content"}),e("div",{key:"f5cdd93060baec37b2a2879056efe2d66c5a553a",class:"general-tooltip-arrow"}))))}get hostElement(){return i(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function u(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function p(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function m(t){p(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===d(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}c.style=".general-tooltip-wrapper{display:inline-block;position:relative;line-height:0}.general-tooltip-container{display:contents;}.general-tooltip-popup{position:absolute;color:var(--emw--color-typography-inverse, #fff);background:var(--emw--color-background-inverse, #000);padding:8px 12px;border-radius:4px;font-size:0.875em;line-height:1.4;z-index:1000;opacity:0;visibility:hidden;transition:opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;white-space:nowrap;pointer-events:none;}.general-tooltip-popup.visible{opacity:1;visibility:visible}.general-tooltip-arrow{position:absolute;width:0;height:0;border-style:solid}.general-tooltip-top{bottom:100%;left:50%;transform:translateX(-50%);margin-bottom:8px;}.general-tooltip-top .general-tooltip-arrow{top:100%;left:50%;transform:translateX(-50%);border-width:6px 6px 0 6px;border-color:var(--emw--color-gray-300, #333) transparent transparent transparent}.general-tooltip-bottom{top:100%;left:50%;transform:translateX(-50%);margin-top:8px;}.general-tooltip-bottom .general-tooltip-arrow{bottom:100%;left:50%;transform:translateX(-50%);border-width:0 6px 6px 6px;border-color:transparent transparent var(--emw--color-gray-300, #333) transparent}.general-tooltip-left{right:100%;top:50%;transform:translateY(-50%);margin-right:8px;}.general-tooltip-left .general-tooltip-arrow{left:100%;top:50%;transform:translateY(-50%);border-width:6px 0 6px 6px;border-color:transparent transparent transparent var(--emw--color-gray-300, #333)}.general-tooltip-right{left:100%;top:50%;transform:translateY(-50%);margin-left:8px;}.general-tooltip-right .general-tooltip-arrow{right:100%;top:50%;transform:translateY(-50%);border-width:6px 6px 6px 0;border-color:transparent var(--emw--color-gray-300, #333) transparent transparent}";var f={};function v(){return f}var g=36e5;function b(t){p(1,arguments);var e=m(t),i=e.getUTCDay(),o=(i<1?7:0)+i-1;return e.setUTCDate(e.getUTCDate()-o),e.setUTCHours(0,0,0,0),e}function y(t){p(1,arguments);var e=m(t),i=e.getUTCFullYear(),o=new Date(0);o.setUTCFullYear(i+1,0,4),o.setUTCHours(0,0,0,0);var n=b(o),r=new Date(0);r.setUTCFullYear(i,0,4),r.setUTCHours(0,0,0,0);var s=b(r);return e.getTime()>=n.getTime()?i+1:e.getTime()>=s.getTime()?i:i-1}function w(t,e){var i,o,n,r,s,a,l,h;p(1,arguments);var c=v(),d=u(null!==(i=null!==(o=null!==(n=null!==(r=null==e?void 0:e.weekStartsOn)&&void 0!==r?r:null==e||null===(s=e.locale)||void 0===s||null===(a=s.options)||void 0===a?void 0:a.weekStartsOn)&&void 0!==n?n:c.weekStartsOn)&&void 0!==o?o:null===(l=c.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==i?i:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=m(t),g=f.getUTCDay(),b=(g<d?7:0)+g-d;return f.setUTCDate(f.getUTCDate()-b),f.setUTCHours(0,0,0,0),f}function x(t,e){var i,o,n,r,s,a,l,h;p(1,arguments);var c=m(t),d=c.getUTCFullYear(),f=v(),g=u(null!==(i=null!==(o=null!==(n=null!==(r=null==e?void 0:e.firstWeekContainsDate)&&void 0!==r?r:null==e||null===(s=e.locale)||void 0===s||null===(a=s.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==n?n:f.firstWeekContainsDate)&&void 0!==o?o:null===(l=f.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1);if(!(g>=1&&g<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var b=new Date(0);b.setUTCFullYear(d+1,0,g),b.setUTCHours(0,0,0,0);var y=w(b,e),x=new Date(0);x.setUTCFullYear(d,0,g),x.setUTCHours(0,0,0,0);var _=w(x,e);return c.getTime()>=y.getTime()?d+1:c.getTime()>=_.getTime()?d:d-1}function _(t,e){for(var i=t<0?"-":"",o=Math.abs(t).toString();o.length<e;)o="0"+o;return i+o}const k=function(t,e){var i=t.getUTCFullYear(),o=i>0?i:1-i;return _("yy"===e?o%100:o,e.length)},C=function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):_(i+1,2)},S=function(t,e){return _(t.getUTCDate(),e.length)},T=function(t,e){return _(t.getUTCHours()%12||12,e.length)},A=function(t,e){return _(t.getUTCHours(),e.length)},z=function(t,e){return _(t.getUTCMinutes(),e.length)},I=function(t,e){return _(t.getUTCSeconds(),e.length)},D=function(t,e){var i=e.length,o=t.getUTCMilliseconds();return _(Math.floor(o*Math.pow(10,i-3)),e.length)};var M={G:function(t,e,i){var o=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(o,{width:"abbreviated"});case"GGGGG":return i.era(o,{width:"narrow"});default:return i.era(o,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var o=t.getUTCFullYear();return i.ordinalNumber(o>0?o:1-o,{unit:"year"})}return k(t,e)},Y:function(t,e,i,o){var n=x(t,o),r=n>0?n:1-n;return"YY"===e?_(r%100,2):"Yo"===e?i.ordinalNumber(r,{unit:"year"}):_(r,e.length)},R:function(t,e){return _(y(t),e.length)},u:function(t,e){return _(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var o=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(o);case"QQ":return _(o,2);case"Qo":return i.ordinalNumber(o,{unit:"quarter"});case"QQQ":return i.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(o,{width:"narrow",context:"formatting"});default:return i.quarter(o,{width:"wide",context:"formatting"})}},q:function(t,e,i){var o=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(o);case"qq":return _(o,2);case"qo":return i.ordinalNumber(o,{unit:"quarter"});case"qqq":return i.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(o,{width:"narrow",context:"standalone"});default:return i.quarter(o,{width:"wide",context:"standalone"})}},M:function(t,e,i){var o=t.getUTCMonth();switch(e){case"M":case"MM":return C(t,e);case"Mo":return i.ordinalNumber(o+1,{unit:"month"});case"MMM":return i.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(o,{width:"narrow",context:"formatting"});default:return i.month(o,{width:"wide",context:"formatting"})}},L:function(t,e,i){var o=t.getUTCMonth();switch(e){case"L":return String(o+1);case"LL":return _(o+1,2);case"Lo":return i.ordinalNumber(o+1,{unit:"month"});case"LLL":return i.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(o,{width:"narrow",context:"standalone"});default:return i.month(o,{width:"wide",context:"standalone"})}},w:function(t,e,i,o){var n=function(t,e){p(1,arguments);var i=m(t),o=w(i,e).getTime()-function(t,e){var i,o,n,r,s,a,l,h;p(1,arguments);var c=v(),d=u(null!==(i=null!==(o=null!==(n=null!==(r=null==e?void 0:e.firstWeekContainsDate)&&void 0!==r?r:null==e||null===(s=e.locale)||void 0===s||null===(a=s.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==n?n:c.firstWeekContainsDate)&&void 0!==o?o:null===(l=c.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1),m=x(t,e),f=new Date(0);return f.setUTCFullYear(m,0,d),f.setUTCHours(0,0,0,0),w(f,e)}(i,e).getTime();return Math.round(o/6048e5)+1}(t,o);return"wo"===e?i.ordinalNumber(n,{unit:"week"}):_(n,e.length)},I:function(t,e,i){var o=function(t){p(1,arguments);var e=m(t),i=b(e).getTime()-function(t){p(1,arguments);var e=y(t),i=new Date(0);return i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0),b(i)}(e).getTime();return Math.round(i/6048e5)+1}(t);return"Io"===e?i.ordinalNumber(o,{unit:"week"}):_(o,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):S(t,e)},D:function(t,e,i){var o=function(t){p(1,arguments);var e=m(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var o=e.getTime();return Math.floor((i-o)/864e5)+1}(t);return"Do"===e?i.ordinalNumber(o,{unit:"dayOfYear"}):_(o,e.length)},E:function(t,e,i){var o=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},e:function(t,e,i,o){var n=t.getUTCDay(),r=(n-o.weekStartsOn+8)%7||7;switch(e){case"e":return String(r);case"ee":return _(r,2);case"eo":return i.ordinalNumber(r,{unit:"day"});case"eee":return i.day(n,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(n,{width:"short",context:"formatting"});default:return i.day(n,{width:"wide",context:"formatting"})}},c:function(t,e,i,o){var n=t.getUTCDay(),r=(n-o.weekStartsOn+8)%7||7;switch(e){case"c":return String(r);case"cc":return _(r,e.length);case"co":return i.ordinalNumber(r,{unit:"day"});case"ccc":return i.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(n,{width:"narrow",context:"standalone"});case"cccccc":return i.day(n,{width:"short",context:"standalone"});default:return i.day(n,{width:"wide",context:"standalone"})}},i:function(t,e,i){var o=t.getUTCDay(),n=0===o?7:o;switch(e){case"i":return String(n);case"ii":return _(n,e.length);case"io":return i.ordinalNumber(n,{unit:"day"});case"iii":return i.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},a:function(t,e,i){var o=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,e,i){var o,n=t.getUTCHours();switch(o=12===n?"noon":0===n?"midnight":n/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,e,i){var o,n=t.getUTCHours();switch(o=n>=17?"evening":n>=12?"afternoon":n>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var o=t.getUTCHours()%12;return 0===o&&(o=12),i.ordinalNumber(o,{unit:"hour"})}return T(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):A(t,e)},K:function(t,e,i){var o=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(o,{unit:"hour"}):_(o,e.length)},k:function(t,e,i){var o=t.getUTCHours();return 0===o&&(o=24),"ko"===e?i.ordinalNumber(o,{unit:"hour"}):_(o,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):z(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):I(t,e)},S:function(t,e){return D(t,e)},X:function(t,e,i,o){var n=(o._originalDate||t).getTimezoneOffset();if(0===n)return"Z";switch(e){case"X":return N(n);case"XXXX":case"XX":return E(n);default:return E(n,":")}},x:function(t,e,i,o){var n=(o._originalDate||t).getTimezoneOffset();switch(e){case"x":return N(n);case"xxxx":case"xx":return E(n);default:return E(n,":")}},O:function(t,e,i,o){var n=(o._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+O(n,":");default:return"GMT"+E(n,":")}},z:function(t,e,i,o){var n=(o._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+O(n,":");default:return"GMT"+E(n,":")}},t:function(t,e,i,o){return _(Math.floor((o._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,i,o){return _((o._originalDate||t).getTime(),e.length)}};function O(t,e){var i=t>0?"-":"+",o=Math.abs(t),n=Math.floor(o/60),r=o%60;if(0===r)return i+String(n);var s=e||"";return i+String(n)+s+_(r,2)}function N(t,e){return t%60==0?(t>0?"-":"+")+_(Math.abs(t)/60,2):E(t,e)}function E(t,e){var i=e||"",o=t>0?"-":"+",n=Math.abs(t);return o+_(Math.floor(n/60),2)+i+_(n%60,2)}const P=M;var B=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},j=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},$={p:j,P:function(t,e){var i,o=t.match(/(P+)(p+)?/)||[],n=o[1],r=o[2];if(!r)return B(t,e);switch(n){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",B(n,e)).replace("{{time}}",j(r,e))}};const F=$;var U=["D","DD"],R=["YY","YYYY"];function V(t,e,i){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var H={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function G(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}var W,q={date:G({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:G({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:G({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Y={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function X(t){return function(e,i){var o;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&t.formattingValues){var n=t.defaultFormattingWidth||t.defaultWidth,r=null!=i&&i.width?String(i.width):n;o=t.formattingValues[r]||t.formattingValues[n]}else{var s=t.defaultWidth,a=null!=i&&i.width?String(i.width):t.defaultWidth;o=t.values[a]||t.values[s]}return o[t.argumentCallback?t.argumentCallback(e):e]}}function J(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.width,n=e.match(o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth]);if(!n)return null;var r,s=n[0],a=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?function(t){for(var e=0;e<t.length;e++)if(t[e].test(s))return e}(a):function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].test(s))return e}(a);return r=t.valueCallback?t.valueCallback(l):l,{value:r=i.valueCallback?i.valueCallback(r):r,rest:e.slice(s.length)}}}const K={code:"en-US",formatDistance:function(t,e,i){var o,n=H[t];return o="string"==typeof n?n:1===e?n.one:n.other.replace("{{count}}",e.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+o:o+" ago":o},formatLong:q,formatRelative:function(t){return Y[t]},localize:{ordinalNumber:function(t){var e=Number(t),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:X({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:X({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:X({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:X({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:X({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(W={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(W.matchPattern);if(!i)return null;var o=i[0],n=t.match(W.parsePattern);if(!n)return null;var r=W.valueCallback?W.valueCallback(n[0]):n[0];return{value:r=e.valueCallback?e.valueCallback(r):r,rest:t.slice(o.length)}}),era:J({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:J({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:J({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:J({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:J({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};var Z=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Q=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,tt=/^'([^]*?)'?$/,et=/''/g,it=/[a-zA-Z]/;function ot(t,e,i){var o,n,r,s,a,l,h,c,f,g,b,y,w,x,_,k,C,S;p(2,arguments);var T=String(e),A=v(),z=null!==(o=null!==(n=null==i?void 0:i.locale)&&void 0!==n?n:A.locale)&&void 0!==o?o:K,I=u(null!==(r=null!==(s=null!==(a=null!==(l=null==i?void 0:i.firstWeekContainsDate)&&void 0!==l?l:null==i||null===(h=i.locale)||void 0===h||null===(c=h.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==a?a:A.firstWeekContainsDate)&&void 0!==s?s:null===(f=A.locale)||void 0===f||null===(g=f.options)||void 0===g?void 0:g.firstWeekContainsDate)&&void 0!==r?r:1);if(!(I>=1&&I<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var D=u(null!==(b=null!==(y=null!==(w=null!==(x=null==i?void 0:i.weekStartsOn)&&void 0!==x?x:null==i||null===(_=i.locale)||void 0===_||null===(k=_.options)||void 0===k?void 0:k.weekStartsOn)&&void 0!==w?w:A.weekStartsOn)&&void 0!==y?y:null===(C=A.locale)||void 0===C||null===(S=C.options)||void 0===S?void 0:S.weekStartsOn)&&void 0!==b?b:0);if(!(D>=0&&D<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!z.localize)throw new RangeError("locale must contain localize property");if(!z.formatLong)throw new RangeError("locale must contain formatLong property");var M=m(t);if(!function(t){if(p(1,arguments),!function(t){return p(1,arguments),t instanceof Date||"object"===d(t)&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t)return!1;var e=m(t);return!isNaN(Number(e))}(M))throw new RangeError("Invalid time value");var O=function(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}(M),N=function(t,e){return p(2,arguments),function(t,e){p(2,arguments);var i=m(t).getTime(),o=u(e);return new Date(i+o)}(t,-u(e))}(M,O),E={firstWeekContainsDate:I,weekStartsOn:D,locale:z,_originalDate:M};return T.match(Q).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,F[e])(t,z.formatLong):t})).join("").match(Z).map((function(o){if("''"===o)return"'";var n,r,s=o[0];if("'"===s)return(r=(n=o).match(tt))?r[1].replace(et,"'"):n;var a=P[s];if(a)return null!=i&&i.useAdditionalWeekYearTokens||-1===R.indexOf(o)||V(o,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!(-1!==U.indexOf(o))||V(o,e,String(t)),a(N,o,z.localize,E);if(s.match(it))throw new RangeError("Format string contains an unescaped latin alphabet character `"+s+"`");return o})).join("")}function nt(t,e){p(2,arguments);var i=m(t),o=m(e);return i.getTime()<o.getTime()}function rt(t,e){var i;p(1,arguments);var o=u(null!==(i=null==e?void 0:e.additionalDigits)&&void 0!==i?i:2);if(2!==o&&1!==o&&0!==o)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!=typeof t&&"[object String]"!==Object.prototype.toString.call(t))return new Date(NaN);var n,r=function(t){var e,i={},o=t.split(st.dateTimeDelimiter);if(o.length>2)return i;if(/:/.test(o[0])?e=o[0]:(i.date=o[0],e=o[1],st.timeZoneDelimiter.test(i.date)&&(i.date=t.split(st.timeZoneDelimiter)[0],e=t.substr(i.date.length,t.length))),e){var n=st.timezone.exec(e);n?(i.time=e.replace(n[1],""),i.timezone=n[1]):i.time=e}return i}(t);if(r.date){var s=function(t,e){var i=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),o=t.match(i);if(!o)return{year:NaN,restDateString:""};var n=o[1]?parseInt(o[1]):null,r=o[2]?parseInt(o[2]):null;return{year:null===r?n:100*r,restDateString:t.slice((o[1]||o[2]).length)}}(r.date,o);n=function(t,e){if(null===e)return new Date(NaN);var i=t.match(at);if(!i)return new Date(NaN);var o=!!i[4],n=ct(i[1]),r=ct(i[2])-1,s=ct(i[3]),a=ct(i[4]),l=ct(i[5])-1;if(o)return function(t,e,i){return e>=1&&e<=53&&i>=0&&i<=6}(0,a,l)?function(t,e,i){var o=new Date(0);o.setUTCFullYear(t,0,4);var n=7*(e-1)+i+1-(o.getUTCDay()||7);return o.setUTCDate(o.getUTCDate()+n),o}(e,a,l):new Date(NaN);var h=new Date(0);return function(t,e,i){return e>=0&&e<=11&&i>=1&&i<=(ut[e]||(pt(t)?29:28))}(e,r,s)&&function(t,e){return e>=1&&e<=(pt(t)?366:365)}(e,n)?(h.setUTCFullYear(e,r,Math.max(n,s)),h):new Date(NaN)}(s.restDateString,s.year)}if(!n||isNaN(n.getTime()))return new Date(NaN);var a,l=n.getTime(),h=0;if(r.time&&(h=function(t){var e=t.match(lt);if(!e)return NaN;var i=dt(e[1]),o=dt(e[2]),n=dt(e[3]);return function(t,e,i){return 24===t?0===e&&0===i:i>=0&&i<60&&e>=0&&e<60&&t>=0&&t<25}(i,o,n)?i*g+6e4*o+1e3*n:NaN}(r.time),isNaN(h)))return new Date(NaN);if(!r.timezone){var c=new Date(l+h),d=new Date(0);return d.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),d.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),d}return a=function(t){if("Z"===t)return 0;var e=t.match(ht);if(!e)return 0;var i="+"===e[1]?-1:1,o=parseInt(e[2]),n=e[3]&&parseInt(e[3])||0;return function(t,e){return e>=0&&e<=59}(0,n)?i*(o*g+6e4*n):NaN}(r.timezone),isNaN(a)?new Date(NaN):new Date(l+h+a)}var st={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},at=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,lt=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,ht=/^([+-])(\d{2})(?::?(\d{2}))?$/;function ct(t){return t?parseInt(t):1}function dt(t){return t&&parseFloat(t.replace(",","."))||0}var ut=[31,null,31,30,31,30,31,31,30,31,30,31];function pt(t){return t%400==0||t%4==0&&t%100!=0}const mt=class{constructor(e){t(this,e),this.countDownChange=o(this,"countDownChange",7),this.countDownFinish=o(this,"countDownFinish",7),this.value=void 0,this.format="HH:mm:ss",this.prefix=void 0,this.suffix=void 0,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.endTime=void 0,this.timeObj={day:{str:"00",unit:""},hour:{str:"00",unit:""},minute:{str:"00",unit:""},second:{str:"00",unit:""}}}handleClientStylingChange(t,e){t!=e&&r(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`,this.stylingSubscription)}handleValueChange(t){this.setEndTime(t),t?this.startCountDown():this.clearCountDown()}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl)),this.setEndTime(this.value),this.value&&this.startCountDown()}setEndTime(t){if("string"==typeof t){const e=rt(t).getTime();this.endTime=isNaN(e)?null:e}else this.endTime=t}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe(),this.clearCountDown()}startCountDown(){this.clearCountDown(),this.tick(),this.timer=setInterval((()=>{this.tick()}),1e3)}clearCountDown(){this.timer&&(clearInterval(this.timer),this.timer=null)}tick(){if(!this.endTime)return;let t=this.endTime-Date.now();t<=0&&(t=0,this.clearCountDown(),this.countDownFinish.emit());const e=Math.floor(t/864e5),i=Math.floor(t/36e5%24),o=Math.floor(t/1e3/60%60),n=Math.floor(t/1e3%60),r=t=>t<10?`0${t}`:`${t}`;this.timeObj={day:{str:r(e),unit:"d"},hour:{str:r(i),unit:"h"},minute:{str:r(o),unit:"m"},second:{str:r(n),unit:"s"}};const s=this.getFormatTime();this.countDownChange.emit({leftTime:t,formatTime:s,legalTime:s})}getFormatTime(){return this.format.replace("DD",this.timeObj.day.str).replace("HH",this.timeObj.hour.str).replace("mm",this.timeObj.minute.str).replace("ss",this.timeObj.second.str)}renderItems(){const t=/(DD|HH|mm|ss)|([\s\S]+?)(?=(DD|HH|mm|ss)|$)/g,i=[];let o;for(;null!==(o=t.exec(this.format));)if(o[1]){let t="";switch(o[1]){case"DD":t=this.timeObj.day.str;break;case"HH":t=this.timeObj.hour.str;break;case"mm":t=this.timeObj.minute.str;break;case"ss":t=this.timeObj.second.str}i.push({val:t,unit:""})}else o[2]&&i.length>0&&(i[i.length-1].unit=o[2]);return i.map(((t,i)=>e("div",{key:i+t.unit,class:"helper-count-down-item",part:"item"},e("div",{class:"helper-count-down-item-num"},t.val),e("div",{class:"helper-count-down-item-unit"},t.unit))))}render(){return e("div",{key:"b360412e045020b5ac0263c6ca56458f31eedb2c",class:"helper-count-down-container",ref:t=>this.stylingContainer=t},e("slot",{key:"c72bed87fba869c842407b04e0cbfe038e5b7ea8"}),this.prefix&&e("div",{key:"8d3ba9d60577421f81bae7bc76f52a774b17e1fe",class:"helper-count-down-prefix"},this.prefix),e("div",{key:"187edf3b8eb6de85efe1a748fd8ef47a68e19611",class:"helper-count-down-values",part:"values"},this.renderItems()),this.suffix&&e("div",{key:"3a8e5d9561ecd3f52eff423bd43c8b60a261a17c",class:"helper-count-down-suffix"},this.suffix))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],value:["handleValueChange"]}}};mt.style=":host{display:block}.helper-count-down-container{display:flex;align-items:center}.helper-count-down-prefix{margin-right:4px}.helper-count-down-suffix{margin-left:4px}.helper-count-down-values{display:flex;align-items:center}.helper-count-down-item{display:flex;align-items:center;justify-content:center}.helper-count-down-item-num{font-variant-numeric:tabular-nums}";const ft=["ro","en","fr","ar","hr"],vt={en:{stop:"Stop",at:"at",turnover:"Turnover: ",startIn:"Sales Start in:"},ro:{stop:"Oprește",at:"la"},fr:{stop:"Arrêtez",at:"à"},ar:{stop:"توقف",at:"في"},hr:{stop:"Stop",at:"u"}},gt=(t,e)=>{const i=e;return vt[void 0!==i&&ft.includes(i)?i:"en"][t]},bt=class{constructor(e){t(this,e),this.lotteryBannerWagerStarted=o(this,"lotteryBannerWagerStarted",7),this.handleCountdownFinish=()=>{this.isWagerStarted=!0,this.lotteryBannerWagerStarted.emit()},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.logoUrl=void 0,this.stopTime="",this.startTime="",this.bannerTitle=void 0,this.turnover=void 0,this.layout="logo,title,info",this.isWagerStarted=!1,this.formattedStopTime=void 0}handleClientStylingChange(t,e){t!==e&&r(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`,this.stylingSubscription)}handleTimeChange(){this.checkWagerStatus()}async 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 o=await i.json();e=o,Object.keys(e).forEach((t=>{for(let i in e[t])vt[t][i]=e[t][i]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl),this.checkWagerStatus()}checkWagerStatus(){this.isWagerStarted=!this.startTime||!nt(new Date,rt(this.startTime)),this.stopTime&&(this.formattedStopTime=ot(rt(this.stopTime),"dd/MM/yyyy HH:mm"))}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}renderElement(t,i=""){const o=n("../static/poolGameLogo.webp");switch(t){case"logo":return e("div",{class:`lottery-banner__logo-wrapper ${i}`},o&&e("img",{alt:"logo",src:o,class:"lottery-banner__logo"}));case"title":return this.bannerTitle&&e("div",{class:`lottery-banner__title ${i}`},this.bannerTitle);case"info":return e("div",{class:`lottery-banner__info ${i}`},this.isWagerStarted?e("div",{class:"lottery-banner__info-item"},e("span",{class:"lottery-banner__info-item-label"},e("span",{class:"lottery-banner__info-item-label__strong"},gt("stop",this.language))," ",gt("at",this.language)),e("span",{class:"lottery-banner__info-item-value"},this.formattedStopTime)):e("div",{class:"lottery-banner__info-item"},e("span",{class:"lottery-banner__info-item-label"},e("span",{class:"lottery-banner__info-item-label__strong"},gt("startIn",this.language))," "),e("helper-count-down",{class:"lottery-banner__info-item-value lottery-banner__info-item-value__strong",value:this.startTime,format:"DDD HHH mmM ssS",onCountDownFinish:this.handleCountdownFinish})),this.isWagerStarted&&null!=this.turnover&&e("div",{class:"lottery-banner__info-item"},e("span",{class:"lottery-banner__info-item-label"},gt("turnover",this.language)),e("span",{class:"lottery-banner__info-item-value"},this.turnover)));default:return null}}render(){const t=this.layout.split(",").map((t=>t.trim()));return e("section",{key:"8714d4136821b8afd6079da769bb9cc94149ed9d",ref:t=>this.stylingContainer=t,class:"lottery-banner"},t.map(((e,i)=>this.renderElement(e,3===t.length&&1===i?"lottery-banner__item--center":""))))}static get assetsDirs(){return["../static"]}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],startTime:["handleTimeChange"],stopTime:["handleTimeChange"]}}};bt.style=":host {\n display: block;\n container-type: inline-size;\n}\n\n.lottery-banner {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--lottery-banner-gap, 0.5rem);\n padding: var(--lottery-banner-padding, 0px 20px);\n background: var(--lottery-banner-background, var(--emw--color-primary, #fed275));\n border-top: var(--lottery-banner-border-width, 2px) var(--lottery-banner-border-style, solid) var(--lottery-banner-border-color, var(--emw--color-primary, #fed275));\n border-bottom: var(--lottery-banner-border-width, 2px) var(--lottery-banner-border-style, solid) var(--lottery-banner-border-color, var(--emw--color-primary, #fed275));\n border-left: var(--lottery-banner-border-left, none);\n border-right: var(--lottery-banner-border-right, none);\n border-radius: var(--lottery-banner-border-radius, 0);\n white-space: nowrap;\n height: var(--lottery-banner-height, 50px);\n position: relative;\n box-sizing: border-box;\n}\n\n.lottery-banner__logo-wrapper {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n}\n.lottery-banner__logo-wrapper img {\n height: 100%;\n max-width: 32vw;\n object-fit: var(--lottery-banner-logo-object-fit, contain);\n}\n\n.lottery-banner__item--center {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n\n.lottery-banner__title {\n text-align: center;\n font-size: var(--lottery-banner-title-font-size, 1.5rem);\n font-weight: 800;\n font-style: italic;\n letter-spacing: var(--lottery-banner-title-font-letter-spacing, 0.04em);\n color: var(--emw--color-typography, #000);\n}\n\n.lottery-banner__info {\n display: flex;\n align-items: center;\n gap: var(--lottery-banner-info-gap, 0.75rem);\n}\n\n.lottery-banner__info-item {\n font-size: var(--lottery-banner-info-font-size, 0.9rem);\n color: var(--lottery-banner-info-color, var(--emw--color-typography, #000));\n display: inline-flex;\n align-items: center;\n gap: 0.3rem;\n}\n\n.lottery-banner__info-item-label {\n color: var(--lottery-banner-info-label-color, var(--emw--color-typography, #000));\n}\n.lottery-banner__info-item-label__strong {\n font-weight: var(--lottery-banner-info-label-font-weight, 700);\n}\n\n.lottery-banner__info-item-value {\n font-weight: var(--lottery-banner-info-value-font-weight, inherit);\n color: var(--lottery-banner-info-value-color, var(--emw--color-typography, #000));\n}\n.lottery-banner__info-item-value__strong {\n font-weight: var(--lottery-banner-info-label-font-weight, 700);\n}\n\nhelper-count-down::part(values) {\n gap: 8px;\n}\n\n@container (max-width: 700px) {\n .lottery-banner {\n height: auto;\n padding: var(--lottery-banner-mobile-padding, 0.5rem 0.2rem);\n }\n .lottery-banner__title {\n flex-basis: 100%;\n text-align: var(--lottery-banner-mobile-title-text-align, left);\n font-size: var(--emw--font-size-small, 0.875rem);\n }\n .lottery-banner__info {\n flex-direction: column;\n align-items: flex-start;\n gap: var(--lottery-banner-mobile-info-gap, 0.1rem);\n }\n .lottery-banner__info-item {\n font-size: var(--emw--font-size-x-small, 0.75rem);\n }\n}";const yt=["ro","en","fr","ar","hr","zh"],wt={en:{loading:"Loading"},ro:{},fr:{},ar:{},hr:{}},xt=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(),o=Math.max(i.width,i.height),n={top:t.clientY-i.top-o/2,left:t.clientX-i.left-o/2,size:o};this.ripples=[...this.ripples,n],setTimeout((()=>{this.ripples=this.ripples.filter((t=>t!==n))}),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&&r(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`,this.stylingSubscription)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&r(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 o=await i.json();e=o,Object.keys(e).forEach((t=>{for(let i in e[t])wt[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:o,color:n}=this,r=i||this.loading,s={};if(n)switch(t){case"primary":default:Object.assign(s,{backgroundColor:n,borderColor:n});break;case"outline":case"dashed":Object.assign(s,{color:n,borderColor:n});break;case"text":Object.assign(s,{color:n})}return e("button",{key:"aa74ad98c90e7548228557bf8a8d26b125d4a83a",class:{btn:!0,[`btn--${t}`]:!0,[`btn--${o}`]:!0,"btn--loading":this.loading},style:n?s:void 0,disabled:r,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=wt[void 0!==t&&yt.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"]}}};var _t;xt.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}}",function(t){t.PURCHASED="Purchased",t.SETTLED="Settled",t.CANCELED="Canceled",t.ERROR="Error"}(_t||(_t={}));const kt=class{constructor(e){t(this,e),this.orderSummarySubmit=o(this,"orderSummarySubmit",7),this.submitSuccess=o(this,"lotteryTicketSubmitSuccess",7),this.submitError=o(this,"lotteryTicketSubmitError",7),this.sessionExpired=o(this,"sessionExpired",7),this.endpoint=void 0,this.sessionId=void 0,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.language="en",this.orderSummaryTitle=void 0,this.ticketsLabel=void 0,this.totalLabel=void 0,this.showColon=!0,this.showDivider=!1,this.submitDisabled=!1,this.submitButtonText=void 0,this.submitLoading=!1}handleClientStylingChange(t,e){t!=e&&r(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`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleLotteryTicketParamsReady(t){if(t.detail&&this.isValidTicketSubmitParam(t.detail))this.handleSubmitTickets(t.detail);else{const e="Invalid ticket data received before submission.";console.error(e,t.detail),this.submitError.emit({message:e,dataOrigin:t.detail,status:400})}}isValidTicketSubmitParam(t){return t&&Array.isArray(t.tickets)&&t.tickets.length>0&&t.tickets.every((t=>this.isValidTicketParam(t)))}isValidTicketParam(t){return t&&void 0!==t.gameName&&void 0!==t.startingDrawId&&void 0!==t.amount&&void 0!==t.currency&&void 0!==t.selection}async handleSubmitTickets(t){try{this.submitLoading=!0;const e=await function(t,e="GET",i=null,o={}){return new Promise(((n,r)=>{const s="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})),a=Object.assign({"Content-Type":"application/json"},o);"GET"!==e&&"HEAD"!==e&&(a["X-Idempotency-Key"]=s);const l={method:e,headers:a,body:null};i&&"GET"!==e&&"HEAD"!==e?l.body=JSON.stringify(i):delete l.body,fetch(t,l).then((t=>t.ok?t.json():r(t))).then((t=>n(t))).catch((t=>r(t)))}))}(`${this.endpoint}/tickets`,"POST",t,{Authorization:`Bearer ${this.sessionId}`});e.tickets.every((t=>t.state===_t.PURCHASED))?this.submitSuccess.emit({dataOrigin:e,status:200}):this.submitError.emit({message:"Failed to purchase ticket",dataOrigin:e,status:200})}catch(t){401===t.status&&this.sessionExpired.emit(),(t.status>300||!t.status)&&this.submitError.emit({dataOrigin:t,status:t.status||0})}finally{this.submitLoading=!1}}handleSubmit(){this.orderSummarySubmit.emit()}render(){return e("div",{key:"bdab321b9336f47e16057d240b3226d7cba59b97",ref:t=>this.stylingContainer=t},e("div",{key:"de7ffcc9f96d8c7cfc7bdb3a3c7225ee78c33483",class:"order-summary"},e("h3",{key:"9500cd69a6eba0855d4981cdad8eaa91b9c98567",class:"order-summary__title"},this.orderSummaryTitle),e("div",{key:"ce29c82eef1d12bc63e94e4fa2d5474700860af2",class:"order-summary__ticket"},e("div",{key:"9db79da17590c7f847f46c3b3b66489ea9a0e268",class:"order-summary__ticket-info"},e("div",{key:"4b5a2df807aeb421cf3c1ebf33f410a92f39ccaf",class:"order-summary__ticket-label"},e("div",{key:"feb73e9f849d2e3d6b77e4c848657f27e6a82323",class:"order-summary__ticket"},this.ticketsLabel),e("span",{key:"51f70dcdda2154d8ce97d8e1a7c0f61a6198afbb",class:"order-summary__colon"},this.showColon?":":null)),e("div",{key:"4fed2d63cd7a881c8844055fe1fde99c8c7aa9fb",class:"order-summary__details"},e("slot",{key:"6a7969738546ee4aca81a075f6174556e78d2c31",name:"orderSummaryTicketDetail"}))),this.showDivider&&e("hr",{key:"029803fa93960d5098a24d5ca18e77e14562b29f",class:"order-summary__divider"}),e("div",{key:"738096c5b605a97851dbf24a972d93d9533ad48b",class:"order-summary__ticket-info"},e("div",{key:"acd8a7f3e64c97f58c79f57a90143151c996abf8",class:"order-summary__ticket-label"},e("div",{key:"44e6b29978ca4fc2b22ca9d95ee4facfc883f292",class:"order-summary__ticket"},this.totalLabel),e("span",{key:"330a00a4b39e578a1b0d80211d2b68d44c5235c9",class:"order-summary__colon"},this.showColon?":":null)),e("span",{key:"294046815a62a80366458aade4ec5d5476577a93",class:"order-summary__details"},e("slot",{key:"02d129ef0caf523ec0c9da34318df46d3b008376",name:"orderSummaryTotalDetail"})))),e("slot",{key:"9395396883f0594ad8db216a9aa9fa0aeff45c10",name:"orderSummaryChoice"}),e("div",{key:"462672abc490cde00fea90ea585f48875ca2ec47",class:"order-summary__button-wrapper"},e("lottery-button",{key:"1885bee3570ce6b58d4ae1977c635f418485fdbe",onClick:this.handleSubmit.bind(this),loading:this.submitLoading,disabled:this.submitDisabled,text:this.submitButtonText}))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};kt.style=":host{width:100%}.order-summary{width:100%;background:var(--emw--color-background, #fff);border-radius:var(--lottery-order-summary-border-radius, 8px);border:var(--lottery-order-summary-border, none);box-shadow:var(--lottery-order-summary-box-shadow, none);box-sizing:border-box}.order-summary__title{margin:var(--lottery-order-summary-title-margin, 0 0 30px 0);text-align:var(--lottery-order-summary-title-text-align, center);color:var(--emw--color-typography, #000);text-transform:uppercase;font-weight:var(--lottery-order-summary-title-font-weight, 700)}.order-summary__ticket-info{display:flex;align-items:center;margin-bottom:var(--lottery-order-summary-row-gap, 16px);gap:var(--lottery-order-summary-col-gap, 10px);color:var(--emw--color-typography, #000)}.order-summary__ticket-label{display:flex;flex-direction:row;align-items:center;width:var(--lottery-order-summary-label-width, 50px);max-width:var(--lottery-order-summary-label-max-width, 100%);flex-shrink:0}.order-summary__colon{margin-left:2px}.order-summary__ticket{font-weight:var(--lottery-order-summary-label-font-weight, 500);color:var(--emw--color-typography, #000);overflow-wrap:break-word}.order-summary__details{display:flex;align-items:center;color:var(--emw--color-typography, #000);font-weight:var(--lottery-order-summary-details-font-weight, 400)}.order-summary__divider{border:none;border-top:var(--lottery-order-summary-divider-border, 1px solid var(--emw--color-gray-100, #e6e6e6));margin:var(--lottery-order-summary-divider-margin, 20px 0)}.order-summary__button-wrapper{display:flex;justify-content:center;margin:var(--lottery-order-summary-button-wrapper-margin, 0);padding:var(--lottery-order-summary-button-wrapper-padding, 0)}";const Ct=class{constructor(e){t(this,e),this.valueChange=o(this,"valueChange",7),this.optionRefs=[],this.label=void 0,this.options=[],this.value=void 0}handleValueChange(){this.updateActiveIndicator()}componentWillLoad(){!this.value&&this.options.length>0&&(this.value=this.options[0].value)}componentDidLoad(){requestAnimationFrame((()=>this.updateActiveIndicator()))}handleWindowResize(){this.updateActiveIndicator()}updateActiveIndicator(){const t=this.options.findIndex((t=>t.value===this.value));if(-1===t||!this.activeIndicator||!this.optionRefs[t])return;const e=this.optionRefs[t],i=this.activeIndicator.parentElement.getBoundingClientRect(),o=e.getBoundingClientRect();this.activeIndicator.style.transform=`translateX(${o.left-i.left}px)`,this.activeIndicator.style.width=`${o.width}px`}onOptionClick(t){this.value!==t&&this.valueChange.emit(t)}render(){return e("div",{key:"675f17d5fd8ddef56324416fda27ffd130ddafa3",class:"wrapper"},this.label&&e("label",{key:"d6dfc897e2014a7ce57cc4ddca57b1e6173eb1a5",class:"label"},this.label),e("div",{key:"e89097f2a9536ada1e0edf52e0d50cdd8f88c52e",class:"segmented-container"},e("div",{key:"f720dc7b9b8957cb6d363fd6a2313978eba6988e",class:"active-indicator",ref:t=>this.activeIndicator=t}),this.options.map(((t,i)=>e("button",{class:{option:!0,active:this.value===t.value},onClick:()=>this.onOptionClick(t.value),ref:t=>this.optionRefs[i]=t},t.label)))))}get host(){return i(this)}static get watchers(){return{value:["handleValueChange"]}}};Ct.style=":host{display:block}.wrapper{display:flex;align-items:center;gap:8px}.label{font-size:16px;color:var(--emw-segmented-label-color, #333);font-weight:500}.segmented-container{display:inline-flex;position:relative;background-color:var(--emw-segmented-bg, #f0f0f0);border-radius:20px;box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1)}.option{position:relative;z-index:1;border:none;background-color:transparent;padding:12px 18px;cursor:pointer;font-size:14px;font-weight:500;color:var(--emw-segmented-text-color, #555);transition:color 0.3s ease;white-space:nowrap}.option.active{color:var(--emw-segmented-active-text-color, #000);font-weight:bold}.active-indicator{position:absolute;z-index:0;top:2px;bottom:2px;background-color:var(--emw-segmented-active-bg, #fff);border-radius:22px;box-shadow:0 2px 4px rgba(0, 0, 0, 0.15);transition:transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1)}";const St={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"},Tt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},At={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"},zt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},It={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"},Dt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"},Mt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};var Ot=function(){return Ot=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},Ot.apply(this,arguments)},Nt={primaryColor:"#333",secondaryColor:"#E6E6E6"};function Et(t,e){if(void 0===e&&(e={}),"function"==typeof t.icon){var i=e.placeholders||Nt;return Pt(t.icon(i.primaryColor,i.secondaryColor),e)}return Pt(t.icon,e)}function Pt(t,e){var i="svg"===t.tag?Ot(Ot({},t.attrs),e.extraSVGAttrs||{}):t.attrs,o=Object.keys(i).reduce((function(t,e){var o=i[e],n="".concat(e,'="').concat(o,'"');return t.push(n),t}),[]),n=o.length?" "+o.join(" "):"",r=(t.children||[]).map((function(t){return Pt(t,e)})).join("");return r&&r.length?"<".concat(t.tag).concat(n,">").concat(r,"</").concat(t.tag,">"):"<".concat(t.tag).concat(n," />")}const Bt=class{constructor(e){t(this,e),this.lotteryBulletClickHandler=o(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&&r(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`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&r(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):Et(St,{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"]}}};Bt.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 jt=["ro","en","fr","ar","hr","zh"],Lt={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:{}},$t=(t,e,i)=>{const o=e;let n=Lt[void 0!==o&&jt.includes(o)?o:"en"][t];return i&&Object.keys(i).forEach((t=>{n=n.replace(`{${t}}`,i[t])})),n};function Ft(t,e){return new Set(t?t.split(e):[])}function Ut(t,e){return e.filter((e=>e!==t))}function Rt(t,e){return e.concat([t])}const Vt=class{constructor(e){t(this,e),this.bulletGroupUpdateSelectedBulletTexts=o(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.disabledBulletTexts="",this.dialogConfig={width:"400px",visible:!1,onConfirm:()=>this.handleFillInAddMore(),onCancel:()=>this.handleCloseAddMoreDialog()},this.inputInfo={valid:!0,errorMessage:"",value:""}}handleClientStylingChange(t,e){t!=e&&r(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`,this.stylingSubscription)}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])Lt[e][i]=t[e][i]})))}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&r(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),o=this.maxSelectedCount,"delete"===e.type?Ut(e.text,i):"toggle"===e.type?i.includes(e.text)?Ut(e.text,i):i.length>=o?function(t,e,i){return e.slice(e.length-(i-1)).concat([t])}(e.text,i,o):Rt(e.text,i):[]).join(this.splitToken),selectionGroupId:this.selectionGroupId});else var e,i,o;else this.dialogConfig=Object.assign(Object.assign({},this.dialogConfig),{visible:!0})}get selectedSet(){return Ft(this.selectedBulletTexts,this.splitToken)}get disabledSet(){return Ft(this.disabledBulletTexts,this.splitToken)}get bulletTextsSet(){return this.bulletTexts?Ft(this.bulletTexts,this.splitToken):"integer"===this.bulletTextType&&null!=this.maxIntegerBulletText?Ft(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:o}=this.getBulletToRender();if(i.forEach(((i,o)=>{let n="toggle";this.disabledSet.has(String(i))?n="disabled":this.selectedSet.has(String(i))||!e||this.isSingleSelectionMode||(n="disabled"),t.push({value:this.selectedSet.has(String(i))?1:0,text:String(i),idx:o,type:n})})),o){let i="input";e&&!this.isSingleSelectionMode&&(i="disabled");const o="text"===this.bulletTextType?"...":`${this.lastDisplayBulletText}+`,n="text"===this.bulletTextType?-1:Number(this.lastDisplayBulletText)+1;"integer"===this.bulletTextType&&t.length>=this.maxDisplayBulletsCount&&t.pop(),t.push({value:0,text:o,idx:n,type:i})}}else if(["choice","preview"].includes(this.type)){const{bulletsToRender:e}=this.getBulletToRender();e.forEach(((e,i)=>{let o="toggle";this.disabledSet.has(String(e))?o="disabled":"preview"===this.type?o="readonly":this.selectedSet.has(String(e))&&(o="delete"),t.push({value:this.selectedSet.has(String(e))?1:0,text:e,idx:i,type:o})}))}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:o,language:n,type:r="integer"}){const s=t.trim();if("integer"===r){if(!/^-?\d+$/.test(s))return{valid:!1,errorMessage:$t("enterValidNumber",n),value:t};const r=Number(s);if(isNaN(r))return{valid:!1,errorMessage:$t("enterValidNumber",n),value:t};if(void 0!==o&&r<o||void 0!==i&&r>i)return{valid:!1,errorMessage:$t("enterNumberBetween",n,{min:o,max:i}),value:t};const a=String(r);if(e.has(a))return{valid:!1,errorMessage:$t("numberAlreadySelected",n),value:t}}else if(e.has(s))return{valid:!1,errorMessage:$t("numberAlreadySelected",n),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:Rt(i,Array.from(this.selectedSet)).join(this.splitToken),this.bulletGroupUpdateSelectedBulletTexts.emit({newSelectedBulletTexts:e,selectionGroupId:this.selectionGroupId}),this.handleCloseAddMoreDialog()}}render(){return e("div",{key:"39225bad75cf435b166269367df570732eff7ef4",class:"lottery-selection-group",ref:t=>this.stylingContainer=t},e("div",{key:"2bb2bc539c9fc05aeece7145b13f722756bc054e",class:"lottery-selection-group__item"},this.selectionGroupLabel&&e("div",{key:"dc15197dca90375bd4eb50e87d96402d1ef694d2",class:"lottery-selection-group__item--left"},this.selectionGroupLabel),this.renderBulletGroup()),e("lottery-tipping-dialog",{key:"9526dbb5d1656d6724e6566465febde778437c64",visible:this.dialogConfig.visible,width:this.dialogConfig.width,onCancel:this.dialogConfig.onCancel},e("div",{key:"ecf5800430e92be4a2af279f1d8c5075d5965b7e",class:"addSelectionDialog"},e("div",{key:"3e8a2f445679ef5fe2ada60d4a6832f472f27dfa",class:"addSelectionDialog-title"},this.dialogTitle||("text"===this.bulletTextType?$t("enterValue",this.language):$t("enterScoreUpTo",this.language,{maxScore:this.maxIntegerBulletText}))),e("input",{key:"46462ee8f27410639d45970a76fc3d90a03f3a10",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:"2e66988e4186f8f4f773ed548fc76e53085be946",class:"error-message"},this.inputInfo.errorMessage)),e("div",{key:"81dc64f0b7cba422a54af8ecff4734aa19832583",slot:"footer",class:"addSelectionDialog-footer"},e("lottery-button",{key:"3027240894aef525dc9fc50db79597cf29f9cb99",onClick:this.dialogConfig.onCancel,text:$t("cancel",this.language),variant:"outline"}),e("lottery-button",{key:"ab8c6deed9ab4a7d79d71ed6fe8122b23af5741b",onClick:this.dialogConfig.onConfirm,text:$t("confirm",this.language),variant:"primary",disabled:!this.inputInfo.valid||!this.inputInfo.value}))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};Vt.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 Ht=["ro","en","fr","ar","hr"],Gt={en:{homeTeam:"Home team:",awayTeam:"Away team:",loading:"Loading...",error:"Error!",noData:"No data available.",lineInfo:"Line {currentPage} of {totalPages}",clearAll:"Clear All"},ro:{homeTeam:"Echipa gazdă:",awayTeam:"Echipa oaspete:",selectionCleared:"Selecția dvs. a fost ștearsă.",selectionOnLineCleared:"Selecția dvs. de pe această linie va fi ștearsă.",loading:"Se încarcă...',n error: 'Eroare!",noData:"Nu sunt date disponibile.",lineInfo:"Linia {currentPage} din {totalPages}",clearAll:"Șterge tot",cancel:"Anulează",confirm:"Confirmă"},fr:{homeTeam:"Équipe à domicile:",awayTeam:"Équipe à l'extérieur:",selectionCleared:"Votre sélection a été effacée.",selectionOnLineCleared:"Votre sélection sur cette ligne sera effacée.",loading:"Chargement...',n error: 'Erreur!",noData:"Aucune donnée disponible.",lineInfo:"Ligne {currentPage} sur {totalPages}",clearAll:"Tout effacer",cancel:"Annuler",confirm:"Confirmer"},ar:{homeTeam:"الفريق المضيف:",awayTeam:"الفريق الضيف:",selectionCleared:"تم مسح اختيارك.",selectionOnLineCleared:"سيتم مسح اختيارك في هذا السطر.",loading:"جار التحميل...',n error: 'خطأ!",noData:"لا توجد بيانات متاحة.",lineInfo:"السطر {currentPage} من {totalPages}",clearAll:"مسح الكل",cancel:"إلغاء",confirm:"تأكيد"},hr:{homeTeam:"Domaći tim:",awayTeam:"Gostujući tim:",selectionCleared:"Vaš odabir je obrisan.",selectionOnLineCleared:"Vaš odabir na ovoj liniji bit će obrisan.",loading:"Učitavanje...',n error: 'Greška!",noData:"Nema dostupnih podataka.",lineInfo:"Linija {currentPage} od {totalPages}",clearAll:"Očisti sve",cancel:"Odustani",confirm:"Potvrdi"}},Wt=(t,e,i)=>{const o=e;let n=Gt[void 0!==o&&Ht.includes(o)?o:"en"][t];return i&&Object.keys(i).forEach((t=>{n=n.replace(`{${t}}`,i[t])})),n},qt=async t=>{if(t)try{const i=await fetch(t);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const o=await i.json();e=o,Object.keys(e).forEach((t=>{for(let i in e[t])Gt[t][i]=e[t][i]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e},Yt=({columns:t,dataSource:i,hideHead:o=!1,grid:n=!0,bordered:r=!0})=>e("table",{class:{bordered:r,grid:n,"my-table-component":!0}},!o&&e("thead",null,e("tr",null,t.map((t=>{var i;return e("th",{key:t.value,style:{width:t.width+"%",textAlign:t.align}},"string"==typeof t.title?t.title:null===(i=t.title)||void 0===i?void 0:i.call(t))})))),e("tbody",null,i.map(((i,o)=>e("tr",{key:o},t.map((t=>e("td",{key:t.value,style:{width:t.width+"%",textAlign:t.align},class:{"no-wrap":t.nowrap}},t.render?t.render(i,i[t.value],o):i[t.value])))))))),Xt=class{constructor(i){t(this,i),this.selectionChangeHandler=o(this,"lotteryTippingBetSelectionChange",7),this.clearAll=o(this,"lotteryTippingBetClearAll",7),this.addLine=o(this,"lotteryTippingBetAddLine",7),this.removeLine=o(this,"lotteryTippingBetRemoveLine",7),this.pageChange=o(this,"lotteryTippingBetPageChange",7),this.columns=[{title:"",value:"index",width:3},{title:"",value:"eventName",width:65,render:(t,e)=>this.renderEventName(t,e)},{title:"",value:"startTime",width:22,align:"right",nowrap:!0,render:(t,e)=>(({date:t,type:e="date",format:i})=>{try{const o=rt(t);if(isNaN(o.getTime()))throw new Error(`Invalid date: ${t}`);if(i)return ot(o,i);let n="dd/MM/yyyy";return"time"===e?n="dd/MM/yyyy HH:mm:ss":"week"===e&&(n="ccc dd/MM/yyyy HH:mm:ss"),ot(o,n)}catch(t){return console.error("Error formatting date:",t.message),""}})({date:e,format:"ccc HH:mm"})},{title:()=>e("lottery-selection-group",{language:this.language,"translation-url":this.translationUrl,"client-styling":this.clientStyling,clientStylingUrl:this.clientStylingUrl,type:"preview",splitToken:this.bulletTextsSplitToken,"bullet-texts":this.bulletNames,bulletTextType:"text",hasBackground:!1,hasBorder:!1}),value:"results",width:10,render:(t,i,o)=>e("lottery-selection-group",{language:this.language,"translation-url":this.translationUrl,"client-styling":this.clientStyling,clientStylingUrl:this.clientStylingUrl,"mb-source":this.mbSource,selectionGroupId:`${this.currentPage-1}${this.bulletTextsSplitToken}${o}`,type:this.readPretty?"preview":"bet","selected-bullet-texts":this.selectedBulletTexts(o),"disabled-bullet-texts":this.getBulletDisabledOptions(o),"max-selected-count":"single"===this.mode?1:this.bulletTexts.split(this.bulletTextsSplitToken).length,"bullet-texts":this.bulletTexts,splitToken:this.bulletTextsSplitToken,bulletTextType:"text"})}],this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.totalPages=1,this.minTotalPages=1,this.maxTotalPages=3,this.bulletTexts="1,X,2",this.bulletNames="Home,Draw,Away",this.bulletTextsSplitToken=",",this.showClearButton=!0,this.addImage=Et(Dt,{extraSVGAttrs:{width:"20px",height:"20px",fill:"currentColor"}}),this.deleteImage=Et(Tt,{extraSVGAttrs:{width:"20px",height:"20px",fill:"currentColor"}}),this.infoImage=Et(At,{extraSVGAttrs:{width:"16px",height:"16px",fill:"currentColor"}}),this.leftImage=Et(zt,{extraSVGAttrs:{width:"20px",height:"20px",fill:"currentColor"}}),this.rightImage=Et(Mt,{extraSVGAttrs:{width:"20px",height:"20px",fill:"currentColor"}}),this.mode="multi",this.readPretty=!1,this.ticketDataSourceStr="[]",this.bulletSelectionsLineGroupStr="[]",this.currentPage=1,this.bulletSelectionsLineGroup=[],this.ticketDataSource=[],this.betIsLoading=!1,this.betHasErrors=!1}renderEventName(t,i){const[o,n]=i.split(" vs ");return e("div",{class:"flex gap-1 eventNameContainer__item"},e("span",{class:"eventNameContainer__item--title"},i),e("app-tooltip",null,e("span",{slot:"trigger",class:"icon info-icon",innerHTML:this.infoImage,style:{width:"18px"}}),e("div",{slot:"content"},e("div",{class:"match-info"},e("div",{class:"match-info-item"},e("div",{class:"match-info-item-label"},Wt("homeTeam",this.language)),e("div",{class:"match-info-item-value"},o)),e("div",{class:"match-info-item"},e("div",{class:"match-info-item-label"},Wt("awayTeam",this.language)),e("div",{class:"match-info-item-value"},n))))))}selectedBulletTexts(t){var e,i,o;return(null===(o=null===(i=null===(e=this.bulletSelectionsLineGroup)||void 0===e?void 0:e[this.currentPage-1])||void 0===i?void 0:i[t])||void 0===o?void 0:o.join(this.bulletTextsSplitToken))||""}getBulletDisabledOptions(t){const{outcomes:e}=this.ticketDataSource[t],i=e.map((t=>t.betOn));return this.bulletTexts.split(this.bulletTextsSplitToken).filter((t=>!i.includes(t))).join(this.bulletTextsSplitToken)}handleNewTranslations(){qt(this.translationUrl)}handleClientStylingChange(t,e){t!=e&&r(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`,this.stylingSubscription)}parseTicketDataSource(t){try{this.ticketDataSource=JSON.parse(t||"[]")}catch(t){console.error("Failed to parse ticketDataSourceStr:",t)}}parseBulletSelectionsLineGroup(t){try{this.bulletSelectionsLineGroup=JSON.parse(t||"[]")}catch(t){console.error("Failed to parse bulletSelectionsLineGroupStr:",t)}}connectedCallback(){this.boundMessageHandler=this.messageHandler.bind(this),window.addEventListener("message",this.boundMessageHandler)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe(),this.boundMessageHandler&&window.removeEventListener("message",this.boundMessageHandler)}messageHandler(){}componentWillLoad(){qt(this.translationUrl),this.parseTicketDataSource(this.ticketDataSourceStr),this.parseBulletSelectionsLineGroup(this.bulletSelectionsLineGroupStr)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}handleClearAll(){this.clearAll.emit()}bulletGroupUpdateSelectionHandler(t){t.stopPropagation();const{newSelectedBulletTexts:e,selectionGroupId:i}=t.detail;if(!i)return void console.error("Miss selectionGroupId");const o=i.split(this.bulletTextsSplitToken);if(2!==o.length)return void console.error("Invalid selectionGroupId format:",i);const[n,r]=o;this.selectionChangeHandler.emit({newSelections:e.split(this.bulletTextsSplitToken),matchId:r,boardId:n})}prevPage(){this.swapCard("prev",(()=>{this.pageChange.emit({newPage:this.currentPage-1})}))}nextPage(){this.swapCard("next",(()=>{this.pageChange.emit({newPage:this.currentPage+1})}))}handleAddLine(){this.swapCard("add",(()=>{this.addLine.emit()}))}handleRemoveLine(){this.removeLine.emit({boardId:this.currentPage-1,close:t=>{t&&this.swapCard("remove",t)}})}swapCard(t,e){const i=this.mainContainer;if(!i)return;if(Array.from(i.classList).some((t=>t.startsWith("card-out-")||t.startsWith("card-in-"))))return;const{out:o,in:n}={next:{out:"card-out-left",in:"card-in-left"},prev:{out:"card-out-right",in:"card-in-right"},remove:{out:"card-out-down",in:"card-in-right"},add:{out:"card-out-left",in:"card-in-up"}}[t];i.classList.add(o),i.addEventListener("animationend",(()=>{i.classList.remove(o),e();const t=this.mainContainer;t&&(t.classList.add(n),t.addEventListener("animationend",(()=>t.classList.remove(n)),{once:!0}))}),{once:!0})}renderLoading(){return e("div",{class:"loading-wrap"},e("section",{class:"dots-container"},e("div",{class:"dot"}),e("div",{class:"dot"}),e("div",{class:"dot"}),e("div",{class:"dot"}),e("div",{class:"dot"})))}renderErrorContent(){return e("p",null,Wt("error",this.language))}renderEmptyContent(){return e("div",{class:"LotteryTippingTicketBet__empty"},e("p",null,Wt("noData",this.language)))}renderPageFooter(){return this.totalPages<=1?null:e("div",null,e("div",{class:"border-line"}),e("div",{class:"LotteryTippingTicketBet__footer"},e("div",{class:"my-pagination flex justify-between"},e("span",null,Wt("lineInfo",this.language,{currentPage:this.currentPage,totalPages:this.totalPages})),e("div",{class:"flex gap-1"},e("button",{type:"button",class:"btn "+(1===this.currentPage?"disabled":""),onClick:()=>this.prevPage(),disabled:1===this.currentPage},e("span",{class:"icon",innerHTML:this.leftImage})),e("button",{type:"button",class:"btn "+(this.currentPage===this.totalPages?"disabled":""),onClick:()=>this.nextPage(),disabled:this.currentPage===this.totalPages},e("span",{class:"icon",innerHTML:this.rightImage}))))))}renderReadPrettyContent(){var t;return e("div",{class:"LotteryTippingTicketBet__main",ref:t=>this.mainContainer=t},e("div",{class:"table-scroll-wrapper"},e(Yt,{columns:this.columns,dataSource:(null===(t=this.ticketDataSource)||void 0===t?void 0:t.map(((t,e)=>Object.assign(Object.assign({},t),{index:e+1}))))||[],hideHead:!1,grid:!1,bordered:!1})),this.renderPageFooter())}renderDefaultContent(){var t;const i=this.totalPages<this.maxTotalPages&&this.currentPage===this.totalPages,o=this.totalPages>this.minTotalPages;return e("div",null,e("div",{class:"LotteryTippingTicketBet__tableToolbar flex justify-end gap-1"},this.showClearButton&&e("lottery-button",{class:{"LotteryTippingTicketBet__tableToolbar--item":!0,"mr-0":!(i||o)},text:Wt("clearAll",this.language),onClick:()=>this.handleClearAll(),variant:"text",clientStyling:this.clientStyling||""})),e("div",{class:"flex align-center LotteryTippingTicketBet__main",ref:t=>this.mainContainer=t},e("div",{class:"table-scroll-wrapper"},e(Yt,{columns:this.columns,dataSource:(null===(t=this.ticketDataSource)||void 0===t?void 0:t.map(((t,e)=>Object.assign(Object.assign({},t),{index:e+1}))))||[],hideHead:!1,grid:!1,bordered:!1})),(i||o)&&e("div",{class:"LotteryTippingTicketBet__lineOperatorGroup"},i&&e("button",{type:"button",class:{"LotteryTippingTicketBet__lineOperatorGroup--item":!0},onClick:()=>this.handleAddLine()},e("span",{class:"icon",innerHTML:this.addImage})),o&&e("button",{type:"button",class:{"LotteryTippingTicketBet__lineOperatorGroup--item":!0},onClick:()=>this.handleRemoveLine()},e("span",{class:"icon",innerHTML:this.deleteImage})))),this.renderPageFooter())}render(){let t;return t=this.betIsLoading?this.renderLoading():this.betHasErrors?this.renderErrorContent():0===this.ticketDataSource.length?this.renderEmptyContent():this.readPretty?this.renderReadPrettyContent():this.renderDefaultContent(),e("div",{key:"425f7f3d185616af3189857a9159868e3c57f100",ref:t=>this.stylingContainer=t,class:"LotteryTippingTicketBet__container"},t)}static get watchers(){return{translationUrl:["handleNewTranslations"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],ticketDataSourceStr:["parseTicketDataSource"],bulletSelectionsLineGroupStr:["parseBulletSelectionsLineGroup"]}}};Xt.style=":host {\n --lottery-button-border-radius: 16px;\n}\n\n.LotteryTippingTicketBet__container {\n display: block; /* Or inline-block, depending on desired layout flow */\n font-size: 14px;\n padding: 12px;\n border: 1px solid var(--emw--color-gray-100, #e6e6e6);\n border-radius: var(--emw--button-border-radius, 4px);\n line-height: 1.5715;\n color: var(--emw--color-typography, #000);\n background: var(--emw--color-background, #fff);\n overflow: hidden;\n min-width: 300px;\n container-type: inline-size;\n}\n@container (max-width: 375px) {\n .LotteryTippingTicketBet__container {\n font-size: 12px;\n }\n}\n\n.table-wrapper {\n overflow-x: auto; /* Handle horizontal scroll if content overflows */\n}\n\n.LotteryTippingTicketBet__main {\n overflow: hidden;\n}\n\n.table-scroll-wrapper {\n overflow-x: auto;\n flex-grow: 1;\n min-width: 0;\n}\n\n.my-table-component {\n width: 100%;\n border-collapse: collapse; /* Important for borders */\n text-align: left;\n border-radius: 0.1rem; /* Ant Design like subtle rounding */\n border-spacing: 0;\n}\n\n/* Header */\n.my-table-component th {\n background: var(--emw--color-background-secondary, #f5f5f5);\n color: var(--emw--color-typography, #000);\n font-weight: 500;\n padding: 0.4rem 0.5rem;\n transition: background 0.3s ease;\n}\n@container (max-width: 400px) {\n .my-table-component th {\n padding: 0.3rem 0.3rem;\n }\n}\n\n/* Cells */\n.my-table-component td {\n padding: 0.4rem 0.5rem;\n color: var(--emw--color-typography, #000);\n background: var(--emw--color-background, #fff);\n transition: background 0.3s;\n}\n@container (max-width: 400px) {\n .my-table-component td {\n padding: 0.3rem 0.3rem;\n }\n}\n\n.my-table-component th:nth-child(1),\n.my-table-component td:nth-child(1) {\n /* index */\n min-width: 10px;\n}\n.my-table-component th:nth-child(3),\n.my-table-component td:nth-child(3) {\n /* startTime */\n min-width: 60px;\n}\n.my-table-component th:nth-child(4),\n.my-table-component td:nth-child(4) {\n /* results */\n min-width: 120px;\n}\n\n.my-table-component.bordered th,\n.my-table-component.bordered td {\n border-bottom: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n/* Bordered style */\n.my-table-component.grid th,\n.my-table-component.grid td {\n border: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n.my-table-component.grid th {\n border-bottom-width: 1px; /* Ensure bottom border is consistent */\n}\n\n.my-table-component.grid {\n border: 1px solid var(--emw--color-gray-100, #e6e6e6); /* Outer border */\n border-right-width: 0;\n border-bottom-width: 0;\n}\n\n.my-table-component.grid th:last-child,\n.my-table-component.grid td:last-child {\n border-right: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n.my-table-component.grid tr:last-child td {\n border-bottom: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n/* Striped style */\n.my-table-component.striped tbody tr:nth-child(even) td {\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n}\n\n/* Hover (optional, but nice) */\n.my-table-component tbody tr:hover td {\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n}\n\n.flex {\n display: flex;\n}\n\n.justify-end {\n justify-content: flex-end;\n}\n\n.gap-1 {\n gap: 4px;\n}\n\n.justify-between {\n justify-content: space-between;\n}\n\n.align-center {\n align-items: center;\n}\n\n.gap-1 {\n gap: 0.5rem;\n}\n\n.btn {\n color: var(--emw--color-typography, #000);\n background: var(--emw--color-background, #fff);\n font-size: 14px;\n transition: all 0.2s ease;\n}\n.btn:hover {\n cursor: pointer;\n}\n\n.btn:hover {\n background-color: var(--emw--color-gray-100, #e6e6e6);\n}\n\n.btn.disabled {\n opacity: 0.5;\n pointer-events: none;\n}\n.btn.disabled:hover {\n cursor: not-allowed !important;\n}\n\n.LotteryTippingTicketBet__tableToolbar {\n width: 100%;\n margin-bottom: 1rem;\n}\n\n.LotteryTippingTicketBet__tableToolbar--item {\n margin-right: 2rem;\n}\n.LotteryTippingTicketBet__tableToolbar--item.mr-0 {\n margin-right: 0rem !important;\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup {\n flex-basis: 2rem;\n display: flex;\n flex-direction: column;\n gap: 1rem;\n border-radius: 8px;\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup--item {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 2rem;\n height: 2rem;\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n color: var(--emw--color-typography, #000);\n border-radius: 8px;\n border: none;\n transition: all 0.2s ease-in-out;\n cursor: pointer;\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup--item:hover {\n transform: scale(1.1);\n box-shadow: 0 6px 14px var(--emw-calender-curday-box-shadow, rgba(0, 0, 0, 0.09));\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup--item .icon {\n width: 20px;\n height: 20px;\n transition: filter 0.2s ease-in-out;\n filter: grayscale(0.3);\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup--item:hover .icon {\n filter: grayscale(0);\n transform: rotate(3deg);\n}\n\ndiv.border-line {\n margin-top: 1rem;\n height: 1px;\n width: 100%;\n box-sizing: border-box;\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n transition: all 0.3s ease;\n}\n\n.LotteryTippingTicketBet__footer {\n padding: 0.5rem;\n}\n\n.my-pagination {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 1rem;\n font-size: 0.8rem;\n color: var(--emw--color-typography-secondary, #333);\n}\n\n.my-pagination span {\n font-weight: 500;\n user-select: none;\n}\n\n.my-pagination .btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n border-radius: 50%;\n border: none;\n transition: all 0.3s ease;\n cursor: pointer;\n opacity: 0.9;\n color: var(--emw--color-typography, #000);\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n}\n\n.my-pagination .btn .icon {\n width: 20px;\n height: 20px;\n transition: transform 0.2s ease;\n}\n\n.my-pagination .btn:hover {\n transform: scale(1.1);\n box-shadow: 0 6px 14px var(--emw-calender-curday-box-shadow, rgba(0, 0, 0, 0.09));\n}\n\n.my-pagination .btn.disabled {\n background-color: var(--emw--color-background-tertiary, #ccc);\n cursor: not-allowed;\n opacity: 0.5;\n transform: scale(1);\n}\n\n.match-info-item {\n display: flex;\n}\n\n.match-info-item-label {\n margin-right: 6px;\n}\n\n.info-icon:hover {\n cursor: pointer;\n}\n\n.LotteryTippingTicketBet__empty p {\n text-align: center;\n}\n\n.no-wrap {\n white-space: nowrap;\n overflow: hidden;\n}\n\n.eventNameContainer__item--title {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 300px;\n}\n@container (max-width: 600px) {\n .eventNameContainer__item--title {\n max-width: 180px;\n }\n}\n@container (max-width: 500px) {\n .eventNameContainer__item--title {\n max-width: 150px;\n }\n}\n@container (max-width: 400px) {\n .eventNameContainer__item--title {\n max-width: 100px;\n }\n}\n@container (max-width: 330px) {\n .eventNameContainer__item--title {\n max-width: 70px;\n }\n}\n\n.LotteryTippingTicketBet__main {\n perspective: 800px;\n will-change: transform, opacity;\n}\n\n@container (max-width: 520px) {\n .LotteryTippingTicketBet__main {\n flex-wrap: wrap;\n justify-content: center;\n }\n .LotteryTippingTicketBet__tableToolbar--item {\n margin-right: 0 !important;\n }\n}\n/* Fade-In Keyframes */\n@keyframes fadeInLeft {\n from {\n opacity: 0;\n transform: translateX(100%);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n/* Fade-Out Keyframes */\n@keyframes fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n@keyframes fadeInRight {\n from {\n opacity: 0;\n transform: translateX(-100%);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n@keyframes fadeInUp {\n from {\n opacity: 0;\n transform: translateY(100%);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n@-webkit-keyframes slide-left {\n 0% {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n }\n 100% {\n -webkit-transform: translateX(-100px);\n transform: translateX(-100px);\n }\n}\n@keyframes slide-left {\n 0% {\n -webkit-transform: translateX(100%);\n transform: translateX(100%);\n }\n 100% {\n -webkit-transform: translateX(0px);\n transform: translateX(0px);\n }\n}\n@-webkit-keyframes slide-right {\n 0% {\n -webkit-transform: translateX(-100%);\n transform: translateX(-100%);\n }\n 100% {\n -webkit-transform: translateX(0px);\n transform: translateX(0px);\n }\n}\n@keyframes slide-right {\n 0% {\n -webkit-transform: translateX(-100px);\n transform: translateX(-100px);\n }\n 100% {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n }\n}\n@-webkit-keyframes slide-top {\n 0% {\n -webkit-transform: translateY(-100px);\n transform: translateY(-100px);\n }\n 100% {\n -webkit-transform: translateY(0px);\n transform: translateY(0px);\n }\n}\n@keyframes slide-top {\n 0% {\n -webkit-transform: translateY(-100px);\n transform: translateY(-100px);\n }\n 100% {\n -webkit-transform: translateY(0px);\n transform: translateY(0px);\n }\n}\n/* Apply to your card classes */\n.card-in-left {\n -webkit-animation: slide-left 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n animation: slide-left 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n}\n\n.card-out-left {\n animation: fadeOut 0.2s ease-out both;\n}\n\n.card-in-right {\n -webkit-animation: slide-right 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n animation: slide-right 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n}\n\n.card-out-right {\n animation: fadeOut 0.2s ease-out both;\n}\n\n.card-in-up {\n -webkit-animation: slide-top 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n animation: slide-top 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n}\n\n.card-out-down {\n animation: fadeOut 0.2s ease-out both;\n}\n\n.loading-wrap {\n margin: 20px 0;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 40vh;\n}\n.loading-wrap .dots-container {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n}\n.loading-wrap .dot {\n height: 14px;\n width: 14px;\n margin-right: 14px;\n border-radius: 14px;\n background-color: var(--emw--color-gray-300, #333);\n animation: pulse 1.5s infinite ease-in-out;\n}\n.loading-wrap .dot:last-child {\n margin-right: 0;\n}\n.loading-wrap .dot:nth-child(1) {\n animation-delay: -0.3s;\n}\n.loading-wrap .dot:nth-child(2) {\n animation-delay: -0.1s;\n}\n.loading-wrap .dot:nth-child(3) {\n animation-delay: 0.1s;\n}\n@keyframes pulse {\n 0% {\n transform: scale(0.8);\n background-color: var(--emw--color-gray-300, #333);\n }\n 50% {\n transform: scale(1.2);\n background-color: var(--emw--color-gray-100, #e6e6e6);\n }\n 100% {\n transform: scale(0.8);\n background-color: var(--emw--color-gray-150, #6f6f6f);\n }\n}\n\n.lottery-selection-group-table-header .lottery-selection__button {\n border: none;\n background: none;\n}";const Jt=class{constructor(e){t(this,e),this.lotteryTippingBulletToggleEvent=o(this,"lotteryTippingBulletToggle",7),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.positionIdx=void 0,this.theme="default",this.value="",this.disabled=!1,this.isSelected=!1}handleClientStylingChange(t,e){t!=e&&r(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`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}handleClick(){this.disabled||this.lotteryTippingBulletToggleEvent.emit({positionIdx:this.positionIdx})}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return e("div",{key:"ef0fee38ed62adb7809b5a60668af6a499ebe5a6",ref:t=>this.stylingContainer=t},"text"===this.theme?e("div",{class:{LotteryTippingBullet__segment:!0,"LotteryTippingBullet__segment--text":!0}},this.value):e("button",{class:{LotteryTippingBullet__segment:!0,"LotteryTippingBullet__segment--disabled":this.disabled,"LotteryTippingBullet__segment--active":this.isSelected},onClick:this.handleClick.bind(this)},this.isSelected?"X":this.value))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};Jt.style=".LotteryTippingBullet__segment{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;font-size:16px;line-height:1;font-weight:500;color:var(--emw--color-typography, #000);background:var(--emw--color-background, #fff);border:1px solid var(--emw--color-gray-100, #e6e6e6);border-radius:6px;cursor:pointer;transition:all 0.2s ease;user-select:none}.LotteryTippingBullet__segment:not(.LotteryTippingBullet__segment--disabled):hover{cursor:pointer;animation:jelly 0.3s ease-in-out;transform:scale(1.02)}.LotteryTippingBullet__segment--text{border:none;color:var(--emw--color-typography, #000);background:transparent;font-weight:400}.LotteryTippingBullet__segment--text:hover{cursor:not-allowed !important}.LotteryTippingBullet__segment--active{font-weight:600;background-color:var(--emw--color-background-inverse, #000);color:var(--emw--color-primary, #fed275)}.LotteryTippingBullet__segment--disabled:not(.LotteryTippingBullet__segment--active){background-color:var(--emw--color-background-tertiary, #ccc);color:var(--emw--color-gray-150, #6f6f6f);border-color:var(--emw--color-gray-100, #e6e6e6)}.LotteryTippingBullet__segment--disabled:hover{cursor:not-allowed}@keyframes jelly{0%{transform:translate(0, 0)}20%{transform:translate(-0.5px, -0.5px)}40%{transform:translate(0.5px, 0.5px)}60%{transform:translate(-0.25px, -0.25px)}80%{transform:translate(0.25px, 0.25px)}100%{transform:translate(0, 0)}}";const Kt=class{constructor(e){t(this,e),this.lotteryTippingBulletGroupToggleEvent=o(this,"lotteryTippingBulletGroupToggle",7),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.positionIdx=void 0,this.theme="default",this.mode="single",this.bulletConfigContent=""}get bulletConfigArr(){const t=[{value:"1"},{value:"X"},{value:"2"}];if("string"!=typeof this.bulletConfigContent||!this.bulletConfigContent)return t;try{return JSON.parse(this.bulletConfigContent)}catch(e){return console.error("Error parsing bulletConfigContent:",e),t}}handleClientStylingChange(t,e){t!=e&&r(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`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}lotteryTippingBulletSelectionHandler(t){const{positionIdx:e}=t.detail;this.handleToggle(e)}handleToggle(t){let e=[...this.bulletConfigArr];"single"===this.mode?(e=e.map((t=>Object.assign(Object.assign({},t),{isSelected:!1}))),e[t].isSelected=!0):(e=e.map((t=>Object.assign({},t))),e[t].isSelected=!e[t].isSelected),this.lotteryTippingBulletGroupToggleEvent.emit({bulletConfigArr:e,positionIdx:this.positionIdx+"-"+t})}render(){var t;return e("div",{ref:t=>this.stylingContainer=t,key:this.positionIdx},e("div",{key:"68223022eed831932c571378164be913206d98e9",style:{display:"flex",flexDirection:"row",gap:"10px"}},null===(t=this.bulletConfigArr)||void 0===t?void 0:t.map(((t,i)=>e("div",{key:i},e("lottery-tipping-bullet",{value:t.value,isSelected:t.isSelected,"position-idx":i,disabled:t.disabled,theme:this.theme,clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,mbSource:this.mbSource}))))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};Kt.style="";const Zt=["ro","en","fr","ar","hr"],Qt={en:{cancel:"Cancel",confirm:"Confirm"},ro:{cancel:"Anulează",confirm:"Confirmă"},fr:{cancel:"Annuler",confirm:"Confirmer"},ar:{cancel:"إلغاء",confirm:"تأكيد"},hr:{cancel:"Odustani",confirm:"Potvrdi"}},te=(t,e)=>{const i=e;return Qt[void 0!==i&&Zt.includes(i)?i:"en"][t]},ee=class{constructor(e){t(this,e),this.open=o(this,"open",7),this.close=o(this,"close",7),this.confirm=o(this,"confirm",7),this.cancel=o(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,this.confirmLoading=!1}handleClientStylingChange(t,e){t!=e&&r(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`,this.stylingSubscription)}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 o=await i.json();e=o,Object.keys(e).forEach((t=>{for(let i in e[t])Qt[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":""],o=["mask",this.visible?"mask-enter":"mask-leave"],n=["dialog",this.visible?"dialog-enter":"dialog-leave",this.fullscreen?"fullscreen":"",this.dialogClass].filter(Boolean).join(" ");return e("div",{key:"05dd671f10bdebda6f138e8f8039f4bc0533fe98",class:i.join(" "),ref:t=>this.stylingContainer=t},e("div",{key:"6e814e02770149de5495617039750461fc0a42d1",class:o.join(" "),onClick:this.handleMaskClick.bind(this)}),e("div",{key:"4cbc5db20317ef1b0808fc4a91a53fa8b86c5f4f",part:"dialog",class:n,style:t,role:"dialog","aria-modal":"true","aria-labelledby":"dialog-title"},(this.dialogTitle||this.closable)&&e("div",{key:"85dc705676a37e6ea2828a7b683fc54b0eb77d17",class:"dialog-header"},e("h2",{key:"85b7472d2b72801dfae19a24fc2018f3c1f1529a",id:"dialog-title",class:"dialog-title"},this.dialogTitle),this.closable&&e("button",{key:"8089aaecfe511558055ee9f64214ff97030eb2a9",class:"close-btn",onClick:this.handleClose.bind(this)},"x")),e("div",{key:"776255540f30d757caa3fcaee747c79ac638ae76",class:"dialog-content",style:{maxHeight:"calc(100vh - 62px)",overflowY:"auto"}},e("slot",{key:"5ef964615b6ab70a9e561f8efac8fe952fe47b4e"})),this.showFooter&&e("div",{key:"8927a0991d916caf7852d58db996b9818687da30",class:"dialog-footer"},e("slot",{key:"84de0306994ec62220ae30fa2881dadbae5544ea",name:"footer"},this.showCancelBtn&&e("button",{key:"ee87b8c3918c1f4d007923a2498142b3af2740a0",class:"cancel-btn",onClick:this.handleClose.bind(this)},te("cancel",this.language)),e("button",{key:"935cff86381b21fff07c2d4156b29779c50e5ce3",class:"confirm-btn",onClick:this.handleConfirm.bind(this),disabled:this.confirmLoading},this.confirmLoading?e("div",{class:"Loading",innerHTML:Et(It,{extraSVGAttrs:{width:"20px",height:"20px",fill:"currentColor"}})}):te("confirm",this.language))))))}get el(){return i(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};ee.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:var(--emw--color-mask-dialog-background, 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 var(--emw--button-box-shadow-color-secondary, 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;min-width:60px;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)}}";var ie=Object.defineProperty,oe=Object.defineProperties,ne=Object.getOwnPropertyDescriptors,re=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,ae=Object.prototype.propertyIsEnumerable,le=(t,e,i)=>e in t?ie(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,he=(t,e)=>{for(var i in e||(e={}))se.call(e,i)&&le(t,i,e[i]);if(re)for(var i of re(e))ae.call(e,i)&&le(t,i,e[i]);return t},ce=(t,e)=>oe(t,ne(e)),de=(t,e,i)=>(le(t,"symbol"!=typeof e?e+"":e,i),i),ue=(t,e,i)=>new Promise(((o,n)=>{var r=t=>{try{a(i.next(t))}catch(t){n(t)}},s=t=>{try{a(i.throw(t))}catch(t){n(t)}},a=t=>t.done?o(t.value):Promise.resolve(t.value).then(r,s);a((i=i.apply(t,e)).next())}))
1
+ import{r as t,h as e,g as i,c as o,a as n}from"./index-de792262.js";import{s as r,a as s,b as a}from"./lottery-tipping-page-54ab9176.js";export{L as lottery_tipping_page}from"./lottery-tipping-page-54ab9176.js";const l=class{constructor(e){t(this,e),this.show=()=>this.visible=!0,this.hide=()=>this.visible=!1,this.visible=!1}componentDidLoad(){this.trigger=this.host.querySelector('[slot="trigger"]'),this.trigger&&(this.trigger.addEventListener("mouseenter",this.show),this.trigger.addEventListener("mouseleave",this.hide),this.trigger.addEventListener("focus",this.show),this.trigger.addEventListener("blur",this.hide))}disconnectedCallback(){this.trigger&&(this.trigger.removeEventListener("mouseenter",this.show),this.trigger.removeEventListener("mouseleave",this.hide),this.trigger.removeEventListener("focus",this.show),this.trigger.removeEventListener("blur",this.hide))}render(){return e("div",{key:"e56695ac60fcd7903127179423e9954ef40f05c0",class:"tooltip-wrapper"},e("slot",{key:"4e2472a395ceeb2b911692739d326c031df07e29",name:"trigger"}),e("div",{key:"f77bd72da94eb17d12e42ebb86c395c55801b728",class:{"tooltip-content-wrapper":!0,visible:this.visible}},e("div",{key:"988399e2b42988622d46eaf255f17c6221eb9697",class:"tooltip-content"},e("slot",{key:"05de0572ab1331d965e61947c5c15775e225197a",name:"content"}))))}get host(){return i(this)}};l.style=":host{display:inline-flex;position:relative}.tooltip-wrapper{position:relative;display:inline-flex}.tooltip-content-wrapper{position:absolute;z-index:10;bottom:125%;left:50%;transform:translateX(-50%);opacity:0;visibility:hidden;transition:opacity 0.2s, visibility 0.2s}.tooltip-content-wrapper.visible{opacity:1;visibility:visible}.tooltip-content{background-color:var(--emw--tooltip-background-color, #000);color:var(--emw--tooltip-text-color, #fff);border-radius:4px;box-shadow:0 2px 8px rgba(0, 0, 0, 0.15);white-space:nowrap;padding:4px}";const h=class{constructor(e){t(this,e),this.change=o(this,"change",7),this.handleOutsideClick=t=>{t.composedPath().includes(this.el)||(this.dropdownOpen=!1,this.overflowOpen=!1)},this.toggleDropdown=t=>{t.stopPropagation(),this.dropdownOpen=!this.dropdownOpen,this.overflowOpen=!1},this.isSelected=t=>this.selectedValues.includes(t),this.selectItem=t=>{this.isSelected(t.value)||(this.selectedValues=[...this.selectedValues,t.value],this.change.emit(this.selectedValues))},this.toggleItem=t=>{this.isSelected(t.value)?this.removeItem(t.value):this.selectItem(t)},this.removeItem=(t,e)=>{e&&e.stopPropagation(),this.selectedValues=this.selectedValues.filter((e=>e!==t)),this.change.emit(this.selectedValues)},this.downIcon=n("../static/dropdown.svg"),this.upIcon=n("../static/dropup.svg"),this.isTouch="ontouchstart"in window,this.openOverflow=()=>{this.isTouch||(this.computePopoverPosition(),this.overflowOpen=!0)},this.closeOverflow=()=>{this.isTouch||(this.overflowOpen=!1)},this.toggleOverflow=t=>{t.stopPropagation(),this.computePopoverPosition(),this.overflowOpen=!this.overflowOpen},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.options=[],this.maxVisibleChips=2,this.placeholder="",this.selectedValues=[],this.dropdownOpen=!1,this.overflowOpen=!1,this.popoverStyle={top:"0px",left:"0px"}}handleClientStylingChange(t,e){t!=e&&r(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`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}async clear(){this.selectedValues=[],this.change.emit(this.selectedValues)}componentWillLoad(){document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){document.removeEventListener("click",this.handleOutsideClick),this.stylingSubscription&&this.stylingSubscription.unsubscribe()}get selectedOptions(){return this.options.filter((t=>this.isSelected(t.value)))}get visibleChips(){return this.selectedOptions.slice(0,this.maxVisibleChips)}get hiddenChips(){return this.selectedOptions.slice(this.maxVisibleChips)}computePopoverPosition(){if(this.overflowChipEl&&this.el){const{left:t}=this.overflowChipEl.getBoundingClientRect(),{left:e,height:i}=this.el.getBoundingClientRect();this.popoverStyle={top:i-10+"px",left:t-e+"px"}}}render(){var t;return e("div",{key:"50b48397be3ede1907ab2c2abcd1cf2f43f69c13",class:"general-multi-select-container",ref:t=>this.stylingContainer=t},e("div",{key:"696a1bb1f221f8f5cf290fac040af10e2e5a115e",class:"multi-select-container",ref:t=>this.el=t},e("div",{key:"9ea92f01787b26d43054573a11896cf65065b073",class:"flex-row",onClick:this.toggleDropdown},e("div",{key:"f79720ca3ec383ee7f95b09483698ee18119c79a",class:"control"},this.visibleChips.map((t=>e("span",{class:"chip"},e("div",{class:"chip-text",title:t.text},t.text),e("div",{class:"remove-btn",onClick:e=>this.removeItem(t.value,e)},"×")))),this.hiddenChips.length>0&&e("span",{key:"25e9e527c33dd7a315dacb10cc51084fe69b9b7e",class:"chip overflow-chip",ref:t=>this.overflowChipEl=t,onMouseEnter:this.openOverflow,onMouseLeave:this.closeOverflow,onClick:this.toggleOverflow},"•••"),0===this.selectedValues.length&&e("span",{key:"b061de660a55f7a0d41ce9aa650108d3f38a9dc0",class:"placeholder"},this.placeholder)),e("div",{key:"f83b6517e88b3976cdc18590f8f1233cb2515230",class:"arrow"},e("img",{key:"1b61a49090237057b98e5ce8a4f7c1e3bfc9d4ba",class:"info-icon",src:this.dropdownOpen?this.upIcon:this.downIcon,style:{width:"18px"}}))),this.dropdownOpen&&e("div",{key:"e5b081007bcbdd251ce5ac235c1f19f17852c420",class:"dropdown"},this.options.map((t=>e("div",{class:{"dropdown-item":!0,selected:this.isSelected(t.value)},onClick:()=>this.toggleItem(t)},t.text)))),this.overflowOpen&&!!(null===(t=this.hiddenChips)||void 0===t?void 0:t.length)&&e("div",{key:"f8e3289042c69c569bebcd0a40d90f31261c6c12",class:"overflow-popover",style:{top:this.popoverStyle.top,left:this.popoverStyle.left},onMouseEnter:this.openOverflow,onMouseLeave:this.closeOverflow},this.hiddenChips.map((t=>e("span",{class:"chip"},e("span",{class:"chip-text",title:t.text},t.text),e("span",{class:"remove-btn",onClick:e=>this.removeItem(t.value,e)},"×")))))))}static get assetsDirs(){return["../static"]}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};h.style='.multi-select-container{position:relative;font-family:"Inter", sans-serif;margin-top:4px;width:100%}.flex-row{display:flex;flex-direction:row;align-items:center;flex-wrap:nowrap;padding:6px 10px;padding-right:6px;border-radius:0.25em;background:var(--emw-selector-color-background, #e8ebef);cursor:pointer}.control{flex:1;display:flex;align-items:center;flex-wrap:nowrap;overflow:hidden}.control:focus-within{border-color:var(--emw--color-primary, #fed275);box-shadow:0 0 0 2px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15))}.chip{display:inline-flex;align-items:center;background:var(--emw--color-gray-50, #f5f5f5);color:var(--emw--color-dialog-typography, #000);border-radius:4px;padding:2px 8px;margin-right:6px;font-size:0.875rem;line-height:1.2;justify-content:space-between;flex:0 1 auto;min-width:0}.chip-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.overflow-chip{background:var(--emw--color-gray-100, #e6e6e6);color:var(--emw--color-gray-300, #333);width:20px;text-align:center;display:block}.remove-btn{background:none;border:none;font-size:1rem;margin-left:6px;cursor:pointer;color:var(--emw--color-gray-150, #6f6f6f)}.remove-btn:hover{color:var(--emw--color-error, red)}.placeholder{color:var(--emw--color-gray-150, #6f6f6f);font-size:0.875rem;padding:3px 8px;padding-left:0;line-height:1.2}.arrow{margin-left:auto;font-size:0.8rem;width:20px;color:var(--emw--color-gray-150, #6f6f6f)}.dropdown{position:absolute;top:calc(100% + 4px);left:0;width:100%;max-height:240px;overflow-y:auto;border:1px solid var(--emw--color-gray-100, #e6e6e6);border-radius:6px;background:var(--emw--color-dialog-background, #ffffff);box-shadow:0 4px 12px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15));z-index:10}.dropdown-item{padding:10px 14px;cursor:pointer;font-size:0.875rem;line-height:1.4;transition:background 0.2s}.dropdown-item:hover{background:var(--emw--color-background-tertiary, #ccc);color:var(--emw--color-typography, #000)}.dropdown-item.selected{background:var(--emw--color-background-secondary, #f5f5f5);color:var(--emw--color-typography, #000);font-weight:500}.overflow-popover{position:absolute;top:var(--overflow-top, 0px);left:var(--overflow-left, 0px);max-width:200px;padding:12px;display:flex;flex-wrap:wrap;gap:6px;border:1px solid var(--emw--color-gray-100, #d0d5dd);border-radius:6px;background:var(--emw--color-background, #ffffff);box-shadow:0 4px 12px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15));z-index:20}';const c=class{constructor(e){t(this,e),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.position="top",this.delay=200,this.isVisible=!1,this._tooltipId=void 0}handleClientStylingChange(t,e){t!=e&&r(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`,this.stylingSubscription)}componentWillLoad(){this._tooltipId=`general-tooltip-${Math.random().toString(36).substring(2,9)}`}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}handleMouseEnterOrFocus(){clearTimeout(this.hideTimeout),this.showTimeout&&clearTimeout(this.showTimeout),this.showTimeout=setTimeout((()=>{this.isVisible=!0}),this.delay)}handleMouseLeaveOrBlur(){this.showTimeout&&clearTimeout(this.showTimeout),this.hideTimeout=setTimeout((()=>{this.isVisible=!1}),100)}handleKeyDown(t){"Escape"===t.key&&this.isVisible&&(this.isVisible=!1)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe(),clearTimeout(this.showTimeout),clearTimeout(this.hideTimeout)}render(){const t={"general-tooltip-popup":!0,visible:this.isVisible,[`general-tooltip-${this.position}`]:!0};return e("div",{key:"c0d52518e1e196e0d022789f7c6b7e64173b2c7d",class:"general-tooltip-wrapper"},e("slot",{key:"a935e103e16b0b619a024706e8224f4a937de6b9",name:"trigger"}),e("div",{key:"35c60e35ce3f8d5c2c42cd333fe64a3b289d34d4",class:"general-tooltip-container",role:"tooltip",ref:t=>this.stylingContainer=t},e("div",{key:"9d3fd9f142c1e3bd263dee289a2c1a9e4eebfddc",id:this._tooltipId,class:t,role:"tooltip"},e("slot",{key:"31344f0d4d4139f913d1819cc4f42a39f5113d8a",name:"content"}),e("div",{key:"f5cdd93060baec37b2a2879056efe2d66c5a553a",class:"general-tooltip-arrow"}))))}get hostElement(){return i(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function u(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function p(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function m(t){p(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===d(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}c.style=".general-tooltip-wrapper{display:inline-block;position:relative;line-height:0}.general-tooltip-container{display:contents;}.general-tooltip-popup{position:absolute;color:var(--emw--color-typography-inverse, #fff);background:var(--emw--color-background-inverse, #000);padding:8px 12px;border-radius:4px;font-size:0.875em;line-height:1.4;z-index:1000;opacity:0;visibility:hidden;transition:opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;white-space:nowrap;pointer-events:none;}.general-tooltip-popup.visible{opacity:1;visibility:visible}.general-tooltip-arrow{position:absolute;width:0;height:0;border-style:solid}.general-tooltip-top{bottom:100%;left:50%;transform:translateX(-50%);margin-bottom:8px;}.general-tooltip-top .general-tooltip-arrow{top:100%;left:50%;transform:translateX(-50%);border-width:6px 6px 0 6px;border-color:var(--emw--color-gray-300, #333) transparent transparent transparent}.general-tooltip-bottom{top:100%;left:50%;transform:translateX(-50%);margin-top:8px;}.general-tooltip-bottom .general-tooltip-arrow{bottom:100%;left:50%;transform:translateX(-50%);border-width:0 6px 6px 6px;border-color:transparent transparent var(--emw--color-gray-300, #333) transparent}.general-tooltip-left{right:100%;top:50%;transform:translateY(-50%);margin-right:8px;}.general-tooltip-left .general-tooltip-arrow{left:100%;top:50%;transform:translateY(-50%);border-width:6px 0 6px 6px;border-color:transparent transparent transparent var(--emw--color-gray-300, #333)}.general-tooltip-right{left:100%;top:50%;transform:translateY(-50%);margin-left:8px;}.general-tooltip-right .general-tooltip-arrow{right:100%;top:50%;transform:translateY(-50%);border-width:6px 6px 6px 0;border-color:transparent var(--emw--color-gray-300, #333) transparent transparent}";var f={};function v(){return f}var g=36e5;function b(t){p(1,arguments);var e=m(t),i=e.getUTCDay(),o=(i<1?7:0)+i-1;return e.setUTCDate(e.getUTCDate()-o),e.setUTCHours(0,0,0,0),e}function y(t){p(1,arguments);var e=m(t),i=e.getUTCFullYear(),o=new Date(0);o.setUTCFullYear(i+1,0,4),o.setUTCHours(0,0,0,0);var n=b(o),r=new Date(0);r.setUTCFullYear(i,0,4),r.setUTCHours(0,0,0,0);var s=b(r);return e.getTime()>=n.getTime()?i+1:e.getTime()>=s.getTime()?i:i-1}function w(t,e){var i,o,n,r,s,a,l,h;p(1,arguments);var c=v(),d=u(null!==(i=null!==(o=null!==(n=null!==(r=null==e?void 0:e.weekStartsOn)&&void 0!==r?r:null==e||null===(s=e.locale)||void 0===s||null===(a=s.options)||void 0===a?void 0:a.weekStartsOn)&&void 0!==n?n:c.weekStartsOn)&&void 0!==o?o:null===(l=c.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==i?i:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=m(t),g=f.getUTCDay(),b=(g<d?7:0)+g-d;return f.setUTCDate(f.getUTCDate()-b),f.setUTCHours(0,0,0,0),f}function x(t,e){var i,o,n,r,s,a,l,h;p(1,arguments);var c=m(t),d=c.getUTCFullYear(),f=v(),g=u(null!==(i=null!==(o=null!==(n=null!==(r=null==e?void 0:e.firstWeekContainsDate)&&void 0!==r?r:null==e||null===(s=e.locale)||void 0===s||null===(a=s.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==n?n:f.firstWeekContainsDate)&&void 0!==o?o:null===(l=f.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1);if(!(g>=1&&g<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var b=new Date(0);b.setUTCFullYear(d+1,0,g),b.setUTCHours(0,0,0,0);var y=w(b,e),x=new Date(0);x.setUTCFullYear(d,0,g),x.setUTCHours(0,0,0,0);var _=w(x,e);return c.getTime()>=y.getTime()?d+1:c.getTime()>=_.getTime()?d:d-1}function _(t,e){for(var i=t<0?"-":"",o=Math.abs(t).toString();o.length<e;)o="0"+o;return i+o}const k=function(t,e){var i=t.getUTCFullYear(),o=i>0?i:1-i;return _("yy"===e?o%100:o,e.length)},C=function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):_(i+1,2)},S=function(t,e){return _(t.getUTCDate(),e.length)},T=function(t,e){return _(t.getUTCHours()%12||12,e.length)},A=function(t,e){return _(t.getUTCHours(),e.length)},z=function(t,e){return _(t.getUTCMinutes(),e.length)},I=function(t,e){return _(t.getUTCSeconds(),e.length)},D=function(t,e){var i=e.length,o=t.getUTCMilliseconds();return _(Math.floor(o*Math.pow(10,i-3)),e.length)};var M={G:function(t,e,i){var o=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(o,{width:"abbreviated"});case"GGGGG":return i.era(o,{width:"narrow"});default:return i.era(o,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var o=t.getUTCFullYear();return i.ordinalNumber(o>0?o:1-o,{unit:"year"})}return k(t,e)},Y:function(t,e,i,o){var n=x(t,o),r=n>0?n:1-n;return"YY"===e?_(r%100,2):"Yo"===e?i.ordinalNumber(r,{unit:"year"}):_(r,e.length)},R:function(t,e){return _(y(t),e.length)},u:function(t,e){return _(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var o=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(o);case"QQ":return _(o,2);case"Qo":return i.ordinalNumber(o,{unit:"quarter"});case"QQQ":return i.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(o,{width:"narrow",context:"formatting"});default:return i.quarter(o,{width:"wide",context:"formatting"})}},q:function(t,e,i){var o=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(o);case"qq":return _(o,2);case"qo":return i.ordinalNumber(o,{unit:"quarter"});case"qqq":return i.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(o,{width:"narrow",context:"standalone"});default:return i.quarter(o,{width:"wide",context:"standalone"})}},M:function(t,e,i){var o=t.getUTCMonth();switch(e){case"M":case"MM":return C(t,e);case"Mo":return i.ordinalNumber(o+1,{unit:"month"});case"MMM":return i.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(o,{width:"narrow",context:"formatting"});default:return i.month(o,{width:"wide",context:"formatting"})}},L:function(t,e,i){var o=t.getUTCMonth();switch(e){case"L":return String(o+1);case"LL":return _(o+1,2);case"Lo":return i.ordinalNumber(o+1,{unit:"month"});case"LLL":return i.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(o,{width:"narrow",context:"standalone"});default:return i.month(o,{width:"wide",context:"standalone"})}},w:function(t,e,i,o){var n=function(t,e){p(1,arguments);var i=m(t),o=w(i,e).getTime()-function(t,e){var i,o,n,r,s,a,l,h;p(1,arguments);var c=v(),d=u(null!==(i=null!==(o=null!==(n=null!==(r=null==e?void 0:e.firstWeekContainsDate)&&void 0!==r?r:null==e||null===(s=e.locale)||void 0===s||null===(a=s.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==n?n:c.firstWeekContainsDate)&&void 0!==o?o:null===(l=c.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1),m=x(t,e),f=new Date(0);return f.setUTCFullYear(m,0,d),f.setUTCHours(0,0,0,0),w(f,e)}(i,e).getTime();return Math.round(o/6048e5)+1}(t,o);return"wo"===e?i.ordinalNumber(n,{unit:"week"}):_(n,e.length)},I:function(t,e,i){var o=function(t){p(1,arguments);var e=m(t),i=b(e).getTime()-function(t){p(1,arguments);var e=y(t),i=new Date(0);return i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0),b(i)}(e).getTime();return Math.round(i/6048e5)+1}(t);return"Io"===e?i.ordinalNumber(o,{unit:"week"}):_(o,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):S(t,e)},D:function(t,e,i){var o=function(t){p(1,arguments);var e=m(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var o=e.getTime();return Math.floor((i-o)/864e5)+1}(t);return"Do"===e?i.ordinalNumber(o,{unit:"dayOfYear"}):_(o,e.length)},E:function(t,e,i){var o=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},e:function(t,e,i,o){var n=t.getUTCDay(),r=(n-o.weekStartsOn+8)%7||7;switch(e){case"e":return String(r);case"ee":return _(r,2);case"eo":return i.ordinalNumber(r,{unit:"day"});case"eee":return i.day(n,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(n,{width:"short",context:"formatting"});default:return i.day(n,{width:"wide",context:"formatting"})}},c:function(t,e,i,o){var n=t.getUTCDay(),r=(n-o.weekStartsOn+8)%7||7;switch(e){case"c":return String(r);case"cc":return _(r,e.length);case"co":return i.ordinalNumber(r,{unit:"day"});case"ccc":return i.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(n,{width:"narrow",context:"standalone"});case"cccccc":return i.day(n,{width:"short",context:"standalone"});default:return i.day(n,{width:"wide",context:"standalone"})}},i:function(t,e,i){var o=t.getUTCDay(),n=0===o?7:o;switch(e){case"i":return String(n);case"ii":return _(n,e.length);case"io":return i.ordinalNumber(n,{unit:"day"});case"iii":return i.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},a:function(t,e,i){var o=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,e,i){var o,n=t.getUTCHours();switch(o=12===n?"noon":0===n?"midnight":n/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,e,i){var o,n=t.getUTCHours();switch(o=n>=17?"evening":n>=12?"afternoon":n>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var o=t.getUTCHours()%12;return 0===o&&(o=12),i.ordinalNumber(o,{unit:"hour"})}return T(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):A(t,e)},K:function(t,e,i){var o=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(o,{unit:"hour"}):_(o,e.length)},k:function(t,e,i){var o=t.getUTCHours();return 0===o&&(o=24),"ko"===e?i.ordinalNumber(o,{unit:"hour"}):_(o,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):z(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):I(t,e)},S:function(t,e){return D(t,e)},X:function(t,e,i,o){var n=(o._originalDate||t).getTimezoneOffset();if(0===n)return"Z";switch(e){case"X":return N(n);case"XXXX":case"XX":return E(n);default:return E(n,":")}},x:function(t,e,i,o){var n=(o._originalDate||t).getTimezoneOffset();switch(e){case"x":return N(n);case"xxxx":case"xx":return E(n);default:return E(n,":")}},O:function(t,e,i,o){var n=(o._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+O(n,":");default:return"GMT"+E(n,":")}},z:function(t,e,i,o){var n=(o._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+O(n,":");default:return"GMT"+E(n,":")}},t:function(t,e,i,o){return _(Math.floor((o._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,i,o){return _((o._originalDate||t).getTime(),e.length)}};function O(t,e){var i=t>0?"-":"+",o=Math.abs(t),n=Math.floor(o/60),r=o%60;if(0===r)return i+String(n);var s=e||"";return i+String(n)+s+_(r,2)}function N(t,e){return t%60==0?(t>0?"-":"+")+_(Math.abs(t)/60,2):E(t,e)}function E(t,e){var i=e||"",o=t>0?"-":"+",n=Math.abs(t);return o+_(Math.floor(n/60),2)+i+_(n%60,2)}const P=M;var B=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},j=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},$={p:j,P:function(t,e){var i,o=t.match(/(P+)(p+)?/)||[],n=o[1],r=o[2];if(!r)return B(t,e);switch(n){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",B(n,e)).replace("{{time}}",j(r,e))}};const F=$;var U=["D","DD"],R=["YY","YYYY"];function V(t,e,i){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var H={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function G(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}var W,q={date:G({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:G({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:G({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Y={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function X(t){return function(e,i){var o;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&t.formattingValues){var n=t.defaultFormattingWidth||t.defaultWidth,r=null!=i&&i.width?String(i.width):n;o=t.formattingValues[r]||t.formattingValues[n]}else{var s=t.defaultWidth,a=null!=i&&i.width?String(i.width):t.defaultWidth;o=t.values[a]||t.values[s]}return o[t.argumentCallback?t.argumentCallback(e):e]}}function J(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.width,n=e.match(o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth]);if(!n)return null;var r,s=n[0],a=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?function(t){for(var e=0;e<t.length;e++)if(t[e].test(s))return e}(a):function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].test(s))return e}(a);return r=t.valueCallback?t.valueCallback(l):l,{value:r=i.valueCallback?i.valueCallback(r):r,rest:e.slice(s.length)}}}const K={code:"en-US",formatDistance:function(t,e,i){var o,n=H[t];return o="string"==typeof n?n:1===e?n.one:n.other.replace("{{count}}",e.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+o:o+" ago":o},formatLong:q,formatRelative:function(t){return Y[t]},localize:{ordinalNumber:function(t){var e=Number(t),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:X({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:X({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:X({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:X({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:X({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(W={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(W.matchPattern);if(!i)return null;var o=i[0],n=t.match(W.parsePattern);if(!n)return null;var r=W.valueCallback?W.valueCallback(n[0]):n[0];return{value:r=e.valueCallback?e.valueCallback(r):r,rest:t.slice(o.length)}}),era:J({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:J({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:J({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:J({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:J({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};var Z=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Q=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,tt=/^'([^]*?)'?$/,et=/''/g,it=/[a-zA-Z]/;function ot(t,e,i){var o,n,r,s,a,l,h,c,f,g,b,y,w,x,_,k,C,S;p(2,arguments);var T=String(e),A=v(),z=null!==(o=null!==(n=null==i?void 0:i.locale)&&void 0!==n?n:A.locale)&&void 0!==o?o:K,I=u(null!==(r=null!==(s=null!==(a=null!==(l=null==i?void 0:i.firstWeekContainsDate)&&void 0!==l?l:null==i||null===(h=i.locale)||void 0===h||null===(c=h.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==a?a:A.firstWeekContainsDate)&&void 0!==s?s:null===(f=A.locale)||void 0===f||null===(g=f.options)||void 0===g?void 0:g.firstWeekContainsDate)&&void 0!==r?r:1);if(!(I>=1&&I<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var D=u(null!==(b=null!==(y=null!==(w=null!==(x=null==i?void 0:i.weekStartsOn)&&void 0!==x?x:null==i||null===(_=i.locale)||void 0===_||null===(k=_.options)||void 0===k?void 0:k.weekStartsOn)&&void 0!==w?w:A.weekStartsOn)&&void 0!==y?y:null===(C=A.locale)||void 0===C||null===(S=C.options)||void 0===S?void 0:S.weekStartsOn)&&void 0!==b?b:0);if(!(D>=0&&D<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!z.localize)throw new RangeError("locale must contain localize property");if(!z.formatLong)throw new RangeError("locale must contain formatLong property");var M=m(t);if(!function(t){if(p(1,arguments),!function(t){return p(1,arguments),t instanceof Date||"object"===d(t)&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t)return!1;var e=m(t);return!isNaN(Number(e))}(M))throw new RangeError("Invalid time value");var O=function(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}(M),N=function(t,e){return p(2,arguments),function(t,e){p(2,arguments);var i=m(t).getTime(),o=u(e);return new Date(i+o)}(t,-u(e))}(M,O),E={firstWeekContainsDate:I,weekStartsOn:D,locale:z,_originalDate:M};return T.match(Q).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,F[e])(t,z.formatLong):t})).join("").match(Z).map((function(o){if("''"===o)return"'";var n,r,s=o[0];if("'"===s)return(r=(n=o).match(tt))?r[1].replace(et,"'"):n;var a=P[s];if(a)return null!=i&&i.useAdditionalWeekYearTokens||-1===R.indexOf(o)||V(o,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!(-1!==U.indexOf(o))||V(o,e,String(t)),a(N,o,z.localize,E);if(s.match(it))throw new RangeError("Format string contains an unescaped latin alphabet character `"+s+"`");return o})).join("")}function nt(t,e){p(2,arguments);var i=m(t),o=m(e);return i.getTime()<o.getTime()}function rt(t,e){var i;p(1,arguments);var o=u(null!==(i=null==e?void 0:e.additionalDigits)&&void 0!==i?i:2);if(2!==o&&1!==o&&0!==o)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!=typeof t&&"[object String]"!==Object.prototype.toString.call(t))return new Date(NaN);var n,r=function(t){var e,i={},o=t.split(st.dateTimeDelimiter);if(o.length>2)return i;if(/:/.test(o[0])?e=o[0]:(i.date=o[0],e=o[1],st.timeZoneDelimiter.test(i.date)&&(i.date=t.split(st.timeZoneDelimiter)[0],e=t.substr(i.date.length,t.length))),e){var n=st.timezone.exec(e);n?(i.time=e.replace(n[1],""),i.timezone=n[1]):i.time=e}return i}(t);if(r.date){var s=function(t,e){var i=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),o=t.match(i);if(!o)return{year:NaN,restDateString:""};var n=o[1]?parseInt(o[1]):null,r=o[2]?parseInt(o[2]):null;return{year:null===r?n:100*r,restDateString:t.slice((o[1]||o[2]).length)}}(r.date,o);n=function(t,e){if(null===e)return new Date(NaN);var i=t.match(at);if(!i)return new Date(NaN);var o=!!i[4],n=ct(i[1]),r=ct(i[2])-1,s=ct(i[3]),a=ct(i[4]),l=ct(i[5])-1;if(o)return function(t,e,i){return e>=1&&e<=53&&i>=0&&i<=6}(0,a,l)?function(t,e,i){var o=new Date(0);o.setUTCFullYear(t,0,4);var n=7*(e-1)+i+1-(o.getUTCDay()||7);return o.setUTCDate(o.getUTCDate()+n),o}(e,a,l):new Date(NaN);var h=new Date(0);return function(t,e,i){return e>=0&&e<=11&&i>=1&&i<=(ut[e]||(pt(t)?29:28))}(e,r,s)&&function(t,e){return e>=1&&e<=(pt(t)?366:365)}(e,n)?(h.setUTCFullYear(e,r,Math.max(n,s)),h):new Date(NaN)}(s.restDateString,s.year)}if(!n||isNaN(n.getTime()))return new Date(NaN);var a,l=n.getTime(),h=0;if(r.time&&(h=function(t){var e=t.match(lt);if(!e)return NaN;var i=dt(e[1]),o=dt(e[2]),n=dt(e[3]);return function(t,e,i){return 24===t?0===e&&0===i:i>=0&&i<60&&e>=0&&e<60&&t>=0&&t<25}(i,o,n)?i*g+6e4*o+1e3*n:NaN}(r.time),isNaN(h)))return new Date(NaN);if(!r.timezone){var c=new Date(l+h),d=new Date(0);return d.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),d.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),d}return a=function(t){if("Z"===t)return 0;var e=t.match(ht);if(!e)return 0;var i="+"===e[1]?-1:1,o=parseInt(e[2]),n=e[3]&&parseInt(e[3])||0;return function(t,e){return e>=0&&e<=59}(0,n)?i*(o*g+6e4*n):NaN}(r.timezone),isNaN(a)?new Date(NaN):new Date(l+h+a)}var st={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},at=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,lt=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,ht=/^([+-])(\d{2})(?::?(\d{2}))?$/;function ct(t){return t?parseInt(t):1}function dt(t){return t&&parseFloat(t.replace(",","."))||0}var ut=[31,null,31,30,31,30,31,31,30,31,30,31];function pt(t){return t%400==0||t%4==0&&t%100!=0}const mt=class{constructor(e){t(this,e),this.countDownChange=o(this,"countDownChange",7),this.countDownFinish=o(this,"countDownFinish",7),this.value=void 0,this.format="HH:mm:ss",this.prefix=void 0,this.suffix=void 0,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.endTime=void 0,this.timeObj={day:{str:"00",unit:""},hour:{str:"00",unit:""},minute:{str:"00",unit:""},second:{str:"00",unit:""}}}handleClientStylingChange(t,e){t!=e&&r(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`,this.stylingSubscription)}handleValueChange(t){this.setEndTime(t),t?this.startCountDown():this.clearCountDown()}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl)),this.setEndTime(this.value),this.value&&this.startCountDown()}setEndTime(t){if("string"==typeof t){const e=rt(t).getTime();this.endTime=isNaN(e)?null:e}else this.endTime=t}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe(),this.clearCountDown()}startCountDown(){this.clearCountDown(),this.tick(),this.timer=setInterval((()=>{this.tick()}),1e3)}clearCountDown(){this.timer&&(clearInterval(this.timer),this.timer=null)}tick(){if(!this.endTime)return;let t=this.endTime-Date.now();t<=0&&(t=0,this.clearCountDown(),this.countDownFinish.emit());const e=Math.floor(t/864e5),i=Math.floor(t/36e5%24),o=Math.floor(t/1e3/60%60),n=Math.floor(t/1e3%60),r=t=>t<10?`0${t}`:`${t}`;this.timeObj={day:{str:r(e),unit:"d"},hour:{str:r(i),unit:"h"},minute:{str:r(o),unit:"m"},second:{str:r(n),unit:"s"}};const s=this.getFormatTime();this.countDownChange.emit({leftTime:t,formatTime:s,legalTime:s})}getFormatTime(){return this.format.replace("DD",this.timeObj.day.str).replace("HH",this.timeObj.hour.str).replace("mm",this.timeObj.minute.str).replace("ss",this.timeObj.second.str)}renderItems(){const t=/(DD|HH|mm|ss)|([\s\S]+?)(?=(DD|HH|mm|ss)|$)/g,i=[];let o;for(;null!==(o=t.exec(this.format));)if(o[1]){let t="";switch(o[1]){case"DD":t=this.timeObj.day.str;break;case"HH":t=this.timeObj.hour.str;break;case"mm":t=this.timeObj.minute.str;break;case"ss":t=this.timeObj.second.str}i.push({val:t,unit:""})}else o[2]&&i.length>0&&(i[i.length-1].unit=o[2]);return i.map(((t,i)=>e("div",{key:i+t.unit,class:"helper-count-down-item",part:"item"},e("div",{class:"helper-count-down-item-num"},t.val),e("div",{class:"helper-count-down-item-unit"},t.unit))))}render(){return e("div",{key:"b360412e045020b5ac0263c6ca56458f31eedb2c",class:"helper-count-down-container",ref:t=>this.stylingContainer=t},e("slot",{key:"c72bed87fba869c842407b04e0cbfe038e5b7ea8"}),this.prefix&&e("div",{key:"8d3ba9d60577421f81bae7bc76f52a774b17e1fe",class:"helper-count-down-prefix"},this.prefix),e("div",{key:"187edf3b8eb6de85efe1a748fd8ef47a68e19611",class:"helper-count-down-values",part:"values"},this.renderItems()),this.suffix&&e("div",{key:"3a8e5d9561ecd3f52eff423bd43c8b60a261a17c",class:"helper-count-down-suffix"},this.suffix))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],value:["handleValueChange"]}}};mt.style=":host{display:block}.helper-count-down-container{display:flex;align-items:center}.helper-count-down-prefix{margin-right:4px}.helper-count-down-suffix{margin-left:4px}.helper-count-down-values{display:flex;align-items:center}.helper-count-down-item{display:flex;align-items:center;justify-content:center}.helper-count-down-item-num{font-variant-numeric:tabular-nums}";const ft=["ro","en","fr","ar","hr"],vt={en:{stop:"Stop",at:"at",turnover:"Turnover: ",startIn:"Sales Start in:"},ro:{stop:"Oprește",at:"la"},fr:{stop:"Arrêtez",at:"à"},ar:{stop:"توقف",at:"في"},hr:{stop:"Stop",at:"u"}},gt=(t,e)=>{const i=e;return vt[void 0!==i&&ft.includes(i)?i:"en"][t]},bt=class{constructor(e){t(this,e),this.lotteryBannerWagerStarted=o(this,"lotteryBannerWagerStarted",7),this.handleCountdownFinish=()=>{this.isWagerStarted=!0,this.lotteryBannerWagerStarted.emit()},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.logoUrl=void 0,this.stopTime="",this.startTime="",this.bannerTitle=void 0,this.turnover=void 0,this.layout="logo,title,info",this.isWagerStarted=!1,this.formattedStopTime=void 0}handleClientStylingChange(t,e){t!==e&&r(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`,this.stylingSubscription)}handleTimeChange(){this.checkWagerStatus()}async 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 o=await i.json();e=o,Object.keys(e).forEach((t=>{for(let i in e[t])vt[t][i]=e[t][i]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl),this.checkWagerStatus()}checkWagerStatus(){this.isWagerStarted=!this.startTime||!nt(new Date,rt(this.startTime)),this.stopTime&&(this.formattedStopTime=ot(rt(this.stopTime),"dd/MM/yyyy HH:mm"))}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}renderElement(t,i=""){const o=n("../static/poolGameLogo.webp");switch(t){case"logo":return e("div",{class:`lottery-banner__logo-wrapper ${i}`},o&&e("img",{alt:"logo",src:o,class:"lottery-banner__logo"}));case"title":return this.bannerTitle&&e("div",{class:`lottery-banner__title ${i}`},this.bannerTitle);case"info":return e("div",{class:`lottery-banner__info ${i}`},this.isWagerStarted?e("div",{class:"lottery-banner__info-item"},e("span",{class:"lottery-banner__info-item-label"},e("span",{class:"lottery-banner__info-item-label__strong"},gt("stop",this.language))," ",gt("at",this.language)),e("span",{class:"lottery-banner__info-item-value"},this.formattedStopTime)):e("div",{class:"lottery-banner__info-item"},e("span",{class:"lottery-banner__info-item-label"},e("span",{class:"lottery-banner__info-item-label__strong"},gt("startIn",this.language))," "),e("helper-count-down",{class:"lottery-banner__info-item-value lottery-banner__info-item-value__strong",value:this.startTime,format:"DDD HHH mmM ssS",onCountDownFinish:this.handleCountdownFinish})),this.isWagerStarted&&null!=this.turnover&&e("div",{class:"lottery-banner__info-item"},e("span",{class:"lottery-banner__info-item-label"},gt("turnover",this.language)),e("span",{class:"lottery-banner__info-item-value"},this.turnover)));default:return null}}render(){const t=this.layout.split(",").map((t=>t.trim()));return e("section",{key:"8714d4136821b8afd6079da769bb9cc94149ed9d",ref:t=>this.stylingContainer=t,class:"lottery-banner"},t.map(((e,i)=>this.renderElement(e,3===t.length&&1===i?"lottery-banner__item--center":""))))}static get assetsDirs(){return["../static"]}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],startTime:["handleTimeChange"],stopTime:["handleTimeChange"]}}};bt.style=":host {\n display: block;\n container-type: inline-size;\n}\n\n.lottery-banner {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--lottery-banner-gap, 0.5rem);\n padding: var(--lottery-banner-padding, 0px 20px);\n background: var(--lottery-banner-background, var(--emw--color-primary, #fed275));\n border-top: var(--lottery-banner-border-width, 2px) var(--lottery-banner-border-style, solid) var(--lottery-banner-border-color, var(--emw--color-primary, #fed275));\n border-bottom: var(--lottery-banner-border-width, 2px) var(--lottery-banner-border-style, solid) var(--lottery-banner-border-color, var(--emw--color-primary, #fed275));\n border-left: var(--lottery-banner-border-left, none);\n border-right: var(--lottery-banner-border-right, none);\n border-radius: var(--lottery-banner-border-radius, 0);\n white-space: nowrap;\n height: var(--lottery-banner-height, 50px);\n position: relative;\n box-sizing: border-box;\n}\n\n.lottery-banner__logo-wrapper {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n}\n.lottery-banner__logo-wrapper img {\n height: 100%;\n max-width: 32vw;\n object-fit: var(--lottery-banner-logo-object-fit, contain);\n}\n\n.lottery-banner__item--center {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n\n.lottery-banner__title {\n text-align: center;\n font-size: var(--lottery-banner-title-font-size, 1.5rem);\n font-weight: 800;\n font-style: italic;\n letter-spacing: var(--lottery-banner-title-font-letter-spacing, 0.04em);\n color: var(--emw--color-typography, #000);\n}\n\n.lottery-banner__info {\n display: flex;\n align-items: center;\n gap: var(--lottery-banner-info-gap, 0.75rem);\n}\n\n.lottery-banner__info-item {\n font-size: var(--lottery-banner-info-font-size, 0.9rem);\n color: var(--lottery-banner-info-color, var(--emw--color-typography, #000));\n display: inline-flex;\n align-items: center;\n gap: 0.3rem;\n}\n\n.lottery-banner__info-item-label {\n color: var(--lottery-banner-info-label-color, var(--emw--color-typography, #000));\n}\n.lottery-banner__info-item-label__strong {\n font-weight: var(--lottery-banner-info-label-font-weight, 700);\n}\n\n.lottery-banner__info-item-value {\n font-weight: var(--lottery-banner-info-value-font-weight, inherit);\n color: var(--lottery-banner-info-value-color, var(--emw--color-typography, #000));\n}\n.lottery-banner__info-item-value__strong {\n font-weight: var(--lottery-banner-info-label-font-weight, 700);\n}\n\nhelper-count-down::part(values) {\n gap: 8px;\n}\n\n@container (max-width: 700px) {\n .lottery-banner {\n height: auto;\n padding: var(--lottery-banner-mobile-padding, 0.5rem 0.2rem);\n }\n .lottery-banner__title {\n flex-basis: 100%;\n text-align: var(--lottery-banner-mobile-title-text-align, left);\n font-size: var(--emw--font-size-small, 0.875rem);\n }\n .lottery-banner__info {\n flex-direction: column;\n align-items: flex-start;\n gap: var(--lottery-banner-mobile-info-gap, 0.1rem);\n }\n .lottery-banner__info-item {\n font-size: var(--emw--font-size-x-small, 0.75rem);\n }\n}";const yt=["ro","en","fr","ar","hr","zh"],wt={en:{loading:"Loading"},ro:{},fr:{},ar:{},hr:{}},xt=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(),o=Math.max(i.width,i.height),n={top:t.clientY-i.top-o/2,left:t.clientX-i.left-o/2,size:o};this.ripples=[...this.ripples,n],setTimeout((()=>{this.ripples=this.ripples.filter((t=>t!==n))}),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&&r(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`,this.stylingSubscription)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&r(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 o=await i.json();e=o,Object.keys(e).forEach((t=>{for(let i in e[t])wt[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:o,color:n}=this,r=i||this.loading,s={};if(n)switch(t){case"primary":default:Object.assign(s,{backgroundColor:n,borderColor:n});break;case"outline":case"dashed":Object.assign(s,{color:n,borderColor:n});break;case"text":Object.assign(s,{color:n})}return e("button",{key:"aa74ad98c90e7548228557bf8a8d26b125d4a83a",class:{btn:!0,[`btn--${t}`]:!0,[`btn--${o}`]:!0,"btn--loading":this.loading},style:n?s:void 0,disabled:r,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=wt[void 0!==t&&yt.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"]}}};var _t;xt.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}}",function(t){t.PURCHASED="Purchased",t.SETTLED="Settled",t.CANCELED="Canceled",t.ERROR="Error"}(_t||(_t={}));const kt=class{constructor(e){t(this,e),this.orderSummarySubmit=o(this,"orderSummarySubmit",7),this.submitSuccess=o(this,"lotteryTicketSubmitSuccess",7),this.submitError=o(this,"lotteryTicketSubmitError",7),this.sessionExpired=o(this,"sessionExpired",7),this.endpoint=void 0,this.sessionId=void 0,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.language="en",this.orderSummaryTitle=void 0,this.ticketsLabel=void 0,this.totalLabel=void 0,this.showColon=!0,this.showDivider=!1,this.submitDisabled=!1,this.submitButtonText=void 0,this.submitLoading=!1}handleClientStylingChange(t,e){t!=e&&r(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`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleLotteryTicketParamsReady(t){if(t.detail&&this.isValidTicketSubmitParam(t.detail))this.handleSubmitTickets(t.detail);else{const e="Invalid ticket data received before submission.";console.error(e,t.detail),this.submitError.emit({message:e,dataOrigin:t.detail,status:400})}}isValidTicketSubmitParam(t){return t&&Array.isArray(t.tickets)&&t.tickets.length>0&&t.tickets.every((t=>this.isValidTicketParam(t)))}isValidTicketParam(t){return t&&void 0!==t.gameName&&void 0!==t.startingDrawId&&void 0!==t.amount&&void 0!==t.currency&&void 0!==t.selection}async handleSubmitTickets(t){try{this.submitLoading=!0;const e=await function(t,e="GET",i=null,o={}){return new Promise(((n,r)=>{const s="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})),a=Object.assign({"Content-Type":"application/json"},o);"GET"!==e&&"HEAD"!==e&&(a["X-Idempotency-Key"]=s);const l={method:e,headers:a,body:null};i&&"GET"!==e&&"HEAD"!==e?l.body=JSON.stringify(i):delete l.body,fetch(t,l).then((t=>t.ok?t.json():r(t))).then((t=>n(t))).catch((t=>r(t)))}))}(`${this.endpoint}/tickets`,"POST",t,{Authorization:`Bearer ${this.sessionId}`});e.tickets.every((t=>t.state===_t.PURCHASED))?this.submitSuccess.emit({dataOrigin:e,status:200}):this.submitError.emit({message:"Failed to purchase ticket",dataOrigin:e,status:200})}catch(t){401===t.status&&this.sessionExpired.emit(),(t.status>300||!t.status)&&this.submitError.emit({dataOrigin:t,status:t.status||0})}finally{this.submitLoading=!1}}handleSubmit(){this.orderSummarySubmit.emit()}render(){return e("div",{key:"bdab321b9336f47e16057d240b3226d7cba59b97",ref:t=>this.stylingContainer=t},e("div",{key:"de7ffcc9f96d8c7cfc7bdb3a3c7225ee78c33483",class:"order-summary"},e("h3",{key:"9500cd69a6eba0855d4981cdad8eaa91b9c98567",class:"order-summary__title"},this.orderSummaryTitle),e("div",{key:"ce29c82eef1d12bc63e94e4fa2d5474700860af2",class:"order-summary__ticket"},e("div",{key:"9db79da17590c7f847f46c3b3b66489ea9a0e268",class:"order-summary__ticket-info"},e("div",{key:"4b5a2df807aeb421cf3c1ebf33f410a92f39ccaf",class:"order-summary__ticket-label"},e("div",{key:"feb73e9f849d2e3d6b77e4c848657f27e6a82323",class:"order-summary__ticket"},this.ticketsLabel),e("span",{key:"51f70dcdda2154d8ce97d8e1a7c0f61a6198afbb",class:"order-summary__colon"},this.showColon?":":null)),e("div",{key:"4fed2d63cd7a881c8844055fe1fde99c8c7aa9fb",class:"order-summary__details"},e("slot",{key:"6a7969738546ee4aca81a075f6174556e78d2c31",name:"orderSummaryTicketDetail"}))),this.showDivider&&e("hr",{key:"029803fa93960d5098a24d5ca18e77e14562b29f",class:"order-summary__divider"}),e("div",{key:"738096c5b605a97851dbf24a972d93d9533ad48b",class:"order-summary__ticket-info"},e("div",{key:"acd8a7f3e64c97f58c79f57a90143151c996abf8",class:"order-summary__ticket-label"},e("div",{key:"44e6b29978ca4fc2b22ca9d95ee4facfc883f292",class:"order-summary__ticket"},this.totalLabel),e("span",{key:"330a00a4b39e578a1b0d80211d2b68d44c5235c9",class:"order-summary__colon"},this.showColon?":":null)),e("span",{key:"294046815a62a80366458aade4ec5d5476577a93",class:"order-summary__details"},e("slot",{key:"02d129ef0caf523ec0c9da34318df46d3b008376",name:"orderSummaryTotalDetail"})))),e("slot",{key:"9395396883f0594ad8db216a9aa9fa0aeff45c10",name:"orderSummaryChoice"}),e("div",{key:"462672abc490cde00fea90ea585f48875ca2ec47",class:"order-summary__button-wrapper"},e("lottery-button",{key:"1885bee3570ce6b58d4ae1977c635f418485fdbe",onClick:this.handleSubmit.bind(this),loading:this.submitLoading,disabled:this.submitDisabled,text:this.submitButtonText}))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};kt.style=":host{width:100%}.order-summary{width:100%;background:var(--emw--color-background, #fff);border-radius:var(--lottery-order-summary-border-radius, 8px);border:var(--lottery-order-summary-border, none);box-shadow:var(--lottery-order-summary-box-shadow, none);box-sizing:border-box}.order-summary__title{margin:var(--lottery-order-summary-title-margin, 0 0 30px 0);text-align:var(--lottery-order-summary-title-text-align, center);color:var(--emw--color-typography, #000);text-transform:uppercase;font-weight:var(--lottery-order-summary-title-font-weight, 700)}.order-summary__ticket-info{display:flex;align-items:center;margin-bottom:var(--lottery-order-summary-row-gap, 16px);gap:var(--lottery-order-summary-col-gap, 10px);color:var(--emw--color-typography, #000)}.order-summary__ticket-label{display:flex;flex-direction:row;align-items:center;width:var(--lottery-order-summary-label-width, 50px);max-width:var(--lottery-order-summary-label-max-width, 100%);flex-shrink:0}.order-summary__colon{margin-left:2px}.order-summary__ticket{font-weight:var(--lottery-order-summary-label-font-weight, 500);color:var(--emw--color-typography, #000);overflow-wrap:break-word}.order-summary__details{display:flex;align-items:center;color:var(--emw--color-typography, #000);font-weight:var(--lottery-order-summary-details-font-weight, 400)}.order-summary__divider{border:none;border-top:var(--lottery-order-summary-divider-border, 1px solid var(--emw--color-gray-100, #e6e6e6));margin:var(--lottery-order-summary-divider-margin, 20px 0)}.order-summary__button-wrapper{display:flex;justify-content:center;margin:var(--lottery-order-summary-button-wrapper-margin, 0);padding:var(--lottery-order-summary-button-wrapper-padding, 0)}";const Ct=class{constructor(e){t(this,e),this.valueChange=o(this,"valueChange",7),this.optionRefs=[],this.label=void 0,this.options=[],this.value=void 0}handleValueChange(){this.updateActiveIndicator()}componentWillLoad(){!this.value&&this.options.length>0&&(this.value=this.options[0].value)}componentDidLoad(){requestAnimationFrame((()=>this.updateActiveIndicator()))}handleWindowResize(){this.updateActiveIndicator()}updateActiveIndicator(){const t=this.options.findIndex((t=>t.value===this.value));if(-1===t||!this.activeIndicator||!this.optionRefs[t])return;const e=this.optionRefs[t],i=this.activeIndicator.parentElement.getBoundingClientRect(),o=e.getBoundingClientRect();this.activeIndicator.style.transform=`translateX(${o.left-i.left}px)`,this.activeIndicator.style.width=`${o.width}px`}onOptionClick(t){this.value!==t&&this.valueChange.emit(t)}render(){return e("div",{key:"675f17d5fd8ddef56324416fda27ffd130ddafa3",class:"wrapper"},this.label&&e("label",{key:"d6dfc897e2014a7ce57cc4ddca57b1e6173eb1a5",class:"label"},this.label),e("div",{key:"e89097f2a9536ada1e0edf52e0d50cdd8f88c52e",class:"segmented-container"},e("div",{key:"f720dc7b9b8957cb6d363fd6a2313978eba6988e",class:"active-indicator",ref:t=>this.activeIndicator=t}),this.options.map(((t,i)=>e("button",{class:{option:!0,active:this.value===t.value},onClick:()=>this.onOptionClick(t.value),ref:t=>this.optionRefs[i]=t},t.label)))))}get host(){return i(this)}static get watchers(){return{value:["handleValueChange"]}}};Ct.style=":host{display:block}.wrapper{display:flex;align-items:center;gap:8px}.label{font-size:16px;color:var(--emw-segmented-label-color, #333);font-weight:500}.segmented-container{display:inline-flex;position:relative;background-color:var(--emw-segmented-bg, #f0f0f0);border-radius:20px;box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1)}.option{position:relative;z-index:1;border:none;background-color:transparent;padding:12px 18px;cursor:pointer;font-size:14px;font-weight:500;color:var(--emw-segmented-text-color, #555);transition:color 0.3s ease;white-space:nowrap}.option.active{color:var(--emw-segmented-active-text-color, #000);font-weight:bold}.active-indicator{position:absolute;z-index:0;top:2px;bottom:2px;background-color:var(--emw-segmented-active-bg, #fff);border-radius:22px;box-shadow:0 2px 4px rgba(0, 0, 0, 0.15);transition:transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1)}";const St={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"},Tt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},At={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"},zt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},It={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"},Dt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"},Mt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};var Ot=function(){return Ot=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},Ot.apply(this,arguments)},Nt={primaryColor:"#333",secondaryColor:"#E6E6E6"};function Et(t,e){if(void 0===e&&(e={}),"function"==typeof t.icon){var i=e.placeholders||Nt;return Pt(t.icon(i.primaryColor,i.secondaryColor),e)}return Pt(t.icon,e)}function Pt(t,e){var i="svg"===t.tag?Ot(Ot({},t.attrs),e.extraSVGAttrs||{}):t.attrs,o=Object.keys(i).reduce((function(t,e){var o=i[e],n="".concat(e,'="').concat(o,'"');return t.push(n),t}),[]),n=o.length?" "+o.join(" "):"",r=(t.children||[]).map((function(t){return Pt(t,e)})).join("");return r&&r.length?"<".concat(t.tag).concat(n,">").concat(r,"</").concat(t.tag,">"):"<".concat(t.tag).concat(n," />")}const Bt=class{constructor(e){t(this,e),this.lotteryBulletClickHandler=o(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&&r(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`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&r(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):Et(St,{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"]}}};Bt.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 jt=["ro","en","fr","ar","hr","zh"],Lt={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:{}},$t=(t,e,i)=>{const o=e;let n=Lt[void 0!==o&&jt.includes(o)?o:"en"][t];return i&&Object.keys(i).forEach((t=>{n=n.replace(`{${t}}`,i[t])})),n};function Ft(t,e){return new Set(t?t.split(e):[])}function Ut(t,e){return e.filter((e=>e!==t))}function Rt(t,e){return e.concat([t])}const Vt=class{constructor(e){t(this,e),this.bulletGroupUpdateSelectedBulletTexts=o(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.disabledBulletTexts="",this.dialogConfig={width:"400px",visible:!1,onConfirm:()=>this.handleFillInAddMore(),onCancel:()=>this.handleCloseAddMoreDialog()},this.inputInfo={valid:!0,errorMessage:"",value:""}}handleClientStylingChange(t,e){t!=e&&r(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`,this.stylingSubscription)}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])Lt[e][i]=t[e][i]})))}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&r(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),o=this.maxSelectedCount,"delete"===e.type?Ut(e.text,i):"toggle"===e.type?i.includes(e.text)?Ut(e.text,i):i.length>=o?function(t,e,i){return e.slice(e.length-(i-1)).concat([t])}(e.text,i,o):Rt(e.text,i):[]).join(this.splitToken),selectionGroupId:this.selectionGroupId});else var e,i,o;else this.dialogConfig=Object.assign(Object.assign({},this.dialogConfig),{visible:!0})}get selectedSet(){return Ft(this.selectedBulletTexts,this.splitToken)}get disabledSet(){return Ft(this.disabledBulletTexts,this.splitToken)}get bulletTextsSet(){return this.bulletTexts?Ft(this.bulletTexts,this.splitToken):"integer"===this.bulletTextType&&null!=this.maxIntegerBulletText?Ft(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:o}=this.getBulletToRender();if(i.forEach(((i,o)=>{let n="toggle";this.disabledSet.has(String(i))?n="disabled":this.selectedSet.has(String(i))||!e||this.isSingleSelectionMode||(n="disabled"),t.push({value:this.selectedSet.has(String(i))?1:0,text:String(i),idx:o,type:n})})),o){let i="input";e&&!this.isSingleSelectionMode&&(i="disabled");const o="text"===this.bulletTextType?"...":`${this.lastDisplayBulletText}+`,n="text"===this.bulletTextType?-1:Number(this.lastDisplayBulletText)+1;"integer"===this.bulletTextType&&t.length>=this.maxDisplayBulletsCount&&t.pop(),t.push({value:0,text:o,idx:n,type:i})}}else if(["choice","preview"].includes(this.type)){const{bulletsToRender:e}=this.getBulletToRender();e.forEach(((e,i)=>{let o="toggle";this.disabledSet.has(String(e))?o="disabled":"preview"===this.type?o="readonly":this.selectedSet.has(String(e))&&(o="delete"),t.push({value:this.selectedSet.has(String(e))?1:0,text:e,idx:i,type:o})}))}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:o,language:n,type:r="integer"}){const s=t.trim();if("integer"===r){if(!/^-?\d+$/.test(s))return{valid:!1,errorMessage:$t("enterValidNumber",n),value:t};const r=Number(s);if(isNaN(r))return{valid:!1,errorMessage:$t("enterValidNumber",n),value:t};if(void 0!==o&&r<o||void 0!==i&&r>i)return{valid:!1,errorMessage:$t("enterNumberBetween",n,{min:o,max:i}),value:t};const a=String(r);if(e.has(a))return{valid:!1,errorMessage:$t("numberAlreadySelected",n),value:t}}else if(e.has(s))return{valid:!1,errorMessage:$t("numberAlreadySelected",n),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:Rt(i,Array.from(this.selectedSet)).join(this.splitToken),this.bulletGroupUpdateSelectedBulletTexts.emit({newSelectedBulletTexts:e,selectionGroupId:this.selectionGroupId}),this.handleCloseAddMoreDialog()}}render(){return e("div",{key:"39225bad75cf435b166269367df570732eff7ef4",class:"lottery-selection-group",ref:t=>this.stylingContainer=t},e("div",{key:"2bb2bc539c9fc05aeece7145b13f722756bc054e",class:"lottery-selection-group__item"},this.selectionGroupLabel&&e("div",{key:"dc15197dca90375bd4eb50e87d96402d1ef694d2",class:"lottery-selection-group__item--left"},this.selectionGroupLabel),this.renderBulletGroup()),e("lottery-tipping-dialog",{key:"9526dbb5d1656d6724e6566465febde778437c64",visible:this.dialogConfig.visible,width:this.dialogConfig.width,onCancel:this.dialogConfig.onCancel},e("div",{key:"ecf5800430e92be4a2af279f1d8c5075d5965b7e",class:"addSelectionDialog"},e("div",{key:"3e8a2f445679ef5fe2ada60d4a6832f472f27dfa",class:"addSelectionDialog-title"},this.dialogTitle||("text"===this.bulletTextType?$t("enterValue",this.language):$t("enterScoreUpTo",this.language,{maxScore:this.maxIntegerBulletText}))),e("input",{key:"46462ee8f27410639d45970a76fc3d90a03f3a10",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:"2e66988e4186f8f4f773ed548fc76e53085be946",class:"error-message"},this.inputInfo.errorMessage)),e("div",{key:"81dc64f0b7cba422a54af8ecff4734aa19832583",slot:"footer",class:"addSelectionDialog-footer"},e("lottery-button",{key:"3027240894aef525dc9fc50db79597cf29f9cb99",onClick:this.dialogConfig.onCancel,text:$t("cancel",this.language),variant:"outline"}),e("lottery-button",{key:"ab8c6deed9ab4a7d79d71ed6fe8122b23af5741b",onClick:this.dialogConfig.onConfirm,text:$t("confirm",this.language),variant:"primary",disabled:!this.inputInfo.valid||!this.inputInfo.value}))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};Vt.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 Ht=["ro","en","fr","ar","hr"],Gt={en:{homeTeam:"Home team:",awayTeam:"Away team:",loading:"Loading...",error:"Error!",noData:"No data available.",lineInfo:"Line {currentPage} of {totalPages}",clearAll:"Clear All"},ro:{homeTeam:"Echipa gazdă:",awayTeam:"Echipa oaspete:",selectionCleared:"Selecția dvs. a fost ștearsă.",selectionOnLineCleared:"Selecția dvs. de pe această linie va fi ștearsă.",loading:"Se încarcă...',n error: 'Eroare!",noData:"Nu sunt date disponibile.",lineInfo:"Linia {currentPage} din {totalPages}",clearAll:"Șterge tot",cancel:"Anulează",confirm:"Confirmă"},fr:{homeTeam:"Équipe à domicile:",awayTeam:"Équipe à l'extérieur:",selectionCleared:"Votre sélection a été effacée.",selectionOnLineCleared:"Votre sélection sur cette ligne sera effacée.",loading:"Chargement...',n error: 'Erreur!",noData:"Aucune donnée disponible.",lineInfo:"Ligne {currentPage} sur {totalPages}",clearAll:"Tout effacer",cancel:"Annuler",confirm:"Confirmer"},ar:{homeTeam:"الفريق المضيف:",awayTeam:"الفريق الضيف:",selectionCleared:"تم مسح اختيارك.",selectionOnLineCleared:"سيتم مسح اختيارك في هذا السطر.",loading:"جار التحميل...',n error: 'خطأ!",noData:"لا توجد بيانات متاحة.",lineInfo:"السطر {currentPage} من {totalPages}",clearAll:"مسح الكل",cancel:"إلغاء",confirm:"تأكيد"},hr:{homeTeam:"Domaći tim:",awayTeam:"Gostujući tim:",selectionCleared:"Vaš odabir je obrisan.",selectionOnLineCleared:"Vaš odabir na ovoj liniji bit će obrisan.",loading:"Učitavanje...',n error: 'Greška!",noData:"Nema dostupnih podataka.",lineInfo:"Linija {currentPage} od {totalPages}",clearAll:"Očisti sve",cancel:"Odustani",confirm:"Potvrdi"}},Wt=(t,e,i)=>{const o=e;let n=Gt[void 0!==o&&Ht.includes(o)?o:"en"][t];return i&&Object.keys(i).forEach((t=>{n=n.replace(`{${t}}`,i[t])})),n},qt=async t=>{if(t)try{const i=await fetch(t);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const o=await i.json();e=o,Object.keys(e).forEach((t=>{for(let i in e[t])Gt[t][i]=e[t][i]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e},Yt=({columns:t,dataSource:i,hideHead:o=!1,grid:n=!0,bordered:r=!0})=>e("table",{class:{bordered:r,grid:n,"my-table-component":!0}},!o&&e("thead",null,e("tr",null,t.map((t=>{var i;return e("th",{key:t.value,style:{width:t.width+"%",textAlign:t.align}},"string"==typeof t.title?t.title:null===(i=t.title)||void 0===i?void 0:i.call(t))})))),e("tbody",null,i.map(((i,o)=>e("tr",{key:o},t.map((t=>e("td",{key:t.value,style:{width:t.width+"%",textAlign:t.align},class:{"no-wrap":t.nowrap}},t.render?t.render(i,i[t.value],o):i[t.value])))))))),Xt=class{constructor(i){t(this,i),this.selectionChangeHandler=o(this,"lotteryTippingBetSelectionChange",7),this.clearAll=o(this,"lotteryTippingBetClearAll",7),this.addLine=o(this,"lotteryTippingBetAddLine",7),this.removeLine=o(this,"lotteryTippingBetRemoveLine",7),this.pageChange=o(this,"lotteryTippingBetPageChange",7),this.columns=[{title:"",value:"index",width:3},{title:"",value:"eventName",width:65,render:(t,e)=>this.renderEventName(t,e)},{title:"",value:"startTime",width:22,align:"right",nowrap:!0,render:(t,e)=>(({date:t,type:e="date",format:i})=>{try{const o=rt(t);if(isNaN(o.getTime()))throw new Error(`Invalid date: ${t}`);if(i)return ot(o,i);let n="dd/MM/yyyy";return"time"===e?n="dd/MM/yyyy HH:mm:ss":"week"===e&&(n="ccc dd/MM/yyyy HH:mm:ss"),ot(o,n)}catch(t){return console.error("Error formatting date:",t.message),""}})({date:e,format:"ccc HH:mm"})},{title:()=>e("lottery-selection-group",{language:this.language,"translation-url":this.translationUrl,"client-styling":this.clientStyling,clientStylingUrl:this.clientStylingUrl,type:"preview",splitToken:this.bulletTextsSplitToken,"bullet-texts":this.bulletNames,bulletTextType:"text",hasBackground:!1,hasBorder:!1}),value:"results",width:10,render:(t,i,o)=>e("lottery-selection-group",{language:this.language,"translation-url":this.translationUrl,"client-styling":this.clientStyling,clientStylingUrl:this.clientStylingUrl,"mb-source":this.mbSource,selectionGroupId:`${this.currentPage-1}${this.bulletTextsSplitToken}${o}`,type:this.readPretty?"preview":"bet","selected-bullet-texts":this.selectedBulletTexts(o),"disabled-bullet-texts":this.getBulletDisabledOptions(o),"max-selected-count":"single"===this.mode?1:this.bulletTexts.split(this.bulletTextsSplitToken).length,"bullet-texts":this.bulletTexts,splitToken:this.bulletTextsSplitToken,bulletTextType:"text"})}],this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.totalPages=1,this.minTotalPages=1,this.maxTotalPages=3,this.bulletTexts="1,X,2",this.bulletNames="Home,Draw,Away",this.bulletTextsSplitToken=",",this.showClearButton=!0,this.addImage=Et(Dt,{extraSVGAttrs:{width:"20px",height:"20px",fill:"currentColor"}}),this.deleteImage=Et(Tt,{extraSVGAttrs:{width:"20px",height:"20px",fill:"currentColor"}}),this.infoImage=Et(At,{extraSVGAttrs:{width:"16px",height:"16px",fill:"currentColor"}}),this.leftImage=Et(zt,{extraSVGAttrs:{width:"20px",height:"20px",fill:"currentColor"}}),this.rightImage=Et(Mt,{extraSVGAttrs:{width:"20px",height:"20px",fill:"currentColor"}}),this.mode="multi",this.readPretty=!1,this.ticketDataSourceStr="[]",this.bulletSelectionsLineGroupStr="[]",this.currentPage=1,this.bulletSelectionsLineGroup=[],this.ticketDataSource=[],this.betIsLoading=!1,this.betHasErrors=!1}renderEventName(t,i){const[o,n]=i.split(" vs ");return e("div",{class:"flex gap-1 eventNameContainer__item"},e("span",{class:"eventNameContainer__item--title"},i),e("app-tooltip",null,e("span",{slot:"trigger",class:"icon info-icon",innerHTML:this.infoImage,style:{width:"18px"}}),e("div",{slot:"content"},e("div",{class:"match-info"},e("div",{class:"match-info-item"},e("div",{class:"match-info-item-label"},Wt("homeTeam",this.language)),e("div",{class:"match-info-item-value"},o)),e("div",{class:"match-info-item"},e("div",{class:"match-info-item-label"},Wt("awayTeam",this.language)),e("div",{class:"match-info-item-value"},n))))))}selectedBulletTexts(t){var e,i,o;return(null===(o=null===(i=null===(e=this.bulletSelectionsLineGroup)||void 0===e?void 0:e[this.currentPage-1])||void 0===i?void 0:i[t])||void 0===o?void 0:o.join(this.bulletTextsSplitToken))||""}getBulletDisabledOptions(t){const{outcomes:e}=this.ticketDataSource[t],i=e.map((t=>t.betOn));return this.bulletTexts.split(this.bulletTextsSplitToken).filter((t=>!i.includes(t))).join(this.bulletTextsSplitToken)}handleNewTranslations(){qt(this.translationUrl)}handleClientStylingChange(t,e){t!=e&&r(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`,this.stylingSubscription)}parseTicketDataSource(t){try{this.ticketDataSource=JSON.parse(t||"[]")}catch(t){console.error("Failed to parse ticketDataSourceStr:",t)}}parseBulletSelectionsLineGroup(t){try{this.bulletSelectionsLineGroup=JSON.parse(t||"[]")}catch(t){console.error("Failed to parse bulletSelectionsLineGroupStr:",t)}}connectedCallback(){this.boundMessageHandler=this.messageHandler.bind(this),window.addEventListener("message",this.boundMessageHandler)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe(),this.boundMessageHandler&&window.removeEventListener("message",this.boundMessageHandler)}messageHandler(){}componentWillLoad(){qt(this.translationUrl),this.parseTicketDataSource(this.ticketDataSourceStr),this.parseBulletSelectionsLineGroup(this.bulletSelectionsLineGroupStr)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}handleClearAll(){this.clearAll.emit()}bulletGroupUpdateSelectionHandler(t){t.stopPropagation();const{newSelectedBulletTexts:e,selectionGroupId:i}=t.detail;if(!i)return void console.error("Miss selectionGroupId");const o=i.split(this.bulletTextsSplitToken);if(2!==o.length)return void console.error("Invalid selectionGroupId format:",i);const[n,r]=o;this.selectionChangeHandler.emit({newSelections:e.split(this.bulletTextsSplitToken),matchId:r,boardId:n})}prevPage(){this.swapCard("prev",(()=>{this.pageChange.emit({newPage:this.currentPage-1})}))}nextPage(){this.swapCard("next",(()=>{this.pageChange.emit({newPage:this.currentPage+1})}))}handleAddLine(){this.swapCard("add",(()=>{this.addLine.emit()}))}handleRemoveLine(){this.removeLine.emit({boardId:this.currentPage-1,close:t=>{t&&this.swapCard("remove",t)}})}swapCard(t,e){const i=this.mainContainer;if(!i)return;if(Array.from(i.classList).some((t=>t.startsWith("card-out-")||t.startsWith("card-in-"))))return;const{out:o,in:n}={next:{out:"card-out-left",in:"card-in-left"},prev:{out:"card-out-right",in:"card-in-right"},remove:{out:"card-out-down",in:"card-in-right"},add:{out:"card-out-left",in:"card-in-up"}}[t];i.classList.add(o),i.addEventListener("animationend",(()=>{i.classList.remove(o),e();const t=this.mainContainer;t&&(t.classList.add(n),t.addEventListener("animationend",(()=>t.classList.remove(n)),{once:!0}))}),{once:!0})}renderLoading(){return e("div",{class:"loading-wrap"},e("section",{class:"dots-container"},e("div",{class:"dot"}),e("div",{class:"dot"}),e("div",{class:"dot"}),e("div",{class:"dot"}),e("div",{class:"dot"})))}renderErrorContent(){return e("p",null,Wt("error",this.language))}renderEmptyContent(){return e("div",{class:"LotteryTippingTicketBet__empty"},e("p",null,Wt("noData",this.language)))}renderPageFooter(){return this.totalPages<=1?null:e("div",null,e("div",{class:"border-line"}),e("div",{class:"LotteryTippingTicketBet__footer"},e("div",{class:"my-pagination flex justify-between"},e("span",null,Wt("lineInfo",this.language,{currentPage:this.currentPage,totalPages:this.totalPages})),e("div",{class:"flex gap-1"},e("button",{type:"button",class:"btn "+(1===this.currentPage?"disabled":""),onClick:()=>this.prevPage(),disabled:1===this.currentPage},e("span",{class:"icon",innerHTML:this.leftImage})),e("button",{type:"button",class:"btn "+(this.currentPage===this.totalPages?"disabled":""),onClick:()=>this.nextPage(),disabled:this.currentPage===this.totalPages},e("span",{class:"icon",innerHTML:this.rightImage}))))))}renderReadPrettyContent(){var t;return e("div",{class:"LotteryTippingTicketBet__main",ref:t=>this.mainContainer=t},e("div",{class:"table-scroll-wrapper"},e(Yt,{columns:this.columns,dataSource:(null===(t=this.ticketDataSource)||void 0===t?void 0:t.map(((t,e)=>Object.assign(Object.assign({},t),{index:e+1}))))||[],hideHead:!1,grid:!1,bordered:!1})),this.renderPageFooter())}renderDefaultContent(){var t;const i=this.totalPages<this.maxTotalPages&&this.currentPage===this.totalPages,o=this.totalPages>this.minTotalPages;return e("div",null,e("div",{class:"LotteryTippingTicketBet__tableToolbar flex justify-end gap-1"},this.showClearButton&&e("lottery-button",{class:{"LotteryTippingTicketBet__tableToolbar--item":!0,"mr-0":!(i||o)},text:Wt("clearAll",this.language),onClick:()=>this.handleClearAll(),variant:"text",clientStyling:this.clientStyling||""})),e("div",{class:"flex align-center LotteryTippingTicketBet__main",ref:t=>this.mainContainer=t},e("div",{class:"table-scroll-wrapper"},e(Yt,{columns:this.columns,dataSource:(null===(t=this.ticketDataSource)||void 0===t?void 0:t.map(((t,e)=>Object.assign(Object.assign({},t),{index:e+1}))))||[],hideHead:!1,grid:!1,bordered:!1})),(i||o)&&e("div",{class:"LotteryTippingTicketBet__lineOperatorGroup"},i&&e("button",{type:"button",class:{"LotteryTippingTicketBet__lineOperatorGroup--item":!0},onClick:()=>this.handleAddLine()},e("span",{class:"icon",innerHTML:this.addImage})),o&&e("button",{type:"button",class:{"LotteryTippingTicketBet__lineOperatorGroup--item":!0},onClick:()=>this.handleRemoveLine()},e("span",{class:"icon",innerHTML:this.deleteImage})))),this.renderPageFooter())}render(){let t;return t=this.betIsLoading?this.renderLoading():this.betHasErrors?this.renderErrorContent():0===this.ticketDataSource.length?this.renderEmptyContent():this.readPretty?this.renderReadPrettyContent():this.renderDefaultContent(),e("div",{key:"425f7f3d185616af3189857a9159868e3c57f100",ref:t=>this.stylingContainer=t,class:"LotteryTippingTicketBet__container"},t)}static get watchers(){return{translationUrl:["handleNewTranslations"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],ticketDataSourceStr:["parseTicketDataSource"],bulletSelectionsLineGroupStr:["parseBulletSelectionsLineGroup"]}}};Xt.style=":host {\n --lottery-button-border-radius: 16px;\n}\n\n.LotteryTippingTicketBet__container {\n display: block; /* Or inline-block, depending on desired layout flow */\n font-size: 14px;\n padding: 12px;\n border: 1px solid var(--emw--color-gray-100, #e6e6e6);\n border-radius: var(--emw--button-border-radius, 4px);\n line-height: 1.5715;\n color: var(--emw--color-typography, #000);\n background: var(--emw--color-background, #fff);\n overflow: hidden;\n min-width: 300px;\n container-type: inline-size;\n}\n@container (max-width: 375px) {\n .LotteryTippingTicketBet__container {\n font-size: 12px;\n }\n}\n\n.table-wrapper {\n overflow-x: auto; /* Handle horizontal scroll if content overflows */\n}\n\n.LotteryTippingTicketBet__main {\n overflow: hidden;\n}\n\n.table-scroll-wrapper {\n overflow-x: auto;\n flex-grow: 1;\n min-width: 0;\n}\n\n.my-table-component {\n width: 100%;\n border-collapse: collapse; /* Important for borders */\n text-align: left;\n border-radius: 0.1rem; /* Ant Design like subtle rounding */\n border-spacing: 0;\n}\n\n/* Header */\n.my-table-component th {\n background: var(--emw--color-background-secondary, #f5f5f5);\n color: var(--emw--color-typography, #000);\n font-weight: 500;\n padding: 0.4rem 0.5rem;\n transition: background 0.3s ease;\n}\n@container (max-width: 400px) {\n .my-table-component th {\n padding: 0.3rem 0.3rem;\n }\n}\n\n/* Cells */\n.my-table-component td {\n padding: 0.4rem 0.5rem;\n color: var(--emw--color-typography, #000);\n background: var(--emw--color-background, #fff);\n transition: background 0.3s;\n}\n@container (max-width: 400px) {\n .my-table-component td {\n padding: 0.3rem 0.3rem;\n }\n}\n\n.my-table-component th:nth-child(1),\n.my-table-component td:nth-child(1) {\n /* index */\n min-width: 10px;\n}\n.my-table-component th:nth-child(3),\n.my-table-component td:nth-child(3) {\n /* startTime */\n min-width: 60px;\n}\n.my-table-component th:nth-child(4),\n.my-table-component td:nth-child(4) {\n /* results */\n min-width: 120px;\n}\n\n.my-table-component.bordered th,\n.my-table-component.bordered td {\n border-bottom: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n/* Bordered style */\n.my-table-component.grid th,\n.my-table-component.grid td {\n border: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n.my-table-component.grid th {\n border-bottom-width: 1px; /* Ensure bottom border is consistent */\n}\n\n.my-table-component.grid {\n border: 1px solid var(--emw--color-gray-100, #e6e6e6); /* Outer border */\n border-right-width: 0;\n border-bottom-width: 0;\n}\n\n.my-table-component.grid th:last-child,\n.my-table-component.grid td:last-child {\n border-right: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n.my-table-component.grid tr:last-child td {\n border-bottom: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n/* Striped style */\n.my-table-component.striped tbody tr:nth-child(even) td {\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n}\n\n/* Hover (optional, but nice) */\n.my-table-component tbody tr:hover td {\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n}\n\n.flex {\n display: flex;\n}\n\n.justify-end {\n justify-content: flex-end;\n}\n\n.gap-1 {\n gap: 4px;\n}\n\n.justify-between {\n justify-content: space-between;\n}\n\n.align-center {\n align-items: center;\n}\n\n.gap-1 {\n gap: 0.5rem;\n}\n\n.btn {\n color: var(--emw--color-typography, #000);\n background: var(--emw--color-background, #fff);\n font-size: 14px;\n transition: all 0.2s ease;\n}\n.btn:hover {\n cursor: pointer;\n}\n\n.btn:hover {\n background-color: var(--emw--color-gray-100, #e6e6e6);\n}\n\n.btn.disabled {\n opacity: 0.5;\n pointer-events: none;\n}\n.btn.disabled:hover {\n cursor: not-allowed !important;\n}\n\n.LotteryTippingTicketBet__tableToolbar {\n width: 100%;\n margin-bottom: 1rem;\n}\n\n.LotteryTippingTicketBet__tableToolbar--item {\n margin-right: 2rem;\n}\n.LotteryTippingTicketBet__tableToolbar--item.mr-0 {\n margin-right: 0rem !important;\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup {\n flex-basis: 2rem;\n display: flex;\n flex-direction: column;\n gap: 1rem;\n border-radius: 8px;\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup--item {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 2rem;\n height: 2rem;\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n color: var(--emw--color-typography, #000);\n border-radius: 8px;\n border: none;\n transition: all 0.2s ease-in-out;\n cursor: pointer;\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup--item:hover {\n transform: scale(1.1);\n box-shadow: 0 6px 14px var(--emw-calender-curday-box-shadow, rgba(0, 0, 0, 0.09));\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup--item .icon {\n width: 20px;\n height: 20px;\n transition: filter 0.2s ease-in-out;\n filter: grayscale(0.3);\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup--item:hover .icon {\n filter: grayscale(0);\n transform: rotate(3deg);\n}\n\ndiv.border-line {\n margin-top: 1rem;\n height: 1px;\n width: 100%;\n box-sizing: border-box;\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n transition: all 0.3s ease;\n}\n\n.LotteryTippingTicketBet__footer {\n padding: 0.5rem;\n}\n\n.my-pagination {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 1rem;\n font-size: 0.8rem;\n color: var(--emw--color-typography-secondary, #333);\n}\n\n.my-pagination span {\n font-weight: 500;\n user-select: none;\n}\n\n.my-pagination .btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n border-radius: 50%;\n border: none;\n transition: all 0.3s ease;\n cursor: pointer;\n opacity: 0.9;\n color: var(--emw--color-typography, #000);\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n}\n\n.my-pagination .btn .icon {\n width: 20px;\n height: 20px;\n transition: transform 0.2s ease;\n}\n\n.my-pagination .btn:hover {\n transform: scale(1.1);\n box-shadow: 0 6px 14px var(--emw-calender-curday-box-shadow, rgba(0, 0, 0, 0.09));\n}\n\n.my-pagination .btn.disabled {\n background-color: var(--emw--color-background-tertiary, #ccc);\n cursor: not-allowed;\n opacity: 0.5;\n transform: scale(1);\n}\n\n.match-info-item {\n display: flex;\n}\n\n.match-info-item-label {\n margin-right: 6px;\n}\n\n.info-icon:hover {\n cursor: pointer;\n}\n\n.LotteryTippingTicketBet__empty p {\n text-align: center;\n}\n\n.no-wrap {\n white-space: nowrap;\n overflow: hidden;\n}\n\n.eventNameContainer__item--title {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 300px;\n}\n@container (max-width: 600px) {\n .eventNameContainer__item--title {\n max-width: 180px;\n }\n}\n@container (max-width: 500px) {\n .eventNameContainer__item--title {\n max-width: 150px;\n }\n}\n@container (max-width: 400px) {\n .eventNameContainer__item--title {\n max-width: 100px;\n }\n}\n@container (max-width: 330px) {\n .eventNameContainer__item--title {\n max-width: 70px;\n }\n}\n\n.LotteryTippingTicketBet__main {\n perspective: 800px;\n will-change: transform, opacity;\n}\n\n@container (max-width: 520px) {\n .LotteryTippingTicketBet__main {\n flex-wrap: wrap;\n justify-content: center;\n }\n .LotteryTippingTicketBet__tableToolbar--item {\n margin-right: 0 !important;\n }\n}\n/* Fade-In Keyframes */\n@keyframes fadeInLeft {\n from {\n opacity: 0;\n transform: translateX(100%);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n/* Fade-Out Keyframes */\n@keyframes fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n@keyframes fadeInRight {\n from {\n opacity: 0;\n transform: translateX(-100%);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n@keyframes fadeInUp {\n from {\n opacity: 0;\n transform: translateY(100%);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n@-webkit-keyframes slide-left {\n 0% {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n }\n 100% {\n -webkit-transform: translateX(-100px);\n transform: translateX(-100px);\n }\n}\n@keyframes slide-left {\n 0% {\n -webkit-transform: translateX(100%);\n transform: translateX(100%);\n }\n 100% {\n -webkit-transform: translateX(0px);\n transform: translateX(0px);\n }\n}\n@-webkit-keyframes slide-right {\n 0% {\n -webkit-transform: translateX(-100%);\n transform: translateX(-100%);\n }\n 100% {\n -webkit-transform: translateX(0px);\n transform: translateX(0px);\n }\n}\n@keyframes slide-right {\n 0% {\n -webkit-transform: translateX(-100px);\n transform: translateX(-100px);\n }\n 100% {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n }\n}\n@-webkit-keyframes slide-top {\n 0% {\n -webkit-transform: translateY(-100px);\n transform: translateY(-100px);\n }\n 100% {\n -webkit-transform: translateY(0px);\n transform: translateY(0px);\n }\n}\n@keyframes slide-top {\n 0% {\n -webkit-transform: translateY(-100px);\n transform: translateY(-100px);\n }\n 100% {\n -webkit-transform: translateY(0px);\n transform: translateY(0px);\n }\n}\n/* Apply to your card classes */\n.card-in-left {\n -webkit-animation: slide-left 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n animation: slide-left 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n}\n\n.card-out-left {\n animation: fadeOut 0.2s ease-out both;\n}\n\n.card-in-right {\n -webkit-animation: slide-right 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n animation: slide-right 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n}\n\n.card-out-right {\n animation: fadeOut 0.2s ease-out both;\n}\n\n.card-in-up {\n -webkit-animation: slide-top 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n animation: slide-top 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n}\n\n.card-out-down {\n animation: fadeOut 0.2s ease-out both;\n}\n\n.loading-wrap {\n margin: 20px 0;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 40vh;\n}\n.loading-wrap .dots-container {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n}\n.loading-wrap .dot {\n height: 14px;\n width: 14px;\n margin-right: 14px;\n border-radius: 14px;\n background-color: var(--emw--color-gray-300, #333);\n animation: pulse 1.5s infinite ease-in-out;\n}\n.loading-wrap .dot:last-child {\n margin-right: 0;\n}\n.loading-wrap .dot:nth-child(1) {\n animation-delay: -0.3s;\n}\n.loading-wrap .dot:nth-child(2) {\n animation-delay: -0.1s;\n}\n.loading-wrap .dot:nth-child(3) {\n animation-delay: 0.1s;\n}\n@keyframes pulse {\n 0% {\n transform: scale(0.8);\n background-color: var(--emw--color-gray-300, #333);\n }\n 50% {\n transform: scale(1.2);\n background-color: var(--emw--color-gray-100, #e6e6e6);\n }\n 100% {\n transform: scale(0.8);\n background-color: var(--emw--color-gray-150, #6f6f6f);\n }\n}\n\n.lottery-selection-group-table-header .lottery-selection__button {\n border: none;\n background: none;\n}";const Jt=class{constructor(e){t(this,e),this.lotteryTippingBulletToggleEvent=o(this,"lotteryTippingBulletToggle",7),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.positionIdx=void 0,this.theme="default",this.value="",this.disabled=!1,this.isSelected=!1}handleClientStylingChange(t,e){t!=e&&r(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`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}handleClick(){this.disabled||this.lotteryTippingBulletToggleEvent.emit({positionIdx:this.positionIdx})}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return e("div",{key:"ef0fee38ed62adb7809b5a60668af6a499ebe5a6",ref:t=>this.stylingContainer=t},"text"===this.theme?e("div",{class:{LotteryTippingBullet__segment:!0,"LotteryTippingBullet__segment--text":!0}},this.value):e("button",{class:{LotteryTippingBullet__segment:!0,"LotteryTippingBullet__segment--disabled":this.disabled,"LotteryTippingBullet__segment--active":this.isSelected},onClick:this.handleClick.bind(this)},this.isSelected?"X":this.value))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};Jt.style=".LotteryTippingBullet__segment{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;font-size:16px;line-height:1;font-weight:500;color:var(--emw--color-typography, #000);background:var(--emw--color-background, #fff);border:1px solid var(--emw--color-gray-100, #e6e6e6);border-radius:6px;cursor:pointer;transition:all 0.2s ease;user-select:none}.LotteryTippingBullet__segment:not(.LotteryTippingBullet__segment--disabled):hover{cursor:pointer;animation:jelly 0.3s ease-in-out;transform:scale(1.02)}.LotteryTippingBullet__segment--text{border:none;color:var(--emw--color-typography, #000);background:transparent;font-weight:400}.LotteryTippingBullet__segment--text:hover{cursor:not-allowed !important}.LotteryTippingBullet__segment--active{font-weight:600;background-color:var(--emw--color-background-inverse, #000);color:var(--emw--color-primary, #fed275)}.LotteryTippingBullet__segment--disabled:not(.LotteryTippingBullet__segment--active){background-color:var(--emw--color-background-tertiary, #ccc);color:var(--emw--color-gray-150, #6f6f6f);border-color:var(--emw--color-gray-100, #e6e6e6)}.LotteryTippingBullet__segment--disabled:hover{cursor:not-allowed}@keyframes jelly{0%{transform:translate(0, 0)}20%{transform:translate(-0.5px, -0.5px)}40%{transform:translate(0.5px, 0.5px)}60%{transform:translate(-0.25px, -0.25px)}80%{transform:translate(0.25px, 0.25px)}100%{transform:translate(0, 0)}}";const Kt=class{constructor(e){t(this,e),this.lotteryTippingBulletGroupToggleEvent=o(this,"lotteryTippingBulletGroupToggle",7),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.positionIdx=void 0,this.theme="default",this.mode="single",this.bulletConfigContent=""}get bulletConfigArr(){const t=[{value:"1"},{value:"X"},{value:"2"}];if("string"!=typeof this.bulletConfigContent||!this.bulletConfigContent)return t;try{return JSON.parse(this.bulletConfigContent)}catch(e){return console.error("Error parsing bulletConfigContent:",e),t}}handleClientStylingChange(t,e){t!=e&&r(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`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}lotteryTippingBulletSelectionHandler(t){const{positionIdx:e}=t.detail;this.handleToggle(e)}handleToggle(t){let e=[...this.bulletConfigArr];"single"===this.mode?(e=e.map((t=>Object.assign(Object.assign({},t),{isSelected:!1}))),e[t].isSelected=!0):(e=e.map((t=>Object.assign({},t))),e[t].isSelected=!e[t].isSelected),this.lotteryTippingBulletGroupToggleEvent.emit({bulletConfigArr:e,positionIdx:this.positionIdx+"-"+t})}render(){var t;return e("div",{ref:t=>this.stylingContainer=t,key:this.positionIdx},e("div",{key:"68223022eed831932c571378164be913206d98e9",style:{display:"flex",flexDirection:"row",gap:"10px"}},null===(t=this.bulletConfigArr)||void 0===t?void 0:t.map(((t,i)=>e("div",{key:i},e("lottery-tipping-bullet",{value:t.value,isSelected:t.isSelected,"position-idx":i,disabled:t.disabled,theme:this.theme,clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,mbSource:this.mbSource}))))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};Kt.style="";const Zt=["ro","en","fr","ar","hr"],Qt={en:{cancel:"Cancel",confirm:"Confirm"},ro:{cancel:"Anulează",confirm:"Confirmă"},fr:{cancel:"Annuler",confirm:"Confirmer"},ar:{cancel:"إلغاء",confirm:"تأكيد"},hr:{cancel:"Odustani",confirm:"Potvrdi"}},te=(t,e)=>{const i=e;return Qt[void 0!==i&&Zt.includes(i)?i:"en"][t]},ee=class{constructor(e){t(this,e),this.open=o(this,"open",7),this.close=o(this,"close",7),this.confirm=o(this,"confirm",7),this.cancel=o(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,this.confirmLoading=!1}handleClientStylingChange(t,e){t!=e&&r(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`,this.stylingSubscription)}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 o=await i.json();e=o,Object.keys(e).forEach((t=>{for(let i in e[t])Qt[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":""],o=["mask",this.visible?"mask-enter":"mask-leave"],n=["dialog",this.visible?"dialog-enter":"dialog-leave",this.fullscreen?"fullscreen":"",this.dialogClass].filter(Boolean).join(" ");return e("div",{key:"05dd671f10bdebda6f138e8f8039f4bc0533fe98",class:i.join(" "),ref:t=>this.stylingContainer=t},e("div",{key:"6e814e02770149de5495617039750461fc0a42d1",class:o.join(" "),onClick:this.handleMaskClick.bind(this)}),e("div",{key:"4cbc5db20317ef1b0808fc4a91a53fa8b86c5f4f",part:"dialog",class:n,style:t,role:"dialog","aria-modal":"true","aria-labelledby":"dialog-title"},(this.dialogTitle||this.closable)&&e("div",{key:"85dc705676a37e6ea2828a7b683fc54b0eb77d17",class:"dialog-header"},e("h2",{key:"85b7472d2b72801dfae19a24fc2018f3c1f1529a",id:"dialog-title",class:"dialog-title"},this.dialogTitle),this.closable&&e("button",{key:"8089aaecfe511558055ee9f64214ff97030eb2a9",class:"close-btn",onClick:this.handleClose.bind(this)},"x")),e("div",{key:"776255540f30d757caa3fcaee747c79ac638ae76",class:"dialog-content",style:{maxHeight:"calc(100vh - 62px)",overflowY:"auto"}},e("slot",{key:"5ef964615b6ab70a9e561f8efac8fe952fe47b4e"})),this.showFooter&&e("div",{key:"8927a0991d916caf7852d58db996b9818687da30",class:"dialog-footer"},e("slot",{key:"84de0306994ec62220ae30fa2881dadbae5544ea",name:"footer"},this.showCancelBtn&&e("button",{key:"ee87b8c3918c1f4d007923a2498142b3af2740a0",class:"cancel-btn",onClick:this.handleClose.bind(this)},te("cancel",this.language)),e("button",{key:"935cff86381b21fff07c2d4156b29779c50e5ce3",class:"confirm-btn",onClick:this.handleConfirm.bind(this),disabled:this.confirmLoading},this.confirmLoading?e("div",{class:"Loading",innerHTML:Et(It,{extraSVGAttrs:{width:"20px",height:"20px",fill:"currentColor"}})}):te("confirm",this.language))))))}get el(){return i(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};ee.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:var(--emw--color-mask-dialog-background, 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 var(--emw--button-box-shadow-color-secondary, 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;min-width:60px;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)}}";var ie=Object.defineProperty,oe=Object.defineProperties,ne=Object.getOwnPropertyDescriptors,re=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,ae=Object.prototype.propertyIsEnumerable,le=(t,e,i)=>e in t?ie(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,he=(t,e)=>{for(var i in e||(e={}))se.call(e,i)&&le(t,i,e[i]);if(re)for(var i of re(e))ae.call(e,i)&&le(t,i,e[i]);return t},ce=(t,e)=>oe(t,ne(e)),de=(t,e,i)=>le(t,"symbol"!=typeof e?e+"":e,i),ue=(t,e,i)=>new Promise(((o,n)=>{var r=t=>{try{a(i.next(t))}catch(t){n(t)}},s=t=>{try{a(i.throw(t))}catch(t){n(t)}},a=t=>t.done?o(t.value):Promise.resolve(t.value).then(r,s);a((i=i.apply(t,e)).next())}))
2
2
  /**
3
3
  * @license
4
4
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/lottery-tipping-page",
3
- "version": "1.99.57",
3
+ "version": "1.99.59",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",