@everymatrix/casino-random-game 1.13.15 → 1.13.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).app=e()}(this,(function(){"use strict";function t(){}function e(t){return t()}function r(){return Object.create(null)}function n(t){t.forEach(e)}function o(t){return"function"==typeof t}function i(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}let s,a;function u(t,e){return s||(s=document.createElement("a")),s.href=e,t===s.href}function
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).app=e()}(this,(function(){"use strict";function t(){}function e(t){return t()}function r(){return Object.create(null)}function n(t){t.forEach(e)}function o(t){return"function"==typeof t}function i(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}let s,a;function u(t,e){return s||(s=document.createElement("a")),s.href=e,t===s.href}function c(e,...r){if(null==e)return t;const n=e.subscribe(...r);return n.unsubscribe?()=>n.unsubscribe():n}function l(t,e){t.appendChild(e)}function h(t,e,r){t.insertBefore(e,r||null)}function f(t){t.parentNode&&t.parentNode.removeChild(t)}function p(t){return document.createElement(t)}function d(t){return document.createTextNode(t)}function m(){return d(" ")}function y(t,e,r,n){return t.addEventListener(e,r,n),()=>t.removeEventListener(e,r,n)}function b(t,e,r){null==r?t.removeAttribute(e):t.getAttribute(e)!==r&&t.setAttribute(e,r)}function g(t,e){e=""+e,t.data!==e&&(t.data=e)}function v(t,e,r,n){null==r?t.style.removeProperty(e):t.style.setProperty(e,r,n?"important":"")}function E(t){const e={};for(const r of t)e[r.name]=r.value;return e}function _(t){a=t}const w=[],T=[];let B=[];const A=[],H=Promise.resolve();let S=!1;function P(t){B.push(t)}
|
|
2
2
|
// flush() calls callbacks in this order:
|
|
3
3
|
// 1. All beforeUpdate callbacks, in order: parents before children
|
|
4
4
|
// 2. All bind:this callbacks, in reverse order: children before parents.
|
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
// callback called a second time; the seen_callbacks set, outside the flush()
|
|
19
19
|
// function, guarantees this behavior.
|
|
20
20
|
const R=new Set;let L=0;// Do *not* move this inside the flush() function
|
|
21
|
-
function
|
|
21
|
+
function O(){
|
|
22
22
|
// Do not reenter flush while dirty components are updated, as this can
|
|
23
23
|
// result in an infinite loop. Instead, let the inner flush handle it.
|
|
24
24
|
// Reentrancy is ok afterwards for bindings etc.
|
|
25
25
|
if(0!==L)return;const t=a;do{
|
|
26
26
|
// first, call beforeUpdate functions
|
|
27
27
|
// and update components
|
|
28
|
-
try{for(;L<w.length;){const t=w[L];L++,_(t),
|
|
28
|
+
try{for(;L<w.length;){const t=w[L];L++,_(t),C(t.$$)}}catch(t){
|
|
29
29
|
// reset dirty state to not end up in a deadlocked state and then rethrow
|
|
30
30
|
throw w.length=0,L=0,t}for(_(null),w.length=0,L=0;T.length;)T.pop()();
|
|
31
31
|
// then, once components are updated, call
|
|
@@ -33,21 +33,21 @@ throw w.length=0,L=0,t}for(_(null),w.length=0,L=0;T.length;)T.pop()();
|
|
|
33
33
|
// subsequent updates...
|
|
34
34
|
for(let t=0;t<B.length;t+=1){const e=B[t];R.has(e)||(
|
|
35
35
|
// ...so guard against infinite loops
|
|
36
|
-
R.add(e),e())}B.length=0}while(w.length);for(;A.length;)A.pop()();S=!1,R.clear(),_(t)}function
|
|
36
|
+
R.add(e),e())}B.length=0}while(w.length);for(;A.length;)A.pop()();S=!1,R.clear(),_(t)}function C(t){if(null!==t.fragment){t.update(),n(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(P)}}
|
|
37
37
|
/**
|
|
38
38
|
* Useful for example to execute remaining `afterUpdate` callbacks before executing `destroy`.
|
|
39
39
|
*/const x=new Set;function I(t,e){const r=t.$$;null!==r.fragment&&(!function(t){const e=[],r=[];B.forEach((n=>-1===t.indexOf(n)?e.push(n):r.push(n))),r.forEach((t=>t())),B=e}(r.after_update),n(r.on_destroy),r.fragment&&r.fragment.d(e),
|
|
40
40
|
// TODO null out other refs, including component.$$ (but need to
|
|
41
41
|
// preserve final state?)
|
|
42
|
-
r.on_destroy=r.fragment=null,r.ctx=[])}function N(t,e){-1===t.$$.dirty[0]&&(w.push(t),S||(S=!0,H.then(
|
|
42
|
+
r.on_destroy=r.fragment=null,r.ctx=[])}function N(t,e){-1===t.$$.dirty[0]&&(w.push(t),S||(S=!0,H.then(O)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function M(i,s,u,c,l,h,p,d=[-1]){const m=a;_(i);const y=i.$$={fragment:null,ctx:[],
|
|
43
43
|
// state
|
|
44
|
-
props:h,update:t,not_equal:
|
|
44
|
+
props:h,update:t,not_equal:l,bound:r(),
|
|
45
45
|
// lifecycle
|
|
46
46
|
on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(s.context||(m?m.$$.context:[])),
|
|
47
47
|
// everything else
|
|
48
|
-
callbacks:r(),dirty:d,skip_bound:!1,root:s.target||m.$$.root};p&&p(y.root);let b=!1;if(y.ctx=u?u(i,s.props||{},((t,e,...r)=>{const n=r.length?r[0]:e;return y.ctx&&
|
|
48
|
+
callbacks:r(),dirty:d,skip_bound:!1,root:s.target||m.$$.root};p&&p(y.root);let b=!1;if(y.ctx=u?u(i,s.props||{},((t,e,...r)=>{const n=r.length?r[0]:e;return y.ctx&&l(y.ctx[t],y.ctx[t]=n)&&(!y.skip_bound&&y.bound[t]&&y.bound[t](n),b&&N(i,t)),e})):[],y.update(),b=!0,n(y.before_update),
|
|
49
49
|
// `false` as a special case of no DOM component
|
|
50
|
-
y.fragment=!!
|
|
50
|
+
y.fragment=!!c&&c(y.ctx),s.target){if(s.hydrate){const t=function(t){return Array.from(t.childNodes)}(s.target);
|
|
51
51
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
52
52
|
y.fragment&&y.fragment.l(t),t.forEach(f)}else
|
|
53
53
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
@@ -60,7 +60,7 @@ P((()=>{const r=t.$$.on_mount.map(e).filter(o);
|
|
|
60
60
|
t.$$.on_destroy?t.$$.on_destroy.push(...r):
|
|
61
61
|
// Edge case - component was destroyed immediately,
|
|
62
62
|
// most likely as a result of a binding initialising
|
|
63
|
-
n(r),t.$$.on_mount=[]})),u.forEach(P)}(i,s.target,s.anchor,s.customElement),
|
|
63
|
+
n(r),t.$$.on_mount=[]})),u.forEach(P)}(i,s.target,s.anchor,s.customElement),O()}var g,v;_(m)}let G;"function"==typeof HTMLElement&&(G=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(e).filter(o);
|
|
64
64
|
// @ts-ignore todo: improve typings
|
|
65
65
|
for(const t in this.$$.slotted)
|
|
66
66
|
// @ts-ignore todo: improve typings
|
|
@@ -69,7 +69,7 @@ this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,r){this[t]=r}d
|
|
|
69
69
|
if(!o(r))return t;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(r),()=>{const t=n.indexOf(r);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}})
|
|
70
70
|
/* eslint-disable no-prototype-builtins */;var U="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||
|
|
71
71
|
// eslint-disable-next-line no-undef
|
|
72
|
-
"undefined"!=typeof global&&global||{},D="URLSearchParams"in U,F="Symbol"in U&&"iterator"in Symbol
|
|
72
|
+
"undefined"!=typeof global&&global||{},D="URLSearchParams"in U,F="Symbol"in U&&"iterator"in Symbol,k="FileReader"in U&&"Blob"in U&&function(){try{return new Blob,!0}catch(t){return!1}}(),$="FormData"in U,j="ArrayBuffer"in U;if(j)var V=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],X=ArrayBuffer.isView||function(t){return t&&V.indexOf(Object.prototype.toString.call(t))>-1};function z(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function W(t){return"string"!=typeof t&&(t=String(t)),t}
|
|
73
73
|
// Build a destructive iterator for the value list
|
|
74
74
|
function K(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return F&&(e[Symbol.iterator]=function(){return e}),e}function Y(t){this.map={},t instanceof Y?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){if(2!=t.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+t.length);this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function Z(t){if(!t._noBody)return t.bodyUsed?Promise.reject(new TypeError("Already read")):void(t.bodyUsed=!0)}function J(t){return new Promise((function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}}))}function q(t){var e=new FileReader,r=J(e);return e.readAsArrayBuffer(t),r}function Q(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function tt(){return this.bodyUsed=!1,this._initBody=function(t){var e;
|
|
75
75
|
/*
|
|
@@ -83,11 +83,11 @@ function K(t){var e={next:function(){var e=t.shift();return{done:void 0===e,valu
|
|
|
83
83
|
_initBody is called.
|
|
84
84
|
*/
|
|
85
85
|
// eslint-disable-next-line no-self-assign
|
|
86
|
-
this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t
|
|
86
|
+
this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:k&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:$&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:D&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():j&&k&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=Q(t.buffer),
|
|
87
87
|
// IE 10-11 can't handle a DataView body.
|
|
88
|
-
this._bodyInit=new Blob([this._bodyArrayBuffer])):j&&(ArrayBuffer.prototype.isPrototypeOf(t)||
|
|
88
|
+
this._bodyInit=new Blob([this._bodyArrayBuffer])):j&&(ArrayBuffer.prototype.isPrototypeOf(t)||X(t))?this._bodyArrayBuffer=Q(t):this._bodyText=t=Object.prototype.toString.call(t):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):D&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},k&&(this.blob=function(){var t=Z(this);if(t)return t;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 t=Z(this);return t||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if(k)return this.blob().then(q);throw new Error("could not read as ArrayBuffer")},this.text=function(){var t,e,r,n,o,i=Z(this);if(i)return i;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,r=J(e),n=/charset=([A-Za-z0-9_-]+)/.exec(t.type),o=n?n[1]:"utf-8",e.readAsText(t,o),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n<e.length;n++)r[n]=String.fromCharCode(e[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},$&&(this.formData=function(){return this.text().then(nt)}),this.json=function(){return this.text().then(JSON.parse)},this}
|
|
89
89
|
// HTTP methods whose capitalization should be normalized
|
|
90
|
-
Y.prototype.append=function(t,e){t=
|
|
90
|
+
Y.prototype.append=function(t,e){t=z(t),e=W(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},Y.prototype.delete=function(t){delete this.map[z(t)]},Y.prototype.get=function(t){return t=z(t),this.has(t)?this.map[t]:null},Y.prototype.has=function(t){return this.map.hasOwnProperty(z(t))},Y.prototype.set=function(t,e){this.map[z(t)]=W(e)},Y.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},Y.prototype.keys=function(){var t=[];return this.forEach((function(e,r){t.push(r)})),K(t)},Y.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),K(t)},Y.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),K(t)},F&&(Y.prototype[Symbol.iterator]=Y.prototype.entries);var et=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function rt(t,e){if(!(this instanceof rt))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var r,n,o=(e=e||{}).body;if(t instanceof rt){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new Y(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,o||null==t._bodyInit||(o=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new Y(e.headers)),this.method=(r=e.method||this.method||"GET",n=r.toUpperCase(),et.indexOf(n)>-1?n:r),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal||function(){if("AbortController"in U)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"!==e.cache&&"no-cache"!==e.cache)){
|
|
91
91
|
// Search for a '_' parameter in the query string
|
|
92
92
|
var i=/([?&])_=[^&]*/;if(i.test(this.url))
|
|
93
93
|
// If it already exists then set the value with the current time
|
|
@@ -95,7 +95,7 @@ this.url=this.url.replace(i,"$1_="+(new Date).getTime());else{this.url+=(/\?/.te
|
|
|
95
95
|
// Avoiding split via regex to work around a common IE11 bug with the core-js 3.6.0 regex polyfill
|
|
96
96
|
// https://github.com/github/fetch/issues/748
|
|
97
97
|
// https://github.com/zloirock/core-js/issues/751
|
|
98
|
-
t.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t})).forEach((function(t){var r=t.split(":"),n=r.shift().trim();if(n){var o=r.join(":").trim();try{e.append(n,o)}catch(t){console.warn("Response "+t.message)}}})),e)};n.url="responseURL"in i?i.responseURL:n.headers.get("X-Request-URL");var o="response"in i?i.response:i.responseText;setTimeout((function(){r(new ot(o,n))}),0)},i.onerror=function(){setTimeout((function(){n(new TypeError("Network request failed"))}),0)},i.ontimeout=function(){setTimeout((function(){n(new TypeError("Network request failed"))}),0)},i.onabort=function(){setTimeout((function(){n(new st("Aborted","AbortError"))}),0)},i.open(o.method,function(t){try{return""===t&&U.location.href?U.location.href:t}catch(e){return t}}(o.url),!0),"include"===o.credentials?i.withCredentials=!0:"omit"===o.credentials&&(i.withCredentials=!1),"responseType"in i&&(
|
|
98
|
+
t.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t})).forEach((function(t){var r=t.split(":"),n=r.shift().trim();if(n){var o=r.join(":").trim();try{e.append(n,o)}catch(t){console.warn("Response "+t.message)}}})),e)};n.url="responseURL"in i?i.responseURL:n.headers.get("X-Request-URL");var o="response"in i?i.response:i.responseText;setTimeout((function(){r(new ot(o,n))}),0)},i.onerror=function(){setTimeout((function(){n(new TypeError("Network request failed"))}),0)},i.ontimeout=function(){setTimeout((function(){n(new TypeError("Network request failed"))}),0)},i.onabort=function(){setTimeout((function(){n(new st("Aborted","AbortError"))}),0)},i.open(o.method,function(t){try{return""===t&&U.location.href?U.location.href:t}catch(e){return t}}(o.url),!0),"include"===o.credentials?i.withCredentials=!0:"omit"===o.credentials&&(i.withCredentials=!1),"responseType"in i&&(k?i.responseType="blob":j&&(i.responseType="arraybuffer")),e&&"object"==typeof e.headers&&!(e.headers instanceof Y||U.Headers&&e.headers instanceof U.Headers)){var a=[];Object.getOwnPropertyNames(e.headers).forEach((function(t){a.push(z(t)),i.setRequestHeader(t,W(e.headers[t]))})),o.headers.forEach((function(t,e){-1===a.indexOf(e)&&i.setRequestHeader(e,t)}))}else o.headers.forEach((function(t,e){i.setRequestHeader(e,t)}));o.signal&&(o.signal.addEventListener("abort",s),i.onreadystatechange=function(){
|
|
99
99
|
// DONE (success or failure)
|
|
100
100
|
4===i.readyState&&o.signal.removeEventListener("abort",s)}),i.send(void 0===o._bodyInit?null:o._bodyInit)}))}at.polyfill=!0,U.fetch||(U.fetch=at,U.Headers=Y,U.Request=rt,U.Response=ot),
|
|
101
101
|
// the whatwg-fetch polyfill installs the fetch() function
|
|
@@ -117,7 +117,7 @@ self.fetch.bind(self);
|
|
|
117
117
|
PERFORMANCE OF THIS SOFTWARE.
|
|
118
118
|
***************************************************************************** */
|
|
119
119
|
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
120
|
-
var ut=function(t,e){return ut=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},ut(t,e)};function lt(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}ut(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function ct(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function ht(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}function ft(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))}function pt(t){return"function"==typeof t}function dt(t){var e=t((function(t){Error.call(t),t.stack=(new Error).stack}));return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}"function"==typeof SuppressedError&&SuppressedError;var mt=dt((function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}));function yt(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}var bt=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}var e;return t.prototype.unsubscribe=function(){var t,e,r,n,o;if(!this.closed){this.closed=!0;var i=this._parentage;if(i)if(this._parentage=null,Array.isArray(i))try{for(var s=ct(i),a=s.next();!a.done;a=s.next()){a.value.remove(this)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}else i.remove(this);var u=this.initialTeardown;if(pt(u))try{u()}catch(t){o=t instanceof mt?t.errors:[t]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var c=ct(l),h=c.next();!h.done;h=c.next()){var f=h.value;try{Et(f)}catch(t){o=null!=o?o:[],t instanceof mt?o=ft(ft([],ht(o)),ht(t.errors)):o.push(t)}}}catch(t){r={error:t}}finally{try{h&&!h.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}}if(o)throw new mt(o)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)Et(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(r=this._finalizers)&&void 0!==r?r:[]).push(e)}},t.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},t.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},t.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&yt(e,t)},t.prototype.remove=function(e){var r=this._finalizers;r&&yt(r,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}(),gt=bt.EMPTY;function vt(t){return t instanceof bt||t&&"closed"in t&&pt(t.remove)&&pt(t.add)&&pt(t.unsubscribe)}function Et(t){pt(t)?t():t.unsubscribe()}var _t={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},wt={setTimeout:function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=wt.delegate;return(null==o?void 0:o.setTimeout)?o.setTimeout.apply(o,ft([t,e],ht(r))):setTimeout.apply(void 0,ft([t,e],ht(r)))},clearTimeout:function(t){var e=wt.delegate;return((null==e?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function Tt(){}var Bt=null;function At(t){if(_t.useDeprecatedSynchronousErrorHandling){var e=!Bt;if(e&&(Bt={errorThrown:!1,error:null}),t(),e){var r=Bt,n=r.errorThrown,o=r.error;if(Bt=null,n)throw o}}else t()}var Ht=function(t){function e(e){var r=t.call(this)||this;return r.isStopped=!1,e?(r.destination=e,vt(e)&&e.add(r)):r.destination=Ot,r}return lt(e,t),e.create=function(t,e,r){return new Lt(t,e,r)},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(bt),St=Function.prototype.bind;function Pt(t,e){return St.call(t,e)}var Rt=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(t){Ct(t)}},t.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(t){Ct(t)}else Ct(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){Ct(t)}},t}(),Lt=function(t){function e(e,r,n){var o,i,s=t.call(this)||this;pt(e)||!e?o={next:null!=e?e:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:s&&_t.useDeprecatedNextContext?((i=Object.create(e)).unsubscribe=function(){return s.unsubscribe()},o={next:e.next&&Pt(e.next,i),error:e.error&&Pt(e.error,i),complete:e.complete&&Pt(e.complete,i)}):o=e;return s.destination=new Rt(o),s}return lt(e,t),e}(Ht);function Ct(t){var e;e=t,wt.setTimeout((function(){throw e}))}var Ot={closed:!0,next:Tt,error:function(t){throw t},complete:Tt},xt="function"==typeof Symbol&&Symbol.observable||"@@observable";function It(t){return t}var Nt=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(t,e,r){var n,o=this,i=(n=t)&&n instanceof Ht||function(t){return t&&pt(t.next)&&pt(t.error)&&pt(t.complete)}(n)&&vt(n)?t:new Lt(t,e,r);return At((function(){var t=o,e=t.operator,r=t.source;i.add(e?e.call(i,r):r?o._subscribe(i):o._trySubscribe(i))})),i},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},t.prototype.forEach=function(t,e){var r=this;return new(e=Mt(e))((function(e,n){var o=new Lt({next:function(e){try{t(e)}catch(t){n(t),o.unsubscribe()}},error:n,complete:e});r.subscribe(o)}))},t.prototype._subscribe=function(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)},t.prototype[xt]=function(){return this},t.prototype.pipe=function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return(0===(t=e).length?It:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)})(this)},t.prototype.toPromise=function(t){var e=this;return new(t=Mt(t))((function(t,r){var n;e.subscribe((function(t){return n=t}),(function(t){return r(t)}),(function(){return t(n)}))}))},t.create=function(e){return new t(e)},t}();function Mt(t){var e;return null!==(e=null!=t?t:_t.Promise)&&void 0!==e?e:Promise}var Gt=dt((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),Ut=function(t){function e(){var e=t.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return lt(e,t),e.prototype.lift=function(t){var e=new Dt(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new Gt},e.prototype.next=function(t){var e=this;At((function(){var r,n;if(e._throwIfClosed(),!e.isStopped){e.currentObservers||(e.currentObservers=Array.from(e.observers));try{for(var o=ct(e.currentObservers),i=o.next();!i.done;i=o.next()){i.value.next(t)}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}}}))},e.prototype.error=function(t){var e=this;At((function(){if(e._throwIfClosed(),!e.isStopped){e.hasError=e.isStopped=!0,e.thrownError=t;for(var r=e.observers;r.length;)r.shift().error(t)}}))},e.prototype.complete=function(){var t=this;At((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}}))},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(e){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var e=this,r=this,n=r.hasError,o=r.isStopped,i=r.observers;return n||o?gt:(this.currentObservers=null,i.push(t),new bt((function(){e.currentObservers=null,yt(i,t)})))},e.prototype._checkFinalizedStatuses=function(t){var e=this,r=e.hasError,n=e.thrownError,o=e.isStopped;r?t.error(n):o&&t.complete()},e.prototype.asObservable=function(){var t=new Nt;return t.source=this,t},e.create=function(t,e){return new Dt(t,e)},e}(Nt),Dt=function(t){function e(e,r){var n=t.call(this)||this;return n.destination=e,n.source=r,n}return lt(e,t),e.prototype.next=function(t){var e,r;null===(r=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===r||r.call(e,t)},e.prototype.error=function(t){var e,r;null===(r=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===r||r.call(e,t)},e.prototype.complete=function(){var t,e;null===(e=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===e||e.call(t)},e.prototype._subscribe=function(t){var e,r;return null!==(r=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==r?r:gt},e}(Ut),Ft={now:function(){return(Ft.delegate||Date).now()},delegate:void 0},$t=function(t){function e(e,r,n){void 0===e&&(e=1/0),void 0===r&&(r=1/0),void 0===n&&(n=Ft);var o=t.call(this)||this;return o._bufferSize=e,o._windowTime=r,o._timestampProvider=n,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,e),o._windowTime=Math.max(1,r),o}return lt(e,t),e.prototype.next=function(e){var r=this,n=r.isStopped,o=r._buffer,i=r._infiniteTimeWindow,s=r._timestampProvider,a=r._windowTime;n||(o.push(e),!i&&o.push(s.now()+a)),this._trimBuffer(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var e=this._innerSubscribe(t),r=this._infiniteTimeWindow,n=this._buffer.slice(),o=0;o<n.length&&!t.closed;o+=r?1:2)t.next(n[o]);return this._checkFinalizedStatuses(t),e},e.prototype._trimBuffer=function(){var t=this,e=t._bufferSize,r=t._timestampProvider,n=t._buffer,o=t._infiniteTimeWindow,i=(o?1:2)*e;if(e<1/0&&i<n.length&&n.splice(0,n.length-i),!o){for(var s=r.now(),a=0,u=1;u<n.length&&n[u]<=s;u+=2)a=u;a&&n.splice(0,a+1)}},e}(Ut);let kt=[],jt={};
|
|
120
|
+
var ut=function(t,e){return ut=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},ut(t,e)};function ct(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}ut(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function lt(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function ht(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}function ft(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))}function pt(t){return"function"==typeof t}function dt(t){var e=t((function(t){Error.call(t),t.stack=(new Error).stack}));return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}"function"==typeof SuppressedError&&SuppressedError;var mt=dt((function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}));function yt(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}var bt=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}var e;return t.prototype.unsubscribe=function(){var t,e,r,n,o;if(!this.closed){this.closed=!0;var i=this._parentage;if(i)if(this._parentage=null,Array.isArray(i))try{for(var s=lt(i),a=s.next();!a.done;a=s.next()){a.value.remove(this)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}else i.remove(this);var u=this.initialTeardown;if(pt(u))try{u()}catch(t){o=t instanceof mt?t.errors:[t]}var c=this._finalizers;if(c){this._finalizers=null;try{for(var l=lt(c),h=l.next();!h.done;h=l.next()){var f=h.value;try{Et(f)}catch(t){o=null!=o?o:[],t instanceof mt?o=ft(ft([],ht(o)),ht(t.errors)):o.push(t)}}}catch(t){r={error:t}}finally{try{h&&!h.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}}if(o)throw new mt(o)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)Et(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(r=this._finalizers)&&void 0!==r?r:[]).push(e)}},t.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},t.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},t.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&yt(e,t)},t.prototype.remove=function(e){var r=this._finalizers;r&&yt(r,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}(),gt=bt.EMPTY;function vt(t){return t instanceof bt||t&&"closed"in t&&pt(t.remove)&&pt(t.add)&&pt(t.unsubscribe)}function Et(t){pt(t)?t():t.unsubscribe()}var _t={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},wt={setTimeout:function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=wt.delegate;return(null==o?void 0:o.setTimeout)?o.setTimeout.apply(o,ft([t,e],ht(r))):setTimeout.apply(void 0,ft([t,e],ht(r)))},clearTimeout:function(t){var e=wt.delegate;return((null==e?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function Tt(){}var Bt=null;function At(t){if(_t.useDeprecatedSynchronousErrorHandling){var e=!Bt;if(e&&(Bt={errorThrown:!1,error:null}),t(),e){var r=Bt,n=r.errorThrown,o=r.error;if(Bt=null,n)throw o}}else t()}var Ht=function(t){function e(e){var r=t.call(this)||this;return r.isStopped=!1,e?(r.destination=e,vt(e)&&e.add(r)):r.destination=Ct,r}return ct(e,t),e.create=function(t,e,r){return new Lt(t,e,r)},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(bt),St=Function.prototype.bind;function Pt(t,e){return St.call(t,e)}var Rt=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(t){Ot(t)}},t.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(t){Ot(t)}else Ot(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){Ot(t)}},t}(),Lt=function(t){function e(e,r,n){var o,i,s=t.call(this)||this;pt(e)||!e?o={next:null!=e?e:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:s&&_t.useDeprecatedNextContext?((i=Object.create(e)).unsubscribe=function(){return s.unsubscribe()},o={next:e.next&&Pt(e.next,i),error:e.error&&Pt(e.error,i),complete:e.complete&&Pt(e.complete,i)}):o=e;return s.destination=new Rt(o),s}return ct(e,t),e}(Ht);function Ot(t){var e;e=t,wt.setTimeout((function(){throw e}))}var Ct={closed:!0,next:Tt,error:function(t){throw t},complete:Tt},xt="function"==typeof Symbol&&Symbol.observable||"@@observable";function It(t){return t}var Nt=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(t,e,r){var n,o=this,i=(n=t)&&n instanceof Ht||function(t){return t&&pt(t.next)&&pt(t.error)&&pt(t.complete)}(n)&&vt(n)?t:new Lt(t,e,r);return At((function(){var t=o,e=t.operator,r=t.source;i.add(e?e.call(i,r):r?o._subscribe(i):o._trySubscribe(i))})),i},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},t.prototype.forEach=function(t,e){var r=this;return new(e=Mt(e))((function(e,n){var o=new Lt({next:function(e){try{t(e)}catch(t){n(t),o.unsubscribe()}},error:n,complete:e});r.subscribe(o)}))},t.prototype._subscribe=function(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)},t.prototype[xt]=function(){return this},t.prototype.pipe=function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return(0===(t=e).length?It:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)})(this)},t.prototype.toPromise=function(t){var e=this;return new(t=Mt(t))((function(t,r){var n;e.subscribe((function(t){return n=t}),(function(t){return r(t)}),(function(){return t(n)}))}))},t.create=function(e){return new t(e)},t}();function Mt(t){var e;return null!==(e=null!=t?t:_t.Promise)&&void 0!==e?e:Promise}var Gt=dt((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),Ut=function(t){function e(){var e=t.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return ct(e,t),e.prototype.lift=function(t){var e=new Dt(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new Gt},e.prototype.next=function(t){var e=this;At((function(){var r,n;if(e._throwIfClosed(),!e.isStopped){e.currentObservers||(e.currentObservers=Array.from(e.observers));try{for(var o=lt(e.currentObservers),i=o.next();!i.done;i=o.next()){i.value.next(t)}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}}}))},e.prototype.error=function(t){var e=this;At((function(){if(e._throwIfClosed(),!e.isStopped){e.hasError=e.isStopped=!0,e.thrownError=t;for(var r=e.observers;r.length;)r.shift().error(t)}}))},e.prototype.complete=function(){var t=this;At((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}}))},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(e){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var e=this,r=this,n=r.hasError,o=r.isStopped,i=r.observers;return n||o?gt:(this.currentObservers=null,i.push(t),new bt((function(){e.currentObservers=null,yt(i,t)})))},e.prototype._checkFinalizedStatuses=function(t){var e=this,r=e.hasError,n=e.thrownError,o=e.isStopped;r?t.error(n):o&&t.complete()},e.prototype.asObservable=function(){var t=new Nt;return t.source=this,t},e.create=function(t,e){return new Dt(t,e)},e}(Nt),Dt=function(t){function e(e,r){var n=t.call(this)||this;return n.destination=e,n.source=r,n}return ct(e,t),e.prototype.next=function(t){var e,r;null===(r=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===r||r.call(e,t)},e.prototype.error=function(t){var e,r;null===(r=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===r||r.call(e,t)},e.prototype.complete=function(){var t,e;null===(e=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===e||e.call(t)},e.prototype._subscribe=function(t){var e,r;return null!==(r=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==r?r:gt},e}(Ut),Ft={now:function(){return(Ft.delegate||Date).now()},delegate:void 0},kt=function(t){function e(e,r,n){void 0===e&&(e=1/0),void 0===r&&(r=1/0),void 0===n&&(n=Ft);var o=t.call(this)||this;return o._bufferSize=e,o._windowTime=r,o._timestampProvider=n,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,e),o._windowTime=Math.max(1,r),o}return ct(e,t),e.prototype.next=function(e){var r=this,n=r.isStopped,o=r._buffer,i=r._infiniteTimeWindow,s=r._timestampProvider,a=r._windowTime;n||(o.push(e),!i&&o.push(s.now()+a)),this._trimBuffer(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var e=this._innerSubscribe(t),r=this._infiniteTimeWindow,n=this._buffer.slice(),o=0;o<n.length&&!t.closed;o+=r?1:2)t.next(n[o]);return this._checkFinalizedStatuses(t),e},e.prototype._trimBuffer=function(){var t=this,e=t._bufferSize,r=t._timestampProvider,n=t._buffer,o=t._infiniteTimeWindow,i=(o?1:2)*e;if(e<1/0&&i<n.length&&n.splice(0,n.length-i),!o){for(var s=r.now(),a=0,u=1;u<n.length&&n[u]<=s;u+=2)a=u;a&&n.splice(0,a+1)}},e}(Ut);let $t=[],jt={};
|
|
121
121
|
/**
|
|
122
122
|
* @name topic
|
|
123
123
|
* @description A small wrapper over the rxjs to offer the topic method on top of it
|
|
@@ -131,30 +131,30 @@ const Vt=[];
|
|
|
131
131
|
* @param {*=}value initial value
|
|
132
132
|
* @param {StartStopNotifier=} start
|
|
133
133
|
*/
|
|
134
|
-
function
|
|
135
|
-
const t=!Vt.length;for(const t of o)t[1](),Vt.push(t,e);if(t){for(let t=0;t<Vt.length;t+=2)Vt[t][0](Vt[t+1]);Vt.length=0}}}return{set:s,update:function(t){s(t(e))},subscribe:function(i,a=t){const u=[i,a];return o.add(u),1===o.size&&(n=r(s)||t),i(e),()=>{o.delete(u),0===o.size&&n&&(n(),n=null)}}}}function
|
|
134
|
+
function Xt(e,r=t){let n;const o=new Set;function s(t){if(i(e,t)&&(e=t,n)){// store is ready
|
|
135
|
+
const t=!Vt.length;for(const t of o)t[1](),Vt.push(t,e);if(t){for(let t=0;t<Vt.length;t+=2)Vt[t][0](Vt[t+1]);Vt.length=0}}}return{set:s,update:function(t){s(t(e))},subscribe:function(i,a=t){const u=[i,a];return o.add(u),1===o.size&&(n=r(s)||t),i(e),()=>{o.delete(u),0===o.size&&n&&(n(),n=null)}}}}function zt(e,r,i){const s=!Array.isArray(e),a=s?[e]:e,u=r.length<2;return l=e=>{let i=!1;const l=[];let h=0,f=t;const p=()=>{if(h)return;f();const n=r(s?l[0]:l,e);u?e(n):f=o(n)?n:t},d=a.map(((t,e)=>c(t,(t=>{l[e]=t,h&=~(1<<e),i&&p()}),(()=>{h|=1<<e}))));return i=!0,p(),function(){n(d),f(),
|
|
136
136
|
// We need to set this to false because callbacks can still happen despite having unsubscribed:
|
|
137
137
|
// Callbacks might already be placed in the queue which doesn't know it should no longer
|
|
138
138
|
// invoke this derived store.
|
|
139
|
-
i=!1}},{subscribe:
|
|
139
|
+
i=!1}},{subscribe:Xt(i,l).subscribe};
|
|
140
140
|
/**
|
|
141
141
|
* Creates a `Readable` store that allows reading by subscription.
|
|
142
142
|
* @param value initial value
|
|
143
143
|
* @param {StartStopNotifier} [start]
|
|
144
144
|
*/
|
|
145
|
-
var
|
|
145
|
+
var l}var Wt=function(t){return function(t){return!!t&&"object"==typeof t}(t)&&!function(t){var e=Object.prototype.toString.call(t);return"[object RegExp]"===e||"[object Date]"===e||function(t){return t.$$typeof===Kt}(t)}
|
|
146
146
|
// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
|
|
147
147
|
(t)};var Kt="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function Yt(t,e){return!1!==e.clone&&e.isMergeableObject(t)?te((r=t,Array.isArray(r)?[]:{}),t,e):t;var r}function Zt(t,e,r){return t.concat(e).map((function(t){return Yt(t,r)}))}function Jt(t){return Object.keys(t).concat(function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter((function(e){return Object.propertyIsEnumerable.call(t,e)})):[]}(t))}function qt(t,e){try{return e in t}catch(t){return!1}}
|
|
148
148
|
// Protects from prototype poisoning and unexpected merging up the prototype chain.
|
|
149
149
|
function Qt(t,e,r){var n={};return r.isMergeableObject(t)&&Jt(t).forEach((function(e){n[e]=Yt(t[e],r)})),Jt(e).forEach((function(o){(function(t,e){return qt(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e));// and also unsafe if they're nonenumerable.
|
|
150
|
-
})(t,o)||(qt(t,o)&&r.isMergeableObject(e[o])?n[o]=function(t,e){if(!e.customMerge)return te;var r=e.customMerge(t);return"function"==typeof r?r:te}(o,r)(t[o],e[o],r):n[o]=Yt(e[o],r))})),n}function te(t,e,r){(r=r||{}).arrayMerge=r.arrayMerge||Zt,r.isMergeableObject=r.isMergeableObject||
|
|
150
|
+
})(t,o)||(qt(t,o)&&r.isMergeableObject(e[o])?n[o]=function(t,e){if(!e.customMerge)return te;var r=e.customMerge(t);return"function"==typeof r?r:te}(o,r)(t[o],e[o],r):n[o]=Yt(e[o],r))})),n}function te(t,e,r){(r=r||{}).arrayMerge=r.arrayMerge||Zt,r.isMergeableObject=r.isMergeableObject||Wt,
|
|
151
151
|
// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()
|
|
152
152
|
// implementations can use it. The caller may not replace it.
|
|
153
153
|
r.cloneUnlessOtherwiseSpecified=Yt;var n=Array.isArray(e);return n===Array.isArray(t)?n?r.arrayMerge(t,e,r):Qt(t,e,r):Yt(e,r)}te.all=function(t,e){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce((function(t,r){return te(t,r,e)}),{})};var ee=te,re=function(t,e){return re=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},re(t,e)};function ne(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}re(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var oe,ie,se,ae=function(){return ae=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},ae.apply(this,arguments)};function ue(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))}
|
|
154
154
|
/**
|
|
155
155
|
* Type Guards
|
|
156
156
|
*/
|
|
157
|
-
function
|
|
157
|
+
function ce(t){return t.type===ie.literal}function le(t){return t.type===ie.argument}function he(t){return t.type===ie.number}function fe(t){return t.type===ie.date}function pe(t){return t.type===ie.time}function de(t){return t.type===ie.select}function me(t){return t.type===ie.plural}function ye(t){return t.type===ie.pound}function be(t){return t.type===ie.tag}function ge(t){return!(!t||"object"!=typeof t||t.type!==se.number)}function ve(t){return!(!t||"object"!=typeof t||t.type!==se.dateTime)}
|
|
158
158
|
// @generated from regex-gen.ts
|
|
159
159
|
"function"==typeof SuppressedError&&SuppressedError,function(t){
|
|
160
160
|
/** Argument is unclosed (e.g. `{0`) */
|
|
@@ -303,10 +303,10 @@ var Te=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;var Be=/^\.(?:(0+)(\*)?|(#+)|(0+)
|
|
|
303
303
|
// @@@ case
|
|
304
304
|
return"string"!=typeof n?(e.minimumSignificantDigits=r.length,e.maximumSignificantDigits=r.length):"+"===n?e.minimumSignificantDigits=r.length:"#"===r[0]?e.maximumSignificantDigits=r.length:(e.minimumSignificantDigits=r.length,e.maximumSignificantDigits=r.length+("string"==typeof n?n.length:0)),""})),e}function Re(t){switch(t){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 Le(t){
|
|
305
305
|
// Engineering
|
|
306
|
-
var e;if("E"===t[0]&&"E"===t[1]?(e={notation:"engineering"},t=t.slice(2)):"E"===t[0]&&(e={notation:"scientific"},t=t.slice(1)),e){var r=t.slice(0,2);if("+!"===r?(e.signDisplay="always",t=t.slice(2)):"+?"===r&&(e.signDisplay="exceptZero",t=t.slice(2)),!Se.test(t))throw new Error("Malformed concise eng/scientific notation");e.minimumIntegerDigits=t.length}return e}function
|
|
306
|
+
var e;if("E"===t[0]&&"E"===t[1]?(e={notation:"engineering"},t=t.slice(2)):"E"===t[0]&&(e={notation:"scientific"},t=t.slice(1)),e){var r=t.slice(0,2);if("+!"===r?(e.signDisplay="always",t=t.slice(2)):"+?"===r&&(e.signDisplay="exceptZero",t=t.slice(2)),!Se.test(t))throw new Error("Malformed concise eng/scientific notation");e.minimumIntegerDigits=t.length}return e}function Oe(t){var e=Re(t);return e||{}}
|
|
307
307
|
/**
|
|
308
308
|
* https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md#skeleton-stems-and-options
|
|
309
|
-
*/function
|
|
309
|
+
*/function Ce(t){for(var e={},r=0,n=t;r<n.length;r++){var o=n[r];switch(o.stem){case"percent":case"%":e.style="percent";continue;case"%x100":e.style="percent",e.scale=100;continue;case"currency":e.style="currency",e.currency=o.options[0];continue;case"group-off":case",_":e.useGrouping=!1;continue;case"precision-integer":case".":e.maximumFractionDigits=0;continue;case"measure-unit":case"unit":e.style="unit",e.unit=o.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":e.notation="compact",e.compactDisplay="short";continue;case"compact-long":case"KK":e.notation="compact",e.compactDisplay="long";continue;case"scientific":e=ae(ae(ae({},e),{notation:"scientific"}),o.options.reduce((function(t,e){return ae(ae({},t),Oe(e))}),{}));continue;case"engineering":e=ae(ae(ae({},e),{notation:"engineering"}),o.options.reduce((function(t,e){return ae(ae({},t),Oe(e))}),{}));continue;case"notation-simple":e.notation="standard";continue;
|
|
310
310
|
// https://github.com/unicode-org/icu/blob/master/icu4c/source/i18n/unicode/unumberformatter.h
|
|
311
311
|
case"unit-width-narrow":e.currencyDisplay="narrowSymbol",e.unitDisplay="narrow";continue;case"unit-width-short":e.currencyDisplay="code",e.unitDisplay="short";continue;case"unit-width-full-name":e.currencyDisplay="name",e.unitDisplay="long";continue;case"unit-width-iso-code":e.currencyDisplay="symbol";continue;case"scale":e.scale=parseFloat(o.options[0]);continue;
|
|
312
312
|
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width
|
|
@@ -349,20 +349,20 @@ e=t.hourCycles[0]),e)switch(e){case"h24":return"k";case"h23":return"H";case"h12"
|
|
|
349
349
|
var r,n=t.language;return"root"!==n&&(r=t.maximize().region),(Ie[r||""]||Ie[n||""]||Ie["".concat(n,"-001")]||Ie["001"])[0]}var Me=new RegExp("^".concat(Ee.source,"*")),Ge=new RegExp("".concat(Ee.source,"*$"));function Ue(t,e){return{start:t,end:e}}
|
|
350
350
|
// #region Ponyfills
|
|
351
351
|
// Consolidate these variables up top for easier toggling during debugging
|
|
352
|
-
var De=!!String.prototype.startsWith,Fe=!!String.fromCodePoint
|
|
352
|
+
var De=!!String.prototype.startsWith,Fe=!!String.fromCodePoint,ke=!!Object.fromEntries,$e=!!String.prototype.codePointAt,je=!!String.prototype.trimStart,Ve=!!String.prototype.trimEnd,Xe=!!Number.isSafeInteger?Number.isSafeInteger:function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t&&Math.abs(t)<=9007199254740991},ze=!0;try{
|
|
353
353
|
/**
|
|
354
354
|
* legacy Edge or Xbox One browser
|
|
355
355
|
* Unicode flag support: supported
|
|
356
356
|
* Pattern_Syntax support: not supported
|
|
357
357
|
* See https://github.com/formatjs/formatjs/issues/2822
|
|
358
358
|
*/
|
|
359
|
-
|
|
359
|
+
ze="a"===(null===(xe=tr("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===xe?void 0:xe[0])}catch(t){ze=!1}var We,Ke=De?// Native
|
|
360
360
|
function(t,e,r){return t.startsWith(e,r)}:// For IE11
|
|
361
361
|
function(t,e,r){return t.slice(r,r+e.length)===e},Ye=Fe?String.fromCodePoint:// IE11
|
|
362
362
|
function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r,n="",o=t.length,i=0;o>i;){if((r=t[i++])>1114111)throw RangeError(r+" is not a valid code point");n+=r<65536?String.fromCharCode(r):String.fromCharCode(55296+((r-=65536)>>10),r%1024+56320)}return n},Ze=
|
|
363
363
|
// native
|
|
364
|
-
|
|
365
|
-
function(t){for(var e={},r=0,n=t;r<n.length;r++){var o=n[r],i=o[0],s=o[1];e[i]=s}return e},Je
|
|
364
|
+
ke?Object.fromEntries:// Ponyfill
|
|
365
|
+
function(t){for(var e={},r=0,n=t;r<n.length;r++){var o=n[r],i=o[0],s=o[1];e[i]=s}return e},Je=$e?// Native
|
|
366
366
|
function(t,e){return t.codePointAt(e)}:// IE 11
|
|
367
367
|
function(t,e){var r=t.length;if(!(e<0||e>=r)){var n,o=t.charCodeAt(e);return o<55296||o>56319||e+1===r||(n=t.charCodeAt(e+1))<56320||n>57343?o:n-56320+(o-55296<<10)+65536}},qe=je?// Native
|
|
368
368
|
function(t){return t.trimStart()}:// Ponyfill
|
|
@@ -372,11 +372,11 @@ function(t){return t.replace(Ge,"")};
|
|
|
372
372
|
// Prevent minifier to translate new RegExp to literal form that might cause syntax error on IE11.
|
|
373
373
|
function tr(t,e){return new RegExp(t,e)}
|
|
374
374
|
// #endregion
|
|
375
|
-
if(
|
|
375
|
+
if(ze){
|
|
376
376
|
// Native
|
|
377
|
-
var er=tr("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");
|
|
377
|
+
var er=tr("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");We=function(t,e){var r;return er.lastIndex=e,null!==(r=er.exec(t)[1])&&void 0!==r?r:""}}else
|
|
378
378
|
// IE11
|
|
379
|
-
|
|
379
|
+
We=function(t,e){for(var r=[];;){var n=Je(t,e);if(void 0===n||ir(n)||sr(n))break;r.push(n),e+=n>=65536?2:1}return Ye.apply(void 0,r)};var rr=/** @class */function(){function t(t,e){void 0===e&&(e={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!e.ignoreTag,this.locale=e.locale,this.requiresOtherClause=!!e.requiresOtherClause,this.shouldParseSkeletons=!!e.shouldParseSkeletons}return t.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},t.prototype.parseMessage=function(t,e,r){for(var n=[];!this.isEOF();){var o=this.char();if(123/* `{` */===o){if((i=this.parseArgument(t,r)).err)return i;n.push(i.val)}else{if(125/* `}` */===o&&t>0)break;if(35/* `#` */!==o||"plural"!==e&&"selectordinal"!==e){if(60/* `<` */===o&&!this.ignoreTag&&47===this.peek()){if(r)break;return this.error(oe.UNMATCHED_CLOSING_TAG,Ue(this.clonePosition(),this.clonePosition()))}if(60/* `<` */===o&&!this.ignoreTag&&nr(this.peek()||0)){if((i=this.parseTag(t,e)).err)return i;n.push(i.val)}else{var i;if((i=this.parseLiteral(t,e)).err)return i;n.push(i.val)}}else{var s=this.clonePosition();this.bump(),n.push({type:ie.pound,location:Ue(s,this.clonePosition())})}}}return{val:n,err:null}},
|
|
380
380
|
/**
|
|
381
381
|
* A tag name must start with an ASCII lower/upper case letter. The grammar is based on the
|
|
382
382
|
* [custom element name][] except that a dash is NOT always mandatory and uppercase letters
|
|
@@ -443,7 +443,7 @@ this.bumpSpace(),this.isEOF()?this.error(oe.EXPECT_ARGUMENT_CLOSING_BRACE,Ue(r,t
|
|
|
443
443
|
* Advance the parser until the end of the identifier, if it is currently on
|
|
444
444
|
* an identifier character. Return an empty string otherwise.
|
|
445
445
|
*/
|
|
446
|
-
t.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),e=this.offset(),r=
|
|
446
|
+
t.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),e=this.offset(),r=We(this.message,e),n=e+r.length;return this.bumpTo(n),{value:r,location:Ue(t,this.clonePosition())}},t.prototype.parseArgumentOptions=function(t,e,r,n){var o,i=this.clonePosition(),s=this.parseIdentifierIfPossible().value,a=this.clonePosition();
|
|
447
447
|
// Parse this range:
|
|
448
448
|
// {name, type, style}
|
|
449
449
|
// ^---^
|
|
@@ -453,17 +453,17 @@ return this.error(oe.EXPECT_ARGUMENT_TYPE,Ue(i,a));case"number":case"date":case"
|
|
|
453
453
|
// Parse this range:
|
|
454
454
|
// {name, number, style}
|
|
455
455
|
// ^-------^
|
|
456
|
-
this.bumpSpace();var u=null;if(this.bumpIf(",")){this.bumpSpace();var
|
|
456
|
+
this.bumpSpace();var u=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition();if((b=this.parseSimpleArgStyleIfPossible()).err)return b;if(0===(p=Qe(b.val)).length)return this.error(oe.EXPECT_ARGUMENT_STYLE,Ue(this.clonePosition(),this.clonePosition()));u={style:p,styleLocation:Ue(c,this.clonePosition())}}if((g=this.tryParseArgumentClose(n)).err)return g;var l=Ue(n,this.clonePosition());
|
|
457
457
|
// Extract style or skeleton
|
|
458
458
|
if(u&&Ke(null==u?void 0:u.style,"::",0)){
|
|
459
459
|
// Skeleton starts with `::`.
|
|
460
|
-
var h=qe(u.style.slice(2));if("number"===s)return(b=this.parseNumberSkeletonFromString(h,u.styleLocation)).err?b:{val:{type:ie.number,value:r,location:
|
|
460
|
+
var h=qe(u.style.slice(2));if("number"===s)return(b=this.parseNumberSkeletonFromString(h,u.styleLocation)).err?b:{val:{type:ie.number,value:r,location:l,style:b.val},err:null};if(0===h.length)return this.error(oe.EXPECT_DATE_TIME_SKELETON,l);var f=h;
|
|
461
461
|
// Get "best match" pattern only if locale is passed, if not, let it
|
|
462
462
|
// pass as-is where `parseDateTimeSkeleton()` will throw an error
|
|
463
463
|
// for unsupported patterns.
|
|
464
|
-
this.locale&&(f=function(t,e){for(var r="",n=0;n<t.length;n++){var o=t.charAt(n);if("j"===o){for(var i=0;n+1<t.length&&t.charAt(n+1)===o;)i++,n++;var s=1+(1&i),a=i<2?1:3+(i>>1),u=Ne(e);for("H"!=u&&"k"!=u||(a=0);a-- >0;)r+="a";for(;s-- >0;)r=u+r}else r+="J"===o?"H":o}return r}(h,this.locale));var p={type:se.dateTime,pattern:f,location:u.styleLocation,parsedOptions:this.shouldParseSkeletons?we(f):{}};return{val:{type:"date"===s?ie.date:ie.time,value:r,location:
|
|
464
|
+
this.locale&&(f=function(t,e){for(var r="",n=0;n<t.length;n++){var o=t.charAt(n);if("j"===o){for(var i=0;n+1<t.length&&t.charAt(n+1)===o;)i++,n++;var s=1+(1&i),a=i<2?1:3+(i>>1),u=Ne(e);for("H"!=u&&"k"!=u||(a=0);a-- >0;)r+="a";for(;s-- >0;)r=u+r}else r+="J"===o?"H":o}return r}(h,this.locale));var p={type:se.dateTime,pattern:f,location:u.styleLocation,parsedOptions:this.shouldParseSkeletons?we(f):{}};return{val:{type:"date"===s?ie.date:ie.time,value:r,location:l,style:p},err:null}}
|
|
465
465
|
// Regular style or no style.
|
|
466
|
-
return{val:{type:"number"===s?ie.number:"date"===s?ie.date:ie.time,value:r,location:
|
|
466
|
+
return{val:{type:"number"===s?ie.number:"date"===s?ie.date:ie.time,value:r,location:l,style:null!==(o=null==u?void 0:u.style)&&void 0!==o?o:null},err:null};case"plural":case"selectordinal":case"select":
|
|
467
467
|
// Parse this range:
|
|
468
468
|
// {name, plural, options}
|
|
469
469
|
// ^---------^
|
|
@@ -487,7 +487,7 @@ t.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,e=this.clonePos
|
|
|
487
487
|
// Find the end of the quoted literal text.
|
|
488
488
|
this.bump();var r=this.clonePosition();if(!this.bumpUntil("'"))return this.error(oe.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Ue(r,this.clonePosition()));this.bump();break;case 123/* `{` */:t+=1,this.bump();break;case 125/* `}` */:if(!(t>0))return{val:this.message.slice(e.offset,this.offset()),err:null};t-=1;break;default:this.bump()}}return{val:this.message.slice(e.offset,this.offset()),err:null}},t.prototype.parseNumberSkeletonFromString=function(t,e){var r=[];try{r=function(t){if(0===t.length)throw new Error("Number skeleton cannot be empty");
|
|
489
489
|
// Parse the skeleton
|
|
490
|
-
for(var e=t.split(Te).filter((function(t){return t.length>0})),r=[],n=0,o=e;n<o.length;n++){var i=o[n].split("/");if(0===i.length)throw new Error("Invalid number skeleton");for(var s=i[0],a=i.slice(1),u=0,
|
|
490
|
+
for(var e=t.split(Te).filter((function(t){return t.length>0})),r=[],n=0,o=e;n<o.length;n++){var i=o[n].split("/");if(0===i.length)throw new Error("Invalid number skeleton");for(var s=i[0],a=i.slice(1),u=0,c=a;u<c.length;u++)if(0===c[u].length)throw new Error("Invalid number skeleton");r.push({stem:s,options:a})}return r}(t)}catch(t){return this.error(oe.INVALID_NUMBER_SKELETON,e)}return{val:{type:se.number,tokens:r,location:e,parsedOptions:this.shouldParseSkeletons?Ce(r):{}},err:null}},
|
|
491
491
|
/**
|
|
492
492
|
* @param nesting_level The current nesting level of messages.
|
|
493
493
|
* This can be positive when parsing message fragment in select or plural argument options.
|
|
@@ -502,11 +502,11 @@ t.prototype.tryParsePluralOrSelectOptions=function(t,e,r,n){
|
|
|
502
502
|
// Parse:
|
|
503
503
|
// one {one apple}
|
|
504
504
|
// ^--^
|
|
505
|
-
for(var o,i=!1,s=[],a=new Set,u=n.value,
|
|
505
|
+
for(var o,i=!1,s=[],a=new Set,u=n.value,c=n.location;;){if(0===u.length){var l=this.clonePosition();if("select"===e||!this.bumpIf("="))break;
|
|
506
506
|
// Try parse `={number}` selector
|
|
507
|
-
var h=this.tryParseDecimalInteger(oe.EXPECT_PLURAL_ARGUMENT_SELECTOR,oe.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;
|
|
507
|
+
var h=this.tryParseDecimalInteger(oe.EXPECT_PLURAL_ARGUMENT_SELECTOR,oe.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;c=Ue(l,this.clonePosition()),u=this.message.slice(l.offset,this.offset())}
|
|
508
508
|
// Duplicate selector clauses
|
|
509
|
-
if(a.has(u))return this.error("select"===e?oe.DUPLICATE_SELECT_ARGUMENT_SELECTOR:oe.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,
|
|
509
|
+
if(a.has(u))return this.error("select"===e?oe.DUPLICATE_SELECT_ARGUMENT_SELECTOR:oe.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,c);"other"===u&&(i=!0),
|
|
510
510
|
// Parse:
|
|
511
511
|
// one {one apple}
|
|
512
512
|
// ^----------^
|
|
@@ -514,7 +514,7 @@ this.bumpSpace();var f=this.clonePosition();if(!this.bumpIf("{"))return this.err
|
|
|
514
514
|
// Keep track of the existing selectors
|
|
515
515
|
a.add(u),
|
|
516
516
|
// Prep next selector clause.
|
|
517
|
-
this.bumpSpace(),u=(o=this.parseIdentifierIfPossible()).value,
|
|
517
|
+
this.bumpSpace(),u=(o=this.parseIdentifierIfPossible()).value,c=o.location}return 0===s.length?this.error("select"===e?oe.EXPECT_SELECT_ARGUMENT_SELECTOR:oe.EXPECT_PLURAL_ARGUMENT_SELECTOR,Ue(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!i?this.error(oe.MISSING_OTHER_CLAUSE,Ue(this.clonePosition(),this.clonePosition())):{val:s,err:null}},t.prototype.tryParseDecimalInteger=function(t,e){var r=1,n=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-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=Ue(n,this.clonePosition());return o?Xe(i*=r)?{val:i,err:null}:this.error(e,a):this.error(t,a)},t.prototype.offset=function(){return this.position.offset},t.prototype.isEOF=function(){return this.offset()===this.message.length},t.prototype.clonePosition=function(){
|
|
518
518
|
// This is much faster than `Object.assign` or spread.
|
|
519
519
|
return{offset:this.position.offset,line:this.position.line,column:this.position.column}},
|
|
520
520
|
/**
|
|
@@ -570,11 +570,11 @@ n.originalMessage=r.err.message,n}return(null==e?void 0:e.captureLocation)||ar(r
|
|
|
570
570
|
|
|
571
571
|
// Main
|
|
572
572
|
|
|
573
|
-
function
|
|
573
|
+
function cr(t,e){var r=e&&e.cache?e.cache:br,n=e&&e.serializer?e.serializer:dr;return(e&&e.strategy?e.strategy:pr)(t,{cache:r,serializer:n})}
|
|
574
574
|
|
|
575
575
|
// Strategy
|
|
576
576
|
|
|
577
|
-
function
|
|
577
|
+
function lr(t,e,r,n){var o,i=null==(o=n)||"number"==typeof o||"boolean"==typeof o?n:r(n),s=e.get(i);return void 0===s&&(s=t.call(this,n),e.set(i,s)),s}function hr(t,e,r){var n=Array.prototype.slice.call(arguments,3),o=r(n),i=e.get(o);return void 0===i&&(i=t.apply(this,n),e.set(o,i)),i}function fr(t,e,r,n,o){return r.bind(e,t,n,o)}function pr(t,e){return fr(t,this,1===t.length?lr:hr,e.cache.create(),e.serializer)}
|
|
578
578
|
// Serializer
|
|
579
579
|
var dr=function(){return JSON.stringify(arguments)};
|
|
580
580
|
|
|
@@ -582,7 +582,7 @@ var dr=function(){return JSON.stringify(arguments)};
|
|
|
582
582
|
|
|
583
583
|
function mr(){this.cache=Object.create(null)}mr.prototype.get=function(t){return this.cache[t]},mr.prototype.set=function(t,e){this.cache[t]=e};var yr,br={create:function(){
|
|
584
584
|
// @ts-ignore
|
|
585
|
-
return new mr}},gr={variadic:function(t,e){return fr(t,this,hr,e.cache.create(),e.serializer)},monadic:function(t,e){return fr(t,this,
|
|
585
|
+
return new mr}},gr={variadic:function(t,e){return fr(t,this,hr,e.cache.create(),e.serializer)},monadic:function(t,e){return fr(t,this,lr,e.cache.create(),e.serializer)}};!function(t){
|
|
586
586
|
// When we have a placeholder but no value to format
|
|
587
587
|
t.MISSING_VALUE="MISSING_VALUE",
|
|
588
588
|
// When value supplied is invalid
|
|
@@ -594,18 +594,18 @@ function Ar(t,e,r,n,o,i,
|
|
|
594
594
|
// For debugging
|
|
595
595
|
s){
|
|
596
596
|
// Hot path for straight simple msg translations
|
|
597
|
-
if(1===t.length&&
|
|
597
|
+
if(1===t.length&&ce(t[0]))return[{type:vr.literal,value:t[0].value}];for(var a=[],u=0,c=t;u<c.length;u++){var l=c[u];
|
|
598
598
|
// Exit early for string parts.
|
|
599
|
-
if(
|
|
599
|
+
if(ce(l))a.push({type:vr.literal,value:l.value});else
|
|
600
600
|
// TODO: should this part be literal type?
|
|
601
601
|
// Replace `#` in plural rules with the actual numeric value.
|
|
602
|
-
if(ye(
|
|
602
|
+
if(ye(l))"number"==typeof i&&a.push({type:vr.literal,value:r.getNumberFormat(e).format(i)});else{var h=l.value;
|
|
603
603
|
// Enforce that all required values are provided by the caller.
|
|
604
|
-
if(!o||!(h in o))throw new Tr(h,s);var f=o[h];if(
|
|
604
|
+
if(!o||!(h in o))throw new Tr(h,s);var f=o[h];if(le(l))f&&"string"!=typeof f&&"number"!=typeof f||(f="string"==typeof f||"number"==typeof f?String(f):""),a.push({type:"string"==typeof f?vr.literal:vr.object,value:f});else
|
|
605
605
|
// Recursively format plural and select parts' option — which can be a
|
|
606
606
|
// nested pattern structure. The choosing of the option to use is
|
|
607
607
|
// abstracted-by and delegated-to the part helper object.
|
|
608
|
-
if(fe(
|
|
608
|
+
if(fe(l)){var p="string"==typeof l.style?n.date[l.style]:ve(l.style)?l.style.parsedOptions:void 0;a.push({type:vr.literal,value:r.getDateTimeFormat(e,p).format(f)})}else if(pe(l)){p="string"==typeof l.style?n.time[l.style]:ve(l.style)?l.style.parsedOptions:n.time.medium;a.push({type:vr.literal,value:r.getDateTimeFormat(e,p).format(f)})}else if(he(l)){(p="string"==typeof l.style?n.number[l.style]:ge(l.style)?l.style.parsedOptions:void 0)&&p.scale&&(f*=p.scale||1),a.push({type:vr.literal,value:r.getNumberFormat(e,p).format(f)})}else{if(be(l)){var d=l.children,m=l.value,y=o[m];if(!Br(y))throw new wr(m,"function",s);var b=y(Ar(d,e,r,n,o,i).map((function(t){return t.value})));Array.isArray(b)||(b=[b]),a.push.apply(a,b.map((function(t){return{type:"string"==typeof t?vr.literal:vr.object,value:t}})))}if(de(l)){if(!(g=l.options[f]||l.options.other))throw new _r(l.value,f,Object.keys(l.options),s);a.push.apply(a,Ar(g.value,e,r,n,o))}else if(me(l)){var g;if(!(g=l.options["=".concat(f)])){if(!Intl.PluralRules)throw new Er('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',yr.MISSING_INTL_API,s);var v=r.getPluralRules(e,{type:l.pluralType}).select(f-(l.offset||0));g=l.options[v]||l.options.other}if(!g)throw new _r(l.value,f,Object.keys(l.options),s);a.push.apply(a,Ar(g.value,e,r,n,o,f-(l.offset||0)))}else;}}}return function(t){return t.length<2?t:t.reduce((function(t,e){var r=t[t.length-1];return r&&r.type===vr.literal&&e.type===vr.literal?r.value+=e.value:t.push(e),t}),[])}(a)}
|
|
609
609
|
/*
|
|
610
610
|
Copyright (c) 2014, Yahoo! Inc. All rights reserved.
|
|
611
611
|
Copyrights licensed under the New BSD License.
|
|
@@ -621,7 +621,7 @@ this.locales=r,this.resolvedLocale=t.resolveLocale(r),"string"==typeof e){if(thi
|
|
|
621
621
|
this.ast=t.__parse(e,{ignoreTag:null==o?void 0:o.ignoreTag,locale:this.resolvedLocale})}else this.ast=e;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");
|
|
622
622
|
// Creates a new object with the specified `formats` merged with the default
|
|
623
623
|
// formats.
|
|
624
|
-
this.formats=Hr(t.formats,n),this.formatters=o&&o.formatters||(void 0===(i=this.formatterCache)&&(i={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:
|
|
624
|
+
this.formats=Hr(t.formats,n),this.formatters=o&&o.formatters||(void 0===(i=this.formatterCache)&&(i={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:cr((function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,ue([void 0],e,!1)))}),{cache:Sr(i.number),strategy:gr.variadic}),getDateTimeFormat:cr((function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,ue([void 0],e,!1)))}),{cache:Sr(i.dateTime),strategy:gr.variadic}),getPluralRules:cr((function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,ue([void 0],e,!1)))}),{cache:Sr(i.pluralRules),strategy:gr.variadic})})}return Object.defineProperty(t,"defaultLocale",{get:function(){return t.memoizedDefaultLocale||(t.memoizedDefaultLocale=(new Intl.NumberFormat).resolvedOptions().locale),t.memoizedDefaultLocale},enumerable:!1,configurable:!0}),t.memoizedDefaultLocale=null,t.resolveLocale=function(t){var e=Intl.NumberFormat.supportedLocalesOf(t);return e.length>0?new Intl.Locale(e[0]):new Intl.Locale("string"==typeof t?t:t[0])},t.__parse=ur,
|
|
625
625
|
// Default format options used as the prototype of the `formats` provided to the
|
|
626
626
|
// constructor. These are used when constructing the internal Intl.NumberFormat
|
|
627
627
|
// and Intl.DateTimeFormat instances.
|
|
@@ -630,25 +630,25 @@ t.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"}
|
|
|
630
630
|
Copyright (c) 2014, Yahoo! Inc. All rights reserved.
|
|
631
631
|
Copyrights licensed under the New BSD License.
|
|
632
632
|
See the accompanying LICENSE file for terms.
|
|
633
|
-
*/const Lr={},
|
|
633
|
+
*/const Lr={},Or=(t,e,r)=>r?(e in Lr||(Lr[e]={}),t in Lr[e]||(Lr[e][t]=r),r):r,Cr=(t,e)=>{if(null==e)return;if(e in Lr&&t in Lr[e])return Lr[e][t];const r=Yr(e);for(let n=0;n<r.length;n++){const o=Mr(r[n],t);if(o)return Or(t,e,o)}};let xr;const Ir=Xt({});function Nr(t){return t in xr}function Mr(t,e){if(!Nr(t))return null;const r=function(t){return xr[t]||null}(t);return function(t,e){if(null==e)return;if(e in t)return t[e];const r=e.split(".");let n=t;for(let t=0;t<r.length;t++)if("object"==typeof n){if(t>0){const e=r.slice(t,r.length).join(".");if(e in n){n=n[e];break}}n=n[r[t]]}else n=void 0;return n}(r,e)}function Gr(t,...e){delete Lr[t],Ir.update((r=>(r[t]=ee.all([r[t]||{},...e]),r)))}zt([Ir],(([t])=>Object.keys(t))),Ir.subscribe((t=>xr=t));const Ur={};function Dr(t){return Ur[t]}function Fr(t){return null!=t&&Yr(t).some((t=>{var e;return null===(e=Dr(t))||void 0===e?void 0:e.size}))}const kr={};function $r(t){if(!Fr(t))return t in kr?kr[t]:Promise.resolve();const e=function(t){return Yr(t).map((t=>{const e=Dr(t);return[t,e?[...e]:[]]})).filter((([,t])=>t.length>0))}(t);return kr[t]=Promise.all(e.map((([t,e])=>function(t,e){const r=Promise.all(e.map((e=>(function(t,e){Ur[t].delete(e),0===Ur[t].size&&delete Ur[t]}(t,e),e().then((t=>t.default||t))))));return r.then((e=>Gr(t,...e)))}(t,e)))).then((()=>{if(Fr(t))return $r(t);delete kr[t]})),kr[t]}const jr={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 Vr(){return jr}const Xr=Xt(!1);let zr;const Wr=Xt(null);function Kr(t){return t.split("-").map(((t,e,r)=>r.slice(0,e+1).join("-"))).reverse()}function Yr(t,e=Vr().fallbackLocale){const r=Kr(t);return e?[...new Set([...r,...Kr(e)])]:r}function Zr(){return null!=zr?zr:void 0}Wr.subscribe((t=>{zr=null!=t?t:void 0,"undefined"!=typeof window&&null!=t&&document.documentElement.setAttribute("lang",t)}));const Jr={...Wr,set:t=>{if(t&&function(t){if(null==t)return;const e=Yr(t);for(let t=0;t<e.length;t++){const r=e[t];if(Nr(r))return r}}(t)&&Fr(t)){const{loadingDelay:e}=Vr();let r;return"undefined"!=typeof window&&null!=Zr()&&e?r=window.setTimeout((()=>Xr.set(!0)),e):Xr.set(!0),$r(t).then((()=>{Wr.set(t)})).finally((()=>{clearTimeout(r),Xr.set(!1)}))}return Wr.set(t)}},qr=t=>{const e=Object.create(null);return r=>{const n=JSON.stringify(r);return n in e?e[n]:e[n]=t(r)}},Qr=(t,e)=>{const{formats:r}=Vr();if(t in r&&e in r[t])return r[t][e];throw new Error(`[svelte-i18n] Unknown "${e}" ${t} format.`)},tn=qr((({locale:t,format:e,...r})=>{if(null==t)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return e&&(r=Qr("number",e)),new Intl.NumberFormat(t,r)})),en=qr((({locale:t,format:e,...r})=>{if(null==t)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return e?r=Qr("date",e):0===Object.keys(r).length&&(r=Qr("date","short")),new Intl.DateTimeFormat(t,r)})),rn=qr((({locale:t,format:e,...r})=>{if(null==t)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return e?r=Qr("time",e):0===Object.keys(r).length&&(r=Qr("time","short")),new Intl.DateTimeFormat(t,r)})),nn=qr(((t,e=Zr())=>new Rr(t,e,Vr().formats,{ignoreTag:Vr().ignoreTag}))),on=(t,e={})=>{var r,n,o,i;let s=e;"object"==typeof t&&(s=t,t=s.id);const{values:a,locale:u=Zr(),default:c}=s;if(null==u)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let l=Cr(t,u);if(l){if("string"!=typeof l)return console.warn(`[svelte-i18n] Message with id "${t}" must be of type "string", found: "${typeof l}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),l}else l=null!==(i=null!==(o=null===(n=(r=Vr()).handleMissingMessage)||void 0===n?void 0:n.call(r,{locale:u,id:t,defaultValue:c}))&&void 0!==o?o:c)&&void 0!==i?i:t;if(!a)return l;let h=l;try{h=nn(l,u).format(a)}catch(e){e instanceof Error&&console.warn(`[svelte-i18n] Message "${t}" has syntax error:`,e.message)}return h},sn=(t,e)=>(({locale:t=Zr(),...e}={})=>rn({locale:t,...e}))(e).format(t),an=(t,e)=>(({locale:t=Zr(),...e}={})=>en({locale:t,...e}))(e).format(t),un=(t,e)=>(({locale:t=Zr(),...e}={})=>tn({locale:t,...e}))(e).format(t),cn=(t,e=Zr())=>Cr(t,e),ln=zt([Jr,Ir],(()=>on));zt([Jr],(()=>sn)),zt([Jr],(()=>an)),zt([Jr],(()=>un)),zt([Jr,Ir],(()=>cn)),window.emWidgets={topic:(t,e=0)=>{if(-1==$t.indexOf(t)){let r=new kt(e);jt[t]=r,$t.push(t)}return jt[t]}};function hn(t,e){Gr(t,e)}const fn={en:{playRandomGame:"Play a random game",randomGameLoading:"Selecting ...",playNowRandomGame:"Play Now"},"zh-hk":{playRandomGame:"玩隨機遊戲",randomGameLoading:"選擇...",playNowRandomGame:"現在播放"},de:{playRandomGame:"Spiel ein Zufallsspiel",randomGameLoading:"Auswahl läuft",playNowRandomGame:"Jetzt spielen"},fr:{playRandomGame:"Jouer à un jeu aléatoire",randomGameLoading:"Sélectinner ...",playNowRandomGame:"Jouer maintenant"},ro:{playRandomGame:"Joaca-te un joc aleatoriu",randomGameLoading:"Se selecteaza ...",playNowRandomGame:"Joaca-te Acum"},tr:{playRandomGame:"Rastgele Bir Oyun Oyna",randomGameLoading:"Oyun Seçiliyor",playNowRandomGame:"Şimdi Oyna"},es:{playRandomGame:"Juego aleatorio",randomGameLoading:"Seleccionando…",playNowRandomGame:"Juega Ya"},pt:{playRandomGame:"Jogue um jogo aleatório",randomGameLoading:"Selecionando ...",playNowRandomGame:"Jogue agora"}};
|
|
634
634
|
/* src/CasinoRandomGame.svelte generated by Svelte v3.59.2 */function pn(t,e,r){const n=t.slice();return n[35]=e[r],n[37]=r,n}
|
|
635
635
|
// (143:4) {#if show}
|
|
636
|
-
function dn(t){let e,r,n,o,i,s,a,u=!/*slotDone*/t[7]&&mn(t),
|
|
636
|
+
function dn(t){let e,r,n,o,i,s,a,u=!/*slotDone*/t[7]&&mn(t),c=/*slotDone*/t[7]&&bn(t);return{c(){e=p("div"),r=p("div"),n=p("span"),n.innerHTML='<slot name="close"><svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg></slot>',o=m(),u&&u.c(),i=m(),c&&c.c(),b(n,"class","ModalCloseBtn"),b(n,"role","button"),b(r,"class","ModalContainer"),b(e,"class","ModalWindow")},m(f,p){h(f,e,p),l(e,r),l(r,n),l(r,o),u&&u.m(r,null),l(r,i),c&&c.m(r,null),s||(a=y(n,"click",/*closeModal*/t[11]),s=!0)},p(t,e){/*slotDone*/t[7]?u&&(u.d(1),u=null):u?u.p(t,e):(u=mn(t),u.c(),u.m(r,i)),/*slotDone*/t[7]?c?c.p(t,e):(c=bn(t),c.c(),c.m(r,null)):c&&(c.d(1),c=null)},d(t){t&&f(e),u&&u.d(),c&&c.d(),s=!1,a()}}}
|
|
637
637
|
// (152:8) {#if !slotDone}
|
|
638
|
-
function mn(t){let e,r,n,o,i,s,a=/*$_*/t[8]("randomGameLoading")+"",u=/*gamesToShow*/t[4],
|
|
638
|
+
function mn(t){let e,r,n,o,i,s,a=/*$_*/t[8]("randomGameLoading")+"",u=/*gamesToShow*/t[4],c=[];for(let e=0;e<u.length;e+=1)c[e]=yn(pn(t,u,e));return{c(){e=p("div"),r=p("main"),n=p("div");for(let t=0;t<c.length;t+=1)c[t].c();o=m(),i=p("p"),s=d(a),b(n,"class","items"),v(n,"transform","translateY("+/*offset*/t[6]+"px)"),b(r,"class","RandomGamesSliderWrapper"),b(i,"class","RandomGameLoading"),b(e,"class","RandomGameWrapper")},m(t,a){h(t,e,a),l(e,r),l(r,n);for(let t=0;t<c.length;t+=1)c[t]&&c[t].m(n,null);l(e,o),l(e,i),l(i,s)},p(t,e){if(/*gamesToShow*/16&e[0]){let r;for(u=/*gamesToShow*/t[4],r=0;r<u.length;r+=1){const o=pn(t,u,r);c[r]?c[r].p(o,e):(c[r]=yn(o),c[r].c(),c[r].m(n,null))}for(;r<c.length;r+=1)c[r].d(1);c.length=u.length}/*offset*/64&e[0]&&v(n,"transform","translateY("+/*offset*/t[6]+"px)"),/*$_*/256&e[0]&&a!==(a=/*$_*/t[8]("randomGameLoading")+"")&&g(s,a)},d(t){t&&f(e),function(t,e){for(let r=0;r<t.length;r+=1)t[r]&&t[r].d(e)}(c,t)}}}
|
|
639
639
|
// (156:16) {#each gamesToShow as game, i}
|
|
640
|
-
function yn(t){let e,r,n,o,i,s;return{c(){e=p("div"),r=p("img"),s=m(),b(r,"class","RandomGameImage"),
|
|
640
|
+
function yn(t){let e,r,n,o,i,s;return{c(){e=p("div"),r=p("img"),s=m(),b(r,"class","RandomGameImage"),u(r.src,n=/*game*/t[35].thumbnail)||b(r,"src",n),b(r,"alt",o=/*game*/t[35].name),b(r,"title",i=/*game*/t[35].name),b(e,"class","item")},m(t,n){h(t,e,n),l(e,r),l(e,s)},p(t,e){/*gamesToShow*/16&e[0]&&!u(r.src,n=/*game*/t[35].thumbnail)&&b(r,"src",n),/*gamesToShow*/16&e[0]&&o!==(o=/*game*/t[35].name)&&b(r,"alt",o),/*gamesToShow*/16&e[0]&&i!==(i=/*game*/t[35].name)&&b(r,"title",i)},d(t){t&&f(e)}}}
|
|
641
641
|
// (167:8) {#if slotDone}
|
|
642
|
-
function bn(t){let e,r,o,i,s,a,
|
|
642
|
+
function bn(t){let e,r,o,i,s,a,c,v,E,_,w,T,B,A,H,S,P,R,L,O,C=/*randomGame*/t[3].name+"",x=/*randomGame*/t[3].vendor.name+"",I=/*$_*/t[8]("playNowRandomGame")+"";return{c(){e=p("div"),r=p("div"),o=p("img"),c=m(),v=p("button"),v.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 200 200" style="enable-background:new 0 0 200 200;" xml:space="preserve"><style type="text/css">.st0{fill:var(--emfe-w-button-typography, var(--emfe-w-color-white, #FFFFFF));}\n </style><path class="st0" d="M162.4,161.2C145.3,178.5,122.7,187,100,187c-19.1,0-38.2-6.2-54-18.4l2.2,24c0.4,3.6-2.4,6.9-6,7.3h-0.7 c-3.3,0-6.2-2.7-6.7-6l-3.8-41.1c-0.4-3.6,2.4-6.9,6-7.3l40.9-3.8c3.6-0.4,6.9,2.4,7.3,6c0.4,3.6-2.4,6.9-6,7.3l-26,2.4 c29.3,23.3,72.4,21.6,99.5-5.6c19.8-19.8,26.9-48.7,18.4-75.3c-1.1-3.6,0.9-7.3,4.4-8.4c3.6-1.1,7.3,0.9,8.4,4.4 C194,103.9,185.8,137.9,162.4,161.2L162.4,161.2z M47.1,47.9c27.1-27.1,70.2-29.1,99.5-5.6l-26,2.4c-3.6,0.4-6.4,3.6-6,7.3 c0.2,3.6,3.3,6,6.7,6h0.7l40.9-3.8c3.6-0.4,6.4-3.6,6-7.3l-4-41.1c-0.4-3.6-3.6-6.4-7.3-6c-3.6,0.4-6.4,3.6-6,7.3l2.2,24 C119.3,4.4,69.3,6.8,37.6,38.6C14.2,61.9,6,95.9,15.8,127.2c0.9,2.9,3.6,4.7,6.4,4.7c0.7,0,1.3,0,2-0.2c3.6-1.1,5.6-4.9,4.4-8.4 C20.2,96.6,27.4,67.7,47.1,47.9L47.1,47.9z"></path></svg>',E=m(),_=p("div"),w=p("p"),T=d(C),B=m(),A=p("p"),H=d(x),S=m(),P=p("button"),R=d(I),b(o,"class","RandomGameImage"),u(o.src,i=/*randomGame*/t[3].thumbnail)||b(o,"src",i),b(o,"alt",s=/*randomGame*/t[3].name),b(o,"title",a=/*randomGame*/t[3].name),b(v,"class","RandomTryAgain"),b(r,"class","item"),b(w,"class","RandomGameTitle"),b(A,"class","RandomGameVendor"),b(P,"class","RandomGamePlay"),b(_,"class","RandomGameDetails"),b(e,"class","RandomGameWrapper")},m(n,i){h(n,e,i),l(e,r),l(r,o),l(r,c),l(r,v),l(e,E),l(e,_),l(_,w),l(w,T),l(_,B),l(_,A),l(A,H),l(_,S),l(_,P),l(P,R),L||(O=[y(v,"click",/*click_handler*/t[20]),y(P,"click",/*click_handler_1*/t[21])],L=!0)},p(t,e){/*randomGame*/8&e[0]&&!u(o.src,i=/*randomGame*/t[3].thumbnail)&&b(o,"src",i),/*randomGame*/8&e[0]&&s!==(s=/*randomGame*/t[3].name)&&b(o,"alt",s),/*randomGame*/8&e[0]&&a!==(a=/*randomGame*/t[3].name)&&b(o,"title",a),/*randomGame*/8&e[0]&&C!==(C=/*randomGame*/t[3].name+"")&&g(T,C),/*randomGame*/8&e[0]&&x!==(x=/*randomGame*/t[3].vendor.name+"")&&g(H,x),/*$_*/256&e[0]&&I!==(I=/*$_*/t[8]("playNowRandomGame")+"")&&g(R,I)},d(t){t&&f(e),L=!1,n(O)}}}
|
|
643
643
|
// (195:30)
|
|
644
|
-
function gn(t){let e,r,n=/*$_*/t[8]("playRandomGame")+"";return{c(){e=p("span"),r=d(n),b(e,"class","RandomButtonText")
|
|
644
|
+
function gn(t){let e,r,n=/*$_*/t[8]("playRandomGame")+"";return{c(){e=p("span"),r=d(n),b(e,"class","RandomButtonText")},m(t,n){h(t,e,n),l(e,r)},p(t,e){/*$_*/256&e[0]&&n!==(n=/*$_*/t[8]("playRandomGame")+"")&&g(r,n)},d(t){t&&f(e)}}}
|
|
645
645
|
// (193:8) {#if buttontext}
|
|
646
|
-
function vn(t){let e,r;return{c(){e=p("span"),r=d(/*buttontext*/t[1]),b(e,"class","RandomButtonText")},m(t,n){h(t,e,n),
|
|
647
|
-
return t[1]?vn:/*buttontext*/t[1]?void 0:gn}let v=g(e),E=v&&v(e);return{c(){r=p("div"),d&&d.c(),n=m(),o=p("div"),i=p("button"),E&&E.c(),s=m(),a=p("span"),this.c=t,b(a,"class","RandomButtonIcon"),b(
|
|
648
|
-
/*div1_binding*/e[23](r),u||(
|
|
649
|
-
/*div1_binding*/,e[23](null),u=!1,
|
|
646
|
+
function vn(t){let e,r;return{c(){e=p("span"),r=d(/*buttontext*/t[1]),b(e,"class","RandomButtonText")},m(t,n){h(t,e,n),l(e,r)},p(t,e){/*buttontext*/2&e[0]&&g(r,/*buttontext*/t[1])},d(t){t&&f(e)}}}function En(e){let r,n,o,i,s,a,u,c,d=/*show*/e[5]&&dn(e);function g(t,e){/*buttontext*/
|
|
647
|
+
return t[1]?vn:/*buttontext*/t[1]?void 0:gn}let v=g(e),E=v&&v(e);return{c(){r=p("div"),d&&d.c(),n=m(),o=p("div"),i=p("button"),E&&E.c(),s=m(),a=p("span"),this.c=t,b(a,"class","RandomButtonIcon"),b(i,"class","RandomButton"),b(o,"class","RandomButtonWrapper"),b(r,"part","CustomStylingContainer")},m(t,f){h(t,r,f),d&&d.m(r,null),l(r,n),l(r,o),l(o,i),E&&E.m(i,null),l(i,s),l(i,a),a.innerHTML=/*randombuttonicon*/e[0],
|
|
648
|
+
/*div1_binding*/e[23](r),u||(c=y(i,"click",/*click_handler_2*/e[22]),u=!0)},p(t,e){/*show*/t[5]?d?d.p(t,e):(d=dn(t),d.c(),d.m(r,n)):d&&(d.d(1),d=null),v===(v=g(t))&&E?E.p(t,e):(E&&E.d(1),E=v&&v(t),E&&(E.c(),E.m(i,s))),/*randombuttonicon*/1&e[0]&&(a.innerHTML=/*randombuttonicon*/t[0])},i:t,o:t,d(t){t&&f(r),d&&d.d(),E&&E.d()
|
|
649
|
+
/*div1_binding*/,e[23](null),u=!1,c()}}}function _n(t,e,r){let n;var o,i;o=ln,i=t=>r(8,n=t),t.$$.on_destroy.push(c(o,i));let s,a,{endpoint:u=""}=e,{datasource:l=""}=e,{gameevent:h=""}=e,{lang:f=""}=e,{randombuttonicon:p=""}=e,{buttontext:d=""}=e,{translationurl:m=""}=e,{clientstyling:y=""}=e,{clientstylingurl:b=""}=e,{filteredrandomgamecategories:g=""}=e,v=[],E="",_=!1,w=0,B=0,A=!1,H=window.navigator.userAgent;!function({withLocale:t,translations:e}){Jr.subscribe((r=>{null==r&&(Ir.set(e),Jr.set(t))}));// maybe we will need this to make sure that the i18n is set up only once
|
|
650
650
|
/*dictionary.set(translations);
|
|
651
|
-
locale.set(_locale);*/}({withLocale:"en",translations:{}});Object.keys(fn).forEach((t=>{hn(t,fn[t])}));const S=()=>{r(4,s=L(s)),r(6,w=0),B=0,r(7,A=!1),r(3,E=v[Math.floor(Math.random()*v.length)]),r(5,_=!0)};let P;const R=t=>{if(g)do{S()}while(!g.includes(E.vendor.name));else S();clearInterval(P),P=setInterval((()=>{r(6,w-=75),B++,20==B&&(r(7,A=!0),clearInterval(P))}),150),t&&"function"==typeof gtag&>ag("event","RefreshRandomGame",{context:"RandomGameWidget",gameId:`${E.gId||E.id}`}),window.postMessage({type:"RandomWidgetState",state:!0},window.location.href)},L=t=>{let e,r=t.length;for(;0!=r;)e=Math.floor(Math.random()*r),r--,[t[r],t[e]]=[t[e],t[r]];return t},
|
|
651
|
+
locale.set(_locale);*/}({withLocale:"en",translations:{}});Object.keys(fn).forEach((t=>{hn(t,fn[t])}));const S=()=>{r(4,s=L(s)),r(6,w=0),B=0,r(7,A=!1),r(3,E=v[Math.floor(Math.random()*v.length)]),r(5,_=!0)};let P;const R=t=>{if(g)do{S()}while(!g.includes(E.vendor.name));else S();clearInterval(P),P=setInterval((()=>{r(6,w-=75),B++,20==B&&(r(7,A=!0),clearInterval(P))}),150),t&&"function"==typeof gtag&>ag("event","RefreshRandomGame",{context:"RandomGameWidget",gameId:`${E.gId||E.id}`}),window.postMessage({type:"RandomWidgetState",state:!0},window.location.href)},L=t=>{let e,r=t.length;for(;0!=r;)e=Math.floor(Math.random()*r),r--,[t[r],t[e]]=[t[e],t[r]];return t},O=()=>{window.postMessage({type:h,gameId:E.gId||E.id},window.location.href),r(5,_=!1),window.postMessage({type:"RandomWidgetState",state:!1},window.location.href),
|
|
652
652
|
//Analytics event
|
|
653
|
-
"function"==typeof gtag&>ag("event","OpenGame",{context:"RandomGameWidget",gameId:`${E.gId||E.id}`})},
|
|
653
|
+
"function"==typeof gtag&>ag("event","OpenGame",{context:"RandomGameWidget",gameId:`${E.gId||E.id}`})},C=()=>{var t;t=f,Jr.set(t)};return t.$$set=t=>{"endpoint"in t&&r(12,u=t.endpoint),"datasource"in t&&r(13,l=t.datasource),"gameevent"in t&&r(14,h=t.gameevent),"lang"in t&&r(15,f=t.lang),"randombuttonicon"in t&&r(0,p=t.randombuttonicon),"buttontext"in t&&r(1,d=t.buttontext),"translationurl"in t&&r(16,m=t.translationurl),"clientstyling"in t&&r(17,y=t.clientstyling),"clientstylingurl"in t&&r(18,b=t.clientstylingurl),"filteredrandomgamecategories"in t&&r(19,g=t.filteredrandomgamecategories)},t.$$.update=()=>{/*lang*/32768&t.$$.dirty[0]&&f&&C(),/*translationurl*/65536&t.$$.dirty[0]&&m&&fetch(m).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{hn(e,t[e])}))})).catch((t=>{console.log(t)})),/*endpoint, datasource*/12288&t.$$.dirty[0]&&u&&l&&(()=>{let t=new URL(`${u}/casino/games`);t.searchParams.append("platform",(t=>t.toLowerCase().match(/android/i)?"Android":t.toLowerCase().match(/iphone/i)?"iPhone":t.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC")(H)),t.searchParams.append("datasource",l),t.searchParams.append("fields","gId,id,href,thumbnail,name,vendor"),t.searchParams.append("expand","vendor"),t.searchParams.append("pagination","offset=0,limit=1000"),fetch(t.href).then((t=>t.json())).then((t=>{v=t.items,r(4,s=v.slice(0,19))}))})(),/*clientstyling, customStylingContainer*/131076&t.$$.dirty[0]&&y&&a&&(()=>{let t=document.createElement("style");t.innerHTML=y,a.appendChild(t)})(),/*clientstylingurl, customStylingContainer*/262148&t.$$.dirty[0]&&b&&a&&(()=>{let t=new URL(b),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{a.appendChild(e)}),1)}))})()},[p,d,a,E,s,_,w,A,n,R,O,()=>{r(5,_=!1),window.postMessage({type:"RandomWidgetState",state:_},window.location.href)},u,l,h,f,m,y,b,g,()=>R(!0),()=>O(),()=>R(),function(t){T[t?"unshift":"push"]((()=>{a=t,r(2,a)}))}]}class wn extends G{constructor(t){super();const e=document.createElement("style");e.textContent="*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.ModalWindow{display:flex;position:fixed;align-items:center;justify-content:center;width:100%;height:100%;z-index:100;top:0;left:0;background-color:rgba(0, 0, 0, 0.9)}.ModalWindow .ModalContainer{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;width:90vw;min-height:380px;max-width:500px;padding:40px 40px 16px 40px;border-top:3px solid var(--emfe-w-color-secondary, var(--emfe-w-color-orange-500, #FD2839));border-radius:5px;position:relative;background:var(--emfe-w-color-white, #FFFFFF)}.ModalWindow .ModalCloseBtn{position:absolute;top:10px;right:10px;border-radius:50%;color:var(--emfe-w-color-secondary, var(--emfe-w-color-orange-500, #FD2839));background:rgba(255, 255, 255, 0.1);cursor:pointer;transition:all 150ms ease-in-out;width:28px;height:28px}.ModalWindow .ModalCloseBtn svg{width:28px;height:28px}.ModalWindow .ModalCloseBtn:hover{background:rgba(255, 255, 255, 0.2)}.ModalWindow .ModalMobileContainer .ModalCloseBtn{margin:10px}.ModalWindow .ModalMobileContainer .ModalCloseBtn svg{width:24px;height:24px}.RandomGameWrapper{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px}.RandomGamesSliderWrapper{height:170px;overflow:hidden;transition:transform 400ms ease-in-out}.items{gap:5px;transition:transform 0.3s ease-in-out;transform:translateY(0px);-webkit-transform-style:preserve-3d;-webkit-backface-visibility:hidden}.RandomGameLoading{padding:30px 0}.RandomGameImage{width:256px;height:170px;border-radius:5px;-webkit-transform-style:preserve-3d;-webkit-backface-visibility:hidden}.RandomTryAgain{position:absolute;bottom:-10px;right:-10px;background:var(--emfe-w-casino-color-primary, var(--emfe-w-color-pink-500, #D0046C));color:var(--emfe-w-color-white, #FFFFFF);display:flex;align-items:center;padding:6px;border:none;border-radius:50%;cursor:pointer}.RandomTryAgain svg{width:22px;height:22px}.item{position:relative;-webkit-backface-visibility:hidden}.RandomGameDetails{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:5px}.RandomGameDetails .RandomGameTitle{font-size:16px;line-height:18px;text-align:center}.RandomGameDetails .RandomGameVendor{font-size:10px;margin-bottom:10px}.RandomGameDetails .RandomGamePlay{background:var(--emfe-w-casino-color-primary, var(--emfe-w-color-pink-500, #D0046C));color:var(--emfe-w-button-typography, var(--emfe-w-color-white, #FFFFFF));border:none;border-radius:5px;width:200px;height:40px;font-size:14px;cursor:pointer}.RandomButtonWrapper{display:flex;justify-content:center;margin-top:30px;width:100%}.RandomButtonWrapper .RandomButton{display:flex;align-items:center;gap:5px;background:var(--emfe-w-casino-color-primary, var(--emfe-w-color-pink-500, #D0046C));color:var(--emfe-w-button-typography, var(--emfe-w-color-white, #FFFFFF));border:none;border-radius:5px;padding:0 30px;height:50px;font-size:16px;cursor:pointer}",this.shadowRoot.appendChild(e),M(this,{target:this.shadowRoot,props:E(this.attributes),customElement:!0},_n,En,i,{endpoint:12,datasource:13,gameevent:14,lang:15,randombuttonicon:0,buttontext:1,translationurl:16,clientstyling:17,clientstylingurl:18,filteredrandomgamecategories:19},null,[-1,-1]),t&&(t.target&&h(t.target,this,t.anchor),t.props&&(this.$set(t.props),O()))}static get observedAttributes(){return["endpoint","datasource","gameevent","lang","randombuttonicon","buttontext","translationurl","clientstyling","clientstylingurl","filteredrandomgamecategories"]}get endpoint(){return this.$$.ctx[12]}set endpoint(t){this.$$set({endpoint:t}),O()}get datasource(){return this.$$.ctx[13]}set datasource(t){this.$$set({datasource:t}),O()}get gameevent(){return this.$$.ctx[14]}set gameevent(t){this.$$set({gameevent:t}),O()}get lang(){return this.$$.ctx[15]}set lang(t){this.$$set({lang:t}),O()}get randombuttonicon(){return this.$$.ctx[0]}set randombuttonicon(t){this.$$set({randombuttonicon:t}),O()}get buttontext(){return this.$$.ctx[1]}set buttontext(t){this.$$set({buttontext:t}),O()}get translationurl(){return this.$$.ctx[16]}set translationurl(t){this.$$set({translationurl:t}),O()}get clientstyling(){return this.$$.ctx[17]}set clientstyling(t){this.$$set({clientstyling:t}),O()}get clientstylingurl(){return this.$$.ctx[18]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),O()}get filteredrandomgamecategories(){return this.$$.ctx[19]}set filteredrandomgamecategories(t){this.$$set({filteredrandomgamecategories:t}),O()}}return!customElements.get("casino-random-game")&&customElements.define("casino-random-game",wn),wn}));
|
|
654
654
|
//# sourceMappingURL=casino-random-game.js.map
|