@everymatrix/lottery-tipping-page 1.87.10 → 1.87.12
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.
|
@@ -10503,7 +10503,7 @@ function renderAbstractNodeToSVGElement(node, options) {
|
|
|
10503
10503
|
return "<".concat(node.tag).concat(attrsToken, " />");
|
|
10504
10504
|
}
|
|
10505
10505
|
|
|
10506
|
-
const lotteryTippingPanelCss = ".panel-container{border:
|
|
10506
|
+
const lotteryTippingPanelCss = ".panel-container{border:1px solid var(--emw--color-typography, #000);border-radius:8px;overflow:hidden;font-family:sans-serif;width:calc(100% - 4px)}.panel-header{background-color:var(--emw--color-background, #fff);padding:8px;display:flex;align-items:center;justify-content:space-between;cursor:pointer;font-size:14px}.panel-header .header-content{color:var(--emw--color-typography, #000)}.panel-header:hover{background-color:var(--emw--color-primary, #fed275)}.panel-header.active{background-color:var(--emw--color-primary, #fed275)}.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 12px;font-size:14px}.panel-body.open{max-height:500px;padding:10px 12px}.panel-body.closed{max-height:0;padding-top:0;padding-bottom:0}";
|
|
10507
10507
|
const LotteryTippingPanelStyle0 = lotteryTippingPanelCss;
|
|
10508
10508
|
|
|
10509
10509
|
const downIcon = renderIconDefinitionToSVGElement(DownOutlined$1, {
|
|
@@ -10500,7 +10500,7 @@ function renderAbstractNodeToSVGElement(node, options) {
|
|
|
10500
10500
|
return "<".concat(node.tag).concat(attrsToken, " />");
|
|
10501
10501
|
}
|
|
10502
10502
|
|
|
10503
|
-
const lotteryTippingPanelCss = ".panel-container{border:
|
|
10503
|
+
const lotteryTippingPanelCss = ".panel-container{border:1px solid var(--emw--color-typography, #000);border-radius:8px;overflow:hidden;font-family:sans-serif;width:calc(100% - 4px)}.panel-header{background-color:var(--emw--color-background, #fff);padding:8px;display:flex;align-items:center;justify-content:space-between;cursor:pointer;font-size:14px}.panel-header .header-content{color:var(--emw--color-typography, #000)}.panel-header:hover{background-color:var(--emw--color-primary, #fed275)}.panel-header.active{background-color:var(--emw--color-primary, #fed275)}.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 12px;font-size:14px}.panel-body.open{max-height:500px;padding:10px 12px}.panel-body.closed{max-height:0;padding-top:0;padding-bottom:0}";
|
|
10504
10504
|
const LotteryTippingPanelStyle0 = lotteryTippingPanelCss;
|
|
10505
10505
|
|
|
10506
10506
|
const downIcon = renderIconDefinitionToSVGElement(DownOutlined$1, {
|
|
@@ -6654,4 +6654,4 @@ ti("vaadin-tabs",Ft`
|
|
|
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"}}Pt(Oh);const Ph=["ro","en","fr","ar","hr"],Eh={en:{totalItems:"Total {total} items",perPage:"{size} / page",goTo:"Go to",filter:"Filter",clear:"Clear",searchByTicketId:"Search by Ticket ID",enterTicketId:"Enter Ticket ID",searchByTicketType:"Search by Ticket Type",selectTicketType:"Select Ticket Type",searchByDate:"Search by Date",from:"From",to:"To",normal:"Normal",subscription:"Subscription",ticketsHistory:"Tickets History",settled:"Settled",purchased:"Purchased",canceled:"Canceled",noData:"No data Avaliable.",ticketId:"Ticket ID:",ticketType:"Ticket Type:",ticketAmount:"Ticket Amount:",lineDetail:"Line Detail:",seeDetails:"See Details",numberOfDraw:"Number of Draw:",ticketResult:"Ticket Result:",drawId:"Draw ID:",drawDate:"Draw Date:",result:"Result:",prize:"Prize:",bettingType:"Betting Type:"},ro:{},fr:{},ar:{},hr:{}},Bh=(t,e,i)=>{const o=e;let s=Eh[void 0!==o&&Ph.includes(o)?o:"en"][t];return i&&Object.keys(i).forEach((t=>{s=s.replace(`{${t}}`,i[t])})),s},Nh=t=>{Object.keys(t).forEach((e=>{for(let i in t[e])Eh[e][i]=t[e][i]}))},jh=class{constructor(i){t(this,i),this.filterChange=e(this,"filterChange",7),this.filterClear=e(this,"filterClear",7),this.handleTicketType=t=>{t.detail&&t.detail.length&&(this.filterData.ticketType=t.detail)},this.handleFilterFrom=t=>{let e=t.target.value.split("-");3===e.length&&(this.filterData=Object.assign(Object.assign({},this.filterData),{filterFromCalendar:`${e[2]}/${e[1]}/${e[0]}`}))},this.handleFilterTo=t=>{let e=t.target.value.split("-");3===e.length&&(this.filterData=Object.assign(Object.assign({},this.filterData),{filterToCalendar:`${e[2]}/${e[1]}/${e[0]}`}))},this.quickFiltersActive=!1,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.language="en",this.translationUrl=void 0,this.isOpen=!1,this.filterData={filterFromCalendar:"",filterToCalendar:"",ticketId:"",ticketType:[]},this.ticketTypeList=void 0,this.showClearButton=!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`)}componentWillLoad(){this.translationUrl&&Nh(JSON.parse(this.translationUrl)),this.ticketTypeList=[{label:Bh("normal",this.language),value:"NORMAL"},{label:Bh("subscription",this.language),value:"SUBSCRIPTION"}]}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&n(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleModalClose(){this.isOpen=!1}changeFormate(t){const[e,i,o]=t.split("/");return`${o}-${i}-${e}`}formateDate(t){const{year:e,month:i,day:o}=t;return ut(new Date(e,i,o),"dd/MM/yyyy")}parseDate(t){const[e,i,o]=t.split("/");return{year:o,month:parseInt(i)-1,day:e}}setDateFormate(t){t.i18n=Object.assign(Object.assign({},t.i18n),{formatDate:this.formateDate,parseDate:this.parseDate})}clearSelection(){this.comboBox.clear()}resetSearch(){this.showClearButton=!1,this.clearSelection(),this.filterData={filterFromCalendar:"",filterToCalendar:"",ticketId:"",ticketType:[]},this.filterClear.emit()}handleDialogConfirm(){if(this.filterData.filterFromCalendar&&this.filterData.filterToCalendar){let t=this.filterData.filterFromCalendar.split("/"),e=this.filterData.filterToCalendar.split("/");const i={filterFromCalendar:new Date(Date.UTC(Number(t[2]),Number(t[1])-1,Number(t[0]),0,0,0)).toISOString(),filterToCalendar:new Date(Date.UTC(Number(e[2]),Number(e[1])-1,Number(e[0]),23,59,59)).toISOString()};this.filterData=Object.assign(Object.assign({},this.filterData),i)}this.filterChange.emit(this.filterData),this.isOpen=!1,this.showClearButton=!0}render(){return o("div",{key:"74aa590f6f92b9df971fd17cb3f573cc6a0a68e9",class:"lottery-tipping-filter",ref:t=>this.stylingContainer=t},o("div",{key:"ebf385371627466c5eb06a5ef75a14a467b1badd",class:"operate-btns"},!this.showClearButton&&o("div",{key:"55c709034e124b51e8b9057980f5a3c3b8c6d5ce",class:"operate-btn",onClick:()=>{this.isOpen=!0}},Bh("filter",this.language)),(this.showClearButton||this.quickFiltersActive)&&o("div",{key:"aa747af2461e72fbacc16decd7fc75cd6f640c47",class:"operate-btn",onClick:()=>this.resetSearch()},Bh("clear",this.language))),o("lottery-tipping-dialog",{key:"9a9472dee498db7acc83fd96db89b635be07a837","dialog-title":Bh("ticketResult",this.language),visible:this.isOpen,onCancel:()=>{this.isOpen=!1},onConfirm:this.handleDialogConfirm.bind(this),animationDuration:300,language:this.language,"translation-url":this.translationUrl},o("div",{key:"a7bfe435c8f7a43abf2c2d500d7e31fe62123787",class:"dialog-content"},o("div",{key:"4fcf5f1d3da61ba5e3e8c09b4a97339c1eafaf64",class:"filter-item"},o("div",{key:"397bb60af15071331c46c0b83366475ef66205fd",class:"filter-item-label"},Bh("searchByTicketId",this.language)),o("div",{key:"657e0014bb0d8af52ed273149bad534b2cd035b6",class:"filter-item-val"},o("vaadin-text-field",{key:"e1d5c688281bf52ad5d90b81e66a495418c484ba",placeholder:Bh("enterTicketId",this.language),value:this.filterData.ticketId,onInput:t=>{this.filterData.ticketId=t.target.value}}))),o("div",{key:"3a49c0cb8361f19610be76c831320b9506414569",class:"filter-item"},o("div",{key:"abb2c02f3bf1c84d439499430696aa11f78c1ba7",class:"filter-item-label"},Bh("searchByTicketType",this.language)),o("div",{key:"1f8212f290fc32407b6cf5122099be2b2ee9a867",class:"general-multi-select-container"},o("general-multi-select",{key:"b79ebc1f60722e38436309b5699591368d2cb396",ref:t=>this.comboBox=t,placeholder:Bh("selectTicketType",this.language),"max-visible-chips":"2",options:this.ticketTypeList.map((t=>({text:t.label,value:t.value}))),onChange:this.handleTicketType,"client-styling":this.clientStyling,"client-styling-Url":this.clientStylingUrl,"mb-source":this.mbSource}))),o("div",{key:"29c515bff2771f2fc542ec19308bab60b249873f",class:"filter-item"},o("div",{key:"bae8243eb9a551c545d8f78a83bd9f2717d282cb",class:"filter-item-label"},Bh("searchByDate",this.language)),o("div",{key:"96eaf18f338ccaca9088fb8517a3992dd188dcbf",class:"filter-item-val"},o("vaadin-date-picker",{key:"b49512011902e9f5c9993901a1533fecb2425e3a",value:this.filterData.filterFromCalendar,max:void 0===this.filterData.filterToCalendar?void 0:this.changeFormate(this.filterData.filterToCalendar),onChange:this.handleFilterFrom,placeholder:Bh("from",this.language),ref:t=>this.setDateFormate(t),class:"VaadinDatePicker"}),o("vaadin-date-picker",{key:"a4132154143d20e048a526a3947d00bb9533e0b3",value:this.filterData.filterToCalendar,min:void 0===this.filterData.filterFromCalendar?void 0:this.changeFormate(this.filterData.filterFromCalendar),onChange:this.handleFilterTo,placeholder:Bh("to",this.language),ref:t=>this.setDateFormate(t),class:"VaadinDatePicker"}))))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};function Lh(t,e="GET",i=null,o={}){return new Promise(((s,r)=>{const n="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})),a=Object.assign({"Content-Type":"application/json"},o);"GET"!==e&&"HEAD"!==e&&(a["X-Idempotency-Key"]=n);const l={method:e,headers:a,body:null};i&&"GET"!==e&&"HEAD"!==e?l.body=JSON.stringify(i):delete l.body,fetch(t,l).then((t=>t.ok?t.json():r(t))).then((t=>s(t))).catch((t=>r(t)))}))}function $h(t,e){return null==t||""===t||(0!==t||!e)&&(Array.isArray(t)?function(t){if(0===t.length)return!0;const e=t.length;let i=0;for(let o=0;o<e;o++){if(!$h(t[o]))return!1;i++}return i===e}(t):"[object Object]"===Object.prototype.toString.call(t)?function(t){if(0===Object.keys(t).length)return!0;const e=Object.keys(t).length;let i=0;for(const e of Object.values(t)){if(!$h(e))return!1;i++}return i===e}(t):!t)}jh.style=".lottery-tipping-filter .operate-btns{display:flex;gap:10px}.lottery-tipping-filter .operate-btns .operate-btn{background:var(--emw--color-primary, #fed275);border:1px solid var(--emw--color-primary, #fed275);border-radius:16px;padding:8px 10px;font-size:14px;color:var(--emw--color-typography, #000);font-weight:600;cursor:pointer;transition:0.2s linear}.dialog-content{display:flex;flex-direction:column;align-items:center}.dialog-content .filter-item{margin-bottom:12px}.dialog-content .filter-item-label{text-align:center;color:var(--emw--color-typography, #000)}.dialog-content .filter-item-val{display:flex;flex-wrap:wrap;gap:12px;justify-content:center}@media screen and (max-width: 480px){.lottery-tipping-filter .operate-btns{gap:4px}}.general-multi-select-container{width:var(--vaadin-field-default-width, 16em)}";const Fh={0:"1",1:"X",2:"2"};function Rh(t){const e=[],i=[];for(let e=0;e<t.length;e+=2){const[o,s]=[t[e],t[e+1]];i[s]?i[s].push(o):i[s]=[o]}return i.forEach((t=>{e.push(function(t){const e=[];return Object.keys(Fh).forEach((i=>{e.push({isSelected:t.includes(Number(i)),value:Fh[i]})})),e}(t))})),e}const Uh=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)),Vh=({message:t,theme:e="success"})=>{window.postMessage({type:"ShowNotificationToast",message:t,theme:e})},Hh=class{constructor(i){t(this,i),this.pageChange=e(this,"pageChange",7),this.pageSizeChange=e(this,"pageSizeChange",7),this.userAgent=window.navigator.userAgent,this.total=0,this.pageSizeOptions=[10,20,50],this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.language="en",this.translationUrl=void 0,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`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&n(this.stylingContainer,this.clientStylingUrl))}componentWillLoad(){this.translationUrl&&Nh(JSON.parse(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=Uh(this.userAgent)?1:2,{totalPages:i,current:o}=this;if(i<=7)for(let e=1;e<=i;e++)t.push({type:"page",value:e});else{t.push({type:"page",value:1}),o>e+2&&t.push({type:"jump",direction:"prev"});const s=Math.max(2,o-e),r=Math.min(i-1,o+e);for(let e=s;e<=r;e++)t.push({type:"page",value:e});o<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(){const t=this.getPagesToShow();return o("div",{key:"056fe5c9fddd61fafba809746de794a8db9c92a9",class:"paginator",ref:t=>this.stylingContainer=t},o("div",{key:"a4ceefa8aaeb5a5038e9f15d58f8b7b74f5e6726",class:"total-num"},Bh("totalItems",this.language,{total:this.total})),o("button",{key:"08a1c3a20cc576781c97e6dae6ba8db5bba1e0c2",class:"arrow-btn",disabled:this.current<=1,onClick:()=>this.goToPage(this.current-1)},"<"),t.map((t=>"page"===t.type?o("button",{class:{page:!0,active:this.current===t.value},onClick:()=>this.goToPage(t.value)},t.value):o("button",{class:"ellipsis",onClick:()=>this.jumpTo(t.direction)},"..."))),o("button",{key:"893023765c2a3b55a725c32ab5edb86e14225766",class:"arrow-btn",disabled:this.current>=this.totalPages,onClick:()=>this.goToPage(this.current+1)},">"),o("select",{key:"c3fd4ada29da74ff3e0a5d41efeb3d6eb341bd79",onInput:t=>this.changePageSize(parseInt(t.target.value))},this.pageSizeOptions.map((t=>o("option",{value:t},Bh("perPage",this.language,{size:t}))))),o("div",{key:"df8b7ad7e45fc12dc25b50cb687d008b546bba5b",class:"jump-box"},Bh("goTo",this.language),o("input",{key:"f12b2591b6cfb79e0163dcbd5631618c69140539",type:"number",min:"1",max:this.totalPages,value:this.current,onKeyDown:t=>{if("Enter"===t.key){const e=parseInt(t.target.value);isNaN(e)||this.goToPage(e)}},onInput:t=>{const e=t.target;parseInt(e.value)>this.totalPages&&(e.value=this.totalPages.toString()),parseInt(e.value)<1&&(e.value="1")}})))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],total:["updateTotalPages"],pageSize:["updateTotalPages"]}}};Hh.style=".paginator{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}.paginator .page{color:var(--emw--color-typography, #000)}button{padding:4px 8px;font-size:14px;background:var(--emw--color-background, #fff);border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));border-radius:var(--emw--border-radius-small, 4px);cursor:pointer;min-width:28px;transition:all 0.2s ease}.arrow-btn{color:var(--emw--color-typography, #000)}button.active{color:#333;background:var(--emw--color-primary, #fed275);border-color:var(--emw--color-primary, #fed275);font-weight:bold}button:not(.arrow-btn):hover{background:var(--emw--color-secondary, #fff3b9);border-color:var(--emw--color-secondary, #fff3b9)}button:disabled{cursor:not-allowed;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));user-select:none}.ellipsis{font-weight:bold;color:var(--emw--color-typography, #000);border:none}select{padding:4px 8px;border-radius:4px;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));font-size:14px}.jump-box{display:flex;align-items:center;gap:4px;margin-left:8px;color:var(--emw--color-typography, #000)}.jump-box input{width:50px;padding:2px 6px;font-size:14px;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));border-radius:4px;text-align:center}.total-num{user-select:none;font-size:14px;color:var(--emw--color-typography, #333)}";var Wh=function(){return Wh=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},Wh.apply(this,arguments)},qh={primaryColor:"#333",secondaryColor:"#E6E6E6"};function Gh(t,e){if(void 0===e&&(e={}),"function"==typeof t.icon){var i=e.placeholders||qh;return Yh(t.icon(i.primaryColor,i.secondaryColor),e)}return Yh(t.icon,e)}function Yh(t,e){var i="svg"===t.tag?Wh(Wh({},t.attrs),e.extraSVGAttrs||{}):t.attrs,o=Object.keys(i).reduce((function(t,e){var o=i[e],s="".concat(e,'="').concat(o,'"');return t.push(s),t}),[]),s=o.length?" "+o.join(" "):"",r=(t.children||[]).map((function(t){return Yh(t,e)})).join("");return r&&r.length?"<".concat(t.tag).concat(s,">").concat(r,"</").concat(t.tag,">"):"<".concat(t.tag).concat(s," />")}const Jh=Gh({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"}}),Xh=class{constructor(e){t(this,e),this.togglePanel=()=>{this.expanded=!this.expanded},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`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&n(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return o("div",{key:"a924b69afd386d9a4eea9cd7e68b7421dd3949fc",class:"panel-container",ref:t=>this.stylingContainer=t},o("div",{key:"250ffcdb2c188a099c3323b8bdb983cb01c56d66",class:{"panel-header":!0,active:this.expanded},onClick:this.togglePanel},o("div",{key:"09ff482c092c4bc534c9e053bd964ac8aad0311a",class:"header-content"},o("slot",{key:"eb463418cd334b070272d7f32edef2c63a2ad583",name:"header"},o("span",{key:"ca745afa0ee74494e17e10cf06430ecdaca04070"},this.headerTitle))),o("span",{key:"ff58468a38f1d37c9d4fe902e528584c8e43a721",class:"arrow "+(this.expanded?"expanded":""),innerHTML:Jh})),o("div",{key:"725f0bc8350e4cc5604b500384c1eca3196c60f3",class:"panel-body "+(this.expanded?"open":"closed")},o("slot",{key:"a10bee4011b55784271817a396eaa8aad64c3c0e",name:"content"})))}get el(){return s(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};Xh.style=".panel-container{border:2px solid var(--emw--color-typography, #000);border-radius:8px;overflow:hidden;font-family:sans-serif;width:calc(100% - 4px)}.panel-header{background-color:var(--emw--color-background, #fff);padding:8px;display:flex;align-items:center;justify-content:space-between;cursor:pointer;font-size:14px}.panel-header .header-content{color:var(--emw--color-typography, #000)}.panel-header:hover{background-color:var(--emw--color-primary, #fed275)}.panel-header.active{background-color:var(--emw--color-primary, #fed275)}.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 12px;font-size:14px}.panel-body.open{max-height:500px;padding:10px 12px}.panel-body.closed{max-height:0;padding-top:0;padding-bottom:0}";const Kh=["ro","en","fr","ar","hr"],Zh={en:{stop:"Stop",at:"at",turnover:"Turnover: ",selectionCleared:"Your selection will be cleared.",ticketSubmitted:"Ticket submitted successfully.",ticketFailed:"Failed to purchase the ticket. Please try again.",lines:"Lines",line:"Line",bettingType:"Betting Type",playingMode:"Playing Mode",orderSummaryTitle:"Order Summary",orderSummaryTickets:"Tickets",orderSummaryTotal:"Total",orderSummarySubmit:"Submit",cancel:"Cancel",confirm:"Confirm",stakePerLine:"Stake per Line:"},ro:{selectionCleared:"Selecția dvs. va fi ștearsă.",ticketSubmitted:"Bilet trimis cu succes.",ticketFailed:"Nu s-a putut achiziționa biletul. Vă rugăm să încercați din nou.",lines:"Linii",line:"Linie",bettingType:"Tip de pariu",playingMode:"Mod de joc",orderSummaryTitle:"Sumar comandă",orderSummaryTickets:"Bilete",orderSummaryTotal:"Total",orderSummarySubmit:"Trimite",cancel:"Anulează",confirm:"Confirmă"},fr:{selectionCleared:"Votre sélection sera effacée.",ticketSubmitted:"Billet soumis avec succès.",ticketFailed:"Échec de l'achat du billet. Veuillez réessayer.",lines:"Lignes",line:"Ligne",bettingType:"Type de pari",playingMode:"Mode de jeu",orderSummaryTitle:"Résumé de la commande",orderSummaryTickets:"Billets",orderSummaryTotal:"Total",orderSummarySubmit:"Soumettre",cancel:"Annuler",confirm:"Confirmer"},ar:{selectionCleared:"سيتم مسح اختيارك.",ticketSubmitted:"تم إرسال التذكرة بنجاح.",ticketFailed:"فشل شراء التذكرة. يرجى المحاولة مرة أخرى.",lines:"خطوط",line:"خط",bettingType:"نوع الرهان",playingMode:"وضع اللعب",orderSummaryTitle:"ملخص الطلب",orderSummaryTickets:"التذاكر",orderSummaryTotal:"المجموع",orderSummarySubmit:"إرسال",cancel:"إلغاء",confirm:"تأكيد"},hr:{selectionCleared:"Vaš odabir bit će obrisan.",ticketSubmitted:"Listić je uspješno predan.",ticketFailed:"Kupnja listića nije uspjela. Molimo pokušajte ponovo.",lines:"Linije",line:"Linija",bettingType:"Vrsta oklade",playingMode:"Način igranja",orderSummaryTitle:"Sažetak narudžbe",orderSummaryTickets:"Listići",orderSummaryTotal:"Ukupno",orderSummarySubmit:"Pošalji",cancel:"Odustani",confirm:"Potvrdi"}},Qh=(t,e)=>{const i=e;return Zh[void 0!==i&&Kh.includes(i)?i:"en"][t]},tc=async t=>{if(t)try{const i=await fetch(t);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const o=await i.json();e=o,Object.keys(e).forEach((t=>{for(let i in e[t])Zh[t][i]=e[t][i]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e},ec=({date:t,type:e="date",format:i})=>{try{const o=pt(t);if(isNaN(o.getTime()))throw new Error(`Invalid date: ${t}`);if(i)return ut(o,i);let s="dd/MM/yyyy";return"time"===e?s="dd/MM/yyyy HH:mm:ss":"week"===e&&(s="ccc dd/MM/yyyy HH:mm:ss"),ut(o,s)}catch(t){return console.error("Error formatting date:",t.message),""}};function ic(t,e="GET",i=null,o={}){return new Promise(((s,r)=>{const n="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})),a=Object.assign({"Content-Type":"application/json"},o);"GET"!==e&&"HEAD"!==e&&(a["X-Idempotency-Key"]=n);const l={method:e,headers:a};i&&"GET"!==e&&"HEAD"!==e&&(l.body=JSON.stringify(i)),fetch(t,l).then((t=>{if(!t.ok)throw new Error(`HTTP error! Status: ${t.status}`);return t.json()})).then((t=>s(t))).catch((t=>r(t)))}))}const oc=({message:t,theme:e="success"})=>{window.postMessage({type:"ShowNotificationToast",message:t,theme:e})},sc=t=>{if(0===t)return"0";if(!t)return"";const e=(t=t.toString()).split(".");return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),e.join(".")},rc=["H","D","A"],nc=(t=[])=>t.filter((t=>t.enabled)),ac=({rawData:t,selectedBettingType:e,selectedPlayingMode:i})=>{var o,s,r,n,a,l;const h=null===(n=null===(r=null===(s=null===(o=null==t?void 0:t.rules)||void 0===o?void 0:o.poolGame)||void 0===s?void 0:s.playTypes)||void 0===r?void 0:r.find((t=>t.bettingType===e&&t.playMode===i)))||void 0===n?void 0:n.betTypeId,c=null===(l=null===(a=null==t?void 0:t.rules)||void 0===a?void 0:a.betTypes)||void 0===l?void 0:l.find((t=>t.id===h));return{betTypeId:h,betType:c}},lc=["ro","en","fr","ar","hr"],hc={en:{stop:"Stop",at:"at",turnover:"Turnover: "},ro:{stop:"Oprește",at:"la"},fr:{stop:"Arrêtez",at:"à"},ar:{stop:"توقف",at:"في"},hr:{stop:"Stop",at:"u"}},cc=(t,e)=>{const i=e;return hc[void 0!==i&&lc.includes(i)?i:"en"][t]},dc=class{constructor(e){t(this,e),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.language="en",this.translationUrl="",this.logoUrl=void 0,this.stopTime="",this.period=void 0,this.formattedTurnover=void 0}get formattedStopTime(){let t="";return this.stopTime?(t=ec({date:this.stopTime,format:"dd/MM/yyyy HH:mm"}),function(t){return x(1,arguments),function(t,e){x(2,arguments);var i=S(t),o=S(e);return i.getTime()===o.getTime()}(t,Date.now())}(new Date(this.stopTime))&&(t=ec({date:this.stopTime,format:"HH:mm"})),t):t}get formattedPeriod(){let t="";return t=ec({date:this.period,format:"EEEE"}),"wednesday"===t.toLowerCase()&&(t="MIDWEEK"),t.toUpperCase()}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`)}async componentWillLoad(){this.translationUrl&&tc(this.translationUrl)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&n(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return o("div",{key:"e9286d0a6a9433698703b9c04d6d50892a7b3168",ref:t=>this.stylingContainer=t,class:"lottery-tipping-ticket-banner__container"},o("section",{key:"d787e64156f76cf6d12bd552513971301534860c",class:"banner"},o("div",{key:"027baf0c88733d1430801c96b5b338f79f92f22c",class:"left"},this.logoUrl&&o("img",{key:"7b41d5635a2121ccf394aca19de48e10e9a93357",alt:"Betting",src:this.logoUrl,class:"logo"})),o("div",{key:"73e6c3ffa336b020a3819a72b71117b8084381b1",class:"mid period"},this.formattedPeriod),o("div",{key:"922ae894814157f68aa8f0774c8aa5ca06e1e7cd",class:"right"},o("span",{key:"efaf79b1ff5617f2ba92cfef464232041cd87fbf",class:"pill"},o("strong",{key:"c842562b15a13407038933da9d1cc7c6fafa0b76"},cc("stop",this.language))," ",cc("at",this.language)," ",this.formattedStopTime),o("span",{key:"3e79a5ec17cbcf0896d58196286fa0b637988f69",class:"pill"},o("strong",{key:"1158b00abffb1c6bf04e9eec10b4c996d04f118e"},cc("turnover",this.language))," ",this.formattedTurnover))))}static get assetsDirs(){return["../static"]}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};dc.style=".lottery-tipping-ticket-banner__container {\n font-family: system-ui, sans-serif;\n font-size: 14px;\n container-type: inline-size;\n}\n\n.banner {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: space-between;\n padding: 0 1rem;\n background: var(--emw--color-primary, #fed275);\n border-top: 2px solid var(--emw--color-primary, #fed275);\n border-bottom: 2px solid var(--emw--color-primary, #fed275);\n gap: 0.5rem;\n white-space: nowrap;\n position: relative;\n height: 46px;\n}\n\n.left {\n flex: 1;\n gap: 0.4rem;\n}\n.left .logo {\n width: 216px;\n position: absolute;\n top: -7px;\n}\n\n.brand {\n font-weight: 700;\n color: var(--emw--color-typography, #000);\n}\n\n.mid {\n flex: 1;\n font-size: 1.5rem;\n font-weight: 800;\n font-style: italic;\n letter-spacing: 0.04em;\n color: var(--emw--color-typography, #000);\n text-align: center;\n}\n\n.right {\n flex: 1;\n display: flex;\n gap: 0.4rem;\n flex-wrap: wrap;\n justify-content: flex-end;\n}\n\n@container (max-width: 420px) {\n .mid {\n text-align: right;\n }\n .right {\n justify-content: center;\n }\n}\n.pill {\n padding: 0.25rem 0.7rem;\n font-size: 0.9rem;\n color: var(--emw--color-gray-400, #000);\n display: inline-flex;\n align-items: baseline;\n}\n\n.pill > strong {\n font-weight: 700;\n}";const uc=["ro","en","fr","ar","hr"],pc={en:{homeTeam:"Home team:",awayTeam:"Away team:",selectionCleared:"Your selection has been cleared.",selectionOnLineCleared:"Your selection on this line will be cleared.",loading:"Loading...",error:"Error!",noData:"No data available.",lineInfo:"Line {currentPage} of {totalPages}",clearAll:"Clear All",cancel:"Cancel",confirm:"Confirm"},ro:{homeTeam:"Echipa gazdă:",awayTeam:"Echipa oaspete:",selectionCleared:"Selecția dvs. a fost ștearsă.",selectionOnLineCleared:"Selecția dvs. de pe această linie va fi ștearsă.",loading:"Se încarcă...',n error: 'Eroare!",noData:"Nu sunt date disponibile.",lineInfo:"Linia {currentPage} din {totalPages}",clearAll:"Șterge tot",cancel:"Anulează",confirm:"Confirmă"},fr:{homeTeam:"Équipe à domicile:",awayTeam:"Équipe à l'extérieur:",selectionCleared:"Votre sélection a été effacée.",selectionOnLineCleared:"Votre sélection sur cette ligne sera effacée.",loading:"Chargement...',n error: 'Erreur!",noData:"Aucune donnée disponible.",lineInfo:"Ligne {currentPage} sur {totalPages}",clearAll:"Tout effacer",cancel:"Annuler",confirm:"Confirmer"},ar:{homeTeam:"الفريق المضيف:",awayTeam:"الفريق الضيف:",selectionCleared:"تم مسح اختيارك.",selectionOnLineCleared:"سيتم مسح اختيارك في هذا السطر.",loading:"جار التحميل...',n error: 'خطأ!",noData:"لا توجد بيانات متاحة.",lineInfo:"السطر {currentPage} من {totalPages}",clearAll:"مسح الكل",cancel:"إلغاء",confirm:"تأكيد"},hr:{homeTeam:"Domaći tim:",awayTeam:"Gostujući tim:",selectionCleared:"Vaš odabir je obrisan.",selectionOnLineCleared:"Vaš odabir na ovoj liniji bit će obrisan.",loading:"Učitavanje...',n error: 'Greška!",noData:"Nema dostupnih podataka.",lineInfo:"Linija {currentPage} od {totalPages}",clearAll:"Očisti sve",cancel:"Odustani",confirm:"Potvrdi"}},mc=(t,e,i)=>{const o=e;let s=pc[void 0!==o&&uc.includes(o)?o:"en"][t];return i&&Object.keys(i).forEach((t=>{s=s.replace(`{${t}}`,i[t])})),s},fc=t=>{Object.keys(t).forEach((e=>{for(let i in t[e])pc[e][i]=t[e][i]}))},vc=[{value:"1"},{value:"X"},{value:"2"}],gc=Gh({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"},{extraSVGAttrs:{width:"20px",height:"20px",fill:"currentColor"}}),bc=Gh({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},{extraSVGAttrs:{width:"20px",height:"20px",fill:"currentColor"}}),yc=Gh({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"},{extraSVGAttrs:{width:"16px",height:"16px",fill:"currentColor"}}),wc=Gh({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},{extraSVGAttrs:{width:"20px",height:"20px",fill:"currentColor"}}),xc=Gh({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},{extraSVGAttrs:{width:"20px",height:"20px",fill:"currentColor"}}),_c=class{constructor(i){t(this,i),this.lotteryTippingBulletBetEvent=e(this,"lotteryTippingBulletBetSelect",7),this.lotteryTippingCurrentPageChangeEvent=e(this,"lotteryTippingCurrentPageChange",7),this.eventNameRender=(t,e)=>o("div",{class:"flex gap-1 eventNameContainer__item"},o("span",{class:"eventNameContainer__item--title"},e),o("general-tooltip",null,o("span",{slot:"trigger",class:"icon info-icon",innerHTML:yc,style:{width:"18px"}}),o("div",{slot:"content"},o("div",{class:"match-info"},o("div",{class:"match-info-item"},o("div",{class:"match-info-item-label"},mc("homeTeam",this.language)),o("div",{class:"match-info-item-value"},t.homeName)),o("div",{class:"match-info-item"},o("div",{class:"match-info-item-label"},mc("awayTeam",this.language)),o("div",{class:"match-info-item-value"},t.awayName)))))),this.columns=[{title:"",value:"index",width:3},{title:"",value:"eventName",width:70,render:this.eventNameRender},{title:"",value:"startTime",width:22,align:"right",nowrap:!0,render:(t,e)=>(({date:t,type:e="date",format:i})=>{try{const o=pt(t);if(isNaN(o.getTime()))throw new Error(`Invalid date: ${t}`);if(i)return ut(o,i);let s="dd/MM/yyyy";return"time"===e?s="dd/MM/yyyy HH:mm:ss":"week"===e&&(s="ccc dd/MM/yyyy HH:mm:ss"),ut(o,s)}catch(t){return console.error("Error formatting date:",t.message),""}})({date:e,format:"ccc HH:mm"})},{title:()=>o("lottery-tipping-bullet-group",{theme:"text",bulletConfigContent:JSON.stringify(vc)}),value:"results",width:5,render:(t,e,i)=>{var s,r;return o("lottery-tipping-bullet-group",{mode:this.mode,bulletConfigContent:JSON.stringify(null===(r=null===(s=this.bulletConfigLineGroup)||void 0===s?void 0:s[this.currentPage-1])||void 0===r?void 0:r[i]),"position-idx":`${this.currentPage-1}-${i}`})}}],this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.translationData=void 0,this.clientStylingUrlContent="",this.sessionId=void 0,this.endpoint="",this.gameId=void 0,this.drawId=void 0,this.totalPages=void 0,this.minTotalPages=0,this.maxTotalPages=0,this.mode="multi",this.readPretty=!1,this.defaultBulletConfigLineGroup=void 0,this.bulletConfigLineGroup=[[[]]],this.currentPage=1,this.isLoading=!0,this.hasErrors=!1,this.dialogConfig={visible:!1},this.ticketDataSource=[]}handleNewTranslations(){this.isLoading=!0,fc(JSON.parse(this.translationUrl)),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`)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentWillLoad(){this.translationUrl&&fc(JSON.parse(this.translationUrl))}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&n(this.stylingContainer,this.clientStylingUrl))}get parsedDefaultBulletConfigLineGroup(){if("string"==typeof this.defaultBulletConfigLineGroup&&this.defaultBulletConfigLineGroup)try{const t=JSON.parse(this.defaultBulletConfigLineGroup);return this.readPrettyHandler(t)}catch(t){return void console.error("Error parsing defaultBulletConfigLineGroup:",t)}}readPrettyHandler(t){return this.readPretty?(this.currentPage=1,this.minTotalPages=1,this.maxTotalPages=this.totalPages,null==t?void 0:t.map((t=>null==t?void 0:t.map((t=>null==t?void 0:t.map((t=>Object.assign(Object.assign({},t),{disabled:!0})))))))):t}initLineForBulletConfig(){var t;return Array.from({length:null===(t=this.ticketDataSource)||void 0===t?void 0:t.length},(()=>[...vc]))}_resetBulletConfig(){this.bulletConfigLineGroup=Array.from({length:this.totalPages}).map(this.initLineForBulletConfig.bind(this))}fetchMatchData(){let t=new URL(`${this.endpoint}/poolgames/${this.gameId}/draws/${this.drawId}/matchConfig`);this.gameId&&this.drawId&&(this.isLoading=!0,(t=>fetch(t).then((t=>t.json())))(t.href).then((t=>{this.ticketDataSource=t||[],this.isLoading=!1,this.updateBulletConfigLineGroup()})).catch((t=>{this.isLoading=!1,this.hasErrors=!0,console.error("Error!",t)})))}updateBulletConfigLineGroup(){this.parsedDefaultBulletConfigLineGroup&&this.parsedDefaultBulletConfigLineGroup.length>0?this.bulletConfigLineGroup=this.parsedDefaultBulletConfigLineGroup:this._resetBulletConfig()}connectedCallback(){this.fetchMatchData()}handleClearAll(){this._resetBulletConfig(),(({message:t,theme:e="success"})=>{window.postMessage({type:"ShowNotificationToast",message:t,theme:e})})({message:mc("selectionCleared",this.language)}),this.lotteryTippingBulletBetEvent.emit({hasSelectBullet:!1})}async resetBulletConfig({minLineNumber:t,maxLineNumber:e,defaultBoards:i}){this.totalPages=i,this.minTotalPages=t,this.maxTotalPages=e,this.currentPage=1,this._resetBulletConfig(),this.lotteryTippingBulletBetEvent.emit({hasSelectBullet:!1})}lotteryTippingBulletGroupSelectionHandler(t){const{bulletConfigArr:e,positionIdx:i}=t.detail,[o,s]=i.split("-");this.bulletConfigLineGroup[o][s]=e,this.bulletConfigLineGroup=[...this.bulletConfigLineGroup],this.lotteryTippingBulletBetEvent.emit({hasSelectBullet:!0})}async getData(){return await this.validateBulletConfigLineGroup(),this.bulletConfigLineGroup}validateBulletConfigLineGroup(){if("[[[]]]"===JSON.stringify(this.bulletConfigLineGroup))return Promise.resolve(this.bulletConfigLineGroup);const t=this.bulletConfigLineGroup.length;return t!==this.totalPages||t<this.minTotalPages||t>this.maxTotalPages?(this._resetBulletConfig(),Promise.reject(new Error("Invalid bullet config line group length"))):Promise.resolve(this.bulletConfigLineGroup)}prevPage(){this.swapCard("prev",(()=>{this.currentPage>1&&this.currentPage--}))}nextPage(){this.swapCard("next",(()=>{this.currentPage<this.totalPages&&this.currentPage++}))}handleAddLine(){this.swapCard("add",(()=>{this.totalPages<=this.maxTotalPages-1&&(this.bulletConfigLineGroup.push(this.initLineForBulletConfig()),this.totalPages++,this.currentPage++,this.lotteryTippingBulletBetEvent.emit())}))}handleRemoveLine(){(()=>{if(this.totalPages>=this.minTotalPages+1){const t=()=>{this.dialogConfig={visible:!1}},e=()=>{this.bulletConfigLineGroup.splice(this.currentPage-1,1),this.totalPages--,1!==this.currentPage&&this.currentPage--,this.lotteryTippingBulletBetEvent.emit(),this.swapCard("remove",t)};this.dialogConfig={visible:!0,content:mc("selectionOnLineCleared",this.language),onConfirm:e,onCancel:t}}})()}swapCard(t,e){const i=this.mainContainer;if(!i)return;const{out:o,in:s}={next:{out:"card-out-left",in:"card-in-left"},prev:{out:"card-out-right",in:"card-in-right"},remove:{out:"card-out-down",in:"card-in-right"},add:{out:"card-out-left",in:"card-in-up"}}[t];i.classList.add(o),i.addEventListener("animationend",(()=>{i.classList.remove(o),e();const t=this.mainContainer;t&&(t.classList.add(s),t.addEventListener("animationend",(()=>t.classList.remove(s)),{once:!0}))}),{once:!0})}handleCurrentPageChange(){this.lotteryTippingCurrentPageChangeEvent.emit({currentPage:this.currentPage})}renderLoading(){return o("div",{class:"loading-wrap"},o("section",{class:"dots-container"},o("div",{class:"dot"}),o("div",{class:"dot"}),o("div",{class:"dot"}),o("div",{class:"dot"}),o("div",{class:"dot"})))}render(){var t,e,i,s;if(this.isLoading)return this.renderLoading();if(this.hasErrors)return o("div",{ref:t=>this.stylingContainer=t,class:"LotteryTippingTicketBet__container"},o("p",null,mc("error",this.language)));const r=({columns:t,dataSource:e,hideHead:i=!1,grid:s=!0,bordered:r=!0})=>o("table",{class:{bordered:r,grid:s,"my-table-component":!0}},!i&&o("thead",null,o("tr",null,t.map((t=>{var e;return o("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))})))),o("tbody",null,e.map(((e,i)=>o("tr",{key:i},t.map((t=>o("td",{key:t.value,style:{width:t.width+"%",textAlign:t.align},class:{"no-wrap":t.nowrap}},t.render?t.render(e,e[t.value],i):e[t.value])))))))),n=this.totalPages<this.maxTotalPages&&this.currentPage===this.totalPages,a=this.totalPages>this.minTotalPages;return 0===this.ticketDataSource.length||0===this.minTotalPages||0===this.maxTotalPages?o("div",{class:"LotteryTippingTicketBet__container",ref:t=>this.stylingContainer=t},o("div",{class:"LotteryTippingTicketBet__empty"},o("p",null,mc("noData",this.language)))):this.readPretty?o("div",{class:"LotteryTippingTicketBet__container",ref:t=>this.stylingContainer=t},o("div",{class:"LotteryTippingTicketBet__main",ref:t=>this.mainContainer=t},o(r,{columns:this.columns,dataSource:(null===(t=this.ticketDataSource)||void 0===t?void 0:t.map(((t,e)=>Object.assign(Object.assign({},t),{index:e+1}))))||[],hideHead:!1,grid:!1,bordered:!1}),this.totalPages>1&&o("div",null,o("div",{class:"border-line"}),o("div",{class:"LotteryTippingTicketBet__footer"},o("div",{class:"my-pagination flex justify-between"},o("span",null,mc("lineInfo",this.language,{currentPage:this.currentPage,totalPages:this.totalPages})),o("div",{class:"flex gap-1"},o("span",{class:"btn "+(1===this.currentPage?"disabled":""),onClick:this.prevPage.bind(this)},o("span",{class:"icon",innerHTML:wc})),o("span",{class:"btn "+(this.currentPage===this.totalPages?"disabled":""),onClick:this.nextPage.bind(this)},o("span",{class:"icon",innerHTML:xc})))))))):o("div",{ref:t=>this.stylingContainer=t,class:"LotteryTippingTicketBet__container"},o("div",{class:"LotteryTippingTicketBet__tableToolbar flex justify-end gap-1"},o("button",{class:{"LotteryTippingTicketBet__tableToolbar--item":!0,"mr-0":!(n||a)},onClick:this.handleClearAll.bind(this)},mc("clearAll",this.language))),o("div",{class:"flex align-center LotteryTippingTicketBet__main",ref:t=>this.mainContainer=t},o(r,{columns:this.columns,dataSource:(null===(e=this.ticketDataSource)||void 0===e?void 0:e.map(((t,e)=>Object.assign(Object.assign({},t),{index:e+1}))))||[],hideHead:!1,grid:!1,bordered:!1}),(n||a)&&o("div",{class:"LotteryTippingTicketBet__lineOperatorGroup"},n&&o("div",{class:{"LotteryTippingTicketBet__lineOperatorGroup--item":!0},onClick:this.handleAddLine.bind(this)},o("span",{class:"icon",innerHTML:gc})),a&&o("div",{class:{"LotteryTippingTicketBet__lineOperatorGroup--item":!0},onClick:this.handleRemoveLine.bind(this)},o("span",{class:"icon",innerHTML:bc})))),o("div",{class:"border-line"}),o("div",{class:"LotteryTippingTicketBet__footer"},o("div",{class:"my-pagination flex justify-between"},o("span",null,mc("lineInfo",this.language,{currentPage:this.currentPage,totalPages:this.totalPages})),o("div",{class:"flex gap-1"},o("span",{class:"btn "+(1===this.currentPage?"disabled":""),onClick:this.prevPage.bind(this)},o("span",{class:"icon",innerHTML:wc})),o("span",{class:"btn "+(this.currentPage===this.totalPages?"disabled":""),onClick:this.nextPage.bind(this)},o("span",{class:"icon",innerHTML:xc}))))),this.dialogConfig.visible&&o("vaadin-confirm-dialog",{rejectButtonVisible:!0,rejectText:mc("cancel",this.language),confirmText:mc("confirm",this.language),opened:null===(i=this.dialogConfig)||void 0===i?void 0:i.visible,onConfirm:this.dialogConfig.onConfirm,onReject:this.dialogConfig.onCancel},null===(s=this.dialogConfig)||void 0===s?void 0:s.content))}static get assetsDirs(){return["../static"]}static get watchers(){return{translationUrl:["handleNewTranslations"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],gameId:["fetchMatchData"],sessionId:["fetchMatchData"],drawId:["fetchMatchData"],defaultBulletConfigLineGroup:["fetchMatchData"],currentPage:["handleCurrentPageChange"]}}};var kc,Cc;_c.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.table-wrapper {\n overflow-x: auto; /* Handle horizontal scroll if content overflows */\n}\n\n.my-table-component {\n width: 100%;\n border-collapse: collapse; /* Important for borders */\n text-align: left;\n border-radius: 0.1rem; /* Ant Design like subtle rounding */\n border-spacing: 0;\n}\n\n/* Header */\n.my-table-component th {\n background: var(--emw--color-background-secondary, #f5f5f5);\n color: var(--emw--color-typography, #000);\n font-weight: 500;\n padding: 0.4rem 0.5rem;\n transition: background 0.3s ease;\n}\n\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.btn {\n color: var(--emw--color-typography, #000);\n background: var(--emw--color-background, #fff);\n font-size: 14px;\n transition: all 0.2s ease;\n}\n.btn:hover {\n cursor: pointer;\n}\n\n.btn:hover {\n background-color: var(--emw--color-gray-100, #e6e6e6);\n}\n\n.btn.disabled {\n opacity: 0.5;\n pointer-events: none;\n}\n.btn.disabled:hover {\n cursor: not-allowed !important;\n}\n\n.LotteryTippingTicketBet__tableToolbar {\n width: 100%;\n margin-bottom: 1rem;\n}\n\n.LotteryTippingTicketBet__tableToolbar--item {\n background-color: transparent;\n cursor: pointer;\n font-weight: 500;\n white-space: nowrap;\n display: inline-flex;\n border-radius: 1.6rem;\n border: 1px solid var(--emw--color-gray-100, #e6e6e6);\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n padding-left: 1rem;\n padding-right: 1rem;\n margin-right: 2rem;\n color: var(--emw--color-typography, #000);\n}\n.LotteryTippingTicketBet__tableToolbar--item.mr-0 {\n margin-right: 0rem !important;\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup {\n flex-basis: 2rem;\n display: flex;\n flex-direction: column;\n gap: 1rem;\n border-radius: 8px;\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup--item {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 2rem;\n height: 2rem;\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n color: var(--emw--color-typography, #000);\n border-radius: 8px;\n transition: all 0.2s ease-in-out;\n cursor: pointer;\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup--item:hover {\n transform: scale(1.1);\n box-shadow: 0 6px 14px var(--emw-calender-curday-box-shadow, rgba(0, 0, 0, 0.09));\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup--item .icon {\n width: 20px;\n height: 20px;\n transition: filter 0.2s ease-in-out;\n filter: grayscale(0.3);\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup--item:hover .icon {\n filter: grayscale(0);\n transform: rotate(3deg);\n}\n\ndiv.border-line {\n margin-top: 1rem;\n height: 1px;\n width: 100%;\n box-sizing: border-box;\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n transition: all 0.3s ease;\n}\n\n.LotteryTippingTicketBet__footer {\n padding: 0.5rem;\n}\n\n.my-pagination {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 1rem;\n font-size: 0.8rem;\n color: var(--emw--color-typography-secondary, #333);\n}\n\n.my-pagination span {\n font-weight: 500;\n user-select: none;\n}\n\n.my-pagination .btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n border-radius: 50%;\n transition: all 0.3s ease;\n cursor: pointer;\n opacity: 0.9;\n color: var(--emw--color-typography, #000);\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n}\n\n.my-pagination .btn .icon {\n width: 20px;\n height: 20px;\n transition: transform 0.2s ease;\n}\n\n.my-pagination .btn:hover {\n transform: scale(1.1);\n box-shadow: 0 6px 14px var(--emw-calender-curday-box-shadow, rgba(0, 0, 0, 0.09));\n}\n\n.my-pagination .btn.disabled {\n background-color: var(--emw--color-background-tertiary, #ccc);\n cursor: not-allowed;\n opacity: 0.5;\n transform: scale(1);\n}\n\n.match-info-item {\n display: flex;\n}\n\n.match-info-item-label {\n margin-right: 6px;\n}\n\n.info-icon:hover {\n cursor: pointer;\n}\n\n.LotteryTippingTicketBet__empty p {\n text-align: center;\n}\n\n.no-wrap {\n white-space: nowrap;\n overflow: hidden;\n}\n\n.eventNameContainer__item--title {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 300px;\n}\n@container (max-width: 600px) {\n .eventNameContainer__item--title {\n max-width: 180px;\n }\n}\n@container (max-width: 500px) {\n .eventNameContainer__item--title {\n max-width: 150px;\n }\n}\n@container (max-width: 400px) {\n .eventNameContainer__item--title {\n max-width: 100px;\n }\n}\n@container (max-width: 330px) {\n .eventNameContainer__item--title {\n max-width: 70px;\n }\n}\n\n.LotteryTippingTicketBet__main {\n perspective: 800px;\n will-change: transform, opacity;\n backface-visibility: hidden;\n}\n\n@container (max-width: 520px) {\n .LotteryTippingTicketBet__main {\n flex-wrap: wrap;\n justify-content: center;\n }\n .LotteryTippingTicketBet__tableToolbar--item {\n margin-right: 0 !important;\n }\n}\n/* Fade-In Keyframes */\n@keyframes fadeInLeft {\n from {\n opacity: 0;\n transform: translateX(100%);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n/* Fade-Out Keyframes */\n@keyframes fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n@keyframes fadeInRight {\n from {\n opacity: 0;\n transform: translateX(-100%);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n@keyframes fadeInUp {\n from {\n opacity: 0;\n transform: translateY(100%);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n@-webkit-keyframes slide-left {\n 0% {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n }\n 100% {\n -webkit-transform: translateX(-100px);\n transform: translateX(-100px);\n }\n}\n@keyframes slide-left {\n 0% {\n -webkit-transform: translateX(100%);\n transform: translateX(100%);\n }\n 100% {\n -webkit-transform: translateX(0px);\n transform: translateX(0px);\n }\n}\n@-webkit-keyframes slide-right {\n 0% {\n -webkit-transform: translateX(-100%);\n transform: translateX(-100%);\n }\n 100% {\n -webkit-transform: translateX(0px);\n transform: translateX(0px);\n }\n}\n@keyframes slide-right {\n 0% {\n -webkit-transform: translateX(-100px);\n transform: translateX(-100px);\n }\n 100% {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n }\n}\n@-webkit-keyframes slide-top {\n 0% {\n -webkit-transform: translateY(-100px);\n transform: translateY(-100px);\n }\n 100% {\n -webkit-transform: translateY(0px);\n transform: translateY(0px);\n }\n}\n@keyframes slide-top {\n 0% {\n -webkit-transform: translateY(-100px);\n transform: translateY(-100px);\n }\n 100% {\n -webkit-transform: translateY(0px);\n transform: translateY(0px);\n }\n}\n/* Apply to your card classes */\n.card-in-left {\n -webkit-animation: slide-left 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n animation: slide-left 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n}\n\n.card-out-left {\n animation: fadeOut 0.2s ease-out both;\n}\n\n.card-in-right {\n -webkit-animation: slide-right 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n animation: slide-right 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n}\n\n.card-out-right {\n animation: fadeOut 0.2s ease-out both;\n}\n\n.card-in-up {\n -webkit-animation: slide-top 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n animation: slide-top 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n}\n\n.card-out-down {\n animation: fadeOut 0.2s ease-out both;\n}\n\n.loading-wrap {\n margin: 20px 0;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 40vh;\n}\n.loading-wrap .dots-container {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n}\n.loading-wrap .dot {\n height: 14px;\n width: 14px;\n margin-right: 14px;\n border-radius: 14px;\n background-color: var(--emw--color-gray-300, #333);\n animation: pulse 1.5s infinite ease-in-out;\n}\n.loading-wrap .dot:last-child {\n margin-right: 0;\n}\n.loading-wrap .dot:nth-child(1) {\n animation-delay: -0.3s;\n}\n.loading-wrap .dot:nth-child(2) {\n animation-delay: -0.1s;\n}\n.loading-wrap .dot:nth-child(3) {\n animation-delay: 0.1s;\n}\n@keyframes pulse {\n 0% {\n transform: scale(0.8);\n background-color: var(--emw--color-gray-300, #333);\n }\n 50% {\n transform: scale(1.2);\n background-color: var(--emw--color-gray-100, #e6e6e6);\n }\n 100% {\n transform: scale(0.8);\n background-color: var(--emw--color-gray-150, #6f6f6f);\n }\n}",function(t){t.SingleBet="SingleBet",t.SystemBet="SystemBet"}(kc||(kc={})),function(t){t.FullTime="FullTime",t.HalfTime="HalfTime",t.Both="Both"}(Cc||(Cc={}));const Sc="TICKET_INVALID_TOKEN",Tc=class{constructor(i){t(this,i),this.logoutEventHandler=e(this,"logout",7),this.bothBettingTypeMultiplier=2,this.onStakeChange=t=>{this.currentStake=this.getCurrentStakeByValue(t.detail.value)},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.logoUrl=void 0,this.endpoint="",this.sessionId=void 0,this.gameId=void 0,this.playerId="",this.drawId=void 0,this.isLoading=!0,this.bettingTypeOptions=[],this.playingModeOptions=[],this.selectedBettingType=void 0,this.selectedPlayingMode=void 0,this.hasSelectBullet=void 0,this.hasSelectAllBullet=void 0,this.totalLineCombination=0,this.submitLoading=void 0,this.rawData={},this.saleStatisticsInfo={},this.currentStake=void 0,this.dialogConfig={visible:!1}}async getLotteryTippingBulletResults(){return await this.childRef.getData()}get lineNumberRange(){const{betType:t}=ac({rawData:this.rawData,selectedBettingType:this.selectedBettingType,selectedPlayingMode:this.selectedPlayingMode}),e=(null==t?void 0:t.boardsAllowed)||[0],[i,o]=[Math.min(...e),Math.max(...e)];return{minLineNumber:i,maxLineNumber:o,defaultBoards:(null==t?void 0:t.defaultBoards)||i}}get playTypeConfig(){var t,e,i;return null===(i=null===(e=null===(t=this.rawData)||void 0===t?void 0:t.rules)||void 0===e?void 0:e.poolGame)||void 0===i?void 0:i.playTypes}get betTypeConfig(){var t,e;return null===(e=null===(t=this.rawData)||void 0===t?void 0:t.rules)||void 0===e?void 0:e.betTypes}get isBothBettingType(){return this.selectedBettingType===Cc.Both}get stakeOptions(){var t,e,i;return null===(i=null===(e=null===(t=this.rawData)||void 0===t?void 0:t.rules)||void 0===e?void 0:e.stakes)||void 0===i?void 0:i.map((t=>{var e;return{value:null===(e=t.value)||void 0===e?void 0:e.toString(),label:t.value,currency:t.currency}}))}getCurrentStakeByValue(t){var e;return null===(e=this.stakeOptions)||void 0===e?void 0:e.find((e=>+e.value==+t))}initiateCurrentStake(){var t,e,i;if(1===(null===(t=this.stakeOptions)||void 0===t?void 0:t.length))this.currentStake=this.stakeOptions[0];else{const t=(i=(null===(e=this.stakeOptions)||void 0===e?void 0:e.map((t=>t.value)))||[]).length?Math.min.apply(null,i):void 0;this.currentStake=this.getCurrentStakeByValue(t)}}handleBettingTypeChange(t){var e,i,o,s;if(t===this.selectedBettingType)return;this.selectedBettingType=t;const r=(({bettingType:t,playTypeConfig:e,betTypeConfig:i,enabledPlayingModeOptions:o})=>{const s=i.filter((t=>t.enabled)).map((t=>t.id)),r=e.filter((t=>s.includes(t.betTypeId))).filter((e=>e.bettingType===t)).map((t=>t.playMode));return o.filter((t=>r.includes(t.code)))})({bettingType:this.selectedBettingType,playTypeConfig:this.playTypeConfig,betTypeConfig:this.betTypeConfig,enabledPlayingModeOptions:nc((null===(o=null===(i=null===(e=this.rawData)||void 0===e?void 0:e.rules)||void 0===i?void 0:i.poolGame)||void 0===o?void 0:o.playModes)||[])});this.playingModeOptions=r,r.length?r.map((t=>t.code)).includes(this.selectedPlayingMode)||(this.hasSelectBullet=!1,this.handlePlayingModeChange(null===(s=r[0])||void 0===s?void 0:s.code)):this.selectedPlayingMode=void 0,this.clearBulletConfig()}async clearBulletConfig(){return await this.childRef.resetBulletConfig(this.lineNumberRange)}handlePlayingModeChange(t){if(t===this.selectedPlayingMode)return;const e=e=>{this.selectedPlayingMode=t,this.clearBulletConfig().then((()=>{null==e||e()}))};if(this.hasSelectBullet){const t=()=>{this.dialogConfig={visible:!1}},i=()=>{e(t)};this.dialogConfig={visible:!0,content:Qh("selectionCleared",this.language),onConfirm:i,onCancel:t}}else e()}lotteryTippingBulletGroupSelectionHandler(t){var e;const i=null===(e=t.detail)||void 0===e?void 0:e.hasSelectBullet;void 0!==i&&(this.hasSelectBullet=i),this.bulletBetSelectChecker()}calculateCombinationInLine(t){return t.reduce(((t,e)=>t*e),1)}calculateTotalAmount(){const t=this.currentStake;if(!t)return 0;let e=+t.value*this.totalLineCombination;return this.isBothBettingType&&(e*=this.bothBettingTypeMultiplier),e}get totalAmountFormatted(){var t;const e=this.calculateTotalAmount();return sc(e)+" "+((null===(t=this.currentStake)||void 0===t?void 0:t.currency)||"")}get currentStakeFormatted(){const{value:t="",currency:e=""}=this.currentStake||{};return`${t} ${e}`}bulletBetSelectChecker(){(async()=>{const t=await this.getLotteryTippingBulletResults();this.hasSelectAllBullet=!(({rawResults:t})=>{const e=(({rawResults:t})=>{const e=t=>t.filter((t=>t.isSelected)).length;return t.map((t=>t.length>0?t.map(e):[0]))})({rawResults:t});this.totalLineCombination=e.reduce(((t,e)=>t+this.calculateCombinationInLine(e)),0);const{combinations:i=1,maxCombinations:o=1}=ac({rawData:this.rawData,selectedBettingType:this.selectedBettingType,selectedPlayingMode:this.selectedPlayingMode}).betType||{};return e.some((t=>{const e=this.calculateCombinationInLine(t);return e<i||e>o}))})({rawResults:t})})()}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`)}componentWillLoad(){this.translationUrl&&tc(this.translationUrl)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&n(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}connectedCallback(){(()=>{let t=new URL(`${this.endpoint}/games/${this.gameId}`);this.isLoading=!0,ic(t.href,"GET").then((t=>{var e,i,o,s,r,n,a;this.rawData=t,this.bettingTypeOptions=nc((null===(i=null===(e=null==t?void 0:t.rules)||void 0===e?void 0:e.poolGame)||void 0===i?void 0:i.bettingTypes)||[]),this.playingModeOptions=nc((null===(s=null===(o=null==t?void 0:t.rules)||void 0===o?void 0:o.poolGame)||void 0===s?void 0:s.playModes)||[]),this.initiateCurrentStake();const{bettingType:l,playMode:h}=(({playTypeConfig:t=[],betTypeConfig:e=[],enabledBettingTypeOptions:i=[],enabledPlayingModeOptions:o=[]})=>{const s=e.filter((t=>t.enabled));for(const e of s){const{bettingType:s,playMode:r}=null==t?void 0:t.find((t=>t.betTypeId===e.id));if(i.map((t=>t.code)).includes(s)&&o.map((t=>t.code)).includes(r))return{bettingType:s,playMode:r}}return{}})({playTypeConfig:null===(n=null===(r=null==t?void 0:t.rules)||void 0===r?void 0:r.poolGame)||void 0===n?void 0:n.playTypes,betTypeConfig:null===(a=null==t?void 0:t.rules)||void 0===a?void 0:a.betTypes,enabledBettingTypeOptions:this.bettingTypeOptions,enabledPlayingModeOptions:this.playingModeOptions});return this.handleBettingTypeChange(l),this.selectedPlayingMode=h,this.updateSaleStatistics()})).catch((t=>{console.error("Error!",t)})).finally((()=>{this.isLoading=!1}))})()}updateSaleStatistics(){var t;return async function({endpoint:t,gameId:e,drawId:i}){try{return await ic(`${t}/games/${e}/draws/${i}/saleStatistics`)}catch(t){return Promise.reject(t)}}({endpoint:this.endpoint,gameId:null===(t=this.rawData)||void 0===t?void 0:t.type,drawId:this.drawId}).then((t=>{this.saleStatisticsInfo=t}))}async handleSubmit(){const t=await this.getLotteryTippingBulletResults(),{betTypeId:e,betType:i}=ac({rawData:this.rawData,selectedBettingType:this.selectedBettingType,selectedPlayingMode:this.selectedPlayingMode}),o=new URL(`${this.endpoint}/tickets`),s=(({playerId:t,rawResults:e,gameId:i,rawData:o,amount:s,currentStake:r,betTypeId:n,betType:a})=>{var l;const h={playerId:t,tickets:[]},c=(t=>{const e=t=>t.map((t=>t.isSelected?1:0)),i=t.map((t=>t.map(e))),o=[];return i.forEach(((t,e)=>{const i=[];t.forEach(((t,e)=>{const o=t.map(((t,e)=>t?rc[e]:null)).filter(Boolean);i[e]=[o]})),o[e]=i})),o})(e),d=r||{};return h.tickets.push({startingDrawId:null===(l=null==o?void 0:o.currentDraw)||void 0===l?void 0:l.id,amount:s,gameId:i,gameName:o.name,currency:d.currency,selection:c.map((t=>({betType:n,stake:+d.value,poolGameSelections:t,quickPick:!1,betName:a.name}))),multiplier:!1,drawCount:1,quickPick:!1}),h})({playerId:this.playerId,rawResults:t,gameId:this.gameId,rawData:this.rawData,amount:this.calculateTotalAmount().toString(),currentStake:this.currentStake,betTypeId:e,betType:i});this.submitLoading=!0,(({body:t,sessionId:e,url:i})=>{const o={method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${e}`,"X-Idempotency-Key":"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))},body:JSON.stringify(t)};return fetch(i,o).then((t=>{if(401===t.status)throw new Error(Sc);if(t.status>300)throw new Error(t.statusText);return t.json()}))})({body:s,sessionId:this.sessionId,url:o.href}).then((()=>{oc({message:Qh("ticketSubmitted",this.language)}),this.clearBulletConfig(),this.updateSaleStatistics()})).catch((t=>{if(t.message===Sc)return this.logoutEventHandler.emit(),void oc({message:Sc,theme:"error"});oc({message:Qh("ticketFailed",this.language),theme:"error"})})).finally((()=>{this.submitLoading=!1}))}get lineCountRender(){const t=sc(this.totalLineCombination);let e=Qh("lines",this.language);return[0,1].includes(+t)&&(e=Qh("line",this.language)),t+" "+e}renderBettingControls(){var t,e;const i=()=>o("div",{class:"skeleton-content"},o("div",{class:"skeleton-item skeleton-animated"})),s=()=>{var t;return o("div",null,o("vaadin-select",{items:this.stakeOptions||[],value:(null===(t=this.currentStake)||void 0===t?void 0:t.value)||"","on-value-changed":this.onStakeChange.bind(this),"no-vertical-overlap":!0}))};return o("div",{class:"LotteryTippingTicketController__top"},o("div",{class:"LotteryTippingTicketController__row"},o("div",{class:"LotteryTippingTicketController__section"},o("span",{class:"LotteryTippingTicketController__label"},Qh("bettingType",this.language)),this.bettingTypeOptions.length?(()=>o("div",{class:"LotteryTippingTicketController__segmented-control"},this.bettingTypeOptions.map((t=>o("button",{class:{LotteryTippingTicketController__segment:!0,"LotteryTippingTicketController__segment--active":this.selectedBettingType===t.code},onClick:this.handleBettingTypeChange.bind(this,t.code)},t.name)))))():i()),o("div",{class:"LotteryTippingTicketController__section"},o("span",{class:"LotteryTippingTicketController__label"},Qh("playingMode",this.language)),this.playingModeOptions.length?(()=>o("div",{class:"LotteryTippingTicketController__segmented-control"},this.playingModeOptions.map((t=>o("button",{class:{LotteryTippingTicketController__segment:!0,"LotteryTippingTicketController__segment--active":this.selectedPlayingMode===t.code},onClick:this.handlePlayingModeChange.bind(this,t.code)},t.name)))))():i()),(null===(t=this.stakeOptions)||void 0===t?void 0:t.length)>1&&o("div",{class:"LotteryTippingTicketController__section"},o("span",{class:"LotteryTippingTicketController__label"},Qh("stakePerLine",this.language)),s()),(null===(e=this.stakeOptions)||void 0===e?void 0:e.length)>1&&o("div",{class:"LotteryTippingTicketController__section"},o("span",{class:"LotteryTippingTicketController__label"},Qh("stakePerLine",this.language)),s())))}renderOrderSummary(){var t;return o("div",{class:"LotteryTippingTicketController__main--right order-summary"},o("h3",{class:"order-summary__title"},Qh("orderSummaryTitle",this.language)),o("div",{class:"order-summary__ticket-info"},o("div",{class:"order-summary__ticket"},Qh("orderSummaryTickets",this.language),":"),o("div",{class:"order-summary__details"},o("span",{class:"order-summary__line-count"},this.lineCountRender),o("div",null,this.currentStake&&o("span",{class:"order-summary__multiplier"},"x"),o("span",{class:"order-summary__stake"},this.currentStakeFormatted)),this.isBothBettingType&&o("div",null,o("span",{class:"order-summary__multiplier"},"x"),o("span",{class:"order-summary__stake"},this.bothBettingTypeMultiplier)))),o("hr",{class:"order-summary__divider"}),o("div",{class:"order-summary__ticket-info"},o("div",{class:"order-summary__ticket"},Qh("orderSummaryTotal",this.language),":"),o("span",{class:"order-summary__details"},this.totalAmountFormatted)),o("div",{class:"order-summary__button-wrapper"},o("lottery-button",{onClick:this.handleSubmit.bind(this),loading:this.submitLoading,disabled:!this.hasSelectAllBullet||this.submitLoading||void 0===(null===(t=this.currentStake)||void 0===t?void 0:t.value),text:Qh("orderSummarySubmit",this.language)})))}get formattedTurnover(){var t,e,i;const o=null!==(i=null===(e=null===(t=this.saleStatisticsInfo)||void 0===t?void 0:t.wagerSegment)||void 0===e?void 0:e.totalSalesCrossDraw)&&void 0!==i?i:0;return null==o?"":`€${o?sc(o):0}`}render(){var t,e,i,s,r,n,a;return o("div",{key:"353f56111a3dc6f6e7365d563163a38c850f2e88",class:"lottery-tipping-ticket-controller__container",ref:t=>this.stylingContainer=t},o("lottery-tipping-ticket-banner",{key:"3a2472f0bf9195547f5e4c6c2c0a2362c790aa27","client-styling":this.clientStyling,"client-styling-Url":this.clientStylingUrl,stopTime:null===(e=null===(t=this.rawData)||void 0===t?void 0:t.currentDraw)||void 0===e?void 0:e.wagerCloseTime,period:null===(s=null===(i=this.rawData)||void 0===i?void 0:i.currentDraw)||void 0===s?void 0:s.date,"formatted-turnover":this.formattedTurnover,language:this.language,"translation-url":this.translationUrl,"logo-url":this.logoUrl}),this.renderBettingControls(),o("div",{key:"9d0a9391ccf79351959cc280e3c15efc657a966f",class:"flex flex-wrap LotteryTippingTicketController__main"},o("div",{key:"c61fdb41d41694227971478e193cc5162bff30c3",class:"LotteryTippingTicketController__main--left"},o("lottery-tipping-ticket-bet",{key:"56964177a4366a366279b2ebfff2ee52d1e27de0",ref:t=>this.childRef=t,endpoint:this.endpoint,"session-id":this.sessionId,"game-id":null===(r=this.rawData)||void 0===r?void 0:r.type,"draw-id":this.drawId,language:this.language,"translation-url":this.translationUrl,"max-total-pages":this.lineNumberRange.maxLineNumber,"min-total-pages":this.lineNumberRange.minLineNumber,"total-pages":this.lineNumberRange.defaultBoards,mode:this.selectedPlayingMode===kc.SingleBet?"single":"multi","client-styling":this.clientStyling,"client-styling-Url":this.clientStylingUrl})),this.renderOrderSummary()),this.dialogConfig.visible&&o("vaadin-confirm-dialog",{key:"fe8eb6d26eecee3c6e10b20c4f2ad968f707d51c",rejectButtonVisible:!0,rejectText:Qh("cancel",this.language),confirmText:Qh("confirm",this.language),opened:null===(n=this.dialogConfig)||void 0===n?void 0:n.visible,onConfirm:this.dialogConfig.onConfirm,onReject:this.dialogConfig.onCancel},null===(a=this.dialogConfig)||void 0===a?void 0:a.content))}static get assetsDirs(){return["../static"]}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};var Ac;Tc.style=".lottery-tipping-ticket-controller__container {\n display: block;\n box-sizing: border-box;\n font-size: 14px;\n container-type: inline-size;\n background: var(--emw--color-background, #fff);\n}\n@container (max-width: 375px) {\n .lottery-tipping-ticket-controller__container {\n font-size: 12px;\n }\n}\n\n.LotteryTippingTicketController__top {\n padding: 1.8rem;\n display: flex;\n flex-direction: column;\n gap: 2rem;\n margin: 0 auto;\n max-width: 800px;\n}\n.LotteryTippingTicketController__row {\n display: flex;\n align-items: center;\n gap: 1rem;\n justify-content: space-between;\n flex-wrap: wrap;\n}\n.LotteryTippingTicketController__section {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n.LotteryTippingTicketController__label {\n font-weight: 500;\n white-space: nowrap;\n width: 6rem;\n color: var(--emw--color-typography-secondary, #333);\n}\n.LotteryTippingTicketController__segmented-control {\n height: 2.2rem;\n display: inline-flex;\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n border-radius: 2rem;\n padding: 0.2rem;\n}\n.LotteryTippingTicketController__segment {\n background-color: transparent;\n border: none;\n padding: 0.3rem 0.8rem;\n cursor: pointer;\n font-weight: 500;\n border-radius: 2rem;\n outline: none;\n transition: background-color 0.25s ease, color 0.25s ease;\n white-space: nowrap;\n color: var(--emw--color-typography, #000);\n}\n.LotteryTippingTicketController__segment--active {\n background-color: var(--emw--color-background, #ffffff);\n color: var(--emw--color-typography, #000);\n font-weight: 600;\n}\n.LotteryTippingTicketController__segment--disabled:hover {\n cursor: not-allowed !important;\n}\n.LotteryTippingTicketController__segment:not(.LotteryTippingTicketController__segment--active):hover {\n background-color: var(--emw--color-background-tertiary, #ccc);\n}\n\n.flex {\n display: flex;\n}\n\n.flex-wrap {\n flex-wrap: wrap;\n}\n\n.align-center {\n align-items: center;\n}\n\n.gap-1 {\n gap: 4px;\n}\n\n.LotteryTippingTicketController__main {\n align-items: flex-start;\n justify-content: center;\n gap: 2rem;\n max-width: 1200px;\n margin: 0 auto;\n padding: 0 20px;\n flex-wrap: wrap;\n}\n.LotteryTippingTicketController__main--left {\n border: 1px solid var(--emw--color-gray-50, #f5f5f5);\n padding: 1rem;\n border-radius: 1rem;\n flex: 1.5;\n}\n.LotteryTippingTicketController__main--right {\n padding: 1rem;\n border-radius: 1rem;\n flex: 1;\n}\n\n.order-summary {\n max-width: 360px;\n width: 100%;\n background: var(--emw--color-background, #fff);\n}\n\n.order-summary__title {\n margin-bottom: 16px;\n text-align: center;\n color: var(--emw--color-typography, #000);\n text-transform: uppercase;\n}\n\n.order-summary__ticket-info {\n display: flex;\n align-items: center;\n margin-bottom: 16px;\n gap: 10px;\n color: var(--emw--color-typography, #000);\n}\n\n.order-summary__ticket {\n font-weight: 500;\n width: 50px;\n text-align: right;\n color: var(--emw--color-typography, #000);\n}\n\n.order-summary__details {\n display: flex;\n align-items: center;\n color: var(--emw--color-typography, #000);\n}\n\n.order-summary__multiplier {\n color: var(--emw--color-typography-secondary, #333);\n margin: 0 8px;\n}\n\n.order-summary__divider {\n border: none;\n border-top: 1px solid var(--emw--color-gray-100, #e6e6e6);\n margin: 20px 0;\n}\n\n.order-summary__button-wrapper {\n display: flex;\n justify-content: center;\n}\n\n.order-summary__button {\n cursor: pointer;\n padding: 0.8rem 4rem;\n background: var(--emw--color-primary, #fed275);\n color: var(--emw--color-typography, #000);\n border-radius: var(--emw--button-border-radius, 4px);\n border: none;\n position: relative;\n}\n\n.loading-icon {\n position: absolute;\n right: 40px;\n top: 10px;\n}\n\n.order-summary__button:not(.order-summary__button--disabled):not(.order-summary__button--loading):hover {\n transform: translateY(-1px);\n background: var(--emw--color-primary-variant, #ffe66f);\n}\n\n.order-summary__button--loading {\n background: var(--emw--color-primary-variant, #ffe66f);\n cursor: not-allowed;\n}\n\n.order-summary__button--disabled {\n background: var(--emw--color-background-secondary, #f5f5f5);\n color: var(--emw--color-typography, #000);\n cursor: not-allowed;\n}\n\n.skeleton-content {\n display: flex;\n flex-direction: column;\n gap: 29px;\n align-items: center;\n}\n\n.skeleton-item {\n background: var(--emw--color-background-secondary, #f5f5f5);\n border-radius: 4px;\n height: 40px;\n width: 200px;\n}\n\n.skeleton-animated {\n animation: skeleton-shimmer 1.5s infinite linear;\n background: linear-gradient(90deg, var(--emw--color-background-secondary, #f5f5f5) 25%, var(--emw--color-background-tertiary, #ccc) 37%, var(--emw--color-background-secondary, #f5f5f5) 63%);\n background-size: 200% 100%;\n}\n\n@keyframes skeleton-shimmer {\n to {\n background-position: 100% 0;\n }\n}\n.loading-icon.scale {\n animation: scale 1s infinite ease-in-out;\n}\n\n@keyframes scale {\n 0%, 100% {\n transform: scale(1);\n }\n 50% {\n transform: scale(1.2);\n }\n}",function(t){t.WON="Won",t.LOST="Lost"}(Ac||(Ac={}));const zc=class{constructor(i){t(this,i),this.logout=e(this,"logout",7),this.ticketTypeMap={NORMAL:"Normal",SYNDICATE:"Syndicate",SUBSCRIPTION:"Subscription"},this.resultMap={[Ac.WON]:"Win",[Ac.LOST]:"Lose"},this.displayPrizeCategory=t=>{const e=new Map;t.forEach((t=>{let i=t.divisionDisplayName,o=t.amount,s=t.currency;i&&"None"!=i&&(e.has(i)?e.set(i,{amount:e.get(i).amount+o,currency:s,times:e.get(i).times+1}):e.set(i,{amount:o,currency:s,times:1}))}));const i=[];for(let[t,o]of e.entries())i.push({prizeName:t,amount:o.amount,currency:o.currency,times:o.times});return i.sort(((t,e)=>e.prizeName.localeCompare(t.prizeName))),i},this.endpoint=void 0,this.gameId=void 0,this.playerId=void 0,this.sessionId="",this.drawId=void 0,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.language="en",this.translationUrl="",this.ticketHistory=[],this.activeStatus="",this.statusOptions=void 0,this.isLoading=!0,this.rawData={},this.filterData={offset:0,limit:10,state:"",from:"",to:"",wagerType:"",vendorGameType:"PoolGame",vendorGameBettingObject:"HomeDrawAway",id:""},this.paginationInfo={current:1,total:0,pageSize:10},this.quickFiltersActive=!1,this.showCurrentTicketLine=!1,this.curTicketItem=void 0,this.curSelection=[],this.curSelectionIdx=0,this.showCurrentDrawResult=!1,this.curDrawItem=void 0,this.curDrawSelection=[],this.curDrawSelectionBettingType=void 0,this.curDrawSelectionMap={}}handleClientStylingChange(t,e){t!=e&&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`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&n(this.stylingContainer,this.clientStylingUrl))}async fetchGameData(){var t;try{let t=new URL(`${this.endpoint}/games/${this.gameId}`);const e=await Lh(t.href,"GET");this.rawData=e}catch(e){Vh({message:null!==(t=e.message)&&void 0!==t?t:e,theme:"error"})}}connectedCallback(){this.endpoint&&this.gameId&&this.fetchGameData()}handleGameInfoChange(t,e){t&&t!=e&&this.fetchGameData()}handleTicketInfoChange(t,e){t&&t!=e&&this.fetchTicketList()}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}async fetchTicketList(){this.isLoading=!0;try{const{items:t,total:e}=await Lh(`${this.endpoint}/tickets${function(t){const e={};Object.entries(t).forEach((([t,i])=>{$h(i,!0)||(e[t]=i)}));const i=Object.entries(e).map((([t,e])=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`)).join("&");return i?`?${i}`:""}(this.filterData)}`,"GET",null,{Authorization:`Bearer ${this.sessionId}`});this.ticketHistory=t,this.paginationInfo.total=e,t.length>0&&this.getDrawResult()}catch(t){console.log("in fetchTicketList error is: ",t),401===t.status&&(Vh({message:t.message,theme:"error"}),this.logout.emit())}finally{this.isLoading=!1}}async fetchDrawResult(t,e){try{return await Lh(`${this.endpoint}/games/${t}/draws/${e}`,"GET",{})}catch(t){console.log(t)}}getDivision(t,e){var i;let o=t.division,s=null===(i=e.prizes)||void 0===i?void 0:i.filter((t=>t.order===o));return s&&s.length?s[0].division:null}async getDrawResult(){const t=new Map;this.ticketHistory.forEach(((e,i)=>{e.drawResults.forEach(((o,s)=>{const r=`${o.drawId}-${e.gameId}`;t.has(r)?t.get(r).indices.push({ticketIndex:i,drawIndex:s}):t.set(r,{drawId:o.drawId,gameId:e.gameId,indices:[{ticketIndex:i,drawIndex:s}]})}))}));let e=[...this.ticketHistory];await Promise.all(Array.from(t.values()).map((async({gameId:t,drawId:i,indices:o})=>{try{const s=await this.fetchDrawResult(t,i);s&&o.forEach((({ticketIndex:t,drawIndex:i})=>{const o=Object.assign(Object.assign({},e[t].drawResults[i]),{tempDrawData:Object.assign(Object.assign({},s),{vendorGameId:e[t].vendorGameId}),prizeDetails:this.displayPrizeCategory(e[t].drawResults[i].details)}),r=[...e[t].drawResults];r[i]=o,e[t]=Object.assign(Object.assign({},e[t]),{drawResults:r})}))}catch(e){console.error(`failed to fetch draw result (gameId: ${t}, drawId: ${i}):`,e)}}))),this.ticketHistory=e}componentWillLoad(){this.translationUrl&&Nh(JSON.parse(this.translationUrl)),this.statusOptions=[{label:Bh("settled",this.language),value:"Settled"},{label:Bh("purchased",this.language),value:"Purchased"},{label:Bh("canceled",this.language),value:"Canceled"}],this.fetchTicketList()}changeStatus(t){this.activeStatus=t,this.filterData.state=t,this.quickFiltersActive=!0,this.fetchTicketList()}handlePageSizeChange(t){this.filterData.limit=t.detail,this.fetchTicketList()}handlePageChange(t){this.filterData.offset=(t.detail-1)*this.filterData.limit,this.fetchTicketList()}handleShowTicketLineDetial(t){this.curSelectionIdx=0,this.showCurrentTicketLine=!0,this.curTicketItem=t,this.curSelection=this.parseSelection()}handleShowCurrentDraw(t){this.showCurrentDrawResult=!0,this.curDrawItem=t,this.curDrawSelectionBettingType=t.winningNumbers[0].winning_type,this.curDrawItem.winningNumbers.forEach((t=>{this.curDrawSelectionMap[t.winning_type]=[Rh(t.numbers)]})),this.curDrawSelection=this.curDrawSelectionMap[this.curDrawSelectionBettingType]}parseSelection(){const t=[];return this.curTicketItem.selection.forEach(((e,i)=>{t[i]=Rh(e.selections)})),t}handleFilterChange(t){const e=t.detail;this.filterData.from=e.filterFromCalendar,this.filterData.to=e.filterToCalendar,this.filterData.id=e.ticketId,this.filterData.wagerType=e.ticketType,this.fetchTicketList()}handleFilterClear(){this.activeStatus="",this.quickFiltersActive=!1,this.filterData={offset:0,limit:10,state:"",from:"",to:"",wagerType:"",vendorGameType:"PoolGame",vendorGameBettingObject:"HomeDrawAway",id:""},this.fetchTicketList()}get playTypeConfig(){var t,e,i;return null===(i=null===(e=null===(t=this.rawData)||void 0===t?void 0:t.rules)||void 0===e?void 0:e.poolGame)||void 0===i?void 0:i.playTypes}get bettingTypeConfig(){var t,e,i;return null===(i=null===(e=null===(t=this.rawData)||void 0===t?void 0:t.rules)||void 0===e?void 0:e.poolGame)||void 0===i?void 0:i.bettingTypes}getBettingType(t){var e;return null!==(e=this.playTypeConfig.find((e=>e.betTypeId===t)).bettingType)&&void 0!==e?e:""}handlePoolGameCurrentPageChange(t){const{currentPage:e}=t.detail;this.curSelectionIdx=e-1}handleDrawBettingTypeChange(t){this.curDrawSelectionBettingType=t,this.curDrawSelection=this.curDrawSelectionMap[this.curDrawSelectionBettingType]}getBettingTypeName(t){var e,i;const o=null===(i=null===(e=this.bettingTypeConfig)||void 0===e?void 0:e.find((e=>e.code===t)))||void 0===i?void 0:i.name;return null!=o?o:t}render(){return o("div",{key:"e2bdf93193821b73ab85c98bbaeb20a9ddffd4a7",class:"lottery-tipping-ticket-history",ref:t=>this.stylingContainer=t},o("div",{key:"795fb954de08c6c3d125ef386906c10ebb9df5dc",class:"ticket-history-title"},Bh("ticketsHistory",this.language)),o("div",{key:"a73aca010e47e8f29f7df93fe0240fa772e717f1",class:"filter-wrap"},o("div",{key:"49d6f18bb302811d4616a7d1e9cbc3155abbd71c",class:"filter-status"},this.statusOptions.map((t=>o("div",{class:"filter-status-btn"+(this.activeStatus==t.value?" active":""),onClick:()=>this.changeStatus(t.value)},t.label)))),o("div",{key:"9d17d4e3f67cd68fe1dc6c748c682d3ebd7673d4",class:"filter-operation"},o("lottery-tipping-filter",{key:"1403ac73aa834f0f8ad8428923887e331470184f","quick-filters-active":this.quickFiltersActive,language:this.language,"translation-url":this.translationUrl}))),this.isLoading&&o("div",{key:"af70782819d38af17770e0b28ef13da5a1ad5096",class:"loading-wrap"},o("section",{key:"9f384d693af08125c321dc08c42cd2d32dd44fb1",class:"dots-container"},o("div",{key:"82e89a8645383c6f537d7ad0906642fdb3a78cb6",class:"dot"}),o("div",{key:"574610642a60089eef6ccd6f26a1e18ed856bee3",class:"dot"}),o("div",{key:"e90eff2b5330571da92fe14ec0afeaa3256730c3",class:"dot"}),o("div",{key:"9c9579c96c98af756fc9d0125039337b069cabc9",class:"dot"}),o("div",{key:"a5d651350e459b867ce0f3125bffb3ae13e99415",class:"dot"}))),!this.isLoading&&this.paginationInfo.total>0&&o("div",{key:"62ca1b0fa1f5a6538d3bfecbceeb675e9da83ff0",class:"ticket-list-wrap"},this.ticketHistory.map((t=>o("lottery-tipping-panel",{"header-title":ut(new Date(t.createdAt),"dd/MM/yyyy HH:mm:ss")+" "+t.state},o("div",{class:"panel-content",slot:"content"},o("div",{class:"ticket-info"},o("div",{class:"ticket-info-item"},o("div",{class:"ticket-info-label"},Bh("ticketId",this.language)),o("div",{class:"ticket-info-val"},t.id," ")),o("div",{class:"ticket-info-item"},o("div",{class:"ticket-info-label"},Bh("ticketType",this.language)),o("div",{class:"ticket-info-val"},this.ticketTypeMap[t.wagerType]," ")),o("div",{class:"ticket-info-item"},o("div",{class:"ticket-info-label"},Bh("ticketAmount",this.language)),o("div",{class:"ticket-info-val"},`${t.amount} ${t.currency}`)),o("div",{class:"ticket-info-item"},o("div",{class:"ticket-info-label"},Bh("lineDetail",this.language)),o("div",{class:"ticket-info-val"},o("span",{class:"show-detail-link",onClick:()=>this.handleShowTicketLineDetial(t)},Bh("seeDetails",this.language)))),o("div",{class:"ticket-info-item"},o("div",{class:"ticket-info-label"},Bh("numberOfDraw",this.language)),o("div",{class:"ticket-info-val"},t.drawCount))),"Settled"==t.state&&t.drawResults.map((t=>o("div",{class:"draw-info-container"},t.tempDrawData?o("div",{class:"draw-info"},o("div",{class:"draw-info-item"},o("div",{class:"draw-info-label"},Bh("ticketResult",this.language)),o("div",{class:"draw-info-val"},this.resultMap[t.state])),o("div",{class:"draw-info-item"},o("div",{class:"draw-info-label"},Bh("drawId",this.language)),o("div",{class:"draw-info-val"},t.drawId)),o("div",{class:"draw-info-item"},o("div",{class:"draw-info-label"},Bh("drawDate",this.language)),o("div",{class:"draw-info-val"},ut(new Date(t.tempDrawData.date),"dd/MM/yyyy"))),o("div",{class:"draw-info-item"},o("div",{class:"draw-info-label"},Bh("result",this.language)),o("div",{class:"draw-info-val"},o("span",{class:"show-detail-link",onClick:()=>this.handleShowCurrentDraw(t.tempDrawData)},Bh("seeDetails",this.language)))),t.state===Ac.WON&&o("div",{class:"draw-info-item"},o("div",{class:"draw-info-label"},Bh("prize",this.language)),o("div",{class:"draw-info-val1"},o("div",{style:{height:"20px"}}),t.prizeDetails.map((t=>o("span",null,o("div",null,o("span",{style:{color:"rgb(85, 85, 85)"}},t.prizeName,t.times>1?" x "+t.times:"",":"," "),o("span",{style:{"margin-right":"4px",color:"rgb(85, 85, 85)"}},function(t){if(0===t)return"0";if(!t)return"";const e=(t=t.toString()).split(".");return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),e.join(".")}(t.amount)),o("span",{style:{color:"rgb(85, 85, 85)"}},t.currency)))))))):o("div",{class:"draw-info-skeleton"},[...Array(5)].map((()=>o("div",{class:"skeleton-line"})))))))))))),!this.isLoading&&0===this.paginationInfo.total&&o("div",{key:"f4e82cafb79a5766b2bca251c1171905fdbefe02",class:"empty-wrap"},Bh("noData",this.language)),o("lottery-tipping-dialog",{key:"89ff90664a6ae0cfdd739c202010602c1b037062",visible:this.showCurrentTicketLine,width:Uh(window.navigator.userAgent)?void 0:"720px",fullscreen:Uh(window.navigator.userAgent),closable:!0,showFooter:!1,onCancel:()=>{this.showCurrentTicketLine=!1},language:this.language,"translation-url":this.translationUrl},this.curSelection&&this.curSelection.length&&this.showCurrentTicketLine&&o("div",{key:"5345d592ac9f0130f971cfacb58ca8ddebae4399"},o("div",{key:"3d3b4011822202dd2f4c23483226e329333710cd",class:"betting-type"},o("div",{key:"c04048d3a580a8b36de76a3bf1ec7ad40edaf91b",class:"betting-type-title"},Bh("bettingType",this.language)),o("div",{key:"1614ff0010fc627e36da87361b7a8cd1e17f251e",class:"betting-type-text"},this.getBettingTypeName(this.getBettingType(this.curTicketItem.selection[this.curSelectionIdx].betType)))),o("lottery-tipping-ticket-bet",{key:"b5747189176752774d02e0dd74e795d445b6246a",endpoint:this.endpoint,"session-id":this.sessionId,"game-id":this.curTicketItem.vendorGameId,"draw-id":this.curTicketItem.startingDrawId,"default-bullet-config-line-group":JSON.stringify(this.curSelection),"read-pretty":!0,"total-pages":this.curSelection.length,language:this.language,"translation-url":this.translationUrl}))),o("lottery-tipping-dialog",{key:"94c1c58c2443895e1e5205fc3301a89a9b064e4f",visible:this.showCurrentDrawResult,width:Uh(window.navigator.userAgent)?void 0:"720px",fullscreen:Uh(window.navigator.userAgent),closable:!0,showFooter:!1,onCancel:()=>{this.showCurrentDrawResult=!1},language:this.language,"translation-url":this.translationUrl},this.curDrawSelection&&this.curDrawSelection.length&&this.showCurrentDrawResult&&o("div",{key:"000d5fda83c1d4496428fc5570576c1a33d16366"},o("div",{key:"896d3e013f27f8971ee4220f0d3853e696f69c4c",class:"betting-type"},o("div",{key:"ea6eae9c86f6cbfbaf2644a17bf009a78b50bdae",class:"betting-type-title"},Bh("bettingType",this.language)),o("div",{key:"fa22c6c07946f12d6a52d498dbc5339b1e4eb795",class:"betting-type-text"},o("div",{key:"cc6199976821e84b112b5091fa617b40e09a62dc",class:"LotteryTippingTicketController__segmented-control"},Object.keys(this.curDrawSelectionMap).map((t=>o("button",{class:{LotteryTippingTicketController__segment:!0,"LotteryTippingTicketController__segment--active":this.curDrawSelectionBettingType===t},onClick:()=>this.handleDrawBettingTypeChange(t)},this.getBettingTypeName(t))))))),o("lottery-tipping-ticket-bet",{key:"82873092dfa36aa666aebbf90330af309be60df6",endpoint:this.endpoint,"session-id":this.sessionId,"game-id":this.curDrawItem.vendorGameId,"draw-id":this.curDrawItem.id,"default-bullet-config-line-group":JSON.stringify(this.curDrawSelection),"read-pretty":!0,"total-pages":this.curDrawSelection.length,language:this.language,"translation-url":this.translationUrl}))),o("div",{key:"2a4e1557bb2644e9c41820d77fa77fb53212c263",class:"pagination-wrap"},o("lottery-tipping-pagination",{key:"515ad839d8104fe3ecdb50ba6d6b915fd6842781",total:this.paginationInfo.total,current:this.paginationInfo.current,"page-size":this.paginationInfo.pageSize,language:this.language,"translation-url":this.translationUrl})))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],gameId:["handleGameInfoChange"],endpoint:["handleGameInfoChange"],playerId:["handleTicketInfoChange"],sessionId:["handleTicketInfoChange"]}}};zc.style="@keyframes skeleton-loading{0%{background-position:200% 0}100%{background-position:-200% 0}}.lottery-tipping-ticket-history{padding:12px}.lottery-tipping-ticket-history .ticket-history-title{margin:20px 0;text-align:center;font-size:20px;font-weight:700;color:var(--emw--color-typography, #000)}.lottery-tipping-ticket-history .ticket-info{display:flex;flex-direction:column;gap:12px}.lottery-tipping-ticket-history .ticket-info-item{display:flex;align-items:center;user-select:none}.lottery-tipping-ticket-history .ticket-info-label{margin-right:12px;color:var(--emw--color-typography, #000)}.lottery-tipping-ticket-history .ticket-info-val{color:var(--emw--color-typography-secondary, #555)}.lottery-tipping-ticket-history .ticket-list-wrap{display:flex;flex-direction:column;gap:12px}.lottery-tipping-ticket-history .draw-info-skeleton{width:30%;min-width:300px;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));border-radius:5px;display:flex;flex-direction:column;gap:10px;padding:10px}.lottery-tipping-ticket-history .skeleton-line{height:16px;border-radius:4px;background:linear-gradient(90deg, var(--emw--color-gray-100, #e6e6e6) 25%, var(--emw--color-gray-50, #f5f5f5) 50%, var(--emw--color-gray-100, #e6e6e6) 75%);background-size:200% 100%;animation:skeleton-loading 1.2s infinite}.lottery-tipping-ticket-history .draw-info{width:30%;min-width:300px;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));border-radius:5px;padding:12px;margin-top:20px;display:flex;flex-direction:column;gap:8px;user-select:none}.lottery-tipping-ticket-history .draw-info-item{display:flex}.lottery-tipping-ticket-history .draw-info-label{margin-right:6px;color:var(--emw--color-typography, #000)}.lottery-tipping-ticket-history .draw-info-val{color:var(--emw--color-typography-secondary, #555)}.lottery-tipping-ticket-history .show-detail-link{color:var(--emw-pool-game-acition-normal, #4a90e2);text-decoration:underline;cursor:pointer}.lottery-tipping-ticket-history .filter-wrap{margin-bottom:20px;display:flex;justify-content:space-between;align-items:center}.lottery-tipping-ticket-history .filter-wrap .filter-status{display:flex;gap:12px;align-items:center}.lottery-tipping-ticket-history .filter-wrap .filter-status-btn{background:var(--emw--color-background, #fff);border:2px solid var(--emw--color-primary, #fed275);border-radius:4px;padding:10px 8px;font-size:12px;text-transform:uppercase;color:var(--emw--color-typography, #000);cursor:pointer;transition:all 0.2s linear}.lottery-tipping-ticket-history .filter-wrap .filter-status-btn:hover{background-color:var(--emw--color-secondary, #fff3b9)}.lottery-tipping-ticket-history .filter-wrap .filter-status-btn.active{background:var(--emw--color-secondary, #fff3b9);color:var(--emw--color-typography, #000);border:2px solid var(--emw--color-typography, #000)}.lottery-tipping-ticket-history .pagination-wrap{margin-top:20px;display:flex;justify-content:flex-end}@media screen and (min-width: 1200px){.lottery-tipping-ticket-history{padding:24px;width:60%;margin:0 auto}}@media screen and (max-width: 480px){.lottery-tipping-ticket-history{padding:2px}.lottery-tipping-ticket-history .filter-wrap .filter-status{gap:4px}}.loading-wrap{margin:20px 0;display:flex;align-items:center;justify-content:center;min-height:40vh}.loading-wrap .dots-container{display:flex;align-items:center;justify-content:center;height:100%;width:100%}.loading-wrap .dot{height:14px;width:14px;margin-right:14px;border-radius:14px;background-color:var(--emw-pool-game-ticket-history-loading-normal, #b3d4fc);animation:pulse 1.5s infinite ease-in-out}.loading-wrap .dot:last-child{margin-right:0}.loading-wrap .dot:nth-child(1){animation-delay:-0.3s}.loading-wrap .dot:nth-child(2){animation-delay:-0.1s}.loading-wrap .dot:nth-child(3){animation-delay:0.1s}@keyframes pulse{0%{transform:scale(0.8);background-color:var(--emw-pool-game-ticket-history-loading-normal, #b3d4fc);box-shadow:0 0 0 0 var(--emw-pool-game-ticket-history-loading-box-shadow-normal, rgba(178, 212, 252, 0.7))}50%{transform:scale(1.2);background-color:var(--emw-pool-game-ticket-history-loading-active, #6793fb);box-shadow:0 0 0 10px var(--emw-pool-game-ticket-history-loading-box-shadow-active, rgba(178, 212, 252, 0))}100%{transform:scale(0.8);background-color:var(--emw-pool-game-ticket-history-loading-normal, #b3d4fc);box-shadow:0 0 0 0 rgba(178, 212, 252, 0.7)}}.empty-wrap{margin:20px 0;display:flex;align-items:center;justify-content:center;min-height:40vh;color:var(--emw--color-typography, #000)}.betting-type{margin-bottom:16px;display:flex;align-items:center;gap:20px}.betting-type-title{font-weight:600;font-size:16px}.betting-type-text{font-size:16px}.LotteryTippingTicketController__label{font-weight:500;white-space:nowrap;width:6rem;color:var(--emw--color-typography-secondary, #333)}.LotteryTippingTicketController__segmented-control{height:2.2rem;display:inline-flex;background-color:var(--emw--color-background-secondary, #f5f5f5);border-radius:2rem;padding:0.2rem}.LotteryTippingTicketController__segment{background-color:transparent;border:none;padding:0.3rem 0.8rem;cursor:pointer;font-weight:500;border-radius:2rem;outline:none;transition:background-color 0.25s ease, color 0.25s ease;white-space:nowrap;color:var(--emw--color-typography, #000)}.LotteryTippingTicketController__segment--active{background-color:var(--emw--color-background, #fff);color:var(--emw--color-typography, #000);font-weight:600}.LotteryTippingTicketController__segment:not(.LotteryTippingTicketController__segment--active):hover{background-color:var(--emw--color-background-tertiary, #ccc)}";export{l as general_multi_select,h as general_tooltip,u as lottery_button,p as lottery_tipping_bullet,m as lottery_tipping_bullet_group,b as lottery_tipping_dialog,jh as lottery_tipping_filter,Hh as lottery_tipping_pagination,Xh as lottery_tipping_panel,dc as lottery_tipping_ticket_banner,_c as lottery_tipping_ticket_bet,Tc as lottery_tipping_ticket_controller,zc as lottery_tipping_ticket_history}
|
|
6657
|
+
`}static get is(){return"vaadin-tabs"}}Pt(Oh);const Ph=["ro","en","fr","ar","hr"],Eh={en:{totalItems:"Total {total} items",perPage:"{size} / page",goTo:"Go to",filter:"Filter",clear:"Clear",searchByTicketId:"Search by Ticket ID",enterTicketId:"Enter Ticket ID",searchByTicketType:"Search by Ticket Type",selectTicketType:"Select Ticket Type",searchByDate:"Search by Date",from:"From",to:"To",normal:"Normal",subscription:"Subscription",ticketsHistory:"Tickets History",settled:"Settled",purchased:"Purchased",canceled:"Canceled",noData:"No data Avaliable.",ticketId:"Ticket ID:",ticketType:"Ticket Type:",ticketAmount:"Ticket Amount:",lineDetail:"Line Detail:",seeDetails:"See Details",numberOfDraw:"Number of Draw:",ticketResult:"Ticket Result:",drawId:"Draw ID:",drawDate:"Draw Date:",result:"Result:",prize:"Prize:",bettingType:"Betting Type:"},ro:{},fr:{},ar:{},hr:{}},Bh=(t,e,i)=>{const o=e;let s=Eh[void 0!==o&&Ph.includes(o)?o:"en"][t];return i&&Object.keys(i).forEach((t=>{s=s.replace(`{${t}}`,i[t])})),s},Nh=t=>{Object.keys(t).forEach((e=>{for(let i in t[e])Eh[e][i]=t[e][i]}))},jh=class{constructor(i){t(this,i),this.filterChange=e(this,"filterChange",7),this.filterClear=e(this,"filterClear",7),this.handleTicketType=t=>{t.detail&&t.detail.length&&(this.filterData.ticketType=t.detail)},this.handleFilterFrom=t=>{let e=t.target.value.split("-");3===e.length&&(this.filterData=Object.assign(Object.assign({},this.filterData),{filterFromCalendar:`${e[2]}/${e[1]}/${e[0]}`}))},this.handleFilterTo=t=>{let e=t.target.value.split("-");3===e.length&&(this.filterData=Object.assign(Object.assign({},this.filterData),{filterToCalendar:`${e[2]}/${e[1]}/${e[0]}`}))},this.quickFiltersActive=!1,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.language="en",this.translationUrl=void 0,this.isOpen=!1,this.filterData={filterFromCalendar:"",filterToCalendar:"",ticketId:"",ticketType:[]},this.ticketTypeList=void 0,this.showClearButton=!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`)}componentWillLoad(){this.translationUrl&&Nh(JSON.parse(this.translationUrl)),this.ticketTypeList=[{label:Bh("normal",this.language),value:"NORMAL"},{label:Bh("subscription",this.language),value:"SUBSCRIPTION"}]}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&n(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleModalClose(){this.isOpen=!1}changeFormate(t){const[e,i,o]=t.split("/");return`${o}-${i}-${e}`}formateDate(t){const{year:e,month:i,day:o}=t;return ut(new Date(e,i,o),"dd/MM/yyyy")}parseDate(t){const[e,i,o]=t.split("/");return{year:o,month:parseInt(i)-1,day:e}}setDateFormate(t){t.i18n=Object.assign(Object.assign({},t.i18n),{formatDate:this.formateDate,parseDate:this.parseDate})}clearSelection(){this.comboBox.clear()}resetSearch(){this.showClearButton=!1,this.clearSelection(),this.filterData={filterFromCalendar:"",filterToCalendar:"",ticketId:"",ticketType:[]},this.filterClear.emit()}handleDialogConfirm(){if(this.filterData.filterFromCalendar&&this.filterData.filterToCalendar){let t=this.filterData.filterFromCalendar.split("/"),e=this.filterData.filterToCalendar.split("/");const i={filterFromCalendar:new Date(Date.UTC(Number(t[2]),Number(t[1])-1,Number(t[0]),0,0,0)).toISOString(),filterToCalendar:new Date(Date.UTC(Number(e[2]),Number(e[1])-1,Number(e[0]),23,59,59)).toISOString()};this.filterData=Object.assign(Object.assign({},this.filterData),i)}this.filterChange.emit(this.filterData),this.isOpen=!1,this.showClearButton=!0}render(){return o("div",{key:"74aa590f6f92b9df971fd17cb3f573cc6a0a68e9",class:"lottery-tipping-filter",ref:t=>this.stylingContainer=t},o("div",{key:"ebf385371627466c5eb06a5ef75a14a467b1badd",class:"operate-btns"},!this.showClearButton&&o("div",{key:"55c709034e124b51e8b9057980f5a3c3b8c6d5ce",class:"operate-btn",onClick:()=>{this.isOpen=!0}},Bh("filter",this.language)),(this.showClearButton||this.quickFiltersActive)&&o("div",{key:"aa747af2461e72fbacc16decd7fc75cd6f640c47",class:"operate-btn",onClick:()=>this.resetSearch()},Bh("clear",this.language))),o("lottery-tipping-dialog",{key:"9a9472dee498db7acc83fd96db89b635be07a837","dialog-title":Bh("ticketResult",this.language),visible:this.isOpen,onCancel:()=>{this.isOpen=!1},onConfirm:this.handleDialogConfirm.bind(this),animationDuration:300,language:this.language,"translation-url":this.translationUrl},o("div",{key:"a7bfe435c8f7a43abf2c2d500d7e31fe62123787",class:"dialog-content"},o("div",{key:"4fcf5f1d3da61ba5e3e8c09b4a97339c1eafaf64",class:"filter-item"},o("div",{key:"397bb60af15071331c46c0b83366475ef66205fd",class:"filter-item-label"},Bh("searchByTicketId",this.language)),o("div",{key:"657e0014bb0d8af52ed273149bad534b2cd035b6",class:"filter-item-val"},o("vaadin-text-field",{key:"e1d5c688281bf52ad5d90b81e66a495418c484ba",placeholder:Bh("enterTicketId",this.language),value:this.filterData.ticketId,onInput:t=>{this.filterData.ticketId=t.target.value}}))),o("div",{key:"3a49c0cb8361f19610be76c831320b9506414569",class:"filter-item"},o("div",{key:"abb2c02f3bf1c84d439499430696aa11f78c1ba7",class:"filter-item-label"},Bh("searchByTicketType",this.language)),o("div",{key:"1f8212f290fc32407b6cf5122099be2b2ee9a867",class:"general-multi-select-container"},o("general-multi-select",{key:"b79ebc1f60722e38436309b5699591368d2cb396",ref:t=>this.comboBox=t,placeholder:Bh("selectTicketType",this.language),"max-visible-chips":"2",options:this.ticketTypeList.map((t=>({text:t.label,value:t.value}))),onChange:this.handleTicketType,"client-styling":this.clientStyling,"client-styling-Url":this.clientStylingUrl,"mb-source":this.mbSource}))),o("div",{key:"29c515bff2771f2fc542ec19308bab60b249873f",class:"filter-item"},o("div",{key:"bae8243eb9a551c545d8f78a83bd9f2717d282cb",class:"filter-item-label"},Bh("searchByDate",this.language)),o("div",{key:"96eaf18f338ccaca9088fb8517a3992dd188dcbf",class:"filter-item-val"},o("vaadin-date-picker",{key:"b49512011902e9f5c9993901a1533fecb2425e3a",value:this.filterData.filterFromCalendar,max:void 0===this.filterData.filterToCalendar?void 0:this.changeFormate(this.filterData.filterToCalendar),onChange:this.handleFilterFrom,placeholder:Bh("from",this.language),ref:t=>this.setDateFormate(t),class:"VaadinDatePicker"}),o("vaadin-date-picker",{key:"a4132154143d20e048a526a3947d00bb9533e0b3",value:this.filterData.filterToCalendar,min:void 0===this.filterData.filterFromCalendar?void 0:this.changeFormate(this.filterData.filterFromCalendar),onChange:this.handleFilterTo,placeholder:Bh("to",this.language),ref:t=>this.setDateFormate(t),class:"VaadinDatePicker"}))))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};function Lh(t,e="GET",i=null,o={}){return new Promise(((s,r)=>{const n="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})),a=Object.assign({"Content-Type":"application/json"},o);"GET"!==e&&"HEAD"!==e&&(a["X-Idempotency-Key"]=n);const l={method:e,headers:a,body:null};i&&"GET"!==e&&"HEAD"!==e?l.body=JSON.stringify(i):delete l.body,fetch(t,l).then((t=>t.ok?t.json():r(t))).then((t=>s(t))).catch((t=>r(t)))}))}function $h(t,e){return null==t||""===t||(0!==t||!e)&&(Array.isArray(t)?function(t){if(0===t.length)return!0;const e=t.length;let i=0;for(let o=0;o<e;o++){if(!$h(t[o]))return!1;i++}return i===e}(t):"[object Object]"===Object.prototype.toString.call(t)?function(t){if(0===Object.keys(t).length)return!0;const e=Object.keys(t).length;let i=0;for(const e of Object.values(t)){if(!$h(e))return!1;i++}return i===e}(t):!t)}jh.style=".lottery-tipping-filter .operate-btns{display:flex;gap:10px}.lottery-tipping-filter .operate-btns .operate-btn{background:var(--emw--color-primary, #fed275);border:1px solid var(--emw--color-primary, #fed275);border-radius:16px;padding:8px 10px;font-size:14px;color:var(--emw--color-typography, #000);font-weight:600;cursor:pointer;transition:0.2s linear}.dialog-content{display:flex;flex-direction:column;align-items:center}.dialog-content .filter-item{margin-bottom:12px}.dialog-content .filter-item-label{text-align:center;color:var(--emw--color-typography, #000)}.dialog-content .filter-item-val{display:flex;flex-wrap:wrap;gap:12px;justify-content:center}@media screen and (max-width: 480px){.lottery-tipping-filter .operate-btns{gap:4px}}.general-multi-select-container{width:var(--vaadin-field-default-width, 16em)}";const Fh={0:"1",1:"X",2:"2"};function Rh(t){const e=[],i=[];for(let e=0;e<t.length;e+=2){const[o,s]=[t[e],t[e+1]];i[s]?i[s].push(o):i[s]=[o]}return i.forEach((t=>{e.push(function(t){const e=[];return Object.keys(Fh).forEach((i=>{e.push({isSelected:t.includes(Number(i)),value:Fh[i]})})),e}(t))})),e}const Uh=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)),Vh=({message:t,theme:e="success"})=>{window.postMessage({type:"ShowNotificationToast",message:t,theme:e})},Hh=class{constructor(i){t(this,i),this.pageChange=e(this,"pageChange",7),this.pageSizeChange=e(this,"pageSizeChange",7),this.userAgent=window.navigator.userAgent,this.total=0,this.pageSizeOptions=[10,20,50],this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.language="en",this.translationUrl=void 0,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`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&n(this.stylingContainer,this.clientStylingUrl))}componentWillLoad(){this.translationUrl&&Nh(JSON.parse(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=Uh(this.userAgent)?1:2,{totalPages:i,current:o}=this;if(i<=7)for(let e=1;e<=i;e++)t.push({type:"page",value:e});else{t.push({type:"page",value:1}),o>e+2&&t.push({type:"jump",direction:"prev"});const s=Math.max(2,o-e),r=Math.min(i-1,o+e);for(let e=s;e<=r;e++)t.push({type:"page",value:e});o<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(){const t=this.getPagesToShow();return o("div",{key:"056fe5c9fddd61fafba809746de794a8db9c92a9",class:"paginator",ref:t=>this.stylingContainer=t},o("div",{key:"a4ceefa8aaeb5a5038e9f15d58f8b7b74f5e6726",class:"total-num"},Bh("totalItems",this.language,{total:this.total})),o("button",{key:"08a1c3a20cc576781c97e6dae6ba8db5bba1e0c2",class:"arrow-btn",disabled:this.current<=1,onClick:()=>this.goToPage(this.current-1)},"<"),t.map((t=>"page"===t.type?o("button",{class:{page:!0,active:this.current===t.value},onClick:()=>this.goToPage(t.value)},t.value):o("button",{class:"ellipsis",onClick:()=>this.jumpTo(t.direction)},"..."))),o("button",{key:"893023765c2a3b55a725c32ab5edb86e14225766",class:"arrow-btn",disabled:this.current>=this.totalPages,onClick:()=>this.goToPage(this.current+1)},">"),o("select",{key:"c3fd4ada29da74ff3e0a5d41efeb3d6eb341bd79",onInput:t=>this.changePageSize(parseInt(t.target.value))},this.pageSizeOptions.map((t=>o("option",{value:t},Bh("perPage",this.language,{size:t}))))),o("div",{key:"df8b7ad7e45fc12dc25b50cb687d008b546bba5b",class:"jump-box"},Bh("goTo",this.language),o("input",{key:"f12b2591b6cfb79e0163dcbd5631618c69140539",type:"number",min:"1",max:this.totalPages,value:this.current,onKeyDown:t=>{if("Enter"===t.key){const e=parseInt(t.target.value);isNaN(e)||this.goToPage(e)}},onInput:t=>{const e=t.target;parseInt(e.value)>this.totalPages&&(e.value=this.totalPages.toString()),parseInt(e.value)<1&&(e.value="1")}})))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],total:["updateTotalPages"],pageSize:["updateTotalPages"]}}};Hh.style=".paginator{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}.paginator .page{color:var(--emw--color-typography, #000)}button{padding:4px 8px;font-size:14px;background:var(--emw--color-background, #fff);border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));border-radius:var(--emw--border-radius-small, 4px);cursor:pointer;min-width:28px;transition:all 0.2s ease}.arrow-btn{color:var(--emw--color-typography, #000)}button.active{color:#333;background:var(--emw--color-primary, #fed275);border-color:var(--emw--color-primary, #fed275);font-weight:bold}button:not(.arrow-btn):hover{background:var(--emw--color-secondary, #fff3b9);border-color:var(--emw--color-secondary, #fff3b9)}button:disabled{cursor:not-allowed;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));user-select:none}.ellipsis{font-weight:bold;color:var(--emw--color-typography, #000);border:none}select{padding:4px 8px;border-radius:4px;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));font-size:14px}.jump-box{display:flex;align-items:center;gap:4px;margin-left:8px;color:var(--emw--color-typography, #000)}.jump-box input{width:50px;padding:2px 6px;font-size:14px;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));border-radius:4px;text-align:center}.total-num{user-select:none;font-size:14px;color:var(--emw--color-typography, #333)}";var Wh=function(){return Wh=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},Wh.apply(this,arguments)},qh={primaryColor:"#333",secondaryColor:"#E6E6E6"};function Gh(t,e){if(void 0===e&&(e={}),"function"==typeof t.icon){var i=e.placeholders||qh;return Yh(t.icon(i.primaryColor,i.secondaryColor),e)}return Yh(t.icon,e)}function Yh(t,e){var i="svg"===t.tag?Wh(Wh({},t.attrs),e.extraSVGAttrs||{}):t.attrs,o=Object.keys(i).reduce((function(t,e){var o=i[e],s="".concat(e,'="').concat(o,'"');return t.push(s),t}),[]),s=o.length?" "+o.join(" "):"",r=(t.children||[]).map((function(t){return Yh(t,e)})).join("");return r&&r.length?"<".concat(t.tag).concat(s,">").concat(r,"</").concat(t.tag,">"):"<".concat(t.tag).concat(s," />")}const Jh=Gh({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"}}),Xh=class{constructor(e){t(this,e),this.togglePanel=()=>{this.expanded=!this.expanded},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`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&n(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return o("div",{key:"a924b69afd386d9a4eea9cd7e68b7421dd3949fc",class:"panel-container",ref:t=>this.stylingContainer=t},o("div",{key:"250ffcdb2c188a099c3323b8bdb983cb01c56d66",class:{"panel-header":!0,active:this.expanded},onClick:this.togglePanel},o("div",{key:"09ff482c092c4bc534c9e053bd964ac8aad0311a",class:"header-content"},o("slot",{key:"eb463418cd334b070272d7f32edef2c63a2ad583",name:"header"},o("span",{key:"ca745afa0ee74494e17e10cf06430ecdaca04070"},this.headerTitle))),o("span",{key:"ff58468a38f1d37c9d4fe902e528584c8e43a721",class:"arrow "+(this.expanded?"expanded":""),innerHTML:Jh})),o("div",{key:"725f0bc8350e4cc5604b500384c1eca3196c60f3",class:"panel-body "+(this.expanded?"open":"closed")},o("slot",{key:"a10bee4011b55784271817a396eaa8aad64c3c0e",name:"content"})))}get el(){return s(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};Xh.style=".panel-container{border:1px solid var(--emw--color-typography, #000);border-radius:8px;overflow:hidden;font-family:sans-serif;width:calc(100% - 4px)}.panel-header{background-color:var(--emw--color-background, #fff);padding:8px;display:flex;align-items:center;justify-content:space-between;cursor:pointer;font-size:14px}.panel-header .header-content{color:var(--emw--color-typography, #000)}.panel-header:hover{background-color:var(--emw--color-primary, #fed275)}.panel-header.active{background-color:var(--emw--color-primary, #fed275)}.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 12px;font-size:14px}.panel-body.open{max-height:500px;padding:10px 12px}.panel-body.closed{max-height:0;padding-top:0;padding-bottom:0}";const Kh=["ro","en","fr","ar","hr"],Zh={en:{stop:"Stop",at:"at",turnover:"Turnover: ",selectionCleared:"Your selection will be cleared.",ticketSubmitted:"Ticket submitted successfully.",ticketFailed:"Failed to purchase the ticket. Please try again.",lines:"Lines",line:"Line",bettingType:"Betting Type",playingMode:"Playing Mode",orderSummaryTitle:"Order Summary",orderSummaryTickets:"Tickets",orderSummaryTotal:"Total",orderSummarySubmit:"Submit",cancel:"Cancel",confirm:"Confirm",stakePerLine:"Stake per Line:"},ro:{selectionCleared:"Selecția dvs. va fi ștearsă.",ticketSubmitted:"Bilet trimis cu succes.",ticketFailed:"Nu s-a putut achiziționa biletul. Vă rugăm să încercați din nou.",lines:"Linii",line:"Linie",bettingType:"Tip de pariu",playingMode:"Mod de joc",orderSummaryTitle:"Sumar comandă",orderSummaryTickets:"Bilete",orderSummaryTotal:"Total",orderSummarySubmit:"Trimite",cancel:"Anulează",confirm:"Confirmă"},fr:{selectionCleared:"Votre sélection sera effacée.",ticketSubmitted:"Billet soumis avec succès.",ticketFailed:"Échec de l'achat du billet. Veuillez réessayer.",lines:"Lignes",line:"Ligne",bettingType:"Type de pari",playingMode:"Mode de jeu",orderSummaryTitle:"Résumé de la commande",orderSummaryTickets:"Billets",orderSummaryTotal:"Total",orderSummarySubmit:"Soumettre",cancel:"Annuler",confirm:"Confirmer"},ar:{selectionCleared:"سيتم مسح اختيارك.",ticketSubmitted:"تم إرسال التذكرة بنجاح.",ticketFailed:"فشل شراء التذكرة. يرجى المحاولة مرة أخرى.",lines:"خطوط",line:"خط",bettingType:"نوع الرهان",playingMode:"وضع اللعب",orderSummaryTitle:"ملخص الطلب",orderSummaryTickets:"التذاكر",orderSummaryTotal:"المجموع",orderSummarySubmit:"إرسال",cancel:"إلغاء",confirm:"تأكيد"},hr:{selectionCleared:"Vaš odabir bit će obrisan.",ticketSubmitted:"Listić je uspješno predan.",ticketFailed:"Kupnja listića nije uspjela. Molimo pokušajte ponovo.",lines:"Linije",line:"Linija",bettingType:"Vrsta oklade",playingMode:"Način igranja",orderSummaryTitle:"Sažetak narudžbe",orderSummaryTickets:"Listići",orderSummaryTotal:"Ukupno",orderSummarySubmit:"Pošalji",cancel:"Odustani",confirm:"Potvrdi"}},Qh=(t,e)=>{const i=e;return Zh[void 0!==i&&Kh.includes(i)?i:"en"][t]},tc=async t=>{if(t)try{const i=await fetch(t);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const o=await i.json();e=o,Object.keys(e).forEach((t=>{for(let i in e[t])Zh[t][i]=e[t][i]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e},ec=({date:t,type:e="date",format:i})=>{try{const o=pt(t);if(isNaN(o.getTime()))throw new Error(`Invalid date: ${t}`);if(i)return ut(o,i);let s="dd/MM/yyyy";return"time"===e?s="dd/MM/yyyy HH:mm:ss":"week"===e&&(s="ccc dd/MM/yyyy HH:mm:ss"),ut(o,s)}catch(t){return console.error("Error formatting date:",t.message),""}};function ic(t,e="GET",i=null,o={}){return new Promise(((s,r)=>{const n="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})),a=Object.assign({"Content-Type":"application/json"},o);"GET"!==e&&"HEAD"!==e&&(a["X-Idempotency-Key"]=n);const l={method:e,headers:a};i&&"GET"!==e&&"HEAD"!==e&&(l.body=JSON.stringify(i)),fetch(t,l).then((t=>{if(!t.ok)throw new Error(`HTTP error! Status: ${t.status}`);return t.json()})).then((t=>s(t))).catch((t=>r(t)))}))}const oc=({message:t,theme:e="success"})=>{window.postMessage({type:"ShowNotificationToast",message:t,theme:e})},sc=t=>{if(0===t)return"0";if(!t)return"";const e=(t=t.toString()).split(".");return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),e.join(".")},rc=["H","D","A"],nc=(t=[])=>t.filter((t=>t.enabled)),ac=({rawData:t,selectedBettingType:e,selectedPlayingMode:i})=>{var o,s,r,n,a,l;const h=null===(n=null===(r=null===(s=null===(o=null==t?void 0:t.rules)||void 0===o?void 0:o.poolGame)||void 0===s?void 0:s.playTypes)||void 0===r?void 0:r.find((t=>t.bettingType===e&&t.playMode===i)))||void 0===n?void 0:n.betTypeId,c=null===(l=null===(a=null==t?void 0:t.rules)||void 0===a?void 0:a.betTypes)||void 0===l?void 0:l.find((t=>t.id===h));return{betTypeId:h,betType:c}},lc=["ro","en","fr","ar","hr"],hc={en:{stop:"Stop",at:"at",turnover:"Turnover: "},ro:{stop:"Oprește",at:"la"},fr:{stop:"Arrêtez",at:"à"},ar:{stop:"توقف",at:"في"},hr:{stop:"Stop",at:"u"}},cc=(t,e)=>{const i=e;return hc[void 0!==i&&lc.includes(i)?i:"en"][t]},dc=class{constructor(e){t(this,e),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.language="en",this.translationUrl="",this.logoUrl=void 0,this.stopTime="",this.period=void 0,this.formattedTurnover=void 0}get formattedStopTime(){let t="";return this.stopTime?(t=ec({date:this.stopTime,format:"dd/MM/yyyy HH:mm"}),function(t){return x(1,arguments),function(t,e){x(2,arguments);var i=S(t),o=S(e);return i.getTime()===o.getTime()}(t,Date.now())}(new Date(this.stopTime))&&(t=ec({date:this.stopTime,format:"HH:mm"})),t):t}get formattedPeriod(){let t="";return t=ec({date:this.period,format:"EEEE"}),"wednesday"===t.toLowerCase()&&(t="MIDWEEK"),t.toUpperCase()}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`)}async componentWillLoad(){this.translationUrl&&tc(this.translationUrl)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&n(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return o("div",{key:"e9286d0a6a9433698703b9c04d6d50892a7b3168",ref:t=>this.stylingContainer=t,class:"lottery-tipping-ticket-banner__container"},o("section",{key:"d787e64156f76cf6d12bd552513971301534860c",class:"banner"},o("div",{key:"027baf0c88733d1430801c96b5b338f79f92f22c",class:"left"},this.logoUrl&&o("img",{key:"7b41d5635a2121ccf394aca19de48e10e9a93357",alt:"Betting",src:this.logoUrl,class:"logo"})),o("div",{key:"73e6c3ffa336b020a3819a72b71117b8084381b1",class:"mid period"},this.formattedPeriod),o("div",{key:"922ae894814157f68aa8f0774c8aa5ca06e1e7cd",class:"right"},o("span",{key:"efaf79b1ff5617f2ba92cfef464232041cd87fbf",class:"pill"},o("strong",{key:"c842562b15a13407038933da9d1cc7c6fafa0b76"},cc("stop",this.language))," ",cc("at",this.language)," ",this.formattedStopTime),o("span",{key:"3e79a5ec17cbcf0896d58196286fa0b637988f69",class:"pill"},o("strong",{key:"1158b00abffb1c6bf04e9eec10b4c996d04f118e"},cc("turnover",this.language))," ",this.formattedTurnover))))}static get assetsDirs(){return["../static"]}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};dc.style=".lottery-tipping-ticket-banner__container {\n font-family: system-ui, sans-serif;\n font-size: 14px;\n container-type: inline-size;\n}\n\n.banner {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: space-between;\n padding: 0 1rem;\n background: var(--emw--color-primary, #fed275);\n border-top: 2px solid var(--emw--color-primary, #fed275);\n border-bottom: 2px solid var(--emw--color-primary, #fed275);\n gap: 0.5rem;\n white-space: nowrap;\n position: relative;\n height: 46px;\n}\n\n.left {\n flex: 1;\n gap: 0.4rem;\n}\n.left .logo {\n width: 216px;\n position: absolute;\n top: -7px;\n}\n\n.brand {\n font-weight: 700;\n color: var(--emw--color-typography, #000);\n}\n\n.mid {\n flex: 1;\n font-size: 1.5rem;\n font-weight: 800;\n font-style: italic;\n letter-spacing: 0.04em;\n color: var(--emw--color-typography, #000);\n text-align: center;\n}\n\n.right {\n flex: 1;\n display: flex;\n gap: 0.4rem;\n flex-wrap: wrap;\n justify-content: flex-end;\n}\n\n@container (max-width: 420px) {\n .mid {\n text-align: right;\n }\n .right {\n justify-content: center;\n }\n}\n.pill {\n padding: 0.25rem 0.7rem;\n font-size: 0.9rem;\n color: var(--emw--color-gray-400, #000);\n display: inline-flex;\n align-items: baseline;\n}\n\n.pill > strong {\n font-weight: 700;\n}";const uc=["ro","en","fr","ar","hr"],pc={en:{homeTeam:"Home team:",awayTeam:"Away team:",selectionCleared:"Your selection has been cleared.",selectionOnLineCleared:"Your selection on this line will be cleared.",loading:"Loading...",error:"Error!",noData:"No data available.",lineInfo:"Line {currentPage} of {totalPages}",clearAll:"Clear All",cancel:"Cancel",confirm:"Confirm"},ro:{homeTeam:"Echipa gazdă:",awayTeam:"Echipa oaspete:",selectionCleared:"Selecția dvs. a fost ștearsă.",selectionOnLineCleared:"Selecția dvs. de pe această linie va fi ștearsă.",loading:"Se încarcă...',n error: 'Eroare!",noData:"Nu sunt date disponibile.",lineInfo:"Linia {currentPage} din {totalPages}",clearAll:"Șterge tot",cancel:"Anulează",confirm:"Confirmă"},fr:{homeTeam:"Équipe à domicile:",awayTeam:"Équipe à l'extérieur:",selectionCleared:"Votre sélection a été effacée.",selectionOnLineCleared:"Votre sélection sur cette ligne sera effacée.",loading:"Chargement...',n error: 'Erreur!",noData:"Aucune donnée disponible.",lineInfo:"Ligne {currentPage} sur {totalPages}",clearAll:"Tout effacer",cancel:"Annuler",confirm:"Confirmer"},ar:{homeTeam:"الفريق المضيف:",awayTeam:"الفريق الضيف:",selectionCleared:"تم مسح اختيارك.",selectionOnLineCleared:"سيتم مسح اختيارك في هذا السطر.",loading:"جار التحميل...',n error: 'خطأ!",noData:"لا توجد بيانات متاحة.",lineInfo:"السطر {currentPage} من {totalPages}",clearAll:"مسح الكل",cancel:"إلغاء",confirm:"تأكيد"},hr:{homeTeam:"Domaći tim:",awayTeam:"Gostujući tim:",selectionCleared:"Vaš odabir je obrisan.",selectionOnLineCleared:"Vaš odabir na ovoj liniji bit će obrisan.",loading:"Učitavanje...',n error: 'Greška!",noData:"Nema dostupnih podataka.",lineInfo:"Linija {currentPage} od {totalPages}",clearAll:"Očisti sve",cancel:"Odustani",confirm:"Potvrdi"}},mc=(t,e,i)=>{const o=e;let s=pc[void 0!==o&&uc.includes(o)?o:"en"][t];return i&&Object.keys(i).forEach((t=>{s=s.replace(`{${t}}`,i[t])})),s},fc=t=>{Object.keys(t).forEach((e=>{for(let i in t[e])pc[e][i]=t[e][i]}))},vc=[{value:"1"},{value:"X"},{value:"2"}],gc=Gh({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"},{extraSVGAttrs:{width:"20px",height:"20px",fill:"currentColor"}}),bc=Gh({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},{extraSVGAttrs:{width:"20px",height:"20px",fill:"currentColor"}}),yc=Gh({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"},{extraSVGAttrs:{width:"16px",height:"16px",fill:"currentColor"}}),wc=Gh({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},{extraSVGAttrs:{width:"20px",height:"20px",fill:"currentColor"}}),xc=Gh({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},{extraSVGAttrs:{width:"20px",height:"20px",fill:"currentColor"}}),_c=class{constructor(i){t(this,i),this.lotteryTippingBulletBetEvent=e(this,"lotteryTippingBulletBetSelect",7),this.lotteryTippingCurrentPageChangeEvent=e(this,"lotteryTippingCurrentPageChange",7),this.eventNameRender=(t,e)=>o("div",{class:"flex gap-1 eventNameContainer__item"},o("span",{class:"eventNameContainer__item--title"},e),o("general-tooltip",null,o("span",{slot:"trigger",class:"icon info-icon",innerHTML:yc,style:{width:"18px"}}),o("div",{slot:"content"},o("div",{class:"match-info"},o("div",{class:"match-info-item"},o("div",{class:"match-info-item-label"},mc("homeTeam",this.language)),o("div",{class:"match-info-item-value"},t.homeName)),o("div",{class:"match-info-item"},o("div",{class:"match-info-item-label"},mc("awayTeam",this.language)),o("div",{class:"match-info-item-value"},t.awayName)))))),this.columns=[{title:"",value:"index",width:3},{title:"",value:"eventName",width:70,render:this.eventNameRender},{title:"",value:"startTime",width:22,align:"right",nowrap:!0,render:(t,e)=>(({date:t,type:e="date",format:i})=>{try{const o=pt(t);if(isNaN(o.getTime()))throw new Error(`Invalid date: ${t}`);if(i)return ut(o,i);let s="dd/MM/yyyy";return"time"===e?s="dd/MM/yyyy HH:mm:ss":"week"===e&&(s="ccc dd/MM/yyyy HH:mm:ss"),ut(o,s)}catch(t){return console.error("Error formatting date:",t.message),""}})({date:e,format:"ccc HH:mm"})},{title:()=>o("lottery-tipping-bullet-group",{theme:"text",bulletConfigContent:JSON.stringify(vc)}),value:"results",width:5,render:(t,e,i)=>{var s,r;return o("lottery-tipping-bullet-group",{mode:this.mode,bulletConfigContent:JSON.stringify(null===(r=null===(s=this.bulletConfigLineGroup)||void 0===s?void 0:s[this.currentPage-1])||void 0===r?void 0:r[i]),"position-idx":`${this.currentPage-1}-${i}`})}}],this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.translationData=void 0,this.clientStylingUrlContent="",this.sessionId=void 0,this.endpoint="",this.gameId=void 0,this.drawId=void 0,this.totalPages=void 0,this.minTotalPages=0,this.maxTotalPages=0,this.mode="multi",this.readPretty=!1,this.defaultBulletConfigLineGroup=void 0,this.bulletConfigLineGroup=[[[]]],this.currentPage=1,this.isLoading=!0,this.hasErrors=!1,this.dialogConfig={visible:!1},this.ticketDataSource=[]}handleNewTranslations(){this.isLoading=!0,fc(JSON.parse(this.translationUrl)),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`)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentWillLoad(){this.translationUrl&&fc(JSON.parse(this.translationUrl))}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&n(this.stylingContainer,this.clientStylingUrl))}get parsedDefaultBulletConfigLineGroup(){if("string"==typeof this.defaultBulletConfigLineGroup&&this.defaultBulletConfigLineGroup)try{const t=JSON.parse(this.defaultBulletConfigLineGroup);return this.readPrettyHandler(t)}catch(t){return void console.error("Error parsing defaultBulletConfigLineGroup:",t)}}readPrettyHandler(t){return this.readPretty?(this.currentPage=1,this.minTotalPages=1,this.maxTotalPages=this.totalPages,null==t?void 0:t.map((t=>null==t?void 0:t.map((t=>null==t?void 0:t.map((t=>Object.assign(Object.assign({},t),{disabled:!0})))))))):t}initLineForBulletConfig(){var t;return Array.from({length:null===(t=this.ticketDataSource)||void 0===t?void 0:t.length},(()=>[...vc]))}_resetBulletConfig(){this.bulletConfigLineGroup=Array.from({length:this.totalPages}).map(this.initLineForBulletConfig.bind(this))}fetchMatchData(){let t=new URL(`${this.endpoint}/poolgames/${this.gameId}/draws/${this.drawId}/matchConfig`);this.gameId&&this.drawId&&(this.isLoading=!0,(t=>fetch(t).then((t=>t.json())))(t.href).then((t=>{this.ticketDataSource=t||[],this.isLoading=!1,this.updateBulletConfigLineGroup()})).catch((t=>{this.isLoading=!1,this.hasErrors=!0,console.error("Error!",t)})))}updateBulletConfigLineGroup(){this.parsedDefaultBulletConfigLineGroup&&this.parsedDefaultBulletConfigLineGroup.length>0?this.bulletConfigLineGroup=this.parsedDefaultBulletConfigLineGroup:this._resetBulletConfig()}connectedCallback(){this.fetchMatchData()}handleClearAll(){this._resetBulletConfig(),(({message:t,theme:e="success"})=>{window.postMessage({type:"ShowNotificationToast",message:t,theme:e})})({message:mc("selectionCleared",this.language)}),this.lotteryTippingBulletBetEvent.emit({hasSelectBullet:!1})}async resetBulletConfig({minLineNumber:t,maxLineNumber:e,defaultBoards:i}){this.totalPages=i,this.minTotalPages=t,this.maxTotalPages=e,this.currentPage=1,this._resetBulletConfig(),this.lotteryTippingBulletBetEvent.emit({hasSelectBullet:!1})}lotteryTippingBulletGroupSelectionHandler(t){const{bulletConfigArr:e,positionIdx:i}=t.detail,[o,s]=i.split("-");this.bulletConfigLineGroup[o][s]=e,this.bulletConfigLineGroup=[...this.bulletConfigLineGroup],this.lotteryTippingBulletBetEvent.emit({hasSelectBullet:!0})}async getData(){return await this.validateBulletConfigLineGroup(),this.bulletConfigLineGroup}validateBulletConfigLineGroup(){if("[[[]]]"===JSON.stringify(this.bulletConfigLineGroup))return Promise.resolve(this.bulletConfigLineGroup);const t=this.bulletConfigLineGroup.length;return t!==this.totalPages||t<this.minTotalPages||t>this.maxTotalPages?(this._resetBulletConfig(),Promise.reject(new Error("Invalid bullet config line group length"))):Promise.resolve(this.bulletConfigLineGroup)}prevPage(){this.swapCard("prev",(()=>{this.currentPage>1&&this.currentPage--}))}nextPage(){this.swapCard("next",(()=>{this.currentPage<this.totalPages&&this.currentPage++}))}handleAddLine(){this.swapCard("add",(()=>{this.totalPages<=this.maxTotalPages-1&&(this.bulletConfigLineGroup.push(this.initLineForBulletConfig()),this.totalPages++,this.currentPage++,this.lotteryTippingBulletBetEvent.emit())}))}handleRemoveLine(){(()=>{if(this.totalPages>=this.minTotalPages+1){const t=()=>{this.dialogConfig={visible:!1}},e=()=>{this.bulletConfigLineGroup.splice(this.currentPage-1,1),this.totalPages--,1!==this.currentPage&&this.currentPage--,this.lotteryTippingBulletBetEvent.emit(),this.swapCard("remove",t)};this.dialogConfig={visible:!0,content:mc("selectionOnLineCleared",this.language),onConfirm:e,onCancel:t}}})()}swapCard(t,e){const i=this.mainContainer;if(!i)return;const{out:o,in:s}={next:{out:"card-out-left",in:"card-in-left"},prev:{out:"card-out-right",in:"card-in-right"},remove:{out:"card-out-down",in:"card-in-right"},add:{out:"card-out-left",in:"card-in-up"}}[t];i.classList.add(o),i.addEventListener("animationend",(()=>{i.classList.remove(o),e();const t=this.mainContainer;t&&(t.classList.add(s),t.addEventListener("animationend",(()=>t.classList.remove(s)),{once:!0}))}),{once:!0})}handleCurrentPageChange(){this.lotteryTippingCurrentPageChangeEvent.emit({currentPage:this.currentPage})}renderLoading(){return o("div",{class:"loading-wrap"},o("section",{class:"dots-container"},o("div",{class:"dot"}),o("div",{class:"dot"}),o("div",{class:"dot"}),o("div",{class:"dot"}),o("div",{class:"dot"})))}render(){var t,e,i,s;if(this.isLoading)return this.renderLoading();if(this.hasErrors)return o("div",{ref:t=>this.stylingContainer=t,class:"LotteryTippingTicketBet__container"},o("p",null,mc("error",this.language)));const r=({columns:t,dataSource:e,hideHead:i=!1,grid:s=!0,bordered:r=!0})=>o("table",{class:{bordered:r,grid:s,"my-table-component":!0}},!i&&o("thead",null,o("tr",null,t.map((t=>{var e;return o("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))})))),o("tbody",null,e.map(((e,i)=>o("tr",{key:i},t.map((t=>o("td",{key:t.value,style:{width:t.width+"%",textAlign:t.align},class:{"no-wrap":t.nowrap}},t.render?t.render(e,e[t.value],i):e[t.value])))))))),n=this.totalPages<this.maxTotalPages&&this.currentPage===this.totalPages,a=this.totalPages>this.minTotalPages;return 0===this.ticketDataSource.length||0===this.minTotalPages||0===this.maxTotalPages?o("div",{class:"LotteryTippingTicketBet__container",ref:t=>this.stylingContainer=t},o("div",{class:"LotteryTippingTicketBet__empty"},o("p",null,mc("noData",this.language)))):this.readPretty?o("div",{class:"LotteryTippingTicketBet__container",ref:t=>this.stylingContainer=t},o("div",{class:"LotteryTippingTicketBet__main",ref:t=>this.mainContainer=t},o(r,{columns:this.columns,dataSource:(null===(t=this.ticketDataSource)||void 0===t?void 0:t.map(((t,e)=>Object.assign(Object.assign({},t),{index:e+1}))))||[],hideHead:!1,grid:!1,bordered:!1}),this.totalPages>1&&o("div",null,o("div",{class:"border-line"}),o("div",{class:"LotteryTippingTicketBet__footer"},o("div",{class:"my-pagination flex justify-between"},o("span",null,mc("lineInfo",this.language,{currentPage:this.currentPage,totalPages:this.totalPages})),o("div",{class:"flex gap-1"},o("span",{class:"btn "+(1===this.currentPage?"disabled":""),onClick:this.prevPage.bind(this)},o("span",{class:"icon",innerHTML:wc})),o("span",{class:"btn "+(this.currentPage===this.totalPages?"disabled":""),onClick:this.nextPage.bind(this)},o("span",{class:"icon",innerHTML:xc})))))))):o("div",{ref:t=>this.stylingContainer=t,class:"LotteryTippingTicketBet__container"},o("div",{class:"LotteryTippingTicketBet__tableToolbar flex justify-end gap-1"},o("button",{class:{"LotteryTippingTicketBet__tableToolbar--item":!0,"mr-0":!(n||a)},onClick:this.handleClearAll.bind(this)},mc("clearAll",this.language))),o("div",{class:"flex align-center LotteryTippingTicketBet__main",ref:t=>this.mainContainer=t},o(r,{columns:this.columns,dataSource:(null===(e=this.ticketDataSource)||void 0===e?void 0:e.map(((t,e)=>Object.assign(Object.assign({},t),{index:e+1}))))||[],hideHead:!1,grid:!1,bordered:!1}),(n||a)&&o("div",{class:"LotteryTippingTicketBet__lineOperatorGroup"},n&&o("div",{class:{"LotteryTippingTicketBet__lineOperatorGroup--item":!0},onClick:this.handleAddLine.bind(this)},o("span",{class:"icon",innerHTML:gc})),a&&o("div",{class:{"LotteryTippingTicketBet__lineOperatorGroup--item":!0},onClick:this.handleRemoveLine.bind(this)},o("span",{class:"icon",innerHTML:bc})))),o("div",{class:"border-line"}),o("div",{class:"LotteryTippingTicketBet__footer"},o("div",{class:"my-pagination flex justify-between"},o("span",null,mc("lineInfo",this.language,{currentPage:this.currentPage,totalPages:this.totalPages})),o("div",{class:"flex gap-1"},o("span",{class:"btn "+(1===this.currentPage?"disabled":""),onClick:this.prevPage.bind(this)},o("span",{class:"icon",innerHTML:wc})),o("span",{class:"btn "+(this.currentPage===this.totalPages?"disabled":""),onClick:this.nextPage.bind(this)},o("span",{class:"icon",innerHTML:xc}))))),this.dialogConfig.visible&&o("vaadin-confirm-dialog",{rejectButtonVisible:!0,rejectText:mc("cancel",this.language),confirmText:mc("confirm",this.language),opened:null===(i=this.dialogConfig)||void 0===i?void 0:i.visible,onConfirm:this.dialogConfig.onConfirm,onReject:this.dialogConfig.onCancel},null===(s=this.dialogConfig)||void 0===s?void 0:s.content))}static get assetsDirs(){return["../static"]}static get watchers(){return{translationUrl:["handleNewTranslations"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],gameId:["fetchMatchData"],sessionId:["fetchMatchData"],drawId:["fetchMatchData"],defaultBulletConfigLineGroup:["fetchMatchData"],currentPage:["handleCurrentPageChange"]}}};var kc,Cc;_c.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.table-wrapper {\n overflow-x: auto; /* Handle horizontal scroll if content overflows */\n}\n\n.my-table-component {\n width: 100%;\n border-collapse: collapse; /* Important for borders */\n text-align: left;\n border-radius: 0.1rem; /* Ant Design like subtle rounding */\n border-spacing: 0;\n}\n\n/* Header */\n.my-table-component th {\n background: var(--emw--color-background-secondary, #f5f5f5);\n color: var(--emw--color-typography, #000);\n font-weight: 500;\n padding: 0.4rem 0.5rem;\n transition: background 0.3s ease;\n}\n\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.btn {\n color: var(--emw--color-typography, #000);\n background: var(--emw--color-background, #fff);\n font-size: 14px;\n transition: all 0.2s ease;\n}\n.btn:hover {\n cursor: pointer;\n}\n\n.btn:hover {\n background-color: var(--emw--color-gray-100, #e6e6e6);\n}\n\n.btn.disabled {\n opacity: 0.5;\n pointer-events: none;\n}\n.btn.disabled:hover {\n cursor: not-allowed !important;\n}\n\n.LotteryTippingTicketBet__tableToolbar {\n width: 100%;\n margin-bottom: 1rem;\n}\n\n.LotteryTippingTicketBet__tableToolbar--item {\n background-color: transparent;\n cursor: pointer;\n font-weight: 500;\n white-space: nowrap;\n display: inline-flex;\n border-radius: 1.6rem;\n border: 1px solid var(--emw--color-gray-100, #e6e6e6);\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n padding-left: 1rem;\n padding-right: 1rem;\n margin-right: 2rem;\n color: var(--emw--color-typography, #000);\n}\n.LotteryTippingTicketBet__tableToolbar--item.mr-0 {\n margin-right: 0rem !important;\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup {\n flex-basis: 2rem;\n display: flex;\n flex-direction: column;\n gap: 1rem;\n border-radius: 8px;\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup--item {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 2rem;\n height: 2rem;\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n color: var(--emw--color-typography, #000);\n border-radius: 8px;\n transition: all 0.2s ease-in-out;\n cursor: pointer;\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup--item:hover {\n transform: scale(1.1);\n box-shadow: 0 6px 14px var(--emw-calender-curday-box-shadow, rgba(0, 0, 0, 0.09));\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup--item .icon {\n width: 20px;\n height: 20px;\n transition: filter 0.2s ease-in-out;\n filter: grayscale(0.3);\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup--item:hover .icon {\n filter: grayscale(0);\n transform: rotate(3deg);\n}\n\ndiv.border-line {\n margin-top: 1rem;\n height: 1px;\n width: 100%;\n box-sizing: border-box;\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n transition: all 0.3s ease;\n}\n\n.LotteryTippingTicketBet__footer {\n padding: 0.5rem;\n}\n\n.my-pagination {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 1rem;\n font-size: 0.8rem;\n color: var(--emw--color-typography-secondary, #333);\n}\n\n.my-pagination span {\n font-weight: 500;\n user-select: none;\n}\n\n.my-pagination .btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n border-radius: 50%;\n transition: all 0.3s ease;\n cursor: pointer;\n opacity: 0.9;\n color: var(--emw--color-typography, #000);\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n}\n\n.my-pagination .btn .icon {\n width: 20px;\n height: 20px;\n transition: transform 0.2s ease;\n}\n\n.my-pagination .btn:hover {\n transform: scale(1.1);\n box-shadow: 0 6px 14px var(--emw-calender-curday-box-shadow, rgba(0, 0, 0, 0.09));\n}\n\n.my-pagination .btn.disabled {\n background-color: var(--emw--color-background-tertiary, #ccc);\n cursor: not-allowed;\n opacity: 0.5;\n transform: scale(1);\n}\n\n.match-info-item {\n display: flex;\n}\n\n.match-info-item-label {\n margin-right: 6px;\n}\n\n.info-icon:hover {\n cursor: pointer;\n}\n\n.LotteryTippingTicketBet__empty p {\n text-align: center;\n}\n\n.no-wrap {\n white-space: nowrap;\n overflow: hidden;\n}\n\n.eventNameContainer__item--title {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 300px;\n}\n@container (max-width: 600px) {\n .eventNameContainer__item--title {\n max-width: 180px;\n }\n}\n@container (max-width: 500px) {\n .eventNameContainer__item--title {\n max-width: 150px;\n }\n}\n@container (max-width: 400px) {\n .eventNameContainer__item--title {\n max-width: 100px;\n }\n}\n@container (max-width: 330px) {\n .eventNameContainer__item--title {\n max-width: 70px;\n }\n}\n\n.LotteryTippingTicketBet__main {\n perspective: 800px;\n will-change: transform, opacity;\n backface-visibility: hidden;\n}\n\n@container (max-width: 520px) {\n .LotteryTippingTicketBet__main {\n flex-wrap: wrap;\n justify-content: center;\n }\n .LotteryTippingTicketBet__tableToolbar--item {\n margin-right: 0 !important;\n }\n}\n/* Fade-In Keyframes */\n@keyframes fadeInLeft {\n from {\n opacity: 0;\n transform: translateX(100%);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n/* Fade-Out Keyframes */\n@keyframes fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n@keyframes fadeInRight {\n from {\n opacity: 0;\n transform: translateX(-100%);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n@keyframes fadeInUp {\n from {\n opacity: 0;\n transform: translateY(100%);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n@-webkit-keyframes slide-left {\n 0% {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n }\n 100% {\n -webkit-transform: translateX(-100px);\n transform: translateX(-100px);\n }\n}\n@keyframes slide-left {\n 0% {\n -webkit-transform: translateX(100%);\n transform: translateX(100%);\n }\n 100% {\n -webkit-transform: translateX(0px);\n transform: translateX(0px);\n }\n}\n@-webkit-keyframes slide-right {\n 0% {\n -webkit-transform: translateX(-100%);\n transform: translateX(-100%);\n }\n 100% {\n -webkit-transform: translateX(0px);\n transform: translateX(0px);\n }\n}\n@keyframes slide-right {\n 0% {\n -webkit-transform: translateX(-100px);\n transform: translateX(-100px);\n }\n 100% {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n }\n}\n@-webkit-keyframes slide-top {\n 0% {\n -webkit-transform: translateY(-100px);\n transform: translateY(-100px);\n }\n 100% {\n -webkit-transform: translateY(0px);\n transform: translateY(0px);\n }\n}\n@keyframes slide-top {\n 0% {\n -webkit-transform: translateY(-100px);\n transform: translateY(-100px);\n }\n 100% {\n -webkit-transform: translateY(0px);\n transform: translateY(0px);\n }\n}\n/* Apply to your card classes */\n.card-in-left {\n -webkit-animation: slide-left 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n animation: slide-left 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n}\n\n.card-out-left {\n animation: fadeOut 0.2s ease-out both;\n}\n\n.card-in-right {\n -webkit-animation: slide-right 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n animation: slide-right 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n}\n\n.card-out-right {\n animation: fadeOut 0.2s ease-out both;\n}\n\n.card-in-up {\n -webkit-animation: slide-top 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n animation: slide-top 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n}\n\n.card-out-down {\n animation: fadeOut 0.2s ease-out both;\n}\n\n.loading-wrap {\n margin: 20px 0;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 40vh;\n}\n.loading-wrap .dots-container {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n}\n.loading-wrap .dot {\n height: 14px;\n width: 14px;\n margin-right: 14px;\n border-radius: 14px;\n background-color: var(--emw--color-gray-300, #333);\n animation: pulse 1.5s infinite ease-in-out;\n}\n.loading-wrap .dot:last-child {\n margin-right: 0;\n}\n.loading-wrap .dot:nth-child(1) {\n animation-delay: -0.3s;\n}\n.loading-wrap .dot:nth-child(2) {\n animation-delay: -0.1s;\n}\n.loading-wrap .dot:nth-child(3) {\n animation-delay: 0.1s;\n}\n@keyframes pulse {\n 0% {\n transform: scale(0.8);\n background-color: var(--emw--color-gray-300, #333);\n }\n 50% {\n transform: scale(1.2);\n background-color: var(--emw--color-gray-100, #e6e6e6);\n }\n 100% {\n transform: scale(0.8);\n background-color: var(--emw--color-gray-150, #6f6f6f);\n }\n}",function(t){t.SingleBet="SingleBet",t.SystemBet="SystemBet"}(kc||(kc={})),function(t){t.FullTime="FullTime",t.HalfTime="HalfTime",t.Both="Both"}(Cc||(Cc={}));const Sc="TICKET_INVALID_TOKEN",Tc=class{constructor(i){t(this,i),this.logoutEventHandler=e(this,"logout",7),this.bothBettingTypeMultiplier=2,this.onStakeChange=t=>{this.currentStake=this.getCurrentStakeByValue(t.detail.value)},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.logoUrl=void 0,this.endpoint="",this.sessionId=void 0,this.gameId=void 0,this.playerId="",this.drawId=void 0,this.isLoading=!0,this.bettingTypeOptions=[],this.playingModeOptions=[],this.selectedBettingType=void 0,this.selectedPlayingMode=void 0,this.hasSelectBullet=void 0,this.hasSelectAllBullet=void 0,this.totalLineCombination=0,this.submitLoading=void 0,this.rawData={},this.saleStatisticsInfo={},this.currentStake=void 0,this.dialogConfig={visible:!1}}async getLotteryTippingBulletResults(){return await this.childRef.getData()}get lineNumberRange(){const{betType:t}=ac({rawData:this.rawData,selectedBettingType:this.selectedBettingType,selectedPlayingMode:this.selectedPlayingMode}),e=(null==t?void 0:t.boardsAllowed)||[0],[i,o]=[Math.min(...e),Math.max(...e)];return{minLineNumber:i,maxLineNumber:o,defaultBoards:(null==t?void 0:t.defaultBoards)||i}}get playTypeConfig(){var t,e,i;return null===(i=null===(e=null===(t=this.rawData)||void 0===t?void 0:t.rules)||void 0===e?void 0:e.poolGame)||void 0===i?void 0:i.playTypes}get betTypeConfig(){var t,e;return null===(e=null===(t=this.rawData)||void 0===t?void 0:t.rules)||void 0===e?void 0:e.betTypes}get isBothBettingType(){return this.selectedBettingType===Cc.Both}get stakeOptions(){var t,e,i;return null===(i=null===(e=null===(t=this.rawData)||void 0===t?void 0:t.rules)||void 0===e?void 0:e.stakes)||void 0===i?void 0:i.map((t=>{var e;return{value:null===(e=t.value)||void 0===e?void 0:e.toString(),label:t.value,currency:t.currency}}))}getCurrentStakeByValue(t){var e;return null===(e=this.stakeOptions)||void 0===e?void 0:e.find((e=>+e.value==+t))}initiateCurrentStake(){var t,e,i;if(1===(null===(t=this.stakeOptions)||void 0===t?void 0:t.length))this.currentStake=this.stakeOptions[0];else{const t=(i=(null===(e=this.stakeOptions)||void 0===e?void 0:e.map((t=>t.value)))||[]).length?Math.min.apply(null,i):void 0;this.currentStake=this.getCurrentStakeByValue(t)}}handleBettingTypeChange(t){var e,i,o,s;if(t===this.selectedBettingType)return;this.selectedBettingType=t;const r=(({bettingType:t,playTypeConfig:e,betTypeConfig:i,enabledPlayingModeOptions:o})=>{const s=i.filter((t=>t.enabled)).map((t=>t.id)),r=e.filter((t=>s.includes(t.betTypeId))).filter((e=>e.bettingType===t)).map((t=>t.playMode));return o.filter((t=>r.includes(t.code)))})({bettingType:this.selectedBettingType,playTypeConfig:this.playTypeConfig,betTypeConfig:this.betTypeConfig,enabledPlayingModeOptions:nc((null===(o=null===(i=null===(e=this.rawData)||void 0===e?void 0:e.rules)||void 0===i?void 0:i.poolGame)||void 0===o?void 0:o.playModes)||[])});this.playingModeOptions=r,r.length?r.map((t=>t.code)).includes(this.selectedPlayingMode)||(this.hasSelectBullet=!1,this.handlePlayingModeChange(null===(s=r[0])||void 0===s?void 0:s.code)):this.selectedPlayingMode=void 0,this.clearBulletConfig()}async clearBulletConfig(){return await this.childRef.resetBulletConfig(this.lineNumberRange)}handlePlayingModeChange(t){if(t===this.selectedPlayingMode)return;const e=e=>{this.selectedPlayingMode=t,this.clearBulletConfig().then((()=>{null==e||e()}))};if(this.hasSelectBullet){const t=()=>{this.dialogConfig={visible:!1}},i=()=>{e(t)};this.dialogConfig={visible:!0,content:Qh("selectionCleared",this.language),onConfirm:i,onCancel:t}}else e()}lotteryTippingBulletGroupSelectionHandler(t){var e;const i=null===(e=t.detail)||void 0===e?void 0:e.hasSelectBullet;void 0!==i&&(this.hasSelectBullet=i),this.bulletBetSelectChecker()}calculateCombinationInLine(t){return t.reduce(((t,e)=>t*e),1)}calculateTotalAmount(){const t=this.currentStake;if(!t)return 0;let e=+t.value*this.totalLineCombination;return this.isBothBettingType&&(e*=this.bothBettingTypeMultiplier),e}get totalAmountFormatted(){var t;const e=this.calculateTotalAmount();return sc(e)+" "+((null===(t=this.currentStake)||void 0===t?void 0:t.currency)||"")}get currentStakeFormatted(){const{value:t="",currency:e=""}=this.currentStake||{};return`${t} ${e}`}bulletBetSelectChecker(){(async()=>{const t=await this.getLotteryTippingBulletResults();this.hasSelectAllBullet=!(({rawResults:t})=>{const e=(({rawResults:t})=>{const e=t=>t.filter((t=>t.isSelected)).length;return t.map((t=>t.length>0?t.map(e):[0]))})({rawResults:t});this.totalLineCombination=e.reduce(((t,e)=>t+this.calculateCombinationInLine(e)),0);const{combinations:i=1,maxCombinations:o=1}=ac({rawData:this.rawData,selectedBettingType:this.selectedBettingType,selectedPlayingMode:this.selectedPlayingMode}).betType||{};return e.some((t=>{const e=this.calculateCombinationInLine(t);return e<i||e>o}))})({rawResults:t})})()}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`)}componentWillLoad(){this.translationUrl&&tc(this.translationUrl)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&n(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}connectedCallback(){(()=>{let t=new URL(`${this.endpoint}/games/${this.gameId}`);this.isLoading=!0,ic(t.href,"GET").then((t=>{var e,i,o,s,r,n,a;this.rawData=t,this.bettingTypeOptions=nc((null===(i=null===(e=null==t?void 0:t.rules)||void 0===e?void 0:e.poolGame)||void 0===i?void 0:i.bettingTypes)||[]),this.playingModeOptions=nc((null===(s=null===(o=null==t?void 0:t.rules)||void 0===o?void 0:o.poolGame)||void 0===s?void 0:s.playModes)||[]),this.initiateCurrentStake();const{bettingType:l,playMode:h}=(({playTypeConfig:t=[],betTypeConfig:e=[],enabledBettingTypeOptions:i=[],enabledPlayingModeOptions:o=[]})=>{const s=e.filter((t=>t.enabled));for(const e of s){const{bettingType:s,playMode:r}=null==t?void 0:t.find((t=>t.betTypeId===e.id));if(i.map((t=>t.code)).includes(s)&&o.map((t=>t.code)).includes(r))return{bettingType:s,playMode:r}}return{}})({playTypeConfig:null===(n=null===(r=null==t?void 0:t.rules)||void 0===r?void 0:r.poolGame)||void 0===n?void 0:n.playTypes,betTypeConfig:null===(a=null==t?void 0:t.rules)||void 0===a?void 0:a.betTypes,enabledBettingTypeOptions:this.bettingTypeOptions,enabledPlayingModeOptions:this.playingModeOptions});return this.handleBettingTypeChange(l),this.selectedPlayingMode=h,this.updateSaleStatistics()})).catch((t=>{console.error("Error!",t)})).finally((()=>{this.isLoading=!1}))})()}updateSaleStatistics(){var t;return async function({endpoint:t,gameId:e,drawId:i}){try{return await ic(`${t}/games/${e}/draws/${i}/saleStatistics`)}catch(t){return Promise.reject(t)}}({endpoint:this.endpoint,gameId:null===(t=this.rawData)||void 0===t?void 0:t.type,drawId:this.drawId}).then((t=>{this.saleStatisticsInfo=t}))}async handleSubmit(){const t=await this.getLotteryTippingBulletResults(),{betTypeId:e,betType:i}=ac({rawData:this.rawData,selectedBettingType:this.selectedBettingType,selectedPlayingMode:this.selectedPlayingMode}),o=new URL(`${this.endpoint}/tickets`),s=(({playerId:t,rawResults:e,gameId:i,rawData:o,amount:s,currentStake:r,betTypeId:n,betType:a})=>{var l;const h={playerId:t,tickets:[]},c=(t=>{const e=t=>t.map((t=>t.isSelected?1:0)),i=t.map((t=>t.map(e))),o=[];return i.forEach(((t,e)=>{const i=[];t.forEach(((t,e)=>{const o=t.map(((t,e)=>t?rc[e]:null)).filter(Boolean);i[e]=[o]})),o[e]=i})),o})(e),d=r||{};return h.tickets.push({startingDrawId:null===(l=null==o?void 0:o.currentDraw)||void 0===l?void 0:l.id,amount:s,gameId:i,gameName:o.name,currency:d.currency,selection:c.map((t=>({betType:n,stake:+d.value,poolGameSelections:t,quickPick:!1,betName:a.name}))),multiplier:!1,drawCount:1,quickPick:!1}),h})({playerId:this.playerId,rawResults:t,gameId:this.gameId,rawData:this.rawData,amount:this.calculateTotalAmount().toString(),currentStake:this.currentStake,betTypeId:e,betType:i});this.submitLoading=!0,(({body:t,sessionId:e,url:i})=>{const o={method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${e}`,"X-Idempotency-Key":"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))},body:JSON.stringify(t)};return fetch(i,o).then((t=>{if(401===t.status)throw new Error(Sc);if(t.status>300)throw new Error(t.statusText);return t.json()}))})({body:s,sessionId:this.sessionId,url:o.href}).then((()=>{oc({message:Qh("ticketSubmitted",this.language)}),this.clearBulletConfig(),this.updateSaleStatistics()})).catch((t=>{if(t.message===Sc)return this.logoutEventHandler.emit(),void oc({message:Sc,theme:"error"});oc({message:Qh("ticketFailed",this.language),theme:"error"})})).finally((()=>{this.submitLoading=!1}))}get lineCountRender(){const t=sc(this.totalLineCombination);let e=Qh("lines",this.language);return[0,1].includes(+t)&&(e=Qh("line",this.language)),t+" "+e}renderBettingControls(){var t,e;const i=()=>o("div",{class:"skeleton-content"},o("div",{class:"skeleton-item skeleton-animated"})),s=()=>{var t;return o("div",null,o("vaadin-select",{items:this.stakeOptions||[],value:(null===(t=this.currentStake)||void 0===t?void 0:t.value)||"","on-value-changed":this.onStakeChange.bind(this),"no-vertical-overlap":!0}))};return o("div",{class:"LotteryTippingTicketController__top"},o("div",{class:"LotteryTippingTicketController__row"},o("div",{class:"LotteryTippingTicketController__section"},o("span",{class:"LotteryTippingTicketController__label"},Qh("bettingType",this.language)),this.bettingTypeOptions.length?(()=>o("div",{class:"LotteryTippingTicketController__segmented-control"},this.bettingTypeOptions.map((t=>o("button",{class:{LotteryTippingTicketController__segment:!0,"LotteryTippingTicketController__segment--active":this.selectedBettingType===t.code},onClick:this.handleBettingTypeChange.bind(this,t.code)},t.name)))))():i()),o("div",{class:"LotteryTippingTicketController__section"},o("span",{class:"LotteryTippingTicketController__label"},Qh("playingMode",this.language)),this.playingModeOptions.length?(()=>o("div",{class:"LotteryTippingTicketController__segmented-control"},this.playingModeOptions.map((t=>o("button",{class:{LotteryTippingTicketController__segment:!0,"LotteryTippingTicketController__segment--active":this.selectedPlayingMode===t.code},onClick:this.handlePlayingModeChange.bind(this,t.code)},t.name)))))():i()),(null===(t=this.stakeOptions)||void 0===t?void 0:t.length)>1&&o("div",{class:"LotteryTippingTicketController__section"},o("span",{class:"LotteryTippingTicketController__label"},Qh("stakePerLine",this.language)),s()),(null===(e=this.stakeOptions)||void 0===e?void 0:e.length)>1&&o("div",{class:"LotteryTippingTicketController__section"},o("span",{class:"LotteryTippingTicketController__label"},Qh("stakePerLine",this.language)),s())))}renderOrderSummary(){var t;return o("div",{class:"LotteryTippingTicketController__main--right order-summary"},o("h3",{class:"order-summary__title"},Qh("orderSummaryTitle",this.language)),o("div",{class:"order-summary__ticket-info"},o("div",{class:"order-summary__ticket"},Qh("orderSummaryTickets",this.language),":"),o("div",{class:"order-summary__details"},o("span",{class:"order-summary__line-count"},this.lineCountRender),o("div",null,this.currentStake&&o("span",{class:"order-summary__multiplier"},"x"),o("span",{class:"order-summary__stake"},this.currentStakeFormatted)),this.isBothBettingType&&o("div",null,o("span",{class:"order-summary__multiplier"},"x"),o("span",{class:"order-summary__stake"},this.bothBettingTypeMultiplier)))),o("hr",{class:"order-summary__divider"}),o("div",{class:"order-summary__ticket-info"},o("div",{class:"order-summary__ticket"},Qh("orderSummaryTotal",this.language),":"),o("span",{class:"order-summary__details"},this.totalAmountFormatted)),o("div",{class:"order-summary__button-wrapper"},o("lottery-button",{onClick:this.handleSubmit.bind(this),loading:this.submitLoading,disabled:!this.hasSelectAllBullet||this.submitLoading||void 0===(null===(t=this.currentStake)||void 0===t?void 0:t.value),text:Qh("orderSummarySubmit",this.language)})))}get formattedTurnover(){var t,e,i;const o=null!==(i=null===(e=null===(t=this.saleStatisticsInfo)||void 0===t?void 0:t.wagerSegment)||void 0===e?void 0:e.totalSalesCrossDraw)&&void 0!==i?i:0;return null==o?"":`€${o?sc(o):0}`}render(){var t,e,i,s,r,n,a;return o("div",{key:"353f56111a3dc6f6e7365d563163a38c850f2e88",class:"lottery-tipping-ticket-controller__container",ref:t=>this.stylingContainer=t},o("lottery-tipping-ticket-banner",{key:"3a2472f0bf9195547f5e4c6c2c0a2362c790aa27","client-styling":this.clientStyling,"client-styling-Url":this.clientStylingUrl,stopTime:null===(e=null===(t=this.rawData)||void 0===t?void 0:t.currentDraw)||void 0===e?void 0:e.wagerCloseTime,period:null===(s=null===(i=this.rawData)||void 0===i?void 0:i.currentDraw)||void 0===s?void 0:s.date,"formatted-turnover":this.formattedTurnover,language:this.language,"translation-url":this.translationUrl,"logo-url":this.logoUrl}),this.renderBettingControls(),o("div",{key:"9d0a9391ccf79351959cc280e3c15efc657a966f",class:"flex flex-wrap LotteryTippingTicketController__main"},o("div",{key:"c61fdb41d41694227971478e193cc5162bff30c3",class:"LotteryTippingTicketController__main--left"},o("lottery-tipping-ticket-bet",{key:"56964177a4366a366279b2ebfff2ee52d1e27de0",ref:t=>this.childRef=t,endpoint:this.endpoint,"session-id":this.sessionId,"game-id":null===(r=this.rawData)||void 0===r?void 0:r.type,"draw-id":this.drawId,language:this.language,"translation-url":this.translationUrl,"max-total-pages":this.lineNumberRange.maxLineNumber,"min-total-pages":this.lineNumberRange.minLineNumber,"total-pages":this.lineNumberRange.defaultBoards,mode:this.selectedPlayingMode===kc.SingleBet?"single":"multi","client-styling":this.clientStyling,"client-styling-Url":this.clientStylingUrl})),this.renderOrderSummary()),this.dialogConfig.visible&&o("vaadin-confirm-dialog",{key:"fe8eb6d26eecee3c6e10b20c4f2ad968f707d51c",rejectButtonVisible:!0,rejectText:Qh("cancel",this.language),confirmText:Qh("confirm",this.language),opened:null===(n=this.dialogConfig)||void 0===n?void 0:n.visible,onConfirm:this.dialogConfig.onConfirm,onReject:this.dialogConfig.onCancel},null===(a=this.dialogConfig)||void 0===a?void 0:a.content))}static get assetsDirs(){return["../static"]}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};var Ac;Tc.style=".lottery-tipping-ticket-controller__container {\n display: block;\n box-sizing: border-box;\n font-size: 14px;\n container-type: inline-size;\n background: var(--emw--color-background, #fff);\n}\n@container (max-width: 375px) {\n .lottery-tipping-ticket-controller__container {\n font-size: 12px;\n }\n}\n\n.LotteryTippingTicketController__top {\n padding: 1.8rem;\n display: flex;\n flex-direction: column;\n gap: 2rem;\n margin: 0 auto;\n max-width: 800px;\n}\n.LotteryTippingTicketController__row {\n display: flex;\n align-items: center;\n gap: 1rem;\n justify-content: space-between;\n flex-wrap: wrap;\n}\n.LotteryTippingTicketController__section {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n.LotteryTippingTicketController__label {\n font-weight: 500;\n white-space: nowrap;\n width: 6rem;\n color: var(--emw--color-typography-secondary, #333);\n}\n.LotteryTippingTicketController__segmented-control {\n height: 2.2rem;\n display: inline-flex;\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n border-radius: 2rem;\n padding: 0.2rem;\n}\n.LotteryTippingTicketController__segment {\n background-color: transparent;\n border: none;\n padding: 0.3rem 0.8rem;\n cursor: pointer;\n font-weight: 500;\n border-radius: 2rem;\n outline: none;\n transition: background-color 0.25s ease, color 0.25s ease;\n white-space: nowrap;\n color: var(--emw--color-typography, #000);\n}\n.LotteryTippingTicketController__segment--active {\n background-color: var(--emw--color-background, #ffffff);\n color: var(--emw--color-typography, #000);\n font-weight: 600;\n}\n.LotteryTippingTicketController__segment--disabled:hover {\n cursor: not-allowed !important;\n}\n.LotteryTippingTicketController__segment:not(.LotteryTippingTicketController__segment--active):hover {\n background-color: var(--emw--color-background-tertiary, #ccc);\n}\n\n.flex {\n display: flex;\n}\n\n.flex-wrap {\n flex-wrap: wrap;\n}\n\n.align-center {\n align-items: center;\n}\n\n.gap-1 {\n gap: 4px;\n}\n\n.LotteryTippingTicketController__main {\n align-items: flex-start;\n justify-content: center;\n gap: 2rem;\n max-width: 1200px;\n margin: 0 auto;\n padding: 0 20px;\n flex-wrap: wrap;\n}\n.LotteryTippingTicketController__main--left {\n border: 1px solid var(--emw--color-gray-50, #f5f5f5);\n padding: 1rem;\n border-radius: 1rem;\n flex: 1.5;\n}\n.LotteryTippingTicketController__main--right {\n padding: 1rem;\n border-radius: 1rem;\n flex: 1;\n}\n\n.order-summary {\n max-width: 360px;\n width: 100%;\n background: var(--emw--color-background, #fff);\n}\n\n.order-summary__title {\n margin-bottom: 16px;\n text-align: center;\n color: var(--emw--color-typography, #000);\n text-transform: uppercase;\n}\n\n.order-summary__ticket-info {\n display: flex;\n align-items: center;\n margin-bottom: 16px;\n gap: 10px;\n color: var(--emw--color-typography, #000);\n}\n\n.order-summary__ticket {\n font-weight: 500;\n width: 50px;\n text-align: right;\n color: var(--emw--color-typography, #000);\n}\n\n.order-summary__details {\n display: flex;\n align-items: center;\n color: var(--emw--color-typography, #000);\n}\n\n.order-summary__multiplier {\n color: var(--emw--color-typography-secondary, #333);\n margin: 0 8px;\n}\n\n.order-summary__divider {\n border: none;\n border-top: 1px solid var(--emw--color-gray-100, #e6e6e6);\n margin: 20px 0;\n}\n\n.order-summary__button-wrapper {\n display: flex;\n justify-content: center;\n}\n\n.order-summary__button {\n cursor: pointer;\n padding: 0.8rem 4rem;\n background: var(--emw--color-primary, #fed275);\n color: var(--emw--color-typography, #000);\n border-radius: var(--emw--button-border-radius, 4px);\n border: none;\n position: relative;\n}\n\n.loading-icon {\n position: absolute;\n right: 40px;\n top: 10px;\n}\n\n.order-summary__button:not(.order-summary__button--disabled):not(.order-summary__button--loading):hover {\n transform: translateY(-1px);\n background: var(--emw--color-primary-variant, #ffe66f);\n}\n\n.order-summary__button--loading {\n background: var(--emw--color-primary-variant, #ffe66f);\n cursor: not-allowed;\n}\n\n.order-summary__button--disabled {\n background: var(--emw--color-background-secondary, #f5f5f5);\n color: var(--emw--color-typography, #000);\n cursor: not-allowed;\n}\n\n.skeleton-content {\n display: flex;\n flex-direction: column;\n gap: 29px;\n align-items: center;\n}\n\n.skeleton-item {\n background: var(--emw--color-background-secondary, #f5f5f5);\n border-radius: 4px;\n height: 40px;\n width: 200px;\n}\n\n.skeleton-animated {\n animation: skeleton-shimmer 1.5s infinite linear;\n background: linear-gradient(90deg, var(--emw--color-background-secondary, #f5f5f5) 25%, var(--emw--color-background-tertiary, #ccc) 37%, var(--emw--color-background-secondary, #f5f5f5) 63%);\n background-size: 200% 100%;\n}\n\n@keyframes skeleton-shimmer {\n to {\n background-position: 100% 0;\n }\n}\n.loading-icon.scale {\n animation: scale 1s infinite ease-in-out;\n}\n\n@keyframes scale {\n 0%, 100% {\n transform: scale(1);\n }\n 50% {\n transform: scale(1.2);\n }\n}",function(t){t.WON="Won",t.LOST="Lost"}(Ac||(Ac={}));const zc=class{constructor(i){t(this,i),this.logout=e(this,"logout",7),this.ticketTypeMap={NORMAL:"Normal",SYNDICATE:"Syndicate",SUBSCRIPTION:"Subscription"},this.resultMap={[Ac.WON]:"Win",[Ac.LOST]:"Lose"},this.displayPrizeCategory=t=>{const e=new Map;t.forEach((t=>{let i=t.divisionDisplayName,o=t.amount,s=t.currency;i&&"None"!=i&&(e.has(i)?e.set(i,{amount:e.get(i).amount+o,currency:s,times:e.get(i).times+1}):e.set(i,{amount:o,currency:s,times:1}))}));const i=[];for(let[t,o]of e.entries())i.push({prizeName:t,amount:o.amount,currency:o.currency,times:o.times});return i.sort(((t,e)=>e.prizeName.localeCompare(t.prizeName))),i},this.endpoint=void 0,this.gameId=void 0,this.playerId=void 0,this.sessionId="",this.drawId=void 0,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.language="en",this.translationUrl="",this.ticketHistory=[],this.activeStatus="",this.statusOptions=void 0,this.isLoading=!0,this.rawData={},this.filterData={offset:0,limit:10,state:"",from:"",to:"",wagerType:"",vendorGameType:"PoolGame",vendorGameBettingObject:"HomeDrawAway",id:""},this.paginationInfo={current:1,total:0,pageSize:10},this.quickFiltersActive=!1,this.showCurrentTicketLine=!1,this.curTicketItem=void 0,this.curSelection=[],this.curSelectionIdx=0,this.showCurrentDrawResult=!1,this.curDrawItem=void 0,this.curDrawSelection=[],this.curDrawSelectionBettingType=void 0,this.curDrawSelectionMap={}}handleClientStylingChange(t,e){t!=e&&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`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&n(this.stylingContainer,this.clientStylingUrl))}async fetchGameData(){var t;try{let t=new URL(`${this.endpoint}/games/${this.gameId}`);const e=await Lh(t.href,"GET");this.rawData=e}catch(e){Vh({message:null!==(t=e.message)&&void 0!==t?t:e,theme:"error"})}}connectedCallback(){this.endpoint&&this.gameId&&this.fetchGameData()}handleGameInfoChange(t,e){t&&t!=e&&this.fetchGameData()}handleTicketInfoChange(t,e){t&&t!=e&&this.fetchTicketList()}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}async fetchTicketList(){this.isLoading=!0;try{const{items:t,total:e}=await Lh(`${this.endpoint}/tickets${function(t){const e={};Object.entries(t).forEach((([t,i])=>{$h(i,!0)||(e[t]=i)}));const i=Object.entries(e).map((([t,e])=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`)).join("&");return i?`?${i}`:""}(this.filterData)}`,"GET",null,{Authorization:`Bearer ${this.sessionId}`});this.ticketHistory=t,this.paginationInfo.total=e,t.length>0&&this.getDrawResult()}catch(t){console.log("in fetchTicketList error is: ",t),401===t.status&&(Vh({message:t.message,theme:"error"}),this.logout.emit())}finally{this.isLoading=!1}}async fetchDrawResult(t,e){try{return await Lh(`${this.endpoint}/games/${t}/draws/${e}`,"GET",{})}catch(t){console.log(t)}}getDivision(t,e){var i;let o=t.division,s=null===(i=e.prizes)||void 0===i?void 0:i.filter((t=>t.order===o));return s&&s.length?s[0].division:null}async getDrawResult(){const t=new Map;this.ticketHistory.forEach(((e,i)=>{e.drawResults.forEach(((o,s)=>{const r=`${o.drawId}-${e.gameId}`;t.has(r)?t.get(r).indices.push({ticketIndex:i,drawIndex:s}):t.set(r,{drawId:o.drawId,gameId:e.gameId,indices:[{ticketIndex:i,drawIndex:s}]})}))}));let e=[...this.ticketHistory];await Promise.all(Array.from(t.values()).map((async({gameId:t,drawId:i,indices:o})=>{try{const s=await this.fetchDrawResult(t,i);s&&o.forEach((({ticketIndex:t,drawIndex:i})=>{const o=Object.assign(Object.assign({},e[t].drawResults[i]),{tempDrawData:Object.assign(Object.assign({},s),{vendorGameId:e[t].vendorGameId}),prizeDetails:this.displayPrizeCategory(e[t].drawResults[i].details)}),r=[...e[t].drawResults];r[i]=o,e[t]=Object.assign(Object.assign({},e[t]),{drawResults:r})}))}catch(e){console.error(`failed to fetch draw result (gameId: ${t}, drawId: ${i}):`,e)}}))),this.ticketHistory=e}componentWillLoad(){this.translationUrl&&Nh(JSON.parse(this.translationUrl)),this.statusOptions=[{label:Bh("settled",this.language),value:"Settled"},{label:Bh("purchased",this.language),value:"Purchased"},{label:Bh("canceled",this.language),value:"Canceled"}],this.fetchTicketList()}changeStatus(t){this.activeStatus=t,this.filterData.state=t,this.quickFiltersActive=!0,this.fetchTicketList()}handlePageSizeChange(t){this.filterData.limit=t.detail,this.fetchTicketList()}handlePageChange(t){this.filterData.offset=(t.detail-1)*this.filterData.limit,this.fetchTicketList()}handleShowTicketLineDetial(t){this.curSelectionIdx=0,this.showCurrentTicketLine=!0,this.curTicketItem=t,this.curSelection=this.parseSelection()}handleShowCurrentDraw(t){this.showCurrentDrawResult=!0,this.curDrawItem=t,this.curDrawSelectionBettingType=t.winningNumbers[0].winning_type,this.curDrawItem.winningNumbers.forEach((t=>{this.curDrawSelectionMap[t.winning_type]=[Rh(t.numbers)]})),this.curDrawSelection=this.curDrawSelectionMap[this.curDrawSelectionBettingType]}parseSelection(){const t=[];return this.curTicketItem.selection.forEach(((e,i)=>{t[i]=Rh(e.selections)})),t}handleFilterChange(t){const e=t.detail;this.filterData.from=e.filterFromCalendar,this.filterData.to=e.filterToCalendar,this.filterData.id=e.ticketId,this.filterData.wagerType=e.ticketType,this.fetchTicketList()}handleFilterClear(){this.activeStatus="",this.quickFiltersActive=!1,this.filterData={offset:0,limit:10,state:"",from:"",to:"",wagerType:"",vendorGameType:"PoolGame",vendorGameBettingObject:"HomeDrawAway",id:""},this.fetchTicketList()}get playTypeConfig(){var t,e,i;return null===(i=null===(e=null===(t=this.rawData)||void 0===t?void 0:t.rules)||void 0===e?void 0:e.poolGame)||void 0===i?void 0:i.playTypes}get bettingTypeConfig(){var t,e,i;return null===(i=null===(e=null===(t=this.rawData)||void 0===t?void 0:t.rules)||void 0===e?void 0:e.poolGame)||void 0===i?void 0:i.bettingTypes}getBettingType(t){var e;return null!==(e=this.playTypeConfig.find((e=>e.betTypeId===t)).bettingType)&&void 0!==e?e:""}handlePoolGameCurrentPageChange(t){const{currentPage:e}=t.detail;this.curSelectionIdx=e-1}handleDrawBettingTypeChange(t){this.curDrawSelectionBettingType=t,this.curDrawSelection=this.curDrawSelectionMap[this.curDrawSelectionBettingType]}getBettingTypeName(t){var e,i;const o=null===(i=null===(e=this.bettingTypeConfig)||void 0===e?void 0:e.find((e=>e.code===t)))||void 0===i?void 0:i.name;return null!=o?o:t}render(){return o("div",{key:"e2bdf93193821b73ab85c98bbaeb20a9ddffd4a7",class:"lottery-tipping-ticket-history",ref:t=>this.stylingContainer=t},o("div",{key:"795fb954de08c6c3d125ef386906c10ebb9df5dc",class:"ticket-history-title"},Bh("ticketsHistory",this.language)),o("div",{key:"a73aca010e47e8f29f7df93fe0240fa772e717f1",class:"filter-wrap"},o("div",{key:"49d6f18bb302811d4616a7d1e9cbc3155abbd71c",class:"filter-status"},this.statusOptions.map((t=>o("div",{class:"filter-status-btn"+(this.activeStatus==t.value?" active":""),onClick:()=>this.changeStatus(t.value)},t.label)))),o("div",{key:"9d17d4e3f67cd68fe1dc6c748c682d3ebd7673d4",class:"filter-operation"},o("lottery-tipping-filter",{key:"1403ac73aa834f0f8ad8428923887e331470184f","quick-filters-active":this.quickFiltersActive,language:this.language,"translation-url":this.translationUrl}))),this.isLoading&&o("div",{key:"af70782819d38af17770e0b28ef13da5a1ad5096",class:"loading-wrap"},o("section",{key:"9f384d693af08125c321dc08c42cd2d32dd44fb1",class:"dots-container"},o("div",{key:"82e89a8645383c6f537d7ad0906642fdb3a78cb6",class:"dot"}),o("div",{key:"574610642a60089eef6ccd6f26a1e18ed856bee3",class:"dot"}),o("div",{key:"e90eff2b5330571da92fe14ec0afeaa3256730c3",class:"dot"}),o("div",{key:"9c9579c96c98af756fc9d0125039337b069cabc9",class:"dot"}),o("div",{key:"a5d651350e459b867ce0f3125bffb3ae13e99415",class:"dot"}))),!this.isLoading&&this.paginationInfo.total>0&&o("div",{key:"62ca1b0fa1f5a6538d3bfecbceeb675e9da83ff0",class:"ticket-list-wrap"},this.ticketHistory.map((t=>o("lottery-tipping-panel",{"header-title":ut(new Date(t.createdAt),"dd/MM/yyyy HH:mm:ss")+" "+t.state},o("div",{class:"panel-content",slot:"content"},o("div",{class:"ticket-info"},o("div",{class:"ticket-info-item"},o("div",{class:"ticket-info-label"},Bh("ticketId",this.language)),o("div",{class:"ticket-info-val"},t.id," ")),o("div",{class:"ticket-info-item"},o("div",{class:"ticket-info-label"},Bh("ticketType",this.language)),o("div",{class:"ticket-info-val"},this.ticketTypeMap[t.wagerType]," ")),o("div",{class:"ticket-info-item"},o("div",{class:"ticket-info-label"},Bh("ticketAmount",this.language)),o("div",{class:"ticket-info-val"},`${t.amount} ${t.currency}`)),o("div",{class:"ticket-info-item"},o("div",{class:"ticket-info-label"},Bh("lineDetail",this.language)),o("div",{class:"ticket-info-val"},o("span",{class:"show-detail-link",onClick:()=>this.handleShowTicketLineDetial(t)},Bh("seeDetails",this.language)))),o("div",{class:"ticket-info-item"},o("div",{class:"ticket-info-label"},Bh("numberOfDraw",this.language)),o("div",{class:"ticket-info-val"},t.drawCount))),"Settled"==t.state&&t.drawResults.map((t=>o("div",{class:"draw-info-container"},t.tempDrawData?o("div",{class:"draw-info"},o("div",{class:"draw-info-item"},o("div",{class:"draw-info-label"},Bh("ticketResult",this.language)),o("div",{class:"draw-info-val"},this.resultMap[t.state])),o("div",{class:"draw-info-item"},o("div",{class:"draw-info-label"},Bh("drawId",this.language)),o("div",{class:"draw-info-val"},t.drawId)),o("div",{class:"draw-info-item"},o("div",{class:"draw-info-label"},Bh("drawDate",this.language)),o("div",{class:"draw-info-val"},ut(new Date(t.tempDrawData.date),"dd/MM/yyyy"))),o("div",{class:"draw-info-item"},o("div",{class:"draw-info-label"},Bh("result",this.language)),o("div",{class:"draw-info-val"},o("span",{class:"show-detail-link",onClick:()=>this.handleShowCurrentDraw(t.tempDrawData)},Bh("seeDetails",this.language)))),t.state===Ac.WON&&o("div",{class:"draw-info-item"},o("div",{class:"draw-info-label"},Bh("prize",this.language)),o("div",{class:"draw-info-val1"},o("div",{style:{height:"20px"}}),t.prizeDetails.map((t=>o("span",null,o("div",null,o("span",{style:{color:"rgb(85, 85, 85)"}},t.prizeName,t.times>1?" x "+t.times:"",":"," "),o("span",{style:{"margin-right":"4px",color:"rgb(85, 85, 85)"}},function(t){if(0===t)return"0";if(!t)return"";const e=(t=t.toString()).split(".");return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),e.join(".")}(t.amount)),o("span",{style:{color:"rgb(85, 85, 85)"}},t.currency)))))))):o("div",{class:"draw-info-skeleton"},[...Array(5)].map((()=>o("div",{class:"skeleton-line"})))))))))))),!this.isLoading&&0===this.paginationInfo.total&&o("div",{key:"f4e82cafb79a5766b2bca251c1171905fdbefe02",class:"empty-wrap"},Bh("noData",this.language)),o("lottery-tipping-dialog",{key:"89ff90664a6ae0cfdd739c202010602c1b037062",visible:this.showCurrentTicketLine,width:Uh(window.navigator.userAgent)?void 0:"720px",fullscreen:Uh(window.navigator.userAgent),closable:!0,showFooter:!1,onCancel:()=>{this.showCurrentTicketLine=!1},language:this.language,"translation-url":this.translationUrl},this.curSelection&&this.curSelection.length&&this.showCurrentTicketLine&&o("div",{key:"5345d592ac9f0130f971cfacb58ca8ddebae4399"},o("div",{key:"3d3b4011822202dd2f4c23483226e329333710cd",class:"betting-type"},o("div",{key:"c04048d3a580a8b36de76a3bf1ec7ad40edaf91b",class:"betting-type-title"},Bh("bettingType",this.language)),o("div",{key:"1614ff0010fc627e36da87361b7a8cd1e17f251e",class:"betting-type-text"},this.getBettingTypeName(this.getBettingType(this.curTicketItem.selection[this.curSelectionIdx].betType)))),o("lottery-tipping-ticket-bet",{key:"b5747189176752774d02e0dd74e795d445b6246a",endpoint:this.endpoint,"session-id":this.sessionId,"game-id":this.curTicketItem.vendorGameId,"draw-id":this.curTicketItem.startingDrawId,"default-bullet-config-line-group":JSON.stringify(this.curSelection),"read-pretty":!0,"total-pages":this.curSelection.length,language:this.language,"translation-url":this.translationUrl}))),o("lottery-tipping-dialog",{key:"94c1c58c2443895e1e5205fc3301a89a9b064e4f",visible:this.showCurrentDrawResult,width:Uh(window.navigator.userAgent)?void 0:"720px",fullscreen:Uh(window.navigator.userAgent),closable:!0,showFooter:!1,onCancel:()=>{this.showCurrentDrawResult=!1},language:this.language,"translation-url":this.translationUrl},this.curDrawSelection&&this.curDrawSelection.length&&this.showCurrentDrawResult&&o("div",{key:"000d5fda83c1d4496428fc5570576c1a33d16366"},o("div",{key:"896d3e013f27f8971ee4220f0d3853e696f69c4c",class:"betting-type"},o("div",{key:"ea6eae9c86f6cbfbaf2644a17bf009a78b50bdae",class:"betting-type-title"},Bh("bettingType",this.language)),o("div",{key:"fa22c6c07946f12d6a52d498dbc5339b1e4eb795",class:"betting-type-text"},o("div",{key:"cc6199976821e84b112b5091fa617b40e09a62dc",class:"LotteryTippingTicketController__segmented-control"},Object.keys(this.curDrawSelectionMap).map((t=>o("button",{class:{LotteryTippingTicketController__segment:!0,"LotteryTippingTicketController__segment--active":this.curDrawSelectionBettingType===t},onClick:()=>this.handleDrawBettingTypeChange(t)},this.getBettingTypeName(t))))))),o("lottery-tipping-ticket-bet",{key:"82873092dfa36aa666aebbf90330af309be60df6",endpoint:this.endpoint,"session-id":this.sessionId,"game-id":this.curDrawItem.vendorGameId,"draw-id":this.curDrawItem.id,"default-bullet-config-line-group":JSON.stringify(this.curDrawSelection),"read-pretty":!0,"total-pages":this.curDrawSelection.length,language:this.language,"translation-url":this.translationUrl}))),o("div",{key:"2a4e1557bb2644e9c41820d77fa77fb53212c263",class:"pagination-wrap"},o("lottery-tipping-pagination",{key:"515ad839d8104fe3ecdb50ba6d6b915fd6842781",total:this.paginationInfo.total,current:this.paginationInfo.current,"page-size":this.paginationInfo.pageSize,language:this.language,"translation-url":this.translationUrl})))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],gameId:["handleGameInfoChange"],endpoint:["handleGameInfoChange"],playerId:["handleTicketInfoChange"],sessionId:["handleTicketInfoChange"]}}};zc.style="@keyframes skeleton-loading{0%{background-position:200% 0}100%{background-position:-200% 0}}.lottery-tipping-ticket-history{padding:12px}.lottery-tipping-ticket-history .ticket-history-title{margin:20px 0;text-align:center;font-size:20px;font-weight:700;color:var(--emw--color-typography, #000)}.lottery-tipping-ticket-history .ticket-info{display:flex;flex-direction:column;gap:12px}.lottery-tipping-ticket-history .ticket-info-item{display:flex;align-items:center;user-select:none}.lottery-tipping-ticket-history .ticket-info-label{margin-right:12px;color:var(--emw--color-typography, #000)}.lottery-tipping-ticket-history .ticket-info-val{color:var(--emw--color-typography-secondary, #555)}.lottery-tipping-ticket-history .ticket-list-wrap{display:flex;flex-direction:column;gap:12px}.lottery-tipping-ticket-history .draw-info-skeleton{width:30%;min-width:300px;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));border-radius:5px;display:flex;flex-direction:column;gap:10px;padding:10px}.lottery-tipping-ticket-history .skeleton-line{height:16px;border-radius:4px;background:linear-gradient(90deg, var(--emw--color-gray-100, #e6e6e6) 25%, var(--emw--color-gray-50, #f5f5f5) 50%, var(--emw--color-gray-100, #e6e6e6) 75%);background-size:200% 100%;animation:skeleton-loading 1.2s infinite}.lottery-tipping-ticket-history .draw-info{width:30%;min-width:300px;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));border-radius:5px;padding:12px;margin-top:20px;display:flex;flex-direction:column;gap:8px;user-select:none}.lottery-tipping-ticket-history .draw-info-item{display:flex}.lottery-tipping-ticket-history .draw-info-label{margin-right:6px;color:var(--emw--color-typography, #000)}.lottery-tipping-ticket-history .draw-info-val{color:var(--emw--color-typography-secondary, #555)}.lottery-tipping-ticket-history .show-detail-link{color:var(--emw-pool-game-acition-normal, #4a90e2);text-decoration:underline;cursor:pointer}.lottery-tipping-ticket-history .filter-wrap{margin-bottom:20px;display:flex;justify-content:space-between;align-items:center}.lottery-tipping-ticket-history .filter-wrap .filter-status{display:flex;gap:12px;align-items:center}.lottery-tipping-ticket-history .filter-wrap .filter-status-btn{background:var(--emw--color-background, #fff);border:2px solid var(--emw--color-primary, #fed275);border-radius:4px;padding:10px 8px;font-size:12px;text-transform:uppercase;color:var(--emw--color-typography, #000);cursor:pointer;transition:all 0.2s linear}.lottery-tipping-ticket-history .filter-wrap .filter-status-btn:hover{background-color:var(--emw--color-secondary, #fff3b9)}.lottery-tipping-ticket-history .filter-wrap .filter-status-btn.active{background:var(--emw--color-secondary, #fff3b9);color:var(--emw--color-typography, #000);border:2px solid var(--emw--color-typography, #000)}.lottery-tipping-ticket-history .pagination-wrap{margin-top:20px;display:flex;justify-content:flex-end}@media screen and (min-width: 1200px){.lottery-tipping-ticket-history{padding:24px;width:60%;margin:0 auto}}@media screen and (max-width: 480px){.lottery-tipping-ticket-history{padding:2px}.lottery-tipping-ticket-history .filter-wrap .filter-status{gap:4px}}.loading-wrap{margin:20px 0;display:flex;align-items:center;justify-content:center;min-height:40vh}.loading-wrap .dots-container{display:flex;align-items:center;justify-content:center;height:100%;width:100%}.loading-wrap .dot{height:14px;width:14px;margin-right:14px;border-radius:14px;background-color:var(--emw-pool-game-ticket-history-loading-normal, #b3d4fc);animation:pulse 1.5s infinite ease-in-out}.loading-wrap .dot:last-child{margin-right:0}.loading-wrap .dot:nth-child(1){animation-delay:-0.3s}.loading-wrap .dot:nth-child(2){animation-delay:-0.1s}.loading-wrap .dot:nth-child(3){animation-delay:0.1s}@keyframes pulse{0%{transform:scale(0.8);background-color:var(--emw-pool-game-ticket-history-loading-normal, #b3d4fc);box-shadow:0 0 0 0 var(--emw-pool-game-ticket-history-loading-box-shadow-normal, rgba(178, 212, 252, 0.7))}50%{transform:scale(1.2);background-color:var(--emw-pool-game-ticket-history-loading-active, #6793fb);box-shadow:0 0 0 10px var(--emw-pool-game-ticket-history-loading-box-shadow-active, rgba(178, 212, 252, 0))}100%{transform:scale(0.8);background-color:var(--emw-pool-game-ticket-history-loading-normal, #b3d4fc);box-shadow:0 0 0 0 rgba(178, 212, 252, 0.7)}}.empty-wrap{margin:20px 0;display:flex;align-items:center;justify-content:center;min-height:40vh;color:var(--emw--color-typography, #000)}.betting-type{margin-bottom:16px;display:flex;align-items:center;gap:20px}.betting-type-title{font-weight:600;font-size:16px}.betting-type-text{font-size:16px}.LotteryTippingTicketController__label{font-weight:500;white-space:nowrap;width:6rem;color:var(--emw--color-typography-secondary, #333)}.LotteryTippingTicketController__segmented-control{height:2.2rem;display:inline-flex;background-color:var(--emw--color-background-secondary, #f5f5f5);border-radius:2rem;padding:0.2rem}.LotteryTippingTicketController__segment{background-color:transparent;border:none;padding:0.3rem 0.8rem;cursor:pointer;font-weight:500;border-radius:2rem;outline:none;transition:background-color 0.25s ease, color 0.25s ease;white-space:nowrap;color:var(--emw--color-typography, #000)}.LotteryTippingTicketController__segment--active{background-color:var(--emw--color-background, #fff);color:var(--emw--color-typography, #000);font-weight:600}.LotteryTippingTicketController__segment:not(.LotteryTippingTicketController__segment--active):hover{background-color:var(--emw--color-background-tertiary, #ccc)}";export{l as general_multi_select,h as general_tooltip,u as lottery_button,p as lottery_tipping_bullet,m as lottery_tipping_bullet_group,b as lottery_tipping_dialog,jh as lottery_tipping_filter,Hh as lottery_tipping_pagination,Xh as lottery_tipping_panel,dc as lottery_tipping_ticket_banner,_c as lottery_tipping_ticket_bet,Tc as lottery_tipping_ticket_controller,zc as lottery_tipping_ticket_history}
|