@everymatrix/casino-wagering-bonuses-controller 1.12.6 → 1.13.0

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,8 +1,15 @@
1
1
  !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).app=t()}(this,(function(){"use strict";function e(){}function t(e,t){
2
2
  // @ts-ignore
3
- for(const n in t)e[n]=t[n];return e}function n(e){return e()}function r(){return Object.create(null)}function o(e){e.forEach(n)}function i(e){return"function"==typeof e}function s(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}let a;function l(e,t){return a||(a=document.createElement("a")),a.href=t,e===a.href}function c(t,...n){if(null==t)return e;const r=t.subscribe(...n);return r.unsubscribe?()=>r.unsubscribe():r}const u=["",!0,1,"true","contenteditable"];function h(e,t){e.appendChild(t)}function f(e,t,n){e.insertBefore(t,n||null)}function p(e){e.parentNode&&e.parentNode.removeChild(e)}function d(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function g(e){return document.createElement(e)}function m(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function b(e){return document.createTextNode(e)}function y(){return b(" ")}function v(){return b("")}function E(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function T(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function w(e,t){
3
+ for(const n in t)e[n]=t[n];return e}function n(e){return e()}function r(){return Object.create(null)}function o(e){e.forEach(n)}function i(e){return"function"==typeof e}function s(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}let a;function l(e,t){return a||(a=document.createElement("a")),a.href=t,e===a.href}function c(t,...n){if(null==t)return e;const r=t.subscribe(...n);return r.unsubscribe?()=>r.unsubscribe():r}const u=["",!0,1,"true","contenteditable"];function h(e,t){e.appendChild(t)}function f(e,t,n){e.insertBefore(t,n||null)}function p(e){e.parentNode&&e.parentNode.removeChild(e)}function d(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function g(e){return document.createElement(e)}function m(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function b(e){return document.createTextNode(e)}function y(){return b(" ")}function v(){return b("")}function E(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function T(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}
4
+ /**
5
+ * List of attributes that should always be set through the attr method,
6
+ * because updating them through the property setter doesn't work reliably.
7
+ * In the example of `width`/`height`, the problem is that the setter only
8
+ * accepts numeric values, but the attribute can also be set to a string like `50%`.
9
+ * If this list becomes too big, rethink this approach.
10
+ */const w=["width","height"];function B(e,t){
4
11
  // @ts-ignore
5
- const n=Object.getOwnPropertyDescriptors(e.__proto__);for(const r in t)null==t[r]?e.removeAttribute(r):"style"===r?e.style.cssText=t[r]:"__value"===r?e.value=e[r]=t[r]:n[r]&&n[r].set?e[r]=t[r]:T(e,r,t[r])}function B(e,t){for(const n in t)T(e,n,t[n])}function C(e,t,n){t in e?e[t]="boolean"==typeof e[t]&&""===n||n:T(e,t,n)}function A(e,t){t=""+t,e.data!==t&&(e.data=t)}function S(e,t,n){~u.indexOf(n)?function(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}(e,t):A(e,t)}function _(e){const t={};for(const n of e)t[n.name]=n.value;return t}let H;function L(e){H=e}
12
+ const n=Object.getOwnPropertyDescriptors(e.__proto__);for(const r in t)null==t[r]?e.removeAttribute(r):"style"===r?e.style.cssText=t[r]:"__value"===r?e.value=e[r]=t[r]:n[r]&&n[r].set&&-1===w.indexOf(r)?e[r]=t[r]:T(e,r,t[r])}function C(e,t){for(const n in t)T(e,n,t[n])}function A(e,t,n){t in e?e[t]="boolean"==typeof e[t]&&""===n||n:T(e,t,n)}function S(e,t){t=""+t,e.data!==t&&(e.data=t)}function _(e,t,n){~u.indexOf(n)?function(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}(e,t):S(e,t)}function H(e){const t={};for(const n of e)t[n.name]=n.value;return t}let L;function P(e){L=e}
6
13
  /**
7
14
  * The `onMount` function schedules a callback to run as soon as the component has been mounted to the DOM.
8
15
  * It must be called during the component's initialisation (but doesn't need to live *inside* the component;
@@ -12,7 +19,7 @@ const n=Object.getOwnPropertyDescriptors(e.__proto__);for(const r in t)null==t[r
12
19
  *
13
20
  * https://svelte.dev/docs#run-time-svelte-onmount
14
21
  */
15
- function P(e){(function(){if(!H)throw new Error("Function called outside component initialization");return H})().$$.on_mount.push(e)}const R=[],I=[];let O=[];const N=[],$=Promise.resolve();let x=!1;function M(e){O.push(e)}
22
+ function R(e){(function(){if(!L)throw new Error("Function called outside component initialization");return L})().$$.on_mount.push(e)}const O=[],N=[];let I=[];const $=[],x=Promise.resolve();let M=!1;function D(e){I.push(e)}
16
23
  // flush() calls callbacks in this order:
17
24
  // 1. All beforeUpdate callbacks, in order: parents before children
18
25
  // 2. All bind:this callbacks, in reverse order: children before parents.
@@ -31,58 +38,58 @@ function P(e){(function(){if(!H)throw new Error("Function called outside compone
31
38
  // 3. During afterUpdate, any updated components will NOT have their afterUpdate
32
39
  // callback called a second time; the seen_callbacks set, outside the flush()
33
40
  // function, guarantees this behavior.
34
- const D=new Set;let U=0;// Do *not* move this inside the flush() function
35
- function G(){
41
+ const U=new Set;let G=0;// Do *not* move this inside the flush() function
42
+ function k(){
36
43
  // Do not reenter flush while dirty components are updated, as this can
37
44
  // result in an infinite loop. Instead, let the inner flush handle it.
38
45
  // Reentrancy is ok afterwards for bindings etc.
39
- if(0!==U)return;const e=H;do{
46
+ if(0!==G)return;const e=L;do{
40
47
  // first, call beforeUpdate functions
41
48
  // and update components
42
- try{for(;U<R.length;){const e=R[U];U++,L(e),k(e.$$)}}catch(e){
49
+ try{for(;G<O.length;){const e=O[G];G++,P(e),F(e.$$)}}catch(e){
43
50
  // reset dirty state to not end up in a deadlocked state and then rethrow
44
- throw R.length=0,U=0,e}for(L(null),R.length=0,U=0;I.length;)I.pop()();
51
+ throw O.length=0,G=0,e}for(P(null),O.length=0,G=0;N.length;)N.pop()();
45
52
  // then, once components are updated, call
46
53
  // afterUpdate functions. This may cause
47
54
  // subsequent updates...
48
- for(let e=0;e<O.length;e+=1){const t=O[e];D.has(t)||(
55
+ for(let e=0;e<I.length;e+=1){const t=I[e];U.has(t)||(
49
56
  // ...so guard against infinite loops
50
- D.add(t),t())}O.length=0}while(R.length);for(;N.length;)N.pop()();x=!1,D.clear(),L(e)}function k(e){if(null!==e.fragment){e.update(),o(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(M)}}
57
+ U.add(t),t())}I.length=0}while(O.length);for(;$.length;)$.pop()();M=!1,U.clear(),P(e)}function F(e){if(null!==e.fragment){e.update(),o(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(D)}}
51
58
  /**
52
59
  * Useful for example to execute remaining `afterUpdate` callbacks before executing `destroy`.
53
- */const F=new Set;function j(e,t){const n={},r={},o={$$scope:1};let i=e.length;for(;i--;){const s=e[i],a=t[i];if(a){for(const e in s)e in a||(r[e]=1);for(const e in a)o[e]||(n[e]=a[e],o[e]=1);e[i]=a}else for(const e in s)o[e]=1}for(const e in r)e in n||(n[e]=void 0);return n}function V(e,t){const n=e.$$;null!==n.fragment&&(!function(e){const t=[],n=[];O.forEach((r=>-1===e.indexOf(r)?t.push(r):n.push(r))),n.forEach((e=>e())),O=t}(n.after_update),o(n.on_destroy),n.fragment&&n.fragment.d(t),
60
+ */const j=new Set;function V(e,t){const n={},r={},o={$$scope:1};let i=e.length;for(;i--;){const s=e[i],a=t[i];if(a){for(const e in s)e in a||(r[e]=1);for(const e in a)o[e]||(n[e]=a[e],o[e]=1);e[i]=a}else for(const e in s)o[e]=1}for(const e in r)e in n||(n[e]=void 0);return n}function K(e,t){const n=e.$$;null!==n.fragment&&(!function(e){const t=[],n=[];I.forEach((r=>-1===e.indexOf(r)?t.push(r):n.push(r))),n.forEach((e=>e())),I=t}(n.after_update),o(n.on_destroy),n.fragment&&n.fragment.d(t),
54
61
  // TODO null out other refs, including component.$$ (but need to
55
62
  // preserve final state?)
56
- n.on_destroy=n.fragment=null,n.ctx=[])}function K(e,t){-1===e.$$.dirty[0]&&(R.push(e),x||(x=!0,$.then(G)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function W(t,s,a,l,c,u,h,f=[-1]){const d=H;L(t);const g=t.$$={fragment:null,ctx:[],
63
+ n.on_destroy=n.fragment=null,n.ctx=[])}function W(e,t){-1===e.$$.dirty[0]&&(O.push(e),M||(M=!0,x.then(k)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Z(t,s,a,l,c,u,h,f=[-1]){const d=L;P(t);const g=t.$$={fragment:null,ctx:[],
57
64
  // state
58
65
  props:u,update:e,not_equal:c,bound:r(),
59
66
  // lifecycle
60
67
  on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(s.context||(d?d.$$.context:[])),
61
68
  // everything else
62
- callbacks:r(),dirty:f,skip_bound:!1,root:s.target||d.$$.root};h&&h(g.root);let m=!1;if(g.ctx=a?a(t,s.props||{},((e,n,...r)=>{const o=r.length?r[0]:n;return g.ctx&&c(g.ctx[e],g.ctx[e]=o)&&(!g.skip_bound&&g.bound[e]&&g.bound[e](o),m&&K(t,e)),n})):[],g.update(),m=!0,o(g.before_update),
69
+ callbacks:r(),dirty:f,skip_bound:!1,root:s.target||d.$$.root};h&&h(g.root);let m=!1;if(g.ctx=a?a(t,s.props||{},((e,n,...r)=>{const o=r.length?r[0]:n;return g.ctx&&c(g.ctx[e],g.ctx[e]=o)&&(!g.skip_bound&&g.bound[e]&&g.bound[e](o),m&&W(t,e)),n})):[],g.update(),m=!0,o(g.before_update),
63
70
  // `false` as a special case of no DOM component
64
71
  g.fragment=!!l&&l(g.ctx),s.target){if(s.hydrate){const e=function(e){return Array.from(e.childNodes)}(s.target);
65
72
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
66
73
  g.fragment&&g.fragment.l(e),e.forEach(p)}else
67
74
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
68
- g.fragment&&g.fragment.c();s.intro&&((b=t.$$.fragment)&&b.i&&(F.delete(b),b.i(y))),function(e,t,r,s){const{fragment:a,after_update:l}=e.$$;a&&a.m(t,r),s||
75
+ g.fragment&&g.fragment.c();s.intro&&((b=t.$$.fragment)&&b.i&&(j.delete(b),b.i(y))),function(e,t,r,s){const{fragment:a,after_update:l}=e.$$;a&&a.m(t,r),s||
69
76
  // onMount happens before the initial afterUpdate
70
- M((()=>{const t=e.$$.on_mount.map(n).filter(i);
77
+ D((()=>{const t=e.$$.on_mount.map(n).filter(i);
71
78
  // if the component was destroyed immediately
72
79
  // it will update the `$$.on_destroy` reference to `null`.
73
80
  // the destructured on_destroy may still reference to the old array
74
81
  e.$$.on_destroy?e.$$.on_destroy.push(...t):
75
82
  // Edge case - component was destroyed immediately,
76
83
  // most likely as a result of a binding initialising
77
- o(t),e.$$.on_mount=[]})),l.forEach(M)}(t,s.target,s.anchor,s.customElement),G()}var b,y;L(d)}let Z;"function"==typeof HTMLElement&&(Z=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:e}=this.$$;this.$$.on_disconnect=e.map(n).filter(i);
84
+ o(t),e.$$.on_mount=[]})),l.forEach(D)}(t,s.target,s.anchor,s.customElement),k()}var b,y;P(d)}let X;"function"==typeof HTMLElement&&(X=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:e}=this.$$;this.$$.on_disconnect=e.map(n).filter(i);
78
85
  // @ts-ignore todo: improve typings
79
86
  for(const e in this.$$.slotted)
80
87
  // @ts-ignore todo: improve typings
81
- this.appendChild(this.$$.slotted[e])}attributeChangedCallback(e,t,n){this[e]=n}disconnectedCallback(){o(this.$$.on_disconnect)}$destroy(){V(this,1),this.$destroy=e}$on(t,n){
88
+ this.appendChild(this.$$.slotted[e])}attributeChangedCallback(e,t,n){this[e]=n}disconnectedCallback(){o(this.$$.on_disconnect)}$destroy(){K(this,1),this.$destroy=e}$on(t,n){
82
89
  // TODO should this delegate to addEventListener?
83
90
  if(!i(n))return e;const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(n),()=>{const e=r.indexOf(n);-1!==e&&r.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}});
84
- /* ../casino-wagering-bonus-progress/src/CasinoWageringBonusProgress.svelte generated by Svelte v3.58.0 */
85
- function X(n){let r,o,i,s,a,l,c,u=[{class:"ring",r:/*radius*/n[2],cx:/*center*/n[7],cy:/*center*/n[7],"stroke-width":`${/*ringStrokeWidth*/n[4]}px`}],d={};for(let e=0;e<u.length;e+=1)d=t(d,u[e]);let g=[{class:"ring ring-progress "+(/*status*/n[1]===/*BonusStatus*/n[5].InProgress?"active":""),r:/*radius*/n[2],cx:/*center*/n[7],cy:/*center*/n[7],"stroke-width":`${/*ringStrokeWidth*/n[4]}px`,"stroke-dasharray":`${/*circumference*/n[6]} ${/*circumference*/n[6]}`,"stroke-dashoffset":/*circumference*/n[6]-Number(/*percent*/n[0])/100*/*circumference*/n[6]}],y={};for(let e=0;e<g.length;e+=1)y=t(y,g[e]);let v=[{class:"center "+(/*status*/n[1]===/*BonusStatus*/n[5].InProgress?"active":""),r:/*radius*/n[2]-/*ringStrokeWidth*/n[4]/2-3,cx:/*center*/n[7],cy:/*center*/n[7]}],E={};for(let e=0;e<v.length;e+=1)E=t(E,v[e]);let T=[{x:/*center*/n[7],y:/*center*/n[7]}],w={};for(let e=0;e<T.length;e+=1)w=t(w,T[e]);let C=[{width:/*size*/n[3],height:/*size*/n[3]}],A={};for(let e=0;e<C.length;e+=1)A=t(A,C[e]);return{c(){r=m("svg"),o=m("circle"),i=m("circle"),s=m("circle"),a=m("text"),l=b(/*percent*/n[0]),c=b("%"),this.c=e,B(o,d),B(i,y),B(s,E),B(a,w),B(r,A)},m(e,t){f(e,r,t),h(r,o),h(r,i),h(r,s),h(r,a),h(a,l),h(a,c)},p(e,[t]){B(o,d=j(u,[/*radius, center, ringStrokeWidth*/148&t&&{class:"ring",r:/*radius*/e[2],cx:/*center*/e[7],cy:/*center*/e[7],"stroke-width":`${/*ringStrokeWidth*/e[4]}px`}])),B(i,y=j(g,[/*status, BonusStatus, radius, center, ringStrokeWidth, circumference, percent*/247&t&&{class:"ring ring-progress "+(/*status*/e[1]===/*BonusStatus*/e[5].InProgress?"active":""),r:/*radius*/e[2],cx:/*center*/e[7],cy:/*center*/e[7],"stroke-width":`${/*ringStrokeWidth*/e[4]}px`,"stroke-dasharray":`${/*circumference*/e[6]} ${/*circumference*/e[6]}`,"stroke-dashoffset":/*circumference*/e[6]-Number(/*percent*/e[0])/100*/*circumference*/e[6]}])),B(s,E=j(v,[/*status, BonusStatus, radius, ringStrokeWidth, center*/182&t&&{class:"center "+(/*status*/e[1]===/*BonusStatus*/e[5].InProgress?"active":""),r:/*radius*/e[2]-/*ringStrokeWidth*/e[4]/2-3,cx:/*center*/e[7],cy:/*center*/e[7]}])),/*percent*/1&t&&S(l,/*percent*/e[0],w.contenteditable),B(a,w=j(T,[/*center*/128&t&&{x:/*center*/e[7],y:/*center*/e[7]}])),B(r,A=j(C,[/*size*/8&t&&{width:/*size*/e[3],height:/*size*/e[3]}]))},i:e,o:e,d(e){e&&p(r)}}}function z(e,t,n){let r,o,i,s,a,{percent:l=""}=t,{status:c=""}=t;var u;return function(e){e.BeforeClaimed="BeforeClaimed",e.InProgress="active",e.ForfeitedOrCompleted="ForfeitedOrCompleted"}(u||(u={})),e.$$set=e=>{"percent"in e&&n(0,l=e.percent),"status"in e&&n(1,c=e.status)},e.$$.update=()=>{/*size*/8&e.$$.dirty&&n(4,o=r/7.5),/*size, ringStrokeWidth*/24&e.$$.dirty&&n(2,i=r/2-o/2),/*size*/8&e.$$.dirty&&n(7,s=r/2),/*radius*/4&e.$$.dirty&&n(6,a=2*i*Math.PI)},n(3,r=200),[l,c,i,r,o,u,a,s]}!customElements.get("casino-wagering-bonus-progress")&&customElements.define("casino-wagering-bonus-progress",class extends Z{constructor(e){super();const t=document.createElement("style");t.textContent=':host{font-family:system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"}*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}text{fill:#FFFFFF;text-anchor:middle;dominant-baseline:middle;font-style:normal;font-weight:700;font-size:36px}circle.ring{stroke:#F2F4F6;fill:transparent}circle.ring-progress{transition:0.35s stroke-dashoffset;stroke:#C4C4C4;transform:rotate(-90deg);transform-origin:50% 50%}circle.ring-progress.active{stroke:#00AEEF}circle.center{fill:#C4C4C4}circle.center.active{fill:#00AEEF}',this.shadowRoot.appendChild(t),W(this,{target:this.shadowRoot,props:_(this.attributes),customElement:!0},z,X,s,{percent:0,status:1},null),e&&(e.target&&f(e.target,this,e.anchor),e.props&&(this.$set(e.props),G()))}static get observedAttributes(){return["percent","status"]}get percent(){return this.$$.ctx[0]}set percent(e){this.$$set({percent:e}),G()}get status(){return this.$$.ctx[1]}set status(e){this.$$set({status:e}),G()}});var Y="data:image/svg+xml,%3csvg width='25' height='25' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cg clip-path='url(%23clip0_3490_338)'%3e %3cpath d='M12.5 0C5.60762 0 0 5.60762 0 12.5C0 19.3924 5.60762 25 12.5 25C19.3924 25 25 19.3924 25 12.5C25 5.60762 19.3924 0 12.5 0ZM12.5 23.4375C6.46896 23.4375 1.56251 18.531 1.56251 12.5C1.56251 6.46896 6.46896 1.56251 12.5 1.56251C18.531 1.56251 23.4375 6.46896 23.4375 12.5C23.4375 18.531 18.531 23.4375 12.5 23.4375V23.4375Z' fill='%2300AEEF'/%3e %3cpath d='M13.2813 4.6875H11.7188V12.8235L16.6351 17.7398L17.7399 16.6351L13.2813 12.1765V4.6875Z' fill='%2300AEEF'/%3e %3c/g%3e %3cdefs%3e %3cclipPath id='clip0_3490_338'%3e %3crect width='25' height='25' fill='white'/%3e %3c/clipPath%3e %3c/defs%3e%3c/svg%3e",J="data:image/svg+xml,%3csvg width='26' height='25' viewBox='0 0 26 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cg clip-path='url(%23clip0_3490_603)'%3e%3cpath d='M12.502 0C5.60958 0 0.00195312 5.60762 0.00195312 12.5C0.00195312 19.3924 5.60958 25 12.502 25C19.3943 25 25.002 19.3924 25.002 12.5C25.002 5.60762 19.3943 0 12.502 0ZM12.502 23.4375C6.47091 23.4375 1.56446 18.531 1.56446 12.5C1.56446 6.46896 6.47091 1.56251 12.502 1.56251C18.533 1.56251 23.4394 6.46896 23.4394 12.5C23.4394 18.531 18.533 23.4375 12.502 23.4375Z' fill='black'/%3e%3cpath d='M13.2832 4.6875H11.7207V12.8235L16.6371 17.7398L17.7418 16.6351L13.2832 12.1765V4.6875Z' fill='black'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id='clip0_3490_603'%3e%3crect width='25' height='25' fill='white' transform='translate(0.00195312)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",q="data:image/svg+xml,%3csvg width='25' height='25' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cg clip-path='url(%23clip0_3490_347)'%3e %3cpath d='M12.5002 7.5C11.5797 7.5 10.8335 8.2462 10.8335 9.16667V23.3333C10.8335 24.2538 11.5797 25 12.5002 25C13.4206 25 14.1668 24.2538 14.1668 23.3333V9.16667C14.1668 8.2462 13.4206 7.5 12.5002 7.5ZM13.3335 23.3333C13.3335 23.7936 12.9604 24.1667 12.5002 24.1667C12.0399 24.1667 11.6668 23.7936 11.6668 23.3333V9.16667C11.6668 8.70641 12.0399 8.33333 12.5002 8.33333C12.9604 8.33333 13.3335 8.70641 13.3335 9.16667V23.3333Z' fill='%2300AEEF'/%3e %3cpath d='M7.08317 12.5C6.1627 12.5 5.4165 13.2462 5.4165 14.1667V23.3333C5.4165 24.2538 6.1627 25 7.08317 25C8.00364 25 8.74984 24.2538 8.74984 23.3333V14.1667C8.74984 13.2462 8.00364 12.5 7.08317 12.5ZM7.9165 23.3333C7.9165 23.7936 7.54343 24.1667 7.08317 24.1667C6.62291 24.1667 6.24984 23.7936 6.24984 23.3333V14.1667C6.24984 13.7064 6.62291 13.3333 7.08317 13.3333C7.54343 13.3333 7.9165 13.7064 7.9165 14.1667V23.3333Z' fill='%2300AEEF'/%3e %3cpath d='M1.66667 18.333C0.746198 18.333 0 19.0792 0 19.9997V23.333C0 24.2535 0.746198 24.9997 1.66667 24.9997C2.58714 24.9997 3.33333 24.2535 3.33333 23.333V19.9997C3.33333 19.0792 2.58714 18.333 1.66667 18.333ZM2.5 23.333C2.5 23.7933 2.12693 24.1663 1.66667 24.1663C1.20641 24.1663 0.833333 23.7933 0.833333 23.333V19.9997C0.833333 19.5394 1.20641 19.1663 1.66667 19.1663C2.12693 19.1663 2.5 19.5394 2.5 19.9997V23.333Z' fill='%2300AEEF'/%3e %3cpath d='M17.9167 2.5C16.9962 2.5 16.25 3.2462 16.25 4.16667V23.3333C16.25 24.2538 16.9962 25 17.9167 25C18.8371 25 19.5833 24.2538 19.5833 23.3333V4.16667C19.5833 3.2462 18.8371 2.5 17.9167 2.5ZM18.75 23.3333C18.75 23.7936 18.3769 24.1667 17.9167 24.1667C17.4564 24.1667 17.0833 23.7936 17.0833 23.3333V4.16667C17.0833 3.70641 17.4564 3.33333 17.9167 3.33333C18.3769 3.33333 18.75 3.70641 18.75 4.16667V23.3333Z' fill='%2300AEEF'/%3e %3cpath d='M23.3332 0C22.4127 0 21.6665 0.746198 21.6665 1.66667V23.3333C21.6665 24.2538 22.4127 25 23.3332 25C24.2536 25 24.9998 24.2538 24.9998 23.3333V1.66667C24.9998 0.746198 24.2536 0 23.3332 0ZM24.1665 23.3333C24.1665 23.7936 23.7934 24.1667 23.3332 24.1667C22.8729 24.1667 22.4998 23.7936 22.4998 23.3333V1.66667C22.4998 1.20641 22.8729 0.833333 23.3332 0.833333C23.7934 0.833333 24.1665 1.20641 24.1665 1.66667V23.3333Z' fill='%2300AEEF'/%3e %3c/g%3e %3cdefs%3e %3cclipPath id='clip0_3490_347'%3e %3crect width='25' height='25' fill='white'/%3e %3c/clipPath%3e %3c/defs%3e%3c/svg%3e";const Q=(e,t)=>({remainder:e%t,quotient:Math.floor(e/t)}),ee=e=>{const t=new Date;return new Date(e).getTime()-t.getTime()},te=e=>{const t=ee(e)/6e4,{quotient:n,remainder:r}=Q(t,1440),{quotient:o,remainder:i}=Q(r,60),s=Math.floor(i);return[{value:n,symbol:"d"},{value:o,symbol:"h"},{value:s,symbol:"m"}].map((e=>{return t=e.value,(Math.abs(t)<10?`0${t}`:t)+e.symbol;var t})).join(" ")},ne=(e,t="")=>({part:e,class:[e,t].join(" ")}),re=async(e,t={})=>{let n;return n=await fetch(e,t),n=await n.json(),n};
91
+ /* ../casino-wagering-bonus-progress/src/CasinoWageringBonusProgress.svelte generated by Svelte v3.59.2 */
92
+ function z(n){let r,o,i,s,a,l,c,u=[{class:"ring",r:/*radius*/n[2],cx:/*center*/n[7],cy:/*center*/n[7],"stroke-width":`${/*ringStrokeWidth*/n[4]}px`}],d={};for(let e=0;e<u.length;e+=1)d=t(d,u[e]);let g=[{class:"ring ring-progress "+(/*status*/n[1]===/*BonusStatus*/n[5].InProgress?"active":""),r:/*radius*/n[2],cx:/*center*/n[7],cy:/*center*/n[7],"stroke-width":`${/*ringStrokeWidth*/n[4]}px`,"stroke-dasharray":`${/*circumference*/n[6]} ${/*circumference*/n[6]}`,"stroke-dashoffset":/*circumference*/n[6]-Number(/*percent*/n[0])/100*/*circumference*/n[6]}],y={};for(let e=0;e<g.length;e+=1)y=t(y,g[e]);let v=[{class:"center "+(/*status*/n[1]===/*BonusStatus*/n[5].InProgress?"active":""),r:/*radius*/n[2]-/*ringStrokeWidth*/n[4]/2-3,cx:/*center*/n[7],cy:/*center*/n[7]}],E={};for(let e=0;e<v.length;e+=1)E=t(E,v[e]);let T=[{x:/*center*/n[7],y:/*center*/n[7]}],w={};for(let e=0;e<T.length;e+=1)w=t(w,T[e]);let B=[{width:/*size*/n[3],height:/*size*/n[3]}],A={};for(let e=0;e<B.length;e+=1)A=t(A,B[e]);return{c(){r=m("svg"),o=m("circle"),i=m("circle"),s=m("circle"),a=m("text"),l=b(/*percent*/n[0]),c=b("%"),this.c=e,C(o,d),C(i,y),C(s,E),C(a,w),C(r,A)},m(e,t){f(e,r,t),h(r,o),h(r,i),h(r,s),h(r,a),h(a,l),h(a,c)},p(e,[t]){C(o,d=V(u,[/*radius, center, ringStrokeWidth*/148&t&&{class:"ring",r:/*radius*/e[2],cx:/*center*/e[7],cy:/*center*/e[7],"stroke-width":`${/*ringStrokeWidth*/e[4]}px`}])),C(i,y=V(g,[/*status, BonusStatus, radius, center, ringStrokeWidth, circumference, percent*/247&t&&{class:"ring ring-progress "+(/*status*/e[1]===/*BonusStatus*/e[5].InProgress?"active":""),r:/*radius*/e[2],cx:/*center*/e[7],cy:/*center*/e[7],"stroke-width":`${/*ringStrokeWidth*/e[4]}px`,"stroke-dasharray":`${/*circumference*/e[6]} ${/*circumference*/e[6]}`,"stroke-dashoffset":/*circumference*/e[6]-Number(/*percent*/e[0])/100*/*circumference*/e[6]}])),C(s,E=V(v,[/*status, BonusStatus, radius, ringStrokeWidth, center*/182&t&&{class:"center "+(/*status*/e[1]===/*BonusStatus*/e[5].InProgress?"active":""),r:/*radius*/e[2]-/*ringStrokeWidth*/e[4]/2-3,cx:/*center*/e[7],cy:/*center*/e[7]}])),/*percent*/1&t&&_(l,/*percent*/e[0],w.contenteditable),C(a,w=V(T,[/*center*/128&t&&{x:/*center*/e[7],y:/*center*/e[7]}])),C(r,A=V(B,[/*size*/8&t&&{width:/*size*/e[3],height:/*size*/e[3]}]))},i:e,o:e,d(e){e&&p(r)}}}function Y(e,t,n){let r,o,i,s,a,{percent:l=""}=t,{status:c=""}=t;var u;return function(e){e.BeforeClaimed="BeforeClaimed",e.InProgress="active",e.ForfeitedOrCompleted="ForfeitedOrCompleted"}(u||(u={})),e.$$set=e=>{"percent"in e&&n(0,l=e.percent),"status"in e&&n(1,c=e.status)},e.$$.update=()=>{/*size*/8&e.$$.dirty&&n(4,o=r/7.5),/*size, ringStrokeWidth*/24&e.$$.dirty&&n(2,i=r/2-o/2),/*size*/8&e.$$.dirty&&n(7,s=r/2),/*radius*/4&e.$$.dirty&&n(6,a=2*i*Math.PI)},n(3,r=200),[l,c,i,r,o,u,a,s]}!customElements.get("casino-wagering-bonus-progress")&&customElements.define("casino-wagering-bonus-progress",class extends X{constructor(e){super();const t=document.createElement("style");t.textContent="*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}text{fill:#FFFFFF;text-anchor:middle;dominant-baseline:middle;font-style:normal;font-weight:700;font-size:36px}circle.ring{stroke:#F2F4F6;fill:transparent}circle.ring-progress{transition:0.35s stroke-dashoffset;stroke:#C4C4C4;transform:rotate(-90deg);transform-origin:50% 50%}circle.ring-progress.active{stroke:#00AEEF}circle.center{fill:#C4C4C4}circle.center.active{fill:#00AEEF}",this.shadowRoot.appendChild(t),Z(this,{target:this.shadowRoot,props:H(this.attributes),customElement:!0},Y,z,s,{percent:0,status:1},null),e&&(e.target&&f(e.target,this,e.anchor),e.props&&(this.$set(e.props),k()))}static get observedAttributes(){return["percent","status"]}get percent(){return this.$$.ctx[0]}set percent(e){this.$$set({percent:e}),k()}get status(){return this.$$.ctx[1]}set status(e){this.$$set({status:e}),k()}});var J="data:image/svg+xml,%3csvg width='25' height='25' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cg clip-path='url(%23clip0_3490_338)'%3e %3cpath d='M12.5 0C5.60762 0 0 5.60762 0 12.5C0 19.3924 5.60762 25 12.5 25C19.3924 25 25 19.3924 25 12.5C25 5.60762 19.3924 0 12.5 0ZM12.5 23.4375C6.46896 23.4375 1.56251 18.531 1.56251 12.5C1.56251 6.46896 6.46896 1.56251 12.5 1.56251C18.531 1.56251 23.4375 6.46896 23.4375 12.5C23.4375 18.531 18.531 23.4375 12.5 23.4375V23.4375Z' fill='%2300AEEF'/%3e %3cpath d='M13.2813 4.6875H11.7188V12.8235L16.6351 17.7398L17.7399 16.6351L13.2813 12.1765V4.6875Z' fill='%2300AEEF'/%3e %3c/g%3e %3cdefs%3e %3cclipPath id='clip0_3490_338'%3e %3crect width='25' height='25' fill='white'/%3e %3c/clipPath%3e %3c/defs%3e%3c/svg%3e",q="data:image/svg+xml,%3csvg width='26' height='25' viewBox='0 0 26 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cg clip-path='url(%23clip0_3490_603)'%3e%3cpath d='M12.502 0C5.60958 0 0.00195312 5.60762 0.00195312 12.5C0.00195312 19.3924 5.60958 25 12.502 25C19.3943 25 25.002 19.3924 25.002 12.5C25.002 5.60762 19.3943 0 12.502 0ZM12.502 23.4375C6.47091 23.4375 1.56446 18.531 1.56446 12.5C1.56446 6.46896 6.47091 1.56251 12.502 1.56251C18.533 1.56251 23.4394 6.46896 23.4394 12.5C23.4394 18.531 18.533 23.4375 12.502 23.4375Z' fill='black'/%3e%3cpath d='M13.2832 4.6875H11.7207V12.8235L16.6371 17.7398L17.7418 16.6351L13.2832 12.1765V4.6875Z' fill='black'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id='clip0_3490_603'%3e%3crect width='25' height='25' fill='white' transform='translate(0.00195312)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",Q="data:image/svg+xml,%3csvg width='25' height='25' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cg clip-path='url(%23clip0_3490_347)'%3e %3cpath d='M12.5002 7.5C11.5797 7.5 10.8335 8.2462 10.8335 9.16667V23.3333C10.8335 24.2538 11.5797 25 12.5002 25C13.4206 25 14.1668 24.2538 14.1668 23.3333V9.16667C14.1668 8.2462 13.4206 7.5 12.5002 7.5ZM13.3335 23.3333C13.3335 23.7936 12.9604 24.1667 12.5002 24.1667C12.0399 24.1667 11.6668 23.7936 11.6668 23.3333V9.16667C11.6668 8.70641 12.0399 8.33333 12.5002 8.33333C12.9604 8.33333 13.3335 8.70641 13.3335 9.16667V23.3333Z' fill='%2300AEEF'/%3e %3cpath d='M7.08317 12.5C6.1627 12.5 5.4165 13.2462 5.4165 14.1667V23.3333C5.4165 24.2538 6.1627 25 7.08317 25C8.00364 25 8.74984 24.2538 8.74984 23.3333V14.1667C8.74984 13.2462 8.00364 12.5 7.08317 12.5ZM7.9165 23.3333C7.9165 23.7936 7.54343 24.1667 7.08317 24.1667C6.62291 24.1667 6.24984 23.7936 6.24984 23.3333V14.1667C6.24984 13.7064 6.62291 13.3333 7.08317 13.3333C7.54343 13.3333 7.9165 13.7064 7.9165 14.1667V23.3333Z' fill='%2300AEEF'/%3e %3cpath d='M1.66667 18.333C0.746198 18.333 0 19.0792 0 19.9997V23.333C0 24.2535 0.746198 24.9997 1.66667 24.9997C2.58714 24.9997 3.33333 24.2535 3.33333 23.333V19.9997C3.33333 19.0792 2.58714 18.333 1.66667 18.333ZM2.5 23.333C2.5 23.7933 2.12693 24.1663 1.66667 24.1663C1.20641 24.1663 0.833333 23.7933 0.833333 23.333V19.9997C0.833333 19.5394 1.20641 19.1663 1.66667 19.1663C2.12693 19.1663 2.5 19.5394 2.5 19.9997V23.333Z' fill='%2300AEEF'/%3e %3cpath d='M17.9167 2.5C16.9962 2.5 16.25 3.2462 16.25 4.16667V23.3333C16.25 24.2538 16.9962 25 17.9167 25C18.8371 25 19.5833 24.2538 19.5833 23.3333V4.16667C19.5833 3.2462 18.8371 2.5 17.9167 2.5ZM18.75 23.3333C18.75 23.7936 18.3769 24.1667 17.9167 24.1667C17.4564 24.1667 17.0833 23.7936 17.0833 23.3333V4.16667C17.0833 3.70641 17.4564 3.33333 17.9167 3.33333C18.3769 3.33333 18.75 3.70641 18.75 4.16667V23.3333Z' fill='%2300AEEF'/%3e %3cpath d='M23.3332 0C22.4127 0 21.6665 0.746198 21.6665 1.66667V23.3333C21.6665 24.2538 22.4127 25 23.3332 25C24.2536 25 24.9998 24.2538 24.9998 23.3333V1.66667C24.9998 0.746198 24.2536 0 23.3332 0ZM24.1665 23.3333C24.1665 23.7936 23.7934 24.1667 23.3332 24.1667C22.8729 24.1667 22.4998 23.7936 22.4998 23.3333V1.66667C22.4998 1.20641 22.8729 0.833333 23.3332 0.833333C23.7934 0.833333 24.1665 1.20641 24.1665 1.66667V23.3333Z' fill='%2300AEEF'/%3e %3c/g%3e %3cdefs%3e %3cclipPath id='clip0_3490_347'%3e %3crect width='25' height='25' fill='white'/%3e %3c/clipPath%3e %3c/defs%3e%3c/svg%3e";const ee=(e,t)=>({remainder:e%t,quotient:Math.floor(e/t)}),te=e=>{const t=new Date;return new Date(e).getTime()-t.getTime()},ne=e=>{const t=te(e)/6e4,{quotient:n,remainder:r}=ee(t,1440),{quotient:o,remainder:i}=ee(r,60),s=Math.floor(i);return[{value:n,symbol:"d"},{value:o,symbol:"h"},{value:s,symbol:"m"}].map((e=>{return t=e.value,(Math.abs(t)<10?`0${t}`:t)+e.symbol;var t})).join(" ")},re=(e,t="")=>({part:e,class:[e,t].join(" ")}),oe=async(e,t={})=>{let n;return n=await fetch(e,t),n=await n.json(),n};
86
93
  /******************************************************************************
87
94
  Copyright (c) Microsoft Corporation.
88
95
 
@@ -97,8 +104,8 @@ function X(n){let r,o,i,s,a,l,c,u=[{class:"ring",r:/*radius*/n[2],cx:/*center*/n
97
104
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
98
105
  PERFORMANCE OF THIS SOFTWARE.
99
106
  ***************************************************************************** */
100
- /* global Reflect, Promise */
101
- var oe=function(e,t){return oe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},oe(e,t)};function ie(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}oe(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var se,ae,le,ce,ue=function(){return ue=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ue.apply(this,arguments)};function he(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function fe(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}!function(e){e.claimable="claimable",e.active="active",e.completed="completed",e.forfeited="forfeited",e.expired="expired",e.released="released",e.closed="closed"}(se||(se={})),function(e){e.standard="standard",e.freeBet="freeBet",e.freeRound="freeRound",e.tournamentTicket="tournamentTicket",e.oddsBoost="oddsBoost",e.cashBack="cashBack"}(ae||(ae={})),function(e){e.Money="money",e.BetCount="betcount"}(le||(le={})),function(e){e.en="en",e["zh-hk"]="zh-hk"}(ce||(ce={}));var pe="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var de=function(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}((function(e,t){
107
+ /* global Reflect, Promise, SuppressedError, Symbol */
108
+ var ie=function(e,t){return ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},ie(e,t)};function se(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}ie(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var ae,le,ce,ue,he=function(){return he=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},he.apply(this,arguments)};function fe(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function pe(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError,function(e){e.claimable="claimable",e.active="active",e.completed="completed",e.forfeited="forfeited",e.expired="expired",e.released="released",e.closed="closed"}(ae||(ae={})),function(e){e.standard="standard",e.freeBet="freeBet",e.freeRound="freeRound",e.tournamentTicket="tournamentTicket",e.oddsBoost="oddsBoost",e.cashBack="cashBack"}(le||(le={})),function(e){e.Money="money",e.BetCount="betcount"}(ce||(ce={})),function(e){e.en="en",e["zh-hk"]="zh-hk"}(ue||(ue={}));var de="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var ge=function(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}((function(e,t){
102
109
  /** @license
103
110
  * eventsource.js
104
111
  * Available under MIT License (MIT)
@@ -169,33 +176,33 @@ i.HEADERS_RECEIVED=2),w.prototype.open=function(e,t,n,r,o,s,a){e.open("GET",o);v
169
176
  // see https://github.com/promises-aplus/promises-spec/issues/179
170
177
  return a=e.body.getReader(),t(e.status,e.statusText,e.headers.get("Content-Type"),new B(e.headers)),new u((function(e,t){var r=function(){a.read().then((function(t){if(t.done)
171
178
  //Note: bytes in textDecoder are ignored
172
- e(void 0);else{var o=f.decode(t.value,{stream:!0});n(o),r()}})).catch((function(e){t(e)}))};r()}))})).catch((function(e){return"AbortError"===e.name?void 0:e})).then((function(e){r(e)})),{abort:function(){null!=a&&a.cancel(),l.abort()}}},A.prototype.dispatchEvent=function(e){e.target=this;var t=this._listeners[e.type];if(null!=t)for(var n=t.length,r=0;r<n;r+=1){var o=t[r];try{"function"==typeof o.handleEvent?o.handleEvent(e):o.call(this,e)}catch(e){S(e)}}},A.prototype.addEventListener=function(e,t){e=String(e);var n=this._listeners,r=n[e];null==r&&(r=[],n[e]=r);for(var o=!1,i=0;i<r.length;i+=1)r[i]===t&&(o=!0);o||r.push(t)},A.prototype.removeEventListener=function(e,t){e=String(e);var n=this._listeners,r=n[e];if(null!=r){for(var o=[],i=0;i<r.length;i+=1)r[i]!==t&&o.push(r[i]);0===o.length?delete n[e]:n[e]=o}},H.prototype=Object.create(_.prototype),L.prototype=Object.create(_.prototype),P.prototype=Object.create(_.prototype);var R=-1,I=0,O=1,N=2,$=-1,x=0,M=1,D=2,U=3,G=/^text\/event\-stream(;.*)?$/i,k=function(e,t){var n=null==e?t:parseInt(e,10);return n!=n&&(n=t),F(n)},F=function(e){return Math.min(Math.max(e,1e3),18e6)},j=function(e,t,n){try{"function"==typeof t&&t.call(e,n)}catch(e){S(e)}};function V(e,t){A.call(this),t=t||{},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,function(e,t,n){t=String(t);var a=Boolean(n.withCredentials),l=n.lastEventIdQueryParameterName||"lastEventId",c=F(1e3),u=k(n.heartbeatTimeout,45e3),h="",f=c,p=!1,d=0,g=n.headers||{},m=n.Transport,b=K&&null==m?void 0:new v(null!=m?new m:null!=i&&"withCredentials"in i.prototype||null==s?new i:new s),y=null!=m&&"string"!=typeof m?new m:null==b?new C:new w,E=void 0,T=0,B=R,A="",S="",_="",V="",W=x,Z=0,X=0,z=function(t,n,r,o){if(B===I)if(200===t&&null!=r&&G.test(r)){B=O,p=Date.now(),f=c,e.readyState=O;var i=new L("open",{status:t,statusText:n,headers:o});e.dispatchEvent(i),j(e,e.onopen,i)}else{var s="";200!==t?(n&&(n=n.replace(/\s+/g," ")),s="EventSource's response has a status "+t+" "+n+" that is not 200. Aborting the connection."):s="EventSource's response has a Content-Type specifying an unsupported type: "+(null==r?"-":r.replace(/\s+/g," "))+". Aborting the connection.",q();i=new L("error",{status:t,statusText:n,headers:o});e.dispatchEvent(i),j(e,e.onerror,i),console.error(s)}},Y=function(t){if(B===O){for(var n=-1,i=0;i<t.length;i+=1){(l=t.charCodeAt(i))!=="\n".charCodeAt(0)&&l!=="\r".charCodeAt(0)||(n=i)}var s=(-1!==n?V:"")+t.slice(0,n+1);V=(-1===n?V:"")+t.slice(n+1),""!==t&&(p=Date.now(),d+=t.length);for(var a=0;a<s.length;a+=1){var l=s.charCodeAt(a);if(W===$&&l==="\n".charCodeAt(0))W=x;else if(W===$&&(W=x),l==="\r".charCodeAt(0)||l==="\n".charCodeAt(0)){if(W!==x){W===M&&(X=a+1);var g=s.slice(Z,X-1),m=s.slice(X+(X<a&&s.charCodeAt(X)===" ".charCodeAt(0)?1:0),a);"data"===g?(A+="\n",A+=m):"id"===g?S=m:"event"===g?_=m:"retry"===g?(c=k(m,c),f=c):"heartbeatTimeout"===g&&(u=k(m,u),0!==T&&(o(T),T=r((function(){Q()}),u)))}if(W===x){if(""!==A){h=S,""===_&&(_="message");var b=new H(_,{data:A.slice(1),lastEventId:S});if(e.dispatchEvent(b),"open"===_?j(e,e.onopen,b):"message"===_?j(e,e.onmessage,b):"error"===_&&j(e,e.onerror,b),B===N)return}A="",_=""}W=l==="\r".charCodeAt(0)?$:x}else W===x&&(Z=a,W=M),W===M?l===":".charCodeAt(0)&&(X=a+1,W=D):W===D&&(W=U)}}},J=function(t){if(B===O||B===I){B=R,0!==T&&(o(T),T=0),T=r((function(){Q()}),f),f=F(Math.min(16*c,2*f)),e.readyState=I;var n=new P("error",{error:t});e.dispatchEvent(n),j(e,e.onerror,n),null!=t&&console.error(t)}},q=function(){B=N,null!=E&&(E.abort(),E=void 0),0!==T&&(o(T),T=0),e.readyState=N},Q=function(){if(T=0,B===R){p=!1,d=0,T=r((function(){Q()}),u),B=I,A="",_="",S=h,V="",Z=0,X=0,W=x;
179
+ e(void 0);else{var o=f.decode(t.value,{stream:!0});n(o),r()}})).catch((function(e){t(e)}))};r()}))})).catch((function(e){return"AbortError"===e.name?void 0:e})).then((function(e){r(e)})),{abort:function(){null!=a&&a.cancel(),l.abort()}}},A.prototype.dispatchEvent=function(e){e.target=this;var t=this._listeners[e.type];if(null!=t)for(var n=t.length,r=0;r<n;r+=1){var o=t[r];try{"function"==typeof o.handleEvent?o.handleEvent(e):o.call(this,e)}catch(e){S(e)}}},A.prototype.addEventListener=function(e,t){e=String(e);var n=this._listeners,r=n[e];null==r&&(r=[],n[e]=r);for(var o=!1,i=0;i<r.length;i+=1)r[i]===t&&(o=!0);o||r.push(t)},A.prototype.removeEventListener=function(e,t){e=String(e);var n=this._listeners,r=n[e];if(null!=r){for(var o=[],i=0;i<r.length;i+=1)r[i]!==t&&o.push(r[i]);0===o.length?delete n[e]:n[e]=o}},H.prototype=Object.create(_.prototype),L.prototype=Object.create(_.prototype),P.prototype=Object.create(_.prototype);var R=-1,O=0,N=1,I=2,$=-1,x=0,M=1,D=2,U=3,G=/^text\/event\-stream(;.*)?$/i,k=function(e,t){var n=null==e?t:parseInt(e,10);return n!=n&&(n=t),F(n)},F=function(e){return Math.min(Math.max(e,1e3),18e6)},j=function(e,t,n){try{"function"==typeof t&&t.call(e,n)}catch(e){S(e)}};function V(e,t){A.call(this),t=t||{},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,function(e,t,n){t=String(t);var a=Boolean(n.withCredentials),l=n.lastEventIdQueryParameterName||"lastEventId",c=F(1e3),u=k(n.heartbeatTimeout,45e3),h="",f=c,p=!1,d=0,g=n.headers||{},m=n.Transport,b=K&&null==m?void 0:new v(null!=m?new m:null!=i&&"withCredentials"in i.prototype||null==s?new i:new s),y=null!=m&&"string"!=typeof m?new m:null==b?new C:new w,E=void 0,T=0,B=R,A="",S="",_="",V="",W=x,Z=0,X=0,z=function(t,n,r,o){if(B===O)if(200===t&&null!=r&&G.test(r)){B=N,p=Date.now(),f=c,e.readyState=N;var i=new L("open",{status:t,statusText:n,headers:o});e.dispatchEvent(i),j(e,e.onopen,i)}else{var s="";200!==t?(n&&(n=n.replace(/\s+/g," ")),s="EventSource's response has a status "+t+" "+n+" that is not 200. Aborting the connection."):s="EventSource's response has a Content-Type specifying an unsupported type: "+(null==r?"-":r.replace(/\s+/g," "))+". Aborting the connection.",q();i=new L("error",{status:t,statusText:n,headers:o});e.dispatchEvent(i),j(e,e.onerror,i),console.error(s)}},Y=function(t){if(B===N){for(var n=-1,i=0;i<t.length;i+=1){(l=t.charCodeAt(i))!=="\n".charCodeAt(0)&&l!=="\r".charCodeAt(0)||(n=i)}var s=(-1!==n?V:"")+t.slice(0,n+1);V=(-1===n?V:"")+t.slice(n+1),""!==t&&(p=Date.now(),d+=t.length);for(var a=0;a<s.length;a+=1){var l=s.charCodeAt(a);if(W===$&&l==="\n".charCodeAt(0))W=x;else if(W===$&&(W=x),l==="\r".charCodeAt(0)||l==="\n".charCodeAt(0)){if(W!==x){W===M&&(X=a+1);var g=s.slice(Z,X-1),m=s.slice(X+(X<a&&s.charCodeAt(X)===" ".charCodeAt(0)?1:0),a);"data"===g?(A+="\n",A+=m):"id"===g?S=m:"event"===g?_=m:"retry"===g?(c=k(m,c),f=c):"heartbeatTimeout"===g&&(u=k(m,u),0!==T&&(o(T),T=r((function(){Q()}),u)))}if(W===x){if(""!==A){h=S,""===_&&(_="message");var b=new H(_,{data:A.slice(1),lastEventId:S});if(e.dispatchEvent(b),"open"===_?j(e,e.onopen,b):"message"===_?j(e,e.onmessage,b):"error"===_&&j(e,e.onerror,b),B===I)return}A="",_=""}W=l==="\r".charCodeAt(0)?$:x}else W===x&&(Z=a,W=M),W===M?l===":".charCodeAt(0)&&(X=a+1,W=D):W===D&&(W=U)}}},J=function(t){if(B===N||B===O){B=R,0!==T&&(o(T),T=0),T=r((function(){Q()}),f),f=F(Math.min(16*c,2*f)),e.readyState=O;var n=new P("error",{error:t});e.dispatchEvent(n),j(e,e.onerror,n),null!=t&&console.error(t)}},q=function(){B=I,null!=E&&(E.abort(),E=void 0),0!==T&&(o(T),T=0),e.readyState=I},Q=function(){if(T=0,B===R){p=!1,d=0,T=r((function(){Q()}),u),B=O,A="",_="",S=h,V="",Z=0,X=0,W=x;
173
180
  // https://bugzilla.mozilla.org/show_bug.cgi?id=428916
174
181
  // Request header field Last-Event-ID is not allowed by Access-Control-Allow-Headers.
175
182
  var n=t;if("data:"!==t.slice(0,5)&&"blob:"!==t.slice(0,5)&&""!==h){
176
183
  // Remove the lastEventId parameter if it's already part of the request URL.
177
184
  var o=t.indexOf("?");n=-1===o?t:t.slice(0,o+1)+t.slice(o+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,(function(e,t){return t===l?"":e})),
178
185
  // Append the current lastEventId to the request URL.
179
- n+=(-1===t.indexOf("?")?"?":"&")+l+"="+encodeURIComponent(h)}var i=e.withCredentials,s={Accept:"text/event-stream"},a=e.headers;if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(s[c]=a[c]);try{E=y.open(b,z,Y,J,n,i,s)}catch(e){throw q(),e}}else if(p||null==E){var f=Math.max((p||Date.now())+u-Date.now(),1);p=!1,T=r((function(){Q()}),f)}else J(new Error("No activity within "+u+" milliseconds. "+(B===I?"No response received.":d+" chars received.")+" Reconnecting.")),null!=E&&(E.abort(),E=void 0)};e.url=t,e.readyState=I,e.withCredentials=a,e.headers=g,e._close=q,Q()}(this,e,t)}var K=null!=h&&null!=f&&"body"in f.prototype;V.prototype=Object.create(A.prototype),V.prototype.CONNECTING=I,V.prototype.OPEN=O,V.prototype.CLOSED=N,V.prototype.close=function(){this._close()},V.CONNECTING=I,V.OPEN=O,V.CLOSED=N,V.prototype.withCredentials=void 0;var W,Z=l;null==i||null!=l&&"withCredentials"in l.prototype||(
186
+ n+=(-1===t.indexOf("?")?"?":"&")+l+"="+encodeURIComponent(h)}var i=e.withCredentials,s={Accept:"text/event-stream"},a=e.headers;if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(s[c]=a[c]);try{E=y.open(b,z,Y,J,n,i,s)}catch(e){throw q(),e}}else if(p||null==E){var f=Math.max((p||Date.now())+u-Date.now(),1);p=!1,T=r((function(){Q()}),f)}else J(new Error("No activity within "+u+" milliseconds. "+(B===O?"No response received.":d+" chars received.")+" Reconnecting.")),null!=E&&(E.abort(),E=void 0)};e.url=t,e.readyState=O,e.withCredentials=a,e.headers=g,e._close=q,Q()}(this,e,t)}var K=null!=h&&null!=f&&"body"in f.prototype;V.prototype=Object.create(A.prototype),V.prototype.CONNECTING=O,V.prototype.OPEN=N,V.prototype.CLOSED=I,V.prototype.close=function(){this._close()},V.CONNECTING=O,V.OPEN=N,V.CLOSED=I,V.prototype.withCredentials=void 0;var W,Z=l;null==i||null!=l&&"withCredentials"in l.prototype||(
180
187
  // Why replace a native EventSource ?
181
188
  // https://bugzilla.mozilla.org/show_bug.cgi?id=444328
182
189
  // https://bugzilla.mozilla.org/show_bug.cgi?id=831392
183
190
  // https://code.google.com/p/chromium/issues/detail?id=260144
184
191
  // https://code.google.com/p/chromium/issues/detail?id=225654
185
192
  // ...
186
- Z=V),W=function(e){e.EventSourcePolyfill=V,e.NativeEventSource=l,e.EventSource=Z}(t),void 0!==W&&(e.exports=W)}("undefined"==typeof globalThis?"undefined"!=typeof window?window:"undefined"!=typeof self?self:pe:globalThis)}));const ge=e=>window.postMessage(e,window.location.href),me=e=>{const t=(n=e,e=>{Object.keys(n).map((t=>{if(e.data&&e.data.type==t){const r=he(e.data,["type"]);n[t](r)}}))});var n;P((()=>(window.addEventListener("message",t),()=>{window.removeEventListener("message",t)})))},be=(e,t)=>{e&&(e.removeEventListener("message",t),e.close())},ye=e=>ve[e]
187
- /* eslint-disable quote-props */,ve={AED:"د.إ",AFN:"؋",ALL:"L",AMD:"֏",ANG:"ƒ",AOA:"Kz",ARS:"$",AUD:"$",AWG:"ƒ",AZN:"ман",BAM:"KM",BBD:"$",BDT:"৳",BGN:"лв",BHD:".د.ب",BIF:"FBu",BMD:"$",BND:"$",BOB:"$b",BRL:"R$",BSD:"$",BTC:"฿",BTN:"Nu.",BWP:"P",BYR:"p.",BZD:"BZ$",CAD:"$",CDF:"FC",CHF:"CHF",CLP:"$",CNY:"¥",COP:"$",CRC:"₡",CUC:"$",CUP:"₱",CVE:"$",CZK:"Kč",DJF:"Fdj",DKK:"kr",DOP:"RD$",DZD:"دج",EEK:"kr",EGP:"£",ERN:"Nfk",ETB:"Br",ETH:"Ξ",EUR:"€",FJD:"$",FKP:"£",GBP:"£",GEL:"₾",GGP:"£",GHC:"₵",GHS:"GH₵",GIP:"£",GMD:"D",GNF:"FG",GTQ:"Q",GYD:"$",HKD:"$",HNL:"L",HRK:"kn",HTG:"G",HUF:"Ft",IDR:"Rp",ILS:"₪",IMP:"£",INR:"₹",IQD:"ع.د",IRR:"﷼",ISK:"kr",JEP:"£",JMD:"J$",JOD:"JD",JPY:"¥",KES:"KSh",KGS:"лв",KHR:"៛",KMF:"CF",KPW:"₩",KRW:"₩",KWD:"KD",KYD:"$",KZT:"лв",LAK:"₭",LBP:"£",LKR:"₨",LRD:"$",LSL:"M",LTC:"Ł",LTL:"Lt",LVL:"Ls",LYD:"LD",MAD:"MAD",MDL:"lei",MGA:"Ar",MKD:"ден",MMK:"K",MNT:"₮",MOP:"MOP$",MRO:"UM",MUR:"₨",MVR:"Rf",MWK:"MK",MXN:"$",MYR:"RM",MZN:"MT",NAD:"$",NGN:"₦",NIO:"C$",NOK:"kr",NPR:"₨",NZD:"$",OMR:"﷼",PAB:"B/.",PEN:"S/.",PGK:"K",PHP:"₱",PKR:"₨",PLN:"zł",PYG:"Gs",QAR:"﷼",RMB:"¥",RON:"lei",RSD:"Дин.",RUB:"₽",RWF:"R₣",SAR:"﷼",SBD:"$",SCR:"₨",SDG:"ج.س.",SEK:"kr",SGD:"$",SHP:"£",SLL:"Le",SOS:"S",SRD:"$",SSP:"£",STD:"Db",SVC:"$",SYP:"£",SZL:"E",THB:"฿",TJS:"SM",TMT:"T",TND:"د.ت",TOP:"T$",TRL:"₤",TRY:"₺",TTD:"TT$",TVD:"$",TWD:"NT$",TZS:"TSh",UAH:"₴",UGX:"USh",USD:"$",UYU:"$U",UZS:"лв",VEF:"Bs",VND:"₫",VUV:"VT",WST:"WS$",XAF:"FCFA",XBT:"Ƀ",XCD:"$",XOF:"CFA",XPF:"₣",YER:"﷼",ZAR:"R",ZWD:"Z$"},Ee=(e,t,n,r)=>{if(!n.length)return;const o={bonusWalletIDs:null==n?void 0:n.filter((e=>Ce(e))).map((e=>e.id)).join(","),XSessionId:t};if(!o.bonusWalletIDs)return;const i=`${e}/bonus/wagering/updates?${(e=>Object.keys(e).map((t=>`${t}=${e[t]}`)).join("&"))(o)}`;return((e,t)=>{let n;return n=EventSource?new EventSource(e):new de.EventSourcePolyfill(e,{headers:{accept:"text/event-stream"}}),n.addEventListener("message",t),n})(i,r)},Te=(e,t)=>{switch(e){case se.completed:case se.released:case se.expired:case se.closed:case se.forfeited:return t.other();case se.active:return t.active();default:throw new Error(`unknown Bonus Status: ${e}`)}},we=(e,t)=>{switch(e){case se.completed:case se.released:return t.completed();case se.active:case se.expired:case se.closed:case se.forfeited:return t.current();default:throw new Error(`unknown Bonus Status: ${e}`)}},Be={list:async(e,t,n={})=>{const{limit:r,lang:o,status:i}=n,s=he(n,["limit","lang","status"]),a=Object.assign(Object.assign({type:"wagering",pagination:`limit=${r||50},offset=0`,language:o},i&&i!==se.claimable?{status:i}:{}),s),l=i===se.claimable?"claimable":"granted",c=new URL(`${e}/bonus/${l}`);return Object.keys(a).map((e=>{c.searchParams.append(e,a[e])})),await re(c,{headers:Object.assign({},t?{"x-SessionId":t}:{})})},start:async(e,t,n,r)=>await re(e+"/bonus/claim",{method:"PUT",body:JSON.stringify({bonusCode:n,currency:r}),headers:{"x-SessionId":t,accept:"text/plain","Content-Type":"application/json-patch+json"}})},Ce=e=>!!e.bonusWalletID&&Te(e.status,{active:()=>!0,other:()=>!1}),Ae=(e,t)=>{switch(t.type){case ae.standard:case ae.freeBet:return((e,t)=>{let n;switch(t.type){case ae.standard:n="bonus money";break;case ae.freeBet:n="Free Bet"}const r=ye(Object.keys(e.increment)[0]);return"percentage"===t.mode?`${100*t.bonusAmount}% up to ${r}${t.capAmount} ${n}`:"fixed"===t.mode?`${r}${t.bonusAmount} ${n}`:void 0})(e,t);case ae.freeRound:return`${t.freespinNumber} Free Spins`;case ae.tournamentTicket:return"Enroll to Tournament Ticket";case ae.oddsBoost:return"Enroll to Odds Boost";case ae.cashBack:return"Enroll to Cash Back"}},Se=(e,t,n)=>{var r;const o=(null===(r=e.wageringProgress)||void 0===r?void 0:r.currentLevel)-1,i=n.length-1,s=e=>e.filter((e=>e.index>=0&&e.index<=i)).map((e=>{const t=n[e.index];return{key:e.key,descriptions:t.bonuses.map((e=>Ae(t,e)))}}))
193
+ Z=V),W=function(e){e.EventSourcePolyfill=V,e.NativeEventSource=l,e.EventSource=Z}(t),void 0!==W&&(e.exports=W)}("undefined"==typeof globalThis?"undefined"!=typeof window?window:"undefined"!=typeof self?self:de:globalThis)}));const me=e=>window.postMessage(e,window.location.href),be=e=>{const t=(n=e,e=>{Object.keys(n).map((t=>{if(e.data&&e.data.type==t){const r=fe(e.data,["type"]);n[t](r)}}))});var n;R((()=>(window.addEventListener("message",t),()=>{window.removeEventListener("message",t)})))},ye=(e,t)=>{e&&(e.removeEventListener("message",t),e.close())},ve=e=>Ee[e]
194
+ /* eslint-disable quote-props */,Ee={AED:"د.إ",AFN:"؋",ALL:"L",AMD:"֏",ANG:"ƒ",AOA:"Kz",ARS:"$",AUD:"$",AWG:"ƒ",AZN:"ман",BAM:"KM",BBD:"$",BDT:"৳",BGN:"лв",BHD:".د.ب",BIF:"FBu",BMD:"$",BND:"$",BOB:"$b",BRL:"R$",BSD:"$",BTC:"฿",BTN:"Nu.",BWP:"P",BYR:"p.",BZD:"BZ$",CAD:"$",CDF:"FC",CHF:"CHF",CLP:"$",CNY:"¥",COP:"$",CRC:"₡",CUC:"$",CUP:"₱",CVE:"$",CZK:"Kč",DJF:"Fdj",DKK:"kr",DOP:"RD$",DZD:"دج",EEK:"kr",EGP:"£",ERN:"Nfk",ETB:"Br",ETH:"Ξ",EUR:"€",FJD:"$",FKP:"£",GBP:"£",GEL:"₾",GGP:"£",GHC:"₵",GHS:"GH₵",GIP:"£",GMD:"D",GNF:"FG",GTQ:"Q",GYD:"$",HKD:"$",HNL:"L",HRK:"kn",HTG:"G",HUF:"Ft",IDR:"Rp",ILS:"₪",IMP:"£",INR:"₹",IQD:"ع.د",IRR:"﷼",ISK:"kr",JEP:"£",JMD:"J$",JOD:"JD",JPY:"¥",KES:"KSh",KGS:"лв",KHR:"៛",KMF:"CF",KPW:"₩",KRW:"₩",KWD:"KD",KYD:"$",KZT:"лв",LAK:"₭",LBP:"£",LKR:"₨",LRD:"$",LSL:"M",LTC:"Ł",LTL:"Lt",LVL:"Ls",LYD:"LD",MAD:"MAD",MDL:"lei",MGA:"Ar",MKD:"ден",MMK:"K",MNT:"₮",MOP:"MOP$",MRO:"UM",MUR:"₨",MVR:"Rf",MWK:"MK",MXN:"$",MYR:"RM",MZN:"MT",NAD:"$",NGN:"₦",NIO:"C$",NOK:"kr",NPR:"₨",NZD:"$",OMR:"﷼",PAB:"B/.",PEN:"S/.",PGK:"K",PHP:"₱",PKR:"₨",PLN:"zł",PYG:"Gs",QAR:"﷼",RMB:"¥",RON:"lei",RSD:"Дин.",RUB:"₽",RWF:"R₣",SAR:"﷼",SBD:"$",SCR:"₨",SDG:"ج.س.",SEK:"kr",SGD:"$",SHP:"£",SLL:"Le",SOS:"S",SRD:"$",SSP:"£",STD:"Db",SVC:"$",SYP:"£",SZL:"E",THB:"฿",TJS:"SM",TMT:"T",TND:"د.ت",TOP:"T$",TRL:"₤",TRY:"₺",TTD:"TT$",TVD:"$",TWD:"NT$",TZS:"TSh",UAH:"₴",UGX:"USh",USD:"$",UYU:"$U",UZS:"лв",VEF:"Bs",VND:"₫",VUV:"VT",WST:"WS$",XAF:"FCFA",XBT:"Ƀ",XCD:"$",XOF:"CFA",XPF:"₣",YER:"﷼",ZAR:"R",ZWD:"Z$"},Te=(e,t,n,r)=>{if(!n.length)return;const o={bonusWalletIDs:null==n?void 0:n.filter((e=>Se(e))).map((e=>e.id)).join(","),XSessionId:t};if(!o.bonusWalletIDs)return;const i=`${e}/bonus/wagering/updates?${(e=>Object.keys(e).map((t=>`${t}=${e[t]}`)).join("&"))(o)}`;return((e,t)=>{let n;return n=EventSource?new EventSource(e):new ge.EventSourcePolyfill(e,{headers:{accept:"text/event-stream"}}),n.addEventListener("message",t),n})(i,r)},we=(e,t)=>{switch(e){case ae.completed:case ae.released:case ae.expired:case ae.closed:case ae.forfeited:return t.other();case ae.active:return t.active();default:throw new Error(`unknown Bonus Status: ${e}`)}},Be=(e,t)=>{switch(e){case ae.completed:case ae.released:return t.completed();case ae.active:case ae.expired:case ae.closed:case ae.forfeited:return t.current();default:throw new Error(`unknown Bonus Status: ${e}`)}},Ce=async(e,t,n={})=>{const{limit:r,lang:o,status:i}=n,s=fe(n,["limit","lang","status"]),a=Object.assign(Object.assign({type:"wagering",pagination:`limit=${r||50},offset=0`,language:o},i&&i!==ae.claimable?{status:i}:{}),s),l=i===ae.claimable?"claimable":"granted",c=new URL(`${e}/bonus/${l}`);return Object.keys(a).map((e=>{c.searchParams.append(e,a[e])})),await oe(c,{headers:Object.assign({},t?{"x-SessionId":t}:{})})},Ae=async(e,t,n,r)=>await oe(e+"/bonus/claim",{method:"PUT",body:JSON.stringify({bonusCode:n,currency:r}),headers:{"x-SessionId":t,accept:"text/plain","Content-Type":"application/json-patch+json"}}),Se=e=>!!e.bonusWalletID&&we(e.status,{active:()=>!0,other:()=>!1}),_e=(e,t)=>{switch(t.type){case le.standard:case le.freeBet:return((e,t)=>{let n;switch(t.type){case le.standard:n="bonus money";break;case le.freeBet:n="Free Bet"}const r=ve(Object.keys(e.increment)[0]);return"percentage"===t.mode?`${100*t.bonusAmount}% up to ${r}${t.capAmount} ${n}`:"fixed"===t.mode?`${r}${t.bonusAmount} ${n}`:void 0})(e,t);case le.freeRound:return`${t.freespinNumber} Free Spins`;case le.tournamentTicket:return"Enroll to Tournament Ticket";case le.oddsBoost:return"Enroll to Odds Boost";case le.cashBack:return"Enroll to Cash Back"}},He=(e,t,n)=>{var r;const o=(null===(r=e.wageringProgress)||void 0===r?void 0:r.currentLevel)-1,i=n.length-1,s=e=>e.filter((e=>e.index>=0&&e.index<=i)).map((e=>{const t=n[e.index];return{key:e.key,descriptions:t.bonuses.map((e=>_e(t,e)))}}))
188
195
  // .map(line => `${line.key} Level: ${getTitleByIndex(line.index)}`);
189
- return Te(e.status,{active:()=>t!==se.claimable?s([{key:"current",index:o},{key:"next",index:o+1}]):t===se.claimable?s([{key:"first",index:0},{key:"next",index:1}]):void 0,other:()=>s([{key:"last",index:i},{key:"previous",index:i-1}])})},_e=(e,t,n)=>{const{currency:r,currentLevelIncrement:o,gap:i,currentLevel:s}=e.wageringProgress,a=ye(r),l=t[s-1];switch(n){case"target":switch(e.wageringType){case le.Money:return`Play for ${a}${o} in total`;case le.BetCount:return`Place ${o}/${null==l?void 0:l.maxContribution} bets of at least ${null==l?void 0:l.minStake} each`}case"remaining":switch(e.wageringType){case le.Money:return`Remaining: ${a}${i}`;case le.BetCount:return`Bets Remaining: ${i} bets`}case"got":const t=Le(e);switch(e.wageringType){case le.Money:return`Wagered: ${a}${t}`;case le.BetCount:return`Bets Placed: ${t} bets`}}},He=(e,t)=>({target:()=>Te(e.status,{active:()=>_e(e,t,"target"),other:()=>`This bonus is ${e.status}`}),remaining:()=>_e(e,t,"remaining"),got:()=>_e(e,t,"got")}),Le=e=>{if(!e.wageringProgress)return 0;const{currency:t,currentLevelIncrement:n,gap:r,currentLevel:o}=e.wageringProgress;return n-r},Pe=(e,t,n,r)=>{const o=ee(e);o<0?n():(r(te(e)),
196
+ return we(e.status,{active:()=>t!==ae.claimable?s([{key:"current",index:o},{key:"next",index:o+1}]):t===ae.claimable?s([{key:"first",index:0},{key:"next",index:1}]):void 0,other:()=>s([{key:"last",index:i},{key:"previous",index:i-1}])})},Le=(e,t,n)=>{const{currency:r,currentLevelIncrement:o,gap:i,currentLevel:s}=e.wageringProgress,a=ve(r),l=t[s-1];switch(n){case"target":switch(e.wageringType){case ce.Money:return`Play for ${a}${o} in total`;case ce.BetCount:return`Place ${o}/${null==l?void 0:l.maxContribution} bets of at least ${null==l?void 0:l.minStake} each`}case"remaining":switch(e.wageringType){case ce.Money:return`Remaining: ${a}${i}`;case ce.BetCount:return`Bets Remaining: ${i} bets`}case"got":const t=Re(e);switch(e.wageringType){case ce.Money:return`Wagered: ${a}${t}`;case ce.BetCount:return`Bets Placed: ${t} bets`}}},Pe=(e,t)=>({target:()=>we(e.status,{active:()=>Le(e,t,"target"),other:()=>`This bonus is ${e.status}`}),remaining:()=>Le(e,t,"remaining"),got:()=>Le(e,t,"got")}),Re=e=>{if(!e.wageringProgress)return 0;const{currency:t,currentLevelIncrement:n,gap:r,currentLevel:o}=e.wageringProgress;return n-r},Oe=(e,t,n,r)=>{const o=te(e);o<0?n():(r(ne(e)),
190
197
  // check if bonus will expire
191
- o<t&&setTimeout((()=>{ge({type:"OnWageringBonusExpired"})}),o))},Re=[];
198
+ o<t&&setTimeout((()=>{me({type:"OnWageringBonusExpired"})}),o))},Ne=[];
192
199
  /**
193
200
  * Create a `Writable` store that allows both updating and reading by subscription.
194
201
  * @param {*=}value initial value
195
- * @param {StartStopNotifier=}start start and stop notifications for subscriptions
202
+ * @param {StartStopNotifier=} start
196
203
  */
197
204
  function Ie(t,n=e){let r;const o=new Set;function i(e){if(s(t,e)&&(t=e,r)){// store is ready
198
- const e=!Re.length;for(const e of o)e[1](),Re.push(e,t);if(e){for(let e=0;e<Re.length;e+=2)Re[e][0](Re[e+1]);Re.length=0}}}return{set:i,update:function(e){i(e(t))},subscribe:function(s,a=e){const l=[s,a];return o.add(l),1===o.size&&(r=n(i)||e),s(t),()=>{o.delete(l),0===o.size&&r&&(r(),r=null)}}}}function Oe(t,n,r){const s=!Array.isArray(t),a=s?[t]:t,l=n.length<2;return u=t=>{let r=!1;const u=[];let h=0,f=e;const p=()=>{if(h)return;f();const r=n(s?u[0]:u,t);l?t(r):f=i(r)?r:e},d=a.map(((e,t)=>c(e,(e=>{u[t]=e,h&=~(1<<t),r&&p()}),(()=>{h|=1<<t}))));return r=!0,p(),function(){o(d),f(),
205
+ const e=!Ne.length;for(const e of o)e[1](),Ne.push(e,t);if(e){for(let e=0;e<Ne.length;e+=2)Ne[e][0](Ne[e+1]);Ne.length=0}}}return{set:i,update:function(e){i(e(t))},subscribe:function(s,a=e){const l=[s,a];return o.add(l),1===o.size&&(r=n(i)||e),s(t),()=>{o.delete(l),0===o.size&&r&&(r(),r=null)}}}}function $e(t,n,r){const s=!Array.isArray(t),a=s?[t]:t,l=n.length<2;return u=t=>{let r=!1;const u=[];let h=0,f=e;const p=()=>{if(h)return;f();const r=n(s?u[0]:u,t);l?t(r):f=i(r)?r:e},d=a.map(((e,t)=>c(e,(e=>{u[t]=e,h&=~(1<<t),r&&p()}),(()=>{h|=1<<t}))));return r=!0,p(),function(){o(d),f(),
199
206
  // We need to set this to false because callbacks can still happen despite having unsubscribed:
200
207
  // Callbacks might already be placed in the queue which doesn't know it should no longer
201
208
  // invoke this derived store.
@@ -203,21 +210,21 @@ r=!1}},{subscribe:Ie(r,u).subscribe};
203
210
  /**
204
211
  * Creates a `Readable` store that allows reading by subscription.
205
212
  * @param value initial value
206
- * @param {StartStopNotifier}start start and stop notifications for subscriptions
213
+ * @param {StartStopNotifier} [start]
207
214
  */
208
- var u}var Ne=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===$e}(e)}
215
+ var u}var xe=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===Me}(e)}
209
216
  // see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
210
- (e)};var $e="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function xe(e,t){return!1!==t.clone&&t.isMergeableObject(e)?ke((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function Me(e,t,n){return e.concat(t).map((function(e){return xe(e,n)}))}function De(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function Ue(e,t){try{return t in e}catch(e){return!1}}
217
+ (e)};var Me="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function De(e,t){return!1!==t.clone&&t.isMergeableObject(e)?je((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function Ue(e,t,n){return e.concat(t).map((function(e){return De(e,n)}))}function Ge(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function ke(e,t){try{return t in e}catch(e){return!1}}
211
218
  // Protects from prototype poisoning and unexpected merging up the prototype chain.
212
- function Ge(e,t,n){var r={};return n.isMergeableObject(e)&&De(e).forEach((function(t){r[t]=xe(e[t],n)})),De(t).forEach((function(o){(function(e,t){return Ue(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t));// and also unsafe if they're nonenumerable.
213
- })(e,o)||(Ue(e,o)&&n.isMergeableObject(t[o])?r[o]=function(e,t){if(!t.customMerge)return ke;var n=t.customMerge(e);return"function"==typeof n?n:ke}(o,n)(e[o],t[o],n):r[o]=xe(t[o],n))})),r}function ke(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||Me,n.isMergeableObject=n.isMergeableObject||Ne,
219
+ function Fe(e,t,n){var r={};return n.isMergeableObject(e)&&Ge(e).forEach((function(t){r[t]=De(e[t],n)})),Ge(t).forEach((function(o){(function(e,t){return ke(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t));// and also unsafe if they're nonenumerable.
220
+ })(e,o)||(ke(e,o)&&n.isMergeableObject(t[o])?r[o]=function(e,t){if(!t.customMerge)return je;var n=t.customMerge(e);return"function"==typeof n?n:je}(o,n)(e[o],t[o],n):r[o]=De(t[o],n))})),r}function je(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||Ue,n.isMergeableObject=n.isMergeableObject||xe,
214
221
  // cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()
215
222
  // implementations can use it. The caller may not replace it.
216
- n.cloneUnlessOtherwiseSpecified=xe;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):Ge(e,t,n):xe(t,n)}ke.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return ke(e,n,t)}),{})};var Fe,je,Ve,Ke=ke;
223
+ n.cloneUnlessOtherwiseSpecified=De;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):Fe(e,t,n):De(t,n)}je.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return je(e,n,t)}),{})};var Ve,Ke,We,Ze=je;
217
224
  /**
218
225
  * Type Guards
219
226
  */
