@everymatrix/lottery-tipping-ticket-history 1.87.31 → 1.87.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- export{L as LotteryTippingTicketHistory}from"./lottery-tipping-ticket-history-e70dd42b.js";import"./index-4e926388.js";
1
+ export{L as LotteryTippingTicketHistory}from"./lottery-tipping-ticket-history-e8f4cda5.js";import"./index-4e926388.js";
@@ -1,4 +1,4 @@
1
- import{r as t,c as e,h as n}from"./index-4e926388.js";const i="__WIDGET_GLOBAL_STYLE_CACHE__";function r(t,e){if(t){const n=document.createElement("style");n.innerHTML=e,t.appendChild(n)}}function o(t,e){if(!t||!e)return;const n=new URL(e);fetch(n.href).then((t=>t.text())).then((e=>{const n=document.createElement("style");n.innerHTML=e,t&&t.appendChild(n)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function a(t,e,n,r=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!r)return n=function(t,e){const n=document.createElement("style");return window.emMessageBus.subscribe(e,(e=>{t&&(n.innerHTML=e,t.appendChild(n))}))}(t,e),n;window[i]||(window[i]={}),n=function(t,e){return window.emMessageBus.subscribe(e,(n=>{if(!t)return;const r=t.getRootNode(),o=window[i];let a=o[e]?.sheet;a?o[e].refCount=o[e].refCount+1:(a=new CSSStyleSheet,a.replaceSync(n),o[e]={sheet:a,refCount:1});const s=r.adoptedStyleSheets||[];s.includes(a)||(r.adoptedStyleSheets=[...s,a])}))}(t,e);const o=n.unsubscribe.bind(n);return n.unsubscribe=()=>{if(window[i][e]){const t=window[i][e];t.refCount>1?t.refCount=t.refCount-1:delete window[i][e]}o()},n}function s(t){return s="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},s(t)}function u(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function c(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function f(t){c(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===s(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 l={};function d(){return l}function h(t){c(1,arguments);var e=f(t),n=e.getUTCDay(),i=(n<1?7:0)+n-1;return e.setUTCDate(e.getUTCDate()-i),e.setUTCHours(0,0,0,0),e}function w(t){c(1,arguments);var e=f(t),n=e.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(n+1,0,4),i.setUTCHours(0,0,0,0);var r=h(i),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var a=h(o);return e.getTime()>=r.getTime()?n+1:e.getTime()>=a.getTime()?n:n-1}function v(t,e){var n,i,r,o,a,s,l,h;c(1,arguments);var w=d(),v=u(null!==(n=null!==(i=null!==(r=null!==(o=null==e?void 0:e.weekStartsOn)&&void 0!==o?o:null==e||null===(a=e.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==r?r:w.weekStartsOn)&&void 0!==i?i:null===(l=w.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==n?n:0);if(!(v>=0&&v<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var g=f(t),m=g.getUTCDay(),p=(m<v?7:0)+m-v;return g.setUTCDate(g.getUTCDate()-p),g.setUTCHours(0,0,0,0),g}function g(t,e){var n,i,r,o,a,s,l,h;c(1,arguments);var w=f(t),g=w.getUTCFullYear(),m=d(),p=u(null!==(n=null!==(i=null!==(r=null!==(o=null==e?void 0:e.firstWeekContainsDate)&&void 0!==o?o:null==e||null===(a=e.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==r?r:m.firstWeekContainsDate)&&void 0!==i?i:null===(l=m.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==n?n:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(g+1,0,p),y.setUTCHours(0,0,0,0);var b=v(y,e),k=new Date(0);k.setUTCFullYear(g,0,p),k.setUTCHours(0,0,0,0);var x=v(k,e);return w.getTime()>=b.getTime()?g+1:w.getTime()>=x.getTime()?g:g-1}function m(t,e){for(var n=t<0?"-":"",i=Math.abs(t).toString();i.length<e;)i="0"+i;return n+i}const p=function(t,e){var n=t.getUTCFullYear(),i=n>0?n:1-n;return m("yy"===e?i%100:i,e.length)},y=function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):m(n+1,2)},b=function(t,e){return m(t.getUTCDate(),e.length)},k=function(t,e){return m(t.getUTCHours()%12||12,e.length)},x=function(t,e){return m(t.getUTCHours(),e.length)},M=function(t,e){return m(t.getUTCMinutes(),e.length)},N=function(t,e){return m(t.getUTCSeconds(),e.length)},T=function(t,e){var n=e.length,i=t.getUTCMilliseconds();return m(Math.floor(i*Math.pow(10,n-3)),e.length)};var S={G:function(t,e,n){var i=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});default:return n.era(i,{width:"wide"})}},y:function(t,e,n){if("yo"===e){var i=t.getUTCFullYear();return n.ordinalNumber(i>0?i:1-i,{unit:"year"})}return p(t,e)},Y:function(t,e,n,i){var r=g(t,i),o=r>0?r:1-r;return"YY"===e?m(o%100,2):"Yo"===e?n.ordinalNumber(o,{unit:"year"}):m(o,e.length)},R:function(t,e){return m(w(t),e.length)},u:function(t,e){return m(t.getUTCFullYear(),e.length)},Q:function(t,e,n){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(i);case"QQ":return m(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,e,n){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(i);case"qq":return m(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,e,n){var i=t.getUTCMonth();switch(e){case"M":case"MM":return y(t,e);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(t,e,n){var i=t.getUTCMonth();switch(e){case"L":return String(i+1);case"LL":return m(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(t,e,n,i){var r=function(t,e){c(1,arguments);var n=f(t),i=v(n,e).getTime()-function(t,e){var n,i,r,o,a,s,f,l;c(1,arguments);var h=d(),w=u(null!==(n=null!==(i=null!==(r=null!==(o=null==e?void 0:e.firstWeekContainsDate)&&void 0!==o?o:null==e||null===(a=e.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==r?r:h.firstWeekContainsDate)&&void 0!==i?i:null===(f=h.locale)||void 0===f||null===(l=f.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==n?n:1),m=g(t,e),p=new Date(0);return p.setUTCFullYear(m,0,w),p.setUTCHours(0,0,0,0),v(p,e)}(n,e).getTime();return Math.round(i/6048e5)+1}(t,i);return"wo"===e?n.ordinalNumber(r,{unit:"week"}):m(r,e.length)},I:function(t,e,n){var i=function(t){c(1,arguments);var e=f(t),n=h(e).getTime()-function(t){c(1,arguments);var e=w(t),n=new Date(0);return n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0),h(n)}(e).getTime();return Math.round(n/6048e5)+1}(t);return"Io"===e?n.ordinalNumber(i,{unit:"week"}):m(i,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):b(t,e)},D:function(t,e,n){var i=function(t){c(1,arguments);var e=f(t),n=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var i=e.getTime();return Math.floor((n-i)/864e5)+1}(t);return"Do"===e?n.ordinalNumber(i,{unit:"dayOfYear"}):m(i,e.length)},E:function(t,e,n){var i=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(t,e,n,i){var r=t.getUTCDay(),o=(r-i.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return m(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},c:function(t,e,n,i){var r=t.getUTCDay(),o=(r-i.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return m(o,e.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(r,{width:"narrow",context:"standalone"});case"cccccc":return n.day(r,{width:"short",context:"standalone"});default:return n.day(r,{width:"wide",context:"standalone"})}},i:function(t,e,n){var i=t.getUTCDay(),r=0===i?7:i;switch(e){case"i":return String(r);case"ii":return m(r,e.length);case"io":return n.ordinalNumber(r,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(t,e,n){var i=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(t,e,n){var i,r=t.getUTCHours();switch(i=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,e,n){var i,r=t.getUTCHours();switch(i=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",e){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){var i=t.getUTCHours()%12;return 0===i&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return k(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):x(t,e)},K:function(t,e,n){var i=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(i,{unit:"hour"}):m(i,e.length)},k:function(t,e,n){var i=t.getUTCHours();return 0===i&&(i=24),"ko"===e?n.ordinalNumber(i,{unit:"hour"}):m(i,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):M(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):N(t,e)},S:function(t,e){return T(t,e)},X:function(t,e,n,i){var r=(i._originalDate||t).getTimezoneOffset();if(0===r)return"Z";switch(e){case"X":return E(r);case"XXXX":case"XX":return C(r);default:return C(r,":")}},x:function(t,e,n,i){var r=(i._originalDate||t).getTimezoneOffset();switch(e){case"x":return E(r);case"xxxx":case"xx":return C(r);default:return C(r,":")}},O:function(t,e,n,i){var r=(i._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+D(r,":");default:return"GMT"+C(r,":")}},z:function(t,e,n,i){var r=(i._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+D(r,":");default:return"GMT"+C(r,":")}},t:function(t,e,n,i){return m(Math.floor((i._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,n,i){return m((i._originalDate||t).getTime(),e.length)}};function D(t,e){var n=t>0?"-":"+",i=Math.abs(t),r=Math.floor(i/60),o=i%60;if(0===o)return n+String(r);var a=e||"";return n+String(r)+a+m(o,2)}function E(t,e){return t%60==0?(t>0?"-":"+")+m(Math.abs(t)/60,2):C(t,e)}function C(t,e){var n=e||"",i=t>0?"-":"+",r=Math.abs(t);return i+m(Math.floor(r/60),2)+n+m(r%60,2)}const P=S;var j=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"})}},O=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"})}},I={p:O,P:function(t,e){var n,i=t.match(/(P+)(p+)?/)||[],r=i[1],o=i[2];if(!o)return j(t,e);switch(r){case"P":n=e.dateTime({width:"short"});break;case"PP":n=e.dateTime({width:"medium"});break;case"PPP":n=e.dateTime({width:"long"});break;default:n=e.dateTime({width:"full"})}return n.replace("{{date}}",j(r,e)).replace("{{time}}",O(o,e))}};const L=I;var G=["D","DD"],W=["YY","YYYY"];function A(t,e,n){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; 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(n,"`; 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(n,"`; 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(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var z={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 Y(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}var B,R={date:Y({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Y({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:Y({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},$={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function _(t){return function(e,n){var i;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&t.formattingValues){var r=t.defaultFormattingWidth||t.defaultWidth,o=null!=n&&n.width?String(n.width):r;i=t.formattingValues[o]||t.formattingValues[r]}else{var a=t.defaultWidth,s=null!=n&&n.width?String(n.width):t.defaultWidth;i=t.values[s]||t.values[a]}return i[t.argumentCallback?t.argumentCallback(e):e]}}function q(t){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.width,r=e.match(i&&t.matchPatterns[i]||t.matchPatterns[t.defaultMatchWidth]);if(!r)return null;var o,a=r[0],s=i&&t.parsePatterns[i]||t.parsePatterns[t.defaultParseWidth],u=Array.isArray(s)?function(t){for(var e=0;e<t.length;e++)if(t[e].test(a))return e}(s):function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].test(a))return e}(s);return o=t.valueCallback?t.valueCallback(u):u,{value:o=n.valueCallback?n.valueCallback(o):o,rest:e.slice(a.length)}}}const Q={code:"en-US",formatDistance:function(t,e,n){var i,r=z[t];return i="string"==typeof r?r:1===e?r.one:r.other.replace("{{count}}",e.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i},formatLong:R,formatRelative:function(t){return $[t]},localize:{ordinalNumber:function(t){var e=Number(t),n=e%100;if(n>20||n<10)switch(n%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:_({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:_({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:_({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:_({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:_({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(B={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]:{},n=t.match(B.matchPattern);if(!n)return null;var i=n[0],r=t.match(B.parsePattern);if(!r)return null;var o=B.valueCallback?B.valueCallback(r[0]):r[0];return{value:o=e.valueCallback?e.valueCallback(o):o,rest:t.slice(i.length)}}),era:q({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:q({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:q({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:q({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:q({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 X=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,F=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,U=/^'([^]*?)'?$/,H=/''/g,J=/[a-zA-Z]/;function K(t,e,n){var i,r,o,a,l,h,w,v,g,m,p,y,b,k,x,M,N,T;c(2,arguments);var S=String(e),D=d(),E=null!==(i=null!==(r=null==n?void 0:n.locale)&&void 0!==r?r:D.locale)&&void 0!==i?i:Q,C=u(null!==(o=null!==(a=null!==(l=null!==(h=null==n?void 0:n.firstWeekContainsDate)&&void 0!==h?h:null==n||null===(w=n.locale)||void 0===w||null===(v=w.options)||void 0===v?void 0:v.firstWeekContainsDate)&&void 0!==l?l:D.firstWeekContainsDate)&&void 0!==a?a:null===(g=D.locale)||void 0===g||null===(m=g.options)||void 0===m?void 0:m.firstWeekContainsDate)&&void 0!==o?o:1);if(!(C>=1&&C<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var j=u(null!==(p=null!==(y=null!==(b=null!==(k=null==n?void 0:n.weekStartsOn)&&void 0!==k?k:null==n||null===(x=n.locale)||void 0===x||null===(M=x.options)||void 0===M?void 0:M.weekStartsOn)&&void 0!==b?b:D.weekStartsOn)&&void 0!==y?y:null===(N=D.locale)||void 0===N||null===(T=N.options)||void 0===T?void 0:T.weekStartsOn)&&void 0!==p?p:0);if(!(j>=0&&j<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!E.localize)throw new RangeError("locale must contain localize property");if(!E.formatLong)throw new RangeError("locale must contain formatLong property");var O=f(t);if(!function(t){if(c(1,arguments),!function(t){return c(1,arguments),t instanceof Date||"object"===s(t)&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t)return!1;var e=f(t);return!isNaN(Number(e))}(O))throw new RangeError("Invalid time value");var I=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()}(O),z=function(t,e){return c(2,arguments),function(t,e){c(2,arguments);var n=f(t).getTime(),i=u(e);return new Date(n+i)}(t,-u(e))}(O,I),Y={firstWeekContainsDate:C,weekStartsOn:j,locale:E,_originalDate:O};return S.match(F).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,L[e])(t,E.formatLong):t})).join("").match(X).map((function(i){if("''"===i)return"'";var r,o,a=i[0];if("'"===a)return(o=(r=i).match(U))?o[1].replace(H,"'"):r;var s=P[a];if(s)return null!=n&&n.useAdditionalWeekYearTokens||-1===W.indexOf(i)||A(i,e,String(t)),null!=n&&n.useAdditionalDayOfYearTokens||!(-1!==G.indexOf(i))||A(i,e,String(t)),s(z,i,E.localize,Y);if(a.match(J))throw new RangeError("Format string contains an unescaped latin alphabet character `"+a+"`");return i})).join("")}var Z,V="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},tt={exports:{}};Z=tt,function(t){
1
+ import{r as t,c as e,h as n}from"./index-4e926388.js";const i="__WIDGET_GLOBAL_STYLE_CACHE__";function r(t,e){if(t){const n=document.createElement("style");n.innerHTML=e,t.appendChild(n)}}function o(t,e){if(!t||!e)return;const n=new URL(e);fetch(n.href).then((t=>t.text())).then((e=>{const n=document.createElement("style");n.innerHTML=e,t&&t.appendChild(n)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function a(t,e,n,r=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!r)return n=function(t,e){const n=document.createElement("style");return window.emMessageBus.subscribe(e,(e=>{t&&(n.innerHTML=e,t.appendChild(n))}))}(t,e),n;window[i]||(window[i]={}),n=function(t,e){return window.emMessageBus.subscribe(e,(n=>{if(!t)return;const r=t.getRootNode(),o=window[i];let a=o[e]?.sheet;a?o[e].refCount=o[e].refCount+1:(a=new CSSStyleSheet,a.replaceSync(n),o[e]={sheet:a,refCount:1});const s=r.adoptedStyleSheets||[];s.includes(a)||(r.adoptedStyleSheets=[...s,a])}))}(t,e);const o=n.unsubscribe.bind(n);return n.unsubscribe=()=>{if(window[i][e]){const t=window[i][e];t.refCount>1?t.refCount=t.refCount-1:delete window[i][e]}o()},n}function s(t){return s="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},s(t)}function c(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 u(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function l(t){u(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===s(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 f={};function d(){return f}function h(t){u(1,arguments);var e=l(t),n=e.getUTCDay(),i=(n<1?7:0)+n-1;return e.setUTCDate(e.getUTCDate()-i),e.setUTCHours(0,0,0,0),e}function w(t){u(1,arguments);var e=l(t),n=e.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(n+1,0,4),i.setUTCHours(0,0,0,0);var r=h(i),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var a=h(o);return e.getTime()>=r.getTime()?n+1:e.getTime()>=a.getTime()?n:n-1}function v(t,e){var n,i,r,o,a,s,f,h;u(1,arguments);var w=d(),v=c(null!==(n=null!==(i=null!==(r=null!==(o=null==e?void 0:e.weekStartsOn)&&void 0!==o?o:null==e||null===(a=e.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==r?r:w.weekStartsOn)&&void 0!==i?i:null===(f=w.locale)||void 0===f||null===(h=f.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==n?n:0);if(!(v>=0&&v<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var g=l(t),m=g.getUTCDay(),p=(m<v?7:0)+m-v;return g.setUTCDate(g.getUTCDate()-p),g.setUTCHours(0,0,0,0),g}function g(t,e){var n,i,r,o,a,s,f,h;u(1,arguments);var w=l(t),g=w.getUTCFullYear(),m=d(),p=c(null!==(n=null!==(i=null!==(r=null!==(o=null==e?void 0:e.firstWeekContainsDate)&&void 0!==o?o:null==e||null===(a=e.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==r?r:m.firstWeekContainsDate)&&void 0!==i?i:null===(f=m.locale)||void 0===f||null===(h=f.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==n?n:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(g+1,0,p),y.setUTCHours(0,0,0,0);var b=v(y,e),k=new Date(0);k.setUTCFullYear(g,0,p),k.setUTCHours(0,0,0,0);var x=v(k,e);return w.getTime()>=b.getTime()?g+1:w.getTime()>=x.getTime()?g:g-1}function m(t,e){for(var n=t<0?"-":"",i=Math.abs(t).toString();i.length<e;)i="0"+i;return n+i}const p=function(t,e){var n=t.getUTCFullYear(),i=n>0?n:1-n;return m("yy"===e?i%100:i,e.length)},y=function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):m(n+1,2)},b=function(t,e){return m(t.getUTCDate(),e.length)},k=function(t,e){return m(t.getUTCHours()%12||12,e.length)},x=function(t,e){return m(t.getUTCHours(),e.length)},M=function(t,e){return m(t.getUTCMinutes(),e.length)},N=function(t,e){return m(t.getUTCSeconds(),e.length)},T=function(t,e){var n=e.length,i=t.getUTCMilliseconds();return m(Math.floor(i*Math.pow(10,n-3)),e.length)};var S={G:function(t,e,n){var i=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});default:return n.era(i,{width:"wide"})}},y:function(t,e,n){if("yo"===e){var i=t.getUTCFullYear();return n.ordinalNumber(i>0?i:1-i,{unit:"year"})}return p(t,e)},Y:function(t,e,n,i){var r=g(t,i),o=r>0?r:1-r;return"YY"===e?m(o%100,2):"Yo"===e?n.ordinalNumber(o,{unit:"year"}):m(o,e.length)},R:function(t,e){return m(w(t),e.length)},u:function(t,e){return m(t.getUTCFullYear(),e.length)},Q:function(t,e,n){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(i);case"QQ":return m(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,e,n){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(i);case"qq":return m(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,e,n){var i=t.getUTCMonth();switch(e){case"M":case"MM":return y(t,e);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(t,e,n){var i=t.getUTCMonth();switch(e){case"L":return String(i+1);case"LL":return m(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(t,e,n,i){var r=function(t,e){u(1,arguments);var n=l(t),i=v(n,e).getTime()-function(t,e){var n,i,r,o,a,s,l,f;u(1,arguments);var h=d(),w=c(null!==(n=null!==(i=null!==(r=null!==(o=null==e?void 0:e.firstWeekContainsDate)&&void 0!==o?o:null==e||null===(a=e.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==r?r:h.firstWeekContainsDate)&&void 0!==i?i:null===(l=h.locale)||void 0===l||null===(f=l.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==n?n:1),m=g(t,e),p=new Date(0);return p.setUTCFullYear(m,0,w),p.setUTCHours(0,0,0,0),v(p,e)}(n,e).getTime();return Math.round(i/6048e5)+1}(t,i);return"wo"===e?n.ordinalNumber(r,{unit:"week"}):m(r,e.length)},I:function(t,e,n){var i=function(t){u(1,arguments);var e=l(t),n=h(e).getTime()-function(t){u(1,arguments);var e=w(t),n=new Date(0);return n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0),h(n)}(e).getTime();return Math.round(n/6048e5)+1}(t);return"Io"===e?n.ordinalNumber(i,{unit:"week"}):m(i,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):b(t,e)},D:function(t,e,n){var i=function(t){u(1,arguments);var e=l(t),n=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var i=e.getTime();return Math.floor((n-i)/864e5)+1}(t);return"Do"===e?n.ordinalNumber(i,{unit:"dayOfYear"}):m(i,e.length)},E:function(t,e,n){var i=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(t,e,n,i){var r=t.getUTCDay(),o=(r-i.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return m(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},c:function(t,e,n,i){var r=t.getUTCDay(),o=(r-i.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return m(o,e.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(r,{width:"narrow",context:"standalone"});case"cccccc":return n.day(r,{width:"short",context:"standalone"});default:return n.day(r,{width:"wide",context:"standalone"})}},i:function(t,e,n){var i=t.getUTCDay(),r=0===i?7:i;switch(e){case"i":return String(r);case"ii":return m(r,e.length);case"io":return n.ordinalNumber(r,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(t,e,n){var i=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(t,e,n){var i,r=t.getUTCHours();switch(i=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,e,n){var i,r=t.getUTCHours();switch(i=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",e){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){var i=t.getUTCHours()%12;return 0===i&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return k(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):x(t,e)},K:function(t,e,n){var i=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(i,{unit:"hour"}):m(i,e.length)},k:function(t,e,n){var i=t.getUTCHours();return 0===i&&(i=24),"ko"===e?n.ordinalNumber(i,{unit:"hour"}):m(i,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):M(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):N(t,e)},S:function(t,e){return T(t,e)},X:function(t,e,n,i){var r=(i._originalDate||t).getTimezoneOffset();if(0===r)return"Z";switch(e){case"X":return E(r);case"XXXX":case"XX":return C(r);default:return C(r,":")}},x:function(t,e,n,i){var r=(i._originalDate||t).getTimezoneOffset();switch(e){case"x":return E(r);case"xxxx":case"xx":return C(r);default:return C(r,":")}},O:function(t,e,n,i){var r=(i._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+D(r,":");default:return"GMT"+C(r,":")}},z:function(t,e,n,i){var r=(i._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+D(r,":");default:return"GMT"+C(r,":")}},t:function(t,e,n,i){return m(Math.floor((i._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,n,i){return m((i._originalDate||t).getTime(),e.length)}};function D(t,e){var n=t>0?"-":"+",i=Math.abs(t),r=Math.floor(i/60),o=i%60;if(0===o)return n+String(r);var a=e||"";return n+String(r)+a+m(o,2)}function E(t,e){return t%60==0?(t>0?"-":"+")+m(Math.abs(t)/60,2):C(t,e)}function C(t,e){var n=e||"",i=t>0?"-":"+",r=Math.abs(t);return i+m(Math.floor(r/60),2)+n+m(r%60,2)}const P=S;var j=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"})}},I=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"})}},O={p:I,P:function(t,e){var n,i=t.match(/(P+)(p+)?/)||[],r=i[1],o=i[2];if(!o)return j(t,e);switch(r){case"P":n=e.dateTime({width:"short"});break;case"PP":n=e.dateTime({width:"medium"});break;case"PPP":n=e.dateTime({width:"long"});break;default:n=e.dateTime({width:"full"})}return n.replace("{{date}}",j(r,e)).replace("{{time}}",I(o,e))}};const L=O;var G=["D","DD"],W=["YY","YYYY"];function A(t,e,n){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; 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(n,"`; 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(n,"`; 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(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var z={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 Y(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}var B,R={date:Y({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Y({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:Y({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},$={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function _(t){return function(e,n){var i;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&t.formattingValues){var r=t.defaultFormattingWidth||t.defaultWidth,o=null!=n&&n.width?String(n.width):r;i=t.formattingValues[o]||t.formattingValues[r]}else{var a=t.defaultWidth,s=null!=n&&n.width?String(n.width):t.defaultWidth;i=t.values[s]||t.values[a]}return i[t.argumentCallback?t.argumentCallback(e):e]}}function q(t){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.width,r=e.match(i&&t.matchPatterns[i]||t.matchPatterns[t.defaultMatchWidth]);if(!r)return null;var o,a=r[0],s=i&&t.parsePatterns[i]||t.parsePatterns[t.defaultParseWidth],c=Array.isArray(s)?function(t){for(var e=0;e<t.length;e++)if(t[e].test(a))return e}(s):function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].test(a))return e}(s);return o=t.valueCallback?t.valueCallback(c):c,{value:o=n.valueCallback?n.valueCallback(o):o,rest:e.slice(a.length)}}}const Q={code:"en-US",formatDistance:function(t,e,n){var i,r=z[t];return i="string"==typeof r?r:1===e?r.one:r.other.replace("{{count}}",e.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i},formatLong:R,formatRelative:function(t){return $[t]},localize:{ordinalNumber:function(t){var e=Number(t),n=e%100;if(n>20||n<10)switch(n%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:_({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:_({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:_({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:_({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:_({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(B={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]:{},n=t.match(B.matchPattern);if(!n)return null;var i=n[0],r=t.match(B.parsePattern);if(!r)return null;var o=B.valueCallback?B.valueCallback(r[0]):r[0];return{value:o=e.valueCallback?e.valueCallback(o):o,rest:t.slice(i.length)}}),era:q({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:q({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:q({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:q({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:q({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 X=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,F=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,H=/^'([^]*?)'?$/,U=/''/g,J=/[a-zA-Z]/;function K(t,e,n){var i,r,o,a,f,h,w,v,g,m,p,y,b,k,x,M,N,T;u(2,arguments);var S=String(e),D=d(),E=null!==(i=null!==(r=null==n?void 0:n.locale)&&void 0!==r?r:D.locale)&&void 0!==i?i:Q,C=c(null!==(o=null!==(a=null!==(f=null!==(h=null==n?void 0:n.firstWeekContainsDate)&&void 0!==h?h:null==n||null===(w=n.locale)||void 0===w||null===(v=w.options)||void 0===v?void 0:v.firstWeekContainsDate)&&void 0!==f?f:D.firstWeekContainsDate)&&void 0!==a?a:null===(g=D.locale)||void 0===g||null===(m=g.options)||void 0===m?void 0:m.firstWeekContainsDate)&&void 0!==o?o:1);if(!(C>=1&&C<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var j=c(null!==(p=null!==(y=null!==(b=null!==(k=null==n?void 0:n.weekStartsOn)&&void 0!==k?k:null==n||null===(x=n.locale)||void 0===x||null===(M=x.options)||void 0===M?void 0:M.weekStartsOn)&&void 0!==b?b:D.weekStartsOn)&&void 0!==y?y:null===(N=D.locale)||void 0===N||null===(T=N.options)||void 0===T?void 0:T.weekStartsOn)&&void 0!==p?p:0);if(!(j>=0&&j<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!E.localize)throw new RangeError("locale must contain localize property");if(!E.formatLong)throw new RangeError("locale must contain formatLong property");var I=l(t);if(!function(t){if(u(1,arguments),!function(t){return u(1,arguments),t instanceof Date||"object"===s(t)&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t)return!1;var e=l(t);return!isNaN(Number(e))}(I))throw new RangeError("Invalid time value");var O=function(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}(I),z=function(t,e){return u(2,arguments),function(t,e){u(2,arguments);var n=l(t).getTime(),i=c(e);return new Date(n+i)}(t,-c(e))}(I,O),Y={firstWeekContainsDate:C,weekStartsOn:j,locale:E,_originalDate:I};return S.match(F).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,L[e])(t,E.formatLong):t})).join("").match(X).map((function(i){if("''"===i)return"'";var r,o,a=i[0];if("'"===a)return(o=(r=i).match(H))?o[1].replace(U,"'"):r;var s=P[a];if(s)return null!=n&&n.useAdditionalWeekYearTokens||-1===W.indexOf(i)||A(i,e,String(t)),null!=n&&n.useAdditionalDayOfYearTokens||!(-1!==G.indexOf(i))||A(i,e,String(t)),s(z,i,E.localize,Y);if(a.match(J))throw new RangeError("Format string contains an unescaped latin alphabet character `"+a+"`");return i})).join("")}var Z,V="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},tt={exports:{}};Z=tt,function(t){
2
2
  /*!
3
3
  * decimal.js v10.6.0
4
4
  * An arbitrary-precision Decimal type for JavaScript.
@@ -6,4 +6,4 @@ import{r as t,c as e,h as n}from"./index-4e926388.js";const i="__WIDGET_GLOBAL_S
6
6
  * Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
7
7
  * MIT Licence
8
8
  */
9
- var e,n,i,r,o=9e15,a=1e9,s="0123456789abcdef",u="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",c="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",f={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-o,maxE:o,crypto:!1},l=!0,d="[DecimalError] ",h=d+"Invalid argument: ",w=d+"Precision limit exceeded",v=d+"crypto unavailable",g="[object Decimal]",m=Math.floor,p=Math.pow,y=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,b=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,k=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,x=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,M=1e7,N=7,T=u.length-1,S=c.length-1,D={toStringTag:g};function E(t){var e,n,i,r=t.length-1,o="",a=t[0];if(r>0){for(o+=a,e=1;e<r;e++)(n=N-(i=t[e]+"").length)&&(o+=Y(n)),o+=i;(n=N-(i=(a=t[e])+"").length)&&(o+=Y(n))}else if(0===a)return"0";for(;a%10==0;)a/=10;return o+a}function C(t,e,n){if(t!==~~t||t<e||t>n)throw Error(h+t)}function P(t,e,n,i){var r,o,a,s;for(o=t[0];o>=10;o/=10)--e;return--e<0?(e+=N,r=0):(r=Math.ceil((e+1)/N),e%=N),o=p(10,N-e),s=t[r]%o|0,null==i?e<3?(0==e?s=s/100|0:1==e&&(s=s/10|0),a=n<4&&99999==s||n>3&&49999==s||5e4==s||0==s):a=(n<4&&s+1==o||n>3&&s+1==o/2)&&(t[r+1]/o/100|0)==p(10,e-2)-1||(s==o/2||0==s)&&!(t[r+1]/o/100|0):e<4?(0==e?s=s/1e3|0:1==e?s=s/100|0:2==e&&(s=s/10|0),a=(i||n<4)&&9999==s||!i&&n>3&&4999==s):a=((i||n<4)&&s+1==o||!i&&n>3&&s+1==o/2)&&(t[r+1]/o/1e3|0)==p(10,e-3)-1,a}function j(t,e,n){for(var i,r,o=[0],a=0,u=t.length;a<u;){for(r=o.length;r--;)o[r]*=e;for(o[0]+=s.indexOf(t.charAt(a++)),i=0;i<o.length;i++)o[i]>n-1&&(void 0===o[i+1]&&(o[i+1]=0),o[i+1]+=o[i]/n|0,o[i]%=n)}return o.reverse()}D.absoluteValue=D.abs=function(){var t=new this.constructor(this);return t.s<0&&(t.s=1),I(t)},D.ceil=function(){return I(new this.constructor(this),this.e+1,2)},D.clampedTo=D.clamp=function(t,e){var n=this,i=n.constructor;if(t=new i(t),e=new i(e),!t.s||!e.s)return new i(NaN);if(t.gt(e))throw Error(h+e);return n.cmp(t)<0?t:n.cmp(e)>0?e:new i(n)},D.comparedTo=D.cmp=function(t){var e,n,i,r,o=this,a=o.d,s=(t=new o.constructor(t)).d,u=o.s,c=t.s;if(!a||!s)return u&&c?u!==c?u:a===s?0:!a^u<0?1:-1:NaN;if(!a[0]||!s[0])return a[0]?u:s[0]?-c:0;if(u!==c)return u;if(o.e!==t.e)return o.e>t.e^u<0?1:-1;for(e=0,n=(i=a.length)<(r=s.length)?i:r;e<n;++e)if(a[e]!==s[e])return a[e]>s[e]^u<0?1:-1;return i===r?0:i>r^u<0?1:-1},D.cosine=D.cos=function(){var t,e,n=this,i=n.constructor;return n.d?n.d[0]?(e=i.rounding,i.precision=(t=i.precision)+Math.max(n.e,n.sd())+N,i.rounding=1,n=function(t,e){var n,i,r;if(e.isZero())return e;(i=e.d.length)<32?r=(1/H(4,n=Math.ceil(i/3))).toString():(n=16,r="2.3283064365386962890625e-10"),t.precision+=n,e=U(t,1,e.times(r),new t(1));for(var o=n;o--;){var a=e.times(e);e=a.times(a).minus(a).times(8).plus(1)}return t.precision-=n,e}(i,J(i,n)),i.precision=t,i.rounding=e,I(2==r||3==r?n.neg():n,t,e,!0)):new i(1):new i(NaN)},D.cubeRoot=D.cbrt=function(){var t,e,n,i,r,o,a,s,u,c,f=this,d=f.constructor;if(!f.isFinite()||f.isZero())return new d(f);for(l=!1,(o=f.s*p(f.s*f,1/3))&&Math.abs(o)!=1/0?i=new d(o.toString()):(n=E(f.d),(o=((t=f.e)-n.length+1)%3)&&(n+=1==o||-2==o?"0":"00"),o=p(n,1/3),t=m((t+1)/3)-(t%3==(t<0?-1:2)),(i=new d(n=o==1/0?"5e"+t:(n=o.toExponential()).slice(0,n.indexOf("e")+1)+t)).s=f.s),a=(t=d.precision)+3;;)if(c=(u=(s=i).times(s).times(s)).plus(f),i=O(c.plus(f).times(s),c.plus(u),a+2,1),E(s.d).slice(0,a)===(n=E(i.d)).slice(0,a)){if("9999"!=(n=n.slice(a-3,a+1))&&(r||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(I(i,t+1,1),e=!i.times(i).times(i).eq(f));break}if(!r&&(I(s,t+1,0),s.times(s).times(s).eq(f))){i=s;break}a+=4,r=1}return l=!0,I(i,t,d.rounding,e)},D.decimalPlaces=D.dp=function(){var t,e=this.d,n=NaN;if(e){if(n=((t=e.length-1)-m(this.e/N))*N,t=e[t])for(;t%10==0;t/=10)n--;n<0&&(n=0)}return n},D.dividedBy=D.div=function(t){return O(this,new this.constructor(t))},D.dividedToIntegerBy=D.divToInt=function(t){var e=this.constructor;return I(O(this,new e(t),0,1,1),e.precision,e.rounding)},D.equals=D.eq=function(t){return 0===this.cmp(t)},D.floor=function(){return I(new this.constructor(this),this.e+1,3)},D.greaterThan=D.gt=function(t){return this.cmp(t)>0},D.greaterThanOrEqualTo=D.gte=function(t){var e=this.cmp(t);return 1==e||0===e},D.hyperbolicCosine=D.cosh=function(){var t,e,n,i,r,o=this,a=o.constructor,s=new a(1);if(!o.isFinite())return new a(o.s?1/0:NaN);if(o.isZero())return s;i=a.rounding,a.precision=(n=a.precision)+Math.max(o.e,o.sd())+4,a.rounding=1,(r=o.d.length)<32?e=(1/H(4,t=Math.ceil(r/3))).toString():(t=16,e="2.3283064365386962890625e-10"),o=U(a,1,o.times(e),new a(1),!0);for(var u,c=t,f=new a(8);c--;)u=o.times(o),o=s.minus(u.times(f.minus(u.times(f))));return I(o,a.precision=n,a.rounding=i,!0)},D.hyperbolicSine=D.sinh=function(){var t,e,n,i,r=this,o=r.constructor;if(!r.isFinite()||r.isZero())return new o(r);if(n=o.rounding,o.precision=(e=o.precision)+Math.max(r.e,r.sd())+4,o.rounding=1,(i=r.d.length)<3)r=U(o,2,r,r,!0);else{t=1.4*Math.sqrt(i),r=U(o,2,r=r.times(1/H(5,t=t>16?16:0|t)),r,!0);for(var a,s=new o(5),u=new o(16),c=new o(20);t--;)a=r.times(r),r=r.times(s.plus(a.times(u.times(a).plus(c))))}return o.precision=e,o.rounding=n,I(r,e,n,!0)},D.hyperbolicTangent=D.tanh=function(){var t,e,n=this,i=n.constructor;return n.isFinite()?n.isZero()?new i(n):(e=i.rounding,i.precision=(t=i.precision)+7,i.rounding=1,O(n.sinh(),n.cosh(),i.precision=t,i.rounding=e)):new i(n.s)},D.inverseCosine=D.acos=function(){var t=this,e=t.constructor,n=t.abs().cmp(1),i=e.precision,r=e.rounding;return-1!==n?0===n?t.isNeg()?A(e,i,r):new e(0):new e(NaN):t.isZero()?A(e,i+4,r).times(.5):(e.precision=i+6,e.rounding=1,t=new e(1).minus(t).div(t.plus(1)).sqrt().atan(),e.precision=i,e.rounding=r,t.times(2))},D.inverseHyperbolicCosine=D.acosh=function(){var t,e,n=this,i=n.constructor;return n.lte(1)?new i(n.eq(1)?0:NaN):n.isFinite()?(e=i.rounding,i.precision=(t=i.precision)+Math.max(Math.abs(n.e),n.sd())+4,i.rounding=1,l=!1,n=n.times(n).minus(1).sqrt().plus(n),l=!0,i.precision=t,i.rounding=e,n.ln()):new i(n)},D.inverseHyperbolicSine=D.asinh=function(){var t,e,n=this,i=n.constructor;return!n.isFinite()||n.isZero()?new i(n):(e=i.rounding,i.precision=(t=i.precision)+2*Math.max(Math.abs(n.e),n.sd())+6,i.rounding=1,l=!1,n=n.times(n).plus(1).sqrt().plus(n),l=!0,i.precision=t,i.rounding=e,n.ln())},D.inverseHyperbolicTangent=D.atanh=function(){var t,e,n,i,r=this,o=r.constructor;return r.isFinite()?r.e>=0?new o(r.abs().eq(1)?r.s/0:r.isZero()?r:NaN):(t=o.precision,e=o.rounding,i=r.sd(),Math.max(i,t)<2*-r.e-1?I(new o(r),t,e,!0):(o.precision=n=i-r.e,r=O(r.plus(1),new o(1).minus(r),n+t,1),o.precision=t+4,o.rounding=1,r=r.ln(),o.precision=t,o.rounding=e,r.times(.5))):new o(NaN)},D.inverseSine=D.asin=function(){var t,e,n,i,r=this,o=r.constructor;return r.isZero()?new o(r):(e=r.abs().cmp(1),n=o.precision,i=o.rounding,-1!==e?0===e?((t=A(o,n+4,i).times(.5)).s=r.s,t):new o(NaN):(o.precision=n+6,o.rounding=1,r=r.div(new o(1).minus(r.times(r)).sqrt().plus(1)).atan(),o.precision=n,o.rounding=i,r.times(2)))},D.inverseTangent=D.atan=function(){var t,e,n,i,r,o,a,s,u,c=this,f=c.constructor,d=f.precision,h=f.rounding;if(c.isFinite()){if(c.isZero())return new f(c);if(c.abs().eq(1)&&d+4<=S)return(a=A(f,d+4,h).times(.25)).s=c.s,a}else{if(!c.s)return new f(NaN);if(d+4<=S)return(a=A(f,d+4,h).times(.5)).s=c.s,a}for(f.precision=s=d+10,f.rounding=1,t=n=Math.min(28,s/N+2|0);t;--t)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(l=!1,e=Math.ceil(s/N),i=1,u=c.times(c),a=new f(c),r=c;-1!==t;)if(r=r.times(u),o=a.minus(r.div(i+=2)),r=r.times(u),void 0!==(a=o.plus(r.div(i+=2))).d[e])for(t=e;a.d[t]===o.d[t]&&t--;);return n&&(a=a.times(2<<n-1)),l=!0,I(a,f.precision=d,f.rounding=h,!0)},D.isFinite=function(){return!!this.d},D.isInteger=D.isInt=function(){return!!this.d&&m(this.e/N)>this.d.length-2},D.isNaN=function(){return!this.s},D.isNegative=D.isNeg=function(){return this.s<0},D.isPositive=D.isPos=function(){return this.s>0},D.isZero=function(){return!!this.d&&0===this.d[0]},D.lessThan=D.lt=function(t){return this.cmp(t)<0},D.lessThanOrEqualTo=D.lte=function(t){return this.cmp(t)<1},D.logarithm=D.log=function(t){var e,n,i,r,o,a,s,u,c=this,f=c.constructor,d=f.precision,h=f.rounding;if(null==t)t=new f(10),e=!0;else{if(n=(t=new f(t)).d,t.s<0||!n||!n[0]||t.eq(1))return new f(NaN);e=t.eq(10)}if(n=c.d,c.s<0||!n||!n[0]||c.eq(1))return new f(n&&!n[0]?-1/0:1!=c.s?NaN:n?0:1/0);if(e)if(n.length>1)o=!0;else{for(r=n[0];r%10==0;)r/=10;o=1!==r}if(l=!1,a=q(c,s=d+5),i=e?W(f,s+10):q(t,s),P((u=O(a,i,s,1)).d,r=d,h))do{if(a=q(c,s+=10),i=e?W(f,s+10):q(t,s),u=O(a,i,s,1),!o){+E(u.d).slice(r+1,r+15)+1==1e14&&(u=I(u,d+1,0));break}}while(P(u.d,r+=10,h));return l=!0,I(u,d,h)},D.minus=D.sub=function(t){var e,n,i,r,o,a,s,u,c,f,d,h,w=this,v=w.constructor;if(t=new v(t),!w.d||!t.d)return w.s&&t.s?w.d?t.s=-t.s:t=new v(t.d||w.s!==t.s?w:NaN):t=new v(NaN),t;if(w.s!=t.s)return t.s=-t.s,w.plus(t);if(h=t.d,s=v.precision,u=v.rounding,!(c=w.d)[0]||!h[0]){if(h[0])t.s=-t.s;else{if(!c[0])return new v(3===u?-0:0);t=new v(w)}return l?I(t,s,u):t}if(n=m(t.e/N),f=m(w.e/N),c=c.slice(),o=f-n){for((d=o<0)?(e=c,o=-o,a=h.length):(e=h,n=f,a=c.length),o>(i=Math.max(Math.ceil(s/N),a)+2)&&(o=i,e.length=1),e.reverse(),i=o;i--;)e.push(0);e.reverse()}else{for((d=(i=c.length)<(a=h.length))&&(a=i),i=0;i<a;i++)if(c[i]!=h[i]){d=c[i]<h[i];break}o=0}for(d&&(e=c,c=h,h=e,t.s=-t.s),i=h.length-(a=c.length);i>0;--i)c[a++]=0;for(i=h.length;i>o;){if(c[--i]<h[i]){for(r=i;r&&0===c[--r];)c[r]=M-1;--c[r],c[i]+=M}c[i]-=h[i]}for(;0===c[--a];)c.pop();for(;0===c[0];c.shift())--n;return c[0]?(t.d=c,t.e=G(c,n),l?I(t,s,u):t):new v(3===u?-0:0)},D.modulo=D.mod=function(t){var e,n=this,i=n.constructor;return t=new i(t),!n.d||!t.s||t.d&&!t.d[0]?new i(NaN):!t.d||n.d&&!n.d[0]?I(new i(n),i.precision,i.rounding):(l=!1,9==i.modulo?(e=O(n,t.abs(),0,3,1)).s*=t.s:e=O(n,t,0,i.modulo,1),e=e.times(t),l=!0,n.minus(e))},D.naturalExponential=D.exp=function(){return _(this)},D.naturalLogarithm=D.ln=function(){return q(this)},D.negated=D.neg=function(){var t=new this.constructor(this);return t.s=-t.s,I(t)},D.plus=D.add=function(t){var e,n,i,r,o,a,s,u,c,f,d=this,h=d.constructor;if(t=new h(t),!d.d||!t.d)return d.s&&t.s?d.d||(t=new h(t.d||d.s===t.s?d:NaN)):t=new h(NaN),t;if(d.s!=t.s)return t.s=-t.s,d.minus(t);if(f=t.d,s=h.precision,u=h.rounding,!(c=d.d)[0]||!f[0])return f[0]||(t=new h(d)),l?I(t,s,u):t;if(o=m(d.e/N),i=m(t.e/N),c=c.slice(),r=o-i){for(r<0?(n=c,r=-r,a=f.length):(n=f,i=o,a=c.length),r>(a=(o=Math.ceil(s/N))>a?o+1:a+1)&&(r=a,n.length=1),n.reverse();r--;)n.push(0);n.reverse()}for((a=c.length)-(r=f.length)<0&&(r=a,n=f,f=c,c=n),e=0;r;)e=(c[--r]=c[r]+f[r]+e)/M|0,c[r]%=M;for(e&&(c.unshift(e),++i),a=c.length;0==c[--a];)c.pop();return t.d=c,t.e=G(c,i),l?I(t,s,u):t},D.precision=D.sd=function(t){var e,n=this;if(void 0!==t&&t!==!!t&&1!==t&&0!==t)throw Error(h+t);return n.d?(e=z(n.d),t&&n.e+1>e&&(e=n.e+1)):e=NaN,e},D.round=function(){var t=this,e=t.constructor;return I(new e(t),t.e+1,e.rounding)},D.sine=D.sin=function(){var t,e,n=this,i=n.constructor;return n.isFinite()?n.isZero()?new i(n):(e=i.rounding,i.precision=(t=i.precision)+Math.max(n.e,n.sd())+N,i.rounding=1,n=function(t,e){var n,i=e.d.length;if(i<3)return e.isZero()?e:U(t,2,e,e);n=1.4*Math.sqrt(i),e=U(t,2,e=e.times(1/H(5,n=n>16?16:0|n)),e);for(var r,o=new t(5),a=new t(16),s=new t(20);n--;)r=e.times(e),e=e.times(o.plus(r.times(a.times(r).minus(s))));return e}(i,J(i,n)),i.precision=t,i.rounding=e,I(r>2?n.neg():n,t,e,!0)):new i(NaN)},D.squareRoot=D.sqrt=function(){var t,e,n,i,r,o,a=this,s=a.d,u=a.e,c=a.s,f=a.constructor;if(1!==c||!s||!s[0])return new f(!c||c<0&&(!s||s[0])?NaN:s?a:1/0);for(l=!1,0==(c=Math.sqrt(+a))||c==1/0?(((e=E(s)).length+u)%2==0&&(e+="0"),c=Math.sqrt(e),u=m((u+1)/2)-(u<0||u%2),i=new f(e=c==1/0?"5e"+u:(e=c.toExponential()).slice(0,e.indexOf("e")+1)+u)):i=new f(c.toString()),n=(u=f.precision)+3;;)if(i=(o=i).plus(O(a,o,n+2,1)).times(.5),E(o.d).slice(0,n)===(e=E(i.d)).slice(0,n)){if("9999"!=(e=e.slice(n-3,n+1))&&(r||"4999"!=e)){+e&&(+e.slice(1)||"5"!=e.charAt(0))||(I(i,u+1,1),t=!i.times(i).eq(a));break}if(!r&&(I(o,u+1,0),o.times(o).eq(a))){i=o;break}n+=4,r=1}return l=!0,I(i,u,f.rounding,t)},D.tangent=D.tan=function(){var t,e,n=this,i=n.constructor;return n.isFinite()?n.isZero()?new i(n):(e=i.rounding,i.precision=(t=i.precision)+10,i.rounding=1,(n=n.sin()).s=1,n=O(n,new i(1).minus(n.times(n)).sqrt(),t+10,0),i.precision=t,i.rounding=e,I(2==r||4==r?n.neg():n,t,e,!0)):new i(NaN)},D.times=D.mul=function(t){var e,n,i,r,o,a,s,u,c,f=this,d=f.constructor,h=f.d,w=(t=new d(t)).d;if(t.s*=f.s,!(h&&h[0]&&w&&w[0]))return new d(!t.s||h&&!h[0]&&!w||w&&!w[0]&&!h?NaN:h&&w?0*t.s:t.s/0);for(n=m(f.e/N)+m(t.e/N),(u=h.length)<(c=w.length)&&(o=h,h=w,w=o,a=u,u=c,c=a),o=[],i=a=u+c;i--;)o.push(0);for(i=c;--i>=0;){for(e=0,r=u+i;r>i;)s=o[r]+w[i]*h[r-i-1]+e,o[r--]=s%M|0,e=s/M|0;o[r]=(o[r]+e)%M|0}for(;!o[--a];)o.pop();return e?++n:o.shift(),t.d=o,t.e=G(o,n),l?I(t,d.precision,d.rounding):t},D.toBinary=function(t,e){return K(this,2,t,e)},D.toDecimalPlaces=D.toDP=function(t,e){var n=this,i=n.constructor;return n=new i(n),void 0===t?n:(C(t,0,a),void 0===e?e=i.rounding:C(e,0,8),I(n,t+n.e+1,e))},D.toExponential=function(t,e){var n,i=this,r=i.constructor;return void 0===t?n=L(i,!0):(C(t,0,a),void 0===e?e=r.rounding:C(e,0,8),n=L(i=I(new r(i),t+1,e),!0,t+1)),i.isNeg()&&!i.isZero()?"-"+n:n},D.toFixed=function(t,e){var n,i,r=this,o=r.constructor;return void 0===t?n=L(r):(C(t,0,a),void 0===e?e=o.rounding:C(e,0,8),n=L(i=I(new o(r),t+r.e+1,e),!1,t+i.e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},D.toFraction=function(t){var e,n,i,r,o,a,s,u,c,f,d,w,v=this,g=v.d,m=v.constructor;if(!g)return new m(v);if(c=n=new m(1),i=u=new m(0),o=(e=new m(i)).e=z(g)-v.e-1,e.d[0]=p(10,(a=o%N)<0?N+a:a),null==t)t=o>0?e:c;else{if(!(s=new m(t)).isInt()||s.lt(c))throw Error(h+s);t=s.gt(e)?o>0?e:c:s}for(l=!1,s=new m(E(g)),f=m.precision,m.precision=o=g.length*N*2;d=O(s,e,0,1,1),1!=(r=n.plus(d.times(i))).cmp(t);)n=i,i=r,c=u.plus(d.times(r=c)),u=r,e=s.minus(d.times(r=e)),s=r;return r=O(t.minus(n),i,0,1,1),u=u.plus(r.times(c)),n=n.plus(r.times(i)),u.s=c.s=v.s,w=O(c,i,o,1).minus(v).abs().cmp(O(u,n,o,1).minus(v).abs())<1?[c,i]:[u,n],m.precision=f,l=!0,w},D.toHexadecimal=D.toHex=function(t,e){return K(this,16,t,e)},D.toNearest=function(t,e){var n=this,i=n.constructor;if(n=new i(n),null==t){if(!n.d)return n;t=new i(1),e=i.rounding}else{if(t=new i(t),void 0===e?e=i.rounding:C(e,0,8),!n.d)return t.s?n:t;if(!t.d)return t.s&&(t.s=n.s),t}return t.d[0]?(l=!1,n=O(n,t,0,e,1).times(t),l=!0,I(n)):(t.s=n.s,n=t),n},D.toNumber=function(){return+this},D.toOctal=function(t,e){return K(this,8,t,e)},D.toPower=D.pow=function(t){var e,n,i,r,o,a,s=this,u=s.constructor,c=+(t=new u(t));if(!(s.d&&t.d&&s.d[0]&&t.d[0]))return new u(p(+s,c));if((s=new u(s)).eq(1))return s;if(i=u.precision,o=u.rounding,t.eq(1))return I(s,i,o);if((e=m(t.e/N))>=t.d.length-1&&(n=c<0?-c:c)<=9007199254740991)return r=B(u,s,n,i),t.s<0?new u(1).div(r):I(r,i,o);if((a=s.s)<0){if(e<t.d.length-1)return new u(NaN);if(1&t.d[e]||(a=1),0==s.e&&1==s.d[0]&&1==s.d.length)return s.s=a,s}return(e=0!=(n=p(+s,c))&&isFinite(n)?new u(n+"").e:m(c*(Math.log("0."+E(s.d))/Math.LN10+s.e+1)))>u.maxE+1||e<u.minE-1?new u(e>0?a/0:0):(l=!1,u.rounding=s.s=1,n=Math.min(12,(e+"").length),(r=_(t.times(q(s,i+n)),i)).d&&P((r=I(r,i+5,1)).d,i,o)&&+E((r=I(_(t.times(q(s,(e=i+10)+n)),e),e+5,1)).d).slice(i+1,i+15)+1==1e14&&(r=I(r,i+1,0)),r.s=a,l=!0,u.rounding=o,I(r,i,o))},D.toPrecision=function(t,e){var n,i=this,r=i.constructor;return void 0===t?n=L(i,i.e<=r.toExpNeg||i.e>=r.toExpPos):(C(t,1,a),void 0===e?e=r.rounding:C(e,0,8),n=L(i=I(new r(i),t,e),t<=i.e||i.e<=r.toExpNeg,t)),i.isNeg()&&!i.isZero()?"-"+n:n},D.toSignificantDigits=D.toSD=function(t,e){var n=this.constructor;return void 0===t?(t=n.precision,e=n.rounding):(C(t,1,a),void 0===e?e=n.rounding:C(e,0,8)),I(new n(this),t,e)},D.toString=function(){var t=this,e=t.constructor,n=L(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()&&!t.isZero()?"-"+n:n},D.truncated=D.trunc=function(){return I(new this.constructor(this),this.e+1,1)},D.valueOf=D.toJSON=function(){var t=this,e=t.constructor,n=L(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()?"-"+n:n};var O=function(){function t(t,e,n){var i,r=0,o=t.length;for(t=t.slice();o--;)t[o]=(i=t[o]*e+r)%n|0,r=i/n|0;return r&&t.unshift(r),t}function e(t,e,n,i){var r,o;if(n!=i)o=n>i?1:-1;else for(r=o=0;r<n;r++)if(t[r]!=e[r]){o=t[r]>e[r]?1:-1;break}return o}function i(t,e,n,i){for(var r=0;n--;)t[n]-=r,t[n]=(r=t[n]<e[n]?1:0)*i+t[n]-e[n];for(;!t[0]&&t.length>1;)t.shift()}return function(r,o,a,s,u,c){var f,l,d,h,w,v,g,p,y,b,k,x,T,S,D,E,C,P,j,O,L=r.constructor,G=r.s==o.s?1:-1,W=r.d,A=o.d;if(!(W&&W[0]&&A&&A[0]))return new L(r.s&&o.s&&(W?!A||W[0]!=A[0]:A)?W&&0==W[0]||!A?0*G:G/0:NaN);for(c?(w=1,l=r.e-o.e):(c=M,l=m(r.e/(w=N))-m(o.e/w)),j=A.length,C=W.length,b=(y=new L(G)).d=[],d=0;A[d]==(W[d]||0);d++);if(A[d]>(W[d]||0)&&l--,null==a?(S=a=L.precision,s=L.rounding):S=u?a+(r.e-o.e)+1:a,S<0)b.push(1),v=!0;else{if(S=S/w+2|0,d=0,1==j){for(h=0,A=A[0],S++;(d<C||h)&&S--;d++)b[d]=(D=h*c+(W[d]||0))/A|0,h=D%A|0;v=h||d<C}else{for((h=c/(A[0]+1)|0)>1&&(A=t(A,h,c),W=t(W,h,c),j=A.length,C=W.length),E=j,x=(k=W.slice(0,j)).length;x<j;)k[x++]=0;(O=A.slice()).unshift(0),P=A[0],A[1]>=c/2&&++P;do{h=0,(f=e(A,k,j,x))<0?(T=k[0],j!=x&&(T=T*c+(k[1]||0)),(h=T/P|0)>1?(h>=c&&(h=c-1),1==(f=e(g=t(A,h,c),k,p=g.length,x=k.length))&&(h--,i(g,j<p?O:A,p,c))):(0==h&&(f=h=1),g=A.slice()),(p=g.length)<x&&g.unshift(0),i(k,g,x,c),-1==f&&(f=e(A,k,j,x=k.length))<1&&(h++,i(k,j<x?O:A,x,c)),x=k.length):0===f&&(h++,k=[0]),b[d++]=h,f&&k[0]?k[x++]=W[E]||0:(k=[W[E]],x=1)}while((E++<C||void 0!==k[0])&&S--);v=void 0!==k[0]}b[0]||b.shift()}if(1==w)y.e=l,n=v;else{for(d=1,h=b[0];h>=10;h/=10)d++;y.e=d+l*w-1,I(y,u?a+y.e+1:a,s,v)}return y}}();function I(t,e,n,i){var r,o,a,s,u,c,f,d,h,w=t.constructor;t:if(null!=e){if(!(d=t.d))return t;for(r=1,s=d[0];s>=10;s/=10)r++;if((o=e-r)<0)o+=N,u=(f=d[h=0])/p(10,r-(a=e)-1)%10|0;else if((h=Math.ceil((o+1)/N))>=(s=d.length)){if(!i)break t;for(;s++<=h;)d.push(0);f=u=0,r=1,a=(o%=N)-N+1}else{for(f=s=d[h],r=1;s>=10;s/=10)r++;u=(a=(o%=N)-N+r)<0?0:f/p(10,r-a-1)%10|0}if(i=i||e<0||void 0!==d[h+1]||(a<0?f:f%p(10,r-a-1)),c=n<4?(u||i)&&(0==n||n==(t.s<0?3:2)):u>5||5==u&&(4==n||i||6==n&&(o>0?a>0?f/p(10,r-a):0:d[h-1])%10&1||n==(t.s<0?8:7)),e<1||!d[0])return d.length=0,c?(d[0]=p(10,(N-(e-=t.e+1)%N)%N),t.e=-e||0):d[0]=t.e=0,t;if(0==o?(d.length=h,s=1,h--):(d.length=h+1,s=p(10,N-o),d[h]=a>0?(f/p(10,r-a)%p(10,a)|0)*s:0),c)for(;;){if(0==h){for(o=1,a=d[0];a>=10;a/=10)o++;for(a=d[0]+=s,s=1;a>=10;a/=10)s++;o!=s&&(t.e++,d[0]==M&&(d[0]=1));break}if(d[h]+=s,d[h]!=M)break;d[h--]=0,s=1}for(o=d.length;0===d[--o];)d.pop()}return l&&(t.e>w.maxE?(t.d=null,t.e=NaN):t.e<w.minE&&(t.e=0,t.d=[0])),t}function L(t,e,n){if(!t.isFinite())return Q(t);var i,r=t.e,o=E(t.d),a=o.length;return e?(n&&(i=n-a)>0?o=o.charAt(0)+"."+o.slice(1)+Y(i):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(t.e<0?"e":"e+")+t.e):r<0?(o="0."+Y(-r-1)+o,n&&(i=n-a)>0&&(o+=Y(i))):r>=a?(o+=Y(r+1-a),n&&(i=n-r-1)>0&&(o=o+"."+Y(i))):((i=r+1)<a&&(o=o.slice(0,i)+"."+o.slice(i)),n&&(i=n-a)>0&&(r+1===a&&(o+="."),o+=Y(i))),o}function G(t,e){var n=t[0];for(e*=N;n>=10;n/=10)e++;return e}function W(t,e,n){if(e>T)throw l=!0,n&&(t.precision=n),Error(w);return I(new t(u),e,1,!0)}function A(t,e,n){if(e>S)throw Error(w);return I(new t(c),e,n,!0)}function z(t){var e=t.length-1,n=e*N+1;if(e=t[e]){for(;e%10==0;e/=10)n--;for(e=t[0];e>=10;e/=10)n++}return n}function Y(t){for(var e="";t--;)e+="0";return e}function B(t,e,n,i){var r,o=new t(1),a=Math.ceil(i/N+4);for(l=!1;;){if(n%2&&V((o=o.times(e)).d,a)&&(r=!0),0===(n=m(n/2))){n=o.d.length-1,r&&0===o.d[n]&&++o.d[n];break}V((e=e.times(e)).d,a)}return l=!0,o}function R(t){return 1&t.d[t.d.length-1]}function $(t,e,n){for(var i,r,o=new t(e[0]),a=0;++a<e.length;){if(!(r=new t(e[a])).s){o=r;break}((i=o.cmp(r))===n||0===i&&o.s===n)&&(o=r)}return o}function _(t,e){var n,i,r,o,a,s,u,c=0,f=0,d=0,h=t.constructor,w=h.rounding,v=h.precision;if(!t.d||!t.d[0]||t.e>17)return new h(t.d?t.d[0]?t.s<0?0:1/0:1:t.s?t.s<0?0:t:NaN);for(null==e?(l=!1,u=v):u=e,s=new h(.03125);t.e>-2;)t=t.times(s),d+=5;for(u+=i=Math.log(p(2,d))/Math.LN10*2+5|0,n=o=a=new h(1),h.precision=u;;){if(o=I(o.times(t),u,1),n=n.times(++f),E((s=a.plus(O(o,n,u,1))).d).slice(0,u)===E(a.d).slice(0,u)){for(r=d;r--;)a=I(a.times(a),u,1);if(null!=e)return h.precision=v,a;if(!(c<3&&P(a.d,u-i,w,c)))return I(a,h.precision=v,w,l=!0);h.precision=u+=10,n=o=s=new h(1),f=0,c++}a=s}}function q(t,e){var n,i,r,o,a,s,u,c,f,d,h,w=1,v=t,g=v.d,m=v.constructor,p=m.rounding,y=m.precision;if(v.s<0||!g||!g[0]||!v.e&&1==g[0]&&1==g.length)return new m(g&&!g[0]?-1/0:1!=v.s?NaN:g?0:v);if(null==e?(l=!1,f=y):f=e,m.precision=f+=10,i=(n=E(g)).charAt(0),!(Math.abs(o=v.e)<15e14))return c=W(m,f+2,y).times(o+""),v=q(new m(i+"."+n.slice(1)),f-10).plus(c),m.precision=y,null==e?I(v,y,p,l=!0):v;for(;i<7&&1!=i||1==i&&n.charAt(1)>3;)i=(n=E((v=v.times(t)).d)).charAt(0),w++;for(o=v.e,i>1?(v=new m("0."+n),o++):v=new m(i+"."+n.slice(1)),d=v,u=a=v=O(v.minus(1),v.plus(1),f,1),h=I(v.times(v),f,1),r=3;;){if(a=I(a.times(h),f,1),E((c=u.plus(O(a,new m(r),f,1))).d).slice(0,f)===E(u.d).slice(0,f)){if(u=u.times(2),0!==o&&(u=u.plus(W(m,f+2,y).times(o+""))),u=O(u,new m(w),f,1),null!=e)return m.precision=y,u;if(!P(u.d,f-10,p,s))return I(u,m.precision=y,p,l=!0);m.precision=f+=10,c=a=v=O(d.minus(1),d.plus(1),f,1),h=I(v.times(v),f,1),r=s=1}u=c,r+=2}}function Q(t){return String(t.s*t.s/0)}function X(t,e){var n,i,r;for((n=e.indexOf("."))>-1&&(e=e.replace(".","")),(i=e.search(/e/i))>0?(n<0&&(n=i),n+=+e.slice(i+1),e=e.substring(0,i)):n<0&&(n=e.length),i=0;48===e.charCodeAt(i);i++);for(r=e.length;48===e.charCodeAt(r-1);--r);if(e=e.slice(i,r)){if(r-=i,t.e=n=n-i-1,t.d=[],i=(n+1)%N,n<0&&(i+=N),i<r){for(i&&t.d.push(+e.slice(0,i)),r-=N;i<r;)t.d.push(+e.slice(i,i+=N));e=e.slice(i),i=N-e.length}else i-=r;for(;i--;)e+="0";t.d.push(+e),l&&(t.e>t.constructor.maxE?(t.d=null,t.e=NaN):t.e<t.constructor.minE&&(t.e=0,t.d=[0]))}else t.e=0,t.d=[0];return t}function F(t,n){var i,r,o,a,s,u,c,f,d;if(n.indexOf("_")>-1){if(n=n.replace(/(\d)_(?=\d)/g,"$1"),x.test(n))return X(t,n)}else if("Infinity"===n||"NaN"===n)return+n||(t.s=NaN),t.e=NaN,t.d=null,t;if(b.test(n))i=16,n=n.toLowerCase();else if(y.test(n))i=2;else{if(!k.test(n))throw Error(h+n);i=8}for((a=n.search(/p/i))>0?(c=+n.slice(a+1),n=n.substring(2,a)):n=n.slice(2),a=n.indexOf("."),r=t.constructor,(s=a>=0)&&(a=(u=(n=n.replace(".","")).length)-a,o=B(r,new r(i),a,2*a)),a=d=(f=j(n,i,M)).length-1;0===f[a];--a)f.pop();return a<0?new r(0*t.s):(t.e=G(f,d),t.d=f,l=!1,s&&(t=O(t,o,4*u)),c&&(t=t.times(Math.abs(c)<54?p(2,c):e.pow(2,c))),l=!0,t)}function U(t,e,n,i,r){var o,a,s,u,c=t.precision,f=Math.ceil(c/N);for(l=!1,u=n.times(n),s=new t(i);;){if(a=O(s.times(u),new t(e++*e++),c,1),s=r?i.plus(a):i.minus(a),i=O(a.times(u),new t(e++*e++),c,1),void 0!==(a=s.plus(i)).d[f]){for(o=f;a.d[o]===s.d[o]&&o--;);if(-1==o)break}o=s,s=i,i=a,a=o}return l=!0,a.d.length=f+1,a}function H(t,e){for(var n=t;--e;)n*=t;return n}function J(t,e){var n,i=e.s<0,o=A(t,t.precision,1),a=o.times(.5);if((e=e.abs()).lte(a))return r=i?4:1,e;if((n=e.divToInt(o)).isZero())r=i?3:2;else{if((e=e.minus(n.times(o))).lte(a))return r=R(n)?i?2:3:i?4:1,e;r=R(n)?i?1:4:i?3:2}return e.minus(o).abs()}function K(t,e,i,r){var o,u,c,f,l,d,h,w,v,g=t.constructor,m=void 0!==i;if(m?(C(i,1,a),void 0===r?r=g.rounding:C(r,0,8)):(i=g.precision,r=g.rounding),t.isFinite()){for(m?(o=2,16==e?i=4*i-3:8==e&&(i=3*i-2)):o=e,(c=(h=L(t)).indexOf("."))>=0&&(h=h.replace(".",""),(v=new g(1)).e=h.length-c,v.d=j(L(v),10,o),v.e=v.d.length),u=l=(w=j(h,10,o)).length;0==w[--l];)w.pop();if(w[0]){if(c<0?u--:((t=new g(t)).d=w,t.e=u,w=(t=O(t,v,i,r,0,o)).d,u=t.e,d=n),c=w[i],f=o/2,d=d||void 0!==w[i+1],d=r<4?(void 0!==c||d)&&(0===r||r===(t.s<0?3:2)):c>f||c===f&&(4===r||d||6===r&&1&w[i-1]||r===(t.s<0?8:7)),w.length=i,d)for(;++w[--i]>o-1;)w[i]=0,i||(++u,w.unshift(1));for(l=w.length;!w[l-1];--l);for(c=0,h="";c<l;c++)h+=s.charAt(w[c]);if(m){if(l>1)if(16==e||8==e){for(c=16==e?4:3,--l;l%c;l++)h+="0";for(l=(w=j(h,o,e)).length;!w[l-1];--l);for(c=1,h="1.";c<l;c++)h+=s.charAt(w[c])}else h=h.charAt(0)+"."+h.slice(1);h=h+(u<0?"p":"p+")+u}else if(u<0){for(;++u;)h="0"+h;h="0."+h}else if(++u>l)for(u-=l;u--;)h+="0";else u<l&&(h=h.slice(0,u)+"."+h.slice(u))}else h=m?"0p+0":"0";h=(16==e?"0x":2==e?"0b":8==e?"0o":"")+h}else h=Q(t);return t.s<0?"-"+h:h}function V(t,e){if(t.length>e)return t.length=e,!0}function tt(t){return new this(t).abs()}function et(t){return new this(t).acos()}function nt(t){return new this(t).acosh()}function it(t,e){return new this(t).plus(e)}function rt(t){return new this(t).asin()}function ot(t){return new this(t).asinh()}function at(t){return new this(t).atan()}function st(t){return new this(t).atanh()}function ut(t,e){t=new this(t),e=new this(e);var n,i=this.precision,r=this.rounding,o=i+4;return t.s&&e.s?t.d||e.d?!e.d||t.isZero()?(n=e.s<0?A(this,i,r):new this(0)).s=t.s:!t.d||e.isZero()?(n=A(this,o,1).times(.5)).s=t.s:e.s<0?(this.precision=o,this.rounding=1,n=this.atan(O(t,e,o,1)),e=A(this,o,1),this.precision=i,this.rounding=r,n=t.s<0?n.minus(e):n.plus(e)):n=this.atan(O(t,e,o,1)):(n=A(this,o,1).times(e.s>0?.25:.75)).s=t.s:n=new this(NaN),n}function ct(t){return new this(t).cbrt()}function ft(t){return I(t=new this(t),t.e+1,2)}function lt(t,e,n){return new this(t).clamp(e,n)}function dt(t){if(!t||"object"!=typeof t)throw Error(d+"Object expected");var e,n,i,r=!0===t.defaults,s=["precision",1,a,"rounding",0,8,"toExpNeg",-o,0,"toExpPos",0,o,"maxE",0,o,"minE",-o,0,"modulo",0,9];for(e=0;e<s.length;e+=3)if(n=s[e],r&&(this[n]=f[n]),void 0!==(i=t[n])){if(!(m(i)===i&&i>=s[e+1]&&i<=s[e+2]))throw Error(h+n+": "+i);this[n]=i}if(n="crypto",r&&(this[n]=f[n]),void 0!==(i=t[n])){if(!0!==i&&!1!==i&&0!==i&&1!==i)throw Error(h+n+": "+i);if(i){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(v);this[n]=!0}else this[n]=!1}return this}function ht(t){return new this(t).cos()}function wt(t){return new this(t).cosh()}function vt(t,e){return new this(t).div(e)}function gt(t){return new this(t).exp()}function mt(t){return I(t=new this(t),t.e+1,3)}function pt(){var t,e,n=new this(0);for(l=!1,t=0;t<arguments.length;)if((e=new this(arguments[t++])).d)n.d&&(n=n.plus(e.times(e)));else{if(e.s)return l=!0,new this(1/0);n=e}return l=!0,n.sqrt()}function yt(t){return t instanceof e||t&&t.toStringTag===g||!1}function bt(t){return new this(t).ln()}function kt(t,e){return new this(t).log(e)}function xt(t){return new this(t).log(2)}function Mt(t){return new this(t).log(10)}function Nt(){return $(this,arguments,-1)}function Tt(){return $(this,arguments,1)}function St(t,e){return new this(t).mod(e)}function Dt(t,e){return new this(t).mul(e)}function Et(t,e){return new this(t).pow(e)}function Ct(t){var e,n,i,r,o=0,s=new this(1),u=[];if(void 0===t?t=this.precision:C(t,1,a),i=Math.ceil(t/N),this.crypto)if(crypto.getRandomValues)for(e=crypto.getRandomValues(new Uint32Array(i));o<i;)(r=e[o])>=429e7?e[o]=crypto.getRandomValues(new Uint32Array(1))[0]:u[o++]=r%1e7;else{if(!crypto.randomBytes)throw Error(v);for(e=crypto.randomBytes(i*=4);o<i;)(r=e[o]+(e[o+1]<<8)+(e[o+2]<<16)+((127&e[o+3])<<24))>=214e7?crypto.randomBytes(4).copy(e,o):(u.push(r%1e7),o+=4);o=i/4}else for(;o<i;)u[o++]=1e7*Math.random()|0;for(i=u[--o],t%=N,i&&t&&(r=p(10,N-t),u[o]=(i/r|0)*r);0===u[o];o--)u.pop();if(o<0)n=0,u=[0];else{for(n=-1;0===u[0];n-=N)u.shift();for(i=1,r=u[0];r>=10;r/=10)i++;i<N&&(n-=N-i)}return s.e=n,s.d=u,s}function Pt(t){return I(t=new this(t),t.e+1,this.rounding)}function jt(t){return(t=new this(t)).d?t.d[0]?t.s:0*t.s:t.s||NaN}function Ot(t){return new this(t).sin()}function It(t){return new this(t).sinh()}function Lt(t){return new this(t).sqrt()}function Gt(t,e){return new this(t).sub(e)}function Wt(){var t=0,e=arguments,n=new this(e[t]);for(l=!1;n.s&&++t<e.length;)n=n.plus(e[t]);return l=!0,I(n,this.precision,this.rounding)}function At(t){return new this(t).tan()}function zt(t){return new this(t).tanh()}function Yt(t){return I(t=new this(t),t.e+1,1)}(e=function t(e){var n,i,r;function o(t){var e,n,i,r=this;if(!(r instanceof o))return new o(t);if(r.constructor=o,yt(t))return r.s=t.s,void(l?!t.d||t.e>o.maxE?(r.e=NaN,r.d=null):t.e<o.minE?(r.e=0,r.d=[0]):(r.e=t.e,r.d=t.d.slice()):(r.e=t.e,r.d=t.d?t.d.slice():t.d));if("number"==(i=typeof t)){if(0===t)return r.s=1/t<0?-1:1,r.e=0,void(r.d=[0]);if(t<0?(t=-t,r.s=-1):r.s=1,t===~~t&&t<1e7){for(e=0,n=t;n>=10;n/=10)e++;return void(l?e>o.maxE?(r.e=NaN,r.d=null):e<o.minE?(r.e=0,r.d=[0]):(r.e=e,r.d=[t]):(r.e=e,r.d=[t]))}return 0*t!=0?(t||(r.s=NaN),r.e=NaN,void(r.d=null)):X(r,t.toString())}if("string"===i)return 45===(n=t.charCodeAt(0))?(t=t.slice(1),r.s=-1):(43===n&&(t=t.slice(1)),r.s=1),x.test(t)?X(r,t):F(r,t);if("bigint"===i)return t<0?(t=-t,r.s=-1):r.s=1,X(r,t.toString());throw Error(h+t)}if(o.prototype=D,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.EUCLID=9,o.config=o.set=dt,o.clone=t,o.isDecimal=yt,o.abs=tt,o.acos=et,o.acosh=nt,o.add=it,o.asin=rt,o.asinh=ot,o.atan=at,o.atanh=st,o.atan2=ut,o.cbrt=ct,o.ceil=ft,o.clamp=lt,o.cos=ht,o.cosh=wt,o.div=vt,o.exp=gt,o.floor=mt,o.hypot=pt,o.ln=bt,o.log=kt,o.log10=Mt,o.log2=xt,o.max=Nt,o.min=Tt,o.mod=St,o.mul=Dt,o.pow=Et,o.random=Ct,o.round=Pt,o.sign=jt,o.sin=Ot,o.sinh=It,o.sqrt=Lt,o.sub=Gt,o.sum=Wt,o.tan=At,o.tanh=zt,o.trunc=Yt,void 0===e&&(e={}),e&&!0!==e.defaults)for(r=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],n=0;n<r.length;)e.hasOwnProperty(i=r[n++])||(e[i]=this[i]);return o.config(e),o}(f)).prototype.constructor=e,e.default=e.Decimal=e,u=new e(u),c=new e(c),Z.exports?("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator&&(D[Symbol.for("nodejs.util.inspect.custom")]=D.toString,D[Symbol.toStringTag]="Decimal"),Z.exports=e):(t||(t="undefined"!=typeof self&&self&&self.self==self?self:window),i=t.Decimal,e.noConflict=function(){return t.Decimal=i,e},t.Decimal=e)}(V);const et=tt.exports;var nt;!function(t){t.WON="Won",t.LOST="Lost"}(nt||(nt={}));const it=["ro","en","fr","ar","hr"],rt={en:{totalItems:"Total {total} items",perPage:"{size} / page",goTo:"Go to",filter:"Filter",clear:"Clear",searchByTicketId:"Search by Ticket ID",enterTicketId:"Enter Ticket ID",searchByTicketType:"Search by Ticket Type",selectTicketType:"Select Ticket Type",searchByDate:"Search by Date",from:"From",to:"To",normal:"Normal",subscription:"Subscription",ticketsHistory:"Tickets History",settled:"Settled",purchased:"Purchased",canceled:"Canceled",noData:"No data Avaliable.",ticketId:"Ticket ID:",ticketType:"Ticket Type:",ticketAmount:"Ticket Amount:",lineDetail:"Line Detail:",seeDetails:"See Details",numberOfDraw:"Number of Draw:",ticketResult:"Ticket Result:",drawId:"Draw ID:",drawDate:"Draw Date:",result:"Result:",prize:"Prize:",bettingType:"Betting Type:"},ro:{},fr:{},ar:{},hr:{}},ot=(t,e,n)=>{const i=e;let r=rt[void 0!==i&&it.includes(i)?i:"en"][t];return n&&Object.keys(n).forEach((t=>{r=r.replace(`{${t}}`,n[t])})),r},at=t=>{Object.keys(t).forEach((e=>{for(let n in t[e])rt[e][n]=t[e][n]}))};function st(t,e="GET",n=null,i={}){return new Promise(((r,o)=>{const a="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})),s=Object.assign({"Content-Type":"application/json"},i);"GET"!==e&&"HEAD"!==e&&(s["X-Idempotency-Key"]=a);const u={method:e,headers:s,body:null};n&&"GET"!==e&&"HEAD"!==e?u.body=JSON.stringify(n):delete u.body,fetch(t,u).then((t=>t.ok?t.json():o(t))).then((t=>r(t))).catch((t=>o(t)))}))}function ut(t,e){return null==t||""===t||(0!==t||!e)&&(Array.isArray(t)?function(t){if(0===t.length)return!0;const e=t.length;let n=0;for(let i=0;i<e;i++){if(!ut(t[i]))return!1;n++}return n===e}(t):"[object Object]"===Object.prototype.toString.call(t)?function(t){if(0===Object.keys(t).length)return!0;const e=Object.keys(t).length;let n=0;for(const e of Object.values(t)){if(!ut(e))return!1;n++}return n===e}(t):!t)}const ct={0:"1",1:"X",2:"2"};function ft(t){const e=[],n=[];for(let e=0;e<t.length;e+=2){const[i,r]=[t[e],t[e+1]];n[r]?n[r].push(i):n[r]=[i]}return n.forEach((t=>{e.push(function(t){const e=[];return Object.keys(ct).forEach((n=>{e.push({isSelected:t.includes(Number(n)),value:ct[n]})})),e}(t))})),e}const lt=t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),dt=({message:t,theme:e="success"})=>{window.postMessage({type:"ShowNotificationToast",message:t,theme:e})},ht=class{constructor(n){t(this,n),this.logout=e(this,"logout",7),this.ticketTypeMap={NORMAL:"Normal",SYNDICATE:"Syndicate",SUBSCRIPTION:"Subscription"},this.resultMap={[nt.WON]:"Win",[nt.LOST]:"Lose"},this.displayPrizeCategory=t=>{const e=new Map;t.forEach((t=>{let n=t.divisionDisplayName,i=t.currency;if(n&&"None"!==n){const r=new et(t.amount);if(e.has(n)){const t=e.get(n),o=t.amount.plus(r);e.set(n,{amount:o,currency:i,times:t.times+1})}else e.set(n,{amount:r,currency:i,times:1})}}));const n=[];for(let[t,i]of e.entries()){const e=i.amount.times(100).floor().dividedBy(100);n.push({prizeName:t,amount:e.toNumber(),currency:i.currency,times:i.times})}return n.sort(((t,e)=>e.prizeName.localeCompare(t.prizeName))),n},this.endpoint=void 0,this.gameId=void 0,this.playerId=void 0,this.sessionId="",this.drawId=void 0,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.language="en",this.translationUrl="",this.ticketHistory=[],this.activeStatus="",this.statusOptions=void 0,this.isLoading=!0,this.rawData={},this.filterData={offset:0,limit:10,state:"",from:"",to:"",wagerType:"",vendorGameType:"PoolGame",vendorGameBettingObject:"HomeDrawAway",id:""},this.paginationInfo={current:1,total:0,pageSize:10},this.quickFiltersActive=!1,this.showCurrentTicketLine=!1,this.curTicketItem=void 0,this.curSelection=[],this.curSelectionIdx=0,this.showCurrentDrawResult=!1,this.curDrawItem=void 0,this.curDrawSelection=[],this.curDrawSelectionBettingType=void 0,this.curDrawSelectionMap={}}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&o(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&a(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&o(this.stylingContainer,this.clientStylingUrl))}async fetchGameData(){var t;try{let t=new URL(`${this.endpoint}/games/${this.gameId}`);const e=await st(t.href,"GET");this.rawData=e}catch(e){dt({message:null!==(t=e.message)&&void 0!==t?t:e,theme:"error"})}}connectedCallback(){this.endpoint&&this.gameId&&this.fetchGameData()}handleGameInfoChange(t,e){t&&t!=e&&this.fetchGameData()}handleTicketInfoChange(t,e){t&&t!=e&&this.fetchTicketList()}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}async fetchTicketList(){this.isLoading=!0;try{const{items:t,total:e}=await st(`${this.endpoint}/tickets${function(t){const e={};Object.entries(t).forEach((([t,n])=>{ut(n,!0)||(e[t]=n)}));const n=Object.entries(e).map((([t,e])=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`)).join("&");return n?`?${n}`:""}(this.filterData)}`,"GET",null,{Authorization:`Bearer ${this.sessionId}`});this.ticketHistory=t,this.paginationInfo.total=e,t.length>0&&this.getDrawResult()}catch(t){console.log("in fetchTicketList error is: ",t),401===t.status&&(dt({message:t.message,theme:"error"}),this.logout.emit())}finally{this.isLoading=!1}}async fetchDrawResult(t,e){try{return await st(`${this.endpoint}/games/${t}/draws/${e}`,"GET",{})}catch(t){console.log(t)}}getDivision(t,e){var n;let i=t.division,r=null===(n=e.prizes)||void 0===n?void 0:n.filter((t=>t.order===i));return r&&r.length?r[0].division:null}async getDrawResult(){const t=new Map;this.ticketHistory.forEach(((e,n)=>{e.drawResults.forEach(((i,r)=>{const o=`${i.drawId}-${e.gameId}`;t.has(o)?t.get(o).indices.push({ticketIndex:n,drawIndex:r}):t.set(o,{drawId:i.drawId,gameId:e.gameId,indices:[{ticketIndex:n,drawIndex:r}]})}))}));let e=[...this.ticketHistory];await Promise.all(Array.from(t.values()).map((async({gameId:t,drawId:n,indices:i})=>{try{const r=await this.fetchDrawResult(t,n);r&&i.forEach((({ticketIndex:t,drawIndex:n})=>{const i=Object.assign(Object.assign({},e[t].drawResults[n]),{tempDrawData:Object.assign(Object.assign({},r),{vendorGameId:e[t].vendorGameId}),prizeDetails:this.displayPrizeCategory(e[t].drawResults[n].details)}),o=[...e[t].drawResults];o[n]=i,e[t]=Object.assign(Object.assign({},e[t]),{drawResults:o})}))}catch(e){console.error(`failed to fetch draw result (gameId: ${t}, drawId: ${n}):`,e)}}))),this.ticketHistory=e}componentWillLoad(){this.translationUrl&&at(JSON.parse(this.translationUrl)),this.statusOptions=[{label:ot("settled",this.language),value:"Settled"},{label:ot("purchased",this.language),value:"Purchased"},{label:ot("canceled",this.language),value:"Canceled"}],this.fetchTicketList()}changeStatus(t){this.activeStatus=t,this.filterData.state=t,this.quickFiltersActive=!0,this.fetchTicketList()}handlePageSizeChange(t){this.filterData.limit=t.detail,this.fetchTicketList()}handlePageChange(t){this.filterData.offset=(t.detail-1)*this.filterData.limit,this.fetchTicketList()}handleShowTicketLineDetial(t){this.curSelectionIdx=0,this.showCurrentTicketLine=!0,this.curTicketItem=t,this.curSelection=this.parseSelection()}handleShowCurrentDraw(t){this.showCurrentDrawResult=!0,this.curDrawItem=t,this.curDrawSelectionBettingType=t.winningNumbers[0].winning_type,this.curDrawItem.winningNumbers.forEach((t=>{this.curDrawSelectionMap[t.winning_type]=[ft(t.numbers)]})),this.curDrawSelection=this.curDrawSelectionMap[this.curDrawSelectionBettingType]}parseSelection(){const t=[];return this.curTicketItem.selection.forEach(((e,n)=>{t[n]=ft(e.selections)})),t}handleFilterChange(t){const e=t.detail;this.filterData.from=e.filterFromCalendar,this.filterData.to=e.filterToCalendar,this.filterData.id=e.ticketId,this.filterData.wagerType=e.ticketType,this.fetchTicketList()}handleFilterClear(){this.activeStatus="",this.quickFiltersActive=!1,this.filterData={offset:0,limit:10,state:"",from:"",to:"",wagerType:"",vendorGameType:"PoolGame",vendorGameBettingObject:"HomeDrawAway",id:""},this.fetchTicketList()}get playTypeConfig(){var t,e,n;return null===(n=null===(e=null===(t=this.rawData)||void 0===t?void 0:t.rules)||void 0===e?void 0:e.poolGame)||void 0===n?void 0:n.playTypes}get bettingTypeConfig(){var t,e,n;return null===(n=null===(e=null===(t=this.rawData)||void 0===t?void 0:t.rules)||void 0===e?void 0:e.poolGame)||void 0===n?void 0:n.bettingTypes}getBettingType(t){var e;return null!==(e=this.playTypeConfig.find((e=>e.betTypeId===t)).bettingType)&&void 0!==e?e:""}handlePoolGameCurrentPageChange(t){const{currentPage:e}=t.detail;this.curSelectionIdx=e-1}handleDrawBettingTypeChange(t){this.curDrawSelectionBettingType=t,this.curDrawSelection=this.curDrawSelectionMap[this.curDrawSelectionBettingType]}getBettingTypeName(t){var e,n;const i=null===(n=null===(e=this.bettingTypeConfig)||void 0===e?void 0:e.find((e=>e.code===t)))||void 0===n?void 0:n.name;return null!=i?i:t}render(){return n("div",{key:"8b5cf7b807d86f60585333f6e1ad908c27e69d2d",class:"lottery-tipping-ticket-history",ref:t=>this.stylingContainer=t},n("div",{key:"5d5b27c8663171c205fa542fa8cabaf43a8e9868",class:"ticket-history-title"},ot("ticketsHistory",this.language)),n("div",{key:"80a725f121d8ae43918655645b539386523f2c5b",class:"filter-wrap"},n("div",{key:"ddfbecf52c2b34ff65a0a1eb1c4461e2ec4adb83",class:"filter-status"},this.statusOptions.map((t=>n("div",{class:"filter-status-btn"+(this.activeStatus==t.value?" active":""),onClick:()=>this.changeStatus(t.value)},t.label)))),n("div",{key:"d7af5f48131401c38ed5e47526cf8a0b66bf7ed5",class:"filter-operation"},n("lottery-tipping-filter",{key:"6cb80e892227bb0cca2231dbd01c967e39f00057","quick-filters-active":this.quickFiltersActive,language:this.language,"translation-url":this.translationUrl}))),this.isLoading&&n("div",{key:"9b1ded95022c5eff5963d81eea67c3f6a915033e",class:"loading-wrap"},n("section",{key:"731d40f195f1cba224b792d250e9f9e4b86b61ae",class:"dots-container"},n("div",{key:"0b5c88b5c231045760c8951e02b828f8539168ac",class:"dot"}),n("div",{key:"e534a45e4b666ec35cefc3a709cc0b9bcb6ddd56",class:"dot"}),n("div",{key:"4adae575af1bcaa438f50fe0fa9ca1a5c8ea8c73",class:"dot"}),n("div",{key:"27c4cc688611722d858436bb857d2435d3bb57f9",class:"dot"}),n("div",{key:"acd88b2c9756ef9c7dff629fd9d238d63128e63c",class:"dot"}))),!this.isLoading&&this.paginationInfo.total>0&&n("div",{key:"9afe2101cbafb68c1d0a648ccf85d7df497ea5bc",class:"ticket-list-wrap"},this.ticketHistory.map((t=>n("lottery-tipping-panel",{"header-title":K(new Date(t.createdAt),"dd/MM/yyyy HH:mm:ss")+" "+t.state},n("div",{class:"panel-content",slot:"content"},n("div",{class:"ticket-info"},n("div",{class:"ticket-info-item"},n("div",{class:"ticket-info-label"},ot("ticketId",this.language)),n("div",{class:"ticket-info-val"},t.id," ")),n("div",{class:"ticket-info-item"},n("div",{class:"ticket-info-label"},ot("ticketType",this.language)),n("div",{class:"ticket-info-val"},this.ticketTypeMap[t.wagerType]," ")),n("div",{class:"ticket-info-item"},n("div",{class:"ticket-info-label"},ot("ticketAmount",this.language)),n("div",{class:"ticket-info-val"},`${t.amount} ${t.currency}`)),n("div",{class:"ticket-info-item"},n("div",{class:"ticket-info-label"},ot("lineDetail",this.language)),n("div",{class:"ticket-info-val"},n("span",{class:"show-detail-link",onClick:()=>this.handleShowTicketLineDetial(t)},ot("seeDetails",this.language)))),n("div",{class:"ticket-info-item"},n("div",{class:"ticket-info-label"},ot("numberOfDraw",this.language)),n("div",{class:"ticket-info-val"},t.drawCount))),"Settled"==t.state&&t.drawResults.map((t=>n("div",{class:"draw-info-container"},t.tempDrawData?n("div",{class:"draw-info"},n("div",{class:"draw-info-item"},n("div",{class:"draw-info-label"},ot("ticketResult",this.language)),n("div",{class:"draw-info-val"},this.resultMap[t.state])),n("div",{class:"draw-info-item"},n("div",{class:"draw-info-label"},ot("drawId",this.language)),n("div",{class:"draw-info-val"},t.drawId)),n("div",{class:"draw-info-item"},n("div",{class:"draw-info-label"},ot("drawDate",this.language)),n("div",{class:"draw-info-val"},K(new Date(t.tempDrawData.date),"dd/MM/yyyy"))),n("div",{class:"draw-info-item"},n("div",{class:"draw-info-label"},ot("result",this.language)),n("div",{class:"draw-info-val"},n("span",{class:"show-detail-link",onClick:()=>this.handleShowCurrentDraw(t.tempDrawData)},ot("seeDetails",this.language)))),t.state===nt.WON&&n("div",{class:"draw-info-item"},n("div",{class:"draw-info-label"},ot("prize",this.language)),n("div",{class:"draw-info-val1"},n("div",{style:{height:"20px"}}),t.prizeDetails.map((t=>n("span",null,n("div",null,n("span",{style:{color:"rgb(85, 85, 85)"}},t.prizeName,t.times>1?" x "+t.times:"",":"," "),n("span",{style:{"margin-right":"4px",color:"rgb(85, 85, 85)"}},function(t){if(0===t)return"0";if(!t)return"";const e=(t=t.toString()).split(".");return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),e.join(".")}(t.amount)),n("span",{style:{color:"rgb(85, 85, 85)"}},t.currency)))))))):n("div",{class:"draw-info-skeleton"},[...Array(5)].map((()=>n("div",{class:"skeleton-line"})))))))))))),!this.isLoading&&0===this.paginationInfo.total&&n("div",{key:"5de413a3747c7928d9dae3a817337a6f014f0b17",class:"empty-wrap"},ot("noData",this.language)),n("lottery-tipping-dialog",{key:"f11f915d619c10d836427105090e861b74931d56",visible:this.showCurrentTicketLine,width:lt(window.navigator.userAgent)?void 0:"720px",fullscreen:lt(window.navigator.userAgent),closable:!0,showFooter:!1,onCancel:()=>{this.showCurrentTicketLine=!1},language:this.language,"translation-url":this.translationUrl},this.curSelection&&this.curSelection.length&&this.showCurrentTicketLine&&n("div",{key:"899c2830647dcee4be611199a4bc42af78588894"},n("div",{key:"5671d9815195d631026f6ed43400a0b79b43f828",class:"betting-type"},n("div",{key:"842a5226b1f304ad23ab26081428e5bbd814671f",class:"betting-type-title"},ot("bettingType",this.language)),n("div",{key:"9028c66fca47e8ca7e7d054154361fcca56a9b22",class:"betting-type-text"},this.getBettingTypeName(this.getBettingType(this.curTicketItem.selection[this.curSelectionIdx].betType)))),n("lottery-tipping-ticket-bet",{key:"3df8c748aeb165eadf68ec631ede5ef6a11ae42a",endpoint:this.endpoint,"session-id":this.sessionId,"game-id":this.curTicketItem.vendorGameId,"draw-id":this.curTicketItem.startingDrawId,"default-bullet-config-line-group":JSON.stringify(this.curSelection),"read-pretty":!0,"total-pages":this.curSelection.length,language:this.language,"translation-url":this.translationUrl}))),n("lottery-tipping-dialog",{key:"3f3dc5b9922890c11104ca55120b3fa029378f78",visible:this.showCurrentDrawResult,width:lt(window.navigator.userAgent)?void 0:"720px",fullscreen:lt(window.navigator.userAgent),closable:!0,showFooter:!1,onCancel:()=>{this.showCurrentDrawResult=!1},language:this.language,"translation-url":this.translationUrl},this.curDrawSelection&&this.curDrawSelection.length&&this.showCurrentDrawResult&&n("div",{key:"348359e4256d86c47f0cb2cfe936a669f6f7c0e8"},n("div",{key:"98ed4f468d1a1a4b237c1cfc776fcb990f69fdcf",class:"betting-type"},n("div",{key:"2ba8e6723d1259aefd74900d82dbf3968325f944",class:"betting-type-title"},ot("bettingType",this.language)),n("div",{key:"7ae55771416badb3c4746bd37353d956362241f8",class:"betting-type-text"},n("div",{key:"998242980ce53ff0ca9ef509bb45e62d3680fd73",class:"LotteryTippingTicketController__segmented-control"},Object.keys(this.curDrawSelectionMap).map((t=>n("button",{class:{LotteryTippingTicketController__segment:!0,"LotteryTippingTicketController__segment--active":this.curDrawSelectionBettingType===t},onClick:()=>this.handleDrawBettingTypeChange(t)},this.getBettingTypeName(t))))))),n("lottery-tipping-ticket-bet",{key:"57c44eb7624411a20dade3b41251285a214e4b8c",endpoint:this.endpoint,"session-id":this.sessionId,"game-id":this.curDrawItem.vendorGameId,"draw-id":this.curDrawItem.id,"default-bullet-config-line-group":JSON.stringify(this.curDrawSelection),"read-pretty":!0,"total-pages":this.curDrawSelection.length,language:this.language,"translation-url":this.translationUrl}))),n("div",{key:"296c91bff848ca5f2ab5fe9df414ffd3b03aef58",class:"pagination-wrap"},n("lottery-tipping-pagination",{key:"3495c8c81cf96dd28aad9a79b963d94877c8db01",total:this.paginationInfo.total,current:this.paginationInfo.current,"page-size":this.paginationInfo.pageSize,language:this.language,"translation-url":this.translationUrl})))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],gameId:["handleGameInfoChange"],endpoint:["handleGameInfoChange"],playerId:["handleTicketInfoChange"],sessionId:["handleTicketInfoChange"]}}};ht.style="@keyframes skeleton-loading{0%{background-position:200% 0}100%{background-position:-200% 0}}.lottery-tipping-ticket-history{padding:12px}.lottery-tipping-ticket-history .ticket-history-title{margin:20px 0;text-align:center;font-size:20px;font-weight:700;color:var(--emw--color-typography, #000)}.lottery-tipping-ticket-history .ticket-info{display:flex;flex-direction:column;gap:12px}.lottery-tipping-ticket-history .ticket-info-item{display:flex;align-items:center;user-select:none}.lottery-tipping-ticket-history .ticket-info-label{margin-right:12px;color:var(--emw--color-typography, #000)}.lottery-tipping-ticket-history .ticket-info-val{color:var(--emw--color-typography-secondary, #555)}.lottery-tipping-ticket-history .ticket-list-wrap{display:flex;flex-direction:column;gap:12px}.lottery-tipping-ticket-history .draw-info-skeleton{width:30%;min-width:300px;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));border-radius:5px;display:flex;flex-direction:column;gap:10px;padding:10px}.lottery-tipping-ticket-history .skeleton-line{height:16px;border-radius:4px;background:linear-gradient(90deg, var(--emw--color-gray-100, #e6e6e6) 25%, var(--emw--color-gray-50, #f5f5f5) 50%, var(--emw--color-gray-100, #e6e6e6) 75%);background-size:200% 100%;animation:skeleton-loading 1.2s infinite}.lottery-tipping-ticket-history .draw-info{width:30%;min-width:300px;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));border-radius:5px;padding:12px;margin-top:20px;display:flex;flex-direction:column;gap:8px;user-select:none}.lottery-tipping-ticket-history .draw-info-item{display:flex}.lottery-tipping-ticket-history .draw-info-label{margin-right:6px;color:var(--emw--color-typography, #000)}.lottery-tipping-ticket-history .draw-info-val{color:var(--emw--color-typography-secondary, #555)}.lottery-tipping-ticket-history .show-detail-link{color:var(--emw-pool-game-acition-normal, #4a90e2);text-decoration:underline;cursor:pointer}.lottery-tipping-ticket-history .filter-wrap{margin-bottom:20px;display:flex;justify-content:space-between;align-items:center}.lottery-tipping-ticket-history .filter-wrap .filter-status{display:flex;gap:12px;align-items:center}.lottery-tipping-ticket-history .filter-wrap .filter-status-btn{background:var(--emw--color-background, #fff);border:2px solid var(--emw--color-primary, #fed275);border-radius:4px;padding:10px 8px;font-size:12px;text-transform:uppercase;color:var(--emw--color-typography, #000);cursor:pointer;transition:all 0.2s linear}.lottery-tipping-ticket-history .filter-wrap .filter-status-btn:hover{background-color:var(--emw--color-secondary, #fff3b9)}.lottery-tipping-ticket-history .filter-wrap .filter-status-btn.active{background:var(--emw--color-secondary, #fff3b9);color:var(--emw--color-typography, #000);border:2px solid var(--emw--color-typography, #000)}.lottery-tipping-ticket-history .pagination-wrap{margin-top:20px;display:flex;justify-content:flex-end}@media screen and (min-width: 1200px){.lottery-tipping-ticket-history{padding:24px;width:60%;margin:0 auto}}@media screen and (max-width: 480px){.lottery-tipping-ticket-history{padding:2px}.lottery-tipping-ticket-history .filter-wrap .filter-status{gap:4px}}.loading-wrap{margin:20px 0;display:flex;align-items:center;justify-content:center;min-height:40vh}.loading-wrap .dots-container{display:flex;align-items:center;justify-content:center;height:100%;width:100%}.loading-wrap .dot{height:14px;width:14px;margin-right:14px;border-radius:14px;background-color:var(--emw-pool-game-ticket-history-loading-normal, #b3d4fc);animation:pulse 1.5s infinite ease-in-out}.loading-wrap .dot:last-child{margin-right:0}.loading-wrap .dot:nth-child(1){animation-delay:-0.3s}.loading-wrap .dot:nth-child(2){animation-delay:-0.1s}.loading-wrap .dot:nth-child(3){animation-delay:0.1s}@keyframes pulse{0%{transform:scale(0.8);background-color:var(--emw-pool-game-ticket-history-loading-normal, #b3d4fc);box-shadow:0 0 0 0 var(--emw-pool-game-ticket-history-loading-box-shadow-normal, rgba(178, 212, 252, 0.7))}50%{transform:scale(1.2);background-color:var(--emw-pool-game-ticket-history-loading-active, #6793fb);box-shadow:0 0 0 10px var(--emw-pool-game-ticket-history-loading-box-shadow-active, rgba(178, 212, 252, 0))}100%{transform:scale(0.8);background-color:var(--emw-pool-game-ticket-history-loading-normal, #b3d4fc);box-shadow:0 0 0 0 rgba(178, 212, 252, 0.7)}}.empty-wrap{margin:20px 0;display:flex;align-items:center;justify-content:center;min-height:40vh;color:var(--emw--color-typography, #000)}.betting-type{margin-bottom:16px;display:flex;align-items:center;gap:20px}.betting-type-title{font-weight:600;font-size:16px}.betting-type-text{font-size:16px}.LotteryTippingTicketController__label{font-weight:500;white-space:nowrap;width:6rem;color:var(--emw--color-typography-secondary, #333)}.LotteryTippingTicketController__segmented-control{height:2.2rem;display:inline-flex;background-color:var(--emw--color-background-secondary, #f5f5f5);border-radius:2rem;padding:0.2rem}.LotteryTippingTicketController__segment{background-color:transparent;border:none;padding:0.3rem 0.8rem;cursor:pointer;font-weight:500;border-radius:2rem;outline:none;transition:background-color 0.25s ease, color 0.25s ease;white-space:nowrap;color:var(--emw--color-typography, #000)}.LotteryTippingTicketController__segment--active{background-color:var(--emw--color-background, #fff);color:var(--emw--color-typography, #000);font-weight:600}.LotteryTippingTicketController__segment:not(.LotteryTippingTicketController__segment--active):hover{background-color:var(--emw--color-background-tertiary, #ccc)}";export{ht as L,o as a,a as b,ot as c,K as f,at as g,lt as i,c as r,r as s,u as t}
9
+ var e,n,i,r,o=9e15,a=1e9,s="0123456789abcdef",c="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",u="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",l={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-o,maxE:o,crypto:!1},f=!0,d="[DecimalError] ",h=d+"Invalid argument: ",w=d+"Precision limit exceeded",v=d+"crypto unavailable",g="[object Decimal]",m=Math.floor,p=Math.pow,y=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,b=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,k=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,x=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,M=1e7,N=7,T=c.length-1,S=u.length-1,D={toStringTag:g};function E(t){var e,n,i,r=t.length-1,o="",a=t[0];if(r>0){for(o+=a,e=1;e<r;e++)(n=N-(i=t[e]+"").length)&&(o+=Y(n)),o+=i;(n=N-(i=(a=t[e])+"").length)&&(o+=Y(n))}else if(0===a)return"0";for(;a%10==0;)a/=10;return o+a}function C(t,e,n){if(t!==~~t||t<e||t>n)throw Error(h+t)}function P(t,e,n,i){var r,o,a,s;for(o=t[0];o>=10;o/=10)--e;return--e<0?(e+=N,r=0):(r=Math.ceil((e+1)/N),e%=N),o=p(10,N-e),s=t[r]%o|0,null==i?e<3?(0==e?s=s/100|0:1==e&&(s=s/10|0),a=n<4&&99999==s||n>3&&49999==s||5e4==s||0==s):a=(n<4&&s+1==o||n>3&&s+1==o/2)&&(t[r+1]/o/100|0)==p(10,e-2)-1||(s==o/2||0==s)&&!(t[r+1]/o/100|0):e<4?(0==e?s=s/1e3|0:1==e?s=s/100|0:2==e&&(s=s/10|0),a=(i||n<4)&&9999==s||!i&&n>3&&4999==s):a=((i||n<4)&&s+1==o||!i&&n>3&&s+1==o/2)&&(t[r+1]/o/1e3|0)==p(10,e-3)-1,a}function j(t,e,n){for(var i,r,o=[0],a=0,c=t.length;a<c;){for(r=o.length;r--;)o[r]*=e;for(o[0]+=s.indexOf(t.charAt(a++)),i=0;i<o.length;i++)o[i]>n-1&&(void 0===o[i+1]&&(o[i+1]=0),o[i+1]+=o[i]/n|0,o[i]%=n)}return o.reverse()}D.absoluteValue=D.abs=function(){var t=new this.constructor(this);return t.s<0&&(t.s=1),O(t)},D.ceil=function(){return O(new this.constructor(this),this.e+1,2)},D.clampedTo=D.clamp=function(t,e){var n=this,i=n.constructor;if(t=new i(t),e=new i(e),!t.s||!e.s)return new i(NaN);if(t.gt(e))throw Error(h+e);return n.cmp(t)<0?t:n.cmp(e)>0?e:new i(n)},D.comparedTo=D.cmp=function(t){var e,n,i,r,o=this,a=o.d,s=(t=new o.constructor(t)).d,c=o.s,u=t.s;if(!a||!s)return c&&u?c!==u?c:a===s?0:!a^c<0?1:-1:NaN;if(!a[0]||!s[0])return a[0]?c:s[0]?-u:0;if(c!==u)return c;if(o.e!==t.e)return o.e>t.e^c<0?1:-1;for(e=0,n=(i=a.length)<(r=s.length)?i:r;e<n;++e)if(a[e]!==s[e])return a[e]>s[e]^c<0?1:-1;return i===r?0:i>r^c<0?1:-1},D.cosine=D.cos=function(){var t,e,n=this,i=n.constructor;return n.d?n.d[0]?(e=i.rounding,i.precision=(t=i.precision)+Math.max(n.e,n.sd())+N,i.rounding=1,n=function(t,e){var n,i,r;if(e.isZero())return e;(i=e.d.length)<32?r=(1/U(4,n=Math.ceil(i/3))).toString():(n=16,r="2.3283064365386962890625e-10"),t.precision+=n,e=H(t,1,e.times(r),new t(1));for(var o=n;o--;){var a=e.times(e);e=a.times(a).minus(a).times(8).plus(1)}return t.precision-=n,e}(i,J(i,n)),i.precision=t,i.rounding=e,O(2==r||3==r?n.neg():n,t,e,!0)):new i(1):new i(NaN)},D.cubeRoot=D.cbrt=function(){var t,e,n,i,r,o,a,s,c,u,l=this,d=l.constructor;if(!l.isFinite()||l.isZero())return new d(l);for(f=!1,(o=l.s*p(l.s*l,1/3))&&Math.abs(o)!=1/0?i=new d(o.toString()):(n=E(l.d),(o=((t=l.e)-n.length+1)%3)&&(n+=1==o||-2==o?"0":"00"),o=p(n,1/3),t=m((t+1)/3)-(t%3==(t<0?-1:2)),(i=new d(n=o==1/0?"5e"+t:(n=o.toExponential()).slice(0,n.indexOf("e")+1)+t)).s=l.s),a=(t=d.precision)+3;;)if(u=(c=(s=i).times(s).times(s)).plus(l),i=I(u.plus(l).times(s),u.plus(c),a+2,1),E(s.d).slice(0,a)===(n=E(i.d)).slice(0,a)){if("9999"!=(n=n.slice(a-3,a+1))&&(r||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(O(i,t+1,1),e=!i.times(i).times(i).eq(l));break}if(!r&&(O(s,t+1,0),s.times(s).times(s).eq(l))){i=s;break}a+=4,r=1}return f=!0,O(i,t,d.rounding,e)},D.decimalPlaces=D.dp=function(){var t,e=this.d,n=NaN;if(e){if(n=((t=e.length-1)-m(this.e/N))*N,t=e[t])for(;t%10==0;t/=10)n--;n<0&&(n=0)}return n},D.dividedBy=D.div=function(t){return I(this,new this.constructor(t))},D.dividedToIntegerBy=D.divToInt=function(t){var e=this.constructor;return O(I(this,new e(t),0,1,1),e.precision,e.rounding)},D.equals=D.eq=function(t){return 0===this.cmp(t)},D.floor=function(){return O(new this.constructor(this),this.e+1,3)},D.greaterThan=D.gt=function(t){return this.cmp(t)>0},D.greaterThanOrEqualTo=D.gte=function(t){var e=this.cmp(t);return 1==e||0===e},D.hyperbolicCosine=D.cosh=function(){var t,e,n,i,r,o=this,a=o.constructor,s=new a(1);if(!o.isFinite())return new a(o.s?1/0:NaN);if(o.isZero())return s;i=a.rounding,a.precision=(n=a.precision)+Math.max(o.e,o.sd())+4,a.rounding=1,(r=o.d.length)<32?e=(1/U(4,t=Math.ceil(r/3))).toString():(t=16,e="2.3283064365386962890625e-10"),o=H(a,1,o.times(e),new a(1),!0);for(var c,u=t,l=new a(8);u--;)c=o.times(o),o=s.minus(c.times(l.minus(c.times(l))));return O(o,a.precision=n,a.rounding=i,!0)},D.hyperbolicSine=D.sinh=function(){var t,e,n,i,r=this,o=r.constructor;if(!r.isFinite()||r.isZero())return new o(r);if(n=o.rounding,o.precision=(e=o.precision)+Math.max(r.e,r.sd())+4,o.rounding=1,(i=r.d.length)<3)r=H(o,2,r,r,!0);else{t=1.4*Math.sqrt(i),r=H(o,2,r=r.times(1/U(5,t=t>16?16:0|t)),r,!0);for(var a,s=new o(5),c=new o(16),u=new o(20);t--;)a=r.times(r),r=r.times(s.plus(a.times(c.times(a).plus(u))))}return o.precision=e,o.rounding=n,O(r,e,n,!0)},D.hyperbolicTangent=D.tanh=function(){var t,e,n=this,i=n.constructor;return n.isFinite()?n.isZero()?new i(n):(e=i.rounding,i.precision=(t=i.precision)+7,i.rounding=1,I(n.sinh(),n.cosh(),i.precision=t,i.rounding=e)):new i(n.s)},D.inverseCosine=D.acos=function(){var t=this,e=t.constructor,n=t.abs().cmp(1),i=e.precision,r=e.rounding;return-1!==n?0===n?t.isNeg()?A(e,i,r):new e(0):new e(NaN):t.isZero()?A(e,i+4,r).times(.5):(e.precision=i+6,e.rounding=1,t=new e(1).minus(t).div(t.plus(1)).sqrt().atan(),e.precision=i,e.rounding=r,t.times(2))},D.inverseHyperbolicCosine=D.acosh=function(){var t,e,n=this,i=n.constructor;return n.lte(1)?new i(n.eq(1)?0:NaN):n.isFinite()?(e=i.rounding,i.precision=(t=i.precision)+Math.max(Math.abs(n.e),n.sd())+4,i.rounding=1,f=!1,n=n.times(n).minus(1).sqrt().plus(n),f=!0,i.precision=t,i.rounding=e,n.ln()):new i(n)},D.inverseHyperbolicSine=D.asinh=function(){var t,e,n=this,i=n.constructor;return!n.isFinite()||n.isZero()?new i(n):(e=i.rounding,i.precision=(t=i.precision)+2*Math.max(Math.abs(n.e),n.sd())+6,i.rounding=1,f=!1,n=n.times(n).plus(1).sqrt().plus(n),f=!0,i.precision=t,i.rounding=e,n.ln())},D.inverseHyperbolicTangent=D.atanh=function(){var t,e,n,i,r=this,o=r.constructor;return r.isFinite()?r.e>=0?new o(r.abs().eq(1)?r.s/0:r.isZero()?r:NaN):(t=o.precision,e=o.rounding,i=r.sd(),Math.max(i,t)<2*-r.e-1?O(new o(r),t,e,!0):(o.precision=n=i-r.e,r=I(r.plus(1),new o(1).minus(r),n+t,1),o.precision=t+4,o.rounding=1,r=r.ln(),o.precision=t,o.rounding=e,r.times(.5))):new o(NaN)},D.inverseSine=D.asin=function(){var t,e,n,i,r=this,o=r.constructor;return r.isZero()?new o(r):(e=r.abs().cmp(1),n=o.precision,i=o.rounding,-1!==e?0===e?((t=A(o,n+4,i).times(.5)).s=r.s,t):new o(NaN):(o.precision=n+6,o.rounding=1,r=r.div(new o(1).minus(r.times(r)).sqrt().plus(1)).atan(),o.precision=n,o.rounding=i,r.times(2)))},D.inverseTangent=D.atan=function(){var t,e,n,i,r,o,a,s,c,u=this,l=u.constructor,d=l.precision,h=l.rounding;if(u.isFinite()){if(u.isZero())return new l(u);if(u.abs().eq(1)&&d+4<=S)return(a=A(l,d+4,h).times(.25)).s=u.s,a}else{if(!u.s)return new l(NaN);if(d+4<=S)return(a=A(l,d+4,h).times(.5)).s=u.s,a}for(l.precision=s=d+10,l.rounding=1,t=n=Math.min(28,s/N+2|0);t;--t)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(f=!1,e=Math.ceil(s/N),i=1,c=u.times(u),a=new l(u),r=u;-1!==t;)if(r=r.times(c),o=a.minus(r.div(i+=2)),r=r.times(c),void 0!==(a=o.plus(r.div(i+=2))).d[e])for(t=e;a.d[t]===o.d[t]&&t--;);return n&&(a=a.times(2<<n-1)),f=!0,O(a,l.precision=d,l.rounding=h,!0)},D.isFinite=function(){return!!this.d},D.isInteger=D.isInt=function(){return!!this.d&&m(this.e/N)>this.d.length-2},D.isNaN=function(){return!this.s},D.isNegative=D.isNeg=function(){return this.s<0},D.isPositive=D.isPos=function(){return this.s>0},D.isZero=function(){return!!this.d&&0===this.d[0]},D.lessThan=D.lt=function(t){return this.cmp(t)<0},D.lessThanOrEqualTo=D.lte=function(t){return this.cmp(t)<1},D.logarithm=D.log=function(t){var e,n,i,r,o,a,s,c,u=this,l=u.constructor,d=l.precision,h=l.rounding;if(null==t)t=new l(10),e=!0;else{if(n=(t=new l(t)).d,t.s<0||!n||!n[0]||t.eq(1))return new l(NaN);e=t.eq(10)}if(n=u.d,u.s<0||!n||!n[0]||u.eq(1))return new l(n&&!n[0]?-1/0:1!=u.s?NaN:n?0:1/0);if(e)if(n.length>1)o=!0;else{for(r=n[0];r%10==0;)r/=10;o=1!==r}if(f=!1,a=q(u,s=d+5),i=e?W(l,s+10):q(t,s),P((c=I(a,i,s,1)).d,r=d,h))do{if(a=q(u,s+=10),i=e?W(l,s+10):q(t,s),c=I(a,i,s,1),!o){+E(c.d).slice(r+1,r+15)+1==1e14&&(c=O(c,d+1,0));break}}while(P(c.d,r+=10,h));return f=!0,O(c,d,h)},D.minus=D.sub=function(t){var e,n,i,r,o,a,s,c,u,l,d,h,w=this,v=w.constructor;if(t=new v(t),!w.d||!t.d)return w.s&&t.s?w.d?t.s=-t.s:t=new v(t.d||w.s!==t.s?w:NaN):t=new v(NaN),t;if(w.s!=t.s)return t.s=-t.s,w.plus(t);if(h=t.d,s=v.precision,c=v.rounding,!(u=w.d)[0]||!h[0]){if(h[0])t.s=-t.s;else{if(!u[0])return new v(3===c?-0:0);t=new v(w)}return f?O(t,s,c):t}if(n=m(t.e/N),l=m(w.e/N),u=u.slice(),o=l-n){for((d=o<0)?(e=u,o=-o,a=h.length):(e=h,n=l,a=u.length),o>(i=Math.max(Math.ceil(s/N),a)+2)&&(o=i,e.length=1),e.reverse(),i=o;i--;)e.push(0);e.reverse()}else{for((d=(i=u.length)<(a=h.length))&&(a=i),i=0;i<a;i++)if(u[i]!=h[i]){d=u[i]<h[i];break}o=0}for(d&&(e=u,u=h,h=e,t.s=-t.s),i=h.length-(a=u.length);i>0;--i)u[a++]=0;for(i=h.length;i>o;){if(u[--i]<h[i]){for(r=i;r&&0===u[--r];)u[r]=M-1;--u[r],u[i]+=M}u[i]-=h[i]}for(;0===u[--a];)u.pop();for(;0===u[0];u.shift())--n;return u[0]?(t.d=u,t.e=G(u,n),f?O(t,s,c):t):new v(3===c?-0:0)},D.modulo=D.mod=function(t){var e,n=this,i=n.constructor;return t=new i(t),!n.d||!t.s||t.d&&!t.d[0]?new i(NaN):!t.d||n.d&&!n.d[0]?O(new i(n),i.precision,i.rounding):(f=!1,9==i.modulo?(e=I(n,t.abs(),0,3,1)).s*=t.s:e=I(n,t,0,i.modulo,1),e=e.times(t),f=!0,n.minus(e))},D.naturalExponential=D.exp=function(){return _(this)},D.naturalLogarithm=D.ln=function(){return q(this)},D.negated=D.neg=function(){var t=new this.constructor(this);return t.s=-t.s,O(t)},D.plus=D.add=function(t){var e,n,i,r,o,a,s,c,u,l,d=this,h=d.constructor;if(t=new h(t),!d.d||!t.d)return d.s&&t.s?d.d||(t=new h(t.d||d.s===t.s?d:NaN)):t=new h(NaN),t;if(d.s!=t.s)return t.s=-t.s,d.minus(t);if(l=t.d,s=h.precision,c=h.rounding,!(u=d.d)[0]||!l[0])return l[0]||(t=new h(d)),f?O(t,s,c):t;if(o=m(d.e/N),i=m(t.e/N),u=u.slice(),r=o-i){for(r<0?(n=u,r=-r,a=l.length):(n=l,i=o,a=u.length),r>(a=(o=Math.ceil(s/N))>a?o+1:a+1)&&(r=a,n.length=1),n.reverse();r--;)n.push(0);n.reverse()}for((a=u.length)-(r=l.length)<0&&(r=a,n=l,l=u,u=n),e=0;r;)e=(u[--r]=u[r]+l[r]+e)/M|0,u[r]%=M;for(e&&(u.unshift(e),++i),a=u.length;0==u[--a];)u.pop();return t.d=u,t.e=G(u,i),f?O(t,s,c):t},D.precision=D.sd=function(t){var e,n=this;if(void 0!==t&&t!==!!t&&1!==t&&0!==t)throw Error(h+t);return n.d?(e=z(n.d),t&&n.e+1>e&&(e=n.e+1)):e=NaN,e},D.round=function(){var t=this,e=t.constructor;return O(new e(t),t.e+1,e.rounding)},D.sine=D.sin=function(){var t,e,n=this,i=n.constructor;return n.isFinite()?n.isZero()?new i(n):(e=i.rounding,i.precision=(t=i.precision)+Math.max(n.e,n.sd())+N,i.rounding=1,n=function(t,e){var n,i=e.d.length;if(i<3)return e.isZero()?e:H(t,2,e,e);n=1.4*Math.sqrt(i),e=H(t,2,e=e.times(1/U(5,n=n>16?16:0|n)),e);for(var r,o=new t(5),a=new t(16),s=new t(20);n--;)r=e.times(e),e=e.times(o.plus(r.times(a.times(r).minus(s))));return e}(i,J(i,n)),i.precision=t,i.rounding=e,O(r>2?n.neg():n,t,e,!0)):new i(NaN)},D.squareRoot=D.sqrt=function(){var t,e,n,i,r,o,a=this,s=a.d,c=a.e,u=a.s,l=a.constructor;if(1!==u||!s||!s[0])return new l(!u||u<0&&(!s||s[0])?NaN:s?a:1/0);for(f=!1,0==(u=Math.sqrt(+a))||u==1/0?(((e=E(s)).length+c)%2==0&&(e+="0"),u=Math.sqrt(e),c=m((c+1)/2)-(c<0||c%2),i=new l(e=u==1/0?"5e"+c:(e=u.toExponential()).slice(0,e.indexOf("e")+1)+c)):i=new l(u.toString()),n=(c=l.precision)+3;;)if(i=(o=i).plus(I(a,o,n+2,1)).times(.5),E(o.d).slice(0,n)===(e=E(i.d)).slice(0,n)){if("9999"!=(e=e.slice(n-3,n+1))&&(r||"4999"!=e)){+e&&(+e.slice(1)||"5"!=e.charAt(0))||(O(i,c+1,1),t=!i.times(i).eq(a));break}if(!r&&(O(o,c+1,0),o.times(o).eq(a))){i=o;break}n+=4,r=1}return f=!0,O(i,c,l.rounding,t)},D.tangent=D.tan=function(){var t,e,n=this,i=n.constructor;return n.isFinite()?n.isZero()?new i(n):(e=i.rounding,i.precision=(t=i.precision)+10,i.rounding=1,(n=n.sin()).s=1,n=I(n,new i(1).minus(n.times(n)).sqrt(),t+10,0),i.precision=t,i.rounding=e,O(2==r||4==r?n.neg():n,t,e,!0)):new i(NaN)},D.times=D.mul=function(t){var e,n,i,r,o,a,s,c,u,l=this,d=l.constructor,h=l.d,w=(t=new d(t)).d;if(t.s*=l.s,!(h&&h[0]&&w&&w[0]))return new d(!t.s||h&&!h[0]&&!w||w&&!w[0]&&!h?NaN:h&&w?0*t.s:t.s/0);for(n=m(l.e/N)+m(t.e/N),(c=h.length)<(u=w.length)&&(o=h,h=w,w=o,a=c,c=u,u=a),o=[],i=a=c+u;i--;)o.push(0);for(i=u;--i>=0;){for(e=0,r=c+i;r>i;)s=o[r]+w[i]*h[r-i-1]+e,o[r--]=s%M|0,e=s/M|0;o[r]=(o[r]+e)%M|0}for(;!o[--a];)o.pop();return e?++n:o.shift(),t.d=o,t.e=G(o,n),f?O(t,d.precision,d.rounding):t},D.toBinary=function(t,e){return K(this,2,t,e)},D.toDecimalPlaces=D.toDP=function(t,e){var n=this,i=n.constructor;return n=new i(n),void 0===t?n:(C(t,0,a),void 0===e?e=i.rounding:C(e,0,8),O(n,t+n.e+1,e))},D.toExponential=function(t,e){var n,i=this,r=i.constructor;return void 0===t?n=L(i,!0):(C(t,0,a),void 0===e?e=r.rounding:C(e,0,8),n=L(i=O(new r(i),t+1,e),!0,t+1)),i.isNeg()&&!i.isZero()?"-"+n:n},D.toFixed=function(t,e){var n,i,r=this,o=r.constructor;return void 0===t?n=L(r):(C(t,0,a),void 0===e?e=o.rounding:C(e,0,8),n=L(i=O(new o(r),t+r.e+1,e),!1,t+i.e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},D.toFraction=function(t){var e,n,i,r,o,a,s,c,u,l,d,w,v=this,g=v.d,m=v.constructor;if(!g)return new m(v);if(u=n=new m(1),i=c=new m(0),o=(e=new m(i)).e=z(g)-v.e-1,e.d[0]=p(10,(a=o%N)<0?N+a:a),null==t)t=o>0?e:u;else{if(!(s=new m(t)).isInt()||s.lt(u))throw Error(h+s);t=s.gt(e)?o>0?e:u:s}for(f=!1,s=new m(E(g)),l=m.precision,m.precision=o=g.length*N*2;d=I(s,e,0,1,1),1!=(r=n.plus(d.times(i))).cmp(t);)n=i,i=r,u=c.plus(d.times(r=u)),c=r,e=s.minus(d.times(r=e)),s=r;return r=I(t.minus(n),i,0,1,1),c=c.plus(r.times(u)),n=n.plus(r.times(i)),c.s=u.s=v.s,w=I(u,i,o,1).minus(v).abs().cmp(I(c,n,o,1).minus(v).abs())<1?[u,i]:[c,n],m.precision=l,f=!0,w},D.toHexadecimal=D.toHex=function(t,e){return K(this,16,t,e)},D.toNearest=function(t,e){var n=this,i=n.constructor;if(n=new i(n),null==t){if(!n.d)return n;t=new i(1),e=i.rounding}else{if(t=new i(t),void 0===e?e=i.rounding:C(e,0,8),!n.d)return t.s?n:t;if(!t.d)return t.s&&(t.s=n.s),t}return t.d[0]?(f=!1,n=I(n,t,0,e,1).times(t),f=!0,O(n)):(t.s=n.s,n=t),n},D.toNumber=function(){return+this},D.toOctal=function(t,e){return K(this,8,t,e)},D.toPower=D.pow=function(t){var e,n,i,r,o,a,s=this,c=s.constructor,u=+(t=new c(t));if(!(s.d&&t.d&&s.d[0]&&t.d[0]))return new c(p(+s,u));if((s=new c(s)).eq(1))return s;if(i=c.precision,o=c.rounding,t.eq(1))return O(s,i,o);if((e=m(t.e/N))>=t.d.length-1&&(n=u<0?-u:u)<=9007199254740991)return r=B(c,s,n,i),t.s<0?new c(1).div(r):O(r,i,o);if((a=s.s)<0){if(e<t.d.length-1)return new c(NaN);if(1&t.d[e]||(a=1),0==s.e&&1==s.d[0]&&1==s.d.length)return s.s=a,s}return(e=0!=(n=p(+s,u))&&isFinite(n)?new c(n+"").e:m(u*(Math.log("0."+E(s.d))/Math.LN10+s.e+1)))>c.maxE+1||e<c.minE-1?new c(e>0?a/0:0):(f=!1,c.rounding=s.s=1,n=Math.min(12,(e+"").length),(r=_(t.times(q(s,i+n)),i)).d&&P((r=O(r,i+5,1)).d,i,o)&&+E((r=O(_(t.times(q(s,(e=i+10)+n)),e),e+5,1)).d).slice(i+1,i+15)+1==1e14&&(r=O(r,i+1,0)),r.s=a,f=!0,c.rounding=o,O(r,i,o))},D.toPrecision=function(t,e){var n,i=this,r=i.constructor;return void 0===t?n=L(i,i.e<=r.toExpNeg||i.e>=r.toExpPos):(C(t,1,a),void 0===e?e=r.rounding:C(e,0,8),n=L(i=O(new r(i),t,e),t<=i.e||i.e<=r.toExpNeg,t)),i.isNeg()&&!i.isZero()?"-"+n:n},D.toSignificantDigits=D.toSD=function(t,e){var n=this.constructor;return void 0===t?(t=n.precision,e=n.rounding):(C(t,1,a),void 0===e?e=n.rounding:C(e,0,8)),O(new n(this),t,e)},D.toString=function(){var t=this,e=t.constructor,n=L(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()&&!t.isZero()?"-"+n:n},D.truncated=D.trunc=function(){return O(new this.constructor(this),this.e+1,1)},D.valueOf=D.toJSON=function(){var t=this,e=t.constructor,n=L(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()?"-"+n:n};var I=function(){function t(t,e,n){var i,r=0,o=t.length;for(t=t.slice();o--;)t[o]=(i=t[o]*e+r)%n|0,r=i/n|0;return r&&t.unshift(r),t}function e(t,e,n,i){var r,o;if(n!=i)o=n>i?1:-1;else for(r=o=0;r<n;r++)if(t[r]!=e[r]){o=t[r]>e[r]?1:-1;break}return o}function i(t,e,n,i){for(var r=0;n--;)t[n]-=r,t[n]=(r=t[n]<e[n]?1:0)*i+t[n]-e[n];for(;!t[0]&&t.length>1;)t.shift()}return function(r,o,a,s,c,u){var l,f,d,h,w,v,g,p,y,b,k,x,T,S,D,E,C,P,j,I,L=r.constructor,G=r.s==o.s?1:-1,W=r.d,A=o.d;if(!(W&&W[0]&&A&&A[0]))return new L(r.s&&o.s&&(W?!A||W[0]!=A[0]:A)?W&&0==W[0]||!A?0*G:G/0:NaN);for(u?(w=1,f=r.e-o.e):(u=M,f=m(r.e/(w=N))-m(o.e/w)),j=A.length,C=W.length,b=(y=new L(G)).d=[],d=0;A[d]==(W[d]||0);d++);if(A[d]>(W[d]||0)&&f--,null==a?(S=a=L.precision,s=L.rounding):S=c?a+(r.e-o.e)+1:a,S<0)b.push(1),v=!0;else{if(S=S/w+2|0,d=0,1==j){for(h=0,A=A[0],S++;(d<C||h)&&S--;d++)b[d]=(D=h*u+(W[d]||0))/A|0,h=D%A|0;v=h||d<C}else{for((h=u/(A[0]+1)|0)>1&&(A=t(A,h,u),W=t(W,h,u),j=A.length,C=W.length),E=j,x=(k=W.slice(0,j)).length;x<j;)k[x++]=0;(I=A.slice()).unshift(0),P=A[0],A[1]>=u/2&&++P;do{h=0,(l=e(A,k,j,x))<0?(T=k[0],j!=x&&(T=T*u+(k[1]||0)),(h=T/P|0)>1?(h>=u&&(h=u-1),1==(l=e(g=t(A,h,u),k,p=g.length,x=k.length))&&(h--,i(g,j<p?I:A,p,u))):(0==h&&(l=h=1),g=A.slice()),(p=g.length)<x&&g.unshift(0),i(k,g,x,u),-1==l&&(l=e(A,k,j,x=k.length))<1&&(h++,i(k,j<x?I:A,x,u)),x=k.length):0===l&&(h++,k=[0]),b[d++]=h,l&&k[0]?k[x++]=W[E]||0:(k=[W[E]],x=1)}while((E++<C||void 0!==k[0])&&S--);v=void 0!==k[0]}b[0]||b.shift()}if(1==w)y.e=f,n=v;else{for(d=1,h=b[0];h>=10;h/=10)d++;y.e=d+f*w-1,O(y,c?a+y.e+1:a,s,v)}return y}}();function O(t,e,n,i){var r,o,a,s,c,u,l,d,h,w=t.constructor;t:if(null!=e){if(!(d=t.d))return t;for(r=1,s=d[0];s>=10;s/=10)r++;if((o=e-r)<0)o+=N,c=(l=d[h=0])/p(10,r-(a=e)-1)%10|0;else if((h=Math.ceil((o+1)/N))>=(s=d.length)){if(!i)break t;for(;s++<=h;)d.push(0);l=c=0,r=1,a=(o%=N)-N+1}else{for(l=s=d[h],r=1;s>=10;s/=10)r++;c=(a=(o%=N)-N+r)<0?0:l/p(10,r-a-1)%10|0}if(i=i||e<0||void 0!==d[h+1]||(a<0?l:l%p(10,r-a-1)),u=n<4?(c||i)&&(0==n||n==(t.s<0?3:2)):c>5||5==c&&(4==n||i||6==n&&(o>0?a>0?l/p(10,r-a):0:d[h-1])%10&1||n==(t.s<0?8:7)),e<1||!d[0])return d.length=0,u?(d[0]=p(10,(N-(e-=t.e+1)%N)%N),t.e=-e||0):d[0]=t.e=0,t;if(0==o?(d.length=h,s=1,h--):(d.length=h+1,s=p(10,N-o),d[h]=a>0?(l/p(10,r-a)%p(10,a)|0)*s:0),u)for(;;){if(0==h){for(o=1,a=d[0];a>=10;a/=10)o++;for(a=d[0]+=s,s=1;a>=10;a/=10)s++;o!=s&&(t.e++,d[0]==M&&(d[0]=1));break}if(d[h]+=s,d[h]!=M)break;d[h--]=0,s=1}for(o=d.length;0===d[--o];)d.pop()}return f&&(t.e>w.maxE?(t.d=null,t.e=NaN):t.e<w.minE&&(t.e=0,t.d=[0])),t}function L(t,e,n){if(!t.isFinite())return Q(t);var i,r=t.e,o=E(t.d),a=o.length;return e?(n&&(i=n-a)>0?o=o.charAt(0)+"."+o.slice(1)+Y(i):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(t.e<0?"e":"e+")+t.e):r<0?(o="0."+Y(-r-1)+o,n&&(i=n-a)>0&&(o+=Y(i))):r>=a?(o+=Y(r+1-a),n&&(i=n-r-1)>0&&(o=o+"."+Y(i))):((i=r+1)<a&&(o=o.slice(0,i)+"."+o.slice(i)),n&&(i=n-a)>0&&(r+1===a&&(o+="."),o+=Y(i))),o}function G(t,e){var n=t[0];for(e*=N;n>=10;n/=10)e++;return e}function W(t,e,n){if(e>T)throw f=!0,n&&(t.precision=n),Error(w);return O(new t(c),e,1,!0)}function A(t,e,n){if(e>S)throw Error(w);return O(new t(u),e,n,!0)}function z(t){var e=t.length-1,n=e*N+1;if(e=t[e]){for(;e%10==0;e/=10)n--;for(e=t[0];e>=10;e/=10)n++}return n}function Y(t){for(var e="";t--;)e+="0";return e}function B(t,e,n,i){var r,o=new t(1),a=Math.ceil(i/N+4);for(f=!1;;){if(n%2&&V((o=o.times(e)).d,a)&&(r=!0),0===(n=m(n/2))){n=o.d.length-1,r&&0===o.d[n]&&++o.d[n];break}V((e=e.times(e)).d,a)}return f=!0,o}function R(t){return 1&t.d[t.d.length-1]}function $(t,e,n){for(var i,r,o=new t(e[0]),a=0;++a<e.length;){if(!(r=new t(e[a])).s){o=r;break}((i=o.cmp(r))===n||0===i&&o.s===n)&&(o=r)}return o}function _(t,e){var n,i,r,o,a,s,c,u=0,l=0,d=0,h=t.constructor,w=h.rounding,v=h.precision;if(!t.d||!t.d[0]||t.e>17)return new h(t.d?t.d[0]?t.s<0?0:1/0:1:t.s?t.s<0?0:t:NaN);for(null==e?(f=!1,c=v):c=e,s=new h(.03125);t.e>-2;)t=t.times(s),d+=5;for(c+=i=Math.log(p(2,d))/Math.LN10*2+5|0,n=o=a=new h(1),h.precision=c;;){if(o=O(o.times(t),c,1),n=n.times(++l),E((s=a.plus(I(o,n,c,1))).d).slice(0,c)===E(a.d).slice(0,c)){for(r=d;r--;)a=O(a.times(a),c,1);if(null!=e)return h.precision=v,a;if(!(u<3&&P(a.d,c-i,w,u)))return O(a,h.precision=v,w,f=!0);h.precision=c+=10,n=o=s=new h(1),l=0,u++}a=s}}function q(t,e){var n,i,r,o,a,s,c,u,l,d,h,w=1,v=t,g=v.d,m=v.constructor,p=m.rounding,y=m.precision;if(v.s<0||!g||!g[0]||!v.e&&1==g[0]&&1==g.length)return new m(g&&!g[0]?-1/0:1!=v.s?NaN:g?0:v);if(null==e?(f=!1,l=y):l=e,m.precision=l+=10,i=(n=E(g)).charAt(0),!(Math.abs(o=v.e)<15e14))return u=W(m,l+2,y).times(o+""),v=q(new m(i+"."+n.slice(1)),l-10).plus(u),m.precision=y,null==e?O(v,y,p,f=!0):v;for(;i<7&&1!=i||1==i&&n.charAt(1)>3;)i=(n=E((v=v.times(t)).d)).charAt(0),w++;for(o=v.e,i>1?(v=new m("0."+n),o++):v=new m(i+"."+n.slice(1)),d=v,c=a=v=I(v.minus(1),v.plus(1),l,1),h=O(v.times(v),l,1),r=3;;){if(a=O(a.times(h),l,1),E((u=c.plus(I(a,new m(r),l,1))).d).slice(0,l)===E(c.d).slice(0,l)){if(c=c.times(2),0!==o&&(c=c.plus(W(m,l+2,y).times(o+""))),c=I(c,new m(w),l,1),null!=e)return m.precision=y,c;if(!P(c.d,l-10,p,s))return O(c,m.precision=y,p,f=!0);m.precision=l+=10,u=a=v=I(d.minus(1),d.plus(1),l,1),h=O(v.times(v),l,1),r=s=1}c=u,r+=2}}function Q(t){return String(t.s*t.s/0)}function X(t,e){var n,i,r;for((n=e.indexOf("."))>-1&&(e=e.replace(".","")),(i=e.search(/e/i))>0?(n<0&&(n=i),n+=+e.slice(i+1),e=e.substring(0,i)):n<0&&(n=e.length),i=0;48===e.charCodeAt(i);i++);for(r=e.length;48===e.charCodeAt(r-1);--r);if(e=e.slice(i,r)){if(r-=i,t.e=n=n-i-1,t.d=[],i=(n+1)%N,n<0&&(i+=N),i<r){for(i&&t.d.push(+e.slice(0,i)),r-=N;i<r;)t.d.push(+e.slice(i,i+=N));e=e.slice(i),i=N-e.length}else i-=r;for(;i--;)e+="0";t.d.push(+e),f&&(t.e>t.constructor.maxE?(t.d=null,t.e=NaN):t.e<t.constructor.minE&&(t.e=0,t.d=[0]))}else t.e=0,t.d=[0];return t}function F(t,n){var i,r,o,a,s,c,u,l,d;if(n.indexOf("_")>-1){if(n=n.replace(/(\d)_(?=\d)/g,"$1"),x.test(n))return X(t,n)}else if("Infinity"===n||"NaN"===n)return+n||(t.s=NaN),t.e=NaN,t.d=null,t;if(b.test(n))i=16,n=n.toLowerCase();else if(y.test(n))i=2;else{if(!k.test(n))throw Error(h+n);i=8}for((a=n.search(/p/i))>0?(u=+n.slice(a+1),n=n.substring(2,a)):n=n.slice(2),a=n.indexOf("."),r=t.constructor,(s=a>=0)&&(a=(c=(n=n.replace(".","")).length)-a,o=B(r,new r(i),a,2*a)),a=d=(l=j(n,i,M)).length-1;0===l[a];--a)l.pop();return a<0?new r(0*t.s):(t.e=G(l,d),t.d=l,f=!1,s&&(t=I(t,o,4*c)),u&&(t=t.times(Math.abs(u)<54?p(2,u):e.pow(2,u))),f=!0,t)}function H(t,e,n,i,r){var o,a,s,c,u=t.precision,l=Math.ceil(u/N);for(f=!1,c=n.times(n),s=new t(i);;){if(a=I(s.times(c),new t(e++*e++),u,1),s=r?i.plus(a):i.minus(a),i=I(a.times(c),new t(e++*e++),u,1),void 0!==(a=s.plus(i)).d[l]){for(o=l;a.d[o]===s.d[o]&&o--;);if(-1==o)break}o=s,s=i,i=a,a=o}return f=!0,a.d.length=l+1,a}function U(t,e){for(var n=t;--e;)n*=t;return n}function J(t,e){var n,i=e.s<0,o=A(t,t.precision,1),a=o.times(.5);if((e=e.abs()).lte(a))return r=i?4:1,e;if((n=e.divToInt(o)).isZero())r=i?3:2;else{if((e=e.minus(n.times(o))).lte(a))return r=R(n)?i?2:3:i?4:1,e;r=R(n)?i?1:4:i?3:2}return e.minus(o).abs()}function K(t,e,i,r){var o,c,u,l,f,d,h,w,v,g=t.constructor,m=void 0!==i;if(m?(C(i,1,a),void 0===r?r=g.rounding:C(r,0,8)):(i=g.precision,r=g.rounding),t.isFinite()){for(m?(o=2,16==e?i=4*i-3:8==e&&(i=3*i-2)):o=e,(u=(h=L(t)).indexOf("."))>=0&&(h=h.replace(".",""),(v=new g(1)).e=h.length-u,v.d=j(L(v),10,o),v.e=v.d.length),c=f=(w=j(h,10,o)).length;0==w[--f];)w.pop();if(w[0]){if(u<0?c--:((t=new g(t)).d=w,t.e=c,w=(t=I(t,v,i,r,0,o)).d,c=t.e,d=n),u=w[i],l=o/2,d=d||void 0!==w[i+1],d=r<4?(void 0!==u||d)&&(0===r||r===(t.s<0?3:2)):u>l||u===l&&(4===r||d||6===r&&1&w[i-1]||r===(t.s<0?8:7)),w.length=i,d)for(;++w[--i]>o-1;)w[i]=0,i||(++c,w.unshift(1));for(f=w.length;!w[f-1];--f);for(u=0,h="";u<f;u++)h+=s.charAt(w[u]);if(m){if(f>1)if(16==e||8==e){for(u=16==e?4:3,--f;f%u;f++)h+="0";for(f=(w=j(h,o,e)).length;!w[f-1];--f);for(u=1,h="1.";u<f;u++)h+=s.charAt(w[u])}else h=h.charAt(0)+"."+h.slice(1);h=h+(c<0?"p":"p+")+c}else if(c<0){for(;++c;)h="0"+h;h="0."+h}else if(++c>f)for(c-=f;c--;)h+="0";else c<f&&(h=h.slice(0,c)+"."+h.slice(c))}else h=m?"0p+0":"0";h=(16==e?"0x":2==e?"0b":8==e?"0o":"")+h}else h=Q(t);return t.s<0?"-"+h:h}function V(t,e){if(t.length>e)return t.length=e,!0}function tt(t){return new this(t).abs()}function et(t){return new this(t).acos()}function nt(t){return new this(t).acosh()}function it(t,e){return new this(t).plus(e)}function rt(t){return new this(t).asin()}function ot(t){return new this(t).asinh()}function at(t){return new this(t).atan()}function st(t){return new this(t).atanh()}function ct(t,e){t=new this(t),e=new this(e);var n,i=this.precision,r=this.rounding,o=i+4;return t.s&&e.s?t.d||e.d?!e.d||t.isZero()?(n=e.s<0?A(this,i,r):new this(0)).s=t.s:!t.d||e.isZero()?(n=A(this,o,1).times(.5)).s=t.s:e.s<0?(this.precision=o,this.rounding=1,n=this.atan(I(t,e,o,1)),e=A(this,o,1),this.precision=i,this.rounding=r,n=t.s<0?n.minus(e):n.plus(e)):n=this.atan(I(t,e,o,1)):(n=A(this,o,1).times(e.s>0?.25:.75)).s=t.s:n=new this(NaN),n}function ut(t){return new this(t).cbrt()}function lt(t){return O(t=new this(t),t.e+1,2)}function ft(t,e,n){return new this(t).clamp(e,n)}function dt(t){if(!t||"object"!=typeof t)throw Error(d+"Object expected");var e,n,i,r=!0===t.defaults,s=["precision",1,a,"rounding",0,8,"toExpNeg",-o,0,"toExpPos",0,o,"maxE",0,o,"minE",-o,0,"modulo",0,9];for(e=0;e<s.length;e+=3)if(n=s[e],r&&(this[n]=l[n]),void 0!==(i=t[n])){if(!(m(i)===i&&i>=s[e+1]&&i<=s[e+2]))throw Error(h+n+": "+i);this[n]=i}if(n="crypto",r&&(this[n]=l[n]),void 0!==(i=t[n])){if(!0!==i&&!1!==i&&0!==i&&1!==i)throw Error(h+n+": "+i);if(i){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(v);this[n]=!0}else this[n]=!1}return this}function ht(t){return new this(t).cos()}function wt(t){return new this(t).cosh()}function vt(t,e){return new this(t).div(e)}function gt(t){return new this(t).exp()}function mt(t){return O(t=new this(t),t.e+1,3)}function pt(){var t,e,n=new this(0);for(f=!1,t=0;t<arguments.length;)if((e=new this(arguments[t++])).d)n.d&&(n=n.plus(e.times(e)));else{if(e.s)return f=!0,new this(1/0);n=e}return f=!0,n.sqrt()}function yt(t){return t instanceof e||t&&t.toStringTag===g||!1}function bt(t){return new this(t).ln()}function kt(t,e){return new this(t).log(e)}function xt(t){return new this(t).log(2)}function Mt(t){return new this(t).log(10)}function Nt(){return $(this,arguments,-1)}function Tt(){return $(this,arguments,1)}function St(t,e){return new this(t).mod(e)}function Dt(t,e){return new this(t).mul(e)}function Et(t,e){return new this(t).pow(e)}function Ct(t){var e,n,i,r,o=0,s=new this(1),c=[];if(void 0===t?t=this.precision:C(t,1,a),i=Math.ceil(t/N),this.crypto)if(crypto.getRandomValues)for(e=crypto.getRandomValues(new Uint32Array(i));o<i;)(r=e[o])>=429e7?e[o]=crypto.getRandomValues(new Uint32Array(1))[0]:c[o++]=r%1e7;else{if(!crypto.randomBytes)throw Error(v);for(e=crypto.randomBytes(i*=4);o<i;)(r=e[o]+(e[o+1]<<8)+(e[o+2]<<16)+((127&e[o+3])<<24))>=214e7?crypto.randomBytes(4).copy(e,o):(c.push(r%1e7),o+=4);o=i/4}else for(;o<i;)c[o++]=1e7*Math.random()|0;for(i=c[--o],t%=N,i&&t&&(r=p(10,N-t),c[o]=(i/r|0)*r);0===c[o];o--)c.pop();if(o<0)n=0,c=[0];else{for(n=-1;0===c[0];n-=N)c.shift();for(i=1,r=c[0];r>=10;r/=10)i++;i<N&&(n-=N-i)}return s.e=n,s.d=c,s}function Pt(t){return O(t=new this(t),t.e+1,this.rounding)}function jt(t){return(t=new this(t)).d?t.d[0]?t.s:0*t.s:t.s||NaN}function It(t){return new this(t).sin()}function Ot(t){return new this(t).sinh()}function Lt(t){return new this(t).sqrt()}function Gt(t,e){return new this(t).sub(e)}function Wt(){var t=0,e=arguments,n=new this(e[t]);for(f=!1;n.s&&++t<e.length;)n=n.plus(e[t]);return f=!0,O(n,this.precision,this.rounding)}function At(t){return new this(t).tan()}function zt(t){return new this(t).tanh()}function Yt(t){return O(t=new this(t),t.e+1,1)}(e=function t(e){var n,i,r;function o(t){var e,n,i,r=this;if(!(r instanceof o))return new o(t);if(r.constructor=o,yt(t))return r.s=t.s,void(f?!t.d||t.e>o.maxE?(r.e=NaN,r.d=null):t.e<o.minE?(r.e=0,r.d=[0]):(r.e=t.e,r.d=t.d.slice()):(r.e=t.e,r.d=t.d?t.d.slice():t.d));if("number"==(i=typeof t)){if(0===t)return r.s=1/t<0?-1:1,r.e=0,void(r.d=[0]);if(t<0?(t=-t,r.s=-1):r.s=1,t===~~t&&t<1e7){for(e=0,n=t;n>=10;n/=10)e++;return void(f?e>o.maxE?(r.e=NaN,r.d=null):e<o.minE?(r.e=0,r.d=[0]):(r.e=e,r.d=[t]):(r.e=e,r.d=[t]))}return 0*t!=0?(t||(r.s=NaN),r.e=NaN,void(r.d=null)):X(r,t.toString())}if("string"===i)return 45===(n=t.charCodeAt(0))?(t=t.slice(1),r.s=-1):(43===n&&(t=t.slice(1)),r.s=1),x.test(t)?X(r,t):F(r,t);if("bigint"===i)return t<0?(t=-t,r.s=-1):r.s=1,X(r,t.toString());throw Error(h+t)}if(o.prototype=D,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.EUCLID=9,o.config=o.set=dt,o.clone=t,o.isDecimal=yt,o.abs=tt,o.acos=et,o.acosh=nt,o.add=it,o.asin=rt,o.asinh=ot,o.atan=at,o.atanh=st,o.atan2=ct,o.cbrt=ut,o.ceil=lt,o.clamp=ft,o.cos=ht,o.cosh=wt,o.div=vt,o.exp=gt,o.floor=mt,o.hypot=pt,o.ln=bt,o.log=kt,o.log10=Mt,o.log2=xt,o.max=Nt,o.min=Tt,o.mod=St,o.mul=Dt,o.pow=Et,o.random=Ct,o.round=Pt,o.sign=jt,o.sin=It,o.sinh=Ot,o.sqrt=Lt,o.sub=Gt,o.sum=Wt,o.tan=At,o.tanh=zt,o.trunc=Yt,void 0===e&&(e={}),e&&!0!==e.defaults)for(r=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],n=0;n<r.length;)e.hasOwnProperty(i=r[n++])||(e[i]=this[i]);return o.config(e),o}(l)).prototype.constructor=e,e.default=e.Decimal=e,c=new e(c),u=new e(u),Z.exports?("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator&&(D[Symbol.for("nodejs.util.inspect.custom")]=D.toString,D[Symbol.toStringTag]="Decimal"),Z.exports=e):(t||(t="undefined"!=typeof self&&self&&self.self==self?self:window),i=t.Decimal,e.noConflict=function(){return t.Decimal=i,e},t.Decimal=e)}(V);const et=tt.exports;var nt;!function(t){t.WON="Won",t.LOST="Lost"}(nt||(nt={}));const it=["ro","en","fr","ar","hr"],rt={en:{totalItems:"Total {total} items",perPage:"{size} / page",goTo:"Go to",filter:"Filter",clear:"Clear",searchByTicketId:"Search by Ticket ID",enterTicketId:"Enter Ticket ID",searchByTicketType:"Search by Ticket Type",selectTicketType:"Select Ticket Type",searchByDate:"Search by Date",from:"From",to:"To",normal:"Normal",subscription:"Subscription",ticketsHistory:"Tickets History",settled:"Settled",purchased:"Purchased",canceled:"Canceled",noData:"No data Avaliable.",ticketId:"Ticket ID:",ticketType:"Ticket Type:",ticketAmount:"Ticket Amount:",lineDetail:"Line Detail:",seeDetails:"See Details",numberOfDraw:"Number of Draw:",ticketResult:"Ticket Result:",drawId:"Draw ID:",drawDate:"Draw Date:",result:"Result:",prize:"Prize:",bettingType:"Betting Type:"},ro:{},fr:{},ar:{},hr:{}},ot=(t,e,n)=>{const i=e;let r=rt[void 0!==i&&it.includes(i)?i:"en"][t];return n&&Object.keys(n).forEach((t=>{r=r.replace(`{${t}}`,n[t])})),r},at=t=>{Object.keys(t).forEach((e=>{for(let n in t[e])rt[e][n]=t[e][n]}))};function st(t,e="GET",n=null,i={}){return new Promise(((r,o)=>{const a="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})),s=Object.assign({"Content-Type":"application/json"},i);"GET"!==e&&"HEAD"!==e&&(s["X-Idempotency-Key"]=a);const c={method:e,headers:s,body:null};n&&"GET"!==e&&"HEAD"!==e?c.body=JSON.stringify(n):delete c.body,fetch(t,c).then((t=>t.ok?t.json():o(t))).then((t=>r(t))).catch((t=>o(t)))}))}function ct(t,e){return null==t||""===t||(0!==t||!e)&&(Array.isArray(t)?function(t){if(0===t.length)return!0;const e=t.length;let n=0;for(let i=0;i<e;i++){if(!ct(t[i]))return!1;n++}return n===e}(t):"[object Object]"===Object.prototype.toString.call(t)?function(t){if(0===Object.keys(t).length)return!0;const e=Object.keys(t).length;let n=0;for(const e of Object.values(t)){if(!ct(e))return!1;n++}return n===e}(t):!t)}const ut={0:"1",1:"X",2:"2"},lt={H:0,D:1,A:2},ft=t=>t.map((t=>{const e=[0,0,0];return t[0].forEach((t=>{const n=lt[t];void 0!==n&&(e[n]=1)})),e.map(((t,e)=>({isSelected:1===t,value:ut[e]})))})),dt=t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),ht=({message:t,theme:e="success"})=>{window.postMessage({type:"ShowNotificationToast",message:t,theme:e})},wt=class{constructor(n){t(this,n),this.logout=e(this,"logout",7),this.ticketTypeMap={NORMAL:"Normal",SYNDICATE:"Syndicate",SUBSCRIPTION:"Subscription"},this.resultMap={[nt.WON]:"Win",[nt.LOST]:"Lose"},this.displayPrizeCategory=t=>{const e=new Map;t.forEach((t=>{let n=t.divisionDisplayName,i=t.currency;if(n&&"None"!==n){const r=new et(t.amount);if(e.has(n)){const t=e.get(n),o=t.amount.plus(r);e.set(n,{amount:o,currency:i,times:t.times+1})}else e.set(n,{amount:r,currency:i,times:1})}}));const n=[];for(let[t,i]of e.entries()){const e=i.amount.times(100).floor().dividedBy(100);n.push({prizeName:t,amount:e.toNumber(),currency:i.currency,times:i.times})}return n.sort(((t,e)=>e.prizeName.localeCompare(t.prizeName))),n},this.endpoint=void 0,this.gameId=void 0,this.playerId=void 0,this.sessionId="",this.drawId=void 0,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.language="en",this.translationUrl="",this.ticketHistory=[],this.activeStatus="",this.statusOptions=void 0,this.isLoading=!0,this.rawData={},this.filterData={offset:0,limit:10,state:"",from:"",to:"",wagerType:"",vendorGameType:"PoolGame",vendorGameBettingObject:"HomeDrawAway",id:""},this.paginationInfo={current:1,total:0,pageSize:10},this.quickFiltersActive=!1,this.showCurrentTicketLine=!1,this.curTicketItem=void 0,this.curSelection=[],this.curSelectionIdx=0,this.showCurrentDrawResult=!1,this.curDrawItem=void 0,this.curDrawSelection=[],this.curDrawSelectionBettingType=void 0,this.curDrawSelectionMap={}}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&o(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&a(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&o(this.stylingContainer,this.clientStylingUrl))}async fetchGameData(){var t;try{let t=new URL(`${this.endpoint}/games/${this.gameId}`);const e=await st(t.href,"GET");this.rawData=e}catch(e){ht({message:null!==(t=e.message)&&void 0!==t?t:e,theme:"error"})}}connectedCallback(){this.endpoint&&this.gameId&&this.fetchGameData()}handleGameInfoChange(t,e){t&&t!=e&&this.fetchGameData()}handleTicketInfoChange(t,e){t&&t!=e&&this.fetchTicketList()}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}async fetchTicketList(){this.isLoading=!0;try{const{items:t,total:e}=await st(`${this.endpoint}/tickets${function(t){const e={};Object.entries(t).forEach((([t,n])=>{ct(n,!0)||(e[t]=n)}));const n=Object.entries(e).map((([t,e])=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`)).join("&");return n?`?${n}`:""}(this.filterData)}`,"GET",null,{Authorization:`Bearer ${this.sessionId}`});this.ticketHistory=t,this.paginationInfo.total=e,t.length>0&&this.getDrawResult()}catch(t){console.log("in fetchTicketList error is: ",t),401===t.status&&(ht({message:t.message,theme:"error"}),this.logout.emit())}finally{this.isLoading=!1}}async fetchDrawResult(t,e){try{return await st(`${this.endpoint}/games/${t}/draws/${e}`,"GET",{})}catch(t){console.log(t)}}getDivision(t,e){var n;let i=t.division,r=null===(n=e.prizes)||void 0===n?void 0:n.filter((t=>t.order===i));return r&&r.length?r[0].division:null}async getDrawResult(){const t=new Map;this.ticketHistory.forEach(((e,n)=>{e.drawResults.forEach(((i,r)=>{const o=`${i.drawId}-${e.gameId}`;t.has(o)?t.get(o).indices.push({ticketIndex:n,drawIndex:r}):t.set(o,{drawId:i.drawId,gameId:e.gameId,indices:[{ticketIndex:n,drawIndex:r}]})}))}));let e=[...this.ticketHistory];await Promise.all(Array.from(t.values()).map((async({gameId:t,drawId:n,indices:i})=>{try{const r=await this.fetchDrawResult(t,n);r&&i.forEach((({ticketIndex:t,drawIndex:n})=>{const i=Object.assign(Object.assign({},e[t].drawResults[n]),{tempDrawData:Object.assign(Object.assign({},r),{vendorGameId:e[t].vendorGameId}),prizeDetails:this.displayPrizeCategory(e[t].drawResults[n].details)}),o=[...e[t].drawResults];o[n]=i,e[t]=Object.assign(Object.assign({},e[t]),{drawResults:o})}))}catch(e){console.error(`failed to fetch draw result (gameId: ${t}, drawId: ${n}):`,e)}}))),this.ticketHistory=e}componentWillLoad(){this.translationUrl&&at(JSON.parse(this.translationUrl)),this.statusOptions=[{label:ot("settled",this.language),value:"Settled"},{label:ot("purchased",this.language),value:"Purchased"},{label:ot("canceled",this.language),value:"Canceled"}],this.fetchTicketList()}changeStatus(t){this.activeStatus=t,this.filterData.state=t,this.quickFiltersActive=!0,this.fetchTicketList()}handlePageSizeChange(t){this.filterData.limit=t.detail,this.fetchTicketList()}handlePageChange(t){this.filterData.offset=(t.detail-1)*this.filterData.limit,this.fetchTicketList()}handleShowTicketLineDetial(t){this.curSelectionIdx=0,this.showCurrentTicketLine=!0,this.curTicketItem=t,this.curSelection=this.parseSelection()}handleShowCurrentDraw(t){this.showCurrentDrawResult=!0,this.curDrawItem=t,this.curDrawSelectionBettingType=t.winningNumbers[0].winning_type,this.curDrawItem.winningNumbers.forEach((t=>{this.curDrawSelectionMap[t.winning_type]=[ft(t.poolGameOutcomes)]})),this.curDrawSelection=this.curDrawSelectionMap[this.curDrawSelectionBettingType]}parseSelection(){const t=[];return this.curTicketItem.selection.forEach(((e,n)=>{t[n]=ft(e.poolGameSelections)})),t}handleFilterChange(t){const e=t.detail;this.filterData.from=e.filterFromCalendar,this.filterData.to=e.filterToCalendar,this.filterData.id=e.ticketId,this.filterData.wagerType=e.ticketType,this.fetchTicketList()}handleFilterClear(){this.activeStatus="",this.quickFiltersActive=!1,this.filterData={offset:0,limit:10,state:"",from:"",to:"",wagerType:"",vendorGameType:"PoolGame",vendorGameBettingObject:"HomeDrawAway",id:""},this.fetchTicketList()}get playTypeConfig(){var t,e,n;return null===(n=null===(e=null===(t=this.rawData)||void 0===t?void 0:t.rules)||void 0===e?void 0:e.poolGame)||void 0===n?void 0:n.playTypes}get bettingTypeConfig(){var t,e,n;return null===(n=null===(e=null===(t=this.rawData)||void 0===t?void 0:t.rules)||void 0===e?void 0:e.poolGame)||void 0===n?void 0:n.bettingTypes}getBettingType(t){var e;return null!==(e=this.playTypeConfig.find((e=>e.betTypeId===t)).bettingType)&&void 0!==e?e:""}handlePoolGameCurrentPageChange(t){const{currentPage:e}=t.detail;this.curSelectionIdx=e-1}handleDrawBettingTypeChange(t){this.curDrawSelectionBettingType=t,this.curDrawSelection=this.curDrawSelectionMap[this.curDrawSelectionBettingType]}getBettingTypeName(t){var e,n;const i=null===(n=null===(e=this.bettingTypeConfig)||void 0===e?void 0:e.find((e=>e.code===t)))||void 0===n?void 0:n.name;return null!=i?i:t}render(){return n("div",{key:"b02e16006ef81857aca03cf33faad9bac810ba43",class:"lottery-tipping-ticket-history",ref:t=>this.stylingContainer=t},n("div",{key:"2b706639cc4dd178079435fbc5104e5b1c958192",class:"ticket-history-title"},ot("ticketsHistory",this.language)),n("div",{key:"aff2bd75b280e67fe1e5be5703658006f6864d9a",class:"filter-wrap"},n("div",{key:"73706288e67206eb5b4a4c17f0511f3f9b7c8f47",class:"filter-status"},this.statusOptions.map((t=>n("div",{class:"filter-status-btn"+(this.activeStatus==t.value?" active":""),onClick:()=>this.changeStatus(t.value)},t.label)))),n("div",{key:"109ba27a6c3ec93b51afc9d2e580c93f36ca300f",class:"filter-operation"},n("lottery-tipping-filter",{key:"794dd4052e54e2ced8fa930569332187da08850f","quick-filters-active":this.quickFiltersActive,language:this.language,"translation-url":this.translationUrl}))),this.isLoading&&n("div",{key:"abf12999f0113eafbf3d9f1966d64c5a386fbdd0",class:"loading-wrap"},n("section",{key:"c630b5a0669002fd3a59c5203ec2c7f26ef414ae",class:"dots-container"},n("div",{key:"5b56f0c9eb26ca5ea7cbf3cb6404b5651a445f57",class:"dot"}),n("div",{key:"38181cef9fa97c878c2be843b0190cbebf4c357e",class:"dot"}),n("div",{key:"aa1d884538b858c7cf63b86a249fa4a7ebfedbfc",class:"dot"}),n("div",{key:"b05c4e61eae3febab733a21dbc233a2e504cd06f",class:"dot"}),n("div",{key:"fa35a7a561e9dcee914918d310684c4dfccbb2c3",class:"dot"}))),!this.isLoading&&this.paginationInfo.total>0&&n("div",{key:"ed4c56668d6c35d1dfeae31b00d477e2385d09cd",class:"ticket-list-wrap"},this.ticketHistory.map((t=>n("lottery-tipping-panel",{"header-title":K(new Date(t.createdAt),"dd/MM/yyyy HH:mm:ss")+" "+t.state},n("div",{class:"panel-content",slot:"content"},n("div",{class:"ticket-info"},n("div",{class:"ticket-info-item"},n("div",{class:"ticket-info-label"},ot("ticketId",this.language)),n("div",{class:"ticket-info-val"},t.id," ")),n("div",{class:"ticket-info-item"},n("div",{class:"ticket-info-label"},ot("ticketType",this.language)),n("div",{class:"ticket-info-val"},this.ticketTypeMap[t.wagerType]," ")),n("div",{class:"ticket-info-item"},n("div",{class:"ticket-info-label"},ot("ticketAmount",this.language)),n("div",{class:"ticket-info-val"},`${t.amount} ${t.currency}`)),n("div",{class:"ticket-info-item"},n("div",{class:"ticket-info-label"},ot("lineDetail",this.language)),n("div",{class:"ticket-info-val"},n("span",{class:"show-detail-link",onClick:()=>this.handleShowTicketLineDetial(t)},ot("seeDetails",this.language)))),n("div",{class:"ticket-info-item"},n("div",{class:"ticket-info-label"},ot("numberOfDraw",this.language)),n("div",{class:"ticket-info-val"},t.drawCount))),"Settled"==t.state&&t.drawResults.map((t=>n("div",{class:"draw-info-container"},t.tempDrawData?n("div",{class:"draw-info"},n("div",{class:"draw-info-item"},n("div",{class:"draw-info-label"},ot("ticketResult",this.language)),n("div",{class:"draw-info-val"},this.resultMap[t.state])),n("div",{class:"draw-info-item"},n("div",{class:"draw-info-label"},ot("drawId",this.language)),n("div",{class:"draw-info-val"},t.drawId)),n("div",{class:"draw-info-item"},n("div",{class:"draw-info-label"},ot("drawDate",this.language)),n("div",{class:"draw-info-val"},K(new Date(t.tempDrawData.date),"dd/MM/yyyy"))),n("div",{class:"draw-info-item"},n("div",{class:"draw-info-label"},ot("result",this.language)),n("div",{class:"draw-info-val"},n("span",{class:"show-detail-link",onClick:()=>this.handleShowCurrentDraw(t.tempDrawData)},ot("seeDetails",this.language)))),t.state===nt.WON&&n("div",{class:"draw-info-item"},n("div",{class:"draw-info-label"},ot("prize",this.language)),n("div",{class:"draw-info-val1"},n("div",{style:{height:"20px"}}),t.prizeDetails.map((t=>n("span",null,n("div",null,n("span",{style:{color:"rgb(85, 85, 85)"}},t.prizeName,t.times>1?" x "+t.times:"",":"," "),n("span",{style:{"margin-right":"4px",color:"rgb(85, 85, 85)"}},function(t){if(0===t)return"0";if(!t)return"";const e=(t=t.toString()).split(".");return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),e.join(".")}(t.amount)),n("span",{style:{color:"rgb(85, 85, 85)"}},t.currency)))))))):n("div",{class:"draw-info-skeleton"},[...Array(5)].map((()=>n("div",{class:"skeleton-line"})))))))))))),!this.isLoading&&0===this.paginationInfo.total&&n("div",{key:"cfc0d7ac1b6c9889a1c506c4c4c619edd090ed00",class:"empty-wrap"},ot("noData",this.language)),n("lottery-tipping-dialog",{key:"a14a317cffd4610bcbff55921e269c745126d022",visible:this.showCurrentTicketLine,width:dt(window.navigator.userAgent)?void 0:"720px",fullscreen:dt(window.navigator.userAgent),closable:!0,showFooter:!1,onCancel:()=>{this.showCurrentTicketLine=!1},language:this.language,"translation-url":this.translationUrl},this.curSelection&&this.curSelection.length&&this.showCurrentTicketLine&&n("div",{key:"9d4a8cbb7ae6ef0fcb4fbcbe319536af5f2f0d61"},n("div",{key:"e2be8d66a0b0c8685f2f4c25a4c1a636559a173b",class:"betting-type"},n("div",{key:"55679755750f29adbda546b4fee562738dcad2ea",class:"betting-type-title"},ot("bettingType",this.language)),n("div",{key:"6c2515cc5d387b1536725def1327de0c2663e533",class:"betting-type-text"},this.getBettingTypeName(this.getBettingType(this.curTicketItem.selection[this.curSelectionIdx].betType)))),n("lottery-tipping-ticket-bet",{key:"cc1b2ad744b29b0cae220fec69da53ded46c953e",endpoint:this.endpoint,"session-id":this.sessionId,"game-id":this.curTicketItem.vendorGameId,"draw-id":this.curTicketItem.startingDrawId,"default-bullet-config-line-group":JSON.stringify(this.curSelection),"read-pretty":!0,"total-pages":this.curSelection.length,language:this.language,"translation-url":this.translationUrl}))),n("lottery-tipping-dialog",{key:"575831b309b2c3b43e813483e9064803cdbc0463",visible:this.showCurrentDrawResult,width:dt(window.navigator.userAgent)?void 0:"720px",fullscreen:dt(window.navigator.userAgent),closable:!0,showFooter:!1,onCancel:()=>{this.showCurrentDrawResult=!1},language:this.language,"translation-url":this.translationUrl},this.curDrawSelection&&this.curDrawSelection.length&&this.showCurrentDrawResult&&n("div",{key:"cdf73ca5a7263941b935525f18fd39b1d6034d49"},n("div",{key:"ac5cd287a42677779903b6ead9c73848a150cd26",class:"betting-type"},n("div",{key:"86310f6933002c9af336a712d2f29af258e88181",class:"betting-type-title"},ot("bettingType",this.language)),n("div",{key:"6c13ff903cbcb05c51c57a2691ac9b8658131221",class:"betting-type-text"},n("div",{key:"826113f7035e8ef5561bf7aea1e55b021eb316ae",class:"LotteryTippingTicketController__segmented-control"},Object.keys(this.curDrawSelectionMap).map((t=>n("button",{class:{LotteryTippingTicketController__segment:!0,"LotteryTippingTicketController__segment--active":this.curDrawSelectionBettingType===t},onClick:()=>this.handleDrawBettingTypeChange(t)},this.getBettingTypeName(t))))))),n("lottery-tipping-ticket-bet",{key:"367642bb4fc8ad2c00a3b796d5a1feda6435e0d6",endpoint:this.endpoint,"session-id":this.sessionId,"game-id":this.curDrawItem.vendorGameId,"draw-id":this.curDrawItem.id,"default-bullet-config-line-group":JSON.stringify(this.curDrawSelection),"read-pretty":!0,"total-pages":this.curDrawSelection.length,language:this.language,"translation-url":this.translationUrl}))),n("div",{key:"886648a3e69f2508c1296dde6ce36e5b33190a8b",class:"pagination-wrap"},n("lottery-tipping-pagination",{key:"91141bf75596923734a49f9550cb9abed9846917",total:this.paginationInfo.total,current:this.paginationInfo.current,"page-size":this.paginationInfo.pageSize,language:this.language,"translation-url":this.translationUrl})))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],gameId:["handleGameInfoChange"],endpoint:["handleGameInfoChange"],playerId:["handleTicketInfoChange"],sessionId:["handleTicketInfoChange"]}}};wt.style="@keyframes skeleton-loading{0%{background-position:200% 0}100%{background-position:-200% 0}}.lottery-tipping-ticket-history{padding:12px}.lottery-tipping-ticket-history .ticket-history-title{margin:20px 0;text-align:center;font-size:20px;font-weight:700;color:var(--emw--color-typography, #000)}.lottery-tipping-ticket-history .ticket-info{display:flex;flex-direction:column;gap:12px}.lottery-tipping-ticket-history .ticket-info-item{display:flex;align-items:center;user-select:none}.lottery-tipping-ticket-history .ticket-info-label{margin-right:12px;color:var(--emw--color-typography, #000)}.lottery-tipping-ticket-history .ticket-info-val{color:var(--emw--color-typography-secondary, #555)}.lottery-tipping-ticket-history .ticket-list-wrap{display:flex;flex-direction:column;gap:12px}.lottery-tipping-ticket-history .draw-info-skeleton{width:30%;min-width:300px;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));border-radius:5px;display:flex;flex-direction:column;gap:10px;padding:10px}.lottery-tipping-ticket-history .skeleton-line{height:16px;border-radius:4px;background:linear-gradient(90deg, var(--emw--color-gray-100, #e6e6e6) 25%, var(--emw--color-gray-50, #f5f5f5) 50%, var(--emw--color-gray-100, #e6e6e6) 75%);background-size:200% 100%;animation:skeleton-loading 1.2s infinite}.lottery-tipping-ticket-history .draw-info{width:30%;min-width:300px;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));border-radius:5px;padding:12px;margin-top:20px;display:flex;flex-direction:column;gap:8px;user-select:none}.lottery-tipping-ticket-history .draw-info-item{display:flex}.lottery-tipping-ticket-history .draw-info-label{margin-right:6px;color:var(--emw--color-typography, #000)}.lottery-tipping-ticket-history .draw-info-val{color:var(--emw--color-typography-secondary, #555)}.lottery-tipping-ticket-history .show-detail-link{color:var(--emw-pool-game-acition-normal, #4a90e2);text-decoration:underline;cursor:pointer}.lottery-tipping-ticket-history .filter-wrap{margin-bottom:20px;display:flex;justify-content:space-between;align-items:center}.lottery-tipping-ticket-history .filter-wrap .filter-status{display:flex;gap:12px;align-items:center}.lottery-tipping-ticket-history .filter-wrap .filter-status-btn{background:var(--emw--color-background, #fff);border:2px solid var(--emw--color-primary, #fed275);border-radius:4px;padding:10px 8px;font-size:12px;text-transform:uppercase;color:var(--emw--color-typography, #000);cursor:pointer;transition:all 0.2s linear}.lottery-tipping-ticket-history .filter-wrap .filter-status-btn:hover{background-color:var(--emw--color-secondary, #fff3b9)}.lottery-tipping-ticket-history .filter-wrap .filter-status-btn.active{background:var(--emw--color-secondary, #fff3b9);color:var(--emw--color-typography, #000);border:2px solid var(--emw--color-typography, #000)}.lottery-tipping-ticket-history .pagination-wrap{margin-top:20px;display:flex;justify-content:flex-end}@media screen and (min-width: 1200px){.lottery-tipping-ticket-history{padding:24px;width:60%;margin:0 auto}}@media screen and (max-width: 480px){.lottery-tipping-ticket-history{padding:2px}.lottery-tipping-ticket-history .filter-wrap .filter-status{gap:4px}}.loading-wrap{margin:20px 0;display:flex;align-items:center;justify-content:center;min-height:40vh}.loading-wrap .dots-container{display:flex;align-items:center;justify-content:center;height:100%;width:100%}.loading-wrap .dot{height:14px;width:14px;margin-right:14px;border-radius:14px;background-color:var(--emw-pool-game-ticket-history-loading-normal, #b3d4fc);animation:pulse 1.5s infinite ease-in-out}.loading-wrap .dot:last-child{margin-right:0}.loading-wrap .dot:nth-child(1){animation-delay:-0.3s}.loading-wrap .dot:nth-child(2){animation-delay:-0.1s}.loading-wrap .dot:nth-child(3){animation-delay:0.1s}@keyframes pulse{0%{transform:scale(0.8);background-color:var(--emw-pool-game-ticket-history-loading-normal, #b3d4fc);box-shadow:0 0 0 0 var(--emw-pool-game-ticket-history-loading-box-shadow-normal, rgba(178, 212, 252, 0.7))}50%{transform:scale(1.2);background-color:var(--emw-pool-game-ticket-history-loading-active, #6793fb);box-shadow:0 0 0 10px var(--emw-pool-game-ticket-history-loading-box-shadow-active, rgba(178, 212, 252, 0))}100%{transform:scale(0.8);background-color:var(--emw-pool-game-ticket-history-loading-normal, #b3d4fc);box-shadow:0 0 0 0 rgba(178, 212, 252, 0.7)}}.empty-wrap{margin:20px 0;display:flex;align-items:center;justify-content:center;min-height:40vh;color:var(--emw--color-typography, #000)}.betting-type{margin-bottom:16px;display:flex;align-items:center;gap:20px}.betting-type-title{font-weight:600;font-size:16px}.betting-type-text{font-size:16px}.LotteryTippingTicketController__label{font-weight:500;white-space:nowrap;width:6rem;color:var(--emw--color-typography-secondary, #333)}.LotteryTippingTicketController__segmented-control{height:2.2rem;display:inline-flex;background-color:var(--emw--color-background-secondary, #f5f5f5);border-radius:2rem;padding:0.2rem}.LotteryTippingTicketController__segment{background-color:transparent;border:none;padding:0.3rem 0.8rem;cursor:pointer;font-weight:500;border-radius:2rem;outline:none;transition:background-color 0.25s ease, color 0.25s ease;white-space:nowrap;color:var(--emw--color-typography, #000)}.LotteryTippingTicketController__segment--active{background-color:var(--emw--color-background, #fff);color:var(--emw--color-typography, #000);font-weight:600}.LotteryTippingTicketController__segment:not(.LotteryTippingTicketController__segment--active):hover{background-color:var(--emw--color-background-tertiary, #ccc)}";export{wt as L,o as a,a as b,ot as c,K as f,at as g,dt as i,u as r,r as s,c as t}
@@ -1 +1 @@
1
- import{p as e,b as l}from"./index-4e926388.js";export{s as setNonce}from"./index-4e926388.js";import{g as n}from"./app-globals-0f993ce5.js";(()=>{const l=import.meta.url,n={};return""!==l&&(n.resourcesUrl=new URL(".",l).href),e(n)})().then((async e=>(await n(),l([["general-multi-select_10",[[1,"lottery-tipping-ticket-history",{endpoint:[513],gameId:[1537,"game-id"],playerId:[1538,"player-id"],sessionId:[1537,"session-id"],drawId:[513,"draw-id"],mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[513],translationUrl:[513,"translation-url"],ticketHistory:[32],activeStatus:[32],statusOptions:[32],isLoading:[32],rawData:[32],filterData:[32],paginationInfo:[32],quickFiltersActive:[32],showCurrentTicketLine:[32],curTicketItem:[32],curSelection:[32],curSelectionIdx:[32],showCurrentDrawResult:[32],curDrawItem:[32],curDrawSelection:[32],curDrawSelectionBettingType:[32],curDrawSelectionMap:[32]},[[0,"pageSizeChange","handlePageSizeChange"],[0,"pageChange","handlePageChange"],[0,"filterChange","handleFilterChange"],[0,"filterClear","handleFilterClear"],[0,"poolGameCurrentPageChange","handlePoolGameCurrentPageChange"]],{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],gameId:["handleGameInfoChange"],endpoint:["handleGameInfoChange"],playerId:["handleTicketInfoChange"],sessionId:["handleTicketInfoChange"]}],[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-tipping-filter",{quickFiltersActive:[516,"quick-filters-active"],mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[513],translationUrl:[520,"translation-url"],isOpen:[32],filterData:[32],ticketTypeList:[32],showClearButton:[32]},[[0,"modalCloseEvent","handleModalClose"]],{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}],[1,"lottery-tipping-pagination",{total:[2],pageSizeOptions:[16],mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[513],translationUrl:[520,"translation-url"],current:[2],pageSize:[32],totalPages:[32]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],total:["updateTotalPages"],pageSize:["updateTotalPages"]}],[1,"lottery-tipping-panel",{mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],headerTitle:[1,"header-title"],expanded:[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-multi-select",{mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],options:[16],maxVisibleChips:[2,"max-visible-chips"],placeholder:[1],selectedValues:[32],dropdownOpen:[32],overflowOpen:[32],popoverStyle:[32],clear:[64]},null,{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-dialog",{mbSource:[1,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],visible:[516],dialogTitle:[1,"dialog-title"],width:[1],closable:[4],mask:[4],maskClosable:[4,"mask-closable"],animationDuration:[2,"animation-duration"],fullscreen:[4],showFooter:[4,"show-footer"],showCancelBtn:[4,"show-cancel-btn"],language:[513],translationUrl:[520,"translation-url"],dialogClass:[1,"dialog-class"],dialogStyle:[16]},null,{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-4e926388.js";export{s as setNonce}from"./index-4e926388.js";import{g as n}from"./app-globals-0f993ce5.js";(()=>{const l=import.meta.url,n={};return""!==l&&(n.resourcesUrl=new URL(".",l).href),e(n)})().then((async e=>(await n(),l([["general-multi-select_10",[[1,"lottery-tipping-ticket-history",{endpoint:[513],gameId:[1537,"game-id"],playerId:[1538,"player-id"],sessionId:[1537,"session-id"],drawId:[513,"draw-id"],mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[513],translationUrl:[513,"translation-url"],ticketHistory:[32],activeStatus:[32],statusOptions:[32],isLoading:[32],rawData:[32],filterData:[32],paginationInfo:[32],quickFiltersActive:[32],showCurrentTicketLine:[32],curTicketItem:[32],curSelection:[32],curSelectionIdx:[32],showCurrentDrawResult:[32],curDrawItem:[32],curDrawSelection:[32],curDrawSelectionBettingType:[32],curDrawSelectionMap:[32]},[[0,"pageSizeChange","handlePageSizeChange"],[0,"pageChange","handlePageChange"],[0,"filterChange","handleFilterChange"],[0,"filterClear","handleFilterClear"],[0,"poolGameCurrentPageChange","handlePoolGameCurrentPageChange"]],{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],gameId:["handleGameInfoChange"],endpoint:["handleGameInfoChange"],playerId:["handleTicketInfoChange"],sessionId:["handleTicketInfoChange"]}],[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-tipping-filter",{quickFiltersActive:[516,"quick-filters-active"],mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[513],translationUrl:[520,"translation-url"],isOpen:[32],filterData:[32],ticketTypeList:[32],showClearButton:[32]},[[0,"modalCloseEvent","handleModalClose"]],{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}],[1,"lottery-tipping-pagination",{total:[2],pageSizeOptions:[16],mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[513],translationUrl:[520,"translation-url"],current:[2],pageSize:[32],totalPages:[32]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],total:["updateTotalPages"],pageSize:["updateTotalPages"]}],[1,"lottery-tipping-panel",{mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],headerTitle:[1,"header-title"],expanded:[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-multi-select",{mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],options:[16],maxVisibleChips:[2,"max-visible-chips"],placeholder:[1],selectedValues:[32],dropdownOpen:[32],overflowOpen:[32],popoverStyle:[32],clear:[64]},null,{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-dialog",{mbSource:[1,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],visible:[516],dialogTitle:[1,"dialog-title"],width:[1],closable:[4],mask:[4],maskClosable:[4,"mask-closable"],animationDuration:[2,"animation-duration"],fullscreen:[4],showFooter:[4,"show-footer"],showCancelBtn:[4,"show-cancel-btn"],language:[513],translationUrl:[520,"translation-url"],dialogClass:[1,"dialog-class"],dialogStyle:[16],confirmLoading:[4,"confirm-loading"]},null,{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))));
@@ -9,6 +9,7 @@ export interface Board {
9
9
  multiplier: boolean;
10
10
  quickPick: boolean;
11
11
  selections: Array<number>;
12
+ poolGameSelections: string[][][];
12
13
  stake: number;
13
14
  secondarySelections: Array<number>;
14
15
  tertiarySelections: Array<number>;
@@ -38,6 +39,7 @@ export interface WinningNumber {
38
39
  numbers: Array<number>;
39
40
  secondaryNumbers: Array<number>;
40
41
  teritaryNumbers: Array<number>;
42
+ poolGameOutcomes: string[][][];
41
43
  winning_type: string;
42
44
  }
43
45
  interface PrizeDetail {
@@ -3,8 +3,10 @@ export declare const generateUUID: () => string;
3
3
  export declare function fetchRequest(url: string, method?: string, body?: any, headers?: {}): Promise<any>;
4
4
  export declare function isEmptyValue(value: any, allowZero?: boolean): boolean;
5
5
  export declare function toQueryParams(params: Record<string, any>): string;
6
- export declare function parseBulletNumber(numberArr: Array<number>): any[];
7
- export declare function parseEachLineNumber(numbers: Array<number>): any[];
6
+ export declare const parseEachLineNumber: (outcomes: string[][][]) => {
7
+ isSelected: boolean;
8
+ value: any;
9
+ }[][];
8
10
  export declare function thousandSeperator(value: number | string): string;
9
11
  export declare const isMobile: (userAgent: string) => boolean;
10
12
  export declare const showNotification: ({ message, theme }: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/lottery-tipping-ticket-history",
3
- "version": "1.87.31",
3
+ "version": "1.87.33",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",