@everymatrix/lottery-tipping-ticket-controller 1.87.28 → 1.87.30

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.
Files changed (30) hide show
  1. package/dist/cjs/general-tooltip_7.cjs.entry.js +379 -117
  2. package/dist/cjs/index.cjs.js +1 -1
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/{lottery-tipping-ticket-controller-38883843.js → lottery-tipping-ticket-controller-90ba14f0.js} +45 -15
  5. package/dist/cjs/lottery-tipping-ticket-controller.cjs.js +1 -1
  6. package/dist/collection/collection-manifest.json +7 -2
  7. package/dist/collection/components/lottery-tipping-ticket-controller/lottery-tipping-ticket-controller.js +13 -12
  8. package/dist/collection/models/index.js +10 -0
  9. package/dist/collection/utils/api.js +11 -1
  10. package/dist/collection/utils/locale.utils.js +1 -1
  11. package/dist/collection/utils/utils.js +14 -0
  12. package/dist/esm/general-tooltip_7.entry.js +380 -118
  13. package/dist/esm/index.js +1 -1
  14. package/dist/esm/loader.js +1 -1
  15. package/dist/esm/{lottery-tipping-ticket-controller-7714da55.js → lottery-tipping-ticket-controller-f46b8ced.js} +46 -14
  16. package/dist/esm/lottery-tipping-ticket-controller.js +1 -1
  17. package/dist/lottery-tipping-ticket-controller/general-tooltip_7.entry.js +1 -1
  18. package/dist/lottery-tipping-ticket-controller/index.esm.js +1 -1
  19. package/dist/lottery-tipping-ticket-controller/{lottery-tipping-ticket-controller-7714da55.js → lottery-tipping-ticket-controller-f46b8ced.js} +1 -1
  20. package/dist/lottery-tipping-ticket-controller/lottery-tipping-ticket-controller.esm.js +1 -1
  21. package/dist/types/components/lottery-tipping-ticket-controller/lottery-tipping-ticket-controller.d.ts +3 -1
  22. package/dist/types/components.d.ts +0 -55
  23. package/dist/types/models/index.d.ts +181 -0
  24. package/dist/types/utils/utils.d.ts +2 -0
  25. package/package.json +1 -1
  26. package/dist/collection/components/lottery-tipping-ticket-banner/locale.utils.js +0 -36
  27. package/dist/collection/components/lottery-tipping-ticket-banner/lottery-tipping-ticket-banner.css +0 -73
  28. package/dist/collection/components/lottery-tipping-ticket-banner/lottery-tipping-ticket-banner.js +0 -259
  29. package/dist/types/components/lottery-tipping-ticket-banner/locale.utils.d.ts +0 -2
  30. package/dist/types/components/lottery-tipping-ticket-banner/lottery-tipping-ticket-banner.d.ts +0 -28
