@everymatrix/casino-bonuses-controller 1.22.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -0
- package/dist/casino-bonuses-controller.js +1452 -0
- package/dist/casino-bonuses-controller.js.map +1 -0
- package/index.html +42 -0
- package/index.js +1 -0
- package/package.json +39 -0
- package/public/favicon.png +0 -0
- package/public/reset.css +48 -0
- package/rollup.config.js +59 -0
- package/src/CasinoBonusesController.svelte +882 -0
- package/src/base.ts +175 -0
- package/src/component/CasinoBonusCard.svelte +1154 -0
- package/src/component/CasinoBonusPagination.svelte +192 -0
- package/src/component/CasinoBonusProgress.svelte +97 -0
- package/src/i18n.js +28 -0
- package/src/index.ts +11 -0
- package/src/pagination.js +121 -0
- package/src/translation.js +65 -0
- package/stories/CasinoBonusesController.stories.js +13 -0
- package/tsconfig.json +6 -0
|
@@ -0,0 +1,1452 @@
|
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("@vaadin/vaadin-date-picker/vaadin-date-picker.js")):"function"==typeof define&&define.amd?define(["@vaadin/vaadin-date-picker/vaadin-date-picker.js"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).app=t()}(this,(function(){"use strict";function e(){}function t(e,t){
|
|
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 u(t,...n){if(null==t)return e;const r=t.subscribe(...n);return r.unsubscribe?()=>r.unsubscribe():r}function c(e,t,n){e.$$.on_destroy.push(u(t,n))}const d=["",!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 m(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 y(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function b(e){return document.createTextNode(e)}function v(){return b(" ")}function w(){return b("")}function _(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function C(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 B=["width","height"];function x(e,t){
|
|
11
|
+
// @ts-ignore
|
|
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===B.indexOf(r)?e[r]=t[r]:C(e,r,t[r])}function E(e,t){for(const n in t)C(e,n,t[n])}function T(e,t,n){t in e?e[t]="boolean"==typeof e[t]&&""===n||n:C(e,t,n)}function M(e){return""===e?null:+e}function S(e,t){t=""+t,e.data!==t&&(e.data=t)}function k(e,t,n){~d.indexOf(n)?function(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}(e,t):S(e,t)}function D(e,t){e.value=null==t?"":t}function P(e,t,n,r){null==n?e.style.removeProperty(t):e.style.setProperty(t,n,r?"important":"")}function A(e,t,n){e.classList[n?"add":"remove"](t)}function O(e){const t={};for(const n of e)t[n.name]=n.value;return t}let H;function L(e){H=e}
|
|
13
|
+
/**
|
|
14
|
+
* The `onMount` function schedules a callback to run as soon as the component has been mounted to the DOM.
|
|
15
|
+
* It must be called during the component's initialisation (but doesn't need to live *inside* the component;
|
|
16
|
+
* it can be called from an external module).
|
|
17
|
+
*
|
|
18
|
+
* `onMount` does not run inside a [server-side component](/docs#run-time-server-side-component-api).
|
|
19
|
+
*
|
|
20
|
+
* https://svelte.dev/docs#run-time-svelte-onmount
|
|
21
|
+
*/
|
|
22
|
+
function N(e){(function(){if(!H)throw new Error("Function called outside component initialization");return H})().$$.on_mount.push(e)}const R=[],F=[];let $=[];const I=[],Y=Promise.resolve();let U=!1;function W(e){$.push(e)}
|
|
23
|
+
// flush() calls callbacks in this order:
|
|
24
|
+
// 1. All beforeUpdate callbacks, in order: parents before children
|
|
25
|
+
// 2. All bind:this callbacks, in reverse order: children before parents.
|
|
26
|
+
// 3. All afterUpdate callbacks, in order: parents before children. EXCEPT
|
|
27
|
+
// for afterUpdates called during the initial onMount, which are called in
|
|
28
|
+
// reverse order: children before parents.
|
|
29
|
+
// Since callbacks might update component values, which could trigger another
|
|
30
|
+
// call to flush(), the following steps guard against this:
|
|
31
|
+
// 1. During beforeUpdate, any updated components will be added to the
|
|
32
|
+
// dirty_components array and will cause a reentrant call to flush(). Because
|
|
33
|
+
// the flush index is kept outside the function, the reentrant call will pick
|
|
34
|
+
// up where the earlier call left off and go through all dirty components. The
|
|
35
|
+
// current_component value is saved and restored so that the reentrant call will
|
|
36
|
+
// not interfere with the "parent" flush() call.
|
|
37
|
+
// 2. bind:this callbacks cannot trigger new flush() calls.
|
|
38
|
+
// 3. During afterUpdate, any updated components will NOT have their afterUpdate
|
|
39
|
+
// callback called a second time; the seen_callbacks set, outside the flush()
|
|
40
|
+
// function, guarantees this behavior.
|
|
41
|
+
const G=new Set;let j=0;// Do *not* move this inside the flush() function
|
|
42
|
+
function V(){
|
|
43
|
+
// Do not reenter flush while dirty components are updated, as this can
|
|
44
|
+
// result in an infinite loop. Instead, let the inner flush handle it.
|
|
45
|
+
// Reentrancy is ok afterwards for bindings etc.
|
|
46
|
+
if(0!==j)return;const e=H;do{
|
|
47
|
+
// first, call beforeUpdate functions
|
|
48
|
+
// and update components
|
|
49
|
+
try{for(;j<R.length;){const e=R[j];j++,L(e),z(e.$$)}}catch(e){
|
|
50
|
+
// reset dirty state to not end up in a deadlocked state and then rethrow
|
|
51
|
+
throw R.length=0,j=0,e}for(L(null),R.length=0,j=0;F.length;)F.pop()();
|
|
52
|
+
// then, once components are updated, call
|
|
53
|
+
// afterUpdate functions. This may cause
|
|
54
|
+
// subsequent updates...
|
|
55
|
+
for(let e=0;e<$.length;e+=1){const t=$[e];G.has(t)||(
|
|
56
|
+
// ...so guard against infinite loops
|
|
57
|
+
G.add(t),t())}$.length=0}while(R.length);for(;I.length;)I.pop()();U=!1,G.clear(),L(e)}function z(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(W)}}
|
|
58
|
+
/**
|
|
59
|
+
* Useful for example to execute remaining `afterUpdate` callbacks before executing `destroy`.
|
|
60
|
+
*/const Z=new Set;function K(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 X(e,t){const n=e.$$;null!==n.fragment&&(!function(e){const t=[],n=[];$.forEach((r=>-1===e.indexOf(r)?t.push(r):n.push(r))),n.forEach((e=>e())),$=t}(n.after_update),o(n.on_destroy),n.fragment&&n.fragment.d(t),
|
|
61
|
+
// TODO null out other refs, including component.$$ (but need to
|
|
62
|
+
// preserve final state?)
|
|
63
|
+
n.on_destroy=n.fragment=null,n.ctx=[])}function J(e,t){-1===e.$$.dirty[0]&&(R.push(e),U||(U=!0,Y.then(V)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function q(t,s,a,l,u,c,d,h=[-1]){const f=H;L(t);const m=t.$$={fragment:null,ctx:[],
|
|
64
|
+
// state
|
|
65
|
+
props:c,update:e,not_equal:u,bound:r(),
|
|
66
|
+
// lifecycle
|
|
67
|
+
on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(s.context||(f?f.$$.context:[])),
|
|
68
|
+
// everything else
|
|
69
|
+
callbacks:r(),dirty:h,skip_bound:!1,root:s.target||f.$$.root};d&&d(m.root);let g=!1;if(m.ctx=a?a(t,s.props||{},((e,n,...r)=>{const o=r.length?r[0]:n;return m.ctx&&u(m.ctx[e],m.ctx[e]=o)&&(!m.skip_bound&&m.bound[e]&&m.bound[e](o),g&&J(t,e)),n})):[],m.update(),g=!0,o(m.before_update),
|
|
70
|
+
// `false` as a special case of no DOM component
|
|
71
|
+
m.fragment=!!l&&l(m.ctx),s.target){if(s.hydrate){const e=function(e){return Array.from(e.childNodes)}(s.target);
|
|
72
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
73
|
+
m.fragment&&m.fragment.l(e),e.forEach(p)}else
|
|
74
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
75
|
+
m.fragment&&m.fragment.c();s.intro&&((y=t.$$.fragment)&&y.i&&(Z.delete(y),y.i(b))),function(e,t,r,s){const{fragment:a,after_update:l}=e.$$;a&&a.m(t,r),s||
|
|
76
|
+
// onMount happens before the initial afterUpdate
|
|
77
|
+
W((()=>{const t=e.$$.on_mount.map(n).filter(i);
|
|
78
|
+
// if the component was destroyed immediately
|
|
79
|
+
// it will update the `$$.on_destroy` reference to `null`.
|
|
80
|
+
// the destructured on_destroy may still reference to the old array
|
|
81
|
+
e.$$.on_destroy?e.$$.on_destroy.push(...t):
|
|
82
|
+
// Edge case - component was destroyed immediately,
|
|
83
|
+
// most likely as a result of a binding initialising
|
|
84
|
+
o(t),e.$$.on_mount=[]})),l.forEach(W)}(t,s.target,s.anchor,s.customElement),V()}var y,b;L(f)}let Q;"function"==typeof HTMLElement&&(Q=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:e}=this.$$;this.$$.on_disconnect=e.map(n).filter(i);
|
|
85
|
+
// @ts-ignore todo: improve typings
|
|
86
|
+
for(const e in this.$$.slotted)
|
|
87
|
+
// @ts-ignore todo: improve typings
|
|
88
|
+
this.appendChild(this.$$.slotted[e])}attributeChangedCallback(e,t,n){this[e]=n}disconnectedCallback(){o(this.$$.on_disconnect)}$destroy(){X(this,1),this.$destroy=e}$on(t,n){
|
|
89
|
+
// TODO should this delegate to addEventListener?
|
|
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)}});const ee=[];
|
|
91
|
+
/**
|
|
92
|
+
* Creates a `Readable` store that allows reading by subscription.
|
|
93
|
+
* @param value initial value
|
|
94
|
+
* @param {StartStopNotifier} [start]
|
|
95
|
+
*/
|
|
96
|
+
/**
|
|
97
|
+
* Create a `Writable` store that allows both updating and reading by subscription.
|
|
98
|
+
* @param {*=}value initial value
|
|
99
|
+
* @param {StartStopNotifier=} start
|
|
100
|
+
*/
|
|
101
|
+
function te(t,n=e){let r;const o=new Set;function i(e){if(s(t,e)&&(t=e,r)){// store is ready
|
|
102
|
+
const e=!ee.length;for(const e of o)e[1](),ee.push(e,t);if(e){for(let e=0;e<ee.length;e+=2)ee[e][0](ee[e+1]);ee.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 ne(t,n,r){const s=!Array.isArray(t),a=s?[t]:t,l=n.length<2;return c=t=>{let r=!1;const c=[];let d=0,h=e;const f=()=>{if(d)return;h();const r=n(s?c[0]:c,t);l?t(r):h=i(r)?r:e},p=a.map(((e,t)=>u(e,(e=>{c[t]=e,d&=~(1<<t),r&&f()}),(()=>{d|=1<<t}))));return r=!0,f(),function(){o(p),h(),
|
|
103
|
+
// We need to set this to false because callbacks can still happen despite having unsubscribed:
|
|
104
|
+
// Callbacks might already be placed in the queue which doesn't know it should no longer
|
|
105
|
+
// invoke this derived store.
|
|
106
|
+
r=!1}},{subscribe:te(r,c).subscribe};var c}var re=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===oe}(e)}
|
|
107
|
+
// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
|
|
108
|
+
(e)};var oe="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function ie(e,t){return!1!==t.clone&&t.isMergeableObject(e)?ce((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function se(e,t,n){return e.concat(t).map((function(e){return ie(e,n)}))}function ae(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 le(e,t){try{return t in e}catch(e){return!1}}
|
|
109
|
+
// Protects from prototype poisoning and unexpected merging up the prototype chain.
|
|
110
|
+
function ue(e,t,n){var r={};return n.isMergeableObject(e)&&ae(e).forEach((function(t){r[t]=ie(e[t],n)})),ae(t).forEach((function(o){(function(e,t){return le(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t));// and also unsafe if they're nonenumerable.
|
|
111
|
+
})(e,o)||(le(e,o)&&n.isMergeableObject(t[o])?r[o]=function(e,t){if(!t.customMerge)return ce;var n=t.customMerge(e);return"function"==typeof n?n:ce}(o,n)(e[o],t[o],n):r[o]=ie(t[o],n))})),r}function ce(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||se,n.isMergeableObject=n.isMergeableObject||re,
|
|
112
|
+
// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()
|
|
113
|
+
// implementations can use it. The caller may not replace it.
|
|
114
|
+
n.cloneUnlessOtherwiseSpecified=ie;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):ue(e,t,n):ie(t,n)}ce.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return ce(e,n,t)}),{})};var de=ce,he=function(e,t){return he=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])},he(e,t)};function fe(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}he(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var pe,me,ge,ye=function(){return ye=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},ye.apply(this,arguments)};function be(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))}
|
|
115
|
+
/**
|
|
116
|
+
* Type Guards
|
|
117
|
+
*/
|
|
118
|
+
function ve(e){return e.type===me.literal}function we(e){return e.type===me.argument}function _e(e){return e.type===me.number}function Ce(e){return e.type===me.date}function Be(e){return e.type===me.time}function xe(e){return e.type===me.select}function Ee(e){return e.type===me.plural}function Te(e){return e.type===me.pound}function Me(e){return e.type===me.tag}function Se(e){return!(!e||"object"!=typeof e||e.type!==ge.number)}function ke(e){return!(!e||"object"!=typeof e||e.type!==ge.dateTime)}
|
|
119
|
+
// @generated from regex-gen.ts
|
|
120
|
+
"function"==typeof SuppressedError&&SuppressedError,function(e){
|
|
121
|
+
/** Argument is unclosed (e.g. `{0`) */
|
|
122
|
+
e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",
|
|
123
|
+
/** Argument is empty (e.g. `{}`). */
|
|
124
|
+
e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",
|
|
125
|
+
/** Argument is malformed (e.g. `{foo!}``) */
|
|
126
|
+
e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",
|
|
127
|
+
/** Expect an argument type (e.g. `{foo,}`) */
|
|
128
|
+
e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",
|
|
129
|
+
/** Unsupported argument type (e.g. `{foo,foo}`) */
|
|
130
|
+
e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",
|
|
131
|
+
/** Expect an argument style (e.g. `{foo, number, }`) */
|
|
132
|
+
e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",
|
|
133
|
+
/** The number skeleton is invalid. */
|
|
134
|
+
e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",
|
|
135
|
+
/** The date time skeleton is invalid. */
|
|
136
|
+
e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",
|
|
137
|
+
/** Exepct a number skeleton following the `::` (e.g. `{foo, number, ::}`) */
|
|
138
|
+
e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",
|
|
139
|
+
/** Exepct a date time skeleton following the `::` (e.g. `{foo, date, ::}`) */
|
|
140
|
+
e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",
|
|
141
|
+
/** Unmatched apostrophes in the argument style (e.g. `{foo, number, 'test`) */
|
|
142
|
+
e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",
|
|
143
|
+
/** Missing select argument options (e.g. `{foo, select}`) */
|
|
144
|
+
e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",
|
|
145
|
+
/** Expecting an offset value in `plural` or `selectordinal` argument (e.g `{foo, plural, offset}`) */
|
|
146
|
+
e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",
|
|
147
|
+
/** Offset value in `plural` or `selectordinal` is invalid (e.g. `{foo, plural, offset: x}`) */
|
|
148
|
+
e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",
|
|
149
|
+
/** Expecting a selector in `select` argument (e.g `{foo, select}`) */
|
|
150
|
+
e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",
|
|
151
|
+
/** Expecting a selector in `plural` or `selectordinal` argument (e.g `{foo, plural}`) */
|
|
152
|
+
e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",
|
|
153
|
+
/** Expecting a message fragment after the `select` selector (e.g. `{foo, select, apple}`) */
|
|
154
|
+
e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",
|
|
155
|
+
/**
|
|
156
|
+
* Expecting a message fragment after the `plural` or `selectordinal` selector
|
|
157
|
+
* (e.g. `{foo, plural, one}`)
|
|
158
|
+
*/
|
|
159
|
+
e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",
|
|
160
|
+
/** Selector in `plural` or `selectordinal` is malformed (e.g. `{foo, plural, =x {#}}`) */
|
|
161
|
+
e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",
|
|
162
|
+
/**
|
|
163
|
+
* Duplicate selectors in `plural` or `selectordinal` argument.
|
|
164
|
+
* (e.g. {foo, plural, one {#} one {#}})
|
|
165
|
+
*/
|
|
166
|
+
e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",
|
|
167
|
+
/** Duplicate selectors in `select` argument.
|
|
168
|
+
* (e.g. {foo, select, apple {apple} apple {apple}})
|
|
169
|
+
*/
|
|
170
|
+
e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",
|
|
171
|
+
/** Plural or select argument option must have `other` clause. */
|
|
172
|
+
e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",
|
|
173
|
+
/** The tag is malformed. (e.g. `<bold!>foo</bold!>) */
|
|
174
|
+
e[e.INVALID_TAG=23]="INVALID_TAG",
|
|
175
|
+
/** The tag name is invalid. (e.g. `<123>foo</123>`) */
|
|
176
|
+
e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",
|
|
177
|
+
/** The closing tag does not match the opening tag. (e.g. `<bold>foo</italic>`) */
|
|
178
|
+
e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",
|
|
179
|
+
/** The opening tag has unmatched closing tag. (e.g. `<bold>foo`) */
|
|
180
|
+
e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(pe||(pe={})),function(e){
|
|
181
|
+
/**
|
|
182
|
+
* Raw text
|
|
183
|
+
*/
|
|
184
|
+
e[e.literal=0]="literal",
|
|
185
|
+
/**
|
|
186
|
+
* Variable w/o any format, e.g `var` in `this is a {var}`
|
|
187
|
+
*/
|
|
188
|
+
e[e.argument=1]="argument",
|
|
189
|
+
/**
|
|
190
|
+
* Variable w/ number format
|
|
191
|
+
*/
|
|
192
|
+
e[e.number=2]="number",
|
|
193
|
+
/**
|
|
194
|
+
* Variable w/ date format
|
|
195
|
+
*/
|
|
196
|
+
e[e.date=3]="date",
|
|
197
|
+
/**
|
|
198
|
+
* Variable w/ time format
|
|
199
|
+
*/
|
|
200
|
+
e[e.time=4]="time",
|
|
201
|
+
/**
|
|
202
|
+
* Variable w/ select format
|
|
203
|
+
*/
|
|
204
|
+
e[e.select=5]="select",
|
|
205
|
+
/**
|
|
206
|
+
* Variable w/ plural format
|
|
207
|
+
*/
|
|
208
|
+
e[e.plural=6]="plural",
|
|
209
|
+
/**
|
|
210
|
+
* Only possible within plural argument.
|
|
211
|
+
* This is the `#` symbol that will be substituted with the count.
|
|
212
|
+
*/
|
|
213
|
+
e[e.pound=7]="pound",
|
|
214
|
+
/**
|
|
215
|
+
* XML-like tag
|
|
216
|
+
*/
|
|
217
|
+
e[e.tag=8]="tag"}(me||(me={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(ge||(ge={}));var De=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Pe=/(?:[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;
|
|
218
|
+
/**
|
|
219
|
+
* https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
|
|
220
|
+
* Credit: https://github.com/caridy/intl-datetimeformat-pattern/blob/master/index.js
|
|
221
|
+
* with some tweaks
|
|
222
|
+
*/
|
|
223
|
+
/**
|
|
224
|
+
* Parse Date time skeleton into Intl.DateTimeFormatOptions
|
|
225
|
+
* Ref: https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
|
|
226
|
+
* @public
|
|
227
|
+
* @param skeleton skeleton string
|
|
228
|
+
*/
|
|
229
|
+
function Ae(e){var t={};return e.replace(Pe,(function(e){var n=e.length;switch(e[0]){
|
|
230
|
+
// Era
|
|
231
|
+
case"G":t.era=4===n?"long":5===n?"narrow":"short";break;
|
|
232
|
+
// Year
|
|
233
|
+
case"y":t.year=2===n?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");
|
|
234
|
+
// Quarter
|
|
235
|
+
case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");
|
|
236
|
+
// Month
|
|
237
|
+
case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][n-1];break;
|
|
238
|
+
// Week
|
|
239
|
+
case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");
|
|
240
|
+
// Weekday
|
|
241
|
+
case"E":t.weekday=4===n?"short":5===n?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;
|
|
242
|
+
// Period
|
|
243
|
+
case"a":// AM, PM
|
|
244
|
+
t.hour12=!0;break;case"b":// am, pm, noon, midnight
|
|
245
|
+
case"B":// flexible day periods
|
|
246
|
+
throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");
|
|
247
|
+
// Hour
|
|
248
|
+
case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][n-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][n-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][n-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][n-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");
|
|
249
|
+
// Minute
|
|
250
|
+
case"m":t.minute=["numeric","2-digit"][n-1];break;
|
|
251
|
+
// Second
|
|
252
|
+
case"s":t.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");
|
|
253
|
+
// Zone
|
|
254
|
+
case"z":// 1..3, 4: specific non-location format
|
|
255
|
+
t.timeZoneName=n<4?"short":"long";break;case"Z":// 1..3, 4, 5: The ISO8601 varios formats
|
|
256
|
+
case"O":// 1, 4: miliseconds in day short, long
|
|
257
|
+
case"v":// 1, 4: generic non-location format
|
|
258
|
+
case"V":// 1, 2, 3, 4: time zone ID or city
|
|
259
|
+
case"X":// 1, 2, 3, 4: The ISO8601 varios formats
|
|
260
|
+
case"x":// 1, 2, 3, 4: The ISO8601 varios formats
|
|
261
|
+
throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""})),t}
|
|
262
|
+
// @generated from regex-gen.ts
|
|
263
|
+
var Oe=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;var He=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Le=/^(@+)?(\+|#+)?[rs]?$/g,Ne=/(\*)(0+)|(#+)(0+)|(0+)/g,Re=/^(0+)$/;function Fe(e){var t={};return"r"===e[e.length-1]?t.roundingPriority="morePrecision":"s"===e[e.length-1]&&(t.roundingPriority="lessPrecision"),e.replace(Le,(function(e,n,r){
|
|
264
|
+
// @@@ case
|
|
265
|
+
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 $e(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 Ie(e){
|
|
266
|
+
// Engineering
|
|
267
|
+
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)),!Re.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Ye(e){var t=$e(e);return t||{}}
|
|
268
|
+
/**
|
|
269
|
+
* https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md#skeleton-stems-and-options
|
|
270
|
+
*/function Ue(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=ye(ye(ye({},t),{notation:"scientific"}),o.options.reduce((function(e,t){return ye(ye({},e),Ye(t))}),{}));continue;case"engineering":t=ye(ye(ye({},t),{notation:"engineering"}),o.options.reduce((function(e,t){return ye(ye({},e),Ye(t))}),{}));continue;case"notation-simple":t.notation="standard";continue;
|
|
271
|
+
// https://github.com/unicode-org/icu/blob/master/icu4c/source/i18n/unicode/unumberformatter.h
|
|
272
|
+
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;
|
|
273
|
+
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width
|
|
274
|
+
case"integer-width":if(o.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");o.options[0].replace(Ne,(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}
|
|
275
|
+
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width
|
|
276
|
+
if(Re.test(o.stem))t.minimumIntegerDigits=o.stem.length;else if(He.test(o.stem)){
|
|
277
|
+
// Precision
|
|
278
|
+
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#fraction-precision
|
|
279
|
+
// precision-integer case
|
|
280
|
+
if(o.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");o.stem.replace(He,(function(e,n,r,o,i,s){
|
|
281
|
+
// .000* case (before ICU67 it was .000+)
|
|
282
|
+
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];
|
|
283
|
+
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#trailing-zero-display
|
|
284
|
+
"w"===i?t=ye(ye({},t),{trailingZeroDisplay:"stripIfInteger"}):i&&(t=ye(ye({},t),Fe(i)))}
|
|
285
|
+
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#significant-digits-precision
|
|
286
|
+
else if(Le.test(o.stem))t=ye(ye({},t),Fe(o.stem));else{var s=$e(o.stem);s&&(t=ye(ye({},t),s));var a=Ie(o.stem);a&&(t=ye(ye({},t),a))}}return t}
|
|
287
|
+
// @generated from time-data-gen.ts
|
|
288
|
+
// prettier-ignore
|
|
289
|
+
var We,Ge={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"]};
|
|
290
|
+
/**
|
|
291
|
+
* Returns the best matching date time pattern if a date time skeleton
|
|
292
|
+
* pattern is provided with a locale. Follows the Unicode specification:
|
|
293
|
+
* https://www.unicode.org/reports/tr35/tr35-dates.html#table-mapping-requested-time-skeletons-to-patterns
|
|
294
|
+
* @param skeleton date time skeleton pattern that possibly includes j, J or C
|
|
295
|
+
* @param locale
|
|
296
|
+
*/
|
|
297
|
+
/**
|
|
298
|
+
* Maps the [hour cycle type](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/hourCycle)
|
|
299
|
+
* of the given `locale` to the corresponding time pattern.
|
|
300
|
+
* @param locale
|
|
301
|
+
*/
|
|
302
|
+
function je(e){var t=e.hourCycle;if(void 0===t&&
|
|
303
|
+
// @ts-ignore hourCycle(s) is not identified yet
|
|
304
|
+
e.hourCycles&&
|
|
305
|
+
// @ts-ignore
|
|
306
|
+
e.hourCycles.length&&(
|
|
307
|
+
// @ts-ignore
|
|
308
|
+
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")}
|
|
309
|
+
// TODO: Once hourCycle is fully supported remove the following with data generation
|
|
310
|
+
var n,r=e.language;return"root"!==r&&(n=e.maximize().region),(Ge[n||""]||Ge[r||""]||Ge["".concat(r,"-001")]||Ge["001"])[0]}var Ve=new RegExp("^".concat(De.source,"*")),ze=new RegExp("".concat(De.source,"*$"));function Ze(e,t){return{start:e,end:t}}
|
|
311
|
+
// #region Ponyfills
|
|
312
|
+
// Consolidate these variables up top for easier toggling during debugging
|
|
313
|
+
var Ke=!!String.prototype.startsWith,Xe=!!String.fromCodePoint,Je=!!Object.fromEntries,qe=!!String.prototype.codePointAt,Qe=!!String.prototype.trimStart,et=!!String.prototype.trimEnd,tt=!!Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},nt=!0;try{
|
|
314
|
+
/**
|
|
315
|
+
* legacy Edge or Xbox One browser
|
|
316
|
+
* Unicode flag support: supported
|
|
317
|
+
* Pattern_Syntax support: not supported
|
|
318
|
+
* See https://github.com/formatjs/formatjs/issues/2822
|
|
319
|
+
*/
|
|
320
|
+
nt="a"===(null===(We=ct("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===We?void 0:We[0])}catch(e){nt=!1}var rt,ot=Ke?// Native
|
|
321
|
+
function(e,t,n){return e.startsWith(t,n)}:// For IE11
|
|
322
|
+
function(e,t,n){return e.slice(n,n+t.length)===t},it=Xe?String.fromCodePoint:// IE11
|
|
323
|
+
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},st=
|
|
324
|
+
// native
|
|
325
|
+
Je?Object.fromEntries:// Ponyfill
|
|
326
|
+
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},at=qe?// Native
|
|
327
|
+
function(e,t){return e.codePointAt(t)}:// IE 11
|
|
328
|
+
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}},lt=Qe?// Native
|
|
329
|
+
function(e){return e.trimStart()}:// Ponyfill
|
|
330
|
+
function(e){return e.replace(Ve,"")},ut=et?// Native
|
|
331
|
+
function(e){return e.trimEnd()}:// Ponyfill
|
|
332
|
+
function(e){return e.replace(ze,"")};
|
|
333
|
+
// Prevent minifier to translate new RegExp to literal form that might cause syntax error on IE11.
|
|
334
|
+
function ct(e,t){return new RegExp(e,t)}
|
|
335
|
+
// #endregion
|
|
336
|
+
if(nt){
|
|
337
|
+
// Native
|
|
338
|
+
var dt=ct("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");rt=function(e,t){var n;return dt.lastIndex=t,null!==(n=dt.exec(e)[1])&&void 0!==n?n:""}}else
|
|
339
|
+
// IE11
|
|
340
|
+
rt=function(e,t){for(var n=[];;){var r=at(e,t);if(void 0===r||pt(r)||mt(r))break;n.push(r),t+=r>=65536?2:1}return it.apply(void 0,n)};var ht=/** @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(pe.UNMATCHED_CLOSING_TAG,Ze(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:me.pound,location:Ze(s,this.clonePosition())})}}}return{val:r,err:null}},
|
|
341
|
+
/**
|
|
342
|
+
* A tag name must start with an ASCII lower/upper case letter. The grammar is based on the
|
|
343
|
+
* [custom element name][] except that a dash is NOT always mandatory and uppercase letters
|
|
344
|
+
* are accepted:
|
|
345
|
+
*
|
|
346
|
+
* ```
|
|
347
|
+
* tag ::= "<" tagName (whitespace)* "/>" | "<" tagName (whitespace)* ">" message "</" tagName (whitespace)* ">"
|
|
348
|
+
* tagName ::= [a-z] (PENChar)*
|
|
349
|
+
* PENChar ::=
|
|
350
|
+
* "-" | "." | [0-9] | "_" | [a-z] | [A-Z] | #xB7 | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x37D] |
|
|
351
|
+
* [#x37F-#x1FFF] | [#x200C-#x200D] | [#x203F-#x2040] | [#x2070-#x218F] | [#x2C00-#x2FEF] |
|
|
352
|
+
* [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
|
|
353
|
+
* ```
|
|
354
|
+
*
|
|
355
|
+
* [custom element name]: https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name
|
|
356
|
+
* NOTE: We're a bit more lax here since HTML technically does not allow uppercase HTML element but we do
|
|
357
|
+
* since other tag-based engines like React allow it
|
|
358
|
+
*/
|
|
359
|
+
e.prototype.parseTag=function(e,t){var n=this.clonePosition();this.bump();// `<`
|
|
360
|
+
var r=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))
|
|
361
|
+
// Self closing tag
|
|
362
|
+
return{val:{type:me.literal,value:"<".concat(r,"/>"),location:Ze(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();
|
|
363
|
+
// Expecting a close tag
|
|
364
|
+
if(this.bumpIf("</")){if(this.isEOF()||!ft(this.char()))return this.error(pe.INVALID_TAG,Ze(s,this.clonePosition()));var a=this.clonePosition();return r!==this.parseTagName()?this.error(pe.UNMATCHED_CLOSING_TAG,Ze(a,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:me.tag,value:r,children:i,location:Ze(n,this.clonePosition())},err:null}:this.error(pe.INVALID_TAG,Ze(s,this.clonePosition())))}return this.error(pe.UNCLOSED_TAG,Ze(n,this.clonePosition()))}return this.error(pe.INVALID_TAG,Ze(n,this.clonePosition()))},
|
|
365
|
+
/**
|
|
366
|
+
* This method assumes that the caller has peeked ahead for the first tag character.
|
|
367
|
+
*/
|
|
368
|
+
e.prototype.parseTagName=function(){var e,t=this.offset();// the first tag name character
|
|
369
|
+
for(this.bump();!this.isEOF()&&(45/* '-' */===(e=this.char())||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);)this.bump();return this.message.slice(t,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=Ze(n,this.clonePosition());return{val:{type:me.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;
|
|
370
|
+
/** See `parseTag` function docs. */},
|
|
371
|
+
/**
|
|
372
|
+
* Starting with ICU 4.8, an ASCII apostrophe only starts quoted text if it immediately precedes
|
|
373
|
+
* a character that requires quoting (that is, "only where needed"), and works the same in
|
|
374
|
+
* nested messages as on the top level of the pattern. The new behavior is otherwise compatible.
|
|
375
|
+
*/
|
|
376
|
+
e.prototype.tryParseQuote=function(e){if(this.isEOF()||39/* `'` */!==this.char())return null;
|
|
377
|
+
// Parse escaped char following the apostrophe, or early return if there is no escaped char.
|
|
378
|
+
// Check if is valid escaped character
|
|
379
|
+
switch(this.peek()){case 39/* `'` */:
|
|
380
|
+
// double quote, should return as a single quote.
|
|
381
|
+
return this.bump(),this.bump(),"'";
|
|
382
|
+
// '{', '<', '>', '}'
|
|
383
|
+
case 123:case 60:case 62:case 125:break;case 35:// '#'
|
|
384
|
+
if("plural"===e||"selectordinal"===e)break;return null;default:return null}this.bump();// apostrophe
|
|
385
|
+
var t=[this.char()];// escaped char
|
|
386
|
+
// read chars until the optional closing apostrophe is found
|
|
387
|
+
for(this.bump();!this.isEOF();){var n=this.char();if(39/* `'` */===n){if(39/* `'` */!==this.peek()){
|
|
388
|
+
// Optional closing apostrophe.
|
|
389
|
+
this.bump();break}t.push(39),
|
|
390
|
+
// Bump one more time because we need to skip 2 characters.
|
|
391
|
+
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(),// `{`
|
|
392
|
+
this.bumpSpace(),this.isEOF())return this.error(pe.EXPECT_ARGUMENT_CLOSING_BRACE,Ze(n,this.clonePosition()));if(125/* `}` */===this.char())return this.bump(),this.error(pe.EMPTY_ARGUMENT,Ze(n,this.clonePosition()));
|
|
393
|
+
// argument name
|
|
394
|
+
var r=this.parseIdentifierIfPossible().value;if(!r)return this.error(pe.MALFORMED_ARGUMENT,Ze(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(pe.EXPECT_ARGUMENT_CLOSING_BRACE,Ze(n,this.clonePosition()));switch(this.char()){
|
|
395
|
+
// Simple argument: `{name}`
|
|
396
|
+
case 125/* `}` */:// `}`
|
|
397
|
+
return this.bump(),{val:{type:me.argument,
|
|
398
|
+
// value does not include the opening and closing braces.
|
|
399
|
+
value:r,location:Ze(n,this.clonePosition())},err:null};
|
|
400
|
+
// Argument with options: `{name, format, ...}`
|
|
401
|
+
case 44/* `,` */:return this.bump(),// `,`
|
|
402
|
+
this.bumpSpace(),this.isEOF()?this.error(pe.EXPECT_ARGUMENT_CLOSING_BRACE,Ze(n,this.clonePosition())):this.parseArgumentOptions(e,t,r,n);default:return this.error(pe.MALFORMED_ARGUMENT,Ze(n,this.clonePosition()))}},
|
|
403
|
+
/**
|
|
404
|
+
* Advance the parser until the end of the identifier, if it is currently on
|
|
405
|
+
* an identifier character. Return an empty string otherwise.
|
|
406
|
+
*/
|
|
407
|
+
e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),n=rt(this.message,t),r=t+n.length;return this.bumpTo(r),{value:n,location:Ze(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,n,r){var o,i=this.clonePosition(),s=this.parseIdentifierIfPossible().value,a=this.clonePosition();
|
|
408
|
+
// Parse this range:
|
|
409
|
+
// {name, type, style}
|
|
410
|
+
// ^---^
|
|
411
|
+
switch(s){case"":
|
|
412
|
+
// Expecting a style string number, date, time, plural, selectordinal, or select.
|
|
413
|
+
return this.error(pe.EXPECT_ARGUMENT_TYPE,Ze(i,a));case"number":case"date":case"time":
|
|
414
|
+
// Parse this range:
|
|
415
|
+
// {name, number, style}
|
|
416
|
+
// ^-------^
|
|
417
|
+
this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var u=this.clonePosition();if((y=this.parseSimpleArgStyleIfPossible()).err)return y;if(0===(f=ut(y.val)).length)return this.error(pe.EXPECT_ARGUMENT_STYLE,Ze(this.clonePosition(),this.clonePosition()));l={style:f,styleLocation:Ze(u,this.clonePosition())}}if((b=this.tryParseArgumentClose(r)).err)return b;var c=Ze(r,this.clonePosition());
|
|
418
|
+
// Extract style or skeleton
|
|
419
|
+
if(l&&ot(null==l?void 0:l.style,"::",0)){
|
|
420
|
+
// Skeleton starts with `::`.
|
|
421
|
+
var d=lt(l.style.slice(2));if("number"===s)return(y=this.parseNumberSkeletonFromString(d,l.styleLocation)).err?y:{val:{type:me.number,value:n,location:c,style:y.val},err:null};if(0===d.length)return this.error(pe.EXPECT_DATE_TIME_SKELETON,c);var h=d;
|
|
422
|
+
// Get "best match" pattern only if locale is passed, if not, let it
|
|
423
|
+
// pass as-is where `parseDateTimeSkeleton()` will throw an error
|
|
424
|
+
// for unsupported patterns.
|
|
425
|
+
this.locale&&(h=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=je(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}(d,this.locale));var f={type:ge.dateTime,pattern:h,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?Ae(h):{}};return{val:{type:"date"===s?me.date:me.time,value:n,location:c,style:f},err:null}}
|
|
426
|
+
// Regular style or no style.
|
|
427
|
+
return{val:{type:"number"===s?me.number:"date"===s?me.date:me.time,value:n,location:c,style:null!==(o=null==l?void 0:l.style)&&void 0!==o?o:null},err:null};case"plural":case"selectordinal":case"select":
|
|
428
|
+
// Parse this range:
|
|
429
|
+
// {name, plural, options}
|
|
430
|
+
// ^---------^
|
|
431
|
+
var p=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(pe.EXPECT_SELECT_ARGUMENT_OPTIONS,Ze(p,ye({},p)));this.bumpSpace();
|
|
432
|
+
// Parse offset:
|
|
433
|
+
// {name, plural, offset:1, options}
|
|
434
|
+
// ^-----^
|
|
435
|
+
// or the first option:
|
|
436
|
+
// {name, plural, one {...} other {...}}
|
|
437
|
+
// ^--^
|
|
438
|
+
var m=this.parseIdentifierIfPossible(),g=0;if("select"!==s&&"offset"===m.value){if(!this.bumpIf(":"))return this.error(pe.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Ze(this.clonePosition(),this.clonePosition()));var y;if(this.bumpSpace(),(y=this.tryParseDecimalInteger(pe.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,pe.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return y;
|
|
439
|
+
// Parse another identifier for option parsing
|
|
440
|
+
this.bumpSpace(),m=this.parseIdentifierIfPossible(),g=y.val}var b,v=this.tryParsePluralOrSelectOptions(e,s,t,m);if(v.err)return v;if((b=this.tryParseArgumentClose(r)).err)return b;var w=Ze(r,this.clonePosition());return"select"===s?{val:{type:me.select,value:n,options:st(v.val),location:w},err:null}:{val:{type:me.plural,value:n,options:st(v.val),offset:g,pluralType:"plural"===s?"cardinal":"ordinal",location:w},err:null};default:return this.error(pe.INVALID_ARGUMENT_TYPE,Ze(i,a))}},e.prototype.tryParseArgumentClose=function(e){
|
|
441
|
+
// Parse: {value, number, ::currency/GBP }
|
|
442
|
+
return this.isEOF()||125/* `}` */!==this.char()?this.error(pe.EXPECT_ARGUMENT_CLOSING_BRACE,Ze(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},
|
|
443
|
+
/**
|
|
444
|
+
* See: https://github.com/unicode-org/icu/blob/af7ed1f6d2298013dc303628438ec4abe1f16479/icu4c/source/common/messagepattern.cpp#L659
|
|
445
|
+
*/
|
|
446
|
+
e.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,t=this.clonePosition();!this.isEOF();){switch(this.char()){case 39/* `'` */:
|
|
447
|
+
// Treat apostrophe as quoting but include it in the style part.
|
|
448
|
+
// Find the end of the quoted literal text.
|
|
449
|
+
this.bump();var n=this.clonePosition();if(!this.bumpUntil("'"))return this.error(pe.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Ze(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");
|
|
450
|
+
// Parse the skeleton
|
|
451
|
+
for(var t=[],n=0,r=e.split(Oe).filter((function(e){return e.length>0}));n<r.length;n++){var o=r[n].split("/");if(0===o.length)throw new Error("Invalid number skeleton");for(var i=o[0],s=o.slice(1),a=0,l=s;a<l.length;a++)if(0===l[a].length)throw new Error("Invalid number skeleton");t.push({stem:i,options:s})}return t}(e)}catch(e){return this.error(pe.INVALID_NUMBER_SKELETON,t)}return{val:{type:ge.number,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?Ue(n):{}},err:null}},
|
|
452
|
+
/**
|
|
453
|
+
* @param nesting_level The current nesting level of messages.
|
|
454
|
+
* This can be positive when parsing message fragment in select or plural argument options.
|
|
455
|
+
* @param parent_arg_type The parent argument's type.
|
|
456
|
+
* @param parsed_first_identifier If provided, this is the first identifier-like selector of
|
|
457
|
+
* the argument. It is a by-product of a previous parsing attempt.
|
|
458
|
+
* @param expecting_close_tag If true, this message is directly or indirectly nested inside
|
|
459
|
+
* between a pair of opening and closing tags. The nested message will not parse beyond
|
|
460
|
+
* the closing tag boundary.
|
|
461
|
+
*/
|
|
462
|
+
e.prototype.tryParsePluralOrSelectOptions=function(e,t,n,r){
|
|
463
|
+
// Parse:
|
|
464
|
+
// one {one apple}
|
|
465
|
+
// ^--^
|
|
466
|
+
for(var o,i=!1,s=[],a=new Set,l=r.value,u=r.location;;){if(0===l.length){var c=this.clonePosition();if("select"===t||!this.bumpIf("="))break;
|
|
467
|
+
// Try parse `={number}` selector
|
|
468
|
+
var d=this.tryParseDecimalInteger(pe.EXPECT_PLURAL_ARGUMENT_SELECTOR,pe.INVALID_PLURAL_ARGUMENT_SELECTOR);if(d.err)return d;u=Ze(c,this.clonePosition()),l=this.message.slice(c.offset,this.offset())}
|
|
469
|
+
// Duplicate selector clauses
|
|
470
|
+
if(a.has(l))return this.error("select"===t?pe.DUPLICATE_SELECT_ARGUMENT_SELECTOR:pe.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,u);"other"===l&&(i=!0),
|
|
471
|
+
// Parse:
|
|
472
|
+
// one {one apple}
|
|
473
|
+
// ^----------^
|
|
474
|
+
this.bumpSpace();var h=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?pe.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:pe.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Ze(this.clonePosition(),this.clonePosition()));var f=this.parseMessage(e+1,t,n);if(f.err)return f;var p=this.tryParseArgumentClose(h);if(p.err)return p;s.push([l,{value:f.val,location:Ze(h,this.clonePosition())}]),
|
|
475
|
+
// Keep track of the existing selectors
|
|
476
|
+
a.add(l),
|
|
477
|
+
// Prep next selector clause.
|
|
478
|
+
this.bumpSpace(),l=(o=this.parseIdentifierIfPossible()).value,u=o.location}return 0===s.length?this.error("select"===t?pe.EXPECT_SELECT_ARGUMENT_SELECTOR:pe.EXPECT_PLURAL_ARGUMENT_SELECTOR,Ze(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!i?this.error(pe.MISSING_OTHER_CLAUSE,Ze(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=Ze(r,this.clonePosition());return o?tt(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(){
|
|
479
|
+
// This is much faster than `Object.assign` or spread.
|
|
480
|
+
return{offset:this.position.offset,line:this.position.line,column:this.position.column}},
|
|
481
|
+
/**
|
|
482
|
+
* Return the code point at the current position of the parser.
|
|
483
|
+
* Throws if the index is out of bound.
|
|
484
|
+
*/
|
|
485
|
+
e.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var t=at(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}}},
|
|
486
|
+
/** Bump the parser to the next UTF-16 code unit. */
|
|
487
|
+
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,
|
|
488
|
+
// 0 ~ 0x10000 -> unicode BMP, otherwise skip the surrogate pair.
|
|
489
|
+
this.position.offset+=e<65536?1:2)}},
|
|
490
|
+
/**
|
|
491
|
+
* If the substring starting at the current position of the parser has
|
|
492
|
+
* the given prefix, then bump the parser to the character immediately
|
|
493
|
+
* following the prefix and return true. Otherwise, don't bump the parser
|
|
494
|
+
* and return false.
|
|
495
|
+
*/
|
|
496
|
+
e.prototype.bumpIf=function(e){if(ot(this.message,e,this.offset())){for(var t=0;t<e.length;t++)this.bump();return!0}return!1},
|
|
497
|
+
/**
|
|
498
|
+
* Bump the parser until the pattern character is found and return `true`.
|
|
499
|
+
* Otherwise bump to the end of the file and return `false`.
|
|
500
|
+
*/
|
|
501
|
+
e.prototype.bumpUntil=function(e){var t=this.offset(),n=this.message.indexOf(e,t);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},
|
|
502
|
+
/**
|
|
503
|
+
* Bump the parser to the target offset.
|
|
504
|
+
* If target offset is beyond the end of the input, bump the parser to the end of the input.
|
|
505
|
+
*/
|
|
506
|
+
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}},
|
|
507
|
+
/** advance the parser through all whitespace to the next non-whitespace code unit. */
|
|
508
|
+
e.prototype.bumpSpace=function(){for(;!this.isEOF()&&pt(this.char());)this.bump()},
|
|
509
|
+
/**
|
|
510
|
+
* Peek at the *next* Unicode codepoint in the input without advancing the parser.
|
|
511
|
+
* If the input has been exhausted, then this returns null.
|
|
512
|
+
*/
|
|
513
|
+
e.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this.offset(),n=this.message.charCodeAt(t+(e>=65536?2:1));return null!=n?n:null},e}();
|
|
514
|
+
/**
|
|
515
|
+
* This check if codepoint is alphabet (lower & uppercase)
|
|
516
|
+
* @param codepoint
|
|
517
|
+
* @returns
|
|
518
|
+
*/function ft(e){return e>=97&&e<=122||e>=65&&e<=90}
|
|
519
|
+
/**
|
|
520
|
+
* Code point equivalent of regex `\p{White_Space}`.
|
|
521
|
+
* From: https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt
|
|
522
|
+
*/
|
|
523
|
+
function pt(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}
|
|
524
|
+
/**
|
|
525
|
+
* Code point equivalent of regex `\p{Pattern_Syntax}`.
|
|
526
|
+
* See https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt
|
|
527
|
+
*/function mt(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 gt(e){e.forEach((function(e){if(delete e.location,xe(e)||Ee(e))for(var t in e.options)delete e.options[t].location,gt(e.options[t].value);else _e(e)&&Se(e.style)||(Ce(e)||Be(e))&&ke(e.style)?delete e.style.location:Me(e)&>(e.children)}))}function yt(e,t){void 0===t&&(t={}),t=ye({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new ht(e,t).parse();if(n.err){var r=SyntaxError(pe[n.err.kind]);
|
|
528
|
+
// @ts-expect-error Assign to error object
|
|
529
|
+
throw r.location=n.err.location,
|
|
530
|
+
// @ts-expect-error Assign to error object
|
|
531
|
+
r.originalMessage=n.err.message,r}return(null==t?void 0:t.captureLocation)||gt(n.val),n.val}
|
|
532
|
+
|
|
533
|
+
// Main
|
|
534
|
+
|
|
535
|
+
function bt(e,t){var n=t&&t.cache?t.cache:Tt,r=t&&t.serializer?t.serializer:Bt;return(t&&t.strategy?t.strategy:Ct)(e,{cache:n,serializer:r})}
|
|
536
|
+
|
|
537
|
+
// Strategy
|
|
538
|
+
|
|
539
|
+
function vt(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 wt(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 _t(e,t,n,r,o){return n.bind(t,e,r,o)}function Ct(e,t){return _t(e,this,1===e.length?vt:wt,t.cache.create(),t.serializer)}
|
|
540
|
+
// Serializer
|
|
541
|
+
var Bt=function(){return JSON.stringify(arguments)};
|
|
542
|
+
|
|
543
|
+
// Cache
|
|
544
|
+
|
|
545
|
+
function xt(){this.cache=Object.create(null)}xt.prototype.get=function(e){return this.cache[e]},xt.prototype.set=function(e,t){this.cache[e]=t};var Et,Tt={create:function(){
|
|
546
|
+
// @ts-ignore
|
|
547
|
+
return new xt}},Mt={variadic:function(e,t){return _t(e,this,wt,t.cache.create(),t.serializer)},monadic:function(e,t){return _t(e,this,vt,t.cache.create(),t.serializer)}};!function(e){
|
|
548
|
+
// When we have a placeholder but no value to format
|
|
549
|
+
e.MISSING_VALUE="MISSING_VALUE",
|
|
550
|
+
// When value supplied is invalid
|
|
551
|
+
e.INVALID_VALUE="INVALID_VALUE",
|
|
552
|
+
// When we need specific Intl API but it's not available
|
|
553
|
+
e.MISSING_INTL_API="MISSING_INTL_API"}(Et||(Et={}));var St,kt=/** @class */function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.code=n,o.originalMessage=r,o}return fe(t,e),t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),Dt=/** @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('", "'),'"'),Et.INVALID_VALUE,o)||this}return fe(t,e),t}(kt),Pt=/** @class */function(e){function t(t,n,r){return e.call(this,'Value for "'.concat(t,'" must be of type ').concat(n),Et.INVALID_VALUE,r)||this}return fe(t,e),t}(kt),At=/** @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,'"'),Et.MISSING_VALUE,n)||this}return fe(t,e),t}(kt);function Ot(e){return"function"==typeof e}
|
|
554
|
+
// TODO(skeleton): add skeleton support
|
|
555
|
+
function Ht(e,t,n,r,o,i,
|
|
556
|
+
// For debugging
|
|
557
|
+
s){
|
|
558
|
+
// Hot path for straight simple msg translations
|
|
559
|
+
if(1===e.length&&ve(e[0]))return[{type:St.literal,value:e[0].value}];for(var a=[],l=0,u=e;l<u.length;l++){var c=u[l];
|
|
560
|
+
// Exit early for string parts.
|
|
561
|
+
if(ve(c))a.push({type:St.literal,value:c.value});else
|
|
562
|
+
// TODO: should this part be literal type?
|
|
563
|
+
// Replace `#` in plural rules with the actual numeric value.
|
|
564
|
+
if(Te(c))"number"==typeof i&&a.push({type:St.literal,value:n.getNumberFormat(t).format(i)});else{var d=c.value;
|
|
565
|
+
// Enforce that all required values are provided by the caller.
|
|
566
|
+
if(!o||!(d in o))throw new At(d,s);var h=o[d];if(we(c))h&&"string"!=typeof h&&"number"!=typeof h||(h="string"==typeof h||"number"==typeof h?String(h):""),a.push({type:"string"==typeof h?St.literal:St.object,value:h});else
|
|
567
|
+
// Recursively format plural and select parts' option — which can be a
|
|
568
|
+
// nested pattern structure. The choosing of the option to use is
|
|
569
|
+
// abstracted-by and delegated-to the part helper object.
|
|
570
|
+
if(Ce(c)){var f="string"==typeof c.style?r.date[c.style]:ke(c.style)?c.style.parsedOptions:void 0;a.push({type:St.literal,value:n.getDateTimeFormat(t,f).format(h)})}else if(Be(c)){f="string"==typeof c.style?r.time[c.style]:ke(c.style)?c.style.parsedOptions:r.time.medium;a.push({type:St.literal,value:n.getDateTimeFormat(t,f).format(h)})}else if(_e(c)){(f="string"==typeof c.style?r.number[c.style]:Se(c.style)?c.style.parsedOptions:void 0)&&f.scale&&(h*=f.scale||1),a.push({type:St.literal,value:n.getNumberFormat(t,f).format(h)})}else{if(Me(c)){var p=c.children,m=c.value,g=o[m];if(!Ot(g))throw new Pt(m,"function",s);var y=g(Ht(p,t,n,r,o,i).map((function(e){return e.value})));Array.isArray(y)||(y=[y]),a.push.apply(a,y.map((function(e){return{type:"string"==typeof e?St.literal:St.object,value:e}})))}if(xe(c)){if(!(b=c.options[h]||c.options.other))throw new Dt(c.value,h,Object.keys(c.options),s);a.push.apply(a,Ht(b.value,t,n,r,o))}else if(Ee(c)){var b;if(!(b=c.options["=".concat(h)])){if(!Intl.PluralRules)throw new kt('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',Et.MISSING_INTL_API,s);var v=n.getPluralRules(t,{type:c.pluralType}).select(h-(c.offset||0));b=c.options[v]||c.options.other}if(!b)throw new Dt(c.value,h,Object.keys(c.options),s);a.push.apply(a,Ht(b.value,t,n,r,o,h-(c.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===St.literal&&t.type===St.literal?n.value+=t.value:e.push(t),e}),[])}(a)}
|
|
571
|
+
/*
|
|
572
|
+
Copyright (c) 2014, Yahoo! Inc. All rights reserved.
|
|
573
|
+
Copyrights licensed under the New BSD License.
|
|
574
|
+
See the accompanying LICENSE file for terms.
|
|
575
|
+
*/
|
|
576
|
+
// -- MessageFormat --------------------------------------------------------
|
|
577
|
+
function Lt(e,t){return t?Object.keys(e).reduce((function(n,r){var o,i;return n[r]=(o=e[r],(i=t[r])?ye(ye(ye({},o||{}),i||{}),Object.keys(o).reduce((function(e,t){return e[t]=ye(ye({},o[t]),i[t]||{}),e}),{})):o),n}),ye({},e)):e}function Nt(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"}(St||(St={}));var Rt=/** @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);
|
|
578
|
+
// Hot path for straight simple msg translations
|
|
579
|
+
if(1===t.length)return t[0].value;var n=t.reduce((function(e,t){return e.length&&t.type===St.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 Ht(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},
|
|
580
|
+
// Defined first because it's used to build the format pattern.
|
|
581
|
+
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`");
|
|
582
|
+
// Parse string messages into an AST.
|
|
583
|
+
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.");
|
|
584
|
+
// Creates a new object with the specified `formats` merged with the default
|
|
585
|
+
// formats.
|
|
586
|
+
this.formats=Lt(e.formats,r),this.formatters=o&&o.formatters||(void 0===(i=this.formatterCache)&&(i={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:bt((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.NumberFormat).bind.apply(e,be([void 0],t,!1)))}),{cache:Nt(i.number),strategy:Mt.variadic}),getDateTimeFormat:bt((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.DateTimeFormat).bind.apply(e,be([void 0],t,!1)))}),{cache:Nt(i.dateTime),strategy:Mt.variadic}),getPluralRules:bt((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.PluralRules).bind.apply(e,be([void 0],t,!1)))}),{cache:Nt(i.pluralRules),strategy:Mt.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=yt,
|
|
587
|
+
// Default format options used as the prototype of the `formats` provided to the
|
|
588
|
+
// constructor. These are used when constructing the internal Intl.NumberFormat
|
|
589
|
+
// and Intl.DateTimeFormat instances.
|
|
590
|
+
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}();const Ft={},$t=(e,t,n)=>n?(t in Ft||(Ft[t]={}),e in Ft[t]||(Ft[t][e]=n),n):n,It=(e,t)=>{if(null==t)return;if(t in Ft&&e in Ft[t])return Ft[t][e];const n=hn(t);for(let r=0;r<n.length;r++){const o=Gt(n[r],e);if(o)return $t(e,t,o)}};let Yt;const Ut=te({});function Wt(e){return e in Yt}function Gt(e,t){if(!Wt(e))return null;const n=function(e){return Yt[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 jt(e,...t){delete Ft[e],Ut.update((n=>(n[e]=de.all([n[e]||{},...t]),n)))}ne([Ut],(([e])=>Object.keys(e))),Ut.subscribe((e=>Yt=e));const Vt={};function zt(e){return Vt[e]}function Zt(e){return null!=e&&hn(e).some((e=>{var t;return null==(t=zt(e))?void 0:t.size}))}function Kt(e,t){const n=Promise.all(t.map((t=>(function(e,t){Vt[e].delete(t),0===Vt[e].size&&delete Vt[e]}(e,t),t().then((e=>e.default||e))))));return n.then((t=>jt(e,...t)))}const Xt={};function Jt(e){if(!Zt(e))return e in Xt?Xt[e]:Promise.resolve();const t=function(e){return hn(e).map((e=>{const t=zt(e);return[e,t?[...t]:[]]})).filter((([,e])=>e.length>0))}(e);return Xt[e]=Promise.all(t.map((([e,t])=>Kt(e,t)))).then((()=>{if(Zt(e))return Jt(e);delete Xt[e]})),Xt[e]}const qt={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 Qt(){return qt}const en=te(!1);var tn=Object.defineProperty,nn=Object.defineProperties,rn=Object.getOwnPropertyDescriptors,on=Object.getOwnPropertySymbols,sn=Object.prototype.hasOwnProperty,an=Object.prototype.propertyIsEnumerable,ln=(e,t,n)=>t in e?tn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;let un;const cn=te(null);function dn(e){return e.split("-").map(((e,t,n)=>n.slice(0,t+1).join("-"))).reverse()}function hn(e,t=Qt().fallbackLocale){const n=dn(e);return t?[...new Set([...n,...dn(t)])]:n}function fn(){return null!=un?un:void 0}cn.subscribe((e=>{un=null!=e?e:void 0,"undefined"!=typeof window&&null!=e&&document.documentElement.setAttribute("lang",e)}));const pn=(mn=((e,t)=>{for(var n in t||(t={}))sn.call(t,n)&&ln(e,n,t[n]);if(on)for(var n of on(t))an.call(t,n)&&ln(e,n,t[n]);return e})({},cn),nn(mn,rn({set:e=>{if(e&&function(e){if(null==e)return;const t=hn(e);for(let e=0;e<t.length;e++){const n=t[e];if(Wt(n))return n}}(e)&&Zt(e)){const{loadingDelay:t}=Qt();let n;return"undefined"!=typeof window&&null!=fn()&&t?n=window.setTimeout((()=>en.set(!0)),t):en.set(!0),Jt(e).then((()=>{cn.set(e)})).finally((()=>{clearTimeout(n),en.set(!1)}))}return cn.set(e)}})));var mn;const gn=e=>{const t=Object.create(null);return n=>{const r=JSON.stringify(n);return r in t?t[r]:t[r]=e(n)}};var yn=Object.defineProperty,bn=Object.getOwnPropertySymbols,vn=Object.prototype.hasOwnProperty,wn=Object.prototype.propertyIsEnumerable,_n=(e,t,n)=>t in e?yn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Cn=(e,t)=>{for(var n in t||(t={}))vn.call(t,n)&&_n(e,n,t[n]);if(bn)for(var n of bn(t))wn.call(t,n)&&_n(e,n,t[n]);return e},Bn=(e,t)=>{var n={};for(var r in e)vn.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&bn)for(var r of bn(e))t.indexOf(r)<0&&wn.call(e,r)&&(n[r]=e[r]);return n};const xn=(e,t)=>{const{formats:n}=Qt();if(e in n&&t in n[e])return n[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},En=gn((e=>{var t=e,{locale:n,format:r}=t,o=Bn(t,["locale","format"]);if(null==n)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return r&&(o=xn("number",r)),new Intl.NumberFormat(n,o)})),Tn=gn((e=>{var t=e,{locale:n,format:r}=t,o=Bn(t,["locale","format"]);if(null==n)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return r?o=xn("date",r):0===Object.keys(o).length&&(o=xn("date","short")),new Intl.DateTimeFormat(n,o)})),Mn=gn((e=>{var t=e,{locale:n,format:r}=t,o=Bn(t,["locale","format"]);if(null==n)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return r?o=xn("time",r):0===Object.keys(o).length&&(o=xn("time","short")),new Intl.DateTimeFormat(n,o)})),Sn=gn((
|
|
591
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
592
|
+
(e,t=fn())=>new Rt(e,t,Qt().formats,{ignoreTag:Qt().ignoreTag}))),kn=(e,t={})=>{var n,r,o,i;let s=t;"object"==typeof e&&(s=e,e=s.id);const{values:a,locale:l=fn(),default:u}=s;if(null==l)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let c=It(e,l);if(c){if("string"!=typeof c)return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof c}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),c}else c=null!=(i=null!=(o=null==(r=(n=Qt()).handleMissingMessage)?void 0:r.call(n,{locale:l,id:e,defaultValue:u}))?o:u)?i:e;if(!a)return c;let d=c;try{d=Sn(c,l).format(a)}catch(t){t instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,t.message)}return d},Dn=(e,t)=>((e={})=>{var t=e,{locale:n=fn()}=t,r=Bn(t,["locale"]);return Mn(Cn({locale:n},r))})(t).format(e),Pn=(e,t)=>((e={})=>{var t=e,{locale:n=fn()}=t,r=Bn(t,["locale"]);return Tn(Cn({locale:n},r))})(t).format(e),An=(e,t)=>((e={})=>{var t=e,{locale:n=fn()}=t,r=Bn(t,["locale"]);return En(Cn({locale:n},r))})(t).format(e),On=(e,t=fn())=>It(e,t),Hn=ne([pn,Ut],(()=>kn));function Ln(e,t){jt(e,t)}function Nn(e){pn.set(e)}
|
|
593
|
+
/* eslint-disable no-prototype-builtins */ne([pn],(()=>Dn)),ne([pn],(()=>Pn)),ne([pn],(()=>An)),ne([pn,Ut],(()=>On));var Rn="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||
|
|
594
|
+
// eslint-disable-next-line no-undef
|
|
595
|
+
"undefined"!=typeof global&&global||{},Fn="URLSearchParams"in Rn,$n="Symbol"in Rn&&"iterator"in Symbol,In="FileReader"in Rn&&"Blob"in Rn&&function(){try{return new Blob,!0}catch(e){return!1}}(),Yn="FormData"in Rn,Un="ArrayBuffer"in Rn;if(Un)var Wn=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Gn=ArrayBuffer.isView||function(e){return e&&Wn.indexOf(Object.prototype.toString.call(e))>-1};function jn(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function Vn(e){return"string"!=typeof e&&(e=String(e)),e}
|
|
596
|
+
// Build a destructive iterator for the value list
|
|
597
|
+
function zn(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return $n&&(t[Symbol.iterator]=function(){return t}),t}function Zn(e){this.map={},e instanceof Zn?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){if(2!=e.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function Kn(e){if(!e._noBody)return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function Xn(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function Jn(e){var t=new FileReader,n=Xn(t);return t.readAsArrayBuffer(e),n}function qn(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function Qn(){return this.bodyUsed=!1,this._initBody=function(e){var t;
|
|
598
|
+
/*
|
|
599
|
+
fetch-mock wraps the Response object in an ES6 Proxy to
|
|
600
|
+
provide useful test harness features such as flush. However, on
|
|
601
|
+
ES5 browsers without fetch or Proxy support pollyfills must be used;
|
|
602
|
+
the proxy-pollyfill is unable to proxy an attribute unless it exists
|
|
603
|
+
on the object before the Proxy is created. This change ensures
|
|
604
|
+
Response.bodyUsed exists on the instance, while maintaining the
|
|
605
|
+
semantic of setting Request.bodyUsed in the constructor before
|
|
606
|
+
_initBody is called.
|
|
607
|
+
*/
|
|
608
|
+
// eslint-disable-next-line no-self-assign
|
|
609
|
+
this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:In&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:Yn&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:Fn&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():Un&&In&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=qn(e.buffer),
|
|
610
|
+
// IE 10-11 can't handle a DataView body.
|
|
611
|
+
this._bodyInit=new Blob([this._bodyArrayBuffer])):Un&&(ArrayBuffer.prototype.isPrototypeOf(e)||Gn(e))?this._bodyArrayBuffer=qn(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):Fn&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},In&&(this.blob=function(){var e=Kn(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=Kn(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if(In)return this.blob().then(Jn);throw new Error("could not read as ArrayBuffer")},this.text=function(){var e,t,n,r,o,i=Kn(this);if(i)return i;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=Xn(t),r=/charset=([A-Za-z0-9_-]+)/.exec(e.type),o=r?r[1]:"utf-8",t.readAsText(e,o),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},Yn&&(this.formData=function(){return this.text().then(nr)}),this.json=function(){return this.text().then(JSON.parse)},this}
|
|
612
|
+
// HTTP methods whose capitalization should be normalized
|
|
613
|
+
Zn.prototype.append=function(e,t){e=jn(e),t=Vn(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},Zn.prototype.delete=function(e){delete this.map[jn(e)]},Zn.prototype.get=function(e){return e=jn(e),this.has(e)?this.map[e]:null},Zn.prototype.has=function(e){return this.map.hasOwnProperty(jn(e))},Zn.prototype.set=function(e,t){this.map[jn(e)]=Vn(t)},Zn.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},Zn.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),zn(e)},Zn.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),zn(e)},Zn.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),zn(e)},$n&&(Zn.prototype[Symbol.iterator]=Zn.prototype.entries);var er=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function tr(e,t){if(!(this instanceof tr))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n,r,o=(t=t||{}).body;if(e instanceof tr){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Zn(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,o||null==e._bodyInit||(o=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new Zn(t.headers)),this.method=(n=t.method||this.method||"GET",r=n.toUpperCase(),er.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in Rn)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(o),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){
|
|
614
|
+
// Search for a '_' parameter in the query string
|
|
615
|
+
var i=/([?&])_=[^&]*/;if(i.test(this.url))
|
|
616
|
+
// If it already exists then set the value with the current time
|
|
617
|
+
this.url=this.url.replace(i,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function nr(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}})),t}function rr(e,t){if(!(this instanceof rr))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new Zn(t.headers),this.url=t.url||"",this._initBody(e)}tr.prototype.clone=function(){return new tr(this,{body:this._bodyInit})},Qn.call(tr.prototype),Qn.call(rr.prototype),rr.prototype.clone=function(){return new rr(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Zn(this.headers),url:this.url})},rr.error=function(){var e=new rr(null,{status:200,statusText:""});return e.status=0,e.type="error",e};var or=[301,302,303,307,308];rr.redirect=function(e,t){if(-1===or.indexOf(t))throw new RangeError("Invalid status code");return new rr(null,{status:t,headers:{location:e}})};var ir=Rn.DOMException;try{new ir}catch(e){(ir=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),ir.prototype.constructor=ir}function sr(e,t){return new Promise((function(n,r){var o=new tr(e,t);if(o.signal&&o.signal.aborted)return r(new ir("Aborted","AbortError"));var i=new XMLHttpRequest;function s(){i.abort()}if(i.onload=function(){var e,t,r={statusText:i.statusText,headers:(e=i.getAllResponseHeaders()||"",t=new Zn,
|
|
618
|
+
// Avoiding split via regex to work around a common IE11 bug with the core-js 3.6.0 regex polyfill
|
|
619
|
+
// https://github.com/github/fetch/issues/748
|
|
620
|
+
// https://github.com/zloirock/core-js/issues/751
|
|
621
|
+
e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();try{t.append(r,o)}catch(e){console.warn("Response "+e.message)}}})),t)};
|
|
622
|
+
// This check if specifically for when a user fetches a file locally from the file system
|
|
623
|
+
// Only if the status is out of a normal range
|
|
624
|
+
o.url.startsWith("file://")&&(i.status<200||i.status>599)?r.status=200:r.status=i.status,r.url="responseURL"in i?i.responseURL:r.headers.get("X-Request-URL");var s="response"in i?i.response:i.responseText;setTimeout((function(){n(new rr(s,r))}),0)},i.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},i.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request timed out"))}),0)},i.onabort=function(){setTimeout((function(){r(new ir("Aborted","AbortError"))}),0)},i.open(o.method,function(e){try{return""===e&&Rn.location.href?Rn.location.href:e}catch(t){return e}}(o.url),!0),"include"===o.credentials?i.withCredentials=!0:"omit"===o.credentials&&(i.withCredentials=!1),"responseType"in i&&(In?i.responseType="blob":Un&&(i.responseType="arraybuffer")),t&&"object"==typeof t.headers&&!(t.headers instanceof Zn||Rn.Headers&&t.headers instanceof Rn.Headers)){var a=[];Object.getOwnPropertyNames(t.headers).forEach((function(e){a.push(jn(e)),i.setRequestHeader(e,Vn(t.headers[e]))})),o.headers.forEach((function(e,t){-1===a.indexOf(t)&&i.setRequestHeader(t,e)}))}else o.headers.forEach((function(e,t){i.setRequestHeader(t,e)}));o.signal&&(o.signal.addEventListener("abort",s),i.onreadystatechange=function(){
|
|
625
|
+
// DONE (success or failure)
|
|
626
|
+
4===i.readyState&&o.signal.removeEventListener("abort",s)}),i.send(void 0===o._bodyInit?null:o._bodyInit)}))}sr.polyfill=!0,Rn.fetch||(Rn.fetch=sr,Rn.Headers=Zn,Rn.Request=tr,Rn.Response=rr);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function ar(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}
|
|
627
|
+
// the whatwg-fetch polyfill installs the fetch() function
|
|
628
|
+
// on the global object (window or self)
|
|
629
|
+
|
|
630
|
+
// Return that as the export for use in Webpack, Browserify etc.
|
|
631
|
+
self.fetch.bind(self);
|
|
632
|
+
/******************************************************************************
|
|
633
|
+
Copyright (c) Microsoft Corporation.
|
|
634
|
+
|
|
635
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
636
|
+
purpose with or without fee is hereby granted.
|
|
637
|
+
|
|
638
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
639
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
640
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
641
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
642
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
643
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
644
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
645
|
+
***************************************************************************** */
|
|
646
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
647
|
+
var lr=function(e,t){return lr=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])},lr(e,t)};function ur(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}lr(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function cr(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function dr(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}function hr(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 fr(e){return"function"==typeof e}function pr(e){var t=e((function(e){Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}"function"==typeof SuppressedError&&SuppressedError;var mr=pr((function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}));function gr(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var yr=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,o;if(!this.closed){this.closed=!0;var i=this._parentage;if(i)if(this._parentage=null,Array.isArray(i))try{for(var s=cr(i),a=s.next();!a.done;a=s.next()){a.value.remove(this)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}else i.remove(this);var l=this.initialTeardown;if(fr(l))try{l()}catch(e){o=e instanceof mr?e.errors:[e]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var c=cr(u),d=c.next();!d.done;d=c.next()){var h=d.value;try{wr(h)}catch(e){o=null!=o?o:[],e instanceof mr?o=hr(hr([],dr(o)),dr(e.errors)):o.push(e)}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}if(o)throw new mr(o)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)wr(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&gr(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&gr(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),br=yr.EMPTY;function vr(e){return e instanceof yr||e&&"closed"in e&&fr(e.remove)&&fr(e.add)&&fr(e.unsubscribe)}function wr(e){fr(e)?e():e.unsubscribe()}var _r={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Cr={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o=Cr.delegate;return(null==o?void 0:o.setTimeout)?o.setTimeout.apply(o,hr([e,t],dr(n))):setTimeout.apply(void 0,hr([e,t],dr(n)))},clearTimeout:function(e){var t=Cr.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function Br(){}var xr=null;function Er(e){if(_r.useDeprecatedSynchronousErrorHandling){var t=!xr;if(t&&(xr={errorThrown:!1,error:null}),e(),t){var n=xr,r=n.errorThrown,o=n.error;if(xr=null,r)throw o}}else e()}var Tr=function(e){function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,vr(t)&&t.add(n)):n.destination=Ar,n}return ur(t,e),t.create=function(e,t,n){return new Dr(e,t,n)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(yr),Mr=Function.prototype.bind;function Sr(e,t){return Mr.call(e,t)}var kr=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){Pr(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){Pr(e)}else Pr(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){Pr(e)}},e}(),Dr=function(e){function t(t,n,r){var o,i,s=e.call(this)||this;fr(t)||!t?o={next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:s&&_r.useDeprecatedNextContext?((i=Object.create(t)).unsubscribe=function(){return s.unsubscribe()},o={next:t.next&&Sr(t.next,i),error:t.error&&Sr(t.error,i),complete:t.complete&&Sr(t.complete,i)}):o=t;return s.destination=new kr(o),s}return ur(t,e),t}(Tr);function Pr(e){var t;t=e,Cr.setTimeout((function(){throw t}))}var Ar={closed:!0,next:Br,error:function(e){throw e},complete:Br},Or="function"==typeof Symbol&&Symbol.observable||"@@observable";function Hr(e){return e}var Lr=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r,o=this,i=(r=e)&&r instanceof Tr||function(e){return e&&fr(e.next)&&fr(e.error)&&fr(e.complete)}(r)&&vr(r)?e:new Dr(e,t,n);return Er((function(){var e=o,t=e.operator,n=e.source;i.add(t?t.call(i,n):n?o._subscribe(i):o._trySubscribe(i))})),i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=Nr(t))((function(t,r){var o=new Dr({next:function(t){try{e(t)}catch(e){r(e),o.unsubscribe()}},error:r,complete:t});n.subscribe(o)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[Or]=function(){return this},e.prototype.pipe=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(0===(e=t).length?Hr:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)})(this)},e.prototype.toPromise=function(e){var t=this;return new(e=Nr(e))((function(e,n){var r;t.subscribe((function(e){return r=e}),(function(e){return n(e)}),(function(){return e(r)}))}))},e.create=function(t){return new e(t)},e}();function Nr(e){var t;return null!==(t=null!=e?e:_r.Promise)&&void 0!==t?t:Promise}var Rr=pr((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),Fr=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return ur(t,e),t.prototype.lift=function(e){var t=new $r(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new Rr},t.prototype.next=function(e){var t=this;Er((function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var o=cr(t.currentObservers),i=o.next();!i.done;i=o.next()){i.value.next(e)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}}))},t.prototype.error=function(e){var t=this;Er((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}}))},t.prototype.complete=function(){var e=this;Er((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,o=n.isStopped,i=n.observers;return r||o?br:(this.currentObservers=null,i.push(e),new yr((function(){t.currentObservers=null,gr(i,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,o=t.isStopped;n?e.error(r):o&&e.complete()},t.prototype.asObservable=function(){var e=new Lr;return e.source=this,e},t.create=function(e,t){return new $r(e,t)},t}(Lr),$r=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return ur(t,e),t.prototype.next=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===n||n.call(t,e)},t.prototype.error=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===n||n.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,n;return null!==(n=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==n?n:br},t}(Fr),Ir={now:function(){return(Ir.delegate||Date).now()},delegate:void 0},Yr=function(e){function t(t,n,r){void 0===t&&(t=1/0),void 0===n&&(n=1/0),void 0===r&&(r=Ir);var o=e.call(this)||this;return o._bufferSize=t,o._windowTime=n,o._timestampProvider=r,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=n===1/0,o._bufferSize=Math.max(1,t),o._windowTime=Math.max(1,n),o}return ur(t,e),t.prototype.next=function(t){var n=this,r=n.isStopped,o=n._buffer,i=n._infiniteTimeWindow,s=n._timestampProvider,a=n._windowTime;r||(o.push(t),!i&&o.push(s.now()+a)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),n=this._infiniteTimeWindow,r=this._buffer.slice(),o=0;o<r.length&&!e.closed;o+=n?1:2)e.next(r[o]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,n=e._timestampProvider,r=e._buffer,o=e._infiniteTimeWindow,i=(o?1:2)*t;if(t<1/0&&i<r.length&&r.splice(0,r.length-i),!o){for(var s=n.now(),a=0,l=1;l<r.length&&r[l]<=s;l+=2)a=l;a&&r.splice(0,a+1)}},t}(Fr);let Ur=[],Wr={};window.emWidgets={topic:(e,t=0)=>{if(-1==Ur.indexOf(e)){let n=new Yr(t);Wr[e]=n,Ur.push(e)}return Wr[e]}};
|
|
648
|
+
/**
|
|
649
|
+
* @name isMobile
|
|
650
|
+
* @description A method that returns if the browser used to access the app is from a mobile device or not
|
|
651
|
+
* @param {String} userAgent window.navigator.userAgent
|
|
652
|
+
* @returns {Boolean} true or false
|
|
653
|
+
*/
|
|
654
|
+
const Gr=e=>!!(e.toLowerCase().match(/android/i)||e.toLowerCase().match(/blackberry|bb/i)||e.toLowerCase().match(/iphone|ipad|ipod/i)||e.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),jr={en:{bonus:{bonusCode:"Do you have a bonus code",placeholder:"Enter your bonus code here",invalidBonusCode:"Invalid bonus code",claim:"Claim Bonus",from:"From",to:"to",noBonus:"No bonuses found",filter:"Filter",error:"Error",forfeit:"Forfeit",invalidBonusCode:"The bonus code provided is invalid.",noActiveBonuses:"You have no active bonuses at the moment.",forfeitMessage:"Are you sure want to forfeit bonus?",forfeitConfirm:"Confirm",forfeitCancel:"Cancel",claimSuccessMessage:"Bonus claimed!",canlendarTitle:"Select the period",show:"Show"},bonusType:{standard:"Bonus Money",freeBet:"Free Bet",freeRound:"Free Spins",wagering:"Wagering Challenge",cashBack:"Cash Back",oddsBoost:"Odds Boost",stakeBack:"Stake Back",tournamentTicket:"Ticket"},bonusCard:{level:"Level",current:"Current",next:"Next",first:"First",last:"Last",previous:"Previous",startChallenge:"START CHALLENGE",rewards:"Rewards",join:"Join",forfeit:"Forfeit",terms:"Terms and Conditions",bonusType:"Bonus Type",levels:"Levels",validity:"Validity",bonusStatus:"Bonus Status",bonusAmount:"Bonus Amount",wagered:"Wagered",wageredAmount:"Wagered Amount",roundNumber:"Number of freespins",game:"Game",validUntil:"Valid Until",wageringType:"Wagering Type",remaining:"Remaining",money:"Money Wagering",betCount:"Bet Count",allRewards:"All Rewards",error:"Join failed, please try again.",playNow:"Play Now"}}};var Vr=function(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return ar(null==t&&n.path)}},n.exports),n.exports}((function(e,t){e.exports=function(){var t,n;function r(){return t.apply(null,arguments)}
|
|
655
|
+
// This is done to register the method called with moment()
|
|
656
|
+
// without creating circular dependencies.
|
|
657
|
+
function o(e){t=e}function i(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function s(e){
|
|
658
|
+
// IE8 will treat undefined and null as object if it wasn't for
|
|
659
|
+
// input != null
|
|
660
|
+
return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(a(e,t))return!1;return!0}function u(e){return void 0===e}function c(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function d(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function h(e,t){var n,r=[],o=e.length;for(n=0;n<o;++n)r.push(t(e[n],n));return r}function f(e,t){for(var n in t)a(t,n)&&(e[n]=t[n]);return a(t,"toString")&&(e.toString=t.toString),a(t,"valueOf")&&(e.valueOf=t.valueOf),e}function p(e,t,n,r){return Zn(e,t,n,r,!0).utc()}function m(){
|
|
661
|
+
// We need to deep clone this object.
|
|
662
|
+
return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function g(e){return null==e._pf&&(e._pf=m()),e._pf}function y(e){if(null==e._isValid){var t=g(e),r=n.call(t.parsedDateParts,(function(e){return null!=e})),o=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r);if(e._strict&&(o=o&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return o;e._isValid=o}return e._isValid}function b(e){var t=p(NaN);return null!=e?f(g(t),e):g(t).userInvalidated=!0,t}
|
|
663
|
+
// Plugins that add properties should also add the key here (null value),
|
|
664
|
+
// so we can properly clone ourselves.
|
|
665
|
+
n=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),r=n.length>>>0;for(t=0;t<r;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var v=r.momentProperties=[],w=!1;function _(e,t){var n,r,o,i=v.length;if(u(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),u(t._i)||(e._i=t._i),u(t._f)||(e._f=t._f),u(t._l)||(e._l=t._l),u(t._strict)||(e._strict=t._strict),u(t._tzm)||(e._tzm=t._tzm),u(t._isUTC)||(e._isUTC=t._isUTC),u(t._offset)||(e._offset=t._offset),u(t._pf)||(e._pf=g(t)),u(t._locale)||(e._locale=t._locale),i>0)for(n=0;n<i;n++)u(o=t[r=v[n]])||(e[r]=o);return e}
|
|
666
|
+
// Moment prototype object
|
|
667
|
+
function C(e){_(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),
|
|
668
|
+
// Prevent infinite loop in case updateOffset creates new moment
|
|
669
|
+
// objects.
|
|
670
|
+
!1===w&&(w=!0,r.updateOffset(this),w=!1)}function B(e){return e instanceof C||null!=e&&null!=e._isAMomentObject}function x(e){!1===r.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function E(e,t){var n=!0;return f((function(){if(null!=r.deprecationHandler&&r.deprecationHandler(null,e),n){var o,i,s,l=[],u=arguments.length;for(i=0;i<u;i++){if(o="","object"==typeof arguments[i]){for(s in o+="\n["+i+"] ",arguments[0])a(arguments[0],s)&&(o+=s+": "+arguments[0][s]+", ");o=o.slice(0,-2)}else o=arguments[i];l.push(o)}x(e+"\nArguments: "+Array.prototype.slice.call(l).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var T,M={};function S(e,t){null!=r.deprecationHandler&&r.deprecationHandler(e,t),M[e]||(x(t),M[e]=!0)}function k(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function D(e){var t,n;for(n in e)a(e,n)&&(k(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,
|
|
671
|
+
// Lenient ordinal parsing accepts just a number in addition to
|
|
672
|
+
// number + (possibly) stuff coming from _dayOfMonthOrdinalParse.
|
|
673
|
+
// TODO: Remove "ordinalParse" fallback in next major release.
|
|
674
|
+
this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function P(e,t){var n,r=f({},e);for(n in t)a(t,n)&&(s(e[n])&&s(t[n])?(r[n]={},f(r[n],e[n]),f(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)a(e,n)&&!a(t,n)&&s(e[n])&&(
|
|
675
|
+
// make sure changes to properties don't modify parent config
|
|
676
|
+
r[n]=f({},r[n]));return r}function A(e){null!=e&&this.set(e)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null,T=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)a(e,t)&&n.push(t);return n};var O={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function H(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return k(r)?r.call(t,n):r}function L(e,t,n){var r=""+Math.abs(e),o=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+r}var N=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,R=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,F={},$={};
|
|
677
|
+
// token: 'M'
|
|
678
|
+
// padded: ['MM', 2]
|
|
679
|
+
// ordinal: 'Mo'
|
|
680
|
+
// callback: function () { this.month() + 1 }
|
|
681
|
+
function I(e,t,n,r){var o=r;"string"==typeof r&&(o=function(){return this[r]()}),e&&($[e]=o),t&&($[t[0]]=function(){return L(o.apply(this,arguments),t[1],t[2])}),n&&($[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function Y(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function U(e){var t,n,r=e.match(N);for(t=0,n=r.length;t<n;t++)$[r[t]]?r[t]=$[r[t]]:r[t]=Y(r[t]);return function(t){var o,i="";for(o=0;o<n;o++)i+=k(r[o])?r[o].call(t,e):r[o];return i}}
|
|
682
|
+
// format date using native date object
|
|
683
|
+
function W(e,t){return e.isValid()?(t=G(t,e.localeData()),F[t]=F[t]||U(t),F[t](e)):e.localeData().invalidDate()}function G(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(R.lastIndex=0;n>=0&&R.test(e);)e=e.replace(R,r),R.lastIndex=0,n-=1;return e}var j={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function V(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(N).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])}var z="Invalid date";function Z(){return this._invalidDate}var K="%d",X=/\d{1,2}/;function J(e){return this._ordinal.replace("%d",e)}var q={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Q(e,t,n,r){var o=this._relativeTime[n];return k(o)?o(e,t,n,r):o.replace(/%d/i,e)}function ee(e,t){var n=this._relativeTime[e>0?"future":"past"];return k(n)?n(t):n.replace(/%s/i,t)}var te={};function ne(e,t){var n=e.toLowerCase();te[n]=te[n+"s"]=te[t]=e}function re(e){return"string"==typeof e?te[e]||te[e.toLowerCase()]:void 0}function oe(e){var t,n,r={};for(n in e)a(e,n)&&(t=re(n))&&(r[t]=e[n]);return r}var ie={};function se(e,t){ie[e]=t}function ae(e){var t,n=[];for(t in e)a(e,t)&&n.push({unit:t,priority:ie[t]});return n.sort((function(e,t){return e.priority-t.priority})),n}function le(e){return e%4==0&&e%100!=0||e%400==0}function ue(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function ce(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=ue(t)),n}function de(e,t){return function(n){return null!=n?(fe(this,e,n),r.updateOffset(this,t),this):he(this,e)}}function he(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function fe(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&le(e.year())&&1===e.month()&&29===e.date()?(n=ce(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Qe(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}
|
|
684
|
+
// MOMENTS
|
|
685
|
+
function pe(e){return k(this[e=re(e)])?this[e]():this}function me(e,t){if("object"==typeof e){var n,r=ae(e=oe(e)),o=r.length;for(n=0;n<o;n++)this[r[n].unit](e[r[n].unit])}else if(k(this[e=re(e)]))return this[e](t);return this}var ge,ye=/\d/,// 0 - 9
|
|
686
|
+
be=/\d\d/,// 00 - 99
|
|
687
|
+
ve=/\d{3}/,// 000 - 999
|
|
688
|
+
we=/\d{4}/,// 0000 - 9999
|
|
689
|
+
_e=/[+-]?\d{6}/,// -999999 - 999999
|
|
690
|
+
Ce=/\d\d?/,// 0 - 99
|
|
691
|
+
Be=/\d\d\d\d?/,// 999 - 9999
|
|
692
|
+
xe=/\d\d\d\d\d\d?/,// 99999 - 999999
|
|
693
|
+
Ee=/\d{1,3}/,// 0 - 999
|
|
694
|
+
Te=/\d{1,4}/,// 0 - 9999
|
|
695
|
+
Me=/[+-]?\d{1,6}/,// -999999 - 999999
|
|
696
|
+
Se=/\d+/,// 0 - inf
|
|
697
|
+
ke=/[+-]?\d+/,// -inf - inf
|
|
698
|
+
De=/Z|[+-]\d\d:?\d\d/gi,// +00:00 -00:00 +0000 -0000 or Z
|
|
699
|
+
Pe=/Z|[+-]\d\d(?::?\d\d)?/gi,// +00 -00 +00:00 -00:00 +0000 -0000 or Z
|
|
700
|
+
Ae=/[+-]?\d+(\.\d{1,3})?/,// 123456789 123456789.123
|
|
701
|
+
// any word (or two) characters or numbers including two/three word month in arabic.
|
|
702
|
+
// includes scottish gaelic two word and hyphenated months
|
|
703
|
+
Oe=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function He(e,t,n){ge[e]=k(t)?t:function(e,r){return e&&n?n:t}}function Le(e,t){return a(ge,e)?ge[e](t._strict,t._locale):new RegExp(Ne(e))}
|
|
704
|
+
// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
|
|
705
|
+
function Ne(e){return Re(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,o){return t||n||r||o})))}function Re(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}ge={};var Fe={};function $e(e,t){var n,r,o=t;for("string"==typeof e&&(e=[e]),c(t)&&(o=function(e,n){n[t]=ce(e)}),r=e.length,n=0;n<r;n++)Fe[e[n]]=o}function Ie(e,t){$e(e,(function(e,n,r,o){r._w=r._w||{},t(e,r._w,r,o)}))}function Ye(e,t,n){null!=t&&a(Fe,e)&&Fe[e](t,n._a,n,e)}var Ue,We=0,Ge=1,je=2,Ve=3,ze=4,Ze=5,Ke=6,Xe=7,Je=8;function qe(e,t){return(e%t+t)%t}function Qe(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=qe(t,12);return e+=(t-n)/12,1===n?le(e)?29:28:31-n%7%2}
|
|
706
|
+
// FORMATTING
|
|
707
|
+
Ue=Array.prototype.indexOf?Array.prototype.indexOf:function(e){
|
|
708
|
+
// I know
|
|
709
|
+
var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},I("M",["MM",2],"Mo",(function(){return this.month()+1})),I("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),I("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),
|
|
710
|
+
// ALIASES
|
|
711
|
+
ne("month","M"),
|
|
712
|
+
// PRIORITY
|
|
713
|
+
se("month",8),
|
|
714
|
+
// PARSING
|
|
715
|
+
He("M",Ce),He("MM",Ce,be),He("MMM",(function(e,t){return t.monthsShortRegex(e)})),He("MMMM",(function(e,t){return t.monthsRegex(e)})),$e(["M","MM"],(function(e,t){t[Ge]=ce(e)-1})),$e(["MMM","MMMM"],(function(e,t,n,r){var o=n._locale.monthsParse(e,r,n._strict);
|
|
716
|
+
// if we didn't find a month name, mark the date as invalid.
|
|
717
|
+
null!=o?t[Ge]=o:g(n).invalidMonth=e}));
|
|
718
|
+
// LOCALES
|
|
719
|
+
var et="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),tt="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),nt=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,rt=Oe,ot=Oe;function it(e,t){return e?i(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||nt).test(t)?"format":"standalone"][e.month()]:i(this._months)?this._months:this._months.standalone}function st(e,t){return e?i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[nt.test(t)?"format":"standalone"][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function at(e,t,n){var r,o,i,s=e.toLocaleLowerCase();if(!this._monthsParse)for(
|
|
720
|
+
// this is not used
|
|
721
|
+
this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)i=p([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(i,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(o=Ue.call(this._shortMonthsParse,s))?o:null:-1!==(o=Ue.call(this._longMonthsParse,s))?o:null:"MMM"===t?-1!==(o=Ue.call(this._shortMonthsParse,s))||-1!==(o=Ue.call(this._longMonthsParse,s))?o:null:-1!==(o=Ue.call(this._longMonthsParse,s))||-1!==(o=Ue.call(this._shortMonthsParse,s))?o:null}function lt(e,t,n){var r,o,i;if(this._monthsParseExact)return at.call(this,e,t,n);
|
|
722
|
+
// TODO: add sorting
|
|
723
|
+
// Sorting makes sure if one month (or abbr) is a prefix of another
|
|
724
|
+
// see sorting in computeMonthsParse
|
|
725
|
+
for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){
|
|
726
|
+
// test the regex
|
|
727
|
+
if(
|
|
728
|
+
// make the regex if we don't have it already
|
|
729
|
+
o=p([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(i="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[r]=new RegExp(i.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}}
|
|
730
|
+
// MOMENTS
|
|
731
|
+
function ut(e,t){var n;if(!e.isValid())
|
|
732
|
+
// No op
|
|
733
|
+
return e;if("string"==typeof t)if(/^\d+$/.test(t))t=ce(t);else
|
|
734
|
+
// TODO: Another silent failure?
|
|
735
|
+
if(!c(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),Qe(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function ct(e){return null!=e?(ut(this,e),r.updateOffset(this,!0),this):he(this,"Month")}function dt(){return Qe(this.year(),this.month())}function ht(e){return this._monthsParseExact?(a(this,"_monthsRegex")||pt.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(a(this,"_monthsShortRegex")||(this._monthsShortRegex=rt),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function ft(e){return this._monthsParseExact?(a(this,"_monthsRegex")||pt.call(this),e?this._monthsStrictRegex:this._monthsRegex):(a(this,"_monthsRegex")||(this._monthsRegex=ot),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function pt(){function e(e,t){return t.length-e.length}var t,n,r=[],o=[],i=[];for(t=0;t<12;t++)
|
|
736
|
+
// make the regex if we don't have it already
|
|
737
|
+
n=p([2e3,t]),r.push(this.monthsShort(n,"")),o.push(this.months(n,"")),i.push(this.months(n,"")),i.push(this.monthsShort(n,""));
|
|
738
|
+
// Sorting makes sure if one month (or abbr) is a prefix of another it
|
|
739
|
+
// will match the longer piece.
|
|
740
|
+
for(r.sort(e),o.sort(e),i.sort(e),t=0;t<12;t++)r[t]=Re(r[t]),o[t]=Re(o[t]);for(t=0;t<24;t++)i[t]=Re(i[t]);this._monthsRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}
|
|
741
|
+
// FORMATTING
|
|
742
|
+
// HELPERS
|
|
743
|
+
function mt(e){return le(e)?366:365}
|
|
744
|
+
// HOOKS
|
|
745
|
+
I("Y",0,0,(function(){var e=this.year();return e<=9999?L(e,4):"+"+e})),I(0,["YY",2],0,(function(){return this.year()%100})),I(0,["YYYY",4],0,"year"),I(0,["YYYYY",5],0,"year"),I(0,["YYYYYY",6,!0],0,"year"),
|
|
746
|
+
// ALIASES
|
|
747
|
+
ne("year","y"),
|
|
748
|
+
// PRIORITIES
|
|
749
|
+
se("year",1),
|
|
750
|
+
// PARSING
|
|
751
|
+
He("Y",ke),He("YY",Ce,be),He("YYYY",Te,we),He("YYYYY",Me,_e),He("YYYYYY",Me,_e),$e(["YYYYY","YYYYYY"],We),$e("YYYY",(function(e,t){t[We]=2===e.length?r.parseTwoDigitYear(e):ce(e)})),$e("YY",(function(e,t){t[We]=r.parseTwoDigitYear(e)})),$e("Y",(function(e,t){t[We]=parseInt(e,10)})),r.parseTwoDigitYear=function(e){return ce(e)+(ce(e)>68?1900:2e3)};
|
|
752
|
+
// MOMENTS
|
|
753
|
+
var gt=de("FullYear",!0);function yt(){return le(this.year())}function bt(e,t,n,r,o,i,s){
|
|
754
|
+
// can't just apply() to create a date:
|
|
755
|
+
// https://stackoverflow.com/q/181348
|
|
756
|
+
var a;
|
|
757
|
+
// the date constructor remaps years 0-99 to 1900-1999
|
|
758
|
+
return e<100&&e>=0?(
|
|
759
|
+
// preserve leap years using a full 400 year cycle, then reset
|
|
760
|
+
a=new Date(e+400,t,n,r,o,i,s),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,n,r,o,i,s),a}function vt(e){var t,n;
|
|
761
|
+
// the Date.UTC function remaps years 0-99 to 1900-1999
|
|
762
|
+
return e<100&&e>=0?(
|
|
763
|
+
// preserve leap years using a full 400 year cycle, then reset
|
|
764
|
+
(n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}
|
|
765
|
+
// start-of-first-week - start-of-year
|
|
766
|
+
function wt(e,t,n){var// first-week day -- which january is always in the first week (4 for iso, 1 for other)
|
|
767
|
+
r=7+t-n;return-(7+vt(e,0,r).getUTCDay()-t)%7+r-1}
|
|
768
|
+
// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
|
|
769
|
+
function _t(e,t,n,r,o){var i,s,a=1+7*(t-1)+(7+n-r)%7+wt(e,r,o);return a<=0?s=mt(i=e-1)+a:a>mt(e)?(i=e+1,s=a-mt(e)):(i=e,s=a),{year:i,dayOfYear:s}}function Ct(e,t,n){var r,o,i=wt(e.year(),t,n),s=Math.floor((e.dayOfYear()-i-1)/7)+1;return s<1?r=s+Bt(o=e.year()-1,t,n):s>Bt(e.year(),t,n)?(r=s-Bt(e.year(),t,n),o=e.year()+1):(o=e.year(),r=s),{week:r,year:o}}function Bt(e,t,n){var r=wt(e,t,n),o=wt(e+1,t,n);return(mt(e)-r+o)/7}
|
|
770
|
+
// FORMATTING
|
|
771
|
+
// HELPERS
|
|
772
|
+
// LOCALES
|
|
773
|
+
function xt(e){return Ct(e,this._week.dow,this._week.doy).week}I("w",["ww",2],"wo","week"),I("W",["WW",2],"Wo","isoWeek"),
|
|
774
|
+
// ALIASES
|
|
775
|
+
ne("week","w"),ne("isoWeek","W"),
|
|
776
|
+
// PRIORITIES
|
|
777
|
+
se("week",5),se("isoWeek",5),
|
|
778
|
+
// PARSING
|
|
779
|
+
He("w",Ce),He("ww",Ce,be),He("W",Ce),He("WW",Ce,be),Ie(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=ce(e)}));var Et={dow:0,// Sunday is the first day of the week.
|
|
780
|
+
doy:6};function Tt(){return this._week.dow}function Mt(){return this._week.doy}
|
|
781
|
+
// MOMENTS
|
|
782
|
+
function St(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function kt(e){var t=Ct(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}
|
|
783
|
+
// FORMATTING
|
|
784
|
+
// HELPERS
|
|
785
|
+
function Dt(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function Pt(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}
|
|
786
|
+
// LOCALES
|
|
787
|
+
function At(e,t){return e.slice(t,7).concat(e.slice(0,t))}I("d",0,"do","day"),I("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),I("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),I("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),I("e",0,0,"weekday"),I("E",0,0,"isoWeekday"),
|
|
788
|
+
// ALIASES
|
|
789
|
+
ne("day","d"),ne("weekday","e"),ne("isoWeekday","E"),
|
|
790
|
+
// PRIORITY
|
|
791
|
+
se("day",11),se("weekday",11),se("isoWeekday",11),
|
|
792
|
+
// PARSING
|
|
793
|
+
He("d",Ce),He("e",Ce),He("E",Ce),He("dd",(function(e,t){return t.weekdaysMinRegex(e)})),He("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),He("dddd",(function(e,t){return t.weekdaysRegex(e)})),Ie(["dd","ddd","dddd"],(function(e,t,n,r){var o=n._locale.weekdaysParse(e,r,n._strict);
|
|
794
|
+
// if we didn't get a weekday name, mark the date as invalid
|
|
795
|
+
null!=o?t.d=o:g(n).invalidWeekday=e})),Ie(["d","e","E"],(function(e,t,n,r){t[r]=ce(e)}));var Ot="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ht="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Lt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Nt=Oe,Rt=Oe,Ft=Oe;function $t(e,t){var n=i(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?At(n,this._week.dow):e?n[e.day()]:n}function It(e){return!0===e?At(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Yt(e){return!0===e?At(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Ut(e,t,n){var r,o,i,s=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)i=p([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(i,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(o=Ue.call(this._weekdaysParse,s))?o:null:"ddd"===t?-1!==(o=Ue.call(this._shortWeekdaysParse,s))?o:null:-1!==(o=Ue.call(this._minWeekdaysParse,s))?o:null:"dddd"===t?-1!==(o=Ue.call(this._weekdaysParse,s))||-1!==(o=Ue.call(this._shortWeekdaysParse,s))||-1!==(o=Ue.call(this._minWeekdaysParse,s))?o:null:"ddd"===t?-1!==(o=Ue.call(this._shortWeekdaysParse,s))||-1!==(o=Ue.call(this._weekdaysParse,s))||-1!==(o=Ue.call(this._minWeekdaysParse,s))?o:null:-1!==(o=Ue.call(this._minWeekdaysParse,s))||-1!==(o=Ue.call(this._weekdaysParse,s))||-1!==(o=Ue.call(this._shortWeekdaysParse,s))?o:null}function Wt(e,t,n){var r,o,i;if(this._weekdaysParseExact)return Ut.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){
|
|
796
|
+
// test the regex
|
|
797
|
+
if(
|
|
798
|
+
// make the regex if we don't have it already
|
|
799
|
+
o=p([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(i="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[r]=new RegExp(i.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}
|
|
800
|
+
// MOMENTS
|
|
801
|
+
function Gt(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=Dt(e,this.localeData()),this.add(e-t,"d")):t}function jt(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Vt(e){if(!this.isValid())return null!=e?this:NaN;
|
|
802
|
+
// behaves the same as moment#day except
|
|
803
|
+
// as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
|
|
804
|
+
// as a setter, sunday should belong to the previous week.
|
|
805
|
+
if(null!=e){var t=Pt(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function zt(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||Xt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,"_weekdaysRegex")||(this._weekdaysRegex=Nt),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Zt(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||Xt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Rt),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Kt(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||Xt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ft),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Xt(){function e(e,t){return t.length-e.length}var t,n,r,o,i,s=[],a=[],l=[],u=[];for(t=0;t<7;t++)
|
|
806
|
+
// make the regex if we don't have it already
|
|
807
|
+
n=p([2e3,1]).day(t),r=Re(this.weekdaysMin(n,"")),o=Re(this.weekdaysShort(n,"")),i=Re(this.weekdays(n,"")),s.push(r),a.push(o),l.push(i),u.push(r),u.push(o),u.push(i);
|
|
808
|
+
// Sorting makes sure if one weekday (or abbr) is a prefix of another it
|
|
809
|
+
// will match the longer piece.
|
|
810
|
+
s.sort(e),a.sort(e),l.sort(e),u.sort(e),this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}
|
|
811
|
+
// FORMATTING
|
|
812
|
+
function Jt(){return this.hours()%12||12}function qt(){return this.hours()||24}function Qt(e,t){I(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}
|
|
813
|
+
// PARSING
|
|
814
|
+
function en(e,t){return t._meridiemParse}
|
|
815
|
+
// LOCALES
|
|
816
|
+
function tn(e){
|
|
817
|
+
// IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
|
|
818
|
+
// Using charAt should be more compatible.
|
|
819
|
+
return"p"===(e+"").toLowerCase().charAt(0)}I("H",["HH",2],0,"hour"),I("h",["hh",2],0,Jt),I("k",["kk",2],0,qt),I("hmm",0,0,(function(){return""+Jt.apply(this)+L(this.minutes(),2)})),I("hmmss",0,0,(function(){return""+Jt.apply(this)+L(this.minutes(),2)+L(this.seconds(),2)})),I("Hmm",0,0,(function(){return""+this.hours()+L(this.minutes(),2)})),I("Hmmss",0,0,(function(){return""+this.hours()+L(this.minutes(),2)+L(this.seconds(),2)})),Qt("a",!0),Qt("A",!1),
|
|
820
|
+
// ALIASES
|
|
821
|
+
ne("hour","h"),
|
|
822
|
+
// PRIORITY
|
|
823
|
+
se("hour",13),He("a",en),He("A",en),He("H",Ce),He("h",Ce),He("k",Ce),He("HH",Ce,be),He("hh",Ce,be),He("kk",Ce,be),He("hmm",Be),He("hmmss",xe),He("Hmm",Be),He("Hmmss",xe),$e(["H","HH"],Ve),$e(["k","kk"],(function(e,t,n){var r=ce(e);t[Ve]=24===r?0:r})),$e(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),$e(["h","hh"],(function(e,t,n){t[Ve]=ce(e),g(n).bigHour=!0})),$e("hmm",(function(e,t,n){var r=e.length-2;t[Ve]=ce(e.substr(0,r)),t[ze]=ce(e.substr(r)),g(n).bigHour=!0})),$e("hmmss",(function(e,t,n){var r=e.length-4,o=e.length-2;t[Ve]=ce(e.substr(0,r)),t[ze]=ce(e.substr(r,2)),t[Ze]=ce(e.substr(o)),g(n).bigHour=!0})),$e("Hmm",(function(e,t,n){var r=e.length-2;t[Ve]=ce(e.substr(0,r)),t[ze]=ce(e.substr(r))})),$e("Hmmss",(function(e,t,n){var r=e.length-4,o=e.length-2;t[Ve]=ce(e.substr(0,r)),t[ze]=ce(e.substr(r,2)),t[Ze]=ce(e.substr(o))}));var nn=/[ap]\.?m?\.?/i,
|
|
824
|
+
// Setting the hour should keep the time, because the user explicitly
|
|
825
|
+
// specified which hour they want. So trying to maintain the same hour (in
|
|
826
|
+
// a new timezone) makes sense. Adding/subtracting hours does not follow
|
|
827
|
+
// this rule.
|
|
828
|
+
rn=de("Hours",!0);function on(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var sn,an={calendar:O,longDateFormat:j,invalidDate:z,ordinal:K,dayOfMonthOrdinalParse:X,relativeTime:q,months:et,monthsShort:tt,week:Et,weekdays:Ot,weekdaysMin:Lt,weekdaysShort:Ht,meridiemParse:nn},ln={},un={};
|
|
829
|
+
// internal storage for locale config files
|
|
830
|
+
function cn(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function dn(e){return e?e.toLowerCase().replace("_","-"):e}
|
|
831
|
+
// pick the locale from the array
|
|
832
|
+
// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
|
|
833
|
+
// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
|
|
834
|
+
function hn(e){for(var t,n,r,o,i=0;i<e.length;){for(t=(o=dn(e[i]).split("-")).length,n=(n=dn(e[i+1]))?n.split("-"):null;t>0;){if(r=pn(o.slice(0,t).join("-")))return r;if(n&&n.length>=t&&cn(o,n)>=t-1)
|
|
835
|
+
//the next array item is better than a shallower substring of this one
|
|
836
|
+
break;t--}i++}return sn}function fn(e){
|
|
837
|
+
// Prevent names that look like filesystem paths, i.e contain '/' or '\'
|
|
838
|
+
return null!=e.match("^[^/\\\\]*$")}function pn(t){var n=null;
|
|
839
|
+
// TODO: Find a better way to register and load all the locales in Node
|
|
840
|
+
if(void 0===ln[t]&&e&&e.exports&&fn(t))try{n=sn._abbr,ar(),mn(n)}catch(e){
|
|
841
|
+
// mark as not found to avoid repeating expensive file require call causing high CPU
|
|
842
|
+
// when trying to find en-US, en_US, en-us for every format call
|
|
843
|
+
ln[t]=null;// null means not found
|
|
844
|
+
}return ln[t]}
|
|
845
|
+
// This function will load locale and then set the global locale. If
|
|
846
|
+
// no arguments are passed in, it will simply return the current global
|
|
847
|
+
// locale key.
|
|
848
|
+
function mn(e,t){var n;return e&&((n=u(t)?bn(e):gn(e,t))?
|
|
849
|
+
// moment.duration._locale = moment._locale = data;
|
|
850
|
+
sn=n:"undefined"!=typeof console&&console.warn&&
|
|
851
|
+
//warn user if arguments are passed but the locale could not be set
|
|
852
|
+
console.warn("Locale "+e+" not found. Did you forget to load it?")),sn._abbr}function gn(e,t){if(null!==t){var n,r=an;if(t.abbr=e,null!=ln[e])S("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=ln[e]._config;else if(null!=t.parentLocale)if(null!=ln[t.parentLocale])r=ln[t.parentLocale]._config;else{if(null==(n=pn(t.parentLocale)))return un[t.parentLocale]||(un[t.parentLocale]=[]),un[t.parentLocale].push({name:e,config:t}),null;r=n._config}return ln[e]=new A(P(r,t)),un[e]&&un[e].forEach((function(e){gn(e.name,e.config)})),
|
|
853
|
+
// backwards compat for now: also set the locale
|
|
854
|
+
// make sure we set the locale AFTER all child locales have been
|
|
855
|
+
// created, so we won't end up with the child locale set.
|
|
856
|
+
mn(e),ln[e]}
|
|
857
|
+
// useful for testing
|
|
858
|
+
return delete ln[e],null}function yn(e,t){if(null!=t){var n,r,o=an;null!=ln[e]&&null!=ln[e].parentLocale?
|
|
859
|
+
// Update existing child locale in-place to avoid memory-leaks
|
|
860
|
+
ln[e].set(P(ln[e]._config,t)):(
|
|
861
|
+
// MERGE
|
|
862
|
+
null!=(r=pn(e))&&(o=r._config),t=P(o,t),null==r&&(
|
|
863
|
+
// updateLocale is called for creating a new locale
|
|
864
|
+
// Set abbr so it will have a name (getters return
|
|
865
|
+
// undefined otherwise).
|
|
866
|
+
t.abbr=e),(n=new A(t)).parentLocale=ln[e],ln[e]=n),
|
|
867
|
+
// backwards compat for now: also set the locale
|
|
868
|
+
mn(e)}else
|
|
869
|
+
// pass null for config to unupdate, useful for tests
|
|
870
|
+
null!=ln[e]&&(null!=ln[e].parentLocale?(ln[e]=ln[e].parentLocale,e===mn()&&mn(e)):null!=ln[e]&&delete ln[e]);return ln[e]}
|
|
871
|
+
// returns locale data
|
|
872
|
+
function bn(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return sn;if(!i(e)){if(
|
|
873
|
+
//short-circuit everything else
|
|
874
|
+
t=pn(e))return t;e=[e]}return hn(e)}function vn(){return T(ln)}function wn(e){var t,n=e._a;return n&&-2===g(e).overflow&&(t=n[Ge]<0||n[Ge]>11?Ge:n[je]<1||n[je]>Qe(n[We],n[Ge])?je:n[Ve]<0||n[Ve]>24||24===n[Ve]&&(0!==n[ze]||0!==n[Ze]||0!==n[Ke])?Ve:n[ze]<0||n[ze]>59?ze:n[Ze]<0||n[Ze]>59?Ze:n[Ke]<0||n[Ke]>999?Ke:-1,g(e)._overflowDayOfYear&&(t<We||t>je)&&(t=je),g(e)._overflowWeeks&&-1===t&&(t=Xe),g(e)._overflowWeekday&&-1===t&&(t=Je),g(e).overflow=t),e}
|
|
875
|
+
// iso 8601 regex
|
|
876
|
+
// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)
|
|
877
|
+
var _n=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Cn=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Bn=/Z|[+-]\d\d(?::?\d\d)?/,xn=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],
|
|
878
|
+
// iso time formats and regexes
|
|
879
|
+
En=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Tn=/^\/?Date\((-?\d+)/i,
|
|
880
|
+
// RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
|
|
881
|
+
Mn=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Sn={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};
|
|
882
|
+
// date from iso format
|
|
883
|
+
function kn(e){var t,n,r,o,i,s,a=e._i,l=_n.exec(a)||Cn.exec(a),u=xn.length,c=En.length;if(l){for(g(e).iso=!0,t=0,n=u;t<n;t++)if(xn[t][1].exec(l[1])){o=xn[t][0],r=!1!==xn[t][2];break}if(null==o)return void(e._isValid=!1);if(l[3]){for(t=0,n=c;t<n;t++)if(En[t][1].exec(l[3])){
|
|
884
|
+
// match[2] should be 'T' or space
|
|
885
|
+
i=(l[2]||" ")+En[t][0];break}if(null==i)return void(e._isValid=!1)}if(!r&&null!=i)return void(e._isValid=!1);if(l[4]){if(!Bn.exec(l[4]))return void(e._isValid=!1);s="Z"}e._f=o+(i||"")+(s||""),Yn(e)}else e._isValid=!1}function Dn(e,t,n,r,o,i){var s=[Pn(e),tt.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(o,10)];return i&&s.push(parseInt(i,10)),s}function Pn(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function An(e){
|
|
886
|
+
// Remove comments and folding whitespace and replace multiple-spaces with a single space
|
|
887
|
+
return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function On(e,t,n){return!e||Ht.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(g(n).weekdayMismatch=!0,n._isValid=!1,!1)}function Hn(e,t,n){if(e)return Sn[e];if(t)
|
|
888
|
+
// the only allowed military tz is Z
|
|
889
|
+
return 0;var r=parseInt(n,10),o=r%100;return(r-o)/100*60+o}
|
|
890
|
+
// date and time from ref 2822 format
|
|
891
|
+
function Ln(e){var t,n=Mn.exec(An(e._i));if(n){if(t=Dn(n[4],n[3],n[2],n[5],n[6],n[7]),!On(n[1],t,e))return;e._a=t,e._tzm=Hn(n[8],n[9],n[10]),e._d=vt.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),g(e).rfc2822=!0}else e._isValid=!1}
|
|
892
|
+
// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict
|
|
893
|
+
function Nn(e){var t=Tn.exec(e._i);null===t?(kn(e),!1===e._isValid&&(delete e._isValid,Ln(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:
|
|
894
|
+
// Final attempt, use Input Fallback
|
|
895
|
+
r.createFromInputFallback(e)))):e._d=new Date(+t[1])}
|
|
896
|
+
// Pick the first defined of two or three arguments.
|
|
897
|
+
function Rn(e,t,n){return null!=e?e:null!=t?t:n}function Fn(e){
|
|
898
|
+
// hooks is actually the exported moment object
|
|
899
|
+
var t=new Date(r.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}
|
|
900
|
+
// convert an array to a date.
|
|
901
|
+
// the array should mirror the parameters below
|
|
902
|
+
// note: all values past the year are optional and will default to the lowest possible value.
|
|
903
|
+
// [year, month, day , hour, minute, second, millisecond]
|
|
904
|
+
function $n(e){var t,n,r,o,i,s=[];if(!e._d){
|
|
905
|
+
// Default to current date.
|
|
906
|
+
// * if no year, month, day of month are given, default to today
|
|
907
|
+
// * if day of month is given, default month and year
|
|
908
|
+
// * if month is given, default only year
|
|
909
|
+
// * if year is given, don't default anything
|
|
910
|
+
for(r=Fn(e),
|
|
911
|
+
//compute day of the year from weeks and weekdays
|
|
912
|
+
e._w&&null==e._a[je]&&null==e._a[Ge]&&In(e),
|
|
913
|
+
//if the day of the year is set, figure out what it is
|
|
914
|
+
null!=e._dayOfYear&&(i=Rn(e._a[We],r[We]),(e._dayOfYear>mt(i)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),n=vt(i,0,e._dayOfYear),e._a[Ge]=n.getUTCMonth(),e._a[je]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=r[t];
|
|
915
|
+
// Zero out whatever was not defaulted, including time
|
|
916
|
+
for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];
|
|
917
|
+
// Check for 24:00:00.000
|
|
918
|
+
24===e._a[Ve]&&0===e._a[ze]&&0===e._a[Ze]&&0===e._a[Ke]&&(e._nextDay=!0,e._a[Ve]=0),e._d=(e._useUTC?vt:bt).apply(null,s),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),
|
|
919
|
+
// Apply timezone offset from input. The actual utcOffset can be changed
|
|
920
|
+
// with parseZone.
|
|
921
|
+
null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ve]=24),
|
|
922
|
+
// check for mismatching day of week
|
|
923
|
+
e._w&&void 0!==e._w.d&&e._w.d!==o&&(g(e).weekdayMismatch=!0)}}function In(e){var t,n,r,o,i,s,a,l,u;null!=(t=e._w).GG||null!=t.W||null!=t.E?(i=1,s=4,
|
|
924
|
+
// TODO: We need to take the current isoWeekYear, but that depends on
|
|
925
|
+
// how we interpret now (local, utc, fixed offset). So create
|
|
926
|
+
// a now version of current config (take local/utc/offset flags, and
|
|
927
|
+
// create now).
|
|
928
|
+
n=Rn(t.GG,e._a[We],Ct(Kn(),1,4).year),r=Rn(t.W,1),((o=Rn(t.E,1))<1||o>7)&&(l=!0)):(i=e._locale._week.dow,s=e._locale._week.doy,u=Ct(Kn(),i,s),n=Rn(t.gg,e._a[We],u.year),
|
|
929
|
+
// Default to current week.
|
|
930
|
+
r=Rn(t.w,u.week),null!=t.d?((
|
|
931
|
+
// weekday -- low day numbers are considered next week
|
|
932
|
+
o=t.d)<0||o>6)&&(l=!0):null!=t.e?(
|
|
933
|
+
// local weekday -- counting starts from beginning of week
|
|
934
|
+
o=t.e+i,(t.e<0||t.e>6)&&(l=!0)):
|
|
935
|
+
// default to beginning of week
|
|
936
|
+
o=i),r<1||r>Bt(n,i,s)?g(e)._overflowWeeks=!0:null!=l?g(e)._overflowWeekday=!0:(a=_t(n,r,o,i,s),e._a[We]=a.year,e._dayOfYear=a.dayOfYear)}
|
|
937
|
+
// constant that refers to the ISO standard
|
|
938
|
+
// date from string and format string
|
|
939
|
+
function Yn(e){
|
|
940
|
+
// TODO: Move this to another part of the creation flow to prevent circular deps
|
|
941
|
+
if(e._f!==r.ISO_8601)if(e._f!==r.RFC_2822){e._a=[],g(e).empty=!0;
|
|
942
|
+
// This array is used to make a Date, either with `new Date` or `Date.UTC`
|
|
943
|
+
var t,n,o,i,s,a,l,u=""+e._i,c=u.length,d=0;for(l=(o=G(e._f,e._locale).match(N)||[]).length,t=0;t<l;t++)i=o[t],(n=(u.match(Le(i,e))||[])[0])&&((s=u.substr(0,u.indexOf(n))).length>0&&g(e).unusedInput.push(s),u=u.slice(u.indexOf(n)+n.length),d+=n.length),
|
|
944
|
+
// don't parse if it's not a known token
|
|
945
|
+
$[i]?(n?g(e).empty=!1:g(e).unusedTokens.push(i),Ye(i,n,e)):e._strict&&!n&&g(e).unusedTokens.push(i);
|
|
946
|
+
// add remaining unparsed input length to the string
|
|
947
|
+
g(e).charsLeftOver=c-d,u.length>0&&g(e).unusedInput.push(u),
|
|
948
|
+
// clear _12h flag if hour is <= 12
|
|
949
|
+
e._a[Ve]<=12&&!0===g(e).bigHour&&e._a[Ve]>0&&(g(e).bigHour=void 0),g(e).parsedDateParts=e._a.slice(0),g(e).meridiem=e._meridiem,
|
|
950
|
+
// handle meridiem
|
|
951
|
+
e._a[Ve]=Un(e._locale,e._a[Ve],e._meridiem),null!==(
|
|
952
|
+
// handle era
|
|
953
|
+
a=g(e).era)&&(e._a[We]=e._locale.erasConvertYear(a,e._a[We])),$n(e),wn(e)}else Ln(e);else kn(e)}function Un(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?(
|
|
954
|
+
// Fallback
|
|
955
|
+
(r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}
|
|
956
|
+
// date from string and array of format strings
|
|
957
|
+
function Wn(e){var t,n,r,o,i,s,a=!1,l=e._f.length;if(0===l)return g(e).invalidFormat=!0,void(e._d=new Date(NaN));for(o=0;o<l;o++)i=0,s=!1,t=_({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[o],Yn(t),y(t)&&(s=!0),
|
|
958
|
+
// if there is any input that was not parsed add a penalty for that format
|
|
959
|
+
i+=g(t).charsLeftOver,
|
|
960
|
+
//or tokens
|
|
961
|
+
i+=10*g(t).unusedTokens.length,g(t).score=i,a?i<r&&(r=i,n=t):(null==r||i<r||s)&&(r=i,n=t,s&&(a=!0));f(e,n||t)}function Gn(e){if(!e._d){var t=oe(e._i),n=void 0===t.day?t.date:t.day;e._a=h([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),$n(e)}}function jn(e){var t=new C(wn(Vn(e)));return t._nextDay&&(
|
|
962
|
+
// Adding is smart enough around DST
|
|
963
|
+
t.add(1,"d"),t._nextDay=void 0),t}function Vn(e){var t=e._i,n=e._f;return e._locale=e._locale||bn(e._l),null===t||void 0===n&&""===t?b({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),B(t)?new C(wn(t)):(d(t)?e._d=t:i(n)?Wn(e):n?Yn(e):zn(e),y(e)||(e._d=null),e))}function zn(e){var t=e._i;u(t)?e._d=new Date(r.now()):d(t)?e._d=new Date(t.valueOf()):"string"==typeof t?Nn(e):i(t)?(e._a=h(t.slice(0),(function(e){return parseInt(e,10)})),$n(e)):s(t)?Gn(e):c(t)?
|
|
964
|
+
// from milliseconds
|
|
965
|
+
e._d=new Date(t):r.createFromInputFallback(e)}function Zn(e,t,n,r,o){var a={};return!0!==t&&!1!==t||(r=t,t=void 0),!0!==n&&!1!==n||(r=n,n=void 0),(s(e)&&l(e)||i(e)&&0===e.length)&&(e=void 0),
|
|
966
|
+
// object construction must be done this way.
|
|
967
|
+
// https://github.com/moment/moment/issues/1423
|
|
968
|
+
a._isAMomentObject=!0,a._useUTC=a._isUTC=o,a._l=n,a._i=e,a._f=t,a._strict=r,jn(a)}function Kn(e,t,n,r){return Zn(e,t,n,r,!1)}r.createFromInputFallback=E("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),r.ISO_8601=function(){},
|
|
969
|
+
// constant that refers to the RFC 2822 form
|
|
970
|
+
r.RFC_2822=function(){};var Xn=E("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Kn.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:b()})),Jn=E("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Kn.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:b()}));
|
|
971
|
+
// Pick a moment m from moments so that m[fn](other) is true for all
|
|
972
|
+
// other. This relies on the function fn to be transitive.
|
|
973
|
+
|
|
974
|
+
// moments should either be an array of moment objects or an array, whose
|
|
975
|
+
// first element is an array of moment objects.
|
|
976
|
+
function qn(e,t){var n,r;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return Kn();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}
|
|
977
|
+
// TODO: Use [].sort instead?
|
|
978
|
+
function Qn(){return qn("isBefore",[].slice.call(arguments,0))}function er(){return qn("isAfter",[].slice.call(arguments,0))}var tr=function(){return Date.now?Date.now():+new Date},nr=["year","quarter","month","week","day","hour","minute","second","millisecond"];function rr(e){var t,n,r=!1,o=nr.length;for(t in e)if(a(e,t)&&(-1===Ue.call(nr,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<o;++n)if(e[nr[n]]){if(r)return!1;// only allow non-integers for smallest unit
|
|
979
|
+
parseFloat(e[nr[n]])!==ce(e[nr[n]])&&(r=!0)}return!0}function or(){return this._isValid}function ir(){return kr(NaN)}function sr(e){var t=oe(e),n=t.year||0,r=t.quarter||0,o=t.month||0,i=t.week||t.isoWeek||0,s=t.day||0,a=t.hour||0,l=t.minute||0,u=t.second||0,c=t.millisecond||0;this._isValid=rr(t),
|
|
980
|
+
// representation for dateAddRemove
|
|
981
|
+
this._milliseconds=+c+1e3*u+// 1000
|
|
982
|
+
6e4*l+// 1000 * 60
|
|
983
|
+
1e3*a*60*60,//using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
|
|
984
|
+
// Because of dateAddRemove treats 24 hours as different from a
|
|
985
|
+
// day when working around DST, we need to store them separately
|
|
986
|
+
this._days=+s+7*i,
|
|
987
|
+
// It is impossible to translate months into days without knowing
|
|
988
|
+
// which months you are are talking about, so we have to store
|
|
989
|
+
// it separately.
|
|
990
|
+
this._months=+o+3*r+12*n,this._data={},this._locale=bn(),this._bubble()}function lr(e){return e instanceof sr}function ur(e){return e<0?-1*Math.round(-1*e):Math.round(e)}
|
|
991
|
+
// compare two arrays, return the number of differences
|
|
992
|
+
function cr(e,t,n){var r,o=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),s=0;for(r=0;r<o;r++)(n&&e[r]!==t[r]||!n&&ce(e[r])!==ce(t[r]))&&s++;return s+i}
|
|
993
|
+
// FORMATTING
|
|
994
|
+
function dr(e,t){I(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+L(~~(e/60),2)+t+L(~~e%60,2)}))}dr("Z",":"),dr("ZZ",""),
|
|
995
|
+
// PARSING
|
|
996
|
+
He("Z",Pe),He("ZZ",Pe),$e(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=fr(Pe,e)}));
|
|
997
|
+
// HELPERS
|
|
998
|
+
// timezone chunker
|
|
999
|
+
// '+10:00' > ['10', '00']
|
|
1000
|
+
// '-1530' > ['-15', '30']
|
|
1001
|
+
var hr=/([\+\-]|\d\d)/gi;function fr(e,t){var n,r,o=(t||"").match(e);return null===o?null:0===(r=60*(n=((o[o.length-1]||[])+"").match(hr)||["-",0,0])[1]+ce(n[2]))?0:"+"===n[0]?r:-r}
|
|
1002
|
+
// Return a moment from input, that is local/utc/zone equivalent to model.
|
|
1003
|
+
function pr(e,t){var n,o;return t._isUTC?(n=t.clone(),o=(B(e)||d(e)?e.valueOf():Kn(e).valueOf())-n.valueOf(),
|
|
1004
|
+
// Use low-level api, because this fn is low-level api.
|
|
1005
|
+
n._d.setTime(n._d.valueOf()+o),r.updateOffset(n,!1),n):Kn(e).local()}function mr(e){
|
|
1006
|
+
// On Firefox.24 Date#getTimezoneOffset returns a floating point.
|
|
1007
|
+
// https://github.com/moment/moment/pull/1871
|
|
1008
|
+
return-Math.round(e._d.getTimezoneOffset())}
|
|
1009
|
+
// HOOKS
|
|
1010
|
+
// This function will be called whenever a moment is mutated.
|
|
1011
|
+
// It is intended to keep the offset in sync with the timezone.
|
|
1012
|
+
// MOMENTS
|
|
1013
|
+
// keepLocalTime = true means only change the timezone, without
|
|
1014
|
+
// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
|
|
1015
|
+
// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
|
|
1016
|
+
// +0200, so we adjust the time as needed, to be valid.
|
|
1017
|
+
// Keeping the time actually adds/subtracts (one hour)
|
|
1018
|
+
// from the actual represented time. That is why we call updateOffset
|
|
1019
|
+
// a second time. In case it wants us to change the offset again
|
|
1020
|
+
// _changeInProgress == true case, then we have to adjust, because
|
|
1021
|
+
// there is no such time in the given timezone.
|
|
1022
|
+
function gr(e,t,n){var o,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=fr(Pe,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(o=mr(this)),this._offset=e,this._isUTC=!0,null!=o&&this.add(o,"m"),i!==e&&(!t||this._changeInProgress?Hr(this,kr(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:mr(this)}function yr(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function br(e){return this.utcOffset(0,e)}function vr(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(mr(this),"m")),this}function wr(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=fr(De,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function _r(e){return!!this.isValid()&&(e=e?Kn(e).utcOffset():0,(this.utcOffset()-e)%60==0)}function Cr(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Br(){if(!u(this._isDSTShifted))return this._isDSTShifted;var e,t={};return _(t,this),(t=Vn(t))._a?(e=t._isUTC?p(t._a):Kn(t._a),this._isDSTShifted=this.isValid()&&cr(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function xr(){return!!this.isValid()&&!this._isUTC}function Er(){return!!this.isValid()&&this._isUTC}function Tr(){return!!this.isValid()&&this._isUTC&&0===this._offset}
|
|
1023
|
+
// ASP.NET json date format regex
|
|
1024
|
+
r.updateOffset=function(){};var Mr=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,
|
|
1025
|
+
// from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
|
|
1026
|
+
// somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
|
|
1027
|
+
// and further modified to allow for strings containing both week and day
|
|
1028
|
+
Sr=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function kr(e,t){var n,r,o,i=e,
|
|
1029
|
+
// matching against regexp is expensive, do it on demand
|
|
1030
|
+
s=null;return lr(e)?i={ms:e._milliseconds,d:e._days,M:e._months}:c(e)||!isNaN(+e)?(i={},t?i[t]=+e:i.milliseconds=+e):(s=Mr.exec(e))?(n="-"===s[1]?-1:1,i={y:0,d:ce(s[je])*n,h:ce(s[Ve])*n,m:ce(s[ze])*n,s:ce(s[Ze])*n,ms:ce(ur(1e3*s[Ke]))*n}):(s=Sr.exec(e))?(n="-"===s[1]?-1:1,i={y:Dr(s[2],n),M:Dr(s[3],n),w:Dr(s[4],n),d:Dr(s[5],n),h:Dr(s[6],n),m:Dr(s[7],n),s:Dr(s[8],n)}):null==i?
|
|
1031
|
+
// checks for null or undefined
|
|
1032
|
+
i={}:"object"==typeof i&&("from"in i||"to"in i)&&(o=Ar(Kn(i.from),Kn(i.to)),(i={}).ms=o.milliseconds,i.M=o.months),r=new sr(i),lr(e)&&a(e,"_locale")&&(r._locale=e._locale),lr(e)&&a(e,"_isValid")&&(r._isValid=e._isValid),r}function Dr(e,t){
|
|
1033
|
+
// We'd normally use ~~inp for this, but unfortunately it also
|
|
1034
|
+
// converts floats to ints.
|
|
1035
|
+
// inp may be undefined, so careful calling replace on it.
|
|
1036
|
+
var n=e&&parseFloat(e.replace(",","."));
|
|
1037
|
+
// apply sign while we're at it
|
|
1038
|
+
return(isNaN(n)?0:n)*t}function Pr(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Ar(e,t){var n;return e.isValid()&&t.isValid()?(t=pr(t,e),e.isBefore(t)?n=Pr(e,t):((n=Pr(t,e)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}
|
|
1039
|
+
// TODO: remove 'name' arg after deprecation is removed
|
|
1040
|
+
function Or(e,t){return function(n,r){var o;
|
|
1041
|
+
//invert the arguments, but complain about it
|
|
1042
|
+
return null===r||isNaN(+r)||(S(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=n,n=r,r=o),Hr(this,kr(n,r),e),this}}function Hr(e,t,n,o){var i=t._milliseconds,s=ur(t._days),a=ur(t._months);e.isValid()&&(o=null==o||o,a&&ut(e,he(e,"Month")+a*n),s&&fe(e,"Date",he(e,"Date")+s*n),i&&e._d.setTime(e._d.valueOf()+i*n),o&&r.updateOffset(e,s||a))}kr.fn=sr.prototype,kr.invalid=ir;var Lr=Or(1,"add"),Nr=Or(-1,"subtract");function Rr(e){return"string"==typeof e||e instanceof String}
|
|
1043
|
+
// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined
|
|
1044
|
+
function Fr(e){return B(e)||d(e)||Rr(e)||c(e)||Ir(e)||$r(e)||null==e}function $r(e){var t,n,r=s(e)&&!l(e),o=!1,i=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],u=i.length;for(t=0;t<u;t+=1)n=i[t],o=o||a(e,n);return r&&o}function Ir(e){var t=i(e),n=!1;return t&&(n=0===e.filter((function(t){return!c(t)&&Rr(e)})).length),t&&n}function Yr(e){var t,n,r=s(e)&&!l(e),o=!1,i=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<i.length;t+=1)n=i[t],o=o||a(e,n);return r&&o}function Ur(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function Wr(e,t){
|
|
1045
|
+
// Support for single parameter, formats only overload to the calendar function
|
|
1046
|
+
1===arguments.length&&(arguments[0]?Fr(arguments[0])?(e=arguments[0],t=void 0):Yr(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));
|
|
1047
|
+
// We want to compare the start of today, vs this.
|
|
1048
|
+
// Getting start-of-today depends on whether we're local/utc/offset or not.
|
|
1049
|
+
var n=e||Kn(),o=pr(n,this).startOf("day"),i=r.calendarFormat(this,o)||"sameElse",s=t&&(k(t[i])?t[i].call(this,n):t[i]);return this.format(s||this.localeData().calendar(i,this,Kn(n)))}function Gr(){return new C(this)}function jr(e,t){var n=B(e)?e:Kn(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=re(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())}function Vr(e,t){var n=B(e)?e:Kn(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=re(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())}function zr(e,t,n,r){var o=B(e)?e:Kn(e),i=B(t)?t:Kn(t);return!!(this.isValid()&&o.isValid()&&i.isValid())&&("("===(r=r||"()")[0]?this.isAfter(o,n):!this.isBefore(o,n))&&(")"===r[1]?this.isBefore(i,n):!this.isAfter(i,n))}function Zr(e,t){var n,r=B(e)?e:Kn(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=re(t)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))}function Kr(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Xr(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Jr(e,t,n){var r,o,i;if(!this.isValid())return NaN;if(!(r=pr(e,this)).isValid())return NaN;switch(o=6e4*(r.utcOffset()-this.utcOffset()),t=re(t)){case"year":i=qr(this,r)/12;break;case"month":i=qr(this,r);break;case"quarter":i=qr(this,r)/3;break;case"second":i=(this-r)/1e3;break;// 1000
|
|
1050
|
+
case"minute":i=(this-r)/6e4;break;// 1000 * 60
|
|
1051
|
+
case"hour":i=(this-r)/36e5;break;// 1000 * 60 * 60
|
|
1052
|
+
case"day":i=(this-r-o)/864e5;break;// 1000 * 60 * 60 * 24, negate dst
|
|
1053
|
+
case"week":i=(this-r-o)/6048e5;break;// 1000 * 60 * 60 * 24 * 7, negate dst
|
|
1054
|
+
default:i=this-r}return n?i:ue(i)}function qr(e,t){if(e.date()<t.date())
|
|
1055
|
+
// end-of-month calculations work correct when the start month has more
|
|
1056
|
+
// days than the end month.
|
|
1057
|
+
return-qr(t,e);
|
|
1058
|
+
// difference in months
|
|
1059
|
+
var n=12*(t.year()-e.year())+(t.month()-e.month()),
|
|
1060
|
+
// b is in (anchor - 1 month, anchor + 1 month)
|
|
1061
|
+
r=e.clone().add(n,"months");
|
|
1062
|
+
//check for negative zero, return zero if negative zero
|
|
1063
|
+
return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function Qr(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function eo(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?W(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):k(Date.prototype.toISOString)?
|
|
1064
|
+
// native implementation is ~50x faster, use it when we can
|
|
1065
|
+
t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",W(n,"Z")):W(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}
|
|
1066
|
+
/**
|
|
1067
|
+
* Return a human readable representation of a moment that can
|
|
1068
|
+
* also be evaluated to get a new moment which is the same
|
|
1069
|
+
*
|
|
1070
|
+
* @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects
|
|
1071
|
+
*/function to(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,r,o="moment",i="";return this.isLocal()||(o=0===this.utcOffset()?"moment.utc":"moment.parseZone",i="Z"),e="["+o+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",r=i+'[")]',this.format(e+t+n+r)}function no(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=W(this,e);return this.localeData().postformat(t)}function ro(e,t){return this.isValid()&&(B(e)&&e.isValid()||Kn(e).isValid())?kr({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function oo(e){return this.from(Kn(),e)}function io(e,t){return this.isValid()&&(B(e)&&e.isValid()||Kn(e).isValid())?kr({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function so(e){return this.to(Kn(),e)}
|
|
1072
|
+
// If passed a locale key, it will set the locale for this
|
|
1073
|
+
// instance. Otherwise, it will return the locale configuration
|
|
1074
|
+
// variables for this instance.
|
|
1075
|
+
function ao(e){var t;return void 0===e?this._locale._abbr:(null!=(t=bn(e))&&(this._locale=t),this)}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var lo=E("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function uo(){return this._locale}var co=1e3,ho=60*co,fo=60*ho,po=3506328*fo;
|
|
1076
|
+
// actual modulo - handles negative numbers (for dates before 1970):
|
|
1077
|
+
function mo(e,t){return(e%t+t)%t}function go(e,t,n){
|
|
1078
|
+
// the date constructor remaps years 0-99 to 1900-1999
|
|
1079
|
+
return e<100&&e>=0?new Date(e+400,t,n)-po:new Date(e,t,n).valueOf()}function yo(e,t,n){
|
|
1080
|
+
// Date.UTC remaps years 0-99 to 1900-1999
|
|
1081
|
+
return e<100&&e>=0?Date.UTC(e+400,t,n)-po:Date.UTC(e,t,n)}function bo(e){var t,n;if(void 0===(e=re(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?yo:go,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=mo(t+(this._isUTC?0:this.utcOffset()*ho),fo);break;case"minute":t=this._d.valueOf(),t-=mo(t,ho);break;case"second":t=this._d.valueOf(),t-=mo(t,co)}return this._d.setTime(t),r.updateOffset(this,!0),this}function vo(e){var t,n;if(void 0===(e=re(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?yo:go,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=fo-mo(t+(this._isUTC?0:this.utcOffset()*ho),fo)-1;break;case"minute":t=this._d.valueOf(),t+=ho-mo(t,ho)-1;break;case"second":t=this._d.valueOf(),t+=co-mo(t,co)-1}return this._d.setTime(t),r.updateOffset(this,!0),this}function wo(){return this._d.valueOf()-6e4*(this._offset||0)}function _o(){return Math.floor(this.valueOf()/1e3)}function Co(){return new Date(this.valueOf())}function Bo(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function xo(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Eo(){
|
|
1082
|
+
// new Date(NaN).toJSON() === null
|
|
1083
|
+
return this.isValid()?this.toISOString():null}function To(){return y(this)}function Mo(){return f({},g(this))}function So(){return g(this).overflow}function ko(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Do(e,t){var n,o,i,s=this._eras||bn("en")._eras;for(n=0,o=s.length;n<o;++n)switch("string"==typeof s[n].since&&(
|
|
1084
|
+
// truncate time
|
|
1085
|
+
i=r(s[n].since).startOf("day"),s[n].since=i.valueOf()),typeof s[n].until){case"undefined":s[n].until=1/0;break;case"string":
|
|
1086
|
+
// truncate time
|
|
1087
|
+
i=r(s[n].until).startOf("day").valueOf(),s[n].until=i.valueOf()}return s}function Po(e,t,n){var r,o,i,s,a,l=this.eras();for(e=e.toUpperCase(),r=0,o=l.length;r<o;++r)if(i=l[r].name.toUpperCase(),s=l[r].abbr.toUpperCase(),a=l[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(s===e)return l[r];break;case"NNNN":if(i===e)return l[r];break;case"NNNNN":if(a===e)return l[r]}else if([i,s,a].indexOf(e)>=0)return l[r]}function Ao(e,t){var n=e.since<=e.until?1:-1;return void 0===t?r(e.since).year():r(e.since).year()+(t-e.offset)*n}function Oo(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(
|
|
1088
|
+
// truncate time
|
|
1089
|
+
n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].name;if(r[e].until<=n&&n<=r[e].since)return r[e].name}return""}function Ho(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(
|
|
1090
|
+
// truncate time
|
|
1091
|
+
n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].narrow;if(r[e].until<=n&&n<=r[e].since)return r[e].narrow}return""}function Lo(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(
|
|
1092
|
+
// truncate time
|
|
1093
|
+
n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].abbr;if(r[e].until<=n&&n<=r[e].since)return r[e].abbr}return""}function No(){var e,t,n,o,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(n=i[e].since<=i[e].until?1:-1,
|
|
1094
|
+
// truncate time
|
|
1095
|
+
o=this.clone().startOf("day").valueOf(),i[e].since<=o&&o<=i[e].until||i[e].until<=o&&o<=i[e].since)return(this.year()-r(i[e].since).year())*n+i[e].offset;return this.year()}function Ro(e){return a(this,"_erasNameRegex")||Go.call(this),e?this._erasNameRegex:this._erasRegex}function Fo(e){return a(this,"_erasAbbrRegex")||Go.call(this),e?this._erasAbbrRegex:this._erasRegex}function $o(e){return a(this,"_erasNarrowRegex")||Go.call(this),e?this._erasNarrowRegex:this._erasRegex}function Io(e,t){return t.erasAbbrRegex(e)}function Yo(e,t){return t.erasNameRegex(e)}function Uo(e,t){return t.erasNarrowRegex(e)}function Wo(e,t){return t._eraYearOrdinalRegex||Se}function Go(){var e,t,n=[],r=[],o=[],i=[],s=this.eras();for(e=0,t=s.length;e<t;++e)r.push(Re(s[e].name)),n.push(Re(s[e].abbr)),o.push(Re(s[e].narrow)),i.push(Re(s[e].name)),i.push(Re(s[e].abbr)),i.push(Re(s[e].narrow));this._erasRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+r.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+o.join("|")+")","i")}
|
|
1096
|
+
// FORMATTING
|
|
1097
|
+
function jo(e,t){I(0,[e,e.length],0,t)}
|
|
1098
|
+
// MOMENTS
|
|
1099
|
+
function Vo(e){return qo.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function zo(e){return qo.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Zo(){return Bt(this.year(),1,4)}function Ko(){return Bt(this.isoWeekYear(),1,4)}function Xo(){var e=this.localeData()._week;return Bt(this.year(),e.dow,e.doy)}function Jo(){var e=this.localeData()._week;return Bt(this.weekYear(),e.dow,e.doy)}function qo(e,t,n,r,o){var i;return null==e?Ct(this,r,o).year:(t>(i=Bt(e,r,o))&&(t=i),Qo.call(this,e,t,n,r,o))}function Qo(e,t,n,r,o){var i=_t(e,t,n,r,o),s=vt(i.year,0,i.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}
|
|
1100
|
+
// FORMATTING
|
|
1101
|
+
// MOMENTS
|
|
1102
|
+
function ei(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}
|
|
1103
|
+
// FORMATTING
|
|
1104
|
+
I("N",0,0,"eraAbbr"),I("NN",0,0,"eraAbbr"),I("NNN",0,0,"eraAbbr"),I("NNNN",0,0,"eraName"),I("NNNNN",0,0,"eraNarrow"),I("y",["y",1],"yo","eraYear"),I("y",["yy",2],0,"eraYear"),I("y",["yyy",3],0,"eraYear"),I("y",["yyyy",4],0,"eraYear"),He("N",Io),He("NN",Io),He("NNN",Io),He("NNNN",Yo),He("NNNNN",Uo),$e(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,r){var o=n._locale.erasParse(e,r,n._strict);o?g(n).era=o:g(n).invalidEra=e})),He("y",Se),He("yy",Se),He("yyy",Se),He("yyyy",Se),He("yo",Wo),$e(["y","yy","yyy","yyyy"],We),$e(["yo"],(function(e,t,n,r){var o;n._locale._eraYearOrdinalRegex&&(o=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[We]=n._locale.eraYearOrdinalParse(e,o):t[We]=parseInt(e,10)})),I(0,["gg",2],0,(function(){return this.weekYear()%100})),I(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),jo("gggg","weekYear"),jo("ggggg","weekYear"),jo("GGGG","isoWeekYear"),jo("GGGGG","isoWeekYear"),
|
|
1105
|
+
// ALIASES
|
|
1106
|
+
ne("weekYear","gg"),ne("isoWeekYear","GG"),
|
|
1107
|
+
// PRIORITY
|
|
1108
|
+
se("weekYear",1),se("isoWeekYear",1),
|
|
1109
|
+
// PARSING
|
|
1110
|
+
He("G",ke),He("g",ke),He("GG",Ce,be),He("gg",Ce,be),He("GGGG",Te,we),He("gggg",Te,we),He("GGGGG",Me,_e),He("ggggg",Me,_e),Ie(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=ce(e)})),Ie(["gg","GG"],(function(e,t,n,o){t[o]=r.parseTwoDigitYear(e)})),I("Q",0,"Qo","quarter"),
|
|
1111
|
+
// ALIASES
|
|
1112
|
+
ne("quarter","Q"),
|
|
1113
|
+
// PRIORITY
|
|
1114
|
+
se("quarter",7),
|
|
1115
|
+
// PARSING
|
|
1116
|
+
He("Q",ye),$e("Q",(function(e,t){t[Ge]=3*(ce(e)-1)})),I("D",["DD",2],"Do","date"),
|
|
1117
|
+
// ALIASES
|
|
1118
|
+
ne("date","D"),
|
|
1119
|
+
// PRIORITY
|
|
1120
|
+
se("date",9),
|
|
1121
|
+
// PARSING
|
|
1122
|
+
He("D",Ce),He("DD",Ce,be),He("Do",(function(e,t){
|
|
1123
|
+
// TODO: Remove "ordinalParse" fallback in next major release.
|
|
1124
|
+
return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),$e(["D","DD"],je),$e("Do",(function(e,t){t[je]=ce(e.match(Ce)[0])}));
|
|
1125
|
+
// MOMENTS
|
|
1126
|
+
var ti=de("Date",!0);
|
|
1127
|
+
// FORMATTING
|
|
1128
|
+
// HELPERS
|
|
1129
|
+
// MOMENTS
|
|
1130
|
+
function ni(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}
|
|
1131
|
+
// FORMATTING
|
|
1132
|
+
I("DDD",["DDDD",3],"DDDo","dayOfYear"),
|
|
1133
|
+
// ALIASES
|
|
1134
|
+
ne("dayOfYear","DDD"),
|
|
1135
|
+
// PRIORITY
|
|
1136
|
+
se("dayOfYear",4),
|
|
1137
|
+
// PARSING
|
|
1138
|
+
He("DDD",Ee),He("DDDD",ve),$e(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=ce(e)})),I("m",["mm",2],0,"minute"),
|
|
1139
|
+
// ALIASES
|
|
1140
|
+
ne("minute","m"),
|
|
1141
|
+
// PRIORITY
|
|
1142
|
+
se("minute",14),
|
|
1143
|
+
// PARSING
|
|
1144
|
+
He("m",Ce),He("mm",Ce,be),$e(["m","mm"],ze);
|
|
1145
|
+
// MOMENTS
|
|
1146
|
+
var ri=de("Minutes",!1);
|
|
1147
|
+
// FORMATTING
|
|
1148
|
+
I("s",["ss",2],0,"second"),
|
|
1149
|
+
// ALIASES
|
|
1150
|
+
ne("second","s"),
|
|
1151
|
+
// PRIORITY
|
|
1152
|
+
se("second",15),
|
|
1153
|
+
// PARSING
|
|
1154
|
+
He("s",Ce),He("ss",Ce,be),$e(["s","ss"],Ze);
|
|
1155
|
+
// MOMENTS
|
|
1156
|
+
var oi,ii,si=de("Seconds",!1);
|
|
1157
|
+
// FORMATTING
|
|
1158
|
+
for(I("S",0,0,(function(){return~~(this.millisecond()/100)})),I(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),I(0,["SSS",3],0,"millisecond"),I(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),I(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),I(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),I(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),I(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),I(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),
|
|
1159
|
+
// ALIASES
|
|
1160
|
+
ne("millisecond","ms"),
|
|
1161
|
+
// PRIORITY
|
|
1162
|
+
se("millisecond",16),
|
|
1163
|
+
// PARSING
|
|
1164
|
+
He("S",Ee,ye),He("SS",Ee,be),He("SSS",Ee,ve),oi="SSSS";oi.length<=9;oi+="S")He(oi,Se);function ai(e,t){t[Ke]=ce(1e3*("0."+e))}for(oi="S";oi.length<=9;oi+="S")$e(oi,ai);
|
|
1165
|
+
// MOMENTS
|
|
1166
|
+
function li(){return this._isUTC?"UTC":""}function ui(){return this._isUTC?"Coordinated Universal Time":""}ii=de("Milliseconds",!1),
|
|
1167
|
+
// FORMATTING
|
|
1168
|
+
I("z",0,0,"zoneAbbr"),I("zz",0,0,"zoneName");var ci=C.prototype;function di(e){return Kn(1e3*e)}function hi(){return Kn.apply(null,arguments).parseZone()}function fi(e){return e}ci.add=Lr,ci.calendar=Wr,ci.clone=Gr,ci.diff=Jr,ci.endOf=vo,ci.format=no,ci.from=ro,ci.fromNow=oo,ci.to=io,ci.toNow=so,ci.get=pe,ci.invalidAt=So,ci.isAfter=jr,ci.isBefore=Vr,ci.isBetween=zr,ci.isSame=Zr,ci.isSameOrAfter=Kr,ci.isSameOrBefore=Xr,ci.isValid=To,ci.lang=lo,ci.locale=ao,ci.localeData=uo,ci.max=Jn,ci.min=Xn,ci.parsingFlags=Mo,ci.set=me,ci.startOf=bo,ci.subtract=Nr,ci.toArray=Bo,ci.toObject=xo,ci.toDate=Co,ci.toISOString=eo,ci.inspect=to,"undefined"!=typeof Symbol&&null!=Symbol.for&&(ci[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),ci.toJSON=Eo,ci.toString=Qr,ci.unix=_o,ci.valueOf=wo,ci.creationData=ko,ci.eraName=Oo,ci.eraNarrow=Ho,ci.eraAbbr=Lo,ci.eraYear=No,ci.year=gt,ci.isLeapYear=yt,ci.weekYear=Vo,ci.isoWeekYear=zo,ci.quarter=ci.quarters=ei,ci.month=ct,ci.daysInMonth=dt,ci.week=ci.weeks=St,ci.isoWeek=ci.isoWeeks=kt,ci.weeksInYear=Xo,ci.weeksInWeekYear=Jo,ci.isoWeeksInYear=Zo,ci.isoWeeksInISOWeekYear=Ko,ci.date=ti,ci.day=ci.days=Gt,ci.weekday=jt,ci.isoWeekday=Vt,ci.dayOfYear=ni,ci.hour=ci.hours=rn,ci.minute=ci.minutes=ri,ci.second=ci.seconds=si,ci.millisecond=ci.milliseconds=ii,ci.utcOffset=gr,ci.utc=br,ci.local=vr,ci.parseZone=wr,ci.hasAlignedHourOffset=_r,ci.isDST=Cr,ci.isLocal=xr,ci.isUtcOffset=Er,ci.isUtc=Tr,ci.isUTC=Tr,ci.zoneAbbr=li,ci.zoneName=ui,ci.dates=E("dates accessor is deprecated. Use date instead.",ti),ci.months=E("months accessor is deprecated. Use month instead",ct),ci.years=E("years accessor is deprecated. Use year instead",gt),ci.zone=E("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",yr),ci.isDSTShifted=E("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Br);var pi=A.prototype;function mi(e,t,n,r){var o=bn(),i=p().set(r,t);return o[n](i,e)}function gi(e,t,n){if(c(e)&&(t=e,e=void 0),e=e||"",null!=t)return mi(e,t,n,"month");var r,o=[];for(r=0;r<12;r++)o[r]=mi(e,r,n,"month");return o}
|
|
1169
|
+
// ()
|
|
1170
|
+
// (5)
|
|
1171
|
+
// (fmt, 5)
|
|
1172
|
+
// (fmt)
|
|
1173
|
+
// (true)
|
|
1174
|
+
// (true, 5)
|
|
1175
|
+
// (true, fmt, 5)
|
|
1176
|
+
// (true, fmt)
|
|
1177
|
+
function yi(e,t,n,r){"boolean"==typeof e?(c(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,c(t)&&(n=t,t=void 0),t=t||"");var o,i=bn(),s=e?i._week.dow:0,a=[];if(null!=n)return mi(t,(n+s)%7,r,"day");for(o=0;o<7;o++)a[o]=mi(t,(o+s)%7,r,"day");return a}function bi(e,t){return gi(e,t,"months")}function vi(e,t){return gi(e,t,"monthsShort")}function wi(e,t,n){return yi(e,t,n,"weekdays")}function _i(e,t,n){return yi(e,t,n,"weekdaysShort")}function Ci(e,t,n){return yi(e,t,n,"weekdaysMin")}pi.calendar=H,pi.longDateFormat=V,pi.invalidDate=Z,pi.ordinal=J,pi.preparse=fi,pi.postformat=fi,pi.relativeTime=Q,pi.pastFuture=ee,pi.set=D,pi.eras=Do,pi.erasParse=Po,pi.erasConvertYear=Ao,pi.erasAbbrRegex=Fo,pi.erasNameRegex=Ro,pi.erasNarrowRegex=$o,pi.months=it,pi.monthsShort=st,pi.monthsParse=lt,pi.monthsRegex=ft,pi.monthsShortRegex=ht,pi.week=xt,pi.firstDayOfYear=Mt,pi.firstDayOfWeek=Tt,pi.weekdays=$t,pi.weekdaysMin=Yt,pi.weekdaysShort=It,pi.weekdaysParse=Wt,pi.weekdaysRegex=zt,pi.weekdaysShortRegex=Zt,pi.weekdaysMinRegex=Kt,pi.isPM=tn,pi.meridiem=on,mn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===ce(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),
|
|
1178
|
+
// Side effect imports
|
|
1179
|
+
r.lang=E("moment.lang is deprecated. Use moment.locale instead.",mn),r.langData=E("moment.langData is deprecated. Use moment.localeData instead.",bn);var Bi=Math.abs;function xi(){var e=this._data;return this._milliseconds=Bi(this._milliseconds),this._days=Bi(this._days),this._months=Bi(this._months),e.milliseconds=Bi(e.milliseconds),e.seconds=Bi(e.seconds),e.minutes=Bi(e.minutes),e.hours=Bi(e.hours),e.months=Bi(e.months),e.years=Bi(e.years),this}function Ei(e,t,n,r){var o=kr(t,n);return e._milliseconds+=r*o._milliseconds,e._days+=r*o._days,e._months+=r*o._months,e._bubble()}
|
|
1180
|
+
// supports only 2.0-style add(1, 's') or add(duration)
|
|
1181
|
+
function Ti(e,t){return Ei(this,e,t,1)}
|
|
1182
|
+
// supports only 2.0-style subtract(1, 's') or subtract(duration)
|
|
1183
|
+
function Mi(e,t){return Ei(this,e,t,-1)}function Si(e){return e<0?Math.floor(e):Math.ceil(e)}function ki(){var e,t,n,r,o,i=this._milliseconds,s=this._days,a=this._months,l=this._data;
|
|
1184
|
+
// if we have a mix of positive and negative values, bubble down first
|
|
1185
|
+
// check: https://github.com/moment/moment/issues/2166
|
|
1186
|
+
return i>=0&&s>=0&&a>=0||i<=0&&s<=0&&a<=0||(i+=864e5*Si(Pi(a)+s),s=0,a=0),
|
|
1187
|
+
// The following code bubbles up values, see the tests for
|
|
1188
|
+
// examples of what that means.
|
|
1189
|
+
l.milliseconds=i%1e3,e=ue(i/1e3),l.seconds=e%60,t=ue(e/60),l.minutes=t%60,n=ue(t/60),l.hours=n%24,s+=ue(n/24),a+=
|
|
1190
|
+
// convert days to months
|
|
1191
|
+
o=ue(Di(s)),s-=Si(Pi(o)),
|
|
1192
|
+
// 12 months -> 1 year
|
|
1193
|
+
r=ue(a/12),a%=12,l.days=s,l.months=a,l.years=r,this}function Di(e){
|
|
1194
|
+
// 400 years have 146097 days (taking into account leap year rules)
|
|
1195
|
+
// 400 years have 12 months === 4800
|
|
1196
|
+
return 4800*e/146097}function Pi(e){
|
|
1197
|
+
// the reverse of daysToMonths
|
|
1198
|
+
return 146097*e/4800}function Ai(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=re(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+Di(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(
|
|
1199
|
+
// handle milliseconds separately because of floating point math errors (issue #1867)
|
|
1200
|
+
t=this._days+Math.round(Pi(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;
|
|
1201
|
+
// Math.floor prevents floating point math errors here
|
|
1202
|
+
case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}}
|
|
1203
|
+
// TODO: Use this.as('ms')?
|
|
1204
|
+
function Oi(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*ce(this._months/12):NaN}function Hi(e){return function(){return this.as(e)}}var Li=Hi("ms"),Ni=Hi("s"),Ri=Hi("m"),Fi=Hi("h"),$i=Hi("d"),Ii=Hi("w"),Yi=Hi("M"),Ui=Hi("Q"),Wi=Hi("y");function Gi(){return kr(this)}function ji(e){return e=re(e),this.isValid()?this[e+"s"]():NaN}function Vi(e){return function(){return this.isValid()?this._data[e]:NaN}}var zi=Vi("milliseconds"),Zi=Vi("seconds"),Ki=Vi("minutes"),Xi=Vi("hours"),Ji=Vi("days"),qi=Vi("months"),Qi=Vi("years");function es(){return ue(this.days()/7)}var ts=Math.round,ns={ss:44,// a few seconds to seconds
|
|
1205
|
+
s:45,// seconds to minute
|
|
1206
|
+
m:45,// minutes to hour
|
|
1207
|
+
h:22,// hours to day
|
|
1208
|
+
d:26,// days to month/week
|
|
1209
|
+
w:null,// weeks to month
|
|
1210
|
+
M:11};
|
|
1211
|
+
// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
|
|
1212
|
+
function rs(e,t,n,r,o){return o.relativeTime(t||1,!!n,e,r)}function os(e,t,n,r){var o=kr(e).abs(),i=ts(o.as("s")),s=ts(o.as("m")),a=ts(o.as("h")),l=ts(o.as("d")),u=ts(o.as("M")),c=ts(o.as("w")),d=ts(o.as("y")),h=i<=n.ss&&["s",i]||i<n.s&&["ss",i]||s<=1&&["m"]||s<n.m&&["mm",s]||a<=1&&["h"]||a<n.h&&["hh",a]||l<=1&&["d"]||l<n.d&&["dd",l];return null!=n.w&&(h=h||c<=1&&["w"]||c<n.w&&["ww",c]),(h=h||u<=1&&["M"]||u<n.M&&["MM",u]||d<=1&&["y"]||["yy",d])[2]=t,h[3]=+e>0,h[4]=r,rs.apply(null,h)}
|
|
1213
|
+
// This function allows you to set the rounding function for relative time strings
|
|
1214
|
+
function is(e){return void 0===e?ts:"function"==typeof e&&(ts=e,!0)}
|
|
1215
|
+
// This function allows you to set a threshold for relative time strings
|
|
1216
|
+
function ss(e,t){return void 0!==ns[e]&&(void 0===t?ns[e]:(ns[e]=t,"s"===e&&(ns.ss=t-1),!0))}function as(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,o=!1,i=ns;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(o=e),"object"==typeof t&&(i=Object.assign({},ns,t),null!=t.s&&null==t.ss&&(i.ss=t.s-1)),r=os(this,!o,i,n=this.localeData()),o&&(r=n.pastFuture(+this,r)),n.postformat(r)}var ls=Math.abs;function us(e){return(e>0)-(e<0)||+e}function cs(){
|
|
1217
|
+
// for ISO strings we do not use the normal bubbling rules:
|
|
1218
|
+
// * milliseconds bubble up until they become hours
|
|
1219
|
+
// * days do not bubble at all
|
|
1220
|
+
// * months bubble up until they become years
|
|
1221
|
+
// This is because there is no context-free conversion between hours and days
|
|
1222
|
+
// (think of clock changes)
|
|
1223
|
+
// and also not between days and months (28-31 days per month)
|
|
1224
|
+
if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,o,i,s,a,l=ls(this._milliseconds)/1e3,u=ls(this._days),c=ls(this._months),d=this.asSeconds();return d?(
|
|
1225
|
+
// 3600 seconds -> 60 minutes -> 1 hour
|
|
1226
|
+
e=ue(l/60),t=ue(e/60),l%=60,e%=60,
|
|
1227
|
+
// 12 months -> 1 year
|
|
1228
|
+
n=ue(c/12),c%=12,
|
|
1229
|
+
// inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
|
|
1230
|
+
r=l?l.toFixed(3).replace(/\.?0+$/,""):"",o=d<0?"-":"",i=us(this._months)!==us(d)?"-":"",s=us(this._days)!==us(d)?"-":"",a=us(this._milliseconds)!==us(d)?"-":"",o+"P"+(n?i+n+"Y":"")+(c?i+c+"M":"")+(u?s+u+"D":"")+(t||e||l?"T":"")+(t?a+t+"H":"")+(e?a+e+"M":"")+(l?a+r+"S":"")):"P0D"}var ds=sr.prototype;return ds.isValid=or,ds.abs=xi,ds.add=Ti,ds.subtract=Mi,ds.as=Ai,ds.asMilliseconds=Li,ds.asSeconds=Ni,ds.asMinutes=Ri,ds.asHours=Fi,ds.asDays=$i,ds.asWeeks=Ii,ds.asMonths=Yi,ds.asQuarters=Ui,ds.asYears=Wi,ds.valueOf=Oi,ds._bubble=ki,ds.clone=Gi,ds.get=ji,ds.milliseconds=zi,ds.seconds=Zi,ds.minutes=Ki,ds.hours=Xi,ds.days=Ji,ds.weeks=es,ds.months=qi,ds.years=Qi,ds.humanize=as,ds.toISOString=cs,ds.toString=cs,ds.toJSON=cs,ds.locale=ao,ds.localeData=uo,ds.toIsoString=E("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",cs),ds.lang=lo,
|
|
1231
|
+
// FORMATTING
|
|
1232
|
+
I("X",0,0,"unix"),I("x",0,0,"valueOf"),
|
|
1233
|
+
// PARSING
|
|
1234
|
+
He("x",ke),He("X",Ae),$e("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),$e("x",(function(e,t,n){n._d=new Date(ce(e))})),
|
|
1235
|
+
//! moment.js
|
|
1236
|
+
r.version="2.29.4",o(Kn),r.fn=ci,r.min=Qn,r.max=er,r.now=tr,r.utc=p,r.unix=di,r.months=bi,r.isDate=d,r.locale=mn,r.invalid=b,r.duration=kr,r.isMoment=B,r.weekdays=wi,r.parseZone=hi,r.localeData=bn,r.isDuration=lr,r.monthsShort=vi,r.weekdaysMin=Ci,r.defineLocale=gn,r.updateLocale=yn,r.locales=vn,r.weekdaysShort=_i,r.normalizeUnits=re,r.relativeTimeRounding=is,r.relativeTimeThreshold=ss,r.calendarFormat=Ur,r.prototype=ci,
|
|
1237
|
+
// currently HTML5 input type only supports 24-hour formats
|
|
1238
|
+
r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",// <input type="datetime-local" />
|
|
1239
|
+
DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",// <input type="datetime-local" step="1" />
|
|
1240
|
+
DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",// <input type="datetime-local" step="0.001" />
|
|
1241
|
+
DATE:"YYYY-MM-DD",// <input type="date" />
|
|
1242
|
+
TIME:"HH:mm",// <input type="time" />
|
|
1243
|
+
TIME_SECONDS:"HH:mm:ss",// <input type="time" step="1" />
|
|
1244
|
+
TIME_MS:"HH:mm:ss.SSS",// <input type="time" step="0.001" />
|
|
1245
|
+
WEEK:"GGGG-[W]WW",// <input type="week" />
|
|
1246
|
+
MONTH:"YYYY-MM"},r}()}));
|
|
1247
|
+
/* src/component/CasinoBonusProgress.svelte generated by Svelte v3.59.2 */function zr(t){let n,r,o,i,s,a,l,u,c,d,m,w;return{c(){n=g("div"),r=y("svg"),o=y("circle"),i=y("circle"),a=y("circle"),l=v(),u=g("div"),c=g("slot"),d=g("span"),m=b(/*value*/t[0]),w=b(" %"),this.c=e,C(o,"class","CircularProgressLineBg"),C(o,"cx","73.5"),C(o,"cy","73.5"),C(o,"r","64.5"),C(o,"fill","transparent"),C(o,"stroke-width","18"),C(i,"class","CircularProgressLine"),C(i,"cx","73.5"),C(i,"cy","73.5"),C(i,"r","64.5"),C(i,"stroke-width","18"),C(i,"stroke-dasharray",/*dasharray*/t[5]),C(i,"stroke-dashoffset",s=/*calculateProgress*/t[4]()),A(i,"Completed",/*status*/"completed"===t[1]),C(a,"class","CircularProgressCenter"),C(a,"cx","73"),C(a,"cy","73.5"),C(a,"r","50.5"),A(a,"Completed",/*status*/"completed"===t[1]),C(r,"viewBox","0 0 147 147"),C(d,"class","CircularProgressText"),C(d,"part","CircularProgressText"),C(n,"class","CircularProgress"),C(n,"part","CircularProgress")},m(e,s){f(e,n,s),h(n,r),h(r,o),h(r,i),
|
|
1248
|
+
/*circle1_binding*/t[8](i),h(r,a),h(n,l),h(n,u),h(u,c),h(c,d),h(d,m),h(d,w),
|
|
1249
|
+
/*div1_binding*/t[9](n)},p(e,[t]){/*calculateProgress*/16&t&&s!==(s=/*calculateProgress*/e[4]())&&C(i,"stroke-dashoffset",s),/*status*/2&t&&A(i,"Completed",/*status*/"completed"===e[1]),/*status*/2&t&&A(a,"Completed",/*status*/"completed"===e[1]),/*value*/1&t&&S(m,/*value*/e[0])},i:e,o:e,d(e){e&&p(n)
|
|
1250
|
+
/*circle1_binding*/,t[8](null),
|
|
1251
|
+
/*div1_binding*/t[9](null)}}}function Zr(e,t,n){let r,o,i,{value:s=0}=t,{status:a=""}=t,{clientstyling:l=""}=t,{clientstylingurl:u=""}=t,c=129*Math.PI;return e.$$set=e=>{"value"in e&&n(0,s=e.value),"status"in e&&n(1,a=e.status),"clientstyling"in e&&n(6,l=e.clientstyling),"clientstylingurl"in e&&n(7,u=e.clientstylingurl)},e.$$.update=()=>{/*clientstyling, customStylingContainer*/68&e.$$.dirty&&l&&i&&(()=>{let e=document.createElement("style");e.innerHTML=l,i.appendChild(e)})(),/*clientstylingurl, customStylingContainer*/132&e.$$.dirty&&u&&i&&(()=>{let e=new URL(u),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{i.appendChild(t)}),1)}))})(),/*value*/1&e.$$.dirty&&n(4,r=()=>{var e=129*Math.PI;return s<0&&n(0,s=0),s>100&&n(0,s=100),(100-s)/100*e})},[s,a,i,o,r,c,l,u,function(e){F[e?"unshift":"push"]((()=>{o=e,n(3,o)}))},function(e){F[e?"unshift":"push"]((()=>{i=e,n(2,i)}))}]}const Kr=e=>Xr[e]
|
|
1252
|
+
/* eslint-disable quote-props */,Xr={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$"};
|
|
1253
|
+
/* src/component/CasinoBonusCard.svelte generated by Svelte v3.59.2 */
|
|
1254
|
+
function Jr(e,t,n){const r=e.slice();return r[77]=t[n],r[79]=n,r}function qr(e,t,n){const r=e.slice();return r[80]=t[n],r}function Qr(e,t,n){const r=e.slice();return r[71]=t[n],r}function eo(e,t,n){const r=e.slice();return r[74]=t[n],r}function to(e,t,n){const r=e.slice();return r[83]=t[n],r[85]=n,r}
|
|
1255
|
+
// (418:0) {#if bonus}
|
|
1256
|
+
function no(e){let n,r,o,i,s,a,l,u,c,d,m,y,w,_,C=/*getProduct*/e[31](/*bonus*/e[3]).indexOf("Casino")>-1,B=/*getProduct*/e[31](/*bonus*/e[3]).indexOf("Sports")>-1,E=/*bonus*/(e[3].name||/*bonus*/e[3].presentation?.name.content)+"",T=C&&ro(e),M=B&&oo(e),S=[/*classWithPart*/e[34]("TitleIcon")],D={};for(let e=0;e<S.length;e+=1)D=t(D,S[e]);let P=[/*classWithPart*/e[34]("BonusCardRowTitle")],O={};for(let e=0;e<P.length;e+=1)O=t(O,P[e]);function H(e,t){/*status*/
|
|
1257
|
+
return"active"===e[0]?so:/*status*/"completed"===e[0]?io:void 0}let L=H(e),N=L&&L(e),R=[/*classWithPart*/e[34]("BonusCardHeader")],F={};for(let e=0;e<R.length;e+=1)F=t(F,R[e]);let $=
|
|
1258
|
+
// (466:4) {#if showDataSection}
|
|
1259
|
+
function(e){let n,r,o;function i(e,t){/*status*/
|
|
1260
|
+
return"claimable"===e[0]?lo:ao}let s=i(e),a=s(e),l=[/*classWithPart*/e[34]("BonusCardDataContent")],u={};for(let e=0;e<l.length;e+=1)u=t(u,l[e]);let c=/*status*/("active"===e[0]||/*status*/"completed"===e[0])&&Do(e),d=[/*classWithPart*/e[34]("BonusCardData")],m={};for(let e=0;e<d.length;e+=1)m=t(m,d[e]);return{c(){n=g("div"),r=g("div"),a.c(),o=v(),c&&c.c(),x(r,u),x(n,m)},m(e,t){f(e,n,t),h(n,r),a.m(r,null),h(n,o),c&&c.m(n,null)},p(e,t){s===(s=i(e))&&a?a.p(e,t):(a.d(1),a=s(e),a&&(a.c(),a.m(r,null))),/*status*/"active"===e[0]||/*status*/"completed"===e[0]?c?c.p(e,t):(c=Do(e),c.c(),c.m(n,null)):c&&(c.d(1),c=null)},d(e){e&&p(n),a.d(),c&&c.d()}}}
|
|
1261
|
+
// (492:10) {:else}
|
|
1262
|
+
(e),I=/*showAdditionalSection*/e[8]&&Lo(e);function Y(e,t){/*showTerms*/
|
|
1263
|
+
return e[12]?zo:Vo}let U=Y(e),W=U(e),G=[/*classWithPart*/e[34]("BonusCardFooter")],j={};for(let e=0;e<G.length;e+=1)j=t(j,G[e]);let V=[/*classWithPart*/e[34]("BonusCardInfo")],z={};for(let e=0;e<V.length;e+=1)z=t(z,V[e]);let Z=/*showActionSection*/e[7]&&Jo(e),K=[/*classWithPart*/e[34]("BonusCard")],X={};for(let e=0;e<K.length;e+=1)X=t(X,K[e]);return{c(){n=g("div"),r=g("div"),o=g("div"),i=g("p"),s=g("span"),T&&T.c(),a=v(),M&&M.c(),l=v(),u=b(E),c=v(),N&&N.c(),d=v(),$&&$.c(),m=v(),y=g("div"),I&&I.c(),w=v(),W.c(),_=v(),Z&&Z.c(),x(s,D),x(i,O),x(o,F),x(y,j),A(y,"Active",/*showAdditionalSectionContent*/e[9]||/*showTermsSectionContent*/e[10]),x(r,z),x(n,X)},m(t,p){f(t,n,p),h(n,r),h(r,o),h(o,i),h(i,s),T&&T.m(s,null),h(s,a),M&&M.m(s,null),h(i,l),h(i,u),h(o,c),N&&N.m(o,null),h(r,d),$&&$.m(r,null),h(r,m),h(r,y),I&&I.m(y,null),h(y,w),W.m(y,null),h(n,_),Z&&Z.m(n,null)
|
|
1264
|
+
/*div3_binding*/,e[52](n)},p(e,t){/*bonus*/8&t[0]&&(C=/*getProduct*/e[31](/*bonus*/e[3]).indexOf("Casino")>-1),C?T?T.p(e,t):(T=ro(e),T.c(),T.m(s,a)):T&&(T.d(1),T=null),/*bonus*/8&t[0]&&(B=/*getProduct*/e[31](/*bonus*/e[3]).indexOf("Sports")>-1),B?M?M.p(e,t):(M=oo(e),M.c(),M.m(s,null)):M&&(M.d(1),M=null),/*bonus*/8&t[0]&&E!==(E=/*bonus*/(e[3].name||/*bonus*/e[3].presentation?.name.content)+"")&&k(u,E,O.contenteditable),L===(L=H(e))&&N?N.p(e,t):(N&&N.d(1),N=L&&L(e),N&&(N.c(),N.m(o,null))),$.p(e,t),/*showAdditionalSection*/e[8]?I?I.p(e,t):(I=Lo(e),I.c(),I.m(y,w)):I&&(I.d(1),I=null),U===(U=Y(e))&&W?W.p(e,t):(W.d(1),W=U(e),W&&(W.c(),W.m(y,null))),/*showAdditionalSectionContent, showTermsSectionContent*/1536&t[0]&&A(y,"Active",/*showAdditionalSectionContent*/e[9]||/*showTermsSectionContent*/e[10]),/*showActionSection*/e[7]?Z?Z.p(e,t):(Z=Jo(e),Z.c(),Z.m(n,null)):Z&&(Z.d(1),Z=null)},d(t){t&&p(n),T&&T.d(),M&&M.d(),N&&N.d(),$&&$.d(),I&&I.d(),W.d(),Z&&Z.d()
|
|
1265
|
+
/*div3_binding*/,e[52](null)}}}
|
|
1266
|
+
// (424:10) {#if getProduct(bonus).indexOf('Casino') > -1}
|
|
1267
|
+
function ro(n){let r,o,i,s,a,l,u,c,d,m,g,b,v,w=[/*classWithPart*/n[34]("CasinoIcon"),{viewBox:"0 0 41 41"}],_={};for(let e=0;e<w.length;e+=1)_=t(_,w[e]);return{c(){r=y("svg"),o=y("path"),i=y("path"),s=y("path"),a=y("path"),l=y("path"),u=y("path"),c=y("path"),d=y("path"),m=y("path"),g=y("path"),b=y("circle"),v=y("circle"),C(o,"d","M21.2942 0V5.23421C24.916 5.42484 28.1964 6.86246 30.7301 9.14994L34.4393 5.44072C30.9525 2.22394 26.3616 0.190624 21.2942 0Z"),C(o,"fill","black"),C(i,"d","M30.7301 31.8501C28.2043 34.1296 24.916 35.5752 21.2942 35.7658V41C26.3616 40.8094 30.9525 38.7761 34.4313 35.5593L30.7221 31.8501H30.7301Z"),C(i,"fill","black"),C(s,"d","M35.7658 21.2943C35.5752 24.9162 34.1376 28.1965 31.8501 30.7302L35.5593 34.4394C38.7761 30.9605 40.8094 26.3697 41 21.3023H35.7658V21.2943Z"),C(s,"fill","black"),C(a,"d","M19.7056 35.7658C16.0838 35.5752 12.8035 34.1376 10.2698 31.8501L6.56055 35.5593C10.0394 38.7761 14.6382 40.8094 19.6977 41V35.7658H19.7056Z"),C(a,"fill","black"),C(l,"d","M31.8501 10.2698C34.1296 12.7955 35.5752 16.0838 35.7658 19.7056H41C40.8094 14.6382 38.7761 10.0474 35.5593 6.56848L31.8501 10.2777V10.2698Z"),C(l,"fill","black"),C(u,"d","M19.7058 0C14.6383 0.190624 10.0395 2.22394 6.5686 5.44072L10.2778 9.14994C12.8036 6.8704 16.0918 5.42484 19.7137 5.23421V0H19.7058Z"),C(u,"fill","black"),C(c,"d","M9.14994 30.7302C6.8704 28.2044 5.42484 24.9162 5.23421 21.2943H0C0.190624 26.3617 2.22394 30.9526 5.44072 34.4315L9.14994 30.7222V30.7302Z"),C(c,"fill","black"),C(d,"d","M5.23421 19.7058C5.42484 16.0839 6.86246 12.8036 9.14994 10.2699L5.44072 6.56067C2.22394 10.0475 0.190624 14.6384 0 19.7058H5.23421Z"),C(d,"fill","black"),C(m,"fill-rule","evenodd"),C(m,"clip-rule","evenodd"),C(m,"d","M20.5 31.825C26.7547 31.825 31.825 26.7547 31.825 20.5C31.825 14.2454 26.7547 9.17505 20.5 9.17505C14.2454 9.17505 9.17505 14.2454 9.17505 20.5C9.17505 26.7547 14.2454 31.825 20.5 31.825ZM20.5 33.825C27.8592 33.825 33.825 27.8592 33.825 20.5C33.825 13.1409 27.8592 7.17505 20.5 7.17505C13.1409 7.17505 7.17505 13.1409 7.17505 20.5C7.17505 27.8592 13.1409 33.825 20.5 33.825Z"),C(m,"fill","black"),C(g,"d","M21.6173 27.6413V28.7H19.3741V27.6413C17.3997 27.3092 16.3999 26.0428 16.3999 24.0707V23.0742H18.996V24.216C18.996 25.254 19.5421 25.6276 20.4159 25.6276C21.2897 25.6276 21.8358 25.254 21.8358 24.216C21.8442 21.2266 16.4755 21.0813 16.4755 16.9294C16.4755 14.978 17.4501 13.7325 19.3741 13.3795V12.3H21.6173V13.3795C23.5665 13.7117 24.5663 14.9573 24.5663 16.9294V17.3861H21.9702V16.7841C21.9702 15.7461 21.4745 15.3517 20.6007 15.3517C19.727 15.3517 19.2313 15.7461 19.2313 16.7841C19.2313 19.7735 24.5999 19.9188 24.5999 24.0707C24.5999 26.0428 23.5749 27.3092 21.6257 27.6413H21.6173Z"),C(g,"fill","black"),C(b,"cx","28.1874"),C(b,"cy","21.0125"),C(b,"r","1.5375"),C(b,"fill","black"),C(v,"cx","12.8124"),C(v,"cy","21.0125"),C(v,"r","1.5375"),C(v,"fill","black"),E(r,_)},m(e,t){f(e,r,t),h(r,o),h(r,i),h(r,s),h(r,a),h(r,l),h(r,u),h(r,c),h(r,d),h(r,m),h(r,g),h(r,b),h(r,v)},p:e,d(e){e&&p(r)}}}
|
|
1268
|
+
// (440:10) {#if getProduct(bonus).indexOf('Sports') > -1}
|
|
1269
|
+
function oo(n){let r,o,i,s,a,l,u=[/*classWithPart*/n[34]("SportsIcon"),{viewBox:"0 0 43 40"}],c={};for(let e=0;e<u.length;e+=1)c=t(c,u[e]);return{c(){r=y("svg"),o=y("path"),i=y("path"),s=y("path"),a=y("path"),l=y("path"),C(o,"d","M23 0C11.9555 0 3 8.95539 3 20C3 31.0446 11.9555 40 23 40C34.0454 40 43 31.0444 43 20C43 8.95558 34.0452 0 23 0ZM26.9568 37.9018C25.6574 38.1573 24.0408 38.3044 22.7261 38.3297C21.4806 38.3119 20.2402 38.1672 19.0241 37.8977C18.8058 37.8415 18.5877 37.7846 18.3698 37.7268L16.022 31.435L17.911 27.6923H28.0892L28.144 27.7958L30.0037 31.5315L27.7327 37.7125C27.4755 37.7813 27.2168 37.8444 26.9568 37.9018ZM16.6133 2.81538L22.1346 6.59385V12.1849L15.308 17.9606L10.5577 15.7962L10.157 15.6136L8.00971 9.45788C10.126 6.4575 13.1191 4.11827 16.6133 2.81538ZM37.9581 9.42952L35.8012 15.6298L30.6096 17.9748L23.7692 12.1849V6.59385L29.3073 2.80394C32.8037 4.10039 35.8366 6.43394 37.9581 9.42952ZM4.74462 21.6744L9.91346 17.2015L14.6768 19.3745L14.7306 19.399L16.6265 26.8305L14.6618 30.5352L7.94452 30.4472C6.18029 27.9126 5.03933 24.9139 4.74462 21.6744ZM31.3384 30.5351L29.3736 26.8304L31.2728 19.3865L36.0802 17.1961L41.2554 21.6744C40.9607 24.9139 39.8196 27.9126 38.0557 30.4471L31.3384 30.5351Z"),C(o,"fill","black"),C(i,"fill-rule","evenodd"),C(i,"clip-rule","evenodd"),C(i,"d","M23 39C23 39.5523 22.5523 40 22 40L6 40C5.44772 40 5 39.5523 5 39C5 38.4477 5.44772 38 6 38L22 38C22.5523 38 23 38.4477 23 39Z"),C(i,"fill","black"),C(s,"fill-rule","evenodd"),C(s,"clip-rule","evenodd"),C(s,"d","M9 36C9 36.5523 8.55228 37 8 37L1 37C0.447715 37 -3.91405e-08 36.5523 -8.74228e-08 36C-1.35705e-07 35.4477 0.447715 35 1 35L8 35C8.55228 35 9 35.4477 9 36Z"),C(s,"fill","black"),C(a,"fill-rule","evenodd"),C(a,"clip-rule","evenodd"),C(a,"d","M3 39C3 39.5523 2.55228 40 2 40L1 40C0.447715 40 3.91405e-08 39.5523 8.74228e-08 39C1.35705e-07 38.4477 0.447715 38 1 38L2 38C2.55228 38 3 38.4477 3 39Z"),C(a,"fill","black"),C(l,"fill-rule","evenodd"),C(l,"clip-rule","evenodd"),C(l,"d","M23 38C32.9411 38 41 29.9411 41 20C41 10.0589 32.9411 2 23 2C13.0589 2 5 10.0589 5 20C5 29.9411 13.0589 38 23 38ZM23 40C34.0457 40 43 31.0457 43 20C43 8.9543 34.0457 0 23 0C11.9543 0 3 8.9543 3 20C3 31.0457 11.9543 40 23 40Z"),C(l,"fill","black"),E(r,c)},m(e,t){f(e,r,t),h(r,o),h(r,i),h(r,s),h(r,a),h(r,l)},p:e,d(e){e&&p(r)}}}
|
|
1270
|
+
// (462:39)
|
|
1271
|
+
function io(e){let n,r,o=/*bonus*/e[3].status+"",i=[/*classWithPart*/e[34]("BonusCardTitleSub")],s={};for(let e=0;e<i.length;e+=1)s=t(s,i[e]);return{c(){n=g("p"),r=b(o),x(n,s)},m(e,t){f(e,n,t),h(n,r)},p(e,t){/*bonus*/8&t[0]&&o!==(o=/*bonus*/e[3].status+"")&&k(r,o,s.contenteditable)},d(e){e&&p(n)}}}
|
|
1272
|
+
// (455:6) {#if status === 'active'}
|
|
1273
|
+
function so(e){let n,r,o,i,s,a=[/*classWithPart*/e[34]("BonusCardTitleSub")],l={};for(let e=0;e<a.length;e+=1)l=t(l,a[e]);return{c(){n=g("span"),r=y("svg"),o=y("path"),i=v(),s=b(/*expiryTime*/e[16]),C(o,"d","M16 0H8V2.66667H16V0ZM10.6667 17.3333H13.3333V9.33333H10.6667V17.3333ZM21.3667 8.51333L23.2667 6.61333C22.6933 5.92667 22.0667 5.3 21.38 4.72667L19.48 6.62667C17.3568 4.92342 14.7153 3.99668 11.9933 4C5.36 4 0 9.37333 0 16C0 22.6267 5.36 28 11.9933 28C18.6267 28 24 22.6267 24 16C24 13.1667 23.0133 10.5667 21.3667 8.51333ZM12 25.3333C6.84667 25.3333 2.66667 21.1533 2.66667 16C2.66667 10.8467 6.84667 6.66667 12 6.66667C17.1533 6.66667 21.3333 10.8467 21.3333 16C21.3333 21.1533 17.1533 25.3333 12 25.3333Z"),C(o,"fill","#6D6D6D"),C(r,"width","24"),C(r,"height","28"),C(r,"viewBox","0 0 24 28"),C(r,"fill","none"),C(r,"xmlns","http://www.w3.org/2000/svg"),x(n,l)},m(e,t){f(e,n,t),h(n,r),h(r,o),h(n,i),h(n,s)},p(e,t){/*expiryTime*/65536&t[0]&&k(s,/*expiryTime*/e[16],l.contenteditable)},d(e){e&&p(n)}}}function ao(e){let n,r,o,i,s,a,l,u,c,d,m,y,_,C,B,E,T,M,S,D,P=/*$_*/e[23]("bonusCard.bonusStatus")+"",O=/*$_*/e[23]("bonusCard.bonusType")+"",H=/*$_*/e[23](`bonusType.${/*bonus*/e[3].type}`)+"",L=[/*classWithPart*/e[34]("BonusCardLabel")],N={};for(let e=0;e<L.length;e+=1)N=t(N,L[e]);function R(e,t){/*status*/
|
|
1274
|
+
return"active"===e[0]?co:uo}let F=R(e),$=F(e),I=[/*classWithPart*/e[34]("BonusCardRowText")],Y={};for(let e=0;e<I.length;e+=1)Y=t(Y,I[e]);let U=[/*classWithPart*/e[34]("BonusCardRow")],W={};for(let e=0;e<U.length;e+=1)W=t(W,U[e]);let G=[/*classWithPart*/e[34]("BonusCardLabel")],j={};for(let e=0;e<G.length;e+=1)j=t(j,G[e]);let V=[/*classWithPart*/e[34]("BonusCardRowText","Type")],z={};for(let e=0;e<V.length;e+=1)z=t(z,V[e]);let Z=[/*classWithPart*/e[34]("BonusCardRow")],K={};for(let e=0;e<Z.length;e+=1)K=t(K,Z[e]);let X=/*bonus*/"standard"===e[3].type&&ho(e),J=/*bonus*/"freeBet"===e[3].type&&mo(e),q=/*bonus*/"freeRound"===e[3].type&&go(e),Q=/*bonus*/"wagering"===e[3].type&&vo(e),ee=/*bonus*/e[3].endTime&&/*status*/"active"===e[0]&&/*bonus*/"wagering"!==e[3].type&&To(e);return{c(){n=g("p"),r=g("span"),o=b(P),i=b(":"),s=v(),a=g("span"),$.c(),l=v(),u=g("p"),c=g("span"),d=b(O),m=b(":"),y=v(),_=g("span"),C=b(H),B=v(),X&&X.c(),E=v(),J&&J.c(),T=v(),q&&q.c(),M=v(),Q&&Q.c(),S=v(),ee&&ee.c(),D=w(),x(r,N),x(a,Y),A(a,"StatusActive",/*status*/"active"===e[0]),A(a,"StatusCompleted",/*status*/"completed"===e[0]),A(a,"StatusClaimable",/*status*/"claimable"===e[0]),x(n,W),x(c,j),x(_,z),x(u,K)},m(e,t){f(e,n,t),h(n,r),h(r,o),h(r,i),h(n,s),h(n,a),$.m(a,null),f(e,l,t),f(e,u,t),h(u,c),h(c,d),h(c,m),h(u,y),h(u,_),h(_,C),f(e,B,t),X&&X.m(e,t),f(e,E,t),J&&J.m(e,t),f(e,T,t),q&&q.m(e,t),f(e,M,t),Q&&Q.m(e,t),f(e,S,t),ee&&ee.m(e,t),f(e,D,t)},p(e,t){/*$_*/8388608&t[0]&&P!==(P=/*$_*/e[23]("bonusCard.bonusStatus")+"")&&k(o,P,N.contenteditable),F===(F=R(e))&&$?$.p(e,t):($.d(1),$=F(e),$&&($.c(),$.m(a,null))),/*status*/1&t[0]&&A(a,"StatusActive",/*status*/"active"===e[0]),/*status*/1&t[0]&&A(a,"StatusCompleted",/*status*/"completed"===e[0]),/*status*/1&t[0]&&A(a,"StatusClaimable",/*status*/"claimable"===e[0]),/*$_*/8388608&t[0]&&O!==(O=/*$_*/e[23]("bonusCard.bonusType")+"")&&k(d,O,j.contenteditable),/*$_, bonus*/8388616&t[0]&&H!==(H=/*$_*/e[23](`bonusType.${/*bonus*/e[3].type}`)+"")&&k(C,H,z.contenteditable),/*bonus*/"standard"===e[3].type?X?X.p(e,t):(X=ho(e),X.c(),X.m(E.parentNode,E)):X&&(X.d(1),X=null),/*bonus*/"freeBet"===e[3].type?J?J.p(e,t):(J=mo(e),J.c(),J.m(T.parentNode,T)):J&&(J.d(1),J=null),/*bonus*/"freeRound"===e[3].type?q?q.p(e,t):(q=go(e),q.c(),q.m(M.parentNode,M)):q&&(q.d(1),q=null),/*bonus*/"wagering"===e[3].type?Q?Q.p(e,t):(Q=vo(e),Q.c(),Q.m(S.parentNode,S)):Q&&(Q.d(1),Q=null),/*bonus*/e[3].endTime&&/*status*/"active"===e[0]&&/*bonus*/"wagering"!==e[3].type?ee?ee.p(e,t):(ee=To(e),ee.c(),ee.m(D.parentNode,D)):ee&&(ee.d(1),ee=null)},d(e){e&&p(n),$.d(),e&&p(l),e&&p(u),e&&p(B),X&&X.d(e),e&&p(E),J&&J.d(e),e&&p(T),q&&q.d(e),e&&p(M),Q&&Q.d(e),e&&p(S),ee&&ee.d(e),e&&p(D)}}}
|
|
1275
|
+
// (469:10) {#if status === 'claimable'}
|
|
1276
|
+
function lo(e){let n,r,o,i,s,a,l,u,c,d,m,y,w,_,C,B,E=/*$_*/e[23]("bonusCard.bonusType")+"",T=/*$_*/e[23](`bonusType.${/*bonus*/e[3].type}`)+"",M=/*$_*/e[23]("bonusCard.validity")+"",S=/*getValidity*/e[30](/*bonus*/e[3])+"",D=[/*classWithPart*/e[34]("BonusCardLabel")],P={};for(let e=0;e<D.length;e+=1)P=t(P,D[e]);let A=[/*classWithPart*/e[34]("BonusCardRowText","Type")],O={};for(let e=0;e<A.length;e+=1)O=t(O,A[e]);let H=[/*classWithPart*/e[34]("BonusCardRow")],L={};for(let e=0;e<H.length;e+=1)L=t(L,H[e]);let N=/*bonus*/"wagering"===e[3].type&&Mo(e),R=[/*classWithPart*/e[34]("BonusCardLabel")],F={};for(let e=0;e<R.length;e+=1)F=t(F,R[e]);let $=[/*classWithPart*/e[34]("BonusCardRowText")],I={};for(let e=0;e<$.length;e+=1)I=t(I,$[e]);let Y=[/*classWithPart*/e[34]("BonusCardRow")],U={};for(let e=0;e<Y.length;e+=1)U=t(U,Y[e]);return{c(){n=g("p"),r=g("span"),o=b(E),i=b(":"),s=v(),a=g("span"),l=b(T),u=v(),N&&N.c(),c=v(),d=g("p"),m=g("span"),y=b(M),w=b(":"),_=v(),C=g("span"),B=b(S),x(r,P),x(a,O),x(n,L),x(m,F),x(C,I),x(d,U)},m(e,t){f(e,n,t),h(n,r),h(r,o),h(r,i),h(n,s),h(n,a),h(a,l),f(e,u,t),N&&N.m(e,t),f(e,c,t),f(e,d,t),h(d,m),h(m,y),h(m,w),h(d,_),h(d,C),h(C,B)},p(e,t){/*$_*/8388608&t[0]&&E!==(E=/*$_*/e[23]("bonusCard.bonusType")+"")&&k(o,E,P.contenteditable),/*$_, bonus*/8388616&t[0]&&T!==(T=/*$_*/e[23](`bonusType.${/*bonus*/e[3].type}`)+"")&&k(l,T,O.contenteditable),/*bonus*/"wagering"===e[3].type?N?N.p(e,t):(N=Mo(e),N.c(),N.m(c.parentNode,c)):N&&(N.d(1),N=null),/*$_*/8388608&t[0]&&M!==(M=/*$_*/e[23]("bonusCard.validity")+"")&&k(y,M,F.contenteditable),/*bonus*/8&t[0]&&S!==(S=/*getValidity*/e[30](/*bonus*/e[3])+"")&&k(B,S,I.contenteditable)},d(e){e&&p(n),e&&p(u),N&&N.d(e),e&&p(c),e&&p(d)}}}
|
|
1277
|
+
// (501:16) {:else}
|
|
1278
|
+
function uo(e){let t,n=/*bonus*/e[3].status+"";return{c(){t=b(n)},m(e,n){f(e,t,n)},p(e,r){/*bonus*/8&r[0]&&n!==(n=/*bonus*/e[3].status+"")&&S(t,n)},d(e){e&&p(t)}}}
|
|
1279
|
+
// (499:16) {#if status === 'active'}
|
|
1280
|
+
function co(e){let t;return{c(){t=b(/*status*/e[0])},m(e,n){f(e,t,n)},p(e,n){/*status*/1&n[0]&&S(t,/*status*/e[0])},d(e){e&&p(t)}}}
|
|
1281
|
+
// (510:12) {#if bonus.type === 'standard'}
|
|
1282
|
+
function ho(e){let n,r,o,i,s,a,l,u,c,d,m,y,w,_,C,B,E,T,M,D,P,O,H=/*$_*/e[23]("bonusCard.bonusAmount")+"",L=/*bonus*/e[3].remainingAmount+"",N=/*bonus*/e[3].amount+"",R=/*$_*/e[23]("bonusCard.wageredAmount")+"",F=/*getWagered*/e[26](/*bonus*/e[3])+/*currencySymbol*/e[15]+"",$=[/*classWithPart*/e[34]("BonusCardLabel")],I={};for(let e=0;e<$.length;e+=1)I=t(I,$[e]);let Y=[/*classWithPart*/e[34]("BonusCardRowText")],U={};for(let e=0;e<Y.length;e+=1)U=t(U,Y[e]);let W=[/*classWithPart*/e[34]("BonusCardRow")],G={};for(let e=0;e<W.length;e+=1)G=t(G,W[e]);let j=[/*classWithPart*/e[34]("BonusCardLabel")],V={};for(let e=0;e<j.length;e+=1)V=t(V,j[e]);function z(e,t){/*bonus*/
|
|
1283
|
+
return e[3].initialWagerRequirementAmount>=2147483647?po:fo}let Z=z(e),K=Z(e),X=[/*classWithPart*/e[34]("BonusCardRowText")],J={};for(let e=0;e<X.length;e+=1)J=t(J,X[e]);let q=[/*classWithPart*/e[34]("BonusCardRow")],Q={};for(let e=0;e<q.length;e+=1)Q=t(Q,q[e]);return{c(){n=g("p"),r=g("span"),o=b(H),i=b(":"),s=v(),a=g("span"),l=g("span"),u=b(L),c=b(/*currencySymbol*/e[15]),d=b(" /\n "),m=g("span"),y=b(N),w=b(/*currencySymbol*/e[15]),_=v(),C=g("p"),B=g("span"),E=b(R),T=b(":"),M=v(),D=g("span"),P=b(F),O=b(" /\n "),K.c(),x(r,I),A(l,"BonusAmount",/*status*/"active"===e[0]),A(m,"Amount",/*status*/"active"===e[0]),x(a,U),x(n,G),x(B,V),x(D,J),x(C,Q)},m(e,t){f(e,n,t),h(n,r),h(r,o),h(r,i),h(n,s),h(n,a),h(a,l),h(l,u),h(l,c),h(a,d),h(a,m),h(m,y),h(m,w),f(e,_,t),f(e,C,t),h(C,B),h(B,E),h(B,T),h(C,M),h(C,D),h(D,P),h(D,O),K.m(D,null)},p(e,t){/*$_*/8388608&t[0]&&H!==(H=/*$_*/e[23]("bonusCard.bonusAmount")+"")&&k(o,H,I.contenteditable),/*bonus*/8&t[0]&&L!==(L=/*bonus*/e[3].remainingAmount+"")&&S(u,L),/*currencySymbol*/32768&t[0]&&S(c,/*currencySymbol*/e[15]),/*status*/1&t[0]&&A(l,"BonusAmount",/*status*/"active"===e[0]),/*bonus*/8&t[0]&&N!==(N=/*bonus*/e[3].amount+"")&&S(y,N),/*currencySymbol*/32768&t[0]&&S(w,/*currencySymbol*/e[15]),/*status*/1&t[0]&&A(m,"Amount",/*status*/"active"===e[0]),/*$_*/8388608&t[0]&&R!==(R=/*$_*/e[23]("bonusCard.wageredAmount")+"")&&k(E,R,V.contenteditable),/*bonus, currencySymbol*/32776&t[0]&&F!==(F=/*getWagered*/e[26](/*bonus*/e[3])+/*currencySymbol*/e[15]+"")&&k(P,F,J.contenteditable),Z===(Z=z(e))&&K?K.p(e,t):(K.d(1),K=Z(e),K&&(K.c(),K.m(D,null)))},d(e){e&&p(n),e&&p(_),e&&p(C),K.d()}}}
|
|
1284
|
+
// (524:18) {:else}
|
|
1285
|
+
function fo(e){let t,n=/*bonus*/e[3].initialWagerRequirementAmount+/*currencySymbol*/e[15]+"";return{c(){t=b(n)},m(e,n){f(e,t,n)},p(e,r){/*bonus, currencySymbol*/32776&r[0]&&n!==(n=/*bonus*/e[3].initialWagerRequirementAmount+/*currencySymbol*/e[15]+"")&&S(t,n)},d(e){e&&p(t)}}}
|
|
1286
|
+
// (522:18) {#if bonus.initialWagerRequirementAmount >= 2147483647}
|
|
1287
|
+
function po(t){let n;return{c(){n=b("∞")},m(e,t){f(e,n,t)},p:e,d(e){e&&p(n)}}}
|
|
1288
|
+
// (530:12) {#if bonus.type === 'freeBet'}
|
|
1289
|
+
function mo(e){let n,r,o,i,s,a,l,u,c,d=/*$_*/e[23]("bonusCard.bonusAmount")+"",m=/*bonus*/e[3].remainingAmount+"",y=[/*classWithPart*/e[34]("BonusCardLabel")],w={};for(let e=0;e<y.length;e+=1)w=t(w,y[e]);let _=[/*classWithPart*/e[34]("BonusCardRowText")],C={};for(let e=0;e<_.length;e+=1)C=t(C,_[e]);let B=[/*classWithPart*/e[34]("BonusCardRow")],E={};for(let e=0;e<B.length;e+=1)E=t(E,B[e]);return{c(){n=g("p"),r=g("span"),o=b(d),i=b(":"),s=v(),a=g("span"),l=g("span"),u=b(m),c=b(/*currencySymbol*/e[15]),x(r,w),A(l,"BonusAmount",/*status*/"active"===e[0]),x(a,C),x(n,E)},m(e,t){f(e,n,t),h(n,r),h(r,o),h(r,i),h(n,s),h(n,a),h(a,l),h(l,u),h(l,c)},p(e,t){/*$_*/8388608&t[0]&&d!==(d=/*$_*/e[23]("bonusCard.bonusAmount")+"")&&k(o,d,w.contenteditable),/*bonus*/8&t[0]&&m!==(m=/*bonus*/e[3].remainingAmount+"")&&S(u,m),/*currencySymbol*/32768&t[0]&&S(c,/*currencySymbol*/e[15]),/*status*/1&t[0]&&A(l,"BonusAmount",/*status*/"active"===e[0])},d(e){e&&p(n)}}}
|
|
1290
|
+
// (538:12) {#if bonus.type === 'freeRound'}
|
|
1291
|
+
function go(e){let t,n=/*bonus*/"active"===e[3].status&&yo(e);return{c(){n&&n.c(),t=w()},m(e,r){n&&n.m(e,r),f(e,t,r)},p(e,r){/*bonus*/"active"===e[3].status?n?n.p(e,r):(n=yo(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null)},d(e){n&&n.d(e),e&&p(t)}}}
|
|
1292
|
+
// (539:14) {#if bonus.status === 'active'}
|
|
1293
|
+
function yo(e){let n,r,i,s,a,l,u,c,d,w,B,E,T,M,S,D,O,H,L,N,R,F,$,I,Y,U,W,G,j,V=/*$_*/e[23]("bonusCard.roundNumber")+"",z=/*bonus*/e[3].numberOfFreeSpin+"",Z=/*$_*/e[23]("bonusCard.game")+"",K=[/*classWithPart*/e[34]("BonusCardLabel")],X={};for(let e=0;e<K.length;e+=1)X=t(X,K[e]);let J=[/*classWithPart*/e[34]("BonusCardRowText")],q={};for(let e=0;e<J.length;e+=1)q=t(q,J[e]);let Q=[/*classWithPart*/e[34]("BonusCardRow")],ee={};for(let e=0;e<Q.length;e+=1)ee=t(ee,Q[e]);let te=[/*classWithPart*/e[34]("BonusCardLabel")],ne={};for(let e=0;e<te.length;e+=1)ne=t(ne,te[e]);let re=/*games*/e[21],oe=[];for(let t=0;t<re.length;t+=1)oe[t]=bo(to(e,re,t));let ie=[/*classWithPart*/e[34]("BonusCardRowText")],se={};for(let e=0;e<ie.length;e+=1)se=t(se,ie[e]);let ae=[/*classWithPart*/e[34]("BonusCardRow")],le={};for(let e=0;e<ae.length;e+=1)le=t(le,ae[e]);return{c(){n=g("p"),r=g("span"),i=b(V),s=b(":"),a=v(),l=g("span"),u=b(z),c=v(),d=g("div"),w=g("div"),B=b(Z),E=b(":"),T=v(),M=g("div"),S=g("div"),D=g("button"),O=y("svg"),H=y("path"),N=v(),R=g("div"),F=g("span");for(let e=0;e<oe.length;e+=1)oe[e].c();$=v(),I=g("button"),Y=y("svg"),U=y("path"),x(r,X),x(l,q),x(n,ee),x(w,ne),C(H,"stroke-linecap","round"),C(H,"stroke-linejoin","round"),C(H,"stroke-width","2"),C(H,"d","M15 19l-7-7 7-7"),C(O,"fill","none"),C(O,"stroke","currentColor"),C(O,"viewBox","0 0 24 24"),C(O,"xmlns","http://www.w3.org/2000/svg"),C(D,"class","SliderNavButton"),C(D,"part","SliderNavButton"),D.disabled=L=/*sliderOffset*/0==e[22],A(D,"Hide",/*games*/e[21].length<=3),C(F,"class","Games"),P(F,"transform","translateX("+/*sliderOffset*/e[22]+"px)"),C(R,"class","Main"),C(U,"stroke-linecap","round"),C(U,"stroke-linejoin","round"),C(U,"stroke-width","2"),C(U,"d","M9 5l7 7-7 7"),C(Y,"fill","none"),C(Y,"stroke","currentColor"),C(Y,"viewBox","0 0 24 24"),C(Y,"xmlns","http://www.w3.org/2000/svg"),C(I,"class","SliderNavButton"),C(I,"part","SliderNavButton"),I.disabled=W=/*sliderOffset*/e[22]<=100*-(/*games*/e[21].length-3),A(I,"Hide",/*games*/e[21].length<=3),C(S,"class","BonusGamesSlider"),x(M,se),x(d,le)},m(t,o){f(t,n,o),h(n,r),h(r,i),h(r,s),h(n,a),h(n,l),h(l,u),f(t,c,o),f(t,d,o),h(d,w),h(w,B),h(w,E),h(d,T),h(d,M),h(M,S),h(S,D),h(D,O),h(O,H),h(S,N),h(S,R),h(R,F);for(let e=0;e<oe.length;e+=1)oe[e]&&oe[e].m(F,null);h(S,$),h(S,I),h(I,Y),h(Y,U),G||(j=[_(D,"click",/*click_handler*/e[44]),_(I,"click",/*click_handler_2*/e[48])],G=!0)},p(e,t){if(/*$_*/8388608&t[0]&&V!==(V=/*$_*/e[23]("bonusCard.roundNumber")+"")&&k(i,V,X.contenteditable),/*bonus*/8&t[0]&&z!==(z=/*bonus*/e[3].numberOfFreeSpin+"")&&k(u,z,q.contenteditable),/*$_*/8388608&t[0]&&Z!==(Z=/*$_*/e[23]("bonusCard.game")+"")&&k(B,Z,ne.contenteditable),/*sliderOffset*/4194304&t[0]&&L!==(L=/*sliderOffset*/0==e[22])&&(D.disabled=L),/*games*/2097152&t[0]&&A(D,"Hide",/*games*/e[21].length<=3),/*games, hover, hoverIndex, $_*/12058624&t[0]|/*gameClicked, enter, leave*/112&t[1]){let n;for(re=/*games*/e[21],n=0;n<re.length;n+=1){const r=to(e,re,n);oe[n]?oe[n].p(r,t):(oe[n]=bo(r),oe[n].c(),oe[n].m(F,null))}for(;n<oe.length;n+=1)oe[n].d(1);oe.length=re.length}/*sliderOffset*/4194304&t[0]&&P(F,"transform","translateX("+/*sliderOffset*/e[22]+"px)"),/*sliderOffset, games*/6291456&t[0]&&W!==(W=/*sliderOffset*/e[22]<=100*-(/*games*/e[21].length-3))&&(I.disabled=W),/*games*/2097152&t[0]&&A(I,"Hide",/*games*/e[21].length<=3)},d(e){e&&p(n),e&&p(c),e&&p(d),m(oe,e),G=!1,o(j)}}}
|
|
1294
|
+
// (556:24) {#each games as game, i}
|
|
1295
|
+
function bo(e){let t,n,r,i,s,a,u,c,d,m,y,w,B,x=/*$_*/e[23]("bonusCard.playNow")+"";function E(){/*click_handler_1*/
|
|
1296
|
+
return e[45](/*game*/e[83])}function T(){/*mouseenter_handler*/
|
|
1297
|
+
return e[46](/*i*/e[85])}return{c(){t=g("span"),n=g("span"),r=b(x),a=v(),u=g("img"),y=v(),C(n,"class",i="PlayNowButton "+(/*hover*/e[19]&&/*hoverIndex*/e[20]==/*i*/e[85]?"ItemHover":"")),C(n,"part",s="PlayNowButton "+(/*hover*/e[19]&&/*hoverIndex*/e[20]==/*i*/e[85]?"itemHover":"")),l(u.src,c=/*game*/e[83].thumbnail)||C(u,"src",c),C(u,"width","100px"),C(u,"height","75px"),C(u,"alt",d=/*game*/e[83].name),C(u,"title",m=/*game*/e[83].name),C(t,"class","Game"),C(t,"part","Game")},m(o,i){f(o,t,i),h(t,n),h(n,r),h(t,a),h(t,u),h(t,y),w||(B=[_(t,"click",E),_(t,"mouseenter",T),_(t,"mouseleave",/*mouseleave_handler*/e[47])],w=!0)},p(t,o){e=t,/*$_*/8388608&o[0]&&x!==(x=/*$_*/e[23]("bonusCard.playNow")+"")&&S(r,x),/*hover, hoverIndex*/1572864&o[0]&&i!==(i="PlayNowButton "+(/*hover*/e[19]&&/*hoverIndex*/e[20]==/*i*/e[85]?"ItemHover":""))&&C(n,"class",i),/*hover, hoverIndex*/1572864&o[0]&&s!==(s="PlayNowButton "+(/*hover*/e[19]&&/*hoverIndex*/e[20]==/*i*/e[85]?"itemHover":""))&&C(n,"part",s),/*games*/2097152&o[0]&&!l(u.src,c=/*game*/e[83].thumbnail)&&C(u,"src",c),/*games*/2097152&o[0]&&d!==(d=/*game*/e[83].name)&&C(u,"alt",d),/*games*/2097152&o[0]&&m!==(m=/*game*/e[83].name)&&C(u,"title",m)},d(e){e&&p(t),w=!1,o(B)}}}
|
|
1298
|
+
// (575:12) {#if bonus.type === 'wagering'}
|
|
1299
|
+
function vo(e){let n,r,o,i,s,a,l,u,c,d,m,y,w,_,C=/*$_*/e[23]("bonusCard.wageringType")+"",B=/*$_*/e[23](`bonusCard.${/*bonus*/e[3].wageringType}`)+"",E=/*$_*/e[23]("bonusCard.wagered")+"",T=[/*classWithPart*/e[34]("BonusCardLabel")],M={};for(let e=0;e<T.length;e+=1)M=t(M,T[e]);let S=[/*classWithPart*/e[34]("BonusCardRowText")],D={};for(let e=0;e<S.length;e+=1)D=t(D,S[e]);let P=[/*classWithPart*/e[34]("BonusCardRow")],A={};for(let e=0;e<P.length;e+=1)A=t(A,P[e]);let O=[/*classWithPart*/e[34]("BonusCardLabel")],H={};for(let e=0;e<O.length;e+=1)H=t(H,O[e]);function L(e,t){/*bonus*/
|
|
1300
|
+
return"money"===e[3].wageringType?_o:wo}let N=L(e),R=N(e),F=[/*classWithPart*/e[34]("BonusCardRowText")],$={};for(let e=0;e<F.length;e+=1)$=t($,F[e]);let I=[/*classWithPart*/e[34]("BonusCardRow")],Y={};for(let e=0;e<I.length;e+=1)Y=t(Y,I[e]);return{c(){n=g("p"),r=g("span"),o=b(C),i=b(":"),s=v(),a=g("span"),l=b(B),u=v(),c=g("p"),d=g("span"),m=b(E),y=b(":"),w=v(),_=g("span"),R.c(),x(r,M),x(a,D),x(n,A),x(d,H),x(_,$),x(c,Y)},m(e,t){f(e,n,t),h(n,r),h(r,o),h(r,i),h(n,s),h(n,a),h(a,l),f(e,u,t),f(e,c,t),h(c,d),h(d,m),h(d,y),h(c,w),h(c,_),R.m(_,null)},p(e,t){/*$_*/8388608&t[0]&&C!==(C=/*$_*/e[23]("bonusCard.wageringType")+"")&&k(o,C,M.contenteditable),/*$_, bonus*/8388616&t[0]&&B!==(B=/*$_*/e[23](`bonusCard.${/*bonus*/e[3].wageringType}`)+"")&&k(l,B,D.contenteditable),/*$_*/8388608&t[0]&&E!==(E=/*$_*/e[23]("bonusCard.wagered")+"")&&k(m,E,H.contenteditable),N===(N=L(e))&&R?R.p(e,t):(R.d(1),R=N(e),R&&(R.c(),R.m(_,null)))},d(e){e&&p(n),e&&p(u),e&&p(c),R.d()}}}
|
|
1301
|
+
// (596:20) {:else}
|
|
1302
|
+
function wo(t){return{c:e,m:e,p:e,d:e}}
|
|
1303
|
+
// (584:20) {#if bonus.wageringType === 'money'}
|
|
1304
|
+
function _o(e){let t;function n(e,t){/*status*/
|
|
1305
|
+
return"active"===e[0]?Bo:Co}let r=n(e),o=r(e);return{c(){o.c(),t=w()},m(e,n){o.m(e,n),f(e,t,n)},p(e,i){r===(r=n(e))&&o?o.p(e,i):(o.d(1),o=r(e),o&&(o.c(),o.m(t.parentNode,t)))},d(e){o.d(e),e&&p(t)}}}
|
|
1306
|
+
// (588:22) {:else}
|
|
1307
|
+
function Co(e){let t,n,r,o=/*getWagered*/e[26](/*bonus*/e[3])+/*currencySymbol*/e[15]+"";function i(e,t){/*bonus*/
|
|
1308
|
+
return e[3].initialWagerRequirementAmount>=2147483647?Eo:xo}let s=i(e),a=s(e);return{c(){t=b(o),n=b(" /\n "),a.c(),r=w()},m(e,o){f(e,t,o),f(e,n,o),a.m(e,o),f(e,r,o)},p(e,n){/*bonus, currencySymbol*/32776&n[0]&&o!==(o=/*getWagered*/e[26](/*bonus*/e[3])+/*currencySymbol*/e[15]+"")&&S(t,o),s===(s=i(e))&&a?a.p(e,n):(a.d(1),a=s(e),a&&(a.c(),a.m(r.parentNode,r)))},d(e){e&&p(t),e&&p(n),a.d(e),e&&p(r)}}}
|
|
1309
|
+
// (585:22) {#if status === 'active'}
|
|
1310
|
+
function Bo(e){let t,n,r,o,i,s,a,l=/*getWageringWagered*/e[27](/*bonus*/e[3])+"",u=/*bonus*/e[3].wageringProgress?.currentLevelIncrement+"";return{c(){t=b(l),n=v(),r=b(/*currencySymbol*/e[15]),o=b(" / \n "),i=b(u),s=v(),a=b(/*currencySymbol*/e[15])},m(e,l){f(e,t,l),f(e,n,l),f(e,r,l),f(e,o,l),f(e,i,l),f(e,s,l),f(e,a,l)},p(e,n){/*bonus*/8&n[0]&&l!==(l=/*getWageringWagered*/e[27](/*bonus*/e[3])+"")&&S(t,l),/*currencySymbol*/32768&n[0]&&S(r,/*currencySymbol*/e[15]),/*bonus*/8&n[0]&&u!==(u=/*bonus*/e[3].wageringProgress?.currentLevelIncrement+"")&&S(i,u),/*currencySymbol*/32768&n[0]&&S(a,/*currencySymbol*/e[15])},d(e){e&&p(t),e&&p(n),e&&p(r),e&&p(o),e&&p(i),e&&p(s),e&&p(a)}}}
|
|
1311
|
+
// (592:24) {:else}
|
|
1312
|
+
function xo(e){let t,n=/*bonus*/e[3].initialWagerRequirementAmount+/*currencySymbol*/e[15]+"";return{c(){t=b(n)},m(e,n){f(e,t,n)},p(e,r){/*bonus, currencySymbol*/32776&r[0]&&n!==(n=/*bonus*/e[3].initialWagerRequirementAmount+/*currencySymbol*/e[15]+"")&&S(t,n)},d(e){e&&p(t)}}}
|
|
1313
|
+
// (590:24) {#if bonus.initialWagerRequirementAmount >= 2147483647}
|
|
1314
|
+
function Eo(t){let n;return{c(){n=b("∞")},m(e,t){f(e,n,t)},p:e,d(e){e&&p(n)}}}
|
|
1315
|
+
// (603:12) {#if bonus.endTime && status === 'active' && bonus.type !== 'wagering'}
|
|
1316
|
+
function To(e){let n,r,o,i,s,a,l,u=/*$_*/e[23]("bonusCard.validUntil")+"",c=/*getTimeFormat*/e[29](/*bonus*/e[3].endTime)+"",d=[/*classWithPart*/e[34]("BonusCardLabel")],m={};for(let e=0;e<d.length;e+=1)m=t(m,d[e]);let y=[/*classWithPart*/e[34]("BonusCardRowText")],w={};for(let e=0;e<y.length;e+=1)w=t(w,y[e]);let _=[/*classWithPart*/e[34]("BonusCardRow")],C={};for(let e=0;e<_.length;e+=1)C=t(C,_[e]);return{c(){n=g("p"),r=g("span"),o=b(u),i=b(":"),s=v(),a=g("span"),l=b(c),x(r,m),x(a,w),x(n,C)},m(e,t){f(e,n,t),h(n,r),h(r,o),h(r,i),h(n,s),h(n,a),h(a,l)},p(e,t){/*$_*/8388608&t[0]&&u!==(u=/*$_*/e[23]("bonusCard.validUntil")+"")&&k(o,u,m.contenteditable),/*bonus*/8&t[0]&&c!==(c=/*getTimeFormat*/e[29](/*bonus*/e[3].endTime)+"")&&k(l,c,w.contenteditable)},d(e){e&&p(n)}}}
|
|
1317
|
+
// (475:12) {#if bonus.type === 'wagering'}
|
|
1318
|
+
function Mo(e){let n,r,o,i,s,a,l=/*$_*/e[23]("bonusCard.levels")+"",u=[/*classWithPart*/e[34]("BonusCardLabel")],c={};for(let e=0;e<u.length;e+=1)c=t(c,u[e]);function d(e,t){/*levelCount*/
|
|
1319
|
+
return e[6]>0?ko:So}let m=d(e),y=m(e),w=[/*classWithPart*/e[34]("BonusCardRowText")],_={};for(let e=0;e<w.length;e+=1)_=t(_,w[e]);let C=[/*classWithPart*/e[34]("BonusCardRow")],B={};for(let e=0;e<C.length;e+=1)B=t(B,C[e]);return{c(){n=g("p"),r=g("span"),o=b(l),i=b(":"),s=v(),a=g("span"),y.c(),x(r,c),x(a,_),x(n,B)},m(e,t){f(e,n,t),h(n,r),h(r,o),h(r,i),h(n,s),h(n,a),y.m(a,null)},p(e,t){/*$_*/8388608&t[0]&&l!==(l=/*$_*/e[23]("bonusCard.levels")+"")&&k(o,l,c.contenteditable),m===(m=d(e))&&y?y.p(e,t):(y.d(1),y=m(e),y&&(y.c(),y.m(a,null)))},d(e){e&&p(n),y.d()}}}
|
|
1320
|
+
// (481:18) {:else}
|
|
1321
|
+
function So(t){let n;return{c(){n=b("∞")},m(e,t){f(e,n,t)},p:e,d(e){e&&p(n)}}}
|
|
1322
|
+
// (479:18) {#if levelCount > 0}
|
|
1323
|
+
function ko(e){let t;return{c(){t=b(/*levelCount*/e[6])},m(e,n){f(e,t,n)},p(e,n){/*levelCount*/64&n[0]&&S(t,/*levelCount*/e[6])},d(e){e&&p(t)}}}
|
|
1324
|
+
// (611:8) {#if status === 'active' || status === 'completed'}
|
|
1325
|
+
function Do(e){let t,n,r=/*bonus*/"standard"===e[3].type&&Po(e),o=/*bonus*/"wagering"===e[3].type&&Ao(e);return{c(){r&&r.c(),t=v(),o&&o.c(),n=w()},m(e,i){r&&r.m(e,i),f(e,t,i),o&&o.m(e,i),f(e,n,i)},p(e,i){/*bonus*/"standard"===e[3].type?r?r.p(e,i):(r=Po(e),r.c(),r.m(t.parentNode,t)):r&&(r.d(1),r=null),/*bonus*/"wagering"===e[3].type?o?o.p(e,i):(o=Ao(e),o.c(),o.m(n.parentNode,n)):o&&(o.d(1),o=null)},d(e){r&&r.d(e),e&&p(t),o&&o.d(e),e&&p(n)}}}
|
|
1326
|
+
// (612:10) {#if bonus.type === 'standard'}
|
|
1327
|
+
function Po(e){let n,r,o,i=[
|
|
1328
|
+
/*classWithPart*/e[34]("CircularProgress"),{value:o=/*getProgressValue*/e[28](/*bonus*/e[3])},{status:/*status*/e[0]},{clientstyling:/*clientstyling*/e[1]},{clientstylingurl:/*clientstylingurl*/e[2]}],s={};for(let e=0;e<i.length;e+=1)s=t(s,i[e]);let a=[/*classWithPart*/e[34]("BonusCardProgress")],l={};for(let e=0;e<a.length;e+=1)l=t(l,a[e]);return{c(){n=g("div"),r=g("casino-bonus-progress"),x(r,s),x(n,l)},m(e,t){f(e,n,t),h(n,r)},p(e,t){x(r,s=K(i,[
|
|
1329
|
+
/*classWithPart*/e[34]("CircularProgress"),/*bonus*/8&t[0]&&o!==(o=/*getProgressValue*/e[28](/*bonus*/e[3]))&&{value:o},/*status*/1&t[0]&&{status:/*status*/e[0]},/*clientstyling*/2&t[0]&&{clientstyling:/*clientstyling*/e[1]},/*clientstylingurl*/4&t[0]&&{clientstylingurl:/*clientstylingurl*/e[2]}]))},d(e){e&&p(n)}}}
|
|
1330
|
+
// (618:10) {#if bonus.type === 'wagering'}
|
|
1331
|
+
function Ao(e){let n,r,o,i,s,a,l,u,c,d=/*$_*/e[23]("bonusCard.level")+"",m=/*bonus*/(e[3].wageringProgress?.currentLevel||1)+"",y=[
|
|
1332
|
+
/*classWithPart*/e[34]("CircularProgress"),{value:o=/*getProgressValue*/e[28](/*bonus*/e[3])},{status:/*status*/e[0]},{clientstyling:/*clientstyling*/e[1]},{clientstylingurl:/*clientstylingurl*/e[2]}],w={};for(let e=0;e<y.length;e+=1)w=t(w,y[e]);function _(e,t){/*levelCount*/
|
|
1333
|
+
return e[6]>0?Ho:Oo}let C=_(e),B=C(e),E=[/*classWithPart*/e[34]("CircularProgressText")],T={};for(let e=0;e<E.length;e+=1)T=t(T,E[e]);let M=[/*classWithPart*/e[34]("BonusCardProgress")],S={};for(let e=0;e<M.length;e+=1)S=t(S,M[e]);return{c(){n=g("div"),r=g("casino-bonus-progress"),i=v(),s=g("div"),a=b(d),l=b(": "),u=b(m),c=b(" / \n "),B.c(),x(r,w),x(s,T),x(n,S)},m(e,t){f(e,n,t),h(n,r),h(n,i),h(n,s),h(s,a),h(s,l),h(s,u),h(s,c),B.m(s,null)},p(e,t){x(r,w=K(y,[
|
|
1334
|
+
/*classWithPart*/e[34]("CircularProgress"),/*bonus*/8&t[0]&&o!==(o=/*getProgressValue*/e[28](/*bonus*/e[3]))&&{value:o},/*status*/1&t[0]&&{status:/*status*/e[0]},/*clientstyling*/2&t[0]&&{clientstyling:/*clientstyling*/e[1]},/*clientstylingurl*/4&t[0]&&{clientstylingurl:/*clientstylingurl*/e[2]}])),/*$_*/8388608&t[0]&&d!==(d=/*$_*/e[23]("bonusCard.level")+"")&&k(a,d,T.contenteditable),/*bonus*/8&t[0]&&m!==(m=/*bonus*/(e[3].wageringProgress?.currentLevel||1)+"")&&k(u,m,T.contenteditable),C===(C=_(e))&&B?B.p(e,t):(B.d(1),B=C(e),B&&(B.c(),B.m(s,null)))},d(e){e&&p(n),B.d()}}}
|
|
1335
|
+
// (624:16) {:else}
|
|
1336
|
+
function Oo(t){let n;return{c(){n=b("∞")},m(e,t){f(e,n,t)},p:e,d(e){e&&p(n)}}}
|
|
1337
|
+
// (622:16) {#if levelCount > 0}
|
|
1338
|
+
function Ho(e){let t;return{c(){t=b(/*levelCount*/e[6])},m(e,n){f(e,t,n)},p(e,n){/*levelCount*/64&n[0]&&S(t,/*levelCount*/e[6])},d(e){e&&p(t)}}}
|
|
1339
|
+
// (634:6) {#if showAdditionalSection}
|
|
1340
|
+
function Lo(e){let n,r,o,i,s,a,l,u,c,d,m,w,B=/*$_*/e[23]("bonusCard.rewards")+"",E=[/*classWithPart*/e[34]("BonusCardAdditionalTitle")],T={};for(let e=0;e<E.length;e+=1)T=t(T,E[e]);function M(e,t){/*showAdditionalSectionContent*/
|
|
1341
|
+
return e[9]?No:Ro}let S=M(e),D=S(e),P=[/*classWithPart*/e[34]("BonusCardAdditionalButton")],O={};for(let e=0;e<P.length;e+=1)O=t(O,P[e]);let H=[/*classWithPart*/e[34]("BonusCardAdditionalHeader")],L={};for(let e=0;e<H.length;e+=1)L=t(L,H[e]);let N=/*showAdditionalSectionContent*/e[9]&&Fo(e),R=[/*classWithPart*/e[34]("BonusCardAdditional")],F={};for(let e=0;e<R.length;e+=1)F=t(F,R[e]);return{c(){n=g("div"),r=g("div"),o=g("span"),i=y("svg"),s=y("path"),a=v(),l=b(B),u=v(),c=g("span"),D.c(),d=v(),N&&N.c(),C(s,"d","M18 5.97075H14.885C15.3396 5.74285 15.7565 5.44638 16.121 5.09175C16.6824 4.52865 16.9977 3.76592 16.9977 2.97075C16.9977 2.17558 16.6824 1.41285 16.121 0.84975C14.987 -0.28325 13.013 -0.28325 11.879 0.84975C10.243 2.48675 10.02 5.56775 10 5.91375C9.98 5.56775 9.757 2.48675 8.121 0.85075C6.987 -0.28225 5.011 -0.28125 3.879 0.85075C3.312 1.41675 3 2.16975 3 2.97075C3 3.77175 3.312 4.52575 3.878 5.09175C4.24311 5.4461 4.66027 5.74253 5.115 5.97075H2C0.897 5.97075 0 6.86875 0 7.97075V10.9707C0 11.236 0.105357 11.4903 0.292893 11.6779C0.48043 11.8654 0.734784 11.9707 1 11.9707V17.9708C1 19.0738 1.897 19.9708 3 19.9708H17C18.103 19.9708 19 19.0738 19 17.9708V11.9707C19.2652 11.9707 19.5196 11.8654 19.7071 11.6779C19.8946 11.4903 20 11.236 20 10.9707V7.97075C20 6.86875 19.103 5.97075 18 5.97075ZM6 17.9708H3V11.9707H6V17.9708ZM6 9.97075H2V7.97075H6V9.97075ZM5.293 3.67775C5.19982 3.58514 5.12595 3.47497 5.07565 3.35361C5.02536 3.23225 4.99964 3.10212 5 2.97075C4.99947 2.83933 5.02498 2.7091 5.07506 2.58759C5.12514 2.46608 5.1988 2.3557 5.29177 2.26281C5.38475 2.16993 5.49521 2.09639 5.61677 2.04643C5.73833 1.99647 5.86858 1.97109 6 1.97175C6.268 1.97175 6.519 2.07575 6.708 2.26475C7.298 2.85375 7.642 3.91275 7.826 4.79475C6.945 4.60975 5.88 4.26475 5.293 3.67775ZM12 17.9708H8V11.9707H12V17.9708ZM12 9.97075H8V7.97075H12V9.97075ZM13.293 2.26475C13.482 2.07575 13.733 1.97175 14 1.97175C14.267 1.97175 14.518 2.07575 14.707 2.26375C14.8945 2.45128 14.9998 2.70559 14.9998 2.97075C14.9998 3.23591 14.8945 3.49022 14.707 3.67775C14.117 4.26975 13.058 4.61375 12.175 4.79875C12.358 3.91375 12.703 2.85475 13.293 2.26475ZM17 17.9708H14V11.9707H17V17.9708ZM18 9.97075H14V7.97075H18V9.97075Z"),C(s,"fill","black"),C(i,"width","20"),C(i,"height","20"),C(i,"viewBox","0 0 20 20"),C(i,"fill","none"),C(i,"xmlns","http://www.w3.org/2000/svg"),x(o,T),x(c,O),x(r,L),A(r,"Active",/*showAdditionalSectionContent*/e[9]),x(n,F)},m(t,p){f(t,n,p),h(n,r),h(r,o),h(o,i),h(i,s),h(o,a),h(o,l),h(r,u),h(r,c),D.m(c,null),h(n,d),N&&N.m(n,null),m||(w=_(r,"click",/*click_handler_3*/e[49]),m=!0)},p(e,t){/*$_*/8388608&t[0]&&B!==(B=/*$_*/e[23]("bonusCard.rewards")+"")&&k(l,B,T.contenteditable),S!==(S=M(e))&&(D.d(1),D=S(e),D&&(D.c(),D.m(c,null))),/*showAdditionalSectionContent*/512&t[0]&&A(r,"Active",/*showAdditionalSectionContent*/e[9]),/*showAdditionalSectionContent*/e[9]?N?N.p(e,t):(N=Fo(e),N.c(),N.m(n,null)):N&&(N.d(1),N=null)},d(e){e&&p(n),D.d(),N&&N.d(),m=!1,w()}}}
|
|
1342
|
+
// (647:14) {:else}
|
|
1343
|
+
function No(e){let t,n;return{c(){t=y("svg"),n=y("path"),C(n,"d","M16.1422 10.071L9.07108 2.99998L2.00002 10.071"),C(n,"stroke","black"),C(n,"stroke-width","3"),C(n,"stroke-linecap","round"),C(t,"width","18"),C(t,"height","12"),C(t,"viewBox","0 0 18 12"),C(t,"fill","none"),C(t,"xmlns","http://www.w3.org/2000/svg")},m(e,r){f(e,t,r),h(t,n)},d(e){e&&p(t)}}}
|
|
1344
|
+
// (643:14) {#if !showAdditionalSectionContent}
|
|
1345
|
+
function Ro(e){let t,n;return{c(){t=y("svg"),n=y("path"),C(n,"d","M2 2.07104L9.07107 9.14211L16.1421 2.07104"),C(n,"stroke","black"),C(n,"stroke-width","3"),C(n,"stroke-linecap","round"),C(t,"width","18"),C(t,"height","12"),C(t,"viewBox","0 0 18 12"),C(t,"fill","none"),C(t,"xmlns","http://www.w3.org/2000/svg")},m(e,r){f(e,t,r),h(t,n)},d(e){e&&p(t)}}}
|
|
1346
|
+
// (654:10) {#if showAdditionalSectionContent}
|
|
1347
|
+
function Fo(e){let n,r=/*bonus*/"wagering"===e[3].type&&$o(e),o=[/*classWithPart*/e[34]("BonusCardAdditionalContent")],i={};for(let e=0;e<o.length;e+=1)i=t(i,o[e]);return{c(){n=g("div"),r&&r.c(),x(n,i)},m(e,t){f(e,n,t),r&&r.m(n,null)},p(e,t){/*bonus*/"wagering"===e[3].type?r?r.p(e,t):(r=$o(e),r.c(),r.m(n,null)):r&&(r.d(1),r=null)},d(e){e&&p(n),r&&r.d()}}}
|
|
1348
|
+
// (656:12) {#if bonus.type === 'wagering'}
|
|
1349
|
+
function $o(e){let n,r,o,i,s,a=/*$_*/e[23]("bonusCard.allRewards")+"";function l(e,t){/*bonus*/
|
|
1350
|
+
return e[3].status?Yo:Io}let u=l(e),c=u(e),d=[
|
|
1351
|
+
/*classWithPart*/e[34]("BonusAllRewardsLink"),{href:"javascript:void(0)"}],m={};for(let e=0;e<d.length;e+=1)m=t(m,d[e]);return{c(){c.c(),n=v(),r=g("a"),o=b(a),x(r,m)},m(t,a){c.m(t,a),f(t,n,a),f(t,r,a),h(r,o),i||(s=_(r,"click",/*click_handler_4*/e[50]),i=!0)},p(e,t){u===(u=l(e))&&c?c.p(e,t):(c.d(1),c=u(e),c&&(c.c(),c.m(n.parentNode,n))),/*$_*/8388608&t[0]&&a!==(a=/*$_*/e[23]("bonusCard.allRewards")+"")&&k(o,a,m.contenteditable)},d(e){c.d(e),e&&p(n),e&&p(r),i=!1,s()}}}
|
|
1352
|
+
// (670:14) {:else}
|
|
1353
|
+
function Io(e){let t,n=/*bonus*/e[3].levels,r=[];for(let t=0;t<n.length;t+=1)r[t]=Wo(Jr(e,n,t));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=w()},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, $_*/8388616&o[0]|/*classWithPart, levelBonusMapper*/10&o[1]){let i;for(n=/*bonus*/e[3].levels,i=0;i<n.length;i+=1){const s=Jr(e,n,i);r[i]?r[i].p(s,o):(r[i]=Wo(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){m(r,e),e&&p(t)}}}
|
|
1354
|
+
// (657:14) {#if bonus.status}
|
|
1355
|
+
function Yo(e){let t,n=/*getRewards*/e[33](/*bonus*/e[3],/*levels*/e[5]),r=[];for(let t=0;t<n.length;t+=1)r[t]=jo(Qr(e,n,t));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=w()},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, levels, $_*/8388648&o[0]|/*classWithPart, getRewards*/12&o[1]){let i;for(n=/*getRewards*/e[33](/*bonus*/e[3],/*levels*/e[5]),i=0;i<n.length;i+=1){const s=Qr(e,n,i);r[i]?r[i].p(s,o):(r[i]=jo(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){m(r,e),e&&p(t)}}}
|
|
1356
|
+
// (679:20) {#each level.bonuses as levelBonus}
|
|
1357
|
+
function Uo(e){let t,n=/*levelBonusMapper*/e[32](/*level*/e[77],/*levelBonus*/e[80])+"";return{c(){t=b(n)},m(e,n){f(e,t,n)},p(e,r){/*bonus*/8&r[0]&&n!==(n=/*levelBonusMapper*/e[32](/*level*/e[77],/*levelBonus*/e[80])+"")&&S(t,n)},d(e){e&&p(t)}}}
|
|
1358
|
+
// (671:16) {#each bonus.levels as level, index}
|
|
1359
|
+
function Wo(e){let n,r,o,i,s,a,l,u,c,d=/*$_*/e[23]("bonusCard.level")+"",y=/*level*/(e[77].maxRepeats>1?`${/*index*/e[79]+1}-${/*index*/e[79]+1+/*level*/e[77].maxRepeats-1}`/*index*/:e[79]+1)+"",w=[/*classWithPart*/e[34]("BonusRewardsLevelsItemPosition")],_={};for(let e=0;e<w.length;e+=1)_=t(_,w[e]);let C=/*level*/e[77].bonuses,B=[];for(let t=0;t<C.length;t+=1)B[t]=Uo(qr(e,C,t));let E=[/*classWithPart*/e[34]("BonusRewardsLevelsItem")],T={};for(let e=0;e<E.length;e+=1)T=t(T,E[e]);return{c(){n=g("p"),r=g("span"),o=b(d),i=v(),s=b(y),a=b(":"),l=v(),u=g("span");for(let e=0;e<B.length;e+=1)B[e].c();c=v(),x(r,_),x(n,T)},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,u);for(let e=0;e<B.length;e+=1)B[e]&&B[e].m(u,null);h(n,c)},p(e,t){if(/*$_*/8388608&t[0]&&d!==(d=/*$_*/e[23]("bonusCard.level")+"")&&k(o,d,_.contenteditable),/*bonus*/8&t[0]&&y!==(y=/*level*/(e[77].maxRepeats>1?`${/*index*/e[79]+1}-${/*index*/e[79]+1+/*level*/e[77].maxRepeats-1}`/*index*/:e[79]+1)+"")&&k(s,y,_.contenteditable),/*bonus*/8&t[0]|/*levelBonusMapper*/2&t[1]){let n;for(C=/*level*/e[77].bonuses,n=0;n<C.length;n+=1){const r=qr(e,C,n);B[n]?B[n].p(r,t):(B[n]=Uo(r),B[n].c(),B[n].m(u,null))}for(;n<B.length;n+=1)B[n].d(1);B.length=C.length}},d(e){e&&p(n),m(B,e)}}}
|
|
1360
|
+
// (664:22) {#each item.desc as description}
|
|
1361
|
+
function Go(e){let t,n=/*description*/e[74]+"";return{c(){t=b(n)},m(e,n){f(e,t,n)},p(e,r){/*bonus, levels*/40&r[0]&&n!==(n=/*description*/e[74]+"")&&S(t,n)},d(e){e&&p(t)}}}
|
|
1362
|
+
// (658:16) {#each (getRewards(bonus, levels)) as item }
|
|
1363
|
+
function jo(e){let n,r,o,i,s,a,l,u,c,d=/*$_*/e[23](`bonusCard.${/*item*/e[71].label}`)+"",y=/*$_*/e[23]("bonusCard.level")+"",w=[/*classWithPart*/e[34]("BonusRewardsLevelsItemPosition")],_={};for(let e=0;e<w.length;e+=1)_=t(_,w[e]);let C=/*item*/e[71].desc,B=[];for(let t=0;t<C.length;t+=1)B[t]=Go(eo(e,C,t));let E=[/*classWithPart*/e[34]("BonusRewardsLevelsItem")],T={};for(let e=0;e<E.length;e+=1)T=t(T,E[e]);return{c(){n=g("p"),r=g("span"),o=b(d),i=v(),s=b(y),a=b(":"),l=v(),u=g("span");for(let e=0;e<B.length;e+=1)B[e].c();c=v(),x(r,_),x(n,T)},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,u);for(let e=0;e<B.length;e+=1)B[e]&&B[e].m(u,null);h(n,c)},p(e,t){if(/*$_, bonus, levels*/8388648&t[0]&&d!==(d=/*$_*/e[23](`bonusCard.${/*item*/e[71].label}`)+"")&&k(o,d,_.contenteditable),/*$_*/8388608&t[0]&&y!==(y=/*$_*/e[23]("bonusCard.level")+"")&&k(s,y,_.contenteditable),/*bonus, levels*/40&t[0]|/*getRewards*/4&t[1]){let n;for(C=/*item*/e[71].desc,n=0;n<C.length;n+=1){const r=eo(e,C,n);B[n]?B[n].p(r,t):(B[n]=Go(r),B[n].c(),B[n].m(u,null))}for(;n<B.length;n+=1)B[n].d(1);B.length=C.length}},d(e){e&&p(n),m(B,e)}}}
|
|
1364
|
+
// (726:6) {:else}
|
|
1365
|
+
function Vo(e){let n,r,o,i,s,a,l,u,c,d,m,w=/*$_*/e[23]("bonusCard.terms")+"",_=[
|
|
1366
|
+
/*classWithPart*/e[34]("BonusCardTermsLink"),{href:/*tcurl*/e[18]},{target:"__blank"}],B={};for(let e=0;e<_.length;e+=1)B=t(B,_[e]);let E=[/*classWithPart*/e[34]("BonusCardTerms")],T={};for(let e=0;e<E.length;e+=1)T=t(T,E[e]);return{c(){n=g("div"),r=g("a"),o=y("svg"),i=y("path"),s=y("path"),a=y("path"),l=y("path"),u=y("path"),c=y("path"),d=v(),m=b(w),C(i,"fill-rule","evenodd"),C(i,"clip-rule","evenodd"),C(i,"d","M0.5 3.675C0.5 1.64535 2.14535 0 4.175 0H14.675C16.7046 0 18.35 1.64535 18.35 3.675V13.4312C18.35 14.4319 17.9419 15.3893 17.2201 16.0823L13.164 19.9761C12.4796 20.6331 11.5676 21 10.6189 21H4.175C2.14536 21 0.5 19.3546 0.5 17.325V3.675ZM4.175 2.1C3.30515 2.1 2.6 2.80515 2.6 3.675V17.325C2.6 18.1948 3.30515 18.9 4.175 18.9H10.6189C11.0255 18.9 11.4164 18.7428 11.7097 18.4612L15.7657 14.5674C16.0751 14.2704 16.25 13.86 16.25 13.4312V3.675C16.25 2.80515 15.5448 2.1 14.675 2.1H4.175Z"),C(i,"fill","black"),C(s,"fill-rule","evenodd"),C(s,"clip-rule","evenodd"),C(s,"d","M16.775 14.9625L12.575 14.9625C12.1401 14.9625 11.7875 15.3151 11.7875 15.75L11.7875 19.95L10.2125 19.95L10.2125 15.75C10.2125 14.4452 11.2703 13.3875 12.575 13.3875L16.775 13.3875L16.775 14.9625Z"),C(s,"fill","black"),C(a,"fill-rule","evenodd"),C(a,"clip-rule","evenodd"),C(a,"d","M6.27502 4.9875C6.27502 4.55258 6.6276 4.2 7.06252 4.2H11.7875C12.2224 4.2 12.575 4.55258 12.575 4.9875C12.575 5.42242 12.2224 5.775 11.7875 5.775H7.06252C6.6276 5.775 6.27502 5.42242 6.27502 4.9875Z"),C(a,"fill","black"),C(l,"fill-rule","evenodd"),C(l,"clip-rule","evenodd"),C(l,"d","M4.70001 8.1375C4.70001 7.70258 5.05259 7.35 5.48751 7.35H13.3625C13.7974 7.35 14.15 7.70258 14.15 8.1375C14.15 8.57242 13.7974 8.925 13.3625 8.925H5.48751C5.05259 8.925 4.70001 8.57242 4.70001 8.1375Z"),C(l,"fill","black"),C(u,"fill-rule","evenodd"),C(u,"clip-rule","evenodd"),C(u,"d","M4.70001 11.8125C4.70001 11.3776 5.05259 11.025 5.48751 11.025H13.3625C13.7974 11.025 14.15 11.3776 14.15 11.8125C14.15 12.2474 13.7974 12.6 13.3625 12.6H5.48751C5.05259 12.6 4.70001 12.2474 4.70001 11.8125Z"),C(u,"fill","black"),C(c,"fill-rule","evenodd"),C(c,"clip-rule","evenodd"),C(c,"d","M4.70001 15.4875C4.70001 15.0526 5.05259 14.7 5.48751 14.7H8.11251C8.54744 14.7 8.90001 15.0526 8.90001 15.4875C8.90001 15.9224 8.54744 16.275 8.11251 16.275H5.48751C5.05259 16.275 4.70001 15.9224 4.70001 15.4875Z"),C(c,"fill","black"),C(o,"width","19"),C(o,"height","21"),C(o,"viewBox","0 0 19 21"),C(o,"fill","none"),C(o,"xmlns","http://www.w3.org/2000/svg"),x(r,B),x(n,T)},m(e,t){f(e,n,t),h(n,r),h(r,o),h(o,i),h(o,s),h(o,a),h(o,l),h(o,u),h(o,c),h(r,d),h(r,m)},p(e,t){/*$_*/8388608&t[0]&&w!==(w=/*$_*/e[23]("bonusCard.terms")+"")&&k(m,w,B.contenteditable),x(r,B=K(_,[
|
|
1367
|
+
/*classWithPart*/e[34]("BonusCardTermsLink"),/*tcurl*/262144&t[0]&&{href:/*tcurl*/e[18]},{target:"__blank"}]))},d(e){e&&p(n)}}}
|
|
1368
|
+
// (694:6) {#if showTerms}
|
|
1369
|
+
function zo(e){let n,r,o,i,s,a,l,u,c,d,m,w,B,E,T,M,S,D=/*$_*/e[23]("bonusCard.terms")+"",P=[/*classWithPart*/e[34]("BonusCardTermsTitle")],O={};for(let e=0;e<P.length;e+=1)O=t(O,P[e]);function H(e,t){/*showTermsSectionContent*/
|
|
1370
|
+
return e[10]?Zo:Ko}let L=H(e),N=L(e),R=[/*classWithPart*/e[34]("BonusCardTermsButton")],F={};for(let e=0;e<R.length;e+=1)F=t(F,R[e]);let $=[/*classWithPart*/e[34]("BonusCardTermsHeader")],I={};for(let e=0;e<$.length;e+=1)I=t(I,$[e]);let Y=/*showTermsSectionContent*/e[10]&&Xo(e),U=[/*classWithPart*/e[34]("BonusCardTerms")],W={};for(let e=0;e<U.length;e+=1)W=t(W,U[e]);return{c(){n=g("div"),r=g("div"),o=g("span"),i=y("svg"),s=y("path"),a=y("path"),l=y("path"),u=y("path"),c=y("path"),d=y("path"),m=v(),w=b(D),B=v(),E=g("span"),N.c(),T=v(),Y&&Y.c(),C(s,"fill-rule","evenodd"),C(s,"clip-rule","evenodd"),C(s,"d","M0.5 3.675C0.5 1.64535 2.14535 0 4.175 0H14.675C16.7046 0 18.35 1.64535 18.35 3.675V13.4312C18.35 14.4319 17.9419 15.3893 17.2201 16.0823L13.164 19.9761C12.4796 20.6331 11.5676 21 10.6189 21H4.175C2.14536 21 0.5 19.3546 0.5 17.325V3.675ZM4.175 2.1C3.30515 2.1 2.6 2.80515 2.6 3.675V17.325C2.6 18.1948 3.30515 18.9 4.175 18.9H10.6189C11.0255 18.9 11.4164 18.7428 11.7097 18.4612L15.7657 14.5674C16.0751 14.2704 16.25 13.86 16.25 13.4312V3.675C16.25 2.80515 15.5448 2.1 14.675 2.1H4.175Z"),C(s,"fill","black"),C(a,"fill-rule","evenodd"),C(a,"clip-rule","evenodd"),C(a,"d","M16.775 14.9625L12.575 14.9625C12.1401 14.9625 11.7875 15.3151 11.7875 15.75L11.7875 19.95L10.2125 19.95L10.2125 15.75C10.2125 14.4452 11.2703 13.3875 12.575 13.3875L16.775 13.3875L16.775 14.9625Z"),C(a,"fill","black"),C(l,"fill-rule","evenodd"),C(l,"clip-rule","evenodd"),C(l,"d","M6.27502 4.9875C6.27502 4.55258 6.6276 4.2 7.06252 4.2H11.7875C12.2224 4.2 12.575 4.55258 12.575 4.9875C12.575 5.42242 12.2224 5.775 11.7875 5.775H7.06252C6.6276 5.775 6.27502 5.42242 6.27502 4.9875Z"),C(l,"fill","black"),C(u,"fill-rule","evenodd"),C(u,"clip-rule","evenodd"),C(u,"d","M4.70001 8.1375C4.70001 7.70258 5.05259 7.35 5.48751 7.35H13.3625C13.7974 7.35 14.15 7.70258 14.15 8.1375C14.15 8.57242 13.7974 8.925 13.3625 8.925H5.48751C5.05259 8.925 4.70001 8.57242 4.70001 8.1375Z"),C(u,"fill","black"),C(c,"fill-rule","evenodd"),C(c,"clip-rule","evenodd"),C(c,"d","M4.70001 11.8125C4.70001 11.3776 5.05259 11.025 5.48751 11.025H13.3625C13.7974 11.025 14.15 11.3776 14.15 11.8125C14.15 12.2474 13.7974 12.6 13.3625 12.6H5.48751C5.05259 12.6 4.70001 12.2474 4.70001 11.8125Z"),C(c,"fill","black"),C(d,"fill-rule","evenodd"),C(d,"clip-rule","evenodd"),C(d,"d","M4.70001 15.4875C4.70001 15.0526 5.05259 14.7 5.48751 14.7H8.11251C8.54744 14.7 8.90001 15.0526 8.90001 15.4875C8.90001 15.9224 8.54744 16.275 8.11251 16.275H5.48751C5.05259 16.275 4.70001 15.9224 4.70001 15.4875Z"),C(d,"fill","black"),C(i,"width","19"),C(i,"height","21"),C(i,"viewBox","0 0 19 21"),C(i,"fill","none"),C(i,"xmlns","http://www.w3.org/2000/svg"),x(o,O),x(E,F),x(r,I),A(r,"Active",/*showTermsSectionContent*/e[10]),x(n,W)},m(t,p){f(t,n,p),h(n,r),h(r,o),h(o,i),h(i,s),h(i,a),h(i,l),h(i,u),h(i,c),h(i,d),h(o,m),h(o,w),h(r,B),h(r,E),N.m(E,null),h(n,T),Y&&Y.m(n,null),M||(S=_(r,"click",/*click_handler_5*/e[51]),M=!0)},p(e,t){/*$_*/8388608&t[0]&&D!==(D=/*$_*/e[23]("bonusCard.terms")+"")&&k(w,D,O.contenteditable),L!==(L=H(e))&&(N.d(1),N=L(e),N&&(N.c(),N.m(E,null))),/*showTermsSectionContent*/1024&t[0]&&A(r,"Active",/*showTermsSectionContent*/e[10]),/*showTermsSectionContent*/e[10]?Y?Y.p(e,t):(Y=Xo(e),Y.c(),Y.m(n,null)):Y&&(Y.d(1),Y=null)},d(e){e&&p(n),N.d(),Y&&Y.d(),M=!1,S()}}}
|
|
1371
|
+
// (714:14) {:else}
|
|
1372
|
+
function Zo(e){let t,n;return{c(){t=y("svg"),n=y("path"),C(n,"d","M16.1422 10.071L9.07108 2.99998L2.00002 10.071"),C(n,"stroke","black"),C(n,"stroke-width","3"),C(n,"stroke-linecap","round"),C(t,"width","18"),C(t,"height","12"),C(t,"viewBox","0 0 18 12"),C(t,"fill","none"),C(t,"xmlns","http://www.w3.org/2000/svg")},m(e,r){f(e,t,r),h(t,n)},d(e){e&&p(t)}}}
|
|
1373
|
+
// (710:14) {#if !showTermsSectionContent}
|
|
1374
|
+
function Ko(e){let t,n;return{c(){t=y("svg"),n=y("path"),C(n,"d","M2 2.07104L9.07107 9.14211L16.1421 2.07104"),C(n,"stroke","black"),C(n,"stroke-width","3"),C(n,"stroke-linecap","round"),C(t,"width","18"),C(t,"height","12"),C(t,"viewBox","0 0 18 12"),C(t,"fill","none"),C(t,"xmlns","http://www.w3.org/2000/svg")},m(e,r){f(e,t,r),h(t,n)},d(e){e&&p(t)}}}
|
|
1375
|
+
// (721:10) {#if showTermsSectionContent}
|
|
1376
|
+
function Xo(n){let r,o,s,a,l=[/*classWithPart*/n[34]("BonusCardTermsContent")],u={};for(let e=0;e<l.length;e+=1)u=t(u,l[e]);return{c(){r=g("div"),x(r,u)},m(t,l){var u;f(t,r,l),s||(u=o=/*setContent*/n[38].call(null,r,/*bonusDescription*/n[14].terms_and_conditions),a=u&&i(u.destroy)?u.destroy:e,s=!0)},p(e,t){o&&i(o.update)&&/*bonusDescription*/16384&t[0]&&o.update.call(null,/*bonusDescription*/e[14].terms_and_conditions)},d(e){e&&p(r),s=!1,a()}}}
|
|
1377
|
+
// (744:2) {#if showActionSection}
|
|
1378
|
+
function Jo(e){let n,r,o,i=/*status*/"claimable"===e[0]&&qo(e),s=/*status*/"active"===e[0]&&/*bonus*/"active"===e[3].status&&ei(e),a=[/*classWithPart*/e[34]("BonusCardActionContent")],l={};for(let e=0;e<a.length;e+=1)l=t(l,a[e]);let u=[/*classWithPart*/e[34]("BonusCardAction")],c={};for(let e=0;e<u.length;e+=1)c=t(c,u[e]);return{c(){n=g("div"),r=g("div"),i&&i.c(),o=v(),s&&s.c(),x(r,l),x(n,c)},m(e,t){f(e,n,t),h(n,r),i&&i.m(r,null),h(r,o),s&&s.m(r,null)},p(e,t){/*status*/"claimable"===e[0]?i?i.p(e,t):(i=qo(e),i.c(),i.m(r,o)):i&&(i.d(1),i=null),/*status*/"active"===e[0]&&/*bonus*/"active"===e[3].status?s?s.p(e,t):(s=ei(e),s.c(),s.m(r,null)):s&&(s.d(1),s=null)},d(e){e&&p(n),i&&i.d(),s&&s.d()}}}
|
|
1379
|
+
// (747:8) {#if status === 'claimable'}
|
|
1380
|
+
function qo(e){let n,r,o,i,s,a,l,u,c,d,m,w,B,E=/*$_*/e[23]("bonusCard.join")+"",T=/*claimBonusError*/!0===e[13]&&Qo(e),M=[/*classWithPart*/e[34]("BonusCardJoinCountdown")],S={};for(let e=0;e<M.length;e+=1)S=t(S,M[e]);let D=[
|
|
1381
|
+
/*classWithPart*/e[34]("BonusJoinButton"),{type:"button"},{disabled:m=!/*isButtonClickable*/e[11]}],P={};for(let e=0;e<D.length;e+=1)P=t(P,D[e]);let A=[/*classWithPart*/e[34]("BonusCardJoinWrapper")],O={};for(let e=0;e<A.length;e+=1)O=t(O,A[e]);return{c(){n=g("div"),T&&T.c(),r=v(),o=g("span"),i=y("svg"),s=y("path"),a=v(),l=b(/*endTime*/e[17]),u=v(),c=g("button"),d=b(E),C(s,"d","M16 0H8V2.66667H16V0ZM10.6667 17.3333H13.3333V9.33333H10.6667V17.3333ZM21.3667 8.51333L23.2667 6.61333C22.6933 5.92667 22.0667 5.3 21.38 4.72667L19.48 6.62667C17.3568 4.92342 14.7153 3.99668 11.9933 4C5.36 4 0 9.37333 0 16C0 22.6267 5.36 28 11.9933 28C18.6267 28 24 22.6267 24 16C24 13.1667 23.0133 10.5667 21.3667 8.51333ZM12 25.3333C6.84667 25.3333 2.66667 21.1533 2.66667 16C2.66667 10.8467 6.84667 6.66667 12 6.66667C17.1533 6.66667 21.3333 10.8467 21.3333 16C21.3333 21.1533 17.1533 25.3333 12 25.3333Z"),C(s,"fill","#6D6D6D"),C(i,"width","24"),C(i,"height","28"),C(i,"viewBox","0 0 24 28"),C(i,"fill","none"),C(i,"xmlns","http://www.w3.org/2000/svg"),x(o,S),x(c,P),x(n,O)},m(t,p){f(t,n,p),T&&T.m(n,null),h(n,r),h(n,o),h(o,i),h(i,s),h(o,a),h(o,l),h(n,u),h(n,c),h(c,d),c.autofocus&&c.focus(),w||(B=_(c,"click",/*eventClaimBonus*/e[24]),w=!0)},p(e,t){/*claimBonusError*/!0===e[13]?T?T.p(e,t):(T=Qo(e),T.c(),T.m(n,r)):T&&(T.d(1),T=null),/*endTime*/131072&t[0]&&k(l,/*endTime*/e[17],S.contenteditable),/*$_*/8388608&t[0]&&E!==(E=/*$_*/e[23]("bonusCard.join")+"")&&k(d,E,P.contenteditable),x(c,P=K(D,[
|
|
1382
|
+
/*classWithPart*/e[34]("BonusJoinButton"),{type:"button"},/*isButtonClickable*/2048&t[0]&&m!==(m=!/*isButtonClickable*/e[11])&&{disabled:m}]))},d(e){e&&p(n),T&&T.d(),w=!1,B()}}}
|
|
1383
|
+
// (749:12) {#if claimBonusError === true}
|
|
1384
|
+
function Qo(e){let n,r,o=/*$_*/e[23]("bonusCard.error")+"",i=[/*classWithPart*/e[34]("BonusCardJoinError")],s={};for(let e=0;e<i.length;e+=1)s=t(s,i[e]);return{c(){n=g("span"),r=b(o),x(n,s)},m(e,t){f(e,n,t),h(n,r)},p(e,t){/*$_*/8388608&t[0]&&o!==(o=/*$_*/e[23]("bonusCard.error")+"")&&k(r,o,s.contenteditable)},d(e){e&&p(n)}}}
|
|
1385
|
+
// (763:8) {#if status === 'active' && bonus.status === 'active'}
|
|
1386
|
+
function ei(e){let n,r,o,i,s,a=/*$_*/e[23]("bonusCard.forfeit")+"",l=[
|
|
1387
|
+
/*classWithPart*/e[34]("BonusForfeitButton"),{type:"button"},{disabled:o=!/*isButtonClickable*/e[11]}],u={};for(let e=0;e<l.length;e+=1)u=t(u,l[e]);return{c(){n=g("button"),r=b(a),x(n,u)},m(t,o){f(t,n,o),h(n,r),n.autofocus&&n.focus(),i||(s=_(n,"click",/*eventForfeitBonus*/e[25]),i=!0)},p(e,t){/*$_*/8388608&t[0]&&a!==(a=/*$_*/e[23]("bonusCard.forfeit")+"")&&k(r,a,u.contenteditable),x(n,u=K(l,[
|
|
1388
|
+
/*classWithPart*/e[34]("BonusForfeitButton"),{type:"button"},/*isButtonClickable*/2048&t[0]&&o!==(o=!/*isButtonClickable*/e[11])&&{disabled:o}]))},d(e){e&&p(n),i=!1,s()}}}function ti(t){let n,r=/*bonus*/t[3]&&no(t);return{c(){r&&r.c(),n=w(),this.c=e},m(e,t){r&&r.m(e,t),f(e,n,t)},p(e,t){/*bonus*/e[3]?r?r.p(e,t):(r=no(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)}}}function ni(e,t,n){let r,o;c(e,Hn,(e=>n(23,o=e)));var i=this&&this.__rest||function(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};let s,a,l,u,d,h,{rawbonus:f=""}=t,{lang:p="en"}=t,{status:m=""}=t,{clientstyling:g=""}=t,{clientstylingurl:y=""}=t,{cmsendpoint:b=""}=t,{translationurl:v=""}=t,w=[],_=!1,C=!1,B=!1,x=!1,E=!0,T=!1,M=!1,S={},k="",D="",P=!1,A=[],O=0;Object.keys(jr).forEach((e=>{Ln(e,jr[e])})),N((()=>(window.addEventListener("message",R,!1),()=>{window.removeEventListener("message",R)})));const H=e=>{if(!e||!e.vendorGamesDetail)return[];let t=[];return Object.keys(e.vendorGamesDetail).length>0&&Object.keys(e.vendorGamesDetail).forEach((n=>{t=e.vendorGamesDetail[n]})),t},L=e=>{if(!e)return[];const t=[];let r=!1;return e.map(((e,n)=>{const{maxRepeats:o,completedTime:s}=e,a=i(e,["maxRepeats","completedTime"]);0===o&&(r=!0);for(let e=0;e<o;e++)t.push(Object.assign({},a))})),n(6,a=r?0:t.length),t},R=e=>{switch(e.data.type){case"OnBonusClaimedDone":n(11,E=!0);break;case"OnBonusForfeitedDone":n(11,E=!0);case"OnBonusClaimError":e.data.bonusCode===s.code&&n(13,M=!0)}},$=(e,t)=>({remainder:e%t,quotient:Math.floor(e/t)}),I=e=>{const t=new Date;return new Date(e).getTime()-t.getTime()},Y=e=>{const t=I(e)/6e4,{quotient:n,remainder:r}=$(t,1440),{quotient:o,remainder:i}=$(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(" ")},U=(e,t,n,r)=>{const o=I(e);o<0?n():(r(Y(e)),
|
|
1389
|
+
// check if bonus will expire
|
|
1390
|
+
o<t&&setTimeout((()=>{window.postMessage({type:"OnWageringBonusExpired"})}),o))},W=()=>{s&&((s.endTime||s.trigger&&s.trigger.endTime)&&U(s.endTime||s.trigger.endTime,3e4,(()=>n(17,k="Expired")),(e=>n(17,k=e))),s.expiryDate&&U(s.expiryDate,3e4,(()=>n(16,u="Expired")),(e=>n(16,u=e))))},G=(e,t)=>{switch(t.type){case"standard":case"freeBet":return((e,t)=>{let n;n=o(`bonusType.${t.type}`);const r=Kr(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"freeRound":return`${t.freespinNumber} Free Spins`;case"tournamentTicket":return"Enroll to Tournament Ticket";case"oddsBoost":return"Enroll to Odds Boost";case"cashBack":return"Enroll to Cash Back";case"stakeBack":return"Enroll to Stake Back"}},j=e=>{window.postMessage({type:"BonusGameAction",gameId:e.id,name:e.name,gameLaunchUrl:e.href},window.location.href)},V=e=>{n(19,P=!0),n(20,h=e)},z=()=>{n(19,P=!1),n(20,h=-1)};return e.$$set=e=>{"rawbonus"in e&&n(39,f=e.rawbonus),"lang"in e&&n(40,p=e.lang),"status"in e&&n(0,m=e.status),"clientstyling"in e&&n(1,g=e.clientstyling),"clientstylingurl"in e&&n(2,y=e.clientstylingurl),"cmsendpoint"in e&&n(41,b=e.cmsendpoint),"translationurl"in e&&n(42,v=e.translationurl)},e.$$.update=()=>{var t;/*status*/1&e.$$.dirty[0]&&("claimable"===m&&n(7,_=!0),"active"===m&&n(7,_=!0)),/*status*/1&e.$$.dirty[0]|/*rawbonus, lang*/768&e.$$.dirty[1]&&n(43,r=f&&p&&m),/*initialLoad*/4096&e.$$.dirty[1]&&r&&(()=>{try{n(3,s=JSON.parse(f))}catch(e){}s&&("wagering"===s.type&&n(8,C=!0),n(15,l=Kr(s.currency)),n(5,w=L(s.levels)),"freeRound"===s.type&&n(21,A=H(s.freeSpin)),W())})(),/*bonus*/8&e.$$.dirty[0]|/*initialLoad, lang, cmsendpoint*/5632&e.$$.dirty[1]&&r&&s&&(p&&Nn(p),b?(t=s.id,fetch(`${b}/${p}/bonuses-information/${t}`).then((e=>e.json())).then((e=>{e&&e[t]&&(n(12,T=!0),n(14,S=e[t]))}))):(e=>{var t,r;n(18,D=e.url?e.url:null===(r=null===(t=e.presentation)||void 0===t?void 0:t.url)||void 0===r?void 0:r.content)})(s)),/*clientstyling, customStylingContainer*/18&e.$$.dirty[0]&&g&&d&&(()=>{let e=document.createElement("style");e.innerHTML=g,d.appendChild(e)})(),/*clientstylingurl, customStylingContainer*/20&e.$$.dirty[0]&&y&&d&&(()=>{let e=new URL(y),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{d.appendChild(t)}),1)}))})(),/*translationurl*/2048&e.$$.dirty[1]&&v&&fetch(v).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{Ln(t,e[t])}))})).catch((e=>{console.log(e)}))},[m,g,y,s,d,w,a,_,C,B,x,E,T,M,S,l,u,k,D,P,h,A,O,o,()=>{n(11,E=!1),n(13,M=!1),window.postMessage({type:"OnBonusClaimed",bonusCode:s.code})},()=>{n(11,E=!1),window.postMessage({type:"OnBonusForfeit",bonus:s})},e=>{let t=(10*e.initialWagerRequirementAmount-10*e.remainingWagerRequirementAmount)/10;return"released"===e.status&&(t+=e.remainingAmount),t},e=>{var t,n;return((10*(null===(t=e.wageringProgress)||void 0===t?void 0:t.currentLevelIncrement)-10*(null===(n=e.wageringProgress)||void 0===n?void 0:n.gap))/10).toFixed(1)},e=>{var t,n,r;let o,i;return"wagering"===e.type&&"active"===e.status&&"money"===e.wageringType?(i=null===(t=e.wageringProgress)||void 0===t?void 0:t.currentLevelIncrement,0!=i&&(o=(((null===(n=e.wageringProgress)||void 0===n?void 0:n.currentLevelIncrement)-(null===(r=e.wageringProgress)||void 0===r?void 0:r.gap))/i*100).toFixed(1))):"released"==e.status?o=100:(i=e.initialWagerRequirementAmount,0!=i&&(o=((e.initialWagerRequirementAmount-e.remainingWagerRequirementAmount)/i*100).toFixed(1))),Number(o)},e=>Vr(e).format("YYYY-MM-DD hh:mm:ss"),e=>{if(!e.wallet)return;let t=e.wallet.validityMinutes;return 0===t?"infinite":Math.round(t/1440)+" days"},e=>{if(e.products)return e.products;{let t=[];return e.wallet&&(e.wallet.casino&&t.push("Casino"),e.wallet.sports&&t.push("Sports")),t}},G,(e,t)=>{var n;const r=(null===(n=e.wageringProgress)||void 0===n?void 0:n.currentLevel)-1,o=t.length-1,i=e=>e.filter((e=>e.index>=0&&e.index<=o)).map((e=>{const n=t[e.index];return{label:e.label,desc:n.bonuses.map((e=>G(n,e)))}}));return"active"===e.status?i([{label:"current",index:r},{label:"next",index:r+1}]):e.status?i([{label:"last",index:o},{label:"previous",index:o-1}]):i([{label:"first",index:0},{label:"next",index:1}])},(e,t="")=>({part:e,class:[e,t].join(" ")}),j,V,z,(e,t)=>{let n=document.createElement("div");n.innerHTML=t,e.append(n)},f,p,b,v,r,()=>n(22,O+=300),e=>j(e),e=>V(e),()=>z(),()=>n(22,O-=300),()=>{n(9,B=!B)},()=>window.postMessage({type:"OnWageringBonusAllRewardsClick",bonusWalletID:s.id}),()=>{n(10,x=!x)},function(e){F[e?"unshift":"push"]((()=>{d=e,n(4,d)}))}]}function ri({totalItems:e,pageSize:t,currentPage:n,limit:r}){const o=Math.ceil(e/t),i=r&&o>function(e){return 2*e+3+2}
|
|
1391
|
+
/* src/component/CasinoBonusPagination.svelte generated by Svelte v3.59.2 */(r),s=i?function({totalPages:e,limit:t,currentPage:n}){const r=2*t+2,o=1+r,i=e-r,s=o+2;if(n<=o-t)return Array(s).fill(null).map(((t,n)=>n===s-1?{type:"number",value:e}:n===s-2?{type:"symbol",symbol:".",value:o+1}:{type:"number",value:n+1}));if(n>=i+t)return Array(s).fill(null).map(((e,t)=>0===t?{type:"number",value:1}:1===t?{type:"symbol",symbol:".",value:i-1}:{type:"number",value:i+t-2}));if(n>=o-t&&n<=i+t)return Array(s).fill(null).map(((r,o)=>0===o?{type:"number",value:1}:1===o?{type:"symbol",symbol:".",value:n-t+(o-2)}:o===s-1?{type:"number",value:e}:o===s-2?{type:"symbol",symbol:".",value:n+t+1}:{type:"number",value:n-t+(o-2)}));return[]}({totalPages:o,limit:r,currentPage:n}):function({totalPages:e}){return new Array(e).fill(null).map(((e,t)=>({type:"number",value:t+1})))}({totalPages:o});return[{type:"symbol",symbol:"<",value:n<=1?1:n-1},...s||[],{type:"symbol",symbol:">",value:n>=o?o:n+1}]}function oi(e,t,n){const r=e.slice();return r[27]=t[n],r}
|
|
1392
|
+
// (90:69)
|
|
1393
|
+
function ii(t){let n;return{c(){n=g("slot"),n.textContent=">",C(n,"name","next")},m(e,t){f(e,n,t)},p:e,d(e){e&&p(n)}}}
|
|
1394
|
+
// (86:69)
|
|
1395
|
+
function si(t){let n;return{c(){n=g("slot"),n.textContent="<",C(n,"name","prev")},m(e,t){f(e,n,t)},p:e,d(e){e&&p(n)}}}
|
|
1396
|
+
// (82:66)
|
|
1397
|
+
function ai(t){let n;return{c(){n=g("slot"),n.innerHTML="<span>...</span>",C(n,"name","ellipsis")},m(e,t){f(e,n,t)},p:e,d(e){e&&p(n)}}}
|
|
1398
|
+
// (78:6) {#if option.type === 'number'}
|
|
1399
|
+
function li(e){let t,n,r,o,i=/*option*/e[27].value+"";return{c(){t=g("slot"),n=g("span"),r=b(i),C(t,"name","number"),C(t,"value",o=/*option*/e[27].value)},m(e,o){f(e,t,o),h(t,n),h(n,r)},p(e,n){/*options*/32&n&&i!==(i=/*option*/e[27].value+"")&&S(r,i),/*options*/32&n&&o!==(o=/*option*/e[27].value)&&C(t,"value",o)},d(e){e&&p(t)}}}
|
|
1400
|
+
// (60:4) {#each options as option}
|
|
1401
|
+
function ui(e){let t,n,r,o,i;function s(e,t){/*option*/
|
|
1402
|
+
return"number"===e[27].type?li:/*option*/"symbol"===e[27].type&&/*option*/"."===e[27].symbol?ai:/*option*/"symbol"===e[27].type&&/*option*/"<"===e[27].symbol?si:/*option*/"symbol"===e[27].type&&/*option*/">"===e[27].symbol?ii:void 0}let a=s(e),l=a&&a(e);function u(){/*click_handler*/
|
|
1403
|
+
return e[19](/*option*/e[27])}return{c(){t=g("button"),l&&l.c(),n=v(),t.disabled=r=/*option*/"symbol"===e[27].type&&/*option*/">"===e[27].symbol&&/*currentPage*/e[1]>=/*totalPages*/e[6]||/*option*/"symbol"===e[27].type&&/*option*/"<"===e[27].symbol&&/*currentPage*/e[1]<=1,C(t,"class","option"),C(t,"role","presentation"),A(t,"number",/*option*/"number"===e[27].type),A(t,"prev",/*option*/"symbol"===e[27].type&&/*option*/"<"===e[27].symbol),A(t,"next",/*option*/"symbol"===e[27].type&&/*option*/">"===e[27].symbol),A(t,"disabled",/*option*/"symbol"===e[27].type&&/*option*/">"===e[27].symbol&&/*currentPage*/e[1]>=/*totalPages*/e[6]||/*option*/"symbol"===e[27].type&&/*option*/"<"===e[27].symbol&&/*currentPage*/e[1]<=1),A(t,"ellipsis",/*option*/"symbol"===e[27].type&&/*option*/"."===e[27].symbol),A(t,"active",/*option*/"number"===e[27].type&&/*option*/e[27].value===/*currentPage*/e[1])},m(e,r){f(e,t,r),l&&l.m(t,null),h(t,n),o||(i=_(t,"click",u),o=!0)},p(o,i){a===(a=s(e=o))&&l?l.p(e,i):(l&&l.d(1),l=a&&a(e),l&&(l.c(),l.m(t,n))),/*options, currentPage, totalPages*/98&i&&r!==(r=/*option*/"symbol"===e[27].type&&/*option*/">"===e[27].symbol&&/*currentPage*/e[1]>=/*totalPages*/e[6]||/*option*/"symbol"===e[27].type&&/*option*/"<"===e[27].symbol&&/*currentPage*/e[1]<=1)&&(t.disabled=r),/*options*/32&i&&A(t,"number",/*option*/"number"===e[27].type),/*options*/32&i&&A(t,"prev",/*option*/"symbol"===e[27].type&&/*option*/"<"===e[27].symbol),/*options*/32&i&&A(t,"next",/*option*/"symbol"===e[27].type&&/*option*/">"===e[27].symbol),/*options, currentPage, totalPages*/98&i&&A(t,"disabled",/*option*/"symbol"===e[27].type&&/*option*/">"===e[27].symbol&&/*currentPage*/e[1]>=/*totalPages*/e[6]||/*option*/"symbol"===e[27].type&&/*option*/"<"===e[27].symbol&&/*currentPage*/e[1]<=1),/*options*/32&i&&A(t,"ellipsis",/*option*/"symbol"===e[27].type&&/*option*/"."===e[27].symbol),/*options, currentPage*/34&i&&A(t,"active",/*option*/"number"===e[27].type&&/*option*/e[27].value===/*currentPage*/e[1])},d(e){e&&p(t),l&&l.d(),o=!1,i()}}}
|
|
1404
|
+
// (99:2) {#if showInput}
|
|
1405
|
+
function ci(e){let t,n,r,i,s,a,l,u;return{c(){t=g("div"),n=g("span"),n.textContent="Go To Page",r=v(),i=g("input"),s=v(),a=g("button"),a.textContent="Go",C(i,"type","number"),C(i,"class","PaginationInput"),C(i,"part","PaginationInput"),C(a,"type","button"),C(a,"class","PaginationGoButton"),C(t,"class","PaginationInputWrapper")},m(o,c){f(o,t,c),h(t,n),h(t,r),h(t,i),D(i,/*pageForInput*/e[3]),h(t,s),h(t,a),l||(u=[_(i,"input",/*input_input_handler*/e[20]),_(i,"change",/*change_handler*/e[21]),_(a,"click",/*click_handler_1*/e[22])],l=!0)},p(e,t){/*pageForInput*/8&t&&M(i.value)!==/*pageForInput*/e[3]&&D(i,/*pageForInput*/e[3])},d(e){e&&p(t),l=!1,o(u)}}}function di(t){let n,r,o,i,s,a=/*options*/t[5],l=[];for(let e=0;e<a.length;e+=1)l[e]=ui(oi(t,a,e));let u=/*showInput*/t[7]&&ci(t);return{c(){n=g("div"),r=g("div");for(let e=0;e<l.length;e+=1)l[e].c();s=v(),u&&u.c(),this.c=e,C(r,"class",o="PaginationWrapper "+(/*mobileView*/t[2]?"PaginationWrapperMobile":"")),C(r,"part",i="PaginationWrapper "+(/*mobileView*/t[2]?"PaginationWrapperMobile":"")),C(n,"class","GeneralPagination"),C(n,"part","GeneralPagination")},m(e,o){f(e,n,o),h(n,r);for(let e=0;e<l.length;e+=1)l[e]&&l[e].m(r,null);h(n,s),u&&u.m(n,null)
|
|
1406
|
+
/*div1_binding*/,t[23](n)},p(e,[t]){if(/*options, currentPage, totalPages, handleOptionClick*/354&t){let n;for(a=/*options*/e[5],n=0;n<a.length;n+=1){const o=oi(e,a,n);l[n]?l[n].p(o,t):(l[n]=ui(o),l[n].c(),l[n].m(r,null))}for(;n<l.length;n+=1)l[n].d(1);l.length=a.length}/*mobileView*/4&t&&o!==(o="PaginationWrapper "+(/*mobileView*/e[2]?"PaginationWrapperMobile":""))&&C(r,"class",o),/*mobileView*/4&t&&i!==(i="PaginationWrapper "+(/*mobileView*/e[2]?"PaginationWrapperMobile":""))&&C(r,"part",i),/*showInput*/e[7]?u?u.p(e,t):(u=ci(e),u.c(),u.m(n,null)):u&&(u.d(1),u=null)},i:e,o:e,d(e){e&&p(n),m(l,e),u&&u.d()
|
|
1407
|
+
/*div1_binding*/,t[23](null)}}}function hi(e,t,n){let r,o,i,s,a,l,u,c,d,{totalitems:h=""}=t,{pagesize:f=10}=t,{currentpage:p="1"}=t,{limit:m=2}=t,{showinput:g=""}=t,{clientstyling:y=""}=t,{clientstylingurl:b=""}=t,v=window.navigator.userAgent,w=!1;Gr(v)&&(w=!0);const _=e=>{window.postMessage({type:"PaginationChange",page:e.value})},C=e=>{n(4,c=e>a?a:e)};return e.$$set=e=>{"totalitems"in e&&n(10,h=e.totalitems),"pagesize"in e&&n(11,f=e.pagesize),"currentpage"in e&&n(12,p=e.currentpage),"limit"in e&&n(13,m=e.limit),"showinput"in e&&n(14,g=e.showinput),"clientstyling"in e&&n(15,y=e.clientstyling),"clientstylingurl"in e&&n(16,b=e.clientstylingurl)},e.$$.update=()=>{/*clientstyling, customStylingContainer*/32769&e.$$.dirty&&y&&l&&(()=>{let e=document.createElement("style");e.innerHTML=y,l.appendChild(e)})(),/*clientstylingurl, customStylingContainer*/65537&e.$$.dirty&&b&&l&&(()=>{let e=new URL(b),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{l.appendChild(t)}),1)}))})(),/*totalitems*/1024&e.$$.dirty&&n(18,r=Number(h)),/*showinput*/16384&e.$$.dirty&&n(7,o=g),/*currentpage*/4096&e.$$.dirty&&n(1,i=Number(p)),/*pagesize*/2048&e.$$.dirty&&n(17,s=f),/*totalItems, pageSize, currentPage, limit*/401410&e.$$.dirty&&n(5,d=ri({totalItems:r,pageSize:s,currentPage:i,limit:m})),/*totalItems, pageSize*/393216&e.$$.dirty&&n(6,a=Math.ceil(r/s))},[l,i,w,u,c,d,a,o,_,C,h,f,p,m,g,y,b,s,r,e=>_(e),function(){u=M(this.value),n(3,u)},()=>C(u),()=>_({value:c}),function(e){F[e?"unshift":"push"]((()=>{l=e,n(0,l)}))}]}
|
|
1408
|
+
/* src/CasinoBonusesController.svelte generated by Svelte v3.59.2 */
|
|
1409
|
+
function fi(e,t,n){const r=e.slice();return r[64]=t[n],r}function pi(e,t,n){const r=e.slice();return r[67]=t[n],r}
|
|
1410
|
+
// (295:6) {#each StatusForFilter as status}
|
|
1411
|
+
function mi(e){let n,r,o,i,s=/*status*/e[67]+"",a=[{type:"button"},
|
|
1412
|
+
/*classWithPartMatchMobile*/e[24]("BonusStatusFilter"),{disabled:/*isLoading*/e[10]}],l={};for(let e=0;e<a.length;e+=1)l=t(l,a[e]);function u(){/*click_handler*/
|
|
1413
|
+
return e[38](/*status*/e[67])}return{c(){n=g("button"),r=b(s),x(n,l),A(n,"active",/*status*/e[67]===/*bonusStatus*/e[21])},m(e,t){f(e,n,t),h(n,r),n.autofocus&&n.focus(),o||(i=_(n,"click",u),o=!0)},p(t,r){e=t,x(n,l=K(a,[{type:"button"},/*classWithPartMatchMobile*/16777216&r[0]&&/*classWithPartMatchMobile*/e[24]("BonusStatusFilter"),/*isLoading*/1024&r[0]&&{disabled:/*isLoading*/e[10]}])),A(n,"active",/*status*/e[67]===/*bonusStatus*/e[21])},d(e){e&&p(n),o=!1,i()}}}
|
|
1414
|
+
// (311:40)
|
|
1415
|
+
function gi(e){let n,r,o,i,s,a,l,u,c,d,m,y,w,B,E,T,M,D,P,A,O,H,L=/*$_*/e[25]("bonus.canlendarTitle")+"",N=/*$_*/e[25]("bonus.from")+"",R=/*$_*/e[25]("bonus.to")+"",F=/*$_*/e[25]("bonus.filter")+"",$=[/*classWithPart*/e[31]("BonusCalendarTitle")],I={};for(let e=0;e<$.length;e+=1)I=t(I,$[e]);let Y=[{max:/*maxDate*/e[15]},{value:/*lastMonth*/e[16]},{placeholder:"From"},
|
|
1416
|
+
/*classWithPart*/e[31]("VaadinDatePicker")],U={};for(let e=0;e<Y.length;e+=1)U=t(U,Y[e]);let W=[/*classWithPartMatchMobile*/e[24]("BonusCalendarStartDate")],G={};for(let e=0;e<W.length;e+=1)G=t(G,W[e]);let j=[{value:/*maxDate*/e[15]},{placeholder:"To"},
|
|
1417
|
+
/*classWithPart*/e[31]("VaadinDatePicker")],V={};for(let e=0;e<j.length;e+=1)V=t(V,j[e]);let z=[/*classWithPartMatchMobile*/e[24]("BonusCalendarEndDate")],Z={};for(let e=0;e<z.length;e+=1)Z=t(Z,z[e]);let X=[/*classWithPartMatchMobile*/e[24]("BonusCalendarContainer")],J={};for(let e=0;e<X.length;e+=1)J=t(J,X[e]);let q=[
|
|
1418
|
+
/*classWithPartMatchMobile*/e[24]("BonusFilterButton"),{disabled:/*isLoading*/e[10]}],Q={};for(let e=0;e<q.length;e+=1)Q=t(Q,q[e]);let ee=[/*classWithPart*/e[31]("BonusCalendarContent")],te={};for(let e=0;e<ee.length;e+=1)te=t(te,ee[e]);let ne=[/*classWithPartMatchMobile*/e[24]("BonusCalendarWrapper")],re={};for(let e=0;e<ne.length;e+=1)re=t(re,ne[e]);return{c(){n=g("div"),r=g("div"),o=b(L),i=v(),s=g("div"),a=g("div"),l=g("div"),u=g("label"),c=b(N),d=v(),m=g("vaadin-date-picker"),y=v(),w=g("div"),B=g("label"),E=b(R),T=v(),M=g("vaadin-date-picker"),D=v(),P=g("button"),A=b(F),x(r,I),C(u,"for","BonusCalendarStartDate"),x(m,U),x(l,G),C(B,"for","BonusCalendarEndDate"),x(M,V),x(w,Z),x(a,J),x(P,Q),x(s,te),x(n,re)},m(t,p){f(t,n,p),h(n,r),h(r,o),h(n,i),h(n,s),h(s,a),h(a,l),h(l,u),h(u,c),h(l,d),h(l,m),
|
|
1419
|
+
/*vaadin_date_picker0_binding*/e[41](m),h(a,y),h(a,w),h(w,B),h(B,E),h(w,T),h(w,M),
|
|
1420
|
+
/*vaadin_date_picker1_binding*/e[42](M),h(s,D),h(s,P),h(P,A),P.autofocus&&P.focus(),O||(H=_(P,"click",/*click_handler_2*/e[43]),O=!0)},p(e,t){/*$_*/33554432&t[0]&&L!==(L=/*$_*/e[25]("bonus.canlendarTitle")+"")&&k(o,L,I.contenteditable),/*$_*/33554432&t[0]&&N!==(N=/*$_*/e[25]("bonus.from")+"")&&S(c,N),x(m,U=K(Y,[/*maxDate*/32768&t[0]&&{max:/*maxDate*/e[15]},/*lastMonth*/65536&t[0]&&{value:/*lastMonth*/e[16]},{placeholder:"From"},
|
|
1421
|
+
/*classWithPart*/e[31]("VaadinDatePicker")])),x(l,G=K(W,[/*classWithPartMatchMobile*/16777216&t[0]&&/*classWithPartMatchMobile*/e[24]("BonusCalendarStartDate")])),/*$_*/33554432&t[0]&&R!==(R=/*$_*/e[25]("bonus.to")+"")&&S(E,R),x(M,V=K(j,[/*maxDate*/32768&t[0]&&{value:/*maxDate*/e[15]},{placeholder:"To"},
|
|
1422
|
+
/*classWithPart*/e[31]("VaadinDatePicker")])),x(w,Z=K(z,[/*classWithPartMatchMobile*/16777216&t[0]&&/*classWithPartMatchMobile*/e[24]("BonusCalendarEndDate")])),x(a,J=K(X,[/*classWithPartMatchMobile*/16777216&t[0]&&/*classWithPartMatchMobile*/e[24]("BonusCalendarContainer")])),/*$_*/33554432&t[0]&&F!==(F=/*$_*/e[25]("bonus.filter")+"")&&k(A,F,Q.contenteditable),x(P,Q=K(q,[/*classWithPartMatchMobile*/16777216&t[0]&&/*classWithPartMatchMobile*/e[24]("BonusFilterButton"),/*isLoading*/1024&t[0]&&{disabled:/*isLoading*/e[10]}])),x(n,re=K(ne,[/*classWithPartMatchMobile*/16777216&t[0]&&/*classWithPartMatchMobile*/e[24]("BonusCalendarWrapper")]))},d(t){t&&p(n)
|
|
1423
|
+
/*vaadin_date_picker0_binding*/,e[41](null),
|
|
1424
|
+
/*vaadin_date_picker1_binding*/e[42](null),O=!1,H()}}}
|
|
1425
|
+
// (300:2) {#if bonusStatus === 'claimable'}
|
|
1426
|
+
function yi(e){let n,r,i,s,a,l,u,c,d,m,y,w,B,E,T,M=/*$_*/e[25]("bonus.bonusCode")+"",P=/*$_*/e[25]("bonus.claim")+"",A=[
|
|
1427
|
+
/*classWithPartMatchMobile*/e[24]("BonusCodeInput"),{type:"text"},{id:"BonusCode"},{placeholder:c=/*$_*/e[25]("bonus.placeholder")}],O={};for(let e=0;e<A.length;e+=1)O=t(O,A[e]);let H=[
|
|
1428
|
+
/*classWithPartMatchMobile*/e[24]("BonusClaimButton"),{disabled:w=/*invalidBonusField*/e[18]||!/*isButtonClickable*/e[22]}],L={};for(let e=0;e<H.length;e+=1)L=t(L,H[e]);let N=[/*classWithPartMatchMobile*/e[24]("BonusCodeWrapper")],R={};for(let e=0;e<N.length;e+=1)R=t(R,N[e]);let F=/*invalidBonusCode*/e[19]&&bi(e),$=[/*classWithPartMatchMobile*/e[24]("BonusCodeContainer")],I={};for(let e=0;e<$.length;e+=1)I=t(I,$[e]);return{c(){n=g("div"),r=g("label"),i=g("span"),i.textContent="*",s=b(M),a=v(),l=g("div"),u=g("input"),d=v(),m=g("button"),y=b(P),B=v(),F&&F.c(),C(i,"class","Asterisk"),C(r,"for","BonusCode"),x(u,O),x(m,L),x(l,R),x(n,I)},m(t,o){f(t,n,o),h(n,r),h(r,i),h(r,s),h(n,a),h(n,l),h(l,u),u.autofocus&&u.focus(),D(u,/*bonusCode*/e[17]),h(l,d),h(l,m),h(m,y),m.autofocus&&m.focus(),h(n,B),F&&F.m(n,null),E||(T=[_(u,"input",/*input_input_handler*/e[39]),_(u,"keyup",/*validateBonusCode*/e[32]),_(m,"click",/*click_handler_1*/e[40])],E=!0)},p(e,t){/*$_*/33554432&t[0]&&M!==(M=/*$_*/e[25]("bonus.bonusCode")+"")&&S(s,M),x(u,O=K(A,[/*classWithPartMatchMobile*/16777216&t[0]&&/*classWithPartMatchMobile*/e[24]("BonusCodeInput"),{type:"text"},{id:"BonusCode"},/*$_*/33554432&t[0]&&c!==(c=/*$_*/e[25]("bonus.placeholder"))&&{placeholder:c}])),/*bonusCode*/131072&t[0]&&u.value!==/*bonusCode*/e[17]&&D(u,/*bonusCode*/e[17]),/*$_*/33554432&t[0]&&P!==(P=/*$_*/e[25]("bonus.claim")+"")&&k(y,P,L.contenteditable),x(m,L=K(H,[/*classWithPartMatchMobile*/16777216&t[0]&&/*classWithPartMatchMobile*/e[24]("BonusClaimButton"),/*invalidBonusField, isButtonClickable*/4456448&t[0]&&w!==(w=/*invalidBonusField*/e[18]||!/*isButtonClickable*/e[22])&&{disabled:w}])),x(l,R=K(N,[/*classWithPartMatchMobile*/16777216&t[0]&&/*classWithPartMatchMobile*/e[24]("BonusCodeWrapper")])),/*invalidBonusCode*/e[19]?F?F.p(e,t):(F=bi(e),F.c(),F.m(n,null)):F&&(F.d(1),F=null),x(n,I=K($,[/*classWithPartMatchMobile*/16777216&t[0]&&/*classWithPartMatchMobile*/e[24]("BonusCodeContainer")]))},d(e){e&&p(n),F&&F.d(),E=!1,o(T)}}}
|
|
1429
|
+
// (307:4) {#if invalidBonusCode}
|
|
1430
|
+
function bi(e){let t,n,r=/*$_*/e[25]("bonus.invalidBonusCode")+"";return{c(){t=g("p"),n=b(r),C(t,"class","InvalidBonusCodeMessage"),C(t,"part","InvalidBonusCodeMessage")},m(e,r){f(e,t,r),h(t,n)},p(e,t){/*$_*/33554432&t[0]&&r!==(r=/*$_*/e[25]("bonus.invalidBonusCode")+"")&&S(n,r)},d(e){e&&p(t)}}}
|
|
1431
|
+
// (336:2) {:else}
|
|
1432
|
+
function vi(e){let t,n;function r(e,t){/*bonuses*/
|
|
1433
|
+
return e[9].length>0?Bi:/*errorMessage*/e[11]?Ci:_i}let o=r(e),i=o(e),s=/*bonuses*/0!==e[9].length&&Ei(e);return{c(){i.c(),t=v(),s&&s.c(),n=w()},m(e,r){i.m(e,r),f(e,t,r),s&&s.m(e,r),f(e,n,r)},p(e,a){o===(o=r(e))&&i?i.p(e,a):(i.d(1),i=o(e),i&&(i.c(),i.m(t.parentNode,t))),/*bonuses*/0!==e[9].length?s?s.p(e,a):(s=Ei(e),s.c(),s.m(n.parentNode,n)):s&&(s.d(1),s=null)},d(e){i.d(e),e&&p(t),s&&s.d(e),e&&p(n)}}}
|
|
1434
|
+
// (334:2) {#if isLoading}
|
|
1435
|
+
function wi(n){let r,o=[/*classWithPart*/n[31]("ModalLoader")],i={};for(let e=0;e<o.length;e+=1)i=t(i,o[e]);return{c(){r=g("div"),x(r,i)},m(e,t){f(e,r,t)},p:e,d(e){e&&p(r)}}}
|
|
1436
|
+
// (357:6) {:else}
|
|
1437
|
+
function _i(e){let t,n=/*$_*/e[25]("bonus.noBonus")+"";return{c(){t=b(n)},m(e,n){f(e,t,n)},p(e,r){/*$_*/33554432&r[0]&&n!==(n=/*$_*/e[25]("bonus.noBonus")+"")&&S(t,n)},d(e){e&&p(t)}}}
|
|
1438
|
+
// (355:6) {#if errorMessage}
|
|
1439
|
+
function Ci(e){let t,n,r,o,i=/*$_*/e[25]("bonus.error")+"";return{c(){t=g("div"),n=b(i),r=b(": "),o=b(/*errorMessage*/e[11]),P(t,"color","red")},m(e,i){f(e,t,i),h(t,n),h(t,r),h(t,o)},p(e,t){/*$_*/33554432&t[0]&&i!==(i=/*$_*/e[25]("bonus.error")+"")&&S(n,i),/*errorMessage*/2048&t[0]&&S(o,/*errorMessage*/e[11])},d(e){e&&p(t)}}}
|
|
1440
|
+
// (337:4) {#if bonuses.length > 0}
|
|
1441
|
+
function Bi(e){let n,r=/*bonuses*/e[9],o=[];for(let t=0;t<r.length;t+=1)o[t]=xi(fi(e,r,t));let i=[/*classWithPart*/e[31]("BonusList")],s={};for(let e=0;e<i.length;e+=1)s=t(s,i[e]);return{c(){n=g("ul");for(let e=0;e<o.length;e+=1)o[e].c();x(n,s)},m(e,t){f(e,n,t);for(let e=0;e<o.length;e+=1)o[e]&&o[e].m(n,null)},p(e,t){if(/*classWithPartMatchMobile, bonuses, bonusStatus, cmsendpoint, lang, clientstyling, clientstylingurl, translationurl*/18874941&t[0]){let i;for(r=/*bonuses*/e[9],i=0;i<r.length;i+=1){const s=fi(e,r,i);o[i]?o[i].p(s,t):(o[i]=xi(s),o[i].c(),o[i].m(n,null))}for(;i<o.length;i+=1)o[i].d(1);o.length=r.length}},d(e){e&&p(n),m(o,e)}}}
|
|
1442
|
+
// (339:8) {#each bonuses as item}
|
|
1443
|
+
function xi(e){let n,r,o,i=[{rawbonus:JSON.stringify(/*item*/e[64]),status:/*bonusStatus*/e[21],cmsendpoint:/*cmsendpoint*/e[2],lang:/*lang*/e[0],clientstyling:/*clientstyling*/e[3],clientstylingurl:/*clientstylingurl*/e[4],translationurl:/*translationurl*/e[5]}],s={};for(let e=0;e<i.length;e+=1)s=t(s,i[e]);let a=[/*classWithPartMatchMobile*/e[24]("BonusItem")],l={};for(let e=0;e<a.length;e+=1)l=t(l,a[e]);return{c(){n=g("li"),r=g("casino-bonus-card"),o=v(),x(r,s),x(n,l)},m(e,t){f(e,n,t),h(n,r),h(n,o)},p(e,t){x(r,s=K(i,[/*bonuses, bonusStatus, cmsendpoint, lang, clientstyling, clientstylingurl, translationurl*/2097725&t[0]&&{rawbonus:JSON.stringify(/*item*/e[64]),status:/*bonusStatus*/e[21],cmsendpoint:/*cmsendpoint*/e[2],lang:/*lang*/e[0],clientstyling:/*clientstyling*/e[3],clientstylingurl:/*clientstylingurl*/e[4],translationurl:/*translationurl*/e[5]}])),x(n,l=K(a,[/*classWithPartMatchMobile*/16777216&t[0]&&/*classWithPartMatchMobile*/e[24]("BonusItem")]))},d(e){e&&p(n)}}}
|
|
1444
|
+
// (361:4) {#if bonuses.length !== 0}
|
|
1445
|
+
function Ei(e){let t;return{c(){t=g("casino-bonus-pagination"),T(t,"totalitems",/*totalItems*/e[13]),T(t,"currentpage",/*currentPage*/e[12]),T(t,"pagesize",/*limit*/e[1]),T(t,"limit",/*paginationLimit*/e[14]),T(t,"clientstyling",/*clientstyling*/e[3]),T(t,"clientstylingurl",/*clientstylingurl*/e[4])},m(e,n){f(e,t,n)},p(e,n){/*totalItems*/8192&n[0]&&T(t,"totalitems",/*totalItems*/e[13]),/*currentPage*/4096&n[0]&&T(t,"currentpage",/*currentPage*/e[12]),/*limit*/2&n[0]&&T(t,"pagesize",/*limit*/e[1]),/*paginationLimit*/16384&n[0]&&T(t,"limit",/*paginationLimit*/e[14]),/*clientstyling*/8&n[0]&&T(t,"clientstyling",/*clientstyling*/e[3]),/*clientstylingurl*/16&n[0]&&T(t,"clientstylingurl",/*clientstylingurl*/e[4])},d(e){e&&p(t)}}}
|
|
1446
|
+
// (366:2) {#if bonusModal}
|
|
1447
|
+
function Ti(e){let n,r,i,s,a,l,u,c,d,m,y,w,C,B,E=/*$_*/e[25]("bonus.forfeitMessage")+"",T=/*$_*/e[25]("bonus.forfeitCancel")+"",M=/*$_*/e[25]("bonus.forfeitConfirm")+"",S=[/*classWithPart*/e[31]("ModalText")],D={};for(let e=0;e<S.length;e+=1)D=t(D,S[e]);let P=[/*classWithPart*/e[31]("ModalCancel")],A={};for(let e=0;e<P.length;e+=1)A=t(A,P[e]);let O=[/*classWithPart*/e[31]("ModalConfirm")],H={};for(let e=0;e<O.length;e+=1)H=t(H,O[e]);let L=[/*classWithPart*/e[31]("ModalButtons")],N={};for(let e=0;e<L.length;e+=1)N=t(N,L[e]);let R=[/*classWithPart*/e[31]("ModalBody")],F={};for(let e=0;e<R.length;e+=1)F=t(F,R[e]);let $=[/*classWithPart*/e[31]("ModalContent")],I={};for(let e=0;e<$.length;e+=1)I=t(I,$[e]);let Y=[/*classWithPartMatchMobile*/e[24]("ModalWrapper")],U={};for(let e=0;e<Y.length;e+=1)U=t(U,Y[e]);return{c(){n=g("div"),r=g("div"),i=g("div"),s=g("p"),a=b(E),l=v(),u=g("div"),c=g("button"),d=b(T),m=v(),y=g("button"),w=b(M),x(s,D),x(c,A),x(y,H),x(u,N),x(i,F),x(r,I),x(n,U)},m(t,o){f(t,n,o),h(n,r),h(r,i),h(i,s),h(s,a),h(i,l),h(i,u),h(u,c),h(c,d),c.autofocus&&c.focus(),h(u,m),h(u,y),h(y,w),y.autofocus&&y.focus(),C||(B=[_(c,"click",/*closeBonusModal*/e[29]),_(y,"click",/*click_handler_3*/e[44])],C=!0)},p(e,t){/*$_*/33554432&t[0]&&E!==(E=/*$_*/e[25]("bonus.forfeitMessage")+"")&&k(a,E,D.contenteditable),/*$_*/33554432&t[0]&&T!==(T=/*$_*/e[25]("bonus.forfeitCancel")+"")&&k(d,T,A.contenteditable),/*$_*/33554432&t[0]&&M!==(M=/*$_*/e[25]("bonus.forfeitConfirm")+"")&&k(w,M,H.contenteditable),x(n,U=K(Y,[/*classWithPartMatchMobile*/16777216&t[0]&&/*classWithPartMatchMobile*/e[24]("ModalWrapper")]))},d(e){e&&p(n),C=!1,o(B)}}}function Mi(n){let r,o,i,s,a,l,u=/*StatusForFilter*/n[26],c=[];for(let e=0;e<u.length;e+=1)c[e]=mi(pi(n,u,e));let d=[/*classWithPartMatchMobile*/n[24]("BonusFilterWrapper")],y={};for(let e=0;e<d.length;e+=1)y=t(y,d[e]);function b(e,t){/*bonusStatus*/
|
|
1448
|
+
return"claimable"===e[21]?yi:/*bonusStatus*/"completed"===e[21]?gi:void 0}let w=b(n),_=w&&w(n);function B(e,t){/*isLoading*/
|
|
1449
|
+
return e[10]?wi:vi}let E=B(n),T=E(n),M=/*bonusModal*/n[20]&&Ti(n),S=[/*classWithPart*/n[31]("BonusesController")],k={};for(let e=0;e<S.length;e+=1)k=t(k,S[e]);return{c(){r=g("div"),o=g("div"),i=g("div");for(let e=0;e<c.length;e+=1)c[e].c();s=v(),_&&_.c(),a=v(),T.c(),l=v(),M&&M.c(),this.c=e,C(i,"class","BonusFilterContainer"),C(i,"part","BonusFilterContainer"),x(o,y),x(r,k)},m(e,t){f(e,r,t),h(r,o),h(o,i);for(let e=0;e<c.length;e+=1)c[e]&&c[e].m(i,null);h(r,s),_&&_.m(r,null),h(r,a),T.m(r,null),h(r,l),M&&M.m(r,null)
|
|
1450
|
+
/*div2_binding*/,n[45](r)},p(e,t){if(/*classWithPartMatchMobile, isLoading, StatusForFilter, bonusStatus, getPage*/1159726080&t[0]){let n;for(u=/*StatusForFilter*/e[26],n=0;n<u.length;n+=1){const r=pi(e,u,n);c[n]?c[n].p(r,t):(c[n]=mi(r),c[n].c(),c[n].m(i,null))}for(;n<c.length;n+=1)c[n].d(1);c.length=u.length}x(o,y=K(d,[/*classWithPartMatchMobile*/16777216&t[0]&&/*classWithPartMatchMobile*/e[24]("BonusFilterWrapper")])),w===(w=b(e))&&_?_.p(e,t):(_&&_.d(1),_=w&&w(e),_&&(_.c(),_.m(r,a))),E===(E=B(e))&&T?T.p(e,t):(T.d(1),T=E(e),T&&(T.c(),T.m(r,l))),/*bonusModal*/e[20]?M?M.p(e,t):(M=Ti(e),M.c(),M.m(r,null)):M&&(M.d(1),M=null)},i:e,o:e,d(e){e&&p(r),m(c,e),_&&_.d(),T.d(),M&&M.d()
|
|
1451
|
+
/*div2_binding*/,n[45](null)}}}function Si(e,t,n){let r,o,i;c(e,Hn,(e=>n(25,i=e)));var s=this&&this.__rest||function(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};let a,l,u,{endpoint:d=""}=t,{lang:h="en"}=t,{session:f=""}=t,{currency:p="EUR"}=t,{limit:m=""}=t,{cmsendpoint:g=""}=t,{clientstyling:y=""}=t,{clientstylingurl:b=""}=t,{translationurl:v=""}=t,w=window.navigator.userAgent,_=!1,C=[],B=!0,x="",E=1,T=0,M=2,S="",k=!0,D=!1,P=!1;a=Vr(new Date).format("YYYY-MM-DD"),l=Vr(new Date).subtract(3,"months").format("YYYY-MM-DD");let A,O,H=l,L=a,R="active",$=!0,I="";Gr(w)&&(_=!0,M=1);Object.keys(jr).forEach((e=>{Ln(e,jr[e])})),N((()=>(window.addEventListener("message",Y,!1),()=>{A.removeEventListener("change",X),O.removeEventListener("change",J),window.removeEventListener("message",Y)})));const Y=e=>{switch(e.data.type){case"PaginationChange":n(12,E=e.data.page),V(E);break;case"OnBonusClaimed":U(e.data.bonusCode);break;case"OnBonusForfeit":n(23,I=e.data.bonus.id),n(20,P=!0)}},U=async(e,t)=>{n(22,$=!1);const r=await W(e);r.success?(n(19,D=!1),V(1)):(n(11,x=r.errorMessage),t?n(19,D=!0):window.postMessage({type:"OnBonusClaimError",message:x,bonusCode:e})),window.postMessage({type:"OnBonusClaimedDone"}),n(22,$=!0)},W=async e=>await K(d+"/v1/bonus/claim",{method:"PUT",body:JSON.stringify({bonusCode:e,currency:p}),headers:{"x-SessionId":f,accept:"text/plain","Content-Type":"application/json-patch+json"}}),G=async e=>{n(22,$=!1);const t=await j(e);t.success?V(1):n(11,x=t.errorMessage),window.postMessage({type:"OnBonusForfeitedDone"}),n(22,$=!0),n(20,P=!1)},j=async e=>{const t=new URL(`${d}/v1/bonus/forfeit`),n={bonusID:e,lang:h};return Object.keys(n).map((e=>{t.searchParams.append(e,n[e])})),await K(t,{method:"DELETE",headers:{"x-SessionId":f,accept:"text/plain"}})},V=async e=>{E!==e&&n(12,E=e);const t=(e-1)*Number(m);n(10,B=!0),n(9,C=[]);const r=await z(d,f,t,{lang:h,limit:m});r.success?(n(13,T=r.total),n(9,C=r.items||r.bonuses)):n(11,x=r.errorMessage),n(10,B=!1)},z=async(e,t,n,r={})=>{const{limit:o,lang:i}=r,a=s(r,["limit","lang"]),l="claimable"===R?R:"granted",u=Object.assign(Object.assign({pagination:`limit=${o},offset=${n}`,language:i},a),{sortOrder:"desc"});if("completed"===R){let e=new Date(H).toISOString(),t=new Date(L+" 23:59:59").toISOString();u.startTime=e,u.endTime=t,u.type="standard,freeBet,freeRound,cashBack,stakeBack,oddsBoost,wagering",u.status="completed,released,forfeited,expired,closed"}"active"===R&&(u.type="standard,freeBet,freeRound,cashBack,stakeBack,oddsBoost,wagering",u.status="active");const c=new URL(`${e}/v1/bonus/${l}`);return"claimable"!==R?c.searchParams.append("expand","freeSpin"):delete u.sortOrder,Object.keys(u).map((e=>{c.searchParams.append(e,u[e])})),await K(c,{headers:Object.assign({},t?{"x-SessionId":t}:{})})},Z=(e,t="")=>({part:e,class:[e,t].join(" ")}),K=async(e,t={})=>{let n;return n=await fetch(e,t),!1===n.ok?{errorMessage:n.status}:(n=await n.json(),n)},X=e=>{H=e.target.value},J=e=>{L=e.target.value};return e.$$set=e=>{"endpoint"in e&&n(33,d=e.endpoint),"lang"in e&&n(0,h=e.lang),"session"in e&&n(34,f=e.session),"currency"in e&&n(35,p=e.currency),"limit"in e&&n(1,m=e.limit),"cmsendpoint"in e&&n(2,g=e.cmsendpoint),"clientstyling"in e&&n(3,y=e.clientstyling),"clientstylingurl"in e&&n(4,b=e.clientstylingurl),"translationurl"in e&&n(5,v=e.translationurl)},e.$$.update=()=>{/*startCalendar, endCalendar*/384&e.$$.dirty[0]&&A&&O&&(A.addEventListener("change",X,!1),O.addEventListener("change",J,!1)),/*mobileView*/32&e.$$.dirty[1]&&n(24,r=(e,t="")=>Z(`${e}${_?` ${e}Mobile`:""}`,t)),/*lang, limit*/3&e.$$.dirty[0]|/*endpoint, session*/12&e.$$.dirty[1]&&n(37,o=d&&f&&h&&m),/*initialLoad*/64&e.$$.dirty[1]&&o&&(async()=>{V(1),Nn(h)})(),/*clientstyling, customStylingContainer*/72&e.$$.dirty[0]&&y&&u&&(()=>{let e=document.createElement("style");e.innerHTML=y,u.appendChild(e)})(),/*clientstylingurl, customStylingContainer*/80&e.$$.dirty[0]&&b&&u&&(()=>{let e=new URL(b),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{u.appendChild(t)}),1)}))})(),/*translationurl*/32&e.$$.dirty[0]&&v&&fetch(v).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{Ln(t,e[t])}))})).catch((e=>{console.log(e)}))},[h,m,g,y,b,v,u,A,O,C,B,x,E,T,M,a,l,S,k,D,P,R,$,I,r,i,["active","completed","claimable"],U,G,()=>{window.postMessage({type:"EnableScroll"},window.location.href),window.postMessage({type:"OnBonusForfeitedDone"}),n(20,P=!1)},V,Z,()=>{n(18,(n(19,D=!1),k=!S))},d,f,p,_,o,e=>{n(21,R=e),V(1)},function(){S=this.value,n(17,S)},()=>{U(S,!0)},function(e){F[e?"unshift":"push"]((()=>{A=e,n(7,A)}))},function(e){F[e?"unshift":"push"]((()=>{O=e,n(8,O)}))},()=>V(1),()=>G(I),function(e){F[e?"unshift":"push"]((()=>{u=e,n(6,u)}))}]}class ki extends Q{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}.BonusList{display:flex;flex-wrap:wrap}.BonusItem{flex:0 0 50%;max-width:50%;padding:10px}.BonusItemMobile{flex:0 0 100%;max-width:100%}.BonusPaginationWrapper{margin:40px 0;display:flex;justify-content:center}.BonusPaginationWrapper.BonusPaginationWrapperMobile{flex-wrap:wrap;text-align:center}.BonusPaginationWrapper .BonusesFirst,.BonusPaginationWrapper .BonusesPrev,.BonusPaginationWrapper .BonusesNext,.BonusPaginationWrapper .BonusesLast{color:var(--emfe-w-bonus-pagination-primary, var(--emfe-w-color-blue, #00AEEF));font-size:16px;cursor:pointer;padding:5px 10px;font-weight:700}.BonusPaginationWrapper .BonusesFirst.Inactive,.BonusPaginationWrapper .BonusesPrev.Inactive,.BonusPaginationWrapper .BonusesNext.Inactive,.BonusPaginationWrapper .BonusesLast.Inactive{color:var(--emfe-w-bonus-pagination-inactive-text, var(--emfe-w-color-gray-100, #E6E6E6));cursor:default}.BonusPaginationWrapper .BonusesPage{margin:0 5px;color:var(--emfe-w-bonus-pagination-text, var(--emfe-w-color-gray-300, #58586B));font-size:16px;cursor:pointer;padding:5px 10px}.BonusPaginationWrapper .BonusesPage.BonusPageActive{background-color:var(--emfe-w-bonus-pagination-active-bg, var(--emfe-w-color-white, #FFFFFF));font-weight:700}.ModalLoader{display:block;width:80px;height:80px;margin:0 auto}.ModalLoader:after{content:" ";display:block;width:64px;height:64px;margin:8px;border-radius:50%;border:6px solid var(--emfe-w-bonus-pagination-border, var(--emfe-w-color-blue, #00AEEF));border-color:var(--emfe-w-bonus-pagination-border, var(--emfe-w-color-blue, #00AEEF)) transparent var(--emfe-w-bonus-pagination-primary, var(--emfe-w-color-blue, #00AEEF)) transparent;animation:LoaderForModal 1.2s linear infinite}@keyframes LoaderForModal{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.BonusCalendarWrapper{display:flex;gap:20px;flex-wrap:wrap;background:var(--emfe-w-bonus-calendar-bg, var(--emfe-w-color-gray-50, #F4F4F4));border-radius:5px;padding:27px;width:calc(50% - 20px);margin:10px}.BonusCalendarContent{display:flex;gap:20px;flex-wrap:wrap}.BonusCalendarContainer{display:flex;gap:20px;flex-wrap:wrap;flex:4}.BonusCalendarContainer.BonusCalendarContainerMobile{flex-direction:row;gap:0;justify-content:space-between;padding-bottom:0;width:100%;flex-direction:column}.BonusCalendarTitle{font-size:18px;font-weight:700;width:100%}.BonusCalendarStartDate,.BonusCalendarEndDate{color:var(--emfe-w-bonus-calendar-text, var(--emfe-w-color-gray-300, #58586B));display:flex;position:relative;align-items:center;gap:10px;min-width:140px;flex:0 0 47%;flex-wrap:wrap}.BonusCalendarStartDate vaadin-date-picker,.BonusCalendarEndDate vaadin-date-picker{width:100%}.BonusCalendarStartDate.BonusesCalendarMobile,.BonusCalendarEndDate.BonusesCalendarMobile{flex-direction:column;align-items:flex-start;gap:5px;width:100%}.BonusCalendarStartDate.BonusesCalendarMobile .VaadinDatePicker,.BonusCalendarEndDate.BonusesCalendarMobile .VaadinDatePicker{width:100%}.BonusCalendarStartDate label,.BonusCalendarEndDate label{font-size:14px;font-weight:300;width:100%;text-transform:capitalize}.BonusCalendarStartDate input,.BonusCalendarEndDate input{width:100%;height:44px;border:1px solid var(--emfe-w-bonus-calendar-border, var(--emfe-w-color-gray-100, #E6E6E6));border-radius:5px;box-sizing:border-box;padding:5px 15px;font-size:16px;line-height:18px;outline-color:var(--emfe-w-bonus-calendar-outline, var(--emfe-w-color-primary, #00AEEF))}.BonusFilterButton{flex:2;background:var(--emfe-w-bonus-filter-bg, var(--emfe-w-color-yellow, #F39C12));outline:5px solid var(--emfe-w-bonus-filter-outline, var(--emfe-w-color-yellow, rgba(243, 156, 18, 0.3)));border-radius:9px;border:0;width:180px;max-width:180px;height:38px;font-size:18px;font-weight:400;text-align:center;transition-duration:0.5s;transition-property:outline, color, background;box-sizing:border-box;cursor:pointer;color:var(--emfe-w-bonus-filter-text, var(--emfe-w-color-white, #FFFFFF));align-self:end;margin-bottom:5px}.BonusFilterButton[disabled]{opacity:0.3;cursor:not-allowed}.BonusFilterButton.BonusFilterButtonMobile{width:100%;min-width:100%}.BonusFilterButton:hover{background:var(--emfe-w-bonus-filter-bg, var(--emfe-w-color-yellow, #F38B12));outline:0}.BonusFilterButton:active{background:var(--emfe-w-bonus-filter-bg, var(--emfe-w-color-yellow, #F38B12));outline-color:var(--emfe-w-bonus-filter-outline, var(--emfe-w-color-yellow, rgba(243, 156, 18, 0.6)))}.BonusFilterWrapper{display:flex;gap:15px;padding:10px;align-items:flex-start}.BonusFilterWrapper.BonusFilterWrapperMobile{width:100%;flex-direction:column;gap:10px;padding:0;padding-bottom:15px}.BonusFilterContainer{display:flex;gap:5px;border-bottom:5px solid var(--emfe-w-bonus-filter-border, var(--emfe-w-color-green, #53B65A));width:100%}.BonusStatusFilter{color:var(--emfe-w-bonus-status-filter-text, var(--emfe-w-color-gray-300, #6D6D6D));cursor:pointer;width:200px;height:50px;font-size:18px;text-transform:capitalize;text-align:center;transition-duration:0.5s;box-sizing:border-box;padding:15px;background:var(--emfe-w-bonus-status-filter-bg, var(--emfe-w-color-white, #FFFFFF));border:1px solid var(--emfe-w-bonus-status-filter-border, var(--emfe-w-color-gray-300, #767171));border-bottom:0;border-radius:5px 5px 0px 0px}.BonusStatusFilter.BonusStatusFilterMobile{width:100%;height:44px}.BonusStatusFilter.active{color:var(--emfe-w-bonus-status-active-bg, var(--emfe-w-color-white, #FFFFFF));background:var(--emfe-w-bonus-status-active-bg, var(--emfe-w-color-gray-300, #4E5662));border:0.5px solid var(--emfe-w-bonus-status-active-border, var(--emfe-w-color-gray-300, #767171))}.BonusPageNumber{color:var(--emfe-w-bonus-page-number-text, var(--emfe-w-color-gray-150, #9C9C9C));flex:1;display:flex;flex-wrap:wrap}.BonusPageNumberTabs{display:flex}.BonusPageNumberTabs .BonusPageNumberTab{cursor:pointer;width:36px;height:36px;padding:10px;text-align:center}.BonusPageNumberTabs .BonusPageNumberTab.active{color:var(--emfe-w-bonus-page-number-text, var(--emfe-w-color-white, #FFFFFF));background:var(--emfe-w-bonus-page-number-active, var(--emfe-w-color-yellow, #F39C12));border-radius:50%}.BonusCodeContainer{color:var(--emfe-w-bonus-page-number-text, var(--emfe-w-color-black, #000000));display:flex;flex-direction:column;position:relative;width:calc(50% - 20px);background:#F4F4F4;border-radius:5px;padding:36px;margin:10px}.BonusCodeContainer label{font-size:18px;font-weight:700;padding-bottom:20px}.BonusCodeContainer .Asterisk{color:var(--emfe-w-bonus-card-red, var(--emfe-w-color-red, #FD2839))}.BonusCodeContainer.BonusCodeContainerMobile{width:100%;margin:0 0 10px}.BonusCodeContainer .BonusCodeWrapper{display:flex;gap:10px}.BonusCodeContainer .BonusCodeWrapper.BonusCodeWrapperMobile{flex-direction:column}.BonusCodeContainer .BonusCodeWrapper .BonusCodeInput{flex:3;height:50px;border:1px solid var(--emfe-w-bonus-code-border, var(--emfe-w-color-gray-50, #D1D1D1));border-radius:5px;box-sizing:border-box;padding:5px 15px;font-size:16px;line-height:18px}.BonusCodeContainer .BonusCodeWrapper .BonusCodeInput:focus{outline-color:var(--emfe-w-bonus-code-outline, var(--emfe-w-color-gray-100, #C1C1C1))}.BonusCodeContainer .BonusCodeWrapper .BonusCodeInput.BonusCodeInputMobile{width:100%}.BonusCodeContainer .BonusCodeWrapper .BonusClaimButton{background:var(--emfe-w-bonus-claim-bg, var(--emfe-w-color-yellow, #F39C12));outline:5px solid var(--emfe-w-bonus-claim-outline, var(--emfe-w-color-yellow, rgba(243, 156, 18, 0.3)));border-radius:9px;border:0;width:180px;height:38px;font-size:18px;font-weight:400;text-align:center;transition-duration:0.5s;box-sizing:border-box;margin-top:5px;cursor:pointer;color:var(--emfe-w-bonus-claim-text, var(--emfe-w-color-white, #FFFFFF))}.BonusCodeContainer .BonusCodeWrapper .BonusClaimButton[disabled]{opacity:0.3;cursor:not-allowed}.BonusCodeContainer .BonusCodeWrapper .BonusClaimButton.BonusClaimButtonMobile{width:100%}.BonusCodeContainer .BonusCodeWrapper .BonusClaimButton:hover{background:var(--emfe-w-bonus-claim-hover-bg, var(--emfe-w-color-yellow, #F38B12));outline:0}.BonusCodeContainer .BonusCodeWrapper .BonusClaimButton:active{background:var(--emfe-w-bonus-claim-active-bg, var(--emfe-w-color-yellow, #F38B12));outline-color:var(--emfe-w-bonus-claim-active-outline, var(--emfe-w-color-white, rgba(243, 156, 18, 0.6)))}.BonusCodeContainer.InvalidField input{border:1px solid var(--emfe-w-color-primary, #00AEEF);background:var(--emfe-w-color-primary-50, #FBECF4);color:var(--emfe-w-color-primary, #00AEEF)}.BonusCodeContainer .InvalidBonusCodeMessage{color:var(--emfe-w-color-error, #FD2839)}.ModalWrapper{position:fixed;top:0;right:0;bottom:0;left:0;background-color:var(--emfe-w-bonus-modal-bg, var(--emfe-w-color-black, rgba(0, 0, 0, 0.7)));display:flex;justify-content:center;align-items:center;z-index:100}.ModalWrapper .ModalContent{background-color:var(--emfe-w-bonus-modal-bg, var(--emfe-w-color-white, #FFFFFF));position:relative;padding:30px;border-top:5px solid var(--emfe-w-bonus-modal-border, var(--emfe-w-color-primary, #00AEEF));border-radius:5px}.ModalWrapper .ModalBody{background-color:var(--emfe-w-bonus-modal-bg, var(--emfe-w-color-gray-50, #F9F8F8));padding:30px;text-align:center}.ModalWrapper .ModalBody .ModalText{font-size:22px;margin-bottom:40px}.ModalWrapper .ModalBody .ModalButtons{display:flex;gap:36px}.ModalWrapper .ModalBody .ModalCancel,.ModalWrapper .ModalBody .ModalConfirm{background:transparent;border:1px solid var(--emfe-w-bonus-modal-border, var(--emfe-w-color-gray-300, #58586B));color:var(--emfe-w-bonus-modal-text, var(--emfe-w-color-gray-300, #58586B));cursor:pointer;border-radius:5px;width:180px;height:38px;font-size:18px;text-transform:capitalize;text-align:center;transition-duration:0.5s;box-sizing:border-box;padding:10px}.ModalWrapper .ModalBody .ModalConfirm{background:var(--emfe-w-bonus-modal-bg, var(--emfe-w-color-primary, #00AEEF));border:1px solid var(--emfe-w-bonus-modal-bg, var(--emfe-w-color-primary, #00AEEF));color:var(--emfe-w-bonus-modal-text, var(--emfe-w-color-white, #FFFFFF))}.ModalWrapper.ModalWrapperMobile .ModalContent{padding:20px;width:80vw;border-top:none}.ModalWrapper.ModalWrapperMobile .ModalBody{padding:0;background:transparent}.ModalWrapper.ModalWrapperMobile .ModalText{font-size:16px}.ModalWrapper.ModalWrapperMobile .ModalButtons{gap:10px}.ModalWrapper.ModalWrapperMobile .ModalCancel,.ModalWrapper.ModalWrapperMobile .ModalConfirm{height:40px;width:50%;font-size:14px}@media only screen and (max-width: 1024px){.BonusCodeContainer{width:100%}.BonusCalendarWrapper,.BonusCalendarContent,.BonusCalendarContainer{width:100%;flex-wrap:wrap}.BonusCalendarWrapper{margin:10px 0 0 0}.BonusFilterWrapper{width:100%;flex-direction:column;gap:10px;padding:10px 0}.BonusStatusFilter{width:100%}.BonusFilterButton{margin-top:0}.BonusFilterButton,.BonusClaimButton{width:100%}.BonusItem{flex:0 0 100%;max-width:100%;padding:0;margin:10px 0 0 0}.BonusCalendarStartDate,.BonusCalendarEndDate{flex-direction:column;align-items:flex-start;gap:5px}.BonusCalendarStartDate .VaadinDatePicker,.BonusCalendarEndDate .VaadinDatePicker{width:100%}.BonusCalendarTitle{width:100%}}',this.shadowRoot.appendChild(t),q(this,{target:this.shadowRoot,props:O(this.attributes),customElement:!0},Si,Mi,s,{endpoint:33,lang:0,session:34,currency:35,limit:1,cmsendpoint:2,clientstyling:3,clientstylingurl:4,translationurl:5},null,[-1,-1,-1]),e&&(e.target&&f(e.target,this,e.anchor),e.props&&(this.$set(e.props),V()))}static get observedAttributes(){return["endpoint","lang","session","currency","limit","cmsendpoint","clientstyling","clientstylingurl","translationurl"]}get endpoint(){return this.$$.ctx[33]}set endpoint(e){this.$$set({endpoint:e}),V()}get lang(){return this.$$.ctx[0]}set lang(e){this.$$set({lang:e}),V()}get session(){return this.$$.ctx[34]}set session(e){this.$$set({session:e}),V()}get currency(){return this.$$.ctx[35]}set currency(e){this.$$set({currency:e}),V()}get limit(){return this.$$.ctx[1]}set limit(e){this.$$set({limit:e}),V()}get cmsendpoint(){return this.$$.ctx[2]}set cmsendpoint(e){this.$$set({cmsendpoint:e}),V()}get clientstyling(){return this.$$.ctx[3]}set clientstyling(e){this.$$set({clientstyling:e}),V()}get clientstylingurl(){return this.$$.ctx[4]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),V()}get translationurl(){return this.$$.ctx[5]}set translationurl(e){this.$$set({translationurl:e}),V()}}return!customElements.get("casino-bonuses-controller")&&customElements.define("casino-bonuses-controller",ki),!customElements.get("casino-bonus-pagination")&&customElements.define("casino-bonus-pagination",class extends Q{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"}.GeneralPagination{margin:40px 0;display:flex}.PaginationWrapper{flex:1;display:flex;justify-content:center}.PaginationWrapper.PaginationWrapperMobile{flex-wrap:wrap;text-align:center}.PaginationWrapper .prev,.PaginationWrapper .next,.PaginationWrapper .number{color:var(--emfe-w-bonus-pagination-text, var(--emfe-w-color-contrast-600, #0D0D4D));font-size:16px;cursor:pointer;font-weight:700;border:1px solid var(--emfe-w-bonus-pagination-border, var(--emfe-w-color-gray-150, #828282));width:32px;height:32px;line-height:28px;text-align:center;margin-right:2px;border-radius:2px}.PaginationWrapper .prev.disabled,.PaginationWrapper .next.disabled,.PaginationWrapper .number.disabled{color:var(--emfe-w-bonus-pagination-disabled, var(--emfe-w-color-gray-100, #E6E6E6));border-color:var(--emfe-w-bonus-pagination-disabled, var(--emfe-w-color-gray-100, #E6E6E6));cursor:default}.PaginationWrapper .prev.active,.PaginationWrapper .next.active,.PaginationWrapper .number.active{background-color:var(--emfe-w-bonus-pagination-bg, var(--emfe-w-color-contrast, #00AEEF));color:var(--emfe-w-bonus-pagination-active, var(--emfe-w-color-white, #FFFFFF))}.PaginationWrapper .ellipsis{width:32px;margin-right:2px;text-align:center;line-height:20px}.PaginationInputWrapper{flex:1}.PaginationInputWrapper .PaginationInput{padding:7px 0 6px 0;width:32px;text-align:center}.PaginationInputWrapper .PaginationGoButton{background:none;border:none;cursor:pointer;font-size:18px}',this.shadowRoot.appendChild(t),q(this,{target:this.shadowRoot,props:O(this.attributes),customElement:!0},hi,di,s,{totalitems:10,pagesize:11,currentpage:12,limit:13,showinput:14,clientstyling:15,clientstylingurl:16},null),e&&(e.target&&f(e.target,this,e.anchor),e.props&&(this.$set(e.props),V()))}static get observedAttributes(){return["totalitems","pagesize","currentpage","limit","showinput","clientstyling","clientstylingurl"]}get totalitems(){return this.$$.ctx[10]}set totalitems(e){this.$$set({totalitems:e}),V()}get pagesize(){return this.$$.ctx[11]}set pagesize(e){this.$$set({pagesize:e}),V()}get currentpage(){return this.$$.ctx[12]}set currentpage(e){this.$$set({currentpage:e}),V()}get limit(){return this.$$.ctx[13]}set limit(e){this.$$set({limit:e}),V()}get showinput(){return this.$$.ctx[14]}set showinput(e){this.$$set({showinput:e}),V()}get clientstyling(){return this.$$.ctx[15]}set clientstyling(e){this.$$set({clientstyling:e}),V()}get clientstylingurl(){return this.$$.ctx[16]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),V()}}),!customElements.get("casino-bonus-card")&&customElements.define("casino-bonus-card",class extends Q{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"}.BonusCard{background-color:#F4F4F4;padding:10px 20px 20px;border-radius:5px;font-size:18px;font-weight:500;color:var(--emfe-w-bonus-card-text, var(--emfe-w-color-gray-300, #6D6D6D))}.BonusCardHeader{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #D1D1D1}.BonusCardHeader:nth-child(even){background-color:var(--emfe-w-bonus-card-bg, var(--emfe-w-color-gray-50, #F9F8F8))}.BonusCardRow{display:flex;padding:11px 0;margin:0;align-items:center}.BonusCardLabel{flex:3}.BonusCardRowTitle{color:var(--emfe-w-bonus-card-black, var(--emfe-w-color-black, #000000));font-weight:700;font-size:18px;display:flex;align-items:center;text-indent:10px}.BonusCardRowTitle span{font-weight:400;color:var(--emfe-w-bonus-card-span, var(--emfe-w-color-primary, #00AEEF))}.BonusCardTitleSub{display:flex;font-size:16px;text-indent:10px;align-items:center;font-weight:400}.BonusCardRowText{flex:2;color:#9C9C9C;text-transform:capitalize}.BonusCardRowText.BonusCardStatus{font-weight:700;color:var(--emfe-w-bonus-card-title, var(--emfe-w-color-black, #000000))}.BonusCardRowText.StatusActive{color:var(--emfe-w-bonus-card-green, var(--emfe-w-color-green, #53B65A))}.BonusCardRowText.Type{color:var(--emfe-w-bonus-card-black, var(--emfe-w-color-black, #000000))}.BonusCardRowText.StatusExpired{color:var(--emfe-w-bonus-card-red, var(--emfe-w-color-red, #FD2839))}.BonusCardRowText.StatusCompleted{color:var(--emfe-w-bonus-card-yellow, var(--emfe-w-color-yellow, #F39C12))}.BonusCardRowText.TextCapitalize{text-transform:capitalize}.BonusCardRowText .BonusAmount{color:var(--emfe-w-bonus-card-black, var(--emfe-w-color-black, #000000))}.BonusCardRowText .Amount{color:var(--emfe-w-bonus-card-green, var(--emfe-w-color-green, #53B65A))}.BonusCardAction{margin:20px 0 0;padding:10px 5px 0 0;display:flex;justify-content:end}.BonusCardAdditional,.BonusCardTerms{border:1px solid var(--emfe-w-bonus-card-border, var(--emfe-w-color-gray-100, #E6E6E6));background:var(--emfe-w-bonus-card-white, var(--emfe-w-color-white, #FFFFFF));color:var(--emfe-w-bonus-card-black, var(--emfe-w-color-black, #000000));padding:12px;border-radius:4px;position:relative;margin-top:10px;font-size:16px;transition:height 0.3s ease;will-change:height}.BonusCardAdditional.active,.BonusCardTerms.active{transition:height 0.3s ease}.BonusCardAdditionalTitle,.BonusCardTermsTitle{display:flex;align-items:center;text-indent:10px}.BonusCardAdditionalButton{font-weight:700;font-size:30px;position:absolute;top:0;right:10px;cursor:pointer}.BonusCardTermsButton{font-weight:700;font-size:30px;position:absolute;top:0;right:10px;cursor:pointer}.BonusCardTermsLink{display:flex;align-items:center;color:#000;text-indent:10px;cursor:pointer}.BonusCardJoinError{color:var(--emfe-w-bonus-card-red, var(--emfe-w-color-red, #FF0000));align-self:center}.BonusCardJoinCountdown{display:flex;align-items:center;text-indent:10px;font-size:16px;font-weight:400}.BonusCardJoinWrapper{display:flex;gap:30px}.BonusJoinButton{background:var(--emfe-w-bonus-card-green, var(--emfe-w-color-green, #53B65A));outline:5px solid var(--emfe-w-bonus-card-green, var(--emfe-w-color-green, rgba(83, 182, 90, 0.3)));border-radius:9px;border:0;width:180px;height:38px;font-size:18px;font-weight:400;text-align:center;transition-duration:0.5s;box-sizing:border-box;cursor:pointer;color:var(--emfe-w-bonus-card-white, var(--emfe-w-color-white, #FFFFFF))}.BonusJoinButton[disabled]{opacity:0.3;cursor:not-allowed}.BonusJoinButton.ClaimBonusButtonMobile{width:100%}.BonusJoinButton:hover{background:var(--emfe-w-bonus-card-green, var(--emfe-w-color-green, #25982D));outline:0}.BonusJoinButton:active{background:var(--emfe-w-bonus-card-green, var(--emfe-w-color-green, #25982D));outline-color:rgba(83, 182, 90, 0.6)}.BonusForfeitButton{background:var(--emfe-w-bonus-card-red, var(--emfe-w-color-red, #F32013));outline:5px solid var(--emfe-w-bonus-card-red, var(--emfe-w-color-red, rgba(243, 32, 19, 0.3)));border-radius:9px;border:0;width:180px;height:38px;font-size:18px;font-weight:400;text-align:center;transition-duration:0.5s;box-sizing:border-box;cursor:pointer;color:var(--emfe-w-color-white, #FFFFFF)}.BonusForfeitButton[disabled]{opacity:0.3;cursor:not-allowed}.BonusForfeitButton.ClaimBonusButtonMobile{width:100%}.BonusForfeitButton:hover{background:var(--emfe-w-bonus-card-red, var(--emfe-w-color-red, #C70C00));outline:0}.BonusForfeitButton:active{background:var(--emfe-w-bonus-card-red, var(--emfe-w-color-red, #C70C00));outline-color:var(--emfe-w-bonus-card-red, var(--emfe-w-color-red, rgba(243, 32, 19, 0.6)))}.BonusCardActionCountdown{margin-bottom:5px}.BonusCardData{display:flex}.BonusCardDataContent{flex:3;height:260px}.BonusCardFooter{height:100px}.BonusCardFooter.Active{height:auto}.BonusCardProgress{flex:1;max-width:147px;--progress-track-color:var(--emfe-w-bonus-card-blue,var(--emfe-w-color-blue, #00AEEF))}.BonusCardProgress .CircularProgress{display:flex;margin:15px;position:relative}.BonusCardProgress .CircularProgressText{text-align:center}.BonusActionWagering{display:flex;height:100px}.BonusWageringInfo{flex:60%}.BonusWageringButton{flex:40%}.TitleIcon{display:flex;max-width:83px;min-width:43px;height:41px}.CasinoIcon,.SportsIcon{fill:none}.BonusGamesSlider{display:flex}.SliderNavButton{border:0px;width:25px;display:flex;align-items:center;justify-content:center}.SliderNavButton svg{width:20px}.SliderNavButton.Hide{display:none}.Main{max-width:300px;overflow:hidden}.Games{display:flex;transition:transform 0.4s ease-in-out;transform:translateX(0px)}.Game{min-width:100px;height:75px;margin:0;color:var(--emfe-w-bonus-card-white, var(--emfe-w-color-white, #FFFFFF));display:flex;justify-content:center;align-items:center;font-weight:bold;font-size:10rem;user-select:none;overflow:hidden}.PlayNowButton{position:absolute;background:var(--emfe-w-bonus-card-green, var(--emfe-w-color-green, #48952a));display:block;box-sizing:border-box;padding:0.8rem 0.5rem;color:var(--emfe-w-bonus-card-white, var(--emfe-w-color-white, #FFFFFF));text-transform:uppercase;text-align:center;font-weight:600;font-size:0.7rem;cursor:pointer;transition:opacity 0.4s linear;opacity:0;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.ItemHover{opacity:1}@media only screen and (max-width: 728px){.BonusCard{font-size:12px}.BonusCardRowTitle{font-size:14px}.BonusCardTitleSub{font-size:12px}.BonusCardAction,.BonusCardActionContent,.BonusForfeitButton,.BonusJoinButton{width:100%}.BonusCardAction{margin-top:10px}.TitleIcon{max-width:60px;min-width:30px;height:30px}.BonusCardAdditional,.BonusCardTerms{font-size:14px}.BonusCardProgress .CircularProgress{margin:10px 0}.BonusCardFooter{height:auto}.BonusCardDataContent{height:auto}.BonusCardJoinWrapper{flex-direction:column;gap:15px}.BonusCardJoinCountdown{font-size:12px}}',this.shadowRoot.appendChild(t),q(this,{target:this.shadowRoot,props:O(this.attributes),customElement:!0},ni,ti,s,{rawbonus:39,lang:40,status:0,clientstyling:1,clientstylingurl:2,cmsendpoint:41,translationurl:42},null,[-1,-1,-1]),e&&(e.target&&f(e.target,this,e.anchor),e.props&&(this.$set(e.props),V()))}static get observedAttributes(){return["rawbonus","lang","status","clientstyling","clientstylingurl","cmsendpoint","translationurl"]}get rawbonus(){return this.$$.ctx[39]}set rawbonus(e){this.$$set({rawbonus:e}),V()}get lang(){return this.$$.ctx[40]}set lang(e){this.$$set({lang:e}),V()}get status(){return this.$$.ctx[0]}set status(e){this.$$set({status:e}),V()}get clientstyling(){return this.$$.ctx[1]}set clientstyling(e){this.$$set({clientstyling:e}),V()}get clientstylingurl(){return this.$$.ctx[2]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),V()}get cmsendpoint(){return this.$$.ctx[41]}set cmsendpoint(e){this.$$set({cmsendpoint:e}),V()}get translationurl(){return this.$$.ctx[42]}set translationurl(e){this.$$set({translationurl:e}),V()}}),!customElements.get("casino-bonus-progress")&&customElements.define("casino-bonus-progress",class extends Q{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"}.CircularProgress{height:100%;position:relative;width:100%}.CircularProgressLineBg{stroke:var(--emfe-w-bonus-progress-primary, var(--emfe-w-color-gray-100, #D9D9D9))}.CircularProgressLine{stroke:var(--emfe-w-bonus-progress-primary, var(--emfe-w-color-primary, #00AEEF));transition:0.35s stroke-dashoffset;transform:rotate(-90deg);transform-origin:50% 50%;fill:transparent}.CircularProgressLine.Completed{stroke:var(--emfe-w-bonus-progress-bg, var(--emfe-w-color-gray-300, #A9A9A9))}.CircularProgressCenter{fill:var(--emfe-w-bonus-progress-primary, var(--emfe-w-color-primary, #00AEEF))}.CircularProgressCenter.Completed{fill:var(--emfe-w-bonus-progress-bg, var(--emfe-w-color-gray-100, #D9D9D9))}.CircularProgressText{left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);color:var(--emfe-w-bonus-progress-text, var(--emfe-w-color-white, #FFFFFF))}',this.shadowRoot.appendChild(t),q(this,{target:this.shadowRoot,props:O(this.attributes),customElement:!0},Zr,zr,s,{value:0,status:1,clientstyling:6,clientstylingurl:7},null),e&&(e.target&&f(e.target,this,e.anchor),e.props&&(this.$set(e.props),V()))}static get observedAttributes(){return["value","status","clientstyling","clientstylingurl"]}get value(){return this.$$.ctx[0]}set value(e){this.$$set({value:e}),V()}get status(){return this.$$.ctx[1]}set status(e){this.$$set({status:e}),V()}get clientstyling(){return this.$$.ctx[6]}set clientstyling(e){this.$$set({clientstyling:e}),V()}get clientstylingurl(){return this.$$.ctx[7]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),V()}}),ki}));
|
|
1452
|
+
//# sourceMappingURL=casino-bonuses-controller.js.map
|