@everymatrix/lottery-oddsbom-ticket-history 0.7.27 → 0.7.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import{r as t,c as e,h as i,g as s,a as o}from"./index-e66667d7.js";import{s as r,a as n,b as a,r as l,t as h,c as d,i as c,D as u,g as p,d as m,f as v,e as f,h as b,j as g,p as y}from"./lottery-oddsbom-ticket-history-24c1aa1b.js";export{L as lottery_oddsbom_ticket_history}from"./lottery-oddsbom-ticket-history-24c1aa1b.js";var w=Object.defineProperty,x=Object.defineProperties,_=Object.getOwnPropertyDescriptors,k=Object.getOwnPropertySymbols,C=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable,A=(t,e,i)=>e in t?w(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,z=(t,e)=>{for(var i in e||(e={}))C.call(e,i)&&A(t,i,e[i]);if(k)for(var i of k(e))S.call(e,i)&&A(t,i,e[i]);return t},I=(t,e)=>x(t,_(e)),T=(t,e,i)=>(A(t,"symbol"!=typeof e?e+"":e,i),i),D=(t,e,i)=>new Promise(((s,o)=>{var r=t=>{try{a(i.next(t))}catch(t){o(t)}},n=t=>{try{a(i.throw(t))}catch(t){o(t)}},a=t=>t.done?s(t.value):Promise.resolve(t.value).then(r,n);a((i=i.apply(t,e)).next())}))
1
+ import{r as t,c as e,h as i,g as s,a as o}from"./index-e66667d7.js";import{s as r,a as n,b as a,r as l,t as h,c as d,i as c,D as u,g as p,d as m,f as v,e as f,h as b,j as g,p as y}from"./lottery-oddsbom-ticket-history-ba01bfe1.js";export{L as lottery_oddsbom_ticket_history}from"./lottery-oddsbom-ticket-history-ba01bfe1.js";var w=Object.defineProperty,x=Object.defineProperties,_=Object.getOwnPropertyDescriptors,k=Object.getOwnPropertySymbols,C=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable,A=(t,e,i)=>e in t?w(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,z=(t,e)=>{for(var i in e||(e={}))C.call(e,i)&&A(t,i,e[i]);if(k)for(var i of k(e))S.call(e,i)&&A(t,i,e[i]);return t},I=(t,e)=>x(t,_(e)),T=(t,e,i)=>(A(t,"symbol"!=typeof e?e+"":e,i),i),D=(t,e,i)=>new Promise(((s,o)=>{var r=t=>{try{a(i.next(t))}catch(t){o(t)}},n=t=>{try{a(i.throw(t))}catch(t){o(t)}},a=t=>t.done?s(t.value):Promise.resolve(t.value).then(r,n);a((i=i.apply(t,e)).next())}))
2
2
  /**
3
3
  * @license
4
4
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
@@ -6654,4 +6654,4 @@ Qt("vaadin-tabs",F`
6654
6654
  </div>
6655
6655
 
6656
6656
  <div on-click="_scrollForward" part="forward-button" aria-hidden="true"></div>
6657
- `}static get is(){return"vaadin-tabs"}}O(Ol);const El=class{constructor(i){t(this,i),this.handleFilter=e(this,"filterChange",7),this.handleTicketType=t=>{t.detail&&t.detail.length&&(this.filterParams.wagerType=t.detail)},this.handleFilterFrom=t=>{var e,i;const s=null===(i=null===(e=t.target)||void 0===e?void 0:e.value)||void 0===i?void 0:i.split("-");if(3===s.length){const[t,e,i]=s;this.filterParams.from=new Date(Date.UTC(Number(t),Number(e)-1,Number(i),0,0,0)).toISOString(),this.minTo=`${t}-${e}-${i}`}},this.handleFilterTo=t=>{var e,i;const s=null===(i=null===(e=t.target)||void 0===e?void 0:e.value)||void 0===i?void 0:i.split("-");if(3===s.length){const[t,e,i]=s;this.filterParams.to=new Date(Date.UTC(Number(t),Number(e)-1,Number(i),23,59,59)).toISOString(),this.maxFrom=`${t}-${e}-${i}`}},this.validateOnSubmit=()=>{const{from:t,to:e}=this.filterParams;return t&&!e||!t&&e?(this.invalid={from:!t,to:!e},Promise.reject()):(this.invalid={from:!1,to:!1},Promise.resolve())},this.handleTicketIdInput=t=>{this.filterParams.id=t.target.value},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.statusOptions=void 0,this.ticketTypeList=void 0,this.filterParams={},this.isOpen=!1,this.invalid={from:!1,to:!1},this.maxFrom="",this.minTo=""}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&n(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&&n(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentWillLoad(){l(this.translationUrl),this.statusOptions=[{label:h("settled",this.language),value:"Settled"},{label:h("purchased",this.language),value:"Purchased"},{label:h("canceled",this.language),value:"Canceled"}],this.ticketTypeList=[{label:h("normal",this.language),value:"NORMAL"},{label:h("subscription",this.language),value:"SUBSCRIPTION"}]}resetSearch(){this.filterParams={},this.comboBox.clear(),this.handleFilter.emit(this.filterParams)}handleOpen(){this.isOpen=!0}handleDialogConfirm(){this.validateOnSubmit().then((()=>{this.handleFilter.emit(this.filterParams),this.isOpen=!1}))}handleSelectStatus(t){this.filterParams.state=t,this.filterParams=Object.assign({},this.filterParams),this.handleFilter.emit(this.filterParams)}renderFilterLeft(){return i("div",{class:"filter-status"},this.statusOptions.map((t=>i("div",{class:"filter-status-btn"+(this.filterParams.state===t.value?" active":""),onClick:this.handleSelectStatus.bind(this,t.value)},t.label))))}renderFilterContent(){return i("div",{class:"dialog-content"},i("div",{class:"filter-item"},i("div",{class:"filter-item-label"},h("searchByTicketId",this.language)),i("div",{class:"filter-item-val"},i("vaadin-text-field",{placeholder:h("enterTicketId",this.language),value:this.filterParams.id,onInput:this.handleTicketIdInput.bind(this)}))),i("div",{class:"filter-item"},i("div",{class:"filter-item-label"},h("searchByTicketType",this.language)),i("div",{class:"general-multi-select-container"},i("general-multi-select",{ref:t=>this.comboBox=t,placeholder:h("selectTicketType",this.language),"max-visible-chips":"2",options:this.ticketTypeList.map((t=>({text:t.label,value:t.value}))),onChange:this.handleTicketType.bind(this),"client-styling":this.clientStyling,"client-styling-Url":this.clientStylingUrl,"mb-source":this.mbSource}))),i("div",{class:"filter-item"},i("div",{class:"filter-item-label"},h("searchByDate",this.language)),i("div",{class:"filter-item-val"},i("vaadin-date-picker",{value:this.filterParams.from,max:this.maxFrom,onChange:this.handleFilterFrom.bind(this),placeholder:h("from",this.language),ref:t=>d(t),class:"VaadinDatePicker",invalid:this.invalid.from,"error-message":h("pleaseSelectADate",this.language)}),i("vaadin-date-picker",{value:this.filterParams.to,min:this.minTo,onChange:this.handleFilterTo.bind(this),placeholder:h("to",this.language),ref:t=>d(t),class:"VaadinDatePicker",invalid:this.invalid.to,"error-message":h("pleaseSelectADate",this.language)}))))}render(){return i("div",{key:"0e7d77068c53724b6d90833559d287841312f918",class:"filter-wrap",ref:t=>this.stylingContainer=t},this.renderFilterLeft(),i("div",{key:"4a5cf9cc96422b5b4a152d8308b9c1e3e6033f8c",class:"filter-operation"},i("div",{key:"87885e1bb9238f1e6ef2049d9899b4f7091ca2c9",class:"lottery-tipping-filter"},i("div",{key:"0ae6c91ba3621ee6fe3897276a43147198d1dd27",class:"operate-btns"},i("div",{key:"98ddfd9907685a2e16ca8074abe1c8c74d06551e",class:"operate-btn",onClick:this.handleOpen.bind(this)},h("filter",this.language)),i("div",{key:"4c05e4c3c7a01472de6a86069f5d0feb7ebd473f",class:"operate-btn",onClick:this.resetSearch.bind(this)},h("clear",this.language))),i("lottery-tipping-dialog",{key:"91f85110aa3f30556098e338c9b66b0a419aa460","dialog-title":h("filter",this.language),visible:this.isOpen,onCancel:()=>{this.isOpen=!1},onConfirm:this.handleDialogConfirm.bind(this),animationDuration:300,language:this.language,"translation-url":this.translationUrl},this.renderFilterContent()))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};El.style=".filter-wrap {\n margin-bottom: 20px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n container-type: inline-size;\n container-type: inline-size;\n}\n\n.filter-wrap .filter-status {\n display: flex;\n gap: 12px;\n align-items: center;\n}\n\n.filter-wrap .filter-status-btn {\n background: var(--emw--color-background, #fff);\n border: 1px solid var(--emw--color-primary, #0d196e);\n color: var(--emw--color-typography, #000);\n border-radius: 6px;\n padding: 12px;\n font-size: 13px;\n text-transform: uppercase;\n font-weight: 500;\n cursor: pointer;\n transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;\n}\n\n.filter-wrap .filter-status-btn:hover {\n background-color: var(--emw--color-secondary, #1367e7);\n}\n\n.filter-wrap .filter-status-btn.active {\n background: var(--emw--color-secondary, #1367e7);\n color: var(--emw--color-typography-reverse, #fff);\n}\n\n@container (max-width: 480px) {\n .filter-wrap {\n flex-direction: column;\n align-items: flex-start;\n gap: 10px;\n }\n .filter-wrap .filter-status {\n flex-wrap: wrap;\n gap: 8px;\n }\n .filter-wrap .filter-status-btn {\n padding: 6px 10px;\n font-size: 12px;\n }\n}\n.lottery-tipping-filter .operate-btns {\n display: flex;\n gap: 12px;\n}\n\n.lottery-tipping-filter .operate-btn {\n background: var(--emw--color-primary, #0d196e);\n border-radius: 20px;\n padding: 8px 16px;\n font-size: 14px;\n color: var(--emw--color-typography-normalized, #fff);\n font-weight: 600;\n cursor: pointer;\n transition: background 0.2s ease, border-color 0.2s ease;\n}\n\n.lottery-tipping-filter .operate-btn:hover {\n background: var(--emw--color-secondary, #1367e7);\n}\n\n.dialog-content {\n display: flex;\n flex-direction: column;\n align-items: center;\n color: var(--emw--color-typography, #000);\n}\n.dialog-content .filter-item {\n margin-bottom: 12px;\n}\n.dialog-content .filter-item-label {\n text-align: center;\n}\n.dialog-content .filter-item-val {\n display: flex;\n flex-wrap: wrap;\n gap: 12px;\n justify-content: center;\n}\n\n@container (max-width: 480px) {\n .lottery-tipping-filter .operate-btns {\n gap: 6px;\n flex-wrap: wrap;\n }\n .lottery-tipping-filter .operate-btn {\n padding: 6px 12px;\n font-size: 13px;\n }\n}";const Bl=class{constructor(i){t(this,i),this.change=e(this,"change",7),this.handleOutsideClick=t=>{t.composedPath().includes(this.el)||(this.dropdownOpen=!1,this.overflowOpen=!1)},this.toggleDropdown=t=>{t.stopPropagation(),this.dropdownOpen=!this.dropdownOpen,this.overflowOpen=!1},this.isSelected=t=>this.selectedValues.includes(t),this.selectItem=t=>{this.isSelected(t.value)||(this.selectedValues=[...this.selectedValues,t.value],this.change.emit(this.selectedValues))},this.toggleItem=t=>{this.isSelected(t.value)?this.removeItem(t.value):this.selectItem(t)},this.removeItem=(t,e)=>{e&&e.stopPropagation(),this.selectedValues=this.selectedValues.filter((e=>e!==t)),this.change.emit(this.selectedValues)},this.downIcon=s("../static/dropdown.svg"),this.upIcon=s("../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&&n(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&&n(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 i("div",{key:"50b48397be3ede1907ab2c2abcd1cf2f43f69c13",class:"general-multi-select-container",ref:t=>this.stylingContainer=t},i("div",{key:"696a1bb1f221f8f5cf290fac040af10e2e5a115e",class:"multi-select-container",ref:t=>this.el=t},i("div",{key:"9ea92f01787b26d43054573a11896cf65065b073",class:"flex-row",onClick:this.toggleDropdown},i("div",{key:"f79720ca3ec383ee7f95b09483698ee18119c79a",class:"control"},this.visibleChips.map((t=>i("span",{class:"chip"},i("div",{class:"chip-text",title:t.text},t.text),i("div",{class:"remove-btn",onClick:e=>this.removeItem(t.value,e)},"×")))),this.hiddenChips.length>0&&i("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&&i("span",{key:"b061de660a55f7a0d41ce9aa650108d3f38a9dc0",class:"placeholder"},this.placeholder)),i("div",{key:"f83b6517e88b3976cdc18590f8f1233cb2515230",class:"arrow"},i("img",{key:"1b61a49090237057b98e5ce8a4f7c1e3bfc9d4ba",class:"info-icon",src:this.dropdownOpen?this.upIcon:this.downIcon,style:{width:"18px"}}))),this.dropdownOpen&&i("div",{key:"e5b081007bcbdd251ce5ac235c1f19f17852c420",class:"dropdown"},this.options.map((t=>i("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)&&i("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=>i("span",{class:"chip"},i("span",{class:"chip-text",title:t.text},t.text),i("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"]}}};Bl.style='.multi-select-container{position:relative;font-family:"Inter", sans-serif;margin-top:4px;width:100%}.flex-row{display:flex;flex-direction:row;align-items:center;flex-wrap:nowrap;padding:8px 12px;padding-right:4px;border-radius:4px;background:var(--emw-selector-color-background, #e8ebef);cursor:pointer}.control{flex:1;display:flex;align-items:center;flex-wrap:nowrap;overflow:hidden}.control:focus-within{border-color:var(--emw--color-primary, #fed275);box-shadow:0 0 0 2px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15))}.chip{display:inline-flex;align-items:center;background:var(--emw--color-gray-50, #f5f5f5);color:var(--emw--color-dialog-typography, #000);border-radius:4px;padding:2px 8px;margin-right:6px;font-size:0.875rem;line-height:1.2;justify-content:space-between;flex:0 1 auto;min-width:0}.chip-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.overflow-chip{background:var(--emw--color-gray-100, #e6e6e6);color:var(--emw--color-gray-300, #333);width:20px;text-align:center;display:block}.remove-btn{background:none;border:none;font-size:1rem;margin-left:6px;cursor:pointer;color:var(--emw--color-gray-150, #6f6f6f)}.remove-btn:hover{color:var(--emw--color-error, red)}.placeholder{color:var(--emw--color-gray-150, #6f6f6f);font-size:0.875rem;padding:3px 8px;line-height:1.2}.arrow{margin-left:auto;font-size:0.8rem;width:20px;color:var(--emw--color-gray-150, #6f6f6f)}.dropdown{position:absolute;top:calc(100% + 4px);left:0;width:100%;max-height:240px;overflow-y:auto;border:1px solid var(--emw--color-gray-100, #e6e6e6);border-radius:6px;background:var(--emw--color-dialog-background, #ffffff);box-shadow:0 4px 12px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15));z-index:10}.dropdown-item{padding:10px 14px;cursor:pointer;font-size:0.875rem;line-height:1.4;transition:background 0.2s}.dropdown-item:hover{background:var(--emw--color-background-tertiary, #ccc);color:var(--emw--color-typography, #000)}.dropdown-item.selected{background:var(--emw--color-background-secondary, #f5f5f5);color:var(--emw--color-typography, #000);font-weight:500}.overflow-popover{position:absolute;top:var(--overflow-top, 0px);left:var(--overflow-left, 0px);max-width:200px;padding:12px;display:flex;flex-wrap:wrap;gap:6px;border:1px solid var(--emw--color-gray-100, #d0d5dd);border-radius:6px;background:var(--emw--color-background, #ffffff);box-shadow:0 4px 12px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15));z-index:20}';const Ml=class{constructor(i){t(this,i),this.pageChange=e(this,"pageChange",7),this.pageSizeChange=e(this,"pageSizeChange",7),this.pageSizeOptions=[10,20,50],this.userAgent=window.navigator.userAgent,this.handleKeyDown=t=>{if("Enter"===t.key){const e=parseInt(t.target.value);isNaN(e)||this.goToPage(e)}},this.handleInput=t=>{const e=t.target;parseInt(e.value)>this.totalPages&&(e.value=this.totalPages.toString()),parseInt(e.value)<1&&(e.value="1")},this.handleSelectInput=t=>this.changePageSize(parseInt(t.target.value)),this.total=0,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.current=1,this.pageSize=10,this.totalPages=1}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&n(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&&n(this.stylingContainer,this.clientStylingUrl))}componentWillLoad(){l(this.translationUrl),this.pageSize=this.pageSizeOptions[0],this.updateTotalPages()}updateTotalPages(){this.totalPages=Math.max(Math.ceil(this.total/this.pageSize),1),this.current>this.totalPages&&(this.current=this.totalPages,this.pageChange.emit(this.current))}goToPage(t){t<1||t>this.totalPages||t===this.current||(this.current=t,this.pageChange.emit(t))}changePageSize(t){this.pageSize=t,this.pageSizeChange.emit(t),this.updateTotalPages(),this.goToPage(1)}getPagesToShow(){const t=[],e=c(this.userAgent)?1:2,{totalPages:i,current:s}=this;if(i<=7)for(let e=1;e<=i;e++)t.push({type:"page",value:e});else{t.push({type:"page",value:1}),s>e+2&&t.push({type:"jump",direction:"prev"});const o=Math.max(2,s-e),r=Math.min(i-1,s+e);for(let e=o;e<=r;e++)t.push({type:"page",value:e});s<i-e-1&&t.push({type:"jump",direction:"next"}),t.push({type:"page",value:i})}return t}jumpTo(t){this.goToPage("prev"===t?Math.max(1,this.current-5):Math.min(this.totalPages,this.current+5))}render(){if(!this.total)return null;const t=this.getPagesToShow();return i("div",{class:"paginator",ref:t=>this.stylingContainer=t},i("div",{class:"total-num"},h("totalItems",this.language,{total:this.total})),i("button",{class:"arrow-btn",disabled:this.current<=1,onClick:this.goToPage.bind(this,this.current-1)},"<"),t.map((t=>"page"===t.type?i("button",{class:{page:!0,active:this.current===t.value},onClick:this.goToPage.bind(this,t.value)},t.value):i("button",{class:"ellipsis",onClick:this.jumpTo.bind(this,t.direction)},"..."))),i("button",{class:"arrow-btn",disabled:this.current>=this.totalPages,onClick:this.goToPage.bind(this,this.current+1)},">"),i("select",{onInput:this.handleSelectInput},this.pageSizeOptions.map((t=>i("option",{value:t},t)))),i("div",{class:"jump-box"},h("goTo",this.language),i("input",{type:"number",min:"1",max:this.totalPages,value:this.current,onKeyDown:this.handleKeyDown.bind(this),onInput:this.handleInput.bind(this)})))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],total:["updateTotalPages"],pageSize:["updateTotalPages"]}}};Ml.style=".paginator{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}button{padding:4px 8px;font-size:14px;background:var(--emw--color-background, #fff);color:var(--emw--color-typography, #000);border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));border-radius:var(--emw--border-radius-small, 6px);cursor:pointer;min-width:28px;transition:all 0.2s ease}button.active{color:var(--emw--color-typography-normalized, #fff);background:var(--emw--color-primary, #0d196e);border-color:var(--emw--color-primary, #0d196e);font-weight:600}button:not(.arrow-btn):hover{background:var(--emw--color-secondary, #405c8b);border-color:var(--emw--color-secondary, #405c8b)}button:disabled{cursor:not-allowed;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));background:var(--emw--color-background-secondary, #f5f5f5);user-select:none}.ellipsis{font-weight:500;color:var(--emw--color-typography, #000);border:none}select{padding:6px 10px;border-radius:6px;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));font-size:14px}.jump-box{display:flex;align-items:center;gap:6px;margin-left:10px}.jump-box input{width:50px;padding:4px 8px;font-size:14px;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));border-radius:6px;text-align:center}.total-num{user-select:none;font-size:14px;color:var(--emw--color-typography, #000)}";var Pl=function(){return Pl=Object.assign||function(t){for(var e,i=1,s=arguments.length;i<s;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Pl.apply(this,arguments)},Nl={primaryColor:"#333",secondaryColor:"#E6E6E6"};function jl(t,e){if(void 0===e&&(e={}),"function"==typeof t.icon){var i=e.placeholders||Nl;return Fl(t.icon(i.primaryColor,i.secondaryColor),e)}return Fl(t.icon,e)}function Fl(t,e){var i="svg"===t.tag?Pl(Pl({},t.attrs),e.extraSVGAttrs||{}):t.attrs,s=Object.keys(i).reduce((function(t,e){var s=i[e],o="".concat(e,'="').concat(s,'"');return t.push(o),t}),[]),o=s.length?" "+s.join(" "):"",r=(t.children||[]).map((function(t){return Fl(t,e)})).join("");return r&&r.length?"<".concat(t.tag).concat(o,">").concat(r,"</").concat(t.tag,">"):"<".concat(t.tag).concat(o," />")}const $l=jl({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},{extraSVGAttrs:{width:"16px",height:"16px",fill:"currentColor"}}),Ll=class{constructor(i){t(this,i),this.handleActive=e(this,"active",7),this.togglePanel=()=>{this.expanded=!this.expanded,this.expanded&&this.handleActive.emit()},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.headerTitle=void 0,this.expanded=!1}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&n(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&&n(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return i("div",{key:"1f4a9acd322ebb2359295b2b760d235fedd76d41",class:"panel-container",ref:t=>this.stylingContainer=t},i("div",{key:"04e4254aa554f2f9b6509ff323983d5b7ce6cd27",class:{"panel-header":!0,active:this.expanded},onClick:this.togglePanel},i("div",{key:"8907e3c309143a2d37eaf73edddc2826f9e002d8",class:"header-content"},i("slot",{key:"0e2ed65db1fb3c8bc3987c969aca568a161fdd39",name:"header"},i("span",{key:"c476d5ccad0ef69376c415518982032e1d4ea737"},this.headerTitle))),i("span",{key:"705b87f6a01972f483bdea80cc3a4c4caff284d9",class:"arrow "+(this.expanded?"expanded":""),innerHTML:$l})),i("div",{key:"7704edb816e0c6300c62a5964d12a99d57c6b5a8",class:"panel-body "+(this.expanded?"open":"closed")},i("slot",{key:"92546bc7a9751c8f8717174eb5ff1771da73c7c0",name:"content"})))}get el(){return o(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};Ll.style=".panel-container{border:1px solid var(--emw--color-typography, #000);border-radius:12px;overflow:hidden;font-family:sans-serif;width:100%}.panel-header{background-color:var(--emw--color-background, #fff);padding:12px 16px;display:flex;align-items:center;justify-content:space-between;cursor:pointer;font-size:14px;color:var(--emw--color-typography, #000)}.panel-header:hover{background-color:var(--emw--color-primary, #0d196e);color:var(--emw--color-typography-normalized, #fff)}.panel-header.active{background-color:var(--emw--color-primary, #0d196e);color:var(--emw--color-typography-normalized, #fff)}.header-content{white-space:nowrap;user-select:none}.arrow{transition:transform 0.3s ease;font-size:16px;display:inline-flex}.arrow.expanded{transform:rotate(180deg)}.panel-body{overflow:hidden;max-height:0;transition:max-height 0.3s ease, padding 0.3s ease;background-color:var(--emw--color-background, #fff);padding:0 16px;font-size:14px;line-height:1.6}.panel-body.open{max-height:500px;padding:16px}.panel-body.closed{max-height:0;padding-top:0;padding-bottom:0}";const Rl=class{constructor(e){t(this,e),this.ticketTypeMap={NORMAL:"normal",SYNDICATE:"syndicate",SUBSCRIPTION:"subscription"},this.resultMap={[u.WON]:"win",[u.LOST]:"lose"},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.endpoint=void 0,this.gameId=void 0,this.defaultTicketHistory="",this.isLoading=!1,this.dialogVisible=!1,this.dialogData={},this.ticketHistory=[]}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&n(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&a(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}handleDefaultTicketHistoryChange(t,e){t!=e&&(this.ticketHistory=t?JSON.parse(t):[])}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&n(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}showTicketLineDetail(t){this.dialogData.draw=null,this.dialogData.ticket={gameId:t.vendorGameId,drawId:t.startingDrawId,results:p(t),splitView:!0},this.dialogVisible=!0}handleShowCurrentDraw(t,e){this.dialogData.ticket=null,this.dialogData.draw={gameId:t.vendorGameId,drawId:e.id,results:m(e),header:v(e.date),splitView:!1},this.dialogVisible=!0}renderLoading(){return i("div",{class:"loading-wrap"},i("section",{class:"dots-container"},i("div",{class:"dot"}),i("div",{class:"dot"}),i("div",{class:"dot"}),i("div",{class:"dot"}),i("div",{class:"dot"})))}renderEmpty(){return i("div",{class:"empty-wrap"},h("noData",this.language))}async handleActive(t,e){const i=await f({endpoint:this.endpoint,gameId:t.gameId,drawResults:t.drawResults});this.ticketHistory[e]=Object.assign(Object.assign({},this.ticketHistory[e]),{drawResults:i}),this.ticketHistory=[...this.ticketHistory]}renderSettledInfo(t){var e;return null===(e=t.drawResults)||void 0===e?void 0:e.map((e=>i("div",{class:"draw-info-container"},e.tempDrawData?i("div",{class:"draw-info"},i("div",{class:"draw-info-item"},i("div",{class:"draw-info-label"},h("ticketResult",this.language)),i("div",{class:"draw-info-val"},h(this.resultMap[e.state],this.language))),i("div",{class:"draw-info-item"},i("div",{class:"draw-info-label"},h("drawId",this.language)),i("div",{class:"draw-info-val"},e.drawId)),i("div",{class:"draw-info-item"},i("div",{class:"draw-info-label"},h("drawDate",this.language)),i("div",{class:"draw-info-val"},b(new Date(e.tempDrawData.date),"dd/MM/yyyy"))),i("div",{class:"draw-info-item"},i("div",{class:"draw-info-label"},h("result",this.language)),i("div",{class:"draw-info-val"},i("span",{class:"show-detail-link",onClick:()=>this.handleShowCurrentDraw(t,e.tempDrawData)},h("seeDetails",this.language)))),e.state===u.WON&&i("div",{class:"draw-info-item"},i("div",{class:"draw-info-label"},h("prize",this.language)),i("div",{class:"draw-info-val1"},i("div",{style:{height:"20px"}}),e.prizeDetails.map((t=>i("span",null,i("div",null,i("span",{class:"draw-info-val__item"},t.prizeName,t.times>1?" x "+t.times:"",":"," "),i("span",{class:"draw-info-val__item",style:{"margin-right":"4px"}},g(t.amount)),i("span",{class:"draw-info-val__item"},t.currency)))))))):i("div",{class:"draw-info-skeleton"},[...Array(5)].map((()=>i("div",{class:"skeleton-line"})))))))}renderPopUpDetail(){return this.dialogVisible?i("lottery-tipping-dialog",{visible:this.dialogVisible,width:c(window.navigator.userAgent)?void 0:"720px",fullscreen:c(window.navigator.userAgent),closable:!0,showFooter:!1,onCancel:()=>{this.dialogVisible=!1},language:this.language,"translation-url":this.translationUrl},i((()=>{var t,e,s,o;if((null===(t=this.dialogData)||void 0===t?void 0:t.draw)||(null===(e=this.dialogData)||void 0===e?void 0:e.ticket)){const t=(null===(s=this.dialogData)||void 0===s?void 0:s.draw)||(null===(o=this.dialogData)||void 0===o?void 0:o.ticket);return i("div",null,t.header&&i("div",{class:"popup-content-container__header"},i("span",{class:"popup-content-container__header-item"},t.header)),i("lottery-oddsbom-ticket-result",{language:this.language,"mb-source":this.mbSource,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"translation-url":this.translationUrl,endpoint:this.endpoint,"game-id":t.gameId,"draw-id":t.drawId,"default-results":JSON.stringify(t.results),"split-view":t.splitView}))}return null}),null)):null}render(){return this.isLoading?this.renderLoading():0===this.ticketHistory.length?this.renderEmpty():i("div",{ref:t=>this.stylingContainer=t,class:"history-list-container"},i("div",{class:"ticket-list-wrap"},this.ticketHistory.map(((t,e)=>i("general-panel",{"header-title":b(new Date(t.createdAt),"dd/MM/yyyy HH:mm:ss")+" "+t.state,onActive:this.handleActive.bind(this,t,e)},i("div",{class:"panel-content",slot:"content"},i("div",{class:"ticket-info"},i("div",{class:"ticket-info-item"},i("div",{class:"ticket-info-label"},h("ticketId",this.language)),i("div",{class:"ticket-info-val"},t.id," ")),i("div",{class:"ticket-info-item"},i("div",{class:"ticket-info-label"},h("ticketType",this.language)),i("div",{class:"ticket-info-val"},h(this.ticketTypeMap[t.wagerType],this.language)," ")),i("div",{class:"ticket-info-item"},i("div",{class:"ticket-info-label"},h("ticketAmount",this.language)),i("div",{class:"ticket-info-val"},`${t.amount} ${t.currency}`)),i("div",{class:"ticket-info-item"},i("div",{class:"ticket-info-label"},h("lineDetail",this.language)),i("div",{class:"ticket-info-val"},i("span",{class:"show-detail-link",onClick:()=>this.showTicketLineDetail(t)},h("seeDetails",this.language)))),i("div",{class:"ticket-info-item"},i("div",{class:"ticket-info-label"},h("numberOfDraw",this.language)),i("div",{class:"ticket-info-val"},t.drawCount))),"Settled"==t.state&&this.renderSettledInfo(t)))))),this.renderPopUpDetail())}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],defaultTicketHistory:["handleDefaultTicketHistoryChange"]}}};Rl.style=".ticket-list-wrap{display:flex;flex-direction:column;gap:12px}.ticket-list-wrap .ticket-info{display:flex;flex-direction:column;gap:12px}.ticket-list-wrap .ticket-info-item{display:flex;align-items:center;user-select:none}.ticket-list-wrap .ticket-info-label{margin-right:12px;color:var(--emw--color-typography, #000)}.ticket-list-wrap .ticket-info-val{color:var(--emw--color-typography-secondary, #555)}.loading-wrap{margin:20px 0;display:flex;align-items:center;justify-content:center;min-height:100px}.loading-wrap .dots-container{display:flex;align-items:center;justify-content:center;height:100%;width:100%}.loading-wrap .dot{height:14px;width:14px;margin-right:14px;border-radius:14px;background-color:var(--emw--color-gray-300, #333);animation:pulse 1.5s infinite ease-in-out}.loading-wrap .dot:last-child{margin-right:0}.loading-wrap .dot:nth-child(1){animation-delay:-0.3s}.loading-wrap .dot:nth-child(2){animation-delay:-0.1s}.loading-wrap .dot:nth-child(3){animation-delay:0.1s}@keyframes pulse{0%{transform:scale(0.8);background-color:var(--emw--color-gray-300, #333)}50%{transform:scale(1.2);background-color:var(--emw--color-gray-100, #e6e6e6)}100%{transform:scale(0.8);background-color:var(--emw--color-gray-150, #6f6f6f)}}.empty-wrap{margin:20px 0;display:flex;align-items:center;justify-content:center;min-height:100px;color:var(--emw--color-typography, #000)}.draw-info{width:30%;min-width:300px;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));border-radius:5px;padding:12px;margin-top:20px;display:flex;flex-direction:column;gap:8px;user-select:none}.draw-info-item{display:flex}.draw-info-label{margin-right:6px;color:var(--emw--color-typography, #000)}.draw-info-val{color:var(--emw--color-typography-secondary, #555)}.draw-info-skeleton{width:30%;min-width:300px;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));border-radius:5px;display:flex;flex-direction:column;gap:10px;padding:10px}.skeleton-line{height:16px;border-radius:4px;background:linear-gradient(90deg, var(--emw--color-gray-100, #e6e6e6) 25%, var(--emw--color-gray-50, #f5f5f5) 50%, var(--emw--color-gray-100, #e6e6e6) 75%);background-size:200% 100%;animation:skeleton-loading 1.2s infinite}.show-detail-link{color:var(--emw-pool-game-acition-normal, #4a90e2);text-decoration:underline;cursor:pointer}.popup-content-container__header{display:flex;justify-content:center;margin-bottom:10px}.popup-content-container__header-item{border:1px solid var(--emw--color-gray-100, #e6e6e6);padding:8px;display:inline-block;color:var(--emw--color-typography, #000)}";const Vl=jl({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 256H736v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zm-200 0H360v-72h304v72z"}}]},name:"delete",theme:"filled"},{extraSVGAttrs:{width:"18px",height:"18px",fill:""}}),Ul=class{constructor(i){t(this,i),this.oddsbomBulletToggleEvent=e(this,"oddsbomBulletToggle",7),this.oddsbomBulletDeleteEvent=e(this,"oddsbomBulletDelete",7),this.oddsbomBulletAddedByMoreBtnDeleteEvent=e(this,"oddsbomBulletAddedByMoreBtnDelete",7),this.oddsbomBulletCallDialogEvent=e(this,"oddsbomBulletCallDialog",7),this.isSelected=void 0,this.disabled=void 0,this.text=void 0,this.idx=void 0,this.isReading=void 0,this.isDeleteByIcon=void 0,this.isCallDialogBtn=void 0,this.isAddedByMoreBtn=void 0,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&n(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&&n(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleClick(){this.isCallDialogBtn?this.oddsbomBulletCallDialogEvent.emit():this.isDeleteByIcon?this.isAddedByMoreBtn?this.oddsbomBulletAddedByMoreBtnDeleteEvent.emit(this.text):this.oddsbomBulletDeleteEvent.emit(this.idx):this.disabled||this.oddsbomBulletToggleEvent.emit(this.idx)}render(){return i("div",{key:"e21cf46108e35dcbf7d65e8c6a5f12f5d5ae49cb",class:"OddsbomBullet",ref:t=>this.stylingContainer=t},i("button",{key:"4edf5cd481d8283bd71f6806b6f93949e1308095",class:{OddsbomBulletBtn__normal:!0,OddsbomBulletBtn__selected:this.isSelected,OddsbomBulletBtn__disabled:this.disabled,isDeleteByIcon:this.isDeleteByIcon,isCallDialogBtn:this.isCallDialogBtn||this.isReading},onClick:this.handleClick.bind(this),disabled:this.disabled},i("span",{key:"fa1aed0293dc004808e6992c069d6992317b0788",class:"OddsbomBullet--deleteIcon",innerHTML:Vl}),i("span",{key:"53ed96f2c2b833d21488049f987b6131718d563e",class:"OddsbomBullet--text"},this.text)))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};async function Hl({endpoint:t,gameId:e,drawId:i,results:s,splitView:o=!1}){const r=await async function({endpoint:t,gameId:e,drawId:i}){try{return await function(t,e="GET",i=null,s={}){return new Promise(((o,r)=>{const n=Object.assign({"Content-Type":"application/json"},s),a={method:e,headers:n,body:null};i&&"GET"!==e&&"HEAD"!==e?a.body=JSON.stringify(i):delete a.body,fetch(t,a).then((t=>t.ok?t.json():t.json().then((e=>{r({status:t.status,statusText:t.statusText,code:e.code||"UNKNOWN_ERROR",message:e.message||"An unknown error occurred",data:e.data||null})}),(()=>r({status:t.status,statusText:t.statusText,code:"PARSE_ERROR",message:"Failed to parse error response"}))))).then((t=>o(t)),(t=>r(t)))}))}(`${t}/poolgames/${e}/draws/${i}/matchConfig`)||[]}catch(t){console.log(t)}}({endpoint:t,gameId:e,drawId:i});return o?r.reduce(((t,e,i)=>{const[o,r]=(n=e.eventName)?n.split("vs").map((t=>t.trim())):"";var n;const[a,l]=function(t){const e=new Set,i=new Set;for(const s of t){const[t,o]=s.split(":");e.has(t)||e.add(t),i.has(t)||i.add(o)}return[Array.from(e),Array.from(i)]}(s[i]||[]);return null==t||t.push({index:i+1,teamName:o,startTime:e.startTime,results:a}),null==t||t.push({index:i+1,teamName:r,startTime:e.startTime,results:l}),t}),[])||[]:r.map(((t,e)=>({index:e+1,eventName:t.eventName,startTime:t.startTime,results:s[e]||[]})))}Ul.style=".OddsbomBullet .OddsbomBulletBtn__normal{width:32px;height:32px;display:flex;align-items:center;justify-content:center;background:var(--emw--color-background, #fff);border:2px solid var(--emw--color-primary, #0d196e);border-radius:var(--emw--border-radius-medium, 8px);color:var(--emw--color-typography, #000);font-weight:bold;cursor:pointer;transition:transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.2s ease, background-color 0.3s;user-select:none;position:relative}.OddsbomBullet .OddsbomBulletBtn__normal:hover{transform:scale(1.15) rotate(-5deg);box-shadow:var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15)) 7px 6px 6px}.OddsbomBullet .OddsbomBulletBtn__normal .OddsbomBullet--deleteIcon{display:none}.OddsbomBullet .OddsbomBulletBtn__normal.isDeleteByIcon:hover{background-color:var(--emw--color-background, #fff)}.OddsbomBullet .OddsbomBulletBtn__normal.isDeleteByIcon:hover .OddsbomBullet--text{display:none}.OddsbomBullet .OddsbomBulletBtn__normal.isDeleteByIcon:hover .OddsbomBullet--deleteIcon{display:inline;fill:var(--emw--color-typography, #000)}.OddsbomBullet .OddsbomBulletBtn__normal.isCallDialogBtn:hover{transform:none;box-shadow:none}.OddsbomBullet .OddsbomBulletBtn__normal.OddsbomBulletBtn__selected{background-color:var(--emw--color-primary, #0d196e);color:var(--emw--color-typography-inverse, #fff);transform:scale(1.05);box-shadow:0 5px 10px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15))}.OddsbomBullet .OddsbomBulletBtn__normal.OddsbomBulletBtn__disabled{background-color:var(--emw--color-gray-50, #f5f5f5);border-color:var(--emw--color-gray-100, #e6e6e6);color:var(--emw--color-gray-150, #6f6f6f);cursor:not-allowed;transform:none;box-shadow:none}.OddsbomBullet .OddsbomBulletBtn__normal.OddsbomBulletBtn__disabled:hover{transform:none;box-shadow:none}";const ql=["ro","en","fr","ar","hr"],Wl={en:{filter:"Filter",clear:"Clear",searchByTicketId:"Search by Ticket ID",enterTicketId:"Enter Ticket ID",searchByTicketType:"Search by Ticket Type",selectTicketType:"Select Ticket Type",searchByDate:"Search by Date",from:"From",to:"To",normal:"Normal",subscription:"Subscription",ticketsHistory:"Tickets History",settled:"Settled",purchased:"Purchased",canceled:"Canceled",noData:"No data Avaliable.",ticketId:"Ticket ID:",ticketType:"Ticket Type:",ticketAmount:"Ticket Amount:",lineDetail:"Line Detail:",seeDetails:"See Details",numberOfDraw:"Number of Draw:",ticketResult:"Ticket Result:",drawId:"Draw ID:",drawDate:"Draw Date:",result:"Result:",prize:"Prize:",bettingType:"Betting Type:"},ro:{ticketsHistory:"Istoric bilete",settled:"Decontat",purchased:"Achiziționat",canceled:"Anulat",noData:"Nu sunt date disponibile.",ticketId:"ID bilet:",ticketType:"Tip bilet:",ticketAmount:"Suma biletului:",lineDetail:"Detaliu linie:",seeDetails:"Vezi detalii",numberOfDraw:"Număr de extrageri:",ticketResult:"Rezultat bilet:",drawId:"ID extragere:",drawDate:"Data extragerii:",result:"Rezultat:",prize:"Premiu:",bettingType:"Tip de pariu:"},fr:{ticketsHistory:"Historique des billets",settled:"Réglé",purchased:"Acheté",canceled:"Annulé",noData:"Aucune donnée disponible.",ticketId:"ID du billet:",ticketType:"Type de billet:",ticketAmount:"Montant du billet:",lineDetail:"Détail de la ligne:",seeDetails:"Voir les détails",numberOfDraw:"Nombre de tirages:",ticketResult:"Résultat du billet:",drawId:"ID du tirage:",drawDate:"Date du tirage:",result:"Résultat:",prize:"Prix:",bettingType:"Type de pari:"},ar:{ticketsHistory:"سجل التذاكر",settled:"تمت التسوية",purchased:"تم شراؤها",canceled:"تم الإلغاء",noData:"لا توجد بيانات متاحة.",ticketId:"معرف التذكرة:",ticketType:"نوع التذكرة:",ticketAmount:"مبلغ التذكرة:",lineDetail:"تفاصيل الخط:",seeDetails:"انظر التفاصيل",numberOfDraw:"عدد السحوبات:",ticketResult:"نتيجة التذكرة:",drawId:"معرف السحب:",drawDate:"تاريخ السحب:",result:"النتيجة:",prize:"الجائزة:",bettingType:"نوع الرهان:"},hr:{ticketsHistory:"Povijest listića",settled:"Riješeno",purchased:"Kupljeno",canceled:"Otkazano",noData:"Nema dostupnih podataka.",ticketId:"ID listića:",ticketType:"Vrsta listića:",ticketAmount:"Iznos listića:",lineDetail:"Detalji linije:",seeDetails:"Vidi detalje",numberOfDraw:"Broj izvlačenja:",ticketResult:"Rezultat listića:",drawId:"ID izvlačenja:",drawDate:"Datum izvlačenja:",result:"Rezultat:",prize:"Nagrada:",bettingType:"Vrsta oklade:"}},Gl=class{constructor(e){t(this,e),this.latestRequestId=0,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.sessionId=void 0,this.endpoint="",this.gameId=void 0,this.drawId=void 0,this.defaultResults=void 0,this.splitView=!1,this.allResults=void 0,this.ticketBetDataSource=[],this.isLoading=!1}handleClientStylingChange(t,e){t!==e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!==e&&n(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&&n(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentWillLoad(){(async t=>{if(t)try{const i=await fetch(t);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const s=await i.json();e=s,Object.keys(e).forEach((t=>{for(let i in e[t])Wl[t][i]=e[t][i]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl),this.fetchMatchData()}async fetchMatchData(){const t=++this.latestRequestId;if(this.gameId&&this.drawId)try{this.defaultResults&&(this.allResults=JSON.parse(this.defaultResults)),this.isLoading=!0;const e=await Hl({endpoint:this.endpoint,gameId:this.gameId,drawId:this.drawId,results:this.allResults||[[]],splitView:this.splitView});t===this.latestRequestId&&(this.ticketBetDataSource=e)}finally{t===this.latestRequestId&&(this.isLoading=!1)}}get columns(){const t=(t,e)=>(({date:t,type:e="date",format:i})=>{try{const s=y(t);if(isNaN(s.getTime()))throw new Error(`Invalid date: ${t}`);if(i)return b(s,i);let o="dd/MM/yyyy";return"time"===e?o="dd/MM/yyyy HH:mm:ss":"week"===e&&(o="ccc dd/MM/yyyy HH:mm:ss"),b(s,o)}catch(t){return console.error("Error formatting date:",t.message),""}})({date:e,format:"ccc dd/MM HH:mm"});return this.splitView?[{title:"No.",value:"index",width:5,rowSpan:2},{title:"Date",value:"startTime",width:25,rowSpan:2,nowrap:!0,render:t},{title:"Team",value:"teamName",width:30},{title:"Scores",value:"results",width:45,render:(t,e)=>i("div",{class:"flex gap-1"},e.map((t=>i("lottery-oddsbom-bullet",{text:t,"is-reading":!0,"is-selected":!0}))))}]:[{title:"Match",value:"eventName",width:50,render:(t,e)=>i("div",{class:"flex gap-1 eventNameContainer__item"},i("span",{class:"eventNameContainer__item--title"},e))},{title:"Date",value:"startTime",width:25,nowrap:!0,render:t},{title:"Match Result",value:"results",width:25,render:(t,e)=>i("div",null,null==e?void 0:e[0])}]}renderLoading(){return i("div",{class:"loading-wrap"},i("section",{class:"dots-container"},i("div",{class:"dot"}),i("div",{class:"dot"}),i("div",{class:"dot"}),i("div",{class:"dot"}),i("div",{class:"dot"})))}renderEmpty(){return i("div",{class:"LotteryTippingTicketBet__empty"},i("p",null,(()=>{const t=this.language;let e=Wl[void 0!==t&&ql.includes(t)?t:"en"].noData;return e})()))}renderTable({columns:t,dataSource:e,hideHead:s=!1,grid:o=!0,bordered:r=!0}){const n={};return i("table",{class:{bordered:r,grid:o,"my-table-component":!0}},!s&&i("thead",null,i("tr",null,t.map((t=>{var e;return i("th",{key:t.value,style:{width:t.width+"%",textAlign:t.align}},"string"==typeof t.title?t.title:null===(e=t.title)||void 0===e?void 0:e.call(t))})))),i("tbody",null,e.map(((e,s)=>i("tr",{key:s},t.map((t=>{if(n[t.value]&&n[t.value]>0)return n[t.value]--,null;const o=t.rowSpan;return o&&o>1&&(n[t.value]=o-1),i("td",{key:t.value,rowSpan:o,style:{width:t.width+"%",textAlign:t.align},class:{"no-wrap":t.nowrap}},t.render?t.render(e,e[t.value],s):e[t.value])})))))))}renderContent(){return this.isLoading?this.renderLoading():this.ticketBetDataSource&&0!==this.ticketBetDataSource.length?i("div",{class:"flex align-center LotteryTippingTicketBet__main"},this.renderTable({columns:this.columns,dataSource:this.ticketBetDataSource||[],hideHead:!1,grid:!1,bordered:!1})):this.renderEmpty()}render(){return i("div",{key:"9932926b2958b13636d617cc20a0c77a76a36ebe",ref:t=>this.stylingContainer=t,class:"LotteryTippingTicketBet__container"},this.renderContent())}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],gameId:["fetchMatchData"],drawId:["fetchMatchData"],defaultResults:["fetchMatchData"]}}};Gl.style=".LotteryTippingTicketBet__container {\n display: block; /* Or inline-block, depending on desired layout flow */\n font-size: 14px;\n line-height: 1.5715;\n color: var(--emw--color-typography, #000);\n background: var(--emw--color-background, #fff);\n overflow: hidden;\n min-width: 300px;\n container-type: inline-size;\n}\n@container (max-width: 375px) {\n .LotteryTippingTicketBet__container {\n font-size: 12px;\n }\n}\n\n.my-table-component {\n width: 100%;\n border-collapse: collapse; /* Important for borders */\n text-align: left;\n border-radius: 0.1rem; /* Ant Design like subtle rounding */\n border-spacing: 0;\n}\n\n/* Header */\n.my-table-component th {\n background: var(--emw--color-background-secondary, #f5f5f5);\n color: var(--emw--color-typography, #000);\n font-weight: 600;\n padding: 0.4rem 0.5rem;\n transition: background 0.3s ease;\n}\n\n/* Cells */\n.my-table-component td {\n padding: 0.4rem 0.5rem;\n color: var(--emw--color-typography, #000);\n background: var(--emw--color-background, #fff);\n transition: background 0.3s;\n}\n@container (max-width: 400px) {\n .my-table-component td {\n padding: 0.3rem 0.3rem;\n }\n}\n\n.my-table-component.bordered th,\n.my-table-component.bordered td {\n border-bottom: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n/* Bordered style */\n.my-table-component.grid th,\n.my-table-component.grid td {\n border: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n.my-table-component.grid th {\n border-bottom-width: 1px; /* Ensure bottom border is consistent */\n}\n\n.my-table-component.grid {\n border: 1px solid var(--emw--color-gray-100, #e6e6e6); /* Outer border */\n border-right-width: 0;\n border-bottom-width: 0;\n}\n\n.my-table-component.grid th:last-child,\n.my-table-component.grid td:last-child {\n border-right: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n.my-table-component.grid tr:last-child td {\n border-bottom: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n/* Striped style */\n.my-table-component.striped tbody tr:nth-child(even) td {\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n}\n\n/* Hover (optional, but nice) */\n.my-table-component tbody tr:hover td {\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n}\n\n.flex {\n display: flex;\n}\n\n.justify-end {\n justify-content: flex-end;\n}\n\n.gap-1 {\n gap: 4px;\n}\n\n.justify-between {\n justify-content: space-between;\n}\n\n.align-center {\n align-items: center;\n}\n\n.gap-1 {\n gap: 0.5rem;\n}\n\n.match-info-item {\n display: flex;\n}\n\n.match-info-item-label {\n margin-right: 6px;\n}\n\n.info-icon:hover {\n cursor: pointer;\n}\n\n.LotteryTippingTicketBet__empty p {\n text-align: center;\n color: var(--emw--color-typography, #000);\n}\n\n.no-wrap {\n white-space: nowrap;\n overflow: hidden;\n}\n\n.eventNameContainer__item {\n line-height: 1rem;\n}\n.eventNameContainer__item--title {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 300px;\n}\n@container (max-width: 600px) {\n .eventNameContainer__item--title {\n max-width: 180px;\n }\n}\n@container (max-width: 500px) {\n .eventNameContainer__item--title {\n max-width: 150px;\n }\n}\n@container (max-width: 400px) {\n .eventNameContainer__item--title {\n max-width: 100px;\n }\n}\n@container (max-width: 330px) {\n .eventNameContainer__item--title {\n max-width: 70px;\n }\n}\n\n.LotteryTippingTicketBet__main {\n perspective: 800px;\n will-change: transform, opacity;\n backface-visibility: hidden;\n}\n\n@container (max-width: 520px) {\n .LotteryTippingTicketBet__main {\n flex-wrap: wrap;\n justify-content: center;\n }\n}\n.loading-wrap {\n margin: 20px 0;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 100px;\n}\n.loading-wrap .dots-container {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n}\n.loading-wrap .dot {\n height: 14px;\n width: 14px;\n margin-right: 14px;\n border-radius: 14px;\n background-color: var(--emw--color-gray-300, #333);\n animation: pulse 1.5s infinite ease-in-out;\n}\n.loading-wrap .dot:last-child {\n margin-right: 0;\n}\n.loading-wrap .dot:nth-child(1) {\n animation-delay: -0.3s;\n}\n.loading-wrap .dot:nth-child(2) {\n animation-delay: -0.1s;\n}\n.loading-wrap .dot:nth-child(3) {\n animation-delay: 0.1s;\n}\n@keyframes pulse {\n 0% {\n transform: scale(0.8);\n background-color: var(--emw--color-gray-300, #333);\n }\n 50% {\n transform: scale(1.2);\n background-color: var(--emw--color-gray-100, #e6e6e6);\n }\n 100% {\n transform: scale(0.8);\n background-color: var(--emw--color-gray-150, #6f6f6f);\n }\n}";const Yl=["ro","en","fr","ar","hr"],Kl={en:{cancel:"Cancel",confirm:"Confirm"},ro:{cancel:"Anulează",confirm:"Confirmă"},fr:{cancel:"Annuler",confirm:"Confirmer"},ar:{cancel:"إلغاء",confirm:"تأكيد"},hr:{cancel:"Odustani",confirm:"Potvrdi"}},Jl=(t,e)=>{const i=e;return Kl[void 0!==i&&Yl.includes(i)?i:"en"][t]},Zl=class{constructor(i){t(this,i),this.open=e(this,"open",7),this.close=e(this,"close",7),this.confirm=e(this,"confirm",7),this.cancel=e(this,"cancel",7),this.wasVisible=!1,this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.visible=void 0,this.dialogTitle="",this.width="520px",this.closable=!0,this.mask=!0,this.maskClosable=!0,this.animationDuration=300,this.fullscreen=!1,this.showFooter=!0,this.showCancelBtn=!0,this.language="en",this.translationUrl=void 0,this.dialogClass=void 0,this.dialogStyle=void 0}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&n(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 s=await i.json();e=s,Object.keys(e).forEach((t=>{for(let i in e[t])Kl[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||{}),e=["dialog-wrapper",this.visible?"dialog-wrapper-visible":""],s=["mask",this.visible?"mask-enter":"mask-leave"],o=["dialog",this.visible?"dialog-enter":"dialog-leave",this.fullscreen?"fullscreen":"",this.dialogClass].filter(Boolean).join(" ");return i("div",{key:"306683c5190fa6dca57dcf75e52eca575c0215e7",class:e.join(" "),ref:t=>this.stylingContainer=t},i("div",{key:"8be097f3a86fcd9ad4e18c6ac56cafdcf249049b",class:s.join(" "),onClick:this.handleMaskClick.bind(this)}),i("div",{key:"87d2206d3e3d75fe0e0ef8a6afd8de5c20892ae6",part:"dialog",class:o,style:t,role:"dialog","aria-modal":"true","aria-labelledby":"dialog-title"},(this.dialogTitle||this.closable)&&i("div",{key:"04d54878aa24e0d9eb98bc921ea3edfacd6de3af",class:"dialog-header"},i("h2",{key:"f6f6c279de47e49cde86d0c907b9b40a115926b3",id:"dialog-title",class:"dialog-title"},this.dialogTitle),this.closable&&i("button",{key:"e1625473e5460cd667961923bf678c9a91b69c82",class:"close-btn",onClick:this.handleClose.bind(this)},"x")),i("div",{key:"fb0db8dd765832cf1d8e8b682131e4c97a93ac22",class:"dialog-content",style:{maxHeight:"calc(100vh - 62px)",overflowY:"auto"}},i("slot",{key:"75336f59c2a8fe6775fc12ed4e2e26ff6bb6b508"})),this.showFooter&&i("div",{key:"a305086a2830265317abb0fd6f59b4a053fd54a9",class:"dialog-footer"},i("slot",{key:"cb330ea63908002f4f8b4b8139d5843c2570302e",name:"footer"},this.showCancelBtn&&i("button",{key:"c3d2c15195e56efd6d388265e9ccb87030627b7b",class:"cancel-btn",onClick:this.handleClose.bind(this)},Jl("cancel",this.language)),i("button",{key:"af9c96b4e1ce82f9ecb73e2b9f4e93cba0382d76",class:"confirm-btn",onClick:this.handleConfirm.bind(this)},Jl("confirm",this.language))))))}get el(){return o(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};Zl.style=".dialog-wrapper{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;visibility:hidden;opacity:1;z-index:199}.dialog-wrapper-visible{visibility:visible}.mask{position:fixed;inset:0;background-color:rgba(0, 0, 0, 0.5);opacity:0;z-index:1000;transition:opacity var(--duration) linear}.mask-enter{opacity:1}.mask-leave{opacity:0}.dialog{position:relative;background:var(--emw--color-background, #fff);border-radius:12px;box-shadow:0 4px 32px rgba(0, 0, 0, 0.15);opacity:0;transform:scale(0.9);transition:all var(--duration) linear;width:100%;max-width:100vw;overflow:hidden;z-index:1000}.dialog-enter{opacity:1;transform:scale(1)}.dialog-leave{opacity:0}.dialog.fullscreen{width:100vw !important;height:100vh;overflow:auto;max-height:none;border-radius:0;overflow:hidden}.dialog-header{padding:16px 16px 0 16px;display:flex;justify-content:space-between;align-items:center}.dialog-header .dialog-title{margin:0;font-size:1.25rem;font-weight:500;color:var(--emw--color-typography, #000)}.dialog-header .close-btn{background:transparent;border:none;font-size:1.5rem;width:2rem;height:2rem;color:var(--emw--color-gray-150, #6f6f6f);cursor:pointer;border-radius:4px}.dialog-header .close-btn:hover{background:var(--emw--color-gray-50, #f5f5f5);color:var(--emw--color-gray-300, #333)}.dialog-content{padding:24px;font-size:0.95rem;line-height:1.6;color:var(--emw--color-dialog-typography, #000);flex:1;overflow-y:auto;max-height:calc(100vh - 200px)}.dialog.fullscreen .dialog-content{max-height:none}.dialog-footer{padding:0 16px 16px 16px;display:flex;justify-content:center;gap:12px}.dialog-footer .cancel-btn,.dialog-footer .confirm-btn{padding:10px 24px;border-radius:6px;font-size:0.9rem;cursor:pointer;transition:all 0.3s linear}.dialog-footer .cancel-btn{border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));background-color:var(--emw--color-background, #fff);color:var(--emw--color-typography, #000)}.dialog-footer .cancel-btn:hover{background-color:var(--emw--color-background-tertiary, #ccc)}.dialog-footer .confirm-btn{border:none;color:var(--emw--color-typography-normalized, #ffffff);background:var(--emw--color-primary, #009993)}.dialog-footer .confirm-btn:hover{background:var(--emw--color-primary-variant, #004d4a)}@media screen and (max-width: 480px){.dialog.fullscreen .dialog-content{padding:12px}}.Loading{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.Loading svg{animation:spin 1s linear infinite;transform-origin:center}@keyframes spin{100%{transform:rotate(360deg)}}";export{El as filter_group,Bl as general_multi_select,Ml as general_pagination,Ll as general_panel,Rl as history_list,Ul as lottery_oddsbom_bullet,Gl as lottery_oddsbom_ticket_result,Zl as lottery_tipping_dialog}
6657
+ `}static get is(){return"vaadin-tabs"}}O(Ol);const El=class{constructor(i){t(this,i),this.handleFilter=e(this,"filterChange",7),this.handleTicketType=t=>{t.detail&&t.detail.length&&(this.filterParams.wagerType=t.detail)},this.handleFilterFrom=t=>{var e,i;const s=null===(i=null===(e=t.target)||void 0===e?void 0:e.value)||void 0===i?void 0:i.split("-");if(3===s.length){const[t,e,i]=s;this.filterParams.from=new Date(Date.UTC(Number(t),Number(e)-1,Number(i),0,0,0)).toISOString(),this.minTo=`${t}-${e}-${i}`}},this.handleFilterTo=t=>{var e,i;const s=null===(i=null===(e=t.target)||void 0===e?void 0:e.value)||void 0===i?void 0:i.split("-");if(3===s.length){const[t,e,i]=s;this.filterParams.to=new Date(Date.UTC(Number(t),Number(e)-1,Number(i),23,59,59)).toISOString(),this.maxFrom=`${t}-${e}-${i}`}},this.validateOnSubmit=()=>{const{from:t,to:e}=this.filterParams;return t&&!e||!t&&e?(this.invalid={from:!t,to:!e},Promise.reject()):(this.invalid={from:!1,to:!1},Promise.resolve())},this.handleTicketIdInput=t=>{this.filterParams.id=t.target.value},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.statusOptions=void 0,this.ticketTypeList=void 0,this.filterParams={},this.isOpen=!1,this.invalid={from:!1,to:!1},this.maxFrom="",this.minTo=""}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&n(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&&n(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentWillLoad(){l(this.translationUrl),this.statusOptions=[{label:h("settled",this.language),value:"Settled"},{label:h("purchased",this.language),value:"Purchased"},{label:h("canceled",this.language),value:"Canceled"}],this.ticketTypeList=[{label:h("normal",this.language),value:"NORMAL"},{label:h("subscription",this.language),value:"SUBSCRIPTION"}]}resetSearch(){this.filterParams={},this.comboBox.clear(),this.handleFilter.emit(this.filterParams)}handleOpen(){this.isOpen=!0}handleDialogConfirm(){this.validateOnSubmit().then((()=>{this.handleFilter.emit(this.filterParams),this.isOpen=!1}))}handleSelectStatus(t){this.filterParams.state=t,this.filterParams=Object.assign({},this.filterParams),this.handleFilter.emit(this.filterParams)}renderFilterLeft(){return i("div",{class:"filter-status"},this.statusOptions.map((t=>i("div",{class:"filter-status-btn"+(this.filterParams.state===t.value?" active":""),onClick:this.handleSelectStatus.bind(this,t.value)},t.label))))}renderFilterContent(){return i("div",{class:"dialog-content"},i("div",{class:"filter-item"},i("div",{class:"filter-item-label"},h("searchByTicketId",this.language)),i("div",{class:"filter-item-val"},i("div",{class:"general-multi-select-container"},i("vaadin-text-field",{placeholder:h("enterTicketId",this.language),value:this.filterParams.id,onInput:this.handleTicketIdInput.bind(this)})))),i("div",{class:"filter-item"},i("div",{class:"filter-item-label"},h("searchByTicketType",this.language)),i("div",{class:"general-multi-select-container"},i("general-multi-select",{ref:t=>this.comboBox=t,placeholder:h("selectTicketType",this.language),"max-visible-chips":"2",options:this.ticketTypeList.map((t=>({text:t.label,value:t.value}))),onChange:this.handleTicketType.bind(this),"client-styling":this.clientStyling,"client-styling-Url":this.clientStylingUrl,"mb-source":this.mbSource}))),i("div",{class:"filter-item"},i("div",{class:"filter-item-label"},h("searchByDate",this.language)),i("div",{class:"filter-item-val"},i("vaadin-date-picker",{value:this.filterParams.from,max:this.maxFrom,onChange:this.handleFilterFrom.bind(this),placeholder:h("from",this.language),ref:t=>d(t),class:"VaadinDatePicker",invalid:this.invalid.from,"error-message":h("pleaseSelectADate",this.language)}),i("vaadin-date-picker",{value:this.filterParams.to,min:this.minTo,onChange:this.handleFilterTo.bind(this),placeholder:h("to",this.language),ref:t=>d(t),class:"VaadinDatePicker",invalid:this.invalid.to,"error-message":h("pleaseSelectADate",this.language)}))))}render(){return i("div",{key:"189470f0c8c937f3c133fb727245ec582bb813bf",class:"filter-wrap",ref:t=>this.stylingContainer=t},this.renderFilterLeft(),i("div",{key:"2ae61cb743c4088c5476ab8a2787fc56a55eeca4",class:"filter-operation"},i("div",{key:"32b08d551d2e86bb0c1452fed2aaab248eaeefc8",class:"lottery-tipping-filter"},i("div",{key:"22cf53d1f94b5450c739892b6b5d11ee26220beb",class:"operate-btns"},i("div",{key:"30c2245db6b665d444f29bc0b85c1ad594e4bbbe",class:"operate-btn",onClick:this.handleOpen.bind(this)},h("filter",this.language)),i("div",{key:"3dde72ceade830d3acafb08eb53604f02f391f2e",class:"operate-btn",onClick:this.resetSearch.bind(this)},h("clear",this.language))),i("lottery-tipping-dialog",{key:"3452780b717c8872cf02f2b3cefe0b290db001af","dialog-title":h("filter",this.language),visible:this.isOpen,onCancel:()=>{this.isOpen=!1},onConfirm:this.handleDialogConfirm.bind(this),animationDuration:300,language:this.language,"translation-url":this.translationUrl},this.renderFilterContent()))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};El.style=".filter-wrap {\n margin-bottom: 20px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n container-type: inline-size;\n container-type: inline-size;\n}\n\n.filter-wrap .filter-status {\n display: flex;\n gap: 12px;\n align-items: center;\n}\n\n.filter-wrap .filter-status-btn {\n background: var(--emw--color-background, #fff);\n border: 1px solid var(--emw--color-primary, #0d196e);\n color: var(--emw--color-typography, #000);\n border-radius: 6px;\n padding: 12px;\n font-size: 13px;\n text-transform: uppercase;\n font-weight: 500;\n cursor: pointer;\n transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;\n}\n\n.filter-wrap .filter-status-btn:hover {\n background-color: var(--emw--color-secondary, #1367e7);\n}\n\n.filter-wrap .filter-status-btn.active {\n background: var(--emw--color-secondary, #1367e7);\n color: var(--emw--color-typography-reverse, #fff);\n}\n\n@container (max-width: 480px) {\n .filter-wrap {\n flex-direction: column;\n align-items: flex-start;\n gap: 10px;\n }\n .filter-wrap .filter-status {\n flex-wrap: wrap;\n gap: 8px;\n }\n .filter-wrap .filter-status-btn {\n padding: 6px 10px;\n font-size: 12px;\n }\n}\n.lottery-tipping-filter .operate-btns {\n display: flex;\n gap: 12px;\n}\n\n.lottery-tipping-filter .operate-btn {\n background: var(--emw--color-primary, #0d196e);\n border-radius: 20px;\n padding: 8px 16px;\n font-size: 14px;\n color: var(--emw--color-typography-normalized, #fff);\n font-weight: 600;\n cursor: pointer;\n transition: background 0.2s ease, border-color 0.2s ease;\n}\n\n.lottery-tipping-filter .operate-btn:hover {\n background: var(--emw--color-secondary, #1367e7);\n}\n\n.dialog-content {\n display: flex;\n flex-direction: column;\n align-items: center;\n color: var(--emw--color-typography, #000);\n}\n.dialog-content .filter-item {\n margin-bottom: 12px;\n}\n.dialog-content .filter-item-label {\n text-align: center;\n}\n.dialog-content .filter-item-val {\n display: flex;\n flex-wrap: wrap;\n gap: 12px;\n justify-content: center;\n}\n\n@container (max-width: 480px) {\n .lottery-tipping-filter .operate-btns {\n gap: 6px;\n flex-wrap: wrap;\n }\n .lottery-tipping-filter .operate-btn {\n padding: 6px 12px;\n font-size: 13px;\n }\n}\n.general-multi-select-container {\n width: var(--vaadin-field-default-width, 16em);\n}\n.general-multi-select-container vaadin-text-field {\n width: 100%;\n}";const Bl=class{constructor(i){t(this,i),this.change=e(this,"change",7),this.handleOutsideClick=t=>{t.composedPath().includes(this.el)||(this.dropdownOpen=!1,this.overflowOpen=!1)},this.toggleDropdown=t=>{t.stopPropagation(),this.dropdownOpen=!this.dropdownOpen,this.overflowOpen=!1},this.isSelected=t=>this.selectedValues.includes(t),this.selectItem=t=>{this.isSelected(t.value)||(this.selectedValues=[...this.selectedValues,t.value],this.change.emit(this.selectedValues))},this.toggleItem=t=>{this.isSelected(t.value)?this.removeItem(t.value):this.selectItem(t)},this.removeItem=(t,e)=>{e&&e.stopPropagation(),this.selectedValues=this.selectedValues.filter((e=>e!==t)),this.change.emit(this.selectedValues)},this.downIcon=s("../static/dropdown.svg"),this.upIcon=s("../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&&n(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&&n(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 i("div",{key:"50b48397be3ede1907ab2c2abcd1cf2f43f69c13",class:"general-multi-select-container",ref:t=>this.stylingContainer=t},i("div",{key:"696a1bb1f221f8f5cf290fac040af10e2e5a115e",class:"multi-select-container",ref:t=>this.el=t},i("div",{key:"9ea92f01787b26d43054573a11896cf65065b073",class:"flex-row",onClick:this.toggleDropdown},i("div",{key:"f79720ca3ec383ee7f95b09483698ee18119c79a",class:"control"},this.visibleChips.map((t=>i("span",{class:"chip"},i("div",{class:"chip-text",title:t.text},t.text),i("div",{class:"remove-btn",onClick:e=>this.removeItem(t.value,e)},"×")))),this.hiddenChips.length>0&&i("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&&i("span",{key:"b061de660a55f7a0d41ce9aa650108d3f38a9dc0",class:"placeholder"},this.placeholder)),i("div",{key:"f83b6517e88b3976cdc18590f8f1233cb2515230",class:"arrow"},i("img",{key:"1b61a49090237057b98e5ce8a4f7c1e3bfc9d4ba",class:"info-icon",src:this.dropdownOpen?this.upIcon:this.downIcon,style:{width:"18px"}}))),this.dropdownOpen&&i("div",{key:"e5b081007bcbdd251ce5ac235c1f19f17852c420",class:"dropdown"},this.options.map((t=>i("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)&&i("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=>i("span",{class:"chip"},i("span",{class:"chip-text",title:t.text},t.text),i("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"]}}};Bl.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 Ml=class{constructor(i){t(this,i),this.pageChange=e(this,"pageChange",7),this.pageSizeChange=e(this,"pageSizeChange",7),this.pageSizeOptions=[10,20,50],this.userAgent=window.navigator.userAgent,this.handleKeyDown=t=>{if("Enter"===t.key){const e=parseInt(t.target.value);isNaN(e)||this.goToPage(e)}},this.handleInput=t=>{const e=t.target;parseInt(e.value)>this.totalPages&&(e.value=this.totalPages.toString()),parseInt(e.value)<1&&(e.value="1")},this.handleSelectInput=t=>this.changePageSize(parseInt(t.target.value)),this.total=0,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.current=1,this.pageSize=10,this.totalPages=1}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&n(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&&n(this.stylingContainer,this.clientStylingUrl))}componentWillLoad(){l(this.translationUrl),this.pageSize=this.pageSizeOptions[0],this.updateTotalPages()}updateTotalPages(){this.totalPages=Math.max(Math.ceil(this.total/this.pageSize),1),this.current>this.totalPages&&(this.current=this.totalPages,this.pageChange.emit(this.current))}goToPage(t){t<1||t>this.totalPages||t===this.current||(this.current=t,this.pageChange.emit(t))}changePageSize(t){this.pageSize=t,this.pageSizeChange.emit(t),this.updateTotalPages(),this.goToPage(1)}getPagesToShow(){const t=[],e=c(this.userAgent)?1:2,{totalPages:i,current:s}=this;if(i<=7)for(let e=1;e<=i;e++)t.push({type:"page",value:e});else{t.push({type:"page",value:1}),s>e+2&&t.push({type:"jump",direction:"prev"});const o=Math.max(2,s-e),r=Math.min(i-1,s+e);for(let e=o;e<=r;e++)t.push({type:"page",value:e});s<i-e-1&&t.push({type:"jump",direction:"next"}),t.push({type:"page",value:i})}return t}jumpTo(t){this.goToPage("prev"===t?Math.max(1,this.current-5):Math.min(this.totalPages,this.current+5))}render(){if(!this.total)return null;const t=this.getPagesToShow();return i("div",{class:"paginator",ref:t=>this.stylingContainer=t},i("div",{class:"total-num"},h("totalItems",this.language,{total:this.total})),i("button",{class:"arrow-btn",disabled:this.current<=1,onClick:this.goToPage.bind(this,this.current-1)},"<"),t.map((t=>"page"===t.type?i("button",{class:{page:!0,active:this.current===t.value},onClick:this.goToPage.bind(this,t.value)},t.value):i("button",{class:"ellipsis",onClick:this.jumpTo.bind(this,t.direction)},"..."))),i("button",{class:"arrow-btn",disabled:this.current>=this.totalPages,onClick:this.goToPage.bind(this,this.current+1)},">"),i("select",{onInput:this.handleSelectInput},this.pageSizeOptions.map((t=>i("option",{value:t},t)))),i("div",{class:"jump-box"},h("goTo",this.language),i("input",{type:"number",min:"1",max:this.totalPages,value:this.current,onKeyDown:this.handleKeyDown.bind(this),onInput:this.handleInput.bind(this)})))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],total:["updateTotalPages"],pageSize:["updateTotalPages"]}}};Ml.style=".paginator{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}button{padding:4px 8px;font-size:14px;background:var(--emw--color-background, #fff);color:var(--emw--color-typography, #000);border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));border-radius:var(--emw--border-radius-small, 6px);cursor:pointer;min-width:28px;transition:all 0.2s ease}button.active{color:var(--emw--color-typography-normalized, #fff);background:var(--emw--color-primary, #0d196e);border-color:var(--emw--color-primary, #0d196e);font-weight:600}button:not(.arrow-btn):hover{background:var(--emw--color-secondary, #405c8b);border-color:var(--emw--color-secondary, #405c8b)}button:disabled{cursor:not-allowed;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));background:var(--emw--color-background-secondary, #f5f5f5);user-select:none}.ellipsis{font-weight:500;color:var(--emw--color-typography, #000);border:none}select{padding:6px 10px;border-radius:6px;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));font-size:14px}.jump-box{display:flex;align-items:center;gap:6px;margin-left:10px}.jump-box input{width:50px;padding:4px 8px;font-size:14px;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));border-radius:6px;text-align:center}.total-num{user-select:none;font-size:14px;color:var(--emw--color-typography, #000)}";var Pl=function(){return Pl=Object.assign||function(t){for(var e,i=1,s=arguments.length;i<s;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Pl.apply(this,arguments)},Nl={primaryColor:"#333",secondaryColor:"#E6E6E6"};function jl(t,e){if(void 0===e&&(e={}),"function"==typeof t.icon){var i=e.placeholders||Nl;return Fl(t.icon(i.primaryColor,i.secondaryColor),e)}return Fl(t.icon,e)}function Fl(t,e){var i="svg"===t.tag?Pl(Pl({},t.attrs),e.extraSVGAttrs||{}):t.attrs,s=Object.keys(i).reduce((function(t,e){var s=i[e],o="".concat(e,'="').concat(s,'"');return t.push(o),t}),[]),o=s.length?" "+s.join(" "):"",r=(t.children||[]).map((function(t){return Fl(t,e)})).join("");return r&&r.length?"<".concat(t.tag).concat(o,">").concat(r,"</").concat(t.tag,">"):"<".concat(t.tag).concat(o," />")}const $l=jl({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},{extraSVGAttrs:{width:"16px",height:"16px",fill:"currentColor"}}),Ll=class{constructor(i){t(this,i),this.handleActive=e(this,"active",7),this.togglePanel=()=>{this.expanded=!this.expanded,this.expanded&&this.handleActive.emit()},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.headerTitle=void 0,this.expanded=!1}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&n(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&&n(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return i("div",{key:"1f4a9acd322ebb2359295b2b760d235fedd76d41",class:"panel-container",ref:t=>this.stylingContainer=t},i("div",{key:"04e4254aa554f2f9b6509ff323983d5b7ce6cd27",class:{"panel-header":!0,active:this.expanded},onClick:this.togglePanel},i("div",{key:"8907e3c309143a2d37eaf73edddc2826f9e002d8",class:"header-content"},i("slot",{key:"0e2ed65db1fb3c8bc3987c969aca568a161fdd39",name:"header"},i("span",{key:"c476d5ccad0ef69376c415518982032e1d4ea737"},this.headerTitle))),i("span",{key:"705b87f6a01972f483bdea80cc3a4c4caff284d9",class:"arrow "+(this.expanded?"expanded":""),innerHTML:$l})),i("div",{key:"7704edb816e0c6300c62a5964d12a99d57c6b5a8",class:"panel-body "+(this.expanded?"open":"closed")},i("slot",{key:"92546bc7a9751c8f8717174eb5ff1771da73c7c0",name:"content"})))}get el(){return o(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};Ll.style=".panel-container{border:1px solid var(--emw--color-typography, #000);border-radius:12px;overflow:hidden;font-family:sans-serif;width:100%}.panel-header{background-color:var(--emw--color-background, #fff);padding:12px 16px;display:flex;align-items:center;justify-content:space-between;cursor:pointer;font-size:14px;color:var(--emw--color-typography, #000)}.panel-header:hover{background-color:var(--emw--color-primary, #0d196e);color:var(--emw--color-typography-normalized, #fff)}.panel-header.active{background-color:var(--emw--color-primary, #0d196e);color:var(--emw--color-typography-normalized, #fff)}.header-content{white-space:nowrap;user-select:none}.arrow{transition:transform 0.3s ease;font-size:16px;display:inline-flex}.arrow.expanded{transform:rotate(180deg)}.panel-body{overflow:hidden;max-height:0;transition:max-height 0.3s ease, padding 0.3s ease;background-color:var(--emw--color-background, #fff);padding:0 16px;font-size:14px;line-height:1.6}.panel-body.open{max-height:500px;padding:16px}.panel-body.closed{max-height:0;padding-top:0;padding-bottom:0}";const Rl=class{constructor(e){t(this,e),this.ticketTypeMap={NORMAL:"normal",SYNDICATE:"syndicate",SUBSCRIPTION:"subscription"},this.resultMap={[u.WON]:"win",[u.LOST]:"lose"},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.endpoint=void 0,this.gameId=void 0,this.defaultTicketHistory="",this.isLoading=!1,this.dialogVisible=!1,this.dialogData={},this.ticketHistory=[]}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&n(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&a(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}handleDefaultTicketHistoryChange(t,e){t!=e&&(this.ticketHistory=t?JSON.parse(t):[])}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&n(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}showTicketLineDetail(t){this.dialogData.draw=null,this.dialogData.ticket={gameId:t.vendorGameId,drawId:t.startingDrawId,results:p(t),splitView:!0},this.dialogVisible=!0}handleShowCurrentDraw(t,e){this.dialogData.ticket=null,this.dialogData.draw={gameId:t.vendorGameId,drawId:e.id,results:m(e),header:v(e.date),splitView:!1},this.dialogVisible=!0}renderLoading(){return i("div",{class:"loading-wrap"},i("section",{class:"dots-container"},i("div",{class:"dot"}),i("div",{class:"dot"}),i("div",{class:"dot"}),i("div",{class:"dot"}),i("div",{class:"dot"})))}renderEmpty(){return i("div",{class:"empty-wrap"},h("noData",this.language))}async handleActive(t,e){const i=await f({endpoint:this.endpoint,gameId:t.gameId,drawResults:t.drawResults});this.ticketHistory[e]=Object.assign(Object.assign({},this.ticketHistory[e]),{drawResults:i}),this.ticketHistory=[...this.ticketHistory]}renderSettledInfo(t){var e;return null===(e=t.drawResults)||void 0===e?void 0:e.map((e=>i("div",{class:"draw-info-container"},e.tempDrawData?i("div",{class:"draw-info"},i("div",{class:"draw-info-item"},i("div",{class:"draw-info-label"},h("ticketResult",this.language)),i("div",{class:"draw-info-val"},h(this.resultMap[e.state],this.language))),i("div",{class:"draw-info-item"},i("div",{class:"draw-info-label"},h("drawId",this.language)),i("div",{class:"draw-info-val"},e.drawId)),i("div",{class:"draw-info-item"},i("div",{class:"draw-info-label"},h("drawDate",this.language)),i("div",{class:"draw-info-val"},b(new Date(e.tempDrawData.date),"dd/MM/yyyy"))),i("div",{class:"draw-info-item"},i("div",{class:"draw-info-label"},h("result",this.language)),i("div",{class:"draw-info-val"},i("span",{class:"show-detail-link",onClick:()=>this.handleShowCurrentDraw(t,e.tempDrawData)},h("seeDetails",this.language)))),e.state===u.WON&&i("div",{class:"draw-info-item"},i("div",{class:"draw-info-label"},h("prize",this.language)),i("div",{class:"draw-info-val1"},i("div",{style:{height:"20px"}}),e.prizeDetails.map((t=>i("span",null,i("div",null,i("span",{class:"draw-info-val__item"},t.prizeName,t.times>1?" x "+t.times:"",":"," "),i("span",{class:"draw-info-val__item",style:{"margin-right":"4px"}},g(t.amount)),i("span",{class:"draw-info-val__item"},t.currency)))))))):i("div",{class:"draw-info-skeleton"},[...Array(5)].map((()=>i("div",{class:"skeleton-line"})))))))}renderPopUpDetail(){return this.dialogVisible?i("lottery-tipping-dialog",{visible:this.dialogVisible,width:c(window.navigator.userAgent)?void 0:"720px",fullscreen:c(window.navigator.userAgent),closable:!0,showFooter:!1,onCancel:()=>{this.dialogVisible=!1},language:this.language,"translation-url":this.translationUrl},i((()=>{var t,e,s,o;if((null===(t=this.dialogData)||void 0===t?void 0:t.draw)||(null===(e=this.dialogData)||void 0===e?void 0:e.ticket)){const t=(null===(s=this.dialogData)||void 0===s?void 0:s.draw)||(null===(o=this.dialogData)||void 0===o?void 0:o.ticket);return i("div",null,t.header&&i("div",{class:"popup-content-container__header"},i("span",{class:"popup-content-container__header-item"},t.header)),i("lottery-oddsbom-ticket-result",{language:this.language,"mb-source":this.mbSource,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"translation-url":this.translationUrl,endpoint:this.endpoint,"game-id":t.gameId,"draw-id":t.drawId,"default-results":JSON.stringify(t.results),"split-view":t.splitView}))}return null}),null)):null}render(){return this.isLoading?this.renderLoading():0===this.ticketHistory.length?this.renderEmpty():i("div",{ref:t=>this.stylingContainer=t,class:"history-list-container"},i("div",{class:"ticket-list-wrap"},this.ticketHistory.map(((t,e)=>i("general-panel",{"header-title":b(new Date(t.createdAt),"dd/MM/yyyy HH:mm:ss")+" "+t.state,onActive:this.handleActive.bind(this,t,e)},i("div",{class:"panel-content",slot:"content"},i("div",{class:"ticket-info"},i("div",{class:"ticket-info-item"},i("div",{class:"ticket-info-label"},h("ticketId",this.language)),i("div",{class:"ticket-info-val"},t.id," ")),i("div",{class:"ticket-info-item"},i("div",{class:"ticket-info-label"},h("ticketType",this.language)),i("div",{class:"ticket-info-val"},h(this.ticketTypeMap[t.wagerType],this.language)," ")),i("div",{class:"ticket-info-item"},i("div",{class:"ticket-info-label"},h("ticketAmount",this.language)),i("div",{class:"ticket-info-val"},`${t.amount} ${t.currency}`)),i("div",{class:"ticket-info-item"},i("div",{class:"ticket-info-label"},h("lineDetail",this.language)),i("div",{class:"ticket-info-val"},i("span",{class:"show-detail-link",onClick:()=>this.showTicketLineDetail(t)},h("seeDetails",this.language)))),i("div",{class:"ticket-info-item"},i("div",{class:"ticket-info-label"},h("numberOfDraw",this.language)),i("div",{class:"ticket-info-val"},t.drawCount))),"Settled"==t.state&&this.renderSettledInfo(t)))))),this.renderPopUpDetail())}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],defaultTicketHistory:["handleDefaultTicketHistoryChange"]}}};Rl.style=".ticket-list-wrap{display:flex;flex-direction:column;gap:12px}.ticket-list-wrap .ticket-info{display:flex;flex-direction:column;gap:12px}.ticket-list-wrap .ticket-info-item{display:flex;align-items:center;user-select:none}.ticket-list-wrap .ticket-info-label{margin-right:12px;color:var(--emw--color-typography, #000)}.ticket-list-wrap .ticket-info-val{color:var(--emw--color-typography-secondary, #555)}.loading-wrap{margin:20px 0;display:flex;align-items:center;justify-content:center;min-height:100px}.loading-wrap .dots-container{display:flex;align-items:center;justify-content:center;height:100%;width:100%}.loading-wrap .dot{height:14px;width:14px;margin-right:14px;border-radius:14px;background-color:var(--emw--color-gray-300, #333);animation:pulse 1.5s infinite ease-in-out}.loading-wrap .dot:last-child{margin-right:0}.loading-wrap .dot:nth-child(1){animation-delay:-0.3s}.loading-wrap .dot:nth-child(2){animation-delay:-0.1s}.loading-wrap .dot:nth-child(3){animation-delay:0.1s}@keyframes pulse{0%{transform:scale(0.8);background-color:var(--emw--color-gray-300, #333)}50%{transform:scale(1.2);background-color:var(--emw--color-gray-100, #e6e6e6)}100%{transform:scale(0.8);background-color:var(--emw--color-gray-150, #6f6f6f)}}.empty-wrap{margin:20px 0;display:flex;align-items:center;justify-content:center;min-height:100px;color:var(--emw--color-typography, #000)}.draw-info{width:30%;min-width:300px;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));border-radius:5px;padding:12px;margin-top:20px;display:flex;flex-direction:column;gap:8px;user-select:none}.draw-info-item{display:flex}.draw-info-label{margin-right:6px;color:var(--emw--color-typography, #000)}.draw-info-val{color:var(--emw--color-typography-secondary, #555)}.draw-info-skeleton{width:30%;min-width:300px;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));border-radius:5px;display:flex;flex-direction:column;gap:10px;padding:10px}.skeleton-line{height:16px;border-radius:4px;background:linear-gradient(90deg, var(--emw--color-gray-100, #e6e6e6) 25%, var(--emw--color-gray-50, #f5f5f5) 50%, var(--emw--color-gray-100, #e6e6e6) 75%);background-size:200% 100%;animation:skeleton-loading 1.2s infinite}.show-detail-link{color:var(--emw-pool-game-acition-normal, #4a90e2);text-decoration:underline;cursor:pointer}.popup-content-container__header{display:flex;justify-content:center;margin-bottom:10px}.popup-content-container__header-item{border:1px solid var(--emw--color-gray-100, #e6e6e6);padding:8px;display:inline-block;color:var(--emw--color-typography, #000)}";const Vl=jl({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 256H736v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zm-200 0H360v-72h304v72z"}}]},name:"delete",theme:"filled"},{extraSVGAttrs:{width:"18px",height:"18px",fill:""}}),Ul=class{constructor(i){t(this,i),this.oddsbomBulletToggleEvent=e(this,"oddsbomBulletToggle",7),this.oddsbomBulletDeleteEvent=e(this,"oddsbomBulletDelete",7),this.oddsbomBulletAddedByMoreBtnDeleteEvent=e(this,"oddsbomBulletAddedByMoreBtnDelete",7),this.oddsbomBulletCallDialogEvent=e(this,"oddsbomBulletCallDialog",7),this.isSelected=void 0,this.disabled=void 0,this.text=void 0,this.idx=void 0,this.isReading=void 0,this.isDeleteByIcon=void 0,this.isCallDialogBtn=void 0,this.isAddedByMoreBtn=void 0,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&n(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&&n(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleClick(){this.isCallDialogBtn?this.oddsbomBulletCallDialogEvent.emit():this.isDeleteByIcon?this.isAddedByMoreBtn?this.oddsbomBulletAddedByMoreBtnDeleteEvent.emit(this.text):this.oddsbomBulletDeleteEvent.emit(this.idx):this.disabled||this.oddsbomBulletToggleEvent.emit(this.idx)}render(){return i("div",{key:"e21cf46108e35dcbf7d65e8c6a5f12f5d5ae49cb",class:"OddsbomBullet",ref:t=>this.stylingContainer=t},i("button",{key:"4edf5cd481d8283bd71f6806b6f93949e1308095",class:{OddsbomBulletBtn__normal:!0,OddsbomBulletBtn__selected:this.isSelected,OddsbomBulletBtn__disabled:this.disabled,isDeleteByIcon:this.isDeleteByIcon,isCallDialogBtn:this.isCallDialogBtn||this.isReading},onClick:this.handleClick.bind(this),disabled:this.disabled},i("span",{key:"fa1aed0293dc004808e6992c069d6992317b0788",class:"OddsbomBullet--deleteIcon",innerHTML:Vl}),i("span",{key:"53ed96f2c2b833d21488049f987b6131718d563e",class:"OddsbomBullet--text"},this.text)))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};async function Hl({endpoint:t,gameId:e,drawId:i,results:s,splitView:o=!1}){const r=await async function({endpoint:t,gameId:e,drawId:i}){try{return await function(t,e="GET",i=null,s={}){return new Promise(((o,r)=>{const n=Object.assign({"Content-Type":"application/json"},s),a={method:e,headers:n,body:null};i&&"GET"!==e&&"HEAD"!==e?a.body=JSON.stringify(i):delete a.body,fetch(t,a).then((t=>t.ok?t.json():t.json().then((e=>{r({status:t.status,statusText:t.statusText,code:e.code||"UNKNOWN_ERROR",message:e.message||"An unknown error occurred",data:e.data||null})}),(()=>r({status:t.status,statusText:t.statusText,code:"PARSE_ERROR",message:"Failed to parse error response"}))))).then((t=>o(t)),(t=>r(t)))}))}(`${t}/poolgames/${e}/draws/${i}/matchConfig`)||[]}catch(t){console.log(t)}}({endpoint:t,gameId:e,drawId:i});return o?r.reduce(((t,e,i)=>{const[o,r]=(n=e.eventName)?n.split("vs").map((t=>t.trim())):"";var n;const[a,l]=function(t){const e=new Set,i=new Set;for(const s of t){const[t,o]=s.split(":");e.has(t)||e.add(t),i.has(t)||i.add(o)}return[Array.from(e),Array.from(i)]}(s[i]||[]);return null==t||t.push({index:i+1,teamName:o,startTime:e.startTime,results:a}),null==t||t.push({index:i+1,teamName:r,startTime:e.startTime,results:l}),t}),[])||[]:r.map(((t,e)=>({index:e+1,eventName:t.eventName,startTime:t.startTime,results:s[e]||[]})))}Ul.style=".OddsbomBullet .OddsbomBulletBtn__normal{width:32px;height:32px;display:flex;align-items:center;justify-content:center;background:var(--emw--color-background, #fff);border:2px solid var(--emw--color-primary, #0d196e);border-radius:var(--emw--border-radius-medium, 8px);color:var(--emw--color-typography, #000);font-weight:bold;cursor:pointer;transition:transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.2s ease, background-color 0.3s;user-select:none;position:relative}.OddsbomBullet .OddsbomBulletBtn__normal:hover{transform:scale(1.15) rotate(-5deg);box-shadow:var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15)) 7px 6px 6px}.OddsbomBullet .OddsbomBulletBtn__normal .OddsbomBullet--deleteIcon{display:none}.OddsbomBullet .OddsbomBulletBtn__normal.isDeleteByIcon:hover{background-color:var(--emw--color-background, #fff)}.OddsbomBullet .OddsbomBulletBtn__normal.isDeleteByIcon:hover .OddsbomBullet--text{display:none}.OddsbomBullet .OddsbomBulletBtn__normal.isDeleteByIcon:hover .OddsbomBullet--deleteIcon{display:inline;fill:var(--emw--color-typography, #000)}.OddsbomBullet .OddsbomBulletBtn__normal.isCallDialogBtn:hover{transform:none;box-shadow:none}.OddsbomBullet .OddsbomBulletBtn__normal.OddsbomBulletBtn__selected{background-color:var(--emw--color-primary, #0d196e);color:var(--emw--color-typography-inverse, #fff);transform:scale(1.05);box-shadow:0 5px 10px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15))}.OddsbomBullet .OddsbomBulletBtn__normal.OddsbomBulletBtn__disabled{background-color:var(--emw--color-gray-50, #f5f5f5);border-color:var(--emw--color-gray-100, #e6e6e6);color:var(--emw--color-gray-150, #6f6f6f);cursor:not-allowed;transform:none;box-shadow:none}.OddsbomBullet .OddsbomBulletBtn__normal.OddsbomBulletBtn__disabled:hover{transform:none;box-shadow:none}";const ql=["ro","en","fr","ar","hr"],Wl={en:{filter:"Filter",clear:"Clear",searchByTicketId:"Search by Ticket ID",enterTicketId:"Enter Ticket ID",searchByTicketType:"Search by Ticket Type",selectTicketType:"Select Ticket Type",searchByDate:"Search by Date",from:"From",to:"To",normal:"Normal",subscription:"Subscription",ticketsHistory:"Tickets History",settled:"Settled",purchased:"Purchased",canceled:"Canceled",noData:"No data Avaliable.",ticketId:"Ticket ID:",ticketType:"Ticket Type:",ticketAmount:"Ticket Amount:",lineDetail:"Line Detail:",seeDetails:"See Details",numberOfDraw:"Number of Draw:",ticketResult:"Ticket Result:",drawId:"Draw ID:",drawDate:"Draw Date:",result:"Result:",prize:"Prize:",bettingType:"Betting Type:"},ro:{ticketsHistory:"Istoric bilete",settled:"Decontat",purchased:"Achiziționat",canceled:"Anulat",noData:"Nu sunt date disponibile.",ticketId:"ID bilet:",ticketType:"Tip bilet:",ticketAmount:"Suma biletului:",lineDetail:"Detaliu linie:",seeDetails:"Vezi detalii",numberOfDraw:"Număr de extrageri:",ticketResult:"Rezultat bilet:",drawId:"ID extragere:",drawDate:"Data extragerii:",result:"Rezultat:",prize:"Premiu:",bettingType:"Tip de pariu:"},fr:{ticketsHistory:"Historique des billets",settled:"Réglé",purchased:"Acheté",canceled:"Annulé",noData:"Aucune donnée disponible.",ticketId:"ID du billet:",ticketType:"Type de billet:",ticketAmount:"Montant du billet:",lineDetail:"Détail de la ligne:",seeDetails:"Voir les détails",numberOfDraw:"Nombre de tirages:",ticketResult:"Résultat du billet:",drawId:"ID du tirage:",drawDate:"Date du tirage:",result:"Résultat:",prize:"Prix:",bettingType:"Type de pari:"},ar:{ticketsHistory:"سجل التذاكر",settled:"تمت التسوية",purchased:"تم شراؤها",canceled:"تم الإلغاء",noData:"لا توجد بيانات متاحة.",ticketId:"معرف التذكرة:",ticketType:"نوع التذكرة:",ticketAmount:"مبلغ التذكرة:",lineDetail:"تفاصيل الخط:",seeDetails:"انظر التفاصيل",numberOfDraw:"عدد السحوبات:",ticketResult:"نتيجة التذكرة:",drawId:"معرف السحب:",drawDate:"تاريخ السحب:",result:"النتيجة:",prize:"الجائزة:",bettingType:"نوع الرهان:"},hr:{ticketsHistory:"Povijest listića",settled:"Riješeno",purchased:"Kupljeno",canceled:"Otkazano",noData:"Nema dostupnih podataka.",ticketId:"ID listića:",ticketType:"Vrsta listića:",ticketAmount:"Iznos listića:",lineDetail:"Detalji linije:",seeDetails:"Vidi detalje",numberOfDraw:"Broj izvlačenja:",ticketResult:"Rezultat listića:",drawId:"ID izvlačenja:",drawDate:"Datum izvlačenja:",result:"Rezultat:",prize:"Nagrada:",bettingType:"Vrsta oklade:"}},Gl=class{constructor(e){t(this,e),this.latestRequestId=0,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.sessionId=void 0,this.endpoint="",this.gameId=void 0,this.drawId=void 0,this.defaultResults=void 0,this.splitView=!1,this.allResults=void 0,this.ticketBetDataSource=[],this.isLoading=!1}handleClientStylingChange(t,e){t!==e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!==e&&n(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&&n(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentWillLoad(){(async t=>{if(t)try{const i=await fetch(t);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const s=await i.json();e=s,Object.keys(e).forEach((t=>{for(let i in e[t])Wl[t][i]=e[t][i]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl),this.fetchMatchData()}async fetchMatchData(){const t=++this.latestRequestId;if(this.gameId&&this.drawId)try{this.defaultResults&&(this.allResults=JSON.parse(this.defaultResults)),this.isLoading=!0;const e=await Hl({endpoint:this.endpoint,gameId:this.gameId,drawId:this.drawId,results:this.allResults||[[]],splitView:this.splitView});t===this.latestRequestId&&(this.ticketBetDataSource=e)}finally{t===this.latestRequestId&&(this.isLoading=!1)}}get columns(){const t=(t,e)=>(({date:t,type:e="date",format:i})=>{try{const s=y(t);if(isNaN(s.getTime()))throw new Error(`Invalid date: ${t}`);if(i)return b(s,i);let o="dd/MM/yyyy";return"time"===e?o="dd/MM/yyyy HH:mm:ss":"week"===e&&(o="ccc dd/MM/yyyy HH:mm:ss"),b(s,o)}catch(t){return console.error("Error formatting date:",t.message),""}})({date:e,format:"ccc dd/MM HH:mm"});return this.splitView?[{title:"No.",value:"index",width:5,rowSpan:2},{title:"Date",value:"startTime",width:25,rowSpan:2,nowrap:!0,render:t},{title:"Team",value:"teamName",width:30},{title:"Scores",value:"results",width:45,render:(t,e)=>i("div",{class:"flex gap-1"},e.map((t=>i("lottery-oddsbom-bullet",{text:t,"is-reading":!0,"is-selected":!0}))))}]:[{title:"Match",value:"eventName",width:50,render:(t,e)=>i("div",{class:"flex gap-1 eventNameContainer__item"},i("span",{class:"eventNameContainer__item--title"},e))},{title:"Date",value:"startTime",width:25,nowrap:!0,render:t},{title:"Match Result",value:"results",width:25,render:(t,e)=>i("div",null,null==e?void 0:e[0])}]}renderLoading(){return i("div",{class:"loading-wrap"},i("section",{class:"dots-container"},i("div",{class:"dot"}),i("div",{class:"dot"}),i("div",{class:"dot"}),i("div",{class:"dot"}),i("div",{class:"dot"})))}renderEmpty(){return i("div",{class:"LotteryTippingTicketBet__empty"},i("p",null,(()=>{const t=this.language;let e=Wl[void 0!==t&&ql.includes(t)?t:"en"].noData;return e})()))}renderTable({columns:t,dataSource:e,hideHead:s=!1,grid:o=!0,bordered:r=!0}){const n={};return i("table",{class:{bordered:r,grid:o,"my-table-component":!0}},!s&&i("thead",null,i("tr",null,t.map((t=>{var e;return i("th",{key:t.value,style:{width:t.width+"%",textAlign:t.align}},"string"==typeof t.title?t.title:null===(e=t.title)||void 0===e?void 0:e.call(t))})))),i("tbody",null,e.map(((e,s)=>i("tr",{key:s},t.map((t=>{if(n[t.value]&&n[t.value]>0)return n[t.value]--,null;const o=t.rowSpan;return o&&o>1&&(n[t.value]=o-1),i("td",{key:t.value,rowSpan:o,style:{width:t.width+"%",textAlign:t.align},class:{"no-wrap":t.nowrap}},t.render?t.render(e,e[t.value],s):e[t.value])})))))))}renderContent(){return this.isLoading?this.renderLoading():this.ticketBetDataSource&&0!==this.ticketBetDataSource.length?i("div",{class:"flex align-center LotteryTippingTicketBet__main"},this.renderTable({columns:this.columns,dataSource:this.ticketBetDataSource||[],hideHead:!1,grid:!1,bordered:!1})):this.renderEmpty()}render(){return i("div",{key:"9932926b2958b13636d617cc20a0c77a76a36ebe",ref:t=>this.stylingContainer=t,class:"LotteryTippingTicketBet__container"},this.renderContent())}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],gameId:["fetchMatchData"],drawId:["fetchMatchData"],defaultResults:["fetchMatchData"]}}};Gl.style=".LotteryTippingTicketBet__container {\n display: block; /* Or inline-block, depending on desired layout flow */\n font-size: 14px;\n line-height: 1.5715;\n color: var(--emw--color-typography, #000);\n background: var(--emw--color-background, #fff);\n overflow: hidden;\n min-width: 300px;\n container-type: inline-size;\n}\n@container (max-width: 375px) {\n .LotteryTippingTicketBet__container {\n font-size: 12px;\n }\n}\n\n.my-table-component {\n width: 100%;\n border-collapse: collapse; /* Important for borders */\n text-align: left;\n border-radius: 0.1rem; /* Ant Design like subtle rounding */\n border-spacing: 0;\n}\n\n/* Header */\n.my-table-component th {\n background: var(--emw--color-background-secondary, #f5f5f5);\n color: var(--emw--color-typography, #000);\n font-weight: 600;\n padding: 0.4rem 0.5rem;\n transition: background 0.3s ease;\n}\n\n/* Cells */\n.my-table-component td {\n padding: 0.4rem 0.5rem;\n color: var(--emw--color-typography, #000);\n background: var(--emw--color-background, #fff);\n transition: background 0.3s;\n}\n@container (max-width: 400px) {\n .my-table-component td {\n padding: 0.3rem 0.3rem;\n }\n}\n\n.my-table-component.bordered th,\n.my-table-component.bordered td {\n border-bottom: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n/* Bordered style */\n.my-table-component.grid th,\n.my-table-component.grid td {\n border: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n.my-table-component.grid th {\n border-bottom-width: 1px; /* Ensure bottom border is consistent */\n}\n\n.my-table-component.grid {\n border: 1px solid var(--emw--color-gray-100, #e6e6e6); /* Outer border */\n border-right-width: 0;\n border-bottom-width: 0;\n}\n\n.my-table-component.grid th:last-child,\n.my-table-component.grid td:last-child {\n border-right: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n.my-table-component.grid tr:last-child td {\n border-bottom: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n/* Striped style */\n.my-table-component.striped tbody tr:nth-child(even) td {\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n}\n\n/* Hover (optional, but nice) */\n.my-table-component tbody tr:hover td {\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n}\n\n.flex {\n display: flex;\n}\n\n.justify-end {\n justify-content: flex-end;\n}\n\n.gap-1 {\n gap: 4px;\n}\n\n.justify-between {\n justify-content: space-between;\n}\n\n.align-center {\n align-items: center;\n}\n\n.gap-1 {\n gap: 0.5rem;\n}\n\n.match-info-item {\n display: flex;\n}\n\n.match-info-item-label {\n margin-right: 6px;\n}\n\n.info-icon:hover {\n cursor: pointer;\n}\n\n.LotteryTippingTicketBet__empty p {\n text-align: center;\n color: var(--emw--color-typography, #000);\n}\n\n.no-wrap {\n white-space: nowrap;\n overflow: hidden;\n}\n\n.eventNameContainer__item {\n line-height: 1rem;\n}\n.eventNameContainer__item--title {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 300px;\n}\n@container (max-width: 600px) {\n .eventNameContainer__item--title {\n max-width: 180px;\n }\n}\n@container (max-width: 500px) {\n .eventNameContainer__item--title {\n max-width: 150px;\n }\n}\n@container (max-width: 400px) {\n .eventNameContainer__item--title {\n max-width: 100px;\n }\n}\n@container (max-width: 330px) {\n .eventNameContainer__item--title {\n max-width: 70px;\n }\n}\n\n.LotteryTippingTicketBet__main {\n perspective: 800px;\n will-change: transform, opacity;\n backface-visibility: hidden;\n}\n\n@container (max-width: 520px) {\n .LotteryTippingTicketBet__main {\n flex-wrap: wrap;\n justify-content: center;\n }\n}\n.loading-wrap {\n margin: 20px 0;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 100px;\n}\n.loading-wrap .dots-container {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n}\n.loading-wrap .dot {\n height: 14px;\n width: 14px;\n margin-right: 14px;\n border-radius: 14px;\n background-color: var(--emw--color-gray-300, #333);\n animation: pulse 1.5s infinite ease-in-out;\n}\n.loading-wrap .dot:last-child {\n margin-right: 0;\n}\n.loading-wrap .dot:nth-child(1) {\n animation-delay: -0.3s;\n}\n.loading-wrap .dot:nth-child(2) {\n animation-delay: -0.1s;\n}\n.loading-wrap .dot:nth-child(3) {\n animation-delay: 0.1s;\n}\n@keyframes pulse {\n 0% {\n transform: scale(0.8);\n background-color: var(--emw--color-gray-300, #333);\n }\n 50% {\n transform: scale(1.2);\n background-color: var(--emw--color-gray-100, #e6e6e6);\n }\n 100% {\n transform: scale(0.8);\n background-color: var(--emw--color-gray-150, #6f6f6f);\n }\n}";const Yl=["ro","en","fr","ar","hr"],Kl={en:{cancel:"Cancel",confirm:"Confirm"},ro:{cancel:"Anulează",confirm:"Confirmă"},fr:{cancel:"Annuler",confirm:"Confirmer"},ar:{cancel:"إلغاء",confirm:"تأكيد"},hr:{cancel:"Odustani",confirm:"Potvrdi"}},Jl=(t,e)=>{const i=e;return Kl[void 0!==i&&Yl.includes(i)?i:"en"][t]},Zl=class{constructor(i){t(this,i),this.open=e(this,"open",7),this.close=e(this,"close",7),this.confirm=e(this,"confirm",7),this.cancel=e(this,"cancel",7),this.wasVisible=!1,this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.visible=void 0,this.dialogTitle="",this.width="520px",this.closable=!0,this.mask=!0,this.maskClosable=!0,this.animationDuration=300,this.fullscreen=!1,this.showFooter=!0,this.showCancelBtn=!0,this.language="en",this.translationUrl=void 0,this.dialogClass=void 0,this.dialogStyle=void 0}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&n(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 s=await i.json();e=s,Object.keys(e).forEach((t=>{for(let i in e[t])Kl[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||{}),e=["dialog-wrapper",this.visible?"dialog-wrapper-visible":""],s=["mask",this.visible?"mask-enter":"mask-leave"],o=["dialog",this.visible?"dialog-enter":"dialog-leave",this.fullscreen?"fullscreen":"",this.dialogClass].filter(Boolean).join(" ");return i("div",{key:"306683c5190fa6dca57dcf75e52eca575c0215e7",class:e.join(" "),ref:t=>this.stylingContainer=t},i("div",{key:"8be097f3a86fcd9ad4e18c6ac56cafdcf249049b",class:s.join(" "),onClick:this.handleMaskClick.bind(this)}),i("div",{key:"87d2206d3e3d75fe0e0ef8a6afd8de5c20892ae6",part:"dialog",class:o,style:t,role:"dialog","aria-modal":"true","aria-labelledby":"dialog-title"},(this.dialogTitle||this.closable)&&i("div",{key:"04d54878aa24e0d9eb98bc921ea3edfacd6de3af",class:"dialog-header"},i("h2",{key:"f6f6c279de47e49cde86d0c907b9b40a115926b3",id:"dialog-title",class:"dialog-title"},this.dialogTitle),this.closable&&i("button",{key:"e1625473e5460cd667961923bf678c9a91b69c82",class:"close-btn",onClick:this.handleClose.bind(this)},"x")),i("div",{key:"fb0db8dd765832cf1d8e8b682131e4c97a93ac22",class:"dialog-content",style:{maxHeight:"calc(100vh - 62px)",overflowY:"auto"}},i("slot",{key:"75336f59c2a8fe6775fc12ed4e2e26ff6bb6b508"})),this.showFooter&&i("div",{key:"a305086a2830265317abb0fd6f59b4a053fd54a9",class:"dialog-footer"},i("slot",{key:"cb330ea63908002f4f8b4b8139d5843c2570302e",name:"footer"},this.showCancelBtn&&i("button",{key:"c3d2c15195e56efd6d388265e9ccb87030627b7b",class:"cancel-btn",onClick:this.handleClose.bind(this)},Jl("cancel",this.language)),i("button",{key:"af9c96b4e1ce82f9ecb73e2b9f4e93cba0382d76",class:"confirm-btn",onClick:this.handleConfirm.bind(this)},Jl("confirm",this.language))))))}get el(){return o(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};Zl.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;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)}}";export{El as filter_group,Bl as general_multi_select,Ml as general_pagination,Ll as general_panel,Rl as history_list,Ul as lottery_oddsbom_bullet,Gl as lottery_oddsbom_ticket_result,Zl as lottery_tipping_dialog}
@@ -1 +1 @@
1
- export{L as LotteryOddsbomTicketHistory}from"./lottery-oddsbom-ticket-history-24c1aa1b.js";import"./index-e66667d7.js";
1
+ export{L as LotteryOddsbomTicketHistory}from"./lottery-oddsbom-ticket-history-ba01bfe1.js";import"./index-e66667d7.js";
@@ -0,0 +1,9 @@
1
+ import{r as t,h as n}from"./index-e66667d7.js";const e="__WIDGET_GLOBAL_STYLE_CACHE__";function r(t,n){if(t){const e=document.createElement("style");e.innerHTML=n,t.appendChild(e)}}function i(t,n){if(!t||!n)return;const e=new URL(n);fetch(e.href).then((t=>t.text())).then((n=>{const e=document.createElement("style");e.innerHTML=n,t&&t.appendChild(e)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function o(t,n,r,i=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!i)return r=function(t,n){const e=document.createElement("style");return window.emMessageBus.subscribe(n,(n=>{t&&(e.innerHTML=n,t.appendChild(e))}))}(t,n),r;window[e]||(window[e]={}),r=function(t,n){return window.emMessageBus.subscribe(n,(r=>{if(!t)return;const i=t.getRootNode(),o=window[e];let a=o[n]?.sheet;a?o[n].refCount=o[n].refCount+1:(a=new CSSStyleSheet,a.replaceSync(r),o[n]={sheet:a,refCount:1});const u=i.adoptedStyleSheets||[];u.includes(a)||(i.adoptedStyleSheets=[...u,a])}))}(t,n);const o=r.unsubscribe.bind(r);return r.unsubscribe=()=>{if(window[e][n]){const t=window[e][n];t.refCount>1?t.refCount=t.refCount-1:delete window[e][n]}o()},r}var a,u,s,f;function c(t){return c="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},c(t)}function d(t){if(null===t||!0===t||!1===t)return NaN;var n=Number(t);return isNaN(n)?n:n<0?Math.ceil(n):Math.floor(n)}function h(t,n){if(n.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+n.length+" present")}function l(t){h(1,arguments);var n=Object.prototype.toString.call(t);return t instanceof Date||"object"===c(t)&&"[object Date]"===n?new Date(t.getTime()):"number"==typeof t||"[object Number]"===n?new Date(t):("string"!=typeof t&&"[object String]"!==n||"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))}!function(t){t.Lottery="Lottery",t.PoolGame="PoolGame"}(a||(a={})),function(t){t.Tipping="HomeDrawAway",t.Oddsbomben="CorrectScore"}(u||(u={})),function(t){t.Settled="Settled",t.Purchased="Purchased",t.Canceled="Canceled"}(s||(s={})),function(t){t.WON="Won",t.LOST="Lost"}(f||(f={}));var w={};function v(){return w}var m=6e4,g=36e5;function y(t){h(1,arguments);var n=l(t),e=n.getUTCDay(),r=(e<1?7:0)+e-1;return n.setUTCDate(n.getUTCDate()-r),n.setUTCHours(0,0,0,0),n}function b(t){h(1,arguments);var n=l(t),e=n.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(e+1,0,4),r.setUTCHours(0,0,0,0);var i=y(r),o=new Date(0);o.setUTCFullYear(e,0,4),o.setUTCHours(0,0,0,0);var a=y(o);return n.getTime()>=i.getTime()?e+1:n.getTime()>=a.getTime()?e:e-1}function p(t,n){var e,r,i,o,a,u,s,f;h(1,arguments);var c=v(),w=d(null!==(e=null!==(r=null!==(i=null!==(o=null==n?void 0:n.weekStartsOn)&&void 0!==o?o:null==n||null===(a=n.locale)||void 0===a||null===(u=a.options)||void 0===u?void 0:u.weekStartsOn)&&void 0!==i?i:c.weekStartsOn)&&void 0!==r?r:null===(s=c.locale)||void 0===s||null===(f=s.options)||void 0===f?void 0:f.weekStartsOn)&&void 0!==e?e:0);if(!(w>=0&&w<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=l(t),g=m.getUTCDay(),y=(g<w?7:0)+g-w;return m.setUTCDate(m.getUTCDate()-y),m.setUTCHours(0,0,0,0),m}function N(t,n){var e,r,i,o,a,u,s,f;h(1,arguments);var c=l(t),w=c.getUTCFullYear(),m=v(),g=d(null!==(e=null!==(r=null!==(i=null!==(o=null==n?void 0:n.firstWeekContainsDate)&&void 0!==o?o:null==n||null===(a=n.locale)||void 0===a||null===(u=a.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==i?i:m.firstWeekContainsDate)&&void 0!==r?r:null===(s=m.locale)||void 0===s||null===(f=s.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==e?e:1);if(!(g>=1&&g<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(w+1,0,g),y.setUTCHours(0,0,0,0);var b=p(y,n),N=new Date(0);N.setUTCFullYear(w,0,g),N.setUTCHours(0,0,0,0);var x=p(N,n);return c.getTime()>=b.getTime()?w+1:c.getTime()>=x.getTime()?w:w-1}function x(t,n){for(var e=t<0?"-":"",r=Math.abs(t).toString();r.length<n;)r="0"+r;return e+r}const M=function(t,n){var e=t.getUTCFullYear(),r=e>0?e:1-e;return x("yy"===n?r%100:r,n.length)},k=function(t,n){var e=t.getUTCMonth();return"M"===n?String(e+1):x(e+1,2)},D=function(t,n){return x(t.getUTCDate(),n.length)},S=function(t,n){return x(t.getUTCHours()%12||12,n.length)},E=function(t,n){return x(t.getUTCHours(),n.length)},T=function(t,n){return x(t.getUTCMinutes(),n.length)},P=function(t,n){return x(t.getUTCSeconds(),n.length)},j=function(t,n){var e=n.length,r=t.getUTCMilliseconds();return x(Math.floor(r*Math.pow(10,e-3)),n.length)};var O={G:function(t,n,e){var r=t.getUTCFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return e.era(r,{width:"abbreviated"});case"GGGGG":return e.era(r,{width:"narrow"});default:return e.era(r,{width:"wide"})}},y:function(t,n,e){if("yo"===n){var r=t.getUTCFullYear();return e.ordinalNumber(r>0?r:1-r,{unit:"year"})}return M(t,n)},Y:function(t,n,e,r){var i=N(t,r),o=i>0?i:1-i;return"YY"===n?x(o%100,2):"Yo"===n?e.ordinalNumber(o,{unit:"year"}):x(o,n.length)},R:function(t,n){return x(b(t),n.length)},u:function(t,n){return x(t.getUTCFullYear(),n.length)},Q:function(t,n,e){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"Q":return String(r);case"QQ":return x(r,2);case"Qo":return e.ordinalNumber(r,{unit:"quarter"});case"QQQ":return e.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(r,{width:"narrow",context:"formatting"});default:return e.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,n,e){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"q":return String(r);case"qq":return x(r,2);case"qo":return e.ordinalNumber(r,{unit:"quarter"});case"qqq":return e.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(r,{width:"narrow",context:"standalone"});default:return e.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,n,e){var r=t.getUTCMonth();switch(n){case"M":case"MM":return k(t,n);case"Mo":return e.ordinalNumber(r+1,{unit:"month"});case"MMM":return e.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(r,{width:"narrow",context:"formatting"});default:return e.month(r,{width:"wide",context:"formatting"})}},L:function(t,n,e){var r=t.getUTCMonth();switch(n){case"L":return String(r+1);case"LL":return x(r+1,2);case"Lo":return e.ordinalNumber(r+1,{unit:"month"});case"LLL":return e.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(r,{width:"narrow",context:"standalone"});default:return e.month(r,{width:"wide",context:"standalone"})}},w:function(t,n,e,r){var i=function(t,n){h(1,arguments);var e=l(t),r=p(e,n).getTime()-function(t,n){var e,r,i,o,a,u,s,f;h(1,arguments);var c=v(),l=d(null!==(e=null!==(r=null!==(i=null!==(o=null==n?void 0:n.firstWeekContainsDate)&&void 0!==o?o:null==n||null===(a=n.locale)||void 0===a||null===(u=a.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==i?i:c.firstWeekContainsDate)&&void 0!==r?r:null===(s=c.locale)||void 0===s||null===(f=s.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==e?e:1),w=N(t,n),m=new Date(0);return m.setUTCFullYear(w,0,l),m.setUTCHours(0,0,0,0),p(m,n)}(e,n).getTime();return Math.round(r/6048e5)+1}(t,r);return"wo"===n?e.ordinalNumber(i,{unit:"week"}):x(i,n.length)},I:function(t,n,e){var r=function(t){h(1,arguments);var n=l(t),e=y(n).getTime()-function(t){h(1,arguments);var n=b(t),e=new Date(0);return e.setUTCFullYear(n,0,4),e.setUTCHours(0,0,0,0),y(e)}(n).getTime();return Math.round(e/6048e5)+1}(t);return"Io"===n?e.ordinalNumber(r,{unit:"week"}):x(r,n.length)},d:function(t,n,e){return"do"===n?e.ordinalNumber(t.getUTCDate(),{unit:"date"}):D(t,n)},D:function(t,n,e){var r=function(t){h(1,arguments);var n=l(t),e=n.getTime();n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0);var r=n.getTime();return Math.floor((e-r)/864e5)+1}(t);return"Do"===n?e.ordinalNumber(r,{unit:"dayOfYear"}):x(r,n.length)},E:function(t,n,e){var r=t.getUTCDay();switch(n){case"E":case"EE":case"EEE":return e.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(r,{width:"short",context:"formatting"});default:return e.day(r,{width:"wide",context:"formatting"})}},e:function(t,n,e,r){var i=t.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(n){case"e":return String(o);case"ee":return x(o,2);case"eo":return e.ordinalNumber(o,{unit:"day"});case"eee":return e.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(i,{width:"short",context:"formatting"});default:return e.day(i,{width:"wide",context:"formatting"})}},c:function(t,n,e,r){var i=t.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(n){case"c":return String(o);case"cc":return x(o,n.length);case"co":return e.ordinalNumber(o,{unit:"day"});case"ccc":return e.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(i,{width:"narrow",context:"standalone"});case"cccccc":return e.day(i,{width:"short",context:"standalone"});default:return e.day(i,{width:"wide",context:"standalone"})}},i:function(t,n,e){var r=t.getUTCDay(),i=0===r?7:r;switch(n){case"i":return String(i);case"ii":return x(i,n.length);case"io":return e.ordinalNumber(i,{unit:"day"});case"iii":return e.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(r,{width:"short",context:"formatting"});default:return e.day(r,{width:"wide",context:"formatting"})}},a:function(t,n,e){var r=t.getUTCHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(r,{width:"narrow",context:"formatting"});default:return e.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,n,e){var r,i=t.getUTCHours();switch(r=12===i?"noon":0===i?"midnight":i/12>=1?"pm":"am",n){case"b":case"bb":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(r,{width:"narrow",context:"formatting"});default:return e.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,n,e){var r,i=t.getUTCHours();switch(r=i>=17?"evening":i>=12?"afternoon":i>=4?"morning":"night",n){case"B":case"BB":case"BBB":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(r,{width:"narrow",context:"formatting"});default:return e.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,n,e){if("ho"===n){var r=t.getUTCHours()%12;return 0===r&&(r=12),e.ordinalNumber(r,{unit:"hour"})}return S(t,n)},H:function(t,n,e){return"Ho"===n?e.ordinalNumber(t.getUTCHours(),{unit:"hour"}):E(t,n)},K:function(t,n,e){var r=t.getUTCHours()%12;return"Ko"===n?e.ordinalNumber(r,{unit:"hour"}):x(r,n.length)},k:function(t,n,e){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===n?e.ordinalNumber(r,{unit:"hour"}):x(r,n.length)},m:function(t,n,e){return"mo"===n?e.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):T(t,n)},s:function(t,n,e){return"so"===n?e.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):P(t,n)},S:function(t,n){return j(t,n)},X:function(t,n,e,r){var i=(r._originalDate||t).getTimezoneOffset();if(0===i)return"Z";switch(n){case"X":return W(i);case"XXXX":case"XX":return I(i);default:return I(i,":")}},x:function(t,n,e,r){var i=(r._originalDate||t).getTimezoneOffset();switch(n){case"x":return W(i);case"xxxx":case"xx":return I(i);default:return I(i,":")}},O:function(t,n,e,r){var i=(r._originalDate||t).getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+C(i,":");default:return"GMT"+I(i,":")}},z:function(t,n,e,r){var i=(r._originalDate||t).getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+C(i,":");default:return"GMT"+I(i,":")}},t:function(t,n,e,r){return x(Math.floor((r._originalDate||t).getTime()/1e3),n.length)},T:function(t,n,e,r){return x((r._originalDate||t).getTime(),n.length)}};function C(t,n){var e=t>0?"-":"+",r=Math.abs(t),i=Math.floor(r/60),o=r%60;if(0===o)return e+String(i);var a=n||"";return e+String(i)+a+x(o,2)}function W(t,n){return t%60==0?(t>0?"-":"+")+x(Math.abs(t)/60,2):I(t,n)}function I(t,n){var e=n||"",r=t>0?"-":"+",i=Math.abs(t);return r+x(Math.floor(i/60),2)+e+x(i%60,2)}const R=O;var $=function(t,n){switch(t){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});default:return n.date({width:"full"})}},L=function(t,n){switch(t){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});default:return n.time({width:"full"})}},A={p:L,P:function(t,n){var e,r=t.match(/(P+)(p+)?/)||[],i=r[1],o=r[2];if(!o)return $(t,n);switch(i){case"P":e=n.dateTime({width:"short"});break;case"PP":e=n.dateTime({width:"medium"});break;case"PPP":e=n.dateTime({width:"long"});break;default:e=n.dateTime({width:"full"})}return e.replace("{{date}}",$(i,n)).replace("{{time}}",L(o,n))}};const G=A;var Y=["D","DD"],q=["YY","YYYY"];function z(t,n,e){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(n,"`) for formatting years to the input `").concat(e,"`; 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(n,"`) for formatting years to the input `").concat(e,"`; 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(n,"`) for formatting days of the month to the input `").concat(e,"`; 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(n,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var B={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 Q(t){return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=n.width?String(n.width):t.defaultWidth;return t.formats[e]||t.formats[t.defaultWidth]}}var F,U={date:Q({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Q({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:Q({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},X={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function _(t){return function(n,e){var r;if("formatting"===(null!=e&&e.context?String(e.context):"standalone")&&t.formattingValues){var i=t.defaultFormattingWidth||t.defaultWidth,o=null!=e&&e.width?String(e.width):i;r=t.formattingValues[o]||t.formattingValues[i]}else{var a=t.defaultWidth,u=null!=e&&e.width?String(e.width):t.defaultWidth;r=t.values[u]||t.values[a]}return r[t.argumentCallback?t.argumentCallback(n):n]}}function H(t){return function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.width,i=n.match(r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth]);if(!i)return null;var o,a=i[0],u=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],s=Array.isArray(u)?function(t){for(var n=0;n<t.length;n++)if(t[n].test(a))return n}(u):function(t){for(var n in t)if(t.hasOwnProperty(n)&&t[n].test(a))return n}(u);return o=t.valueCallback?t.valueCallback(s):s,{value:o=e.valueCallback?e.valueCallback(o):o,rest:n.slice(a.length)}}}const J={code:"en-US",formatDistance:function(t,n,e){var r,i=B[t];return r="string"==typeof i?i:1===n?i.one:i.other.replace("{{count}}",n.toString()),null!=e&&e.addSuffix?e.comparison&&e.comparison>0?"in "+r:r+" ago":r},formatLong:U,formatRelative:function(t){return X[t]},localize:{ordinalNumber:function(t){var n=Number(t),e=n%100;if(e>20||e<10)switch(e%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:_({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:_({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:_({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:_({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:_({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:(F={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=t.match(F.matchPattern);if(!e)return null;var r=e[0],i=t.match(F.parsePattern);if(!i)return null;var o=F.valueCallback?F.valueCallback(i[0]):i[0];return{value:o=n.valueCallback?n.valueCallback(o):o,rest:t.slice(r.length)}}),era:H({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:H({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:H({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:H({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:H({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,K=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,V=/^'([^]*?)'?$/,tt=/''/g,nt=/[a-zA-Z]/;function et(t,n,e){var r,i,o,a,u,s,f,w,m,g,y,b,p,N,x,M,k,D;h(2,arguments);var S=String(n),E=v(),T=null!==(r=null!==(i=null==e?void 0:e.locale)&&void 0!==i?i:E.locale)&&void 0!==r?r:J,P=d(null!==(o=null!==(a=null!==(u=null!==(s=null==e?void 0:e.firstWeekContainsDate)&&void 0!==s?s:null==e||null===(f=e.locale)||void 0===f||null===(w=f.options)||void 0===w?void 0:w.firstWeekContainsDate)&&void 0!==u?u:E.firstWeekContainsDate)&&void 0!==a?a:null===(m=E.locale)||void 0===m||null===(g=m.options)||void 0===g?void 0:g.firstWeekContainsDate)&&void 0!==o?o:1);if(!(P>=1&&P<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var j=d(null!==(y=null!==(b=null!==(p=null!==(N=null==e?void 0:e.weekStartsOn)&&void 0!==N?N:null==e||null===(x=e.locale)||void 0===x||null===(M=x.options)||void 0===M?void 0:M.weekStartsOn)&&void 0!==p?p:E.weekStartsOn)&&void 0!==b?b:null===(k=E.locale)||void 0===k||null===(D=k.options)||void 0===D?void 0:D.weekStartsOn)&&void 0!==y?y:0);if(!(j>=0&&j<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!T.localize)throw new RangeError("locale must contain localize property");if(!T.formatLong)throw new RangeError("locale must contain formatLong property");var O=l(t);if(!function(t){if(h(1,arguments),!function(t){return h(1,arguments),t instanceof Date||"object"===c(t)&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t)return!1;var n=l(t);return!isNaN(Number(n))}(O))throw new RangeError("Invalid time value");var C=function(t){var n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),t.getTime()-n.getTime()}(O),W=function(t,n){return h(2,arguments),function(t,n){h(2,arguments);var e=l(t).getTime(),r=d(n);return new Date(e+r)}(t,-d(n))}(O,C),I={firstWeekContainsDate:P,weekStartsOn:j,locale:T,_originalDate:O};return S.match(K).map((function(t){var n=t[0];return"p"===n||"P"===n?(0,G[n])(t,T.formatLong):t})).join("").match(Z).map((function(r){if("''"===r)return"'";var i,o,a=r[0];if("'"===a)return(o=(i=r).match(V))?o[1].replace(tt,"'"):i;var u=R[a];if(u)return null!=e&&e.useAdditionalWeekYearTokens||-1===q.indexOf(r)||z(r,n,String(t)),null!=e&&e.useAdditionalDayOfYearTokens||!(-1!==Y.indexOf(r))||z(r,n,String(t)),u(W,r,T.localize,I);if(a.match(nt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+a+"`");return r})).join("")}function rt(t,n){var e;h(1,arguments);var r=d(null!==(e=null==n?void 0:n.additionalDigits)&&void 0!==e?e:2);if(2!==r&&1!==r&&0!==r)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!=typeof t&&"[object String]"!==Object.prototype.toString.call(t))return new Date(NaN);var i,o=function(t){var n,e={},r=t.split(it.dateTimeDelimiter);if(r.length>2)return e;if(/:/.test(r[0])?n=r[0]:(e.date=r[0],n=r[1],it.timeZoneDelimiter.test(e.date)&&(e.date=t.split(it.timeZoneDelimiter)[0],n=t.substr(e.date.length,t.length))),n){var i=it.timezone.exec(n);i?(e.time=n.replace(i[1],""),e.timezone=i[1]):e.time=n}return e}(t);if(o.date){var a=function(t,n){var e=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+n)+"})|(\\d{2}|[+-]\\d{"+(2+n)+"})$)"),r=t.match(e);if(!r)return{year:NaN,restDateString:""};var i=r[1]?parseInt(r[1]):null,o=r[2]?parseInt(r[2]):null;return{year:null===o?i:100*o,restDateString:t.slice((r[1]||r[2]).length)}}(o.date,r);i=function(t,n){if(null===n)return new Date(NaN);var e=t.match(ot);if(!e)return new Date(NaN);var r=!!e[4],i=st(e[1]),o=st(e[2])-1,a=st(e[3]),u=st(e[4]),s=st(e[5])-1;if(r)return function(t,n,e){return n>=1&&n<=53&&e>=0&&e<=6}(0,u,s)?function(t,n,e){var r=new Date(0);r.setUTCFullYear(t,0,4);var i=7*(n-1)+e+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+i),r}(n,u,s):new Date(NaN);var f=new Date(0);return function(t,n,e){return n>=0&&n<=11&&e>=1&&e<=(ct[n]||(dt(t)?29:28))}(n,o,a)&&function(t,n){return n>=1&&n<=(dt(t)?366:365)}(n,i)?(f.setUTCFullYear(n,o,Math.max(i,a)),f):new Date(NaN)}(a.restDateString,a.year)}if(!i||isNaN(i.getTime()))return new Date(NaN);var u,s=i.getTime(),f=0;if(o.time&&(f=function(t){var n=t.match(at);if(!n)return NaN;var e=ft(n[1]),r=ft(n[2]),i=ft(n[3]);return function(t,n,e){return 24===t?0===n&&0===e:e>=0&&e<60&&n>=0&&n<60&&t>=0&&t<25}(e,r,i)?e*g+r*m+1e3*i:NaN}(o.time),isNaN(f)))return new Date(NaN);if(!o.timezone){var c=new Date(s+f),l=new Date(0);return l.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),l.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),l}return u=function(t){if("Z"===t)return 0;var n=t.match(ut);if(!n)return 0;var e="+"===n[1]?-1:1,r=parseInt(n[2]),i=n[3]&&parseInt(n[3])||0;return function(t,n){return n>=0&&n<=59}(0,i)?e*(r*g+i*m):NaN}(o.timezone),isNaN(u)?new Date(NaN):new Date(s+f+u)}var it={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},ot=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,at=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,ut=/^([+-])(\d{2})(?::?(\d{2}))?$/;function st(t){return t?parseInt(t):1}function ft(t){return t&&parseFloat(t.replace(",","."))||0}var ct=[31,null,31,30,31,30,31,31,30,31,30,31];function dt(t){return t%400==0||t%4==0&&t%100!=0}function ht(t){t.i18n=Object.assign(Object.assign({},t.i18n),{formatDate:function(t){const{year:n,month:e,day:r}=t;return et(new Date(n,e,r),"dd/MM/yyyy")},parseDate:function(t){const[n,e,r]=t.split("/");return{year:r,month:parseInt(e)-1,day:n}}})}const lt=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=16*Math.random()|0;return("x"==t?n:3&n|8).toString(16)}));function wt(t,n="GET",e=null,r={}){return new Promise(((i,o)=>{const a=lt(),u=Object.assign({"Content-Type":"application/json"},r);"GET"!==n&&"HEAD"!==n&&(u["X-Idempotency-Key"]=a);const s={method:n,headers:u,body:null};e&&"GET"!==n&&"HEAD"!==n?s.body=JSON.stringify(e):delete s.body,fetch(t,s).then((t=>t.ok?t.json():t.json().then((n=>{o({status:t.status,statusText:t.statusText,code:n.code||"UNKNOWN_ERROR",message:n.message||"An unknown error occurred",data:n.data||null})}),(()=>o({status:t.status,statusText:t.statusText,code:"PARSE_ERROR",message:"Failed to parse error response"}))))).then((t=>i(t)),(t=>o(t)))}))}function vt(t,n){return null==t||""===t||(0!==t||!n)&&(Array.isArray(t)?function(t){if(0===t.length)return!0;const n=t.length;let e=0;for(let r=0;r<n;r++){if(!vt(t[r]))return!1;e++}return e===n}(t):"[object Object]"===Object.prototype.toString.call(t)?function(t){if(0===Object.keys(t).length)return!0;const n=Object.keys(t).length;let e=0;for(const n of Object.values(t)){if(!vt(n))return!1;e++}return e===n}(t):!t)}function mt(t){var n;if(0===t)return"0";if(!t)return"";const e=(t=t.toString()).split(".");return e[0]=null===(n=e[0])||void 0===n?void 0:n.replace(/\B(?=(\d{3})+(?!\d))/g,","),e.join(".")}const gt=t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));function yt(t){var n;return pt(null===(n=t.winningNumbers[0])||void 0===n?void 0:n.poolGameOutcomes)}function bt(t){const n=t.selection.map((t=>t.poolGameSelections));return pt(null==n?void 0:n[0])}function pt(t){return t&&t.length>0?t.map((t=>null==t?void 0:t[0])):[[]]}function Nt(t){const n=rt(t),e=n.getDate(),r=et(n,"EEEE"),i=et(n,"MMMM"),o=function(t){const n=t%100;if(n>=11&&n<=13)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}(e);return`${r} ${e}${o} ${i}`}var xt,Mt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},kt={exports:{}};xt=kt,function(t){
2
+ /*!
3
+ * decimal.js v10.6.0
4
+ * An arbitrary-precision Decimal type for JavaScript.
5
+ * https://github.com/MikeMcl/decimal.js
6
+ * Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
7
+ * MIT Licence
8
+ */
9
+ var n,e,r,i,o=9e15,a=1e9,u="0123456789abcdef",s="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",f="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",c={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-o,maxE:o,crypto:!1},d=!0,h="[DecimalError] ",l=h+"Invalid argument: ",w=h+"Precision limit exceeded",v=h+"crypto unavailable",m="[object Decimal]",g=Math.floor,y=Math.pow,b=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,p=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,N=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,x=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,M=1e7,k=7,D=s.length-1,S=f.length-1,E={toStringTag:m};function T(t){var n,e,r,i=t.length-1,o="",a=t[0];if(i>0){for(o+=a,n=1;n<i;n++)(e=k-(r=t[n]+"").length)&&(o+=G(e)),o+=r;(e=k-(r=(a=t[n])+"").length)&&(o+=G(e))}else if(0===a)return"0";for(;a%10==0;)a/=10;return o+a}function P(t,n,e){if(t!==~~t||t<n||t>e)throw Error(l+t)}function j(t,n,e,r){var i,o,a,u;for(o=t[0];o>=10;o/=10)--n;return--n<0?(n+=k,i=0):(i=Math.ceil((n+1)/k),n%=k),o=y(10,k-n),u=t[i]%o|0,null==r?n<3?(0==n?u=u/100|0:1==n&&(u=u/10|0),a=e<4&&99999==u||e>3&&49999==u||5e4==u||0==u):a=(e<4&&u+1==o||e>3&&u+1==o/2)&&(t[i+1]/o/100|0)==y(10,n-2)-1||(u==o/2||0==u)&&!(t[i+1]/o/100|0):n<4?(0==n?u=u/1e3|0:1==n?u=u/100|0:2==n&&(u=u/10|0),a=(r||e<4)&&9999==u||!r&&e>3&&4999==u):a=((r||e<4)&&u+1==o||!r&&e>3&&u+1==o/2)&&(t[i+1]/o/1e3|0)==y(10,n-3)-1,a}function O(t,n,e){for(var r,i,o=[0],a=0,s=t.length;a<s;){for(i=o.length;i--;)o[i]*=n;for(o[0]+=u.indexOf(t.charAt(a++)),r=0;r<o.length;r++)o[r]>e-1&&(void 0===o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/e|0,o[r]%=e)}return o.reverse()}E.absoluteValue=E.abs=function(){var t=new this.constructor(this);return t.s<0&&(t.s=1),W(t)},E.ceil=function(){return W(new this.constructor(this),this.e+1,2)},E.clampedTo=E.clamp=function(t,n){var e=this,r=e.constructor;if(t=new r(t),n=new r(n),!t.s||!n.s)return new r(NaN);if(t.gt(n))throw Error(l+n);return e.cmp(t)<0?t:e.cmp(n)>0?n:new r(e)},E.comparedTo=E.cmp=function(t){var n,e,r,i,o=this,a=o.d,u=(t=new o.constructor(t)).d,s=o.s,f=t.s;if(!a||!u)return s&&f?s!==f?s:a===u?0:!a^s<0?1:-1:NaN;if(!a[0]||!u[0])return a[0]?s:u[0]?-f:0;if(s!==f)return s;if(o.e!==t.e)return o.e>t.e^s<0?1:-1;for(n=0,e=(r=a.length)<(i=u.length)?r:i;n<e;++n)if(a[n]!==u[n])return a[n]>u[n]^s<0?1:-1;return r===i?0:r>i^s<0?1:-1},E.cosine=E.cos=function(){var t,n,e=this,r=e.constructor;return e.d?e.d[0]?(n=r.rounding,r.precision=(t=r.precision)+Math.max(e.e,e.sd())+k,r.rounding=1,e=function(t,n){var e,r,i;if(n.isZero())return n;(r=n.d.length)<32?i=(1/H(4,e=Math.ceil(r/3))).toString():(e=16,i="2.3283064365386962890625e-10"),t.precision+=e,n=_(t,1,n.times(i),new t(1));for(var o=e;o--;){var a=n.times(n);n=a.times(a).minus(a).times(8).plus(1)}return t.precision-=e,n}(r,J(r,e)),r.precision=t,r.rounding=n,W(2==i||3==i?e.neg():e,t,n,!0)):new r(1):new r(NaN)},E.cubeRoot=E.cbrt=function(){var t,n,e,r,i,o,a,u,s,f,c=this,h=c.constructor;if(!c.isFinite()||c.isZero())return new h(c);for(d=!1,(o=c.s*y(c.s*c,1/3))&&Math.abs(o)!=1/0?r=new h(o.toString()):(e=T(c.d),(o=((t=c.e)-e.length+1)%3)&&(e+=1==o||-2==o?"0":"00"),o=y(e,1/3),t=g((t+1)/3)-(t%3==(t<0?-1:2)),(r=new h(e=o==1/0?"5e"+t:(e=o.toExponential()).slice(0,e.indexOf("e")+1)+t)).s=c.s),a=(t=h.precision)+3;;)if(f=(s=(u=r).times(u).times(u)).plus(c),r=C(f.plus(c).times(u),f.plus(s),a+2,1),T(u.d).slice(0,a)===(e=T(r.d)).slice(0,a)){if("9999"!=(e=e.slice(a-3,a+1))&&(i||"4999"!=e)){+e&&(+e.slice(1)||"5"!=e.charAt(0))||(W(r,t+1,1),n=!r.times(r).times(r).eq(c));break}if(!i&&(W(u,t+1,0),u.times(u).times(u).eq(c))){r=u;break}a+=4,i=1}return d=!0,W(r,t,h.rounding,n)},E.decimalPlaces=E.dp=function(){var t,n=this.d,e=NaN;if(n){if(e=((t=n.length-1)-g(this.e/k))*k,t=n[t])for(;t%10==0;t/=10)e--;e<0&&(e=0)}return e},E.dividedBy=E.div=function(t){return C(this,new this.constructor(t))},E.dividedToIntegerBy=E.divToInt=function(t){var n=this.constructor;return W(C(this,new n(t),0,1,1),n.precision,n.rounding)},E.equals=E.eq=function(t){return 0===this.cmp(t)},E.floor=function(){return W(new this.constructor(this),this.e+1,3)},E.greaterThan=E.gt=function(t){return this.cmp(t)>0},E.greaterThanOrEqualTo=E.gte=function(t){var n=this.cmp(t);return 1==n||0===n},E.hyperbolicCosine=E.cosh=function(){var t,n,e,r,i,o=this,a=o.constructor,u=new a(1);if(!o.isFinite())return new a(o.s?1/0:NaN);if(o.isZero())return u;r=a.rounding,a.precision=(e=a.precision)+Math.max(o.e,o.sd())+4,a.rounding=1,(i=o.d.length)<32?n=(1/H(4,t=Math.ceil(i/3))).toString():(t=16,n="2.3283064365386962890625e-10"),o=_(a,1,o.times(n),new a(1),!0);for(var s,f=t,c=new a(8);f--;)s=o.times(o),o=u.minus(s.times(c.minus(s.times(c))));return W(o,a.precision=e,a.rounding=r,!0)},E.hyperbolicSine=E.sinh=function(){var t,n,e,r,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(e=o.rounding,o.precision=(n=o.precision)+Math.max(i.e,i.sd())+4,o.rounding=1,(r=i.d.length)<3)i=_(o,2,i,i,!0);else{t=1.4*Math.sqrt(r),i=_(o,2,i=i.times(1/H(5,t=t>16?16:0|t)),i,!0);for(var a,u=new o(5),s=new o(16),f=new o(20);t--;)a=i.times(i),i=i.times(u.plus(a.times(s.times(a).plus(f))))}return o.precision=n,o.rounding=e,W(i,n,e,!0)},E.hyperbolicTangent=E.tanh=function(){var t,n,e=this,r=e.constructor;return e.isFinite()?e.isZero()?new r(e):(n=r.rounding,r.precision=(t=r.precision)+7,r.rounding=1,C(e.sinh(),e.cosh(),r.precision=t,r.rounding=n)):new r(e.s)},E.inverseCosine=E.acos=function(){var t=this,n=t.constructor,e=t.abs().cmp(1),r=n.precision,i=n.rounding;return-1!==e?0===e?t.isNeg()?L(n,r,i):new n(0):new n(NaN):t.isZero()?L(n,r+4,i).times(.5):(n.precision=r+6,n.rounding=1,t=new n(1).minus(t).div(t.plus(1)).sqrt().atan(),n.precision=r,n.rounding=i,t.times(2))},E.inverseHyperbolicCosine=E.acosh=function(){var t,n,e=this,r=e.constructor;return e.lte(1)?new r(e.eq(1)?0:NaN):e.isFinite()?(n=r.rounding,r.precision=(t=r.precision)+Math.max(Math.abs(e.e),e.sd())+4,r.rounding=1,d=!1,e=e.times(e).minus(1).sqrt().plus(e),d=!0,r.precision=t,r.rounding=n,e.ln()):new r(e)},E.inverseHyperbolicSine=E.asinh=function(){var t,n,e=this,r=e.constructor;return!e.isFinite()||e.isZero()?new r(e):(n=r.rounding,r.precision=(t=r.precision)+2*Math.max(Math.abs(e.e),e.sd())+6,r.rounding=1,d=!1,e=e.times(e).plus(1).sqrt().plus(e),d=!0,r.precision=t,r.rounding=n,e.ln())},E.inverseHyperbolicTangent=E.atanh=function(){var t,n,e,r,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(t=o.precision,n=o.rounding,r=i.sd(),Math.max(r,t)<2*-i.e-1?W(new o(i),t,n,!0):(o.precision=e=r-i.e,i=C(i.plus(1),new o(1).minus(i),e+t,1),o.precision=t+4,o.rounding=1,i=i.ln(),o.precision=t,o.rounding=n,i.times(.5))):new o(NaN)},E.inverseSine=E.asin=function(){var t,n,e,r,i=this,o=i.constructor;return i.isZero()?new o(i):(n=i.abs().cmp(1),e=o.precision,r=o.rounding,-1!==n?0===n?((t=L(o,e+4,r).times(.5)).s=i.s,t):new o(NaN):(o.precision=e+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=e,o.rounding=r,i.times(2)))},E.inverseTangent=E.atan=function(){var t,n,e,r,i,o,a,u,s,f=this,c=f.constructor,h=c.precision,l=c.rounding;if(f.isFinite()){if(f.isZero())return new c(f);if(f.abs().eq(1)&&h+4<=S)return(a=L(c,h+4,l).times(.25)).s=f.s,a}else{if(!f.s)return new c(NaN);if(h+4<=S)return(a=L(c,h+4,l).times(.5)).s=f.s,a}for(c.precision=u=h+10,c.rounding=1,t=e=Math.min(28,u/k+2|0);t;--t)f=f.div(f.times(f).plus(1).sqrt().plus(1));for(d=!1,n=Math.ceil(u/k),r=1,s=f.times(f),a=new c(f),i=f;-1!==t;)if(i=i.times(s),o=a.minus(i.div(r+=2)),i=i.times(s),void 0!==(a=o.plus(i.div(r+=2))).d[n])for(t=n;a.d[t]===o.d[t]&&t--;);return e&&(a=a.times(2<<e-1)),d=!0,W(a,c.precision=h,c.rounding=l,!0)},E.isFinite=function(){return!!this.d},E.isInteger=E.isInt=function(){return!!this.d&&g(this.e/k)>this.d.length-2},E.isNaN=function(){return!this.s},E.isNegative=E.isNeg=function(){return this.s<0},E.isPositive=E.isPos=function(){return this.s>0},E.isZero=function(){return!!this.d&&0===this.d[0]},E.lessThan=E.lt=function(t){return this.cmp(t)<0},E.lessThanOrEqualTo=E.lte=function(t){return this.cmp(t)<1},E.logarithm=E.log=function(t){var n,e,r,i,o,a,u,s,f=this,c=f.constructor,h=c.precision,l=c.rounding;if(null==t)t=new c(10),n=!0;else{if(e=(t=new c(t)).d,t.s<0||!e||!e[0]||t.eq(1))return new c(NaN);n=t.eq(10)}if(e=f.d,f.s<0||!e||!e[0]||f.eq(1))return new c(e&&!e[0]?-1/0:1!=f.s?NaN:e?0:1/0);if(n)if(e.length>1)o=!0;else{for(i=e[0];i%10==0;)i/=10;o=1!==i}if(d=!1,a=Q(f,u=h+5),r=n?$(c,u+10):Q(t,u),j((s=C(a,r,u,1)).d,i=h,l))do{if(a=Q(f,u+=10),r=n?$(c,u+10):Q(t,u),s=C(a,r,u,1),!o){+T(s.d).slice(i+1,i+15)+1==1e14&&(s=W(s,h+1,0));break}}while(j(s.d,i+=10,l));return d=!0,W(s,h,l)},E.minus=E.sub=function(t){var n,e,r,i,o,a,u,s,f,c,h,l,w=this,v=w.constructor;if(t=new v(t),!w.d||!t.d)return w.s&&t.s?w.d?t.s=-t.s:t=new v(t.d||w.s!==t.s?w:NaN):t=new v(NaN),t;if(w.s!=t.s)return t.s=-t.s,w.plus(t);if(l=t.d,u=v.precision,s=v.rounding,!(f=w.d)[0]||!l[0]){if(l[0])t.s=-t.s;else{if(!f[0])return new v(3===s?-0:0);t=new v(w)}return d?W(t,u,s):t}if(e=g(t.e/k),c=g(w.e/k),f=f.slice(),o=c-e){for((h=o<0)?(n=f,o=-o,a=l.length):(n=l,e=c,a=f.length),o>(r=Math.max(Math.ceil(u/k),a)+2)&&(o=r,n.length=1),n.reverse(),r=o;r--;)n.push(0);n.reverse()}else{for((h=(r=f.length)<(a=l.length))&&(a=r),r=0;r<a;r++)if(f[r]!=l[r]){h=f[r]<l[r];break}o=0}for(h&&(n=f,f=l,l=n,t.s=-t.s),r=l.length-(a=f.length);r>0;--r)f[a++]=0;for(r=l.length;r>o;){if(f[--r]<l[r]){for(i=r;i&&0===f[--i];)f[i]=M-1;--f[i],f[r]+=M}f[r]-=l[r]}for(;0===f[--a];)f.pop();for(;0===f[0];f.shift())--e;return f[0]?(t.d=f,t.e=R(f,e),d?W(t,u,s):t):new v(3===s?-0:0)},E.modulo=E.mod=function(t){var n,e=this,r=e.constructor;return t=new r(t),!e.d||!t.s||t.d&&!t.d[0]?new r(NaN):!t.d||e.d&&!e.d[0]?W(new r(e),r.precision,r.rounding):(d=!1,9==r.modulo?(n=C(e,t.abs(),0,3,1)).s*=t.s:n=C(e,t,0,r.modulo,1),n=n.times(t),d=!0,e.minus(n))},E.naturalExponential=E.exp=function(){return B(this)},E.naturalLogarithm=E.ln=function(){return Q(this)},E.negated=E.neg=function(){var t=new this.constructor(this);return t.s=-t.s,W(t)},E.plus=E.add=function(t){var n,e,r,i,o,a,u,s,f,c,h=this,l=h.constructor;if(t=new l(t),!h.d||!t.d)return h.s&&t.s?h.d||(t=new l(t.d||h.s===t.s?h:NaN)):t=new l(NaN),t;if(h.s!=t.s)return t.s=-t.s,h.minus(t);if(c=t.d,u=l.precision,s=l.rounding,!(f=h.d)[0]||!c[0])return c[0]||(t=new l(h)),d?W(t,u,s):t;if(o=g(h.e/k),r=g(t.e/k),f=f.slice(),i=o-r){for(i<0?(e=f,i=-i,a=c.length):(e=c,r=o,a=f.length),i>(a=(o=Math.ceil(u/k))>a?o+1:a+1)&&(i=a,e.length=1),e.reverse();i--;)e.push(0);e.reverse()}for((a=f.length)-(i=c.length)<0&&(i=a,e=c,c=f,f=e),n=0;i;)n=(f[--i]=f[i]+c[i]+n)/M|0,f[i]%=M;for(n&&(f.unshift(n),++r),a=f.length;0==f[--a];)f.pop();return t.d=f,t.e=R(f,r),d?W(t,u,s):t},E.precision=E.sd=function(t){var n,e=this;if(void 0!==t&&t!==!!t&&1!==t&&0!==t)throw Error(l+t);return e.d?(n=A(e.d),t&&e.e+1>n&&(n=e.e+1)):n=NaN,n},E.round=function(){var t=this,n=t.constructor;return W(new n(t),t.e+1,n.rounding)},E.sine=E.sin=function(){var t,n,e=this,r=e.constructor;return e.isFinite()?e.isZero()?new r(e):(n=r.rounding,r.precision=(t=r.precision)+Math.max(e.e,e.sd())+k,r.rounding=1,e=function(t,n){var e,r=n.d.length;if(r<3)return n.isZero()?n:_(t,2,n,n);e=1.4*Math.sqrt(r),n=_(t,2,n=n.times(1/H(5,e=e>16?16:0|e)),n);for(var i,o=new t(5),a=new t(16),u=new t(20);e--;)i=n.times(n),n=n.times(o.plus(i.times(a.times(i).minus(u))));return n}(r,J(r,e)),r.precision=t,r.rounding=n,W(i>2?e.neg():e,t,n,!0)):new r(NaN)},E.squareRoot=E.sqrt=function(){var t,n,e,r,i,o,a=this,u=a.d,s=a.e,f=a.s,c=a.constructor;if(1!==f||!u||!u[0])return new c(!f||f<0&&(!u||u[0])?NaN:u?a:1/0);for(d=!1,0==(f=Math.sqrt(+a))||f==1/0?(((n=T(u)).length+s)%2==0&&(n+="0"),f=Math.sqrt(n),s=g((s+1)/2)-(s<0||s%2),r=new c(n=f==1/0?"5e"+s:(n=f.toExponential()).slice(0,n.indexOf("e")+1)+s)):r=new c(f.toString()),e=(s=c.precision)+3;;)if(r=(o=r).plus(C(a,o,e+2,1)).times(.5),T(o.d).slice(0,e)===(n=T(r.d)).slice(0,e)){if("9999"!=(n=n.slice(e-3,e+1))&&(i||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(W(r,s+1,1),t=!r.times(r).eq(a));break}if(!i&&(W(o,s+1,0),o.times(o).eq(a))){r=o;break}e+=4,i=1}return d=!0,W(r,s,c.rounding,t)},E.tangent=E.tan=function(){var t,n,e=this,r=e.constructor;return e.isFinite()?e.isZero()?new r(e):(n=r.rounding,r.precision=(t=r.precision)+10,r.rounding=1,(e=e.sin()).s=1,e=C(e,new r(1).minus(e.times(e)).sqrt(),t+10,0),r.precision=t,r.rounding=n,W(2==i||4==i?e.neg():e,t,n,!0)):new r(NaN)},E.times=E.mul=function(t){var n,e,r,i,o,a,u,s,f,c=this,h=c.constructor,l=c.d,w=(t=new h(t)).d;if(t.s*=c.s,!(l&&l[0]&&w&&w[0]))return new h(!t.s||l&&!l[0]&&!w||w&&!w[0]&&!l?NaN:l&&w?0*t.s:t.s/0);for(e=g(c.e/k)+g(t.e/k),(s=l.length)<(f=w.length)&&(o=l,l=w,w=o,a=s,s=f,f=a),o=[],r=a=s+f;r--;)o.push(0);for(r=f;--r>=0;){for(n=0,i=s+r;i>r;)u=o[i]+w[r]*l[i-r-1]+n,o[i--]=u%M|0,n=u/M|0;o[i]=(o[i]+n)%M|0}for(;!o[--a];)o.pop();return n?++e:o.shift(),t.d=o,t.e=R(o,e),d?W(t,h.precision,h.rounding):t},E.toBinary=function(t,n){return Z(this,2,t,n)},E.toDecimalPlaces=E.toDP=function(t,n){var e=this,r=e.constructor;return e=new r(e),void 0===t?e:(P(t,0,a),void 0===n?n=r.rounding:P(n,0,8),W(e,t+e.e+1,n))},E.toExponential=function(t,n){var e,r=this,i=r.constructor;return void 0===t?e=I(r,!0):(P(t,0,a),void 0===n?n=i.rounding:P(n,0,8),e=I(r=W(new i(r),t+1,n),!0,t+1)),r.isNeg()&&!r.isZero()?"-"+e:e},E.toFixed=function(t,n){var e,r,i=this,o=i.constructor;return void 0===t?e=I(i):(P(t,0,a),void 0===n?n=o.rounding:P(n,0,8),e=I(r=W(new o(i),t+i.e+1,n),!1,t+r.e+1)),i.isNeg()&&!i.isZero()?"-"+e:e},E.toFraction=function(t){var n,e,r,i,o,a,u,s,f,c,h,w,v=this,m=v.d,g=v.constructor;if(!m)return new g(v);if(f=e=new g(1),r=s=new g(0),o=(n=new g(r)).e=A(m)-v.e-1,n.d[0]=y(10,(a=o%k)<0?k+a:a),null==t)t=o>0?n:f;else{if(!(u=new g(t)).isInt()||u.lt(f))throw Error(l+u);t=u.gt(n)?o>0?n:f:u}for(d=!1,u=new g(T(m)),c=g.precision,g.precision=o=m.length*k*2;h=C(u,n,0,1,1),1!=(i=e.plus(h.times(r))).cmp(t);)e=r,r=i,f=s.plus(h.times(i=f)),s=i,n=u.minus(h.times(i=n)),u=i;return i=C(t.minus(e),r,0,1,1),s=s.plus(i.times(f)),e=e.plus(i.times(r)),s.s=f.s=v.s,w=C(f,r,o,1).minus(v).abs().cmp(C(s,e,o,1).minus(v).abs())<1?[f,r]:[s,e],g.precision=c,d=!0,w},E.toHexadecimal=E.toHex=function(t,n){return Z(this,16,t,n)},E.toNearest=function(t,n){var e=this,r=e.constructor;if(e=new r(e),null==t){if(!e.d)return e;t=new r(1),n=r.rounding}else{if(t=new r(t),void 0===n?n=r.rounding:P(n,0,8),!e.d)return t.s?e:t;if(!t.d)return t.s&&(t.s=e.s),t}return t.d[0]?(d=!1,e=C(e,t,0,n,1).times(t),d=!0,W(e)):(t.s=e.s,e=t),e},E.toNumber=function(){return+this},E.toOctal=function(t,n){return Z(this,8,t,n)},E.toPower=E.pow=function(t){var n,e,r,i,o,a,u=this,s=u.constructor,f=+(t=new s(t));if(!(u.d&&t.d&&u.d[0]&&t.d[0]))return new s(y(+u,f));if((u=new s(u)).eq(1))return u;if(r=s.precision,o=s.rounding,t.eq(1))return W(u,r,o);if((n=g(t.e/k))>=t.d.length-1&&(e=f<0?-f:f)<=9007199254740991)return i=Y(s,u,e,r),t.s<0?new s(1).div(i):W(i,r,o);if((a=u.s)<0){if(n<t.d.length-1)return new s(NaN);if(1&t.d[n]||(a=1),0==u.e&&1==u.d[0]&&1==u.d.length)return u.s=a,u}return(n=0!=(e=y(+u,f))&&isFinite(e)?new s(e+"").e:g(f*(Math.log("0."+T(u.d))/Math.LN10+u.e+1)))>s.maxE+1||n<s.minE-1?new s(n>0?a/0:0):(d=!1,s.rounding=u.s=1,e=Math.min(12,(n+"").length),(i=B(t.times(Q(u,r+e)),r)).d&&j((i=W(i,r+5,1)).d,r,o)&&+T((i=W(B(t.times(Q(u,(n=r+10)+e)),n),n+5,1)).d).slice(r+1,r+15)+1==1e14&&(i=W(i,r+1,0)),i.s=a,d=!0,s.rounding=o,W(i,r,o))},E.toPrecision=function(t,n){var e,r=this,i=r.constructor;return void 0===t?e=I(r,r.e<=i.toExpNeg||r.e>=i.toExpPos):(P(t,1,a),void 0===n?n=i.rounding:P(n,0,8),e=I(r=W(new i(r),t,n),t<=r.e||r.e<=i.toExpNeg,t)),r.isNeg()&&!r.isZero()?"-"+e:e},E.toSignificantDigits=E.toSD=function(t,n){var e=this.constructor;return void 0===t?(t=e.precision,n=e.rounding):(P(t,1,a),void 0===n?n=e.rounding:P(n,0,8)),W(new e(this),t,n)},E.toString=function(){var t=this,n=t.constructor,e=I(t,t.e<=n.toExpNeg||t.e>=n.toExpPos);return t.isNeg()&&!t.isZero()?"-"+e:e},E.truncated=E.trunc=function(){return W(new this.constructor(this),this.e+1,1)},E.valueOf=E.toJSON=function(){var t=this,n=t.constructor,e=I(t,t.e<=n.toExpNeg||t.e>=n.toExpPos);return t.isNeg()?"-"+e:e};var C=function(){function t(t,n,e){var r,i=0,o=t.length;for(t=t.slice();o--;)t[o]=(r=t[o]*n+i)%e|0,i=r/e|0;return i&&t.unshift(i),t}function n(t,n,e,r){var i,o;if(e!=r)o=e>r?1:-1;else for(i=o=0;i<e;i++)if(t[i]!=n[i]){o=t[i]>n[i]?1:-1;break}return o}function r(t,n,e,r){for(var i=0;e--;)t[e]-=i,t[e]=(i=t[e]<n[e]?1:0)*r+t[e]-n[e];for(;!t[0]&&t.length>1;)t.shift()}return function(i,o,a,u,s,f){var c,d,h,l,w,v,m,y,b,p,N,x,D,S,E,T,P,j,O,C,I=i.constructor,R=i.s==o.s?1:-1,$=i.d,L=o.d;if(!($&&$[0]&&L&&L[0]))return new I(i.s&&o.s&&($?!L||$[0]!=L[0]:L)?$&&0==$[0]||!L?0*R:R/0:NaN);for(f?(w=1,d=i.e-o.e):(f=M,d=g(i.e/(w=k))-g(o.e/w)),O=L.length,P=$.length,p=(b=new I(R)).d=[],h=0;L[h]==($[h]||0);h++);if(L[h]>($[h]||0)&&d--,null==a?(S=a=I.precision,u=I.rounding):S=s?a+(i.e-o.e)+1:a,S<0)p.push(1),v=!0;else{if(S=S/w+2|0,h=0,1==O){for(l=0,L=L[0],S++;(h<P||l)&&S--;h++)p[h]=(E=l*f+($[h]||0))/L|0,l=E%L|0;v=l||h<P}else{for((l=f/(L[0]+1)|0)>1&&(L=t(L,l,f),$=t($,l,f),O=L.length,P=$.length),T=O,x=(N=$.slice(0,O)).length;x<O;)N[x++]=0;(C=L.slice()).unshift(0),j=L[0],L[1]>=f/2&&++j;do{l=0,(c=n(L,N,O,x))<0?(D=N[0],O!=x&&(D=D*f+(N[1]||0)),(l=D/j|0)>1?(l>=f&&(l=f-1),1==(c=n(m=t(L,l,f),N,y=m.length,x=N.length))&&(l--,r(m,O<y?C:L,y,f))):(0==l&&(c=l=1),m=L.slice()),(y=m.length)<x&&m.unshift(0),r(N,m,x,f),-1==c&&(c=n(L,N,O,x=N.length))<1&&(l++,r(N,O<x?C:L,x,f)),x=N.length):0===c&&(l++,N=[0]),p[h++]=l,c&&N[0]?N[x++]=$[T]||0:(N=[$[T]],x=1)}while((T++<P||void 0!==N[0])&&S--);v=void 0!==N[0]}p[0]||p.shift()}if(1==w)b.e=d,e=v;else{for(h=1,l=p[0];l>=10;l/=10)h++;b.e=h+d*w-1,W(b,s?a+b.e+1:a,u,v)}return b}}();function W(t,n,e,r){var i,o,a,u,s,f,c,h,l,w=t.constructor;t:if(null!=n){if(!(h=t.d))return t;for(i=1,u=h[0];u>=10;u/=10)i++;if((o=n-i)<0)o+=k,s=(c=h[l=0])/y(10,i-(a=n)-1)%10|0;else if((l=Math.ceil((o+1)/k))>=(u=h.length)){if(!r)break t;for(;u++<=l;)h.push(0);c=s=0,i=1,a=(o%=k)-k+1}else{for(c=u=h[l],i=1;u>=10;u/=10)i++;s=(a=(o%=k)-k+i)<0?0:c/y(10,i-a-1)%10|0}if(r=r||n<0||void 0!==h[l+1]||(a<0?c:c%y(10,i-a-1)),f=e<4?(s||r)&&(0==e||e==(t.s<0?3:2)):s>5||5==s&&(4==e||r||6==e&&(o>0?a>0?c/y(10,i-a):0:h[l-1])%10&1||e==(t.s<0?8:7)),n<1||!h[0])return h.length=0,f?(h[0]=y(10,(k-(n-=t.e+1)%k)%k),t.e=-n||0):h[0]=t.e=0,t;if(0==o?(h.length=l,u=1,l--):(h.length=l+1,u=y(10,k-o),h[l]=a>0?(c/y(10,i-a)%y(10,a)|0)*u:0),f)for(;;){if(0==l){for(o=1,a=h[0];a>=10;a/=10)o++;for(a=h[0]+=u,u=1;a>=10;a/=10)u++;o!=u&&(t.e++,h[0]==M&&(h[0]=1));break}if(h[l]+=u,h[l]!=M)break;h[l--]=0,u=1}for(o=h.length;0===h[--o];)h.pop()}return d&&(t.e>w.maxE?(t.d=null,t.e=NaN):t.e<w.minE&&(t.e=0,t.d=[0])),t}function I(t,n,e){if(!t.isFinite())return F(t);var r,i=t.e,o=T(t.d),a=o.length;return n?(e&&(r=e-a)>0?o=o.charAt(0)+"."+o.slice(1)+G(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(t.e<0?"e":"e+")+t.e):i<0?(o="0."+G(-i-1)+o,e&&(r=e-a)>0&&(o+=G(r))):i>=a?(o+=G(i+1-a),e&&(r=e-i-1)>0&&(o=o+"."+G(r))):((r=i+1)<a&&(o=o.slice(0,r)+"."+o.slice(r)),e&&(r=e-a)>0&&(i+1===a&&(o+="."),o+=G(r))),o}function R(t,n){var e=t[0];for(n*=k;e>=10;e/=10)n++;return n}function $(t,n,e){if(n>D)throw d=!0,e&&(t.precision=e),Error(w);return W(new t(s),n,1,!0)}function L(t,n,e){if(n>S)throw Error(w);return W(new t(f),n,e,!0)}function A(t){var n=t.length-1,e=n*k+1;if(n=t[n]){for(;n%10==0;n/=10)e--;for(n=t[0];n>=10;n/=10)e++}return e}function G(t){for(var n="";t--;)n+="0";return n}function Y(t,n,e,r){var i,o=new t(1),a=Math.ceil(r/k+4);for(d=!1;;){if(e%2&&K((o=o.times(n)).d,a)&&(i=!0),0===(e=g(e/2))){e=o.d.length-1,i&&0===o.d[e]&&++o.d[e];break}K((n=n.times(n)).d,a)}return d=!0,o}function q(t){return 1&t.d[t.d.length-1]}function z(t,n,e){for(var r,i,o=new t(n[0]),a=0;++a<n.length;){if(!(i=new t(n[a])).s){o=i;break}((r=o.cmp(i))===e||0===r&&o.s===e)&&(o=i)}return o}function B(t,n){var e,r,i,o,a,u,s,f=0,c=0,h=0,l=t.constructor,w=l.rounding,v=l.precision;if(!t.d||!t.d[0]||t.e>17)return new l(t.d?t.d[0]?t.s<0?0:1/0:1:t.s?t.s<0?0:t:NaN);for(null==n?(d=!1,s=v):s=n,u=new l(.03125);t.e>-2;)t=t.times(u),h+=5;for(s+=r=Math.log(y(2,h))/Math.LN10*2+5|0,e=o=a=new l(1),l.precision=s;;){if(o=W(o.times(t),s,1),e=e.times(++c),T((u=a.plus(C(o,e,s,1))).d).slice(0,s)===T(a.d).slice(0,s)){for(i=h;i--;)a=W(a.times(a),s,1);if(null!=n)return l.precision=v,a;if(!(f<3&&j(a.d,s-r,w,f)))return W(a,l.precision=v,w,d=!0);l.precision=s+=10,e=o=u=new l(1),c=0,f++}a=u}}function Q(t,n){var e,r,i,o,a,u,s,f,c,h,l,w=1,v=t,m=v.d,g=v.constructor,y=g.rounding,b=g.precision;if(v.s<0||!m||!m[0]||!v.e&&1==m[0]&&1==m.length)return new g(m&&!m[0]?-1/0:1!=v.s?NaN:m?0:v);if(null==n?(d=!1,c=b):c=n,g.precision=c+=10,r=(e=T(m)).charAt(0),!(Math.abs(o=v.e)<15e14))return f=$(g,c+2,b).times(o+""),v=Q(new g(r+"."+e.slice(1)),c-10).plus(f),g.precision=b,null==n?W(v,b,y,d=!0):v;for(;r<7&&1!=r||1==r&&e.charAt(1)>3;)r=(e=T((v=v.times(t)).d)).charAt(0),w++;for(o=v.e,r>1?(v=new g("0."+e),o++):v=new g(r+"."+e.slice(1)),h=v,s=a=v=C(v.minus(1),v.plus(1),c,1),l=W(v.times(v),c,1),i=3;;){if(a=W(a.times(l),c,1),T((f=s.plus(C(a,new g(i),c,1))).d).slice(0,c)===T(s.d).slice(0,c)){if(s=s.times(2),0!==o&&(s=s.plus($(g,c+2,b).times(o+""))),s=C(s,new g(w),c,1),null!=n)return g.precision=b,s;if(!j(s.d,c-10,y,u))return W(s,g.precision=b,y,d=!0);g.precision=c+=10,f=a=v=C(h.minus(1),h.plus(1),c,1),l=W(v.times(v),c,1),i=u=1}s=f,i+=2}}function F(t){return String(t.s*t.s/0)}function U(t,n){var e,r,i;for((e=n.indexOf("."))>-1&&(n=n.replace(".","")),(r=n.search(/e/i))>0?(e<0&&(e=r),e+=+n.slice(r+1),n=n.substring(0,r)):e<0&&(e=n.length),r=0;48===n.charCodeAt(r);r++);for(i=n.length;48===n.charCodeAt(i-1);--i);if(n=n.slice(r,i)){if(i-=r,t.e=e=e-r-1,t.d=[],r=(e+1)%k,e<0&&(r+=k),r<i){for(r&&t.d.push(+n.slice(0,r)),i-=k;r<i;)t.d.push(+n.slice(r,r+=k));n=n.slice(r),r=k-n.length}else r-=i;for(;r--;)n+="0";t.d.push(+n),d&&(t.e>t.constructor.maxE?(t.d=null,t.e=NaN):t.e<t.constructor.minE&&(t.e=0,t.d=[0]))}else t.e=0,t.d=[0];return t}function X(t,e){var r,i,o,a,u,s,f,c,h;if(e.indexOf("_")>-1){if(e=e.replace(/(\d)_(?=\d)/g,"$1"),x.test(e))return U(t,e)}else if("Infinity"===e||"NaN"===e)return+e||(t.s=NaN),t.e=NaN,t.d=null,t;if(p.test(e))r=16,e=e.toLowerCase();else if(b.test(e))r=2;else{if(!N.test(e))throw Error(l+e);r=8}for((a=e.search(/p/i))>0?(f=+e.slice(a+1),e=e.substring(2,a)):e=e.slice(2),a=e.indexOf("."),i=t.constructor,(u=a>=0)&&(a=(s=(e=e.replace(".","")).length)-a,o=Y(i,new i(r),a,2*a)),a=h=(c=O(e,r,M)).length-1;0===c[a];--a)c.pop();return a<0?new i(0*t.s):(t.e=R(c,h),t.d=c,d=!1,u&&(t=C(t,o,4*s)),f&&(t=t.times(Math.abs(f)<54?y(2,f):n.pow(2,f))),d=!0,t)}function _(t,n,e,r,i){var o,a,u,s,f=t.precision,c=Math.ceil(f/k);for(d=!1,s=e.times(e),u=new t(r);;){if(a=C(u.times(s),new t(n++*n++),f,1),u=i?r.plus(a):r.minus(a),r=C(a.times(s),new t(n++*n++),f,1),void 0!==(a=u.plus(r)).d[c]){for(o=c;a.d[o]===u.d[o]&&o--;);if(-1==o)break}o=u,u=r,r=a,a=o}return d=!0,a.d.length=c+1,a}function H(t,n){for(var e=t;--n;)e*=t;return e}function J(t,n){var e,r=n.s<0,o=L(t,t.precision,1),a=o.times(.5);if((n=n.abs()).lte(a))return i=r?4:1,n;if((e=n.divToInt(o)).isZero())i=r?3:2;else{if((n=n.minus(e.times(o))).lte(a))return i=q(e)?r?2:3:r?4:1,n;i=q(e)?r?1:4:r?3:2}return n.minus(o).abs()}function Z(t,n,r,i){var o,s,f,c,d,h,l,w,v,m=t.constructor,g=void 0!==r;if(g?(P(r,1,a),void 0===i?i=m.rounding:P(i,0,8)):(r=m.precision,i=m.rounding),t.isFinite()){for(g?(o=2,16==n?r=4*r-3:8==n&&(r=3*r-2)):o=n,(f=(l=I(t)).indexOf("."))>=0&&(l=l.replace(".",""),(v=new m(1)).e=l.length-f,v.d=O(I(v),10,o),v.e=v.d.length),s=d=(w=O(l,10,o)).length;0==w[--d];)w.pop();if(w[0]){if(f<0?s--:((t=new m(t)).d=w,t.e=s,w=(t=C(t,v,r,i,0,o)).d,s=t.e,h=e),f=w[r],c=o/2,h=h||void 0!==w[r+1],h=i<4?(void 0!==f||h)&&(0===i||i===(t.s<0?3:2)):f>c||f===c&&(4===i||h||6===i&&1&w[r-1]||i===(t.s<0?8:7)),w.length=r,h)for(;++w[--r]>o-1;)w[r]=0,r||(++s,w.unshift(1));for(d=w.length;!w[d-1];--d);for(f=0,l="";f<d;f++)l+=u.charAt(w[f]);if(g){if(d>1)if(16==n||8==n){for(f=16==n?4:3,--d;d%f;d++)l+="0";for(d=(w=O(l,o,n)).length;!w[d-1];--d);for(f=1,l="1.";f<d;f++)l+=u.charAt(w[f])}else l=l.charAt(0)+"."+l.slice(1);l=l+(s<0?"p":"p+")+s}else if(s<0){for(;++s;)l="0"+l;l="0."+l}else if(++s>d)for(s-=d;s--;)l+="0";else s<d&&(l=l.slice(0,s)+"."+l.slice(s))}else l=g?"0p+0":"0";l=(16==n?"0x":2==n?"0b":8==n?"0o":"")+l}else l=F(t);return t.s<0?"-"+l:l}function K(t,n){if(t.length>n)return t.length=n,!0}function V(t){return new this(t).abs()}function tt(t){return new this(t).acos()}function nt(t){return new this(t).acosh()}function et(t,n){return new this(t).plus(n)}function rt(t){return new this(t).asin()}function it(t){return new this(t).asinh()}function ot(t){return new this(t).atan()}function at(t){return new this(t).atanh()}function ut(t,n){t=new this(t),n=new this(n);var e,r=this.precision,i=this.rounding,o=r+4;return t.s&&n.s?t.d||n.d?!n.d||t.isZero()?(e=n.s<0?L(this,r,i):new this(0)).s=t.s:!t.d||n.isZero()?(e=L(this,o,1).times(.5)).s=t.s:n.s<0?(this.precision=o,this.rounding=1,e=this.atan(C(t,n,o,1)),n=L(this,o,1),this.precision=r,this.rounding=i,e=t.s<0?e.minus(n):e.plus(n)):e=this.atan(C(t,n,o,1)):(e=L(this,o,1).times(n.s>0?.25:.75)).s=t.s:e=new this(NaN),e}function st(t){return new this(t).cbrt()}function ft(t){return W(t=new this(t),t.e+1,2)}function ct(t,n,e){return new this(t).clamp(n,e)}function dt(t){if(!t||"object"!=typeof t)throw Error(h+"Object expected");var n,e,r,i=!0===t.defaults,u=["precision",1,a,"rounding",0,8,"toExpNeg",-o,0,"toExpPos",0,o,"maxE",0,o,"minE",-o,0,"modulo",0,9];for(n=0;n<u.length;n+=3)if(e=u[n],i&&(this[e]=c[e]),void 0!==(r=t[e])){if(!(g(r)===r&&r>=u[n+1]&&r<=u[n+2]))throw Error(l+e+": "+r);this[e]=r}if(e="crypto",i&&(this[e]=c[e]),void 0!==(r=t[e])){if(!0!==r&&!1!==r&&0!==r&&1!==r)throw Error(l+e+": "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(v);this[e]=!0}else this[e]=!1}return this}function ht(t){return new this(t).cos()}function lt(t){return new this(t).cosh()}function wt(t,n){return new this(t).div(n)}function vt(t){return new this(t).exp()}function mt(t){return W(t=new this(t),t.e+1,3)}function gt(){var t,n,e=new this(0);for(d=!1,t=0;t<arguments.length;)if((n=new this(arguments[t++])).d)e.d&&(e=e.plus(n.times(n)));else{if(n.s)return d=!0,new this(1/0);e=n}return d=!0,e.sqrt()}function yt(t){return t instanceof n||t&&t.toStringTag===m||!1}function bt(t){return new this(t).ln()}function pt(t,n){return new this(t).log(n)}function Nt(t){return new this(t).log(2)}function Mt(t){return new this(t).log(10)}function kt(){return z(this,arguments,-1)}function Dt(){return z(this,arguments,1)}function St(t,n){return new this(t).mod(n)}function Et(t,n){return new this(t).mul(n)}function Tt(t,n){return new this(t).pow(n)}function Pt(t){var n,e,r,i,o=0,u=new this(1),s=[];if(void 0===t?t=this.precision:P(t,1,a),r=Math.ceil(t/k),this.crypto)if(crypto.getRandomValues)for(n=crypto.getRandomValues(new Uint32Array(r));o<r;)(i=n[o])>=429e7?n[o]=crypto.getRandomValues(new Uint32Array(1))[0]:s[o++]=i%1e7;else{if(!crypto.randomBytes)throw Error(v);for(n=crypto.randomBytes(r*=4);o<r;)(i=n[o]+(n[o+1]<<8)+(n[o+2]<<16)+((127&n[o+3])<<24))>=214e7?crypto.randomBytes(4).copy(n,o):(s.push(i%1e7),o+=4);o=r/4}else for(;o<r;)s[o++]=1e7*Math.random()|0;for(r=s[--o],t%=k,r&&t&&(i=y(10,k-t),s[o]=(r/i|0)*i);0===s[o];o--)s.pop();if(o<0)e=0,s=[0];else{for(e=-1;0===s[0];e-=k)s.shift();for(r=1,i=s[0];i>=10;i/=10)r++;r<k&&(e-=k-r)}return u.e=e,u.d=s,u}function jt(t){return W(t=new this(t),t.e+1,this.rounding)}function Ot(t){return(t=new this(t)).d?t.d[0]?t.s:0*t.s:t.s||NaN}function Ct(t){return new this(t).sin()}function Wt(t){return new this(t).sinh()}function It(t){return new this(t).sqrt()}function Rt(t,n){return new this(t).sub(n)}function $t(){var t=0,n=arguments,e=new this(n[t]);for(d=!1;e.s&&++t<n.length;)e=e.plus(n[t]);return d=!0,W(e,this.precision,this.rounding)}function Lt(t){return new this(t).tan()}function At(t){return new this(t).tanh()}function Gt(t){return W(t=new this(t),t.e+1,1)}(n=function t(n){var e,r,i;function o(t){var n,e,r,i=this;if(!(i instanceof o))return new o(t);if(i.constructor=o,yt(t))return i.s=t.s,void(d?!t.d||t.e>o.maxE?(i.e=NaN,i.d=null):t.e<o.minE?(i.e=0,i.d=[0]):(i.e=t.e,i.d=t.d.slice()):(i.e=t.e,i.d=t.d?t.d.slice():t.d));if("number"==(r=typeof t)){if(0===t)return i.s=1/t<0?-1:1,i.e=0,void(i.d=[0]);if(t<0?(t=-t,i.s=-1):i.s=1,t===~~t&&t<1e7){for(n=0,e=t;e>=10;e/=10)n++;return void(d?n>o.maxE?(i.e=NaN,i.d=null):n<o.minE?(i.e=0,i.d=[0]):(i.e=n,i.d=[t]):(i.e=n,i.d=[t]))}return 0*t!=0?(t||(i.s=NaN),i.e=NaN,void(i.d=null)):U(i,t.toString())}if("string"===r)return 45===(e=t.charCodeAt(0))?(t=t.slice(1),i.s=-1):(43===e&&(t=t.slice(1)),i.s=1),x.test(t)?U(i,t):X(i,t);if("bigint"===r)return t<0?(t=-t,i.s=-1):i.s=1,U(i,t.toString());throw Error(l+t)}if(o.prototype=E,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.EUCLID=9,o.config=o.set=dt,o.clone=t,o.isDecimal=yt,o.abs=V,o.acos=tt,o.acosh=nt,o.add=et,o.asin=rt,o.asinh=it,o.atan=ot,o.atanh=at,o.atan2=ut,o.cbrt=st,o.ceil=ft,o.clamp=ct,o.cos=ht,o.cosh=lt,o.div=wt,o.exp=vt,o.floor=mt,o.hypot=gt,o.ln=bt,o.log=pt,o.log10=Mt,o.log2=Nt,o.max=kt,o.min=Dt,o.mod=St,o.mul=Et,o.pow=Tt,o.random=Pt,o.round=jt,o.sign=Ot,o.sin=Ct,o.sinh=Wt,o.sqrt=It,o.sub=Rt,o.sum=$t,o.tan=Lt,o.tanh=At,o.trunc=Gt,void 0===n&&(n={}),n&&!0!==n.defaults)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],e=0;e<i.length;)n.hasOwnProperty(r=i[e++])||(n[r]=this[r]);return o.config(n),o}(c)).prototype.constructor=n,n.default=n.Decimal=n,s=new n(s),f=new n(f),xt.exports?("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator&&(E[Symbol.for("nodejs.util.inspect.custom")]=E.toString,E[Symbol.toStringTag]="Decimal"),xt.exports=n):(t||(t="undefined"!=typeof self&&self&&self.self==self?self:window),r=t.Decimal,n.noConflict=function(){return t.Decimal=r,n},t.Decimal=n)}(Mt);const Dt=kt.exports;async function St({endpoint:t,filterData:n,sessionId:e}){try{const{items:r=[],total:i}=await wt(`${t}/tickets${function(t){const n={};Object.entries(t).forEach((([t,e])=>{vt(e,!0)||(n[t]=e)}));const e=Object.entries(n).map((([t,n])=>`${encodeURIComponent(t)}=${encodeURIComponent(n)}`)).join("&");return e?`?${e}`:""}(n)}`,"GET",null,{Authorization:`Bearer ${e}`});return{dataSource:r,total:i}}catch(t){if(401===t.status)return Promise.reject(new Error(`${t.statusText||"Unauthorized"}, please login`))}}async function Et({endpoint:t,gameId:n,drawId:e}){try{return await wt(`${t}/games/${n}/draws/${e}`,"GET",{})||{}}catch(t){console.log(t)}}async function Tt({endpoint:t,gameId:n,drawResults:e}){const r=e.map((t=>t.drawId));for(let i=0;i<r.length;i++){const o=await Et({endpoint:t,gameId:n,drawId:r[i]});e[i].tempDrawData=o,e[i].prizeDetails=Pt(e[i].details)}return e}function Pt(t){const n=new Map;t.forEach((t=>{let e=t.divisionDisplayName,r=t.currency;if(e&&"None"!==e){const i=new Dt(t.amount);if(n.has(e)){const t=n.get(e),o=t.amount.plus(i);n.set(e,{amount:o,currency:r,times:t.times+1})}else n.set(e,{amount:i,currency:r,times:1})}}));const e=[];for(let[t,r]of n.entries()){const n=r.amount.times(100).floor().dividedBy(100);e.push({prizeName:t,amount:n.toNumber(),currency:r.currency,times:r.times})}return e.sort(((t,n)=>n.prizeName.localeCompare(t.prizeName))),e}const jt=["ro","en","fr","ar","hr"],Ot={en:{win:"Win",lose:"Lose",normal:"Normal",subscription:"Subscription",syndicate:"Syndicate",ticketResult:"Ticket Result:",drawId:"Draw ID:",drawDate:"Draw Date:",result:"Result:",prize:"Prize:",bettingType:"Betting Type:",seeDetails:"See Details",noData:"No data Avaliable.",ticketId:"Ticket ID:",ticketType:"Ticket Type:",ticketAmount:"Ticket Amount:",lineDetail:"Line Detail:",numberOfDraw:"Number of Draw:",filter:"Filter",clear:"Clear",perPage:"1",searchByTicketId:"Search by Ticket ID",enterTicketId:"Enter Ticket ID",searchByTicketType:"Search by Ticket Type",selectTicketType:"Select Ticket Type",searchByDate:"Search by Date",from:"From",to:"To",ticketsHistory:"Tickets History",settled:"Settled",purchased:"Purchased",canceled:"Canceled",pleaseSelectADate:"Please select a date"}},Ct=(t,n,e)=>{const r=n;let i=Ot[void 0!==r&&jt.includes(r)?r:"en"][t];return e&&Object.keys(e).forEach((t=>{i=null==i?void 0:i.replace(`{${t}}`,e[t])})),i},Wt=async t=>{if(t)try{const e=await fetch(t);if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const r=await e.json();n=r,Object.keys(n).forEach((t=>{for(let e in n[t])Ot[t][e]=n[t][e]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var n},It=class{constructor(n){t(this,n),this.handlePageSizeChange=t=>{this.filterData.limit=t.detail,this.filterData.offset=0,this.fetchTicketList()},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.endpoint=void 0,this.gameId=void 0,this.playerId=void 0,this.sessionId="",this.isLoading=!1,this.errorConfig={isError:!1},this.filterData={offset:0,limit:10,vendorGameType:a.PoolGame,vendorGameBettingObject:u.Oddsbomben},this.ticketHistoryRes={dataSource:[],total:0}}handleClientStylingChange(t,n){t!==n&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,n){t!==n&&i(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,n){t!==n&&o(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&o(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&i(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentWillLoad(){this.fetchTicketList()}async fetchTicketList(){if(this.endpoint&&this.sessionId)try{this.isLoading=!0;const t=await St({endpoint:this.endpoint,filterData:this.filterData,sessionId:this.sessionId});this.ticketHistoryRes=t}catch(t){this.errorConfig={isError:!0,message:t.message||t.msg}}finally{this.isLoading=!1}else console.error("endpoint and sessionId are required")}renderError(){return n("div",{class:"error-red text-center mt-12"},this.errorConfig.message)}handleFilterChange(t){this.filterData=Object.assign({},{offset:this.filterData.offset,limit:this.filterData.limit,vendorGameType:this.filterData.vendorGameType,vendorGameBettingObject:this.filterData.vendorGameBettingObject},t.detail),this.fetchTicketList()}handlePageChange(t){this.filterData.offset=(t.detail-1)*this.filterData.limit,this.fetchTicketList()}render(){var t,e;return n("div",{key:"719a01651d21198644d4ace48e8b304e7165ab76",ref:t=>this.stylingContainer=t,class:"lottery-oddsbom-ticket-history-container"},n("div",{key:"3086e38de3068a0af5da6ef631e657a2a460f774",class:"lottery-oddsbom-ticket-history-wrapper"},n("div",{key:"6c06470b63b983ad75a400d49ae72c6becb25243",class:"lottery-oddsbom-ticket-history-container__title"},Ct("ticketsHistory",this.language)),n("filter-group",{key:"225778b4daa5adf2f508a8d3c8590f6802669488",language:this.language,"mb-source":this.mbSource,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"translation-url":this.translationUrl,onFilterChange:this.handleFilterChange.bind(this)}),this.errorConfig.isError?this.renderError():n("history-list",{language:this.language,"mb-source":this.mbSource,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"translation-url":this.translationUrl,"game-id":this.gameId,endpoint:this.endpoint,"is-loading":this.isLoading,"default-ticket-history":JSON.stringify((null===(t=this.ticketHistoryRes)||void 0===t?void 0:t.dataSource)||[])}),n("div",{key:"0cfa07e6daab06253e2bd1d570dea052547fbbb0",class:"pagination-wrap"},n("general-pagination",{key:"d2025ebae912d339ba35c6df5ed3c68d5031201d",total:(null===(e=this.ticketHistoryRes)||void 0===e?void 0:e.total)||0,language:this.language,"mb-source":this.mbSource,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"translation-url":this.translationUrl,onPageChange:this.handlePageChange.bind(this),onPageSizeChange:this.handlePageSizeChange.bind(this)}))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};It.style="@keyframes skeleton-loading {\n 0% {\n background-position: 200% 0;\n }\n 100% {\n background-position: -200% 0;\n }\n}\n.lottery-oddsbom-ticket-history-container {\n container-type: inline-size;\n container-name: myContainer;\n color: var(--emw--color-typography, #000);\n background-color: var(--emw--color-background, #fff);\n height: 100%;\n width: 100%;\n}\n.lottery-oddsbom-ticket-history-container .lottery-oddsbom-ticket-history-wrapper {\n padding: 12px;\n margin: 0 auto;\n max-width: 800px;\n background-color: var(--emw--color-background, #fff);\n}\n.lottery-oddsbom-ticket-history-container__title {\n margin: 20px 0;\n text-align: center;\n font-size: 20px;\n font-weight: 700;\n color: var(--emw--color-typography, #000);\n}\n.lottery-oddsbom-ticket-history-container .pagination-wrap {\n margin-top: 20px;\n display: flex;\n justify-content: flex-end;\n}\n\n.pagination-wrap {\n margin-top: 20px;\n display: flex;\n justify-content: flex-end;\n}\n\n@container myContainer (min-width: 1200px) {\n .lottery-oddsbom-ticket-history-wrapper {\n padding: 24px;\n margin: 0 auto;\n }\n}\n@container myContainer (max-width: 480px) {\n .lottery-oddsbom-ticket-history-wrapper {\n padding: 2px;\n }\n .lottery-oddsbom-ticket-history-container .filter-wrap .filter-status {\n gap: 4px;\n }\n}\n.error-red {\n color: var(--emw--color-error, red);\n}\n\n.text-center {\n text-align: center;\n}\n\n.mt-12 {\n margin-top: 48px;\n}";export{f as D,It as L,i as a,o as b,ht as c,yt as d,Tt as e,Nt as f,bt as g,et as h,gt as i,mt as j,rt as p,Wt as r,r as s,Ct as t}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/lottery-oddsbom-ticket-history",
3
- "version": "0.7.27",
3
+ "version": "0.7.28",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",