@@ -6654,4 +6654,4 @@ Nt("vaadin-tabs",_`
6654
6654
  </div>
6655
6655
 
6656
6656
  <div on-click="_scrollForward" part="forward-button" aria-hidden="true"></div>
6657
- `}static get is(){return"vaadin-tabs"}}m(pl);const ml="__WIDGET_GLOBAL_STYLE_CACHE__";function vl(t,e){if(t){const i=document.createElement("style");i.innerHTML=e,t.appendChild(i)}}function fl(t,e){if(!t||!e)return;const i=new URL(e);fetch(i.href).then((t=>t.text())).then((e=>{const i=document.createElement("style");i.innerHTML=e,t&&t.appendChild(i)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function gl(t,e,i,o=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!o)return i=function(t,e){const i=document.createElement("style");return window.emMessageBus.subscribe(e,(e=>{t&&(i.innerHTML=e,t.appendChild(i))}))}(t,e),i;window[ml]||(window[ml]={}),i=function(t,e){return window.emMessageBus.subscribe(e,(i=>{if(!t)return;const o=t.getRootNode(),s=window[ml];let r=s[e]?.sheet;r?s[e].refCount=s[e].refCount+1:(r=new CSSStyleSheet,r.replaceSync(i),s[e]={sheet:r,refCount:1});const n=o.adoptedStyleSheets||[];n.includes(r)||(o.adoptedStyleSheets=[...n,r])}))}(t,e);const s=i.unsubscribe.bind(i);return i.unsubscribe=()=>{if(window[ml][e]){const t=window[ml][e];t.refCount>1?t.refCount=t.refCount-1:delete window[ml][e]}s()},i}var bl,yl;!function(t){t.SingleBet="SingleBet",t.SystemBet="SystemBet"}(bl||(bl={})),function(t){t.FullTime="FullTime",t.HalfTime="HalfTime",t.Both="Both"}(yl||(yl={}));const wl=["ro","en","fr","ar","hr"],_l={en:{stop:"Stop",at:"at",turnover:"Turnover: ",selectionCleared:"Your selection will be cleared.",ticketSubmitted:"Ticket submitted successfully.",ticketFailed:"Failed to purchase the ticket. Please try again.",lines:"Lines",line:"Line",bettingType:"Betting Type",playingMode:"Playing Mode",orderSummaryTitle:"Order Summary",orderSummaryTickets:"Tickets",orderSummaryTotal:"Total",orderSummarySubmit:"Submit",cancel:"Cancel",confirm:"Confirm",stakePerLine:"Stake per Line:"},ro:{selectionCleared:"Selecția dvs. va fi ștearsă.",ticketSubmitted:"Bilet trimis cu succes.",ticketFailed:"Nu s-a putut achiziționa biletul. Vă rugăm să încercați din nou.",lines:"Linii",line:"Linie",bettingType:"Tip de pariu",playingMode:"Mod de joc",orderSummaryTitle:"Sumar comandă",orderSummaryTickets:"Bilete",orderSummaryTotal:"Total",orderSummarySubmit:"Trimite",cancel:"Anulează",confirm:"Confirmă"},fr:{selectionCleared:"Votre sélection sera effacée.",ticketSubmitted:"Billet soumis avec succès.",ticketFailed:"Échec de l'achat du billet. Veuillez réessayer.",lines:"Lignes",line:"Ligne",bettingType:"Type de pari",playingMode:"Mode de jeu",orderSummaryTitle:"Résumé de la commande",orderSummaryTickets:"Billets",orderSummaryTotal:"Total",orderSummarySubmit:"Soumettre",cancel:"Annuler",confirm:"Confirmer"},ar:{selectionCleared:"سيتم مسح اختيارك.",ticketSubmitted:"تم إرسال التذكرة بنجاح.",ticketFailed:"فشل شراء التذكرة. يرجى المحاولة مرة أخرى.",lines:"خطوط",line:"خط",bettingType:"نوع الرهان",playingMode:"وضع اللعب",orderSummaryTitle:"ملخص الطلب",orderSummaryTickets:"التذاكر",orderSummaryTotal:"المجموع",orderSummarySubmit:"إرسال",cancel:"إلغاء",confirm:"تأكيد"},hr:{selectionCleared:"Vaš odabir bit će obrisan.",ticketSubmitted:"Listić je uspješno predan.",ticketFailed:"Kupnja listića nije uspjela. Molimo pokušajte ponovo.",lines:"Linije",line:"Linija",bettingType:"Vrsta oklade",playingMode:"Način igranja",orderSummaryTitle:"Sažetak narudžbe",orderSummaryTickets:"Listići",orderSummaryTotal:"Ukupno",orderSummarySubmit:"Pošalji",cancel:"Odustani",confirm:"Potvrdi"}},xl=(t,e)=>{const i=e;return _l[void 0!==i&&wl.includes(i)?i:"en"][t]},kl=async t=>{if(t)try{const i=await fetch(t);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const o=await i.json();e=o,Object.keys(e).forEach((t=>{for(let i in e[t])_l[t][i]=e[t][i]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e};function Cl(t){return Cl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cl(t)}function Sl(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function Al(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function Tl(t){Al(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===Cl(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}var zl={};function Il(){return zl}var Dl=36e5;function El(t){Al(1,arguments);var e=Tl(t),i=e.getUTCDay(),o=(i<1?7:0)+i-1;return e.setUTCDate(e.getUTCDate()-o),e.setUTCHours(0,0,0,0),e}function Ml(t){Al(1,arguments);var e=Tl(t),i=e.getUTCFullYear(),o=new Date(0);o.setUTCFullYear(i+1,0,4),o.setUTCHours(0,0,0,0);var s=El(o),r=new Date(0);r.setUTCFullYear(i,0,4),r.setUTCHours(0,0,0,0);var n=El(r);return e.getTime()>=s.getTime()?i+1:e.getTime()>=n.getTime()?i:i-1}function Pl(t,e){var i,o,s,r,n,a,l,h;Al(1,arguments);var d=Il(),c=Sl(null!==(i=null!==(o=null!==(s=null!==(r=null==e?void 0:e.weekStartsOn)&&void 0!==r?r:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.weekStartsOn)&&void 0!==s?s:d.weekStartsOn)&&void 0!==o?o:null===(l=d.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==i?i:0);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var u=Tl(t),p=u.getUTCDay(),m=(p<c?7:0)+p-c;return u.setUTCDate(u.getUTCDate()-m),u.setUTCHours(0,0,0,0),u}function Ol(t,e){var i,o,s,r,n,a,l,h;Al(1,arguments);var d=Tl(t),c=d.getUTCFullYear(),u=Il(),p=Sl(null!==(i=null!==(o=null!==(s=null!==(r=null==e?void 0:e.firstWeekContainsDate)&&void 0!==r?r:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==s?s:u.firstWeekContainsDate)&&void 0!==o?o:null===(l=u.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=new Date(0);m.setUTCFullYear(c+1,0,p),m.setUTCHours(0,0,0,0);var v=Pl(m,e),f=new Date(0);f.setUTCFullYear(c,0,p),f.setUTCHours(0,0,0,0);var g=Pl(f,e);return d.getTime()>=v.getTime()?c+1:d.getTime()>=g.getTime()?c:c-1}function Nl(t,e){for(var i=t<0?"-":"",o=Math.abs(t).toString();o.length<e;)o="0"+o;return i+o}const Bl=function(t,e){var i=t.getUTCFullYear(),o=i>0?i:1-i;return Nl("yy"===e?o%100:o,e.length)},jl=function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):Nl(i+1,2)},Ll=function(t,e){return Nl(t.getUTCDate(),e.length)},Fl=function(t,e){return Nl(t.getUTCHours()%12||12,e.length)},$l=function(t,e){return Nl(t.getUTCHours(),e.length)},Rl=function(t,e){return Nl(t.getUTCMinutes(),e.length)},Vl=function(t,e){return Nl(t.getUTCSeconds(),e.length)},ql=function(t,e){var i=e.length,o=t.getUTCMilliseconds();return Nl(Math.floor(o*Math.pow(10,i-3)),e.length)};var Wl={G:function(t,e,i){var o=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(o,{width:"abbreviated"});case"GGGGG":return i.era(o,{width:"narrow"});default:return i.era(o,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var o=t.getUTCFullYear();return i.ordinalNumber(o>0?o:1-o,{unit:"year"})}return Bl(t,e)},Y:function(t,e,i,o){var s=Ol(t,o),r=s>0?s:1-s;return"YY"===e?Nl(r%100,2):"Yo"===e?i.ordinalNumber(r,{unit:"year"}):Nl(r,e.length)},R:function(t,e){return Nl(Ml(t),e.length)},u:function(t,e){return Nl(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var o=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(o);case"QQ":return Nl(o,2);case"Qo":return i.ordinalNumber(o,{unit:"quarter"});case"QQQ":return i.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(o,{width:"narrow",context:"formatting"});default:return i.quarter(o,{width:"wide",context:"formatting"})}},q:function(t,e,i){var o=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(o);case"qq":return Nl(o,2);case"qo":return i.ordinalNumber(o,{unit:"quarter"});case"qqq":return i.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(o,{width:"narrow",context:"standalone"});default:return i.quarter(o,{width:"wide",context:"standalone"})}},M:function(t,e,i){var o=t.getUTCMonth();switch(e){case"M":case"MM":return jl(t,e);case"Mo":return i.ordinalNumber(o+1,{unit:"month"});case"MMM":return i.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(o,{width:"narrow",context:"formatting"});default:return i.month(o,{width:"wide",context:"formatting"})}},L:function(t,e,i){var o=t.getUTCMonth();switch(e){case"L":return String(o+1);case"LL":return Nl(o+1,2);case"Lo":return i.ordinalNumber(o+1,{unit:"month"});case"LLL":return i.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(o,{width:"narrow",context:"standalone"});default:return i.month(o,{width:"wide",context:"standalone"})}},w:function(t,e,i,o){var s=function(t,e){Al(1,arguments);var i=Tl(t),o=Pl(i,e).getTime()-function(t,e){var i,o,s,r,n,a,l,h;Al(1,arguments);var d=Il(),c=Sl(null!==(i=null!==(o=null!==(s=null!==(r=null==e?void 0:e.firstWeekContainsDate)&&void 0!==r?r:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==s?s:d.firstWeekContainsDate)&&void 0!==o?o:null===(l=d.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1),u=Ol(t,e),p=new Date(0);return p.setUTCFullYear(u,0,c),p.setUTCHours(0,0,0,0),Pl(p,e)}(i,e).getTime();return Math.round(o/6048e5)+1}(t,o);return"wo"===e?i.ordinalNumber(s,{unit:"week"}):Nl(s,e.length)},I:function(t,e,i){var o=function(t){Al(1,arguments);var e=Tl(t),i=El(e).getTime()-function(t){Al(1,arguments);var e=Ml(t),i=new Date(0);return i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0),El(i)}(e).getTime();return Math.round(i/6048e5)+1}(t);return"Io"===e?i.ordinalNumber(o,{unit:"week"}):Nl(o,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):Ll(t,e)},D:function(t,e,i){var o=function(t){Al(1,arguments);var e=Tl(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var o=e.getTime();return Math.floor((i-o)/864e5)+1}(t);return"Do"===e?i.ordinalNumber(o,{unit:"dayOfYear"}):Nl(o,e.length)},E:function(t,e,i){var o=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},e:function(t,e,i,o){var s=t.getUTCDay(),r=(s-o.weekStartsOn+8)%7||7;switch(e){case"e":return String(r);case"ee":return Nl(r,2);case"eo":return i.ordinalNumber(r,{unit:"day"});case"eee":return i.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(s,{width:"short",context:"formatting"});default:return i.day(s,{width:"wide",context:"formatting"})}},c:function(t,e,i,o){var s=t.getUTCDay(),r=(s-o.weekStartsOn+8)%7||7;switch(e){case"c":return String(r);case"cc":return Nl(r,e.length);case"co":return i.ordinalNumber(r,{unit:"day"});case"ccc":return i.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(s,{width:"narrow",context:"standalone"});case"cccccc":return i.day(s,{width:"short",context:"standalone"});default:return i.day(s,{width:"wide",context:"standalone"})}},i:function(t,e,i){var o=t.getUTCDay(),s=0===o?7:o;switch(e){case"i":return String(s);case"ii":return Nl(s,e.length);case"io":return i.ordinalNumber(s,{unit:"day"});case"iii":return i.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},a:function(t,e,i){var o=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,e,i){var o,s=t.getUTCHours();switch(o=12===s?"noon":0===s?"midnight":s/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,e,i){var o,s=t.getUTCHours();switch(o=s>=17?"evening":s>=12?"afternoon":s>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var o=t.getUTCHours()%12;return 0===o&&(o=12),i.ordinalNumber(o,{unit:"hour"})}return Fl(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):$l(t,e)},K:function(t,e,i){var o=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(o,{unit:"hour"}):Nl(o,e.length)},k:function(t,e,i){var o=t.getUTCHours();return 0===o&&(o=24),"ko"===e?i.ordinalNumber(o,{unit:"hour"}):Nl(o,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):Rl(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Vl(t,e)},S:function(t,e){return ql(t,e)},X:function(t,e,i,o){var s=(o._originalDate||t).getTimezoneOffset();if(0===s)return"Z";switch(e){case"X":return Hl(s);case"XXXX":case"XX":return Yl(s);default:return Yl(s,":")}},x:function(t,e,i,o){var s=(o._originalDate||t).getTimezoneOffset();switch(e){case"x":return Hl(s);case"xxxx":case"xx":return Yl(s);default:return Yl(s,":")}},O:function(t,e,i,o){var s=(o._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Ul(s,":");default:return"GMT"+Yl(s,":")}},z:function(t,e,i,o){var s=(o._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Ul(s,":");default:return"GMT"+Yl(s,":")}},t:function(t,e,i,o){return Nl(Math.floor((o._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,i,o){return Nl((o._originalDate||t).getTime(),e.length)}};function Ul(t,e){var i=t>0?"-":"+",o=Math.abs(t),s=Math.floor(o/60),r=o%60;if(0===r)return i+String(s);var n=e||"";return i+String(s)+n+Nl(r,2)}function Hl(t,e){return t%60==0?(t>0?"-":"+")+Nl(Math.abs(t)/60,2):Yl(t,e)}function Yl(t,e){var i=e||"",o=t>0?"-":"+",s=Math.abs(t);return o+Nl(Math.floor(s/60),2)+i+Nl(s%60,2)}const Gl=Wl;var Kl=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},Jl=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},Xl={p:Jl,P:function(t,e){var i,o=t.match(/(P+)(p+)?/)||[],s=o[1],r=o[2];if(!r)return Kl(t,e);switch(s){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",Kl(s,e)).replace("{{time}}",Jl(r,e))}};const Zl=Xl;var Ql=["D","DD"],th=["YY","YYYY"];function eh(t,e,i){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var ih={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function oh(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}var sh,rh={date:oh({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:oh({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:oh({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},nh={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function ah(t){return function(e,i){var o;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&t.formattingValues){var s=t.defaultFormattingWidth||t.defaultWidth,r=null!=i&&i.width?String(i.width):s;o=t.formattingValues[r]||t.formattingValues[s]}else{var n=t.defaultWidth,a=null!=i&&i.width?String(i.width):t.defaultWidth;o=t.values[a]||t.values[n]}return o[t.argumentCallback?t.argumentCallback(e):e]}}function lh(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.width,s=e.match(o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth]);if(!s)return null;var r,n=s[0],a=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?function(t){for(var e=0;e<t.length;e++)if(t[e].test(n))return e}(a):function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].test(n))return e}(a);return r=t.valueCallback?t.valueCallback(l):l,{value:r=i.valueCallback?i.valueCallback(r):r,rest:e.slice(n.length)}}}const hh={code:"en-US",formatDistance:function(t,e,i){var o,s=ih[t];return o="string"==typeof s?s:1===e?s.one:s.other.replace("{{count}}",e.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+o:o+" ago":o},formatLong:rh,formatRelative:function(t){return nh[t]},localize:{ordinalNumber:function(t){var e=Number(t),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:ah({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:ah({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:ah({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:ah({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:ah({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(sh={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(sh.matchPattern);if(!i)return null;var o=i[0],s=t.match(sh.parsePattern);if(!s)return null;var r=sh.valueCallback?sh.valueCallback(s[0]):s[0];return{value:r=e.valueCallback?e.valueCallback(r):r,rest:t.slice(o.length)}}),era:lh({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:lh({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:lh({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:lh({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:lh({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};var dh=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ch=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,uh=/^'([^]*?)'?$/,ph=/''/g,mh=/[a-zA-Z]/;function vh(t,e,i){var o,s,r,n,a,l,h,d,c,u,p,m,v,f,g,b,y,w;Al(2,arguments);var _=String(e),x=Il(),k=null!==(o=null!==(s=null==i?void 0:i.locale)&&void 0!==s?s:x.locale)&&void 0!==o?o:hh,C=Sl(null!==(r=null!==(n=null!==(a=null!==(l=null==i?void 0:i.firstWeekContainsDate)&&void 0!==l?l:null==i||null===(h=i.locale)||void 0===h||null===(d=h.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==a?a:x.firstWeekContainsDate)&&void 0!==n?n:null===(c=x.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==r?r:1);if(!(C>=1&&C<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var S=Sl(null!==(p=null!==(m=null!==(v=null!==(f=null==i?void 0:i.weekStartsOn)&&void 0!==f?f:null==i||null===(g=i.locale)||void 0===g||null===(b=g.options)||void 0===b?void 0:b.weekStartsOn)&&void 0!==v?v:x.weekStartsOn)&&void 0!==m?m:null===(y=x.locale)||void 0===y||null===(w=y.options)||void 0===w?void 0:w.weekStartsOn)&&void 0!==p?p:0);if(!(S>=0&&S<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!k.localize)throw new RangeError("locale must contain localize property");if(!k.formatLong)throw new RangeError("locale must contain formatLong property");var A=Tl(t);if(!function(t){if(Al(1,arguments),!function(t){return Al(1,arguments),t instanceof Date||"object"===Cl(t)&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t)return!1;var e=Tl(t);return!isNaN(Number(e))}(A))throw new RangeError("Invalid time value");var T=function(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}(A),z=function(t,e){return Al(2,arguments),function(t,e){Al(2,arguments);var i=Tl(t).getTime(),o=Sl(e);return new Date(i+o)}(t,-Sl(e))}(A,T),I={firstWeekContainsDate:C,weekStartsOn:S,locale:k,_originalDate:A};return _.match(ch).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,Zl[e])(t,k.formatLong):t})).join("").match(dh).map((function(o){if("''"===o)return"'";var s,r,n=o[0];if("'"===n)return(r=(s=o).match(uh))?r[1].replace(ph,"'"):s;var a=Gl[n];if(a)return null!=i&&i.useAdditionalWeekYearTokens||-1===th.indexOf(o)||eh(o,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!(-1!==Ql.indexOf(o))||eh(o,e,String(t)),a(z,o,k.localize,I);if(n.match(mh))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");return o})).join("")}function fh(t,e){var i;Al(1,arguments);var o=Sl(null!==(i=null==e?void 0:e.additionalDigits)&&void 0!==i?i:2);if(2!==o&&1!==o&&0!==o)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!=typeof t&&"[object String]"!==Object.prototype.toString.call(t))return new Date(NaN);var s,r=function(t){var e,i={},o=t.split(gh.dateTimeDelimiter);if(o.length>2)return i;if(/:/.test(o[0])?e=o[0]:(i.date=o[0],e=o[1],gh.timeZoneDelimiter.test(i.date)&&(i.date=t.split(gh.timeZoneDelimiter)[0],e=t.substr(i.date.length,t.length))),e){var s=gh.timezone.exec(e);s?(i.time=e.replace(s[1],""),i.timezone=s[1]):i.time=e}return i}(t);if(r.date){var n=function(t,e){var i=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),o=t.match(i);if(!o)return{year:NaN,restDateString:""};var s=o[1]?parseInt(o[1]):null,r=o[2]?parseInt(o[2]):null;return{year:null===r?s:100*r,restDateString:t.slice((o[1]||o[2]).length)}}(r.date,o);s=function(t,e){if(null===e)return new Date(NaN);var i=t.match(bh);if(!i)return new Date(NaN);var o=!!i[4],s=_h(i[1]),r=_h(i[2])-1,n=_h(i[3]),a=_h(i[4]),l=_h(i[5])-1;if(o)return function(t,e,i){return e>=1&&e<=53&&i>=0&&i<=6}(0,a,l)?function(t,e,i){var o=new Date(0);o.setUTCFullYear(t,0,4);var s=7*(e-1)+i+1-(o.getUTCDay()||7);return o.setUTCDate(o.getUTCDate()+s),o}(e,a,l):new Date(NaN);var h=new Date(0);return function(t,e,i){return e>=0&&e<=11&&i>=1&&i<=(kh[e]||(Ch(t)?29:28))}(e,r,n)&&function(t,e){return e>=1&&e<=(Ch(t)?366:365)}(e,s)?(h.setUTCFullYear(e,r,Math.max(s,n)),h):new Date(NaN)}(n.restDateString,n.year)}if(!s||isNaN(s.getTime()))return new Date(NaN);var a,l=s.getTime(),h=0;if(r.time&&(h=function(t){var e=t.match(yh);if(!e)return NaN;var i=xh(e[1]),o=xh(e[2]),s=xh(e[3]);return function(t,e,i){return 24===t?0===e&&0===i:i>=0&&i<60&&e>=0&&e<60&&t>=0&&t<25}(i,o,s)?i*Dl+6e4*o+1e3*s:NaN}(r.time),isNaN(h)))return new Date(NaN);if(!r.timezone){var d=new Date(l+h),c=new Date(0);return c.setFullYear(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()),c.setHours(d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()),c}return a=function(t){if("Z"===t)return 0;var e=t.match(wh);if(!e)return 0;var i="+"===e[1]?-1:1,o=parseInt(e[2]),s=e[3]&&parseInt(e[3])||0;return function(t,e){return e>=0&&e<=59}(0,s)?i*(o*Dl+6e4*s):NaN}(r.timezone),isNaN(a)?new Date(NaN):new Date(l+h+a)}var gh={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},bh=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,yh=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,wh=/^([+-])(\d{2})(?::?(\d{2}))?$/;function _h(t){return t?parseInt(t):1}function xh(t){return t&&parseFloat(t.replace(",","."))||0}var kh=[31,null,31,30,31,30,31,31,30,31,30,31];function Ch(t){return t%400==0||t%4==0&&t%100!=0}const Sh=({date:t,type:e="date",format:i})=>{try{const o=fh(t);if(isNaN(o.getTime()))throw new Error(`Invalid date: ${t}`);if(i)return vh(o,i);let s="dd/MM/yyyy";return"time"===e?s="dd/MM/yyyy HH:mm:ss":"week"===e&&(s="ccc dd/MM/yyyy HH:mm:ss"),vh(o,s)}catch(t){return console.error("Error formatting date:",t.message),""}};function Ah(t,e="GET",i=null,o={}){return new Promise(((s,r)=>{const n="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})),a=Object.assign({"Content-Type":"application/json"},o);"GET"!==e&&"HEAD"!==e&&(a["X-Idempotency-Key"]=n);const l={method:e,headers:a};i&&"GET"!==e&&"HEAD"!==e&&(l.body=JSON.stringify(i)),fetch(t,l).then((t=>{if(!t.ok)throw new Error(`HTTP error! Status: ${t.status}`);return t.json()})).then((t=>s(t))).catch((t=>r(t)))}))}const Th=({message:t,theme:e="success"})=>{window.postMessage({type:"ShowNotificationToast",message:t,theme:e})},zh=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(".")},Ih=["H","D","A"],Dh=(t=[])=>t.filter((t=>t.enabled)),Eh=({rawData:t,selectedBettingType:e,selectedPlayingMode:i})=>{var o,s,r,n,a,l;const h=null===(n=null===(r=null===(s=null===(o=null==t?void 0:t.rules)||void 0===o?void 0:o.poolGame)||void 0===s?void 0:s.playTypes)||void 0===r?void 0:r.find((t=>t.bettingType===e&&t.playMode===i)))||void 0===n?void 0:n.betTypeId,d=null===(l=null===(a=null==t?void 0:t.rules)||void 0===a?void 0:a.betTypes)||void 0===l?void 0:l.find((t=>t.id===h));return{betTypeId:h,betType:d}},Mh="TICKET_INVALID_TOKEN",Ph=class{constructor(i){t(this,i),this.logoutEventHandler=e(this,"logout",7),this.bothBettingTypeMultiplier=2,this.onStakeChange=t=>{this.currentStake=this.getCurrentStakeByValue(t.detail.value)},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.logoUrl=void 0,this.endpoint="",this.sessionId=void 0,this.gameId=void 0,this.playerId="",this.drawId=void 0,this.isLoading=!0,this.bettingTypeOptions=[],this.playingModeOptions=[],this.selectedBettingType=void 0,this.selectedPlayingMode=void 0,this.hasSelectBullet=void 0,this.hasSelectAllBullet=void 0,this.totalLineCombination=0,this.submitLoading=void 0,this.rawData={},this.saleStatisticsInfo={},this.currentStake=void 0,this.dialogConfig={visible:!1}}async getLotteryTippingBulletResults(){return await this.childRef.getData()}get lineNumberRange(){const{betType:t}=Eh({rawData:this.rawData,selectedBettingType:this.selectedBettingType,selectedPlayingMode:this.selectedPlayingMode}),e=(null==t?void 0:t.boardsAllowed)||[0],[i,o]=[Math.min(...e),Math.max(...e)];return{minLineNumber:i,maxLineNumber:o,defaultBoards:(null==t?void 0:t.defaultBoards)||i}}get playTypeConfig(){var t,e,i;return null===(i=null===(e=null===(t=this.rawData)||void 0===t?void 0:t.rules)||void 0===e?void 0:e.poolGame)||void 0===i?void 0:i.playTypes}get betTypeConfig(){var t,e;return null===(e=null===(t=this.rawData)||void 0===t?void 0:t.rules)||void 0===e?void 0:e.betTypes}get isBothBettingType(){return this.selectedBettingType===yl.Both}get stakeOptions(){var t,e,i;return null===(i=null===(e=null===(t=this.rawData)||void 0===t?void 0:t.rules)||void 0===e?void 0:e.stakes)||void 0===i?void 0:i.map((t=>{var e;return{value:null===(e=t.value)||void 0===e?void 0:e.toString(),label:t.value,currency:t.currency}}))}getCurrentStakeByValue(t){var e;return null===(e=this.stakeOptions)||void 0===e?void 0:e.find((e=>+e.value==+t))}initiateCurrentStake(){var t,e,i;if(1===(null===(t=this.stakeOptions)||void 0===t?void 0:t.length))this.currentStake=this.stakeOptions[0];else{const t=(i=(null===(e=this.stakeOptions)||void 0===e?void 0:e.map((t=>t.value)))||[]).length?Math.min.apply(null,i):void 0;this.currentStake=this.getCurrentStakeByValue(t)}}handleBettingTypeChange(t){var e,i,o,s;if(t===this.selectedBettingType)return;this.selectedBettingType=t;const r=(({bettingType:t,playTypeConfig:e,betTypeConfig:i,enabledPlayingModeOptions:o})=>{const s=i.filter((t=>t.enabled)).map((t=>t.id)),r=e.filter((t=>s.includes(t.betTypeId))).filter((e=>e.bettingType===t)).map((t=>t.playMode));return o.filter((t=>r.includes(t.code)))})({bettingType:this.selectedBettingType,playTypeConfig:this.playTypeConfig,betTypeConfig:this.betTypeConfig,enabledPlayingModeOptions:Dh((null===(o=null===(i=null===(e=this.rawData)||void 0===e?void 0:e.rules)||void 0===i?void 0:i.poolGame)||void 0===o?void 0:o.playModes)||[])});this.playingModeOptions=r,r.length?r.map((t=>t.code)).includes(this.selectedPlayingMode)||(this.hasSelectBullet=!1,this.handlePlayingModeChange(null===(s=r[0])||void 0===s?void 0:s.code)):this.selectedPlayingMode=void 0,this.clearBulletConfig()}async clearBulletConfig(){return await this.childRef.resetBulletConfig(this.lineNumberRange)}handlePlayingModeChange(t){if(t===this.selectedPlayingMode)return;const e=e=>{this.selectedPlayingMode=t,this.clearBulletConfig().then((()=>{null==e||e()}))};if(this.hasSelectBullet){const t=()=>{this.dialogConfig={visible:!1}},i=()=>{e(t)};this.dialogConfig={visible:!0,content:xl("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 zh(e)+" "+((null===(t=this.currentStake)||void 0===t?void 0:t.currency)||"")}get currentStakeFormatted(){const{value:t="",currency:e=""}=this.currentStake||{};return`${t} ${e}`}bulletBetSelectChecker(){(async()=>{const t=await this.getLotteryTippingBulletResults();this.hasSelectAllBullet=!(({rawResults:t})=>{const e=(({rawResults:t})=>{const e=t=>t.filter((t=>t.isSelected)).length;return t.map((t=>t.length>0?t.map(e):[0]))})({rawResults:t});this.totalLineCombination=e.reduce(((t,e)=>t+this.calculateCombinationInLine(e)),0);const{combinations:i=1,maxCombinations:o=1}=Eh({rawData:this.rawData,selectedBettingType:this.selectedBettingType,selectedPlayingMode:this.selectedPlayingMode}).betType||{};return e.some((t=>{const e=this.calculateCombinationInLine(t);return e<i||e>o}))})({rawResults:t})})()}handleClientStylingChange(t,e){t!=e&&vl(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&fl(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&gl(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentWillLoad(){this.translationUrl&&kl(this.translationUrl)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&gl(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&vl(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&fl(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}connectedCallback(){(()=>{let t=new URL(`${this.endpoint}/games/${this.gameId}`);this.isLoading=!0,Ah(t.href,"GET").then((t=>{var e,i,o,s,r,n,a;this.rawData=t,this.bettingTypeOptions=Dh((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=Dh((null===(s=null===(o=null==t?void 0:t.rules)||void 0===o?void 0:o.poolGame)||void 0===s?void 0:s.playModes)||[]),this.initiateCurrentStake();const{bettingType:l,playMode:h}=(({playTypeConfig:t=[],betTypeConfig:e=[],enabledBettingTypeOptions:i=[],enabledPlayingModeOptions:o=[]})=>{const s=e.filter((t=>t.enabled));for(const e of s){const{bettingType:s,playMode:r}=null==t?void 0:t.find((t=>t.betTypeId===e.id));if(i.map((t=>t.code)).includes(s)&&o.map((t=>t.code)).includes(r))return{bettingType:s,playMode:r}}return{}})({playTypeConfig:null===(n=null===(r=null==t?void 0:t.rules)||void 0===r?void 0:r.poolGame)||void 0===n?void 0:n.playTypes,betTypeConfig:null===(a=null==t?void 0:t.rules)||void 0===a?void 0:a.betTypes,enabledBettingTypeOptions:this.bettingTypeOptions,enabledPlayingModeOptions:this.playingModeOptions});return this.handleBettingTypeChange(l),this.selectedPlayingMode=h,this.updateSaleStatistics()})).catch((t=>{console.error("Error!",t)})).finally((()=>{this.isLoading=!1}))})()}updateSaleStatistics(){var t;return async function({endpoint:t,gameId:e,drawId:i}){try{return await Ah(`${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}=Eh({rawData:this.rawData,selectedBettingType:this.selectedBettingType,selectedPlayingMode:this.selectedPlayingMode}),o=new URL(`${this.endpoint}/tickets`),s=(({playerId:t,rawResults:e,gameId:i,rawData:o,amount:s,currentStake:r,betTypeId:n,betType:a})=>{var l;const h={playerId:t,tickets:[]},d=(t=>{const e=t=>t.map((t=>t.isSelected?1:0)),i=t.map((t=>t.map(e))),o=[];return i.forEach(((t,e)=>{const i=[];t.forEach(((t,e)=>{const o=t.map(((t,e)=>t?Ih[e]:null)).filter(Boolean);i[e]=[o]})),o[e]=i})),o})(e),c=r||{};return h.tickets.push({startingDrawId:null===(l=null==o?void 0:o.currentDraw)||void 0===l?void 0:l.id,amount:s,gameId:i,gameName:o.name,currency:c.currency,selection:d.map((t=>({betType:n,stake:+c.value,poolGameSelections:t,quickPick:!1,betName:a.name}))),multiplier:!1,drawCount:1,quickPick:!1}),h})({playerId:this.playerId,rawResults:t,gameId:this.gameId,rawData:this.rawData,amount:this.calculateTotalAmount().toString(),currentStake:this.currentStake,betTypeId:e,betType:i});this.submitLoading=!0,(({body:t,sessionId:e,url:i})=>{const o={method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${e}`,"X-Idempotency-Key":"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))},body:JSON.stringify(t)};return fetch(i,o).then((t=>{if(401===t.status)throw new Error(Mh);if(t.status>300)throw new Error(t.statusText);return t.json()}))})({body:s,sessionId:this.sessionId,url:o.href}).then((()=>{Th({message:xl("ticketSubmitted",this.language)}),this.clearBulletConfig(),this.updateSaleStatistics()})).catch((t=>{if(t.message===Mh)return this.logoutEventHandler.emit(),void Th({message:Mh,theme:"error"});Th({message:xl("ticketFailed",this.language),theme:"error"})})).finally((()=>{this.submitLoading=!1}))}get lineCountRender(){const t=zh(this.totalLineCombination);let e=xl("lines",this.language);return[0,1].includes(+t)&&(e=xl("line",this.language)),t+" "+e}renderBettingControls(){var t,e;const o=()=>i("div",{class:"skeleton-content"},i("div",{class:"skeleton-item skeleton-animated"})),s=()=>{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"},xl("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)))))():o()),i("div",{class:"LotteryTippingTicketController__section"},i("span",{class:"LotteryTippingTicketController__label"},xl("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)))))():o()),(null===(t=this.stakeOptions)||void 0===t?void 0:t.length)>1&&i("div",{class:"LotteryTippingTicketController__section"},i("span",{class:"LotteryTippingTicketController__label"},xl("stakePerLine",this.language)),s()),(null===(e=this.stakeOptions)||void 0===e?void 0:e.length)>1&&i("div",{class:"LotteryTippingTicketController__section"},i("span",{class:"LotteryTippingTicketController__label"},xl("stakePerLine",this.language)),s())))}renderOrderSummary(){var t;return i("div",{class:"LotteryTippingTicketController__main--right order-summary"},i("h3",{class:"order-summary__title"},xl("orderSummaryTitle",this.language)),i("div",{class:"order-summary__ticket-info"},i("div",{class:"order-summary__ticket"},xl("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"},xl("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),text:xl("orderSummarySubmit",this.language)})))}get formattedTurnover(){var t,e,i;const o=null!==(i=null===(e=null===(t=this.saleStatisticsInfo)||void 0===t?void 0:t.wagerSegment)||void 0===e?void 0:e.totalSalesCrossDraw)&&void 0!==i?i:0;return null==o?"":`€${o?zh(o):0}`}render(){var t,e,o,s,r,n,a;return i("div",{key:"353f56111a3dc6f6e7365d563163a38c850f2e88",class:"lottery-tipping-ticket-controller__container",ref:t=>this.stylingContainer=t},i("lottery-tipping-ticket-banner",{key:"3a2472f0bf9195547f5e4c6c2c0a2362c790aa27","client-styling":this.clientStyling,"client-styling-Url":this.clientStylingUrl,stopTime:null===(e=null===(t=this.rawData)||void 0===t?void 0:t.currentDraw)||void 0===e?void 0:e.wagerCloseTime,period:null===(s=null===(o=this.rawData)||void 0===o?void 0:o.currentDraw)||void 0===s?void 0:s.date,"formatted-turnover":this.formattedTurnover,language:this.language,"translation-url":this.translationUrl,"logo-url":this.logoUrl}),this.renderBettingControls(),i("div",{key:"9d0a9391ccf79351959cc280e3c15efc657a966f",class:"flex flex-wrap LotteryTippingTicketController__main"},i("div",{key:"c61fdb41d41694227971478e193cc5162bff30c3",class:"LotteryTippingTicketController__main--left"},i("lottery-tipping-ticket-bet",{key:"56964177a4366a366279b2ebfff2ee52d1e27de0",ref:t=>this.childRef=t,endpoint:this.endpoint,"session-id":this.sessionId,"game-id":null===(r=this.rawData)||void 0===r?void 0:r.type,"draw-id":this.drawId,language:this.language,"translation-url":this.translationUrl,"max-total-pages":this.lineNumberRange.maxLineNumber,"min-total-pages":this.lineNumberRange.minLineNumber,"total-pages":this.lineNumberRange.defaultBoards,mode:this.selectedPlayingMode===bl.SingleBet?"single":"multi","client-styling":this.clientStyling,"client-styling-Url":this.clientStylingUrl})),this.renderOrderSummary()),this.dialogConfig.visible&&i("vaadin-confirm-dialog",{key:"fe8eb6d26eecee3c6e10b20c4f2ad968f707d51c",rejectButtonVisible:!0,rejectText:xl("cancel",this.language),confirmText:xl("confirm",this.language),opened:null===(n=this.dialogConfig)||void 0===n?void 0:n.visible,onConfirm:this.dialogConfig.onConfirm,onReject:this.dialogConfig.onCancel},null===(a=this.dialogConfig)||void 0===a?void 0:a.content))}static get assetsDirs(){return["../static"]}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};Ph.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}";export{Ph as L,fl as a,gl as b,kl as c,vh as d,Sh as f,fh as p,Al as r,vl as s,Tl as t}
6657
+ `}static get is(){return"vaadin-tabs"}}m(pl);const ml="__WIDGET_GLOBAL_STYLE_CACHE__";function vl(t,e){if(t){const i=document.createElement("style");i.innerHTML=e,t.appendChild(i)}}function fl(t,e){if(!t||!e)return;const i=new URL(e);fetch(i.href).then((t=>t.text())).then((e=>{const i=document.createElement("style");i.innerHTML=e,t&&t.appendChild(i)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function gl(t,e,i,o=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!o)return i=function(t,e){const i=document.createElement("style");return window.emMessageBus.subscribe(e,(e=>{t&&(i.innerHTML=e,t.appendChild(i))}))}(t,e),i;window[ml]||(window[ml]={}),i=function(t,e){return window.emMessageBus.subscribe(e,(i=>{if(!t)return;const o=t.getRootNode(),s=window[ml];let r=s[e]?.sheet;r?s[e].refCount=s[e].refCount+1:(r=new CSSStyleSheet,r.replaceSync(i),s[e]={sheet:r,refCount:1});const n=o.adoptedStyleSheets||[];n.includes(r)||(o.adoptedStyleSheets=[...n,r])}))}(t,e);const s=i.unsubscribe.bind(i);return i.unsubscribe=()=>{if(window[ml][e]){const t=window[ml][e];t.refCount>1?t.refCount=t.refCount-1:delete window[ml][e]}s()},i}var bl,yl,wl,_l;!function(t){t.SingleBet="SingleBet",t.SystemBet="SystemBet"}(bl||(bl={})),function(t){t.FullTime="FullTime",t.HalfTime="HalfTime",t.Both="Both"}(yl||(yl={})),function(t){t.OPEN="OPEN"}(wl||(wl={})),function(t){t.Settled="Settled",t.Purchased="Purchased",t.Canceled="Canceled"}(_l||(_l={}));const xl=["ro","en","fr","ar","hr"],kl={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"}},Cl=(t,e)=>{const i=e;return kl[void 0!==i&&xl.includes(i)?i:"en"][t]};function Sl(t){return Sl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sl(t)}function Al(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function Tl(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function zl(t){Tl(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===Sl(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}var Il={};function Dl(){return Il}var El=6e4,Ml=36e5;function Pl(t){Tl(1,arguments);var e=zl(t),i=e.getUTCDay(),o=(i<1?7:0)+i-1;return e.setUTCDate(e.getUTCDate()-o),e.setUTCHours(0,0,0,0),e}function Ol(t){Tl(1,arguments);var e=zl(t),i=e.getUTCFullYear(),o=new Date(0);o.setUTCFullYear(i+1,0,4),o.setUTCHours(0,0,0,0);var s=Pl(o),r=new Date(0);r.setUTCFullYear(i,0,4),r.setUTCHours(0,0,0,0);var n=Pl(r);return e.getTime()>=s.getTime()?i+1:e.getTime()>=n.getTime()?i:i-1}function Nl(t,e){var i,o,s,r,n,a,l,h;Tl(1,arguments);var d=Dl(),c=Al(null!==(i=null!==(o=null!==(s=null!==(r=null==e?void 0:e.weekStartsOn)&&void 0!==r?r:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.weekStartsOn)&&void 0!==s?s:d.weekStartsOn)&&void 0!==o?o:null===(l=d.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==i?i:0);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var u=zl(t),p=u.getUTCDay(),m=(p<c?7:0)+p-c;return u.setUTCDate(u.getUTCDate()-m),u.setUTCHours(0,0,0,0),u}function Bl(t,e){var i,o,s,r,n,a,l,h;Tl(1,arguments);var d=zl(t),c=d.getUTCFullYear(),u=Dl(),p=Al(null!==(i=null!==(o=null!==(s=null!==(r=null==e?void 0:e.firstWeekContainsDate)&&void 0!==r?r:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==s?s:u.firstWeekContainsDate)&&void 0!==o?o:null===(l=u.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=new Date(0);m.setUTCFullYear(c+1,0,p),m.setUTCHours(0,0,0,0);var v=Nl(m,e),f=new Date(0);f.setUTCFullYear(c,0,p),f.setUTCHours(0,0,0,0);var g=Nl(f,e);return d.getTime()>=v.getTime()?c+1:d.getTime()>=g.getTime()?c:c-1}function jl(t,e){for(var i=t<0?"-":"",o=Math.abs(t).toString();o.length<e;)o="0"+o;return i+o}const Ll=function(t,e){var i=t.getUTCFullYear(),o=i>0?i:1-i;return jl("yy"===e?o%100:o,e.length)},Fl=function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):jl(i+1,2)},$l=function(t,e){return jl(t.getUTCDate(),e.length)},Rl=function(t,e){return jl(t.getUTCHours()%12||12,e.length)},Vl=function(t,e){return jl(t.getUTCHours(),e.length)},ql=function(t,e){return jl(t.getUTCMinutes(),e.length)},Wl=function(t,e){return jl(t.getUTCSeconds(),e.length)},Ul=function(t,e){var i=e.length,o=t.getUTCMilliseconds();return jl(Math.floor(o*Math.pow(10,i-3)),e.length)};var Hl={G:function(t,e,i){var o=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(o,{width:"abbreviated"});case"GGGGG":return i.era(o,{width:"narrow"});default:return i.era(o,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var o=t.getUTCFullYear();return i.ordinalNumber(o>0?o:1-o,{unit:"year"})}return Ll(t,e)},Y:function(t,e,i,o){var s=Bl(t,o),r=s>0?s:1-s;return"YY"===e?jl(r%100,2):"Yo"===e?i.ordinalNumber(r,{unit:"year"}):jl(r,e.length)},R:function(t,e){return jl(Ol(t),e.length)},u:function(t,e){return jl(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var o=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(o);case"QQ":return jl(o,2);case"Qo":return i.ordinalNumber(o,{unit:"quarter"});case"QQQ":return i.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(o,{width:"narrow",context:"formatting"});default:return i.quarter(o,{width:"wide",context:"formatting"})}},q:function(t,e,i){var o=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(o);case"qq":return jl(o,2);case"qo":return i.ordinalNumber(o,{unit:"quarter"});case"qqq":return i.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(o,{width:"narrow",context:"standalone"});default:return i.quarter(o,{width:"wide",context:"standalone"})}},M:function(t,e,i){var o=t.getUTCMonth();switch(e){case"M":case"MM":return Fl(t,e);case"Mo":return i.ordinalNumber(o+1,{unit:"month"});case"MMM":return i.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(o,{width:"narrow",context:"formatting"});default:return i.month(o,{width:"wide",context:"formatting"})}},L:function(t,e,i){var o=t.getUTCMonth();switch(e){case"L":return String(o+1);case"LL":return jl(o+1,2);case"Lo":return i.ordinalNumber(o+1,{unit:"month"});case"LLL":return i.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(o,{width:"narrow",context:"standalone"});default:return i.month(o,{width:"wide",context:"standalone"})}},w:function(t,e,i,o){var s=function(t,e){Tl(1,arguments);var i=zl(t),o=Nl(i,e).getTime()-function(t,e){var i,o,s,r,n,a,l,h;Tl(1,arguments);var d=Dl(),c=Al(null!==(i=null!==(o=null!==(s=null!==(r=null==e?void 0:e.firstWeekContainsDate)&&void 0!==r?r:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==s?s:d.firstWeekContainsDate)&&void 0!==o?o:null===(l=d.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1),u=Bl(t,e),p=new Date(0);return p.setUTCFullYear(u,0,c),p.setUTCHours(0,0,0,0),Nl(p,e)}(i,e).getTime();return Math.round(o/6048e5)+1}(t,o);return"wo"===e?i.ordinalNumber(s,{unit:"week"}):jl(s,e.length)},I:function(t,e,i){var o=function(t){Tl(1,arguments);var e=zl(t),i=Pl(e).getTime()-function(t){Tl(1,arguments);var e=Ol(t),i=new Date(0);return i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0),Pl(i)}(e).getTime();return Math.round(i/6048e5)+1}(t);return"Io"===e?i.ordinalNumber(o,{unit:"week"}):jl(o,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):$l(t,e)},D:function(t,e,i){var o=function(t){Tl(1,arguments);var e=zl(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var o=e.getTime();return Math.floor((i-o)/864e5)+1}(t);return"Do"===e?i.ordinalNumber(o,{unit:"dayOfYear"}):jl(o,e.length)},E:function(t,e,i){var o=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},e:function(t,e,i,o){var s=t.getUTCDay(),r=(s-o.weekStartsOn+8)%7||7;switch(e){case"e":return String(r);case"ee":return jl(r,2);case"eo":return i.ordinalNumber(r,{unit:"day"});case"eee":return i.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(s,{width:"short",context:"formatting"});default:return i.day(s,{width:"wide",context:"formatting"})}},c:function(t,e,i,o){var s=t.getUTCDay(),r=(s-o.weekStartsOn+8)%7||7;switch(e){case"c":return String(r);case"cc":return jl(r,e.length);case"co":return i.ordinalNumber(r,{unit:"day"});case"ccc":return i.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(s,{width:"narrow",context:"standalone"});case"cccccc":return i.day(s,{width:"short",context:"standalone"});default:return i.day(s,{width:"wide",context:"standalone"})}},i:function(t,e,i){var o=t.getUTCDay(),s=0===o?7:o;switch(e){case"i":return String(s);case"ii":return jl(s,e.length);case"io":return i.ordinalNumber(s,{unit:"day"});case"iii":return i.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},a:function(t,e,i){var o=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,e,i){var o,s=t.getUTCHours();switch(o=12===s?"noon":0===s?"midnight":s/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,e,i){var o,s=t.getUTCHours();switch(o=s>=17?"evening":s>=12?"afternoon":s>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var o=t.getUTCHours()%12;return 0===o&&(o=12),i.ordinalNumber(o,{unit:"hour"})}return Rl(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):Vl(t,e)},K:function(t,e,i){var o=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(o,{unit:"hour"}):jl(o,e.length)},k:function(t,e,i){var o=t.getUTCHours();return 0===o&&(o=24),"ko"===e?i.ordinalNumber(o,{unit:"hour"}):jl(o,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):ql(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Wl(t,e)},S:function(t,e){return Ul(t,e)},X:function(t,e,i,o){var s=(o._originalDate||t).getTimezoneOffset();if(0===s)return"Z";switch(e){case"X":return Gl(s);case"XXXX":case"XX":return Kl(s);default:return Kl(s,":")}},x:function(t,e,i,o){var s=(o._originalDate||t).getTimezoneOffset();switch(e){case"x":return Gl(s);case"xxxx":case"xx":return Kl(s);default:return Kl(s,":")}},O:function(t,e,i,o){var s=(o._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Yl(s,":");default:return"GMT"+Kl(s,":")}},z:function(t,e,i,o){var s=(o._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Yl(s,":");default:return"GMT"+Kl(s,":")}},t:function(t,e,i,o){return jl(Math.floor((o._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,i,o){return jl((o._originalDate||t).getTime(),e.length)}};function Yl(t,e){var i=t>0?"-":"+",o=Math.abs(t),s=Math.floor(o/60),r=o%60;if(0===r)return i+String(s);var n=e||"";return i+String(s)+n+jl(r,2)}function Gl(t,e){return t%60==0?(t>0?"-":"+")+jl(Math.abs(t)/60,2):Kl(t,e)}function Kl(t,e){var i=e||"",o=t>0?"-":"+",s=Math.abs(t);return o+jl(Math.floor(s/60),2)+i+jl(s%60,2)}const Jl=Hl;var Xl=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},Zl=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},Ql={p:Zl,P:function(t,e){var i,o=t.match(/(P+)(p+)?/)||[],s=o[1],r=o[2];if(!r)return Xl(t,e);switch(s){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",Xl(s,e)).replace("{{time}}",Zl(r,e))}};const th=Ql;var eh=["D","DD"],ih=["YY","YYYY"];function oh(t,e,i){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var sh={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function rh(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}var nh,ah={date:rh({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:rh({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:rh({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},lh={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function hh(t){return function(e,i){var o;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&t.formattingValues){var s=t.defaultFormattingWidth||t.defaultWidth,r=null!=i&&i.width?String(i.width):s;o=t.formattingValues[r]||t.formattingValues[s]}else{var n=t.defaultWidth,a=null!=i&&i.width?String(i.width):t.defaultWidth;o=t.values[a]||t.values[n]}return o[t.argumentCallback?t.argumentCallback(e):e]}}function dh(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.width,s=e.match(o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth]);if(!s)return null;var r,n=s[0],a=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?function(t){for(var e=0;e<t.length;e++)if(t[e].test(n))return e}(a):function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].test(n))return e}(a);return r=t.valueCallback?t.valueCallback(l):l,{value:r=i.valueCallback?i.valueCallback(r):r,rest:e.slice(n.length)}}}const ch={code:"en-US",formatDistance:function(t,e,i){var o,s=sh[t];return o="string"==typeof s?s:1===e?s.one:s.other.replace("{{count}}",e.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+o:o+" ago":o},formatLong:ah,formatRelative:function(t){return lh[t]},localize:{ordinalNumber:function(t){var e=Number(t),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:hh({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:hh({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:hh({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:hh({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:hh({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(nh={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(nh.matchPattern);if(!i)return null;var o=i[0],s=t.match(nh.parsePattern);if(!s)return null;var r=nh.valueCallback?nh.valueCallback(s[0]):s[0];return{value:r=e.valueCallback?e.valueCallback(r):r,rest:t.slice(o.length)}}),era:dh({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:dh({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:dh({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:dh({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:dh({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};var uh=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ph=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,mh=/^'([^]*?)'?$/,vh=/''/g,fh=/[a-zA-Z]/;function gh(t,e,i){var o,s,r,n,a,l,h,d,c,u,p,m,v,f,g,b,y,w;Tl(2,arguments);var _=String(e),x=Dl(),k=null!==(o=null!==(s=null==i?void 0:i.locale)&&void 0!==s?s:x.locale)&&void 0!==o?o:ch,C=Al(null!==(r=null!==(n=null!==(a=null!==(l=null==i?void 0:i.firstWeekContainsDate)&&void 0!==l?l:null==i||null===(h=i.locale)||void 0===h||null===(d=h.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==a?a:x.firstWeekContainsDate)&&void 0!==n?n:null===(c=x.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==r?r:1);if(!(C>=1&&C<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var S=Al(null!==(p=null!==(m=null!==(v=null!==(f=null==i?void 0:i.weekStartsOn)&&void 0!==f?f:null==i||null===(g=i.locale)||void 0===g||null===(b=g.options)||void 0===b?void 0:b.weekStartsOn)&&void 0!==v?v:x.weekStartsOn)&&void 0!==m?m:null===(y=x.locale)||void 0===y||null===(w=y.options)||void 0===w?void 0:w.weekStartsOn)&&void 0!==p?p:0);if(!(S>=0&&S<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!k.localize)throw new RangeError("locale must contain localize property");if(!k.formatLong)throw new RangeError("locale must contain formatLong property");var A=zl(t);if(!function(t){if(Tl(1,arguments),!function(t){return Tl(1,arguments),t instanceof Date||"object"===Sl(t)&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t)return!1;var e=zl(t);return!isNaN(Number(e))}(A))throw new RangeError("Invalid time value");var T=function(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}(A),z=function(t,e){return Tl(2,arguments),function(t,e){Tl(2,arguments);var i=zl(t).getTime(),o=Al(e);return new Date(i+o)}(t,-Al(e))}(A,T),I={firstWeekContainsDate:C,weekStartsOn:S,locale:k,_originalDate:A};return _.match(ph).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,th[e])(t,k.formatLong):t})).join("").match(uh).map((function(o){if("''"===o)return"'";var s,r,n=o[0];if("'"===n)return(r=(s=o).match(mh))?r[1].replace(vh,"'"):s;var a=Jl[n];if(a)return null!=i&&i.useAdditionalWeekYearTokens||-1===ih.indexOf(o)||oh(o,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!(-1!==eh.indexOf(o))||oh(o,e,String(t)),a(z,o,k.localize,I);if(n.match(fh))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");return o})).join("")}function bh(t,e){var i;Tl(1,arguments);var o=Al(null!==(i=null==e?void 0:e.additionalDigits)&&void 0!==i?i:2);if(2!==o&&1!==o&&0!==o)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!=typeof t&&"[object String]"!==Object.prototype.toString.call(t))return new Date(NaN);var s,r=function(t){var e,i={},o=t.split(yh.dateTimeDelimiter);if(o.length>2)return i;if(/:/.test(o[0])?e=o[0]:(i.date=o[0],e=o[1],yh.timeZoneDelimiter.test(i.date)&&(i.date=t.split(yh.timeZoneDelimiter)[0],e=t.substr(i.date.length,t.length))),e){var s=yh.timezone.exec(e);s?(i.time=e.replace(s[1],""),i.timezone=s[1]):i.time=e}return i}(t);if(r.date){var n=function(t,e){var i=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),o=t.match(i);if(!o)return{year:NaN,restDateString:""};var s=o[1]?parseInt(o[1]):null,r=o[2]?parseInt(o[2]):null;return{year:null===r?s:100*r,restDateString:t.slice((o[1]||o[2]).length)}}(r.date,o);s=function(t,e){if(null===e)return new Date(NaN);var i=t.match(wh);if(!i)return new Date(NaN);var o=!!i[4],s=kh(i[1]),r=kh(i[2])-1,n=kh(i[3]),a=kh(i[4]),l=kh(i[5])-1;if(o)return function(t,e,i){return e>=1&&e<=53&&i>=0&&i<=6}(0,a,l)?function(t,e,i){var o=new Date(0);o.setUTCFullYear(t,0,4);var s=7*(e-1)+i+1-(o.getUTCDay()||7);return o.setUTCDate(o.getUTCDate()+s),o}(e,a,l):new Date(NaN);var h=new Date(0);return function(t,e,i){return e>=0&&e<=11&&i>=1&&i<=(Sh[e]||(Ah(t)?29:28))}(e,r,n)&&function(t,e){return e>=1&&e<=(Ah(t)?366:365)}(e,s)?(h.setUTCFullYear(e,r,Math.max(s,n)),h):new Date(NaN)}(n.restDateString,n.year)}if(!s||isNaN(s.getTime()))return new Date(NaN);var a,l=s.getTime(),h=0;if(r.time&&(h=function(t){var e=t.match(_h);if(!e)return NaN;var i=Ch(e[1]),o=Ch(e[2]),s=Ch(e[3]);return function(t,e,i){return 24===t?0===e&&0===i:i>=0&&i<60&&e>=0&&e<60&&t>=0&&t<25}(i,o,s)?i*Ml+o*El+1e3*s:NaN}(r.time),isNaN(h)))return new Date(NaN);if(!r.timezone){var d=new Date(l+h),c=new Date(0);return c.setFullYear(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()),c.setHours(d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()),c}return a=function(t){if("Z"===t)return 0;var e=t.match(xh);if(!e)return 0;var i="+"===e[1]?-1:1,o=parseInt(e[2]),s=e[3]&&parseInt(e[3])||0;return function(t,e){return e>=0&&e<=59}(0,s)?i*(o*Ml+s*El):NaN}(r.timezone),isNaN(a)?new Date(NaN):new Date(l+h+a)}var yh={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},wh=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,_h=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,xh=/^([+-])(\d{2})(?::?(\d{2}))?$/;function kh(t){return t?parseInt(t):1}function Ch(t){return t&&parseFloat(t.replace(",","."))||0}var Sh=[31,null,31,30,31,30,31,31,30,31,30,31];function Ah(t){return t%400==0||t%4==0&&t%100!=0}function Th(t,e="GET",i=null,o={}){return new Promise(((s,r)=>{const n="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})),a=Object.assign({"Content-Type":"application/json"},o);"GET"!==e&&"HEAD"!==e&&(a["X-Idempotency-Key"]=n);const l={method:e,headers:a};i&&"GET"!==e&&"HEAD"!==e&&(l.body=JSON.stringify(i)),fetch(t,l).then((t=>{if(!t.ok)throw new Error(`HTTP error! Status: ${t.status}`);return t.json()})).then((t=>s(t))).catch((t=>r(t)))}))}const zh=({message:t,theme:e="success"})=>{window.postMessage({type:"ShowNotificationToast",message:t,theme:e})},Ih=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(".")},Dh=["H","D","A"],Eh=(t=[])=>t.filter((t=>t.enabled)),Mh=({rawData:t,selectedBettingType:e,selectedPlayingMode:i})=>{var o,s,r,n,a,l;const h=null===(n=null===(r=null===(s=null===(o=null==t?void 0:t.rules)||void 0===o?void 0:o.poolGame)||void 0===s?void 0:s.playTypes)||void 0===r?void 0:r.find((t=>t.bettingType===e&&t.playMode===i)))||void 0===n?void 0:n.betTypeId,d=null===(l=null===(a=null==t?void 0:t.rules)||void 0===a?void 0:a.betTypes)||void 0===l?void 0:l.find((t=>t.id===h));return{betTypeId:h,betType:d}};function Ph(t,e="€"){return null==t?"":`${e}${t?Ih(t):0}`}function Oh(t){if(!t)return"";const e=(({date:t,type:e="date",format:i})=>{try{const o=bh(t);if(isNaN(o.getTime()))throw new Error(`Invalid date: ${t}`);if(i)return gh(o,i);let s="dd/MM/yyyy";return"time"===e?s="dd/MM/yyyy HH:mm:ss":"week"===e&&(s="ccc dd/MM/yyyy HH:mm:ss"),gh(o,s)}catch(t){return console.error("Error formatting date:",t.message),""}})({date:t,format:"EEEE"});return["saturday","sunday"].includes(e.toLowerCase())?e.toUpperCase():"MIDWEEK"}const Nh="TICKET_INVALID_TOKEN",Bh=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}=Mh({rawData:this.rawData,selectedBettingType:this.selectedBettingType,selectedPlayingMode:this.selectedPlayingMode}),e=(null==t?void 0:t.boardsAllowed)||[0],[i,o]=[Math.min(...e),Math.max(...e)];return{minLineNumber:i,maxLineNumber:o,defaultBoards:(null==t?void 0:t.defaultBoards)||i}}get playTypeConfig(){var t,e,i;return null===(i=null===(e=null===(t=this.rawData)||void 0===t?void 0:t.rules)||void 0===e?void 0:e.poolGame)||void 0===i?void 0:i.playTypes}get betTypeConfig(){var t,e;return null===(e=null===(t=this.rawData)||void 0===t?void 0:t.rules)||void 0===e?void 0:e.betTypes}get isBothBettingType(){return this.selectedBettingType===yl.Both}get stakeOptions(){var t,e,i;return null===(i=null===(e=null===(t=this.rawData)||void 0===t?void 0:t.rules)||void 0===e?void 0:e.stakes)||void 0===i?void 0:i.map((t=>{var e;return{value:null===(e=t.value)||void 0===e?void 0:e.toString(),label:t.value,currency:t.currency}}))}getCurrentStakeByValue(t){var e;return null===(e=this.stakeOptions)||void 0===e?void 0:e.find((e=>+e.value==+t))}initiateCurrentStake(){var t,e,i;if(1===(null===(t=this.stakeOptions)||void 0===t?void 0:t.length))this.currentStake=this.stakeOptions[0];else{const t=(i=(null===(e=this.stakeOptions)||void 0===e?void 0:e.map((t=>t.value)))||[]).length?Math.min.apply(null,i):void 0;this.currentStake=this.getCurrentStakeByValue(t)}}handleBettingTypeChange(t){var e,i,o,s;if(t===this.selectedBettingType)return;this.selectedBettingType=t;const r=(({bettingType:t,playTypeConfig:e,betTypeConfig:i,enabledPlayingModeOptions:o})=>{const s=i.filter((t=>t.enabled)).map((t=>t.id)),r=e.filter((t=>s.includes(t.betTypeId))).filter((e=>e.bettingType===t)).map((t=>t.playMode));return o.filter((t=>r.includes(t.code)))})({bettingType:this.selectedBettingType,playTypeConfig:this.playTypeConfig,betTypeConfig:this.betTypeConfig,enabledPlayingModeOptions:Eh((null===(o=null===(i=null===(e=this.rawData)||void 0===e?void 0:e.rules)||void 0===i?void 0:i.poolGame)||void 0===o?void 0:o.playModes)||[])});this.playingModeOptions=r,r.length?r.map((t=>t.code)).includes(this.selectedPlayingMode)||(this.hasSelectBullet=!1,this.handlePlayingModeChange(null===(s=r[0])||void 0===s?void 0:s.code)):this.selectedPlayingMode=void 0,this.clearBulletConfig()}async clearBulletConfig(){return await this.childRef.resetBulletConfig(this.lineNumberRange)}handlePlayingModeChange(t){if(t===this.selectedPlayingMode)return;const e=e=>{this.selectedPlayingMode=t,this.clearBulletConfig().then((()=>{null==e||e()}))};if(this.hasSelectBullet){const t=()=>{this.dialogConfig={visible:!1}},i=()=>{e(t)};this.dialogConfig={visible:!0,content:Cl("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 Ih(e)+" "+((null===(t=this.currentStake)||void 0===t?void 0:t.currency)||"")}get currentStakeFormatted(){const{value:t="",currency:e=""}=this.currentStake||{};return`${t} ${e}`}bulletBetSelectChecker(){(async()=>{const t=await this.getLotteryTippingBulletResults();this.hasSelectAllBullet=!(({rawResults:t})=>{const e=(({rawResults:t})=>{const e=t=>t.filter((t=>t.isSelected)).length;return t.map((t=>t.length>0?t.map(e):[0]))})({rawResults:t});this.totalLineCombination=e.reduce(((t,e)=>t+this.calculateCombinationInLine(e)),0);const{combinations:i=1,maxCombinations:o=1}=Mh({rawData:this.rawData,selectedBettingType:this.selectedBettingType,selectedPlayingMode:this.selectedPlayingMode}).betType||{};return e.some((t=>{const e=this.calculateCombinationInLine(t);return e<i||e>o}))})({rawResults:t})})()}handleClientStylingChange(t,e){t!=e&&vl(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&fl(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&gl(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 o=await i.json();e=o,Object.keys(e).forEach((t=>{for(let i in e[t])kl[t][i]=e[t][i]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&gl(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&vl(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&fl(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}connectedCallback(){(()=>{let t=new URL(`${this.endpoint}/games/${this.gameId}`);this.isLoading=!0,Th(t.href,"GET").then((t=>{var e,i,o,s,r,n,a;this.rawData=t,this.bettingTypeOptions=Eh((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=Eh((null===(s=null===(o=null==t?void 0:t.rules)||void 0===o?void 0:o.poolGame)||void 0===s?void 0:s.playModes)||[]),this.initiateCurrentStake();const{bettingType:l,playMode:h}=(({playTypeConfig:t=[],betTypeConfig:e=[],enabledBettingTypeOptions:i=[],enabledPlayingModeOptions:o=[]})=>{const s=e.filter((t=>t.enabled));for(const e of s){const{bettingType:s,playMode:r}=null==t?void 0:t.find((t=>t.betTypeId===e.id));if(i.map((t=>t.code)).includes(s)&&o.map((t=>t.code)).includes(r))return{bettingType:s,playMode:r}}return{}})({playTypeConfig:null===(n=null===(r=null==t?void 0:t.rules)||void 0===r?void 0:r.poolGame)||void 0===n?void 0:n.playTypes,betTypeConfig:null===(a=null==t?void 0:t.rules)||void 0===a?void 0:a.betTypes,enabledBettingTypeOptions:this.bettingTypeOptions,enabledPlayingModeOptions:this.playingModeOptions});return this.handleBettingTypeChange(l),this.selectedPlayingMode=h,this.updateSaleStatistics()})).catch((t=>{console.error("Error!",t)})).finally((()=>{this.isLoading=!1}))})()}updateSaleStatistics(){var t;return async function({endpoint:t,gameId:e,drawId:i}){try{return await Th(`${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}=Mh({rawData:this.rawData,selectedBettingType:this.selectedBettingType,selectedPlayingMode:this.selectedPlayingMode}),o=new URL(`${this.endpoint}/tickets`),s=(({playerId:t,rawResults:e,gameId:i,rawData:o,amount:s,currentStake:r,betTypeId:n,betType:a})=>{var l;const h={playerId:t,tickets:[]},d=(t=>{const e=t=>t.map((t=>t.isSelected?1:0)),i=t.map((t=>t.map(e))),o=[];return i.forEach(((t,e)=>{const i=[];t.forEach(((t,e)=>{const o=t.map(((t,e)=>t?Dh[e]:null)).filter(Boolean);i[e]=[o]})),o[e]=i})),o})(e),c=r||{};return h.tickets.push({startingDrawId:null===(l=null==o?void 0:o.currentDraw)||void 0===l?void 0:l.id,amount:s,gameId:i,gameName:o.name,currency:c.currency,selection:d.map((t=>({betType:n,stake:+c.value,poolGameSelections:t,quickPick:!1,betName:a.name}))),multiplier:!1,drawCount:1,quickPick:!1}),h})({playerId:this.playerId,rawResults:t,gameId:this.gameId,rawData:this.rawData,amount:this.calculateTotalAmount().toString(),currentStake:this.currentStake,betTypeId:e,betType:i});this.submitLoading=!0,(({body:t,sessionId:e,url:i})=>{const o={method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${e}`,"X-Idempotency-Key":"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))},body:JSON.stringify(t)};return fetch(i,o).then((t=>{if(401===t.status)throw new Error(Nh);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!==_l.Purchased)))throw new Error(t.statusText);var i;return e}))}))})({body:s,sessionId:this.sessionId,url:o.href}).then((()=>{zh({message:Cl("ticketSubmitted",this.language)}),this.clearBulletConfig(),this.updateSaleStatistics()})).catch((t=>{if(t.message===Nh)return this.logoutEventHandler.emit(),void zh({message:Nh,theme:"error"});zh({message:Cl("ticketFailed",this.language),theme:"error"})})).finally((()=>{this.submitLoading=!1}))}get lineCountRender(){const t=Ih(this.totalLineCombination);let e=Cl("lines",this.language);return[0,1].includes(+t)&&(e=Cl("line",this.language)),t+" "+e}renderBettingControls(){var t,e;const o=()=>i("div",{class:"skeleton-content"},i("div",{class:"skeleton-item skeleton-animated"})),s=()=>{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"},Cl("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)))))():o()),i("div",{class:"LotteryTippingTicketController__section"},i("span",{class:"LotteryTippingTicketController__label"},Cl("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)))))():o()),(null===(t=this.stakeOptions)||void 0===t?void 0:t.length)>1&&i("div",{class:"LotteryTippingTicketController__section"},i("span",{class:"LotteryTippingTicketController__label"},Cl("stakePerLine",this.language)),s()),(null===(e=this.stakeOptions)||void 0===e?void 0:e.length)>1&&i("div",{class:"LotteryTippingTicketController__section"},i("span",{class:"LotteryTippingTicketController__label"},Cl("stakePerLine",this.language)),s())))}renderOrderSummary(){var t;return i("div",{class:"LotteryTippingTicketController__main--right order-summary"},i("h3",{class:"order-summary__title"},Cl("orderSummaryTitle",this.language)),i("div",{class:"order-summary__ticket-info"},i("div",{class:"order-summary__ticket"},Cl("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"},Cl("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:Cl("orderSummarySubmit",this.language)})))}render(){var t,e,o,s,r,n,a,l,h,d,c;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===(s=null===(o=this.rawData)||void 0===o?void 0:o.currentDraw)||void 0===s?void 0:s.wagerStartTime,"banner-title":Oh(null===(n=null===(r=this.rawData)||void 0===r?void 0:r.currentDraw)||void 0===n?void 0:n.date),turnover:Ph(null===(l=null===(a=this.saleStatisticsInfo)||void 0===a?void 0:a.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===(h=this.rawData)||void 0===h?void 0:h.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===bl.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:Cl("cancel",this.language),confirmText:Cl("confirm",this.language),opened:null===(d=this.dialogConfig)||void 0===d?void 0:d.visible,onConfirm:this.dialogConfig.onConfirm,onReject:this.dialogConfig.onCancel},null===(c=this.dialogConfig)||void 0===c?void 0:c.content))}static get assetsDirs(){return["../static"]}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};Bh.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}";export{Bh as L,fl as a,gl as b,gh as f,bh as p,Tl as r,vl as s,zl as t}
@@ -1 +1 @@
1
- import{p as e,b as l}from"./index-e3ec645c.js";export{s as setNonce}from"./index-e3ec645c.js";import{g as t}from"./app-globals-0f993ce5.js";(()=>{const l=import.meta.url,t={};return""!==l&&(t.resourcesUrl=new URL(".",l).href),e(t)})().then((async e=>(await t(),l([["general-tooltip_7",[[1,"lottery-tipping-ticket-controller",{mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],language:[513],logoUrl:[513,"logo-url"],endpoint:[513],sessionId:[513,"session-id"],gameId:[513,"game-id"],playerId:[513,"player-id"],drawId:[513,"draw-id"],isLoading:[32],bettingTypeOptions:[32],playingModeOptions:[32],selectedBettingType:[32],selectedPlayingMode:[32],hasSelectBullet:[32],hasSelectAllBullet:[32],totalLineCombination:[32],submitLoading:[32],rawData:[32],saleStatisticsInfo:[32],currentStake:[32],dialogConfig:[32]},[[0,"lotteryTippingBulletBetSelect","lotteryTippingBulletGroupSelectionHandler"]],{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}],[1,"lottery-tipping-ticket-bet",{mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],language:[513],sessionId:[513,"session-id"],endpoint:[513],gameId:[513,"game-id"],drawId:[513,"draw-id"],totalPages:[1538,"total-pages"],minTotalPages:[514,"min-total-pages"],maxTotalPages:[514,"max-total-pages"],mode:[513],readPretty:[516,"read-pretty"],defaultBulletConfigLineGroup:[513,"default-bullet-config-line-group"],translationData:[32],clientStylingUrlContent:[32],bulletConfigLineGroup:[32],currentPage:[32],isLoading:[32],hasErrors:[32],dialogConfig:[32],ticketDataSource:[32],resetBulletConfig:[64],getData:[64]},[[0,"lotteryTippingBulletGroupToggle","lotteryTippingBulletGroupSelectionHandler"]],{translationUrl:["handleNewTranslations"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],gameId:["fetchMatchData"],sessionId:["fetchMatchData"],drawId:["fetchMatchData"],defaultBulletConfigLineGroup:["fetchMatchData"],currentPage:["handleCurrentPageChange"]}],[1,"lottery-button",{variant:[513],size:[513],color:[513],disabled:[516],loading:[516],text:[513],mbSource:[513,"mb-source"],language:[513],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],ripples:[32]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}],[1,"lottery-tipping-ticket-banner",{mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[513],translationUrl:[513,"translation-url"],logoUrl:[513,"logo-url"],stopTime:[1,"stop-time"],period:[1],formattedTurnover:[1,"formatted-turnover"]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}],[1,"lottery-tipping-bullet-group",{mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],positionIdx:[513,"position-idx"],theme:[513],mode:[513],bulletConfigContent:[513,"bullet-config-content"]},[[0,"lotteryTippingBulletToggle","lotteryTippingBulletSelectionHandler"]],{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}],[1,"general-tooltip",{mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],position:[1],delay:[2],isVisible:[32],_tooltipId:[32]},[[1,"mouseenter","handleMouseEnterOrFocus"],[0,"focusin","handleMouseEnterOrFocus"],[1,"mouseleave","handleMouseLeaveOrBlur"],[0,"focusout","handleMouseLeaveOrBlur"],[0,"keydown","handleKeyDown"]],{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}],[1,"lottery-tipping-bullet",{mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],positionIdx:[514,"position-idx"],theme:[513],value:[513],disabled:[516],isSelected:[516,"is-selected"]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}]]]],e))));
1
+ import{p as e,b as l}from"./index-e3ec645c.js";export{s as setNonce}from"./index-e3ec645c.js";import{g as t}from"./app-globals-0f993ce5.js";(()=>{const l=import.meta.url,t={};return""!==l&&(t.resourcesUrl=new URL(".",l).href),e(t)})().then((async e=>(await t(),l([["general-tooltip_7",[[1,"lottery-tipping-ticket-controller",{mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],language:[513],logoUrl:[513,"logo-url"],endpoint:[513],sessionId:[513,"session-id"],gameId:[513,"game-id"],playerId:[513,"player-id"],drawId:[513,"draw-id"],isLoading:[32],bettingTypeOptions:[32],playingModeOptions:[32],selectedBettingType:[32],selectedPlayingMode:[32],hasSelectBullet:[32],hasSelectAllBullet:[32],totalLineCombination:[32],submitLoading:[32],drawSubmitAvailable:[32],rawData:[32],saleStatisticsInfo:[32],currentStake:[32],dialogConfig:[32]},[[0,"lotteryTippingBulletBetSelect","lotteryTippingBulletGroupSelectionHandler"]],{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}],[1,"lottery-tipping-ticket-bet",{mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],language:[513],sessionId:[513,"session-id"],endpoint:[513],gameId:[513,"game-id"],drawId:[513,"draw-id"],totalPages:[1538,"total-pages"],minTotalPages:[514,"min-total-pages"],maxTotalPages:[514,"max-total-pages"],mode:[513],readPretty:[516,"read-pretty"],defaultBulletConfigLineGroup:[513,"default-bullet-config-line-group"],translationData:[32],clientStylingUrlContent:[32],bulletConfigLineGroup:[32],currentPage:[32],isLoading:[32],hasErrors:[32],dialogConfig:[32],ticketDataSource:[32],resetBulletConfig:[64],getData:[64]},[[0,"lotteryTippingBulletGroupToggle","lotteryTippingBulletGroupSelectionHandler"]],{translationUrl:["handleNewTranslations"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],gameId:["fetchMatchData"],sessionId:["fetchMatchData"],drawId:["fetchMatchData"],defaultBulletConfigLineGroup:["fetchMatchData"],currentPage:["handleCurrentPageChange"]}],[1,"lottery-banner",{mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],language:[513],logoUrl:[513,"logo-url"],stopTime:[1,"stop-time"],startTime:[1,"start-time"],bannerTitle:[1,"banner-title"],turnover:[1],layout:[1],formattedTime:[32]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],startTime:["handleTimeChange"],stopTime:["handleTimeChange"]}],[1,"lottery-button",{variant:[513],size:[513],color:[513],disabled:[516],loading:[516],text:[513],mbSource:[513,"mb-source"],language:[513],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],ripples:[32]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}],[1,"lottery-tipping-bullet-group",{mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],positionIdx:[513,"position-idx"],theme:[513],mode:[513],bulletConfigContent:[513,"bullet-config-content"]},[[0,"lotteryTippingBulletToggle","lotteryTippingBulletSelectionHandler"]],{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}],[1,"general-tooltip",{mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],position:[1],delay:[2],isVisible:[32],_tooltipId:[32]},[[1,"mouseenter","handleMouseEnterOrFocus"],[0,"focusin","handleMouseEnterOrFocus"],[1,"mouseleave","handleMouseLeaveOrBlur"],[0,"focusout","handleMouseLeaveOrBlur"],[0,"keydown","handleKeyDown"]],{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}],[1,"lottery-tipping-bullet",{mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],positionIdx:[514,"position-idx"],theme:[513],value:[513],disabled:[516],isSelected:[516,"is-selected"]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}]]]],e))));
@@ -1,3 +1,4 @@
1
+ import "../../../../../../dist/packages/stencil/lottery-banner/dist/types/index";
1
2
  import "../../../../../../dist/packages/stencil/lottery-button/dist/types/index";
2
3
  import "../../../../../../dist/packages/stencil/lottery-tipping-ticket-bet/dist/types/index";
3
4
  import { EventEmitter } from '../../stencil-public-runtime';
@@ -67,6 +68,7 @@ export declare class LotteryTippingTicketController {
67
68
  hasSelectAllBullet: boolean;
68
69
  totalLineCombination: number;
69
70
  submitLoading: boolean;
71
+ drawSubmitAvailable: boolean;
70
72
  rawData: any;
71
73
  saleStatisticsInfo: SaleStatisticsRes;
72
74
  currentStake: StakeType;
@@ -108,6 +110,7 @@ export declare class LotteryTippingTicketController {
108
110
  handleClientStylingChange(newValue: any, oldValue: any): void;
109
111
  handleClientStylingUrlChange(newValue: any, oldValue: any): void;
110
112
  handleMbSourceChange(newValue: any, oldValue: any): void;
113
+ handleTimerStop(): void;
111
114
  componentWillLoad(): void;
112
115
  componentDidLoad(): void;
113
116
  disconnectedCallback(): void;
@@ -117,6 +120,5 @@ export declare class LotteryTippingTicketController {
117
120
  get lineCountRender(): string;
118
121
  private renderBettingControls;
119
122
  private renderOrderSummary;
120
- get formattedTurnover(): string;
121
123
  render(): any;
122
124
  }
@@ -6,29 +6,6 @@
6
6
  */
7
7
  import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
8
  export namespace Components {
9
- interface LotteryTippingTicketBanner {
10
- "clientStyling": string;
11
- "clientStylingUrl": string;
12
- /**
13
- * turnover formatted with unit and thousand separator
14
- */
15
- "formattedTurnover": string;
16
- "language": string;
17
- /**
18
- * logo image URL for the header section
19
- */
20
- "logoUrl": string;
21
- "mbSource": string;
22
- /**
23
- * draw period
24
- */
25
- "period": string;
26
- /**
27
- * draw stop time
28
- */
29
- "stopTime": string;
30
- "translationUrl": string;
31
- }
32
9
  interface LotteryTippingTicketController {
33
10
  /**
34
11
  * Client custom styling via string
@@ -81,12 +58,6 @@ export interface LotteryTippingTicketControllerCustomEvent<T> extends CustomEven
81
58
  target: HTMLLotteryTippingTicketControllerElement;
82
59
  }
83
60
  declare global {
84
- interface HTMLLotteryTippingTicketBannerElement extends Components.LotteryTippingTicketBanner, HTMLStencilElement {
85
- }
86
- var HTMLLotteryTippingTicketBannerElement: {
87
- prototype: HTMLLotteryTippingTicketBannerElement;
88
- new (): HTMLLotteryTippingTicketBannerElement;
89
- };
90
61
  interface HTMLLotteryTippingTicketControllerElementEventMap {
91
62
  "logout": any;
92
63
  }
@@ -105,34 +76,10 @@ declare global {
105
76
  new (): HTMLLotteryTippingTicketControllerElement;
106
77
  };
107
78
  interface HTMLElementTagNameMap {
108
- "lottery-tipping-ticket-banner": HTMLLotteryTippingTicketBannerElement;
109
79
  "lottery-tipping-ticket-controller": HTMLLotteryTippingTicketControllerElement;
110
80
  }
111
81
  }
112
82
  declare namespace LocalJSX {
113
- interface LotteryTippingTicketBanner {
114
- "clientStyling"?: string;
115
- "clientStylingUrl"?: string;
116
- /**
117
- * turnover formatted with unit and thousand separator
118
- */
119
- "formattedTurnover"?: string;
120
- "language"?: string;
121
- /**
122
- * logo image URL for the header section
123
- */
124
- "logoUrl"?: string;
125
- "mbSource"?: string;
126
- /**
127
- * draw period
128
- */
129
- "period"?: string;
130
- /**
131
- * draw stop time
132
- */
133
- "stopTime"?: string;
134
- "translationUrl"?: string;
135
- }
136
83
  interface LotteryTippingTicketController {
137
84
  /**
138
85
  * Client custom styling via string
@@ -181,7 +128,6 @@ declare namespace LocalJSX {
181
128
  "translationUrl"?: string;
182
129
  }
183
130
  interface IntrinsicElements {
184
- "lottery-tipping-ticket-banner": LotteryTippingTicketBanner;
185
131
  "lottery-tipping-ticket-controller": LotteryTippingTicketController;
186
132
  }
187
133
  }
@@ -189,7 +135,6 @@ export { LocalJSX as JSX };
189
135
  declare module "@stencil/core" {
190
136
  export namespace JSX {
191
137
  interface IntrinsicElements {
192
- "lottery-tipping-ticket-banner": LocalJSX.LotteryTippingTicketBanner & JSXBase.HTMLAttributes<HTMLLotteryTippingTicketBannerElement>;
193
138
  "lottery-tipping-ticket-controller": LocalJSX.LotteryTippingTicketController & JSXBase.HTMLAttributes<HTMLLotteryTippingTicketControllerElement>;
194
139
  }
195
140
  }
@@ -33,3 +33,184 @@ export interface StakeType {
33
33
  currency: string;
34
34
  label?: string;
35
35
  }
36
+ export interface DrawInfo {
37
+ date: string;
38
+ id: string;
39
+ status: string;
40
+ wagerAvailable: boolean;
41
+ wagerCloseTime: string;
42
+ wagerStartTime: string;
43
+ breakEndTime: string;
44
+ openTime: string;
45
+ closeTime: string;
46
+ }
47
+ export declare enum DrawStatus {
48
+ OPEN = "OPEN"
49
+ }
50
+ export interface PlayType {
51
+ betTypeId: string;
52
+ bettingType: string;
53
+ playMode: string;
54
+ }
55
+ export interface BettingType {
56
+ code: string;
57
+ enabled: boolean;
58
+ name: string;
59
+ }
60
+ interface NameItem {
61
+ name: string;
62
+ }
63
+ export interface DisciplineOption {
64
+ id: string;
65
+ name: string;
66
+ parentId?: number | null;
67
+ parentSport?: string | null;
68
+ }
69
+ interface Ranges {
70
+ bettingType: string;
71
+ displayName: string;
72
+ id: string;
73
+ name: string;
74
+ }
75
+ interface DisplayBettingType {
76
+ displaytype: string;
77
+ maxCol: number;
78
+ maxRow: number;
79
+ name: string;
80
+ }
81
+ interface OutcomeRange {
82
+ bettingType: Array<DisplayBettingType>;
83
+ display: {
84
+ ranges: Array<Ranges>;
85
+ };
86
+ }
87
+ export interface PlayType {
88
+ betTypeId: string;
89
+ bettingType: string;
90
+ playMode: string;
91
+ }
92
+ export interface BettingType {
93
+ code: string;
94
+ enabled: boolean;
95
+ name: string;
96
+ }
97
+ export interface PoolGameConfig {
98
+ bettingObjects: Array<NameItem>;
99
+ bettingTypes: Array<BettingType>;
100
+ disciplines: Array<DisciplineOption>;
101
+ eventCount: number;
102
+ outcomeRanges: Array<OutcomeRange>;
103
+ playModes: Array<NameItem>;
104
+ playTypes: Array<PlayType>;
105
+ }
106
+ export interface GameRule {
107
+ poolGame: PoolGameConfig;
108
+ betTypes: any;
109
+ }
110
+ export interface GameInfo {
111
+ id: string;
112
+ name: string;
113
+ type: string;
114
+ vendorGameType: string;
115
+ href: string;
116
+ launchId: string;
117
+ launchSlug: string;
118
+ vendorId: string;
119
+ wasiId: string;
120
+ currentDraw: DrawInfo | null;
121
+ nextDraw: DrawInfo | null;
122
+ rules: GameRule;
123
+ }
124
+ export interface SubmitTicketErrorDetail {
125
+ code?: string;
126
+ data?: string;
127
+ date?: string;
128
+ message?: string;
129
+ }
130
+ export interface SubmitTicketDrawResultDetail {
131
+ amount?: number;
132
+ currency?: string;
133
+ division?: number;
134
+ divisionDisplayName?: string;
135
+ draw_date?: string;
136
+ draw_id?: string;
137
+ players?: number;
138
+ shares?: number;
139
+ tickets?: number;
140
+ winningType?: string;
141
+ }
142
+ export interface SubmitTicketDrawResultWinningNumber {
143
+ drawType?: string;
144
+ numbers?: number[];
145
+ poolGameOutcomes?: string[][][];
146
+ secondaryNumbers?: number[];
147
+ tertiaryNumbers?: number[];
148
+ winningType?: string;
149
+ }
150
+ export interface SubmitTicketDrawResult {
151
+ amount?: number;
152
+ currency?: string;
153
+ details?: SubmitTicketDrawResultDetail[];
154
+ drawId?: string;
155
+ drawStatus?: string;
156
+ multiplier?: number;
157
+ settled?: boolean;
158
+ state?: string;
159
+ updatedAt?: string;
160
+ winningNumbers?: SubmitTicketDrawResultWinningNumber[];
161
+ }
162
+ export interface SubmitTicketSelectionMetadata {
163
+ additionalProp1?: string;
164
+ additionalProp2?: string;
165
+ additionalProp3?: string;
166
+ }
167
+ export interface SubmitTicketSelection {
168
+ betName?: string;
169
+ betType?: string;
170
+ metadata?: SubmitTicketSelectionMetadata;
171
+ multiplier?: boolean;
172
+ poolGameSelections?: string[][][];
173
+ quickPick?: boolean;
174
+ secondarySelections?: number[];
175
+ selections?: number[];
176
+ stake?: number;
177
+ tertiarySelections?: number[];
178
+ }
179
+ export interface SubmitTicket {
180
+ tickets?: {
181
+ Token?: string;
182
+ addon?: boolean;
183
+ amount?: string;
184
+ cancellationId?: string;
185
+ createdAt?: string;
186
+ currency?: string;
187
+ drawCount?: number;
188
+ drawName?: string;
189
+ drawResults?: SubmitTicketDrawResult[];
190
+ endDrawId?: string;
191
+ errorDetail?: SubmitTicketErrorDetail;
192
+ gameId?: string;
193
+ gameName?: string;
194
+ id?: string;
195
+ launchGameId?: string;
196
+ multiplier?: boolean;
197
+ multiplierNum?: number;
198
+ playerId?: string;
199
+ quickPick?: boolean;
200
+ selection?: SubmitTicketSelection[];
201
+ startingDrawId?: string;
202
+ state?: TicketState;
203
+ updatedAt?: string;
204
+ vendorGameBettingObject?: string;
205
+ vendorGameId?: string;
206
+ vendorGameType?: string;
207
+ vendorTicketId?: string;
208
+ wagerType?: string;
209
+ }[];
210
+ }
211
+ export declare enum TicketState {
212
+ Settled = "Settled",
213
+ Purchased = "Purchased",
214
+ Canceled = "Canceled"
215
+ }
216
+ export {};
@@ -55,3 +55,5 @@ export declare const getPlayTypeConfig: ({ rawData, selectedBettingType, selecte
55
55
  betType: any;
56
56
  };
57
57
  export declare const getMinValue: (arr: any) => any;
58
+ export declare function formattedTurnover(turnover: number | null | undefined | string, unit?: string): string;
59
+ export declare function formattedWeekName(date: any): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/lottery-tipping-ticket-controller",
3
- "version": "1.87.28",
3
+ "version": "1.87.30",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",