220
- function We(e){return e.type===je.literal}function Ze(e){return e.type===je.argument}function Xe(e){return e.type===je.number}function ze(e){return e.type===je.date}function Ye(e){return e.type===je.time}function Je(e){return e.type===je.select}function qe(e){return e.type===je.plural}function Qe(e){return e.type===je.pound}function et(e){return e.type===je.tag}function tt(e){return!(!e||"object"!=typeof e||e.type!==Ve.number)}function nt(e){return!(!e||"object"!=typeof e||e.type!==Ve.dateTime)}
227
+ function Xe(e){return e.type===Ke.literal}function ze(e){return e.type===Ke.argument}function Ye(e){return e.type===Ke.number}function Je(e){return e.type===Ke.date}function qe(e){return e.type===Ke.time}function Qe(e){return e.type===Ke.select}function et(e){return e.type===Ke.plural}function tt(e){return e.type===Ke.pound}function nt(e){return e.type===Ke.tag}function rt(e){return!(!e||"object"!=typeof e||e.type!==We.number)}function ot(e){return!(!e||"object"!=typeof e||e.type!==We.dateTime)}
221
228
  // @generated from regex-gen.ts
222
229
  !function(e){
223
230
  /** Argument is unclosed (e.g. `{0`) */
@@ -279,7 +286,7 @@ e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",
279
286
  /** The closing tag does not match the opening tag. (e.g. `<bold>foo</italic>`) */
280
287
  e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",
281
288
  /** The opening tag has unmatched closing tag. (e.g. `<bold>foo`) */
282
- e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(Fe||(Fe={})),function(e){
289
+ e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(Ve||(Ve={})),function(e){
283
290
  /**
284
291
  * Raw text
285
292
  */
@@ -316,7 +323,7 @@ e[e.pound=7]="pound",
316
323
  /**
317
324
  * XML-like tag
318
325
  */
319
- e[e.tag=8]="tag"}(je||(je={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(Ve||(Ve={}));var rt=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,ot=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
326
+ e[e.tag=8]="tag"}(Ke||(Ke={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(We||(We={}));var it=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,st=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
320
327
  /**
321
328
  * https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
322
329
  * Credit: https://github.com/caridy/intl-datetimeformat-pattern/blob/master/index.js
@@ -328,7 +335,7 @@ e[e.tag=8]="tag"}(je||(je={})),function(e){e[e.number=0]="number",e[e.dateTime=1
328
335
  * @public
329
336
  * @param skeleton skeleton string
330
337
  */
331
- function it(e){var t={};return e.replace(ot,(function(e){var n=e.length;switch(e[0]){
338
+ function at(e){var t={};return e.replace(st,(function(e){var n=e.length;switch(e[0]){
332
339
  // Era
333
340
  case"G":t.era=4===n?"long":5===n?"narrow":"short";break;
334
341
  // Year
@@ -362,33 +369,33 @@ case"X":// 1, 2, 3, 4: The ISO8601 varios formats
362
369
  case"x":// 1, 2, 3, 4: The ISO8601 varios formats
363
370
  throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""})),t}
364
371
  // @generated from regex-gen.ts
365
- var st=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;var at=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,lt=/^(@+)?(\+|#+)?[rs]?$/g,ct=/(\*)(0+)|(#+)(0+)|(0+)/g,ut=/^(0+)$/;function ht(e){var t={};return"r"===e[e.length-1]?t.roundingPriority="morePrecision":"s"===e[e.length-1]&&(t.roundingPriority="lessPrecision"),e.replace(lt,(function(e,n,r){
372
+ var lt=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;var ct=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,ut=/^(@+)?(\+|#+)?[rs]?$/g,ht=/(\*)(0+)|(#+)(0+)|(0+)/g,ft=/^(0+)$/;function pt(e){var t={};return"r"===e[e.length-1]?t.roundingPriority="morePrecision":"s"===e[e.length-1]&&(t.roundingPriority="lessPrecision"),e.replace(ut,(function(e,n,r){
366
373
  // @@@ case
367
- return"string"!=typeof r?(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length):"+"===r?t.minimumSignificantDigits=n.length:"#"===n[0]?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+("string"==typeof r?r.length:0)),""})),t}function ft(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function pt(e){
374
+ return"string"!=typeof r?(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length):"+"===r?t.minimumSignificantDigits=n.length:"#"===n[0]?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+("string"==typeof r?r.length:0)),""})),t}function dt(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function gt(e){
368
375
  // Engineering
369
- var t;if("E"===e[0]&&"E"===e[1]?(t={notation:"engineering"},e=e.slice(2)):"E"===e[0]&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if("+!"===n?(t.signDisplay="always",e=e.slice(2)):"+?"===n&&(t.signDisplay="exceptZero",e=e.slice(2)),!ut.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function dt(e){var t=ft(e);return t||{}}
376
+ var t;if("E"===e[0]&&"E"===e[1]?(t={notation:"engineering"},e=e.slice(2)):"E"===e[0]&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if("+!"===n?(t.signDisplay="always",e=e.slice(2)):"+?"===n&&(t.signDisplay="exceptZero",e=e.slice(2)),!ft.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function mt(e){var t=dt(e);return t||{}}
370
377
  /**
371
378
  * https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md#skeleton-stems-and-options
372
- */function gt(e){for(var t={},n=0,r=e;n<r.length;n++){var o=r[n];switch(o.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=o.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=o.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=ue(ue(ue({},t),{notation:"scientific"}),o.options.reduce((function(e,t){return ue(ue({},e),dt(t))}),{}));continue;case"engineering":t=ue(ue(ue({},t),{notation:"engineering"}),o.options.reduce((function(e,t){return ue(ue({},e),dt(t))}),{}));continue;case"notation-simple":t.notation="standard";continue;
379
+ */function bt(e){for(var t={},n=0,r=e;n<r.length;n++){var o=r[n];switch(o.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=o.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=o.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=he(he(he({},t),{notation:"scientific"}),o.options.reduce((function(e,t){return he(he({},e),mt(t))}),{}));continue;case"engineering":t=he(he(he({},t),{notation:"engineering"}),o.options.reduce((function(e,t){return he(he({},e),mt(t))}),{}));continue;case"notation-simple":t.notation="standard";continue;
373
380
  // https://github.com/unicode-org/icu/blob/master/icu4c/source/i18n/unicode/unumberformatter.h
374
381
  case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(o.options[0]);continue;
375
382
  // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width
376
- case"integer-width":if(o.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");o.options[0].replace(ct,(function(e,n,r,o,i,s){if(n)t.minimumIntegerDigits=r.length;else{if(o&&i)throw new Error("We currently do not support maximum integer digits");if(s)throw new Error("We currently do not support exact integer digits")}return""}));continue}
383
+ case"integer-width":if(o.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");o.options[0].replace(ht,(function(e,n,r,o,i,s){if(n)t.minimumIntegerDigits=r.length;else{if(o&&i)throw new Error("We currently do not support maximum integer digits");if(s)throw new Error("We currently do not support exact integer digits")}return""}));continue}
377
384
  // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width
378
- if(ut.test(o.stem))t.minimumIntegerDigits=o.stem.length;else if(at.test(o.stem)){
385
+ if(ft.test(o.stem))t.minimumIntegerDigits=o.stem.length;else if(ct.test(o.stem)){
379
386
  // Precision
380
387
  // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#fraction-precision
381
388
  // precision-integer case
382
- if(o.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");o.stem.replace(at,(function(e,n,r,o,i,s){
389
+ if(o.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");o.stem.replace(ct,(function(e,n,r,o,i,s){
383
390
  // .000* case (before ICU67 it was .000+)
384
391
  return"*"===r?t.minimumFractionDigits=n.length:o&&"#"===o[0]?t.maximumFractionDigits=o.length:i&&s?(t.minimumFractionDigits=i.length,t.maximumFractionDigits=i.length+s.length):(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length),""}));var i=o.options[0];
385
392
  // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#trailing-zero-display
386
- "w"===i?t=ue(ue({},t),{trailingZeroDisplay:"stripIfInteger"}):i&&(t=ue(ue({},t),ht(i)))}
393
+ "w"===i?t=he(he({},t),{trailingZeroDisplay:"stripIfInteger"}):i&&(t=he(he({},t),pt(i)))}
387
394
  // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#significant-digits-precision
388
- else if(lt.test(o.stem))t=ue(ue({},t),ht(o.stem));else{var s=ft(o.stem);s&&(t=ue(ue({},t),s));var a=pt(o.stem);a&&(t=ue(ue({},t),a))}}return t}
395
+ else if(ut.test(o.stem))t=he(he({},t),pt(o.stem));else{var s=dt(o.stem);s&&(t=he(he({},t),s));var a=gt(o.stem);a&&(t=he(he({},t),a))}}return t}
389
396
  // @generated from time-data-gen.ts
390
397
  // prettier-ignore
391
- var mt,bt={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};
398
+ var yt,vt={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};
392
399
  /**
393
400
  * Returns the best matching date time pattern if a date time skeleton
394
401
  * pattern is provided with a locale. Follows the Unicode specification:
@@ -401,7 +408,7 @@ var mt,bt={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H
401
408
  * of the given `locale` to the corresponding time pattern.
402
409
  * @param locale
403
410
  */
404
- function yt(e){var t=e.hourCycle;if(void 0===t&&
411
+ function Et(e){var t=e.hourCycle;if(void 0===t&&
405
412
  // @ts-ignore hourCycle(s) is not identified yet
406
413
  e.hourCycles&&
407
414
  // @ts-ignore
@@ -409,37 +416,37 @@ e.hourCycles.length&&(
409
416
  // @ts-ignore
410
417
  t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}
411
418
  // TODO: Once hourCycle is fully supported remove the following with data generation
412
- var n,r=e.language;return"root"!==r&&(n=e.maximize().region),(bt[n||""]||bt[r||""]||bt["".concat(r,"-001")]||bt["001"])[0]}var vt=new RegExp("^".concat(rt.source,"*")),Et=new RegExp("".concat(rt.source,"*$"));function Tt(e,t){return{start:e,end:t}}
419
+ var n,r=e.language;return"root"!==r&&(n=e.maximize().region),(vt[n||""]||vt[r||""]||vt["".concat(r,"-001")]||vt["001"])[0]}var Tt=new RegExp("^".concat(it.source,"*")),wt=new RegExp("".concat(it.source,"*$"));function Bt(e,t){return{start:e,end:t}}
413
420
  // #region Ponyfills
414
421
  // Consolidate these variables up top for easier toggling during debugging
415
- var wt=!!String.prototype.startsWith,Bt=!!String.fromCodePoint,Ct=!!Object.fromEntries,At=!!String.prototype.codePointAt,St=!!String.prototype.trimStart,_t=!!String.prototype.trimEnd,Ht=!!Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Lt=!0;try{
422
+ var Ct=!!String.prototype.startsWith,At=!!String.fromCodePoint,St=!!Object.fromEntries,_t=!!String.prototype.codePointAt,Ht=!!String.prototype.trimStart,Lt=!!String.prototype.trimEnd,Pt=!!Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Rt=!0;try{
416
423
  /**
417
424
  * legacy Edge or Xbox One browser
418
425
  * Unicode flag support: supported
419
426
  * Pattern_Syntax support: not supported
420
427
  * See https://github.com/formatjs/formatjs/issues/2822
421
428
  */
422
- Lt="a"===(null===(mt=Mt("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===mt?void 0:mt[0])}catch(e){Lt=!1}var Pt,Rt=wt?// Native
429
+ Rt="a"===(null===(yt=Ut("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===yt?void 0:yt[0])}catch(e){Rt=!1}var Ot,Nt=Ct?// Native
423
430
  function(e,t,n){return e.startsWith(t,n)}:// For IE11
424
- function(e,t,n){return e.slice(n,n+t.length)===t},It=Bt?String.fromCodePoint:// IE11
425
- function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n,r="",o=e.length,i=0;o>i;){if((n=e[i++])>1114111)throw RangeError(n+" is not a valid code point");r+=n<65536?String.fromCharCode(n):String.fromCharCode(55296+((n-=65536)>>10),n%1024+56320)}return r},Ot=
431
+ function(e,t,n){return e.slice(n,n+t.length)===t},It=At?String.fromCodePoint:// IE11
432
+ function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n,r="",o=e.length,i=0;o>i;){if((n=e[i++])>1114111)throw RangeError(n+" is not a valid code point");r+=n<65536?String.fromCharCode(n):String.fromCharCode(55296+((n-=65536)>>10),n%1024+56320)}return r},$t=
426
433
  // native
427
- Ct?Object.fromEntries:// Ponyfill
428
- function(e){for(var t={},n=0,r=e;n<r.length;n++){var o=r[n],i=o[0],s=o[1];t[i]=s}return t},Nt=At?// Native
434
+ St?Object.fromEntries:// Ponyfill
435
+ function(e){for(var t={},n=0,r=e;n<r.length;n++){var o=r[n],i=o[0],s=o[1];t[i]=s}return t},xt=_t?// Native
429
436
  function(e,t){return e.codePointAt(t)}:// IE 11
430
- function(e,t){var n=e.length;if(!(t<0||t>=n)){var r,o=e.charCodeAt(t);return o<55296||o>56319||t+1===n||(r=e.charCodeAt(t+1))<56320||r>57343?o:r-56320+(o-55296<<10)+65536}},$t=St?// Native
437
+ function(e,t){var n=e.length;if(!(t<0||t>=n)){var r,o=e.charCodeAt(t);return o<55296||o>56319||t+1===n||(r=e.charCodeAt(t+1))<56320||r>57343?o:r-56320+(o-55296<<10)+65536}},Mt=Ht?// Native
431
438
  function(e){return e.trimStart()}:// Ponyfill
432
- function(e){return e.replace(vt,"")},xt=_t?// Native
439
+ function(e){return e.replace(Tt,"")},Dt=Lt?// Native
433
440
  function(e){return e.trimEnd()}:// Ponyfill
434
- function(e){return e.replace(Et,"")};
441
+ function(e){return e.replace(wt,"")};
435
442
  // Prevent minifier to translate new RegExp to literal form that might cause syntax error on IE11.
436
- function Mt(e,t){return new RegExp(e,t)}
443
+ function Ut(e,t){return new RegExp(e,t)}
437
444
  // #endregion
438
- if(Lt){
445
+ if(Rt){
439
446
  // Native
440
- var Dt=Mt("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Pt=function(e,t){var n;return Dt.lastIndex=t,null!==(n=Dt.exec(e)[1])&&void 0!==n?n:""}}else
447
+ var Gt=Ut("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Ot=function(e,t){var n;return Gt.lastIndex=t,null!==(n=Gt.exec(e)[1])&&void 0!==n?n:""}}else
441
448
  // IE11
442
- Pt=function(e,t){for(var n=[];;){var r=Nt(e,t);if(void 0===r||Ft(r)||jt(r))break;n.push(r),t+=r>=65536?2:1}return It.apply(void 0,n)};var Ut=/** @class */function(){function e(e,t){void 0===t&&(t={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}return e.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(e,t,n){for(var r=[];!this.isEOF();){var o=this.char();if(123/* `{` */===o){if((i=this.parseArgument(e,n)).err)return i;r.push(i.val)}else{if(125/* `}` */===o&&e>0)break;if(35/* `#` */!==o||"plural"!==t&&"selectordinal"!==t){if(60/* `<` */===o&&!this.ignoreTag&&47===this.peek()){if(n)break;return this.error(Fe.UNMATCHED_CLOSING_TAG,Tt(this.clonePosition(),this.clonePosition()))}if(60/* `<` */===o&&!this.ignoreTag&&Gt(this.peek()||0)){if((i=this.parseTag(e,t)).err)return i;r.push(i.val)}else{var i;if((i=this.parseLiteral(e,t)).err)return i;r.push(i.val)}}else{var s=this.clonePosition();this.bump(),r.push({type:je.pound,location:Tt(s,this.clonePosition())})}}}return{val:r,err:null}},
449
+ Ot=function(e,t){for(var n=[];;){var r=xt(e,t);if(void 0===r||Vt(r)||Kt(r))break;n.push(r),t+=r>=65536?2:1}return It.apply(void 0,n)};var kt=/** @class */function(){function e(e,t){void 0===t&&(t={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}return e.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(e,t,n){for(var r=[];!this.isEOF();){var o=this.char();if(123/* `{` */===o){if((i=this.parseArgument(e,n)).err)return i;r.push(i.val)}else{if(125/* `}` */===o&&e>0)break;if(35/* `#` */!==o||"plural"!==t&&"selectordinal"!==t){if(60/* `<` */===o&&!this.ignoreTag&&47===this.peek()){if(n)break;return this.error(Ve.UNMATCHED_CLOSING_TAG,Bt(this.clonePosition(),this.clonePosition()))}if(60/* `<` */===o&&!this.ignoreTag&&Ft(this.peek()||0)){if((i=this.parseTag(e,t)).err)return i;r.push(i.val)}else{var i;if((i=this.parseLiteral(e,t)).err)return i;r.push(i.val)}}else{var s=this.clonePosition();this.bump(),r.push({type:Ke.pound,location:Bt(s,this.clonePosition())})}}}return{val:r,err:null}},
443
450
  /**
444
451
  * A tag name must start with an ASCII lower/upper case letter. The grammar is based on the
445
452
  * [custom element name][] except that a dash is NOT always mandatory and uppercase letters
@@ -461,14 +468,14 @@ Pt=function(e,t){for(var n=[];;){var r=Nt(e,t);if(void 0===r||Ft(r)||jt(r))break
461
468
  e.prototype.parseTag=function(e,t){var n=this.clonePosition();this.bump();// `<`
462
469
  var r=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))
463
470
  // Self closing tag
464
- return{val:{type:je.literal,value:"<".concat(r,"/>"),location:Tt(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(e+1,t,!0);if(o.err)return o;var i=o.val,s=this.clonePosition();
471
+ return{val:{type:Ke.literal,value:"<".concat(r,"/>"),location:Bt(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(e+1,t,!0);if(o.err)return o;var i=o.val,s=this.clonePosition();
465
472
  // Expecting a close tag
466
- if(this.bumpIf("</")){if(this.isEOF()||!Gt(this.char()))return this.error(Fe.INVALID_TAG,Tt(s,this.clonePosition()));var a=this.clonePosition();return r!==this.parseTagName()?this.error(Fe.UNMATCHED_CLOSING_TAG,Tt(a,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:je.tag,value:r,children:i,location:Tt(n,this.clonePosition())},err:null}:this.error(Fe.INVALID_TAG,Tt(s,this.clonePosition())))}return this.error(Fe.UNCLOSED_TAG,Tt(n,this.clonePosition()))}return this.error(Fe.INVALID_TAG,Tt(n,this.clonePosition()))},
473
+ if(this.bumpIf("</")){if(this.isEOF()||!Ft(this.char()))return this.error(Ve.INVALID_TAG,Bt(s,this.clonePosition()));var a=this.clonePosition();return r!==this.parseTagName()?this.error(Ve.UNMATCHED_CLOSING_TAG,Bt(a,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:Ke.tag,value:r,children:i,location:Bt(n,this.clonePosition())},err:null}:this.error(Ve.INVALID_TAG,Bt(s,this.clonePosition())))}return this.error(Ve.UNCLOSED_TAG,Bt(n,this.clonePosition()))}return this.error(Ve.INVALID_TAG,Bt(n,this.clonePosition()))},
467
474
  /**
468
475
  * This method assumes that the caller has peeked ahead for the first tag character.
469
476
  */
470
477
  e.prototype.parseTagName=function(){var e=this.offset();// the first tag name character
471
- for(this.bump();!this.isEOF()&&kt(this.char());)this.bump();return this.message.slice(e,this.offset())},e.prototype.parseLiteral=function(e,t){for(var n=this.clonePosition(),r="";;){var o=this.tryParseQuote(t);if(o)r+=o;else{var i=this.tryParseUnquoted(e,t);if(i)r+=i;else{var s=this.tryParseLeftAngleBracket();if(!s)break;r+=s}}}var a=Tt(n,this.clonePosition());return{val:{type:je.literal,value:r,location:a},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60/* `<` */!==this.char()||!this.ignoreTag&&(Gt(e=this.peek()||0)||47===e)?null:(this.bump(),"<");var e;
478
+ for(this.bump();!this.isEOF()&&jt(this.char());)this.bump();return this.message.slice(e,this.offset())},e.prototype.parseLiteral=function(e,t){for(var n=this.clonePosition(),r="";;){var o=this.tryParseQuote(t);if(o)r+=o;else{var i=this.tryParseUnquoted(e,t);if(i)r+=i;else{var s=this.tryParseLeftAngleBracket();if(!s)break;r+=s}}}var a=Bt(n,this.clonePosition());return{val:{type:Ke.literal,value:r,location:a},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60/* `<` */!==this.char()||!this.ignoreTag&&(Ft(e=this.peek()||0)||47===e)?null:(this.bump(),"<");var e;
472
479
  /** See `parseTag` function docs. */},
473
480
  /**
474
481
  * Starting with ICU 4.8, an ASCII apostrophe only starts quoted text if it immediately precedes
@@ -491,66 +498,66 @@ for(this.bump();!this.isEOF();){var n=this.char();if(39/* `'` */===n){if(39/* `'
491
498
  this.bump();break}t.push(39),
492
499
  // Bump one more time because we need to skip 2 characters.
493
500
  this.bump()}else t.push(n);this.bump()}return It.apply(void 0,t)},e.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var n=this.char();return 60/* `<` */===n||123/* `{` */===n||35/* `#` */===n&&("plural"===t||"selectordinal"===t)||125/* `}` */===n&&e>0?null:(this.bump(),It(n))},e.prototype.parseArgument=function(e,t){var n=this.clonePosition();if(this.bump(),// `{`
494
- this.bumpSpace(),this.isEOF())return this.error(Fe.EXPECT_ARGUMENT_CLOSING_BRACE,Tt(n,this.clonePosition()));if(125/* `}` */===this.char())return this.bump(),this.error(Fe.EMPTY_ARGUMENT,Tt(n,this.clonePosition()));
501
+ this.bumpSpace(),this.isEOF())return this.error(Ve.EXPECT_ARGUMENT_CLOSING_BRACE,Bt(n,this.clonePosition()));if(125/* `}` */===this.char())return this.bump(),this.error(Ve.EMPTY_ARGUMENT,Bt(n,this.clonePosition()));
495
502
  // argument name
496
- var r=this.parseIdentifierIfPossible().value;if(!r)return this.error(Fe.MALFORMED_ARGUMENT,Tt(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(Fe.EXPECT_ARGUMENT_CLOSING_BRACE,Tt(n,this.clonePosition()));switch(this.char()){
503
+ var r=this.parseIdentifierIfPossible().value;if(!r)return this.error(Ve.MALFORMED_ARGUMENT,Bt(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(Ve.EXPECT_ARGUMENT_CLOSING_BRACE,Bt(n,this.clonePosition()));switch(this.char()){
497
504
  // Simple argument: `{name}`
498
505
  case 125/* `}` */:// `}`
499
- return this.bump(),{val:{type:je.argument,
506
+ return this.bump(),{val:{type:Ke.argument,
500
507
  // value does not include the opening and closing braces.
501
- value:r,location:Tt(n,this.clonePosition())},err:null};
508
+ value:r,location:Bt(n,this.clonePosition())},err:null};
502
509
  // Argument with options: `{name, format, ...}`
503
510
  case 44/* `,` */:return this.bump(),// `,`
504
- this.bumpSpace(),this.isEOF()?this.error(Fe.EXPECT_ARGUMENT_CLOSING_BRACE,Tt(n,this.clonePosition())):this.parseArgumentOptions(e,t,r,n);default:return this.error(Fe.MALFORMED_ARGUMENT,Tt(n,this.clonePosition()))}},
511
+ this.bumpSpace(),this.isEOF()?this.error(Ve.EXPECT_ARGUMENT_CLOSING_BRACE,Bt(n,this.clonePosition())):this.parseArgumentOptions(e,t,r,n);default:return this.error(Ve.MALFORMED_ARGUMENT,Bt(n,this.clonePosition()))}},
505
512
  /**
506
513
  * Advance the parser until the end of the identifier, if it is currently on
507
514
  * an identifier character. Return an empty string otherwise.
508
515
  */
509
- e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),n=Pt(this.message,t),r=t+n.length;return this.bumpTo(r),{value:n,location:Tt(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,n,r){var o,i=this.clonePosition(),s=this.parseIdentifierIfPossible().value,a=this.clonePosition();
516
+ e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),n=Ot(this.message,t),r=t+n.length;return this.bumpTo(r),{value:n,location:Bt(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,n,r){var o,i=this.clonePosition(),s=this.parseIdentifierIfPossible().value,a=this.clonePosition();
510
517
  // Parse this range:
511
518
  // {name, type, style}
512
519
  // ^---^
513
520
  switch(s){case"":
514
521
  // Expecting a style string number, date, time, plural, selectordinal, or select.
515
- return this.error(Fe.EXPECT_ARGUMENT_TYPE,Tt(i,a));case"number":case"date":case"time":
522
+ return this.error(Ve.EXPECT_ARGUMENT_TYPE,Bt(i,a));case"number":case"date":case"time":
516
523
  // Parse this range:
517
524
  // {name, number, style}
518
525
  // ^-------^
519
- this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition();if((b=this.parseSimpleArgStyleIfPossible()).err)return b;if(0===(p=xt(b.val)).length)return this.error(Fe.EXPECT_ARGUMENT_STYLE,Tt(this.clonePosition(),this.clonePosition()));l={style:p,styleLocation:Tt(c,this.clonePosition())}}if((y=this.tryParseArgumentClose(r)).err)return y;var u=Tt(r,this.clonePosition());
526
+ this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition();if((b=this.parseSimpleArgStyleIfPossible()).err)return b;if(0===(p=Dt(b.val)).length)return this.error(Ve.EXPECT_ARGUMENT_STYLE,Bt(this.clonePosition(),this.clonePosition()));l={style:p,styleLocation:Bt(c,this.clonePosition())}}if((y=this.tryParseArgumentClose(r)).err)return y;var u=Bt(r,this.clonePosition());
520
527
  // Extract style or skeleton
521
- if(l&&Rt(null==l?void 0:l.style,"::",0)){
528
+ if(l&&Nt(null==l?void 0:l.style,"::",0)){
522
529
  // Skeleton starts with `::`.
523
- var h=$t(l.style.slice(2));if("number"===s)return(b=this.parseNumberSkeletonFromString(h,l.styleLocation)).err?b:{val:{type:je.number,value:n,location:u,style:b.val},err:null};if(0===h.length)return this.error(Fe.EXPECT_DATE_TIME_SKELETON,u);var f=h;
530
+ var h=Mt(l.style.slice(2));if("number"===s)return(b=this.parseNumberSkeletonFromString(h,l.styleLocation)).err?b:{val:{type:Ke.number,value:n,location:u,style:b.val},err:null};if(0===h.length)return this.error(Ve.EXPECT_DATE_TIME_SKELETON,u);var f=h;
524
531
  // Get "best match" pattern only if locale is passed, if not, let it
525
532
  // pass as-is where `parseDateTimeSkeleton()` will throw an error
526
533
  // for unsupported patterns.
527
- this.locale&&(f=function(e,t){for(var n="",r=0;r<e.length;r++){var o=e.charAt(r);if("j"===o){for(var i=0;r+1<e.length&&e.charAt(r+1)===o;)i++,r++;var s=1+(1&i),a=i<2?1:3+(i>>1),l=yt(t);for("H"!=l&&"k"!=l||(a=0);a-- >0;)n+="a";for(;s-- >0;)n=l+n}else n+="J"===o?"H":o}return n}(h,this.locale));var p={type:Ve.dateTime,pattern:f,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?it(f):{}};return{val:{type:"date"===s?je.date:je.time,value:n,location:u,style:p},err:null}}
534
+ this.locale&&(f=function(e,t){for(var n="",r=0;r<e.length;r++){var o=e.charAt(r);if("j"===o){for(var i=0;r+1<e.length&&e.charAt(r+1)===o;)i++,r++;var s=1+(1&i),a=i<2?1:3+(i>>1),l=Et(t);for("H"!=l&&"k"!=l||(a=0);a-- >0;)n+="a";for(;s-- >0;)n=l+n}else n+="J"===o?"H":o}return n}(h,this.locale));var p={type:We.dateTime,pattern:f,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?at(f):{}};return{val:{type:"date"===s?Ke.date:Ke.time,value:n,location:u,style:p},err:null}}
528
535
  // Regular style or no style.
529
- return{val:{type:"number"===s?je.number:"date"===s?je.date:je.time,value:n,location:u,style:null!==(o=null==l?void 0:l.style)&&void 0!==o?o:null},err:null};case"plural":case"selectordinal":case"select":
536
+ return{val:{type:"number"===s?Ke.number:"date"===s?Ke.date:Ke.time,value:n,location:u,style:null!==(o=null==l?void 0:l.style)&&void 0!==o?o:null},err:null};case"plural":case"selectordinal":case"select":
530
537
  // Parse this range:
531
538
  // {name, plural, options}
532
539
  // ^---------^
533
- var d=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(Fe.EXPECT_SELECT_ARGUMENT_OPTIONS,Tt(d,ue({},d)));this.bumpSpace();
540
+ var d=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(Ve.EXPECT_SELECT_ARGUMENT_OPTIONS,Bt(d,he({},d)));this.bumpSpace();
534
541
  // Parse offset:
535
542
  // {name, plural, offset:1, options}
536
543
  // ^-----^
537
544
  // or the first option:
538
545
  // {name, plural, one {...} other {...}}
539
546
  // ^--^
540
- var g=this.parseIdentifierIfPossible(),m=0;if("select"!==s&&"offset"===g.value){if(!this.bumpIf(":"))return this.error(Fe.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Tt(this.clonePosition(),this.clonePosition()));var b;if(this.bumpSpace(),(b=this.tryParseDecimalInteger(Fe.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Fe.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return b;
547
+ var g=this.parseIdentifierIfPossible(),m=0;if("select"!==s&&"offset"===g.value){if(!this.bumpIf(":"))return this.error(Ve.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Bt(this.clonePosition(),this.clonePosition()));var b;if(this.bumpSpace(),(b=this.tryParseDecimalInteger(Ve.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Ve.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return b;
541
548
  // Parse another identifier for option parsing
542
- this.bumpSpace(),g=this.parseIdentifierIfPossible(),m=b.val}var y,v=this.tryParsePluralOrSelectOptions(e,s,t,g);if(v.err)return v;if((y=this.tryParseArgumentClose(r)).err)return y;var E=Tt(r,this.clonePosition());return"select"===s?{val:{type:je.select,value:n,options:Ot(v.val),location:E},err:null}:{val:{type:je.plural,value:n,options:Ot(v.val),offset:m,pluralType:"plural"===s?"cardinal":"ordinal",location:E},err:null};default:return this.error(Fe.INVALID_ARGUMENT_TYPE,Tt(i,a))}},e.prototype.tryParseArgumentClose=function(e){
549
+ this.bumpSpace(),g=this.parseIdentifierIfPossible(),m=b.val}var y,v=this.tryParsePluralOrSelectOptions(e,s,t,g);if(v.err)return v;if((y=this.tryParseArgumentClose(r)).err)return y;var E=Bt(r,this.clonePosition());return"select"===s?{val:{type:Ke.select,value:n,options:$t(v.val),location:E},err:null}:{val:{type:Ke.plural,value:n,options:$t(v.val),offset:m,pluralType:"plural"===s?"cardinal":"ordinal",location:E},err:null};default:return this.error(Ve.INVALID_ARGUMENT_TYPE,Bt(i,a))}},e.prototype.tryParseArgumentClose=function(e){
543
550
  // Parse: {value, number, ::currency/GBP }
544
- return this.isEOF()||125/* `}` */!==this.char()?this.error(Fe.EXPECT_ARGUMENT_CLOSING_BRACE,Tt(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},
551
+ return this.isEOF()||125/* `}` */!==this.char()?this.error(Ve.EXPECT_ARGUMENT_CLOSING_BRACE,Bt(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},
545
552
  /**
546
553
  * See: https://github.com/unicode-org/icu/blob/af7ed1f6d2298013dc303628438ec4abe1f16479/icu4c/source/common/messagepattern.cpp#L659
547
554
  */
548
555
  e.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,t=this.clonePosition();!this.isEOF();){switch(this.char()){case 39/* `'` */:
549
556
  // Treat apostrophe as quoting but include it in the style part.
550
557
  // Find the end of the quoted literal text.
551
- this.bump();var n=this.clonePosition();if(!this.bumpUntil("'"))return this.error(Fe.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Tt(n,this.clonePosition()));this.bump();break;case 123/* `{` */:e+=1,this.bump();break;case 125/* `}` */:if(!(e>0))return{val:this.message.slice(t.offset,this.offset()),err:null};e-=1;break;default:this.bump()}}return{val:this.message.slice(t.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(e,t){var n=[];try{n=function(e){if(0===e.length)throw new Error("Number skeleton cannot be empty");
558
+ this.bump();var n=this.clonePosition();if(!this.bumpUntil("'"))return this.error(Ve.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Bt(n,this.clonePosition()));this.bump();break;case 123/* `{` */:e+=1,this.bump();break;case 125/* `}` */:if(!(e>0))return{val:this.message.slice(t.offset,this.offset()),err:null};e-=1;break;default:this.bump()}}return{val:this.message.slice(t.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(e,t){var n=[];try{n=function(e){if(0===e.length)throw new Error("Number skeleton cannot be empty");
552
559
  // Parse the skeleton
553
- for(var t=e.split(st).filter((function(e){return e.length>0})),n=[],r=0,o=t;r<o.length;r++){var i=o[r].split("/");if(0===i.length)throw new Error("Invalid number skeleton");for(var s=i[0],a=i.slice(1),l=0,c=a;l<c.length;l++)if(0===c[l].length)throw new Error("Invalid number skeleton");n.push({stem:s,options:a})}return n}(e)}catch(e){return this.error(Fe.INVALID_NUMBER_SKELETON,t)}return{val:{type:Ve.number,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?gt(n):{}},err:null}},
560
+ for(var t=e.split(lt).filter((function(e){return e.length>0})),n=[],r=0,o=t;r<o.length;r++){var i=o[r].split("/");if(0===i.length)throw new Error("Invalid number skeleton");for(var s=i[0],a=i.slice(1),l=0,c=a;l<c.length;l++)if(0===c[l].length)throw new Error("Invalid number skeleton");n.push({stem:s,options:a})}return n}(e)}catch(e){return this.error(Ve.INVALID_NUMBER_SKELETON,t)}return{val:{type:We.number,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?bt(n):{}},err:null}},
554
561
  /**
555
562
  * @param nesting_level The current nesting level of messages.
556
563
  * This can be positive when parsing message fragment in select or plural argument options.
@@ -567,24 +574,24 @@ e.prototype.tryParsePluralOrSelectOptions=function(e,t,n,r){
567
574
  // ^--^
568
575
  for(var o,i=!1,s=[],a=new Set,l=r.value,c=r.location;;){if(0===l.length){var u=this.clonePosition();if("select"===t||!this.bumpIf("="))break;
569
576
  // Try parse `={number}` selector
570
- var h=this.tryParseDecimalInteger(Fe.EXPECT_PLURAL_ARGUMENT_SELECTOR,Fe.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;c=Tt(u,this.clonePosition()),l=this.message.slice(u.offset,this.offset())}
577
+ var h=this.tryParseDecimalInteger(Ve.EXPECT_PLURAL_ARGUMENT_SELECTOR,Ve.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;c=Bt(u,this.clonePosition()),l=this.message.slice(u.offset,this.offset())}
571
578
  // Duplicate selector clauses
572
- if(a.has(l))return this.error("select"===t?Fe.DUPLICATE_SELECT_ARGUMENT_SELECTOR:Fe.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,c);"other"===l&&(i=!0),
579
+ if(a.has(l))return this.error("select"===t?Ve.DUPLICATE_SELECT_ARGUMENT_SELECTOR:Ve.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,c);"other"===l&&(i=!0),
573
580
  // Parse:
574
581
  // one {one apple}
575
582
  // ^----------^
576
- this.bumpSpace();var f=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?Fe.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:Fe.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Tt(this.clonePosition(),this.clonePosition()));var p=this.parseMessage(e+1,t,n);if(p.err)return p;var d=this.tryParseArgumentClose(f);if(d.err)return d;s.push([l,{value:p.val,location:Tt(f,this.clonePosition())}]),
583
+ this.bumpSpace();var f=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?Ve.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:Ve.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Bt(this.clonePosition(),this.clonePosition()));var p=this.parseMessage(e+1,t,n);if(p.err)return p;var d=this.tryParseArgumentClose(f);if(d.err)return d;s.push([l,{value:p.val,location:Bt(f,this.clonePosition())}]),
577
584
  // Keep track of the existing selectors
578
585
  a.add(l),
579
586
  // Prep next selector clause.
580
- this.bumpSpace(),l=(o=this.parseIdentifierIfPossible()).value,c=o.location}return 0===s.length?this.error("select"===t?Fe.EXPECT_SELECT_ARGUMENT_SELECTOR:Fe.EXPECT_PLURAL_ARGUMENT_SELECTOR,Tt(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!i?this.error(Fe.MISSING_OTHER_CLAUSE,Tt(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(e,t){var n=1,r=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var o=!1,i=0;!this.isEOF();){var s=this.char();if(!(s>=48/* `0` */&&s<=57/* `9` */))break;o=!0,i=10*i+(s-48),this.bump()}var a=Tt(r,this.clonePosition());return o?Ht(i*=n)?{val:i,err:null}:this.error(t,a):this.error(e,a)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){
587
+ this.bumpSpace(),l=(o=this.parseIdentifierIfPossible()).value,c=o.location}return 0===s.length?this.error("select"===t?Ve.EXPECT_SELECT_ARGUMENT_SELECTOR:Ve.EXPECT_PLURAL_ARGUMENT_SELECTOR,Bt(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!i?this.error(Ve.MISSING_OTHER_CLAUSE,Bt(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(e,t){var n=1,r=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var o=!1,i=0;!this.isEOF();){var s=this.char();if(!(s>=48/* `0` */&&s<=57/* `9` */))break;o=!0,i=10*i+(s-48),this.bump()}var a=Bt(r,this.clonePosition());return o?Pt(i*=n)?{val:i,err:null}:this.error(t,a):this.error(e,a)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){
581
588
  // This is much faster than `Object.assign` or spread.
582
589
  return{offset:this.position.offset,line:this.position.line,column:this.position.column}},
583
590
  /**
584
591
  * Return the code point at the current position of the parser.
585
592
  * Throws if the index is out of bound.
586
593
  */
587
- e.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var t=Nt(this.message,e);if(void 0===t)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return t},e.prototype.error=function(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}},
594
+ e.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var t=xt(this.message,e);if(void 0===t)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return t},e.prototype.error=function(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}},
588
595
  /** Bump the parser to the next UTF-16 code unit. */
589
596
  e.prototype.bump=function(){if(!this.isEOF()){var e=this.char();10/* '\n' */===e?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,
590
597
  // 0 ~ 0x10000 -> unicode BMP, otherwise skip the surrogate pair.
@@ -595,7 +602,7 @@ this.position.offset+=e<65536?1:2)}},
595
602
  * following the prefix and return true. Otherwise, don't bump the parser
596
603
  * and return false.
597
604
  */
598
- e.prototype.bumpIf=function(e){if(Rt(this.message,e,this.offset())){for(var t=0;t<e.length;t++)this.bump();return!0}return!1},
605
+ e.prototype.bumpIf=function(e){if(Nt(this.message,e,this.offset())){for(var t=0;t<e.length;t++)this.bump();return!0}return!1},
599
606
  /**
600
607
  * Bump the parser until the pattern character is found and return `true`.
601
608
  * Otherwise bump to the end of the file and return `false`.
@@ -607,7 +614,7 @@ e.prototype.bumpUntil=function(e){var t=this.offset(),n=this.message.indexOf(e,t
607
614
  */
608
615
  e.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var t=this.offset();if(t===e)break;if(t>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},
609
616
  /** advance the parser through all whitespace to the next non-whitespace code unit. */
610
- e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Ft(this.char());)this.bump()},
617
+ e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Vt(this.char());)this.bump()},
611
618
  /**
612
619
  * Peek at the *next* Unicode codepoint in the input without advancing the parser.
613
620
  * If the input has been exhausted, then this returns null.
@@ -617,139 +624,139 @@ e.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this
617
624
  * This check if codepoint is alphabet (lower & uppercase)
618
625
  * @param codepoint
619
626
  * @returns
620
- */function Gt(e){return e>=97&&e<=122||e>=65&&e<=90}function kt(e){return 45/* '-' */===e||46/* '.' */===e||e>=48&&e<=57/* 0..9 */||95/* '_' */===e||e>=97&&e<=122/** a..z */||e>=65&&e<=90/* A..Z */||183==e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}
627
+ */function Ft(e){return e>=97&&e<=122||e>=65&&e<=90}function jt(e){return 45/* '-' */===e||46/* '.' */===e||e>=48&&e<=57/* 0..9 */||95/* '_' */===e||e>=97&&e<=122/** a..z */||e>=65&&e<=90/* A..Z */||183==e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}
621
628
  /**
622
629
  * Code point equivalent of regex `\p{White_Space}`.
623
630
  * From: https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt
624
- */function Ft(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}
631
+ */function Vt(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}
625
632
  /**
626
633
  * Code point equivalent of regex `\p{Pattern_Syntax}`.
627
634
  * See https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt
628
- */function jt(e){return e>=33&&e<=35||36===e||e>=37&&e<=39||40===e||41===e||42===e||43===e||44===e||45===e||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||91===e||92===e||93===e||94===e||96===e||123===e||124===e||125===e||126===e||161===e||e>=162&&e<=165||166===e||167===e||169===e||171===e||172===e||174===e||176===e||177===e||182===e||187===e||191===e||215===e||247===e||e>=8208&&e<=8213||e>=8214&&e<=8215||8216===e||8217===e||8218===e||e>=8219&&e<=8220||8221===e||8222===e||8223===e||e>=8224&&e<=8231||e>=8240&&e<=8248||8249===e||8250===e||e>=8251&&e<=8254||e>=8257&&e<=8259||8260===e||8261===e||8262===e||e>=8263&&e<=8273||8274===e||8275===e||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||8608===e||e>=8609&&e<=8610||8611===e||e>=8612&&e<=8613||8614===e||e>=8615&&e<=8621||8622===e||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||8658===e||8659===e||8660===e||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||8968===e||8969===e||8970===e||8971===e||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||9001===e||9002===e||e>=9003&&e<=9083||9084===e||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||9655===e||e>=9656&&e<=9664||9665===e||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||9839===e||e>=9840&&e<=10087||10088===e||10089===e||10090===e||10091===e||10092===e||10093===e||10094===e||10095===e||10096===e||10097===e||10098===e||10099===e||10100===e||10101===e||e>=10132&&e<=10175||e>=10176&&e<=10180||10181===e||10182===e||e>=10183&&e<=10213||10214===e||10215===e||10216===e||10217===e||10218===e||10219===e||10220===e||10221===e||10222===e||10223===e||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||10627===e||10628===e||10629===e||10630===e||10631===e||10632===e||10633===e||10634===e||10635===e||10636===e||10637===e||10638===e||10639===e||10640===e||10641===e||10642===e||10643===e||10644===e||10645===e||10646===e||10647===e||10648===e||e>=10649&&e<=10711||10712===e||10713===e||10714===e||10715===e||e>=10716&&e<=10747||10748===e||10749===e||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||11158===e||e>=11159&&e<=11263||e>=11776&&e<=11777||11778===e||11779===e||11780===e||11781===e||e>=11782&&e<=11784||11785===e||11786===e||11787===e||11788===e||11789===e||e>=11790&&e<=11798||11799===e||e>=11800&&e<=11801||11802===e||11803===e||11804===e||11805===e||e>=11806&&e<=11807||11808===e||11809===e||11810===e||11811===e||11812===e||11813===e||11814===e||11815===e||11816===e||11817===e||e>=11818&&e<=11822||11823===e||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||11840===e||11841===e||11842===e||e>=11843&&e<=11855||e>=11856&&e<=11857||11858===e||e>=11859&&e<=11903||e>=12289&&e<=12291||12296===e||12297===e||12298===e||12299===e||12300===e||12301===e||12302===e||12303===e||12304===e||12305===e||e>=12306&&e<=12307||12308===e||12309===e||12310===e||12311===e||12312===e||12313===e||12314===e||12315===e||12316===e||12317===e||e>=12318&&e<=12319||12320===e||12336===e||64830===e||64831===e||e>=65093&&e<=65094}function Vt(e){e.forEach((function(e){if(delete e.location,Je(e)||qe(e))for(var t in e.options)delete e.options[t].location,Vt(e.options[t].value);else Xe(e)&&tt(e.style)||(ze(e)||Ye(e))&&nt(e.style)?delete e.style.location:et(e)&&Vt(e.children)}))}function Kt(e,t){void 0===t&&(t={}),t=ue({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Ut(e,t).parse();if(n.err){var r=SyntaxError(Fe[n.err.kind]);
635
+ */function Kt(e){return e>=33&&e<=35||36===e||e>=37&&e<=39||40===e||41===e||42===e||43===e||44===e||45===e||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||91===e||92===e||93===e||94===e||96===e||123===e||124===e||125===e||126===e||161===e||e>=162&&e<=165||166===e||167===e||169===e||171===e||172===e||174===e||176===e||177===e||182===e||187===e||191===e||215===e||247===e||e>=8208&&e<=8213||e>=8214&&e<=8215||8216===e||8217===e||8218===e||e>=8219&&e<=8220||8221===e||8222===e||8223===e||e>=8224&&e<=8231||e>=8240&&e<=8248||8249===e||8250===e||e>=8251&&e<=8254||e>=8257&&e<=8259||8260===e||8261===e||8262===e||e>=8263&&e<=8273||8274===e||8275===e||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||8608===e||e>=8609&&e<=8610||8611===e||e>=8612&&e<=8613||8614===e||e>=8615&&e<=8621||8622===e||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||8658===e||8659===e||8660===e||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||8968===e||8969===e||8970===e||8971===e||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||9001===e||9002===e||e>=9003&&e<=9083||9084===e||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||9655===e||e>=9656&&e<=9664||9665===e||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||9839===e||e>=9840&&e<=10087||10088===e||10089===e||10090===e||10091===e||10092===e||10093===e||10094===e||10095===e||10096===e||10097===e||10098===e||10099===e||10100===e||10101===e||e>=10132&&e<=10175||e>=10176&&e<=10180||10181===e||10182===e||e>=10183&&e<=10213||10214===e||10215===e||10216===e||10217===e||10218===e||10219===e||10220===e||10221===e||10222===e||10223===e||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||10627===e||10628===e||10629===e||10630===e||10631===e||10632===e||10633===e||10634===e||10635===e||10636===e||10637===e||10638===e||10639===e||10640===e||10641===e||10642===e||10643===e||10644===e||10645===e||10646===e||10647===e||10648===e||e>=10649&&e<=10711||10712===e||10713===e||10714===e||10715===e||e>=10716&&e<=10747||10748===e||10749===e||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||11158===e||e>=11159&&e<=11263||e>=11776&&e<=11777||11778===e||11779===e||11780===e||11781===e||e>=11782&&e<=11784||11785===e||11786===e||11787===e||11788===e||11789===e||e>=11790&&e<=11798||11799===e||e>=11800&&e<=11801||11802===e||11803===e||11804===e||11805===e||e>=11806&&e<=11807||11808===e||11809===e||11810===e||11811===e||11812===e||11813===e||11814===e||11815===e||11816===e||11817===e||e>=11818&&e<=11822||11823===e||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||11840===e||11841===e||11842===e||e>=11843&&e<=11855||e>=11856&&e<=11857||11858===e||e>=11859&&e<=11903||e>=12289&&e<=12291||12296===e||12297===e||12298===e||12299===e||12300===e||12301===e||12302===e||12303===e||12304===e||12305===e||e>=12306&&e<=12307||12308===e||12309===e||12310===e||12311===e||12312===e||12313===e||12314===e||12315===e||12316===e||12317===e||e>=12318&&e<=12319||12320===e||12336===e||64830===e||64831===e||e>=65093&&e<=65094}function Wt(e){e.forEach((function(e){if(delete e.location,Qe(e)||et(e))for(var t in e.options)delete e.options[t].location,Wt(e.options[t].value);else Ye(e)&&rt(e.style)||(Je(e)||qe(e))&&ot(e.style)?delete e.style.location:nt(e)&&Wt(e.children)}))}function Zt(e,t){void 0===t&&(t={}),t=he({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new kt(e,t).parse();if(n.err){var r=SyntaxError(Ve[n.err.kind]);
629
636
  // @ts-expect-error Assign to error object
630
637
  throw r.location=n.err.location,
631
638
  // @ts-expect-error Assign to error object
632
- r.originalMessage=n.err.message,r}return(null==t?void 0:t.captureLocation)||Vt(n.val),n.val}
639
+ r.originalMessage=n.err.message,r}return(null==t?void 0:t.captureLocation)||Wt(n.val),n.val}
633
640
 
634
641
  // Main
635
642
 
636
- function Wt(e,t){var n=t&&t.cache?t.cache:en,r=t&&t.serializer?t.serializer:Jt;return(t&&t.strategy?t.strategy:Yt)(e,{cache:n,serializer:r})}
643
+ function Xt(e,t){var n=t&&t.cache?t.cache:nn,r=t&&t.serializer?t.serializer:Qt;return(t&&t.strategy?t.strategy:qt)(e,{cache:n,serializer:r})}
637
644
 
638
645
  // Strategy
639
646
 
640
- function Zt(e,t,n,r){var o,i=null==(o=r)||"number"==typeof o||"boolean"==typeof o?r:n(r),s=t.get(i);return void 0===s&&(s=e.call(this,r),t.set(i,s)),s}function Xt(e,t,n){var r=Array.prototype.slice.call(arguments,3),o=n(r),i=t.get(o);return void 0===i&&(i=e.apply(this,r),t.set(o,i)),i}function zt(e,t,n,r,o){return n.bind(t,e,r,o)}function Yt(e,t){return zt(e,this,1===e.length?Zt:Xt,t.cache.create(),t.serializer)}
647
+ function zt(e,t,n,r){var o,i=null==(o=r)||"number"==typeof o||"boolean"==typeof o?r:n(r),s=t.get(i);return void 0===s&&(s=e.call(this,r),t.set(i,s)),s}function Yt(e,t,n){var r=Array.prototype.slice.call(arguments,3),o=n(r),i=t.get(o);return void 0===i&&(i=e.apply(this,r),t.set(o,i)),i}function Jt(e,t,n,r,o){return n.bind(t,e,r,o)}function qt(e,t){return Jt(e,this,1===e.length?zt:Yt,t.cache.create(),t.serializer)}
641
648
  // Serializer
642
- var Jt=function(){return JSON.stringify(arguments)};
649
+ var Qt=function(){return JSON.stringify(arguments)};
643
650
 
644
651
  // Cache
645
652
 
646
- function qt(){this.cache=Object.create(null)}qt.prototype.get=function(e){return this.cache[e]},qt.prototype.set=function(e,t){this.cache[e]=t};var Qt,en={create:function(){
653
+ function en(){this.cache=Object.create(null)}en.prototype.get=function(e){return this.cache[e]},en.prototype.set=function(e,t){this.cache[e]=t};var tn,nn={create:function(){
647
654
  // @ts-ignore
648
- return new qt}},tn={variadic:function(e,t){return zt(e,this,Xt,t.cache.create(),t.serializer)},monadic:function(e,t){return zt(e,this,Zt,t.cache.create(),t.serializer)}};!function(e){
655
+ return new en}},rn={variadic:function(e,t){return Jt(e,this,Yt,t.cache.create(),t.serializer)},monadic:function(e,t){return Jt(e,this,zt,t.cache.create(),t.serializer)}};!function(e){
649
656
  // When we have a placeholder but no value to format
650
657
  e.MISSING_VALUE="MISSING_VALUE",
651
658
  // When value supplied is invalid
652
659
  e.INVALID_VALUE="INVALID_VALUE",
653
660
  // When we need specific Intl API but it's not available
654
- e.MISSING_INTL_API="MISSING_INTL_API"}(Qt||(Qt={}));var nn,rn=/** @class */function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.code=n,o.originalMessage=r,o}return ie(t,e),t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),on=/** @class */function(e){function t(t,n,r,o){return e.call(this,'Invalid values for "'.concat(t,'": "').concat(n,'". Options are "').concat(Object.keys(r).join('", "'),'"'),Qt.INVALID_VALUE,o)||this}return ie(t,e),t}(rn),sn=/** @class */function(e){function t(t,n,r){return e.call(this,'Value for "'.concat(t,'" must be of type ').concat(n),Qt.INVALID_VALUE,r)||this}return ie(t,e),t}(rn),an=/** @class */function(e){function t(t,n){return e.call(this,'The intl string context variable "'.concat(t,'" was not provided to the string "').concat(n,'"'),Qt.MISSING_VALUE,n)||this}return ie(t,e),t}(rn);function ln(e){return"function"==typeof e}
661
+ e.MISSING_INTL_API="MISSING_INTL_API"}(tn||(tn={}));var on,sn=/** @class */function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.code=n,o.originalMessage=r,o}return se(t,e),t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),an=/** @class */function(e){function t(t,n,r,o){return e.call(this,'Invalid values for "'.concat(t,'": "').concat(n,'". Options are "').concat(Object.keys(r).join('", "'),'"'),tn.INVALID_VALUE,o)||this}return se(t,e),t}(sn),ln=/** @class */function(e){function t(t,n,r){return e.call(this,'Value for "'.concat(t,'" must be of type ').concat(n),tn.INVALID_VALUE,r)||this}return se(t,e),t}(sn),cn=/** @class */function(e){function t(t,n){return e.call(this,'The intl string context variable "'.concat(t,'" was not provided to the string "').concat(n,'"'),tn.MISSING_VALUE,n)||this}return se(t,e),t}(sn);function un(e){return"function"==typeof e}
655
662
  // TODO(skeleton): add skeleton support
656
- function cn(e,t,n,r,o,i,
663
+ function hn(e,t,n,r,o,i,
657
664
  // For debugging
658
665
  s){
659
666
  // Hot path for straight simple msg translations
660
- if(1===e.length&&We(e[0]))return[{type:nn.literal,value:e[0].value}];for(var a=[],l=0,c=e;l<c.length;l++){var u=c[l];
667
+ if(1===e.length&&Xe(e[0]))return[{type:on.literal,value:e[0].value}];for(var a=[],l=0,c=e;l<c.length;l++){var u=c[l];
661
668
  // Exit early for string parts.
662
- if(We(u))a.push({type:nn.literal,value:u.value});else
669
+ if(Xe(u))a.push({type:on.literal,value:u.value});else
663
670
  // TODO: should this part be literal type?
664
671
  // Replace `#` in plural rules with the actual numeric value.
665
- if(Qe(u))"number"==typeof i&&a.push({type:nn.literal,value:n.getNumberFormat(t).format(i)});else{var h=u.value;
672
+ if(tt(u))"number"==typeof i&&a.push({type:on.literal,value:n.getNumberFormat(t).format(i)});else{var h=u.value;
666
673
  // Enforce that all required values are provided by the caller.
667
- if(!o||!(h in o))throw new an(h,s);var f=o[h];if(Ze(u))f&&"string"!=typeof f&&"number"!=typeof f||(f="string"==typeof f||"number"==typeof f?String(f):""),a.push({type:"string"==typeof f?nn.literal:nn.object,value:f});else
674
+ if(!o||!(h in o))throw new cn(h,s);var f=o[h];if(ze(u))f&&"string"!=typeof f&&"number"!=typeof f||(f="string"==typeof f||"number"==typeof f?String(f):""),a.push({type:"string"==typeof f?on.literal:on.object,value:f});else
668
675
  // Recursively format plural and select parts' option — which can be a
669
676
  // nested pattern structure. The choosing of the option to use is
670
677
  // abstracted-by and delegated-to the part helper object.
671
- if(ze(u)){var p="string"==typeof u.style?r.date[u.style]:nt(u.style)?u.style.parsedOptions:void 0;a.push({type:nn.literal,value:n.getDateTimeFormat(t,p).format(f)})}else if(Ye(u)){p="string"==typeof u.style?r.time[u.style]:nt(u.style)?u.style.parsedOptions:r.time.medium;a.push({type:nn.literal,value:n.getDateTimeFormat(t,p).format(f)})}else if(Xe(u)){(p="string"==typeof u.style?r.number[u.style]:tt(u.style)?u.style.parsedOptions:void 0)&&p.scale&&(f*=p.scale||1),a.push({type:nn.literal,value:n.getNumberFormat(t,p).format(f)})}else{if(et(u)){var d=u.children,g=u.value,m=o[g];if(!ln(m))throw new sn(g,"function",s);var b=m(cn(d,t,n,r,o,i).map((function(e){return e.value})));Array.isArray(b)||(b=[b]),a.push.apply(a,b.map((function(e){return{type:"string"==typeof e?nn.literal:nn.object,value:e}})))}if(Je(u)){if(!(y=u.options[f]||u.options.other))throw new on(u.value,f,Object.keys(u.options),s);a.push.apply(a,cn(y.value,t,n,r,o))}else if(qe(u)){var y;if(!(y=u.options["=".concat(f)])){if(!Intl.PluralRules)throw new rn('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',Qt.MISSING_INTL_API,s);var v=n.getPluralRules(t,{type:u.pluralType}).select(f-(u.offset||0));y=u.options[v]||u.options.other}if(!y)throw new on(u.value,f,Object.keys(u.options),s);a.push.apply(a,cn(y.value,t,n,r,o,f-(u.offset||0)))}else;}}}return function(e){return e.length<2?e:e.reduce((function(e,t){var n=e[e.length-1];return n&&n.type===nn.literal&&t.type===nn.literal?n.value+=t.value:e.push(t),e}),[])}(a)}
678
+ if(Je(u)){var p="string"==typeof u.style?r.date[u.style]:ot(u.style)?u.style.parsedOptions:void 0;a.push({type:on.literal,value:n.getDateTimeFormat(t,p).format(f)})}else if(qe(u)){p="string"==typeof u.style?r.time[u.style]:ot(u.style)?u.style.parsedOptions:r.time.medium;a.push({type:on.literal,value:n.getDateTimeFormat(t,p).format(f)})}else if(Ye(u)){(p="string"==typeof u.style?r.number[u.style]:rt(u.style)?u.style.parsedOptions:void 0)&&p.scale&&(f*=p.scale||1),a.push({type:on.literal,value:n.getNumberFormat(t,p).format(f)})}else{if(nt(u)){var d=u.children,g=u.value,m=o[g];if(!un(m))throw new ln(g,"function",s);var b=m(hn(d,t,n,r,o,i).map((function(e){return e.value})));Array.isArray(b)||(b=[b]),a.push.apply(a,b.map((function(e){return{type:"string"==typeof e?on.literal:on.object,value:e}})))}if(Qe(u)){if(!(y=u.options[f]||u.options.other))throw new an(u.value,f,Object.keys(u.options),s);a.push.apply(a,hn(y.value,t,n,r,o))}else if(et(u)){var y;if(!(y=u.options["=".concat(f)])){if(!Intl.PluralRules)throw new sn('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',tn.MISSING_INTL_API,s);var v=n.getPluralRules(t,{type:u.pluralType}).select(f-(u.offset||0));y=u.options[v]||u.options.other}if(!y)throw new an(u.value,f,Object.keys(u.options),s);a.push.apply(a,hn(y.value,t,n,r,o,f-(u.offset||0)))}else;}}}return function(e){return e.length<2?e:e.reduce((function(e,t){var n=e[e.length-1];return n&&n.type===on.literal&&t.type===on.literal?n.value+=t.value:e.push(t),e}),[])}(a)}
672
679
  /*
673
680
  Copyright (c) 2014, Yahoo! Inc. All rights reserved.
674
681
  Copyrights licensed under the New BSD License.
675
682
  See the accompanying LICENSE file for terms.
676
683
  */
677
684
  // -- MessageFormat --------------------------------------------------------
678
- function un(e,t){return t?Object.keys(e).reduce((function(n,r){var o,i;return n[r]=(o=e[r],(i=t[r])?ue(ue(ue({},o||{}),i||{}),Object.keys(o).reduce((function(e,t){return e[t]=ue(ue({},o[t]),i[t]||{}),e}),{})):o),n}),ue({},e)):e}function hn(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}!function(e){e[e.literal=0]="literal",e[e.object=1]="object"}(nn||(nn={}));var fn=/** @class */function(){function e(t,n,r,o){var i,s=this;if(void 0===n&&(n=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(e){var t=s.formatToParts(e);
685
+ function fn(e,t){return t?Object.keys(e).reduce((function(n,r){var o,i;return n[r]=(o=e[r],(i=t[r])?he(he(he({},o||{}),i||{}),Object.keys(o).reduce((function(e,t){return e[t]=he(he({},o[t]),i[t]||{}),e}),{})):o),n}),he({},e)):e}function pn(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}!function(e){e[e.literal=0]="literal",e[e.object=1]="object"}(on||(on={}));var dn=/** @class */function(){function e(t,n,r,o){var i,s=this;if(void 0===n&&(n=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(e){var t=s.formatToParts(e);
679
686
  // Hot path for straight simple msg translations
680
- if(1===t.length)return t[0].value;var n=t.reduce((function(e,t){return e.length&&t.type===nn.literal&&"string"==typeof e[e.length-1]?e[e.length-1]+=t.value:e.push(t.value),e}),[]);return n.length<=1?n[0]||"":n},this.formatToParts=function(e){return cn(s.ast,s.locales,s.formatters,s.formats,e,void 0,s.message)},this.resolvedOptions=function(){return{locale:s.resolvedLocale.toString()}},this.getAst=function(){return s.ast},
687
+ if(1===t.length)return t[0].value;var n=t.reduce((function(e,t){return e.length&&t.type===on.literal&&"string"==typeof e[e.length-1]?e[e.length-1]+=t.value:e.push(t.value),e}),[]);return n.length<=1?n[0]||"":n},this.formatToParts=function(e){return hn(s.ast,s.locales,s.formatters,s.formats,e,void 0,s.message)},this.resolvedOptions=function(){return{locale:s.resolvedLocale.toString()}},this.getAst=function(){return s.ast},
681
688
  // Defined first because it's used to build the format pattern.
682
689
  this.locales=n,this.resolvedLocale=e.resolveLocale(n),"string"==typeof t){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
683
690
  // Parse string messages into an AST.
684
691
  this.ast=e.__parse(t,{ignoreTag:null==o?void 0:o.ignoreTag,locale:this.resolvedLocale})}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");
685
692
  // Creates a new object with the specified `formats` merged with the default
686
693
  // formats.
687
- this.formats=un(e.formats,r),this.formatters=o&&o.formatters||(void 0===(i=this.formatterCache)&&(i={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Wt((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.NumberFormat).bind.apply(e,fe([void 0],t,!1)))}),{cache:hn(i.number),strategy:tn.variadic}),getDateTimeFormat:Wt((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.DateTimeFormat).bind.apply(e,fe([void 0],t,!1)))}),{cache:hn(i.dateTime),strategy:tn.variadic}),getPluralRules:Wt((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.PluralRules).bind.apply(e,fe([void 0],t,!1)))}),{cache:hn(i.pluralRules),strategy:tn.variadic})})}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=(new Intl.NumberFormat).resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(e){var t=Intl.NumberFormat.supportedLocalesOf(e);return t.length>0?new Intl.Locale(t[0]):new Intl.Locale("string"==typeof e?e:e[0])},e.__parse=Kt,
694
+ this.formats=fn(e.formats,r),this.formatters=o&&o.formatters||(void 0===(i=this.formatterCache)&&(i={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Xt((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.NumberFormat).bind.apply(e,pe([void 0],t,!1)))}),{cache:pn(i.number),strategy:rn.variadic}),getDateTimeFormat:Xt((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.DateTimeFormat).bind.apply(e,pe([void 0],t,!1)))}),{cache:pn(i.dateTime),strategy:rn.variadic}),getPluralRules:Xt((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.PluralRules).bind.apply(e,pe([void 0],t,!1)))}),{cache:pn(i.pluralRules),strategy:rn.variadic})})}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=(new Intl.NumberFormat).resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(e){var t=Intl.NumberFormat.supportedLocalesOf(e);return t.length>0?new Intl.Locale(t[0]):new Intl.Locale("string"==typeof e?e:e[0])},e.__parse=Zt,
688
695
  // Default format options used as the prototype of the `formats` provided to the
689
696
  // constructor. These are used when constructing the internal Intl.NumberFormat
690
697
  // and Intl.DateTimeFormat instances.
691
- e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}(),pn=fn;
698
+ e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}(),gn=dn;
692
699
  /*
693
700
  Copyright (c) 2014, Yahoo! Inc. All rights reserved.
694
701
  Copyrights licensed under the New BSD License.
695
702
  See the accompanying LICENSE file for terms.
696
- */const dn={},gn=(e,t,n)=>n?(t in dn||(dn[t]={}),e in dn[t]||(dn[t][e]=n),n):n,mn=(e,t)=>{if(null==t)return;if(t in dn&&e in dn[t])return dn[t][e];const n=On(t);for(let r=0;r<n.length;r++){const o=En(n[r],e);if(o)return gn(e,t,o)}};let bn;const yn=Ie({});function vn(e){return e in bn}function En(e,t){if(!vn(e))return null;const n=function(e){return bn[e]||null}(e);return function(e,t){if(null==t)return;if(t in e)return e[t];const n=t.split(".");let r=e;for(let e=0;e<n.length;e++)if("object"==typeof r){if(e>0){const t=n.slice(e,n.length).join(".");if(t in r){r=r[t];break}}r=r[n[e]]}else r=void 0;return r}(n,t)}function Tn(e,...t){delete dn[e],yn.update((n=>(n[e]=Ke.all([n[e]||{},...t]),n)))}Oe([yn],(([e])=>Object.keys(e))),yn.subscribe((e=>bn=e));const wn={};function Bn(e){return wn[e]}function Cn(e){return null!=e&&On(e).some((e=>{var t;return null===(t=Bn(e))||void 0===t?void 0:t.size}))}const An={};function Sn(e){if(!Cn(e))return e in An?An[e]:Promise.resolve();const t=function(e){return On(e).map((e=>{const t=Bn(e);return[e,t?[...t]:[]]})).filter((([,e])=>e.length>0))}(e);return An[e]=Promise.all(t.map((([e,t])=>function(e,t){const n=Promise.all(t.map((t=>(function(e,t){wn[e].delete(t),0===wn[e].size&&delete wn[e]}(e,t),t().then((e=>e.default||e))))));return n.then((t=>Tn(e,...t)))}(e,t)))).then((()=>{if(Cn(e))return Sn(e);delete An[e]})),An[e]}const _n={fallbackLocale:null,loadingDelay:200,formats:{number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0};function Hn(){return _n}const Ln=Ie(!1);let Pn;const Rn=Ie(null);function In(e){return e.split("-").map(((e,t,n)=>n.slice(0,t+1).join("-"))).reverse()}function On(e,t=Hn().fallbackLocale){const n=In(e);return t?[...new Set([...n,...In(t)])]:n}function Nn(){return null!=Pn?Pn:void 0}Rn.subscribe((e=>{Pn=null!=e?e:void 0,"undefined"!=typeof window&&null!=e&&document.documentElement.setAttribute("lang",e)}));const $n={...Rn,set:e=>{if(e&&function(e){if(null==e)return;const t=On(e);for(let e=0;e<t.length;e++){const n=t[e];if(vn(n))return n}}(e)&&Cn(e)){const{loadingDelay:t}=Hn();let n;return"undefined"!=typeof window&&null!=Nn()&&t?n=window.setTimeout((()=>Ln.set(!0)),t):Ln.set(!0),Sn(e).then((()=>{Rn.set(e)})).finally((()=>{clearTimeout(n),Ln.set(!1)}))}return Rn.set(e)}},xn=e=>{const t=Object.create(null);return n=>{const r=JSON.stringify(n);return r in t?t[r]:t[r]=e(n)}},Mn=(e,t)=>{const{formats:n}=Hn();if(e in n&&t in n[e])return n[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},Dn=xn((({locale:e,format:t,...n})=>{if(null==e)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return t&&(n=Mn("number",t)),new Intl.NumberFormat(e,n)})),Un=xn((({locale:e,format:t,...n})=>{if(null==e)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return t?n=Mn("date",t):0===Object.keys(n).length&&(n=Mn("date","short")),new Intl.DateTimeFormat(e,n)})),Gn=xn((({locale:e,format:t,...n})=>{if(null==e)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return t?n=Mn("time",t):0===Object.keys(n).length&&(n=Mn("time","short")),new Intl.DateTimeFormat(e,n)})),kn=xn(((e,t=Nn())=>new pn(e,t,Hn().formats,{ignoreTag:Hn().ignoreTag}))),Fn=(e,t={})=>{var n,r,o,i;let s=t;"object"==typeof e&&(s=e,e=s.id);const{values:a,locale:l=Nn(),default:c}=s;if(null==l)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let u=mn(e,l);if(u){if("string"!=typeof u)return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof u}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),u}else u=null!==(i=null!==(o=null===(r=(n=Hn()).handleMissingMessage)||void 0===r?void 0:r.call(n,{locale:l,id:e,defaultValue:c}))&&void 0!==o?o:c)&&void 0!==i?i:e;if(!a)return u;let h=u;try{h=kn(u,l).format(a)}catch(t){t instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,t.message)}return h},jn=(e,t)=>(({locale:e=Nn(),...t}={})=>Gn({locale:e,...t}))(t).format(e),Vn=(e,t)=>(({locale:e=Nn(),...t}={})=>Un({locale:e,...t}))(t).format(e),Kn=(e,t)=>(({locale:e=Nn(),...t}={})=>Dn({locale:e,...t}))(t).format(e),Wn=(e,t=Nn())=>mn(e,t),Zn=Oe([$n,yn],(()=>Fn));Oe([$n],(()=>jn)),Oe([$n],(()=>Vn)),Oe([$n],(()=>Kn)),Oe([$n,yn],(()=>Wn));const Xn=e=>{(({withLocale:e,translations:t})=>{$n.subscribe((n=>{null==n&&(yn.set(t),$n.set(e))}));// maybe we will need this to make sure that the i18n is set up only once
703
+ */const mn={},bn=(e,t,n)=>n?(t in mn||(mn[t]={}),e in mn[t]||(mn[t][e]=n),n):n,yn=(e,t)=>{if(null==t)return;if(t in mn&&e in mn[t])return mn[t][e];const n=$n(t);for(let r=0;r<n.length;r++){const o=wn(n[r],e);if(o)return bn(e,t,o)}};let vn;const En=Ie({});function Tn(e){return e in vn}function wn(e,t){if(!Tn(e))return null;const n=function(e){return vn[e]||null}(e);return function(e,t){if(null==t)return;if(t in e)return e[t];const n=t.split(".");let r=e;for(let e=0;e<n.length;e++)if("object"==typeof r){if(e>0){const t=n.slice(e,n.length).join(".");if(t in r){r=r[t];break}}r=r[n[e]]}else r=void 0;return r}(n,t)}function Bn(e,...t){delete mn[e],En.update((n=>(n[e]=Ze.all([n[e]||{},...t]),n)))}$e([En],(([e])=>Object.keys(e))),En.subscribe((e=>vn=e));const Cn={};function An(e){return Cn[e]}function Sn(e){return null!=e&&$n(e).some((e=>{var t;return null===(t=An(e))||void 0===t?void 0:t.size}))}const _n={};function Hn(e){if(!Sn(e))return e in _n?_n[e]:Promise.resolve();const t=function(e){return $n(e).map((e=>{const t=An(e);return[e,t?[...t]:[]]})).filter((([,e])=>e.length>0))}(e);return _n[e]=Promise.all(t.map((([e,t])=>function(e,t){const n=Promise.all(t.map((t=>(function(e,t){Cn[e].delete(t),0===Cn[e].size&&delete Cn[e]}(e,t),t().then((e=>e.default||e))))));return n.then((t=>Bn(e,...t)))}(e,t)))).then((()=>{if(Sn(e))return Hn(e);delete _n[e]})),_n[e]}const Ln={fallbackLocale:null,loadingDelay:200,formats:{number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0};function Pn(){return Ln}const Rn=Ie(!1);let On;const Nn=Ie(null);function In(e){return e.split("-").map(((e,t,n)=>n.slice(0,t+1).join("-"))).reverse()}function $n(e,t=Pn().fallbackLocale){const n=In(e);return t?[...new Set([...n,...In(t)])]:n}function xn(){return null!=On?On:void 0}Nn.subscribe((e=>{On=null!=e?e:void 0,"undefined"!=typeof window&&null!=e&&document.documentElement.setAttribute("lang",e)}));const Mn={...Nn,set:e=>{if(e&&function(e){if(null==e)return;const t=$n(e);for(let e=0;e<t.length;e++){const n=t[e];if(Tn(n))return n}}(e)&&Sn(e)){const{loadingDelay:t}=Pn();let n;return"undefined"!=typeof window&&null!=xn()&&t?n=window.setTimeout((()=>Rn.set(!0)),t):Rn.set(!0),Hn(e).then((()=>{Nn.set(e)})).finally((()=>{clearTimeout(n),Rn.set(!1)}))}return Nn.set(e)}},Dn=e=>{const t=Object.create(null);return n=>{const r=JSON.stringify(n);return r in t?t[r]:t[r]=e(n)}},Un=(e,t)=>{const{formats:n}=Pn();if(e in n&&t in n[e])return n[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},Gn=Dn((({locale:e,format:t,...n})=>{if(null==e)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return t&&(n=Un("number",t)),new Intl.NumberFormat(e,n)})),kn=Dn((({locale:e,format:t,...n})=>{if(null==e)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return t?n=Un("date",t):0===Object.keys(n).length&&(n=Un("date","short")),new Intl.DateTimeFormat(e,n)})),Fn=Dn((({locale:e,format:t,...n})=>{if(null==e)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return t?n=Un("time",t):0===Object.keys(n).length&&(n=Un("time","short")),new Intl.DateTimeFormat(e,n)})),jn=Dn(((e,t=xn())=>new gn(e,t,Pn().formats,{ignoreTag:Pn().ignoreTag}))),Vn=(e,t={})=>{var n,r,o,i;let s=t;"object"==typeof e&&(s=e,e=s.id);const{values:a,locale:l=xn(),default:c}=s;if(null==l)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let u=yn(e,l);if(u){if("string"!=typeof u)return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof u}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),u}else u=null!==(i=null!==(o=null===(r=(n=Pn()).handleMissingMessage)||void 0===r?void 0:r.call(n,{locale:l,id:e,defaultValue:c}))&&void 0!==o?o:c)&&void 0!==i?i:e;if(!a)return u;let h=u;try{h=jn(u,l).format(a)}catch(t){t instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,t.message)}return h},Kn=(e,t)=>(({locale:e=xn(),...t}={})=>Fn({locale:e,...t}))(t).format(e),Wn=(e,t)=>(({locale:e=xn(),...t}={})=>kn({locale:e,...t}))(t).format(e),Zn=(e,t)=>(({locale:e=xn(),...t}={})=>Gn({locale:e,...t}))(t).format(e),Xn=(e,t=xn())=>yn(e,t),zn=$e([Mn,En],(()=>Vn));$e([Mn],(()=>Kn)),$e([Mn],(()=>Wn)),$e([Mn],(()=>Zn)),$e([Mn,En],(()=>Xn));const Yn=e=>{(({withLocale:e,translations:t})=>{Mn.subscribe((n=>{null==n&&(En.set(t),Mn.set(e))}));// maybe we will need this to make sure that the i18n is set up only once
697
704
  /*dictionary.set(translations);
698
- locale.set(_locale);*/})({withLocale:"en",translations:{}}),Object.keys(e).forEach((t=>{var n,r;n=t,r=e[t],Tn(n,r)}))};var zn,Yn;!function(e){e.level="level",e.current="current",e.next="next",e.first="first",e.last="last",e.previous="previous",e.startChallenge="startChallenge"}(zn||(zn={})),function(e){e.level="wageringBonuses.level",e.current="wageringBonuses.current",e.next="wageringBonuses.next",e.first="wageringBonuses.first",e.last="wageringBonuses.last",e.previous="wageringBonuses.previous",e.startChallenge="wageringBonuses.startChallenge"}(Yn||(Yn={}));const Jn={en:{wageringBonuses:{level:"Level",current:"Current",next:"Next",first:"First",last:"Last",previous:"Previous",startChallenge:"START CHALLENGE"}},"zh-hk":{wageringBonuses:{level:"等級",current:"当前",next:"下一個",first:"第一個",last:"最後一個",previous:"上一個",startChallenge:"開始挑戰"}}};
699
- /* ../casino-wagering-bonus/src/CasinoWageringBonus.svelte generated by Svelte v3.58.0 */function qn(e,t,n){const r=e.slice();return r[22]=t[n],r[24]=n,r}function Qn(e,t,n){const r=e.slice();return r[25]=t[n],r[27]=n,r}function er(e,t,n){const r=e.slice();return r[28]=t[n],r}function tr(e,t,n){const r=e.slice();return r[31]=t[n],r}function nr(e,t,n){const r=e.slice();return r[34]=t[n],r}
705
+ locale.set(_locale);*/})({withLocale:"en",translations:{}}),Object.keys(e).forEach((t=>{var n,r;n=t,r=e[t],Bn(n,r)}))};var Jn,qn;!function(e){e.level="level",e.current="current",e.next="next",e.first="first",e.last="last",e.previous="previous",e.startChallenge="startChallenge"}(Jn||(Jn={})),function(e){e.level="wageringBonuses.level",e.current="wageringBonuses.current",e.next="wageringBonuses.next",e.first="wageringBonuses.first",e.last="wageringBonuses.last",e.previous="wageringBonuses.previous",e.startChallenge="wageringBonuses.startChallenge"}(qn||(qn={}));const Qn={en:{wageringBonuses:{level:"Level",current:"Current",next:"Next",first:"First",last:"Last",previous:"Previous",startChallenge:"START CHALLENGE"}},"zh-hk":{wageringBonuses:{level:"等級",current:"当前",next:"下一個",first:"第一個",last:"最後一個",previous:"上一個",startChallenge:"開始挑戰"}}};
706
+ /* ../casino-wagering-bonus/src/CasinoWageringBonus.svelte generated by Svelte v3.59.2 */function er(e,t,n){const r=e.slice();return r[22]=t[n],r[24]=n,r}function tr(e,t,n){const r=e.slice();return r[25]=t[n],r[27]=n,r}function nr(e,t,n){const r=e.slice();return r[28]=t[n],r}function rr(e,t,n){const r=e.slice();return r[31]=t[n],r}function or(e,t,n){const r=e.slice();return r[34]=t[n],r}
700
707
  // (88:0) {#if bonus && isShowingBonus}
701
- function rr(e){let n,r,o,i,s,a,l,c,u,m,v,E,T,B,C,A,_,H,L,P,R,I,O,N=/*bonus*/(e[1].name||/*bonus*/e[1].presentation?.name.content)+"",$=[ne("BonusInfoTitle","title")],x={};for(let e=0;e<$.length;e+=1)x=t(x,$[e]);let M=/*status*/e[0]===se.active&&or(e),D=[ne("BonusInfoWrapper","layout-horizental space-between")],U={};for(let e=0;e<D.length;e+=1)U=t(U,D[e]);let G=/*status*/e[0]===se.claimable&&ir(e),k=/*status*/e[0]!==se.claimable&&sr(e),F=[ne("BonusInfo")],j={};for(let e=0;e<F.length;e+=1)j=t(j,F[e]);let V=[ne("RewardsTopBarTitle","title")],K={};for(let e=0;e<V.length;e+=1)K=t(K,V[e]);let W=/*status*/e[0]!==se.claimable&&cr(e),Z=[ne("RewardsTopBar","layout-horizental space-between")],X={};for(let e=0;e<Z.length;e+=1)X=t(X,Z[e]);let z=/*status*/e[0]!==se.claimable&&ur(e),Y=/*status*/e[0]===se.claimable&&pr(e),J=[ne("BonusRewardsLevels")],q={};for(let e=0;e<J.length;e+=1)q=t(q,J[e]);let Q=[ne("SupportsTitle","title")],ee={};for(let e=0;e<Q.length;e+=1)ee=t(ee,Q[e]);let te=Object.keys(/*bonus*/e[1].extension?.bonus.wallet||/*bonus*/e[1].wallet).filter(vr),re=[];for(let t=0;t<te.length;t+=1)re[t]=mr(qn(e,te,t));let oe=[ne("SupportsList")],ie={};for(let e=0;e<oe.length;e+=1)ie=t(ie,oe[e]);let ae=[ne("SupportsWrapper")],le={};for(let e=0;e<ae.length;e+=1)le=t(le,ae[e]);let ce=[ne("BonusRewards")],ue={};for(let e=0;e<ce.length;e+=1)ue=t(ue,ce[e]);let he=[ne("Root","layout-horizental")],fe={};for(let e=0;e<he.length;e+=1)fe=t(fe,he[e]);return{c(){n=g("section"),r=g("div"),o=g("section"),i=g("section"),s=b(N),a=y(),M&&M.c(),l=y(),G&&G.c(),c=y(),k&&k.c(),u=y(),m=g("div"),v=g("section"),E=g("div"),T=b("Rewards"),B=y(),W&&W.c(),C=y(),A=g("div"),z&&z.c(),_=y(),Y&&Y.c(),H=y(),L=g("div"),P=g("div"),R=b("Include bets"),I=y(),O=g("div");for(let e=0;e<re.length;e+=1)re[e].c();w(i,x),w(o,U),w(r,j),w(E,K),w(v,X),w(A,q),w(P,ee),w(O,ie),w(L,le),w(m,ue),w(n,fe)},m(e,t){f(e,n,t),h(n,r),h(r,o),h(o,i),h(i,s),h(o,a),M&&M.m(o,null),h(r,l),G&&G.m(r,null),h(r,c),k&&k.m(r,null),h(n,u),h(n,m),h(m,v),h(v,E),h(E,T),h(v,B),W&&W.m(v,null),h(m,C),h(m,A),z&&z.m(A,null),h(A,_),Y&&Y.m(A,null),h(m,H),h(m,L),h(L,P),h(P,R),h(L,I),h(L,O);for(let e=0;e<re.length;e+=1)re[e]&&re[e].m(O,null)},p(e,t){if(/*bonus*/2&t[0]&&N!==(N=/*bonus*/(e[1].name||/*bonus*/e[1].presentation?.name.content)+"")&&S(s,N,x.contenteditable),/*status*/e[0]===se.active?M?M.p(e,t):(M=or(e),M.c(),M.m(o,null)):M&&(M.d(1),M=null),/*status*/e[0]===se.claimable?G?G.p(e,t):(G=ir(e),G.c(),G.m(r,c)):G&&(G.d(1),G=null),/*status*/e[0]!==se.claimable?k?k.p(e,t):(k=sr(e),k.c(),k.m(r,null)):k&&(k.d(1),k=null),/*status*/e[0]!==se.claimable?W?W.p(e,t):(W=cr(e),W.c(),W.m(v,null)):W&&(W.d(1),W=null),/*status*/e[0]!==se.claimable?z?z.p(e,t):(z=ur(e),z.c(),z.m(A,_)):z&&(z.d(1),z=null),/*status*/e[0]===se.claimable?Y?Y.p(e,t):(Y=pr(e),Y.c(),Y.m(A,null)):Y&&(Y.d(1),Y=null),/*bonus*/2&t[0]){let n;for(te=Object.keys(/*bonus*/e[1].extension?.bonus.wallet||/*bonus*/e[1].wallet).filter(vr),n=0;n<te.length;n+=1){const r=qn(e,te,n);re[n]?re[n].p(r,t):(re[n]=mr(r),re[n].c(),re[n].m(O,null))}for(;n<re.length;n+=1)re[n].d(1);re.length=te.length}},d(e){e&&p(n),M&&M.d(),G&&G.d(),k&&k.d(),W&&W.d(),z&&z.d(),Y&&Y.d(),d(re,e)}}}
708
+ function ir(e){let n,r,o,i,s,a,l,c,u,m,v,E,T,w,C,A,S,H,L,P,R,O,N,I=/*bonus*/(e[1].name||/*bonus*/e[1].presentation?.name.content)+"",$=[re("BonusInfoTitle","title")],x={};for(let e=0;e<$.length;e+=1)x=t(x,$[e]);let M=/*status*/e[0]===ae.active&&sr(e),D=[re("BonusInfoWrapper","layout-horizental space-between")],U={};for(let e=0;e<D.length;e+=1)U=t(U,D[e]);let G=/*status*/e[0]===ae.claimable&&ar(e),k=/*status*/e[0]!==ae.claimable&&lr(e),F=[re("BonusInfo")],j={};for(let e=0;e<F.length;e+=1)j=t(j,F[e]);let V=[re("RewardsTopBarTitle","title")],K={};for(let e=0;e<V.length;e+=1)K=t(K,V[e]);let W=/*status*/e[0]!==ae.claimable&&hr(e),Z=[re("RewardsTopBar","layout-horizental space-between")],X={};for(let e=0;e<Z.length;e+=1)X=t(X,Z[e]);let z=/*status*/e[0]!==ae.claimable&&fr(e),Y=/*status*/e[0]===ae.claimable&&gr(e),J=[re("BonusRewardsLevels")],q={};for(let e=0;e<J.length;e+=1)q=t(q,J[e]);let Q=[re("SupportsTitle","title")],ee={};for(let e=0;e<Q.length;e+=1)ee=t(ee,Q[e]);let te=Object.keys(/*bonus*/e[1].extension?.bonus.wallet||/*bonus*/e[1].wallet).filter(Tr),ne=[];for(let t=0;t<te.length;t+=1)ne[t]=yr(er(e,te,t));let oe=[re("SupportsList")],ie={};for(let e=0;e<oe.length;e+=1)ie=t(ie,oe[e]);let se=[re("SupportsWrapper")],le={};for(let e=0;e<se.length;e+=1)le=t(le,se[e]);let ce=[re("BonusRewards")],ue={};for(let e=0;e<ce.length;e+=1)ue=t(ue,ce[e]);let he=[re("Root","layout-horizental")],fe={};for(let e=0;e<he.length;e+=1)fe=t(fe,he[e]);return{c(){n=g("section"),r=g("div"),o=g("section"),i=g("section"),s=b(I),a=y(),M&&M.c(),l=y(),G&&G.c(),c=y(),k&&k.c(),u=y(),m=g("div"),v=g("section"),E=g("div"),T=b("Rewards"),w=y(),W&&W.c(),C=y(),A=g("div"),z&&z.c(),S=y(),Y&&Y.c(),H=y(),L=g("div"),P=g("div"),R=b("Include bets"),O=y(),N=g("div");for(let e=0;e<ne.length;e+=1)ne[e].c();B(i,x),B(o,U),B(r,j),B(E,K),B(v,X),B(A,q),B(P,ee),B(N,ie),B(L,le),B(m,ue),B(n,fe)},m(e,t){f(e,n,t),h(n,r),h(r,o),h(o,i),h(i,s),h(o,a),M&&M.m(o,null),h(r,l),G&&G.m(r,null),h(r,c),k&&k.m(r,null),h(n,u),h(n,m),h(m,v),h(v,E),h(E,T),h(v,w),W&&W.m(v,null),h(m,C),h(m,A),z&&z.m(A,null),h(A,S),Y&&Y.m(A,null),h(m,H),h(m,L),h(L,P),h(P,R),h(L,O),h(L,N);for(let e=0;e<ne.length;e+=1)ne[e]&&ne[e].m(N,null)},p(e,t){if(/*bonus*/2&t[0]&&I!==(I=/*bonus*/(e[1].name||/*bonus*/e[1].presentation?.name.content)+"")&&_(s,I,x.contenteditable),/*status*/e[0]===ae.active?M?M.p(e,t):(M=sr(e),M.c(),M.m(o,null)):M&&(M.d(1),M=null),/*status*/e[0]===ae.claimable?G?G.p(e,t):(G=ar(e),G.c(),G.m(r,c)):G&&(G.d(1),G=null),/*status*/e[0]!==ae.claimable?k?k.p(e,t):(k=lr(e),k.c(),k.m(r,null)):k&&(k.d(1),k=null),/*status*/e[0]!==ae.claimable?W?W.p(e,t):(W=hr(e),W.c(),W.m(v,null)):W&&(W.d(1),W=null),/*status*/e[0]!==ae.claimable?z?z.p(e,t):(z=fr(e),z.c(),z.m(A,S)):z&&(z.d(1),z=null),/*status*/e[0]===ae.claimable?Y?Y.p(e,t):(Y=gr(e),Y.c(),Y.m(A,null)):Y&&(Y.d(1),Y=null),/*bonus*/2&t[0]){let n;for(te=Object.keys(/*bonus*/e[1].extension?.bonus.wallet||/*bonus*/e[1].wallet).filter(Tr),n=0;n<te.length;n+=1){const r=er(e,te,n);ne[n]?ne[n].p(r,t):(ne[n]=yr(r),ne[n].c(),ne[n].m(N,null))}for(;n<ne.length;n+=1)ne[n].d(1);ne.length=te.length}},d(e){e&&p(n),M&&M.d(),G&&G.d(),k&&k.d(),W&&W.d(),z&&z.d(),Y&&Y.d(),d(ne,e)}}}
702
709
  // (96:8) {#if status === BonusStatus.active}
703
- function or(e){let n,r,o,i,s,a,c=[ne("BonusInfoExpireDate")],u={};for(let e=0;e<c.length;e+=1)u=t(u,c[e]);let d=[ne("BonusInfoExpire")],m={};for(let e=0;e<d.length;e+=1)m=t(m,d[e]);return{c(){n=g("section"),r=g("img"),i=y(),s=g("span"),a=b(/*expiryTime*/e[6]),T(r,"class","icon"),l(r.src,o=J)||T(r,"src",o),T(r,"alt","expiryTime"),w(s,u),w(n,m)},m(e,t){f(e,n,t),h(n,r),h(n,i),h(n,s),h(s,a)},p(e,t){/*expiryTime*/64&t[0]&&S(a,/*expiryTime*/e[6],u.contenteditable)},d(e){e&&p(n)}}}
710
+ function sr(e){let n,r,o,i,s,a,c=[re("BonusInfoExpireDate")],u={};for(let e=0;e<c.length;e+=1)u=t(u,c[e]);let d=[re("BonusInfoExpire")],m={};for(let e=0;e<d.length;e+=1)m=t(m,d[e]);return{c(){n=g("section"),r=g("img"),i=y(),s=g("span"),a=b(/*expiryTime*/e[6]),T(r,"class","icon"),l(r.src,o=q)||T(r,"src",o),T(r,"alt","expiryTime"),B(s,u),B(n,m)},m(e,t){f(e,n,t),h(n,r),h(n,i),h(n,s),h(s,a)},p(e,t){/*expiryTime*/64&t[0]&&_(a,/*expiryTime*/e[6],u.contenteditable)},d(e){e&&p(n)}}}
704
711
  // (107:6) {#if status === BonusStatus.claimable}
705
- function ir(e){let n,r,o,i,s,a,c,u,d,m,v,B,C,_,H,L,P,R,I,O,N,$,x,M,D,U,G,k,F,j,V,K=/*bonus*/(e[1].description||"")+"",W=/*levels*/e[2].length+"",Z=/*$_*/e[10](Yn.startChallenge)+"",X=[ne("BonusInfoDescription")],z={};for(let e=0;e<X.length;e+=1)z=t(z,X[e]);let J=[ne("StatusClaimableInfoLevels")],Q={};for(let e=0;e<J.length;e+=1)Q=t(Q,J[e]);let ee=[ne("StatusClaimableInfoPeriod")],te={};for(let e=0;e<ee.length;e+=1)te=t(te,ee[e]);let re=[ne("StatusClaimableInfo")],oe={};for(let e=0;e<re.length;e+=1)oe=t(oe,re[e]);let ie=[ne("StatusClaimableCommandTerms","terms")],se={};for(let e=0;e<ie.length;e+=1)se=t(se,ie[e]);let ae=[ne("StatusClaimableCommand")],le={};for(let e=0;e<ae.length;e+=1)le=t(le,ae[e]);let ce=[ne("StatusClaimable","layout-horizental space-between")],ue={};for(let e=0;e<ce.length;e+=1)ue=t(ue,ce[e]);return{c(){n=g("div"),r=b(K),o=y(),i=g("hr"),s=y(),a=g("section"),c=g("div"),u=g("div"),d=g("img"),v=y(),B=b(W),C=b(" Levels"),_=y(),H=g("div"),L=g("img"),R=y(),I=b(/*endTime*/e[7]),O=y(),N=g("div"),$=g("button"),x=b(Z),D=y(),U=g("div"),G=g("a"),k=b("Terms and Conditions"),w(n,z),T(d,"class","icon"),l(d.src,m=q)||T(d,"src",m),T(d,"alt","Levels"),w(u,Q),T(L,"class","icon"),l(L.src,P=Y)||T(L,"src",P),T(L,"alt","EndTime"),w(H,te),w(c,oe),T($,"type","button"),$.disabled=M=!/*isButtonClickable*/e[8],T(G,"href",F=/*bonus*/e[1].presentation?.url?.content),T(G,"target","__blank"),w(U,se),w(N,le),w(a,ue)},m(t,l){f(t,n,l),h(n,r),f(t,o,l),f(t,i,l),f(t,s,l),f(t,a,l),h(a,c),h(c,u),h(u,d),h(u,v),h(u,B),h(u,C),h(c,_),h(c,H),h(H,L),h(H,R),h(H,I),h(a,O),h(a,N),h(N,$),h($,x),h(N,D),h(N,U),h(U,G),h(G,k),j||(V=E($,"click",/*eventStartChallenge*/e[11]),j=!0)},p(e,t){/*bonus*/2&t[0]&&K!==(K=/*bonus*/(e[1].description||"")+"")&&S(r,K,z.contenteditable),/*levels*/4&t[0]&&W!==(W=/*levels*/e[2].length+"")&&S(B,W,Q.contenteditable),/*endTime*/128&t[0]&&S(I,/*endTime*/e[7],te.contenteditable),/*$_*/1024&t[0]&&Z!==(Z=/*$_*/e[10](Yn.startChallenge)+"")&&A(x,Z),/*isButtonClickable*/256&t[0]&&M!==(M=!/*isButtonClickable*/e[8])&&($.disabled=M),/*bonus*/2&t[0]&&F!==(F=/*bonus*/e[1].presentation?.url?.content)&&T(G,"href",F)},d(e){e&&p(n),e&&p(o),e&&p(i),e&&p(s),e&&p(a),j=!1,V()}}}
712
+ function ar(e){let n,r,o,i,s,a,c,u,d,m,v,w,C,A,H,L,P,R,O,N,I,$,x,M,D,U,G,k,F,j,V,K=/*bonus*/(e[1].description||"")+"",W=/*levels*/e[2].length+"",Z=/*$_*/e[10](qn.startChallenge)+"",X=[re("BonusInfoDescription")],z={};for(let e=0;e<X.length;e+=1)z=t(z,X[e]);let Y=[re("StatusClaimableInfoLevels")],q={};for(let e=0;e<Y.length;e+=1)q=t(q,Y[e]);let ee=[re("StatusClaimableInfoPeriod")],te={};for(let e=0;e<ee.length;e+=1)te=t(te,ee[e]);let ne=[re("StatusClaimableInfo")],oe={};for(let e=0;e<ne.length;e+=1)oe=t(oe,ne[e]);let ie=[re("StatusClaimableCommandTerms","terms")],se={};for(let e=0;e<ie.length;e+=1)se=t(se,ie[e]);let ae=[re("StatusClaimableCommand")],le={};for(let e=0;e<ae.length;e+=1)le=t(le,ae[e]);let ce=[re("StatusClaimable","layout-horizental space-between")],ue={};for(let e=0;e<ce.length;e+=1)ue=t(ue,ce[e]);return{c(){n=g("div"),r=b(K),o=y(),i=g("hr"),s=y(),a=g("section"),c=g("div"),u=g("div"),d=g("img"),v=y(),w=b(W),C=b(" Levels"),A=y(),H=g("div"),L=g("img"),R=y(),O=b(/*endTime*/e[7]),N=y(),I=g("div"),$=g("button"),x=b(Z),D=y(),U=g("div"),G=g("a"),k=b("Terms and Conditions"),B(n,z),T(d,"class","icon"),l(d.src,m=Q)||T(d,"src",m),T(d,"alt","Levels"),B(u,q),T(L,"class","icon"),l(L.src,P=J)||T(L,"src",P),T(L,"alt","EndTime"),B(H,te),B(c,oe),T($,"type","button"),$.disabled=M=!/*isButtonClickable*/e[8],T(G,"href",F=/*bonus*/e[1].presentation?.url?.content),T(G,"target","__blank"),B(U,se),B(I,le),B(a,ue)},m(t,l){f(t,n,l),h(n,r),f(t,o,l),f(t,i,l),f(t,s,l),f(t,a,l),h(a,c),h(c,u),h(u,d),h(u,v),h(u,w),h(u,C),h(c,A),h(c,H),h(H,L),h(H,R),h(H,O),h(a,N),h(a,I),h(I,$),h($,x),h(I,D),h(I,U),h(U,G),h(G,k),j||(V=E($,"click",/*eventStartChallenge*/e[11]),j=!0)},p(e,t){/*bonus*/2&t[0]&&K!==(K=/*bonus*/(e[1].description||"")+"")&&_(r,K,z.contenteditable),/*levels*/4&t[0]&&W!==(W=/*levels*/e[2].length+"")&&_(w,W,q.contenteditable),/*endTime*/128&t[0]&&_(O,/*endTime*/e[7],te.contenteditable),/*$_*/1024&t[0]&&Z!==(Z=/*$_*/e[10](qn.startChallenge)+"")&&S(x,Z),/*isButtonClickable*/256&t[0]&&M!==(M=!/*isButtonClickable*/e[8])&&($.disabled=M),/*bonus*/2&t[0]&&F!==(F=/*bonus*/e[1].presentation?.url?.content)&&T(G,"href",F)},d(e){e&&p(n),e&&p(o),e&&p(i),e&&p(s),e&&p(a),j=!1,V()}}}
706
713
  // (148:6) {#if status !== BonusStatus.claimable}
707
- function sr(e){let n,r,o,i,s,a,l,c,u,d,m,v,E,B,A,_,H,L,P,R,I,O,N,$,x=/*levelsCurrent*/e[3].textWithLength+"",M=/*bonusTypeInfo*/e[5].target()+"",D=[se.completed,se.released].includes(/*bonus*/e[1].status),U=[ne("LevelStatus")],G={};for(let e=0;e<U.length;e+=1)G=t(G,U[e]);let k=[ne("LevelStatusWrapper")],F={};for(let e=0;e<k.length;e+=1)F=t(F,k[e]);let j=[ne("BonusTypeTarget","title")],V={};for(let e=0;e<j.length;e+=1)V=t(V,j[e]);let K=/*bonus*/e[1].status===se.active&&ar(e),W=D&&lr(e),Z=[ne("BonusType")],X={};for(let e=0;e<Z.length;e+=1)X=t(X,Z[e]);let z=[ne("BonusTerms","terms")],Y={};for(let e=0;e<z.length;e+=1)Y=t(Y,z[e]);let J=[ne("BonusTypeWrapper")],q={};for(let e=0;e<J.length;e+=1)q=t(q,J[e]);let Q=[ne("AfterClaimedWrapper","layout-horizental space-between")],ee={};for(let e=0;e<Q.length;e+=1)ee=t(ee,Q[e]);return{c(){n=g("hr"),r=y(),o=g("section"),i=g("div"),s=g("casino-wagering-bonus-progress"),l=y(),c=g("div"),u=b("Level\n "),d=b(x),m=y(),v=g("div"),E=g("div"),B=g("div"),A=b(M),_=y(),K&&K.c(),H=y(),W&&W.c(),L=y(),P=g("div"),R=b("Learn more about the challenge rules and included games or events in \n "),I=g("a"),O=b("Terms and Conditions"),$=b("\n section"),C(s,"percent",/*percent*/e[4]),C(s,"status",a=/*bonus*/e[1].status),w(c,G),w(i,F),w(B,V),w(E,X),T(I,"href",N=/*bonus*/e[1]?.url),T(I,"target","__blank"),w(P,Y),w(v,q),w(o,ee)},m(e,t){f(e,n,t),f(e,r,t),f(e,o,t),h(o,i),h(i,s),h(i,l),h(i,c),h(c,u),h(c,d),h(o,m),h(o,v),h(v,E),h(E,B),h(B,A),h(E,_),K&&K.m(E,null),h(E,H),W&&W.m(E,null),h(v,L),h(v,P),h(P,R),h(P,I),h(I,O),h(P,$)},p(e,t){/*percent*/16&t[0]&&C(s,"percent",/*percent*/e[4]),/*bonus*/2&t[0]&&a!==(a=/*bonus*/e[1].status)&&C(s,"status",a),/*levelsCurrent*/8&t[0]&&x!==(x=/*levelsCurrent*/e[3].textWithLength+"")&&S(d,x,G.contenteditable),/*bonusTypeInfo*/32&t[0]&&M!==(M=/*bonusTypeInfo*/e[5].target()+"")&&S(A,M,V.contenteditable),/*bonus*/e[1].status===se.active?K?K.p(e,t):(K=ar(e),K.c(),K.m(E,H)):K&&(K.d(1),K=null),/*bonus*/2&t[0]&&(D=[se.completed,se.released].includes(/*bonus*/e[1].status)),D?W?W.p(e,t):(W=lr(e),W.c(),W.m(E,null)):W&&(W.d(1),W=null),/*bonus*/2&t[0]&&N!==(N=/*bonus*/e[1]?.url)&&T(I,"href",N)},d(e){e&&p(n),e&&p(r),e&&p(o),K&&K.d(),W&&W.d()}}}
714
+ function lr(e){let n,r,o,i,s,a,l,c,u,d,m,v,E,w,C,S,H,L,P,R,O,N,I,$,x=/*levelsCurrent*/e[3].textWithLength+"",M=/*bonusTypeInfo*/e[5].target()+"",D=[ae.completed,ae.released].includes(/*bonus*/e[1].status),U=[re("LevelStatus")],G={};for(let e=0;e<U.length;e+=1)G=t(G,U[e]);let k=[re("LevelStatusWrapper")],F={};for(let e=0;e<k.length;e+=1)F=t(F,k[e]);let j=[re("BonusTypeTarget","title")],V={};for(let e=0;e<j.length;e+=1)V=t(V,j[e]);let K=/*bonus*/e[1].status===ae.active&&cr(e),W=D&&ur(e),Z=[re("BonusType")],X={};for(let e=0;e<Z.length;e+=1)X=t(X,Z[e]);let z=[re("BonusTerms","terms")],Y={};for(let e=0;e<z.length;e+=1)Y=t(Y,z[e]);let J=[re("BonusTypeWrapper")],q={};for(let e=0;e<J.length;e+=1)q=t(q,J[e]);let Q=[re("AfterClaimedWrapper","layout-horizental space-between")],ee={};for(let e=0;e<Q.length;e+=1)ee=t(ee,Q[e]);return{c(){n=g("hr"),r=y(),o=g("section"),i=g("div"),s=g("casino-wagering-bonus-progress"),l=y(),c=g("div"),u=b("Level\n "),d=b(x),m=y(),v=g("div"),E=g("div"),w=g("div"),C=b(M),S=y(),K&&K.c(),H=y(),W&&W.c(),L=y(),P=g("div"),R=b("Learn more about the challenge rules and included games or events in \n "),O=g("a"),N=b("Terms and Conditions"),$=b("\n section"),A(s,"percent",/*percent*/e[4]),A(s,"status",a=/*bonus*/e[1].status),B(c,G),B(i,F),B(w,V),B(E,X),T(O,"href",I=/*bonus*/e[1]?.url),T(O,"target","__blank"),B(P,Y),B(v,q),B(o,ee)},m(e,t){f(e,n,t),f(e,r,t),f(e,o,t),h(o,i),h(i,s),h(i,l),h(i,c),h(c,u),h(c,d),h(o,m),h(o,v),h(v,E),h(E,w),h(w,C),h(E,S),K&&K.m(E,null),h(E,H),W&&W.m(E,null),h(v,L),h(v,P),h(P,R),h(P,O),h(O,N),h(P,$)},p(e,t){/*percent*/16&t[0]&&A(s,"percent",/*percent*/e[4]),/*bonus*/2&t[0]&&a!==(a=/*bonus*/e[1].status)&&A(s,"status",a),/*levelsCurrent*/8&t[0]&&x!==(x=/*levelsCurrent*/e[3].textWithLength+"")&&_(d,x,G.contenteditable),/*bonusTypeInfo*/32&t[0]&&M!==(M=/*bonusTypeInfo*/e[5].target()+"")&&_(C,M,V.contenteditable),/*bonus*/e[1].status===ae.active?K?K.p(e,t):(K=cr(e),K.c(),K.m(E,H)):K&&(K.d(1),K=null),/*bonus*/2&t[0]&&(D=[ae.completed,ae.released].includes(/*bonus*/e[1].status)),D?W?W.p(e,t):(W=ur(e),W.c(),W.m(E,null)):W&&(W.d(1),W=null),/*bonus*/2&t[0]&&I!==(I=/*bonus*/e[1]?.url)&&T(O,"href",I)},d(e){e&&p(n),e&&p(r),e&&p(o),K&&K.d(),W&&W.d()}}}
708
715
  // (170:12) {#if bonus.status === BonusStatus.active}
709
- function ar(e){let n,r,o,i,s,a=/*bonusTypeInfo*/e[5].remaining()+"",l=/*bonusTypeInfo*/e[5].got()+"",c=[ne("BonusTypeRemaining")],u={};for(let e=0;e<c.length;e+=1)u=t(u,c[e]);let d=[ne("BonusTypeGot")],m={};for(let e=0;e<d.length;e+=1)m=t(m,d[e]);return{c(){n=g("div"),r=b(a),o=y(),i=g("div"),s=b(l),w(n,u),w(i,m)},m(e,t){f(e,n,t),h(n,r),f(e,o,t),f(e,i,t),h(i,s)},p(e,t){/*bonusTypeInfo*/32&t[0]&&a!==(a=/*bonusTypeInfo*/e[5].remaining()+"")&&S(r,a,u.contenteditable),/*bonusTypeInfo*/32&t[0]&&l!==(l=/*bonusTypeInfo*/e[5].got()+"")&&S(s,l,m.contenteditable)},d(e){e&&p(n),e&&p(o),e&&p(i)}}}
716
+ function cr(e){let n,r,o,i,s,a=/*bonusTypeInfo*/e[5].remaining()+"",l=/*bonusTypeInfo*/e[5].got()+"",c=[re("BonusTypeRemaining")],u={};for(let e=0;e<c.length;e+=1)u=t(u,c[e]);let d=[re("BonusTypeGot")],m={};for(let e=0;e<d.length;e+=1)m=t(m,d[e]);return{c(){n=g("div"),r=b(a),o=y(),i=g("div"),s=b(l),B(n,u),B(i,m)},m(e,t){f(e,n,t),h(n,r),f(e,o,t),f(e,i,t),h(i,s)},p(e,t){/*bonusTypeInfo*/32&t[0]&&a!==(a=/*bonusTypeInfo*/e[5].remaining()+"")&&_(r,a,u.contenteditable),/*bonusTypeInfo*/32&t[0]&&l!==(l=/*bonusTypeInfo*/e[5].got()+"")&&_(s,l,m.contenteditable)},d(e){e&&p(n),e&&p(o),e&&p(i)}}}
710
717
  // (179:12) {#if [BonusStatus.completed, BonusStatus.released].includes(bonus.status)}
711
- function lr(e){let t,n,r,o,i,s,a,c,u,d,m,v=/*bonus*/e[1].status.split("").map(yr).join("")+"",E=/*levelsCurrent*/e[3].textWithLength+"";return{c(){t=g("div"),n=g("img"),o=y(),i=b(v),s=y(),a=g("div"),c=g("img"),d=b("\n Levels finished:\n "),m=b(E),T(n,"class","icon"),l(n.src,r=Y)||T(n,"src",r),T(c,"class","icon"),l(c.src,u=q)||T(c,"src",u)},m(e,r){f(e,t,r),h(t,n),h(t,o),h(t,i),f(e,s,r),f(e,a,r),h(a,c),h(a,d),h(a,m)},p(e,t){/*bonus*/2&t[0]&&v!==(v=/*bonus*/e[1].status.split("").map(yr).join("")+"")&&A(i,v),/*levelsCurrent*/8&t[0]&&E!==(E=/*levelsCurrent*/e[3].textWithLength+"")&&A(m,E)},d(e){e&&p(t),e&&p(s),e&&p(a)}}}
718
+ function ur(e){let t,n,r,o,i,s,a,c,u,d,m,v=/*bonus*/e[1].status.split("").map(Er).join("")+"",E=/*levelsCurrent*/e[3].textWithLength+"";return{c(){t=g("div"),n=g("img"),o=y(),i=b(v),s=y(),a=g("div"),c=g("img"),d=b("\n Levels finished:\n "),m=b(E),T(n,"class","icon"),l(n.src,r=J)||T(n,"src",r),T(c,"class","icon"),l(c.src,u=Q)||T(c,"src",u)},m(e,r){f(e,t,r),h(t,n),h(t,o),h(t,i),f(e,s,r),f(e,a,r),h(a,c),h(a,d),h(a,m)},p(e,t){/*bonus*/2&t[0]&&v!==(v=/*bonus*/e[1].status.split("").map(Er).join("")+"")&&S(i,v),/*levelsCurrent*/8&t[0]&&E!==(E=/*levelsCurrent*/e[3].textWithLength+"")&&S(m,E)},d(e){e&&p(t),e&&p(s),e&&p(a)}}}
712
719
  // (210:8) {#if status !== BonusStatus.claimable}
713
- function cr(n){let r,o,i,s,a=[ne("RewardsTopBarLinkToDetail")],l={};for(let e=0;e<a.length;e+=1)l=t(l,a[e]);return{c(){r=g("div"),o=g("a"),o.textContent="All Rewards",T(o,"href","javascript:void(0)"),w(r,l)},m(e,t){f(e,r,t),h(r,o),i||(s=E(o,"click",/*click_handler*/n[17]),i=!0)},p:e,d(e){e&&p(r),i=!1,s()}}}
720
+ function hr(n){let r,o,i,s,a=[re("RewardsTopBarLinkToDetail")],l={};for(let e=0;e<a.length;e+=1)l=t(l,a[e]);return{c(){r=g("div"),o=g("a"),o.textContent="All Rewards",T(o,"href","javascript:void(0)"),B(r,l)},m(e,t){f(e,r,t),h(r,o),i||(s=E(o,"click",/*click_handler*/n[17]),i=!0)},p:e,d(e){e&&p(r),i=!1,s()}}}
714
721
  // (225:8) {#if status !== BonusStatus.claimable}
715
- function ur(e){let t,n=Se(/*bonus*/e[1],/*status*/e[0],/*levels*/e[2]),r=[];for(let t=0;t<n.length;t+=1)r[t]=fr(tr(e,n,t));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=v()},m(e,n){for(let t=0;t<r.length;t+=1)r[t]&&r[t].m(e,n);f(e,t,n)},p(e,o){if(/*bonus, status, levels, $_*/1031&o[0]){let i;for(n=Se(/*bonus*/e[1],/*status*/e[0],/*levels*/e[2]),i=0;i<n.length;i+=1){const s=tr(e,n,i);r[i]?r[i].p(s,o):(r[i]=fr(s),r[i].c(),r[i].m(t.parentNode,t))}for(;i<r.length;i+=1)r[i].d(1);r.length=n.length}},d(e){d(r,e),e&&p(t)}}}
722
+ function fr(e){let t,n=He(/*bonus*/e[1],/*status*/e[0],/*levels*/e[2]),r=[];for(let t=0;t<n.length;t+=1)r[t]=dr(rr(e,n,t));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=v()},m(e,n){for(let t=0;t<r.length;t+=1)r[t]&&r[t].m(e,n);f(e,t,n)},p(e,o){if(/*bonus, status, levels, $_*/1031&o[0]){let i;for(n=He(/*bonus*/e[1],/*status*/e[0],/*levels*/e[2]),i=0;i<n.length;i+=1){const s=rr(e,n,i);r[i]?r[i].p(s,o):(r[i]=dr(s),r[i].c(),r[i].m(t.parentNode,t))}for(;i<r.length;i+=1)r[i].d(1);r.length=n.length}},d(e){d(r,e),e&&p(t)}}}
716
723
  // (233:14) {#each reward.descriptions as description}
717
- function hr(e){let t,n,r=/*description*/e[34]+"";return{c(){t=g("p"),n=b(r)},m(e,r){f(e,t,r),h(t,n)},p(e,t){/*bonus, status, levels*/7&t[0]&&r!==(r=/*description*/e[34]+"")&&A(n,r)},d(e){e&&p(t)}}}
724
+ function pr(e){let t,n,r=/*description*/e[34]+"";return{c(){t=g("p"),n=b(r)},m(e,r){f(e,t,r),h(t,n)},p(e,t){/*bonus, status, levels*/7&t[0]&&r!==(r=/*description*/e[34]+"")&&S(n,r)},d(e){e&&p(t)}}}
718
725
  // (226:10) {#each (getRewards(bonus, status, levels)) as reward}
719
- function fr(e){let n,r,o,i,s,a,l,c,u,m=/*$_*/e[10](Yn[/*reward*/e[31].key])+"",v=/*$_*/e[10](Yn.level)+"",E=[ne("BonusRewardsLevelsItemPosition")],T={};for(let e=0;e<E.length;e+=1)T=t(T,E[e]);let B=/*reward*/e[31].descriptions,C=[];for(let t=0;t<B.length;t+=1)C[t]=hr(nr(e,B,t));let A=[ne("BonusRewardsLevelsItem")],_={};for(let e=0;e<A.length;e+=1)_=t(_,A[e]);return{c(){n=g("div"),r=g("div"),o=b(m),i=y(),s=b(v),a=b(":"),l=y(),c=g("div");for(let e=0;e<C.length;e+=1)C[e].c();u=y(),w(r,T),w(n,_)},m(e,t){f(e,n,t),h(n,r),h(r,o),h(r,i),h(r,s),h(r,a),h(n,l),h(n,c);for(let e=0;e<C.length;e+=1)C[e]&&C[e].m(c,null);h(n,u)},p(e,t){if(/*$_, bonus, status, levels*/1031&t[0]&&m!==(m=/*$_*/e[10](Yn[/*reward*/e[31].key])+"")&&S(o,m,T.contenteditable),/*$_*/1024&t[0]&&v!==(v=/*$_*/e[10](Yn.level)+"")&&S(s,v,T.contenteditable),/*bonus, status, levels*/7&t[0]){let n;for(B=/*reward*/e[31].descriptions,n=0;n<B.length;n+=1){const r=nr(e,B,n);C[n]?C[n].p(r,t):(C[n]=hr(r),C[n].c(),C[n].m(c,null))}for(;n<C.length;n+=1)C[n].d(1);C.length=B.length}},d(e){e&&p(n),d(C,e)}}}
726
+ function dr(e){let n,r,o,i,s,a,l,c,u,m=/*$_*/e[10](qn[/*reward*/e[31].key])+"",v=/*$_*/e[10](qn.level)+"",E=[re("BonusRewardsLevelsItemPosition")],T={};for(let e=0;e<E.length;e+=1)T=t(T,E[e]);let w=/*reward*/e[31].descriptions,C=[];for(let t=0;t<w.length;t+=1)C[t]=pr(or(e,w,t));let A=[re("BonusRewardsLevelsItem")],S={};for(let e=0;e<A.length;e+=1)S=t(S,A[e]);return{c(){n=g("div"),r=g("div"),o=b(m),i=y(),s=b(v),a=b(":"),l=y(),c=g("div");for(let e=0;e<C.length;e+=1)C[e].c();u=y(),B(r,T),B(n,S)},m(e,t){f(e,n,t),h(n,r),h(r,o),h(r,i),h(r,s),h(r,a),h(n,l),h(n,c);for(let e=0;e<C.length;e+=1)C[e]&&C[e].m(c,null);h(n,u)},p(e,t){if(/*$_, bonus, status, levels*/1031&t[0]&&m!==(m=/*$_*/e[10](qn[/*reward*/e[31].key])+"")&&_(o,m,T.contenteditable),/*$_*/1024&t[0]&&v!==(v=/*$_*/e[10](qn.level)+"")&&_(s,v,T.contenteditable),/*bonus, status, levels*/7&t[0]){let n;for(w=/*reward*/e[31].descriptions,n=0;n<w.length;n+=1){const r=or(e,w,n);C[n]?C[n].p(r,t):(C[n]=pr(r),C[n].c(),C[n].m(c,null))}for(;n<C.length;n+=1)C[n].d(1);C.length=w.length}},d(e){e&&p(n),d(C,e)}}}
720
727
  // (242:8) {#if status === BonusStatus.claimable}
721
- function pr(e){let t,n=/*bonus*/e[1].levels,r=[];for(let t=0;t<n.length;t+=1)r[t]=gr(Qn(e,n,t));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=v()},m(e,n){for(let t=0;t<r.length;t+=1)r[t]&&r[t].m(e,n);f(e,t,n)},p(e,o){if(/*bonus, $_*/1026&o[0]){let i;for(n=/*bonus*/e[1].levels,i=0;i<n.length;i+=1){const s=Qn(e,n,i);r[i]?r[i].p(s,o):(r[i]=gr(s),r[i].c(),r[i].m(t.parentNode,t))}for(;i<r.length;i+=1)r[i].d(1);r.length=n.length}},d(e){d(r,e),e&&p(t)}}}
728
+ function gr(e){let t,n=/*bonus*/e[1].levels,r=[];for(let t=0;t<n.length;t+=1)r[t]=br(tr(e,n,t));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=v()},m(e,n){for(let t=0;t<r.length;t+=1)r[t]&&r[t].m(e,n);f(e,t,n)},p(e,o){if(/*bonus, $_*/1026&o[0]){let i;for(n=/*bonus*/e[1].levels,i=0;i<n.length;i+=1){const s=tr(e,n,i);r[i]?r[i].p(s,o):(r[i]=br(s),r[i].c(),r[i].m(t.parentNode,t))}for(;i<r.length;i+=1)r[i].d(1);r.length=n.length}},d(e){d(r,e),e&&p(t)}}}
722
729
  // (258:14) {#each level.bonuses as levelBonus}
723
- function dr(e){let t,n,r=Ae(/*level*/e[25],/*levelBonus*/e[28])+"";return{c(){t=g("p"),n=b(r)},m(e,r){f(e,t,r),h(t,n)},p(e,t){/*bonus*/2&t[0]&&r!==(r=Ae(/*level*/e[25],/*levelBonus*/e[28])+"")&&A(n,r)},d(e){e&&p(t)}}}
730
+ function mr(e){let t,n,r=_e(/*level*/e[25],/*levelBonus*/e[28])+"";return{c(){t=g("p"),n=b(r)},m(e,r){f(e,t,r),h(t,n)},p(e,t){/*bonus*/2&t[0]&&r!==(r=_e(/*level*/e[25],/*levelBonus*/e[28])+"")&&S(n,r)},d(e){e&&p(t)}}}
724
731
  // (243:10) {#each bonus.levels as level, index}
725
- function gr(e){let n,r,o,i,s,a,l,c,u,m=/*$_*/e[10](Yn.level)+"",v=/*level*/(e[25].maxRepeats>1?`${/*index*/e[27]+1}-${/*index*/e[27]+1+/*level*/e[25].maxRepeats-1}`/*index*/:e[27]+1)+"",E=[ne("BonusRewardsLevelsItemPosition")],T={};for(let e=0;e<E.length;e+=1)T=t(T,E[e]);let B=/*level*/e[25].bonuses,C=[];for(let t=0;t<B.length;t+=1)C[t]=dr(er(e,B,t));let A=[ne("BonusRewardsLevelsItem")],_={};for(let e=0;e<A.length;e+=1)_=t(_,A[e]);return{c(){n=g("div"),r=g("div"),o=b(m),i=y(),s=b(v),a=b(":"),l=y(),c=g("div");for(let e=0;e<C.length;e+=1)C[e].c();u=y(),w(r,T),w(n,_)},m(e,t){f(e,n,t),h(n,r),h(r,o),h(r,i),h(r,s),h(r,a),h(n,l),h(n,c);for(let e=0;e<C.length;e+=1)C[e]&&C[e].m(c,null);h(n,u)},p(e,t){if(/*$_*/1024&t[0]&&m!==(m=/*$_*/e[10](Yn.level)+"")&&S(o,m,T.contenteditable),/*bonus*/2&t[0]&&v!==(v=/*level*/(e[25].maxRepeats>1?`${/*index*/e[27]+1}-${/*index*/e[27]+1+/*level*/e[25].maxRepeats-1}`/*index*/:e[27]+1)+"")&&S(s,v,T.contenteditable),/*bonus*/2&t[0]){let n;for(B=/*level*/e[25].bonuses,n=0;n<B.length;n+=1){const r=er(e,B,n);C[n]?C[n].p(r,t):(C[n]=dr(r),C[n].c(),C[n].m(c,null))}for(;n<C.length;n+=1)C[n].d(1);C.length=B.length}},d(e){e&&p(n),d(C,e)}}}
732
+ function br(e){let n,r,o,i,s,a,l,c,u,m=/*$_*/e[10](qn.level)+"",v=/*level*/(e[25].maxRepeats>1?`${/*index*/e[27]+1}-${/*index*/e[27]+1+/*level*/e[25].maxRepeats-1}`/*index*/:e[27]+1)+"",E=[re("BonusRewardsLevelsItemPosition")],T={};for(let e=0;e<E.length;e+=1)T=t(T,E[e]);let w=/*level*/e[25].bonuses,C=[];for(let t=0;t<w.length;t+=1)C[t]=mr(nr(e,w,t));let A=[re("BonusRewardsLevelsItem")],S={};for(let e=0;e<A.length;e+=1)S=t(S,A[e]);return{c(){n=g("div"),r=g("div"),o=b(m),i=y(),s=b(v),a=b(":"),l=y(),c=g("div");for(let e=0;e<C.length;e+=1)C[e].c();u=y(),B(r,T),B(n,S)},m(e,t){f(e,n,t),h(n,r),h(r,o),h(r,i),h(r,s),h(r,a),h(n,l),h(n,c);for(let e=0;e<C.length;e+=1)C[e]&&C[e].m(c,null);h(n,u)},p(e,t){if(/*$_*/1024&t[0]&&m!==(m=/*$_*/e[10](qn.level)+"")&&_(o,m,T.contenteditable),/*bonus*/2&t[0]&&v!==(v=/*level*/(e[25].maxRepeats>1?`${/*index*/e[27]+1}-${/*index*/e[27]+1+/*level*/e[25].maxRepeats-1}`/*index*/:e[27]+1)+"")&&_(s,v,T.contenteditable),/*bonus*/2&t[0]){let n;for(w=/*level*/e[25].bonuses,n=0;n<w.length;n+=1){const r=nr(e,w,n);C[n]?C[n].p(r,t):(C[n]=mr(r),C[n].c(),C[n].m(c,null))}for(;n<C.length;n+=1)C[n].d(1);C.length=w.length}},d(e){e&&p(n),d(C,e)}}}
726
733
  // (273:10) {#each Object.keys(bonus.extension?.bonus.wallet || bonus.wallet).filter(k => ['sports', 'casino'].includes(k)) as support, i}
727
- function mr(e){let t,n,r,o,i,s,a=/*support*/e[22]+"";function l(){/*click_handler_1*/
728
- return e[18](/*support*/e[22])}return{c(){t=g("div"),n=g("a"),r=b(a),o=y(),T(n,"href","javascript:void(0)")},m(e,a){f(e,t,a),h(t,n),h(n,r),h(t,o),i||(s=E(n,"click",l),i=!0)},p(t,n){e=t,/*bonus*/2&n[0]&&a!==(a=/*support*/e[22]+"")&&A(r,a)},d(e){e&&p(t),i=!1,s()}}}function br(t){let n,r=/*bonus*/t[1]&&/*isShowingBonus*/t[9]&&rr(t);return{c(){r&&r.c(),n=v(),this.c=e},m(e,t){r&&r.m(e,t),f(e,n,t)},p(e,t){/*bonus*/e[1]&&/*isShowingBonus*/e[9]?r?r.p(e,t):(r=rr(e),r.c(),r.m(n.parentNode,n)):r&&(r.d(1),r=null)},i:e,o:e,d(e){r&&r.d(e),e&&p(n)}}}const yr=(e,t)=>0===t?e.toUpperCase():e,vr=e=>["sports","casino"].includes(e);function Er(e,t,n){let r,o;var i,s;i=Zn,s=e=>n(10,o=e),e.$$.on_destroy.push(c(i,s));let a,l,u,h,{rawbonus:f=""}=t,{endpoint:p=""}=t,{currency:d="EUR"}=t,{lang:g=ce.en}=t,{session:m=""}=t,{status:b=se.claimable}=t,y=[],v="0",E="",T=!0,w=3e4;const B=()=>{try{n(1,a=Object.assign({},JSON.parse(f)))}catch(e){console.error(e)}if(a){if(n(2,y=(e=>{const t=[];return e.map((e=>{const{maxRepeats:n,completedTime:r}=e,o=he(e,["maxRepeats","completedTime"]);for(let e=0;e<n;e++)t.push(Object.assign({},o))})),t})(a.levels)),a.bonusWalletID){const e=((e,t)=>({bonusTypeInfo:He(e,t),percent:we(e.status,{completed:()=>"100",current:()=>{if(!e.wageringProgress)return"0";let{currency:t,currentLevelIncrement:n,gap:r,currentLevel:o}=e.wageringProgress;const i=n-r;return String(Math.floor(i/n*100))}}),levelsCurrent:we(e.status,{completed:()=>({text:t.length,textWithLength:`${t.length}/${t.length}`}),current:()=>{if(!e.wageringProgress)return{current:"0",textWithLength:`0/${t.length}`};const{currentLevel:n}=e.wageringProgress;return{text:n,textWithLength:`${n}/${t.length}`}}})}))(a,y);n(5,u=e.bonusTypeInfo),n(4,v=e.percent),n(3,l=e.levelsCurrent)}C()}},C=()=>{a&&(Pe(a.expiryDate,w,(()=>n(6,h="Expired")),(e=>n(6,h=e))),Pe(a.endTime||a.trigger.endTime,w,(()=>n(7,E="Ended")),(e=>n(7,E=e))))};P((()=>{const e=setInterval((()=>{C()}),w);return()=>{clearInterval(e)}})),me({OnWageringBonusButtonStateChanged:e=>n(8,T=e.clickable)});return e.$$set=e=>{"rawbonus"in e&&n(12,f=e.rawbonus),"endpoint"in e&&n(13,p=e.endpoint),"currency"in e&&n(14,d=e.currency),"lang"in e&&n(15,g=e.lang),"session"in e&&n(16,m=e.session),"status"in e&&n(0,b=e.status)},e.$$.update=()=>{var t;/*rawbonus*/4096&e.$$.dirty[0]&&f&&B(),/*lang*/32768&e.$$.dirty[0]&&g&&(t=g,$n.set(t)),/*status, bonus*/3&e.$$.dirty[0]&&n(9,r=b===se.claimable||a.status===b)},[b,a,y,l,v,u,h,E,T,r,o,async()=>{if(!m)return;ge({type:"OnWageringBonusJoinRequest",bonusID:a.bonusID}),ge({type:"OnWageringBonusButtonStateChanged",clickable:!1});(await Be.start(p,m,a.code,d)).success&&ge({type:"OnWageringBonusClaimed"}),ge({type:"OnWageringBonusButtonStateChanged",clickable:!0})},f,p,d,g,m,()=>ge({type:"OnWageringBonusAllRewardsClick",bonusWalletID:a.id}),e=>ge({type:"OnWageringBonusSupportClicked",support:e})]}var Tr,wr;
729
- /* src/CasinoWageringBonusesController.svelte generated by Svelte v3.58.0 */
730
- function Br(e,t,n){const r=e.slice();return r[15]=t[n],r}function Cr(e,t,n){const r=e.slice();return r[18]=t[n],r}
734
+ function yr(e){let t,n,r,o,i,s,a=/*support*/e[22]+"";function l(){/*click_handler_1*/
735
+ return e[18](/*support*/e[22])}return{c(){t=g("div"),n=g("a"),r=b(a),o=y(),T(n,"href","javascript:void(0)")},m(e,a){f(e,t,a),h(t,n),h(n,r),h(t,o),i||(s=E(n,"click",l),i=!0)},p(t,n){e=t,/*bonus*/2&n[0]&&a!==(a=/*support*/e[22]+"")&&S(r,a)},d(e){e&&p(t),i=!1,s()}}}function vr(t){let n,r=/*bonus*/t[1]&&/*isShowingBonus*/t[9]&&ir(t);return{c(){r&&r.c(),n=v(),this.c=e},m(e,t){r&&r.m(e,t),f(e,n,t)},p(e,t){/*bonus*/e[1]&&/*isShowingBonus*/e[9]?r?r.p(e,t):(r=ir(e),r.c(),r.m(n.parentNode,n)):r&&(r.d(1),r=null)},i:e,o:e,d(e){r&&r.d(e),e&&p(n)}}}const Er=(e,t)=>0===t?e.toUpperCase():e,Tr=e=>["sports","casino"].includes(e);function wr(e,t,n){let r,o;var i,s;i=zn,s=e=>n(10,o=e),e.$$.on_destroy.push(c(i,s));let a,l,u,h,{rawbonus:f=""}=t,{endpoint:p=""}=t,{currency:d="EUR"}=t,{lang:g=ue.en}=t,{session:m=""}=t,{status:b=ae.claimable}=t,y=[],v="0",E="",T=!0,w=3e4;const B=()=>{try{n(1,a=Object.assign({},JSON.parse(f)))}catch(e){console.error(e)}if(a){if(n(2,y=(e=>{const t=[];return e.map((e=>{const{maxRepeats:n,completedTime:r}=e,o=fe(e,["maxRepeats","completedTime"]);for(let e=0;e<n;e++)t.push(Object.assign({},o))})),t})(a.levels)),a.bonusWalletID){const e=((e,t)=>({bonusTypeInfo:Pe(e,t),percent:Be(e.status,{completed:()=>"100",current:()=>{if(!e.wageringProgress)return"0";let{currency:t,currentLevelIncrement:n,gap:r,currentLevel:o}=e.wageringProgress;const i=n-r;return String(Math.floor(i/n*100))}}),levelsCurrent:Be(e.status,{completed:()=>({text:t.length,textWithLength:`${t.length}/${t.length}`}),current:()=>{if(!e.wageringProgress)return{current:"0",textWithLength:`0/${t.length}`};const{currentLevel:n}=e.wageringProgress;return{text:n,textWithLength:`${n}/${t.length}`}}})}))(a,y);n(5,u=e.bonusTypeInfo),n(4,v=e.percent),n(3,l=e.levelsCurrent)}C()}},C=()=>{a&&(Oe(a.expiryDate,w,(()=>n(6,h="Expired")),(e=>n(6,h=e))),Oe(a.endTime||a.trigger.endTime,w,(()=>n(7,E="Ended")),(e=>n(7,E=e))))};R((()=>{const e=setInterval((()=>{C()}),w);return()=>{clearInterval(e)}})),be({OnWageringBonusButtonStateChanged:e=>n(8,T=e.clickable)});return e.$$set=e=>{"rawbonus"in e&&n(12,f=e.rawbonus),"endpoint"in e&&n(13,p=e.endpoint),"currency"in e&&n(14,d=e.currency),"lang"in e&&n(15,g=e.lang),"session"in e&&n(16,m=e.session),"status"in e&&n(0,b=e.status)},e.$$.update=()=>{var t;/*rawbonus*/4096&e.$$.dirty[0]&&f&&B(),/*lang*/32768&e.$$.dirty[0]&&g&&(t=g,Mn.set(t)),/*status, bonus*/3&e.$$.dirty[0]&&n(9,r=b===ae.claimable||a.status===b)},[b,a,y,l,v,u,h,E,T,r,o,async()=>{if(!m)return;me({type:"OnWageringBonusJoinRequest",bonusID:a.bonusID}),me({type:"OnWageringBonusButtonStateChanged",clickable:!1});(await Ae(p,m,a.code,d)).success&&me({type:"OnWageringBonusClaimed"}),me({type:"OnWageringBonusButtonStateChanged",clickable:!0})},f,p,d,g,m,()=>me({type:"OnWageringBonusAllRewardsClick",bonusWalletID:a.id}),e=>me({type:"OnWageringBonusSupportClicked",support:e})]}var Br,Cr;
736
+ /* src/CasinoWageringBonusesController.svelte generated by Svelte v3.59.2 */
737
+ function Ar(e,t,n){const r=e.slice();return r[15]=t[n],r}function Sr(e,t,n){const r=e.slice();return r[18]=t[n],r}
731
738
  // (87:4) {#each Object.keys(BonusStatus) as _status}
732
- function Ar(e){let t,n,r,o,i,s,a=se[/*_status*/e[18]]+"";function l(){/*click_handler*/
733
- return e[11](/*_status*/e[18])}return{c(){t=g("li"),n=b(a),r=y(),T(t,"class",o=/*status*/e[0]===se[/*_status*/e[18]]?"active":"")},m(e,o){f(e,t,o),h(t,n),h(t,r),i||(s=E(t,"click",l),i=!0)},p(n,r){e=n,/*status*/1&r&&o!==(o=/*status*/e[0]===se[/*_status*/e[18]]?"active":"")&&T(t,"class",o)},d(e){e&&p(t),i=!1,s()}}}
739
+ function _r(e){let t,n,r,o,i,s,a=ae[/*_status*/e[18]]+"";function l(){/*click_handler*/
740
+ return e[11](/*_status*/e[18])}return{c(){t=g("li"),n=b(a),r=y(),T(t,"class",o=/*status*/e[0]===ae[/*_status*/e[18]]?"active":"")},m(e,o){f(e,t,o),h(t,n),h(t,r),i||(s=E(t,"click",l),i=!0)},p(n,r){e=n,/*status*/1&r&&o!==(o=/*status*/e[0]===ae[/*_status*/e[18]]?"active":"")&&T(t,"class",o)},d(e){e&&p(t),i=!1,s()}}}
734
741
  // (120:4) {:else}
735
- function Sr(t){let n;return{c(){n=b("No wagering bonuses found")},m(e,t){f(e,n,t)},p:e,d(e){e&&p(n)}}}
742
+ function Hr(t){let n;return{c(){n=b("No wagering bonuses found")},m(e,t){f(e,n,t)},p:e,d(e){e&&p(n)}}}
736
743
  // (118:4) {#if errorMessage}
737
- function _r(e){let t,n,r;return{c(){var o,i,s,a;t=g("div"),n=b("Error: "),r=b(/*errorMessage*/e[7]),o=t,i="color",null===(s="red")?o.style.removeProperty(i):o.style.setProperty(i,s,a?"important":"")},m(e,o){f(e,t,o),h(t,n),h(t,r)},p(e,t){/*errorMessage*/128&t&&A(r,/*errorMessage*/e[7])},d(e){e&&p(t)}}}
744
+ function Lr(e){let t,n,r;return{c(){var o,i,s,a;t=g("div"),n=b("Error: "),r=b(/*errorMessage*/e[7]),o=t,i="color",null==(s="red")?o.style.removeProperty(i):o.style.setProperty(i,s,a?"important":"")},m(e,o){f(e,t,o),h(t,n),h(t,r)},p(e,t){/*errorMessage*/128&t&&S(r,/*errorMessage*/e[7])},d(e){e&&p(t)}}}
738
745
  // (105:2) {#if bonuses.length > 0}
739
- function Hr(e){let t,n=/*bonuses*/e[5],r=[];for(let t=0;t<n.length;t+=1)r[t]=Pr(Br(e,n,t));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=v()},m(e,n){for(let t=0;t<r.length;t+=1)r[t]&&r[t].m(e,n);f(e,t,n)},p(e,o){if(/*endpoint, session, lang, currency, JSON, bonuses, status*/63&o){let i;for(n=/*bonuses*/e[5],i=0;i<n.length;i+=1){const s=Br(e,n,i);r[i]?r[i].p(s,o):(r[i]=Pr(s),r[i].c(),r[i].m(t.parentNode,t))}for(;i<r.length;i+=1)r[i].d(1);r.length=n.length}},d(e){d(r,e),e&&p(t)}}}
746
+ function Pr(e){let t,n=/*bonuses*/e[5],r=[];for(let t=0;t<n.length;t+=1)r[t]=Or(Ar(e,n,t));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=v()},m(e,n){for(let t=0;t<r.length;t+=1)r[t]&&r[t].m(e,n);f(e,t,n)},p(e,o){if(/*endpoint, session, lang, currency, JSON, bonuses, status*/63&o){let i;for(n=/*bonuses*/e[5],i=0;i<n.length;i+=1){const s=Ar(e,n,i);r[i]?r[i].p(s,o):(r[i]=Or(s),r[i].c(),r[i].m(t.parentNode,t))}for(;i<r.length;i+=1)r[i].d(1);r.length=n.length}},d(e){d(r,e),e&&p(t)}}}
740
747
  // (102:0) {#if isLoading}
741
- function Lr(t){let n;return{c(){n=b("Loading, please wait ...")},m(e,t){f(e,n,t)},p:e,d(e){e&&p(n)}}}
748
+ function Rr(t){let n;return{c(){n=b("Loading, please wait ...")},m(e,t){f(e,n,t)},p:e,d(e){e&&p(n)}}}
742
749
  // (106:4) {#each bonuses as item}
743
- function Pr(e){let n,r=[{endpoint:/*endpoint*/e[1],session:/*session*/e[3],lang:/*lang*/e[2],currency:/*currency*/e[4],rawbonus:JSON.stringify(/*item*/e[15]),status:/*status*/e[0]}],o={};for(let e=0;e<r.length;e+=1)o=t(o,r[e]);return{c(){n=g("casino-wagering-bonus"),w(n,o)},m(e,t){f(e,n,t)},p(e,t){w(n,o=j(r,[/*endpoint, session, lang, currency, bonuses, status*/63&t&&{endpoint:/*endpoint*/e[1],session:/*session*/e[3],lang:/*lang*/e[2],currency:/*currency*/e[4],rawbonus:JSON.stringify(/*item*/e[15]),status:/*status*/e[0]}]))},d(e){e&&p(n)}}}function Rr(n){let r,o,i,s,a=Object.keys(se),l=[];for(let e=0;e<a.length;e+=1)l[e]=Ar(Cr(n,a,e));let c=[ne("WageringTabs")],u={};for(let e=0;e<c.length;e+=1)u=t(u,c[e]);function m(e,t){/*isLoading*/
744
- return e[6]?Lr:/*bonuses*/e[5].length>0?Hr:/*errorMessage*/e[7]?_r:Sr}let b=m(n),E=b(n);return{c(){r=g("div"),o=g("ul");for(let e=0;e<l.length;e+=1)l[e].c();i=y(),E.c(),s=v(),this.c=e,w(r,u)},m(e,t){f(e,r,t),h(r,o);for(let e=0;e<l.length;e+=1)l[e]&&l[e].m(o,null);f(e,i,t),E.m(e,t),f(e,s,t)},p(e,[t]){if(/*status, BonusStatus, Object, init*/257&t){let n;for(a=Object.keys(se),n=0;n<a.length;n+=1){const r=Cr(e,a,n);l[n]?l[n].p(r,t):(l[n]=Ar(r),l[n].c(),l[n].m(o,null))}for(;n<l.length;n+=1)l[n].d(1);l.length=a.length}b===(b=m(e))&&E?E.p(e,t):(E.d(1),E=b(e),E&&(E.c(),E.m(s.parentNode,s)))},i:e,o:e,d(e){e&&p(r),d(l,e),e&&p(i),E.d(e),e&&p(s)}}}function Ir(e,t,n){let{endpoint:r=""}=t,{lang:o=ce.en}=t,{session:i=""}=t,{currency:s="EUR"}=t,{status:a=se.claimable}=t,{limit:l=""}=t,c=!1;P((()=>(n(10,c=!0),()=>{n(10,c=!1)})));let u,h=[],f=!0,p="";Xn(Jn);const d=(g={WageringProgressUpdate:e=>{n(5,h=h.map((t=>{let n=null==e?void 0:e.items[t.bonusWalletID];if(!n)return t;let{status:r,level:o,levelIncrement:i,gap:s}=n,a=Object.assign({},t);return a=Object.assign(Object.assign({},a),{wageringProgress:Object.assign(Object.assign({},a.wageringProgress),{currentLevel:o,currentLevelIncrement:i,gap:s})}),r&&(a=Object.assign(Object.assign({},a),{status:r}),setTimeout((()=>m()),500)),a})))}},e=>{let t=e.data;if(t)try{let e=JSON.parse(t);if(!e)return;Object.keys(g).map((t=>{if(e.messageType==t){const{messageType:n}=e,r=he(e,["messageType"]);
750
+ function Or(e){let n,r=[{endpoint:/*endpoint*/e[1],session:/*session*/e[3],lang:/*lang*/e[2],currency:/*currency*/e[4],rawbonus:JSON.stringify(/*item*/e[15]),status:/*status*/e[0]}],o={};for(let e=0;e<r.length;e+=1)o=t(o,r[e]);return{c(){n=g("casino-wagering-bonus"),B(n,o)},m(e,t){f(e,n,t)},p(e,t){B(n,o=V(r,[/*endpoint, session, lang, currency, bonuses, status*/63&t&&{endpoint:/*endpoint*/e[1],session:/*session*/e[3],lang:/*lang*/e[2],currency:/*currency*/e[4],rawbonus:JSON.stringify(/*item*/e[15]),status:/*status*/e[0]}]))},d(e){e&&p(n)}}}function Nr(n){let r,o,i,s,a=Object.keys(ae),l=[];for(let e=0;e<a.length;e+=1)l[e]=_r(Sr(n,a,e));let c=[re("WageringTabs")],u={};for(let e=0;e<c.length;e+=1)u=t(u,c[e]);function m(e,t){/*isLoading*/
751
+ return e[6]?Rr:/*bonuses*/e[5].length>0?Pr:/*errorMessage*/e[7]?Lr:Hr}let b=m(n),E=b(n);return{c(){r=g("div"),o=g("ul");for(let e=0;e<l.length;e+=1)l[e].c();i=y(),E.c(),s=v(),this.c=e,B(r,u)},m(e,t){f(e,r,t),h(r,o);for(let e=0;e<l.length;e+=1)l[e]&&l[e].m(o,null);f(e,i,t),E.m(e,t),f(e,s,t)},p(e,[t]){if(/*status, BonusStatus, Object, init*/257&t){let n;for(a=Object.keys(ae),n=0;n<a.length;n+=1){const r=Sr(e,a,n);l[n]?l[n].p(r,t):(l[n]=_r(r),l[n].c(),l[n].m(o,null))}for(;n<l.length;n+=1)l[n].d(1);l.length=a.length}b===(b=m(e))&&E?E.p(e,t):(E.d(1),E=b(e),E&&(E.c(),E.m(s.parentNode,s)))},i:e,o:e,d(e){e&&p(r),d(l,e),e&&p(i),E.d(e),e&&p(s)}}}function Ir(e,t,n){let{endpoint:r=""}=t,{lang:o=ue.en}=t,{session:i=""}=t,{currency:s="EUR"}=t,{status:a=ae.claimable}=t,{limit:l=""}=t,c=!1;R((()=>(n(10,c=!0),()=>{n(10,c=!1)})));let u,h=[],f=!0,p="";Yn(Qn);const d=(g={WageringProgressUpdate:e=>{n(5,h=h.map((t=>{let n=null==e?void 0:e.items[t.bonusWalletID];if(!n)return t;let{status:r,level:o,levelIncrement:i,gap:s}=n,a=Object.assign({},t);return a=Object.assign(Object.assign({},a),{wageringProgress:Object.assign(Object.assign({},a.wageringProgress),{currentLevel:o,currentLevelIncrement:i,gap:s})}),r&&(a=Object.assign(Object.assign({},a),{status:r}),setTimeout((()=>m()),500)),a})))}},e=>{let t=e.data;if(t)try{let e=JSON.parse(t);if(!e)return;Object.keys(g).map((t=>{if(e.messageType==t){const{messageType:n}=e,r=fe(e,["messageType"]);
745
752
  // console.log(messageType, restData);
746
- g[t](r)}}))}catch(e){console.error(e)}});var g;const m=async()=>{c&&a&&o&&i&&r&&(n(6,f=!0),await(async()=>{const e=await Be.list(r,i,{lang:o,status:a,limit:l});e.success?(n(5,h=e.items||e.bonuses),
753
+ g[t](r)}}))}catch(e){console.error(e)}});var g;const m=async()=>{c&&a&&o&&i&&r&&(n(6,f=!0),await(async()=>{const e=await Ce(r,i,{lang:o,status:a,limit:l});e.success?(n(5,h=e.items||e.bonuses),
747
754
  // if(status !== BonusStatus.claimable){
748
755
  // bonuses = _bonuses.filter(bonus => bonus.status === status)
749
756
  // }else{
750
757
  // bonuses = _bonuses
751
758
  // }
752
- be(u,d),a===se.active&&(u=Ee(r,i,h,d))):n(7,p=e.errorMessage)})(),n(6,f=!1))};me({OnWageringBonusClaimed:()=>m(),OnWageringBonusExpired:()=>m()}),P((()=>()=>be(u,d)));return e.$$set=e=>{"endpoint"in e&&n(1,r=e.endpoint),"lang"in e&&n(2,o=e.lang),"session"in e&&n(3,i=e.session),"currency"in e&&n(4,s=e.currency),"status"in e&&n(0,a=e.status),"limit"in e&&n(9,l=e.limit)},e.$$.update=()=>{/*isMounted*/1024&e.$$.dirty&&c&&m(),/*endpoint*/2&e.$$.dirty&&r&&m(),/*lang*/4&e.$$.dirty&&o&&m(),/*session*/8&e.$$.dirty&&i&&m()},[a,r,o,i,s,h,f,p,m,l,c,e=>{a!==se[e]&&(n(0,a=se[e]),m())}]}Tr="casino-wagering-bonus",wr=class extends Z{constructor(e){super();const t=document.createElement("style");t.textContent=':host{font-family:system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";font-size:24px;line-height:28px;font-style:normal}*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}button{font-size:24px;line-height:28px}hr{margin:18px 0;border-top:1px solid #00AEEF}section.layout-horizental{display:flex;flex-direction:row}section.layout-horizental.space-between{justify-content:space-between}.title{font-weight:700}.terms{font-size:18px;line-height:21px}.icon{width:24px;height:24px;vertical-align:bottom}.Root{border:1px solid #00AEEF;max-width:1300px;padding:28px 0}.Root>div{padding:0 28px}.Root>div:nth-child(1){flex:55%}.Root>div:nth-child(2){flex:45%;border-left:1px solid #00AEEF}.BonusInfoTitle{color:#59CA00}.BonusInfoExpireDate{color:#DC0D1F}.BonusInfoDescription{margin-top:20px}.StatusClaimableInfoPeriod{margin-top:18px}.StatusClaimable>div:nth-child(1){flex:40%}.StatusClaimable>div:nth-child(2){flex:60%}.StatusClaimableCommand button{width:100%;background:#00AEEF;border:1px solid #00AEEF;color:#FFFFFF;cursor:pointer;font-weight:400;padding:30px;transition:0.6s}.StatusClaimableCommand button:disabled{opacity:0.3}.StatusClaimableCommandTerms{margin-top:10px;text-align:center}.StatusClaimableCommandTerms a{color:#000000}.LevelStatus{text-align:center;margin-top:10px}.BonusTypeWrapper{margin-left:30px}.BonusType>div{margin-bottom:20px}.BonusTypeRemaining{color:#00AEEF}.BonusTypeGot{color:#7884A0}.RewardsTopBarTitle{color:#252631;padding-bottom:12px}.BonusRewardsLevels>div{margin-top:5px;padding:12px 0}.BonusRewardsLevelsItem{display:flex}.BonusRewardsLevelsItemPosition{margin-right:5px}.SupportsWrapper{margin-top:35px}.SupportsWrapper div{margin-top:15px}',this.shadowRoot.appendChild(t),W(this,{target:this.shadowRoot,props:_(this.attributes),customElement:!0},Er,br,s,{rawbonus:12,endpoint:13,currency:14,lang:15,session:16,status:0},null,[-1,-1]),e&&(e.target&&f(e.target,this,e.anchor),e.props&&(this.$set(e.props),G()))}static get observedAttributes(){return["rawbonus","endpoint","currency","lang","session","status"]}get rawbonus(){return this.$$.ctx[12]}set rawbonus(e){this.$$set({rawbonus:e}),G()}get endpoint(){return this.$$.ctx[13]}set endpoint(e){this.$$set({endpoint:e}),G()}get currency(){return this.$$.ctx[14]}set currency(e){this.$$set({currency:e}),G()}get lang(){return this.$$.ctx[15]}set lang(e){this.$$set({lang:e}),G()}get session(){return this.$$.ctx[16]}set session(e){this.$$set({session:e}),G()}get status(){return this.$$.ctx[0]}set status(e){this.$$set({status:e}),G()}},!customElements.get(Tr)&&customElements.define(Tr,wr);class Or extends Z{constructor(e){super();const t=document.createElement("style");t.textContent=':host{font-family:system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"}*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}casino-wagering-bonus::part(Root){margin-bottom:30px}.WageringTabs{margin:20px 0}.WageringTabs li{display:inline;margin:10px 10px 10px 0;padding:10px;border:1px #ccc solid;cursor:pointer}.WageringTabs li.active{border-color:aquamarine;font-weight:700}',this.shadowRoot.appendChild(t),W(this,{target:this.shadowRoot,props:_(this.attributes),customElement:!0},Ir,Rr,s,{endpoint:1,lang:2,session:3,currency:4,status:0,limit:9},null),e&&(e.target&&f(e.target,this,e.anchor),e.props&&(this.$set(e.props),G()))}static get observedAttributes(){return["endpoint","lang","session","currency","status","limit"]}get endpoint(){return this.$$.ctx[1]}set endpoint(e){this.$$set({endpoint:e}),G()}get lang(){return this.$$.ctx[2]}set lang(e){this.$$set({lang:e}),G()}get session(){return this.$$.ctx[3]}set session(e){this.$$set({session:e}),G()}get currency(){return this.$$.ctx[4]}set currency(e){this.$$set({currency:e}),G()}get status(){return this.$$.ctx[0]}set status(e){this.$$set({status:e}),G()}get limit(){return this.$$.ctx[9]}set limit(e){this.$$set({limit:e}),G()}}
759
+ ye(u,d),a===ae.active&&(u=Te(r,i,h,d))):n(7,p=e.errorMessage)})(),n(6,f=!1))};be({OnWageringBonusClaimed:()=>m(),OnWageringBonusExpired:()=>m()}),R((()=>()=>ye(u,d)));return e.$$set=e=>{"endpoint"in e&&n(1,r=e.endpoint),"lang"in e&&n(2,o=e.lang),"session"in e&&n(3,i=e.session),"currency"in e&&n(4,s=e.currency),"status"in e&&n(0,a=e.status),"limit"in e&&n(9,l=e.limit)},e.$$.update=()=>{/*isMounted*/1024&e.$$.dirty&&c&&m(),/*endpoint*/2&e.$$.dirty&&r&&m(),/*lang*/4&e.$$.dirty&&o&&m(),/*session*/8&e.$$.dirty&&i&&m()},[a,r,o,i,s,h,f,p,m,l,c,e=>{a!==ae[e]&&(n(0,a=ae[e]),m())}]}Br="casino-wagering-bonus",Cr=class extends X{constructor(e){super();const t=document.createElement("style");t.textContent=':host{font-family:system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";font-size:24px;line-height:28px;font-style:normal}*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}button{font-size:24px;line-height:28px}hr{margin:18px 0;border-top:1px solid #00AEEF}section.layout-horizental{display:flex;flex-direction:row}section.layout-horizental.space-between{justify-content:space-between}.title{font-weight:700}.terms{font-size:18px;line-height:21px}.icon{width:24px;height:24px;vertical-align:bottom}.Root{border:1px solid #00AEEF;max-width:1300px;padding:28px 0}.Root>div{padding:0 28px}.Root>div:nth-child(1){flex:55%}.Root>div:nth-child(2){flex:45%;border-left:1px solid #00AEEF}.BonusInfoTitle{color:#59CA00}.BonusInfoExpireDate{color:#DC0D1F}.BonusInfoDescription{margin-top:20px}.StatusClaimableInfoPeriod{margin-top:18px}.StatusClaimable>div:nth-child(1){flex:40%}.StatusClaimable>div:nth-child(2){flex:60%}.StatusClaimableCommand button{width:100%;background:#00AEEF;border:1px solid #00AEEF;color:#FFFFFF;cursor:pointer;font-weight:400;padding:30px;transition:0.6s}.StatusClaimableCommand button:disabled{opacity:0.3}.StatusClaimableCommandTerms{margin-top:10px;text-align:center}.StatusClaimableCommandTerms a{color:#000000}.LevelStatus{text-align:center;margin-top:10px}.BonusTypeWrapper{margin-left:30px}.BonusType>div{margin-bottom:20px}.BonusTypeRemaining{color:#00AEEF}.BonusTypeGot{color:#7884A0}.RewardsTopBarTitle{color:#252631;padding-bottom:12px}.BonusRewardsLevels>div{margin-top:5px;padding:12px 0}.BonusRewardsLevelsItem{display:flex}.BonusRewardsLevelsItemPosition{margin-right:5px}.SupportsWrapper{margin-top:35px}.SupportsWrapper div{margin-top:15px}',this.shadowRoot.appendChild(t),Z(this,{target:this.shadowRoot,props:H(this.attributes),customElement:!0},wr,vr,s,{rawbonus:12,endpoint:13,currency:14,lang:15,session:16,status:0},null,[-1,-1]),e&&(e.target&&f(e.target,this,e.anchor),e.props&&(this.$set(e.props),k()))}static get observedAttributes(){return["rawbonus","endpoint","currency","lang","session","status"]}get rawbonus(){return this.$$.ctx[12]}set rawbonus(e){this.$$set({rawbonus:e}),k()}get endpoint(){return this.$$.ctx[13]}set endpoint(e){this.$$set({endpoint:e}),k()}get currency(){return this.$$.ctx[14]}set currency(e){this.$$set({currency:e}),k()}get lang(){return this.$$.ctx[15]}set lang(e){this.$$set({lang:e}),k()}get session(){return this.$$.ctx[16]}set session(e){this.$$set({session:e}),k()}get status(){return this.$$.ctx[0]}set status(e){this.$$set({status:e}),k()}},!customElements.get(Br)&&customElements.define(Br,Cr);class $r extends X{constructor(e){super();const t=document.createElement("style");t.textContent="*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}casino-wagering-bonus::part(Root){margin-bottom:30px}.WageringTabs{margin:20px 0}.WageringTabs li{display:inline;margin:10px 10px 10px 0;padding:10px;border:1px #ccc solid;cursor:pointer}.WageringTabs li.active{border-color:aquamarine;font-weight:700}",this.shadowRoot.appendChild(t),Z(this,{target:this.shadowRoot,props:H(this.attributes),customElement:!0},Ir,Nr,s,{endpoint:1,lang:2,session:3,currency:4,status:0,limit:9},null),e&&(e.target&&f(e.target,this,e.anchor),e.props&&(this.$set(e.props),k()))}static get observedAttributes(){return["endpoint","lang","session","currency","status","limit"]}get endpoint(){return this.$$.ctx[1]}set endpoint(e){this.$$set({endpoint:e}),k()}get lang(){return this.$$.ctx[2]}set lang(e){this.$$set({lang:e}),k()}get session(){return this.$$.ctx[3]}set session(e){this.$$set({session:e}),k()}get currency(){return this.$$.ctx[4]}set currency(e){this.$$set({currency:e}),k()}get status(){return this.$$.ctx[0]}set status(e){this.$$set({status:e}),k()}get limit(){return this.$$.ctx[9]}set limit(e){this.$$set({limit:e}),k()}}
753
760
  // @ts-ignore
754
- return!customElements.get("casino-wagering-bonuses-controller")&&customElements.define("casino-wagering-bonuses-controller",Or),Or}));
761
+ return!customElements.get("casino-wagering-bonuses-controller")&&customElements.define("casino-wagering-bonuses-controller",$r),$r}));
755
762
  //# sourceMappingURL=casino-wagering-bonuses-controller.js.map