@everymatrix/lottery-tipping-entrance 1.87.32 → 1.87.33
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.
- package/dist/cjs/draw-selection_19.cjs.entry.js +44 -39
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/lottery-tipping-entrance.cjs.js +1 -1
- package/dist/esm/draw-selection_19.entry.js +44 -39
- package/dist/esm/loader.js +1 -1
- package/dist/esm/lottery-tipping-entrance.js +1 -1
- package/dist/lottery-tipping-entrance/draw-selection_19.entry.js +2 -2
- package/dist/lottery-tipping-entrance/lottery-tipping-entrance.esm.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,g as n,a as r,H as a}from"./index-c22bb7d4.js";import{r as o,t as s,a as l,s as d,b as c,c as h,f as p,d as g,i as f,g as u,p as m,e as b}from"./lottery-tipping-entrance-565275ea.js";export{L as lottery_tipping_entrance}from"./lottery-tipping-entrance-565275ea.js";function y(t,e){o(2,arguments);var i=s(t),n=l(e);return isNaN(n)?new Date(NaN):n?(i.setDate(i.getDate()+n),i):i}function v(t){o(1,arguments);var e=s(t);return e.setHours(0,0,0,0),e}function w(t,e){return o(2,arguments),s(t).getTime()-s(e).getTime()}var x={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},k="trunc";const T=class{constructor(i){t(this,i),this.onSelectDraw=e(this,"selectDraw",7),this.handleSelectDraw=()=>{this.onSelectDraw.emit()},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.language="en",this.infoImageUrl="",this.date="",this.isLoading=!1,this.turnover=""}handleClientStylingChange(t,e){t!=e&&d(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&c(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&d(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&c(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}formattedDay(t){let e=p({date:t,format:"EEEE"});return"wednesday"===e.toLowerCase()?"MIDWEEK":e.toUpperCase()}renderCurvedText(){const t=g("howToWin",this.language);return f(window.navigator.userAgent)?i("svg",{width:"320",height:"140",xmlns:"http://www.w3.org/2000/svg"},i("defs",null,i("path",{id:"curve",d:"M 30 80 A 100 30 0 0 1 300 80"})),i("text",{"font-family":"Comic Sans MS","font-size":"40",fill:"black","stroke-width":"2"},i("textPath",{href:"#curve"},t))):i("svg",{width:"500",height:"140",xmlns:"http://www.w3.org/2000/svg"},i("defs",null,i("path",{id:"curve",d:"M 40 110 A 120 20 0 0 1 450 110"})),i("text",{"font-family":"Comic Sans MS","font-size":"58",fill:"black","stroke-width":"2"},i("textPath",{href:"#curve"},t)))}get draw3DaysLater(){return y(new Date(this.date),3).toISOString()}get draw4DaysLater(){return y(new Date(this.date),4).toISOString()}renderBackground(){return i("div",{class:"draw-page__background"},i("div",{class:"top-waves"},i("svg",{class:"wave-svg",viewBox:"0 0 100 8",xmlns:"http://www.w3.org/2000/svg"},i("path",{d:"M0 4 Q25 0 50 4 T100 4",stroke:"rgba(255,255,255,0.7)","stroke-width":"3",fill:"none","stroke-linecap":"round"})),i("svg",{class:"wave-svg",viewBox:"0 0 100 8",xmlns:"http://www.w3.org/2000/svg"},i("path",{d:"M0 4 Q25 0 50 4 T100 4",stroke:"rgba(255,255,255,0.7)","stroke-width":"3",fill:"none","stroke-linecap":"round"})),i("svg",{class:"wave-svg",viewBox:"0 0 100 8",xmlns:"http://www.w3.org/2000/svg"},i("path",{d:"M0 4 Q25 0 50 4 T100 4",stroke:"rgba(255,255,255,0.7)","stroke-width":"3",fill:"none","stroke-linecap":"round"}))),i("div",{class:"dots-cluster"},new Array(27).fill(0).map((()=>i("div",{class:"dot"})))))}render(){return i("div",{key:"a14f3d9e82f3f1fb75e592043dff00f4948006b8",class:"draw-page",ref:t=>this.stylingContainer=t},this.renderBackground(),this.date?i("div",{class:"draw-info"},i("div",{class:"draw-info-title"},i("div",{class:"draw-info-title-main"},this.renderCurvedText()),i("div",{class:"draw-info-title-sub"},g("selectDraws",this.language))),i("div",{class:"draw-info-item-list"},i("div",{class:"draw-info-item",onClick:this.handleSelectDraw.bind(this)},i("div",{class:"draw-info-item-day"},this.formattedDay(this.date)),i("div",{class:"draw-info-item-date"},u(this.date)),i("div",{class:"draw-info-item-date"}," ",g("turnover",this.language)+this.turnover),i("div",{class:"draw-info-item-projecter"})),i("div",{class:"draw-info-item"},i("div",{class:"draw-info-item-day reverse"},this.formattedDay(this.draw3DaysLater)),i("div",{class:"draw-info-item-date"},u(this.draw3DaysLater)),i("div",{class:"draw-info-item-date"}," ",g("turnover",this.language)+"€0"),i("div",{class:"draw-info-item-projecter"})),i("div",{class:"draw-info-item"},i("div",{class:"draw-info-item-day"},this.formattedDay(this.draw4DaysLater)),i("div",{class:"draw-info-item-date"},u(this.draw4DaysLater)),i("div",{class:"draw-info-item-date"}," ",g("turnover",this.language)+"€0"),i("div",{class:"draw-info-item-projecter"}))),i("div",{class:"draw-info-footer"},i("div",{class:"draw-info-footer-text"},"BONUSPOTTER"),i("div",{class:"draw-info-footer-text"},"MIDWEEK FULL-TIME APPROX. €2.1 MILLION."),i("div",{class:"draw-info-footer-text"},"MIDWEEK HALF_TIME APPROX. €1 40.000."))):this.isLoading?i("div",{class:"loading-indicator"},"loading..."):i("div",{class:"empty-draw-wrap"},i("div",{class:"empty-draw"},i("div",{class:"empty-draw-logo",innerHTML:'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg height="1024" node-id="1" sillyvg="true" template-height="1024" template-width="1024" version="1.1" viewBox="0 0 1024 1024" width="1024" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs node-id="52"></defs><g node-id="165"><g node-id="176"><path d="M 715.70 689.10 L 724.50 691.70 L 724.10 693.20 L 715.20 690.50 L 715.70 689.10 Z M 733.50 693.80 L 742.60 695.40 L 742.40 696.90 L 733.20 695.30 L 733.50 693.80 Z M 751.70 696.50 L 760.90 697.00 L 760.90 698.60 L 751.60 698.10 L 751.70 696.50 Z M 901.10 462.70 L 902.50 461.90 L 906.90 470.10 L 905.50 470.80 L 901.10 462.70 Z M 770.10 697.00 L 779.30 696.40 L 779.40 698.00 L 770.10 698.60 L 770.10 697.00 Z M 909.30 479.20 L 910.70 478.60 L 914.10 487.30 L 912.60 487.80 L 909.30 479.20 Z M 788.40 695.30 L 797.50 693.70 L 797.80 695.20 L 788.60 696.80 L 788.40 695.30 Z M 915.50 496.50 L 917.00 496.10 L 918.30 500.60 L 919.30 505.10 L 917.80 505.40 L 915.50 496.50 Z M 806.40 691.50 L 815.20 688.80 L 815.70 690.30 L 806.80 693.00 L 806.40 691.50 Z M 919.60 514.50 L 921.10 514.20 L 922.40 523.40 L 920.80 523.60 L 919.60 514.50 Z M 823.90 685.60 L 832.30 681.90 L 833.00 683.30 L 824.50 687.00 L 823.90 685.60 Z M 921.50 532.80 L 923.10 532.70 L 923.30 542.00 L 921.70 542.00 L 921.50 532.80 Z M 840.50 677.70 L 848.40 673.00 L 849.20 674.30 L 841.20 679.00 L 840.50 677.70 Z M 921.30 551.20 L 922.90 551.30 L 922.00 560.60 L 920.40 560.40 L 921.30 551.20 Z M 856.10 667.90 L 863.40 662.30 L 864.40 663.50 L 857.00 669.10 L 856.10 667.90 Z M 919.00 569.50 L 920.50 569.80 L 918.50 578.90 L 917.00 578.50 L 919.00 569.50 Z M 870.40 656.30 L 877.00 649.90 L 878.10 651.00 L 871.40 657.50 L 870.40 656.30 Z M 914.60 587.30 L 916.10 587.80 L 913.10 596.60 L 911.60 596.00 L 914.60 587.30 Z M 883.30 643.20 L 889.10 636.10 L 890.30 637.10 L 884.40 644.30 L 883.30 643.20 Z M 908.00 604.50 L 909.40 605.10 L 905.40 613.50 L 904.00 612.80 L 908.00 604.50 Z M 894.60 628.60 L 899.60 620.80 L 900.90 621.60 L 895.90 629.40 L 894.60 628.60 Z" fill="#777f99" fill-rule="nonzero" group-id="1,12" node-id="60" stroke="none" target-height="236.69998" target-width="208.09998" target-x="715.2" target-y="461.9"></path></g><path d="M 702.70 684.10 L 707.00 685.90 L 706.40 687.40 L 702.00 685.60 L 702.70 684.10 Z" fill="#777f99" fill-rule="nonzero" group-id="1,13" node-id="65" stroke="none" target-height="3.3000488" target-width="5" target-x="702" target-y="684.1"></path></g><g node-id="166"><g node-id="178"><path d="M 198.90 515.60 L 196.00 511.80 L 197.30 510.90 L 200.10 514.60 L 198.90 515.60 Z" fill="#777f99" fill-rule="nonzero" group-id="2,14" node-id="73" stroke="none" target-height="4.6999817" target-width="4.100006" target-x="196" target-y="510.9"></path></g><g node-id="179"><path d="M 190.90 503.80 L 186.80 495.20 L 188.30 494.60 L 192.30 503.00 L 190.90 503.80 Z M 183.90 486.20 L 182.10 476.90 L 183.60 476.70 L 185.40 485.80 L 183.90 486.20 Z M 181.30 467.50 L 181.80 458.00 L 183.40 458.20 L 182.90 467.50 L 181.30 467.50 Z M 183.40 448.70 L 186.20 439.60 L 187.70 440.10 L 185.00 449.00 L 183.40 448.70 Z M 190.00 430.90 L 194.90 422.70 L 196.20 423.60 L 191.40 431.60 L 190.00 430.90 Z M 202.00 416.40 L 200.80 415.40 L 207.50 408.70 L 208.50 409.90 L 202.00 416.40 Z M 215.90 404.10 L 215.00 402.80 L 219.00 400.20 L 223.10 397.90 L 223.80 399.30 L 215.90 404.10 Z M 232.40 395.60 L 231.90 394.10 L 236.40 392.60 L 241.00 391.40 L 241.40 392.90 L 232.40 395.60 Z M 250.40 391.40 L 250.20 389.80 L 254.90 389.50 L 259.70 389.40 L 259.70 391.00 L 250.40 391.40 Z M 269.00 391.70 L 269.20 390.20 L 273.80 391.00 L 278.50 392.10 L 278.10 393.60 L 269.00 391.70 Z" fill="#777f99" fill-rule="nonzero" group-id="2,15" node-id="78" stroke="none" target-height="114.399994" target-width="97.2" target-x="181.3" target-y="389.4"></path></g><path d="M 286.90 396.50 L 287.50 395.10 L 291.80 397.00 L 291.10 398.40 L 286.90 396.50 Z" fill="#777f99" fill-rule="nonzero" group-id="2,16" node-id="83" stroke="none" target-height="3.2999878" target-width="4.899994" target-x="286.9" target-y="395.1"></path></g><g node-id="167"><path d="M 308.80 594.00 L 679.00 594.00 L 685.10 593.20 L 688.00 592.20 L 693.30 589.20 L 695.70 587.10 L 697.70 584.80 L 700.80 579.50 L 702.40 573.50 L 702.60 570.40 L 702.60 422.00 L 702.30 411.60 L 701.60 401.40 L 700.40 391.30 L 698.70 381.50 L 696.50 371.80 L 693.90 362.20 L 690.90 352.80 L 687.40 343.70 L 683.50 334.80 L 679.30 326.00 L 674.60 317.50 L 669.50 309.30 L 664.10 301.30 L 658.40 293.60 L 652.30 286.10 L 645.80 279.00 L 639.10 272.10 L 632.00 265.60 L 624.70 259.40 L 617.00 253.50 L 609.10 248.00 L 601.00 242.90 L 592.50 238.10 L 583.90 233.70 L 574.90 229.70 L 565.90 226.10 L 556.60 223.00 L 547.10 220.20 L 537.40 218.00 L 527.50 216.10 L 528.80 211.90 L 529.60 207.60 L 529.90 203.20 L 529.60 198.40 L 528.70 193.90 L 527.20 189.50 L 525.10 185.30 L 522.60 181.50 L 519.60 178.00 L 516.10 174.90 L 512.30 172.30 L 508.00 170.10 L 503.50 168.50 L 498.90 167.60 L 494.30 167.30 L 489.60 167.50 L 485.10 168.30 L 480.70 169.70 L 476.50 171.70 L 472.60 174.20 L 468.90 177.30 L 465.70 180.90 L 463.00 184.70 L 460.90 188.80 L 459.30 193.20 L 458.30 197.60 L 457.90 202.30 L 458.10 206.90 L 458.90 211.50 L 460.30 216.10 L 450.40 218.00 L 440.70 220.30 L 431.20 223.00 L 421.90 226.20 L 412.90 229.70 L 403.90 233.80 L 395.30 238.20 L 386.80 242.90 L 378.70 248.10 L 370.80 253.60 L 363.10 259.50 L 355.80 265.70 L 348.70 272.20 L 342.00 279.00 L 335.50 286.20 L 329.40 293.70 L 323.60 301.40 L 318.30 309.30 L 313.20 317.60 L 308.50 326.10 L 304.30 334.80 L 300.40 343.70 L 296.90 352.90 L 293.90 362.20 L 291.30 371.90 L 289.10 381.50 L 287.40 391.40 L 286.20 401.40 L 285.50 411.60 L 285.20 422.00 L 285.20 570.40 L 285.40 573.60 L 286.00 576.70 L 287.10 579.60 L 288.40 582.30 L 292.10 587.10 L 296.90 590.80 L 299.60 592.10 L 302.50 593.20 L 305.60 593.80 L 308.80 594.00 Z" fill="#bad6f7" fill-rule="nonzero" group-id="3" node-id="89" stroke="none" target-height="426.7" target-width="417.39996" target-x="285.2" target-y="167.3"></path></g><g node-id="168"><path d="M 493.80 798.40 L 503.30 797.60 L 512.20 795.40 L 517.80 793.20 L 523.20 790.40 L 528.20 787.20 L 532.80 783.40 L 537.00 779.20 L 540.80 774.60 L 544.00 769.60 L 546.80 764.20 L 549.00 758.60 L 550.30 754.20 L 551.80 745.00 L 552.00 740.20 L 435.60 740.20 L 435.80 745.30 L 436.50 750.30 L 437.60 755.30 L 439.10 760.10 L 441.00 764.80 L 443.30 769.30 L 446.10 773.50 L 449.10 777.60 L 452.60 781.40 L 456.40 784.90 L 460.40 788.00 L 464.70 790.70 L 469.20 793.00 L 473.90 794.90 L 478.70 796.40 L 483.60 797.50 L 488.70 798.20 L 493.80 798.40 Z" fill="#3a3a77" fill-rule="nonzero" group-id="4" node-id="94" stroke="none" target-height="58.200012" target-width="116.399994" target-x="435.6" target-y="740.2"></path></g><path d="M 782.90 675.10 L 770.80 651.00 L 767.90 645.70 L 764.50 640.80 L 760.60 636.00 L 756.30 631.60 L 751.80 627.60 L 747.10 624.00 L 742.00 620.80 L 737.00 618.20 L 731.90 616.10 L 726.70 614.50 L 721.70 613.50 L 716.80 613.20 L 270.90 613.20 L 266.00 613.50 L 261.00 614.50 L 255.80 616.10 L 250.70 618.20 L 245.70 620.80 L 240.60 624.00 L 235.90 627.60 L 231.40 631.60 L 227.10 636.00 L 223.20 640.70 L 219.80 645.70 L 216.90 651.00 L 204.80 675.10 L 202.60 680.00 L 200.90 684.70 L 199.80 689.10 L 199.10 693.30 L 198.80 697.60 L 199.00 701.60 L 199.60 705.20 L 200.60 708.50 L 202.10 711.70 L 203.90 714.50 L 206.20 716.90 L 208.90 719.00 L 211.90 720.60 L 215.30 721.80 L 219.10 722.60 L 223.60 722.90 L 764.20 722.90 L 768.60 722.60 L 772.50 721.80 L 775.90 720.60 L 778.80 719.00 L 781.50 716.90 L 783.80 714.40 L 785.70 711.70 L 787.20 708.50 L 788.20 705.20 L 788.80 701.50 L 789.00 697.60 L 788.70 693.30 L 788.00 689.10 L 786.80 684.70 L 785.10 680.00 L 782.90 675.10 Z" fill="#bad6f7" fill-rule="nonzero" node-id="97" stroke="none" target-height="109.70001" target-width="590.2" target-x="198.8" target-y="613.2"></path><path d="M 499.30 798.20 L 504.90 797.40 L 510.20 796.10 L 515.30 794.40 L 520.20 792.20 L 524.80 789.50 L 529.20 786.50 L 533.20 783.20 L 536.90 779.40 L 540.30 775.40 L 543.30 771.10 L 545.90 766.50 L 548.10 761.60 L 549.80 756.50 L 551.00 751.30 L 551.80 745.90 L 552.10 740.20 L 499.30 740.20 L 499.30 798.20 Z" fill="#3a3a77" fill-rule="nonzero" node-id="99" stroke="none" target-height="58" target-width="52.799988" target-x="499.3" target-y="740.2"></path><g node-id="169"><path d="M 770.80 650.90 L 767.90 645.60 L 764.50 640.70 L 760.60 635.90 L 756.30 631.50 L 751.80 627.50 L 747.10 623.90 L 742.00 620.70 L 737.00 618.10 L 731.90 616.00 L 726.70 614.40 L 721.70 613.40 L 716.80 613.10 L 499.30 613.10 L 499.30 722.80 L 764.20 722.80 L 768.70 722.50 L 772.50 721.70 L 775.90 720.50 L 778.90 718.90 L 781.60 716.80 L 783.90 714.40 L 785.70 711.60 L 787.20 708.50 L 788.20 705.10 L 788.80 701.50 L 789.00 697.60 L 788.70 693.20 L 788.00 689.00 L 786.90 684.60 L 785.20 680.00 L 783.00 675.00 L 770.80 650.90 Z" fill="#cedfff" fill-rule="nonzero" group-id="5" node-id="103" stroke="none" target-height="109.70001" target-width="289.7" target-x="499.3" target-y="613.1"></path></g><path d="M 729.60 182.10 L 765.70 216.40 L 694.00 242.10 L 729.60 182.10 Z" fill="#d3dcf4" fill-rule="nonzero" node-id="106" stroke="none" target-height="60" target-width="71.70001" target-x="694" target-y="182.1"></path><path d="M 704.20 261.10 L 808.40 236.60 L 808.40 288.70 L 704.20 261.10 Z" fill="#d3dcf4" fill-rule="nonzero" node-id="108" stroke="none" target-height="52.100006" target-width="104.20001" target-x="704.2" target-y="236.6"></path><path d="M 916.20 528.70 L 881.90 501.00 L 746.80 491.40 L 743.30 490.90 L 740.00 490.00 L 736.90 488.70 L 734.10 487.00 L 731.50 484.90 L 729.20 482.60 L 727.20 480.00 L 725.60 477.10 L 724.30 474.00 L 723.40 470.80 L 723.00 467.40 L 723.00 463.90 L 726.90 408.90 L 727.40 405.40 L 728.30 402.10 L 729.60 399.10 L 731.30 396.20 L 733.40 393.60 L 735.70 391.30 L 738.30 389.30 L 741.20 387.70 L 744.30 386.40 L 747.50 385.50 L 750.90 385.10 L 754.40 385.10 L 901.10 395.60 L 904.60 396.10 L 907.90 397.00 L 911.00 398.40 L 913.80 400.10 L 916.40 402.10 L 918.70 404.40 L 920.70 407.10 L 922.30 409.90 L 923.60 413.00 L 924.50 416.20 L 924.90 419.60 L 924.90 423.10 L 921.00 478.10 L 916.20 528.70 Z" fill="#4c96ec" fill-rule="nonzero" node-id="110" stroke="none" target-height="143.6" target-width="201.90002" target-x="723" target-y="385.1"></path><path d="M 796.50 440.10 L 796.20 443.70 L 795.30 446.90 L 793.80 450.00 L 791.90 452.70 L 789.50 455.10 L 786.80 457.00 L 783.70 458.50 L 780.50 459.40 L 776.90 459.70 L 773.30 459.40 L 770.10 458.50 L 767.00 457.00 L 764.30 455.10 L 761.90 452.70 L 760.00 450.00 L 758.50 446.90 L 757.60 443.70 L 757.30 440.10 L 757.60 436.50 L 758.50 433.30 L 760.00 430.20 L 761.90 427.50 L 764.30 425.10 L 767.00 423.20 L 770.10 421.70 L 773.30 420.80 L 776.90 420.50 L 780.50 420.80 L 783.70 421.70 L 786.80 423.20 L 789.50 425.10 L 791.90 427.50 L 793.80 430.20 L 795.30 433.30 L 796.20 436.50 L 796.50 440.10 Z" fill="#fe9f39" fill-rule="nonzero" node-id="112" stroke="none" target-height="39.200012" target-width="39.200012" target-x="757.3" target-y="420.5"></path><path d="M 823.30 435.40 L 883.20 439.70 L 886.20 440.50 L 888.60 442.10 L 890.30 444.50 L 891.10 447.40 L 891.10 449.00 L 890.30 452.00 L 888.70 454.40 L 886.30 456.10 L 883.40 456.90 L 820.30 452.30 L 817.60 451.10 L 815.60 449.10 L 814.30 446.40 L 814.00 443.30 L 814.80 440.30 L 816.40 437.90 L 818.80 436.20 L 821.70 435.40 Z" fill="#ebf0ff" fill-rule="nonzero" node-id="114" stroke="none" target-height="21.5" target-width="77.099976" target-x="814" target-y="435.4"></path><g node-id="170"><path d="M 151.30 615.80 L 151.80 610.50 L 154.90 595.30 L 158.70 582.20 L 161.30 575.30 L 164.20 568.50 L 170.10 557.70 L 172.90 553.80 L 180.50 544.30 L 185.40 538.60 L 196.10 528.10 L 201.80 523.30 L 207.90 518.80 L 214.30 514.70 L 221.10 510.90 L 228.00 507.50 L 235.40 504.50 L 243.30 501.90 L 251.60 499.70 L 259.90 498.00 L 268.80 496.80 L 278.30 496.00 L 288.50 495.70 L 297.90 496.00 L 307.00 496.70 L 315.70 497.80 L 324.10 499.40 L 332.60 501.40 L 340.50 503.80 L 348.00 506.50 L 355.10 509.50 L 362.00 513.10 L 368.40 516.80 L 374.20 520.80 L 379.50 525.10 L 384.50 529.80 L 388.70 534.60 L 392.40 539.60 L 395.50 544.70 L 397.50 549.10 L 399.10 553.50 L 400.20 558.10 L 400.90 562.70 L 401.20 567.40 L 400.90 572.10 L 400.20 576.70 L 399.10 581.30 L 397.50 585.70 L 395.50 590.10 L 392.40 595.20 L 388.70 600.20 L 384.40 605.00 L 379.40 609.70 L 374.20 614.00 L 368.40 618.00 L 362.00 621.70 L 355.00 625.30 L 348.00 628.30 L 340.50 631.00 L 332.50 633.40 L 324.10 635.40 L 315.70 637.00 L 307.00 638.10 L 297.90 638.80 L 288.50 639.10 L 277.00 638.80 L 266.30 638.10 L 256.30 636.90 L 246.90 635.20 L 239.30 633.40 L 232.20 631.30 L 225.60 628.90 L 219.50 626.20 L 213.80 623.20 L 208.20 619.80 L 203.10 616.10 L 198.50 612.00 L 194.30 607.70 L 190.50 603.00 L 187.80 602.10 L 185.00 601.70 L 182.20 601.90 L 176.50 603.30 L 169.50 606.70 L 155.70 615.70 L 153.70 616.70 L 152.50 616.90 L 151.80 616.60 L 151.30 615.80 Z" fill="#e0eaff" fill-rule="nonzero" group-id="6" node-id="118" stroke="none" target-height="143.39996" target-width="249.90001" target-x="151.3" target-y="495.7"></path></g><g node-id="171"><path d="M 237.00 541.10 L 300.10 541.10 L 302.10 541.40 L 303.80 542.10 L 305.30 543.30 L 306.50 544.80 L 307.20 546.50 L 307.50 548.50 L 307.20 550.50 L 306.50 552.20 L 305.30 553.70 L 303.80 554.90 L 302.10 555.60 L 300.10 555.90 L 237.00 555.90 L 235.00 555.60 L 233.30 554.90 L 231.80 553.70 L 230.60 552.20 L 229.90 550.50 L 229.60 548.50 L 229.90 546.50 L 230.70 544.80 L 231.80 543.30 L 233.30 542.10 L 235.10 541.40 L 237.00 541.10 Z" fill="#3a3a77" fill-rule="nonzero" group-id="7" node-id="123" stroke="none" target-height="14.800049" target-width="77.899994" target-x="229.6" target-y="541.1"></path></g><g node-id="172"><path d="M 346.70 547.80 L 346.00 551.70 L 344.10 554.90 L 341.30 557.30 L 339.60 558.10 L 335.70 558.80 L 331.80 558.10 L 330.10 557.30 L 327.30 554.90 L 325.40 551.70 L 324.70 547.80 L 325.40 543.90 L 327.30 540.70 L 330.10 538.30 L 331.80 537.50 L 335.70 536.80 L 339.60 537.50 L 342.80 539.40 L 345.20 542.20 L 346.00 543.90 L 346.70 547.80 Z" fill="#fe9f39" fill-rule="nonzero" group-id="8" node-id="128" stroke="none" target-height="22" target-width="22" target-x="324.7" target-y="536.8"></path></g><g node-id="173"><path d="M 237.00 579.10 L 300.10 579.10 L 302.10 579.40 L 303.80 580.10 L 305.30 581.30 L 306.50 582.80 L 307.20 584.50 L 307.50 586.50 L 307.20 588.50 L 306.50 590.20 L 305.30 591.70 L 303.80 592.90 L 302.10 593.60 L 300.10 593.90 L 237.00 593.90 L 235.00 593.60 L 233.30 592.90 L 231.80 591.70 L 230.60 590.20 L 229.90 588.50 L 229.60 586.50 L 229.90 584.50 L 230.70 582.80 L 231.80 581.30 L 233.30 580.10 L 235.10 579.40 L 237.00 579.10 Z" fill="#3a3a77" fill-rule="nonzero" group-id="9" node-id="133" stroke="none" target-height="14.800049" target-width="77.899994" target-x="229.6" target-y="579.1"></path></g><g node-id="174"><path d="M 346.70 584.00 L 346.00 587.90 L 344.10 591.10 L 341.30 593.50 L 339.60 594.30 L 335.70 595.00 L 331.80 594.30 L 328.60 592.40 L 326.20 589.60 L 324.90 586.00 L 324.90 582.00 L 326.20 578.40 L 327.30 576.90 L 330.10 574.50 L 333.70 573.20 L 337.70 573.20 L 339.60 573.70 L 342.80 575.60 L 345.20 578.40 L 346.00 580.10 L 346.70 584.00 Z" fill="#fe9f39" fill-rule="nonzero" group-id="10" node-id="138" stroke="none" target-height="21.799988" target-width="21.800018" target-x="324.9" target-y="573.2"></path></g><path d="M 746.70 838.40 L 746.70 767.10 L 699.10 767.10 L 699.10 838.40 L 699.40 839.30 L 720.20 851.50 L 721.50 852.00 L 723.10 852.10 L 726.10 851.30 L 745.20 840.30 L 746.20 839.50 L 746.70 838.40 Z" fill="#949fff" fill-rule="nonzero" node-id="141" stroke="none" target-height="85" target-width="47.600037" target-x="699.1" target-y="767.1"></path><path d="M 720.20 780.40 L 700.10 768.80 L 699.30 768.00 L 699.10 767.10 L 699.50 766.30 L 700.50 765.40 L 719.60 754.40 L 721.10 753.80 L 724.20 753.70 L 725.50 754.10 L 745.60 765.70 L 746.40 766.50 L 746.60 767.40 L 746.20 768.20 L 745.20 769.10 L 726.10 780.10 L 723.10 780.90 L 720.20 780.40 Z" fill="#dee6ff" fill-rule="nonzero" node-id="143" stroke="none" target-height="27.200012" target-width="47.5" target-x="699.1" target-y="753.7"></path><path d="M 115.50 836.70 L 115.50 662.50 L 67.90 662.50 L 67.90 836.70 L 68.20 837.60 L 68.90 838.20 L 89.00 849.80 L 90.30 850.30 L 91.90 850.40 L 94.90 849.60 L 114.00 838.60 L 114.90 837.80 L 115.50 836.70 Z" fill="#dee1f0" fill-rule="nonzero" node-id="145" stroke="none" target-height="187.90002" target-width="47.6" target-x="67.9" target-y="662.5"></path><path d="M 89.00 675.70 L 68.90 664.10 L 68.10 663.30 L 67.90 662.40 L 68.30 661.60 L 69.30 660.70 L 88.40 649.70 L 91.40 648.90 L 94.30 649.40 L 114.40 661.00 L 115.20 661.80 L 115.40 662.70 L 115.00 663.50 L 114.00 664.40 L 94.90 675.40 L 93.50 676.00 L 91.90 676.30 L 90.30 676.20 L 89.00 675.70 Z" fill="#fafbfd" fill-rule="nonzero" node-id="147" stroke="none" target-height="27.399963" target-width="47.5" target-x="67.9" target-y="648.9"></path><g node-id="175"><g node-id="181"><path d="M 977.00 861.10 L 30.00 861.10 L 30.30 854.90 L 31.10 852.00 L 32.30 849.40 L 34.00 847.00 L 36.00 845.00 L 38.40 843.30 L 41.00 842.10 L 43.90 841.30 L 47.00 841.00 L 960.00 841.00 L 963.10 841.30 L 966.00 842.10 L 968.60 843.30 L 971.00 845.00 L 973.00 847.00 L 974.70 849.40 L 975.90 852.00 L 976.70 854.90 L 977.00 861.10 Z" fill="#b7cdeb" fill-rule="nonzero" group-id="11,17" node-id="153" stroke="none" target-height="20.099976" target-width="947" target-x="30" target-y="841"></path></g></g><path d="M 781.10 806.50 L 779.10 811.10 L 777.70 815.60 L 777.10 818.80 L 777.40 831.00 L 777.90 833.60 L 778.80 836.00 L 780.20 838.20 L 782.10 840.10 L 784.20 841.70 L 787.10 843.00 L 790.60 843.90 L 795.30 844.40 L 821.60 845.20 L 827.70 844.70 L 833.50 843.60 L 839.10 842.00 L 844.50 839.90 L 849.70 837.30 L 854.80 834.10 L 858.70 831.20 L 860.40 829.50 L 862.30 826.00 L 862.90 818.70 L 863.50 817.10 L 864.70 815.50 L 875.40 811.70 L 897.10 805.20 L 901.90 803.00 L 903.80 801.50 L 905.20 799.60 L 906.40 796.30 L 906.90 792.40 L 907.60 790.90 L 910.10 788.30 L 913.30 786.20 L 918.60 783.50 L 937.90 775.70 L 947.90 770.00 L 949.50 768.20 L 949.90 767.20 L 949.90 763.00 L 950.30 760.40 L 951.00 758.20 L 953.50 754.10 L 958.00 750.00 L 965.80 743.90 L 970.10 739.70 L 974.00 735.10 L 974.00 729.20 L 972.70 726.80 L 971.10 724.70 L 969.20 723.00 L 964.80 720.40 L 962.30 719.60 L 958.40 718.90 L 954.40 718.80 L 950.50 719.30 L 940.30 722.20 L 934.40 722.50 L 931.60 722.00 L 926.10 720.00 L 917.70 714.60 L 914.80 713.50 L 911.70 712.90 L 908.60 712.90 L 905.30 713.40 L 902.00 714.50 L 898.90 715.90 L 895.80 717.90 L 892.90 720.30 L 882.90 730.00 L 880.20 731.70 L 877.40 732.70 L 874.40 733.30 L 871.20 733.30 L 864.40 732.30 L 861.20 732.30 L 858.40 732.90 L 855.60 733.90 L 852.90 735.50 L 850.20 737.80 L 845.80 742.50 L 833.90 757.60 L 830.50 761.10 L 826.60 763.30 L 824.40 763.80 L 819.90 763.90 L 818.10 764.30 L 814.80 765.90 L 809.20 769.90 L 804.00 774.10 L 799.30 778.70 L 794.90 783.60 L 790.90 788.80 L 787.30 794.40 L 784.00 800.30 L 781.10 806.50" fill="#b1c6d9" fill-rule="nonzero" node-id="157" stroke="none" target-height="132.29999" target-width="196.90002" target-x="777.1" target-y="712.9"></path><path d="M 190.10 807.80 L 185.40 803.00 L 182.70 800.90 L 179.80 799.10 L 176.60 797.90 L 171.40 796.70 L 170.00 795.90 L 167.00 792.70 L 163.30 787.30 L 160.90 784.40 L 155.90 780.00 L 153.50 778.70 L 151.70 778.20 L 149.80 778.20 L 145.50 779.00 L 143.60 779.10 L 140.00 778.00 L 138.40 776.90 L 134.40 772.80 L 131.80 770.60 L 126.00 767.00 L 123.30 766.30 L 119.10 767.00 L 117.30 767.70 L 112.50 771.10 L 110.30 772.30 L 108.20 772.90 L 106.00 772.80 L 99.70 771.20 L 92.60 770.90 L 90.20 771.30 L 88.10 772.20 L 86.30 773.60 L 84.70 775.40 L 82.90 779.00 L 83.40 780.90 L 85.70 783.50 L 96.10 792.90 L 98.20 795.70 L 98.10 798.60 L 99.70 801.20 L 101.20 802.70 L 103.80 804.40 L 114.90 809.00 L 120.80 812.10 L 123.20 814.40 L 123.90 815.90 L 124.50 819.10 L 125.00 820.10 L 127.20 821.80 L 148.40 828.70 L 150.20 830.30 L 151.00 834.90 L 151.80 836.80 L 153.00 838.50 L 156.30 841.00 L 162.70 843.80 L 167.10 845.30 L 176.20 847.10 L 185.50 847.30 L 195.00 845.90 L 197.20 845.20 L 198.90 844.30 L 200.20 843.00 L 201.20 841.40 L 201.90 839.40 L 202.30 836.90 L 202.30 833.00 L 201.90 829.40 L 201.10 826.00 L 198.40 819.50 L 196.70 816.40 L 193.60 812.00 L 190.10 807.80 Z" fill="#b0c6da" fill-rule="nonzero" node-id="159" stroke="none" target-height="81" target-width="119.4" target-x="82.9" target-y="766.3"></path><path d="M 191.00 838.00 L 190.30 837.90 L 179.70 827.80 L 170.10 819.20 L 161.40 812.00 L 152.40 805.10 L 137.40 794.80 L 130.10 790.50 L 118.20 784.50 L 110.20 781.20 L 104.20 779.10 L 94.30 776.60 L 93.90 776.40 L 94.20 775.70 L 99.00 776.60 L 104.50 778.10 L 110.60 780.20 L 118.70 783.60 L 130.60 789.60 L 137.90 793.90 L 153.10 804.30 L 162.10 811.20 L 170.80 818.40 L 180.50 827.00 L 191.10 837.20 L 191.00 838.00 Z" fill="#95b4ce" fill-rule="nonzero" node-id="161" stroke="none" target-height="62.299988" target-width="97.200005" target-x="93.9" target-y="775.7"></path><path d="M 787.20 834.60 L 788.30 834.40 L 802.90 820.40 L 816.30 808.20 L 828.70 797.60 L 841.40 787.40 L 852.90 778.60 L 863.50 771.20 L 874.30 764.10 L 884.00 758.20 L 892.70 753.40 L 909.30 745.20 L 926.10 738.60 L 933.80 736.20 L 947.10 733.00 L 947.70 732.60 L 947.70 732.00 L 947.30 731.50 L 946.60 731.40 L 940.30 732.80 L 925.50 737.10 L 908.60 743.70 L 891.80 751.90 L 883.10 756.80 L 873.30 762.70 L 862.50 769.80 L 851.90 777.30 L 840.20 786.10 L 827.50 796.30 L 815.00 807.00 L 801.50 819.20 L 786.90 833.30 L 786.70 833.80 L 787.20 834.60 Z" fill="#95b4ce" fill-rule="nonzero" node-id="163" stroke="none" target-height="103.19995" target-width="161" target-x="786.7" target-y="731.4"></path></svg>'}),i("div",{class:"empty-draw-content"},i("div",{class:"empty-draw-text"},"ⓘ ",g("gameNotAvailable",this.language))))))}static get assetsDirs(){return["static"]}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};T.style='.draw-page{width:100%;position:relative}.draw-page .draw-page__background{width:100%;height:100%;position:absolute;z-index:0;background:linear-gradient(to right, var(--emw--color-primary, #fed275), var(--emw--color-primary-variant, #ffe66f))}.draw-page .draw-page__background .top-waves{position:absolute;top:30px;left:20px;width:100px;height:60px}.draw-page .draw-page__background .wave{position:absolute;width:80px;height:4px;background:rgba(255, 255, 255, 0.7);border-radius:20px}.draw-page .draw-page__background .wave:nth-child(1){top:0;transform:rotate(-5deg);clip-path:polygon(0 0, 25% 100%, 50% 0, 75% 100%, 100% 0, 100% 100%, 0% 100%)}.draw-page .draw-page__background .wave:nth-child(2){top:20px;transform:rotate(-3deg);clip-path:polygon(0 0, 25% 100%, 50% 0, 75% 100%, 100% 0, 100% 100%, 0% 100%)}.draw-page .draw-page__background .wave:nth-child(3){top:40px;transform:rotate(-1deg);clip-path:polygon(0 0, 25% 100%, 50% 0, 75% 100%, 100% 0, 100% 100%, 0% 100%)}.draw-page .draw-page__background .wave-svg{position:absolute;width:100px;height:8px}.draw-page .draw-page__background .wave-svg:nth-child(1){top:0}.draw-page .draw-page__background .wave-svg:nth-child(2){top:20px}.draw-page .draw-page__background .wave-svg:nth-child(3){top:40px}.draw-page .draw-page__background .dots-cluster{position:absolute;bottom:100px;right:80px;width:120px;height:80px}.draw-page .draw-page__background .dot{position:absolute;border-radius:50%;background-color:rgba(255, 255, 255, 0.6)}.draw-page .draw-page__background .dot:nth-child(1){width:6px;height:6px;top:0px;left:0px}.draw-page .draw-page__background .dot:nth-child(2){width:8px;height:8px;top:0px;left:15px}.draw-page .draw-page__background .dot:nth-child(3){width:5px;height:5px;top:0px;left:32px}.draw-page .draw-page__background .dot:nth-child(4){width:7px;height:7px;top:0px;left:46px}.draw-page .draw-page__background .dot:nth-child(5){width:6px;height:6px;top:0px;left:62px}.draw-page .draw-page__background .dot:nth-child(6){width:8px;height:8px;top:0px;left:78px}.draw-page .draw-page__background .dot:nth-child(7){width:5px;height:5px;top:0px;left:95px}.draw-page .draw-page__background .dot:nth-child(8){width:7px;height:7px;top:15px;left:5px}.draw-page .draw-page__background .dot:nth-child(9){width:6px;height:6px;top:15px;left:20px}.draw-page .draw-page__background .dot:nth-child(10){width:8px;height:8px;top:15px;left:35px}.draw-page .draw-page__background .dot:nth-child(11){width:5px;height:5px;top:15px;left:52px}.draw-page .draw-page__background .dot:nth-child(12){width:7px;height:7px;top:15px;left:67px}.draw-page .draw-page__background .dot:nth-child(13){width:6px;height:6px;top:15px;left:83px}.draw-page .draw-page__background .dot:nth-child(14){width:8px;height:8px;top:30px;left:8px}.draw-page .draw-page__background .dot:nth-child(15){width:5px;height:5px;top:30px;left:25px}.draw-page .draw-page__background .dot:nth-child(16){width:7px;height:7px;top:30px;left:40px}.draw-page .draw-page__background .dot:nth-child(17){width:6px;height:6px;top:30px;left:55px}.draw-page .draw-page__background .dot:nth-child(18){width:8px;height:8px;top:30px;left:72px}.draw-page .draw-page__background .dot:nth-child(19){width:6px;height:6px;top:45px;left:12px}.draw-page .draw-page__background .dot:nth-child(20){width:7px;height:7px;top:45px;left:28px}.draw-page .draw-page__background .dot:nth-child(21){width:5px;height:5px;top:45px;left:44px}.draw-page .draw-page__background .dot:nth-child(22){width:8px;height:8px;top:45px;left:58px}.draw-page .draw-page__background .dot:nth-child(23){width:7px;height:7px;top:60px;left:15px}.draw-page .draw-page__background .dot:nth-child(24){width:6px;height:6px;top:60px;left:32px}.draw-page .draw-page__background .dot:nth-child(25){width:8px;height:8px;top:60px;left:48px}.draw-page .draw-page__background .dot:nth-child(26){width:5px;height:5px;top:75px;left:20px}.draw-page .draw-page__background .dot:nth-child(27){width:7px;height:7px;top:75px;left:35px}.draw-info{padding:16px}.draw-info-title{margin-bottom:36px;display:flex;justify-content:center;flex-direction:column;align-items:center;position:relative;color:var(--emw--color-typography, #000)}.draw-info-title-main{font-size:30px;font-weight:bold}.draw-info-title-sub{position:absolute;bottom:24px;font-weight:600}.draw-info-item-list{display:flex;justify-content:center;flex-wrap:wrap;gap:26px}.draw-info-item{cursor:pointer;text-align:center;padding:20px;width:164px;height:152px;background-color:var(--emw--color-background, #fff);color:var(--emw--color-typography, #000);border-radius:21% 25% 19% 22%/30% 30% 34% 27%;position:relative;display:flex;align-items:center;justify-content:center;flex-direction:column}.draw-info-item:hover{animation:jelly 0.6s ease}.draw-info-item:hover .draw-info-item-projector{animation:shadow-jelly 0.6s ease}.draw-info-item-day{font-size:10px;font-weight:bold;position:absolute;left:calc(50% - 31px);top:-28px;width:64px;height:64px;background:var(--emw--color-secondary-variant, rgb(255, 152, 0));border-radius:50%;display:flex;align-items:center;color:var(--emw--color-typography-tertiary, #fff);justify-content:center;font-style:italic}.draw-info-item-day.reverse{top:unset;bottom:-28px}.draw-info-item-date,.draw-info-item-turnover{margin-top:8px;font-size:16px;color:var(--emw--color-typography, #000);font-family:Arial, Helvetica, sans-serif}.draw-info-item-projecter{content:"";position:absolute;top:calc(100% + 40px);left:50%;transform:translateX(-50%);width:120px;height:20px;background:var(--emw--color-background, #fff);border-radius:50%;filter:blur(12px)}.draw-info-footer{width:100%;margin:0 auto;margin-top:100px;position:relative}.draw-info-footer-text{text-align:center;margin-top:12px;font-size:22px;color:var(--emw--color-typography, #000);font-family:"Comic Sans MS";font-weight:600}.empty-draw-wrap{display:flex;justify-content:center;align-items:center;width:100%;min-height:calc(100vh - 104px)}.empty-draw{width:240px;height:160px;padding:18px 12px 12px 12px;background:var(--emw--color-secondary, #fff3b9);position:relative;margin:0 auto;display:flex;justify-content:center;align-items:center;text-align:center;border-radius:12px}.empty-draw .empty-draw-logo{position:absolute;top:-64%;left:50%;transform:translateX(-50%);width:200px;height:200px}.empty-draw .empty-draw-logo svg{width:100%;height:100%}.empty-draw-content{display:flex;gap:4px}.empty-draw-text{font-size:14px;font-weight:bold;color:var(--emw--color-typography, #000)}.empty-draw svg{fill:var(--emw--color-typography, #000)}.loading-indicator{z-index:1;display:flex;justify-content:center;padding-top:40px;color:var(--emw--color-typography, #000)}.empty-draw-text{color:var(--emw--color-typography, #000)}@keyframes jelly{0%,100%{transform:scale(1)}25%{transform:scale(1.05, 0.95)}50%{transform:scale(0.95, 1.05)}75%{transform:scale(1.03, 0.97)}}@keyframes shadow-jelly{0%,100%{transform:translateX(-50%) scale(1);opacity:0.1}25%{transform:translateX(-50%) scale(1.1, 0.9);opacity:0.08}50%{transform:translateX(-50%) scale(0.9, 1.1);opacity:0.12}75%{transform:translateX(-50%) scale(1.05, 0.95);opacity:0.09}}';const C=class{constructor(i){t(this,i),this.change=e(this,"change",7),this.handleOutsideClick=t=>{t.composedPath().includes(this.el)||(this.dropdownOpen=!1,this.overflowOpen=!1)},this.toggleDropdown=t=>{t.stopPropagation(),this.dropdownOpen=!this.dropdownOpen,this.overflowOpen=!1},this.isSelected=t=>this.selectedValues.includes(t),this.selectItem=t=>{this.isSelected(t.value)||(this.selectedValues=[...this.selectedValues,t.value],this.change.emit(this.selectedValues))},this.toggleItem=t=>{this.isSelected(t.value)?this.removeItem(t.value):this.selectItem(t)},this.removeItem=(t,e)=>{e&&e.stopPropagation(),this.selectedValues=this.selectedValues.filter((e=>e!==t)),this.change.emit(this.selectedValues)},this.downIcon=n("../static/dropdown.svg"),this.upIcon=n("../static/dropup.svg"),this.isTouch="ontouchstart"in window,this.openOverflow=()=>{this.isTouch||(this.computePopoverPosition(),this.overflowOpen=!0)},this.closeOverflow=()=>{this.isTouch||(this.overflowOpen=!1)},this.toggleOverflow=t=>{t.stopPropagation(),this.computePopoverPosition(),this.overflowOpen=!this.overflowOpen},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.options=[],this.maxVisibleChips=2,this.placeholder="",this.selectedValues=[],this.dropdownOpen=!1,this.overflowOpen=!1,this.popoverStyle={top:"0px",left:"0px"}}handleClientStylingChange(t,e){t!=e&&d(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&c(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&d(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&c(this.stylingContainer,this.clientStylingUrl))}async clear(){this.selectedValues=[],this.change.emit(this.selectedValues)}componentWillLoad(){document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){document.removeEventListener("click",this.handleOutsideClick),this.stylingSubscription&&this.stylingSubscription.unsubscribe()}get selectedOptions(){return this.options.filter((t=>this.isSelected(t.value)))}get visibleChips(){return this.selectedOptions.slice(0,this.maxVisibleChips)}get hiddenChips(){return this.selectedOptions.slice(this.maxVisibleChips)}computePopoverPosition(){if(this.overflowChipEl&&this.el){const{left:t}=this.overflowChipEl.getBoundingClientRect(),{left:e,height:i}=this.el.getBoundingClientRect();this.popoverStyle={top:i-10+"px",left:t-e+"px"}}}render(){var t;return i("div",{key:"50b48397be3ede1907ab2c2abcd1cf2f43f69c13",class:"general-multi-select-container",ref:t=>this.stylingContainer=t},i("div",{key:"696a1bb1f221f8f5cf290fac040af10e2e5a115e",class:"multi-select-container",ref:t=>this.el=t},i("div",{key:"9ea92f01787b26d43054573a11896cf65065b073",class:"flex-row",onClick:this.toggleDropdown},i("div",{key:"f79720ca3ec383ee7f95b09483698ee18119c79a",class:"control"},this.visibleChips.map((t=>i("span",{class:"chip"},i("div",{class:"chip-text",title:t.text},t.text),i("div",{class:"remove-btn",onClick:e=>this.removeItem(t.value,e)},"×")))),this.hiddenChips.length>0&&i("span",{key:"25e9e527c33dd7a315dacb10cc51084fe69b9b7e",class:"chip overflow-chip",ref:t=>this.overflowChipEl=t,onMouseEnter:this.openOverflow,onMouseLeave:this.closeOverflow,onClick:this.toggleOverflow},"•••"),0===this.selectedValues.length&&i("span",{key:"b061de660a55f7a0d41ce9aa650108d3f38a9dc0",class:"placeholder"},this.placeholder)),i("div",{key:"f83b6517e88b3976cdc18590f8f1233cb2515230",class:"arrow"},i("img",{key:"1b61a49090237057b98e5ce8a4f7c1e3bfc9d4ba",class:"info-icon",src:this.dropdownOpen?this.upIcon:this.downIcon,style:{width:"18px"}}))),this.dropdownOpen&&i("div",{key:"e5b081007bcbdd251ce5ac235c1f19f17852c420",class:"dropdown"},this.options.map((t=>i("div",{class:{"dropdown-item":!0,selected:this.isSelected(t.value)},onClick:()=>this.toggleItem(t)},t.text)))),this.overflowOpen&&!!(null===(t=this.hiddenChips)||void 0===t?void 0:t.length)&&i("div",{key:"f8e3289042c69c569bebcd0a40d90f31261c6c12",class:"overflow-popover",style:{top:this.popoverStyle.top,left:this.popoverStyle.left},onMouseEnter:this.openOverflow,onMouseLeave:this.closeOverflow},this.hiddenChips.map((t=>i("span",{class:"chip"},i("span",{class:"chip-text",title:t.text},t.text),i("span",{class:"remove-btn",onClick:e=>this.removeItem(t.value,e)},"×")))))))}static get assetsDirs(){return["../static"]}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};C.style='.multi-select-container{position:relative;font-family:"Inter", sans-serif;margin-top:4px;width:100%}.flex-row{display:flex;flex-direction:row;align-items:center;flex-wrap:nowrap;padding:6px 10px;padding-right:6px;border-radius:0.25em;background:var(--emw-selector-color-background, #e8ebef);cursor:pointer}.control{flex:1;display:flex;align-items:center;flex-wrap:nowrap;overflow:hidden}.control:focus-within{border-color:var(--emw--color-primary, #fed275);box-shadow:0 0 0 2px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15))}.chip{display:inline-flex;align-items:center;background:var(--emw--color-gray-50, #f5f5f5);color:var(--emw--color-dialog-typography, #000);border-radius:4px;padding:2px 8px;margin-right:6px;font-size:0.875rem;line-height:1.2;justify-content:space-between;flex:0 1 auto;min-width:0}.chip-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.overflow-chip{background:var(--emw--color-gray-100, #e6e6e6);color:var(--emw--color-gray-300, #333);width:20px;text-align:center;display:block}.remove-btn{background:none;border:none;font-size:1rem;margin-left:6px;cursor:pointer;color:var(--emw--color-gray-150, #6f6f6f)}.remove-btn:hover{color:var(--emw--color-error, red)}.placeholder{color:var(--emw--color-gray-150, #6f6f6f);font-size:0.875rem;padding:3px 8px;padding-left:0;line-height:1.2}.arrow{margin-left:auto;font-size:0.8rem;width:20px;color:var(--emw--color-gray-150, #6f6f6f)}.dropdown{position:absolute;top:calc(100% + 4px);left:0;width:100%;max-height:240px;overflow-y:auto;border:1px solid var(--emw--color-gray-100, #e6e6e6);border-radius:6px;background:var(--emw--color-dialog-background, #ffffff);box-shadow:0 4px 12px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15));z-index:10}.dropdown-item{padding:10px 14px;cursor:pointer;font-size:0.875rem;line-height:1.4;transition:background 0.2s}.dropdown-item:hover{background:var(--emw--color-background-tertiary, #ccc);color:var(--emw--color-typography, #000)}.dropdown-item.selected{background:var(--emw--color-background-secondary, #f5f5f5);color:var(--emw--color-typography, #000);font-weight:500}.overflow-popover{position:absolute;top:var(--overflow-top, 0px);left:var(--overflow-left, 0px);max-width:200px;padding:12px;display:flex;flex-wrap:wrap;gap:6px;border:1px solid var(--emw--color-gray-100, #d0d5dd);border-radius:6px;background:var(--emw--color-background, #ffffff);box-shadow:0 4px 12px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15));z-index:20}';const _=class{constructor(e){t(this,e),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.position="top",this.delay=200,this.isVisible=!1,this._tooltipId=void 0}handleClientStylingChange(t,e){t!=e&&d(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&c(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentWillLoad(){this._tooltipId=`general-tooltip-${Math.random().toString(36).substring(2,9)}`}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&d(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&c(this.stylingContainer,this.clientStylingUrl))}handleMouseEnterOrFocus(){clearTimeout(this.hideTimeout),this.showTimeout&&clearTimeout(this.showTimeout),this.showTimeout=setTimeout((()=>{this.isVisible=!0}),this.delay)}handleMouseLeaveOrBlur(){this.showTimeout&&clearTimeout(this.showTimeout),this.hideTimeout=setTimeout((()=>{this.isVisible=!1}),100)}handleKeyDown(t){"Escape"===t.key&&this.isVisible&&(this.isVisible=!1)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe(),clearTimeout(this.showTimeout),clearTimeout(this.hideTimeout)}render(){const t={"general-tooltip-popup":!0,visible:this.isVisible,[`general-tooltip-${this.position}`]:!0};return i("div",{key:"c0d52518e1e196e0d022789f7c6b7e64173b2c7d",class:"general-tooltip-wrapper"},i("slot",{key:"a935e103e16b0b619a024706e8224f4a937de6b9",name:"trigger"}),i("div",{key:"35c60e35ce3f8d5c2c42cd333fe64a3b289d34d4",class:"general-tooltip-container",role:"tooltip",ref:t=>this.stylingContainer=t},i("div",{key:"9d3fd9f142c1e3bd263dee289a2c1a9e4eebfddc",id:this._tooltipId,class:t,role:"tooltip"},i("slot",{key:"31344f0d4d4139f913d1819cc4f42a39f5113d8a",name:"content"}),i("div",{key:"f5cdd93060baec37b2a2879056efe2d66c5a553a",class:"general-tooltip-arrow"}))))}get hostElement(){return r(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};_.style=".general-tooltip-wrapper{display:inline-block;position:relative;line-height:0}.general-tooltip-container{display:contents;}.general-tooltip-popup{position:absolute;color:var(--emw--color-typography-inverse, #fff);background:var(--emw--color-background-inverse, #000);padding:8px 12px;border-radius:4px;font-size:0.875em;line-height:1.4;z-index:1000;opacity:0;visibility:hidden;transition:opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;white-space:nowrap;pointer-events:none;}.general-tooltip-popup.visible{opacity:1;visibility:visible}.general-tooltip-arrow{position:absolute;width:0;height:0;border-style:solid}.general-tooltip-top{bottom:100%;left:50%;transform:translateX(-50%);margin-bottom:8px;}.general-tooltip-top .general-tooltip-arrow{top:100%;left:50%;transform:translateX(-50%);border-width:6px 6px 0 6px;border-color:var(--emw--color-gray-300, #333) transparent transparent transparent}.general-tooltip-bottom{top:100%;left:50%;transform:translateX(-50%);margin-top:8px;}.general-tooltip-bottom .general-tooltip-arrow{bottom:100%;left:50%;transform:translateX(-50%);border-width:0 6px 6px 6px;border-color:transparent transparent var(--emw--color-gray-300, #333) transparent}.general-tooltip-left{right:100%;top:50%;transform:translateY(-50%);margin-right:8px;}.general-tooltip-left .general-tooltip-arrow{left:100%;top:50%;transform:translateY(-50%);border-width:6px 0 6px 6px;border-color:transparent transparent transparent var(--emw--color-gray-300, #333)}.general-tooltip-right{left:100%;top:50%;transform:translateY(-50%);margin-left:8px;}.general-tooltip-right .general-tooltip-arrow{right:100%;top:50%;transform:translateY(-50%);border-width:6px 6px 6px 0;border-color:transparent var(--emw--color-gray-300, #333) transparent transparent}";const S=["ro","en","fr","ar","hr"],M={en:{stop:"Stop",at:"at",turnover:"Turnover: ",startIn:"Sales Start in:"},ro:{stop:"Oprește",at:"la"},fr:{stop:"Arrêtez",at:"à"},ar:{stop:"توقف",at:"في"},hr:{stop:"Stop",at:"u"}},z=(t,e)=>{const i=e;return M[void 0!==i&&S.includes(i)?i:"en"][t]},j=({date:t,type:e="date",format:i})=>{try{const n=m(t);if(isNaN(n.getTime()))throw new Error(`Invalid date: ${t}`);if(i)return b(n,i);let r="dd/MM/yyyy";return"time"===e?r="dd/MM/yyyy HH:mm:ss":"week"===e&&(r="ccc dd/MM/yyyy HH:mm:ss"),b(n,r)}catch(t){return console.error("Error formatting date:",t.message),""}};function N(t){if(t)return function(t){return o(1,arguments),function(t,e){o(2,arguments);var i=v(t),n=v(e);return i.getTime()===n.getTime()}(t,Date.now())}(new Date(t))?j({date:t,format:"HH:mm"}):j({date:t,format:"dd/MM/yyyy HH:mm"})}function D(t,e){if(!t)return;let i=function(t,e,i){o(2,arguments);var n,r=w(t,e)/1e3;return((n=null==i?void 0:i.roundingMethod)?x[n]:x[k])(r)}("string"==typeof t?m(t):t,e&&new Date);if(i<0)return"0D 00H 00M 00S";const n=Math.floor(i/86400);i%=86400;const r=Math.floor(i/3600);i%=3600;const a=Math.floor(i/60),s=i%60;return`${n}D ${r.toString().padStart(2,"0")}H ${a.toString().padStart(2,"0")}M ${s.toString().padStart(2,"0")}S`}const $=class{constructor(i){t(this,i),this.lotteryBannerTimerStop=e(this,"lotteryBannerTimerStop",7),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.logoUrl=void 0,this.stopTime="",this.startTime="",this.bannerTitle=void 0,this.turnover=void 0,this.layout="logo,title,info",this.formattedTime=void 0}handleClientStylingChange(t,e){t!==e&&d(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!==e&&c(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!==e&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}handleTimeChange(){this.startTimer()}async componentWillLoad(){this.translationUrl&&(async t=>{if(t)try{const i=await fetch(t);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const n=await i.json();e=n,Object.keys(e).forEach((t=>{for(let i in e[t])M[t][i]=e[t][i]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl),this.startTimer()}startTimer(){this.timer&&clearInterval(this.timer),this.updateTime(),this.timer=setInterval((()=>{this.updateTime()}),1e3)}updateTime(){var t;this.formattedTime=function(t,e){const i=new Date;return t&&function(t,e){o(2,arguments);var i=s(t),n=s(e);return i.getTime()<n.getTime()}(i,m(t))?{start:D(t,i)}:t&&e&&function(t,e){o(2,arguments);var i=s(t).getTime(),n=s(e.start).getTime(),r=s(e.end).getTime();if(!(n<=r))throw new RangeError("Invalid interval");return i>=n&&i<=r}(i,{start:m(t),end:m(e)})?{end:N(e)}:{}}(this.startTime,this.stopTime),(null===(t=this.formattedTime)||void 0===t?void 0:t.end)&&(this.timer&&clearInterval(this.timer),this.lotteryBannerTimerStop.emit())}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&d(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&c(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe(),this.timer&&clearInterval(this.timer)}renderElement(t,e=""){var n,r,a;switch(t){case"logo":return i("div",{class:`lottery-banner__logo-wrapper ${e}`},this.logoUrl&&i("img",{alt:"logo",src:this.logoUrl,class:"lottery-banner__logo"}));case"title":return this.bannerTitle&&i("div",{class:`lottery-banner__title ${e}`},this.bannerTitle);case"info":return i("div",{class:`lottery-banner__info ${e}`},(null===(n=this.formattedTime)||void 0===n?void 0:n.start)&&i("div",{class:"lottery-banner__info-item"},i("span",{class:"lottery-banner__info-item-label"},i("span",{class:"lottery-banner__info-item-label__strong"},z("startIn",this.language))," "),i("span",{class:"lottery-banner__info-item-value lottery-banner__info-item-value__strong"},this.formattedTime.start)),(null===(r=this.formattedTime)||void 0===r?void 0:r.end)&&i("div",{class:"lottery-banner__info-item"},i("span",{class:"lottery-banner__info-item-label"},i("span",{class:"lottery-banner__info-item-label__strong"},z("stop",this.language))," ",z("at",this.language)),i("span",{class:"lottery-banner__info-item-value"},this.formattedTime.end)),(null===(a=this.formattedTime)||void 0===a?void 0:a.end)&&null!=this.turnover&&i("div",{class:"lottery-banner__info-item"},i("span",{class:"lottery-banner__info-item-label"},z("turnover",this.language)),i("span",{class:"lottery-banner__info-item-value"},this.turnover)));default:return null}}render(){const t=this.layout.split(",").map((t=>t.trim()));return i("section",{key:"de09c785c74e1182381ba3332899158da814240d",ref:t=>this.stylingContainer=t,class:"lottery-banner"},t.map(((e,i)=>this.renderElement(e,3===t.length&&1===i?"lottery-banner__item--center":""))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],startTime:["handleTimeChange"],stopTime:["handleTimeChange"]}}};$.style=":host {\n display: block;\n container-type: inline-size;\n}\n\n.lottery-banner {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--lottery-banner-gap, 0.5rem);\n padding: var(--lottery-banner-padding, 0px 20px);\n background: var(--lottery-banner-background, var(--emw--color-primary, #fed275));\n border-top: var(--lottery-banner-border-width, 2px) var(--lottery-banner-border-style, solid) var(--lottery-banner-border-color, var(--emw--color-primary, #fed275));\n border-bottom: var(--lottery-banner-border-width, 2px) var(--lottery-banner-border-style, solid) var(--lottery-banner-border-color, var(--emw--color-primary, #fed275));\n border-left: var(--lottery-banner-border-left, none);\n border-right: var(--lottery-banner-border-right, none);\n border-radius: var(--lottery-banner-border-radius, 0);\n white-space: nowrap;\n height: var(--lottery-banner-height, 50px);\n position: relative;\n box-sizing: border-box;\n}\n\n.lottery-banner__logo-wrapper {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n}\n.lottery-banner__logo-wrapper img {\n height: 100%;\n object-fit: var(--lottery-banner-logo-object-fit, contain);\n}\n\n.lottery-banner__item--center {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n\n.lottery-banner__title {\n text-align: center;\n font-size: var(--lottery-banner-title-font-size, 1.5rem);\n font-weight: 800;\n font-style: italic;\n letter-spacing: var(--lottery-banner-title-font-letter-spacing, 0.04em);\n color: var(--emw--color-typography, #000);\n}\n\n.lottery-banner__info {\n display: flex;\n align-items: center;\n gap: var(--lottery-banner-info-gap, 0.75rem);\n}\n\n.lottery-banner__info-item {\n font-size: var(--lottery-banner-info-font-size, 0.9rem);\n color: var(--lottery-banner-info-color, var(--emw--color-typography, #000));\n display: inline-flex;\n align-items: center;\n gap: 0.3rem;\n}\n\n.lottery-banner__info-item-label {\n color: var(--lottery-banner-info-label-color, var(--emw--color-typography, #000));\n}\n.lottery-banner__info-item-label__strong {\n font-weight: var(--lottery-banner-info-label-font-weight, 700);\n}\n\n.lottery-banner__info-item-value {\n font-weight: var(--lottery-banner-info-value-font-weight, inherit);\n color: var(--lottery-banner-info-value-color, var(--emw--color-typography, #000));\n}\n.lottery-banner__info-item-value__strong {\n font-weight: 700;\n}\n\n@container (max-width: 700px) {\n .lottery-banner {\n height: auto;\n padding: var(--lottery-banner-mobile-padding, 0.5rem 1rem);\n }\n .lottery-banner__title {\n flex-basis: 100%;\n text-align: var(--lottery-banner-mobile-title-text-align, left);\n }\n .lottery-banner__info {\n flex-direction: column;\n align-items: flex-start;\n gap: var(--lottery-banner-mobile-info-gap, 0.1rem);\n }\n}";const O=["ro","en","fr","ar","hr","zh"],I={en:{loading:"Loading"},ro:{},fr:{},ar:{},hr:{}},B=class{constructor(e){t(this,e),this.handleClick=t=>{if(this.disabled)return;const e=this.host.shadowRoot.querySelector(".btn");if(!e)return;const i=e.getBoundingClientRect(),n=Math.max(i.width,i.height),r={top:t.clientY-i.top-n/2,left:t.clientX-i.left-n/2,size:n};this.ripples=[...this.ripples,r],setTimeout((()=>{this.ripples=this.ripples.filter((t=>t!==r))}),600)},this.variant="primary",this.size="medium",this.color=void 0,this.disabled=!1,this.loading=!1,this.text=void 0,this.mbSource=void 0,this.language="en",this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.ripples=[]}handleClientStylingChange(t,e){t!=e&&d(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&c(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&d(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&c(this.stylingContainer,this.clientStylingUrl))}componentWillLoad(){this.translationUrl&&(async t=>{if(t)try{const i=await fetch(t);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const n=await i.json();e=n,Object.keys(e).forEach((t=>{for(let i in e[t])I[t][i]=e[t][i]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl)}render(){const{variant:t,disabled:e,size:n,color:r}=this,a=e||this.loading,o={};if(r)switch(t){case"primary":default:Object.assign(o,{backgroundColor:r,borderColor:r});break;case"outline":case"dashed":Object.assign(o,{color:r,borderColor:r});break;case"text":Object.assign(o,{color:r})}return i("button",{key:"aa74ad98c90e7548228557bf8a8d26b125d4a83a",class:{btn:!0,[`btn--${t}`]:!0,[`btn--${n}`]:!0,"btn--loading":this.loading},style:r?o:void 0,disabled:a,onClick:this.handleClick,ref:t=>this.stylingContainer=t},this.loading?i("div",{class:"loading-container"},i("span",{class:"content"},this.text||(()=>{const t=this.language;let e=I[void 0!==t&&O.includes(t)?t:"en"].loading;return e})()),i("span",{class:"spinner"})):i("span",{class:"content"},i("slot",{name:"icon-left"}),this.text||i("slot",null),i("slot",{name:"icon-right"})),i("div",{key:"302ea02be395bb24989d4abc040a513e23fa029a",class:"ripple-container"},this.ripples.map(((t,e)=>i("span",{key:e,class:"ripple",style:{top:`${t.top}px`,left:`${t.left}px`,width:`${t.size}px`,height:`${t.size}px`}})))))}get host(){return r(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};B.style=":host{display:inline-block}.btn{font:inherit;position:relative;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:var(--lottery-button-border-radius, 6px);font-weight:var(--lottery-button-font-weight, 500);cursor:pointer;outline:none;overflow:hidden;transition:var(--lottery-button-transition, background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s);user-select:none;-webkit-tap-highlight-color:transparent;box-shadow:var(--lottery-button-box-shadow, 0 2px 4px 0 rgba(0, 0, 0, 0.5))}.btn .content{position:relative;display:inline-flex;align-items:center;gap:var(--lottery-button-content-gap, 0.5em)}.btn .content ::slotted(span){display:inline-flex;align-items:center}.btn:hover:not(:disabled){box-shadow:var(--lottery-button-hover-box-shadow, 0 4px 8px 0 rgba(0, 0, 0, 0.5))}.btn:disabled{cursor:not-allowed;opacity:var(--lottery-button-disabled-opacity, 0.5)}.btn .loading-container{display:flex;align-items:center}.btn--loading{position:relative}.btn .spinner{display:inline-block;width:1em;height:1em;border:var(--lottery-button-spinner-border, 2px solid rgba(255, 255, 255, 0.3));border-radius:50%;border-top-color:var(--lottery-button-spinner-color, white);animation:spin 1s ease-in-out infinite;margin-left:0.5em;vertical-align:middle}.btn--small .spinner{width:0.8em;height:0.8em}.btn--large .spinner{width:1.2em;height:1.2em}@keyframes spin{to{transform:rotate(360deg)}}.btn--primary{background-color:var(--emw--color-primary, #0d196e);color:var(--emw--color-typography-inverse, #fff)}.btn--primary:hover:not(:disabled){background-color:var(--emw--color-primary-variant, #1367e7)}.btn--primary:active:not(:disabled){background-color:var(--lottery-button-primary-active-bg, #08104a)}.btn--outline .spinner,.btn--dashed .spinner,.btn--text .spinner{border-top-color:currentColor;border-color:var(--lottery-button-spinner-inverse-border-color, rgba(0, 0, 0, 0.2))}.btn--outline{background-color:var(--emw--color-background, #fff);border-color:var(--lottery-button-outline-border-color, #dcdcdc);color:var(--emw--color-typography, #000)}.btn--outline:hover:not(:disabled){background-color:var(--emw--color-background-tertiary, #ccc);border-color:var(--lottery-button-outline-hover-border-color, #a6a6a6)}.btn--outline:active:not(:disabled){background-color:var(--lottery-button-outline-active-bg, #e6e6e6)}.btn--dashed{background-color:transparent;border-style:dashed;border-color:var(--lottery-button-dashed-border-color, #dcdcdc);color:var(--lottery-button-dashed-color, #333)}.btn--dashed:hover:not(:disabled){border-color:var(--lottery-button-dashed-hover-border-color, #a6a6a6);color:var(--lottery-button-dashed-hover-color, #0052d9)}.btn--text{background-color:transparent;color:var(--lottery-button-text-color, #0052d9);border-color:transparent}.btn--text:hover:not(:disabled){background-color:var(--lottery-button-text-hover-bg, #f2f2f2)}.btn--text:active:not(:disabled){background-color:var(--lottery-button-text-active-bg, #e6e6e6)}.btn--custom-color:hover:not(:disabled){opacity:var(--lottery-button-custom-hover-opacity, 0.9)}.btn--custom-color:active:not(:disabled){opacity:var(--lottery-button-custom-active-opacity, 0.8)}.btn--small{height:var(--lottery-button-small-height, 28px);font-size:var(--lottery-button-small-font-size, 12px);padding:var(--lottery-button-small-padding, 0 12px)}.btn--medium{height:var(--lottery-button-medium-height, 34px);font-size:var(--lottery-button-medium-font-size, 14px);padding:var(--lottery-button-medium-padding, 0 18px)}.btn--large{height:var(--lottery-button-large-height, 40px);font-size:var(--lottery-button-large-font-size, 16px);padding:var(--lottery-button-large-padding, 0 24px)}.ripple-container{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;pointer-events:none;border-radius:inherit}.ripple{position:absolute;border-radius:50%;background-color:var(--lottery-button-ripple-light, rgba(255, 255, 255, 0.3));transform:scale(0);animation:ripple-animation 600ms linear}.btn--outline .ripple,.btn--dashed .ripple,.btn--text .ripple{background-color:var(--lottery-button-ripple-dark, rgba(0, 0, 0, 0.03))}@keyframes ripple-animation{to{transform:scale(4);opacity:0}}";const E=class{constructor(i){t(this,i),this.lotteryTippingBulletToggleEvent=e(this,"lotteryTippingBulletToggle",7),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.positionIdx=void 0,this.theme="default",this.value="",this.disabled=!1,this.isSelected=!1}handleClientStylingChange(t,e){t!=e&&d(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&c(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&d(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&c(this.stylingContainer,this.clientStylingUrl))}handleClick(){this.disabled||this.lotteryTippingBulletToggleEvent.emit({positionIdx:this.positionIdx})}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return i("div",{key:"ef0fee38ed62adb7809b5a60668af6a499ebe5a6",ref:t=>this.stylingContainer=t},"text"===this.theme?i("div",{class:{LotteryTippingBullet__segment:!0,"LotteryTippingBullet__segment--text":!0}},this.value):i("button",{class:{LotteryTippingBullet__segment:!0,"LotteryTippingBullet__segment--disabled":this.disabled,"LotteryTippingBullet__segment--active":this.isSelected},onClick:this.handleClick.bind(this)},this.isSelected?"X":this.value))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};E.style=".LotteryTippingBullet__segment{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;font-size:16px;line-height:1;font-weight:500;color:var(--emw--color-typography, #000);background:var(--emw--color-background, #fff);border:1px solid var(--emw--color-gray-100, #e6e6e6);border-radius:6px;cursor:pointer;transition:all 0.2s ease;user-select:none}.LotteryTippingBullet__segment:not(.LotteryTippingBullet__segment--disabled):hover{cursor:pointer;animation:jelly 0.3s ease-in-out;transform:scale(1.02)}.LotteryTippingBullet__segment--text{border:none;color:var(--emw--color-typography, #000);background:transparent;font-weight:400}.LotteryTippingBullet__segment--text:hover{cursor:not-allowed !important}.LotteryTippingBullet__segment--active{font-weight:600;background-color:var(--emw--color-background-inverse, #000);color:var(--emw--color-primary, #fed275)}.LotteryTippingBullet__segment--disabled:not(.LotteryTippingBullet__segment--active){background-color:var(--emw--color-background-tertiary, #ccc);color:var(--emw--color-gray-150, #6f6f6f);border-color:var(--emw--color-gray-100, #e6e6e6)}.LotteryTippingBullet__segment--disabled:hover{cursor:not-allowed}@keyframes jelly{0%{transform:translate(0, 0)}20%{transform:translate(-0.5px, -0.5px)}40%{transform:translate(0.5px, 0.5px)}60%{transform:translate(-0.25px, -0.25px)}80%{transform:translate(0.25px, 0.25px)}100%{transform:translate(0, 0)}}";const P=class{constructor(i){t(this,i),this.lotteryTippingBulletGroupToggleEvent=e(this,"lotteryTippingBulletGroupToggle",7),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.positionIdx=void 0,this.theme="default",this.mode="single",this.bulletConfigContent=""}get bulletConfigArr(){const t=[{value:"1"},{value:"X"},{value:"2"}];if("string"!=typeof this.bulletConfigContent||!this.bulletConfigContent)return t;try{return JSON.parse(this.bulletConfigContent)}catch(e){return console.error("Error parsing bulletConfigContent:",e),t}}handleClientStylingChange(t,e){t!=e&&d(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&c(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&d(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&c(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}lotteryTippingBulletSelectionHandler(t){const{positionIdx:e}=t.detail;this.handleToggle(e)}handleToggle(t){let e=[...this.bulletConfigArr];"single"===this.mode?(e=e.map((t=>Object.assign(Object.assign({},t),{isSelected:!1}))),e[t].isSelected=!0):(e=e.map((t=>Object.assign({},t))),e[t].isSelected=!e[t].isSelected),this.lotteryTippingBulletGroupToggleEvent.emit({bulletConfigArr:e,positionIdx:this.positionIdx+"-"+t})}render(){var t;return i("div",{ref:t=>this.stylingContainer=t,key:this.positionIdx},i("div",{key:"68223022eed831932c571378164be913206d98e9",style:{display:"flex",flexDirection:"row",gap:"10px"}},null===(t=this.bulletConfigArr)||void 0===t?void 0:t.map(((t,e)=>i("div",{key:e},i("lottery-tipping-bullet",{value:t.value,isSelected:t.isSelected,"position-idx":e,disabled:t.disabled,theme:this.theme,clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,mbSource:this.mbSource}))))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};P.style="";const H={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"},A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};var U=function(){return U=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},U.apply(this,arguments)},Z={primaryColor:"#333",secondaryColor:"#E6E6E6"};function G(t,e){if(void 0===e&&(e={}),"function"==typeof t.icon){var i=e.placeholders||Z;return R(t.icon(i.primaryColor,i.secondaryColor),e)}return R(t.icon,e)}function R(t,e){var i="svg"===t.tag?U(U({},t.attrs),e.extraSVGAttrs||{}):t.attrs,n=Object.keys(i).reduce((function(t,e){var n=i[e],r="".concat(e,'="').concat(n,'"');return t.push(r),t}),[]),r=n.length?" "+n.join(" "):"",a=(t.children||[]).map((function(t){return R(t,e)})).join("");return a&&a.length?"<".concat(t.tag).concat(r,">").concat(a,"</").concat(t.tag,">"):"<".concat(t.tag).concat(r," />")}const F=["ro","en","fr","ar","hr"],X={en:{weeks:["Su","Mo","Tu","We","Th","Fr","Sa"],bettingType:"Betting Type:",prizeAllocation:"Prize Allocation (Turnover: {turnover})",prizes:"Prizes",numberOfWinners:"Number of Winners",prizeMoney:"Prize Money",noLatestResult:"No latest result.",loading:"Loading...."},ro:{bettingType:"Tip de pariu:",prizeAllocation:"Alocarea premiilor (Cifră de afaceri: €{turnover})",prizes:"Premii",numberOfWinners:"Număr de câștigători",prizeMoney:"Bani de premiu",noLatestResult:"Niciun rezultat recent.",loading:"Se încarcă...."},fr:{bettingType:"Type de pari:",prizeAllocation:"Répartition des prix (Chiffre d'affaires: € {turnover})",prizes:"Prix",numberOfWinners:"Nombre de gagnants",prizeMoney:"Prix en argent",noLatestResult:"Aucun résultat récent.",loading:"Chargement...."},ar:{bettingType:"نوع الرهان:",prizeAllocation:"تخصيص الجائزة (دوران: € {turnover})",prizes:"الجوائز",numberOfWinners:"عدد الفائزين",prizeMoney:"أموال الجائزة",noLatestResult:"لا يوجد أحدث نتيجة.",loading:"جار التحميل...."},hr:{bettingType:"Vrsta oklade:",prizeAllocation:"Raspodjela nagrada (Promet: € {turnover})",prizes:"Nagrade",numberOfWinners:"Broj pobjednika",prizeMoney:"Novčana nagrada",noLatestResult:"Nema najnovijih rezultata.",loading:"Učitavanje...."}},V=(t,e,i)=>{const n=e;let r=X[void 0!==n&&F.includes(n)?n:"en"][t];return i&&Object.keys(i).forEach((t=>{r=r.replace(`{${t}}`,i[t])})),r},W=t=>{Object.keys(t).forEach((e=>{for(let i in t[e])X[e][i]=t[e][i]}))},Y=G({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"},{extraSVGAttrs:{width:"18px",height:"18px"}}),J=class{constructor(i){t(this,i),this.changeDate=e(this,"changeDate",7),this.handleOutsideClick=t=>{if(!this.showCalendar)return;const e=t.composedPath?t.composedPath():[],i=e.includes(this.calendarRef),n=e.some((t=>{var e,i;return t instanceof HTMLElement&&((null===(e=t.getAttribute("part"))||void 0===e?void 0:e.includes("item"))||(null===(i=t.getAttribute("part"))||void 0===i?void 0:i.includes("overlay")))}));i||n||(this.showCalendar=!1)},this.onYearMinus=()=>{const t=this.yearOptions.map((t=>Number(t.value)));this.alterDate.year-1<Math.min(...t)||(this.alterDate.year--,this.loadRecords())},this.onYearPlus=()=>{const t=this.yearOptions.map((t=>Number(t.value)));this.alterDate.year+1>Math.max(...t)||(this.alterDate.year++,this.loadRecords())},this.onMonthMinus=()=>{0===this.alterDate.month?(this.onYearMinus(),this.alterDate.month=11):(this.alterDate.month--,this.loadRecords())},this.onMonthPlus=()=>{11===this.alterDate.month?(this.onYearPlus(),this.alterDate.month=0):(this.alterDate.month++,this.loadRecords())},this.onYearChange=t=>{this.alterDate.year=parseInt(t.detail.value),this.loadRecords()},this.onMonthChange=t=>{this.alterDate.month=parseInt(t.detail.value)-1,this.loadRecords()},this.date="2025-05-19T02:00:00Z",this.highLightDates=void 0,this.language="en",this.translationUrl=void 0,this.weeks=void 0,this.days=[],this.alterDate={year:0,month:0,day:0},this.curDate={year:0,month:0,day:0},this.recordInfo=[],this.showCalendar=!1}componentWillLoad(){this.translationUrl&&W(JSON.parse(this.translationUrl)),this.weeks=V("weeks",this.language);const t=this.date?new Date(this.date):new Date;this.alterDate={year:t.getFullYear(),month:t.getMonth(),day:t.getDate()},this.curDate=Object.assign({},this.alterDate),this.loadRecords()}handleDateChange(){const t=this.date?new Date(this.date):new Date;this.alterDate={year:t.getFullYear(),month:t.getMonth(),day:t.getDate()},this.curDate=Object.assign({},this.alterDate),this.loadRecords()}componentDidLoad(){document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){document.removeEventListener("click",this.handleOutsideClick)}get yearOptions(){return Array.from({length:101},((t,e)=>this.alterDate.year-50+e)).map((t=>({label:String(t),value:String(t)})))}get monthOptions(){return Array.from({length:12},((t,e)=>e+1)).map((t=>({label:String(t),value:String(t)})))}loadRecords(){const{year:t,month:e}=this.alterDate;this.setDays(t,e)}setDays(t,e){this.days=[];const i=new Date(t,e,1).getDay(),n=new Date(t,e,1-i);for(let t=0;t<42;t++){const e=new Date(n);e.setDate(n.getDate()+t);const i={date:e.getDate(),month:e.getMonth(),year:e.getFullYear()};this.days.push(i)}}getFullDayOfMonth(t,e){return new Date(t,e,0).getDate()}showFormatedDate(t){return`${t.day}/${t.month+1}/${t.year}`}handleSelectDate(t,e,i){this.alterDate.day=t,this.curDate=Object.assign({},this.alterDate),this.showCalendar=!1;const n=this.highLightDates.map((t=>{const e=new Date(t);return{year:e.getFullYear(),month:e.getMonth(),day:e.getDate()}})).findIndex((n=>{const{year:r,month:a,day:o}=n;return e===a&&i===r&&t===o}));console.log("idx",n),n>-1&&this.changeDate.emit(n)}tellIsCurDay(t,e,i){return this.curDate.day===t&&this.curDate.month===e&&this.curDate.year===i}tellIsHighLight(t,e,i){return!(!this.highLightDates||!this.highLightDates.length)&&this.highLightDates.map((t=>{const e=new Date(t);return{year:e.getFullYear(),month:e.getMonth(),day:e.getDate()}})).some((n=>{const{year:r,month:a,day:o}=n;return e===a&&i===r&&t===o}))}render(){const t=["calendar",this.showCalendar?"calendar-visible":"calendar-leave"];return i("div",{key:"eda2c6b211647dfd9c26f5dd53dd8f18a2205be2",class:"lottery-tipping-calendar",ref:t=>this.calendarRef=t},i("div",{key:"b8a516ae17b8de7aaa4a72284848295546239937",class:"calling-input",onClick:()=>{this.showCalendar=!0}},i("div",{key:"4e384c0e1989f76b995bbc3df572eeab8ae120f6",class:"calling-input-text"},this.showFormatedDate(this.curDate)),i("div",{key:"a489600f9b90e4ea865606dddd4997ad9cf1558a",class:"calling-input-icon",innerHTML:Y})),i("div",{key:"7c17232151a8ae775e4a35000e7992695ce1f9dd",class:t.join(" ")},i("div",{key:"6951e3aa3fedb236514b57d6cdf830b074deb928",class:"calendar-header"},i("div",{key:"7d9735ab6d40d9010ac32a2b776ceacd9ee8ebb8",class:"date-controller year-minus",onClick:this.onYearMinus},"<"),i("div",{key:"e0f3e6958187120e4441c4c4961fda4a74294cca",class:"date-controller month-minus",onClick:this.onMonthMinus},"<"),i("div",{key:"e1840f3d0f9e4860a03467bbc782a6306c591ad4",class:"date-picker"},i("div",{key:"44d3b63aebcadaa42682e77f9d84c9ae155ec546",class:"date-picker-year"},i("vaadin-select",{key:"d462e0c076b1da5cdfa4a2ce47c5c3cb0d6e86bd",items:this.yearOptions,value:this.alterDate.year,style:{"--vaadin-field-default-width":"90px"},"on-value-changed":this.onYearChange.bind(this)})),i("div",{key:"0a405edb23487297ab91e0a6ce304e907d7cfa62",class:"date-picker-delimiter"},"-"),i("div",{key:"cc81efef542d370f4e03a7d7fa138a36b900d801",class:"date-picker-month"},i("vaadin-select",{key:"d7a9636262121dd8008588eef61aacd092ec07c8",items:this.monthOptions,value:this.alterDate.month+1,style:{"--vaadin-field-default-width":"64px"},"on-value-changed":this.onMonthChange.bind(this)})),i("div",{key:"f862d5d3d665c97bc74f7eda209822cc5ceb558e",class:"date-picker-delimiter"},"-"),i("div",{key:"9b2dca353b3708ad561af1bebb24c93dd1194384",class:"date-picker-day"},this.alterDate.day)),i("div",{key:"4e2d6c599a6c03aa1852b65c86f2db50cea02d6d",class:"date-controller month-plus",onClick:this.onMonthPlus},">"),i("div",{key:"18e4e92486507065a5e0771ffde5050f4ffff3f1",class:"date-controller year-plus",onClick:this.onYearPlus},">")),i("div",{key:"ef1115ce79c83cf4689779e55f046a70f733bc6c",class:"calendar-content"},i("div",{key:"0a6fe5ec8ee10f03a2547f942207f6ceaaa99618",class:"calendar-content-week"},this.weeks.map((t=>i("div",{class:"week-item"},t)))),i("div",{key:"971bc904f76e33c6503be7d223759f2ab7cb0ad6",class:"calendar-content-day"},this.days.map((t=>i("div",{class:{"day-item":!0,isCurDay:this.tellIsCurDay(t.date,t.month,t.year),isHighLight:this.tellIsHighLight(t.date,t.month,t.year)},onClick:()=>this.handleSelectDate(t.date,t.month,t.year)},t.date)))))))}static get watchers(){return{date:["handleDateChange"]}}};J.style='.lottery-tipping-calendar{position:relative;display:inline-block}.calendar-visible{opacity:1;visibility:visible}.calendar-leave{opacity:0;visibility:hidden}.calendar{position:absolute;top:40px;left:-50%;background:var(--emw--color-background, #fff);color:var(--emw--color-typography-secondary, #6f6f6f);padding:16px;width:fit-content;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));border-radius:var(--emw--border-radius-small, 4px);box-shadow:2px 3px 5px rgba(0, 0, 0, 0.1);cursor:pointer;transition:opacity 0.2s ease, visibility 0.2s ease;z-index:99}.calendar-header{display:flex;align-items:center}.calendar-header .date-picker{display:flex;margin:0 18px;align-items:center}.calendar-header .date-picker-delimiter{font-size:16px;margin:auto 4px}.calendar-header .month-plus,.calendar-header .month-minus,.calendar-header .year-plus,.calendar-header .year-minus{cursor:pointer;font-size:14px}.calendar-header .month-plus:hover,.calendar-header .month-minus:hover,.calendar-header .year-plus:hover,.calendar-header .year-minus:hover{color:var(--emw-pool-game-acition-active, #005fdb);transition:color 0.2s}.calendar-header .year-minus,.calendar-header .month-plus{margin-right:6px}.calendar-content{padding:3px;width:fit-content}.calendar-content .day-item{text-align:center;line-height:40px;cursor:not-allowed;position:relative;pointer-events:none}.calendar-content .day-item:hover{background-color:var(--emw--color-background-secondary, #f5f5f5)}.calendar-content .day-item.isCurDay{border-radius:4px;background:var(--emw--color-secondary, #fff3b9);background-size:50%;color:var(--emw--color-typography-secondary, #6f6f6f);font-weight:600;box-shadow:2px 2px 2px var(--emw-calender-curday-box-shadow, rgba(0, 0, 0, 0.09));cursor:pointer;pointer-events:all}.calendar-content .day-item.isHighLight{cursor:pointer;pointer-events:all}.calendar-content .day-item.isHighLight::after{content:"";position:absolute;left:calc(50% - 4px);bottom:0;width:6px;height:6px;border-radius:50%;background-color:var(--emw--color-error, red)}.calendar-content-week{display:grid;grid-template-columns:repeat(7, 40px);grid-template-rows:repeat(1, 36px);justify-items:center;align-items:center;border-bottom:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));color:var(--emw--color-typography-secondary, #6f6f6f)}.calendar-content-day{margin-top:4px;display:grid;grid-template-rows:repeat(6, 40px);grid-template-columns:repeat(7, 40px)}.calling-input{height:36px;width:160px;display:flex;align-items:center;justify-content:space-between;padding:0px 4px;background-color:var(--emw--color-background, #f5f5f5);border-radius:var(--emw--border-radius-small, 4px);border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));cursor:pointer}.calling-input .input{color:var(--emw--color-typography, #000)}.calling-input-text{color:var(--emw--color-typography, #000)}.calling-input-icon svg{fill:var(--emw--color-secondary, #fff3b9)}';const K=["ro","en","fr","ar","hr"],q={en:{cancel:"Cancel",confirm:"Confirm"},ro:{cancel:"Anulează",confirm:"Confirmă"},fr:{cancel:"Annuler",confirm:"Confirmer"},ar:{cancel:"إلغاء",confirm:"تأكيد"},hr:{cancel:"Odustani",confirm:"Potvrdi"}},Q=(t,e)=>{const i=e;return q[void 0!==i&&K.includes(i)?i:"en"][t]},tt=class{constructor(i){t(this,i),this.open=e(this,"open",7),this.close=e(this,"close",7),this.confirm=e(this,"confirm",7),this.cancel=e(this,"cancel",7),this.wasVisible=!1,this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.visible=void 0,this.dialogTitle="",this.width="520px",this.closable=!0,this.mask=!0,this.maskClosable=!0,this.animationDuration=300,this.fullscreen=!1,this.showFooter=!0,this.showCancelBtn=!0,this.language="en",this.translationUrl=void 0,this.dialogClass=void 0,this.dialogStyle=void 0}handleClientStylingChange(t,e){t!=e&&d(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&c(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentWillLoad(){this.translationUrl&&(async t=>{if(t)try{const i=await fetch(t);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const n=await i.json();e=n,Object.keys(e).forEach((t=>{for(let i in e[t])q[t][i]=e[t][i]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl)}componentWillUpdate(){this.visible&&!this.wasVisible?this.disableBodyScroll():!this.visible&&this.wasVisible&&this.enableBodyScroll(),this.wasVisible=this.visible}disconnectedCallback(){this.enableBodyScroll(),this.stylingSubscription&&this.stylingSubscription.unsubscribe()}disableBodyScroll(){document.body.style.overflow="hidden"}enableBodyScroll(){document.body.style.overflow=""}handleClose(){this.cancel.emit()}handleMaskClick(){this.maskClosable&&this.cancel.emit()}handleConfirm(){this.confirm.emit()}render(){const t=Object.assign({width:"number"==typeof this.width?`${this.width}px`:this.width,"--duration":`${this.animationDuration}ms`},this.dialogStyle||{}),e=["dialog-wrapper",this.visible?"dialog-wrapper-visible":""],n=["mask",this.visible?"mask-enter":"mask-leave"],r=["dialog",this.visible?"dialog-enter":"dialog-leave",this.fullscreen?"fullscreen":"",this.dialogClass].filter(Boolean).join(" ");return i("div",{key:"306683c5190fa6dca57dcf75e52eca575c0215e7",class:e.join(" "),ref:t=>this.stylingContainer=t},i("div",{key:"8be097f3a86fcd9ad4e18c6ac56cafdcf249049b",class:n.join(" "),onClick:this.handleMaskClick.bind(this)}),i("div",{key:"87d2206d3e3d75fe0e0ef8a6afd8de5c20892ae6",part:"dialog",class:r,style:t,role:"dialog","aria-modal":"true","aria-labelledby":"dialog-title"},(this.dialogTitle||this.closable)&&i("div",{key:"04d54878aa24e0d9eb98bc921ea3edfacd6de3af",class:"dialog-header"},i("h2",{key:"f6f6c279de47e49cde86d0c907b9b40a115926b3",id:"dialog-title",class:"dialog-title"},this.dialogTitle),this.closable&&i("button",{key:"e1625473e5460cd667961923bf678c9a91b69c82",class:"close-btn",onClick:this.handleClose.bind(this)},"x")),i("div",{key:"fb0db8dd765832cf1d8e8b682131e4c97a93ac22",class:"dialog-content",style:{maxHeight:"calc(100vh - 62px)",overflowY:"auto"}},i("slot",{key:"75336f59c2a8fe6775fc12ed4e2e26ff6bb6b508"})),this.showFooter&&i("div",{key:"a305086a2830265317abb0fd6f59b4a053fd54a9",class:"dialog-footer"},i("slot",{key:"cb330ea63908002f4f8b4b8139d5843c2570302e",name:"footer"},this.showCancelBtn&&i("button",{key:"c3d2c15195e56efd6d388265e9ccb87030627b7b",class:"cancel-btn",onClick:this.handleClose.bind(this)},Q("cancel",this.language)),i("button",{key:"af9c96b4e1ce82f9ecb73e2b9f4e93cba0382d76",class:"confirm-btn",onClick:this.handleConfirm.bind(this)},Q("confirm",this.language))))))}get el(){return r(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};tt.style=".dialog-wrapper{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;visibility:hidden;opacity:1;z-index:199}.dialog-wrapper-visible{visibility:visible}.mask{position:fixed;inset:0;background:var(--emw--color-mask-dialog-background, rgba(0, 0, 0, 0.5));opacity:0;z-index:1000;transition:opacity var(--duration) linear}.mask-enter{opacity:1}.mask-leave{opacity:0}.dialog{position:relative;background:var(--emw--color-background, #fff);border-radius:12px;box-shadow:0 4px 32px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15));opacity:0;transform:scale(0.9);transition:all var(--duration) linear;width:100%;max-width:100vw;overflow:hidden;z-index:1000}.dialog-enter{opacity:1;transform:scale(1)}.dialog-leave{opacity:0}.dialog.fullscreen{width:100vw !important;height:100vh;overflow:auto;max-height:none;border-radius:0;overflow:hidden}.dialog-header{padding:16px 16px 0 16px;display:flex;justify-content:space-between;align-items:center}.dialog-header .dialog-title{margin:0;font-size:1.25rem;font-weight:500;color:var(--emw--color-typography, #000)}.dialog-header .close-btn{background:transparent;border:none;font-size:1.5rem;width:2rem;height:2rem;color:var(--emw--color-gray-150, #6f6f6f);cursor:pointer;border-radius:4px}.dialog-header .close-btn:hover{background:var(--emw--color-gray-50, #f5f5f5);color:var(--emw--color-gray-300, #333)}.dialog-content{padding:24px;font-size:0.95rem;line-height:1.6;color:var(--emw--color-dialog-typography, #000);flex:1;overflow-y:auto;max-height:calc(100vh - 200px)}.dialog.fullscreen .dialog-content{max-height:none}.dialog-footer{padding:0 16px 16px 16px;display:flex;justify-content:center;gap:12px}.dialog-footer .cancel-btn,.dialog-footer .confirm-btn{padding:10px 24px;border-radius:6px;font-size:0.9rem;cursor:pointer;transition:all 0.3s linear}.dialog-footer .cancel-btn{border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));background-color:var(--emw--color-background, #fff);color:var(--emw--color-typography, #000)}.dialog-footer .cancel-btn:hover{background-color:var(--emw--color-background-tertiary, #ccc)}.dialog-footer .confirm-btn{border:none;color:var(--emw--color-typography-normalized, #ffffff);background:var(--emw--color-primary, #009993)}.dialog-footer .confirm-btn:hover{background:var(--emw--color-primary-variant, #004d4a)}@media screen and (max-width: 480px){.dialog.fullscreen .dialog-content{padding:12px}}.Loading{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.Loading svg{animation:spin 1s linear infinite;transform-origin:center}@keyframes spin{100%{transform:rotate(360deg)}}";const et=["ro","en","fr","ar","hr"],it={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:{}},nt=(t,e,i)=>{const n=e;let r=it[void 0!==n&&et.includes(n)?n:"en"][t];return i&&Object.keys(i).forEach((t=>{r=r.replace(`{${t}}`,i[t])})),r},rt=t=>{Object.keys(t).forEach((e=>{for(let i in t[e])it[e][i]=t[e][i]}))},at=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&&d(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&c(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentWillLoad(){this.translationUrl&&rt(JSON.parse(this.translationUrl)),this.ticketTypeList=[{label:nt("normal",this.language),value:"NORMAL"},{label:nt("subscription",this.language),value:"SUBSCRIPTION"}]}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&d(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&c(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleModalClose(){this.isOpen=!1}changeFormate(t){const[e,i,n]=t.split("/");return`${n}-${i}-${e}`}formateDate(t){const{year:e,month:i,day:n}=t,r=new Date(e,i,n);return b(r,"dd/MM/yyyy")}parseDate(t){const[e,i,n]=t.split("/");return{year:n,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 i("div",{key:"74aa590f6f92b9df971fd17cb3f573cc6a0a68e9",class:"lottery-tipping-filter",ref:t=>this.stylingContainer=t},i("div",{key:"ebf385371627466c5eb06a5ef75a14a467b1badd",class:"operate-btns"},!this.showClearButton&&i("div",{key:"55c709034e124b51e8b9057980f5a3c3b8c6d5ce",class:"operate-btn",onClick:()=>{this.isOpen=!0}},nt("filter",this.language)),(this.showClearButton||this.quickFiltersActive)&&i("div",{key:"aa747af2461e72fbacc16decd7fc75cd6f640c47",class:"operate-btn",onClick:()=>this.resetSearch()},nt("clear",this.language))),i("lottery-tipping-dialog",{key:"9a9472dee498db7acc83fd96db89b635be07a837","dialog-title":nt("ticketResult",this.language),visible:this.isOpen,onCancel:()=>{this.isOpen=!1},onConfirm:this.handleDialogConfirm.bind(this),animationDuration:300,language:this.language,"translation-url":this.translationUrl},i("div",{key:"a7bfe435c8f7a43abf2c2d500d7e31fe62123787",class:"dialog-content"},i("div",{key:"4fcf5f1d3da61ba5e3e8c09b4a97339c1eafaf64",class:"filter-item"},i("div",{key:"397bb60af15071331c46c0b83366475ef66205fd",class:"filter-item-label"},nt("searchByTicketId",this.language)),i("div",{key:"657e0014bb0d8af52ed273149bad534b2cd035b6",class:"filter-item-val"},i("div",{key:"7e49aab4b087a1e077cc03d4331df52be03a79c2",class:"general-multi-select-container"},i("vaadin-text-field",{key:"9d810aac3959e689cefed434d7c5569b18e4c0ec",placeholder:nt("enterTicketId",this.language),value:this.filterData.ticketId,onInput:t=>{this.filterData.ticketId=t.target.value}})))),i("div",{key:"8b9fda151a493c920797e4c7e2a8693c84ea5620",class:"filter-item"},i("div",{key:"23439a0cad69db2ddafc8c131d5e1f5a019c3805",class:"filter-item-label"},nt("searchByTicketType",this.language)),i("div",{key:"ffe8de6c8acb7ecb92301d417e5d3cddb9941601",class:"general-multi-select-container"},i("general-multi-select",{key:"90b2b967b17830a22ea08aa0f22e155e42922f21",ref:t=>this.comboBox=t,placeholder:nt("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}))),i("div",{key:"b8dc91b5337a8f4064160c50c20f213fbb1649bd",class:"filter-item"},i("div",{key:"476fb4074ad41ce1a014eb9355504aa4a53161ca",class:"filter-item-label"},nt("searchByDate",this.language)),i("div",{key:"d4498509f769af6cd5d008dc8433a61b9c9c5487",class:"filter-item-val"},i("vaadin-date-picker",{key:"bd525309eb193cd2e12fc87aee172d423397d22e",value:this.filterData.filterFromCalendar,max:void 0===this.filterData.filterToCalendar?void 0:this.changeFormate(this.filterData.filterToCalendar),onChange:this.handleFilterFrom,placeholder:nt("from",this.language),ref:t=>this.setDateFormate(t),class:"VaadinDatePicker"}),i("vaadin-date-picker",{key:"50eb713df259a2d0fce36b90d81d1ea388c8545d",value:this.filterData.filterToCalendar,min:void 0===this.filterData.filterFromCalendar?void 0:this.changeFormate(this.filterData.filterFromCalendar),onChange:this.handleFilterTo,placeholder:nt("to",this.language),ref:t=>this.setDateFormate(t),class:"VaadinDatePicker"}))))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};at.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)}.general-multi-select-container vaadin-text-field{width:100%}";function ot(t,e="GET",i=null,n={}){return new Promise(((r,a)=>{const o="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})),s=Object.assign({"Content-Type":"application/json"},n);"GET"!==e&&"HEAD"!==e&&(s["X-Idempotency-Key"]=o);const l={method:e,headers:s,body:null};i&&"GET"!==e&&"HEAD"!==e?l.body=JSON.stringify(i):delete l.body,fetch(t,l).then((t=>{if(!t.ok)throw new Error(`HTTP error! Status: ${t.status}`);return t.json()})).then((t=>r(t))).catch((t=>a(t)))}))}function st(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 n=0;n<e;n++){if(!st(t[n]))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(!st(e))return!1;i++}return i===e}(t):!t)}const lt={0:"1",1:"X",2:"2"},dt={H:0,D:1,A:2},ct=t=>t.map((t=>{const e=[0,0,0];return t[0].forEach((t=>{const i=dt[t];void 0!==i&&(e[i]=1)})),e.map(((t,e)=>({isSelected:1===t,value:lt[e]})))}));function ht(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(".")}function pt(t,e="€"){return null==t?"":`${e}${t?ht(t):0}`}const gt=G(H,{extraSVGAttrs:{width:"16px",height:"16px",fill:""}}),ft=G(A,{extraSVGAttrs:{width:"16px",height:"16px",fill:""}}),ut=class{constructor(i){t(this,i),this.lotteryTippingFetchDataError=e(this,"lotteryTippingLatestResultError",7),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.endpoint=void 0,this.gameId=void 0,this.playerId=void 0,this.sessionId=void 0,this.hasDrawDates=["2025-05-28T02:00:00Z","2025-05-16T02:00:00Z"],this.lastestDate="2025-05-28T02:00:00Z",this.drawList=void 0,this.curDrawItem=void 0,this.curDrawItemIdx=0,this.curDrawSelection=[],this.curDrawSelectionBettingType=void 0,this.curDrawSelectionMap={},this.curPrizes=void 0,this.curPrizeMap={},this.curTurnOver=0,this.isLoading=!0,this.playTypes=null,this.bettingTypes=void 0,this.vendorGameId=void 0,this.isLoadingTurnover=!1}handleClientStylingChange(t,e){t!=e&&d(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&c(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentWillLoad(){this.translationUrl&&W(JSON.parse(this.translationUrl)),this.initData()}async initData(){try{this.isLoading=!0,await Promise.all([this.getGameById(),this.fetDrawList()]),this.getTurnOver()}catch(t){console.error(t),this.lotteryTippingFetchDataError.emit(t)}finally{this.isLoading=!1}}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&d(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&c(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}async getGameById(){var t,e,i,n;try{const r=await async function(t,e){try{return await ot(`${t}/games/${e}`,"GET",{})}catch(t){throw console.error("Failed to fetch game info:",t),new Error("The game is currently not available. Please try again later.")}}(this.endpoint,this.gameId);this.vendorGameId=null==r?void 0:r.type,this.playTypes=null===(e=null===(t=null==r?void 0:r.rules)||void 0===t?void 0:t.poolGame)||void 0===e?void 0:e.playTypes,this.bettingTypes=null===(n=null===(i=null==r?void 0:r.rules)||void 0===i?void 0:i.poolGame)||void 0===n?void 0:n.bettingTypes}catch(t){console.log(t)}}findLatestDateIdx(t){const e=new Date;let i=0,n=1/0;return t.forEach(((t,r)=>{const a=new Date(t),o=Math.abs(w(e,a));o<n&&(n=o,i=r)})),i}async fetDrawList(){try{const t={status:"CLOSED",limit:9999},{items:e}=await ot(`${this.endpoint}/games/${this.gameId}/draws${function(t){const e={};Object.entries(t).forEach((([t,i])=>{st(i,!0)||(e[t]=i)}));const i=Object.entries(e).map((([t,e])=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`)).join("&");return i?`?${i}`:""}(t)}`,"GET");if(!e||0===e.length)return;const i=e;i.sort(((t,e)=>t.date.localeCompare(e.date))),this.drawList=i,this.hasDrawDates=i.map((t=>t.date)),this.curDrawItemIdx=this.findLatestDateIdx(this.hasDrawDates),this.lastestDate=this.hasDrawDates[this.curDrawItemIdx],this.curDrawItem=i[this.curDrawItemIdx],this.curDrawSelectionBettingType=i[this.curDrawItemIdx].winningNumbers[0].winning_type,this.curDrawItem.winningNumbers.forEach((t=>{this.curDrawSelectionMap[t.winning_type]=[ct(t.poolGameOutcomes)]})),this.curDrawItem.prizes.forEach((t=>{const e=t.winningType;this.curPrizeMap[e]?(this.curPrizeMap[e].push(t),this.curPrizeMap[e].sort(((t,e)=>e.totalAmount.value-t.totalAmount.value))):this.curPrizeMap[e]=[t]})),this.curDrawSelection=this.curDrawSelectionMap[this.curDrawSelectionBettingType],this.curPrizes=this.curPrizeMap[this.curDrawSelectionBettingType]}catch(t){console.log(t)}}get displayedPrizes(){return[...this.curPrizes.filter((t=>t.divisionDisplayName.includes("Correct"))).sort(((t,e)=>{const i=Number(t.divisionDisplayName.match(/\d+/)[0]);return Number(null==e?void 0:e.divisionDisplayName.match(/\d+/)[0])-i})),...this.curPrizes.filter((t=>"Bonus"===t.divisionDisplayName))]}changeCurDateItem(t){this.lastestDate=this.hasDrawDates[t],this.curDrawItemIdx=t,this.curDrawItem=this.drawList[t],this.curDrawSelectionBettingType=this.curDrawItem.winningNumbers[0].winning_type,this.curDrawItem.winningNumbers.forEach((t=>{this.curDrawSelectionMap[t.winning_type]=[ct(t.poolGameOutcomes)]})),this.curPrizeMap={},this.curDrawItem.prizes.forEach((t=>{const e=t.winningType;this.curPrizeMap[e]?(this.curPrizeMap[e].push(t),this.curPrizeMap[e].sort(((t,e)=>e.totalAmount.value-t.totalAmount.value))):this.curPrizeMap[e]=[t]})),this.curDrawSelection=this.curDrawSelectionMap[this.curDrawSelectionBettingType],this.curPrizes=this.curPrizeMap[this.curDrawSelectionBettingType],this.getTurnOver()}handleChangeDate(t){this.changeCurDateItem(t.detail)}preDraw(){this.curDrawItemIdx>0&&this.changeCurDateItem(--this.curDrawItemIdx)}nextDraw(){this.curDrawItemIdx<this.drawList.length-1&&this.changeCurDateItem(++this.curDrawItemIdx)}async getTurnOver(){var t,e,i;if(null===(t=this.curDrawItem)||void 0===t?void 0:t.id)try{this.isLoadingTurnover=!0;const t=await async function({endpoint:t,gameId:e,drawId:i}){try{return await ot(`${t}/games/${e}/draws/${i}/saleStatistics`)}catch(t){return Promise.reject(t)}}({endpoint:this.endpoint,gameId:this.vendorGameId,drawId:this.curDrawItem.id});this.curTurnOver=null!==(i=null===(e=null==t?void 0:t.wagerSegment)||void 0===e?void 0:e.totalSalesCrossDraw)&&void 0!==i?i:0}catch(t){console.error(t)}finally{this.isLoadingTurnover=!1}}handleDrawBettingTypeChange(t){this.curDrawSelectionBettingType=t,this.curDrawSelection=this.curDrawSelectionMap[this.curDrawSelectionBettingType],this.curPrizes=this.curPrizeMap[this.curDrawSelectionBettingType],this.getTurnOver()}getBettingTypeName(t){var e,i;const n=null===(i=null===(e=this.bettingTypes)||void 0===e?void 0:e.find((e=>e.code===t)))||void 0===i?void 0:i.name;return null!=n?n:t}render(){return i("div",{key:"8445ca7bb67864132c73aba8690ffc8a654acf96",class:"lottery-tipping-latest-result",ref:t=>this.stylingContainer=t},this.curDrawSelection&&this.curDrawSelection.length>0&&i("div",{key:"d3ea560c524a06afbce2d8ca8e0fabd0ace1f0fb",class:"result-wrapper"},i("div",{key:"0612142854af558802abef88673ebcfbba75b4f5",class:"date-selection"},i("div",{key:"1ccacd4df626ddbedf12f9a2076e6abf3ef92604",class:"date-selection-leftIcon",innerHTML:gt,onClick:this.preDraw.bind(this)}),i("div",{key:"0f86c5df9a1e77ae59054946beae703fc1439d55",class:"date-selection-calendar"},i("lottery-tipping-calendar",{key:"561f1b7b441ee5a749742fa1f9075309064d408e",date:this.lastestDate,highLightDates:this.hasDrawDates,language:this.language,"mb-source":this.mbSource,"client-styling-url":this.clientStylingUrl,"translation-url":this.translationUrl})),i("div",{key:"3bc8ae5a02f2a3b2aa0e824bd38afedd599b0f65",class:"date-selection-rightIcon",innerHTML:ft,onClick:this.nextDraw.bind(this)})),i("div",{key:"abdc4a2f4c8452754a9f963b63ee2ad895a8fc3a",class:"winning-result"},i("div",{key:"b44ad68ce7d83a4061b092610d03213a06888f5f",class:"betting-type"},i("div",{key:"b47203a44ffe076aba90e81cb579ba9ab32c2943",class:"betting-type-title"},V("bettingType",this.language)),i("div",{key:"b7ba0c64f5bf7c29a33b88cbc018a1164ec16fc3",class:"betting-type-text"},i("div",{key:"cb0bb84dbe19b7928cf0f77dbec8b9eded121c0d",class:"LotteryTippingTicketController__segmented-control"},Object.keys(this.curDrawSelectionMap).map((t=>i("button",{class:{LotteryTippingTicketController__segment:!0,"LotteryTippingTicketController__segment--active":this.curDrawSelectionBettingType===t},onClick:this.handleDrawBettingTypeChange.bind(this,t)},this.getBettingTypeName(t))))))),i("lottery-tipping-ticket-bet",{key:"77bbc0bf4fb5b9e4db639db82235e9c5102c6571","session-id":this.sessionId,endpoint:this.endpoint,"game-id":this.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,"mb-source":this.mbSource,"client-styling-url":this.clientStylingUrl,"translation-url":this.translationUrl})),this.isLoadingTurnover?i("div",{class:"loading-wrap"},i("ui-skeleton",{structure:"title",width:"140px",height:"30px"}),i("ui-skeleton",{structure:"rectangle",width:"100%",height:"30px"}),i("ui-skeleton",{structure:"rectangle",width:"100%",height:"30px"}),i("ui-skeleton",{structure:"rectangle",width:"100%",height:"30px"}),i("ui-skeleton",{structure:"rectangle",width:"100%",height:"30px"})):i("div",{class:"prize-result"},i("div",{class:"prize-result-title"},V("prizeAllocation",this.language,{turnover:pt(this.curTurnOver)})),i("div",{class:"prize-result-table"},i("div",{class:"prize-result-table-header"},i("div",{class:"prize-result-table-row"},i("div",{class:"prize-result-table-column"},V("prizes",this.language)),i("div",{class:"prize-result-table-column"},V("numberOfWinners",this.language)),i("div",{class:"prize-result-table-column"},V("prizeMoney",this.language)))),i("div",{class:"prize-result-table-body"},this.displayedPrizes.map((t=>i("div",{class:"prize-result-table-row"},i("div",{class:"prize-result-table-column"},t.divisionDisplayName),i("div",{class:"prize-result-table-column"},t.players),i("div",{class:"prize-result-table-column"},ht(t.totalAmount.value))))))))),0==this.curDrawSelection.length&&!this.isLoading&&i("div",{key:"b0b6b3889f133e7aa3fb3b716a34db7efe89d04b"},V("noLatestResult",this.language)),this.isLoading&&i("div",{key:"e95d1017886fc286ab985e1560dc0fd01d9bd8d3",class:"loading-wrap"},V("loading",this.language)))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};var mt;ut.style=".lottery-tipping-latest-result {\n padding: 16px;\n container-type: inline-size;\n background-color: var(--emw--color-background, #fff);\n}\n.lottery-tipping-latest-result .date-selection {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 24px;\n width: 400px;\n}\n.lottery-tipping-latest-result .date-selection-leftIcon, .lottery-tipping-latest-result .date-selection-rightIcon {\n cursor: pointer;\n}\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, #fff);\n color: var(--emw--color-typography, #000);\n font-weight: 600;\n}\n.LotteryTippingTicketController__segment:not(.LotteryTippingTicketController__segment--active):hover {\n background-color: var(--emw--color-background-tertiary, #ccc);\n}\n\n.betting-type {\n margin-bottom: 16px;\n display: flex;\n align-items: center;\n gap: 20px;\n}\n.betting-type-title {\n font-weight: 600;\n font-size: 16px;\n color: var(--emw--color-typography-secondary, #333);\n}\n.betting-type-text {\n font-size: 16px;\n}\n\n.result-wrapper {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 60%;\n margin: 0 auto;\n}\n.result-wrapper .winning-result {\n width: 100%;\n margin-top: 20px;\n}\n.result-wrapper .loading-wrap {\n width: 100%;\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n.result-wrapper .prize-result {\n width: 100%;\n margin-top: 20px;\n}\n.result-wrapper .prize-result-title {\n font-size: 16px;\n font-weight: 600;\n margin-bottom: 12px;\n color: var(--emw--color-typography-secondary, #333);\n}\n.result-wrapper .prize-result-table {\n width: 100%;\n}\n.result-wrapper .prize-result-table-row {\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-evenly;\n}\n.result-wrapper .prize-result-table-column {\n text-align: left;\n padding: 12px 14px;\n width: 160px;\n font-size: 14px;\n width: calc((100% - 2px) / 3);\n color: var(--emw--color-typography, #000);\n}\n.result-wrapper .prize-result-table-header {\n width: 100%;\n background-color: var(--emw--color-background-secondary, #e6e6e6);\n border-radius: 4px;\n}\n.result-wrapper .prize-result-table-body {\n background-color: var(--emw--color-background-tertiary, #fff);\n}\n.result-wrapper .prize-result-table .prize-result-table-header .prize-result-table-column {\n color: var(--emw--color-typography, #000);\n font-weight: 600;\n border-right: 1px solid var(--emw--color-background, #fff);\n}\n.result-wrapper .prize-result-table .prize-result-table-body .prize-result-table-row:hover {\n color: var(--emw--color-typography, #000);\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n}\n\n@container (max-width: 980px) and (min-width: 780px) {\n .result-wrapper {\n width: 84%;\n }\n}\n@container (max-width: 780px) and (min-width: 480px) {\n .result-wrapper {\n width: 100%;\n }\n}\n@container (max-width: 480px) {\n .result-wrapper {\n width: 100%;\n }\n .result-wrapper .winning-result {\n width: 100%;\n margin-top: 14px;\n }\n .result-wrapper .prize-result {\n width: 100%;\n }\n .result-wrapper .prize-result-table-column {\n padding: 6px;\n width: 100px;\n }\n}",function(t){t.BuyTickets="BUY_TICKETS",t.MyTickets="MY_TICKETS"}(mt||(mt={}));const bt=["ro","en","fr","ar","hr"],yt={en:{buyTickets:"Buy Tickets",myTickets:"My Tickets",logout:"Log out"},ro:{buyTickets:"Cumpără bilete",myTickets:"Biletele mele",logout:"Deconectare"},fr:{buyTickets:"Acheter des billets",myTickets:"Mes billets",logout:"Se déconnecter"},ar:{buyTickets:"شراء التذاكر",myTickets:"تذاكري",logout:"تسجيل الخروج"},hr:{buyTickets:"Kupi ulaznice",myTickets:"Moje ulaznice",logout:"Odjava"}},vt=(t,e)=>{const i=e;return yt[void 0!==i&&bt.includes(i)?i:"en"][t]},wt=class{constructor(e){t(this,e),this.handleTabClick=t=>{this.activeTab=t},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.endpoint=void 0,this.gameId=void 0,this.playerId=void 0,this.sessionId=void 0,this.drawId=void 0,this.logoUrl=void 0,this.activeTab=mt.BuyTickets}handleClientStylingChange(t,e){t!=e&&d(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&c(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentWillLoad(){this.translationUrl&&(async t=>{if(t)try{const i=await fetch(t);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const n=await i.json();e=n,Object.keys(e).forEach((t=>{for(let i in e[t])yt[t][i]=e[t][i]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&d(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&c(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}renderTabs(){const t={[mt.BuyTickets]:vt("buyTickets",this.language),[mt.MyTickets]:vt("myTickets",this.language)};return i("div",{class:"tab-btns"},Object.values(mt).map((e=>i("div",{class:"tab-btn"+(this.activeTab===e?" active":""),onClick:this.handleTabClick.bind(this,e)},t[e]))))}renderContent(){return this.activeTab===mt.BuyTickets?i("lottery-tipping-ticket-controller",{endpoint:this.endpoint,gameId:this.gameId,playerId:this.playerId,sessionId:this.sessionId,drawId:this.drawId,language:this.language,"mb-source":this.mbSource,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"translation-url":this.translationUrl,"logo-url":this.logoUrl}):this.activeTab===mt.MyTickets?i("lottery-tipping-ticket-history",{endpoint:this.endpoint,gameId:this.gameId,playerId:this.playerId,sessionId:this.sessionId,drawId:this.drawId,language:this.language,"mb-source":this.mbSource,"client-styling-url":this.clientStylingUrl,"client-styling":this.clientStyling,"translation-url":this.translationUrl}):null}render(){return i("div",{key:"410b13d8772d8a22ea4a2795230b5ea17975b3c3",class:"lottery-tipping-page",ref:t=>this.stylingContainer=t},i("div",{key:"f468ef27a6a720aa92fe6eda9729e9faf682c110",class:"lottery-tipping-page-header"},i("slot",{key:"d0485663265b73a313f9749ec0a4be14162c0203",name:"backBtn"}),this.renderTabs(),i("div",{key:"3fb36223d652e0702884102173f43920c9d684b1",class:"lottery-tipping-page-header-operation"},i("slot",{key:"d7d4b03c828c1b1a0f26eba9594093c8352bafbb",name:"themeBtn"}),i("slot",{key:"2a59bcae7c9e360bc4d6b35a441340f32f8d4f77",name:"logoutBtn"}))),i("div",{key:"f290300abafc8c31d23651fe7a9195a1f9e09e05",class:"lottery-tipping-content"},this.renderContent()))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};function Lt(t,e="GET",i=null,n={}){return new Promise(((r,a)=>{const o="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})),s=Object.assign({"Content-Type":"application/json"},n);"GET"!==e&&"HEAD"!==e&&(s["X-Idempotency-Key"]=o);const l={method:e,headers:s,body:null};i&&"GET"!==e&&"HEAD"!==e?l.body=JSON.stringify(i):delete l.body,fetch(t,l).then((t=>t.ok?t.json():a(t))).then((t=>r(t))).catch((t=>a(t)))}))}function xt(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 n=0;n<e;n++){if(!xt(t[n]))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(!xt(e))return!1;i++}return i===e}(t):!t)}wt.style=".lottery-tipping-page {\n container-type: inline-size;\n background: var(--emw--color-background, #fff);\n}\n.lottery-tipping-page-header {\n height: 56px;\n padding: 8px 10px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n.lottery-tipping-page-header-operation {\n display: flex;\n gap: 14px;\n align-items: center;\n}\n.lottery-tipping-page-header .tab-btns {\n display: flex;\n align-items: center;\n gap: 40px;\n flex: 1;\n justify-content: center;\n}\n.lottery-tipping-page-header .tab-btn {\n padding: 0 8px;\n line-height: 40px;\n font-size: 16px;\n cursor: pointer;\n font-weight: 600;\n height: 40px;\n border: 2px solid var(--emw--color-primary, #fed275);\n border-radius: 8px;\n color: var(--emw--color-typography, #000);\n transition: all 0.2s linear;\n}\n.lottery-tipping-page-header .tab-btn.active {\n background-color: var(--emw--color-primary, #fed275);\n color: var(--emw--color-typography, #000);\n border: 1px solid var(--emw--color-typography, #000);\n}\n\n@container (min-width: 1200px) {\n .tab-btns {\n gap: 40px;\n }\n}\n@container (max-width: 480px) {\n .tab-btns {\n gap: 24px;\n }\n}";const kt={0:"1",1:"X",2:"2"};function Tt(t){const e=[],i=[];for(let e=0;e<t.length;e+=2){const[n,r]=[t[e],t[e+1]];i[r]?i[r].push(n):i[r]=[n]}return i.forEach((t=>{e.push(function(t){const e=[];return Object.keys(kt).forEach((i=>{e.push({isSelected:t.includes(Number(i)),value:kt[i]})})),e}(t))})),e}const Ct=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)),_t=({message:t,theme:e="success"})=>{window.postMessage({type:"ShowNotificationToast",message:t,theme:e})},St=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&&d(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&c(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&d(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&c(this.stylingContainer,this.clientStylingUrl))}componentWillLoad(){this.translationUrl&&rt(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=Ct(this.userAgent)?1:2,{totalPages:i,current:n}=this;if(i<=7)for(let e=1;e<=i;e++)t.push({type:"page",value:e});else{t.push({type:"page",value:1}),n>e+2&&t.push({type:"jump",direction:"prev"});const r=Math.max(2,n-e),a=Math.min(i-1,n+e);for(let e=r;e<=a;e++)t.push({type:"page",value:e});n<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 i("div",{key:"daa1bf4cd3031ae3f908bd2638424cbf82b81021",class:"paginator",ref:t=>this.stylingContainer=t},i("div",{key:"93841d6094df6f52b24e277b66d92158aabd2955",class:"total-num"},nt("totalItems",this.language,{total:this.total})),i("button",{key:"205e1dcc5e5c1b18f2dbbb61e127d13e4adaa79f",class:"arrow-btn",disabled:this.current<=1,onClick:()=>this.goToPage(this.current-1)},"<"),t.map((t=>"page"===t.type?i("button",{class:{page:!0,active:this.current===t.value},onClick:()=>this.goToPage(t.value)},t.value):i("button",{class:"ellipsis",onClick:()=>this.jumpTo(t.direction)},"..."))),i("button",{key:"3213a6519702b4215e66afadf8dc6e44839455e7",class:"arrow-btn",disabled:this.current>=this.totalPages,onClick:()=>this.goToPage(this.current+1)},">"),i("select",{key:"da36befb97834a7d3ca212f724306cbe57f76167",onInput:t=>this.changePageSize(parseInt(t.target.value))},this.pageSizeOptions.map((t=>i("option",{value:t},nt("perPage",this.language,{size:t}))))),i("div",{key:"063ca0f31a3ab170a697af945414602f95748dac",class:"jump-box"},nt("goTo",this.language),i("input",{key:"1ec1cbf62de505ea6770c59536c41f3bbb241261",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"]}}};St.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)}";const Mt=G({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"}}),zt=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&&d(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&c(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&d(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&c(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return i("div",{key:"3a7acb79544c31ac93d82a2ea62ca7d343901b3f",class:"panel-container",ref:t=>this.stylingContainer=t},i("div",{key:"1c4f38f5c8df2e08dd3a33f9af45b7bc0cc1f025",class:{"panel-header":!0,active:this.expanded},onClick:this.togglePanel},i("div",{key:"6e08ac8f744bb3abbfb0148d4cc82843f13b1ea5",class:"header-content"},i("slot",{key:"b58eee18d78117db3638ed71800b40e626de7d63",name:"header"},i("span",{key:"cfc3586117731014a1511f9df19d53132580e2ac"},this.headerTitle))),i("span",{key:"41a8fb02bb96acd842668cd717909f07d02bdad2",class:"arrow "+(this.expanded?"expanded":""),innerHTML:Mt})),i("div",{key:"5deb75348843b6cf12bba4c03a5defeaa82760f8",class:"panel-body "+(this.expanded?"open":"closed")},i("slot",{key:"0191d8c751a6fecaaeae237cba17e125df42b6d4",name:"content"})))}get el(){return r(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};zt.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 jt=["ro","en","fr","ar","hr"],Nt={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"}},Dt=(t,e,i)=>{const n=e;let r=Nt[void 0!==n&&jt.includes(n)?n:"en"][t];return i&&Object.keys(i).forEach((t=>{r=r.replace(`{${t}}`,i[t])})),r},$t=t=>{Object.keys(t).forEach((e=>{for(let i in t[e])Nt[e][i]=t[e][i]}))},Ot=[{value:"1"},{value:"X"},{value:"2"}],It=G({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"}}),Bt=G({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"}}),Et=G({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"}}),Pt=G(H,{extraSVGAttrs:{width:"20px",height:"20px",fill:"currentColor"}}),Ht=G(A,{extraSVGAttrs:{width:"20px",height:"20px",fill:"currentColor"}}),At=class{constructor(n){t(this,n),this.lotteryTippingBulletBetEvent=e(this,"lotteryTippingBulletBetSelect",7),this.lotteryTippingCurrentPageChangeEvent=e(this,"lotteryTippingCurrentPageChange",7),this.eventNameRender=(t,e)=>i("div",{class:"flex gap-1 eventNameContainer__item"},i("span",{class:"eventNameContainer__item--title"},e),i("general-tooltip",null,i("span",{slot:"trigger",class:"icon info-icon",innerHTML:Et,style:{width:"18px"}}),i("div",{slot:"content"},i("div",{class:"match-info"},i("div",{class:"match-info-item"},i("div",{class:"match-info-item-label"},Dt("homeTeam",this.language)),i("div",{class:"match-info-item-value"},t.homeName)),i("div",{class:"match-info-item"},i("div",{class:"match-info-item-label"},Dt("awayTeam",this.language)),i("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 n=m(t);if(isNaN(n.getTime()))throw new Error(`Invalid date: ${t}`);if(i)return b(n,i);let r="dd/MM/yyyy";return"time"===e?r="dd/MM/yyyy HH:mm:ss":"week"===e&&(r="ccc dd/MM/yyyy HH:mm:ss"),b(n,r)}catch(t){return console.error("Error formatting date:",t.message),""}})({date:e,format:"ccc HH:mm"})},{title:()=>i("lottery-tipping-bullet-group",{theme:"text",bulletConfigContent:JSON.stringify(Ot)}),value:"results",width:5,render:(t,e,n)=>{var r,a;return i("lottery-tipping-bullet-group",{mode:this.mode,bulletConfigContent:JSON.stringify(null===(a=null===(r=this.bulletConfigLineGroup)||void 0===r?void 0:r[this.currentPage-1])||void 0===a?void 0:a[n]),"position-idx":`${this.currentPage-1}-${n}`})}}],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=!1,this.hasErrors=!1,this.dialogConfig={visible:!1},this.ticketDataSource=[]}handleNewTranslations(){this.isLoading=!0,$t(JSON.parse(this.translationUrl)),this.isLoading=!1}handleClientStylingChange(t,e){t!=e&&d(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&c(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentWillLoad(){this.translationUrl&&$t(JSON.parse(this.translationUrl))}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&d(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&c(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},(()=>[...Ot]))}_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:Dt("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,[n,r]=i.split("-");this.bulletConfigLineGroup[n][r]=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:Dt("selectionOnLineCleared",this.language),onConfirm:e,onCancel:t}}})()}swapCard(t,e){const i=this.mainContainer;if(!i)return;const{out:n,in:r}={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(n),i.addEventListener("animationend",(()=>{i.classList.remove(n),e();const t=this.mainContainer;t&&(t.classList.add(r),t.addEventListener("animationend",(()=>t.classList.remove(r)),{once:!0}))}),{once:!0})}handleCurrentPageChange(){this.lotteryTippingCurrentPageChangeEvent.emit({currentPage:this.currentPage})}renderLoading(){return i("div",{class:"loading-wrap"},i("section",{class:"dots-container"},i("div",{class:"dot"}),i("div",{class:"dot"}),i("div",{class:"dot"}),i("div",{class:"dot"}),i("div",{class:"dot"})))}render(){var t,e,n,r;if(this.isLoading)return this.renderLoading();if(this.hasErrors)return i("div",{ref:t=>this.stylingContainer=t,class:"LotteryTippingTicketBet__container"},i("p",null,Dt("error",this.language)));const a=({columns:t,dataSource:e,hideHead:n=!1,grid:r=!0,bordered:a=!0})=>i("table",{class:{bordered:a,grid:r,"my-table-component":!0}},!n&&i("thead",null,i("tr",null,t.map((t=>{var e;return i("th",{key:t.value,style:{width:t.width+"%",textAlign:t.align}},"string"==typeof t.title?t.title:null===(e=t.title)||void 0===e?void 0:e.call(t))})))),i("tbody",null,e.map(((e,n)=>i("tr",{key:n},t.map((t=>i("td",{key:t.value,style:{width:t.width+"%",textAlign:t.align},class:{"no-wrap":t.nowrap}},t.render?t.render(e,e[t.value],n):e[t.value])))))))),o=this.totalPages<this.maxTotalPages&&this.currentPage===this.totalPages,s=this.totalPages>this.minTotalPages;return 0===this.ticketDataSource.length||0===this.minTotalPages||0===this.maxTotalPages?i("div",{class:"LotteryTippingTicketBet__container",ref:t=>this.stylingContainer=t},i("div",{class:"LotteryTippingTicketBet__empty"},i("p",null,Dt("noData",this.language)))):this.readPretty?i("div",{class:"LotteryTippingTicketBet__container",ref:t=>this.stylingContainer=t},i("div",{class:"LotteryTippingTicketBet__main",ref:t=>this.mainContainer=t},i(a,{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&&i("div",null,i("div",{class:"border-line"}),i("div",{class:"LotteryTippingTicketBet__footer"},i("div",{class:"my-pagination flex justify-between"},i("span",null,Dt("lineInfo",this.language,{currentPage:this.currentPage,totalPages:this.totalPages})),i("div",{class:"flex gap-1"},i("span",{class:"btn "+(1===this.currentPage?"disabled":""),onClick:this.prevPage.bind(this)},i("span",{class:"icon",innerHTML:Pt})),i("span",{class:"btn "+(this.currentPage===this.totalPages?"disabled":""),onClick:this.nextPage.bind(this)},i("span",{class:"icon",innerHTML:Ht})))))))):i("div",{ref:t=>this.stylingContainer=t,class:"LotteryTippingTicketBet__container"},i("div",{class:"LotteryTippingTicketBet__tableToolbar flex justify-end gap-1"},i("button",{class:{"LotteryTippingTicketBet__tableToolbar--item":!0,"mr-0":!(o||s)},onClick:this.handleClearAll.bind(this)},Dt("clearAll",this.language))),i("div",{class:"flex align-center LotteryTippingTicketBet__main",ref:t=>this.mainContainer=t},i(a,{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}),(o||s)&&i("div",{class:"LotteryTippingTicketBet__lineOperatorGroup"},o&&i("div",{class:{"LotteryTippingTicketBet__lineOperatorGroup--item":!0},onClick:this.handleAddLine.bind(this)},i("span",{class:"icon",innerHTML:It})),s&&i("div",{class:{"LotteryTippingTicketBet__lineOperatorGroup--item":!0},onClick:this.handleRemoveLine.bind(this)},i("span",{class:"icon",innerHTML:Bt})))),i("div",{class:"border-line"}),i("div",{class:"LotteryTippingTicketBet__footer"},i("div",{class:"my-pagination flex justify-between"},i("span",null,Dt("lineInfo",this.language,{currentPage:this.currentPage,totalPages:this.totalPages})),i("div",{class:"flex gap-1"},i("span",{class:"btn "+(1===this.currentPage?"disabled":""),onClick:this.prevPage.bind(this)},i("span",{class:"icon",innerHTML:Pt})),i("span",{class:"btn "+(this.currentPage===this.totalPages?"disabled":""),onClick:this.nextPage.bind(this)},i("span",{class:"icon",innerHTML:Ht}))))),this.dialogConfig.visible&&i("vaadin-confirm-dialog",{rejectButtonVisible:!0,rejectText:Dt("cancel",this.language),confirmText:Dt("confirm",this.language),opened:null===(n=this.dialogConfig)||void 0===n?void 0:n.visible,onConfirm:this.dialogConfig.onConfirm,onReject:this.dialogConfig.onCancel},null===(r=this.dialogConfig)||void 0===r?void 0:r.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 Ut,Zt,Gt,Rt;At.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"}(Ut||(Ut={})),function(t){t.FullTime="FullTime",t.HalfTime="HalfTime",t.Both="Both"}(Zt||(Zt={})),function(t){t.OPEN="OPEN"}(Gt||(Gt={})),function(t){t.Settled="Settled",t.Purchased="Purchased",t.Canceled="Canceled"}(Rt||(Rt={}));const Ft=["ro","en","fr","ar","hr"],Xt={en:{stop:"Stop",at:"at",turnover:"Turnover: ",selectionCleared:"Your selection will be cleared.",ticketSubmitted:"Ticket submitted successfully.",ticketFailed:"Failed to submit tickets.",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"}},Vt=(t,e)=>{const i=e;return Xt[void 0!==i&&Ft.includes(i)?i:"en"][t]};function Wt(t,e="GET",i=null,n={}){return new Promise(((r,a)=>{const o="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})),s=Object.assign({"Content-Type":"application/json"},n);"GET"!==e&&"HEAD"!==e&&(s["X-Idempotency-Key"]=o);const l={method:e,headers:s};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=>r(t))).catch((t=>a(t)))}))}const Yt=({message:t,theme:e="success"})=>{window.postMessage({type:"ShowNotificationToast",message:t,theme:e})},Jt=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(".")},Kt=["H","D","A"],qt=(t=[])=>t.filter((t=>t.enabled)),Qt=({rawData:t,selectedBettingType:e,selectedPlayingMode:i})=>{var n,r,a,o,s,l;const d=null===(o=null===(a=null===(r=null===(n=null==t?void 0:t.rules)||void 0===n?void 0:n.poolGame)||void 0===r?void 0:r.playTypes)||void 0===a?void 0:a.find((t=>t.bettingType===e&&t.playMode===i)))||void 0===o?void 0:o.betTypeId,c=null===(l=null===(s=null==t?void 0:t.rules)||void 0===s?void 0:s.betTypes)||void 0===l?void 0:l.find((t=>t.id===d));return{betTypeId:d,betType:c}};function te(t,e="€"){return null==t?"":`${e}${t?Jt(t):0}`}function ee(t){if(!t)return"";const e=(({date:t,type:e="date",format:i})=>{try{const n=m(t);if(isNaN(n.getTime()))throw new Error(`Invalid date: ${t}`);if(i)return b(n,i);let r="dd/MM/yyyy";return"time"===e?r="dd/MM/yyyy HH:mm:ss":"week"===e&&(r="ccc dd/MM/yyyy HH:mm:ss"),b(n,r)}catch(t){return console.error("Error formatting date:",t.message),""}})({date:t,format:"EEEE"});return["saturday","sunday"].includes(e.toLowerCase())?e.toUpperCase():"MIDWEEK"}const ie="TICKET_INVALID_TOKEN",ne=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.drawSubmitAvailable=!1,this.rawData={},this.saleStatisticsInfo={},this.currentStake=void 0,this.dialogConfig={visible:!1}}async getLotteryTippingBulletResults(){return await this.childRef.getData()}get lineNumberRange(){const{betType:t}=Qt({rawData:this.rawData,selectedBettingType:this.selectedBettingType,selectedPlayingMode:this.selectedPlayingMode}),e=(null==t?void 0:t.boardsAllowed)||[0],[i,n]=[Math.min(...e),Math.max(...e)];return{minLineNumber:i,maxLineNumber:n,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===Zt.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,n,r;if(t===this.selectedBettingType)return;this.selectedBettingType=t;const a=(({bettingType:t,playTypeConfig:e,betTypeConfig:i,enabledPlayingModeOptions:n})=>{const r=i.filter((t=>t.enabled)).map((t=>t.id)),a=e.filter((t=>r.includes(t.betTypeId))).filter((e=>e.bettingType===t)).map((t=>t.playMode));return n.filter((t=>a.includes(t.code)))})({bettingType:this.selectedBettingType,playTypeConfig:this.playTypeConfig,betTypeConfig:this.betTypeConfig,enabledPlayingModeOptions:qt((null===(n=null===(i=null===(e=this.rawData)||void 0===e?void 0:e.rules)||void 0===i?void 0:i.poolGame)||void 0===n?void 0:n.playModes)||[])});this.playingModeOptions=a,a.length?a.map((t=>t.code)).includes(this.selectedPlayingMode)||(this.hasSelectBullet=!1,this.handlePlayingModeChange(null===(r=a[0])||void 0===r?void 0:r.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:Vt("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 Jt(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:n=1}=Qt({rawData:this.rawData,selectedBettingType:this.selectedBettingType,selectedPlayingMode:this.selectedPlayingMode}).betType||{};return e.some((t=>{const e=this.calculateCombinationInLine(t);return e<i||e>n}))})({rawResults:t})})()}handleClientStylingChange(t,e){t!=e&&d(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&c(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}handleTimerStop(){this.drawSubmitAvailable=!0}componentWillLoad(){this.translationUrl&&(async t=>{if(t)try{const i=await fetch(t);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const n=await i.json();e=n,Object.keys(e).forEach((t=>{for(let i in e[t])Xt[t][i]=e[t][i]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&d(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&c(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}connectedCallback(){(()=>{let t=new URL(`${this.endpoint}/games/${this.gameId}`);this.isLoading=!0,Wt(t.href,"GET").then((t=>{var e,i,n,r,a,o,s;this.rawData=t,this.bettingTypeOptions=qt((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=qt((null===(r=null===(n=null==t?void 0:t.rules)||void 0===n?void 0:n.poolGame)||void 0===r?void 0:r.playModes)||[]),this.initiateCurrentStake();const{bettingType:l,playMode:d}=(({playTypeConfig:t=[],betTypeConfig:e=[],enabledBettingTypeOptions:i=[],enabledPlayingModeOptions:n=[]})=>{const r=e.filter((t=>t.enabled));for(const e of r){const{bettingType:r,playMode:a}=null==t?void 0:t.find((t=>t.betTypeId===e.id));if(i.map((t=>t.code)).includes(r)&&n.map((t=>t.code)).includes(a))return{bettingType:r,playMode:a}}return{}})({playTypeConfig:null===(o=null===(a=null==t?void 0:t.rules)||void 0===a?void 0:a.poolGame)||void 0===o?void 0:o.playTypes,betTypeConfig:null===(s=null==t?void 0:t.rules)||void 0===s?void 0:s.betTypes,enabledBettingTypeOptions:this.bettingTypeOptions,enabledPlayingModeOptions:this.playingModeOptions});return this.handleBettingTypeChange(l),this.selectedPlayingMode=d,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 Wt(`${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}=Qt({rawData:this.rawData,selectedBettingType:this.selectedBettingType,selectedPlayingMode:this.selectedPlayingMode}),n=new URL(`${this.endpoint}/tickets`),r=(({playerId:t,rawResults:e,gameId:i,rawData:n,amount:r,currentStake:a,betTypeId:o,betType:s})=>{var l;const d={playerId:t,tickets:[]},c=(t=>{const e=t=>t.map((t=>t.isSelected?1:0)),i=t.map((t=>t.map(e))),n=[];return i.forEach(((t,e)=>{const i=[];t.forEach(((t,e)=>{const n=t.map(((t,e)=>t?Kt[e]:null)).filter(Boolean);i[e]=[n]})),n[e]=i})),n})(e),h=a||{};return d.tickets.push({startingDrawId:null===(l=null==n?void 0:n.currentDraw)||void 0===l?void 0:l.id,amount:r,gameId:i,gameName:n.name,currency:h.currency,selection:c.map((t=>({betType:o,stake:+h.value,poolGameSelections:t,quickPick:!1,betName:s.name}))),multiplier:!1,drawCount:1,quickPick:!1}),d})({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 n={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,n).then((t=>{if(401===t.status)throw new Error(ie);if(t.status>300)throw new Error(t.statusText);return t.json().then((e=>{if(!(i=e.tickets)||!i.length||i.some((t=>t.state!==Rt.Purchased)))throw new Error(t.statusText);var i;return e}))}))})({body:r,sessionId:this.sessionId,url:n.href}).then((()=>{Yt({message:Vt("ticketSubmitted",this.language)}),this.clearBulletConfig(),this.updateSaleStatistics()})).catch((t=>{if(t.message===ie)return this.logoutEventHandler.emit(),void Yt({message:ie,theme:"error"});Yt({message:Vt("ticketFailed",this.language),theme:"error"})})).finally((()=>{this.submitLoading=!1}))}get lineCountRender(){const t=Jt(this.totalLineCombination);let e=Vt("lines",this.language);return[0,1].includes(+t)&&(e=Vt("line",this.language)),t+" "+e}renderBettingControls(){var t,e;const n=()=>i("div",{class:"skeleton-content"},i("div",{class:"skeleton-item skeleton-animated"})),r=()=>{var t;return i("div",null,i("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 i("div",{class:"LotteryTippingTicketController__top"},i("div",{class:"LotteryTippingTicketController__row"},i("div",{class:"LotteryTippingTicketController__section"},i("span",{class:"LotteryTippingTicketController__label"},Vt("bettingType",this.language)),this.bettingTypeOptions.length?(()=>i("div",{class:"LotteryTippingTicketController__segmented-control"},this.bettingTypeOptions.map((t=>i("button",{class:{LotteryTippingTicketController__segment:!0,"LotteryTippingTicketController__segment--active":this.selectedBettingType===t.code},onClick:this.handleBettingTypeChange.bind(this,t.code)},t.name)))))():n()),i("div",{class:"LotteryTippingTicketController__section"},i("span",{class:"LotteryTippingTicketController__label"},Vt("playingMode",this.language)),this.playingModeOptions.length?(()=>i("div",{class:"LotteryTippingTicketController__segmented-control"},this.playingModeOptions.map((t=>i("button",{class:{LotteryTippingTicketController__segment:!0,"LotteryTippingTicketController__segment--active":this.selectedPlayingMode===t.code},onClick:this.handlePlayingModeChange.bind(this,t.code)},t.name)))))():n()),(null===(t=this.stakeOptions)||void 0===t?void 0:t.length)>1&&i("div",{class:"LotteryTippingTicketController__section"},i("span",{class:"LotteryTippingTicketController__label"},Vt("stakePerLine",this.language)),r()),(null===(e=this.stakeOptions)||void 0===e?void 0:e.length)>1&&i("div",{class:"LotteryTippingTicketController__section"},i("span",{class:"LotteryTippingTicketController__label"},Vt("stakePerLine",this.language)),r())))}renderOrderSummary(){var t;return i("div",{class:"LotteryTippingTicketController__main--right order-summary"},i("h3",{class:"order-summary__title"},Vt("orderSummaryTitle",this.language)),i("div",{class:"order-summary__ticket-info"},i("div",{class:"order-summary__ticket"},Vt("orderSummaryTickets",this.language),":"),i("div",{class:"order-summary__details"},i("span",{class:"order-summary__line-count"},this.lineCountRender),i("div",null,this.currentStake&&i("span",{class:"order-summary__multiplier"},"x"),i("span",{class:"order-summary__stake"},this.currentStakeFormatted)),this.isBothBettingType&&i("div",null,i("span",{class:"order-summary__multiplier"},"x"),i("span",{class:"order-summary__stake"},this.bothBettingTypeMultiplier)))),i("hr",{class:"order-summary__divider"}),i("div",{class:"order-summary__ticket-info"},i("div",{class:"order-summary__ticket"},Vt("orderSummaryTotal",this.language),":"),i("span",{class:"order-summary__details"},this.totalAmountFormatted)),i("div",{class:"order-summary__button-wrapper"},i("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)||!this.drawSubmitAvailable,text:Vt("orderSummarySubmit",this.language)})))}render(){var t,e,n,r,a,o,s,l,d,c,h;return i("div",{key:"71d1e6567f13267094ca2bdc32caa02891ad8540",class:"lottery-tipping-ticket-controller__container",ref:t=>this.stylingContainer=t},i("lottery-banner",{key:"4393c6b8cf885f3aa6df61e0283172f99d22fd12","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,startTime:null===(r=null===(n=this.rawData)||void 0===n?void 0:n.currentDraw)||void 0===r?void 0:r.wagerStartTime,"banner-title":ee(null===(o=null===(a=this.rawData)||void 0===a?void 0:a.currentDraw)||void 0===o?void 0:o.date),turnover:te(null===(l=null===(s=this.saleStatisticsInfo)||void 0===s?void 0:s.wagerSegment)||void 0===l?void 0:l.totalSalesCrossDraw),language:this.language,"translation-url":this.translationUrl,"logo-url":this.logoUrl,onLotteryBannerTimerStop:this.handleTimerStop.bind(this)}),this.renderBettingControls(),i("div",{key:"d054f3970388474745f6e92e7aa028d4509e6250",class:"flex flex-wrap LotteryTippingTicketController__main"},i("div",{key:"736a9c1c2ff1d5c88252b64e6a90a08d185574a0",class:"LotteryTippingTicketController__main--left"},i("lottery-tipping-ticket-bet",{key:"3976fecaa6e049c6d3b7521e58c8fcdf37fa9db4",ref:t=>this.childRef=t,endpoint:this.endpoint,"session-id":this.sessionId,"game-id":null===(d=this.rawData)||void 0===d?void 0:d.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===Ut.SingleBet?"single":"multi","client-styling":this.clientStyling,"client-styling-Url":this.clientStylingUrl})),this.renderOrderSummary()),this.dialogConfig.visible&&i("vaadin-confirm-dialog",{key:"60415251900e4e1c12c14b78314d8085bfbc4c5b",rejectButtonVisible:!0,rejectText:Vt("cancel",this.language),confirmText:Vt("confirm",this.language),opened:null===(c=this.dialogConfig)||void 0===c?void 0:c.visible,onConfirm:this.dialogConfig.onConfirm,onReject:this.dialogConfig.onCancel},null===(h=this.dialogConfig)||void 0===h?void 0:h.content))}static get assetsDirs(){return["../static"]}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};ne.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}";var re,ae="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},oe={exports:{}};re=oe,function(t){
|
|
1
|
+
import{r as t,c as e,h as i,g as n,a as r,H as a}from"./index-c22bb7d4.js";import{r as o,t as s,a as l,s as d,b as c,c as h,f as p,d as g,i as f,g as u,p as m,e as b}from"./lottery-tipping-entrance-565275ea.js";export{L as lottery_tipping_entrance}from"./lottery-tipping-entrance-565275ea.js";function y(t,e){o(2,arguments);var i=s(t),n=l(e);return isNaN(n)?new Date(NaN):n?(i.setDate(i.getDate()+n),i):i}function v(t){o(1,arguments);var e=s(t);return e.setHours(0,0,0,0),e}function w(t,e){return o(2,arguments),s(t).getTime()-s(e).getTime()}var x={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},k="trunc";const T=class{constructor(i){t(this,i),this.onSelectDraw=e(this,"selectDraw",7),this.handleSelectDraw=()=>{this.onSelectDraw.emit()},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.language="en",this.infoImageUrl="",this.date="",this.isLoading=!1,this.turnover=""}handleClientStylingChange(t,e){t!=e&&d(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&c(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&d(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&c(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}formattedDay(t){let e=p({date:t,format:"EEEE"});return"wednesday"===e.toLowerCase()?"MIDWEEK":e.toUpperCase()}renderCurvedText(){const t=g("howToWin",this.language);return f(window.navigator.userAgent)?i("svg",{width:"320",height:"140",xmlns:"http://www.w3.org/2000/svg"},i("defs",null,i("path",{id:"curve",d:"M 30 80 A 100 30 0 0 1 300 80"})),i("text",{"font-family":"Comic Sans MS","font-size":"40",fill:"black","stroke-width":"2"},i("textPath",{href:"#curve"},t))):i("svg",{width:"500",height:"140",xmlns:"http://www.w3.org/2000/svg"},i("defs",null,i("path",{id:"curve",d:"M 40 110 A 120 20 0 0 1 450 110"})),i("text",{"font-family":"Comic Sans MS","font-size":"58",fill:"black","stroke-width":"2"},i("textPath",{href:"#curve"},t)))}get draw3DaysLater(){return y(new Date(this.date),3).toISOString()}get draw4DaysLater(){return y(new Date(this.date),4).toISOString()}renderBackground(){return i("div",{class:"draw-page__background"},i("div",{class:"top-waves"},i("svg",{class:"wave-svg",viewBox:"0 0 100 8",xmlns:"http://www.w3.org/2000/svg"},i("path",{d:"M0 4 Q25 0 50 4 T100 4",stroke:"rgba(255,255,255,0.7)","stroke-width":"3",fill:"none","stroke-linecap":"round"})),i("svg",{class:"wave-svg",viewBox:"0 0 100 8",xmlns:"http://www.w3.org/2000/svg"},i("path",{d:"M0 4 Q25 0 50 4 T100 4",stroke:"rgba(255,255,255,0.7)","stroke-width":"3",fill:"none","stroke-linecap":"round"})),i("svg",{class:"wave-svg",viewBox:"0 0 100 8",xmlns:"http://www.w3.org/2000/svg"},i("path",{d:"M0 4 Q25 0 50 4 T100 4",stroke:"rgba(255,255,255,0.7)","stroke-width":"3",fill:"none","stroke-linecap":"round"}))),i("div",{class:"dots-cluster"},new Array(27).fill(0).map((()=>i("div",{class:"dot"})))))}render(){return i("div",{key:"a14f3d9e82f3f1fb75e592043dff00f4948006b8",class:"draw-page",ref:t=>this.stylingContainer=t},this.renderBackground(),this.date?i("div",{class:"draw-info"},i("div",{class:"draw-info-title"},i("div",{class:"draw-info-title-main"},this.renderCurvedText()),i("div",{class:"draw-info-title-sub"},g("selectDraws",this.language))),i("div",{class:"draw-info-item-list"},i("div",{class:"draw-info-item",onClick:this.handleSelectDraw.bind(this)},i("div",{class:"draw-info-item-day"},this.formattedDay(this.date)),i("div",{class:"draw-info-item-date"},u(this.date)),i("div",{class:"draw-info-item-date"}," ",g("turnover",this.language)+this.turnover),i("div",{class:"draw-info-item-projecter"})),i("div",{class:"draw-info-item"},i("div",{class:"draw-info-item-day reverse"},this.formattedDay(this.draw3DaysLater)),i("div",{class:"draw-info-item-date"},u(this.draw3DaysLater)),i("div",{class:"draw-info-item-date"}," ",g("turnover",this.language)+"€0"),i("div",{class:"draw-info-item-projecter"})),i("div",{class:"draw-info-item"},i("div",{class:"draw-info-item-day"},this.formattedDay(this.draw4DaysLater)),i("div",{class:"draw-info-item-date"},u(this.draw4DaysLater)),i("div",{class:"draw-info-item-date"}," ",g("turnover",this.language)+"€0"),i("div",{class:"draw-info-item-projecter"}))),i("div",{class:"draw-info-footer"},i("div",{class:"draw-info-footer-text"},"BONUSPOTTER"),i("div",{class:"draw-info-footer-text"},"MIDWEEK FULL-TIME APPROX. €2.1 MILLION."),i("div",{class:"draw-info-footer-text"},"MIDWEEK HALF_TIME APPROX. €1 40.000."))):this.isLoading?i("div",{class:"loading-indicator"},"loading..."):i("div",{class:"empty-draw-wrap"},i("div",{class:"empty-draw"},i("div",{class:"empty-draw-logo",innerHTML:'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg height="1024" node-id="1" sillyvg="true" template-height="1024" template-width="1024" version="1.1" viewBox="0 0 1024 1024" width="1024" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs node-id="52"></defs><g node-id="165"><g node-id="176"><path d="M 715.70 689.10 L 724.50 691.70 L 724.10 693.20 L 715.20 690.50 L 715.70 689.10 Z M 733.50 693.80 L 742.60 695.40 L 742.40 696.90 L 733.20 695.30 L 733.50 693.80 Z M 751.70 696.50 L 760.90 697.00 L 760.90 698.60 L 751.60 698.10 L 751.70 696.50 Z M 901.10 462.70 L 902.50 461.90 L 906.90 470.10 L 905.50 470.80 L 901.10 462.70 Z M 770.10 697.00 L 779.30 696.40 L 779.40 698.00 L 770.10 698.60 L 770.10 697.00 Z M 909.30 479.20 L 910.70 478.60 L 914.10 487.30 L 912.60 487.80 L 909.30 479.20 Z M 788.40 695.30 L 797.50 693.70 L 797.80 695.20 L 788.60 696.80 L 788.40 695.30 Z M 915.50 496.50 L 917.00 496.10 L 918.30 500.60 L 919.30 505.10 L 917.80 505.40 L 915.50 496.50 Z M 806.40 691.50 L 815.20 688.80 L 815.70 690.30 L 806.80 693.00 L 806.40 691.50 Z M 919.60 514.50 L 921.10 514.20 L 922.40 523.40 L 920.80 523.60 L 919.60 514.50 Z M 823.90 685.60 L 832.30 681.90 L 833.00 683.30 L 824.50 687.00 L 823.90 685.60 Z M 921.50 532.80 L 923.10 532.70 L 923.30 542.00 L 921.70 542.00 L 921.50 532.80 Z M 840.50 677.70 L 848.40 673.00 L 849.20 674.30 L 841.20 679.00 L 840.50 677.70 Z M 921.30 551.20 L 922.90 551.30 L 922.00 560.60 L 920.40 560.40 L 921.30 551.20 Z M 856.10 667.90 L 863.40 662.30 L 864.40 663.50 L 857.00 669.10 L 856.10 667.90 Z M 919.00 569.50 L 920.50 569.80 L 918.50 578.90 L 917.00 578.50 L 919.00 569.50 Z M 870.40 656.30 L 877.00 649.90 L 878.10 651.00 L 871.40 657.50 L 870.40 656.30 Z M 914.60 587.30 L 916.10 587.80 L 913.10 596.60 L 911.60 596.00 L 914.60 587.30 Z M 883.30 643.20 L 889.10 636.10 L 890.30 637.10 L 884.40 644.30 L 883.30 643.20 Z M 908.00 604.50 L 909.40 605.10 L 905.40 613.50 L 904.00 612.80 L 908.00 604.50 Z M 894.60 628.60 L 899.60 620.80 L 900.90 621.60 L 895.90 629.40 L 894.60 628.60 Z" fill="#777f99" fill-rule="nonzero" group-id="1,12" node-id="60" stroke="none" target-height="236.69998" target-width="208.09998" target-x="715.2" target-y="461.9"></path></g><path d="M 702.70 684.10 L 707.00 685.90 L 706.40 687.40 L 702.00 685.60 L 702.70 684.10 Z" fill="#777f99" fill-rule="nonzero" group-id="1,13" node-id="65" stroke="none" target-height="3.3000488" target-width="5" target-x="702" target-y="684.1"></path></g><g node-id="166"><g node-id="178"><path d="M 198.90 515.60 L 196.00 511.80 L 197.30 510.90 L 200.10 514.60 L 198.90 515.60 Z" fill="#777f99" fill-rule="nonzero" group-id="2,14" node-id="73" stroke="none" target-height="4.6999817" target-width="4.100006" target-x="196" target-y="510.9"></path></g><g node-id="179"><path d="M 190.90 503.80 L 186.80 495.20 L 188.30 494.60 L 192.30 503.00 L 190.90 503.80 Z M 183.90 486.20 L 182.10 476.90 L 183.60 476.70 L 185.40 485.80 L 183.90 486.20 Z M 181.30 467.50 L 181.80 458.00 L 183.40 458.20 L 182.90 467.50 L 181.30 467.50 Z M 183.40 448.70 L 186.20 439.60 L 187.70 440.10 L 185.00 449.00 L 183.40 448.70 Z M 190.00 430.90 L 194.90 422.70 L 196.20 423.60 L 191.40 431.60 L 190.00 430.90 Z M 202.00 416.40 L 200.80 415.40 L 207.50 408.70 L 208.50 409.90 L 202.00 416.40 Z M 215.90 404.10 L 215.00 402.80 L 219.00 400.20 L 223.10 397.90 L 223.80 399.30 L 215.90 404.10 Z M 232.40 395.60 L 231.90 394.10 L 236.40 392.60 L 241.00 391.40 L 241.40 392.90 L 232.40 395.60 Z M 250.40 391.40 L 250.20 389.80 L 254.90 389.50 L 259.70 389.40 L 259.70 391.00 L 250.40 391.40 Z M 269.00 391.70 L 269.20 390.20 L 273.80 391.00 L 278.50 392.10 L 278.10 393.60 L 269.00 391.70 Z" fill="#777f99" fill-rule="nonzero" group-id="2,15" node-id="78" stroke="none" target-height="114.399994" target-width="97.2" target-x="181.3" target-y="389.4"></path></g><path d="M 286.90 396.50 L 287.50 395.10 L 291.80 397.00 L 291.10 398.40 L 286.90 396.50 Z" fill="#777f99" fill-rule="nonzero" group-id="2,16" node-id="83" stroke="none" target-height="3.2999878" target-width="4.899994" target-x="286.9" target-y="395.1"></path></g><g node-id="167"><path d="M 308.80 594.00 L 679.00 594.00 L 685.10 593.20 L 688.00 592.20 L 693.30 589.20 L 695.70 587.10 L 697.70 584.80 L 700.80 579.50 L 702.40 573.50 L 702.60 570.40 L 702.60 422.00 L 702.30 411.60 L 701.60 401.40 L 700.40 391.30 L 698.70 381.50 L 696.50 371.80 L 693.90 362.20 L 690.90 352.80 L 687.40 343.70 L 683.50 334.80 L 679.30 326.00 L 674.60 317.50 L 669.50 309.30 L 664.10 301.30 L 658.40 293.60 L 652.30 286.10 L 645.80 279.00 L 639.10 272.10 L 632.00 265.60 L 624.70 259.40 L 617.00 253.50 L 609.10 248.00 L 601.00 242.90 L 592.50 238.10 L 583.90 233.70 L 574.90 229.70 L 565.90 226.10 L 556.60 223.00 L 547.10 220.20 L 537.40 218.00 L 527.50 216.10 L 528.80 211.90 L 529.60 207.60 L 529.90 203.20 L 529.60 198.40 L 528.70 193.90 L 527.20 189.50 L 525.10 185.30 L 522.60 181.50 L 519.60 178.00 L 516.10 174.90 L 512.30 172.30 L 508.00 170.10 L 503.50 168.50 L 498.90 167.60 L 494.30 167.30 L 489.60 167.50 L 485.10 168.30 L 480.70 169.70 L 476.50 171.70 L 472.60 174.20 L 468.90 177.30 L 465.70 180.90 L 463.00 184.70 L 460.90 188.80 L 459.30 193.20 L 458.30 197.60 L 457.90 202.30 L 458.10 206.90 L 458.90 211.50 L 460.30 216.10 L 450.40 218.00 L 440.70 220.30 L 431.20 223.00 L 421.90 226.20 L 412.90 229.70 L 403.90 233.80 L 395.30 238.20 L 386.80 242.90 L 378.70 248.10 L 370.80 253.60 L 363.10 259.50 L 355.80 265.70 L 348.70 272.20 L 342.00 279.00 L 335.50 286.20 L 329.40 293.70 L 323.60 301.40 L 318.30 309.30 L 313.20 317.60 L 308.50 326.10 L 304.30 334.80 L 300.40 343.70 L 296.90 352.90 L 293.90 362.20 L 291.30 371.90 L 289.10 381.50 L 287.40 391.40 L 286.20 401.40 L 285.50 411.60 L 285.20 422.00 L 285.20 570.40 L 285.40 573.60 L 286.00 576.70 L 287.10 579.60 L 288.40 582.30 L 292.10 587.10 L 296.90 590.80 L 299.60 592.10 L 302.50 593.20 L 305.60 593.80 L 308.80 594.00 Z" fill="#bad6f7" fill-rule="nonzero" group-id="3" node-id="89" stroke="none" target-height="426.7" target-width="417.39996" target-x="285.2" target-y="167.3"></path></g><g node-id="168"><path d="M 493.80 798.40 L 503.30 797.60 L 512.20 795.40 L 517.80 793.20 L 523.20 790.40 L 528.20 787.20 L 532.80 783.40 L 537.00 779.20 L 540.80 774.60 L 544.00 769.60 L 546.80 764.20 L 549.00 758.60 L 550.30 754.20 L 551.80 745.00 L 552.00 740.20 L 435.60 740.20 L 435.80 745.30 L 436.50 750.30 L 437.60 755.30 L 439.10 760.10 L 441.00 764.80 L 443.30 769.30 L 446.10 773.50 L 449.10 777.60 L 452.60 781.40 L 456.40 784.90 L 460.40 788.00 L 464.70 790.70 L 469.20 793.00 L 473.90 794.90 L 478.70 796.40 L 483.60 797.50 L 488.70 798.20 L 493.80 798.40 Z" fill="#3a3a77" fill-rule="nonzero" group-id="4" node-id="94" stroke="none" target-height="58.200012" target-width="116.399994" target-x="435.6" target-y="740.2"></path></g><path d="M 782.90 675.10 L 770.80 651.00 L 767.90 645.70 L 764.50 640.80 L 760.60 636.00 L 756.30 631.60 L 751.80 627.60 L 747.10 624.00 L 742.00 620.80 L 737.00 618.20 L 731.90 616.10 L 726.70 614.50 L 721.70 613.50 L 716.80 613.20 L 270.90 613.20 L 266.00 613.50 L 261.00 614.50 L 255.80 616.10 L 250.70 618.20 L 245.70 620.80 L 240.60 624.00 L 235.90 627.60 L 231.40 631.60 L 227.10 636.00 L 223.20 640.70 L 219.80 645.70 L 216.90 651.00 L 204.80 675.10 L 202.60 680.00 L 200.90 684.70 L 199.80 689.10 L 199.10 693.30 L 198.80 697.60 L 199.00 701.60 L 199.60 705.20 L 200.60 708.50 L 202.10 711.70 L 203.90 714.50 L 206.20 716.90 L 208.90 719.00 L 211.90 720.60 L 215.30 721.80 L 219.10 722.60 L 223.60 722.90 L 764.20 722.90 L 768.60 722.60 L 772.50 721.80 L 775.90 720.60 L 778.80 719.00 L 781.50 716.90 L 783.80 714.40 L 785.70 711.70 L 787.20 708.50 L 788.20 705.20 L 788.80 701.50 L 789.00 697.60 L 788.70 693.30 L 788.00 689.10 L 786.80 684.70 L 785.10 680.00 L 782.90 675.10 Z" fill="#bad6f7" fill-rule="nonzero" node-id="97" stroke="none" target-height="109.70001" target-width="590.2" target-x="198.8" target-y="613.2"></path><path d="M 499.30 798.20 L 504.90 797.40 L 510.20 796.10 L 515.30 794.40 L 520.20 792.20 L 524.80 789.50 L 529.20 786.50 L 533.20 783.20 L 536.90 779.40 L 540.30 775.40 L 543.30 771.10 L 545.90 766.50 L 548.10 761.60 L 549.80 756.50 L 551.00 751.30 L 551.80 745.90 L 552.10 740.20 L 499.30 740.20 L 499.30 798.20 Z" fill="#3a3a77" fill-rule="nonzero" node-id="99" stroke="none" target-height="58" target-width="52.799988" target-x="499.3" target-y="740.2"></path><g node-id="169"><path d="M 770.80 650.90 L 767.90 645.60 L 764.50 640.70 L 760.60 635.90 L 756.30 631.50 L 751.80 627.50 L 747.10 623.90 L 742.00 620.70 L 737.00 618.10 L 731.90 616.00 L 726.70 614.40 L 721.70 613.40 L 716.80 613.10 L 499.30 613.10 L 499.30 722.80 L 764.20 722.80 L 768.70 722.50 L 772.50 721.70 L 775.90 720.50 L 778.90 718.90 L 781.60 716.80 L 783.90 714.40 L 785.70 711.60 L 787.20 708.50 L 788.20 705.10 L 788.80 701.50 L 789.00 697.60 L 788.70 693.20 L 788.00 689.00 L 786.90 684.60 L 785.20 680.00 L 783.00 675.00 L 770.80 650.90 Z" fill="#cedfff" fill-rule="nonzero" group-id="5" node-id="103" stroke="none" target-height="109.70001" target-width="289.7" target-x="499.3" target-y="613.1"></path></g><path d="M 729.60 182.10 L 765.70 216.40 L 694.00 242.10 L 729.60 182.10 Z" fill="#d3dcf4" fill-rule="nonzero" node-id="106" stroke="none" target-height="60" target-width="71.70001" target-x="694" target-y="182.1"></path><path d="M 704.20 261.10 L 808.40 236.60 L 808.40 288.70 L 704.20 261.10 Z" fill="#d3dcf4" fill-rule="nonzero" node-id="108" stroke="none" target-height="52.100006" target-width="104.20001" target-x="704.2" target-y="236.6"></path><path d="M 916.20 528.70 L 881.90 501.00 L 746.80 491.40 L 743.30 490.90 L 740.00 490.00 L 736.90 488.70 L 734.10 487.00 L 731.50 484.90 L 729.20 482.60 L 727.20 480.00 L 725.60 477.10 L 724.30 474.00 L 723.40 470.80 L 723.00 467.40 L 723.00 463.90 L 726.90 408.90 L 727.40 405.40 L 728.30 402.10 L 729.60 399.10 L 731.30 396.20 L 733.40 393.60 L 735.70 391.30 L 738.30 389.30 L 741.20 387.70 L 744.30 386.40 L 747.50 385.50 L 750.90 385.10 L 754.40 385.10 L 901.10 395.60 L 904.60 396.10 L 907.90 397.00 L 911.00 398.40 L 913.80 400.10 L 916.40 402.10 L 918.70 404.40 L 920.70 407.10 L 922.30 409.90 L 923.60 413.00 L 924.50 416.20 L 924.90 419.60 L 924.90 423.10 L 921.00 478.10 L 916.20 528.70 Z" fill="#4c96ec" fill-rule="nonzero" node-id="110" stroke="none" target-height="143.6" target-width="201.90002" target-x="723" target-y="385.1"></path><path d="M 796.50 440.10 L 796.20 443.70 L 795.30 446.90 L 793.80 450.00 L 791.90 452.70 L 789.50 455.10 L 786.80 457.00 L 783.70 458.50 L 780.50 459.40 L 776.90 459.70 L 773.30 459.40 L 770.10 458.50 L 767.00 457.00 L 764.30 455.10 L 761.90 452.70 L 760.00 450.00 L 758.50 446.90 L 757.60 443.70 L 757.30 440.10 L 757.60 436.50 L 758.50 433.30 L 760.00 430.20 L 761.90 427.50 L 764.30 425.10 L 767.00 423.20 L 770.10 421.70 L 773.30 420.80 L 776.90 420.50 L 780.50 420.80 L 783.70 421.70 L 786.80 423.20 L 789.50 425.10 L 791.90 427.50 L 793.80 430.20 L 795.30 433.30 L 796.20 436.50 L 796.50 440.10 Z" fill="#fe9f39" fill-rule="nonzero" node-id="112" stroke="none" target-height="39.200012" target-width="39.200012" target-x="757.3" target-y="420.5"></path><path d="M 823.30 435.40 L 883.20 439.70 L 886.20 440.50 L 888.60 442.10 L 890.30 444.50 L 891.10 447.40 L 891.10 449.00 L 890.30 452.00 L 888.70 454.40 L 886.30 456.10 L 883.40 456.90 L 820.30 452.30 L 817.60 451.10 L 815.60 449.10 L 814.30 446.40 L 814.00 443.30 L 814.80 440.30 L 816.40 437.90 L 818.80 436.20 L 821.70 435.40 Z" fill="#ebf0ff" fill-rule="nonzero" node-id="114" stroke="none" target-height="21.5" target-width="77.099976" target-x="814" target-y="435.4"></path><g node-id="170"><path d="M 151.30 615.80 L 151.80 610.50 L 154.90 595.30 L 158.70 582.20 L 161.30 575.30 L 164.20 568.50 L 170.10 557.70 L 172.90 553.80 L 180.50 544.30 L 185.40 538.60 L 196.10 528.10 L 201.80 523.30 L 207.90 518.80 L 214.30 514.70 L 221.10 510.90 L 228.00 507.50 L 235.40 504.50 L 243.30 501.90 L 251.60 499.70 L 259.90 498.00 L 268.80 496.80 L 278.30 496.00 L 288.50 495.70 L 297.90 496.00 L 307.00 496.70 L 315.70 497.80 L 324.10 499.40 L 332.60 501.40 L 340.50 503.80 L 348.00 506.50 L 355.10 509.50 L 362.00 513.10 L 368.40 516.80 L 374.20 520.80 L 379.50 525.10 L 384.50 529.80 L 388.70 534.60 L 392.40 539.60 L 395.50 544.70 L 397.50 549.10 L 399.10 553.50 L 400.20 558.10 L 400.90 562.70 L 401.20 567.40 L 400.90 572.10 L 400.20 576.70 L 399.10 581.30 L 397.50 585.70 L 395.50 590.10 L 392.40 595.20 L 388.70 600.20 L 384.40 605.00 L 379.40 609.70 L 374.20 614.00 L 368.40 618.00 L 362.00 621.70 L 355.00 625.30 L 348.00 628.30 L 340.50 631.00 L 332.50 633.40 L 324.10 635.40 L 315.70 637.00 L 307.00 638.10 L 297.90 638.80 L 288.50 639.10 L 277.00 638.80 L 266.30 638.10 L 256.30 636.90 L 246.90 635.20 L 239.30 633.40 L 232.20 631.30 L 225.60 628.90 L 219.50 626.20 L 213.80 623.20 L 208.20 619.80 L 203.10 616.10 L 198.50 612.00 L 194.30 607.70 L 190.50 603.00 L 187.80 602.10 L 185.00 601.70 L 182.20 601.90 L 176.50 603.30 L 169.50 606.70 L 155.70 615.70 L 153.70 616.70 L 152.50 616.90 L 151.80 616.60 L 151.30 615.80 Z" fill="#e0eaff" fill-rule="nonzero" group-id="6" node-id="118" stroke="none" target-height="143.39996" target-width="249.90001" target-x="151.3" target-y="495.7"></path></g><g node-id="171"><path d="M 237.00 541.10 L 300.10 541.10 L 302.10 541.40 L 303.80 542.10 L 305.30 543.30 L 306.50 544.80 L 307.20 546.50 L 307.50 548.50 L 307.20 550.50 L 306.50 552.20 L 305.30 553.70 L 303.80 554.90 L 302.10 555.60 L 300.10 555.90 L 237.00 555.90 L 235.00 555.60 L 233.30 554.90 L 231.80 553.70 L 230.60 552.20 L 229.90 550.50 L 229.60 548.50 L 229.90 546.50 L 230.70 544.80 L 231.80 543.30 L 233.30 542.10 L 235.10 541.40 L 237.00 541.10 Z" fill="#3a3a77" fill-rule="nonzero" group-id="7" node-id="123" stroke="none" target-height="14.800049" target-width="77.899994" target-x="229.6" target-y="541.1"></path></g><g node-id="172"><path d="M 346.70 547.80 L 346.00 551.70 L 344.10 554.90 L 341.30 557.30 L 339.60 558.10 L 335.70 558.80 L 331.80 558.10 L 330.10 557.30 L 327.30 554.90 L 325.40 551.70 L 324.70 547.80 L 325.40 543.90 L 327.30 540.70 L 330.10 538.30 L 331.80 537.50 L 335.70 536.80 L 339.60 537.50 L 342.80 539.40 L 345.20 542.20 L 346.00 543.90 L 346.70 547.80 Z" fill="#fe9f39" fill-rule="nonzero" group-id="8" node-id="128" stroke="none" target-height="22" target-width="22" target-x="324.7" target-y="536.8"></path></g><g node-id="173"><path d="M 237.00 579.10 L 300.10 579.10 L 302.10 579.40 L 303.80 580.10 L 305.30 581.30 L 306.50 582.80 L 307.20 584.50 L 307.50 586.50 L 307.20 588.50 L 306.50 590.20 L 305.30 591.70 L 303.80 592.90 L 302.10 593.60 L 300.10 593.90 L 237.00 593.90 L 235.00 593.60 L 233.30 592.90 L 231.80 591.70 L 230.60 590.20 L 229.90 588.50 L 229.60 586.50 L 229.90 584.50 L 230.70 582.80 L 231.80 581.30 L 233.30 580.10 L 235.10 579.40 L 237.00 579.10 Z" fill="#3a3a77" fill-rule="nonzero" group-id="9" node-id="133" stroke="none" target-height="14.800049" target-width="77.899994" target-x="229.6" target-y="579.1"></path></g><g node-id="174"><path d="M 346.70 584.00 L 346.00 587.90 L 344.10 591.10 L 341.30 593.50 L 339.60 594.30 L 335.70 595.00 L 331.80 594.30 L 328.60 592.40 L 326.20 589.60 L 324.90 586.00 L 324.90 582.00 L 326.20 578.40 L 327.30 576.90 L 330.10 574.50 L 333.70 573.20 L 337.70 573.20 L 339.60 573.70 L 342.80 575.60 L 345.20 578.40 L 346.00 580.10 L 346.70 584.00 Z" fill="#fe9f39" fill-rule="nonzero" group-id="10" node-id="138" stroke="none" target-height="21.799988" target-width="21.800018" target-x="324.9" target-y="573.2"></path></g><path d="M 746.70 838.40 L 746.70 767.10 L 699.10 767.10 L 699.10 838.40 L 699.40 839.30 L 720.20 851.50 L 721.50 852.00 L 723.10 852.10 L 726.10 851.30 L 745.20 840.30 L 746.20 839.50 L 746.70 838.40 Z" fill="#949fff" fill-rule="nonzero" node-id="141" stroke="none" target-height="85" target-width="47.600037" target-x="699.1" target-y="767.1"></path><path d="M 720.20 780.40 L 700.10 768.80 L 699.30 768.00 L 699.10 767.10 L 699.50 766.30 L 700.50 765.40 L 719.60 754.40 L 721.10 753.80 L 724.20 753.70 L 725.50 754.10 L 745.60 765.70 L 746.40 766.50 L 746.60 767.40 L 746.20 768.20 L 745.20 769.10 L 726.10 780.10 L 723.10 780.90 L 720.20 780.40 Z" fill="#dee6ff" fill-rule="nonzero" node-id="143" stroke="none" target-height="27.200012" target-width="47.5" target-x="699.1" target-y="753.7"></path><path d="M 115.50 836.70 L 115.50 662.50 L 67.90 662.50 L 67.90 836.70 L 68.20 837.60 L 68.90 838.20 L 89.00 849.80 L 90.30 850.30 L 91.90 850.40 L 94.90 849.60 L 114.00 838.60 L 114.90 837.80 L 115.50 836.70 Z" fill="#dee1f0" fill-rule="nonzero" node-id="145" stroke="none" target-height="187.90002" target-width="47.6" target-x="67.9" target-y="662.5"></path><path d="M 89.00 675.70 L 68.90 664.10 L 68.10 663.30 L 67.90 662.40 L 68.30 661.60 L 69.30 660.70 L 88.40 649.70 L 91.40 648.90 L 94.30 649.40 L 114.40 661.00 L 115.20 661.80 L 115.40 662.70 L 115.00 663.50 L 114.00 664.40 L 94.90 675.40 L 93.50 676.00 L 91.90 676.30 L 90.30 676.20 L 89.00 675.70 Z" fill="#fafbfd" fill-rule="nonzero" node-id="147" stroke="none" target-height="27.399963" target-width="47.5" target-x="67.9" target-y="648.9"></path><g node-id="175"><g node-id="181"><path d="M 977.00 861.10 L 30.00 861.10 L 30.30 854.90 L 31.10 852.00 L 32.30 849.40 L 34.00 847.00 L 36.00 845.00 L 38.40 843.30 L 41.00 842.10 L 43.90 841.30 L 47.00 841.00 L 960.00 841.00 L 963.10 841.30 L 966.00 842.10 L 968.60 843.30 L 971.00 845.00 L 973.00 847.00 L 974.70 849.40 L 975.90 852.00 L 976.70 854.90 L 977.00 861.10 Z" fill="#b7cdeb" fill-rule="nonzero" group-id="11,17" node-id="153" stroke="none" target-height="20.099976" target-width="947" target-x="30" target-y="841"></path></g></g><path d="M 781.10 806.50 L 779.10 811.10 L 777.70 815.60 L 777.10 818.80 L 777.40 831.00 L 777.90 833.60 L 778.80 836.00 L 780.20 838.20 L 782.10 840.10 L 784.20 841.70 L 787.10 843.00 L 790.60 843.90 L 795.30 844.40 L 821.60 845.20 L 827.70 844.70 L 833.50 843.60 L 839.10 842.00 L 844.50 839.90 L 849.70 837.30 L 854.80 834.10 L 858.70 831.20 L 860.40 829.50 L 862.30 826.00 L 862.90 818.70 L 863.50 817.10 L 864.70 815.50 L 875.40 811.70 L 897.10 805.20 L 901.90 803.00 L 903.80 801.50 L 905.20 799.60 L 906.40 796.30 L 906.90 792.40 L 907.60 790.90 L 910.10 788.30 L 913.30 786.20 L 918.60 783.50 L 937.90 775.70 L 947.90 770.00 L 949.50 768.20 L 949.90 767.20 L 949.90 763.00 L 950.30 760.40 L 951.00 758.20 L 953.50 754.10 L 958.00 750.00 L 965.80 743.90 L 970.10 739.70 L 974.00 735.10 L 974.00 729.20 L 972.70 726.80 L 971.10 724.70 L 969.20 723.00 L 964.80 720.40 L 962.30 719.60 L 958.40 718.90 L 954.40 718.80 L 950.50 719.30 L 940.30 722.20 L 934.40 722.50 L 931.60 722.00 L 926.10 720.00 L 917.70 714.60 L 914.80 713.50 L 911.70 712.90 L 908.60 712.90 L 905.30 713.40 L 902.00 714.50 L 898.90 715.90 L 895.80 717.90 L 892.90 720.30 L 882.90 730.00 L 880.20 731.70 L 877.40 732.70 L 874.40 733.30 L 871.20 733.30 L 864.40 732.30 L 861.20 732.30 L 858.40 732.90 L 855.60 733.90 L 852.90 735.50 L 850.20 737.80 L 845.80 742.50 L 833.90 757.60 L 830.50 761.10 L 826.60 763.30 L 824.40 763.80 L 819.90 763.90 L 818.10 764.30 L 814.80 765.90 L 809.20 769.90 L 804.00 774.10 L 799.30 778.70 L 794.90 783.60 L 790.90 788.80 L 787.30 794.40 L 784.00 800.30 L 781.10 806.50" fill="#b1c6d9" fill-rule="nonzero" node-id="157" stroke="none" target-height="132.29999" target-width="196.90002" target-x="777.1" target-y="712.9"></path><path d="M 190.10 807.80 L 185.40 803.00 L 182.70 800.90 L 179.80 799.10 L 176.60 797.90 L 171.40 796.70 L 170.00 795.90 L 167.00 792.70 L 163.30 787.30 L 160.90 784.40 L 155.90 780.00 L 153.50 778.70 L 151.70 778.20 L 149.80 778.20 L 145.50 779.00 L 143.60 779.10 L 140.00 778.00 L 138.40 776.90 L 134.40 772.80 L 131.80 770.60 L 126.00 767.00 L 123.30 766.30 L 119.10 767.00 L 117.30 767.70 L 112.50 771.10 L 110.30 772.30 L 108.20 772.90 L 106.00 772.80 L 99.70 771.20 L 92.60 770.90 L 90.20 771.30 L 88.10 772.20 L 86.30 773.60 L 84.70 775.40 L 82.90 779.00 L 83.40 780.90 L 85.70 783.50 L 96.10 792.90 L 98.20 795.70 L 98.10 798.60 L 99.70 801.20 L 101.20 802.70 L 103.80 804.40 L 114.90 809.00 L 120.80 812.10 L 123.20 814.40 L 123.90 815.90 L 124.50 819.10 L 125.00 820.10 L 127.20 821.80 L 148.40 828.70 L 150.20 830.30 L 151.00 834.90 L 151.80 836.80 L 153.00 838.50 L 156.30 841.00 L 162.70 843.80 L 167.10 845.30 L 176.20 847.10 L 185.50 847.30 L 195.00 845.90 L 197.20 845.20 L 198.90 844.30 L 200.20 843.00 L 201.20 841.40 L 201.90 839.40 L 202.30 836.90 L 202.30 833.00 L 201.90 829.40 L 201.10 826.00 L 198.40 819.50 L 196.70 816.40 L 193.60 812.00 L 190.10 807.80 Z" fill="#b0c6da" fill-rule="nonzero" node-id="159" stroke="none" target-height="81" target-width="119.4" target-x="82.9" target-y="766.3"></path><path d="M 191.00 838.00 L 190.30 837.90 L 179.70 827.80 L 170.10 819.20 L 161.40 812.00 L 152.40 805.10 L 137.40 794.80 L 130.10 790.50 L 118.20 784.50 L 110.20 781.20 L 104.20 779.10 L 94.30 776.60 L 93.90 776.40 L 94.20 775.70 L 99.00 776.60 L 104.50 778.10 L 110.60 780.20 L 118.70 783.60 L 130.60 789.60 L 137.90 793.90 L 153.10 804.30 L 162.10 811.20 L 170.80 818.40 L 180.50 827.00 L 191.10 837.20 L 191.00 838.00 Z" fill="#95b4ce" fill-rule="nonzero" node-id="161" stroke="none" target-height="62.299988" target-width="97.200005" target-x="93.9" target-y="775.7"></path><path d="M 787.20 834.60 L 788.30 834.40 L 802.90 820.40 L 816.30 808.20 L 828.70 797.60 L 841.40 787.40 L 852.90 778.60 L 863.50 771.20 L 874.30 764.10 L 884.00 758.20 L 892.70 753.40 L 909.30 745.20 L 926.10 738.60 L 933.80 736.20 L 947.10 733.00 L 947.70 732.60 L 947.70 732.00 L 947.30 731.50 L 946.60 731.40 L 940.30 732.80 L 925.50 737.10 L 908.60 743.70 L 891.80 751.90 L 883.10 756.80 L 873.30 762.70 L 862.50 769.80 L 851.90 777.30 L 840.20 786.10 L 827.50 796.30 L 815.00 807.00 L 801.50 819.20 L 786.90 833.30 L 786.70 833.80 L 787.20 834.60 Z" fill="#95b4ce" fill-rule="nonzero" node-id="163" stroke="none" target-height="103.19995" target-width="161" target-x="786.7" target-y="731.4"></path></svg>'}),i("div",{class:"empty-draw-content"},i("div",{class:"empty-draw-text"},"ⓘ ",g("gameNotAvailable",this.language))))))}static get assetsDirs(){return["static"]}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};T.style='.draw-page{width:100%;position:relative}.draw-page .draw-page__background{width:100%;height:100%;position:absolute;z-index:0;background:linear-gradient(to right, var(--emw--color-primary, #fed275), var(--emw--color-primary-variant, #ffe66f))}.draw-page .draw-page__background .top-waves{position:absolute;top:30px;left:20px;width:100px;height:60px}.draw-page .draw-page__background .wave{position:absolute;width:80px;height:4px;background:rgba(255, 255, 255, 0.7);border-radius:20px}.draw-page .draw-page__background .wave:nth-child(1){top:0;transform:rotate(-5deg);clip-path:polygon(0 0, 25% 100%, 50% 0, 75% 100%, 100% 0, 100% 100%, 0% 100%)}.draw-page .draw-page__background .wave:nth-child(2){top:20px;transform:rotate(-3deg);clip-path:polygon(0 0, 25% 100%, 50% 0, 75% 100%, 100% 0, 100% 100%, 0% 100%)}.draw-page .draw-page__background .wave:nth-child(3){top:40px;transform:rotate(-1deg);clip-path:polygon(0 0, 25% 100%, 50% 0, 75% 100%, 100% 0, 100% 100%, 0% 100%)}.draw-page .draw-page__background .wave-svg{position:absolute;width:100px;height:8px}.draw-page .draw-page__background .wave-svg:nth-child(1){top:0}.draw-page .draw-page__background .wave-svg:nth-child(2){top:20px}.draw-page .draw-page__background .wave-svg:nth-child(3){top:40px}.draw-page .draw-page__background .dots-cluster{position:absolute;bottom:100px;right:80px;width:120px;height:80px}.draw-page .draw-page__background .dot{position:absolute;border-radius:50%;background-color:rgba(255, 255, 255, 0.6)}.draw-page .draw-page__background .dot:nth-child(1){width:6px;height:6px;top:0px;left:0px}.draw-page .draw-page__background .dot:nth-child(2){width:8px;height:8px;top:0px;left:15px}.draw-page .draw-page__background .dot:nth-child(3){width:5px;height:5px;top:0px;left:32px}.draw-page .draw-page__background .dot:nth-child(4){width:7px;height:7px;top:0px;left:46px}.draw-page .draw-page__background .dot:nth-child(5){width:6px;height:6px;top:0px;left:62px}.draw-page .draw-page__background .dot:nth-child(6){width:8px;height:8px;top:0px;left:78px}.draw-page .draw-page__background .dot:nth-child(7){width:5px;height:5px;top:0px;left:95px}.draw-page .draw-page__background .dot:nth-child(8){width:7px;height:7px;top:15px;left:5px}.draw-page .draw-page__background .dot:nth-child(9){width:6px;height:6px;top:15px;left:20px}.draw-page .draw-page__background .dot:nth-child(10){width:8px;height:8px;top:15px;left:35px}.draw-page .draw-page__background .dot:nth-child(11){width:5px;height:5px;top:15px;left:52px}.draw-page .draw-page__background .dot:nth-child(12){width:7px;height:7px;top:15px;left:67px}.draw-page .draw-page__background .dot:nth-child(13){width:6px;height:6px;top:15px;left:83px}.draw-page .draw-page__background .dot:nth-child(14){width:8px;height:8px;top:30px;left:8px}.draw-page .draw-page__background .dot:nth-child(15){width:5px;height:5px;top:30px;left:25px}.draw-page .draw-page__background .dot:nth-child(16){width:7px;height:7px;top:30px;left:40px}.draw-page .draw-page__background .dot:nth-child(17){width:6px;height:6px;top:30px;left:55px}.draw-page .draw-page__background .dot:nth-child(18){width:8px;height:8px;top:30px;left:72px}.draw-page .draw-page__background .dot:nth-child(19){width:6px;height:6px;top:45px;left:12px}.draw-page .draw-page__background .dot:nth-child(20){width:7px;height:7px;top:45px;left:28px}.draw-page .draw-page__background .dot:nth-child(21){width:5px;height:5px;top:45px;left:44px}.draw-page .draw-page__background .dot:nth-child(22){width:8px;height:8px;top:45px;left:58px}.draw-page .draw-page__background .dot:nth-child(23){width:7px;height:7px;top:60px;left:15px}.draw-page .draw-page__background .dot:nth-child(24){width:6px;height:6px;top:60px;left:32px}.draw-page .draw-page__background .dot:nth-child(25){width:8px;height:8px;top:60px;left:48px}.draw-page .draw-page__background .dot:nth-child(26){width:5px;height:5px;top:75px;left:20px}.draw-page .draw-page__background .dot:nth-child(27){width:7px;height:7px;top:75px;left:35px}.draw-info{padding:16px}.draw-info-title{margin-bottom:36px;display:flex;justify-content:center;flex-direction:column;align-items:center;position:relative;color:var(--emw--color-typography, #000)}.draw-info-title-main{font-size:30px;font-weight:bold}.draw-info-title-sub{position:absolute;bottom:24px;font-weight:600}.draw-info-item-list{display:flex;justify-content:center;flex-wrap:wrap;gap:26px}.draw-info-item{cursor:pointer;text-align:center;padding:20px;width:164px;height:152px;background-color:var(--emw--color-background, #fff);color:var(--emw--color-typography, #000);border-radius:21% 25% 19% 22%/30% 30% 34% 27%;position:relative;display:flex;align-items:center;justify-content:center;flex-direction:column}.draw-info-item:hover{animation:jelly 0.6s ease}.draw-info-item:hover .draw-info-item-projector{animation:shadow-jelly 0.6s ease}.draw-info-item-day{font-size:10px;font-weight:bold;position:absolute;left:calc(50% - 31px);top:-28px;width:64px;height:64px;background:var(--emw--color-secondary-variant, rgb(255, 152, 0));border-radius:50%;display:flex;align-items:center;color:var(--emw--color-typography-tertiary, #fff);justify-content:center;font-style:italic}.draw-info-item-day.reverse{top:unset;bottom:-28px}.draw-info-item-date,.draw-info-item-turnover{margin-top:8px;font-size:16px;color:var(--emw--color-typography, #000);font-family:Arial, Helvetica, sans-serif}.draw-info-item-projecter{content:"";position:absolute;top:calc(100% + 40px);left:50%;transform:translateX(-50%);width:120px;height:20px;background:var(--emw--color-background, #fff);border-radius:50%;filter:blur(12px)}.draw-info-footer{width:100%;margin:0 auto;margin-top:100px;position:relative}.draw-info-footer-text{text-align:center;margin-top:12px;font-size:22px;color:var(--emw--color-typography, #000);font-family:"Comic Sans MS";font-weight:600}.empty-draw-wrap{display:flex;justify-content:center;align-items:center;width:100%;min-height:calc(100vh - 104px)}.empty-draw{width:240px;height:160px;padding:18px 12px 12px 12px;background:var(--emw--color-secondary, #fff3b9);position:relative;margin:0 auto;display:flex;justify-content:center;align-items:center;text-align:center;border-radius:12px}.empty-draw .empty-draw-logo{position:absolute;top:-64%;left:50%;transform:translateX(-50%);width:200px;height:200px}.empty-draw .empty-draw-logo svg{width:100%;height:100%}.empty-draw-content{display:flex;gap:4px}.empty-draw-text{font-size:14px;font-weight:bold;color:var(--emw--color-typography, #000)}.empty-draw svg{fill:var(--emw--color-typography, #000)}.loading-indicator{z-index:1;display:flex;justify-content:center;padding-top:40px;color:var(--emw--color-typography, #000)}.empty-draw-text{color:var(--emw--color-typography, #000)}@keyframes jelly{0%,100%{transform:scale(1)}25%{transform:scale(1.05, 0.95)}50%{transform:scale(0.95, 1.05)}75%{transform:scale(1.03, 0.97)}}@keyframes shadow-jelly{0%,100%{transform:translateX(-50%) scale(1);opacity:0.1}25%{transform:translateX(-50%) scale(1.1, 0.9);opacity:0.08}50%{transform:translateX(-50%) scale(0.9, 1.1);opacity:0.12}75%{transform:translateX(-50%) scale(1.05, 0.95);opacity:0.09}}';const C=class{constructor(i){t(this,i),this.change=e(this,"change",7),this.handleOutsideClick=t=>{t.composedPath().includes(this.el)||(this.dropdownOpen=!1,this.overflowOpen=!1)},this.toggleDropdown=t=>{t.stopPropagation(),this.dropdownOpen=!this.dropdownOpen,this.overflowOpen=!1},this.isSelected=t=>this.selectedValues.includes(t),this.selectItem=t=>{this.isSelected(t.value)||(this.selectedValues=[...this.selectedValues,t.value],this.change.emit(this.selectedValues))},this.toggleItem=t=>{this.isSelected(t.value)?this.removeItem(t.value):this.selectItem(t)},this.removeItem=(t,e)=>{e&&e.stopPropagation(),this.selectedValues=this.selectedValues.filter((e=>e!==t)),this.change.emit(this.selectedValues)},this.downIcon=n("../static/dropdown.svg"),this.upIcon=n("../static/dropup.svg"),this.isTouch="ontouchstart"in window,this.openOverflow=()=>{this.isTouch||(this.computePopoverPosition(),this.overflowOpen=!0)},this.closeOverflow=()=>{this.isTouch||(this.overflowOpen=!1)},this.toggleOverflow=t=>{t.stopPropagation(),this.computePopoverPosition(),this.overflowOpen=!this.overflowOpen},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.options=[],this.maxVisibleChips=2,this.placeholder="",this.selectedValues=[],this.dropdownOpen=!1,this.overflowOpen=!1,this.popoverStyle={top:"0px",left:"0px"}}handleClientStylingChange(t,e){t!=e&&d(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&c(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&d(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&c(this.stylingContainer,this.clientStylingUrl))}async clear(){this.selectedValues=[],this.change.emit(this.selectedValues)}componentWillLoad(){document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){document.removeEventListener("click",this.handleOutsideClick),this.stylingSubscription&&this.stylingSubscription.unsubscribe()}get selectedOptions(){return this.options.filter((t=>this.isSelected(t.value)))}get visibleChips(){return this.selectedOptions.slice(0,this.maxVisibleChips)}get hiddenChips(){return this.selectedOptions.slice(this.maxVisibleChips)}computePopoverPosition(){if(this.overflowChipEl&&this.el){const{left:t}=this.overflowChipEl.getBoundingClientRect(),{left:e,height:i}=this.el.getBoundingClientRect();this.popoverStyle={top:i-10+"px",left:t-e+"px"}}}render(){var t;return i("div",{key:"50b48397be3ede1907ab2c2abcd1cf2f43f69c13",class:"general-multi-select-container",ref:t=>this.stylingContainer=t},i("div",{key:"696a1bb1f221f8f5cf290fac040af10e2e5a115e",class:"multi-select-container",ref:t=>this.el=t},i("div",{key:"9ea92f01787b26d43054573a11896cf65065b073",class:"flex-row",onClick:this.toggleDropdown},i("div",{key:"f79720ca3ec383ee7f95b09483698ee18119c79a",class:"control"},this.visibleChips.map((t=>i("span",{class:"chip"},i("div",{class:"chip-text",title:t.text},t.text),i("div",{class:"remove-btn",onClick:e=>this.removeItem(t.value,e)},"×")))),this.hiddenChips.length>0&&i("span",{key:"25e9e527c33dd7a315dacb10cc51084fe69b9b7e",class:"chip overflow-chip",ref:t=>this.overflowChipEl=t,onMouseEnter:this.openOverflow,onMouseLeave:this.closeOverflow,onClick:this.toggleOverflow},"•••"),0===this.selectedValues.length&&i("span",{key:"b061de660a55f7a0d41ce9aa650108d3f38a9dc0",class:"placeholder"},this.placeholder)),i("div",{key:"f83b6517e88b3976cdc18590f8f1233cb2515230",class:"arrow"},i("img",{key:"1b61a49090237057b98e5ce8a4f7c1e3bfc9d4ba",class:"info-icon",src:this.dropdownOpen?this.upIcon:this.downIcon,style:{width:"18px"}}))),this.dropdownOpen&&i("div",{key:"e5b081007bcbdd251ce5ac235c1f19f17852c420",class:"dropdown"},this.options.map((t=>i("div",{class:{"dropdown-item":!0,selected:this.isSelected(t.value)},onClick:()=>this.toggleItem(t)},t.text)))),this.overflowOpen&&!!(null===(t=this.hiddenChips)||void 0===t?void 0:t.length)&&i("div",{key:"f8e3289042c69c569bebcd0a40d90f31261c6c12",class:"overflow-popover",style:{top:this.popoverStyle.top,left:this.popoverStyle.left},onMouseEnter:this.openOverflow,onMouseLeave:this.closeOverflow},this.hiddenChips.map((t=>i("span",{class:"chip"},i("span",{class:"chip-text",title:t.text},t.text),i("span",{class:"remove-btn",onClick:e=>this.removeItem(t.value,e)},"×")))))))}static get assetsDirs(){return["../static"]}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};C.style='.multi-select-container{position:relative;font-family:"Inter", sans-serif;margin-top:4px;width:100%}.flex-row{display:flex;flex-direction:row;align-items:center;flex-wrap:nowrap;padding:6px 10px;padding-right:6px;border-radius:0.25em;background:var(--emw-selector-color-background, #e8ebef);cursor:pointer}.control{flex:1;display:flex;align-items:center;flex-wrap:nowrap;overflow:hidden}.control:focus-within{border-color:var(--emw--color-primary, #fed275);box-shadow:0 0 0 2px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15))}.chip{display:inline-flex;align-items:center;background:var(--emw--color-gray-50, #f5f5f5);color:var(--emw--color-dialog-typography, #000);border-radius:4px;padding:2px 8px;margin-right:6px;font-size:0.875rem;line-height:1.2;justify-content:space-between;flex:0 1 auto;min-width:0}.chip-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.overflow-chip{background:var(--emw--color-gray-100, #e6e6e6);color:var(--emw--color-gray-300, #333);width:20px;text-align:center;display:block}.remove-btn{background:none;border:none;font-size:1rem;margin-left:6px;cursor:pointer;color:var(--emw--color-gray-150, #6f6f6f)}.remove-btn:hover{color:var(--emw--color-error, red)}.placeholder{color:var(--emw--color-gray-150, #6f6f6f);font-size:0.875rem;padding:3px 8px;padding-left:0;line-height:1.2}.arrow{margin-left:auto;font-size:0.8rem;width:20px;color:var(--emw--color-gray-150, #6f6f6f)}.dropdown{position:absolute;top:calc(100% + 4px);left:0;width:100%;max-height:240px;overflow-y:auto;border:1px solid var(--emw--color-gray-100, #e6e6e6);border-radius:6px;background:var(--emw--color-dialog-background, #ffffff);box-shadow:0 4px 12px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15));z-index:10}.dropdown-item{padding:10px 14px;cursor:pointer;font-size:0.875rem;line-height:1.4;transition:background 0.2s}.dropdown-item:hover{background:var(--emw--color-background-tertiary, #ccc);color:var(--emw--color-typography, #000)}.dropdown-item.selected{background:var(--emw--color-background-secondary, #f5f5f5);color:var(--emw--color-typography, #000);font-weight:500}.overflow-popover{position:absolute;top:var(--overflow-top, 0px);left:var(--overflow-left, 0px);max-width:200px;padding:12px;display:flex;flex-wrap:wrap;gap:6px;border:1px solid var(--emw--color-gray-100, #d0d5dd);border-radius:6px;background:var(--emw--color-background, #ffffff);box-shadow:0 4px 12px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15));z-index:20}';const _=class{constructor(e){t(this,e),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.position="top",this.delay=200,this.isVisible=!1,this._tooltipId=void 0}handleClientStylingChange(t,e){t!=e&&d(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&c(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentWillLoad(){this._tooltipId=`general-tooltip-${Math.random().toString(36).substring(2,9)}`}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&d(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&c(this.stylingContainer,this.clientStylingUrl))}handleMouseEnterOrFocus(){clearTimeout(this.hideTimeout),this.showTimeout&&clearTimeout(this.showTimeout),this.showTimeout=setTimeout((()=>{this.isVisible=!0}),this.delay)}handleMouseLeaveOrBlur(){this.showTimeout&&clearTimeout(this.showTimeout),this.hideTimeout=setTimeout((()=>{this.isVisible=!1}),100)}handleKeyDown(t){"Escape"===t.key&&this.isVisible&&(this.isVisible=!1)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe(),clearTimeout(this.showTimeout),clearTimeout(this.hideTimeout)}render(){const t={"general-tooltip-popup":!0,visible:this.isVisible,[`general-tooltip-${this.position}`]:!0};return i("div",{key:"c0d52518e1e196e0d022789f7c6b7e64173b2c7d",class:"general-tooltip-wrapper"},i("slot",{key:"a935e103e16b0b619a024706e8224f4a937de6b9",name:"trigger"}),i("div",{key:"35c60e35ce3f8d5c2c42cd333fe64a3b289d34d4",class:"general-tooltip-container",role:"tooltip",ref:t=>this.stylingContainer=t},i("div",{key:"9d3fd9f142c1e3bd263dee289a2c1a9e4eebfddc",id:this._tooltipId,class:t,role:"tooltip"},i("slot",{key:"31344f0d4d4139f913d1819cc4f42a39f5113d8a",name:"content"}),i("div",{key:"f5cdd93060baec37b2a2879056efe2d66c5a553a",class:"general-tooltip-arrow"}))))}get hostElement(){return r(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};_.style=".general-tooltip-wrapper{display:inline-block;position:relative;line-height:0}.general-tooltip-container{display:contents;}.general-tooltip-popup{position:absolute;color:var(--emw--color-typography-inverse, #fff);background:var(--emw--color-background-inverse, #000);padding:8px 12px;border-radius:4px;font-size:0.875em;line-height:1.4;z-index:1000;opacity:0;visibility:hidden;transition:opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;white-space:nowrap;pointer-events:none;}.general-tooltip-popup.visible{opacity:1;visibility:visible}.general-tooltip-arrow{position:absolute;width:0;height:0;border-style:solid}.general-tooltip-top{bottom:100%;left:50%;transform:translateX(-50%);margin-bottom:8px;}.general-tooltip-top .general-tooltip-arrow{top:100%;left:50%;transform:translateX(-50%);border-width:6px 6px 0 6px;border-color:var(--emw--color-gray-300, #333) transparent transparent transparent}.general-tooltip-bottom{top:100%;left:50%;transform:translateX(-50%);margin-top:8px;}.general-tooltip-bottom .general-tooltip-arrow{bottom:100%;left:50%;transform:translateX(-50%);border-width:0 6px 6px 6px;border-color:transparent transparent var(--emw--color-gray-300, #333) transparent}.general-tooltip-left{right:100%;top:50%;transform:translateY(-50%);margin-right:8px;}.general-tooltip-left .general-tooltip-arrow{left:100%;top:50%;transform:translateY(-50%);border-width:6px 0 6px 6px;border-color:transparent transparent transparent var(--emw--color-gray-300, #333)}.general-tooltip-right{left:100%;top:50%;transform:translateY(-50%);margin-left:8px;}.general-tooltip-right .general-tooltip-arrow{right:100%;top:50%;transform:translateY(-50%);border-width:6px 6px 6px 0;border-color:transparent var(--emw--color-gray-300, #333) transparent transparent}";const S=["ro","en","fr","ar","hr"],M={en:{stop:"Stop",at:"at",turnover:"Turnover: ",startIn:"Sales Start in:"},ro:{stop:"Oprește",at:"la"},fr:{stop:"Arrêtez",at:"à"},ar:{stop:"توقف",at:"في"},hr:{stop:"Stop",at:"u"}},z=(t,e)=>{const i=e;return M[void 0!==i&&S.includes(i)?i:"en"][t]},j=({date:t,type:e="date",format:i})=>{try{const n=m(t);if(isNaN(n.getTime()))throw new Error(`Invalid date: ${t}`);if(i)return b(n,i);let r="dd/MM/yyyy";return"time"===e?r="dd/MM/yyyy HH:mm:ss":"week"===e&&(r="ccc dd/MM/yyyy HH:mm:ss"),b(n,r)}catch(t){return console.error("Error formatting date:",t.message),""}};function N(t){if(t)return function(t){return o(1,arguments),function(t,e){o(2,arguments);var i=v(t),n=v(e);return i.getTime()===n.getTime()}(t,Date.now())}(new Date(t))?j({date:t,format:"HH:mm"}):j({date:t,format:"dd/MM/yyyy HH:mm"})}function D(t,e){if(!t)return;let i=function(t,e,i){o(2,arguments);var n,r=w(t,e)/1e3;return((n=null==i?void 0:i.roundingMethod)?x[n]:x[k])(r)}("string"==typeof t?m(t):t,e&&new Date);if(i<0)return"0D 00H 00M 00S";const n=Math.floor(i/86400);i%=86400;const r=Math.floor(i/3600);i%=3600;const a=Math.floor(i/60),s=i%60;return`${n}D ${r.toString().padStart(2,"0")}H ${a.toString().padStart(2,"0")}M ${s.toString().padStart(2,"0")}S`}const $=class{constructor(i){t(this,i),this.lotteryBannerTimerStop=e(this,"lotteryBannerTimerStop",7),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.logoUrl=void 0,this.stopTime="",this.startTime="",this.bannerTitle=void 0,this.turnover=void 0,this.layout="logo,title,info",this.formattedTime=void 0}handleClientStylingChange(t,e){t!==e&&d(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!==e&&c(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!==e&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}handleTimeChange(){this.startTimer()}async componentWillLoad(){this.translationUrl&&(async t=>{if(t)try{const i=await fetch(t);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const n=await i.json();e=n,Object.keys(e).forEach((t=>{for(let i in e[t])M[t][i]=e[t][i]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl),this.startTimer()}startTimer(){this.timer&&clearInterval(this.timer),this.updateTime(),this.timer=setInterval((()=>{this.updateTime()}),1e3)}updateTime(){var t;this.formattedTime=function(t,e){const i=new Date;return t&&function(t,e){o(2,arguments);var i=s(t),n=s(e);return i.getTime()<n.getTime()}(i,m(t))?{start:D(t,i)}:t&&e&&function(t,e){o(2,arguments);var i=s(t).getTime(),n=s(e.start).getTime(),r=s(e.end).getTime();if(!(n<=r))throw new RangeError("Invalid interval");return i>=n&&i<=r}(i,{start:m(t),end:m(e)})?{end:N(e)}:{}}(this.startTime,this.stopTime),(null===(t=this.formattedTime)||void 0===t?void 0:t.end)&&(this.timer&&clearInterval(this.timer),this.lotteryBannerTimerStop.emit())}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&d(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&c(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe(),this.timer&&clearInterval(this.timer)}renderElement(t,e=""){var n,r,a;switch(t){case"logo":return i("div",{class:`lottery-banner__logo-wrapper ${e}`},this.logoUrl&&i("img",{alt:"logo",src:this.logoUrl,class:"lottery-banner__logo"}));case"title":return this.bannerTitle&&i("div",{class:`lottery-banner__title ${e}`},this.bannerTitle);case"info":return i("div",{class:`lottery-banner__info ${e}`},(null===(n=this.formattedTime)||void 0===n?void 0:n.start)&&i("div",{class:"lottery-banner__info-item"},i("span",{class:"lottery-banner__info-item-label"},i("span",{class:"lottery-banner__info-item-label__strong"},z("startIn",this.language))," "),i("span",{class:"lottery-banner__info-item-value lottery-banner__info-item-value__strong"},this.formattedTime.start)),(null===(r=this.formattedTime)||void 0===r?void 0:r.end)&&i("div",{class:"lottery-banner__info-item"},i("span",{class:"lottery-banner__info-item-label"},i("span",{class:"lottery-banner__info-item-label__strong"},z("stop",this.language))," ",z("at",this.language)),i("span",{class:"lottery-banner__info-item-value"},this.formattedTime.end)),(null===(a=this.formattedTime)||void 0===a?void 0:a.end)&&null!=this.turnover&&i("div",{class:"lottery-banner__info-item"},i("span",{class:"lottery-banner__info-item-label"},z("turnover",this.language)),i("span",{class:"lottery-banner__info-item-value"},this.turnover)));default:return null}}render(){const t=this.layout.split(",").map((t=>t.trim()));return i("section",{key:"de09c785c74e1182381ba3332899158da814240d",ref:t=>this.stylingContainer=t,class:"lottery-banner"},t.map(((e,i)=>this.renderElement(e,3===t.length&&1===i?"lottery-banner__item--center":""))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],startTime:["handleTimeChange"],stopTime:["handleTimeChange"]}}};$.style=":host {\n display: block;\n container-type: inline-size;\n}\n\n.lottery-banner {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--lottery-banner-gap, 0.5rem);\n padding: var(--lottery-banner-padding, 0px 20px);\n background: var(--lottery-banner-background, var(--emw--color-primary, #fed275));\n border-top: var(--lottery-banner-border-width, 2px) var(--lottery-banner-border-style, solid) var(--lottery-banner-border-color, var(--emw--color-primary, #fed275));\n border-bottom: var(--lottery-banner-border-width, 2px) var(--lottery-banner-border-style, solid) var(--lottery-banner-border-color, var(--emw--color-primary, #fed275));\n border-left: var(--lottery-banner-border-left, none);\n border-right: var(--lottery-banner-border-right, none);\n border-radius: var(--lottery-banner-border-radius, 0);\n white-space: nowrap;\n height: var(--lottery-banner-height, 50px);\n position: relative;\n box-sizing: border-box;\n}\n\n.lottery-banner__logo-wrapper {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n}\n.lottery-banner__logo-wrapper img {\n height: 100%;\n object-fit: var(--lottery-banner-logo-object-fit, contain);\n}\n\n.lottery-banner__item--center {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n\n.lottery-banner__title {\n text-align: center;\n font-size: var(--lottery-banner-title-font-size, 1.5rem);\n font-weight: 800;\n font-style: italic;\n letter-spacing: var(--lottery-banner-title-font-letter-spacing, 0.04em);\n color: var(--emw--color-typography, #000);\n}\n\n.lottery-banner__info {\n display: flex;\n align-items: center;\n gap: var(--lottery-banner-info-gap, 0.75rem);\n}\n\n.lottery-banner__info-item {\n font-size: var(--lottery-banner-info-font-size, 0.9rem);\n color: var(--lottery-banner-info-color, var(--emw--color-typography, #000));\n display: inline-flex;\n align-items: center;\n gap: 0.3rem;\n}\n\n.lottery-banner__info-item-label {\n color: var(--lottery-banner-info-label-color, var(--emw--color-typography, #000));\n}\n.lottery-banner__info-item-label__strong {\n font-weight: var(--lottery-banner-info-label-font-weight, 700);\n}\n\n.lottery-banner__info-item-value {\n font-weight: var(--lottery-banner-info-value-font-weight, inherit);\n color: var(--lottery-banner-info-value-color, var(--emw--color-typography, #000));\n}\n.lottery-banner__info-item-value__strong {\n font-weight: 700;\n}\n\n@container (max-width: 700px) {\n .lottery-banner {\n height: auto;\n padding: var(--lottery-banner-mobile-padding, 0.5rem 1rem);\n }\n .lottery-banner__title {\n flex-basis: 100%;\n text-align: var(--lottery-banner-mobile-title-text-align, left);\n }\n .lottery-banner__info {\n flex-direction: column;\n align-items: flex-start;\n gap: var(--lottery-banner-mobile-info-gap, 0.1rem);\n }\n}";const O=["ro","en","fr","ar","hr","zh"],I={en:{loading:"Loading"},ro:{},fr:{},ar:{},hr:{}},B=class{constructor(e){t(this,e),this.handleClick=t=>{if(this.disabled)return;const e=this.host.shadowRoot.querySelector(".btn");if(!e)return;const i=e.getBoundingClientRect(),n=Math.max(i.width,i.height),r={top:t.clientY-i.top-n/2,left:t.clientX-i.left-n/2,size:n};this.ripples=[...this.ripples,r],setTimeout((()=>{this.ripples=this.ripples.filter((t=>t!==r))}),600)},this.variant="primary",this.size="medium",this.color=void 0,this.disabled=!1,this.loading=!1,this.text=void 0,this.mbSource=void 0,this.language="en",this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.ripples=[]}handleClientStylingChange(t,e){t!=e&&d(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&c(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&d(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&c(this.stylingContainer,this.clientStylingUrl))}componentWillLoad(){this.translationUrl&&(async t=>{if(t)try{const i=await fetch(t);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const n=await i.json();e=n,Object.keys(e).forEach((t=>{for(let i in e[t])I[t][i]=e[t][i]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl)}render(){const{variant:t,disabled:e,size:n,color:r}=this,a=e||this.loading,o={};if(r)switch(t){case"primary":default:Object.assign(o,{backgroundColor:r,borderColor:r});break;case"outline":case"dashed":Object.assign(o,{color:r,borderColor:r});break;case"text":Object.assign(o,{color:r})}return i("button",{key:"aa74ad98c90e7548228557bf8a8d26b125d4a83a",class:{btn:!0,[`btn--${t}`]:!0,[`btn--${n}`]:!0,"btn--loading":this.loading},style:r?o:void 0,disabled:a,onClick:this.handleClick,ref:t=>this.stylingContainer=t},this.loading?i("div",{class:"loading-container"},i("span",{class:"content"},this.text||(()=>{const t=this.language;let e=I[void 0!==t&&O.includes(t)?t:"en"].loading;return e})()),i("span",{class:"spinner"})):i("span",{class:"content"},i("slot",{name:"icon-left"}),this.text||i("slot",null),i("slot",{name:"icon-right"})),i("div",{key:"302ea02be395bb24989d4abc040a513e23fa029a",class:"ripple-container"},this.ripples.map(((t,e)=>i("span",{key:e,class:"ripple",style:{top:`${t.top}px`,left:`${t.left}px`,width:`${t.size}px`,height:`${t.size}px`}})))))}get host(){return r(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};B.style=":host{display:inline-block}.btn{font:inherit;position:relative;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:var(--lottery-button-border-radius, 6px);font-weight:var(--lottery-button-font-weight, 500);cursor:pointer;outline:none;overflow:hidden;transition:var(--lottery-button-transition, background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s);user-select:none;-webkit-tap-highlight-color:transparent;box-shadow:var(--lottery-button-box-shadow, 0 2px 4px 0 rgba(0, 0, 0, 0.5))}.btn .content{position:relative;display:inline-flex;align-items:center;gap:var(--lottery-button-content-gap, 0.5em)}.btn .content ::slotted(span){display:inline-flex;align-items:center}.btn:hover:not(:disabled){box-shadow:var(--lottery-button-hover-box-shadow, 0 4px 8px 0 rgba(0, 0, 0, 0.5))}.btn:disabled{cursor:not-allowed;opacity:var(--lottery-button-disabled-opacity, 0.5)}.btn .loading-container{display:flex;align-items:center}.btn--loading{position:relative}.btn .spinner{display:inline-block;width:1em;height:1em;border:var(--lottery-button-spinner-border, 2px solid rgba(255, 255, 255, 0.3));border-radius:50%;border-top-color:var(--lottery-button-spinner-color, white);animation:spin 1s ease-in-out infinite;margin-left:0.5em;vertical-align:middle}.btn--small .spinner{width:0.8em;height:0.8em}.btn--large .spinner{width:1.2em;height:1.2em}@keyframes spin{to{transform:rotate(360deg)}}.btn--primary{background-color:var(--emw--color-primary, #0d196e);color:var(--emw--color-typography-inverse, #fff)}.btn--primary:hover:not(:disabled){background-color:var(--emw--color-primary-variant, #1367e7)}.btn--primary:active:not(:disabled){background-color:var(--lottery-button-primary-active-bg, #08104a)}.btn--outline .spinner,.btn--dashed .spinner,.btn--text .spinner{border-top-color:currentColor;border-color:var(--lottery-button-spinner-inverse-border-color, rgba(0, 0, 0, 0.2))}.btn--outline{background-color:var(--emw--color-background, #fff);border-color:var(--lottery-button-outline-border-color, #dcdcdc);color:var(--emw--color-typography, #000)}.btn--outline:hover:not(:disabled){background-color:var(--emw--color-background-tertiary, #ccc);border-color:var(--lottery-button-outline-hover-border-color, #a6a6a6)}.btn--outline:active:not(:disabled){background-color:var(--lottery-button-outline-active-bg, #e6e6e6)}.btn--dashed{background-color:transparent;border-style:dashed;border-color:var(--lottery-button-dashed-border-color, #dcdcdc);color:var(--lottery-button-dashed-color, #333)}.btn--dashed:hover:not(:disabled){border-color:var(--lottery-button-dashed-hover-border-color, #a6a6a6);color:var(--lottery-button-dashed-hover-color, #0052d9)}.btn--text{background-color:transparent;color:var(--lottery-button-text-color, #0052d9);border-color:transparent}.btn--text:hover:not(:disabled){background-color:var(--lottery-button-text-hover-bg, #f2f2f2)}.btn--text:active:not(:disabled){background-color:var(--lottery-button-text-active-bg, #e6e6e6)}.btn--custom-color:hover:not(:disabled){opacity:var(--lottery-button-custom-hover-opacity, 0.9)}.btn--custom-color:active:not(:disabled){opacity:var(--lottery-button-custom-active-opacity, 0.8)}.btn--small{height:var(--lottery-button-small-height, 28px);font-size:var(--lottery-button-small-font-size, 12px);padding:var(--lottery-button-small-padding, 0 12px)}.btn--medium{height:var(--lottery-button-medium-height, 34px);font-size:var(--lottery-button-medium-font-size, 14px);padding:var(--lottery-button-medium-padding, 0 18px)}.btn--large{height:var(--lottery-button-large-height, 40px);font-size:var(--lottery-button-large-font-size, 16px);padding:var(--lottery-button-large-padding, 0 24px)}.ripple-container{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;pointer-events:none;border-radius:inherit}.ripple{position:absolute;border-radius:50%;background-color:var(--lottery-button-ripple-light, rgba(255, 255, 255, 0.3));transform:scale(0);animation:ripple-animation 600ms linear}.btn--outline .ripple,.btn--dashed .ripple,.btn--text .ripple{background-color:var(--lottery-button-ripple-dark, rgba(0, 0, 0, 0.03))}@keyframes ripple-animation{to{transform:scale(4);opacity:0}}";const E=class{constructor(i){t(this,i),this.lotteryTippingBulletToggleEvent=e(this,"lotteryTippingBulletToggle",7),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.positionIdx=void 0,this.theme="default",this.value="",this.disabled=!1,this.isSelected=!1}handleClientStylingChange(t,e){t!=e&&d(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&c(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&d(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&c(this.stylingContainer,this.clientStylingUrl))}handleClick(){this.disabled||this.lotteryTippingBulletToggleEvent.emit({positionIdx:this.positionIdx})}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return i("div",{key:"ef0fee38ed62adb7809b5a60668af6a499ebe5a6",ref:t=>this.stylingContainer=t},"text"===this.theme?i("div",{class:{LotteryTippingBullet__segment:!0,"LotteryTippingBullet__segment--text":!0}},this.value):i("button",{class:{LotteryTippingBullet__segment:!0,"LotteryTippingBullet__segment--disabled":this.disabled,"LotteryTippingBullet__segment--active":this.isSelected},onClick:this.handleClick.bind(this)},this.isSelected?"X":this.value))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};E.style=".LotteryTippingBullet__segment{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;font-size:16px;line-height:1;font-weight:500;color:var(--emw--color-typography, #000);background:var(--emw--color-background, #fff);border:1px solid var(--emw--color-gray-100, #e6e6e6);border-radius:6px;cursor:pointer;transition:all 0.2s ease;user-select:none}.LotteryTippingBullet__segment:not(.LotteryTippingBullet__segment--disabled):hover{cursor:pointer;animation:jelly 0.3s ease-in-out;transform:scale(1.02)}.LotteryTippingBullet__segment--text{border:none;color:var(--emw--color-typography, #000);background:transparent;font-weight:400}.LotteryTippingBullet__segment--text:hover{cursor:not-allowed !important}.LotteryTippingBullet__segment--active{font-weight:600;background-color:var(--emw--color-background-inverse, #000);color:var(--emw--color-primary, #fed275)}.LotteryTippingBullet__segment--disabled:not(.LotteryTippingBullet__segment--active){background-color:var(--emw--color-background-tertiary, #ccc);color:var(--emw--color-gray-150, #6f6f6f);border-color:var(--emw--color-gray-100, #e6e6e6)}.LotteryTippingBullet__segment--disabled:hover{cursor:not-allowed}@keyframes jelly{0%{transform:translate(0, 0)}20%{transform:translate(-0.5px, -0.5px)}40%{transform:translate(0.5px, 0.5px)}60%{transform:translate(-0.25px, -0.25px)}80%{transform:translate(0.25px, 0.25px)}100%{transform:translate(0, 0)}}";const P=class{constructor(i){t(this,i),this.lotteryTippingBulletGroupToggleEvent=e(this,"lotteryTippingBulletGroupToggle",7),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.positionIdx=void 0,this.theme="default",this.mode="single",this.bulletConfigContent=""}get bulletConfigArr(){const t=[{value:"1"},{value:"X"},{value:"2"}];if("string"!=typeof this.bulletConfigContent||!this.bulletConfigContent)return t;try{return JSON.parse(this.bulletConfigContent)}catch(e){return console.error("Error parsing bulletConfigContent:",e),t}}handleClientStylingChange(t,e){t!=e&&d(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&c(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&d(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&c(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}lotteryTippingBulletSelectionHandler(t){const{positionIdx:e}=t.detail;this.handleToggle(e)}handleToggle(t){let e=[...this.bulletConfigArr];"single"===this.mode?(e=e.map((t=>Object.assign(Object.assign({},t),{isSelected:!1}))),e[t].isSelected=!0):(e=e.map((t=>Object.assign({},t))),e[t].isSelected=!e[t].isSelected),this.lotteryTippingBulletGroupToggleEvent.emit({bulletConfigArr:e,positionIdx:this.positionIdx+"-"+t})}render(){var t;return i("div",{ref:t=>this.stylingContainer=t,key:this.positionIdx},i("div",{key:"68223022eed831932c571378164be913206d98e9",style:{display:"flex",flexDirection:"row",gap:"10px"}},null===(t=this.bulletConfigArr)||void 0===t?void 0:t.map(((t,e)=>i("div",{key:e},i("lottery-tipping-bullet",{value:t.value,isSelected:t.isSelected,"position-idx":e,disabled:t.disabled,theme:this.theme,clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,mbSource:this.mbSource}))))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};P.style="";const H={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"},A={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"},U={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};var G=function(){return G=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},G.apply(this,arguments)},Z={primaryColor:"#333",secondaryColor:"#E6E6E6"};function R(t,e){if(void 0===e&&(e={}),"function"==typeof t.icon){var i=e.placeholders||Z;return F(t.icon(i.primaryColor,i.secondaryColor),e)}return F(t.icon,e)}function F(t,e){var i="svg"===t.tag?G(G({},t.attrs),e.extraSVGAttrs||{}):t.attrs,n=Object.keys(i).reduce((function(t,e){var n=i[e],r="".concat(e,'="').concat(n,'"');return t.push(r),t}),[]),r=n.length?" "+n.join(" "):"",a=(t.children||[]).map((function(t){return F(t,e)})).join("");return a&&a.length?"<".concat(t.tag).concat(r,">").concat(a,"</").concat(t.tag,">"):"<".concat(t.tag).concat(r," />")}const V=["ro","en","fr","ar","hr"],X={en:{weeks:["Su","Mo","Tu","We","Th","Fr","Sa"],bettingType:"Betting Type:",prizeAllocation:"Prize Allocation (Turnover: {turnover})",prizes:"Prizes",numberOfWinners:"Number of Winners",prizeMoney:"Prize Money",noLatestResult:"No latest result.",loading:"Loading...."},ro:{bettingType:"Tip de pariu:",prizeAllocation:"Alocarea premiilor (Cifră de afaceri: €{turnover})",prizes:"Premii",numberOfWinners:"Număr de câștigători",prizeMoney:"Bani de premiu",noLatestResult:"Niciun rezultat recent.",loading:"Se încarcă...."},fr:{bettingType:"Type de pari:",prizeAllocation:"Répartition des prix (Chiffre d'affaires: € {turnover})",prizes:"Prix",numberOfWinners:"Nombre de gagnants",prizeMoney:"Prix en argent",noLatestResult:"Aucun résultat récent.",loading:"Chargement...."},ar:{bettingType:"نوع الرهان:",prizeAllocation:"تخصيص الجائزة (دوران: € {turnover})",prizes:"الجوائز",numberOfWinners:"عدد الفائزين",prizeMoney:"أموال الجائزة",noLatestResult:"لا يوجد أحدث نتيجة.",loading:"جار التحميل...."},hr:{bettingType:"Vrsta oklade:",prizeAllocation:"Raspodjela nagrada (Promet: € {turnover})",prizes:"Nagrade",numberOfWinners:"Broj pobjednika",prizeMoney:"Novčana nagrada",noLatestResult:"Nema najnovijih rezultata.",loading:"Učitavanje...."}},W=(t,e,i)=>{const n=e;let r=X[void 0!==n&&V.includes(n)?n:"en"][t];return i&&Object.keys(i).forEach((t=>{r=r.replace(`{${t}}`,i[t])})),r},Y=t=>{Object.keys(t).forEach((e=>{for(let i in t[e])X[e][i]=t[e][i]}))},J=R({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"},{extraSVGAttrs:{width:"18px",height:"18px"}}),K=class{constructor(i){t(this,i),this.changeDate=e(this,"changeDate",7),this.handleOutsideClick=t=>{if(!this.showCalendar)return;const e=t.composedPath?t.composedPath():[],i=e.includes(this.calendarRef),n=e.some((t=>{var e,i;return t instanceof HTMLElement&&((null===(e=t.getAttribute("part"))||void 0===e?void 0:e.includes("item"))||(null===(i=t.getAttribute("part"))||void 0===i?void 0:i.includes("overlay")))}));i||n||(this.showCalendar=!1)},this.onYearMinus=()=>{const t=this.yearOptions.map((t=>Number(t.value)));this.alterDate.year-1<Math.min(...t)||(this.alterDate.year--,this.loadRecords())},this.onYearPlus=()=>{const t=this.yearOptions.map((t=>Number(t.value)));this.alterDate.year+1>Math.max(...t)||(this.alterDate.year++,this.loadRecords())},this.onMonthMinus=()=>{0===this.alterDate.month?(this.onYearMinus(),this.alterDate.month=11):(this.alterDate.month--,this.loadRecords())},this.onMonthPlus=()=>{11===this.alterDate.month?(this.onYearPlus(),this.alterDate.month=0):(this.alterDate.month++,this.loadRecords())},this.onYearChange=t=>{this.alterDate.year=parseInt(t.detail.value),this.loadRecords()},this.onMonthChange=t=>{this.alterDate.month=parseInt(t.detail.value)-1,this.loadRecords()},this.date="2025-05-19T02:00:00Z",this.highLightDates=void 0,this.language="en",this.translationUrl=void 0,this.weeks=void 0,this.days=[],this.alterDate={year:0,month:0,day:0},this.curDate={year:0,month:0,day:0},this.recordInfo=[],this.showCalendar=!1}componentWillLoad(){this.translationUrl&&Y(JSON.parse(this.translationUrl)),this.weeks=W("weeks",this.language);const t=this.date?new Date(this.date):new Date;this.alterDate={year:t.getFullYear(),month:t.getMonth(),day:t.getDate()},this.curDate=Object.assign({},this.alterDate),this.loadRecords()}handleDateChange(){const t=this.date?new Date(this.date):new Date;this.alterDate={year:t.getFullYear(),month:t.getMonth(),day:t.getDate()},this.curDate=Object.assign({},this.alterDate),this.loadRecords()}componentDidLoad(){document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){document.removeEventListener("click",this.handleOutsideClick)}get yearOptions(){return Array.from({length:101},((t,e)=>this.alterDate.year-50+e)).map((t=>({label:String(t),value:String(t)})))}get monthOptions(){return Array.from({length:12},((t,e)=>e+1)).map((t=>({label:String(t),value:String(t)})))}loadRecords(){const{year:t,month:e}=this.alterDate;this.setDays(t,e)}setDays(t,e){this.days=[];const i=new Date(t,e,1).getDay(),n=new Date(t,e,1-i);for(let t=0;t<42;t++){const e=new Date(n);e.setDate(n.getDate()+t);const i={date:e.getDate(),month:e.getMonth(),year:e.getFullYear()};this.days.push(i)}}getFullDayOfMonth(t,e){return new Date(t,e,0).getDate()}showFormatedDate(t){return`${t.day}/${t.month+1}/${t.year}`}handleSelectDate(t,e,i){this.alterDate.day=t,this.curDate=Object.assign({},this.alterDate),this.showCalendar=!1;const n=this.highLightDates.map((t=>{const e=new Date(t);return{year:e.getFullYear(),month:e.getMonth(),day:e.getDate()}})).findIndex((n=>{const{year:r,month:a,day:o}=n;return e===a&&i===r&&t===o}));console.log("idx",n),n>-1&&this.changeDate.emit(n)}tellIsCurDay(t,e,i){return this.curDate.day===t&&this.curDate.month===e&&this.curDate.year===i}tellIsHighLight(t,e,i){return!(!this.highLightDates||!this.highLightDates.length)&&this.highLightDates.map((t=>{const e=new Date(t);return{year:e.getFullYear(),month:e.getMonth(),day:e.getDate()}})).some((n=>{const{year:r,month:a,day:o}=n;return e===a&&i===r&&t===o}))}render(){const t=["calendar",this.showCalendar?"calendar-visible":"calendar-leave"];return i("div",{key:"eda2c6b211647dfd9c26f5dd53dd8f18a2205be2",class:"lottery-tipping-calendar",ref:t=>this.calendarRef=t},i("div",{key:"b8a516ae17b8de7aaa4a72284848295546239937",class:"calling-input",onClick:()=>{this.showCalendar=!0}},i("div",{key:"4e384c0e1989f76b995bbc3df572eeab8ae120f6",class:"calling-input-text"},this.showFormatedDate(this.curDate)),i("div",{key:"a489600f9b90e4ea865606dddd4997ad9cf1558a",class:"calling-input-icon",innerHTML:J})),i("div",{key:"7c17232151a8ae775e4a35000e7992695ce1f9dd",class:t.join(" ")},i("div",{key:"6951e3aa3fedb236514b57d6cdf830b074deb928",class:"calendar-header"},i("div",{key:"7d9735ab6d40d9010ac32a2b776ceacd9ee8ebb8",class:"date-controller year-minus",onClick:this.onYearMinus},"<"),i("div",{key:"e0f3e6958187120e4441c4c4961fda4a74294cca",class:"date-controller month-minus",onClick:this.onMonthMinus},"<"),i("div",{key:"e1840f3d0f9e4860a03467bbc782a6306c591ad4",class:"date-picker"},i("div",{key:"44d3b63aebcadaa42682e77f9d84c9ae155ec546",class:"date-picker-year"},i("vaadin-select",{key:"d462e0c076b1da5cdfa4a2ce47c5c3cb0d6e86bd",items:this.yearOptions,value:this.alterDate.year,style:{"--vaadin-field-default-width":"90px"},"on-value-changed":this.onYearChange.bind(this)})),i("div",{key:"0a405edb23487297ab91e0a6ce304e907d7cfa62",class:"date-picker-delimiter"},"-"),i("div",{key:"cc81efef542d370f4e03a7d7fa138a36b900d801",class:"date-picker-month"},i("vaadin-select",{key:"d7a9636262121dd8008588eef61aacd092ec07c8",items:this.monthOptions,value:this.alterDate.month+1,style:{"--vaadin-field-default-width":"64px"},"on-value-changed":this.onMonthChange.bind(this)})),i("div",{key:"f862d5d3d665c97bc74f7eda209822cc5ceb558e",class:"date-picker-delimiter"},"-"),i("div",{key:"9b2dca353b3708ad561af1bebb24c93dd1194384",class:"date-picker-day"},this.alterDate.day)),i("div",{key:"4e2d6c599a6c03aa1852b65c86f2db50cea02d6d",class:"date-controller month-plus",onClick:this.onMonthPlus},">"),i("div",{key:"18e4e92486507065a5e0771ffde5050f4ffff3f1",class:"date-controller year-plus",onClick:this.onYearPlus},">")),i("div",{key:"ef1115ce79c83cf4689779e55f046a70f733bc6c",class:"calendar-content"},i("div",{key:"0a6fe5ec8ee10f03a2547f942207f6ceaaa99618",class:"calendar-content-week"},this.weeks.map((t=>i("div",{class:"week-item"},t)))),i("div",{key:"971bc904f76e33c6503be7d223759f2ab7cb0ad6",class:"calendar-content-day"},this.days.map((t=>i("div",{class:{"day-item":!0,isCurDay:this.tellIsCurDay(t.date,t.month,t.year),isHighLight:this.tellIsHighLight(t.date,t.month,t.year)},onClick:()=>this.handleSelectDate(t.date,t.month,t.year)},t.date)))))))}static get watchers(){return{date:["handleDateChange"]}}};K.style='.lottery-tipping-calendar{position:relative;display:inline-block}.calendar-visible{opacity:1;visibility:visible}.calendar-leave{opacity:0;visibility:hidden}.calendar{position:absolute;top:40px;left:-50%;background:var(--emw--color-background, #fff);color:var(--emw--color-typography-secondary, #6f6f6f);padding:16px;width:fit-content;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));border-radius:var(--emw--border-radius-small, 4px);box-shadow:2px 3px 5px rgba(0, 0, 0, 0.1);cursor:pointer;transition:opacity 0.2s ease, visibility 0.2s ease;z-index:99}.calendar-header{display:flex;align-items:center}.calendar-header .date-picker{display:flex;margin:0 18px;align-items:center}.calendar-header .date-picker-delimiter{font-size:16px;margin:auto 4px}.calendar-header .month-plus,.calendar-header .month-minus,.calendar-header .year-plus,.calendar-header .year-minus{cursor:pointer;font-size:14px}.calendar-header .month-plus:hover,.calendar-header .month-minus:hover,.calendar-header .year-plus:hover,.calendar-header .year-minus:hover{color:var(--emw-pool-game-acition-active, #005fdb);transition:color 0.2s}.calendar-header .year-minus,.calendar-header .month-plus{margin-right:6px}.calendar-content{padding:3px;width:fit-content}.calendar-content .day-item{text-align:center;line-height:40px;cursor:not-allowed;position:relative;pointer-events:none}.calendar-content .day-item:hover{background-color:var(--emw--color-background-secondary, #f5f5f5)}.calendar-content .day-item.isCurDay{border-radius:4px;background:var(--emw--color-secondary, #fff3b9);background-size:50%;color:var(--emw--color-typography-secondary, #6f6f6f);font-weight:600;box-shadow:2px 2px 2px var(--emw-calender-curday-box-shadow, rgba(0, 0, 0, 0.09));cursor:pointer;pointer-events:all}.calendar-content .day-item.isHighLight{cursor:pointer;pointer-events:all}.calendar-content .day-item.isHighLight::after{content:"";position:absolute;left:calc(50% - 4px);bottom:0;width:6px;height:6px;border-radius:50%;background-color:var(--emw--color-error, red)}.calendar-content-week{display:grid;grid-template-columns:repeat(7, 40px);grid-template-rows:repeat(1, 36px);justify-items:center;align-items:center;border-bottom:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));color:var(--emw--color-typography-secondary, #6f6f6f)}.calendar-content-day{margin-top:4px;display:grid;grid-template-rows:repeat(6, 40px);grid-template-columns:repeat(7, 40px)}.calling-input{height:36px;width:160px;display:flex;align-items:center;justify-content:space-between;padding:0px 4px;background-color:var(--emw--color-background, #f5f5f5);border-radius:var(--emw--border-radius-small, 4px);border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));cursor:pointer}.calling-input .input{color:var(--emw--color-typography, #000)}.calling-input-text{color:var(--emw--color-typography, #000)}.calling-input-icon svg{fill:var(--emw--color-secondary, #fff3b9)}';const q=["ro","en","fr","ar","hr"],Q={en:{cancel:"Cancel",confirm:"Confirm"},ro:{cancel:"Anulează",confirm:"Confirmă"},fr:{cancel:"Annuler",confirm:"Confirmer"},ar:{cancel:"إلغاء",confirm:"تأكيد"},hr:{cancel:"Odustani",confirm:"Potvrdi"}},tt=(t,e)=>{const i=e;return Q[void 0!==i&&q.includes(i)?i:"en"][t]},et=class{constructor(i){t(this,i),this.open=e(this,"open",7),this.close=e(this,"close",7),this.confirm=e(this,"confirm",7),this.cancel=e(this,"cancel",7),this.wasVisible=!1,this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.visible=void 0,this.dialogTitle="",this.width="520px",this.closable=!0,this.mask=!0,this.maskClosable=!0,this.animationDuration=300,this.fullscreen=!1,this.showFooter=!0,this.showCancelBtn=!0,this.language="en",this.translationUrl=void 0,this.dialogClass=void 0,this.dialogStyle=void 0,this.confirmLoading=!1}handleClientStylingChange(t,e){t!=e&&d(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&c(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentWillLoad(){this.translationUrl&&(async t=>{if(t)try{const i=await fetch(t);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const n=await i.json();e=n,Object.keys(e).forEach((t=>{for(let i in e[t])Q[t][i]=e[t][i]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl)}componentWillUpdate(){this.visible&&!this.wasVisible?this.disableBodyScroll():!this.visible&&this.wasVisible&&this.enableBodyScroll(),this.wasVisible=this.visible}disconnectedCallback(){this.enableBodyScroll(),this.stylingSubscription&&this.stylingSubscription.unsubscribe()}disableBodyScroll(){document.body.style.overflow="hidden"}enableBodyScroll(){document.body.style.overflow=""}handleClose(){this.cancel.emit()}handleMaskClick(){this.maskClosable&&this.cancel.emit()}handleConfirm(){this.confirm.emit()}render(){const t=Object.assign({width:"number"==typeof this.width?`${this.width}px`:this.width,"--duration":`${this.animationDuration}ms`},this.dialogStyle||{}),e=["dialog-wrapper",this.visible?"dialog-wrapper-visible":""],n=["mask",this.visible?"mask-enter":"mask-leave"],r=["dialog",this.visible?"dialog-enter":"dialog-leave",this.fullscreen?"fullscreen":"",this.dialogClass].filter(Boolean).join(" ");return i("div",{key:"05dd671f10bdebda6f138e8f8039f4bc0533fe98",class:e.join(" "),ref:t=>this.stylingContainer=t},i("div",{key:"6e814e02770149de5495617039750461fc0a42d1",class:n.join(" "),onClick:this.handleMaskClick.bind(this)}),i("div",{key:"4cbc5db20317ef1b0808fc4a91a53fa8b86c5f4f",part:"dialog",class:r,style:t,role:"dialog","aria-modal":"true","aria-labelledby":"dialog-title"},(this.dialogTitle||this.closable)&&i("div",{key:"85dc705676a37e6ea2828a7b683fc54b0eb77d17",class:"dialog-header"},i("h2",{key:"85b7472d2b72801dfae19a24fc2018f3c1f1529a",id:"dialog-title",class:"dialog-title"},this.dialogTitle),this.closable&&i("button",{key:"8089aaecfe511558055ee9f64214ff97030eb2a9",class:"close-btn",onClick:this.handleClose.bind(this)},"x")),i("div",{key:"776255540f30d757caa3fcaee747c79ac638ae76",class:"dialog-content",style:{maxHeight:"calc(100vh - 62px)",overflowY:"auto"}},i("slot",{key:"5ef964615b6ab70a9e561f8efac8fe952fe47b4e"})),this.showFooter&&i("div",{key:"8927a0991d916caf7852d58db996b9818687da30",class:"dialog-footer"},i("slot",{key:"84de0306994ec62220ae30fa2881dadbae5544ea",name:"footer"},this.showCancelBtn&&i("button",{key:"ee87b8c3918c1f4d007923a2498142b3af2740a0",class:"cancel-btn",onClick:this.handleClose.bind(this)},tt("cancel",this.language)),i("button",{key:"935cff86381b21fff07c2d4156b29779c50e5ce3",class:"confirm-btn",onClick:this.handleConfirm.bind(this),disabled:this.confirmLoading},this.confirmLoading?i("div",{class:"Loading",innerHTML:R(A,{extraSVGAttrs:{width:"20px",height:"20px",fill:"currentColor"}})}):tt("confirm",this.language))))))}get el(){return r(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};et.style=".dialog-wrapper{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;visibility:hidden;opacity:1;z-index:199}.dialog-wrapper-visible{visibility:visible}.mask{position:fixed;inset:0;background:var(--emw--color-mask-dialog-background, rgba(0, 0, 0, 0.5));opacity:0;z-index:1000;transition:opacity var(--duration) linear}.mask-enter{opacity:1}.mask-leave{opacity:0}.dialog{position:relative;background:var(--emw--color-background, #fff);border-radius:12px;box-shadow:0 4px 32px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15));opacity:0;transform:scale(0.9);transition:all var(--duration) linear;width:100%;max-width:100vw;overflow:hidden;z-index:1000}.dialog-enter{opacity:1;transform:scale(1)}.dialog-leave{opacity:0}.dialog.fullscreen{width:100vw !important;height:100vh;overflow:auto;max-height:none;border-radius:0;overflow:hidden}.dialog-header{padding:16px 16px 0 16px;display:flex;justify-content:space-between;align-items:center}.dialog-header .dialog-title{margin:0;font-size:1.25rem;font-weight:500;color:var(--emw--color-typography, #000)}.dialog-header .close-btn{background:transparent;border:none;font-size:1.5rem;width:2rem;height:2rem;color:var(--emw--color-gray-150, #6f6f6f);cursor:pointer;border-radius:4px}.dialog-header .close-btn:hover{background:var(--emw--color-gray-50, #f5f5f5);color:var(--emw--color-gray-300, #333)}.dialog-content{padding:24px;font-size:0.95rem;line-height:1.6;color:var(--emw--color-dialog-typography, #000);flex:1;overflow-y:auto;max-height:calc(100vh - 200px)}.dialog.fullscreen .dialog-content{max-height:none}.dialog-footer{padding:0 16px 16px 16px;display:flex;justify-content:center;gap:12px}.dialog-footer .cancel-btn,.dialog-footer .confirm-btn{padding:10px 24px;min-width:60px;border-radius:6px;font-size:0.9rem;cursor:pointer;transition:all 0.3s linear}.dialog-footer .cancel-btn{border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));background-color:var(--emw--color-background, #fff);color:var(--emw--color-typography, #000)}.dialog-footer .cancel-btn:hover{background-color:var(--emw--color-background-tertiary, #ccc)}.dialog-footer .confirm-btn{border:none;color:var(--emw--color-typography-normalized, #ffffff);background:var(--emw--color-primary, #009993)}.dialog-footer .confirm-btn:hover{background:var(--emw--color-primary-variant, #004d4a)}@media screen and (max-width: 480px){.dialog.fullscreen .dialog-content{padding:12px}}.Loading{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.Loading svg{animation:spin 1s linear infinite;transform-origin:center}@keyframes spin{100%{transform:rotate(360deg)}}";const it=["ro","en","fr","ar","hr"],nt={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:{}},rt=(t,e,i)=>{const n=e;let r=nt[void 0!==n&&it.includes(n)?n:"en"][t];return i&&Object.keys(i).forEach((t=>{r=r.replace(`{${t}}`,i[t])})),r},at=t=>{Object.keys(t).forEach((e=>{for(let i in t[e])nt[e][i]=t[e][i]}))},ot=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&&d(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&c(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentWillLoad(){this.translationUrl&&at(JSON.parse(this.translationUrl)),this.ticketTypeList=[{label:rt("normal",this.language),value:"NORMAL"},{label:rt("subscription",this.language),value:"SUBSCRIPTION"}]}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&d(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&c(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleModalClose(){this.isOpen=!1}changeFormate(t){const[e,i,n]=t.split("/");return`${n}-${i}-${e}`}formateDate(t){const{year:e,month:i,day:n}=t,r=new Date(e,i,n);return b(r,"dd/MM/yyyy")}parseDate(t){const[e,i,n]=t.split("/");return{year:n,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 i("div",{key:"74aa590f6f92b9df971fd17cb3f573cc6a0a68e9",class:"lottery-tipping-filter",ref:t=>this.stylingContainer=t},i("div",{key:"ebf385371627466c5eb06a5ef75a14a467b1badd",class:"operate-btns"},!this.showClearButton&&i("div",{key:"55c709034e124b51e8b9057980f5a3c3b8c6d5ce",class:"operate-btn",onClick:()=>{this.isOpen=!0}},rt("filter",this.language)),(this.showClearButton||this.quickFiltersActive)&&i("div",{key:"aa747af2461e72fbacc16decd7fc75cd6f640c47",class:"operate-btn",onClick:()=>this.resetSearch()},rt("clear",this.language))),i("lottery-tipping-dialog",{key:"9a9472dee498db7acc83fd96db89b635be07a837","dialog-title":rt("ticketResult",this.language),visible:this.isOpen,onCancel:()=>{this.isOpen=!1},onConfirm:this.handleDialogConfirm.bind(this),animationDuration:300,language:this.language,"translation-url":this.translationUrl},i("div",{key:"a7bfe435c8f7a43abf2c2d500d7e31fe62123787",class:"dialog-content"},i("div",{key:"4fcf5f1d3da61ba5e3e8c09b4a97339c1eafaf64",class:"filter-item"},i("div",{key:"397bb60af15071331c46c0b83366475ef66205fd",class:"filter-item-label"},rt("searchByTicketId",this.language)),i("div",{key:"657e0014bb0d8af52ed273149bad534b2cd035b6",class:"filter-item-val"},i("div",{key:"7e49aab4b087a1e077cc03d4331df52be03a79c2",class:"general-multi-select-container"},i("vaadin-text-field",{key:"9d810aac3959e689cefed434d7c5569b18e4c0ec",placeholder:rt("enterTicketId",this.language),value:this.filterData.ticketId,onInput:t=>{this.filterData.ticketId=t.target.value}})))),i("div",{key:"8b9fda151a493c920797e4c7e2a8693c84ea5620",class:"filter-item"},i("div",{key:"23439a0cad69db2ddafc8c131d5e1f5a019c3805",class:"filter-item-label"},rt("searchByTicketType",this.language)),i("div",{key:"ffe8de6c8acb7ecb92301d417e5d3cddb9941601",class:"general-multi-select-container"},i("general-multi-select",{key:"90b2b967b17830a22ea08aa0f22e155e42922f21",ref:t=>this.comboBox=t,placeholder:rt("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}))),i("div",{key:"b8dc91b5337a8f4064160c50c20f213fbb1649bd",class:"filter-item"},i("div",{key:"476fb4074ad41ce1a014eb9355504aa4a53161ca",class:"filter-item-label"},rt("searchByDate",this.language)),i("div",{key:"d4498509f769af6cd5d008dc8433a61b9c9c5487",class:"filter-item-val"},i("vaadin-date-picker",{key:"bd525309eb193cd2e12fc87aee172d423397d22e",value:this.filterData.filterFromCalendar,max:void 0===this.filterData.filterToCalendar?void 0:this.changeFormate(this.filterData.filterToCalendar),onChange:this.handleFilterFrom,placeholder:rt("from",this.language),ref:t=>this.setDateFormate(t),class:"VaadinDatePicker"}),i("vaadin-date-picker",{key:"50eb713df259a2d0fce36b90d81d1ea388c8545d",value:this.filterData.filterToCalendar,min:void 0===this.filterData.filterFromCalendar?void 0:this.changeFormate(this.filterData.filterFromCalendar),onChange:this.handleFilterTo,placeholder:rt("to",this.language),ref:t=>this.setDateFormate(t),class:"VaadinDatePicker"}))))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};ot.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)}.general-multi-select-container vaadin-text-field{width:100%}";function st(t,e="GET",i=null,n={}){return new Promise(((r,a)=>{const o="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})),s=Object.assign({"Content-Type":"application/json"},n);"GET"!==e&&"HEAD"!==e&&(s["X-Idempotency-Key"]=o);const l={method:e,headers:s,body:null};i&&"GET"!==e&&"HEAD"!==e?l.body=JSON.stringify(i):delete l.body,fetch(t,l).then((t=>{if(!t.ok)throw new Error(`HTTP error! Status: ${t.status}`);return t.json()})).then((t=>r(t))).catch((t=>a(t)))}))}function lt(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 n=0;n<e;n++){if(!lt(t[n]))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(!lt(e))return!1;i++}return i===e}(t):!t)}const dt={0:"1",1:"X",2:"2"},ct={H:0,D:1,A:2},ht=t=>t.map((t=>{const e=[0,0,0];return t[0].forEach((t=>{const i=ct[t];void 0!==i&&(e[i]=1)})),e.map(((t,e)=>({isSelected:1===t,value:dt[e]})))}));function pt(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(".")}function gt(t,e="€"){return null==t?"":`${e}${t?pt(t):0}`}const ft=R(H,{extraSVGAttrs:{width:"16px",height:"16px",fill:""}}),ut=R(U,{extraSVGAttrs:{width:"16px",height:"16px",fill:""}}),mt=class{constructor(i){t(this,i),this.lotteryTippingFetchDataError=e(this,"lotteryTippingLatestResultError",7),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.endpoint=void 0,this.gameId=void 0,this.playerId=void 0,this.sessionId=void 0,this.hasDrawDates=["2025-05-28T02:00:00Z","2025-05-16T02:00:00Z"],this.lastestDate="2025-05-28T02:00:00Z",this.drawList=void 0,this.curDrawItem=void 0,this.curDrawItemIdx=0,this.curDrawSelection=[],this.curDrawSelectionBettingType=void 0,this.curDrawSelectionMap={},this.curPrizes=void 0,this.curPrizeMap={},this.curTurnOver=0,this.isLoading=!0,this.playTypes=null,this.bettingTypes=void 0,this.vendorGameId=void 0,this.isLoadingTurnover=!1}handleClientStylingChange(t,e){t!=e&&d(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&c(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentWillLoad(){this.translationUrl&&Y(JSON.parse(this.translationUrl)),this.initData()}async initData(){try{this.isLoading=!0,await Promise.all([this.getGameById(),this.fetDrawList()]),this.getTurnOver()}catch(t){console.error(t),this.lotteryTippingFetchDataError.emit(t)}finally{this.isLoading=!1}}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&d(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&c(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}async getGameById(){var t,e,i,n;try{const r=await async function(t,e){try{return await st(`${t}/games/${e}`,"GET",{})}catch(t){throw console.error("Failed to fetch game info:",t),new Error("The game is currently not available. Please try again later.")}}(this.endpoint,this.gameId);this.vendorGameId=null==r?void 0:r.type,this.playTypes=null===(e=null===(t=null==r?void 0:r.rules)||void 0===t?void 0:t.poolGame)||void 0===e?void 0:e.playTypes,this.bettingTypes=null===(n=null===(i=null==r?void 0:r.rules)||void 0===i?void 0:i.poolGame)||void 0===n?void 0:n.bettingTypes}catch(t){console.log(t)}}findLatestDateIdx(t){const e=new Date;let i=0,n=1/0;return t.forEach(((t,r)=>{const a=new Date(t),o=Math.abs(w(e,a));o<n&&(n=o,i=r)})),i}async fetDrawList(){try{const t={status:"CLOSED",limit:9999},{items:e}=await st(`${this.endpoint}/games/${this.gameId}/draws${function(t){const e={};Object.entries(t).forEach((([t,i])=>{lt(i,!0)||(e[t]=i)}));const i=Object.entries(e).map((([t,e])=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`)).join("&");return i?`?${i}`:""}(t)}`,"GET");if(!e||0===e.length)return;const i=e;i.sort(((t,e)=>t.date.localeCompare(e.date))),this.drawList=i,this.hasDrawDates=i.map((t=>t.date)),this.curDrawItemIdx=this.findLatestDateIdx(this.hasDrawDates),this.lastestDate=this.hasDrawDates[this.curDrawItemIdx],this.curDrawItem=i[this.curDrawItemIdx],this.curDrawSelectionBettingType=i[this.curDrawItemIdx].winningNumbers[0].winning_type,this.curDrawItem.winningNumbers.forEach((t=>{this.curDrawSelectionMap[t.winning_type]=[ht(t.poolGameOutcomes)]})),this.curDrawItem.prizes.forEach((t=>{const e=t.winningType;this.curPrizeMap[e]?(this.curPrizeMap[e].push(t),this.curPrizeMap[e].sort(((t,e)=>e.totalAmount.value-t.totalAmount.value))):this.curPrizeMap[e]=[t]})),this.curDrawSelection=this.curDrawSelectionMap[this.curDrawSelectionBettingType],this.curPrizes=this.curPrizeMap[this.curDrawSelectionBettingType]}catch(t){console.log(t)}}get displayedPrizes(){return[...this.curPrizes.filter((t=>t.divisionDisplayName.includes("Correct"))).sort(((t,e)=>{const i=Number(t.divisionDisplayName.match(/\d+/)[0]);return Number(null==e?void 0:e.divisionDisplayName.match(/\d+/)[0])-i})),...this.curPrizes.filter((t=>"Bonus"===t.divisionDisplayName))]}changeCurDateItem(t){this.lastestDate=this.hasDrawDates[t],this.curDrawItemIdx=t,this.curDrawItem=this.drawList[t],this.curDrawSelectionBettingType=this.curDrawItem.winningNumbers[0].winning_type,this.curDrawItem.winningNumbers.forEach((t=>{this.curDrawSelectionMap[t.winning_type]=[ht(t.poolGameOutcomes)]})),this.curPrizeMap={},this.curDrawItem.prizes.forEach((t=>{const e=t.winningType;this.curPrizeMap[e]?(this.curPrizeMap[e].push(t),this.curPrizeMap[e].sort(((t,e)=>e.totalAmount.value-t.totalAmount.value))):this.curPrizeMap[e]=[t]})),this.curDrawSelection=this.curDrawSelectionMap[this.curDrawSelectionBettingType],this.curPrizes=this.curPrizeMap[this.curDrawSelectionBettingType],this.getTurnOver()}handleChangeDate(t){this.changeCurDateItem(t.detail)}preDraw(){this.curDrawItemIdx>0&&this.changeCurDateItem(--this.curDrawItemIdx)}nextDraw(){this.curDrawItemIdx<this.drawList.length-1&&this.changeCurDateItem(++this.curDrawItemIdx)}async getTurnOver(){var t,e,i;if(null===(t=this.curDrawItem)||void 0===t?void 0:t.id)try{this.isLoadingTurnover=!0;const t=await async function({endpoint:t,gameId:e,drawId:i}){try{return await st(`${t}/games/${e}/draws/${i}/saleStatistics`)}catch(t){return Promise.reject(t)}}({endpoint:this.endpoint,gameId:this.vendorGameId,drawId:this.curDrawItem.id});this.curTurnOver=null!==(i=null===(e=null==t?void 0:t.wagerSegment)||void 0===e?void 0:e.totalSalesCrossDraw)&&void 0!==i?i:0}catch(t){console.error(t)}finally{this.isLoadingTurnover=!1}}handleDrawBettingTypeChange(t){this.curDrawSelectionBettingType=t,this.curDrawSelection=this.curDrawSelectionMap[this.curDrawSelectionBettingType],this.curPrizes=this.curPrizeMap[this.curDrawSelectionBettingType],this.getTurnOver()}getBettingTypeName(t){var e,i;const n=null===(i=null===(e=this.bettingTypes)||void 0===e?void 0:e.find((e=>e.code===t)))||void 0===i?void 0:i.name;return null!=n?n:t}render(){return i("div",{key:"8445ca7bb67864132c73aba8690ffc8a654acf96",class:"lottery-tipping-latest-result",ref:t=>this.stylingContainer=t},this.curDrawSelection&&this.curDrawSelection.length>0&&i("div",{key:"d3ea560c524a06afbce2d8ca8e0fabd0ace1f0fb",class:"result-wrapper"},i("div",{key:"0612142854af558802abef88673ebcfbba75b4f5",class:"date-selection"},i("div",{key:"1ccacd4df626ddbedf12f9a2076e6abf3ef92604",class:"date-selection-leftIcon",innerHTML:ft,onClick:this.preDraw.bind(this)}),i("div",{key:"0f86c5df9a1e77ae59054946beae703fc1439d55",class:"date-selection-calendar"},i("lottery-tipping-calendar",{key:"561f1b7b441ee5a749742fa1f9075309064d408e",date:this.lastestDate,highLightDates:this.hasDrawDates,language:this.language,"mb-source":this.mbSource,"client-styling-url":this.clientStylingUrl,"translation-url":this.translationUrl})),i("div",{key:"3bc8ae5a02f2a3b2aa0e824bd38afedd599b0f65",class:"date-selection-rightIcon",innerHTML:ut,onClick:this.nextDraw.bind(this)})),i("div",{key:"abdc4a2f4c8452754a9f963b63ee2ad895a8fc3a",class:"winning-result"},i("div",{key:"b44ad68ce7d83a4061b092610d03213a06888f5f",class:"betting-type"},i("div",{key:"b47203a44ffe076aba90e81cb579ba9ab32c2943",class:"betting-type-title"},W("bettingType",this.language)),i("div",{key:"b7ba0c64f5bf7c29a33b88cbc018a1164ec16fc3",class:"betting-type-text"},i("div",{key:"cb0bb84dbe19b7928cf0f77dbec8b9eded121c0d",class:"LotteryTippingTicketController__segmented-control"},Object.keys(this.curDrawSelectionMap).map((t=>i("button",{class:{LotteryTippingTicketController__segment:!0,"LotteryTippingTicketController__segment--active":this.curDrawSelectionBettingType===t},onClick:this.handleDrawBettingTypeChange.bind(this,t)},this.getBettingTypeName(t))))))),i("lottery-tipping-ticket-bet",{key:"77bbc0bf4fb5b9e4db639db82235e9c5102c6571","session-id":this.sessionId,endpoint:this.endpoint,"game-id":this.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,"mb-source":this.mbSource,"client-styling-url":this.clientStylingUrl,"translation-url":this.translationUrl})),this.isLoadingTurnover?i("div",{class:"loading-wrap"},i("ui-skeleton",{structure:"title",width:"140px",height:"30px"}),i("ui-skeleton",{structure:"rectangle",width:"100%",height:"30px"}),i("ui-skeleton",{structure:"rectangle",width:"100%",height:"30px"}),i("ui-skeleton",{structure:"rectangle",width:"100%",height:"30px"}),i("ui-skeleton",{structure:"rectangle",width:"100%",height:"30px"})):i("div",{class:"prize-result"},i("div",{class:"prize-result-title"},W("prizeAllocation",this.language,{turnover:gt(this.curTurnOver)})),i("div",{class:"prize-result-table"},i("div",{class:"prize-result-table-header"},i("div",{class:"prize-result-table-row"},i("div",{class:"prize-result-table-column"},W("prizes",this.language)),i("div",{class:"prize-result-table-column"},W("numberOfWinners",this.language)),i("div",{class:"prize-result-table-column"},W("prizeMoney",this.language)))),i("div",{class:"prize-result-table-body"},this.displayedPrizes.map((t=>i("div",{class:"prize-result-table-row"},i("div",{class:"prize-result-table-column"},t.divisionDisplayName),i("div",{class:"prize-result-table-column"},t.players),i("div",{class:"prize-result-table-column"},pt(t.totalAmount.value))))))))),0==this.curDrawSelection.length&&!this.isLoading&&i("div",{key:"b0b6b3889f133e7aa3fb3b716a34db7efe89d04b"},W("noLatestResult",this.language)),this.isLoading&&i("div",{key:"e95d1017886fc286ab985e1560dc0fd01d9bd8d3",class:"loading-wrap"},W("loading",this.language)))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};var bt;mt.style=".lottery-tipping-latest-result {\n padding: 16px;\n container-type: inline-size;\n background-color: var(--emw--color-background, #fff);\n}\n.lottery-tipping-latest-result .date-selection {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 24px;\n width: 400px;\n}\n.lottery-tipping-latest-result .date-selection-leftIcon, .lottery-tipping-latest-result .date-selection-rightIcon {\n cursor: pointer;\n}\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, #fff);\n color: var(--emw--color-typography, #000);\n font-weight: 600;\n}\n.LotteryTippingTicketController__segment:not(.LotteryTippingTicketController__segment--active):hover {\n background-color: var(--emw--color-background-tertiary, #ccc);\n}\n\n.betting-type {\n margin-bottom: 16px;\n display: flex;\n align-items: center;\n gap: 20px;\n}\n.betting-type-title {\n font-weight: 600;\n font-size: 16px;\n color: var(--emw--color-typography-secondary, #333);\n}\n.betting-type-text {\n font-size: 16px;\n}\n\n.result-wrapper {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 60%;\n margin: 0 auto;\n}\n.result-wrapper .winning-result {\n width: 100%;\n margin-top: 20px;\n}\n.result-wrapper .loading-wrap {\n width: 100%;\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n.result-wrapper .prize-result {\n width: 100%;\n margin-top: 20px;\n}\n.result-wrapper .prize-result-title {\n font-size: 16px;\n font-weight: 600;\n margin-bottom: 12px;\n color: var(--emw--color-typography-secondary, #333);\n}\n.result-wrapper .prize-result-table {\n width: 100%;\n}\n.result-wrapper .prize-result-table-row {\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-evenly;\n}\n.result-wrapper .prize-result-table-column {\n text-align: left;\n padding: 12px 14px;\n width: 160px;\n font-size: 14px;\n width: calc((100% - 2px) / 3);\n color: var(--emw--color-typography, #000);\n}\n.result-wrapper .prize-result-table-header {\n width: 100%;\n background-color: var(--emw--color-background-secondary, #e6e6e6);\n border-radius: 4px;\n}\n.result-wrapper .prize-result-table-body {\n background-color: var(--emw--color-background-tertiary, #fff);\n}\n.result-wrapper .prize-result-table .prize-result-table-header .prize-result-table-column {\n color: var(--emw--color-typography, #000);\n font-weight: 600;\n border-right: 1px solid var(--emw--color-background, #fff);\n}\n.result-wrapper .prize-result-table .prize-result-table-body .prize-result-table-row:hover {\n color: var(--emw--color-typography, #000);\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n}\n\n@container (max-width: 980px) and (min-width: 780px) {\n .result-wrapper {\n width: 84%;\n }\n}\n@container (max-width: 780px) and (min-width: 480px) {\n .result-wrapper {\n width: 100%;\n }\n}\n@container (max-width: 480px) {\n .result-wrapper {\n width: 100%;\n }\n .result-wrapper .winning-result {\n width: 100%;\n margin-top: 14px;\n }\n .result-wrapper .prize-result {\n width: 100%;\n }\n .result-wrapper .prize-result-table-column {\n padding: 6px;\n width: 100px;\n }\n}",function(t){t.BuyTickets="BUY_TICKETS",t.MyTickets="MY_TICKETS"}(bt||(bt={}));const yt=["ro","en","fr","ar","hr"],vt={en:{buyTickets:"Buy Tickets",myTickets:"My Tickets",logout:"Log out"},ro:{buyTickets:"Cumpără bilete",myTickets:"Biletele mele",logout:"Deconectare"},fr:{buyTickets:"Acheter des billets",myTickets:"Mes billets",logout:"Se déconnecter"},ar:{buyTickets:"شراء التذاكر",myTickets:"تذاكري",logout:"تسجيل الخروج"},hr:{buyTickets:"Kupi ulaznice",myTickets:"Moje ulaznice",logout:"Odjava"}},wt=(t,e)=>{const i=e;return vt[void 0!==i&&yt.includes(i)?i:"en"][t]},Lt=class{constructor(e){t(this,e),this.handleTabClick=t=>{this.activeTab=t},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.endpoint=void 0,this.gameId=void 0,this.playerId=void 0,this.sessionId=void 0,this.drawId=void 0,this.logoUrl=void 0,this.activeTab=bt.BuyTickets}handleClientStylingChange(t,e){t!=e&&d(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&c(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentWillLoad(){this.translationUrl&&(async t=>{if(t)try{const i=await fetch(t);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const n=await i.json();e=n,Object.keys(e).forEach((t=>{for(let i in e[t])vt[t][i]=e[t][i]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&d(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&c(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}renderTabs(){const t={[bt.BuyTickets]:wt("buyTickets",this.language),[bt.MyTickets]:wt("myTickets",this.language)};return i("div",{class:"tab-btns"},Object.values(bt).map((e=>i("div",{class:"tab-btn"+(this.activeTab===e?" active":""),onClick:this.handleTabClick.bind(this,e)},t[e]))))}renderContent(){return this.activeTab===bt.BuyTickets?i("lottery-tipping-ticket-controller",{endpoint:this.endpoint,gameId:this.gameId,playerId:this.playerId,sessionId:this.sessionId,drawId:this.drawId,language:this.language,"mb-source":this.mbSource,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"translation-url":this.translationUrl,"logo-url":this.logoUrl}):this.activeTab===bt.MyTickets?i("lottery-tipping-ticket-history",{endpoint:this.endpoint,gameId:this.gameId,playerId:this.playerId,sessionId:this.sessionId,drawId:this.drawId,language:this.language,"mb-source":this.mbSource,"client-styling-url":this.clientStylingUrl,"client-styling":this.clientStyling,"translation-url":this.translationUrl}):null}render(){return i("div",{key:"410b13d8772d8a22ea4a2795230b5ea17975b3c3",class:"lottery-tipping-page",ref:t=>this.stylingContainer=t},i("div",{key:"f468ef27a6a720aa92fe6eda9729e9faf682c110",class:"lottery-tipping-page-header"},i("slot",{key:"d0485663265b73a313f9749ec0a4be14162c0203",name:"backBtn"}),this.renderTabs(),i("div",{key:"3fb36223d652e0702884102173f43920c9d684b1",class:"lottery-tipping-page-header-operation"},i("slot",{key:"d7d4b03c828c1b1a0f26eba9594093c8352bafbb",name:"themeBtn"}),i("slot",{key:"2a59bcae7c9e360bc4d6b35a441340f32f8d4f77",name:"logoutBtn"}))),i("div",{key:"f290300abafc8c31d23651fe7a9195a1f9e09e05",class:"lottery-tipping-content"},this.renderContent()))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};function xt(t,e="GET",i=null,n={}){return new Promise(((r,a)=>{const o="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})),s=Object.assign({"Content-Type":"application/json"},n);"GET"!==e&&"HEAD"!==e&&(s["X-Idempotency-Key"]=o);const l={method:e,headers:s,body:null};i&&"GET"!==e&&"HEAD"!==e?l.body=JSON.stringify(i):delete l.body,fetch(t,l).then((t=>t.ok?t.json():a(t))).then((t=>r(t))).catch((t=>a(t)))}))}function kt(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 n=0;n<e;n++){if(!kt(t[n]))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(!kt(e))return!1;i++}return i===e}(t):!t)}Lt.style=".lottery-tipping-page {\n container-type: inline-size;\n background: var(--emw--color-background, #fff);\n}\n.lottery-tipping-page-header {\n height: 56px;\n padding: 8px 10px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n.lottery-tipping-page-header-operation {\n display: flex;\n gap: 14px;\n align-items: center;\n}\n.lottery-tipping-page-header .tab-btns {\n display: flex;\n align-items: center;\n gap: 40px;\n flex: 1;\n justify-content: center;\n}\n.lottery-tipping-page-header .tab-btn {\n padding: 0 8px;\n line-height: 40px;\n font-size: 16px;\n cursor: pointer;\n font-weight: 600;\n height: 40px;\n border: 2px solid var(--emw--color-primary, #fed275);\n border-radius: 8px;\n color: var(--emw--color-typography, #000);\n transition: all 0.2s linear;\n}\n.lottery-tipping-page-header .tab-btn.active {\n background-color: var(--emw--color-primary, #fed275);\n color: var(--emw--color-typography, #000);\n border: 1px solid var(--emw--color-typography, #000);\n}\n\n@container (min-width: 1200px) {\n .tab-btns {\n gap: 40px;\n }\n}\n@container (max-width: 480px) {\n .tab-btns {\n gap: 24px;\n }\n}";const Tt={0:"1",1:"X",2:"2"},Ct={H:0,D:1,A:2},_t=t=>t.map((t=>{const e=[0,0,0];return t[0].forEach((t=>{const i=Ct[t];void 0!==i&&(e[i]=1)})),e.map(((t,e)=>({isSelected:1===t,value:Tt[e]})))})),St=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)),Mt=({message:t,theme:e="success"})=>{window.postMessage({type:"ShowNotificationToast",message:t,theme:e})},zt=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&&d(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&c(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&d(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&c(this.stylingContainer,this.clientStylingUrl))}componentWillLoad(){this.translationUrl&&at(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=St(this.userAgent)?1:2,{totalPages:i,current:n}=this;if(i<=7)for(let e=1;e<=i;e++)t.push({type:"page",value:e});else{t.push({type:"page",value:1}),n>e+2&&t.push({type:"jump",direction:"prev"});const r=Math.max(2,n-e),a=Math.min(i-1,n+e);for(let e=r;e<=a;e++)t.push({type:"page",value:e});n<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 i("div",{key:"daa1bf4cd3031ae3f908bd2638424cbf82b81021",class:"paginator",ref:t=>this.stylingContainer=t},i("div",{key:"93841d6094df6f52b24e277b66d92158aabd2955",class:"total-num"},rt("totalItems",this.language,{total:this.total})),i("button",{key:"205e1dcc5e5c1b18f2dbbb61e127d13e4adaa79f",class:"arrow-btn",disabled:this.current<=1,onClick:()=>this.goToPage(this.current-1)},"<"),t.map((t=>"page"===t.type?i("button",{class:{page:!0,active:this.current===t.value},onClick:()=>this.goToPage(t.value)},t.value):i("button",{class:"ellipsis",onClick:()=>this.jumpTo(t.direction)},"..."))),i("button",{key:"3213a6519702b4215e66afadf8dc6e44839455e7",class:"arrow-btn",disabled:this.current>=this.totalPages,onClick:()=>this.goToPage(this.current+1)},">"),i("select",{key:"da36befb97834a7d3ca212f724306cbe57f76167",onInput:t=>this.changePageSize(parseInt(t.target.value))},this.pageSizeOptions.map((t=>i("option",{value:t},rt("perPage",this.language,{size:t}))))),i("div",{key:"063ca0f31a3ab170a697af945414602f95748dac",class:"jump-box"},rt("goTo",this.language),i("input",{key:"1ec1cbf62de505ea6770c59536c41f3bbb241261",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"]}}};zt.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)}";const jt=R({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"}}),Nt=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&&d(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&c(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&d(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&c(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return i("div",{key:"3a7acb79544c31ac93d82a2ea62ca7d343901b3f",class:"panel-container",ref:t=>this.stylingContainer=t},i("div",{key:"1c4f38f5c8df2e08dd3a33f9af45b7bc0cc1f025",class:{"panel-header":!0,active:this.expanded},onClick:this.togglePanel},i("div",{key:"6e08ac8f744bb3abbfb0148d4cc82843f13b1ea5",class:"header-content"},i("slot",{key:"b58eee18d78117db3638ed71800b40e626de7d63",name:"header"},i("span",{key:"cfc3586117731014a1511f9df19d53132580e2ac"},this.headerTitle))),i("span",{key:"41a8fb02bb96acd842668cd717909f07d02bdad2",class:"arrow "+(this.expanded?"expanded":""),innerHTML:jt})),i("div",{key:"5deb75348843b6cf12bba4c03a5defeaa82760f8",class:"panel-body "+(this.expanded?"open":"closed")},i("slot",{key:"0191d8c751a6fecaaeae237cba17e125df42b6d4",name:"content"})))}get el(){return r(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};Nt.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 Dt=["ro","en","fr","ar","hr"],$t={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"}},Ot=(t,e,i)=>{const n=e;let r=$t[void 0!==n&&Dt.includes(n)?n:"en"][t];return i&&Object.keys(i).forEach((t=>{r=r.replace(`{${t}}`,i[t])})),r},It=t=>{Object.keys(t).forEach((e=>{for(let i in t[e])$t[e][i]=t[e][i]}))},Bt=[{value:"1"},{value:"X"},{value:"2"}],Et=R({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"}}),Pt=R({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"}}),Ht=R({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"}}),At=R(H,{extraSVGAttrs:{width:"20px",height:"20px",fill:"currentColor"}}),Ut=R(U,{extraSVGAttrs:{width:"20px",height:"20px",fill:"currentColor"}}),Gt=class{constructor(n){t(this,n),this.lotteryTippingBulletBetEvent=e(this,"lotteryTippingBulletBetSelect",7),this.lotteryTippingCurrentPageChangeEvent=e(this,"lotteryTippingCurrentPageChange",7),this.eventNameRender=(t,e)=>i("div",{class:"flex gap-1 eventNameContainer__item"},i("span",{class:"eventNameContainer__item--title"},e),i("general-tooltip",null,i("span",{slot:"trigger",class:"icon info-icon",innerHTML:Ht,style:{width:"18px"}}),i("div",{slot:"content"},i("div",{class:"match-info"},i("div",{class:"match-info-item"},i("div",{class:"match-info-item-label"},Ot("homeTeam",this.language)),i("div",{class:"match-info-item-value"},t.homeName)),i("div",{class:"match-info-item"},i("div",{class:"match-info-item-label"},Ot("awayTeam",this.language)),i("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 n=m(t);if(isNaN(n.getTime()))throw new Error(`Invalid date: ${t}`);if(i)return b(n,i);let r="dd/MM/yyyy";return"time"===e?r="dd/MM/yyyy HH:mm:ss":"week"===e&&(r="ccc dd/MM/yyyy HH:mm:ss"),b(n,r)}catch(t){return console.error("Error formatting date:",t.message),""}})({date:e,format:"ccc HH:mm"})},{title:()=>i("lottery-tipping-bullet-group",{theme:"text",bulletConfigContent:JSON.stringify(Bt)}),value:"results",width:5,render:(t,e,n)=>{var r,a;return i("lottery-tipping-bullet-group",{mode:this.mode,bulletConfigContent:JSON.stringify(null===(a=null===(r=this.bulletConfigLineGroup)||void 0===r?void 0:r[this.currentPage-1])||void 0===a?void 0:a[n]),"position-idx":`${this.currentPage-1}-${n}`})}}],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=!1,this.hasErrors=!1,this.dialogConfig={visible:!1},this.ticketDataSource=[]}handleNewTranslations(){this.isLoading=!0,It(JSON.parse(this.translationUrl)),this.isLoading=!1}handleClientStylingChange(t,e){t!=e&&d(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&c(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentWillLoad(){this.translationUrl&&It(JSON.parse(this.translationUrl))}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&d(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&c(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},(()=>[...Bt]))}_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",renderOne:i=!1})=>{window.postMessage({type:"ShowNotificationToast",message:t,theme:e,renderOne:i})})({message:Ot("selectionCleared",this.language),renderOne:!0}),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,[n,r]=i.split("-");this.bulletConfigLineGroup[n][r]=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:Ot("selectionOnLineCleared",this.language),onConfirm:e,onCancel:t}}})()}swapCard(t,e){const i=this.mainContainer;if(!i)return;const{out:n,in:r}={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(n),i.addEventListener("animationend",(()=>{i.classList.remove(n),e();const t=this.mainContainer;t&&(t.classList.add(r),t.addEventListener("animationend",(()=>t.classList.remove(r)),{once:!0}))}),{once:!0})}handleCurrentPageChange(){this.lotteryTippingCurrentPageChangeEvent.emit({currentPage:this.currentPage})}renderLoading(){return i("div",{class:"loading-wrap"},i("section",{class:"dots-container"},i("div",{class:"dot"}),i("div",{class:"dot"}),i("div",{class:"dot"}),i("div",{class:"dot"}),i("div",{class:"dot"})))}render(){var t,e,n,r;if(this.isLoading)return this.renderLoading();if(this.hasErrors)return i("div",{ref:t=>this.stylingContainer=t,class:"LotteryTippingTicketBet__container"},i("p",null,Ot("error",this.language)));const a=({columns:t,dataSource:e,hideHead:n=!1,grid:r=!0,bordered:a=!0})=>i("table",{class:{bordered:a,grid:r,"my-table-component":!0}},!n&&i("thead",null,i("tr",null,t.map((t=>{var e;return i("th",{key:t.value,style:{width:t.width+"%",textAlign:t.align}},"string"==typeof t.title?t.title:null===(e=t.title)||void 0===e?void 0:e.call(t))})))),i("tbody",null,e.map(((e,n)=>i("tr",{key:n},t.map((t=>i("td",{key:t.value,style:{width:t.width+"%",textAlign:t.align},class:{"no-wrap":t.nowrap}},t.render?t.render(e,e[t.value],n):e[t.value])))))))),o=this.totalPages<this.maxTotalPages&&this.currentPage===this.totalPages,s=this.totalPages>this.minTotalPages;return 0===this.ticketDataSource.length||0===this.minTotalPages||0===this.maxTotalPages?i("div",{class:"LotteryTippingTicketBet__container",ref:t=>this.stylingContainer=t},i("div",{class:"LotteryTippingTicketBet__empty"},i("p",null,Ot("noData",this.language)))):this.readPretty?i("div",{class:"LotteryTippingTicketBet__container",ref:t=>this.stylingContainer=t},i("div",{class:"LotteryTippingTicketBet__main",ref:t=>this.mainContainer=t},i(a,{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&&i("div",null,i("div",{class:"border-line"}),i("div",{class:"LotteryTippingTicketBet__footer"},i("div",{class:"my-pagination flex justify-between"},i("span",null,Ot("lineInfo",this.language,{currentPage:this.currentPage,totalPages:this.totalPages})),i("div",{class:"flex gap-1"},i("span",{class:"btn "+(1===this.currentPage?"disabled":""),onClick:this.prevPage.bind(this)},i("span",{class:"icon",innerHTML:At})),i("span",{class:"btn "+(this.currentPage===this.totalPages?"disabled":""),onClick:this.nextPage.bind(this)},i("span",{class:"icon",innerHTML:Ut})))))))):i("div",{ref:t=>this.stylingContainer=t,class:"LotteryTippingTicketBet__container"},i("div",{class:"LotteryTippingTicketBet__tableToolbar flex justify-end gap-1"},i("button",{class:{"LotteryTippingTicketBet__tableToolbar--item":!0,"mr-0":!(o||s)},onClick:this.handleClearAll.bind(this)},Ot("clearAll",this.language))),i("div",{class:"flex align-center LotteryTippingTicketBet__main",ref:t=>this.mainContainer=t},i(a,{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}),(o||s)&&i("div",{class:"LotteryTippingTicketBet__lineOperatorGroup"},o&&i("div",{class:{"LotteryTippingTicketBet__lineOperatorGroup--item":!0},onClick:this.handleAddLine.bind(this)},i("span",{class:"icon",innerHTML:Et})),s&&i("div",{class:{"LotteryTippingTicketBet__lineOperatorGroup--item":!0},onClick:this.handleRemoveLine.bind(this)},i("span",{class:"icon",innerHTML:Pt})))),i("div",{class:"border-line"}),i("div",{class:"LotteryTippingTicketBet__footer"},i("div",{class:"my-pagination flex justify-between"},i("span",null,Ot("lineInfo",this.language,{currentPage:this.currentPage,totalPages:this.totalPages})),i("div",{class:"flex gap-1"},i("span",{class:"btn "+(1===this.currentPage?"disabled":""),onClick:this.prevPage.bind(this)},i("span",{class:"icon",innerHTML:At})),i("span",{class:"btn "+(this.currentPage===this.totalPages?"disabled":""),onClick:this.nextPage.bind(this)},i("span",{class:"icon",innerHTML:Ut}))))),this.dialogConfig.visible&&i("vaadin-confirm-dialog",{rejectButtonVisible:!0,rejectText:Ot("cancel",this.language),confirmText:Ot("confirm",this.language),opened:null===(n=this.dialogConfig)||void 0===n?void 0:n.visible,onConfirm:this.dialogConfig.onConfirm,onReject:this.dialogConfig.onCancel},null===(r=this.dialogConfig)||void 0===r?void 0:r.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 Zt,Rt,Ft,Vt;Gt.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"}(Zt||(Zt={})),function(t){t.FullTime="FullTime",t.HalfTime="HalfTime",t.Both="Both"}(Rt||(Rt={})),function(t){t.OPEN="OPEN"}(Ft||(Ft={})),function(t){t.Settled="Settled",t.Purchased="Purchased",t.Canceled="Canceled"}(Vt||(Vt={}));const Xt=["ro","en","fr","ar","hr"],Wt={en:{stop:"Stop",at:"at",turnover:"Turnover: ",selectionCleared:"Your selection will be cleared.",ticketSubmitted:"Ticket submitted successfully.",ticketFailed:"Failed to submit tickets.",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"}},Yt=(t,e)=>{const i=e;return Wt[void 0!==i&&Xt.includes(i)?i:"en"][t]};function Jt(t,e="GET",i=null,n={}){return new Promise(((r,a)=>{const o="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})),s=Object.assign({"Content-Type":"application/json"},n);"GET"!==e&&"HEAD"!==e&&(s["X-Idempotency-Key"]=o);const l={method:e,headers:s};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=>r(t))).catch((t=>a(t)))}))}const Kt=({message:t,theme:e="success"})=>{window.postMessage({type:"ShowNotificationToast",message:t,theme:e})},qt=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(".")},Qt=["H","D","A"],te=(t=[])=>t.filter((t=>t.enabled)),ee=({rawData:t,selectedBettingType:e,selectedPlayingMode:i})=>{var n,r,a,o,s,l;const d=null===(o=null===(a=null===(r=null===(n=null==t?void 0:t.rules)||void 0===n?void 0:n.poolGame)||void 0===r?void 0:r.playTypes)||void 0===a?void 0:a.find((t=>t.bettingType===e&&t.playMode===i)))||void 0===o?void 0:o.betTypeId,c=null===(l=null===(s=null==t?void 0:t.rules)||void 0===s?void 0:s.betTypes)||void 0===l?void 0:l.find((t=>t.id===d));return{betTypeId:d,betType:c}};function ie(t,e="€"){return null==t?"":`${e}${t?qt(t):0}`}function ne(t){if(!t)return"";const e=(({date:t,type:e="date",format:i})=>{try{const n=m(t);if(isNaN(n.getTime()))throw new Error(`Invalid date: ${t}`);if(i)return b(n,i);let r="dd/MM/yyyy";return"time"===e?r="dd/MM/yyyy HH:mm:ss":"week"===e&&(r="ccc dd/MM/yyyy HH:mm:ss"),b(n,r)}catch(t){return console.error("Error formatting date:",t.message),""}})({date:t,format:"EEEE"});return["saturday","sunday"].includes(e.toLowerCase())?e.toUpperCase():"MIDWEEK"}const re="TICKET_INVALID_TOKEN",ae=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.drawSubmitAvailable=!1,this.rawData={},this.saleStatisticsInfo={},this.currentStake=void 0,this.dialogConfig={visible:!1}}async getLotteryTippingBulletResults(){return await this.childRef.getData()}get lineNumberRange(){const{betType:t}=ee({rawData:this.rawData,selectedBettingType:this.selectedBettingType,selectedPlayingMode:this.selectedPlayingMode}),e=(null==t?void 0:t.boardsAllowed)||[0],[i,n]=[Math.min(...e),Math.max(...e)];return{minLineNumber:i,maxLineNumber:n,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===Rt.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,n,r;if(t===this.selectedBettingType)return;this.selectedBettingType=t;const a=(({bettingType:t,playTypeConfig:e,betTypeConfig:i,enabledPlayingModeOptions:n})=>{const r=i.filter((t=>t.enabled)).map((t=>t.id)),a=e.filter((t=>r.includes(t.betTypeId))).filter((e=>e.bettingType===t)).map((t=>t.playMode));return n.filter((t=>a.includes(t.code)))})({bettingType:this.selectedBettingType,playTypeConfig:this.playTypeConfig,betTypeConfig:this.betTypeConfig,enabledPlayingModeOptions:te((null===(n=null===(i=null===(e=this.rawData)||void 0===e?void 0:e.rules)||void 0===i?void 0:i.poolGame)||void 0===n?void 0:n.playModes)||[])});this.playingModeOptions=a,a.length?a.map((t=>t.code)).includes(this.selectedPlayingMode)||(this.hasSelectBullet=!1,this.handlePlayingModeChange(null===(r=a[0])||void 0===r?void 0:r.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:Yt("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 qt(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:n=1}=ee({rawData:this.rawData,selectedBettingType:this.selectedBettingType,selectedPlayingMode:this.selectedPlayingMode}).betType||{};return e.some((t=>{const e=this.calculateCombinationInLine(t);return e<i||e>n}))})({rawResults:t})})()}handleClientStylingChange(t,e){t!=e&&d(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&c(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}handleTimerStop(){this.drawSubmitAvailable=!0}componentWillLoad(){this.translationUrl&&(async t=>{if(t)try{const i=await fetch(t);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const n=await i.json();e=n,Object.keys(e).forEach((t=>{for(let i in e[t])Wt[t][i]=e[t][i]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&d(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&c(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}connectedCallback(){(()=>{let t=new URL(`${this.endpoint}/games/${this.gameId}`);this.isLoading=!0,Jt(t.href,"GET").then((t=>{var e,i,n,r,a,o,s;this.rawData=t,this.bettingTypeOptions=te((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=te((null===(r=null===(n=null==t?void 0:t.rules)||void 0===n?void 0:n.poolGame)||void 0===r?void 0:r.playModes)||[]),this.initiateCurrentStake();const{bettingType:l,playMode:d}=(({playTypeConfig:t=[],betTypeConfig:e=[],enabledBettingTypeOptions:i=[],enabledPlayingModeOptions:n=[]})=>{const r=e.filter((t=>t.enabled));for(const e of r){const{bettingType:r,playMode:a}=null==t?void 0:t.find((t=>t.betTypeId===e.id));if(i.map((t=>t.code)).includes(r)&&n.map((t=>t.code)).includes(a))return{bettingType:r,playMode:a}}return{}})({playTypeConfig:null===(o=null===(a=null==t?void 0:t.rules)||void 0===a?void 0:a.poolGame)||void 0===o?void 0:o.playTypes,betTypeConfig:null===(s=null==t?void 0:t.rules)||void 0===s?void 0:s.betTypes,enabledBettingTypeOptions:this.bettingTypeOptions,enabledPlayingModeOptions:this.playingModeOptions});return this.handleBettingTypeChange(l),this.selectedPlayingMode=d,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 Jt(`${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}=ee({rawData:this.rawData,selectedBettingType:this.selectedBettingType,selectedPlayingMode:this.selectedPlayingMode}),n=new URL(`${this.endpoint}/tickets`),r=(({playerId:t,rawResults:e,gameId:i,rawData:n,amount:r,currentStake:a,betTypeId:o,betType:s})=>{var l;const d={playerId:t,tickets:[]},c=(t=>{const e=t=>t.map((t=>t.isSelected?1:0)),i=t.map((t=>t.map(e))),n=[];return i.forEach(((t,e)=>{const i=[];t.forEach(((t,e)=>{const n=t.map(((t,e)=>t?Qt[e]:null)).filter(Boolean);i[e]=[n]})),n[e]=i})),n})(e),h=a||{};return d.tickets.push({startingDrawId:null===(l=null==n?void 0:n.currentDraw)||void 0===l?void 0:l.id,amount:r,gameId:i,gameName:n.name,currency:h.currency,selection:c.map((t=>({betType:o,stake:+h.value,poolGameSelections:t,quickPick:!1,betName:s.name}))),multiplier:!1,drawCount:1,quickPick:!1}),d})({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 n={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,n).then((t=>{if(401===t.status)throw new Error(re);if(t.status>300)throw new Error(t.statusText);return t.json().then((e=>{if(!(i=e.tickets)||!i.length||i.some((t=>t.state!==Vt.Purchased)))throw new Error(t.statusText);var i;return e}))}))})({body:r,sessionId:this.sessionId,url:n.href}).then((()=>{Kt({message:Yt("ticketSubmitted",this.language)}),this.clearBulletConfig(),this.updateSaleStatistics()})).catch((t=>{if(t.message===re)return this.logoutEventHandler.emit(),void Kt({message:re,theme:"error"});Kt({message:Yt("ticketFailed",this.language),theme:"error"})})).finally((()=>{this.submitLoading=!1}))}get lineCountRender(){const t=qt(this.totalLineCombination);let e=Yt("lines",this.language);return[0,1].includes(+t)&&(e=Yt("line",this.language)),t+" "+e}renderBettingControls(){var t,e;const n=()=>i("div",{class:"skeleton-content"},i("div",{class:"skeleton-item skeleton-animated"})),r=()=>{var t;return i("div",null,i("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 i("div",{class:"LotteryTippingTicketController__top"},i("div",{class:"LotteryTippingTicketController__row"},i("div",{class:"LotteryTippingTicketController__section"},i("span",{class:"LotteryTippingTicketController__label"},Yt("bettingType",this.language)),this.bettingTypeOptions.length?(()=>i("div",{class:"LotteryTippingTicketController__segmented-control"},this.bettingTypeOptions.map((t=>i("button",{class:{LotteryTippingTicketController__segment:!0,"LotteryTippingTicketController__segment--active":this.selectedBettingType===t.code},onClick:this.handleBettingTypeChange.bind(this,t.code)},t.name)))))():n()),i("div",{class:"LotteryTippingTicketController__section"},i("span",{class:"LotteryTippingTicketController__label"},Yt("playingMode",this.language)),this.playingModeOptions.length?(()=>i("div",{class:"LotteryTippingTicketController__segmented-control"},this.playingModeOptions.map((t=>i("button",{class:{LotteryTippingTicketController__segment:!0,"LotteryTippingTicketController__segment--active":this.selectedPlayingMode===t.code},onClick:this.handlePlayingModeChange.bind(this,t.code)},t.name)))))():n()),(null===(t=this.stakeOptions)||void 0===t?void 0:t.length)>1&&i("div",{class:"LotteryTippingTicketController__section"},i("span",{class:"LotteryTippingTicketController__label"},Yt("stakePerLine",this.language)),r()),(null===(e=this.stakeOptions)||void 0===e?void 0:e.length)>1&&i("div",{class:"LotteryTippingTicketController__section"},i("span",{class:"LotteryTippingTicketController__label"},Yt("stakePerLine",this.language)),r())))}renderOrderSummary(){var t;return i("div",{class:"LotteryTippingTicketController__main--right order-summary"},i("h3",{class:"order-summary__title"},Yt("orderSummaryTitle",this.language)),i("div",{class:"order-summary__ticket-info"},i("div",{class:"order-summary__ticket"},Yt("orderSummaryTickets",this.language),":"),i("div",{class:"order-summary__details"},i("span",{class:"order-summary__line-count"},this.lineCountRender),i("div",null,this.currentStake&&i("span",{class:"order-summary__multiplier"},"x"),i("span",{class:"order-summary__stake"},this.currentStakeFormatted)),this.isBothBettingType&&i("div",null,i("span",{class:"order-summary__multiplier"},"x"),i("span",{class:"order-summary__stake"},this.bothBettingTypeMultiplier)))),i("hr",{class:"order-summary__divider"}),i("div",{class:"order-summary__ticket-info"},i("div",{class:"order-summary__ticket"},Yt("orderSummaryTotal",this.language),":"),i("span",{class:"order-summary__details"},this.totalAmountFormatted)),i("div",{class:"order-summary__button-wrapper"},i("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)||!this.drawSubmitAvailable,text:Yt("orderSummarySubmit",this.language)})))}render(){var t,e,n,r,a,o,s,l,d,c,h;return i("div",{key:"fe8bfb6644f45cc594f600d71f1f1f587e8b8b3a",class:"lottery-tipping-ticket-controller__container",ref:t=>this.stylingContainer=t},i("lottery-banner",{key:"5cae10f59f4395d9cf18090c3f8186672b5939be","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,startTime:null===(r=null===(n=this.rawData)||void 0===n?void 0:n.currentDraw)||void 0===r?void 0:r.wagerStartTime,"banner-title":ne(null===(o=null===(a=this.rawData)||void 0===a?void 0:a.currentDraw)||void 0===o?void 0:o.date),turnover:ie(null===(l=null===(s=this.saleStatisticsInfo)||void 0===s?void 0:s.wagerSegment)||void 0===l?void 0:l.totalSalesCrossDraw),language:this.language,"translation-url":this.translationUrl,"logo-url":this.logoUrl,onLotteryBannerTimerStop:this.handleTimerStop.bind(this)}),this.renderBettingControls(),i("div",{key:"ee895e3c508c0271165fae39285db9e1ec7465a0",class:"flex flex-wrap LotteryTippingTicketController__main"},i("div",{key:"e605083e867607e4fd606c2144eb7dd8bab1b3cf",class:"LotteryTippingTicketController__main--left"},i("lottery-tipping-ticket-bet",{key:"955218a174ee29b217e89fcf1248ba5614999823",ref:t=>this.childRef=t,endpoint:this.endpoint,"session-id":this.sessionId,"game-id":null===(d=this.rawData)||void 0===d?void 0:d.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===Zt.SingleBet?"single":"multi","client-styling":this.clientStyling,"client-styling-Url":this.clientStylingUrl})),this.renderOrderSummary()),this.dialogConfig.visible&&i("vaadin-confirm-dialog",{key:"ee05caa2dc238aed34c55ff9e66f05aeb7c61456",rejectButtonVisible:!0,rejectText:Yt("cancel",this.language),confirmText:Yt("confirm",this.language),opened:null===(c=this.dialogConfig)||void 0===c?void 0:c.visible,onConfirm:this.dialogConfig.onConfirm,onReject:this.dialogConfig.onCancel},null===(h=this.dialogConfig)||void 0===h?void 0:h.content))}static get assetsDirs(){return["../static"]}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};ae.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}";var oe,se="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},le={exports:{}};oe=le,function(t){
|
|
2
2
|
/*!
|
|
3
3
|
* decimal.js v10.6.0
|
|
4
4
|
* An arbitrary-precision Decimal type for JavaScript.
|
|
@@ -6,4 +6,4 @@ import{r as t,c as e,h as i,g as n,a as r,H as a}from"./index-c22bb7d4.js";impor
|
|
|
6
6
|
* Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
|
|
7
7
|
* MIT Licence
|
|
8
8
|
*/
|
|
9
|
-
var e,i,n,r,a=9e15,o=1e9,s="0123456789abcdef",l="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",d="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",c={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-a,maxE:a,crypto:!1},h=!0,p="[DecimalError] ",g=p+"Invalid argument: ",f=p+"Precision limit exceeded",u=p+"crypto unavailable",m="[object Decimal]",b=Math.floor,y=Math.pow,v=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,w=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,L=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,x=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,k=1e7,T=7,C=l.length-1,_=d.length-1,S={toStringTag:m};function M(t){var e,i,n,r=t.length-1,a="",o=t[0];if(r>0){for(a+=o,e=1;e<r;e++)(i=T-(n=t[e]+"").length)&&(a+=H(i)),a+=n;(i=T-(n=(o=t[e])+"").length)&&(a+=H(i))}else if(0===o)return"0";for(;o%10==0;)o/=10;return a+o}function z(t,e,i){if(t!==~~t||t<e||t>i)throw Error(g+t)}function j(t,e,i,n){var r,a,o,s;for(a=t[0];a>=10;a/=10)--e;return--e<0?(e+=T,r=0):(r=Math.ceil((e+1)/T),e%=T),a=y(10,T-e),s=t[r]%a|0,null==n?e<3?(0==e?s=s/100|0:1==e&&(s=s/10|0),o=i<4&&99999==s||i>3&&49999==s||5e4==s||0==s):o=(i<4&&s+1==a||i>3&&s+1==a/2)&&(t[r+1]/a/100|0)==y(10,e-2)-1||(s==a/2||0==s)&&!(t[r+1]/a/100|0):e<4?(0==e?s=s/1e3|0:1==e?s=s/100|0:2==e&&(s=s/10|0),o=(n||i<4)&&9999==s||!n&&i>3&&4999==s):o=((n||i<4)&&s+1==a||!n&&i>3&&s+1==a/2)&&(t[r+1]/a/1e3|0)==y(10,e-3)-1,o}function N(t,e,i){for(var n,r,a=[0],o=0,l=t.length;o<l;){for(r=a.length;r--;)a[r]*=e;for(a[0]+=s.indexOf(t.charAt(o++)),n=0;n<a.length;n++)a[n]>i-1&&(void 0===a[n+1]&&(a[n+1]=0),a[n+1]+=a[n]/i|0,a[n]%=i)}return a.reverse()}S.absoluteValue=S.abs=function(){var t=new this.constructor(this);return t.s<0&&(t.s=1),$(t)},S.ceil=function(){return $(new this.constructor(this),this.e+1,2)},S.clampedTo=S.clamp=function(t,e){var i=this,n=i.constructor;if(t=new n(t),e=new n(e),!t.s||!e.s)return new n(NaN);if(t.gt(e))throw Error(g+e);return i.cmp(t)<0?t:i.cmp(e)>0?e:new n(i)},S.comparedTo=S.cmp=function(t){var e,i,n,r,a=this,o=a.d,s=(t=new a.constructor(t)).d,l=a.s,d=t.s;if(!o||!s)return l&&d?l!==d?l:o===s?0:!o^l<0?1:-1:NaN;if(!o[0]||!s[0])return o[0]?l:s[0]?-d:0;if(l!==d)return l;if(a.e!==t.e)return a.e>t.e^l<0?1:-1;for(e=0,i=(n=o.length)<(r=s.length)?n:r;e<i;++e)if(o[e]!==s[e])return o[e]>s[e]^l<0?1:-1;return n===r?0:n>r^l<0?1:-1},S.cosine=S.cos=function(){var t,e,i=this,n=i.constructor;return i.d?i.d[0]?(e=n.rounding,n.precision=(t=n.precision)+Math.max(i.e,i.sd())+T,n.rounding=1,i=function(t,e){var i,n,r;if(e.isZero())return e;(n=e.d.length)<32?r=(1/Y(4,i=Math.ceil(n/3))).toString():(i=16,r="2.3283064365386962890625e-10"),t.precision+=i,e=W(t,1,e.times(r),new t(1));for(var a=i;a--;){var o=e.times(e);e=o.times(o).minus(o).times(8).plus(1)}return t.precision-=i,e}(n,J(n,i)),n.precision=t,n.rounding=e,$(2==r||3==r?i.neg():i,t,e,!0)):new n(1):new n(NaN)},S.cubeRoot=S.cbrt=function(){var t,e,i,n,r,a,o,s,l,d,c=this,p=c.constructor;if(!c.isFinite()||c.isZero())return new p(c);for(h=!1,(a=c.s*y(c.s*c,1/3))&&Math.abs(a)!=1/0?n=new p(a.toString()):(i=M(c.d),(a=((t=c.e)-i.length+1)%3)&&(i+=1==a||-2==a?"0":"00"),a=y(i,1/3),t=b((t+1)/3)-(t%3==(t<0?-1:2)),(n=new p(i=a==1/0?"5e"+t:(i=a.toExponential()).slice(0,i.indexOf("e")+1)+t)).s=c.s),o=(t=p.precision)+3;;)if(d=(l=(s=n).times(s).times(s)).plus(c),n=D(d.plus(c).times(s),d.plus(l),o+2,1),M(s.d).slice(0,o)===(i=M(n.d)).slice(0,o)){if("9999"!=(i=i.slice(o-3,o+1))&&(r||"4999"!=i)){+i&&(+i.slice(1)||"5"!=i.charAt(0))||($(n,t+1,1),e=!n.times(n).times(n).eq(c));break}if(!r&&($(s,t+1,0),s.times(s).times(s).eq(c))){n=s;break}o+=4,r=1}return h=!0,$(n,t,p.rounding,e)},S.decimalPlaces=S.dp=function(){var t,e=this.d,i=NaN;if(e){if(i=((t=e.length-1)-b(this.e/T))*T,t=e[t])for(;t%10==0;t/=10)i--;i<0&&(i=0)}return i},S.dividedBy=S.div=function(t){return D(this,new this.constructor(t))},S.dividedToIntegerBy=S.divToInt=function(t){var e=this.constructor;return $(D(this,new e(t),0,1,1),e.precision,e.rounding)},S.equals=S.eq=function(t){return 0===this.cmp(t)},S.floor=function(){return $(new this.constructor(this),this.e+1,3)},S.greaterThan=S.gt=function(t){return this.cmp(t)>0},S.greaterThanOrEqualTo=S.gte=function(t){var e=this.cmp(t);return 1==e||0===e},S.hyperbolicCosine=S.cosh=function(){var t,e,i,n,r,a=this,o=a.constructor,s=new o(1);if(!a.isFinite())return new o(a.s?1/0:NaN);if(a.isZero())return s;n=o.rounding,o.precision=(i=o.precision)+Math.max(a.e,a.sd())+4,o.rounding=1,(r=a.d.length)<32?e=(1/Y(4,t=Math.ceil(r/3))).toString():(t=16,e="2.3283064365386962890625e-10"),a=W(o,1,a.times(e),new o(1),!0);for(var l,d=t,c=new o(8);d--;)l=a.times(a),a=s.minus(l.times(c.minus(l.times(c))));return $(a,o.precision=i,o.rounding=n,!0)},S.hyperbolicSine=S.sinh=function(){var t,e,i,n,r=this,a=r.constructor;if(!r.isFinite()||r.isZero())return new a(r);if(i=a.rounding,a.precision=(e=a.precision)+Math.max(r.e,r.sd())+4,a.rounding=1,(n=r.d.length)<3)r=W(a,2,r,r,!0);else{t=1.4*Math.sqrt(n),r=W(a,2,r=r.times(1/Y(5,t=t>16?16:0|t)),r,!0);for(var o,s=new a(5),l=new a(16),d=new a(20);t--;)o=r.times(r),r=r.times(s.plus(o.times(l.times(o).plus(d))))}return a.precision=e,a.rounding=i,$(r,e,i,!0)},S.hyperbolicTangent=S.tanh=function(){var t,e,i=this,n=i.constructor;return i.isFinite()?i.isZero()?new n(i):(e=n.rounding,n.precision=(t=n.precision)+7,n.rounding=1,D(i.sinh(),i.cosh(),n.precision=t,n.rounding=e)):new n(i.s)},S.inverseCosine=S.acos=function(){var t=this,e=t.constructor,i=t.abs().cmp(1),n=e.precision,r=e.rounding;return-1!==i?0===i?t.isNeg()?E(e,n,r):new e(0):new e(NaN):t.isZero()?E(e,n+4,r).times(.5):(e.precision=n+6,e.rounding=1,t=new e(1).minus(t).div(t.plus(1)).sqrt().atan(),e.precision=n,e.rounding=r,t.times(2))},S.inverseHyperbolicCosine=S.acosh=function(){var t,e,i=this,n=i.constructor;return i.lte(1)?new n(i.eq(1)?0:NaN):i.isFinite()?(e=n.rounding,n.precision=(t=n.precision)+Math.max(Math.abs(i.e),i.sd())+4,n.rounding=1,h=!1,i=i.times(i).minus(1).sqrt().plus(i),h=!0,n.precision=t,n.rounding=e,i.ln()):new n(i)},S.inverseHyperbolicSine=S.asinh=function(){var t,e,i=this,n=i.constructor;return!i.isFinite()||i.isZero()?new n(i):(e=n.rounding,n.precision=(t=n.precision)+2*Math.max(Math.abs(i.e),i.sd())+6,n.rounding=1,h=!1,i=i.times(i).plus(1).sqrt().plus(i),h=!0,n.precision=t,n.rounding=e,i.ln())},S.inverseHyperbolicTangent=S.atanh=function(){var t,e,i,n,r=this,a=r.constructor;return r.isFinite()?r.e>=0?new a(r.abs().eq(1)?r.s/0:r.isZero()?r:NaN):(t=a.precision,e=a.rounding,n=r.sd(),Math.max(n,t)<2*-r.e-1?$(new a(r),t,e,!0):(a.precision=i=n-r.e,r=D(r.plus(1),new a(1).minus(r),i+t,1),a.precision=t+4,a.rounding=1,r=r.ln(),a.precision=t,a.rounding=e,r.times(.5))):new a(NaN)},S.inverseSine=S.asin=function(){var t,e,i,n,r=this,a=r.constructor;return r.isZero()?new a(r):(e=r.abs().cmp(1),i=a.precision,n=a.rounding,-1!==e?0===e?((t=E(a,i+4,n).times(.5)).s=r.s,t):new a(NaN):(a.precision=i+6,a.rounding=1,r=r.div(new a(1).minus(r.times(r)).sqrt().plus(1)).atan(),a.precision=i,a.rounding=n,r.times(2)))},S.inverseTangent=S.atan=function(){var t,e,i,n,r,a,o,s,l,d=this,c=d.constructor,p=c.precision,g=c.rounding;if(d.isFinite()){if(d.isZero())return new c(d);if(d.abs().eq(1)&&p+4<=_)return(o=E(c,p+4,g).times(.25)).s=d.s,o}else{if(!d.s)return new c(NaN);if(p+4<=_)return(o=E(c,p+4,g).times(.5)).s=d.s,o}for(c.precision=s=p+10,c.rounding=1,t=i=Math.min(28,s/T+2|0);t;--t)d=d.div(d.times(d).plus(1).sqrt().plus(1));for(h=!1,e=Math.ceil(s/T),n=1,l=d.times(d),o=new c(d),r=d;-1!==t;)if(r=r.times(l),a=o.minus(r.div(n+=2)),r=r.times(l),void 0!==(o=a.plus(r.div(n+=2))).d[e])for(t=e;o.d[t]===a.d[t]&&t--;);return i&&(o=o.times(2<<i-1)),h=!0,$(o,c.precision=p,c.rounding=g,!0)},S.isFinite=function(){return!!this.d},S.isInteger=S.isInt=function(){return!!this.d&&b(this.e/T)>this.d.length-2},S.isNaN=function(){return!this.s},S.isNegative=S.isNeg=function(){return this.s<0},S.isPositive=S.isPos=function(){return this.s>0},S.isZero=function(){return!!this.d&&0===this.d[0]},S.lessThan=S.lt=function(t){return this.cmp(t)<0},S.lessThanOrEqualTo=S.lte=function(t){return this.cmp(t)<1},S.logarithm=S.log=function(t){var e,i,n,r,a,o,s,l,d=this,c=d.constructor,p=c.precision,g=c.rounding;if(null==t)t=new c(10),e=!0;else{if(i=(t=new c(t)).d,t.s<0||!i||!i[0]||t.eq(1))return new c(NaN);e=t.eq(10)}if(i=d.d,d.s<0||!i||!i[0]||d.eq(1))return new c(i&&!i[0]?-1/0:1!=d.s?NaN:i?0:1/0);if(e)if(i.length>1)a=!0;else{for(r=i[0];r%10==0;)r/=10;a=1!==r}if(h=!1,o=R(d,s=p+5),n=e?B(c,s+10):R(t,s),j((l=D(o,n,s,1)).d,r=p,g))do{if(o=R(d,s+=10),n=e?B(c,s+10):R(t,s),l=D(o,n,s,1),!a){+M(l.d).slice(r+1,r+15)+1==1e14&&(l=$(l,p+1,0));break}}while(j(l.d,r+=10,g));return h=!0,$(l,p,g)},S.minus=S.sub=function(t){var e,i,n,r,a,o,s,l,d,c,p,g,f=this,u=f.constructor;if(t=new u(t),!f.d||!t.d)return f.s&&t.s?f.d?t.s=-t.s:t=new u(t.d||f.s!==t.s?f:NaN):t=new u(NaN),t;if(f.s!=t.s)return t.s=-t.s,f.plus(t);if(g=t.d,s=u.precision,l=u.rounding,!(d=f.d)[0]||!g[0]){if(g[0])t.s=-t.s;else{if(!d[0])return new u(3===l?-0:0);t=new u(f)}return h?$(t,s,l):t}if(i=b(t.e/T),c=b(f.e/T),d=d.slice(),a=c-i){for((p=a<0)?(e=d,a=-a,o=g.length):(e=g,i=c,o=d.length),a>(n=Math.max(Math.ceil(s/T),o)+2)&&(a=n,e.length=1),e.reverse(),n=a;n--;)e.push(0);e.reverse()}else{for((p=(n=d.length)<(o=g.length))&&(o=n),n=0;n<o;n++)if(d[n]!=g[n]){p=d[n]<g[n];break}a=0}for(p&&(e=d,d=g,g=e,t.s=-t.s),n=g.length-(o=d.length);n>0;--n)d[o++]=0;for(n=g.length;n>a;){if(d[--n]<g[n]){for(r=n;r&&0===d[--r];)d[r]=k-1;--d[r],d[n]+=k}d[n]-=g[n]}for(;0===d[--o];)d.pop();for(;0===d[0];d.shift())--i;return d[0]?(t.d=d,t.e=I(d,i),h?$(t,s,l):t):new u(3===l?-0:0)},S.modulo=S.mod=function(t){var e,i=this,n=i.constructor;return t=new n(t),!i.d||!t.s||t.d&&!t.d[0]?new n(NaN):!t.d||i.d&&!i.d[0]?$(new n(i),n.precision,n.rounding):(h=!1,9==n.modulo?(e=D(i,t.abs(),0,3,1)).s*=t.s:e=D(i,t,0,n.modulo,1),e=e.times(t),h=!0,i.minus(e))},S.naturalExponential=S.exp=function(){return G(this)},S.naturalLogarithm=S.ln=function(){return R(this)},S.negated=S.neg=function(){var t=new this.constructor(this);return t.s=-t.s,$(t)},S.plus=S.add=function(t){var e,i,n,r,a,o,s,l,d,c,p=this,g=p.constructor;if(t=new g(t),!p.d||!t.d)return p.s&&t.s?p.d||(t=new g(t.d||p.s===t.s?p:NaN)):t=new g(NaN),t;if(p.s!=t.s)return t.s=-t.s,p.minus(t);if(c=t.d,s=g.precision,l=g.rounding,!(d=p.d)[0]||!c[0])return c[0]||(t=new g(p)),h?$(t,s,l):t;if(a=b(p.e/T),n=b(t.e/T),d=d.slice(),r=a-n){for(r<0?(i=d,r=-r,o=c.length):(i=c,n=a,o=d.length),r>(o=(a=Math.ceil(s/T))>o?a+1:o+1)&&(r=o,i.length=1),i.reverse();r--;)i.push(0);i.reverse()}for((o=d.length)-(r=c.length)<0&&(r=o,i=c,c=d,d=i),e=0;r;)e=(d[--r]=d[r]+c[r]+e)/k|0,d[r]%=k;for(e&&(d.unshift(e),++n),o=d.length;0==d[--o];)d.pop();return t.d=d,t.e=I(d,n),h?$(t,s,l):t},S.precision=S.sd=function(t){var e,i=this;if(void 0!==t&&t!==!!t&&1!==t&&0!==t)throw Error(g+t);return i.d?(e=P(i.d),t&&i.e+1>e&&(e=i.e+1)):e=NaN,e},S.round=function(){var t=this,e=t.constructor;return $(new e(t),t.e+1,e.rounding)},S.sine=S.sin=function(){var t,e,i=this,n=i.constructor;return i.isFinite()?i.isZero()?new n(i):(e=n.rounding,n.precision=(t=n.precision)+Math.max(i.e,i.sd())+T,n.rounding=1,i=function(t,e){var i,n=e.d.length;if(n<3)return e.isZero()?e:W(t,2,e,e);i=1.4*Math.sqrt(n),e=W(t,2,e=e.times(1/Y(5,i=i>16?16:0|i)),e);for(var r,a=new t(5),o=new t(16),s=new t(20);i--;)r=e.times(e),e=e.times(a.plus(r.times(o.times(r).minus(s))));return e}(n,J(n,i)),n.precision=t,n.rounding=e,$(r>2?i.neg():i,t,e,!0)):new n(NaN)},S.squareRoot=S.sqrt=function(){var t,e,i,n,r,a,o=this,s=o.d,l=o.e,d=o.s,c=o.constructor;if(1!==d||!s||!s[0])return new c(!d||d<0&&(!s||s[0])?NaN:s?o:1/0);for(h=!1,0==(d=Math.sqrt(+o))||d==1/0?(((e=M(s)).length+l)%2==0&&(e+="0"),d=Math.sqrt(e),l=b((l+1)/2)-(l<0||l%2),n=new c(e=d==1/0?"5e"+l:(e=d.toExponential()).slice(0,e.indexOf("e")+1)+l)):n=new c(d.toString()),i=(l=c.precision)+3;;)if(n=(a=n).plus(D(o,a,i+2,1)).times(.5),M(a.d).slice(0,i)===(e=M(n.d)).slice(0,i)){if("9999"!=(e=e.slice(i-3,i+1))&&(r||"4999"!=e)){+e&&(+e.slice(1)||"5"!=e.charAt(0))||($(n,l+1,1),t=!n.times(n).eq(o));break}if(!r&&($(a,l+1,0),a.times(a).eq(o))){n=a;break}i+=4,r=1}return h=!0,$(n,l,c.rounding,t)},S.tangent=S.tan=function(){var t,e,i=this,n=i.constructor;return i.isFinite()?i.isZero()?new n(i):(e=n.rounding,n.precision=(t=n.precision)+10,n.rounding=1,(i=i.sin()).s=1,i=D(i,new n(1).minus(i.times(i)).sqrt(),t+10,0),n.precision=t,n.rounding=e,$(2==r||4==r?i.neg():i,t,e,!0)):new n(NaN)},S.times=S.mul=function(t){var e,i,n,r,a,o,s,l,d,c=this,p=c.constructor,g=c.d,f=(t=new p(t)).d;if(t.s*=c.s,!(g&&g[0]&&f&&f[0]))return new p(!t.s||g&&!g[0]&&!f||f&&!f[0]&&!g?NaN:g&&f?0*t.s:t.s/0);for(i=b(c.e/T)+b(t.e/T),(l=g.length)<(d=f.length)&&(a=g,g=f,f=a,o=l,l=d,d=o),a=[],n=o=l+d;n--;)a.push(0);for(n=d;--n>=0;){for(e=0,r=l+n;r>n;)s=a[r]+f[n]*g[r-n-1]+e,a[r--]=s%k|0,e=s/k|0;a[r]=(a[r]+e)%k|0}for(;!a[--o];)a.pop();return e?++i:a.shift(),t.d=a,t.e=I(a,i),h?$(t,p.precision,p.rounding):t},S.toBinary=function(t,e){return K(this,2,t,e)},S.toDecimalPlaces=S.toDP=function(t,e){var i=this,n=i.constructor;return i=new n(i),void 0===t?i:(z(t,0,o),void 0===e?e=n.rounding:z(e,0,8),$(i,t+i.e+1,e))},S.toExponential=function(t,e){var i,n=this,r=n.constructor;return void 0===t?i=O(n,!0):(z(t,0,o),void 0===e?e=r.rounding:z(e,0,8),i=O(n=$(new r(n),t+1,e),!0,t+1)),n.isNeg()&&!n.isZero()?"-"+i:i},S.toFixed=function(t,e){var i,n,r=this,a=r.constructor;return void 0===t?i=O(r):(z(t,0,o),void 0===e?e=a.rounding:z(e,0,8),i=O(n=$(new a(r),t+r.e+1,e),!1,t+n.e+1)),r.isNeg()&&!r.isZero()?"-"+i:i},S.toFraction=function(t){var e,i,n,r,a,o,s,l,d,c,p,f,u=this,m=u.d,b=u.constructor;if(!m)return new b(u);if(d=i=new b(1),n=l=new b(0),a=(e=new b(n)).e=P(m)-u.e-1,e.d[0]=y(10,(o=a%T)<0?T+o:o),null==t)t=a>0?e:d;else{if(!(s=new b(t)).isInt()||s.lt(d))throw Error(g+s);t=s.gt(e)?a>0?e:d:s}for(h=!1,s=new b(M(m)),c=b.precision,b.precision=a=m.length*T*2;p=D(s,e,0,1,1),1!=(r=i.plus(p.times(n))).cmp(t);)i=n,n=r,d=l.plus(p.times(r=d)),l=r,e=s.minus(p.times(r=e)),s=r;return r=D(t.minus(i),n,0,1,1),l=l.plus(r.times(d)),i=i.plus(r.times(n)),l.s=d.s=u.s,f=D(d,n,a,1).minus(u).abs().cmp(D(l,i,a,1).minus(u).abs())<1?[d,n]:[l,i],b.precision=c,h=!0,f},S.toHexadecimal=S.toHex=function(t,e){return K(this,16,t,e)},S.toNearest=function(t,e){var i=this,n=i.constructor;if(i=new n(i),null==t){if(!i.d)return i;t=new n(1),e=n.rounding}else{if(t=new n(t),void 0===e?e=n.rounding:z(e,0,8),!i.d)return t.s?i:t;if(!t.d)return t.s&&(t.s=i.s),t}return t.d[0]?(h=!1,i=D(i,t,0,e,1).times(t),h=!0,$(i)):(t.s=i.s,i=t),i},S.toNumber=function(){return+this},S.toOctal=function(t,e){return K(this,8,t,e)},S.toPower=S.pow=function(t){var e,i,n,r,a,o,s=this,l=s.constructor,d=+(t=new l(t));if(!(s.d&&t.d&&s.d[0]&&t.d[0]))return new l(y(+s,d));if((s=new l(s)).eq(1))return s;if(n=l.precision,a=l.rounding,t.eq(1))return $(s,n,a);if((e=b(t.e/T))>=t.d.length-1&&(i=d<0?-d:d)<=9007199254740991)return r=A(l,s,i,n),t.s<0?new l(1).div(r):$(r,n,a);if((o=s.s)<0){if(e<t.d.length-1)return new l(NaN);if(1&t.d[e]||(o=1),0==s.e&&1==s.d[0]&&1==s.d.length)return s.s=o,s}return(e=0!=(i=y(+s,d))&&isFinite(i)?new l(i+"").e:b(d*(Math.log("0."+M(s.d))/Math.LN10+s.e+1)))>l.maxE+1||e<l.minE-1?new l(e>0?o/0:0):(h=!1,l.rounding=s.s=1,i=Math.min(12,(e+"").length),(r=G(t.times(R(s,n+i)),n)).d&&j((r=$(r,n+5,1)).d,n,a)&&+M((r=$(G(t.times(R(s,(e=n+10)+i)),e),e+5,1)).d).slice(n+1,n+15)+1==1e14&&(r=$(r,n+1,0)),r.s=o,h=!0,l.rounding=a,$(r,n,a))},S.toPrecision=function(t,e){var i,n=this,r=n.constructor;return void 0===t?i=O(n,n.e<=r.toExpNeg||n.e>=r.toExpPos):(z(t,1,o),void 0===e?e=r.rounding:z(e,0,8),i=O(n=$(new r(n),t,e),t<=n.e||n.e<=r.toExpNeg,t)),n.isNeg()&&!n.isZero()?"-"+i:i},S.toSignificantDigits=S.toSD=function(t,e){var i=this.constructor;return void 0===t?(t=i.precision,e=i.rounding):(z(t,1,o),void 0===e?e=i.rounding:z(e,0,8)),$(new i(this),t,e)},S.toString=function(){var t=this,e=t.constructor,i=O(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()&&!t.isZero()?"-"+i:i},S.truncated=S.trunc=function(){return $(new this.constructor(this),this.e+1,1)},S.valueOf=S.toJSON=function(){var t=this,e=t.constructor,i=O(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()?"-"+i:i};var D=function(){function t(t,e,i){var n,r=0,a=t.length;for(t=t.slice();a--;)t[a]=(n=t[a]*e+r)%i|0,r=n/i|0;return r&&t.unshift(r),t}function e(t,e,i,n){var r,a;if(i!=n)a=i>n?1:-1;else for(r=a=0;r<i;r++)if(t[r]!=e[r]){a=t[r]>e[r]?1:-1;break}return a}function n(t,e,i,n){for(var r=0;i--;)t[i]-=r,t[i]=(r=t[i]<e[i]?1:0)*n+t[i]-e[i];for(;!t[0]&&t.length>1;)t.shift()}return function(r,a,o,s,l,d){var c,h,p,g,f,u,m,y,v,w,L,x,C,_,S,M,z,j,N,D,O=r.constructor,I=r.s==a.s?1:-1,B=r.d,E=a.d;if(!(B&&B[0]&&E&&E[0]))return new O(r.s&&a.s&&(B?!E||B[0]!=E[0]:E)?B&&0==B[0]||!E?0*I:I/0:NaN);for(d?(f=1,h=r.e-a.e):(d=k,h=b(r.e/(f=T))-b(a.e/f)),N=E.length,z=B.length,w=(v=new O(I)).d=[],p=0;E[p]==(B[p]||0);p++);if(E[p]>(B[p]||0)&&h--,null==o?(_=o=O.precision,s=O.rounding):_=l?o+(r.e-a.e)+1:o,_<0)w.push(1),u=!0;else{if(_=_/f+2|0,p=0,1==N){for(g=0,E=E[0],_++;(p<z||g)&&_--;p++)w[p]=(S=g*d+(B[p]||0))/E|0,g=S%E|0;u=g||p<z}else{for((g=d/(E[0]+1)|0)>1&&(E=t(E,g,d),B=t(B,g,d),N=E.length,z=B.length),M=N,x=(L=B.slice(0,N)).length;x<N;)L[x++]=0;(D=E.slice()).unshift(0),j=E[0],E[1]>=d/2&&++j;do{g=0,(c=e(E,L,N,x))<0?(C=L[0],N!=x&&(C=C*d+(L[1]||0)),(g=C/j|0)>1?(g>=d&&(g=d-1),1==(c=e(m=t(E,g,d),L,y=m.length,x=L.length))&&(g--,n(m,N<y?D:E,y,d))):(0==g&&(c=g=1),m=E.slice()),(y=m.length)<x&&m.unshift(0),n(L,m,x,d),-1==c&&(c=e(E,L,N,x=L.length))<1&&(g++,n(L,N<x?D:E,x,d)),x=L.length):0===c&&(g++,L=[0]),w[p++]=g,c&&L[0]?L[x++]=B[M]||0:(L=[B[M]],x=1)}while((M++<z||void 0!==L[0])&&_--);u=void 0!==L[0]}w[0]||w.shift()}if(1==f)v.e=h,i=u;else{for(p=1,g=w[0];g>=10;g/=10)p++;v.e=p+h*f-1,$(v,l?o+v.e+1:o,s,u)}return v}}();function $(t,e,i,n){var r,a,o,s,l,d,c,p,g,f=t.constructor;t:if(null!=e){if(!(p=t.d))return t;for(r=1,s=p[0];s>=10;s/=10)r++;if((a=e-r)<0)a+=T,l=(c=p[g=0])/y(10,r-(o=e)-1)%10|0;else if((g=Math.ceil((a+1)/T))>=(s=p.length)){if(!n)break t;for(;s++<=g;)p.push(0);c=l=0,r=1,o=(a%=T)-T+1}else{for(c=s=p[g],r=1;s>=10;s/=10)r++;l=(o=(a%=T)-T+r)<0?0:c/y(10,r-o-1)%10|0}if(n=n||e<0||void 0!==p[g+1]||(o<0?c:c%y(10,r-o-1)),d=i<4?(l||n)&&(0==i||i==(t.s<0?3:2)):l>5||5==l&&(4==i||n||6==i&&(a>0?o>0?c/y(10,r-o):0:p[g-1])%10&1||i==(t.s<0?8:7)),e<1||!p[0])return p.length=0,d?(p[0]=y(10,(T-(e-=t.e+1)%T)%T),t.e=-e||0):p[0]=t.e=0,t;if(0==a?(p.length=g,s=1,g--):(p.length=g+1,s=y(10,T-a),p[g]=o>0?(c/y(10,r-o)%y(10,o)|0)*s:0),d)for(;;){if(0==g){for(a=1,o=p[0];o>=10;o/=10)a++;for(o=p[0]+=s,s=1;o>=10;o/=10)s++;a!=s&&(t.e++,p[0]==k&&(p[0]=1));break}if(p[g]+=s,p[g]!=k)break;p[g--]=0,s=1}for(a=p.length;0===p[--a];)p.pop()}return h&&(t.e>f.maxE?(t.d=null,t.e=NaN):t.e<f.minE&&(t.e=0,t.d=[0])),t}function O(t,e,i){if(!t.isFinite())return F(t);var n,r=t.e,a=M(t.d),o=a.length;return e?(i&&(n=i-o)>0?a=a.charAt(0)+"."+a.slice(1)+H(n):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(t.e<0?"e":"e+")+t.e):r<0?(a="0."+H(-r-1)+a,i&&(n=i-o)>0&&(a+=H(n))):r>=o?(a+=H(r+1-o),i&&(n=i-r-1)>0&&(a=a+"."+H(n))):((n=r+1)<o&&(a=a.slice(0,n)+"."+a.slice(n)),i&&(n=i-o)>0&&(r+1===o&&(a+="."),a+=H(n))),a}function I(t,e){var i=t[0];for(e*=T;i>=10;i/=10)e++;return e}function B(t,e,i){if(e>C)throw h=!0,i&&(t.precision=i),Error(f);return $(new t(l),e,1,!0)}function E(t,e,i){if(e>_)throw Error(f);return $(new t(d),e,i,!0)}function P(t){var e=t.length-1,i=e*T+1;if(e=t[e]){for(;e%10==0;e/=10)i--;for(e=t[0];e>=10;e/=10)i++}return i}function H(t){for(var e="";t--;)e+="0";return e}function A(t,e,i,n){var r,a=new t(1),o=Math.ceil(n/T+4);for(h=!1;;){if(i%2&&q((a=a.times(e)).d,o)&&(r=!0),0===(i=b(i/2))){i=a.d.length-1,r&&0===a.d[i]&&++a.d[i];break}q((e=e.times(e)).d,o)}return h=!0,a}function U(t){return 1&t.d[t.d.length-1]}function Z(t,e,i){for(var n,r,a=new t(e[0]),o=0;++o<e.length;){if(!(r=new t(e[o])).s){a=r;break}((n=a.cmp(r))===i||0===n&&a.s===i)&&(a=r)}return a}function G(t,e){var i,n,r,a,o,s,l,d=0,c=0,p=0,g=t.constructor,f=g.rounding,u=g.precision;if(!t.d||!t.d[0]||t.e>17)return new g(t.d?t.d[0]?t.s<0?0:1/0:1:t.s?t.s<0?0:t:NaN);for(null==e?(h=!1,l=u):l=e,s=new g(.03125);t.e>-2;)t=t.times(s),p+=5;for(l+=n=Math.log(y(2,p))/Math.LN10*2+5|0,i=a=o=new g(1),g.precision=l;;){if(a=$(a.times(t),l,1),i=i.times(++c),M((s=o.plus(D(a,i,l,1))).d).slice(0,l)===M(o.d).slice(0,l)){for(r=p;r--;)o=$(o.times(o),l,1);if(null!=e)return g.precision=u,o;if(!(d<3&&j(o.d,l-n,f,d)))return $(o,g.precision=u,f,h=!0);g.precision=l+=10,i=a=s=new g(1),c=0,d++}o=s}}function R(t,e){var i,n,r,a,o,s,l,d,c,p,g,f=1,u=t,m=u.d,b=u.constructor,y=b.rounding,v=b.precision;if(u.s<0||!m||!m[0]||!u.e&&1==m[0]&&1==m.length)return new b(m&&!m[0]?-1/0:1!=u.s?NaN:m?0:u);if(null==e?(h=!1,c=v):c=e,b.precision=c+=10,n=(i=M(m)).charAt(0),!(Math.abs(a=u.e)<15e14))return d=B(b,c+2,v).times(a+""),u=R(new b(n+"."+i.slice(1)),c-10).plus(d),b.precision=v,null==e?$(u,v,y,h=!0):u;for(;n<7&&1!=n||1==n&&i.charAt(1)>3;)n=(i=M((u=u.times(t)).d)).charAt(0),f++;for(a=u.e,n>1?(u=new b("0."+i),a++):u=new b(n+"."+i.slice(1)),p=u,l=o=u=D(u.minus(1),u.plus(1),c,1),g=$(u.times(u),c,1),r=3;;){if(o=$(o.times(g),c,1),M((d=l.plus(D(o,new b(r),c,1))).d).slice(0,c)===M(l.d).slice(0,c)){if(l=l.times(2),0!==a&&(l=l.plus(B(b,c+2,v).times(a+""))),l=D(l,new b(f),c,1),null!=e)return b.precision=v,l;if(!j(l.d,c-10,y,s))return $(l,b.precision=v,y,h=!0);b.precision=c+=10,d=o=u=D(p.minus(1),p.plus(1),c,1),g=$(u.times(u),c,1),r=s=1}l=d,r+=2}}function F(t){return String(t.s*t.s/0)}function X(t,e){var i,n,r;for((i=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(i<0&&(i=n),i+=+e.slice(n+1),e=e.substring(0,n)):i<0&&(i=e.length),n=0;48===e.charCodeAt(n);n++);for(r=e.length;48===e.charCodeAt(r-1);--r);if(e=e.slice(n,r)){if(r-=n,t.e=i=i-n-1,t.d=[],n=(i+1)%T,i<0&&(n+=T),n<r){for(n&&t.d.push(+e.slice(0,n)),r-=T;n<r;)t.d.push(+e.slice(n,n+=T));e=e.slice(n),n=T-e.length}else n-=r;for(;n--;)e+="0";t.d.push(+e),h&&(t.e>t.constructor.maxE?(t.d=null,t.e=NaN):t.e<t.constructor.minE&&(t.e=0,t.d=[0]))}else t.e=0,t.d=[0];return t}function V(t,i){var n,r,a,o,s,l,d,c,p;if(i.indexOf("_")>-1){if(i=i.replace(/(\d)_(?=\d)/g,"$1"),x.test(i))return X(t,i)}else if("Infinity"===i||"NaN"===i)return+i||(t.s=NaN),t.e=NaN,t.d=null,t;if(w.test(i))n=16,i=i.toLowerCase();else if(v.test(i))n=2;else{if(!L.test(i))throw Error(g+i);n=8}for((o=i.search(/p/i))>0?(d=+i.slice(o+1),i=i.substring(2,o)):i=i.slice(2),o=i.indexOf("."),r=t.constructor,(s=o>=0)&&(o=(l=(i=i.replace(".","")).length)-o,a=A(r,new r(n),o,2*o)),o=p=(c=N(i,n,k)).length-1;0===c[o];--o)c.pop();return o<0?new r(0*t.s):(t.e=I(c,p),t.d=c,h=!1,s&&(t=D(t,a,4*l)),d&&(t=t.times(Math.abs(d)<54?y(2,d):e.pow(2,d))),h=!0,t)}function W(t,e,i,n,r){var a,o,s,l,d=t.precision,c=Math.ceil(d/T);for(h=!1,l=i.times(i),s=new t(n);;){if(o=D(s.times(l),new t(e++*e++),d,1),s=r?n.plus(o):n.minus(o),n=D(o.times(l),new t(e++*e++),d,1),void 0!==(o=s.plus(n)).d[c]){for(a=c;o.d[a]===s.d[a]&&a--;);if(-1==a)break}a=s,s=n,n=o,o=a}return h=!0,o.d.length=c+1,o}function Y(t,e){for(var i=t;--e;)i*=t;return i}function J(t,e){var i,n=e.s<0,a=E(t,t.precision,1),o=a.times(.5);if((e=e.abs()).lte(o))return r=n?4:1,e;if((i=e.divToInt(a)).isZero())r=n?3:2;else{if((e=e.minus(i.times(a))).lte(o))return r=U(i)?n?2:3:n?4:1,e;r=U(i)?n?1:4:n?3:2}return e.minus(a).abs()}function K(t,e,n,r){var a,l,d,c,h,p,g,f,u,m=t.constructor,b=void 0!==n;if(b?(z(n,1,o),void 0===r?r=m.rounding:z(r,0,8)):(n=m.precision,r=m.rounding),t.isFinite()){for(b?(a=2,16==e?n=4*n-3:8==e&&(n=3*n-2)):a=e,(d=(g=O(t)).indexOf("."))>=0&&(g=g.replace(".",""),(u=new m(1)).e=g.length-d,u.d=N(O(u),10,a),u.e=u.d.length),l=h=(f=N(g,10,a)).length;0==f[--h];)f.pop();if(f[0]){if(d<0?l--:((t=new m(t)).d=f,t.e=l,f=(t=D(t,u,n,r,0,a)).d,l=t.e,p=i),d=f[n],c=a/2,p=p||void 0!==f[n+1],p=r<4?(void 0!==d||p)&&(0===r||r===(t.s<0?3:2)):d>c||d===c&&(4===r||p||6===r&&1&f[n-1]||r===(t.s<0?8:7)),f.length=n,p)for(;++f[--n]>a-1;)f[n]=0,n||(++l,f.unshift(1));for(h=f.length;!f[h-1];--h);for(d=0,g="";d<h;d++)g+=s.charAt(f[d]);if(b){if(h>1)if(16==e||8==e){for(d=16==e?4:3,--h;h%d;h++)g+="0";for(h=(f=N(g,a,e)).length;!f[h-1];--h);for(d=1,g="1.";d<h;d++)g+=s.charAt(f[d])}else g=g.charAt(0)+"."+g.slice(1);g=g+(l<0?"p":"p+")+l}else if(l<0){for(;++l;)g="0"+g;g="0."+g}else if(++l>h)for(l-=h;l--;)g+="0";else l<h&&(g=g.slice(0,l)+"."+g.slice(l))}else g=b?"0p+0":"0";g=(16==e?"0x":2==e?"0b":8==e?"0o":"")+g}else g=F(t);return t.s<0?"-"+g:g}function q(t,e){if(t.length>e)return t.length=e,!0}function Q(t){return new this(t).abs()}function tt(t){return new this(t).acos()}function et(t){return new this(t).acosh()}function it(t,e){return new this(t).plus(e)}function nt(t){return new this(t).asin()}function rt(t){return new this(t).asinh()}function at(t){return new this(t).atan()}function ot(t){return new this(t).atanh()}function st(t,e){t=new this(t),e=new this(e);var i,n=this.precision,r=this.rounding,a=n+4;return t.s&&e.s?t.d||e.d?!e.d||t.isZero()?(i=e.s<0?E(this,n,r):new this(0)).s=t.s:!t.d||e.isZero()?(i=E(this,a,1).times(.5)).s=t.s:e.s<0?(this.precision=a,this.rounding=1,i=this.atan(D(t,e,a,1)),e=E(this,a,1),this.precision=n,this.rounding=r,i=t.s<0?i.minus(e):i.plus(e)):i=this.atan(D(t,e,a,1)):(i=E(this,a,1).times(e.s>0?.25:.75)).s=t.s:i=new this(NaN),i}function lt(t){return new this(t).cbrt()}function dt(t){return $(t=new this(t),t.e+1,2)}function ct(t,e,i){return new this(t).clamp(e,i)}function ht(t){if(!t||"object"!=typeof t)throw Error(p+"Object expected");var e,i,n,r=!0===t.defaults,s=["precision",1,o,"rounding",0,8,"toExpNeg",-a,0,"toExpPos",0,a,"maxE",0,a,"minE",-a,0,"modulo",0,9];for(e=0;e<s.length;e+=3)if(i=s[e],r&&(this[i]=c[i]),void 0!==(n=t[i])){if(!(b(n)===n&&n>=s[e+1]&&n<=s[e+2]))throw Error(g+i+": "+n);this[i]=n}if(i="crypto",r&&(this[i]=c[i]),void 0!==(n=t[i])){if(!0!==n&&!1!==n&&0!==n&&1!==n)throw Error(g+i+": "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(u);this[i]=!0}else this[i]=!1}return this}function pt(t){return new this(t).cos()}function gt(t){return new this(t).cosh()}function ft(t,e){return new this(t).div(e)}function ut(t){return new this(t).exp()}function mt(t){return $(t=new this(t),t.e+1,3)}function bt(){var t,e,i=new this(0);for(h=!1,t=0;t<arguments.length;)if((e=new this(arguments[t++])).d)i.d&&(i=i.plus(e.times(e)));else{if(e.s)return h=!0,new this(1/0);i=e}return h=!0,i.sqrt()}function yt(t){return t instanceof e||t&&t.toStringTag===m||!1}function vt(t){return new this(t).ln()}function wt(t,e){return new this(t).log(e)}function Lt(t){return new this(t).log(2)}function xt(t){return new this(t).log(10)}function kt(){return Z(this,arguments,-1)}function Tt(){return Z(this,arguments,1)}function Ct(t,e){return new this(t).mod(e)}function _t(t,e){return new this(t).mul(e)}function St(t,e){return new this(t).pow(e)}function Mt(t){var e,i,n,r,a=0,s=new this(1),l=[];if(void 0===t?t=this.precision:z(t,1,o),n=Math.ceil(t/T),this.crypto)if(crypto.getRandomValues)for(e=crypto.getRandomValues(new Uint32Array(n));a<n;)(r=e[a])>=429e7?e[a]=crypto.getRandomValues(new Uint32Array(1))[0]:l[a++]=r%1e7;else{if(!crypto.randomBytes)throw Error(u);for(e=crypto.randomBytes(n*=4);a<n;)(r=e[a]+(e[a+1]<<8)+(e[a+2]<<16)+((127&e[a+3])<<24))>=214e7?crypto.randomBytes(4).copy(e,a):(l.push(r%1e7),a+=4);a=n/4}else for(;a<n;)l[a++]=1e7*Math.random()|0;for(n=l[--a],t%=T,n&&t&&(r=y(10,T-t),l[a]=(n/r|0)*r);0===l[a];a--)l.pop();if(a<0)i=0,l=[0];else{for(i=-1;0===l[0];i-=T)l.shift();for(n=1,r=l[0];r>=10;r/=10)n++;n<T&&(i-=T-n)}return s.e=i,s.d=l,s}function zt(t){return $(t=new this(t),t.e+1,this.rounding)}function jt(t){return(t=new this(t)).d?t.d[0]?t.s:0*t.s:t.s||NaN}function Nt(t){return new this(t).sin()}function Dt(t){return new this(t).sinh()}function $t(t){return new this(t).sqrt()}function Ot(t,e){return new this(t).sub(e)}function It(){var t=0,e=arguments,i=new this(e[t]);for(h=!1;i.s&&++t<e.length;)i=i.plus(e[t]);return h=!0,$(i,this.precision,this.rounding)}function Bt(t){return new this(t).tan()}function Et(t){return new this(t).tanh()}function Pt(t){return $(t=new this(t),t.e+1,1)}(e=function t(e){var i,n,r;function a(t){var e,i,n,r=this;if(!(r instanceof a))return new a(t);if(r.constructor=a,yt(t))return r.s=t.s,void(h?!t.d||t.e>a.maxE?(r.e=NaN,r.d=null):t.e<a.minE?(r.e=0,r.d=[0]):(r.e=t.e,r.d=t.d.slice()):(r.e=t.e,r.d=t.d?t.d.slice():t.d));if("number"==(n=typeof t)){if(0===t)return r.s=1/t<0?-1:1,r.e=0,void(r.d=[0]);if(t<0?(t=-t,r.s=-1):r.s=1,t===~~t&&t<1e7){for(e=0,i=t;i>=10;i/=10)e++;return void(h?e>a.maxE?(r.e=NaN,r.d=null):e<a.minE?(r.e=0,r.d=[0]):(r.e=e,r.d=[t]):(r.e=e,r.d=[t]))}return 0*t!=0?(t||(r.s=NaN),r.e=NaN,void(r.d=null)):X(r,t.toString())}if("string"===n)return 45===(i=t.charCodeAt(0))?(t=t.slice(1),r.s=-1):(43===i&&(t=t.slice(1)),r.s=1),x.test(t)?X(r,t):V(r,t);if("bigint"===n)return t<0?(t=-t,r.s=-1):r.s=1,X(r,t.toString());throw Error(g+t)}if(a.prototype=S,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.EUCLID=9,a.config=a.set=ht,a.clone=t,a.isDecimal=yt,a.abs=Q,a.acos=tt,a.acosh=et,a.add=it,a.asin=nt,a.asinh=rt,a.atan=at,a.atanh=ot,a.atan2=st,a.cbrt=lt,a.ceil=dt,a.clamp=ct,a.cos=pt,a.cosh=gt,a.div=ft,a.exp=ut,a.floor=mt,a.hypot=bt,a.ln=vt,a.log=wt,a.log10=xt,a.log2=Lt,a.max=kt,a.min=Tt,a.mod=Ct,a.mul=_t,a.pow=St,a.random=Mt,a.round=zt,a.sign=jt,a.sin=Nt,a.sinh=Dt,a.sqrt=$t,a.sub=Ot,a.sum=It,a.tan=Bt,a.tanh=Et,a.trunc=Pt,void 0===e&&(e={}),e&&!0!==e.defaults)for(r=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],i=0;i<r.length;)e.hasOwnProperty(n=r[i++])||(e[n]=this[n]);return a.config(e),a}(c)).prototype.constructor=e,e.default=e.Decimal=e,l=new e(l),d=new e(d),re.exports?("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator&&(S[Symbol.for("nodejs.util.inspect.custom")]=S.toString,S[Symbol.toStringTag]="Decimal"),re.exports=e):(t||(t="undefined"!=typeof self&&self&&self.self==self?self:window),n=t.Decimal,e.noConflict=function(){return t.Decimal=n,e},t.Decimal=e)}(ae);const se=oe.exports;var le;!function(t){t.WON="Won",t.LOST="Lost"}(le||(le={}));const de=class{constructor(i){t(this,i),this.logout=e(this,"logout",7),this.ticketTypeMap={NORMAL:"Normal",SYNDICATE:"Syndicate",SUBSCRIPTION:"Subscription"},this.resultMap={[le.WON]:"Win",[le.LOST]:"Lose"},this.displayPrizeCategory=t=>{const e=new Map;t.forEach((t=>{let i=t.divisionDisplayName,n=t.currency;if(i&&"None"!==i){const r=new se(t.amount);if(e.has(i)){const t=e.get(i),a=t.amount.plus(r);e.set(i,{amount:a,currency:n,times:t.times+1})}else e.set(i,{amount:r,currency:n,times:1})}}));const i=[];for(let[t,n]of e.entries()){const e=n.amount.times(100).floor().dividedBy(100);i.push({prizeName:t,amount:e.toNumber(),currency:n.currency,times:n.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&&d(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&c(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&d(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&c(this.stylingContainer,this.clientStylingUrl))}async fetchGameData(){var t;try{let t=new URL(`${this.endpoint}/games/${this.gameId}`);const e=await Lt(t.href,"GET");this.rawData=e}catch(e){_t({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 Lt(`${this.endpoint}/tickets${function(t){const e={};Object.entries(t).forEach((([t,i])=>{xt(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&&(_t({message:t.message,theme:"error"}),this.logout.emit())}finally{this.isLoading=!1}}async fetchDrawResult(t,e){try{return await Lt(`${this.endpoint}/games/${t}/draws/${e}`,"GET",{})}catch(t){console.log(t)}}getDivision(t,e){var i;let n=t.division,r=null===(i=e.prizes)||void 0===i?void 0:i.filter((t=>t.order===n));return r&&r.length?r[0].division:null}async getDrawResult(){const t=new Map;this.ticketHistory.forEach(((e,i)=>{e.drawResults.forEach(((n,r)=>{const a=`${n.drawId}-${e.gameId}`;t.has(a)?t.get(a).indices.push({ticketIndex:i,drawIndex:r}):t.set(a,{drawId:n.drawId,gameId:e.gameId,indices:[{ticketIndex:i,drawIndex:r}]})}))}));let e=[...this.ticketHistory];await Promise.all(Array.from(t.values()).map((async({gameId:t,drawId:i,indices:n})=>{try{const r=await this.fetchDrawResult(t,i);r&&n.forEach((({ticketIndex:t,drawIndex:i})=>{const n=Object.assign(Object.assign({},e[t].drawResults[i]),{tempDrawData:Object.assign(Object.assign({},r),{vendorGameId:e[t].vendorGameId}),prizeDetails:this.displayPrizeCategory(e[t].drawResults[i].details)}),a=[...e[t].drawResults];a[i]=n,e[t]=Object.assign(Object.assign({},e[t]),{drawResults:a})}))}catch(e){console.error(`failed to fetch draw result (gameId: ${t}, drawId: ${i}):`,e)}}))),this.ticketHistory=e}componentWillLoad(){this.translationUrl&&rt(JSON.parse(this.translationUrl)),this.statusOptions=[{label:nt("settled",this.language),value:"Settled"},{label:nt("purchased",this.language),value:"Purchased"},{label:nt("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]=[Tt(t.numbers)]})),this.curDrawSelection=this.curDrawSelectionMap[this.curDrawSelectionBettingType]}parseSelection(){const t=[];return this.curTicketItem.selection.forEach(((e,i)=>{t[i]=Tt(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 n=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!=n?n:t}render(){return i("div",{key:"8b5cf7b807d86f60585333f6e1ad908c27e69d2d",class:"lottery-tipping-ticket-history",ref:t=>this.stylingContainer=t},i("div",{key:"5d5b27c8663171c205fa542fa8cabaf43a8e9868",class:"ticket-history-title"},nt("ticketsHistory",this.language)),i("div",{key:"80a725f121d8ae43918655645b539386523f2c5b",class:"filter-wrap"},i("div",{key:"ddfbecf52c2b34ff65a0a1eb1c4461e2ec4adb83",class:"filter-status"},this.statusOptions.map((t=>i("div",{class:"filter-status-btn"+(this.activeStatus==t.value?" active":""),onClick:()=>this.changeStatus(t.value)},t.label)))),i("div",{key:"d7af5f48131401c38ed5e47526cf8a0b66bf7ed5",class:"filter-operation"},i("lottery-tipping-filter",{key:"6cb80e892227bb0cca2231dbd01c967e39f00057","quick-filters-active":this.quickFiltersActive,language:this.language,"translation-url":this.translationUrl}))),this.isLoading&&i("div",{key:"9b1ded95022c5eff5963d81eea67c3f6a915033e",class:"loading-wrap"},i("section",{key:"731d40f195f1cba224b792d250e9f9e4b86b61ae",class:"dots-container"},i("div",{key:"0b5c88b5c231045760c8951e02b828f8539168ac",class:"dot"}),i("div",{key:"e534a45e4b666ec35cefc3a709cc0b9bcb6ddd56",class:"dot"}),i("div",{key:"4adae575af1bcaa438f50fe0fa9ca1a5c8ea8c73",class:"dot"}),i("div",{key:"27c4cc688611722d858436bb857d2435d3bb57f9",class:"dot"}),i("div",{key:"acd88b2c9756ef9c7dff629fd9d238d63128e63c",class:"dot"}))),!this.isLoading&&this.paginationInfo.total>0&&i("div",{key:"9afe2101cbafb68c1d0a648ccf85d7df497ea5bc",class:"ticket-list-wrap"},this.ticketHistory.map((t=>i("lottery-tipping-panel",{"header-title":b(new Date(t.createdAt),"dd/MM/yyyy HH:mm:ss")+" "+t.state},i("div",{class:"panel-content",slot:"content"},i("div",{class:"ticket-info"},i("div",{class:"ticket-info-item"},i("div",{class:"ticket-info-label"},nt("ticketId",this.language)),i("div",{class:"ticket-info-val"},t.id," ")),i("div",{class:"ticket-info-item"},i("div",{class:"ticket-info-label"},nt("ticketType",this.language)),i("div",{class:"ticket-info-val"},this.ticketTypeMap[t.wagerType]," ")),i("div",{class:"ticket-info-item"},i("div",{class:"ticket-info-label"},nt("ticketAmount",this.language)),i("div",{class:"ticket-info-val"},`${t.amount} ${t.currency}`)),i("div",{class:"ticket-info-item"},i("div",{class:"ticket-info-label"},nt("lineDetail",this.language)),i("div",{class:"ticket-info-val"},i("span",{class:"show-detail-link",onClick:()=>this.handleShowTicketLineDetial(t)},nt("seeDetails",this.language)))),i("div",{class:"ticket-info-item"},i("div",{class:"ticket-info-label"},nt("numberOfDraw",this.language)),i("div",{class:"ticket-info-val"},t.drawCount))),"Settled"==t.state&&t.drawResults.map((t=>i("div",{class:"draw-info-container"},t.tempDrawData?i("div",{class:"draw-info"},i("div",{class:"draw-info-item"},i("div",{class:"draw-info-label"},nt("ticketResult",this.language)),i("div",{class:"draw-info-val"},this.resultMap[t.state])),i("div",{class:"draw-info-item"},i("div",{class:"draw-info-label"},nt("drawId",this.language)),i("div",{class:"draw-info-val"},t.drawId)),i("div",{class:"draw-info-item"},i("div",{class:"draw-info-label"},nt("drawDate",this.language)),i("div",{class:"draw-info-val"},b(new Date(t.tempDrawData.date),"dd/MM/yyyy"))),i("div",{class:"draw-info-item"},i("div",{class:"draw-info-label"},nt("result",this.language)),i("div",{class:"draw-info-val"},i("span",{class:"show-detail-link",onClick:()=>this.handleShowCurrentDraw(t.tempDrawData)},nt("seeDetails",this.language)))),t.state===le.WON&&i("div",{class:"draw-info-item"},i("div",{class:"draw-info-label"},nt("prize",this.language)),i("div",{class:"draw-info-val1"},i("div",{style:{height:"20px"}}),t.prizeDetails.map((t=>i("span",null,i("div",null,i("span",{style:{color:"rgb(85, 85, 85)"}},t.prizeName,t.times>1?" x "+t.times:"",":"," "),i("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)),i("span",{style:{color:"rgb(85, 85, 85)"}},t.currency)))))))):i("div",{class:"draw-info-skeleton"},[...Array(5)].map((()=>i("div",{class:"skeleton-line"})))))))))))),!this.isLoading&&0===this.paginationInfo.total&&i("div",{key:"5de413a3747c7928d9dae3a817337a6f014f0b17",class:"empty-wrap"},nt("noData",this.language)),i("lottery-tipping-dialog",{key:"f11f915d619c10d836427105090e861b74931d56",visible:this.showCurrentTicketLine,width:Ct(window.navigator.userAgent)?void 0:"720px",fullscreen:Ct(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&&i("div",{key:"899c2830647dcee4be611199a4bc42af78588894"},i("div",{key:"5671d9815195d631026f6ed43400a0b79b43f828",class:"betting-type"},i("div",{key:"842a5226b1f304ad23ab26081428e5bbd814671f",class:"betting-type-title"},nt("bettingType",this.language)),i("div",{key:"9028c66fca47e8ca7e7d054154361fcca56a9b22",class:"betting-type-text"},this.getBettingTypeName(this.getBettingType(this.curTicketItem.selection[this.curSelectionIdx].betType)))),i("lottery-tipping-ticket-bet",{key:"3df8c748aeb165eadf68ec631ede5ef6a11ae42a",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}))),i("lottery-tipping-dialog",{key:"3f3dc5b9922890c11104ca55120b3fa029378f78",visible:this.showCurrentDrawResult,width:Ct(window.navigator.userAgent)?void 0:"720px",fullscreen:Ct(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&&i("div",{key:"348359e4256d86c47f0cb2cfe936a669f6f7c0e8"},i("div",{key:"98ed4f468d1a1a4b237c1cfc776fcb990f69fdcf",class:"betting-type"},i("div",{key:"2ba8e6723d1259aefd74900d82dbf3968325f944",class:"betting-type-title"},nt("bettingType",this.language)),i("div",{key:"7ae55771416badb3c4746bd37353d956362241f8",class:"betting-type-text"},i("div",{key:"998242980ce53ff0ca9ef509bb45e62d3680fd73",class:"LotteryTippingTicketController__segmented-control"},Object.keys(this.curDrawSelectionMap).map((t=>i("button",{class:{LotteryTippingTicketController__segment:!0,"LotteryTippingTicketController__segment--active":this.curDrawSelectionBettingType===t},onClick:()=>this.handleDrawBettingTypeChange(t)},this.getBettingTypeName(t))))))),i("lottery-tipping-ticket-bet",{key:"57c44eb7624411a20dade3b41251285a214e4b8c",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}))),i("div",{key:"296c91bff848ca5f2ab5fe9df414ffd3b03aef58",class:"pagination-wrap"},i("lottery-tipping-pagination",{key:"3495c8c81cf96dd28aad9a79b963d94877c8db01",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"]}}};de.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)}";const ce=class{constructor(e){t(this,e),this.stylingValue={width:this.handleStylingProps(this.width),height:this.handleStylingProps(this.height),borderRadius:this.handleStylingProps(this.borderRadius),marginBottom:this.handleStylingProps(this.marginBottom),marginTop:this.handleStylingProps(this.marginTop),marginLeft:this.handleStylingProps(this.marginLeft),marginRight:this.handleStylingProps(this.marginRight),size:this.handleStylingProps(this.size)},this.structure=void 0,this.width="unset",this.height="unset",this.borderRadius="unset",this.marginBottom="unset",this.marginTop="unset",this.marginLeft="unset",this.marginRight="unset",this.animation=!0,this.rows=0,this.size="100%"}handleStructureChange(t,e){e!==t&&this.handleStructure(t)}handleStylingProps(t){switch(typeof t){case"number":return 0===t?0:`${t}px`;case"undefined":default:return"unset";case"string":return["auto","unset","none","inherit","initial"].includes(t)||t.endsWith("px")||t.endsWith("%")?t:"unset"}}handleStructure(t){switch(t){case"logo":return this.renderLogo();case"image":return this.renderImage();case"title":return this.renderTitle();case"text":return this.renderText();case"rectangle":return this.renderRectangle();case"circle":return this.renderCircle();default:return null}}renderLogo(){return i("div",{class:"SkeletonContainer"},i("div",{class:"SkeletonLogo "+(this.animation?"Skeleton":"")}))}renderImage(){return i("div",{class:"SkeletonImage "+(this.animation?"Skeleton":"")})}renderTitle(){return i("div",{class:"SkeletonContainer"},i("div",{class:"SkeletonTitle "+(this.animation?"Skeleton":"")}))}renderText(){return i("div",{class:"SkeletonContainer"},Array.from({length:this.rows>0?this.rows:1}).map(((t,e)=>i("div",{key:e,class:"SkeletonText "+(this.animation?"Skeleton":"")}))))}renderRectangle(){return i("div",{class:"SkeletonContainer"},i("div",{class:"SkeletonRectangle "+(this.animation?"Skeleton":"")}))}renderCircle(){return i("div",{class:"SkeletonContainer"},i("div",{class:"SkeletonCircle "+(this.animation?"Skeleton":"")}))}render(){let t="";switch(this.structure){case"logo":t=`\n :host {\n --emw-skeleton-logo-width: ${this.stylingValue.width};\n --emw-skeleton-logo-height: ${this.stylingValue.height};\n --emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"image":t=`\n :host {\n --emw-skeleton-image-width: ${this.stylingValue.width};\n --emw-skeleton-image-height: ${this.stylingValue.height};\n --emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"title":t=`\n :host {\n --emw-skeleton-title-width: ${this.stylingValue.width};\n --emw-skeleton-title-height: ${this.stylingValue.height};\n --emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"text":t=`\n :host {\n --emw-skeleton-text-width: ${this.stylingValue.width};\n --emw-skeleton-text-height: ${this.stylingValue.height};\n --emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"rectangle":t=`\n :host {\n --emw-skeleton-rectangle-width: ${this.stylingValue.width};\n --emw-skeleton-rectangle-height: ${this.stylingValue.height};\n --emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"circle":t=`\n :host {\n --emw-skeleton-circle-size: ${this.stylingValue.size};\n }\n `;break;default:t=""}return i(a,{key:"c2a2650acd416962a2bc4e1a7ee18bc6d8e2def8"},i("style",{key:"9bd7fc1f9e9ed9f17735a7b72fce6f09696f5e19"},t),this.handleStructure(this.structure))}static get watchers(){return{structure:["handleStructureChange"]}}};ce.style=":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.SkeletonRectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.SkeletonCircle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.SkeletonText{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.SkeletonText:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.SkeletonTitle{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.SkeletonImage{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.SkeletonLogo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}";export{T as draw_selection,C as general_multi_select,_ as general_tooltip,$ as lottery_banner,B as lottery_button,E as lottery_tipping_bullet,P as lottery_tipping_bullet_group,J as lottery_tipping_calendar,tt as lottery_tipping_dialog,at as lottery_tipping_filter,ut as lottery_tipping_latest_result,wt as lottery_tipping_page,St as lottery_tipping_pagination,zt as lottery_tipping_panel,At as lottery_tipping_ticket_bet,ne as lottery_tipping_ticket_controller,de as lottery_tipping_ticket_history,ce as ui_skeleton}
|
|
9
|
+
var e,i,n,r,a=9e15,o=1e9,s="0123456789abcdef",l="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",d="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",c={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-a,maxE:a,crypto:!1},h=!0,p="[DecimalError] ",g=p+"Invalid argument: ",f=p+"Precision limit exceeded",u=p+"crypto unavailable",m="[object Decimal]",b=Math.floor,y=Math.pow,v=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,w=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,L=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,x=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,k=1e7,T=7,C=l.length-1,_=d.length-1,S={toStringTag:m};function M(t){var e,i,n,r=t.length-1,a="",o=t[0];if(r>0){for(a+=o,e=1;e<r;e++)(i=T-(n=t[e]+"").length)&&(a+=H(i)),a+=n;(i=T-(n=(o=t[e])+"").length)&&(a+=H(i))}else if(0===o)return"0";for(;o%10==0;)o/=10;return a+o}function z(t,e,i){if(t!==~~t||t<e||t>i)throw Error(g+t)}function j(t,e,i,n){var r,a,o,s;for(a=t[0];a>=10;a/=10)--e;return--e<0?(e+=T,r=0):(r=Math.ceil((e+1)/T),e%=T),a=y(10,T-e),s=t[r]%a|0,null==n?e<3?(0==e?s=s/100|0:1==e&&(s=s/10|0),o=i<4&&99999==s||i>3&&49999==s||5e4==s||0==s):o=(i<4&&s+1==a||i>3&&s+1==a/2)&&(t[r+1]/a/100|0)==y(10,e-2)-1||(s==a/2||0==s)&&!(t[r+1]/a/100|0):e<4?(0==e?s=s/1e3|0:1==e?s=s/100|0:2==e&&(s=s/10|0),o=(n||i<4)&&9999==s||!n&&i>3&&4999==s):o=((n||i<4)&&s+1==a||!n&&i>3&&s+1==a/2)&&(t[r+1]/a/1e3|0)==y(10,e-3)-1,o}function N(t,e,i){for(var n,r,a=[0],o=0,l=t.length;o<l;){for(r=a.length;r--;)a[r]*=e;for(a[0]+=s.indexOf(t.charAt(o++)),n=0;n<a.length;n++)a[n]>i-1&&(void 0===a[n+1]&&(a[n+1]=0),a[n+1]+=a[n]/i|0,a[n]%=i)}return a.reverse()}S.absoluteValue=S.abs=function(){var t=new this.constructor(this);return t.s<0&&(t.s=1),$(t)},S.ceil=function(){return $(new this.constructor(this),this.e+1,2)},S.clampedTo=S.clamp=function(t,e){var i=this,n=i.constructor;if(t=new n(t),e=new n(e),!t.s||!e.s)return new n(NaN);if(t.gt(e))throw Error(g+e);return i.cmp(t)<0?t:i.cmp(e)>0?e:new n(i)},S.comparedTo=S.cmp=function(t){var e,i,n,r,a=this,o=a.d,s=(t=new a.constructor(t)).d,l=a.s,d=t.s;if(!o||!s)return l&&d?l!==d?l:o===s?0:!o^l<0?1:-1:NaN;if(!o[0]||!s[0])return o[0]?l:s[0]?-d:0;if(l!==d)return l;if(a.e!==t.e)return a.e>t.e^l<0?1:-1;for(e=0,i=(n=o.length)<(r=s.length)?n:r;e<i;++e)if(o[e]!==s[e])return o[e]>s[e]^l<0?1:-1;return n===r?0:n>r^l<0?1:-1},S.cosine=S.cos=function(){var t,e,i=this,n=i.constructor;return i.d?i.d[0]?(e=n.rounding,n.precision=(t=n.precision)+Math.max(i.e,i.sd())+T,n.rounding=1,i=function(t,e){var i,n,r;if(e.isZero())return e;(n=e.d.length)<32?r=(1/Y(4,i=Math.ceil(n/3))).toString():(i=16,r="2.3283064365386962890625e-10"),t.precision+=i,e=W(t,1,e.times(r),new t(1));for(var a=i;a--;){var o=e.times(e);e=o.times(o).minus(o).times(8).plus(1)}return t.precision-=i,e}(n,J(n,i)),n.precision=t,n.rounding=e,$(2==r||3==r?i.neg():i,t,e,!0)):new n(1):new n(NaN)},S.cubeRoot=S.cbrt=function(){var t,e,i,n,r,a,o,s,l,d,c=this,p=c.constructor;if(!c.isFinite()||c.isZero())return new p(c);for(h=!1,(a=c.s*y(c.s*c,1/3))&&Math.abs(a)!=1/0?n=new p(a.toString()):(i=M(c.d),(a=((t=c.e)-i.length+1)%3)&&(i+=1==a||-2==a?"0":"00"),a=y(i,1/3),t=b((t+1)/3)-(t%3==(t<0?-1:2)),(n=new p(i=a==1/0?"5e"+t:(i=a.toExponential()).slice(0,i.indexOf("e")+1)+t)).s=c.s),o=(t=p.precision)+3;;)if(d=(l=(s=n).times(s).times(s)).plus(c),n=D(d.plus(c).times(s),d.plus(l),o+2,1),M(s.d).slice(0,o)===(i=M(n.d)).slice(0,o)){if("9999"!=(i=i.slice(o-3,o+1))&&(r||"4999"!=i)){+i&&(+i.slice(1)||"5"!=i.charAt(0))||($(n,t+1,1),e=!n.times(n).times(n).eq(c));break}if(!r&&($(s,t+1,0),s.times(s).times(s).eq(c))){n=s;break}o+=4,r=1}return h=!0,$(n,t,p.rounding,e)},S.decimalPlaces=S.dp=function(){var t,e=this.d,i=NaN;if(e){if(i=((t=e.length-1)-b(this.e/T))*T,t=e[t])for(;t%10==0;t/=10)i--;i<0&&(i=0)}return i},S.dividedBy=S.div=function(t){return D(this,new this.constructor(t))},S.dividedToIntegerBy=S.divToInt=function(t){var e=this.constructor;return $(D(this,new e(t),0,1,1),e.precision,e.rounding)},S.equals=S.eq=function(t){return 0===this.cmp(t)},S.floor=function(){return $(new this.constructor(this),this.e+1,3)},S.greaterThan=S.gt=function(t){return this.cmp(t)>0},S.greaterThanOrEqualTo=S.gte=function(t){var e=this.cmp(t);return 1==e||0===e},S.hyperbolicCosine=S.cosh=function(){var t,e,i,n,r,a=this,o=a.constructor,s=new o(1);if(!a.isFinite())return new o(a.s?1/0:NaN);if(a.isZero())return s;n=o.rounding,o.precision=(i=o.precision)+Math.max(a.e,a.sd())+4,o.rounding=1,(r=a.d.length)<32?e=(1/Y(4,t=Math.ceil(r/3))).toString():(t=16,e="2.3283064365386962890625e-10"),a=W(o,1,a.times(e),new o(1),!0);for(var l,d=t,c=new o(8);d--;)l=a.times(a),a=s.minus(l.times(c.minus(l.times(c))));return $(a,o.precision=i,o.rounding=n,!0)},S.hyperbolicSine=S.sinh=function(){var t,e,i,n,r=this,a=r.constructor;if(!r.isFinite()||r.isZero())return new a(r);if(i=a.rounding,a.precision=(e=a.precision)+Math.max(r.e,r.sd())+4,a.rounding=1,(n=r.d.length)<3)r=W(a,2,r,r,!0);else{t=1.4*Math.sqrt(n),r=W(a,2,r=r.times(1/Y(5,t=t>16?16:0|t)),r,!0);for(var o,s=new a(5),l=new a(16),d=new a(20);t--;)o=r.times(r),r=r.times(s.plus(o.times(l.times(o).plus(d))))}return a.precision=e,a.rounding=i,$(r,e,i,!0)},S.hyperbolicTangent=S.tanh=function(){var t,e,i=this,n=i.constructor;return i.isFinite()?i.isZero()?new n(i):(e=n.rounding,n.precision=(t=n.precision)+7,n.rounding=1,D(i.sinh(),i.cosh(),n.precision=t,n.rounding=e)):new n(i.s)},S.inverseCosine=S.acos=function(){var t=this,e=t.constructor,i=t.abs().cmp(1),n=e.precision,r=e.rounding;return-1!==i?0===i?t.isNeg()?E(e,n,r):new e(0):new e(NaN):t.isZero()?E(e,n+4,r).times(.5):(e.precision=n+6,e.rounding=1,t=new e(1).minus(t).div(t.plus(1)).sqrt().atan(),e.precision=n,e.rounding=r,t.times(2))},S.inverseHyperbolicCosine=S.acosh=function(){var t,e,i=this,n=i.constructor;return i.lte(1)?new n(i.eq(1)?0:NaN):i.isFinite()?(e=n.rounding,n.precision=(t=n.precision)+Math.max(Math.abs(i.e),i.sd())+4,n.rounding=1,h=!1,i=i.times(i).minus(1).sqrt().plus(i),h=!0,n.precision=t,n.rounding=e,i.ln()):new n(i)},S.inverseHyperbolicSine=S.asinh=function(){var t,e,i=this,n=i.constructor;return!i.isFinite()||i.isZero()?new n(i):(e=n.rounding,n.precision=(t=n.precision)+2*Math.max(Math.abs(i.e),i.sd())+6,n.rounding=1,h=!1,i=i.times(i).plus(1).sqrt().plus(i),h=!0,n.precision=t,n.rounding=e,i.ln())},S.inverseHyperbolicTangent=S.atanh=function(){var t,e,i,n,r=this,a=r.constructor;return r.isFinite()?r.e>=0?new a(r.abs().eq(1)?r.s/0:r.isZero()?r:NaN):(t=a.precision,e=a.rounding,n=r.sd(),Math.max(n,t)<2*-r.e-1?$(new a(r),t,e,!0):(a.precision=i=n-r.e,r=D(r.plus(1),new a(1).minus(r),i+t,1),a.precision=t+4,a.rounding=1,r=r.ln(),a.precision=t,a.rounding=e,r.times(.5))):new a(NaN)},S.inverseSine=S.asin=function(){var t,e,i,n,r=this,a=r.constructor;return r.isZero()?new a(r):(e=r.abs().cmp(1),i=a.precision,n=a.rounding,-1!==e?0===e?((t=E(a,i+4,n).times(.5)).s=r.s,t):new a(NaN):(a.precision=i+6,a.rounding=1,r=r.div(new a(1).minus(r.times(r)).sqrt().plus(1)).atan(),a.precision=i,a.rounding=n,r.times(2)))},S.inverseTangent=S.atan=function(){var t,e,i,n,r,a,o,s,l,d=this,c=d.constructor,p=c.precision,g=c.rounding;if(d.isFinite()){if(d.isZero())return new c(d);if(d.abs().eq(1)&&p+4<=_)return(o=E(c,p+4,g).times(.25)).s=d.s,o}else{if(!d.s)return new c(NaN);if(p+4<=_)return(o=E(c,p+4,g).times(.5)).s=d.s,o}for(c.precision=s=p+10,c.rounding=1,t=i=Math.min(28,s/T+2|0);t;--t)d=d.div(d.times(d).plus(1).sqrt().plus(1));for(h=!1,e=Math.ceil(s/T),n=1,l=d.times(d),o=new c(d),r=d;-1!==t;)if(r=r.times(l),a=o.minus(r.div(n+=2)),r=r.times(l),void 0!==(o=a.plus(r.div(n+=2))).d[e])for(t=e;o.d[t]===a.d[t]&&t--;);return i&&(o=o.times(2<<i-1)),h=!0,$(o,c.precision=p,c.rounding=g,!0)},S.isFinite=function(){return!!this.d},S.isInteger=S.isInt=function(){return!!this.d&&b(this.e/T)>this.d.length-2},S.isNaN=function(){return!this.s},S.isNegative=S.isNeg=function(){return this.s<0},S.isPositive=S.isPos=function(){return this.s>0},S.isZero=function(){return!!this.d&&0===this.d[0]},S.lessThan=S.lt=function(t){return this.cmp(t)<0},S.lessThanOrEqualTo=S.lte=function(t){return this.cmp(t)<1},S.logarithm=S.log=function(t){var e,i,n,r,a,o,s,l,d=this,c=d.constructor,p=c.precision,g=c.rounding;if(null==t)t=new c(10),e=!0;else{if(i=(t=new c(t)).d,t.s<0||!i||!i[0]||t.eq(1))return new c(NaN);e=t.eq(10)}if(i=d.d,d.s<0||!i||!i[0]||d.eq(1))return new c(i&&!i[0]?-1/0:1!=d.s?NaN:i?0:1/0);if(e)if(i.length>1)a=!0;else{for(r=i[0];r%10==0;)r/=10;a=1!==r}if(h=!1,o=R(d,s=p+5),n=e?B(c,s+10):R(t,s),j((l=D(o,n,s,1)).d,r=p,g))do{if(o=R(d,s+=10),n=e?B(c,s+10):R(t,s),l=D(o,n,s,1),!a){+M(l.d).slice(r+1,r+15)+1==1e14&&(l=$(l,p+1,0));break}}while(j(l.d,r+=10,g));return h=!0,$(l,p,g)},S.minus=S.sub=function(t){var e,i,n,r,a,o,s,l,d,c,p,g,f=this,u=f.constructor;if(t=new u(t),!f.d||!t.d)return f.s&&t.s?f.d?t.s=-t.s:t=new u(t.d||f.s!==t.s?f:NaN):t=new u(NaN),t;if(f.s!=t.s)return t.s=-t.s,f.plus(t);if(g=t.d,s=u.precision,l=u.rounding,!(d=f.d)[0]||!g[0]){if(g[0])t.s=-t.s;else{if(!d[0])return new u(3===l?-0:0);t=new u(f)}return h?$(t,s,l):t}if(i=b(t.e/T),c=b(f.e/T),d=d.slice(),a=c-i){for((p=a<0)?(e=d,a=-a,o=g.length):(e=g,i=c,o=d.length),a>(n=Math.max(Math.ceil(s/T),o)+2)&&(a=n,e.length=1),e.reverse(),n=a;n--;)e.push(0);e.reverse()}else{for((p=(n=d.length)<(o=g.length))&&(o=n),n=0;n<o;n++)if(d[n]!=g[n]){p=d[n]<g[n];break}a=0}for(p&&(e=d,d=g,g=e,t.s=-t.s),n=g.length-(o=d.length);n>0;--n)d[o++]=0;for(n=g.length;n>a;){if(d[--n]<g[n]){for(r=n;r&&0===d[--r];)d[r]=k-1;--d[r],d[n]+=k}d[n]-=g[n]}for(;0===d[--o];)d.pop();for(;0===d[0];d.shift())--i;return d[0]?(t.d=d,t.e=I(d,i),h?$(t,s,l):t):new u(3===l?-0:0)},S.modulo=S.mod=function(t){var e,i=this,n=i.constructor;return t=new n(t),!i.d||!t.s||t.d&&!t.d[0]?new n(NaN):!t.d||i.d&&!i.d[0]?$(new n(i),n.precision,n.rounding):(h=!1,9==n.modulo?(e=D(i,t.abs(),0,3,1)).s*=t.s:e=D(i,t,0,n.modulo,1),e=e.times(t),h=!0,i.minus(e))},S.naturalExponential=S.exp=function(){return Z(this)},S.naturalLogarithm=S.ln=function(){return R(this)},S.negated=S.neg=function(){var t=new this.constructor(this);return t.s=-t.s,$(t)},S.plus=S.add=function(t){var e,i,n,r,a,o,s,l,d,c,p=this,g=p.constructor;if(t=new g(t),!p.d||!t.d)return p.s&&t.s?p.d||(t=new g(t.d||p.s===t.s?p:NaN)):t=new g(NaN),t;if(p.s!=t.s)return t.s=-t.s,p.minus(t);if(c=t.d,s=g.precision,l=g.rounding,!(d=p.d)[0]||!c[0])return c[0]||(t=new g(p)),h?$(t,s,l):t;if(a=b(p.e/T),n=b(t.e/T),d=d.slice(),r=a-n){for(r<0?(i=d,r=-r,o=c.length):(i=c,n=a,o=d.length),r>(o=(a=Math.ceil(s/T))>o?a+1:o+1)&&(r=o,i.length=1),i.reverse();r--;)i.push(0);i.reverse()}for((o=d.length)-(r=c.length)<0&&(r=o,i=c,c=d,d=i),e=0;r;)e=(d[--r]=d[r]+c[r]+e)/k|0,d[r]%=k;for(e&&(d.unshift(e),++n),o=d.length;0==d[--o];)d.pop();return t.d=d,t.e=I(d,n),h?$(t,s,l):t},S.precision=S.sd=function(t){var e,i=this;if(void 0!==t&&t!==!!t&&1!==t&&0!==t)throw Error(g+t);return i.d?(e=P(i.d),t&&i.e+1>e&&(e=i.e+1)):e=NaN,e},S.round=function(){var t=this,e=t.constructor;return $(new e(t),t.e+1,e.rounding)},S.sine=S.sin=function(){var t,e,i=this,n=i.constructor;return i.isFinite()?i.isZero()?new n(i):(e=n.rounding,n.precision=(t=n.precision)+Math.max(i.e,i.sd())+T,n.rounding=1,i=function(t,e){var i,n=e.d.length;if(n<3)return e.isZero()?e:W(t,2,e,e);i=1.4*Math.sqrt(n),e=W(t,2,e=e.times(1/Y(5,i=i>16?16:0|i)),e);for(var r,a=new t(5),o=new t(16),s=new t(20);i--;)r=e.times(e),e=e.times(a.plus(r.times(o.times(r).minus(s))));return e}(n,J(n,i)),n.precision=t,n.rounding=e,$(r>2?i.neg():i,t,e,!0)):new n(NaN)},S.squareRoot=S.sqrt=function(){var t,e,i,n,r,a,o=this,s=o.d,l=o.e,d=o.s,c=o.constructor;if(1!==d||!s||!s[0])return new c(!d||d<0&&(!s||s[0])?NaN:s?o:1/0);for(h=!1,0==(d=Math.sqrt(+o))||d==1/0?(((e=M(s)).length+l)%2==0&&(e+="0"),d=Math.sqrt(e),l=b((l+1)/2)-(l<0||l%2),n=new c(e=d==1/0?"5e"+l:(e=d.toExponential()).slice(0,e.indexOf("e")+1)+l)):n=new c(d.toString()),i=(l=c.precision)+3;;)if(n=(a=n).plus(D(o,a,i+2,1)).times(.5),M(a.d).slice(0,i)===(e=M(n.d)).slice(0,i)){if("9999"!=(e=e.slice(i-3,i+1))&&(r||"4999"!=e)){+e&&(+e.slice(1)||"5"!=e.charAt(0))||($(n,l+1,1),t=!n.times(n).eq(o));break}if(!r&&($(a,l+1,0),a.times(a).eq(o))){n=a;break}i+=4,r=1}return h=!0,$(n,l,c.rounding,t)},S.tangent=S.tan=function(){var t,e,i=this,n=i.constructor;return i.isFinite()?i.isZero()?new n(i):(e=n.rounding,n.precision=(t=n.precision)+10,n.rounding=1,(i=i.sin()).s=1,i=D(i,new n(1).minus(i.times(i)).sqrt(),t+10,0),n.precision=t,n.rounding=e,$(2==r||4==r?i.neg():i,t,e,!0)):new n(NaN)},S.times=S.mul=function(t){var e,i,n,r,a,o,s,l,d,c=this,p=c.constructor,g=c.d,f=(t=new p(t)).d;if(t.s*=c.s,!(g&&g[0]&&f&&f[0]))return new p(!t.s||g&&!g[0]&&!f||f&&!f[0]&&!g?NaN:g&&f?0*t.s:t.s/0);for(i=b(c.e/T)+b(t.e/T),(l=g.length)<(d=f.length)&&(a=g,g=f,f=a,o=l,l=d,d=o),a=[],n=o=l+d;n--;)a.push(0);for(n=d;--n>=0;){for(e=0,r=l+n;r>n;)s=a[r]+f[n]*g[r-n-1]+e,a[r--]=s%k|0,e=s/k|0;a[r]=(a[r]+e)%k|0}for(;!a[--o];)a.pop();return e?++i:a.shift(),t.d=a,t.e=I(a,i),h?$(t,p.precision,p.rounding):t},S.toBinary=function(t,e){return K(this,2,t,e)},S.toDecimalPlaces=S.toDP=function(t,e){var i=this,n=i.constructor;return i=new n(i),void 0===t?i:(z(t,0,o),void 0===e?e=n.rounding:z(e,0,8),$(i,t+i.e+1,e))},S.toExponential=function(t,e){var i,n=this,r=n.constructor;return void 0===t?i=O(n,!0):(z(t,0,o),void 0===e?e=r.rounding:z(e,0,8),i=O(n=$(new r(n),t+1,e),!0,t+1)),n.isNeg()&&!n.isZero()?"-"+i:i},S.toFixed=function(t,e){var i,n,r=this,a=r.constructor;return void 0===t?i=O(r):(z(t,0,o),void 0===e?e=a.rounding:z(e,0,8),i=O(n=$(new a(r),t+r.e+1,e),!1,t+n.e+1)),r.isNeg()&&!r.isZero()?"-"+i:i},S.toFraction=function(t){var e,i,n,r,a,o,s,l,d,c,p,f,u=this,m=u.d,b=u.constructor;if(!m)return new b(u);if(d=i=new b(1),n=l=new b(0),a=(e=new b(n)).e=P(m)-u.e-1,e.d[0]=y(10,(o=a%T)<0?T+o:o),null==t)t=a>0?e:d;else{if(!(s=new b(t)).isInt()||s.lt(d))throw Error(g+s);t=s.gt(e)?a>0?e:d:s}for(h=!1,s=new b(M(m)),c=b.precision,b.precision=a=m.length*T*2;p=D(s,e,0,1,1),1!=(r=i.plus(p.times(n))).cmp(t);)i=n,n=r,d=l.plus(p.times(r=d)),l=r,e=s.minus(p.times(r=e)),s=r;return r=D(t.minus(i),n,0,1,1),l=l.plus(r.times(d)),i=i.plus(r.times(n)),l.s=d.s=u.s,f=D(d,n,a,1).minus(u).abs().cmp(D(l,i,a,1).minus(u).abs())<1?[d,n]:[l,i],b.precision=c,h=!0,f},S.toHexadecimal=S.toHex=function(t,e){return K(this,16,t,e)},S.toNearest=function(t,e){var i=this,n=i.constructor;if(i=new n(i),null==t){if(!i.d)return i;t=new n(1),e=n.rounding}else{if(t=new n(t),void 0===e?e=n.rounding:z(e,0,8),!i.d)return t.s?i:t;if(!t.d)return t.s&&(t.s=i.s),t}return t.d[0]?(h=!1,i=D(i,t,0,e,1).times(t),h=!0,$(i)):(t.s=i.s,i=t),i},S.toNumber=function(){return+this},S.toOctal=function(t,e){return K(this,8,t,e)},S.toPower=S.pow=function(t){var e,i,n,r,a,o,s=this,l=s.constructor,d=+(t=new l(t));if(!(s.d&&t.d&&s.d[0]&&t.d[0]))return new l(y(+s,d));if((s=new l(s)).eq(1))return s;if(n=l.precision,a=l.rounding,t.eq(1))return $(s,n,a);if((e=b(t.e/T))>=t.d.length-1&&(i=d<0?-d:d)<=9007199254740991)return r=A(l,s,i,n),t.s<0?new l(1).div(r):$(r,n,a);if((o=s.s)<0){if(e<t.d.length-1)return new l(NaN);if(1&t.d[e]||(o=1),0==s.e&&1==s.d[0]&&1==s.d.length)return s.s=o,s}return(e=0!=(i=y(+s,d))&&isFinite(i)?new l(i+"").e:b(d*(Math.log("0."+M(s.d))/Math.LN10+s.e+1)))>l.maxE+1||e<l.minE-1?new l(e>0?o/0:0):(h=!1,l.rounding=s.s=1,i=Math.min(12,(e+"").length),(r=Z(t.times(R(s,n+i)),n)).d&&j((r=$(r,n+5,1)).d,n,a)&&+M((r=$(Z(t.times(R(s,(e=n+10)+i)),e),e+5,1)).d).slice(n+1,n+15)+1==1e14&&(r=$(r,n+1,0)),r.s=o,h=!0,l.rounding=a,$(r,n,a))},S.toPrecision=function(t,e){var i,n=this,r=n.constructor;return void 0===t?i=O(n,n.e<=r.toExpNeg||n.e>=r.toExpPos):(z(t,1,o),void 0===e?e=r.rounding:z(e,0,8),i=O(n=$(new r(n),t,e),t<=n.e||n.e<=r.toExpNeg,t)),n.isNeg()&&!n.isZero()?"-"+i:i},S.toSignificantDigits=S.toSD=function(t,e){var i=this.constructor;return void 0===t?(t=i.precision,e=i.rounding):(z(t,1,o),void 0===e?e=i.rounding:z(e,0,8)),$(new i(this),t,e)},S.toString=function(){var t=this,e=t.constructor,i=O(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()&&!t.isZero()?"-"+i:i},S.truncated=S.trunc=function(){return $(new this.constructor(this),this.e+1,1)},S.valueOf=S.toJSON=function(){var t=this,e=t.constructor,i=O(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()?"-"+i:i};var D=function(){function t(t,e,i){var n,r=0,a=t.length;for(t=t.slice();a--;)t[a]=(n=t[a]*e+r)%i|0,r=n/i|0;return r&&t.unshift(r),t}function e(t,e,i,n){var r,a;if(i!=n)a=i>n?1:-1;else for(r=a=0;r<i;r++)if(t[r]!=e[r]){a=t[r]>e[r]?1:-1;break}return a}function n(t,e,i,n){for(var r=0;i--;)t[i]-=r,t[i]=(r=t[i]<e[i]?1:0)*n+t[i]-e[i];for(;!t[0]&&t.length>1;)t.shift()}return function(r,a,o,s,l,d){var c,h,p,g,f,u,m,y,v,w,L,x,C,_,S,M,z,j,N,D,O=r.constructor,I=r.s==a.s?1:-1,B=r.d,E=a.d;if(!(B&&B[0]&&E&&E[0]))return new O(r.s&&a.s&&(B?!E||B[0]!=E[0]:E)?B&&0==B[0]||!E?0*I:I/0:NaN);for(d?(f=1,h=r.e-a.e):(d=k,h=b(r.e/(f=T))-b(a.e/f)),N=E.length,z=B.length,w=(v=new O(I)).d=[],p=0;E[p]==(B[p]||0);p++);if(E[p]>(B[p]||0)&&h--,null==o?(_=o=O.precision,s=O.rounding):_=l?o+(r.e-a.e)+1:o,_<0)w.push(1),u=!0;else{if(_=_/f+2|0,p=0,1==N){for(g=0,E=E[0],_++;(p<z||g)&&_--;p++)w[p]=(S=g*d+(B[p]||0))/E|0,g=S%E|0;u=g||p<z}else{for((g=d/(E[0]+1)|0)>1&&(E=t(E,g,d),B=t(B,g,d),N=E.length,z=B.length),M=N,x=(L=B.slice(0,N)).length;x<N;)L[x++]=0;(D=E.slice()).unshift(0),j=E[0],E[1]>=d/2&&++j;do{g=0,(c=e(E,L,N,x))<0?(C=L[0],N!=x&&(C=C*d+(L[1]||0)),(g=C/j|0)>1?(g>=d&&(g=d-1),1==(c=e(m=t(E,g,d),L,y=m.length,x=L.length))&&(g--,n(m,N<y?D:E,y,d))):(0==g&&(c=g=1),m=E.slice()),(y=m.length)<x&&m.unshift(0),n(L,m,x,d),-1==c&&(c=e(E,L,N,x=L.length))<1&&(g++,n(L,N<x?D:E,x,d)),x=L.length):0===c&&(g++,L=[0]),w[p++]=g,c&&L[0]?L[x++]=B[M]||0:(L=[B[M]],x=1)}while((M++<z||void 0!==L[0])&&_--);u=void 0!==L[0]}w[0]||w.shift()}if(1==f)v.e=h,i=u;else{for(p=1,g=w[0];g>=10;g/=10)p++;v.e=p+h*f-1,$(v,l?o+v.e+1:o,s,u)}return v}}();function $(t,e,i,n){var r,a,o,s,l,d,c,p,g,f=t.constructor;t:if(null!=e){if(!(p=t.d))return t;for(r=1,s=p[0];s>=10;s/=10)r++;if((a=e-r)<0)a+=T,l=(c=p[g=0])/y(10,r-(o=e)-1)%10|0;else if((g=Math.ceil((a+1)/T))>=(s=p.length)){if(!n)break t;for(;s++<=g;)p.push(0);c=l=0,r=1,o=(a%=T)-T+1}else{for(c=s=p[g],r=1;s>=10;s/=10)r++;l=(o=(a%=T)-T+r)<0?0:c/y(10,r-o-1)%10|0}if(n=n||e<0||void 0!==p[g+1]||(o<0?c:c%y(10,r-o-1)),d=i<4?(l||n)&&(0==i||i==(t.s<0?3:2)):l>5||5==l&&(4==i||n||6==i&&(a>0?o>0?c/y(10,r-o):0:p[g-1])%10&1||i==(t.s<0?8:7)),e<1||!p[0])return p.length=0,d?(p[0]=y(10,(T-(e-=t.e+1)%T)%T),t.e=-e||0):p[0]=t.e=0,t;if(0==a?(p.length=g,s=1,g--):(p.length=g+1,s=y(10,T-a),p[g]=o>0?(c/y(10,r-o)%y(10,o)|0)*s:0),d)for(;;){if(0==g){for(a=1,o=p[0];o>=10;o/=10)a++;for(o=p[0]+=s,s=1;o>=10;o/=10)s++;a!=s&&(t.e++,p[0]==k&&(p[0]=1));break}if(p[g]+=s,p[g]!=k)break;p[g--]=0,s=1}for(a=p.length;0===p[--a];)p.pop()}return h&&(t.e>f.maxE?(t.d=null,t.e=NaN):t.e<f.minE&&(t.e=0,t.d=[0])),t}function O(t,e,i){if(!t.isFinite())return F(t);var n,r=t.e,a=M(t.d),o=a.length;return e?(i&&(n=i-o)>0?a=a.charAt(0)+"."+a.slice(1)+H(n):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(t.e<0?"e":"e+")+t.e):r<0?(a="0."+H(-r-1)+a,i&&(n=i-o)>0&&(a+=H(n))):r>=o?(a+=H(r+1-o),i&&(n=i-r-1)>0&&(a=a+"."+H(n))):((n=r+1)<o&&(a=a.slice(0,n)+"."+a.slice(n)),i&&(n=i-o)>0&&(r+1===o&&(a+="."),a+=H(n))),a}function I(t,e){var i=t[0];for(e*=T;i>=10;i/=10)e++;return e}function B(t,e,i){if(e>C)throw h=!0,i&&(t.precision=i),Error(f);return $(new t(l),e,1,!0)}function E(t,e,i){if(e>_)throw Error(f);return $(new t(d),e,i,!0)}function P(t){var e=t.length-1,i=e*T+1;if(e=t[e]){for(;e%10==0;e/=10)i--;for(e=t[0];e>=10;e/=10)i++}return i}function H(t){for(var e="";t--;)e+="0";return e}function A(t,e,i,n){var r,a=new t(1),o=Math.ceil(n/T+4);for(h=!1;;){if(i%2&&q((a=a.times(e)).d,o)&&(r=!0),0===(i=b(i/2))){i=a.d.length-1,r&&0===a.d[i]&&++a.d[i];break}q((e=e.times(e)).d,o)}return h=!0,a}function U(t){return 1&t.d[t.d.length-1]}function G(t,e,i){for(var n,r,a=new t(e[0]),o=0;++o<e.length;){if(!(r=new t(e[o])).s){a=r;break}((n=a.cmp(r))===i||0===n&&a.s===i)&&(a=r)}return a}function Z(t,e){var i,n,r,a,o,s,l,d=0,c=0,p=0,g=t.constructor,f=g.rounding,u=g.precision;if(!t.d||!t.d[0]||t.e>17)return new g(t.d?t.d[0]?t.s<0?0:1/0:1:t.s?t.s<0?0:t:NaN);for(null==e?(h=!1,l=u):l=e,s=new g(.03125);t.e>-2;)t=t.times(s),p+=5;for(l+=n=Math.log(y(2,p))/Math.LN10*2+5|0,i=a=o=new g(1),g.precision=l;;){if(a=$(a.times(t),l,1),i=i.times(++c),M((s=o.plus(D(a,i,l,1))).d).slice(0,l)===M(o.d).slice(0,l)){for(r=p;r--;)o=$(o.times(o),l,1);if(null!=e)return g.precision=u,o;if(!(d<3&&j(o.d,l-n,f,d)))return $(o,g.precision=u,f,h=!0);g.precision=l+=10,i=a=s=new g(1),c=0,d++}o=s}}function R(t,e){var i,n,r,a,o,s,l,d,c,p,g,f=1,u=t,m=u.d,b=u.constructor,y=b.rounding,v=b.precision;if(u.s<0||!m||!m[0]||!u.e&&1==m[0]&&1==m.length)return new b(m&&!m[0]?-1/0:1!=u.s?NaN:m?0:u);if(null==e?(h=!1,c=v):c=e,b.precision=c+=10,n=(i=M(m)).charAt(0),!(Math.abs(a=u.e)<15e14))return d=B(b,c+2,v).times(a+""),u=R(new b(n+"."+i.slice(1)),c-10).plus(d),b.precision=v,null==e?$(u,v,y,h=!0):u;for(;n<7&&1!=n||1==n&&i.charAt(1)>3;)n=(i=M((u=u.times(t)).d)).charAt(0),f++;for(a=u.e,n>1?(u=new b("0."+i),a++):u=new b(n+"."+i.slice(1)),p=u,l=o=u=D(u.minus(1),u.plus(1),c,1),g=$(u.times(u),c,1),r=3;;){if(o=$(o.times(g),c,1),M((d=l.plus(D(o,new b(r),c,1))).d).slice(0,c)===M(l.d).slice(0,c)){if(l=l.times(2),0!==a&&(l=l.plus(B(b,c+2,v).times(a+""))),l=D(l,new b(f),c,1),null!=e)return b.precision=v,l;if(!j(l.d,c-10,y,s))return $(l,b.precision=v,y,h=!0);b.precision=c+=10,d=o=u=D(p.minus(1),p.plus(1),c,1),g=$(u.times(u),c,1),r=s=1}l=d,r+=2}}function F(t){return String(t.s*t.s/0)}function V(t,e){var i,n,r;for((i=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(i<0&&(i=n),i+=+e.slice(n+1),e=e.substring(0,n)):i<0&&(i=e.length),n=0;48===e.charCodeAt(n);n++);for(r=e.length;48===e.charCodeAt(r-1);--r);if(e=e.slice(n,r)){if(r-=n,t.e=i=i-n-1,t.d=[],n=(i+1)%T,i<0&&(n+=T),n<r){for(n&&t.d.push(+e.slice(0,n)),r-=T;n<r;)t.d.push(+e.slice(n,n+=T));e=e.slice(n),n=T-e.length}else n-=r;for(;n--;)e+="0";t.d.push(+e),h&&(t.e>t.constructor.maxE?(t.d=null,t.e=NaN):t.e<t.constructor.minE&&(t.e=0,t.d=[0]))}else t.e=0,t.d=[0];return t}function X(t,i){var n,r,a,o,s,l,d,c,p;if(i.indexOf("_")>-1){if(i=i.replace(/(\d)_(?=\d)/g,"$1"),x.test(i))return V(t,i)}else if("Infinity"===i||"NaN"===i)return+i||(t.s=NaN),t.e=NaN,t.d=null,t;if(w.test(i))n=16,i=i.toLowerCase();else if(v.test(i))n=2;else{if(!L.test(i))throw Error(g+i);n=8}for((o=i.search(/p/i))>0?(d=+i.slice(o+1),i=i.substring(2,o)):i=i.slice(2),o=i.indexOf("."),r=t.constructor,(s=o>=0)&&(o=(l=(i=i.replace(".","")).length)-o,a=A(r,new r(n),o,2*o)),o=p=(c=N(i,n,k)).length-1;0===c[o];--o)c.pop();return o<0?new r(0*t.s):(t.e=I(c,p),t.d=c,h=!1,s&&(t=D(t,a,4*l)),d&&(t=t.times(Math.abs(d)<54?y(2,d):e.pow(2,d))),h=!0,t)}function W(t,e,i,n,r){var a,o,s,l,d=t.precision,c=Math.ceil(d/T);for(h=!1,l=i.times(i),s=new t(n);;){if(o=D(s.times(l),new t(e++*e++),d,1),s=r?n.plus(o):n.minus(o),n=D(o.times(l),new t(e++*e++),d,1),void 0!==(o=s.plus(n)).d[c]){for(a=c;o.d[a]===s.d[a]&&a--;);if(-1==a)break}a=s,s=n,n=o,o=a}return h=!0,o.d.length=c+1,o}function Y(t,e){for(var i=t;--e;)i*=t;return i}function J(t,e){var i,n=e.s<0,a=E(t,t.precision,1),o=a.times(.5);if((e=e.abs()).lte(o))return r=n?4:1,e;if((i=e.divToInt(a)).isZero())r=n?3:2;else{if((e=e.minus(i.times(a))).lte(o))return r=U(i)?n?2:3:n?4:1,e;r=U(i)?n?1:4:n?3:2}return e.minus(a).abs()}function K(t,e,n,r){var a,l,d,c,h,p,g,f,u,m=t.constructor,b=void 0!==n;if(b?(z(n,1,o),void 0===r?r=m.rounding:z(r,0,8)):(n=m.precision,r=m.rounding),t.isFinite()){for(b?(a=2,16==e?n=4*n-3:8==e&&(n=3*n-2)):a=e,(d=(g=O(t)).indexOf("."))>=0&&(g=g.replace(".",""),(u=new m(1)).e=g.length-d,u.d=N(O(u),10,a),u.e=u.d.length),l=h=(f=N(g,10,a)).length;0==f[--h];)f.pop();if(f[0]){if(d<0?l--:((t=new m(t)).d=f,t.e=l,f=(t=D(t,u,n,r,0,a)).d,l=t.e,p=i),d=f[n],c=a/2,p=p||void 0!==f[n+1],p=r<4?(void 0!==d||p)&&(0===r||r===(t.s<0?3:2)):d>c||d===c&&(4===r||p||6===r&&1&f[n-1]||r===(t.s<0?8:7)),f.length=n,p)for(;++f[--n]>a-1;)f[n]=0,n||(++l,f.unshift(1));for(h=f.length;!f[h-1];--h);for(d=0,g="";d<h;d++)g+=s.charAt(f[d]);if(b){if(h>1)if(16==e||8==e){for(d=16==e?4:3,--h;h%d;h++)g+="0";for(h=(f=N(g,a,e)).length;!f[h-1];--h);for(d=1,g="1.";d<h;d++)g+=s.charAt(f[d])}else g=g.charAt(0)+"."+g.slice(1);g=g+(l<0?"p":"p+")+l}else if(l<0){for(;++l;)g="0"+g;g="0."+g}else if(++l>h)for(l-=h;l--;)g+="0";else l<h&&(g=g.slice(0,l)+"."+g.slice(l))}else g=b?"0p+0":"0";g=(16==e?"0x":2==e?"0b":8==e?"0o":"")+g}else g=F(t);return t.s<0?"-"+g:g}function q(t,e){if(t.length>e)return t.length=e,!0}function Q(t){return new this(t).abs()}function tt(t){return new this(t).acos()}function et(t){return new this(t).acosh()}function it(t,e){return new this(t).plus(e)}function nt(t){return new this(t).asin()}function rt(t){return new this(t).asinh()}function at(t){return new this(t).atan()}function ot(t){return new this(t).atanh()}function st(t,e){t=new this(t),e=new this(e);var i,n=this.precision,r=this.rounding,a=n+4;return t.s&&e.s?t.d||e.d?!e.d||t.isZero()?(i=e.s<0?E(this,n,r):new this(0)).s=t.s:!t.d||e.isZero()?(i=E(this,a,1).times(.5)).s=t.s:e.s<0?(this.precision=a,this.rounding=1,i=this.atan(D(t,e,a,1)),e=E(this,a,1),this.precision=n,this.rounding=r,i=t.s<0?i.minus(e):i.plus(e)):i=this.atan(D(t,e,a,1)):(i=E(this,a,1).times(e.s>0?.25:.75)).s=t.s:i=new this(NaN),i}function lt(t){return new this(t).cbrt()}function dt(t){return $(t=new this(t),t.e+1,2)}function ct(t,e,i){return new this(t).clamp(e,i)}function ht(t){if(!t||"object"!=typeof t)throw Error(p+"Object expected");var e,i,n,r=!0===t.defaults,s=["precision",1,o,"rounding",0,8,"toExpNeg",-a,0,"toExpPos",0,a,"maxE",0,a,"minE",-a,0,"modulo",0,9];for(e=0;e<s.length;e+=3)if(i=s[e],r&&(this[i]=c[i]),void 0!==(n=t[i])){if(!(b(n)===n&&n>=s[e+1]&&n<=s[e+2]))throw Error(g+i+": "+n);this[i]=n}if(i="crypto",r&&(this[i]=c[i]),void 0!==(n=t[i])){if(!0!==n&&!1!==n&&0!==n&&1!==n)throw Error(g+i+": "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(u);this[i]=!0}else this[i]=!1}return this}function pt(t){return new this(t).cos()}function gt(t){return new this(t).cosh()}function ft(t,e){return new this(t).div(e)}function ut(t){return new this(t).exp()}function mt(t){return $(t=new this(t),t.e+1,3)}function bt(){var t,e,i=new this(0);for(h=!1,t=0;t<arguments.length;)if((e=new this(arguments[t++])).d)i.d&&(i=i.plus(e.times(e)));else{if(e.s)return h=!0,new this(1/0);i=e}return h=!0,i.sqrt()}function yt(t){return t instanceof e||t&&t.toStringTag===m||!1}function vt(t){return new this(t).ln()}function wt(t,e){return new this(t).log(e)}function Lt(t){return new this(t).log(2)}function xt(t){return new this(t).log(10)}function kt(){return G(this,arguments,-1)}function Tt(){return G(this,arguments,1)}function Ct(t,e){return new this(t).mod(e)}function _t(t,e){return new this(t).mul(e)}function St(t,e){return new this(t).pow(e)}function Mt(t){var e,i,n,r,a=0,s=new this(1),l=[];if(void 0===t?t=this.precision:z(t,1,o),n=Math.ceil(t/T),this.crypto)if(crypto.getRandomValues)for(e=crypto.getRandomValues(new Uint32Array(n));a<n;)(r=e[a])>=429e7?e[a]=crypto.getRandomValues(new Uint32Array(1))[0]:l[a++]=r%1e7;else{if(!crypto.randomBytes)throw Error(u);for(e=crypto.randomBytes(n*=4);a<n;)(r=e[a]+(e[a+1]<<8)+(e[a+2]<<16)+((127&e[a+3])<<24))>=214e7?crypto.randomBytes(4).copy(e,a):(l.push(r%1e7),a+=4);a=n/4}else for(;a<n;)l[a++]=1e7*Math.random()|0;for(n=l[--a],t%=T,n&&t&&(r=y(10,T-t),l[a]=(n/r|0)*r);0===l[a];a--)l.pop();if(a<0)i=0,l=[0];else{for(i=-1;0===l[0];i-=T)l.shift();for(n=1,r=l[0];r>=10;r/=10)n++;n<T&&(i-=T-n)}return s.e=i,s.d=l,s}function zt(t){return $(t=new this(t),t.e+1,this.rounding)}function jt(t){return(t=new this(t)).d?t.d[0]?t.s:0*t.s:t.s||NaN}function Nt(t){return new this(t).sin()}function Dt(t){return new this(t).sinh()}function $t(t){return new this(t).sqrt()}function Ot(t,e){return new this(t).sub(e)}function It(){var t=0,e=arguments,i=new this(e[t]);for(h=!1;i.s&&++t<e.length;)i=i.plus(e[t]);return h=!0,$(i,this.precision,this.rounding)}function Bt(t){return new this(t).tan()}function Et(t){return new this(t).tanh()}function Pt(t){return $(t=new this(t),t.e+1,1)}(e=function t(e){var i,n,r;function a(t){var e,i,n,r=this;if(!(r instanceof a))return new a(t);if(r.constructor=a,yt(t))return r.s=t.s,void(h?!t.d||t.e>a.maxE?(r.e=NaN,r.d=null):t.e<a.minE?(r.e=0,r.d=[0]):(r.e=t.e,r.d=t.d.slice()):(r.e=t.e,r.d=t.d?t.d.slice():t.d));if("number"==(n=typeof t)){if(0===t)return r.s=1/t<0?-1:1,r.e=0,void(r.d=[0]);if(t<0?(t=-t,r.s=-1):r.s=1,t===~~t&&t<1e7){for(e=0,i=t;i>=10;i/=10)e++;return void(h?e>a.maxE?(r.e=NaN,r.d=null):e<a.minE?(r.e=0,r.d=[0]):(r.e=e,r.d=[t]):(r.e=e,r.d=[t]))}return 0*t!=0?(t||(r.s=NaN),r.e=NaN,void(r.d=null)):V(r,t.toString())}if("string"===n)return 45===(i=t.charCodeAt(0))?(t=t.slice(1),r.s=-1):(43===i&&(t=t.slice(1)),r.s=1),x.test(t)?V(r,t):X(r,t);if("bigint"===n)return t<0?(t=-t,r.s=-1):r.s=1,V(r,t.toString());throw Error(g+t)}if(a.prototype=S,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.EUCLID=9,a.config=a.set=ht,a.clone=t,a.isDecimal=yt,a.abs=Q,a.acos=tt,a.acosh=et,a.add=it,a.asin=nt,a.asinh=rt,a.atan=at,a.atanh=ot,a.atan2=st,a.cbrt=lt,a.ceil=dt,a.clamp=ct,a.cos=pt,a.cosh=gt,a.div=ft,a.exp=ut,a.floor=mt,a.hypot=bt,a.ln=vt,a.log=wt,a.log10=xt,a.log2=Lt,a.max=kt,a.min=Tt,a.mod=Ct,a.mul=_t,a.pow=St,a.random=Mt,a.round=zt,a.sign=jt,a.sin=Nt,a.sinh=Dt,a.sqrt=$t,a.sub=Ot,a.sum=It,a.tan=Bt,a.tanh=Et,a.trunc=Pt,void 0===e&&(e={}),e&&!0!==e.defaults)for(r=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],i=0;i<r.length;)e.hasOwnProperty(n=r[i++])||(e[n]=this[n]);return a.config(e),a}(c)).prototype.constructor=e,e.default=e.Decimal=e,l=new e(l),d=new e(d),oe.exports?("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator&&(S[Symbol.for("nodejs.util.inspect.custom")]=S.toString,S[Symbol.toStringTag]="Decimal"),oe.exports=e):(t||(t="undefined"!=typeof self&&self&&self.self==self?self:window),n=t.Decimal,e.noConflict=function(){return t.Decimal=n,e},t.Decimal=e)}(se);const de=le.exports;var ce;!function(t){t.WON="Won",t.LOST="Lost"}(ce||(ce={}));const he=class{constructor(i){t(this,i),this.logout=e(this,"logout",7),this.ticketTypeMap={NORMAL:"Normal",SYNDICATE:"Syndicate",SUBSCRIPTION:"Subscription"},this.resultMap={[ce.WON]:"Win",[ce.LOST]:"Lose"},this.displayPrizeCategory=t=>{const e=new Map;t.forEach((t=>{let i=t.divisionDisplayName,n=t.currency;if(i&&"None"!==i){const r=new de(t.amount);if(e.has(i)){const t=e.get(i),a=t.amount.plus(r);e.set(i,{amount:a,currency:n,times:t.times+1})}else e.set(i,{amount:r,currency:n,times:1})}}));const i=[];for(let[t,n]of e.entries()){const e=n.amount.times(100).floor().dividedBy(100);i.push({prizeName:t,amount:e.toNumber(),currency:n.currency,times:n.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&&d(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&c(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&d(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&c(this.stylingContainer,this.clientStylingUrl))}async fetchGameData(){var t;try{let t=new URL(`${this.endpoint}/games/${this.gameId}`);const e=await xt(t.href,"GET");this.rawData=e}catch(e){Mt({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 xt(`${this.endpoint}/tickets${function(t){const e={};Object.entries(t).forEach((([t,i])=>{kt(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&&(Mt({message:t.message,theme:"error"}),this.logout.emit())}finally{this.isLoading=!1}}async fetchDrawResult(t,e){try{return await xt(`${this.endpoint}/games/${t}/draws/${e}`,"GET",{})}catch(t){console.log(t)}}getDivision(t,e){var i;let n=t.division,r=null===(i=e.prizes)||void 0===i?void 0:i.filter((t=>t.order===n));return r&&r.length?r[0].division:null}async getDrawResult(){const t=new Map;this.ticketHistory.forEach(((e,i)=>{e.drawResults.forEach(((n,r)=>{const a=`${n.drawId}-${e.gameId}`;t.has(a)?t.get(a).indices.push({ticketIndex:i,drawIndex:r}):t.set(a,{drawId:n.drawId,gameId:e.gameId,indices:[{ticketIndex:i,drawIndex:r}]})}))}));let e=[...this.ticketHistory];await Promise.all(Array.from(t.values()).map((async({gameId:t,drawId:i,indices:n})=>{try{const r=await this.fetchDrawResult(t,i);r&&n.forEach((({ticketIndex:t,drawIndex:i})=>{const n=Object.assign(Object.assign({},e[t].drawResults[i]),{tempDrawData:Object.assign(Object.assign({},r),{vendorGameId:e[t].vendorGameId}),prizeDetails:this.displayPrizeCategory(e[t].drawResults[i].details)}),a=[...e[t].drawResults];a[i]=n,e[t]=Object.assign(Object.assign({},e[t]),{drawResults:a})}))}catch(e){console.error(`failed to fetch draw result (gameId: ${t}, drawId: ${i}):`,e)}}))),this.ticketHistory=e}componentWillLoad(){this.translationUrl&&at(JSON.parse(this.translationUrl)),this.statusOptions=[{label:rt("settled",this.language),value:"Settled"},{label:rt("purchased",this.language),value:"Purchased"},{label:rt("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]=[_t(t.poolGameOutcomes)]})),this.curDrawSelection=this.curDrawSelectionMap[this.curDrawSelectionBettingType]}parseSelection(){const t=[];return this.curTicketItem.selection.forEach(((e,i)=>{t[i]=_t(e.poolGameSelections)})),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 n=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!=n?n:t}render(){return i("div",{key:"b02e16006ef81857aca03cf33faad9bac810ba43",class:"lottery-tipping-ticket-history",ref:t=>this.stylingContainer=t},i("div",{key:"2b706639cc4dd178079435fbc5104e5b1c958192",class:"ticket-history-title"},rt("ticketsHistory",this.language)),i("div",{key:"aff2bd75b280e67fe1e5be5703658006f6864d9a",class:"filter-wrap"},i("div",{key:"73706288e67206eb5b4a4c17f0511f3f9b7c8f47",class:"filter-status"},this.statusOptions.map((t=>i("div",{class:"filter-status-btn"+(this.activeStatus==t.value?" active":""),onClick:()=>this.changeStatus(t.value)},t.label)))),i("div",{key:"109ba27a6c3ec93b51afc9d2e580c93f36ca300f",class:"filter-operation"},i("lottery-tipping-filter",{key:"794dd4052e54e2ced8fa930569332187da08850f","quick-filters-active":this.quickFiltersActive,language:this.language,"translation-url":this.translationUrl}))),this.isLoading&&i("div",{key:"abf12999f0113eafbf3d9f1966d64c5a386fbdd0",class:"loading-wrap"},i("section",{key:"c630b5a0669002fd3a59c5203ec2c7f26ef414ae",class:"dots-container"},i("div",{key:"5b56f0c9eb26ca5ea7cbf3cb6404b5651a445f57",class:"dot"}),i("div",{key:"38181cef9fa97c878c2be843b0190cbebf4c357e",class:"dot"}),i("div",{key:"aa1d884538b858c7cf63b86a249fa4a7ebfedbfc",class:"dot"}),i("div",{key:"b05c4e61eae3febab733a21dbc233a2e504cd06f",class:"dot"}),i("div",{key:"fa35a7a561e9dcee914918d310684c4dfccbb2c3",class:"dot"}))),!this.isLoading&&this.paginationInfo.total>0&&i("div",{key:"ed4c56668d6c35d1dfeae31b00d477e2385d09cd",class:"ticket-list-wrap"},this.ticketHistory.map((t=>i("lottery-tipping-panel",{"header-title":b(new Date(t.createdAt),"dd/MM/yyyy HH:mm:ss")+" "+t.state},i("div",{class:"panel-content",slot:"content"},i("div",{class:"ticket-info"},i("div",{class:"ticket-info-item"},i("div",{class:"ticket-info-label"},rt("ticketId",this.language)),i("div",{class:"ticket-info-val"},t.id," ")),i("div",{class:"ticket-info-item"},i("div",{class:"ticket-info-label"},rt("ticketType",this.language)),i("div",{class:"ticket-info-val"},this.ticketTypeMap[t.wagerType]," ")),i("div",{class:"ticket-info-item"},i("div",{class:"ticket-info-label"},rt("ticketAmount",this.language)),i("div",{class:"ticket-info-val"},`${t.amount} ${t.currency}`)),i("div",{class:"ticket-info-item"},i("div",{class:"ticket-info-label"},rt("lineDetail",this.language)),i("div",{class:"ticket-info-val"},i("span",{class:"show-detail-link",onClick:()=>this.handleShowTicketLineDetial(t)},rt("seeDetails",this.language)))),i("div",{class:"ticket-info-item"},i("div",{class:"ticket-info-label"},rt("numberOfDraw",this.language)),i("div",{class:"ticket-info-val"},t.drawCount))),"Settled"==t.state&&t.drawResults.map((t=>i("div",{class:"draw-info-container"},t.tempDrawData?i("div",{class:"draw-info"},i("div",{class:"draw-info-item"},i("div",{class:"draw-info-label"},rt("ticketResult",this.language)),i("div",{class:"draw-info-val"},this.resultMap[t.state])),i("div",{class:"draw-info-item"},i("div",{class:"draw-info-label"},rt("drawId",this.language)),i("div",{class:"draw-info-val"},t.drawId)),i("div",{class:"draw-info-item"},i("div",{class:"draw-info-label"},rt("drawDate",this.language)),i("div",{class:"draw-info-val"},b(new Date(t.tempDrawData.date),"dd/MM/yyyy"))),i("div",{class:"draw-info-item"},i("div",{class:"draw-info-label"},rt("result",this.language)),i("div",{class:"draw-info-val"},i("span",{class:"show-detail-link",onClick:()=>this.handleShowCurrentDraw(t.tempDrawData)},rt("seeDetails",this.language)))),t.state===ce.WON&&i("div",{class:"draw-info-item"},i("div",{class:"draw-info-label"},rt("prize",this.language)),i("div",{class:"draw-info-val1"},i("div",{style:{height:"20px"}}),t.prizeDetails.map((t=>i("span",null,i("div",null,i("span",{style:{color:"rgb(85, 85, 85)"}},t.prizeName,t.times>1?" x "+t.times:"",":"," "),i("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)),i("span",{style:{color:"rgb(85, 85, 85)"}},t.currency)))))))):i("div",{class:"draw-info-skeleton"},[...Array(5)].map((()=>i("div",{class:"skeleton-line"})))))))))))),!this.isLoading&&0===this.paginationInfo.total&&i("div",{key:"cfc0d7ac1b6c9889a1c506c4c4c619edd090ed00",class:"empty-wrap"},rt("noData",this.language)),i("lottery-tipping-dialog",{key:"a14a317cffd4610bcbff55921e269c745126d022",visible:this.showCurrentTicketLine,width:St(window.navigator.userAgent)?void 0:"720px",fullscreen:St(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&&i("div",{key:"9d4a8cbb7ae6ef0fcb4fbcbe319536af5f2f0d61"},i("div",{key:"e2be8d66a0b0c8685f2f4c25a4c1a636559a173b",class:"betting-type"},i("div",{key:"55679755750f29adbda546b4fee562738dcad2ea",class:"betting-type-title"},rt("bettingType",this.language)),i("div",{key:"6c2515cc5d387b1536725def1327de0c2663e533",class:"betting-type-text"},this.getBettingTypeName(this.getBettingType(this.curTicketItem.selection[this.curSelectionIdx].betType)))),i("lottery-tipping-ticket-bet",{key:"cc1b2ad744b29b0cae220fec69da53ded46c953e",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}))),i("lottery-tipping-dialog",{key:"575831b309b2c3b43e813483e9064803cdbc0463",visible:this.showCurrentDrawResult,width:St(window.navigator.userAgent)?void 0:"720px",fullscreen:St(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&&i("div",{key:"cdf73ca5a7263941b935525f18fd39b1d6034d49"},i("div",{key:"ac5cd287a42677779903b6ead9c73848a150cd26",class:"betting-type"},i("div",{key:"86310f6933002c9af336a712d2f29af258e88181",class:"betting-type-title"},rt("bettingType",this.language)),i("div",{key:"6c13ff903cbcb05c51c57a2691ac9b8658131221",class:"betting-type-text"},i("div",{key:"826113f7035e8ef5561bf7aea1e55b021eb316ae",class:"LotteryTippingTicketController__segmented-control"},Object.keys(this.curDrawSelectionMap).map((t=>i("button",{class:{LotteryTippingTicketController__segment:!0,"LotteryTippingTicketController__segment--active":this.curDrawSelectionBettingType===t},onClick:()=>this.handleDrawBettingTypeChange(t)},this.getBettingTypeName(t))))))),i("lottery-tipping-ticket-bet",{key:"367642bb4fc8ad2c00a3b796d5a1feda6435e0d6",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}))),i("div",{key:"886648a3e69f2508c1296dde6ce36e5b33190a8b",class:"pagination-wrap"},i("lottery-tipping-pagination",{key:"91141bf75596923734a49f9550cb9abed9846917",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"]}}};he.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)}";const pe=class{constructor(e){t(this,e),this.stylingValue={width:this.handleStylingProps(this.width),height:this.handleStylingProps(this.height),borderRadius:this.handleStylingProps(this.borderRadius),marginBottom:this.handleStylingProps(this.marginBottom),marginTop:this.handleStylingProps(this.marginTop),marginLeft:this.handleStylingProps(this.marginLeft),marginRight:this.handleStylingProps(this.marginRight),size:this.handleStylingProps(this.size)},this.structure=void 0,this.width="unset",this.height="unset",this.borderRadius="unset",this.marginBottom="unset",this.marginTop="unset",this.marginLeft="unset",this.marginRight="unset",this.animation=!0,this.rows=0,this.size="100%"}handleStructureChange(t,e){e!==t&&this.handleStructure(t)}handleStylingProps(t){switch(typeof t){case"number":return 0===t?0:`${t}px`;case"undefined":default:return"unset";case"string":return["auto","unset","none","inherit","initial"].includes(t)||t.endsWith("px")||t.endsWith("%")?t:"unset"}}handleStructure(t){switch(t){case"logo":return this.renderLogo();case"image":return this.renderImage();case"title":return this.renderTitle();case"text":return this.renderText();case"rectangle":return this.renderRectangle();case"circle":return this.renderCircle();default:return null}}renderLogo(){return i("div",{class:"SkeletonContainer"},i("div",{class:"SkeletonLogo "+(this.animation?"Skeleton":"")}))}renderImage(){return i("div",{class:"SkeletonImage "+(this.animation?"Skeleton":"")})}renderTitle(){return i("div",{class:"SkeletonContainer"},i("div",{class:"SkeletonTitle "+(this.animation?"Skeleton":"")}))}renderText(){return i("div",{class:"SkeletonContainer"},Array.from({length:this.rows>0?this.rows:1}).map(((t,e)=>i("div",{key:e,class:"SkeletonText "+(this.animation?"Skeleton":"")}))))}renderRectangle(){return i("div",{class:"SkeletonContainer"},i("div",{class:"SkeletonRectangle "+(this.animation?"Skeleton":"")}))}renderCircle(){return i("div",{class:"SkeletonContainer"},i("div",{class:"SkeletonCircle "+(this.animation?"Skeleton":"")}))}render(){let t="";switch(this.structure){case"logo":t=`\n :host {\n --emw-skeleton-logo-width: ${this.stylingValue.width};\n --emw-skeleton-logo-height: ${this.stylingValue.height};\n --emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"image":t=`\n :host {\n --emw-skeleton-image-width: ${this.stylingValue.width};\n --emw-skeleton-image-height: ${this.stylingValue.height};\n --emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"title":t=`\n :host {\n --emw-skeleton-title-width: ${this.stylingValue.width};\n --emw-skeleton-title-height: ${this.stylingValue.height};\n --emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"text":t=`\n :host {\n --emw-skeleton-text-width: ${this.stylingValue.width};\n --emw-skeleton-text-height: ${this.stylingValue.height};\n --emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"rectangle":t=`\n :host {\n --emw-skeleton-rectangle-width: ${this.stylingValue.width};\n --emw-skeleton-rectangle-height: ${this.stylingValue.height};\n --emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"circle":t=`\n :host {\n --emw-skeleton-circle-size: ${this.stylingValue.size};\n }\n `;break;default:t=""}return i(a,{key:"c2a2650acd416962a2bc4e1a7ee18bc6d8e2def8"},i("style",{key:"9bd7fc1f9e9ed9f17735a7b72fce6f09696f5e19"},t),this.handleStructure(this.structure))}static get watchers(){return{structure:["handleStructureChange"]}}};pe.style=":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.SkeletonRectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.SkeletonCircle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.SkeletonText{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.SkeletonText:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.SkeletonTitle{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.SkeletonImage{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.SkeletonLogo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}";export{T as draw_selection,C as general_multi_select,_ as general_tooltip,$ as lottery_banner,B as lottery_button,E as lottery_tipping_bullet,P as lottery_tipping_bullet_group,K as lottery_tipping_calendar,et as lottery_tipping_dialog,ot as lottery_tipping_filter,mt as lottery_tipping_latest_result,Lt as lottery_tipping_page,zt as lottery_tipping_pagination,Nt as lottery_tipping_panel,Gt as lottery_tipping_ticket_bet,ae as lottery_tipping_ticket_controller,he as lottery_tipping_ticket_history,pe as ui_skeleton}
|