extra-pool 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/README.md +2 -1
  2. package/lib/index.js.map +1 -0
  3. package/lib/{es2015/instance.d.ts → instance.d.ts} +5 -3
  4. package/lib/{es2018/instance.js → instance.js} +35 -19
  5. package/lib/instance.js.map +1 -0
  6. package/lib/{es2015/pool.d.ts → pool.d.ts} +5 -3
  7. package/lib/{es2018/pool.js → pool.js} +46 -35
  8. package/lib/pool.js.map +1 -0
  9. package/package.json +26 -41
  10. package/src/index.ts +1 -0
  11. package/src/instance.ts +133 -0
  12. package/src/pool.ts +194 -0
  13. package/dist/es2015/index.min.mjs +0 -2
  14. package/dist/es2015/index.min.mjs.map +0 -1
  15. package/dist/es2015/index.mjs +0 -16672
  16. package/dist/es2015/index.mjs.map +0 -1
  17. package/dist/es2015/index.umd.js +0 -16683
  18. package/dist/es2015/index.umd.js.map +0 -1
  19. package/dist/es2015/index.umd.min.js +0 -2
  20. package/dist/es2015/index.umd.min.js.map +0 -1
  21. package/dist/es2018/index.min.mjs +0 -2
  22. package/dist/es2018/index.min.mjs.map +0 -1
  23. package/dist/es2018/index.mjs +0 -16648
  24. package/dist/es2018/index.mjs.map +0 -1
  25. package/dist/es2018/index.umd.js +0 -16659
  26. package/dist/es2018/index.umd.js.map +0 -1
  27. package/dist/es2018/index.umd.min.js +0 -2
  28. package/dist/es2018/index.umd.min.js.map +0 -1
  29. package/lib/es2015/index.js.map +0 -1
  30. package/lib/es2015/instance.js +0 -97
  31. package/lib/es2015/instance.js.map +0 -1
  32. package/lib/es2015/pool.js +0 -129
  33. package/lib/es2015/pool.js.map +0 -1
  34. package/lib/es2018/index.d.ts +0 -1
  35. package/lib/es2018/index.js +0 -18
  36. package/lib/es2018/index.js.map +0 -1
  37. package/lib/es2018/instance.d.ts +0 -19
  38. package/lib/es2018/instance.js.map +0 -1
  39. package/lib/es2018/pool.d.ts +0 -26
  40. package/lib/es2018/pool.js.map +0 -1
  41. /package/lib/{es2015/index.d.ts → index.d.ts} +0 -0
  42. /package/lib/{es2015/index.js → index.js} +0 -0
@@ -1,2 +0,0 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ExtraPool={})}(this,(function(e){"use strict";var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,r)};function r(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}function n(e,t,r,n){return new(r||(r=Promise))((function(i,o){function u(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(u,a)}c((n=n.apply(e,t||[])).next())}))}function i(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function o(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)u.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u}function u(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},c={},s={},l={},f={},d={},v={},h={};h.go=void 0,h.go=function(e){return e()};var p={};p.goMicrotask=void 0,p.goMicrotask=function(e){return new Promise(((t,r)=>{queueMicrotask((async()=>{try{t(await e())}catch(e){r(e)}}))}))};var y={},b={},m={},g={},w={};w.random=void 0,w.random=function(e,t){return Math.random()*(t-e)+e};var O={};O.randomInt=void 0,O.randomInt=function(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e))+e};var S={};S.randomIntInclusive=void 0,S.randomIntInclusive=function(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e},function(e){var t=a&&a.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=a&&a.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};r(w,e),r(O,e),r(S,e)}(g),m.calculateExponentialBackoffTimeout=void 0;const _=g;m.calculateExponentialBackoffTimeout=function({baseTimeout:e,retries:t,maxTimeout:r=1/0,factor:n=2,jitter:i=!0}){const o=Math.min(n**t*e,r);return i?(0,_.randomIntInclusive)(0,o):o};var x={};x.setTimeout=void 0,x.setTimeout=function(e,t){const r=globalThis.setTimeout(t,e);return()=>clearTimeout(r)};var P={setSchedule:void 0};const A=x;P.setSchedule=function(e,t){const r=e-Date.now();return(0,A.setTimeout)(r,t)};var E={};E.setInterval=void 0,E.setInterval=function(e,t){const r=globalThis.setInterval(t,e);return()=>clearInterval(r)};var j={setImmediate:void 0};const T=x;j.setImmediate=function(e){if(globalThis.setImmediate){const t=globalThis.setImmediate(e);return()=>clearImmediate(t)}return(0,T.setTimeout)(0,e)};var I={setTimeoutLoop:void 0};const k=x;I.setTimeoutLoop=function(e,t){let r=!1,n=(0,k.setTimeout)(e,(async function i(){await t(),r||(n=(0,k.setTimeout)(e,i))}));return()=>{r=!0,n()}};var C={setDynamicTimeoutLoop:void 0};const F=x;C.setDynamicTimeoutLoop=function(e,t){let r=!1,n=(0,F.setTimeout)(e,(async function i(){const o=Date.now();await t();const u=Date.now()-o;r||(n=(0,F.setTimeout)(Math.max(e-u,0),i))}));return()=>{r=!0,n()}},function(e){var t=a&&a.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=a&&a.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};r(m,e),r(x,e),r(P,e),r(E,e),r(j,e),r(I,e),r(C,e)}(b),y.goMacrotask=void 0;const N=b;var M;y.goMacrotask=function(e){return new Promise(((t,r)=>{(0,N.setImmediate)((async()=>{try{t(await e())}catch(e){r(e)}}))}))},function(e){var t=a&&a.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=a&&a.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};r(h,e),r(p,e),r(y,e)}(v);var R={},z={},B={};function q(e){return Array.isArray(e)}B.isntEmptyArray=B.isEmptyArray=B.isntArray=B.isArray=void 0,B.isArray=q,B.isntArray=function(e){return!q(e)},B.isEmptyArray=function(e){return 0===e.length},B.isntEmptyArray=function(e){return 0!==e.length};var D={},L={};function U(e){return null===e}L.isntNull=L.isNull=void 0,L.isNull=U,L.isntNull=function(e){return!U(e)};var V={};function W(e){return void 0===e}V.isntUndefined=V.isUndefined=void 0,V.isUndefined=W,V.isntUndefined=function(e){return!W(e)};var J={};function G(e){return"function"==typeof e}J.isntFunction=J.isFunction=void 0,J.isFunction=G,J.isntFunction=function(e){return!G(e)},D.isntAsyncIterable=D.isAsyncIterable=void 0;const K=L,Y=V,Q=J;function $(e){return(0,K.isntNull)(e)&&(0,Y.isntUndefined)(e)&&(0,Q.isFunction)(e[Symbol.asyncIterator])}D.isAsyncIterable=$,D.isntAsyncIterable=function(e){return!$(e)};var H={};function X(e){return"bigint"==typeof e}H.isntBigInt=H.isBigInt=void 0,H.isBigInt=X,H.isntBigInt=function(e){return!X(e)};var Z={};function ee(e){return"boolean"==typeof e}Z.isntBoolean=Z.isBoolean=void 0,Z.isBoolean=ee,Z.isntBoolean=function(e){return!ee(e)};var te={},re={};function ne(e){return"string"==typeof e}re.isntString=re.isString=void 0,re.isString=ne,re.isntString=function(e){return!ne(e)},te.isntChar=te.isChar=void 0;const ie=re;function oe(e){return(0,ie.isString)(e)&&1===e.length}te.isChar=oe,te.isntChar=function(e){return!oe(e)};var ue={};function ae(e){return e instanceof Date}ue.isntDate=ue.isDate=void 0,ue.isDate=ae,ue.isntDate=function(e){return!ae(e)};var ce={};ce.inEnum=void 0,ce.inEnum=function(e,t){return Object.values(t).includes(e)};var se={};function le(e){return e instanceof Error}se.isntError=se.isError=void 0,se.isError=le,se.isntError=function(e){return!le(e)};var fe={};function de(e){return!e}fe.isntFalsy=fe.isFalsy=void 0,fe.isFalsy=de,fe.isntFalsy=function(e){return!de(e)};var ve={};ve.isntIterable=ve.isIterable=void 0;const he=L,pe=V,ye=J;function be(e){return(0,he.isntNull)(e)&&(0,pe.isntUndefined)(e)&&(0,ye.isFunction)(e[Symbol.iterator])}ve.isIterable=be,ve.isntIterable=function(e){return!be(e)};var me={},ge={};function we(e){return"number"==typeof e}function Oe(e){return Number.isNaN(e)}ge.isntNaN=ge.isNaN=ge.isNegativeInfinity=ge.isPositiveInfinity=ge.isFinite=ge.isntNumber=ge.isNumber=void 0,ge.isNumber=we,ge.isntNumber=function(e){return!we(e)},ge.isFinite=function(e){return Number.isFinite(e)},ge.isPositiveInfinity=function(e){return e===1/0},ge.isNegativeInfinity=function(e){return e===-1/0},ge.isNaN=Oe,ge.isntNaN=function(e){return!Oe(e)};var Se={},_e="object"==typeof a&&a&&a.Object===Object&&a,xe="object"==typeof self&&self&&self.Object===Object&&self,Pe=(_e||xe||Function("return this")()).Symbol,Ae=Pe,Ee=Object.prototype,je=Ee.hasOwnProperty,Te=Ee.toString,Ie=Ae?Ae.toStringTag:void 0;var ke=function(e){var t=je.call(e,Ie),r=e[Ie];try{e[Ie]=void 0;var n=!0}catch(e){}var i=Te.call(e);return n&&(t?e[Ie]=r:delete e[Ie]),i},Ce=Object.prototype.toString;var Fe=ke,Ne=function(e){return Ce.call(e)},Me=Pe?Pe.toStringTag:void 0;var Re=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Me&&Me in Object(e)?Fe(e):Ne(e)};var ze=function(e,t){return function(r){return e(t(r))}}(Object.getPrototypeOf,Object);var Be=function(e){return null!=e&&"object"==typeof e},qe=Re,De=ze,Le=Be,Ue=Function.prototype,Ve=Object.prototype,We=Ue.toString,Je=Ve.hasOwnProperty,Ge=We.call(Object);var Ke=function(e){if(!Le(e)||"[object Object]"!=qe(e))return!1;var t=De(e);if(null===t)return!0;var r=Je.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&We.call(r)==Ge},Ye=a&&a.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Se.isntEmptyObject=Se.isEmptyObject=Se.isntPlainObject=Se.isPlainObject=Se.isntObject=Se.isObject=void 0;const Qe=Ye(Ke);function $e(e){return null!==e&&"object"==typeof e}function He(e){return(0,Qe.default)(e)}Se.isObject=$e,Se.isntObject=function(e){return!$e(e)},Se.isPlainObject=He,Se.isntPlainObject=function(e){return!He(e)},Se.isEmptyObject=function(e){return 0===Object.keys(e).length},Se.isntEmptyObject=function(e){return 0!==Object.keys(e).length},me.isntJsonable=me.isJsonable=me.isntJson=me.isJson=void 0;const Xe=L,Ze=Z,et=re,tt=ge,rt=B,nt=Se;function it(e){return(0,Xe.isNull)(e)||(0,Ze.isBoolean)(e)||(0,et.isString)(e)||(0,tt.isNumber)(e)||(0,rt.isArray)(e)&&e.every(it)||(0,nt.isPlainObject)(e)&&Object.values(e).every(it)}me.isJson=it,me.isntJson=function(e){return!it(e)},me.isJsonable=function(e){try{return JSON.stringify(e),!0}catch(e){return!1}},me.isntJsonable=function e(t){return!e()};var ot={};ot.isPromiseLike=ot.isntPromiseLike=ot.isntPromise=ot.isPromise=void 0;const ut=Se,at=J;function ct(e){return e instanceof Promise}function st(e){return(0,ut.isObject)(e)&&(0,at.isFunction)(e.then)}ot.isPromise=ct,ot.isntPromise=function(e){return!ct(e)},ot.isntPromiseLike=function(e){return!st(e)},ot.isPromiseLike=st;var lt={};lt.isAbsoluteURL=void 0,lt.isAbsoluteURL=function(e){try{return new URL(e),!0}catch(e){return!1}};var ft={};function dt(e){return e instanceof RegExp}ft.isntRegExp=ft.isRegExp=void 0,ft.isRegExp=dt,ft.isntRegExp=function(e){return!dt(e)};var vt={};function ht(e){return"symbol"==typeof e}vt.isntSymbol=vt.isSymbol=void 0,vt.isSymbol=ht,vt.isntSymbol=function(e){return!ht(e)},function(e){var t=a&&a.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=a&&a.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};r(B,e),r(D,e),r(H,e),r(Z,e),r(te,e),r(ue,e),r(ce,e),r(se,e),r(fe,e),r(J,e),r(ve,e),r(me,e),r(L,e),r(ge,e),r(Se,e),r(ot,e),r(re,e),r(V,e),r(lt,e),r(ft,e),r(vt,e)}(z),R.chunkByAsync=void 0;const pt=z;R.chunkByAsync=function(e,t){return(0,pt.isAsyncIterable)(e)?async function*(e,t){let r=[],n=0;for await(const i of e)r.push(i),await t(i,n)&&(yield r,r=[]),n++;r.length&&(yield r)}(e,t):async function*(e,t){let r=[],n=0;for(const i of e)r.push(i),await t(i,n)&&(yield r,r=[]),n++;r.length&&(yield r)}(e,t)};var yt={};yt.chunkBy=void 0,yt.chunkBy=function*(e,t){let r=[],n=0;for(const i of e)r.push(i),t(i,n)&&(yield r,r=[]),n++;r.length&&(yield r)};var bt,mt={};var gt={concatAsync:void 0};const wt=z,Ot=v;gt.concatAsync=function(e,...t){return(0,Ot.go)((async function*(){for(const r of[e,...t])if((0,wt.isAsyncIterable)(r))for await(const e of r)yield e;else for(const e of r)yield e}))};var St={concat:void 0};const _t=v;St.concat=function(e,...t){return(0,_t.go)((function*(){for(const r of[e,...t])yield*r}))};var xt,Pt={},At={};At.copyIterable=At.copyAsyncIterable=void 0,At.copyAsyncIterable=async function*(e){for await(const t of e)yield t},At.copyIterable=function*(e){for(const t of e)yield t};var Et,jt={};var Tt,It={};var kt={dropUntilAsync:void 0};const Ct=z;kt.dropUntilAsync=function(e,t){return(0,Ct.isAsyncIterable)(e)?async function*(e,t){var r;const n=e[Symbol.asyncIterator]();let i;try{let e,o=0;for(;!(({value:e,done:i}=await n.next()),i||await t(e,o++)););for(;!i;)yield e,({value:e,done:i}=await n.next())}finally{i||await(null===(r=n.return)||void 0===r?void 0:r.call(n))}}(e,t):async function*(e,t){var r;const n=e[Symbol.iterator]();let i;try{let e,o=0;for(;!(({value:e,done:i}=n.next()),i||await t(e,o++)););for(;!i;)yield e,({value:e,done:i}=n.next())}finally{i||null===(r=n.return)||void 0===r||r.call(n)}}(e,t)};var Ft={};Ft.dropUntil=void 0,Ft.dropUntil=function*(e,t){var r;const n=e[Symbol.iterator]();let i;try{let e,o=0;for(;!(({value:e,done:i}=n.next()),i||t(e,o++)););for(;!i;)yield e,({value:e,done:i}=n.next())}finally{i||null===(r=n.return)||void 0===r||r.call(n)}};var Nt,Mt={};var Rt={filterAsync:void 0};const zt=z;Rt.filterAsync=function(e,t){return(0,zt.isAsyncIterable)(e)?async function*(e,t){let r=0;for await(const n of e)await t(n,r)&&(yield n),r++}(e,t):async function*(e,t){let r=0;for(const n of e)await t(n,r)&&(yield n),r++}(e,t)};var Bt={};Bt.filter=void 0,Bt.filter=function*(e,t){let r=0;for(const n of e)t(n,r)&&(yield n),r++};var qt={},Dt={},Lt={flattenByAsync:void 0};const Ut=z;async function*Vt(e,t,r){for(const n of e)Wt(n)&&await t(n,r)?yield*Vt(n,t,r+1):yield n}function Wt(e){return(0,Ut.isIterable)(e)&&(0,Ut.isntChar)(e)}var Jt,Gt;function Kt(){if(Jt)return Dt;Jt=1,Dt.flattenDeepAsync=void 0;const e=Lt,t=ii();return Dt.flattenDeepAsync=function(r,n=1/0){return(0,t.assert)(n===1/0||Number.isInteger(n),"The parameter depth must be an integer"),(0,t.assert)(n>=0,"The parameter depth must be greater than or equal to 0"),(0,e.flattenByAsync)(r,((e,t)=>t<=n))},Dt}Lt.flattenByAsync=function(e,t){return(0,Ut.isAsyncIterable)(e)?async function*(e,t){const r=1;for await(const n of e)Wt(n)&&await t(n,r)?yield*Vt(n,t,r+1):yield n}(e,t):function(e,t){return Vt(e,t,1)}(e,t)};var Yt={flattenBy:void 0};const Qt=z;function*$t(e,t,r){for(const i of e)(0,Qt.isIterable)(n=i)&&(0,Qt.isntChar)(n)&&t(i,r)?yield*$t(i,t,r+1):yield i;var n}Yt.flattenBy=function(e,t){return $t(e,t,1)};var Ht,Xt={};function Zt(){if(Ht)return Xt;Ht=1,Xt.flattenDeep=void 0;const e=Yt,t=ii();return Xt.flattenDeep=function(r,n=1/0){return(0,t.assert)(n===1/0||Number.isInteger(n),"The parameter depth must be an integer"),(0,t.assert)(n>=0,"The parameter depth must be greater than or equal to 0"),(0,e.flattenBy)(r,((e,t)=>t<=n))},Xt}var er,tr={};var rr={mapAsync:void 0};const nr=z;rr.mapAsync=function(e,t){return(0,nr.isAsyncIterable)(e)?async function*(e,t){let r=0;for await(const n of e)yield await t(n,r),r++}(e,t):async function*(e,t){let r=0;for(const n of e)yield await t(n,r),r++}(e,t)};var ir={};ir.map=void 0,ir.map=function*(e,t){let r=0;for(const n of e)yield t(n,r),r++};var or,ur={};function ar(){if(or)return ur;or=1,ur.repeatAsync=void 0;const e=v,t=ii();return ur.repeatAsync=function(r,n){return(0,t.assert)(n===1/0||Number.isInteger(n),"The parameter times must be an integer"),(0,t.assert)(n>=0,"The parameter times must be greater than or equal to 0"),n===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,e.go)((async function*(){const e=[];if(n>0){for await(const t of r)yield t,e.push(t);n--}for(;n>0;)yield*e,n--}))},ur}var cr,sr={};function lr(){if(cr)return sr;cr=1,sr.repeat=void 0;const e=v,t=ii();return sr.repeat=function(r,n){return(0,t.assert)(n===1/0||Number.isInteger(n),"The parameter times must be an integer"),(0,t.assert)(n>=0,"The parameter times must be greater than or equal to 0"),n===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,e.go)((function*(){const e=[];if(n>0){for(const t of r)yield t,e.push(t);n--}for(;n>0;)yield*e,n--}))},sr}var fr,dr={};var vr,hr={};var pr={};pr.splitAsync=void 0,pr.splitAsync=async function*(e,t){let r=[];for await(const n of e)n===t?(yield r,r=[]):r.push(n);yield r};var yr={splitByAsync:void 0};const br=z;yr.splitByAsync=function(e,t){return(0,br.isAsyncIterable)(e)?async function*(e,t){let r=[],n=0;for await(const i of e)await t(i,n)?(yield r,r=[]):r.push(i),n++;yield r}(e,t):async function*(e,t){let r=[],n=0;for(const i of e)await t(i,n)?(yield r,r=[]):r.push(i),n++;yield r}(e,t)};var mr={};mr.splitBy=void 0,mr.splitBy=function*(e,t){let r=[],n=0;for(const i of e)t(i,n)?(yield r,r=[]):r.push(i),n++;yield r};var gr={};gr.split=void 0,gr.split=function*(e,t){let r=[];for(const n of e)n===t?(yield r,r=[]):r.push(n);yield r};var wr,Or={};var Sr,_r={};var xr,Pr={};var Ar={takeUntilAsync:void 0};const Er=z;Ar.takeUntilAsync=function(e,t){return(0,Er.isAsyncIterable)(e)?async function*(e,t){let r=0;for await(const n of e){if(await t(n,r))break;yield n,r++}}(e,t):async function*(e,t){let r=0;for(const n of e){if(await t(n,r))break;yield n,r++}}(e,t)};var jr={};jr.takeUntil=void 0,jr.takeUntil=function*(e,t){let r=0;for(const n of e){if(t(n,r))break;yield n,r++}};var Tr,Ir={};var kr={tapAsync:void 0};const Cr=z;kr.tapAsync=function(e,t){return(0,Cr.isAsyncIterable)(e)?async function*(e,t){let r=0;for await(const n of e)await t(n,r),yield n,r++}(e,t):async function*(e,t){let r=0;for(const n of e)await t(n,r),yield n,r++}(e,t)};var Fr={};Fr.tap=void 0,Fr.tap=function*(e,t){let r=0;for(const n of e)t(n,r),yield n,r++};var Nr={};Nr.toAsyncIterable=void 0,Nr.toAsyncIterable=async function*(e){for(const t of e)yield t};var Mr={};Mr.transformAsync=void 0,Mr.transformAsync=async function*(e,t){yield*t(e)};var Rr={};Rr.transform=void 0,Rr.transform=function*(e,t){yield*t(e)};var zr={};zr.uniqAsync=void 0,zr.uniqAsync=async function*(e){const t=new Set;for await(const r of e)t.has(r)||(yield r,t.add(r))};var Br={uniqByAsync:void 0};const qr=z;Br.uniqByAsync=function(e,t){return(0,qr.isAsyncIterable)(e)?async function*(e,t){const r=new Set;let n=0;for await(const i of e){const e=await t(i,n);r.has(e)||(yield i,r.add(e)),n++}}(e,t):async function*(e,t){const r=new Set;let n=0;for(const i of e){const e=await t(i,n);r.has(e)||(yield i,r.add(e)),n++}}(e,t)};var Dr={};Dr.uniqBy=void 0,Dr.uniqBy=function*(e,t){const r=new Set;let n=0;for(const i of e){const e=t(i,n);r.has(e)||(yield i,r.add(e)),n++}};var Lr={};Lr.uniq=void 0,Lr.uniq=function*(e){const t=new Set;for(const r of e)t.has(r)||(yield r,t.add(r))};var Ur={zipAsync:void 0};const Vr=z;var Wr;!function(e){e[e.Sync=0]="Sync",e[e.Async=1]="Async"}(Wr||(Wr={})),Ur.zipAsync=function(e,...t){return async function*(...e){var t,r,n,i;const o=e.length,u=e.map((e=>(0,Vr.isAsyncIterable)(e)?[Wr.Async,e[Symbol.asyncIterator]()]:[Wr.Sync,e[Symbol.iterator]()])),a=u.map((()=>!1));try{for(;;){const e=new Array(o);for(let t=0;t<o;t++){const[r,n]=u[t];let i;if(i=r===Wr.Async?await n.next():n.next(),i.done)return void(a[t]=!0);e[t]=i.value}yield e}}finally{const e=u.filter(((e,t)=>!a[t]));for(const[o,u]of e)o===Wr.Async?await(null===(r=(t=u).return)||void 0===r?void 0:r.call(t)):null===(i=(n=u).return)||void 0===i||i.call(n)}}(e,...t)};var Jr,Gr={};function Kr(){return Jr||(Jr=1,function(e){var t=a&&a.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=a&&a.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};r(function(){if(M)return d;M=1,d.chunkAsync=void 0;const e=v,t=ii();return d.chunkAsync=function(r,n){return(0,t.assert)(Number.isInteger(n),"The parameter size must be an integer"),(0,t.assert)(n>0,"The parameter size must be greater than 0"),(0,e.go)((async function*(){let e=[];for await(const t of r)e.push(t),e.length>=n&&(yield e,e=[]);e.length&&(yield e)}))},d}(),e),r(R,e),r(yt,e),r(function(){if(bt)return mt;bt=1,mt.chunk=void 0;const e=v,t=ii();return mt.chunk=function(r,n){return(0,t.assert)(Number.isInteger(n),"The parameter size must be an integer"),(0,t.assert)(n>0,"The parameter size must be greater than 0"),(0,e.go)((function*(){let e=[];for(const t of r)e.push(t),e.length>=n&&(yield e,e=[]);e.length&&(yield e)}))},mt}(),e),r(gt,e),r(St,e),r(function(){if(xt)return Pt;xt=1,Pt.dropAsync=void 0;const e=v,t=At,r=ii();return Pt.dropAsync=function(n,i){return(0,r.assert)(Number.isInteger(i),"The parameter count must be an integer"),(0,r.assert)(i>=0,"The parameter count must be greater than or equal to 0"),0===i?(0,t.copyAsyncIterable)(n):(0,e.go)((async function*(){var e;const t=n[Symbol.asyncIterator]();let r;try{let n;for(;({value:n,done:r}=await t.next()),!(r||i<=0);)i--;for(;!r;)yield n,({value:n,done:r}=await t.next())}finally{r||await(null===(e=t.return)||void 0===e?void 0:e.call(t))}}))},Pt}(),e),r(function(){if(Et)return jt;Et=1,jt.dropRightAsync=void 0;const e=v,t=At,r=ii();return jt.dropRightAsync=function(n,i){return(0,r.assert)(Number.isInteger(i),"The parameter count must be an integer"),(0,r.assert)(i>=0,"The parameter count must be greater than or equal to 0"),0===i?(0,t.copyAsyncIterable)(n):(0,e.go)((async function*(){const e=(await async function(e){const t=[];for await(const r of e)t.push(r);return t}(n)).slice(0,-i);for(const t of e)yield t}))},jt}(),e),r(function(){if(Tt)return It;Tt=1,It.dropRight=void 0;const e=v,t=At,r=ii();return It.dropRight=function(n,i){return(0,r.assert)(Number.isInteger(i),"The parameter count must be an integer"),(0,r.assert)(i>=0,"The parameter count must be greater than or equal to 0"),0===i?(0,t.copyIterable)(n):(0,e.go)((function*(){const e=Array.from(n);yield*e.slice(0,-i)}))},It}(),e),r(kt,e),r(Ft,e),r(function(){if(Nt)return Mt;Nt=1,Mt.drop=void 0;const e=v,t=At,r=ii();return Mt.drop=function(n,i){return(0,r.assert)(Number.isInteger(i),"The parameter count must be an integer"),(0,r.assert)(i>=0,"The parameter count must be greater than or equal to 0"),0===i?(0,t.copyIterable)(n):(0,e.go)((function*(){var e;const t=n[Symbol.iterator]();let r;try{let n;for(;({value:n,done:r}=t.next()),!(r||i<=0);)i--;for(;!r;)yield n,({value:n,done:r}=t.next())}finally{r||null===(e=t.return)||void 0===e||e.call(t)}}))},Mt}(),e),r(Rt,e),r(Bt,e),r(function(){if(Gt)return qt;Gt=1,qt.flattenAsync=void 0;const e=Kt();return qt.flattenAsync=function(t){return(0,e.flattenDeepAsync)(t,1)},qt}(),e),r(Lt,e),r(Yt,e),r(Kt(),e),r(Zt(),e),r(function(){if(er)return tr;er=1,tr.flatten=void 0;const e=Zt();return tr.flatten=function(t){return(0,e.flattenDeep)(t,1)},tr}(),e),r(rr,e),r(ir,e),r(ar(),e),r(lr(),e),r(function(){if(fr)return dr;fr=1,dr.sliceAsync=void 0;const e=v,t=ii();return dr.sliceAsync=function(r,n,i=1/0){return(0,t.assert)(Number.isInteger(n),"The parameter start must be an integer"),(0,t.assert)(n>=0,"The parameter start must be greater than or equal to 0"),(0,t.assert)(Number.isInteger(i),"The parameter end must be an integer"),(0,t.assert)(i>=n,"The parameter end must be greater than or equal to start"),(0,e.go)((async function*(){let e=0;for await(const t of r){if(e>=i)break;e>=n&&(yield t),e++}}))},dr}(),e),r(function(){if(vr)return hr;vr=1,hr.slice=void 0;const e=v,t=ii();return hr.slice=function(r,n,i=1/0){return(0,t.assert)(Number.isInteger(n),"The parameter start must be an integer"),(0,t.assert)(n>=0,"The parameter start must be greater than or equal to 0"),(0,t.assert)(Number.isInteger(i),"The parameter end must be an integer"),(0,t.assert)(i>=n,"The parameter end must be greater than or equal to start"),(0,e.go)((function*(){let e=0;for(const t of r){if(e>=i)break;e>=n&&(yield t),e++}}))},hr}(),e),r(pr,e),r(yr,e),r(mr,e),r(gr,e),r(function(){if(wr)return Or;wr=1,Or.takeAsync=void 0;const e=v,t=ii();return Or.takeAsync=function(r,n){return(0,t.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,t.assert)(n>=0,"The parameter count must be greater than or equal to 0"),(0,e.go)((async function*(){if(0!==n)for await(const e of r)if(yield e,0==--n)break}))},Or}(),e),r(function(){if(Sr)return _r;Sr=1,_r.takeRightAsync=void 0;const e=v,t=ii();return _r.takeRightAsync=function(r,n){return(0,t.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,t.assert)(n>=0,"The parameter count must be greater than or equal to 0"),(0,e.go)((async function*(){var e;const t=r[Symbol.asyncIterator]();let i;try{const r=[];let o;for(;({value:o,done:i}=await t.next()),!i;)r.push(o),r.length>n&&r.shift();yield*r}finally{i||await(null===(e=t.return)||void 0===e?void 0:e.call(t))}}))},_r}(),e),r(function(){if(xr)return Pr;xr=1,Pr.takeRight=void 0;const e=v,t=ii();return Pr.takeRight=function(r,n){return(0,t.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,t.assert)(n>=0,"The parameter count must be greater than or equal to 0"),(0,e.go)((function*(){var e;const t=r[Symbol.iterator]();let i;try{const r=[];let o;for(;({value:o,done:i}=t.next()),!i;)r.push(o),r.length>n&&r.shift();yield*r}finally{i||null===(e=t.return)||void 0===e||e.call(t)}}))},Pr}(),e),r(Ar,e),r(jr,e),r(function(){if(Tr)return Ir;Tr=1,Ir.take=void 0;const e=v,t=ii();return Ir.take=function(r,n){return(0,t.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,t.assert)(n>=0,"The parameter count must be greater than or equal to 0"),(0,e.go)((function*(){if(0!==n)for(const e of r)if(yield e,0==--n)break}))},Ir}(),e),r(kr,e),r(Fr,e),r(Nr,e),r(Mr,e),r(Rr,e),r(zr,e),r(Br,e),r(Dr,e),r(Lr,e),r(Ur,e),r(Gr,e)}(f)),f}Gr.zip=void 0,Gr.zip=function(e,...t){return function*(...e){const t=e.length,r=e.map((e=>e[Symbol.iterator]())),n=r.map((()=>!1));try{for(;;){const e=new Array(t);for(let i=0;i<t;i++){const{value:t,done:o}=r[i].next();if(o)return void(n[i]=!0);e[i]=t}yield e}}finally{r.filter(((e,t)=>!n[t])).forEach((e=>{var t;return null===(t=e.return)||void 0===t?void 0:t.call(e)}))}}(e,...t)};var Yr={},Qr={};Qr.consume=void 0,Qr.consume=function(e,t){return t(e)};var $r={eachAsync:void 0};const Hr=z;$r.eachAsync=function(e,t){return(0,Hr.isAsyncIterable)(e)?async function(e,t){let r=0;for await(const n of e)await t(n,r),r++}(e,t):async function(e,t){let r=0;for(const n of e)await t(n,r),r++}(e,t)};var Xr={};Xr.each=void 0,Xr.each=function(e,t){let r=0;for(const n of e)t(n,r),r++};var Zr={everyAsync:void 0};const en=z;Zr.everyAsync=function(e,t){return(0,en.isAsyncIterable)(e)?async function(e,t){let r=0;for await(const n of e){if(!await t(n,r))return!1;r++}return!0}(e,t):async function(e,t){let r=0;for(const n of e){if(!await t(n,r))return!1;r++}return!0}(e,t)};var tn={};tn.every=void 0,tn.every=function(e,t){let r=0;for(const n of e){if(!t(n,r))return!1;r++}return!0};var rn={findAsync:void 0};const nn=z;rn.findAsync=function(e,t){return(0,nn.isAsyncIterable)(e)?async function(e,t){let r=0;for await(const n of e){if(await t(n,r))return n;r++}return}(e,t):async function(e,t){let r=0;for(const n of e){if(await t(n,r))return n;r++}return}(e,t)};var on={};on.find=void 0,on.find=function(e,t){let r=0;for(const n of e){if(t(n,r))return n;r++}};var un={};un.firstAsync=void 0,un.firstAsync=async function(e){for await(const t of e)return t};var an={};an.first=void 0,an.first=function(e){for(const t of e)return t};var cn={};cn.includesAsync=void 0,cn.includesAsync=async function(e,t){for await(const r of e)if(r===t)return!0;return!1};var sn={};sn.includes=void 0,sn.includes=function(e,t){for(const r of e)if(r===t)return!0;return!1};var ln={};ln.matchAsync=void 0,ln.matchAsync=async function(e,t){const r=t.length;let n=0;for await(const i of e)if(i===t[n]&&n++,n===r)return!0;return!1};var fn={};fn.match=void 0,fn.match=function(e,t){const r=t.length;let n=0;for(const i of e)if(i===t[n]&&n++,n===r)return!0;return!1};var dn={reduceAsync:void 0};const vn=z;dn.reduceAsync=function(e,t,r){return(0,vn.isUndefined)(r)?function(e,t){return(0,vn.isAsyncIterable)(e)?r(e):n(e);async function r(e){var r;const n=e[Symbol.asyncIterator]();let i;try{let e,u=await o(n),a=1;for(;({value:e,done:i}=await n.next()),!i;)u=await t(u,e,a++);return u}finally{i||await(null===(r=n.return)||void 0===r?void 0:r.call(n))}async function o(e){const t=await e.next();if(t.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return t.value}}async function n(e){var r;const n=e[Symbol.iterator]();let i;try{let e,u=o(n),a=1;for(;({value:e,done:i}=n.next()),!i;)u=await t(u,e,a++);return u}finally{i||null===(r=n.return)||void 0===r||r.call(n)}function o(e){const t=e.next();if(t.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return t.value}}}(e,t):function(e,t,r){return(0,vn.isAsyncIterable)(e)?i(e):n(e);async function n(e){let n=r,i=0;for(const r of e)n=await t(n,r,i++);return n}async function i(e){let n=r,i=0;for await(const r of e)n=await t(n,r,i++);return n}}(e,t,r)};var hn={reduce:void 0};const pn=z;hn.reduce=function(e,t,r){return(0,pn.isUndefined)(r)?function(e,t){var r;const n=e[Symbol.iterator]();let i;try{let e,u=o(n),a=1;for(;({value:e,done:i}=n.next()),!i;)u=t(u,e,a++);return u}finally{i||null===(r=n.return)||void 0===r||r.call(n)}function o(e){const t=e.next();if(t.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return t.value}}(e,t):function(e,t,r){let n=r,i=0;for(const r of e)n=t(n,r,i++);return n}(e,t,r)};var yn={someAsync:void 0};const bn=z;yn.someAsync=function(e,t){return(0,bn.isAsyncIterable)(e)?async function(e,t){let r=0;for await(const n of e){if(await t(n,r))return!0;r++}return!1}(e,t):async function(e,t){let r=0;for(const n of e){if(await t(n,r))return!0;r++}return!1}(e,t)};var mn={};mn.some=void 0,mn.some=function(e,t){let r=0;for(const n of e){if(t(n,r))return!0;r++}return!1};var gn={};gn.lastAsync=void 0,gn.lastAsync=async function(e){var t;const r=e[Symbol.asyncIterator]();let n;try{let e,i;for(;({value:e,done:n}=await r.next()),!n;)i=e;return i}finally{n||await(null===(t=r.return)||void 0===t?void 0:t.call(r))}};var wn={};wn.last=void 0,wn.last=function(e){var t;const r=e[Symbol.iterator]();let n;try{let e,i;for(;({value:e,done:n}=r.next()),!n;)i=e;return i}finally{n||null===(t=r.return)||void 0===t||t.call(r)}};var On={toArrayAsync:void 0};const Sn=Qr;On.toArrayAsync=function(e){return(0,Sn.consume)(e,(async e=>{const t=[];for await(const r of e)t.push(r);return t}))};var _n={toArray:void 0};const xn=Qr;_n.toArray=function(e){return(0,xn.consume)(e,(e=>Array.from(e)))};var Pn={toSetAsync:void 0};const An=Qr;Pn.toSetAsync=function(e){return(0,An.consume)(e,(async e=>{const t=new Set;for await(const r of e)t.add(r);return t}))};var En={toSet:void 0};const jn=Qr;En.toSet=function(e){return(0,jn.consume)(e,(e=>new Set(e)))};var Tn={};Tn.count=void 0,Tn.count=function(e){let t=0;for(const r of e)t++;return t};var In={};In.countAsync=void 0,In.countAsync=async function(e){let t=0;for await(const r of e)t++;return t};var kn={groupBy:void 0};const Cn=Xr;kn.groupBy=function(e,t){const r=new Map;return(0,Cn.each)(e,((e,n)=>{const i=t(e,n);r.has(i)||r.set(i,[]),r.get(i).push(e)})),r};var Fn={groupByAsync:void 0};const Nn=$r;var Mn;function Rn(){return Mn||(Mn=1,function(e){var t=a&&a.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=a&&a.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};r(Kr(),e),r(Yr,e)}(l)),l}Fn.groupByAsync=async function(e,t){const r=new Map;return await(0,Nn.eachAsync)(e,(async(e,n)=>{const i=await t(e,n);r.has(i)||r.set(i,[]),r.get(i).push(e)})),r},function(e){var t=a&&a.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=a&&a.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};r(Qr,e),r($r,e),r(Xr,e),r(Zr,e),r(tn,e),r(rn,e),r(on,e),r(un,e),r(an,e),r(cn,e),r(sn,e),r(ln,e),r(fn,e),r(dn,e),r(hn,e),r(yn,e),r(mn,e),r(gn,e),r(wn,e),r(On,e),r(_n,e),r(Pn,e),r(En,e),r(Tn,e),r(In,e),r(kn,e),r(Fn,e)}(Yr);var zn={},Bn={};Bn.traverseErrorPrototypeChain=void 0,Bn.traverseErrorPrototypeChain=function*(e){let t=e;for(;(t=Object.getPrototypeOf(t))&&(yield t,t!==Error.prototype););},zn.getErrorNames=void 0;const qn=z,Dn=Bn;zn.getErrorNames=function*(e){var t;if((0,qn.isError)(e))for(const r of(0,Dn.traverseErrorPrototypeChain)(e))(null===(t=r.constructor)||void 0===t?void 0:t.name)&&(yield r.constructor.name);else yield e.name,yield*e.ancestors};var Ln={isSerializableError:void 0};const Un=z;var Vn;function Wn(){if(Vn)return s;Vn=1,s.CustomError=void 0;const e=Rn(),t=zn,r=z,n=Ln;class i extends Error{get name(){var r,n;return null!==(n=null!==(r=(0,e.first)((0,t.getErrorNames)(this)))&&void 0!==r?r:i.name)&&void 0!==n?n:"CustomError"}static[Symbol.hasInstance](i){var o;if((0,r.isError)(i)||(0,n.isSerializableError)(i)){const r=[null!==(o=this.prototype.constructor.name)&&void 0!==o?o:this.name,...(0,t.getErrorNames)(this.prototype)].reverse(),n=(0,e.toArray)((0,t.getErrorNames)(i)).reverse();return r.every(((e,t)=>e===n[t]))}return!1}}return s.CustomError=i,s}Ln.isSerializableError=function(e){return(0,Un.isObject)(e)&&(0,Un.isString)(e.name)&&(0,Un.isString)(e.message)&&((0,Un.isString)(e.stack)||(0,Un.isNull)(e.stack))&&(0,Un.isArray)(e.ancestors)&&e.ancestors.every(Un.isString)};var Jn,Gn={};function Kn(){if(Jn)return Gn;Jn=1,Gn.AssertionError=void 0;const e=Wn();class t extends e.CustomError{}return Gn.AssertionError=t,Gn}var Yn,Qn={};var $n={},Hn={},Xn={};Xn.pass=void 0,Xn.pass=function(){},function(e){var t=a&&a.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]});(a&&a.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)})(Xn,e)}(Hn),$n.hydrate=void 0;const Zn=Hn;function ei(e,t){const r=function(){(0,Zn.pass)()};return(r.prototype=Object.create(e.prototype)).constructor=r,Object.defineProperty(r,"name",{value:t}),r}$n.hydrate=function(e){var t;const r=[e.name,...e.ancestors].slice(0,-1).reverse();let n=Error;for(const e of r)n=ei(n,e);const i=new n;return i.name=e.name,i.message=e.message,i.stack=null!==(t=e.stack)&&void 0!==t?t:void 0,i};var ti,ri,ni={};function ii(){return ri||(ri=1,function(e){var t=a&&a.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=a&&a.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};r(Wn(),e),r(Kn(),e),r(Ln,e),r(function(){if(Yn)return Qn;Yn=1,Qn.normalize=void 0;const e=zn,t=Rn();return Qn.normalize=function(r){var n;const[i,...o]=(0,t.toArray)((0,e.getErrorNames)(r));return{name:i,ancestors:o,message:r.message,stack:null!==(n=r.stack)&&void 0!==n?n:null}},Qn}(),e),r($n,e),r(function(){if(ti)return ni;ti=1,ni.assert=void 0;const e=Kn();return ni.assert=function(t,r){if(!t)throw new e.AssertionError(r)},ni}(),e),r(zn,e),r(Bn,e)}(c)),c}var oi=ii(),ui={},ai={Box:void 0};class ci{constructor(e){this.value=e}get[Symbol.toStringTag](){return this.constructor.name}set(e){this.value=e}get(){return this.value}}ai.Box=ci;var si={};si.convertArrayToCons=si.convertConsToArray=void 0;const li=z;si.convertConsToArray=function e([t,r]){return(0,li.isNull)(r)?[t]:[t,...e(r)]},si.convertArrayToCons=function e([t,...r]){return[t,r.length?e(r):null]};var fi={Emitter:void 0};class di{constructor(){this.map=new Map}get[Symbol.toStringTag](){return this.constructor.name}on(e,t){this.map.has(e)||this.map.set(e,new Set);return this.map.get(e).add(r),()=>{if(!this.map.has(e))return;const t=this.map.get(e);t.delete(r),0===t.size&&this.map.delete(e)};function r(...e){t(...e)}}once(e,t){const r=this.on(e,((...e)=>{t(...e),r()}));return r}emit(e,...t){this.map.has(e)&&this.map.get(e).forEach((e=>e(...t)))}}fi.Emitter=di;var vi={HashMap:void 0};class hi{constructor(e){this.hash=e,this.map=new Map}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.map.size}set(e,t){return this.map.set(this.hash(e),t),this}has(e){return this.map.has(this.hash(e))}get(e){return this.map.get(this.hash(e))}delete(e){return this.map.delete(this.hash(e))}clear(){this.map.clear()}}vi.HashMap=hi;var pi={HashSet:void 0};class yi{constructor(e){this.hash=e,this.map=new Map}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.map.size}[Symbol.iterator](){return this.map.values()}add(e){return this.map.set(this.hash(e),e),this}delete(e){return this.map.delete(this.hash(e))}has(e){return this.map.has(this.hash(e))}clear(){this.map.clear()}values(){return this.map.values()}}pi.HashSet=yi;var bi={Queue:void 0};class mi{constructor(){this.items=[]}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.items.length}empty(){this.items.length=0}enqueue(...e){this.items.push(...e)}dequeue(){return this.items.shift()}remove(e){let t;for(;(t=this.items.indexOf(e))>=0;)this.items.splice(t,1)}}bi.Queue=mi;var gi={LRUMap:void 0};const wi=ii(),Oi=Rn();class Si{constructor(e){this.map=new Map,(0,wi.assert)(Number.isInteger(e),"The parameter limit must be an integer"),(0,wi.assert)(e>0,"The parameter limit must be a positive value"),this.limit=e}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.map.size}set(e,t){return this.map.has(e)?this.updateItem(e,t):(this.map.size===this.limit&&this.map.delete(this.getColdestKey()),this.map.set(e,t)),this}has(e){return this.map.has(e)}get(e){if(!this.has(e))return;const t=this.map.get(e);return this.updateItem(e,t),t}delete(e){return this.map.delete(e)}clear(){this.map.clear()}updateItem(e,t){this.map.delete(e),this.map.set(e,t)}getColdestKey(){return(0,Oi.first)(this.map.keys())}}gi.LRUMap=Si;var _i={ExpirableMap:void 0};const xi=b;class Pi{constructor(){this.map=new Map,this.itemMetadataSortedByExpirationTime=[]}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.map.size}set(e,t,r){return this.map.set(e,t),this.removeItemMetadata(e),this.addItemMetadata(e,Date.now()+r),this}has(e){return this.map.has(e)}get(e){return this.map.get(e)}delete(e){const t=this.map.delete(e);if(t){const t=this.itemMetadataSortedByExpirationTime.findIndex((t=>t.key===e));this.itemMetadataSortedByExpirationTime.splice(t,1),0===t&&this.rescheduleClearTimeout()}return t}clear(){var e;this.map.clear(),null===(e=this.cancelClearTimeout)||void 0===e||e.call(this),this.itemMetadataSortedByExpirationTime=[]}addItemMetadata(e,t){for(let r=0;r<this.itemMetadataSortedByExpirationTime.length;r++){if(t<this.itemMetadataSortedByExpirationTime[r].expirationTime)return this.itemMetadataSortedByExpirationTime.splice(r,0,{key:e,expirationTime:t}),void(0===r&&this.rescheduleClearTimeout())}this.itemMetadataSortedByExpirationTime.push({key:e,expirationTime:t}),1===this.itemMetadataSortedByExpirationTime.length&&this.rescheduleClearTimeout()}removeItemMetadata(e){const t=this.itemMetadataSortedByExpirationTime.findIndex((t=>t.key===e));t>=0&&(this.itemMetadataSortedByExpirationTime.splice(t,1),0===t&&this.rescheduleClearTimeout())}clearExpiredItems(e){const t=this.itemMetadataSortedByExpirationTime.findIndex((t=>t.expirationTime>e));(t>=0?this.itemMetadataSortedByExpirationTime.splice(0,t):this.itemMetadataSortedByExpirationTime.splice(0,this.itemMetadataSortedByExpirationTime.length)).forEach((e=>this.map.delete(e.key)))}rescheduleClearTimeout(){var e;if(null===(e=this.cancelClearTimeout)||void 0===e||e.call(this),this.itemMetadataSortedByExpirationTime.length>0){const e=this.itemMetadataSortedByExpirationTime[0];if(Number.isFinite(e.expirationTime)){const t=(0,xi.setSchedule)(e.expirationTime,(()=>{this.clearExpiredItems(Date.now()),this.rescheduleClearTimeout()}));this.cancelClearTimeout=()=>{t(),this.cancelClearTimeout=void 0}}}}}_i.ExpirableMap=Pi;var Ai={TLRUMap:void 0};const Ei=ii(),ji=Rn(),Ti=b;class Ii{constructor(e){this.map=new Map,this.itemMetadataSortedByExpirationTime=[],(0,Ei.assert)(Number.isInteger(e),"The parameter limit must be an integer"),(0,Ei.assert)(e>0,"The parameter limit must be a positive value"),this.limit=e}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.map.size}set(e,t,r){return this.map.has(e)?(this.updateItem(e,t),this.removeItemMetadata(e),this.addItemMetadata(e,Date.now()+r)):(this.map.size===this.limit&&this.map.delete(this.getColdestKey()),this.map.set(e,t),this.addItemMetadata(e,Date.now()+r)),this}has(e){return this.map.has(e)}get(e){if(this.has(e)){const t=this.map.get(e);return this.updateItem(e,t),t}}delete(e){const t=this.map.delete(e);if(t){const t=this.itemMetadataSortedByExpirationTime.findIndex((t=>t.key===e));this.itemMetadataSortedByExpirationTime.splice(t,1),0===t&&this.rescheduleClearTimeout()}return t}clear(){var e;this.map.clear(),null===(e=this.cancelClearTimeout)||void 0===e||e.call(this),this.itemMetadataSortedByExpirationTime=[]}updateItem(e,t){this.map.delete(e),this.map.set(e,t)}addItemMetadata(e,t){for(let r=0;r<this.itemMetadataSortedByExpirationTime.length;r++){if(t<this.itemMetadataSortedByExpirationTime[r].expirationTime)return this.itemMetadataSortedByExpirationTime.splice(r,0,{key:e,expirationTime:t}),void(0===r&&this.rescheduleClearTimeout())}this.itemMetadataSortedByExpirationTime.push({key:e,expirationTime:t}),1===this.itemMetadataSortedByExpirationTime.length&&this.rescheduleClearTimeout()}removeItemMetadata(e){const t=this.itemMetadataSortedByExpirationTime.findIndex((t=>t.key===e));t>=0&&(this.itemMetadataSortedByExpirationTime.splice(t,1),0===t&&this.rescheduleClearTimeout())}clearExpiredItems(e){const t=this.itemMetadataSortedByExpirationTime.findIndex((t=>t.expirationTime>e));(t>=0?this.itemMetadataSortedByExpirationTime.splice(0,t):this.itemMetadataSortedByExpirationTime.splice(0,this.itemMetadataSortedByExpirationTime.length)).forEach((e=>this.map.delete(e.key)))}rescheduleClearTimeout(){var e;if(null===(e=this.cancelClearTimeout)||void 0===e||e.call(this),this.itemMetadataSortedByExpirationTime.length>0){const e=this.itemMetadataSortedByExpirationTime[0];if(Number.isFinite(e.expirationTime)){const t=(0,Ti.setSchedule)(e.expirationTime,(()=>{this.clearExpiredItems(Date.now()),this.rescheduleClearTimeout()}));this.cancelClearTimeout=()=>{t(),this.cancelClearTimeout=void 0}}}}getColdestKey(){return(0,ji.first)(this.map.keys())}}Ai.TLRUMap=Ii;var ki={TrieMap:void 0};const Ci=Rn(),Fi=z;class Ni{constructor(e){this.value=e,this.children=new Map}}class Mi{constructor(){this.root=new Ni}get[Symbol.toStringTag](){return this.constructor.name}*entries(){yield*function*e(t,r){for(const[n,i]of t.children){const t=[...r,n];(0,Fi.isntUndefined)(i.value)&&(yield[t,i.value]),yield*e(i,t)}}(this.root,[])}keys(){return(0,Ci.map)(this.entries(),(([e])=>e))}values(){return(0,Ci.map)(this.entries(),(([e,t])=>t))}set(e,t){let r=this.root;for(const t of e)r.children.has(t)||r.children.set(t,new Ni),r=r.children.get(t);return r.value=t,this}has(e){let t=this.root;for(const r of e){if(!t.children.has(r))return!1;t=t.children.get(r)}return void 0!==t.value}get(e){let t=this.root;for(const r of e){if(!t.children.has(r))return;t=t.children.get(r)}return t.value}delete(e){const t=[];let r=this.root;for(const n of e){if(!r.children.has(n))return!1;t.push(r),r=r.children.get(n)}if(delete r.value,0===r.children.size)for(const[r,n]of(0,Ci.toArray)((0,Ci.zip)(e,t)).reverse())if(n.children.delete(r),0!==n.children.size)break;return!0}}ki.TrieMap=Mi;var Ri={};Ri.BadEventError=Ri.FiniteStateMachine=void 0;const zi=ii();class Bi{constructor(e,t){this.schema=e,this._state=t}get[Symbol.toStringTag](){return this.constructor.name}get state(){return this._state}matches(e){return this._state===e}can(e){return e in this.schema[this.state]}send(e){if(!this.can(e))throw new qi(this.state,e);this._state=this.schema[this.state][e]}}Ri.FiniteStateMachine=Bi;class qi extends zi.CustomError{constructor(e,t){super(`State ${e} cannot react to event ${t}`)}}Ri.BadEventError=qi;var Di={},Li={},Ui={},Vi={},Wi={};Wi.isFunction=void 0,Wi.isFunction=function(e){return"function"==typeof e};var Ji={},Gi={},Ki={};Ki.createErrorClass=void 0,Ki.createErrorClass=function(e){var t=e((function(e){Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t},Gi.UnsubscriptionError=void 0;var Yi=Ki;Gi.UnsubscriptionError=Yi.createErrorClass((function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}));var Qi={};Qi.arrRemove=void 0,Qi.arrRemove=function(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}};var $i=a&&a.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Hi=a&&a.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)u.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u},Xi=a&&a.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Ji.isSubscription=Ji.EMPTY_SUBSCRIPTION=Ji.Subscription=void 0;var Zi=Wi,eo=Gi,to=Qi,ro=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,r,n,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var u=$i(o),a=u.next();!a.done;a=u.next()){a.value.remove(this)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=u.return)&&t.call(u)}finally{if(e)throw e.error}}else o.remove(this);var c=this.initialTeardown;if(Zi.isFunction(c))try{c()}catch(e){i=e instanceof eo.UnsubscriptionError?e.errors:[e]}var s=this._finalizers;if(s){this._finalizers=null;try{for(var l=$i(s),f=l.next();!f.done;f=l.next()){var d=f.value;try{no(d)}catch(e){i=null!=i?i:[],e instanceof eo.UnsubscriptionError?i=Xi(Xi([],Hi(i)),Hi(e.errors)):i.push(e)}}}catch(e){r={error:e}}finally{try{f&&!f.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}}if(i)throw new eo.UnsubscriptionError(i)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)no(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(r=this._finalizers)&&void 0!==r?r:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&to.arrRemove(t,e)},e.prototype.remove=function(t){var r=this._finalizers;r&&to.arrRemove(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();function no(e){Zi.isFunction(e)?e():e.unsubscribe()}Ji.Subscription=ro,Ji.EMPTY_SUBSCRIPTION=ro.EMPTY,Ji.isSubscription=function(e){return e instanceof ro||e&&"closed"in e&&Zi.isFunction(e.remove)&&Zi.isFunction(e.add)&&Zi.isFunction(e.unsubscribe)};var io={config:void 0};io.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var oo={},uo={};!function(e){var t=a&&a.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)u.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u},r=a&&a.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};e.timeoutProvider=void 0,e.timeoutProvider={setTimeout:function(n,i){for(var o=[],u=2;u<arguments.length;u++)o[u-2]=arguments[u];var a=e.timeoutProvider.delegate;return(null==a?void 0:a.setTimeout)?a.setTimeout.apply(a,r([n,i],t(o))):setTimeout.apply(void 0,r([n,i],t(o)))},clearTimeout:function(t){var r=e.timeoutProvider.delegate;return((null==r?void 0:r.clearTimeout)||clearTimeout)(t)},delegate:void 0}}(uo),oo.reportUnhandledError=void 0;var ao=io,co=uo;oo.reportUnhandledError=function(e){co.timeoutProvider.setTimeout((function(){var t=ao.config.onUnhandledError;if(!t)throw e;t(e)}))};var so={};so.noop=void 0,so.noop=function(){};var lo={};function fo(e,t,r){return{kind:e,value:t,error:r}}lo.createNotification=lo.nextNotification=lo.errorNotification=lo.COMPLETE_NOTIFICATION=void 0,lo.COMPLETE_NOTIFICATION=fo("C",void 0,void 0),lo.errorNotification=function(e){return fo("E",void 0,e)},lo.nextNotification=function(e){return fo("N",e,void 0)},lo.createNotification=fo;var vo={};vo.captureError=vo.errorContext=void 0;var ho=io,po=null;vo.errorContext=function(e){if(ho.config.useDeprecatedSynchronousErrorHandling){var t=!po;if(t&&(po={errorThrown:!1,error:null}),e(),t){var r=po,n=r.errorThrown,i=r.error;if(po=null,n)throw i}}else e()},vo.captureError=function(e){ho.config.useDeprecatedSynchronousErrorHandling&&po&&(po.errorThrown=!0,po.error=e)},function(e){var t=a&&a.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();e.EMPTY_OBSERVER=e.SafeSubscriber=e.Subscriber=void 0;var r=Wi,n=Ji,i=io,o=oo,u=so,c=lo,s=uo,l=vo,f=function(r){function i(t){var i=r.call(this)||this;return i.isStopped=!1,t?(i.destination=t,n.isSubscription(t)&&t.add(i)):i.destination=e.EMPTY_OBSERVER,i}return t(i,r),i.create=function(e,t,r){return new p(e,t,r)},i.prototype.next=function(e){this.isStopped?b(c.nextNotification(e),this):this._next(e)},i.prototype.error=function(e){this.isStopped?b(c.errorNotification(e),this):(this.isStopped=!0,this._error(e))},i.prototype.complete=function(){this.isStopped?b(c.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},i.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,r.prototype.unsubscribe.call(this),this.destination=null)},i.prototype._next=function(e){this.destination.next(e)},i.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},i.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},i}(n.Subscription);e.Subscriber=f;var d=Function.prototype.bind;function v(e,t){return d.call(e,t)}var h=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){y(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){y(e)}else y(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){y(e)}},e}(),p=function(e){function n(t,n,o){var u,a,c=e.call(this)||this;r.isFunction(t)||!t?u={next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=o?o:void 0}:c&&i.config.useDeprecatedNextContext?((a=Object.create(t)).unsubscribe=function(){return c.unsubscribe()},u={next:t.next&&v(t.next,a),error:t.error&&v(t.error,a),complete:t.complete&&v(t.complete,a)}):u=t;return c.destination=new h(u),c}return t(n,e),n}(f);function y(e){i.config.useDeprecatedSynchronousErrorHandling?l.captureError(e):o.reportUnhandledError(e)}function b(e,t){var r=i.config.onStoppedNotification;r&&s.timeoutProvider.setTimeout((function(){return r(e,t)}))}e.SafeSubscriber=p,e.EMPTY_OBSERVER={closed:!0,next:u.noop,error:function(e){throw e},complete:u.noop}}(Vi);var yo={observable:void 0};yo.observable="function"==typeof Symbol&&Symbol.observable||"@@observable";var bo={},mo={};mo.identity=void 0,mo.identity=function(e){return e},bo.pipeFromArray=bo.pipe=void 0;var go=mo;function wo(e){return 0===e.length?go.identity:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}bo.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return wo(e)},bo.pipeFromArray=wo,Ui.Observable=void 0;var Oo=Vi,So=Ji,_o=yo,xo=bo,Po=io,Ao=Wi,Eo=vo,jo=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var n,i=this,o=(n=e)&&n instanceof Oo.Subscriber||function(e){return e&&Ao.isFunction(e.next)&&Ao.isFunction(e.error)&&Ao.isFunction(e.complete)}(n)&&So.isSubscription(n)?e:new Oo.SafeSubscriber(e,t,r);return Eo.errorContext((function(){var e=i,t=e.operator,r=e.source;o.add(t?t.call(o,r):r?i._subscribe(o):i._trySubscribe(o))})),o},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=To(t))((function(t,n){var i=new Oo.SafeSubscriber({next:function(t){try{e(t)}catch(e){n(e),i.unsubscribe()}},error:n,complete:t});r.subscribe(i)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[_o.observable]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return xo.pipeFromArray(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=To(e))((function(e,r){var n;t.subscribe((function(e){return n=e}),(function(e){return r(e)}),(function(){return e(n)}))}))},e.create=function(t){return new e(t)},e}();function To(e){var t;return null!==(t=null!=e?e:Po.config.Promise)&&void 0!==t?t:Promise}Ui.Observable=jo;var Io={},ko={},Co={};Co.operate=Co.hasLift=void 0;var Fo=Wi;function No(e){return Fo.isFunction(null==e?void 0:e.lift)}Co.hasLift=No,Co.operate=function(e){return function(t){if(No(t))return t.lift((function(t){try{return e(t,this)}catch(e){this.error(e)}}));throw new TypeError("Unable to lift unknown Observable type")}};var Mo={},Ro=a&&a.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Mo.OperatorSubscriber=Mo.createOperatorSubscriber=void 0;var zo=Vi;Mo.createOperatorSubscriber=function(e,t,r,n,i){return new Bo(e,t,r,n,i)};var Bo=function(e){function t(t,r,n,i,o,u){var a=e.call(this,t)||this;return a.onFinalize=o,a.shouldUnsubscribe=u,a._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:e.prototype._next,a._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,a._complete=n?function(){try{n()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,a}return Ro(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},t}(zo.Subscriber);Mo.OperatorSubscriber=Bo,ko.refCount=void 0;var qo=Co,Do=Mo;ko.refCount=function(){return qo.operate((function(e,t){var r=null;e._refCount++;var n=Do.createOperatorSubscriber(t,void 0,void 0,void 0,(function(){if(!e||e._refCount<=0||0<--e._refCount)r=null;else{var n=e._connection,i=r;r=null,!n||i&&n!==i||n.unsubscribe(),t.unsubscribe()}}));e.subscribe(n),n.closed||(r=e.connect())}))};var Lo=a&&a.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Io.ConnectableObservable=void 0;var Uo=Ji,Vo=ko,Wo=Mo,Jo=Co,Go=function(e){function t(t,r){var n=e.call(this)||this;return n.source=t,n.subjectFactory=r,n._subject=null,n._refCount=0,n._connection=null,Jo.hasLift(t)&&(n.lift=t.lift),n}return Lo(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},t.prototype._teardown=function(){this._refCount=0;var e=this._connection;this._subject=this._connection=null,null==e||e.unsubscribe()},t.prototype.connect=function(){var e=this,t=this._connection;if(!t){t=this._connection=new Uo.Subscription;var r=this.getSubject();t.add(this.source.subscribe(Wo.createOperatorSubscriber(r,void 0,(function(){e._teardown(),r.complete()}),(function(t){e._teardown(),r.error(t)}),(function(){return e._teardown()})))),t.closed&&(this._connection=null,t=Uo.Subscription.EMPTY)}return t},t.prototype.refCount=function(){return Vo.refCount()(this)},t}(Ui.Observable);Io.ConnectableObservable=Go;var Ko={},Yo={};!function(e){e.performanceTimestampProvider=void 0,e.performanceTimestampProvider={now:function(){return(e.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}}(Yo);var Qo={};!function(e){var t=a&&a.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)u.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u},r=a&&a.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};e.animationFrameProvider=void 0;var n=Ji;e.animationFrameProvider={schedule:function(t){var r=requestAnimationFrame,i=cancelAnimationFrame,o=e.animationFrameProvider.delegate;o&&(r=o.requestAnimationFrame,i=o.cancelAnimationFrame);var u=r((function(e){i=void 0,t(e)}));return new n.Subscription((function(){return null==i?void 0:i(u)}))},requestAnimationFrame:function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var o=e.animationFrameProvider.delegate;return((null==o?void 0:o.requestAnimationFrame)||requestAnimationFrame).apply(void 0,r([],t(n)))},cancelAnimationFrame:function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var o=e.animationFrameProvider.delegate;return((null==o?void 0:o.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,r([],t(n)))},delegate:void 0}}(Qo),Ko.animationFrames=void 0;var $o=Ui,Ho=Ji,Xo=Yo,Zo=Qo;function eu(e){var t=Zo.animationFrameProvider.schedule;return new $o.Observable((function(r){var n=new Ho.Subscription,i=e||Xo.performanceTimestampProvider,o=i.now(),u=function(a){var c=i.now();r.next({timestamp:e?c:a,elapsed:c-o}),r.closed||n.add(t(u))};return n.add(t(u)),n}))}Ko.animationFrames=function(e){return e?eu(e):tu};var tu=eu(),ru={},nu={ObjectUnsubscribedError:void 0},iu=Ki;nu.ObjectUnsubscribedError=iu.createErrorClass((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}));var ou=a&&a.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),uu=a&&a.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};ru.AnonymousSubject=ru.Subject=void 0;var au=Ui,cu=Ji,su=nu,lu=Qi,fu=vo,du=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return ou(t,e),t.prototype.lift=function(e){var t=new vu(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new su.ObjectUnsubscribedError},t.prototype.next=function(e){var t=this;fu.errorContext((function(){var r,n;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=uu(t.currentObservers),o=i.next();!o.done;o=i.next()){o.value.next(e)}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}}))},t.prototype.error=function(e){var t=this;fu.errorContext((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var r=t.observers;r.length;)r.shift().error(e)}}))},t.prototype.complete=function(){var e=this;fu.errorContext((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,r=this,n=r.hasError,i=r.isStopped,o=r.observers;return n||i?cu.EMPTY_SUBSCRIPTION:(this.currentObservers=null,o.push(e),new cu.Subscription((function(){t.currentObservers=null,lu.arrRemove(o,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,r=t.hasError,n=t.thrownError,i=t.isStopped;r?e.error(n):i&&e.complete()},t.prototype.asObservable=function(){var e=new au.Observable;return e.source=this,e},t.create=function(e,t){return new vu(e,t)},t}(au.Observable);ru.Subject=du;var vu=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return ou(t,e),t.prototype.next=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===r||r.call(t,e)},t.prototype.error=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===r||r.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,r;return null!==(r=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==r?r:cu.EMPTY_SUBSCRIPTION},t}(du);ru.AnonymousSubject=vu;var hu={},pu=a&&a.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();hu.BehaviorSubject=void 0;var yu=function(e){function t(t){var r=e.call(this)||this;return r._value=t,r}return pu(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var r=e.prototype._subscribe.call(this,t);return!r.closed&&t.next(this._value),r},t.prototype.getValue=function(){var e=this,t=e.hasError,r=e.thrownError,n=e._value;if(t)throw r;return this._throwIfClosed(),n},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(ru.Subject);hu.BehaviorSubject=yu;var bu={},mu={};!function(e){e.dateTimestampProvider=void 0,e.dateTimestampProvider={now:function(){return(e.dateTimestampProvider.delegate||Date).now()},delegate:void 0}}(mu);var gu=a&&a.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();bu.ReplaySubject=void 0;var wu=mu,Ou=function(e){function t(t,r,n){void 0===t&&(t=1/0),void 0===r&&(r=1/0),void 0===n&&(n=wu.dateTimestampProvider);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=r,i._timestampProvider=n,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=r===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,r),i}return gu(t,e),t.prototype.next=function(t){var r=this,n=r.isStopped,i=r._buffer,o=r._infiniteTimeWindow,u=r._timestampProvider,a=r._windowTime;n||(i.push(t),!o&&i.push(u.now()+a)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),r=this._infiniteTimeWindow,n=this._buffer.slice(),i=0;i<n.length&&!e.closed;i+=r?1:2)e.next(n[i]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,r=e._timestampProvider,n=e._buffer,i=e._infiniteTimeWindow,o=(i?1:2)*t;if(t<1/0&&o<n.length&&n.splice(0,n.length-o),!i){for(var u=r.now(),a=0,c=1;c<n.length&&n[c]<=u;c+=2)a=c;a&&n.splice(0,a+1)}},t}(ru.Subject);bu.ReplaySubject=Ou;var Su={},_u=a&&a.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Su.AsyncSubject=void 0;var xu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._value=null,t._hasValue=!1,t._isComplete=!1,t}return _u(t,e),t.prototype._checkFinalizedStatuses=function(e){var t=this,r=t.hasError,n=t._hasValue,i=t._value,o=t.thrownError,u=t.isStopped,a=t._isComplete;r?e.error(o):(u||a)&&(n&&e.next(i),e.complete())},t.prototype.next=function(e){this.isStopped||(this._value=e,this._hasValue=!0)},t.prototype.complete=function(){var t=this,r=t._hasValue,n=t._value;t._isComplete||(this._isComplete=!0,r&&e.prototype.next.call(this,n),e.prototype.complete.call(this))},t}(ru.Subject);Su.AsyncSubject=xu;var Pu={},Au={},Eu={},ju={},Tu=a&&a.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();ju.Action=void 0;var Iu=function(e){function t(t,r){return e.call(this)||this}return Tu(t,e),t.prototype.schedule=function(e,t){return this},t}(Ji.Subscription);ju.Action=Iu;var ku={};!function(e){var t=a&&a.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)u.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u},r=a&&a.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};e.intervalProvider=void 0,e.intervalProvider={setInterval:function(n,i){for(var o=[],u=2;u<arguments.length;u++)o[u-2]=arguments[u];var a=e.intervalProvider.delegate;return(null==a?void 0:a.setInterval)?a.setInterval.apply(a,r([n,i],t(o))):setInterval.apply(void 0,r([n,i],t(o)))},clearInterval:function(t){var r=e.intervalProvider.delegate;return((null==r?void 0:r.clearInterval)||clearInterval)(t)},delegate:void 0}}(ku);var Cu=a&&a.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Eu.AsyncAction=void 0;var Fu=ku,Nu=Qi,Mu=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n.pending=!1,n}return Cu(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r=this.id,n=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(n,r,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(n,this.id,t),this},t.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),Fu.intervalProvider.setInterval(e.flush.bind(e,this),r)},t.prototype.recycleAsyncId=function(e,t,r){if(void 0===r&&(r=0),null!=r&&this.delay===r&&!1===this.pending)return t;Fu.intervalProvider.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var r,n=!1;try{this.work(e)}catch(e){n=!0,r=e||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,r=this.scheduler,n=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Nu.arrRemove(n,this),null!=t&&(this.id=this.recycleAsyncId(r,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(ju.Action);Eu.AsyncAction=Mu;var Ru={},zu={};zu.TestTools=zu.Immediate=void 0;var Bu,qu=1,Du={};function Lu(e){return e in Du&&(delete Du[e],!0)}zu.Immediate={setImmediate:function(e){var t=qu++;return Du[t]=!0,Bu||(Bu=Promise.resolve()),Bu.then((function(){return Lu(t)&&e()})),t},clearImmediate:function(e){Lu(e)}},zu.TestTools={pending:function(){return Object.keys(Du).length}},function(e){var t=a&&a.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)u.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u},r=a&&a.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};e.immediateProvider=void 0;var n=zu,i=n.Immediate.setImmediate,o=n.Immediate.clearImmediate;e.immediateProvider={setImmediate:function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var u=e.immediateProvider.delegate;return((null==u?void 0:u.setImmediate)||i).apply(void 0,r([],t(n)))},clearImmediate:function(t){var r=e.immediateProvider.delegate;return((null==r?void 0:r.clearImmediate)||o)(t)},delegate:void 0}}(Ru);var Uu=a&&a.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Au.AsapAction=void 0;var Vu=Ru,Wu=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return Uu(t,e),t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!==n&&n>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t._scheduled||(t._scheduled=Vu.immediateProvider.setImmediate(t.flush.bind(t,void 0))))},t.prototype.recycleAsyncId=function(t,r,n){if(void 0===n&&(n=0),null!=n&&n>0||null==n&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);t.actions.some((function(e){return e.id===r}))||(Vu.immediateProvider.clearImmediate(r),t._scheduled=void 0)},t}(Eu.AsyncAction);Au.AsapAction=Wu;var Ju={},Gu={},Ku={Scheduler:void 0},Yu=mu,Qu=function(){function e(t,r){void 0===r&&(r=e.now),this.schedulerActionCtor=t,this.now=r}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},e.now=Yu.dateTimestampProvider.now,e}();Ku.Scheduler=Qu;var $u=a&&a.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Gu.AsyncScheduler=void 0;var Hu=Ku,Xu=function(e){function t(t,r){void 0===r&&(r=Hu.Scheduler.now);var n=e.call(this,t,r)||this;return n.actions=[],n._active=!1,n._scheduled=void 0,n}return $u(t,e),t.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var r;this._active=!0;do{if(r=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,r){for(;e=t.shift();)e.unsubscribe();throw r}}},t}(Hu.Scheduler);Gu.AsyncScheduler=Xu;var Zu=a&&a.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Ju.AsapScheduler=void 0;var ea=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Zu(t,e),t.prototype.flush=function(e){this._active=!0;var t=this._scheduled;this._scheduled=void 0;var r,n=this.actions;e=e||n.shift();do{if(r=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},t}(Gu.AsyncScheduler);Ju.AsapScheduler=ea,function(e){e.asap=e.asapScheduler=void 0;var t=Au,r=Ju;e.asapScheduler=new r.AsapScheduler(t.AsapAction),e.asap=e.asapScheduler}(Pu);var ta={};!function(e){e.async=e.asyncScheduler=void 0;var t=Eu,r=Gu;e.asyncScheduler=new r.AsyncScheduler(t.AsyncAction),e.async=e.asyncScheduler}(ta);var ra={},na={},ia=a&&a.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();na.QueueAction=void 0;var oa=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return ia(t,e),t.prototype.schedule=function(t,r){return void 0===r&&(r=0),r>0?e.prototype.schedule.call(this,t,r):(this.delay=r,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,r){return r>0||this.closed?e.prototype.execute.call(this,t,r):this._execute(t,r)},t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!=n&&n>0||null==n&&this.delay>0?e.prototype.requestAsyncId.call(this,t,r,n):t.flush(this)},t}(Eu.AsyncAction);na.QueueAction=oa;var ua={},aa=a&&a.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();ua.QueueScheduler=void 0;var ca=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return aa(t,e),t}(Gu.AsyncScheduler);ua.QueueScheduler=ca,function(e){e.queue=e.queueScheduler=void 0;var t=na,r=ua;e.queueScheduler=new r.QueueScheduler(t.QueueAction),e.queue=e.queueScheduler}(ra);var sa={},la={},fa=a&&a.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();la.AnimationFrameAction=void 0;var da=Qo,va=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return fa(t,e),t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!==n&&n>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t._scheduled||(t._scheduled=da.animationFrameProvider.requestAnimationFrame((function(){return t.flush(void 0)}))))},t.prototype.recycleAsyncId=function(t,r,n){if(void 0===n&&(n=0),null!=n&&n>0||null==n&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);t.actions.some((function(e){return e.id===r}))||(da.animationFrameProvider.cancelAnimationFrame(r),t._scheduled=void 0)},t}(Eu.AsyncAction);la.AnimationFrameAction=va;var ha={},pa=a&&a.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();ha.AnimationFrameScheduler=void 0;var ya=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return pa(t,e),t.prototype.flush=function(e){this._active=!0;var t=this._scheduled;this._scheduled=void 0;var r,n=this.actions;e=e||n.shift();do{if(r=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},t}(Gu.AsyncScheduler);ha.AnimationFrameScheduler=ya,function(e){e.animationFrame=e.animationFrameScheduler=void 0;var t=la,r=ha;e.animationFrameScheduler=new r.AnimationFrameScheduler(t.AnimationFrameAction),e.animationFrame=e.animationFrameScheduler}(sa);var ba={},ma=a&&a.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();ba.VirtualAction=ba.VirtualTimeScheduler=void 0;var ga=Eu,wa=Ji,Oa=function(e){function t(t,r){void 0===t&&(t=Sa),void 0===r&&(r=1/0);var n=e.call(this,t,(function(){return n.frame}))||this;return n.maxFrames=r,n.frame=0,n.index=-1,n}return ma(t,e),t.prototype.flush=function(){for(var e,t,r=this.actions,n=this.maxFrames;(t=r[0])&&t.delay<=n&&(r.shift(),this.frame=t.delay,!(e=t.execute(t.state,t.delay))););if(e){for(;t=r.shift();)t.unsubscribe();throw e}},t.frameTimeFactor=10,t}(Gu.AsyncScheduler);ba.VirtualTimeScheduler=Oa;var Sa=function(e){function t(t,r,n){void 0===n&&(n=t.index+=1);var i=e.call(this,t,r)||this;return i.scheduler=t,i.work=r,i.index=n,i.active=!0,i.index=t.index=n,i}return ma(t,e),t.prototype.schedule=function(r,n){if(void 0===n&&(n=0),Number.isFinite(n)){if(!this.id)return e.prototype.schedule.call(this,r,n);this.active=!1;var i=new t(this.scheduler,this.work);return this.add(i),i.schedule(r,n)}return wa.Subscription.EMPTY},t.prototype.requestAsyncId=function(e,r,n){void 0===n&&(n=0),this.delay=e.frame+n;var i=e.actions;return i.push(this),i.sort(t.sortActions),!0},t.prototype.recycleAsyncId=function(e,t,r){},t.prototype._execute=function(t,r){if(!0===this.active)return e.prototype._execute.call(this,t,r)},t.sortActions=function(e,t){return e.delay===t.delay?e.index===t.index?0:e.index>t.index?1:-1:e.delay>t.delay?1:-1},t}(ga.AsyncAction);ba.VirtualAction=Sa;var _a={},xa={};!function(e){e.empty=e.EMPTY=void 0;var t=Ui;e.EMPTY=new t.Observable((function(e){return e.complete()})),e.empty=function(r){return r?function(e){return new t.Observable((function(t){return e.schedule((function(){return t.complete()}))}))}(r):e.EMPTY}}(xa);var Pa={},Aa={},Ea={isScheduler:void 0},ja=Wi;Ea.isScheduler=function(e){return e&&ja.isFunction(e.schedule)},Aa.popNumber=Aa.popScheduler=Aa.popResultSelector=void 0;var Ta=Wi,Ia=Ea;function ka(e){return e[e.length-1]}Aa.popResultSelector=function(e){return Ta.isFunction(ka(e))?e.pop():void 0},Aa.popScheduler=function(e){return Ia.isScheduler(ka(e))?e.pop():void 0},Aa.popNumber=function(e,t){return"number"==typeof ka(e)?e.pop():t};var Ca={},Fa={},Na={},Ma={},Ra={isArrayLike:void 0};Ra.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};var za={isPromise:void 0},Ba=Wi;za.isPromise=function(e){return Ba.isFunction(null==e?void 0:e.then)};var qa={isInteropObservable:void 0},Da=yo,La=Wi;qa.isInteropObservable=function(e){return La.isFunction(e[Da.observable])};var Ua={isAsyncIterable:void 0},Va=Wi;Ua.isAsyncIterable=function(e){return Symbol.asyncIterator&&Va.isFunction(null==e?void 0:e[Symbol.asyncIterator])};var Wa={};Wa.createInvalidObservableTypeError=void 0,Wa.createInvalidObservableTypeError=function(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")};var Ja={},Ga={};function Ka(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Ga.iterator=Ga.getSymbolIterator=void 0,Ga.getSymbolIterator=Ka,Ga.iterator=Ka(),Ja.isIterable=void 0;var Ya=Ga,Qa=Wi;Ja.isIterable=function(e){return Qa.isFunction(null==e?void 0:e[Ya.iterator])};var $a={},Ha=a&&a.__generator||function(e,t){var r,n,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,n=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!(i=u.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=t.call(e,u)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},Xa=a&&a.__await||function(e){return this instanceof Xa?(this.v=e,this):new Xa(e)},Za=a&&a.__asyncGenerator||function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),o=[];return n={},u("next"),u("throw"),u("return"),n[Symbol.asyncIterator]=function(){return this},n;function u(e){i[e]&&(n[e]=function(t){return new Promise((function(r,n){o.push([e,t,r,n])>1||a(e,t)}))})}function a(e,t){try{(r=i[e](t)).value instanceof Xa?Promise.resolve(r.value.v).then(c,s):l(o[0][2],r)}catch(e){l(o[0][3],e)}var r}function c(e){a("next",e)}function s(e){a("throw",e)}function l(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}};$a.isReadableStreamLike=$a.readableStreamLikeToAsyncGenerator=void 0;var ec=Wi;$a.readableStreamLikeToAsyncGenerator=function(e){return Za(this,arguments,(function(){var t,r,n;return Ha(this,(function(i){switch(i.label){case 0:t=e.getReader(),i.label=1;case 1:i.trys.push([1,,9,10]),i.label=2;case 2:return[4,Xa(t.read())];case 3:return r=i.sent(),n=r.value,r.done?[4,Xa(void 0)]:[3,5];case 4:return[2,i.sent()];case 5:return[4,Xa(n)];case 6:return[4,i.sent()];case 7:return i.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))},$a.isReadableStreamLike=function(e){return ec.isFunction(null==e?void 0:e.getReader)};var tc=a&&a.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function u(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(u,a)}c((n=n.apply(e,t||[])).next())}))},rc=a&&a.__generator||function(e,t){var r,n,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,n=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!(i=u.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=t.call(e,u)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},nc=a&&a.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e="function"==typeof ic?ic(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,i,(t=e[r](t)).done,t.value)}))}}},ic=a&&a.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Ma.fromReadableStreamLike=Ma.fromAsyncIterable=Ma.fromIterable=Ma.fromPromise=Ma.fromArrayLike=Ma.fromInteropObservable=Ma.innerFrom=void 0;var oc=Ra,uc=za,ac=Ui,cc=qa,sc=Ua,lc=Wa,fc=Ja,dc=$a,vc=Wi,hc=oo,pc=yo;function yc(e){return new ac.Observable((function(t){var r=e[pc.observable]();if(vc.isFunction(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")}))}function bc(e){return new ac.Observable((function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()}))}function mc(e){return new ac.Observable((function(t){e.then((function(e){t.closed||(t.next(e),t.complete())}),(function(e){return t.error(e)})).then(null,hc.reportUnhandledError)}))}function gc(e){return new ac.Observable((function(t){var r,n;try{for(var i=ic(e),o=i.next();!o.done;o=i.next()){var u=o.value;if(t.next(u),t.closed)return}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}t.complete()}))}function wc(e){return new ac.Observable((function(t){(function(e,t){var r,n,i,o;return tc(this,void 0,void 0,(function(){var u,a;return rc(this,(function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),r=nc(e),c.label=1;case 1:return[4,r.next()];case 2:if((n=c.sent()).done)return[3,4];if(u=n.value,t.next(u),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=c.sent(),i={error:a},[3,11];case 6:return c.trys.push([6,,9,10]),n&&!n.done&&(o=r.return)?[4,o.call(r)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}}))}))})(e,t).catch((function(e){return t.error(e)}))}))}function Oc(e){return wc(dc.readableStreamLikeToAsyncGenerator(e))}Ma.innerFrom=function(e){if(e instanceof ac.Observable)return e;if(null!=e){if(cc.isInteropObservable(e))return yc(e);if(oc.isArrayLike(e))return bc(e);if(uc.isPromise(e))return mc(e);if(sc.isAsyncIterable(e))return wc(e);if(fc.isIterable(e))return gc(e);if(dc.isReadableStreamLike(e))return Oc(e)}throw lc.createInvalidObservableTypeError(e)},Ma.fromInteropObservable=yc,Ma.fromArrayLike=bc,Ma.fromPromise=mc,Ma.fromIterable=gc,Ma.fromAsyncIterable=wc,Ma.fromReadableStreamLike=Oc;var Sc={},_c={};_c.executeSchedule=void 0,_c.executeSchedule=function(e,t,r,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var o=t.schedule((function(){r(),i?e.add(this.schedule(null,n)):this.unsubscribe()}),n);if(e.add(o),!i)return o},Sc.observeOn=void 0;var xc=_c,Pc=Co,Ac=Mo;Sc.observeOn=function(e,t){return void 0===t&&(t=0),Pc.operate((function(r,n){r.subscribe(Ac.createOperatorSubscriber(n,(function(r){return xc.executeSchedule(n,e,(function(){return n.next(r)}),t)}),(function(){return xc.executeSchedule(n,e,(function(){return n.complete()}),t)}),(function(r){return xc.executeSchedule(n,e,(function(){return n.error(r)}),t)})))}))};var Ec={subscribeOn:void 0},jc=Co;Ec.subscribeOn=function(e,t){return void 0===t&&(t=0),jc.operate((function(r,n){n.add(e.schedule((function(){return r.subscribe(n)}),t))}))},Na.scheduleObservable=void 0;var Tc=Ma,Ic=Sc,kc=Ec;Na.scheduleObservable=function(e,t){return Tc.innerFrom(e).pipe(kc.subscribeOn(t),Ic.observeOn(t))};var Cc={schedulePromise:void 0},Fc=Ma,Nc=Sc,Mc=Ec;Cc.schedulePromise=function(e,t){return Fc.innerFrom(e).pipe(Mc.subscribeOn(t),Nc.observeOn(t))};var Rc={scheduleArray:void 0},zc=Ui;Rc.scheduleArray=function(e,t){return new zc.Observable((function(r){var n=0;return t.schedule((function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())}))}))};var Bc={scheduleIterable:void 0},qc=Ui,Dc=Ga,Lc=Wi,Uc=_c;Bc.scheduleIterable=function(e,t){return new qc.Observable((function(r){var n;return Uc.executeSchedule(r,t,(function(){n=e[Dc.iterator](),Uc.executeSchedule(r,t,(function(){var e,t,i;try{t=(e=n.next()).value,i=e.done}catch(e){return void r.error(e)}i?r.complete():r.next(t)}),0,!0)})),function(){return Lc.isFunction(null==n?void 0:n.return)&&n.return()}}))};var Vc={scheduleAsyncIterable:void 0},Wc=Ui,Jc=_c;Vc.scheduleAsyncIterable=function(e,t){if(!e)throw new Error("Iterable cannot be null");return new Wc.Observable((function(r){Jc.executeSchedule(r,t,(function(){var n=e[Symbol.asyncIterator]();Jc.executeSchedule(r,t,(function(){n.next().then((function(e){e.done?r.complete():r.next(e.value)}))}),0,!0)}))}))};var Gc={scheduleReadableStreamLike:void 0},Kc=Vc,Yc=$a;Gc.scheduleReadableStreamLike=function(e,t){return Kc.scheduleAsyncIterable(Yc.readableStreamLikeToAsyncGenerator(e),t)},Fa.scheduled=void 0;var Qc=Na,$c=Cc,Hc=Rc,Xc=Bc,Zc=Vc,es=qa,ts=za,rs=Ra,ns=Ja,is=Ua,os=Wa,us=$a,as=Gc;Fa.scheduled=function(e,t){if(null!=e){if(es.isInteropObservable(e))return Qc.scheduleObservable(e,t);if(rs.isArrayLike(e))return Hc.scheduleArray(e,t);if(ts.isPromise(e))return $c.schedulePromise(e,t);if(is.isAsyncIterable(e))return Zc.scheduleAsyncIterable(e,t);if(ns.isIterable(e))return Xc.scheduleIterable(e,t);if(us.isReadableStreamLike(e))return as.scheduleReadableStreamLike(e,t)}throw os.createInvalidObservableTypeError(e)},Ca.from=void 0;var cs=Fa,ss=Ma;Ca.from=function(e,t){return t?cs.scheduled(e,t):ss.innerFrom(e)},Pa.of=void 0;var ls=Aa,fs=Ca;Pa.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=ls.popScheduler(e);return fs.from(e,r)};var ds={throwError:void 0},vs=Ui,hs=Wi;ds.throwError=function(e,t){var r=hs.isFunction(e)?e:function(){return e},n=function(e){return e.error(r())};return new vs.Observable(t?function(e){return t.schedule(n,0,e)}:n)},function(e){e.observeNotification=e.Notification=e.NotificationKind=void 0;var t=xa,r=Pa,n=ds,i=Wi;!function(e){e.NEXT="N",e.ERROR="E",e.COMPLETE="C"}(e.NotificationKind||(e.NotificationKind={}));var o=function(){function e(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}return e.prototype.observe=function(e){return u(this,e)},e.prototype.do=function(e,t,r){var n=this,i=n.kind,o=n.value,u=n.error;return"N"===i?null==e?void 0:e(o):"E"===i?null==t?void 0:t(u):null==r?void 0:r()},e.prototype.accept=function(e,t,r){var n;return i.isFunction(null===(n=e)||void 0===n?void 0:n.next)?this.observe(e):this.do(e,t,r)},e.prototype.toObservable=function(){var e=this,i=e.kind,o=e.value,u=e.error,a="N"===i?r.of(o):"E"===i?n.throwError((function(){return u})):"C"===i?t.EMPTY:0;if(!a)throw new TypeError("Unexpected notification kind "+i);return a},e.createNext=function(t){return new e("N",t)},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e}();function u(e,t){var r,n,i,o=e,u=o.kind,a=o.value,c=o.error;if("string"!=typeof u)throw new TypeError('Invalid notification, missing "kind"');"N"===u?null===(r=t.next)||void 0===r||r.call(t,a):"E"===u?null===(n=t.error)||void 0===n||n.call(t,c):null===(i=t.complete)||void 0===i||i.call(t)}e.Notification=o,e.observeNotification=u}(_a);var ps={isObservable:void 0},ys=Ui,bs=Wi;ps.isObservable=function(e){return!!e&&(e instanceof ys.Observable||bs.isFunction(e.lift)&&bs.isFunction(e.subscribe))};var ms={},gs={EmptyError:void 0},ws=Ki;gs.EmptyError=ws.createErrorClass((function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}})),ms.lastValueFrom=void 0;var Os=gs;ms.lastValueFrom=function(e,t){var r="object"==typeof t;return new Promise((function(n,i){var o,u=!1;e.subscribe({next:function(e){o=e,u=!0},error:i,complete:function(){u?n(o):r?n(t.defaultValue):i(new Os.EmptyError)}})}))};var Ss={firstValueFrom:void 0},_s=gs,xs=Vi;Ss.firstValueFrom=function(e,t){var r="object"==typeof t;return new Promise((function(n,i){var o=new xs.SafeSubscriber({next:function(e){n(e),o.unsubscribe()},error:i,complete:function(){r?n(t.defaultValue):i(new _s.EmptyError)}});e.subscribe(o)}))};var Ps={ArgumentOutOfRangeError:void 0},As=Ki;Ps.ArgumentOutOfRangeError=As.createErrorClass((function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}}));var Es={NotFoundError:void 0},js=Ki;Es.NotFoundError=js.createErrorClass((function(e){return function(t){e(this),this.name="NotFoundError",this.message=t}}));var Ts={SequenceError:void 0},Is=Ki;Ts.SequenceError=Is.createErrorClass((function(e){return function(t){e(this),this.name="SequenceError",this.message=t}}));var ks={},Cs={};Cs.isValidDate=void 0,Cs.isValidDate=function(e){return e instanceof Date&&!isNaN(e)},function(e){e.timeout=e.TimeoutError=void 0;var t=ta,r=Cs,n=Co,i=Ma,o=Ki,u=Mo,a=_c;function c(t){throw new e.TimeoutError(t)}e.TimeoutError=o.createErrorClass((function(e){return function(t){void 0===t&&(t=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=t}})),e.timeout=function(e,o){var s=r.isValidDate(e)?{first:e}:"number"==typeof e?{each:e}:e,l=s.first,f=s.each,d=s.with,v=void 0===d?c:d,h=s.scheduler,p=void 0===h?null!=o?o:t.asyncScheduler:h,y=s.meta,b=void 0===y?null:y;if(null==l&&null==f)throw new TypeError("No timeout provided.");return n.operate((function(e,t){var r,n,o=null,c=0,s=function(e){n=a.executeSchedule(t,p,(function(){try{r.unsubscribe(),i.innerFrom(v({meta:b,lastValue:o,seen:c})).subscribe(t)}catch(e){t.error(e)}}),e)};r=e.subscribe(u.createOperatorSubscriber(t,(function(e){null==n||n.unsubscribe(),c++,t.next(o=e),f>0&&s(f)}),void 0,void 0,(function(){(null==n?void 0:n.closed)||null==n||n.unsubscribe(),o=null}))),!c&&s(null!=l?"number"==typeof l?l:+l-p.now():f)}))}}(ks);var Fs={},Ns={},Ms={},Rs={map:void 0},zs=Co,Bs=Mo;Rs.map=function(e,t){return zs.operate((function(r,n){var i=0;r.subscribe(Bs.createOperatorSubscriber(n,(function(r){n.next(e.call(t,r,i++))})))}))};var qs=a&&a.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)u.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u},Ds=a&&a.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Ms.mapOneOrManyArgs=void 0;var Ls=Rs,Us=Array.isArray;Ms.mapOneOrManyArgs=function(e){return Ls.map((function(t){return function(e,t){return Us(t)?e.apply(void 0,Ds([],qs(t))):e(t)}(e,t)}))};var Vs=a&&a.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)u.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u},Ws=a&&a.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Ns.bindCallbackInternals=void 0;var Js=Ea,Gs=Ui,Ks=Ec,Ys=Ms,Qs=Sc,$s=Su;Ns.bindCallbackInternals=function e(t,r,n,i){if(n){if(!Js.isScheduler(n))return function(){for(var o=[],u=0;u<arguments.length;u++)o[u]=arguments[u];return e(t,r,i).apply(this,o).pipe(Ys.mapOneOrManyArgs(n))};i=n}return i?function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];return e(t,r).apply(this,n).pipe(Ks.subscribeOn(i),Qs.observeOn(i))}:function(){for(var e=this,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var o=new $s.AsyncSubject,u=!0;return new Gs.Observable((function(i){var a=o.subscribe(i);if(u){u=!1;var c=!1,s=!1;r.apply(e,Ws(Ws([],Vs(n)),[function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(t){var n=e.shift();if(null!=n)return void o.error(n)}o.next(1<e.length?e:e[0]),s=!0,c&&o.complete()}])),s&&o.complete(),c=!0}return a}))}},Fs.bindCallback=void 0;var Hs=Ns;Fs.bindCallback=function(e,t,r){return Hs.bindCallbackInternals(!1,e,t,r)};var Xs={bindNodeCallback:void 0},Zs=Ns;Xs.bindNodeCallback=function(e,t,r){return Zs.bindCallbackInternals(!0,e,t,r)};var el={},tl={argsArgArrayOrObject:void 0},rl=Array.isArray,nl=Object.getPrototypeOf,il=Object.prototype,ol=Object.keys;tl.argsArgArrayOrObject=function(e){if(1===e.length){var t=e[0];if(rl(t))return{args:t,keys:null};if((n=t)&&"object"==typeof n&&nl(n)===il){var r=ol(t);return{args:r.map((function(e){return t[e]})),keys:r}}}var n;return{args:e,keys:null}};var ul={};ul.createObject=void 0,ul.createObject=function(e,t){return e.reduce((function(e,r,n){return e[r]=t[n],e}),{})},el.combineLatestInit=el.combineLatest=void 0;var al=Ui,cl=tl,sl=Ca,ll=mo,fl=Ms,dl=Aa,vl=ul,hl=Mo,pl=_c;function yl(e,t,r){return void 0===r&&(r=ll.identity),function(n){bl(t,(function(){for(var i=e.length,o=new Array(i),u=i,a=i,c=function(i){bl(t,(function(){var c=sl.from(e[i],t),s=!1;c.subscribe(hl.createOperatorSubscriber(n,(function(e){o[i]=e,s||(s=!0,a--),a||n.next(r(o.slice()))}),(function(){--u||n.complete()})))}),n)},s=0;s<i;s++)c(s)}),n)}}function bl(e,t,r){e?pl.executeSchedule(r,e,t):t()}el.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=dl.popScheduler(e),n=dl.popResultSelector(e),i=cl.argsArgArrayOrObject(e),o=i.args,u=i.keys;if(0===o.length)return sl.from([],r);var a=new al.Observable(yl(o,r,u?function(e){return vl.createObject(u,e)}:ll.identity));return n?a.pipe(fl.mapOneOrManyArgs(n)):a},el.combineLatestInit=yl;var ml={},gl={},wl={},Ol={},Sl={mergeInternals:void 0},_l=Ma,xl=_c,Pl=Mo;Sl.mergeInternals=function(e,t,r,n,i,o,u,a){var c=[],s=0,l=0,f=!1,d=function(){!f||c.length||s||t.complete()},v=function(e){return s<n?h(e):c.push(e)},h=function(e){o&&t.next(e),s++;var a=!1;_l.innerFrom(r(e,l++)).subscribe(Pl.createOperatorSubscriber(t,(function(e){null==i||i(e),o?v(e):t.next(e)}),(function(){a=!0}),void 0,(function(){if(a)try{s--;for(var e=function(){var e=c.shift();u?xl.executeSchedule(t,u,(function(){return h(e)})):h(e)};c.length&&s<n;)e();d()}catch(e){t.error(e)}})))};return e.subscribe(Pl.createOperatorSubscriber(t,v,(function(){f=!0,d()}))),function(){null==a||a()}},Ol.mergeMap=void 0;var Al=Rs,El=Ma,jl=Co,Tl=Sl,Il=Wi;Ol.mergeMap=function e(t,r,n){return void 0===n&&(n=1/0),Il.isFunction(r)?e((function(e,n){return Al.map((function(t,i){return r(e,t,n,i)}))(El.innerFrom(t(e,n)))}),n):("number"==typeof r&&(n=r),jl.operate((function(e,r){return Tl.mergeInternals(e,r,t,n)})))},wl.mergeAll=void 0;var kl=Ol,Cl=mo;wl.mergeAll=function(e){return void 0===e&&(e=1/0),kl.mergeMap(Cl.identity,e)},gl.concatAll=void 0;var Fl=wl;gl.concatAll=function(){return Fl.mergeAll(1)},ml.concat=void 0;var Nl=gl,Ml=Aa,Rl=Ca;ml.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Nl.concatAll()(Rl.from(e,Ml.popScheduler(e)))};var zl={},Bl={defer:void 0},ql=Ui,Dl=Ma;Bl.defer=function(e){return new ql.Observable((function(t){Dl.innerFrom(e()).subscribe(t)}))},zl.connectable=void 0;var Ll=ru,Ul=Ui,Vl=Bl,Wl={connector:function(){return new Ll.Subject},resetOnDisconnect:!0};zl.connectable=function(e,t){void 0===t&&(t=Wl);var r=null,n=t.connector,i=t.resetOnDisconnect,o=void 0===i||i,u=n(),a=new Ul.Observable((function(e){return u.subscribe(e)}));return a.connect=function(){return r&&!r.closed||(r=Vl.defer((function(){return e})).subscribe(u),o&&r.add((function(){return u=n()}))),r},a};var Jl={forkJoin:void 0},Gl=Ui,Kl=tl,Yl=Ma,Ql=Aa,$l=Mo,Hl=Ms,Xl=ul;Jl.forkJoin=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Ql.popResultSelector(e),n=Kl.argsArgArrayOrObject(e),i=n.args,o=n.keys,u=new Gl.Observable((function(e){var t=i.length;if(t)for(var r=new Array(t),n=t,u=t,a=function(t){var a=!1;Yl.innerFrom(i[t]).subscribe($l.createOperatorSubscriber(e,(function(e){a||(a=!0,u--),r[t]=e}),(function(){return n--}),void 0,(function(){n&&a||(u||e.next(o?Xl.createObject(o,r):r),e.complete())})))},c=0;c<t;c++)a(c);else e.complete()}));return r?u.pipe(Hl.mapOneOrManyArgs(r)):u};var Zl={},ef=a&&a.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)u.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u};Zl.fromEvent=void 0;var tf=Ma,rf=Ui,nf=Ol,of=Ra,uf=Wi,af=Ms,cf=["addListener","removeListener"],sf=["addEventListener","removeEventListener"],lf=["on","off"];function ff(e,t){return function(r){return function(n){return e[r](t,n)}}}Zl.fromEvent=function e(t,r,n,i){if(uf.isFunction(n)&&(i=n,n=void 0),i)return e(t,r,n).pipe(af.mapOneOrManyArgs(i));var o=ef(function(e){return uf.isFunction(e.addEventListener)&&uf.isFunction(e.removeEventListener)}(t)?sf.map((function(e){return function(i){return t[e](r,i,n)}})):function(e){return uf.isFunction(e.addListener)&&uf.isFunction(e.removeListener)}(t)?cf.map(ff(t,r)):function(e){return uf.isFunction(e.on)&&uf.isFunction(e.off)}(t)?lf.map(ff(t,r)):[],2),u=o[0],a=o[1];if(!u&&of.isArrayLike(t))return nf.mergeMap((function(t){return e(t,r,n)}))(tf.innerFrom(t));if(!u)throw new TypeError("Invalid event target");return new rf.Observable((function(e){var t=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.next(1<t.length?t:t[0])};return u(t),function(){return a(t)}}))};var df={fromEventPattern:void 0},vf=Ui,hf=Wi,pf=Ms;df.fromEventPattern=function e(t,r,n){return n?e(t,r).pipe(pf.mapOneOrManyArgs(n)):new vf.Observable((function(e){var n=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.next(1===t.length?t[0]:t)},i=t(n);return hf.isFunction(r)?function(){return r(n,i)}:void 0}))};var yf={},bf=a&&a.__generator||function(e,t){var r,n,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,n=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!(i=u.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=t.call(e,u)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};yf.generate=void 0;var mf=mo,gf=Ea,wf=Bl,Of=Bc;yf.generate=function(e,t,r,n,i){var o,u,a,c;function s(){var e;return bf(this,(function(n){switch(n.label){case 0:e=c,n.label=1;case 1:return t&&!t(e)?[3,4]:[4,a(e)];case 2:n.sent(),n.label=3;case 3:return e=r(e),[3,1];case 4:return[2]}}))}return 1===arguments.length?(c=(o=e).initialState,t=o.condition,r=o.iterate,u=o.resultSelector,a=void 0===u?mf.identity:u,i=o.scheduler):(c=e,!n||gf.isScheduler(n)?(a=mf.identity,i=n):a=n),wf.defer(i?function(){return Of.scheduleIterable(s(),i)}:s)};var Sf={iif:void 0},_f=Bl;Sf.iif=function(e,t,r){return _f.defer((function(){return e()?t:r}))};var xf={},Pf={timer:void 0},Af=Ui,Ef=ta,jf=Ea,Tf=Cs;Pf.timer=function(e,t,r){void 0===e&&(e=0),void 0===r&&(r=Ef.async);var n=-1;return null!=t&&(jf.isScheduler(t)?r=t:n=t),new Af.Observable((function(t){var i=Tf.isValidDate(e)?+e-r.now():e;i<0&&(i=0);var o=0;return r.schedule((function(){t.closed||(t.next(o++),0<=n?this.schedule(void 0,n):t.complete())}),i)}))},xf.interval=void 0;var If=ta,kf=Pf;xf.interval=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=If.asyncScheduler),e<0&&(e=0),kf.timer(e,e,t)};var Cf={merge:void 0},Ff=wl,Nf=Ma,Mf=xa,Rf=Aa,zf=Ca;Cf.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Rf.popScheduler(e),n=Rf.popNumber(e,1/0),i=e;return i.length?1===i.length?Nf.innerFrom(i[0]):Ff.mergeAll(n)(zf.from(i,r)):Mf.EMPTY};var Bf={};!function(e){e.never=e.NEVER=void 0;var t=Ui,r=so;e.NEVER=new t.Observable(r.noop),e.never=function(){return e.NEVER}}(Bf);var qf={},Df={},Lf={argsOrArgArray:void 0},Uf=Array.isArray;Lf.argsOrArgArray=function(e){return 1===e.length&&Uf(e[0])?e[0]:e};var Vf=a&&a.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)u.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u},Wf=a&&a.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Df.onErrorResumeNext=void 0;var Jf=Co,Gf=Ma,Kf=Lf,Yf=Mo,Qf=so;Df.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Kf.argsOrArgArray(e);return Jf.operate((function(e,t){var n=Wf([e],Vf(r)),i=function(){if(!t.closed)if(n.length>0){var e=void 0;try{e=Gf.innerFrom(n.shift())}catch(e){return void i()}var r=Yf.createOperatorSubscriber(t,void 0,Qf.noop,Qf.noop);e.subscribe(r),r.add(i)}else t.complete()};i()}))},qf.onErrorResumeNext=void 0;var $f=xa,Hf=Df,Xf=Lf;qf.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Hf.onErrorResumeNext(Xf.argsOrArgArray(e))($f.EMPTY)};var Zf={pairs:void 0},ed=Ca;Zf.pairs=function(e,t){return ed.from(Object.entries(e),t)};var td={},rd={};rd.not=void 0,rd.not=function(e,t){return function(r,n){return!e.call(t,r,n)}};var nd={filter:void 0},id=Co,od=Mo;nd.filter=function(e,t){return id.operate((function(r,n){var i=0;r.subscribe(od.createOperatorSubscriber(n,(function(r){return e.call(t,r,i++)&&n.next(r)})))}))},td.partition=void 0;var ud=rd,ad=nd,cd=Ma;td.partition=function(e,t,r){return[ad.filter(t,r)(cd.innerFrom(e)),ad.filter(ud.not(t,r))(cd.innerFrom(e))]};var sd={};sd.raceInit=sd.race=void 0;var ld=Ui,fd=Ma,dd=Lf,vd=Mo;function hd(e){return function(t){for(var r=[],n=function(n){r.push(fd.innerFrom(e[n]).subscribe(vd.createOperatorSubscriber(t,(function(e){if(r){for(var i=0;i<r.length;i++)i!==n&&r[i].unsubscribe();r=null}t.next(e)}))))},i=0;r&&!t.closed&&i<e.length;i++)n(i)}}sd.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===(e=dd.argsOrArgArray(e)).length?fd.innerFrom(e[0]):new ld.Observable(hd(e))},sd.raceInit=hd;var pd={range:void 0},yd=Ui,bd=xa;pd.range=function(e,t,r){if(null==t&&(t=e,e=0),t<=0)return bd.EMPTY;var n=t+e;return new yd.Observable(r?function(t){var i=e;return r.schedule((function(){i<n?(t.next(i++),this.schedule()):t.complete()}))}:function(t){for(var r=e;r<n&&!t.closed;)t.next(r++);t.complete()})};var md={using:void 0},gd=Ui,wd=Ma,Od=xa;md.using=function(e,t){return new gd.Observable((function(r){var n=e(),i=t(n);return(i?wd.innerFrom(i):Od.EMPTY).subscribe(r),function(){n&&n.unsubscribe()}}))};var Sd={},_d=a&&a.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)u.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u},xd=a&&a.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Sd.zip=void 0;var Pd=Ui,Ad=Ma,Ed=Lf,jd=xa,Td=Mo,Id=Aa;Sd.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Id.popResultSelector(e),n=Ed.argsOrArgArray(e);return n.length?new Pd.Observable((function(e){var t=n.map((function(){return[]})),i=n.map((function(){return!1}));e.add((function(){t=i=null}));for(var o=function(o){Ad.innerFrom(n[o]).subscribe(Td.createOperatorSubscriber(e,(function(n){if(t[o].push(n),t.every((function(e){return e.length}))){var u=t.map((function(e){return e.shift()}));e.next(r?r.apply(void 0,xd([],_d(u))):u),t.some((function(e,t){return!e.length&&i[t]}))&&e.complete()}}),(function(){i[o]=!0,!t[o].length&&e.complete()})))},u=0;!e.closed&&u<n.length;u++)o(u);return function(){t=i=null}})):jd.EMPTY};var kd={},Cd={audit:void 0},Fd=Co,Nd=Ma,Md=Mo;Cd.audit=function(e){return Fd.operate((function(t,r){var n=!1,i=null,o=null,u=!1,a=function(){if(null==o||o.unsubscribe(),o=null,n){n=!1;var e=i;i=null,r.next(e)}u&&r.complete()},c=function(){o=null,u&&r.complete()};t.subscribe(Md.createOperatorSubscriber(r,(function(t){n=!0,i=t,o||Nd.innerFrom(e(t)).subscribe(o=Md.createOperatorSubscriber(r,a,c))}),(function(){u=!0,(!n||!o||o.closed)&&r.complete()})))}))};var Rd={auditTime:void 0},zd=ta,Bd=Cd,qd=Pf;Rd.auditTime=function(e,t){return void 0===t&&(t=zd.asyncScheduler),Bd.audit((function(){return qd.timer(e,t)}))};var Dd={buffer:void 0},Ld=Co,Ud=so,Vd=Mo;Dd.buffer=function(e){return Ld.operate((function(t,r){var n=[];return t.subscribe(Vd.createOperatorSubscriber(r,(function(e){return n.push(e)}),(function(){r.next(n),r.complete()}))),e.subscribe(Vd.createOperatorSubscriber(r,(function(){var e=n;n=[],r.next(e)}),Ud.noop)),function(){n=null}}))};var Wd={},Jd=a&&a.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Wd.bufferCount=void 0;var Gd=Co,Kd=Mo,Yd=Qi;Wd.bufferCount=function(e,t){return void 0===t&&(t=null),t=null!=t?t:e,Gd.operate((function(r,n){var i=[],o=0;r.subscribe(Kd.createOperatorSubscriber(n,(function(r){var u,a,c,s,l=null;o++%t==0&&i.push([]);try{for(var f=Jd(i),d=f.next();!d.done;d=f.next()){(p=d.value).push(r),e<=p.length&&(l=null!=l?l:[]).push(p)}}catch(e){u={error:e}}finally{try{d&&!d.done&&(a=f.return)&&a.call(f)}finally{if(u)throw u.error}}if(l)try{for(var v=Jd(l),h=v.next();!h.done;h=v.next()){var p=h.value;Yd.arrRemove(i,p),n.next(p)}}catch(e){c={error:e}}finally{try{h&&!h.done&&(s=v.return)&&s.call(v)}finally{if(c)throw c.error}}}),(function(){var e,t;try{for(var r=Jd(i),o=r.next();!o.done;o=r.next()){var u=o.value;n.next(u)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}n.complete()}),void 0,(function(){i=null})))}))};var Qd={},$d=a&&a.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Qd.bufferTime=void 0;var Hd=Ji,Xd=Co,Zd=Mo,ev=Qi,tv=ta,rv=Aa,nv=_c;Qd.bufferTime=function(e){for(var t,r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=null!==(t=rv.popScheduler(n))&&void 0!==t?t:tv.asyncScheduler,u=null!==(r=n[0])&&void 0!==r?r:null,a=n[1]||1/0;return Xd.operate((function(t,r){var n=[],i=!1,c=function(e){var t=e.buffer;e.subs.unsubscribe(),ev.arrRemove(n,e),r.next(t),i&&s()},s=function(){if(n){var t=new Hd.Subscription;r.add(t);var i={buffer:[],subs:t};n.push(i),nv.executeSchedule(t,o,(function(){return c(i)}),e)}};null!==u&&u>=0?nv.executeSchedule(r,o,s,u,!0):i=!0,s();var l=Zd.createOperatorSubscriber(r,(function(e){var t,r,i=n.slice();try{for(var o=$d(i),u=o.next();!u.done;u=o.next()){var s=u.value,l=s.buffer;l.push(e),a<=l.length&&c(s)}}catch(e){t={error:e}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}}),(function(){for(;null==n?void 0:n.length;)r.next(n.shift().buffer);null==l||l.unsubscribe(),r.complete(),r.unsubscribe()}),void 0,(function(){return n=null}));t.subscribe(l)}))};var iv={},ov=a&&a.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};iv.bufferToggle=void 0;var uv=Ji,av=Co,cv=Ma,sv=Mo,lv=so,fv=Qi;iv.bufferToggle=function(e,t){return av.operate((function(r,n){var i=[];cv.innerFrom(e).subscribe(sv.createOperatorSubscriber(n,(function(e){var r=[];i.push(r);var o=new uv.Subscription;o.add(cv.innerFrom(t(e)).subscribe(sv.createOperatorSubscriber(n,(function(){fv.arrRemove(i,r),n.next(r),o.unsubscribe()}),lv.noop)))}),lv.noop)),r.subscribe(sv.createOperatorSubscriber(n,(function(e){var t,r;try{for(var n=ov(i),o=n.next();!o.done;o=n.next()){o.value.push(e)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}}),(function(){for(;i.length>0;)n.next(i.shift());n.complete()})))}))};var dv={bufferWhen:void 0},vv=Co,hv=so,pv=Mo,yv=Ma;dv.bufferWhen=function(e){return vv.operate((function(t,r){var n=null,i=null,o=function(){null==i||i.unsubscribe();var t=n;n=[],t&&r.next(t),yv.innerFrom(e()).subscribe(i=pv.createOperatorSubscriber(r,o,hv.noop))};o(),t.subscribe(pv.createOperatorSubscriber(r,(function(e){return null==n?void 0:n.push(e)}),(function(){n&&r.next(n),r.complete()}),void 0,(function(){return n=i=null})))}))};var bv={catchError:void 0},mv=Ma,gv=Mo,wv=Co;bv.catchError=function e(t){return wv.operate((function(r,n){var i,o=null,u=!1;o=r.subscribe(gv.createOperatorSubscriber(n,void 0,void 0,(function(a){i=mv.innerFrom(t(a,e(t)(r))),o?(o.unsubscribe(),o=null,i.subscribe(n)):u=!0}))),u&&(o.unsubscribe(),o=null,i.subscribe(n))}))};var Ov={},Sv={},_v={},xv={},Pv={},Av={scanInternals:void 0},Ev=Mo;Av.scanInternals=function(e,t,r,n,i){return function(o,u){var a=r,c=t,s=0;o.subscribe(Ev.createOperatorSubscriber(u,(function(t){var r=s++;c=a?e(c,t,r):(a=!0,t),n&&u.next(c)}),i&&function(){a&&u.next(c),u.complete()}))}},Pv.reduce=void 0;var jv=Av,Tv=Co;Pv.reduce=function(e,t){return Tv.operate(jv.scanInternals(e,t,arguments.length>=2,!1,!0))},xv.toArray=void 0;var Iv=Pv,kv=Co,Cv=function(e,t){return e.push(t),e};xv.toArray=function(){return kv.operate((function(e,t){Iv.reduce(Cv,[])(e).subscribe(t)}))},_v.joinAllInternals=void 0;var Fv=mo,Nv=Ms,Mv=bo,Rv=Ol,zv=xv;_v.joinAllInternals=function(e,t){return Mv.pipe(zv.toArray(),Rv.mergeMap((function(t){return e(t)})),t?Nv.mapOneOrManyArgs(t):Fv.identity)},Sv.combineLatestAll=void 0;var Bv=el,qv=_v;Sv.combineLatestAll=function(e){return qv.joinAllInternals(Bv.combineLatest,e)},Ov.combineAll=void 0;var Dv=Sv;Ov.combineAll=Dv.combineLatestAll;var Lv={},Uv={},Vv=a&&a.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)u.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u},Wv=a&&a.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Uv.combineLatest=void 0;var Jv=el,Gv=Co,Kv=Lf,Yv=Ms,Qv=bo,$v=Aa;Uv.combineLatest=function e(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=$v.popResultSelector(t);return n?Qv.pipe(e.apply(void 0,Wv([],Vv(t))),Yv.mapOneOrManyArgs(n)):Gv.operate((function(e,r){Jv.combineLatestInit(Wv([e],Vv(Kv.argsOrArgArray(t))))(r)}))};var Hv=a&&a.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)u.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u},Xv=a&&a.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Lv.combineLatestWith=void 0;var Zv=Uv;Lv.combineLatestWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Zv.combineLatest.apply(void 0,Xv([],Hv(e)))};var eh={concatMap:void 0},th=Ol,rh=Wi;eh.concatMap=function(e,t){return rh.isFunction(t)?th.mergeMap(e,t,1):th.mergeMap(e,1)};var nh={concatMapTo:void 0},ih=eh,oh=Wi;nh.concatMapTo=function(e,t){return oh.isFunction(t)?ih.concatMap((function(){return e}),t):ih.concatMap((function(){return e}))};var uh={},ah={},ch=a&&a.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)u.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u},sh=a&&a.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};ah.concat=void 0;var lh=Co,fh=gl,dh=Aa,vh=Ca;ah.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=dh.popScheduler(e);return lh.operate((function(t,n){fh.concatAll()(vh.from(sh([t],ch(e)),r)).subscribe(n)}))};var hh=a&&a.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)u.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u},ph=a&&a.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};uh.concatWith=void 0;var yh=ah;uh.concatWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return yh.concat.apply(void 0,ph([],hh(e)))};var bh={},mh={fromSubscribable:void 0},gh=Ui;mh.fromSubscribable=function(e){return new gh.Observable((function(t){return e.subscribe(t)}))},bh.connect=void 0;var wh=ru,Oh=Ma,Sh=Co,_h=mh,xh={connector:function(){return new wh.Subject}};bh.connect=function(e,t){void 0===t&&(t=xh);var r=t.connector;return Sh.operate((function(t,n){var i=r();Oh.innerFrom(e(_h.fromSubscribable(i))).subscribe(n),n.add(t.subscribe(i))}))};var Ph={count:void 0},Ah=Pv;Ph.count=function(e){return Ah.reduce((function(t,r,n){return!e||e(r,n)?t+1:t}),0)};var Eh={debounce:void 0},jh=Co,Th=so,Ih=Mo,kh=Ma;Eh.debounce=function(e){return jh.operate((function(t,r){var n=!1,i=null,o=null,u=function(){if(null==o||o.unsubscribe(),o=null,n){n=!1;var e=i;i=null,r.next(e)}};t.subscribe(Ih.createOperatorSubscriber(r,(function(t){null==o||o.unsubscribe(),n=!0,i=t,o=Ih.createOperatorSubscriber(r,u,Th.noop),kh.innerFrom(e(t)).subscribe(o)}),(function(){u(),r.complete()}),void 0,(function(){i=o=null})))}))};var Ch={debounceTime:void 0},Fh=ta,Nh=Co,Mh=Mo;Ch.debounceTime=function(e,t){return void 0===t&&(t=Fh.asyncScheduler),Nh.operate((function(r,n){var i=null,o=null,u=null,a=function(){if(i){i.unsubscribe(),i=null;var e=o;o=null,n.next(e)}};function c(){var r=u+e,o=t.now();if(o<r)return i=this.schedule(void 0,r-o),void n.add(i);a()}r.subscribe(Mh.createOperatorSubscriber(n,(function(r){o=r,u=t.now(),i||(i=t.schedule(c,e),n.add(i))}),(function(){a(),n.complete()}),void 0,(function(){o=i=null})))}))};var Rh={defaultIfEmpty:void 0},zh=Co,Bh=Mo;Rh.defaultIfEmpty=function(e){return zh.operate((function(t,r){var n=!1;t.subscribe(Bh.createOperatorSubscriber(r,(function(e){n=!0,r.next(e)}),(function(){n||r.next(e),r.complete()})))}))};var qh={},Dh={},Lh={take:void 0},Uh=xa,Vh=Co,Wh=Mo;Lh.take=function(e){return e<=0?function(){return Uh.EMPTY}:Vh.operate((function(t,r){var n=0;t.subscribe(Wh.createOperatorSubscriber(r,(function(t){++n<=e&&(r.next(t),e<=n&&r.complete())})))}))};var Jh={ignoreElements:void 0},Gh=Co,Kh=Mo,Yh=so;Jh.ignoreElements=function(){return Gh.operate((function(e,t){e.subscribe(Kh.createOperatorSubscriber(t,Yh.noop))}))};var Qh={mapTo:void 0},$h=Rs;Qh.mapTo=function(e){return $h.map((function(){return e}))},Dh.delayWhen=void 0;var Hh=ml,Xh=Lh,Zh=Jh,ep=Qh,tp=Ol;Dh.delayWhen=function e(t,r){return r?function(n){return Hh.concat(r.pipe(Xh.take(1),Zh.ignoreElements()),n.pipe(e(t)))}:tp.mergeMap((function(e,r){return t(e,r).pipe(Xh.take(1),ep.mapTo(e))}))},qh.delay=void 0;var rp=ta,np=Dh,ip=Pf;qh.delay=function(e,t){void 0===t&&(t=rp.asyncScheduler);var r=ip.timer(e,t);return np.delayWhen((function(){return r}))};var op={dematerialize:void 0},up=_a,ap=Co,cp=Mo;op.dematerialize=function(){return ap.operate((function(e,t){e.subscribe(cp.createOperatorSubscriber(t,(function(e){return up.observeNotification(e,t)})))}))};var sp={distinct:void 0},lp=Co,fp=Mo,dp=so;sp.distinct=function(e,t){return lp.operate((function(r,n){var i=new Set;r.subscribe(fp.createOperatorSubscriber(n,(function(t){var r=e?e(t):t;i.has(r)||(i.add(r),n.next(t))}))),null==t||t.subscribe(fp.createOperatorSubscriber(n,(function(){return i.clear()}),dp.noop))}))};var vp={distinctUntilChanged:void 0},hp=mo,pp=Co,yp=Mo;function bp(e,t){return e===t}vp.distinctUntilChanged=function(e,t){return void 0===t&&(t=hp.identity),e=null!=e?e:bp,pp.operate((function(r,n){var i,o=!0;r.subscribe(yp.createOperatorSubscriber(n,(function(r){var u=t(r);!o&&e(i,u)||(o=!1,i=u,n.next(r))})))}))};var mp={distinctUntilKeyChanged:void 0},gp=vp;mp.distinctUntilKeyChanged=function(e,t){return gp.distinctUntilChanged((function(r,n){return t?t(r[e],n[e]):r[e]===n[e]}))};var wp={},Op={throwIfEmpty:void 0},Sp=gs,_p=Co,xp=Mo;function Pp(){return new Sp.EmptyError}Op.throwIfEmpty=function(e){return void 0===e&&(e=Pp),_p.operate((function(t,r){var n=!1;t.subscribe(xp.createOperatorSubscriber(r,(function(e){n=!0,r.next(e)}),(function(){return n?r.complete():r.error(e())})))}))},wp.elementAt=void 0;var Ap=Ps,Ep=nd,jp=Op,Tp=Rh,Ip=Lh;wp.elementAt=function(e,t){if(e<0)throw new Ap.ArgumentOutOfRangeError;var r=arguments.length>=2;return function(n){return n.pipe(Ep.filter((function(t,r){return r===e})),Ip.take(1),r?Tp.defaultIfEmpty(t):jp.throwIfEmpty((function(){return new Ap.ArgumentOutOfRangeError})))}};var kp={},Cp=a&&a.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)u.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u},Fp=a&&a.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};kp.endWith=void 0;var Np=ml,Mp=Pa;kp.endWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return Np.concat(t,Mp.of.apply(void 0,Fp([],Cp(e))))}};var Rp={every:void 0},zp=Co,Bp=Mo;Rp.every=function(e,t){return zp.operate((function(r,n){var i=0;r.subscribe(Bp.createOperatorSubscriber(n,(function(o){e.call(t,o,i++,r)||(n.next(!1),n.complete())}),(function(){n.next(!0),n.complete()})))}))};var qp={},Dp={},Lp={exhaustMap:void 0},Up=Rs,Vp=Ma,Wp=Co,Jp=Mo;Lp.exhaustMap=function e(t,r){return r?function(n){return n.pipe(e((function(e,n){return Vp.innerFrom(t(e,n)).pipe(Up.map((function(t,i){return r(e,t,n,i)})))})))}:Wp.operate((function(e,r){var n=0,i=null,o=!1;e.subscribe(Jp.createOperatorSubscriber(r,(function(e){i||(i=Jp.createOperatorSubscriber(r,void 0,(function(){i=null,o&&r.complete()})),Vp.innerFrom(t(e,n++)).subscribe(i))}),(function(){o=!0,!i&&r.complete()})))}))},Dp.exhaustAll=void 0;var Gp=Lp,Kp=mo;Dp.exhaustAll=function(){return Gp.exhaustMap(Kp.identity)},qp.exhaust=void 0;var Yp=Dp;qp.exhaust=Yp.exhaustAll;var Qp={expand:void 0},$p=Co,Hp=Sl;Qp.expand=function(e,t,r){return void 0===t&&(t=1/0),t=(t||0)<1?1/0:t,$p.operate((function(n,i){return Hp.mergeInternals(n,i,e,t,void 0,!0,r)}))};var Xp={finalize:void 0},Zp=Co;Xp.finalize=function(e){return Zp.operate((function(t,r){try{t.subscribe(r)}finally{r.add(e)}}))};var ey={};ey.createFind=ey.find=void 0;var ty=Co,ry=Mo;function ny(e,t,r){var n="index"===r;return function(r,i){var o=0;r.subscribe(ry.createOperatorSubscriber(i,(function(u){var a=o++;e.call(t,u,a,r)&&(i.next(n?a:u),i.complete())}),(function(){i.next(n?-1:void 0),i.complete()})))}}ey.find=function(e,t){return ty.operate(ny(e,t,"value"))},ey.createFind=ny;var iy={findIndex:void 0},oy=Co,uy=ey;iy.findIndex=function(e,t){return oy.operate(uy.createFind(e,t,"index"))};var ay={first:void 0},cy=gs,sy=nd,ly=Lh,fy=Rh,dy=Op,vy=mo;ay.first=function(e,t){var r=arguments.length>=2;return function(n){return n.pipe(e?sy.filter((function(t,r){return e(t,r,n)})):vy.identity,ly.take(1),r?fy.defaultIfEmpty(t):dy.throwIfEmpty((function(){return new cy.EmptyError})))}};var hy={groupBy:void 0},py=Ui,yy=Ma,by=ru,my=Co,gy=Mo;hy.groupBy=function(e,t,r,n){return my.operate((function(i,o){var u;t&&"function"!=typeof t?(r=t.duration,u=t.element,n=t.connector):u=t;var a=new Map,c=function(e){a.forEach(e),e(o)},s=function(e){return c((function(t){return t.error(e)}))},l=0,f=!1,d=new gy.OperatorSubscriber(o,(function(t){try{var i=e(t),c=a.get(i);if(!c){a.set(i,c=n?n():new by.Subject);var v=function(e,t){var r=new py.Observable((function(e){l++;var r=t.subscribe(e);return function(){r.unsubscribe(),0==--l&&f&&d.unsubscribe()}}));return r.key=e,r}(i,c);if(o.next(v),r){var h=gy.createOperatorSubscriber(c,(function(){c.complete(),null==h||h.unsubscribe()}),void 0,void 0,(function(){return a.delete(i)}));d.add(yy.innerFrom(r(v)).subscribe(h))}}c.next(u?u(t):t)}catch(e){s(e)}}),(function(){return c((function(e){return e.complete()}))}),s,(function(){return a.clear()}),(function(){return f=!0,0===l}));i.subscribe(d)}))};var wy={isEmpty:void 0},Oy=Co,Sy=Mo;wy.isEmpty=function(){return Oy.operate((function(e,t){e.subscribe(Sy.createOperatorSubscriber(t,(function(){t.next(!1),t.complete()}),(function(){t.next(!0),t.complete()})))}))};var _y={},xy={},Py=a&&a.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};xy.takeLast=void 0;var Ay=xa,Ey=Co,jy=Mo;xy.takeLast=function(e){return e<=0?function(){return Ay.EMPTY}:Ey.operate((function(t,r){var n=[];t.subscribe(jy.createOperatorSubscriber(r,(function(t){n.push(t),e<n.length&&n.shift()}),(function(){var e,t;try{for(var i=Py(n),o=i.next();!o.done;o=i.next()){var u=o.value;r.next(u)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}r.complete()}),void 0,(function(){n=null})))}))},_y.last=void 0;var Ty=gs,Iy=nd,ky=xy,Cy=Op,Fy=Rh,Ny=mo;_y.last=function(e,t){var r=arguments.length>=2;return function(n){return n.pipe(e?Iy.filter((function(t,r){return e(t,r,n)})):Ny.identity,ky.takeLast(1),r?Fy.defaultIfEmpty(t):Cy.throwIfEmpty((function(){return new Ty.EmptyError})))}};var My={materialize:void 0},Ry=_a,zy=Co,By=Mo;My.materialize=function(){return zy.operate((function(e,t){e.subscribe(By.createOperatorSubscriber(t,(function(e){t.next(Ry.Notification.createNext(e))}),(function(){t.next(Ry.Notification.createComplete()),t.complete()}),(function(e){t.next(Ry.Notification.createError(e)),t.complete()})))}))};var qy={max:void 0},Dy=Pv,Ly=Wi;qy.max=function(e){return Dy.reduce(Ly.isFunction(e)?function(t,r){return e(t,r)>0?t:r}:function(e,t){return e>t?e:t})};var Uy={flatMap:void 0},Vy=Ol;Uy.flatMap=Vy.mergeMap;var Wy={mergeMapTo:void 0},Jy=Ol,Gy=Wi;Wy.mergeMapTo=function(e,t,r){return void 0===r&&(r=1/0),Gy.isFunction(t)?Jy.mergeMap((function(){return e}),t,r):("number"==typeof t&&(r=t),Jy.mergeMap((function(){return e}),r))};var Ky={mergeScan:void 0},Yy=Co,Qy=Sl;Ky.mergeScan=function(e,t,r){return void 0===r&&(r=1/0),Yy.operate((function(n,i){var o=t;return Qy.mergeInternals(n,i,(function(t,r){return e(o,t,r)}),r,(function(e){o=e}),!1,void 0,(function(){return o=null}))}))};var $y={},Hy={},Xy=a&&a.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)u.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u},Zy=a&&a.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Hy.merge=void 0;var eb=Co,tb=Lf,rb=wl,nb=Aa,ib=Ca;Hy.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=nb.popScheduler(e),n=nb.popNumber(e,1/0);return e=tb.argsOrArgArray(e),eb.operate((function(t,i){rb.mergeAll(n)(ib.from(Zy([t],Xy(e)),r)).subscribe(i)}))};var ob=a&&a.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)u.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u},ub=a&&a.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};$y.mergeWith=void 0;var ab=Hy;$y.mergeWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ab.merge.apply(void 0,ub([],ob(e)))};var cb={min:void 0},sb=Pv,lb=Wi;cb.min=function(e){return sb.reduce(lb.isFunction(e)?function(t,r){return e(t,r)<0?t:r}:function(e,t){return e<t?e:t})};var fb={multicast:void 0},db=Io,vb=Wi,hb=bh;fb.multicast=function(e,t){var r=vb.isFunction(e)?e:function(){return e};return vb.isFunction(t)?hb.connect(t,{connector:r}):function(e){return new db.ConnectableObservable(e,r)}};var pb={pairwise:void 0},yb=Co,bb=Mo;pb.pairwise=function(){return yb.operate((function(e,t){var r,n=!1;e.subscribe(bb.createOperatorSubscriber(t,(function(e){var i=r;r=e,n&&t.next([i,e]),n=!0})))}))};var mb={pluck:void 0},gb=Rs;mb.pluck=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.length;if(0===r)throw new Error("list of properties cannot be empty.");return gb.map((function(t){for(var n=t,i=0;i<r;i++){var o=null==n?void 0:n[e[i]];if(void 0===o)return;n=o}return n}))};var wb={publish:void 0},Ob=ru,Sb=fb,_b=bh;wb.publish=function(e){return e?function(t){return _b.connect(e)(t)}:function(e){return Sb.multicast(new Ob.Subject)(e)}};var xb={publishBehavior:void 0},Pb=hu,Ab=Io;xb.publishBehavior=function(e){return function(t){var r=new Pb.BehaviorSubject(e);return new Ab.ConnectableObservable(t,(function(){return r}))}};var Eb={publishLast:void 0},jb=Su,Tb=Io;Eb.publishLast=function(){return function(e){var t=new jb.AsyncSubject;return new Tb.ConnectableObservable(e,(function(){return t}))}};var Ib={publishReplay:void 0},kb=bu,Cb=fb,Fb=Wi;Ib.publishReplay=function(e,t,r,n){r&&!Fb.isFunction(r)&&(n=r);var i=Fb.isFunction(r)?r:void 0;return function(r){return Cb.multicast(new kb.ReplaySubject(e,t,n),i)(r)}};var Nb={},Mb=a&&a.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)u.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u},Rb=a&&a.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Nb.raceWith=void 0;var zb=sd,Bb=Co,qb=mo;Nb.raceWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length?Bb.operate((function(t,r){zb.raceInit(Rb([t],Mb(e)))(r)})):qb.identity};var Db={repeat:void 0},Lb=xa,Ub=Co,Vb=Mo,Wb=Ma,Jb=Pf;Db.repeat=function(e){var t,r,n=1/0;return null!=e&&("object"==typeof e?(t=e.count,n=void 0===t?1/0:t,r=e.delay):n=e),n<=0?function(){return Lb.EMPTY}:Ub.operate((function(e,t){var i,o=0,u=function(){if(null==i||i.unsubscribe(),i=null,null!=r){var e="number"==typeof r?Jb.timer(r):Wb.innerFrom(r(o)),n=Vb.createOperatorSubscriber(t,(function(){n.unsubscribe(),a()}));e.subscribe(n)}else a()},a=function(){var r=!1;i=e.subscribe(Vb.createOperatorSubscriber(t,void 0,(function(){++o<n?i?u():r=!0:t.complete()}))),r&&u()};a()}))};var Gb={repeatWhen:void 0},Kb=ru,Yb=Co,Qb=Mo;Gb.repeatWhen=function(e){return Yb.operate((function(t,r){var n,i,o=!1,u=!1,a=!1,c=function(){return a&&u&&(r.complete(),!0)},s=function(){a=!1,n=t.subscribe(Qb.createOperatorSubscriber(r,void 0,(function(){a=!0,!c()&&(i||(i=new Kb.Subject,e(i).subscribe(Qb.createOperatorSubscriber(r,(function(){n?s():o=!0}),(function(){u=!0,c()})))),i).next()}))),o&&(n.unsubscribe(),n=null,o=!1,s())};s()}))};var $b={retry:void 0},Hb=Co,Xb=Mo,Zb=mo,em=Pf,tm=Ma;$b.retry=function(e){var t;void 0===e&&(e=1/0);var r=(t=e&&"object"==typeof e?e:{count:e}).count,n=void 0===r?1/0:r,i=t.delay,o=t.resetOnSuccess,u=void 0!==o&&o;return n<=0?Zb.identity:Hb.operate((function(e,t){var r,o=0,a=function(){var c=!1;r=e.subscribe(Xb.createOperatorSubscriber(t,(function(e){u&&(o=0),t.next(e)}),void 0,(function(e){if(o++<n){var u=function(){r?(r.unsubscribe(),r=null,a()):c=!0};if(null!=i){var s="number"==typeof i?em.timer(i):tm.innerFrom(i(e,o)),l=Xb.createOperatorSubscriber(t,(function(){l.unsubscribe(),u()}),(function(){t.complete()}));s.subscribe(l)}else u()}else t.error(e)}))),c&&(r.unsubscribe(),r=null,a())};a()}))};var rm={retryWhen:void 0},nm=ru,im=Co,om=Mo;rm.retryWhen=function(e){return im.operate((function(t,r){var n,i,o=!1,u=function(){n=t.subscribe(om.createOperatorSubscriber(r,void 0,void 0,(function(t){i||(i=new nm.Subject,e(i).subscribe(om.createOperatorSubscriber(r,(function(){return n?u():o=!0})))),i&&i.next(t)}))),o&&(n.unsubscribe(),n=null,o=!1,u())};u()}))};var um={sample:void 0},am=Co,cm=so,sm=Mo;um.sample=function(e){return am.operate((function(t,r){var n=!1,i=null;t.subscribe(sm.createOperatorSubscriber(r,(function(e){n=!0,i=e}))),e.subscribe(sm.createOperatorSubscriber(r,(function(){if(n){n=!1;var e=i;i=null,r.next(e)}}),cm.noop))}))};var lm={sampleTime:void 0},fm=ta,dm=um,vm=xf;lm.sampleTime=function(e,t){return void 0===t&&(t=fm.asyncScheduler),dm.sample(vm.interval(e,t))};var hm={scan:void 0},pm=Co,ym=Av;hm.scan=function(e,t){return pm.operate(ym.scanInternals(e,t,arguments.length>=2,!0))};var bm={sequenceEqual:void 0},mm=Co,gm=Mo;bm.sequenceEqual=function(e,t){return void 0===t&&(t=function(e,t){return e===t}),mm.operate((function(r,n){var i={buffer:[],complete:!1},o={buffer:[],complete:!1},u=function(e){n.next(e),n.complete()},a=function(e,r){var i=gm.createOperatorSubscriber(n,(function(n){var i=r.buffer,o=r.complete;0===i.length?o?u(!1):e.buffer.push(n):!t(n,i.shift())&&u(!1)}),(function(){e.complete=!0;var t=r.complete,n=r.buffer;t&&u(0===n.length),null==i||i.unsubscribe()}));return i};r.subscribe(a(i,o)),e.subscribe(a(o,i))}))};var wm={},Om=a&&a.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)u.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u},Sm=a&&a.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};wm.share=void 0;var _m=Ma,xm=ru,Pm=Vi,Am=Co;function Em(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];if(!0!==t){if(!1!==t){var i=new Pm.SafeSubscriber({next:function(){i.unsubscribe(),e()}});return t.apply(void 0,Sm([],Om(r))).subscribe(i)}}else e()}wm.share=function(e){void 0===e&&(e={});var t=e.connector,r=void 0===t?function(){return new xm.Subject}:t,n=e.resetOnError,i=void 0===n||n,o=e.resetOnComplete,u=void 0===o||o,a=e.resetOnRefCountZero,c=void 0===a||a;return function(e){var t,n,o,a=0,s=!1,l=!1,f=function(){null==n||n.unsubscribe(),n=void 0},d=function(){f(),t=o=void 0,s=l=!1},v=function(){var e=t;d(),null==e||e.unsubscribe()};return Am.operate((function(e,h){a++,l||s||f();var p=o=null!=o?o:r();h.add((function(){0!==--a||l||s||(n=Em(v,c))})),p.subscribe(h),!t&&a>0&&(t=new Pm.SafeSubscriber({next:function(e){return p.next(e)},error:function(e){l=!0,f(),n=Em(d,i,e),p.error(e)},complete:function(){s=!0,f(),n=Em(d,u),p.complete()}}),_m.innerFrom(e).subscribe(t))}))(e)}};var jm={shareReplay:void 0},Tm=bu,Im=wm;jm.shareReplay=function(e,t,r){var n,i,o,u,a=!1;return e&&"object"==typeof e?(n=e.bufferSize,u=void 0===n?1/0:n,i=e.windowTime,t=void 0===i?1/0:i,a=void 0!==(o=e.refCount)&&o,r=e.scheduler):u=null!=e?e:1/0,Im.share({connector:function(){return new Tm.ReplaySubject(u,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:a})};var km={single:void 0},Cm=gs,Fm=Ts,Nm=Es,Mm=Co,Rm=Mo;km.single=function(e){return Mm.operate((function(t,r){var n,i=!1,o=!1,u=0;t.subscribe(Rm.createOperatorSubscriber(r,(function(a){o=!0,e&&!e(a,u++,t)||(i&&r.error(new Fm.SequenceError("Too many matching values")),i=!0,n=a)}),(function(){i?(r.next(n),r.complete()):r.error(o?new Nm.NotFoundError("No matching values"):new Cm.EmptyError)})))}))};var zm={skip:void 0},Bm=nd;zm.skip=function(e){return Bm.filter((function(t,r){return e<=r}))};var qm={skipLast:void 0},Dm=mo,Lm=Co,Um=Mo;qm.skipLast=function(e){return e<=0?Dm.identity:Lm.operate((function(t,r){var n=new Array(e),i=0;return t.subscribe(Um.createOperatorSubscriber(r,(function(t){var o=i++;if(o<e)n[o]=t;else{var u=o%e,a=n[u];n[u]=t,r.next(a)}}))),function(){n=null}}))};var Vm={skipUntil:void 0},Wm=Co,Jm=Mo,Gm=Ma,Km=so;Vm.skipUntil=function(e){return Wm.operate((function(t,r){var n=!1,i=Jm.createOperatorSubscriber(r,(function(){null==i||i.unsubscribe(),n=!0}),Km.noop);Gm.innerFrom(e).subscribe(i),t.subscribe(Jm.createOperatorSubscriber(r,(function(e){return n&&r.next(e)})))}))};var Ym={skipWhile:void 0},Qm=Co,$m=Mo;Ym.skipWhile=function(e){return Qm.operate((function(t,r){var n=!1,i=0;t.subscribe($m.createOperatorSubscriber(r,(function(t){return(n||(n=!e(t,i++)))&&r.next(t)})))}))};var Hm={startWith:void 0},Xm=ml,Zm=Aa,eg=Co;Hm.startWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Zm.popScheduler(e);return eg.operate((function(t,n){(r?Xm.concat(e,t,r):Xm.concat(e,t)).subscribe(n)}))};var tg={},rg={switchMap:void 0},ng=Ma,ig=Co,og=Mo;rg.switchMap=function(e,t){return ig.operate((function(r,n){var i=null,o=0,u=!1,a=function(){return u&&!i&&n.complete()};r.subscribe(og.createOperatorSubscriber(n,(function(r){null==i||i.unsubscribe();var u=0,c=o++;ng.innerFrom(e(r,c)).subscribe(i=og.createOperatorSubscriber(n,(function(e){return n.next(t?t(r,e,c,u++):e)}),(function(){i=null,a()})))}),(function(){u=!0,a()})))}))},tg.switchAll=void 0;var ug=rg,ag=mo;tg.switchAll=function(){return ug.switchMap(ag.identity)};var cg={switchMapTo:void 0},sg=rg,lg=Wi;cg.switchMapTo=function(e,t){return lg.isFunction(t)?sg.switchMap((function(){return e}),t):sg.switchMap((function(){return e}))};var fg={switchScan:void 0},dg=rg,vg=Co;fg.switchScan=function(e,t){return vg.operate((function(r,n){var i=t;return dg.switchMap((function(t,r){return e(i,t,r)}),(function(e,t){return i=t,t}))(r).subscribe(n),function(){i=null}}))};var hg={takeUntil:void 0},pg=Co,yg=Mo,bg=Ma,mg=so;hg.takeUntil=function(e){return pg.operate((function(t,r){bg.innerFrom(e).subscribe(yg.createOperatorSubscriber(r,(function(){return r.complete()}),mg.noop)),!r.closed&&t.subscribe(r)}))};var gg={takeWhile:void 0},wg=Co,Og=Mo;gg.takeWhile=function(e,t){return void 0===t&&(t=!1),wg.operate((function(r,n){var i=0;r.subscribe(Og.createOperatorSubscriber(n,(function(r){var o=e(r,i++);(o||t)&&n.next(r),!o&&n.complete()})))}))};var Sg={tap:void 0},_g=Wi,xg=Co,Pg=Mo,Ag=mo;Sg.tap=function(e,t,r){var n=_g.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return n?xg.operate((function(e,t){var r;null===(r=n.subscribe)||void 0===r||r.call(n);var i=!0;e.subscribe(Pg.createOperatorSubscriber(t,(function(e){var r;null===(r=n.next)||void 0===r||r.call(n,e),t.next(e)}),(function(){var e;i=!1,null===(e=n.complete)||void 0===e||e.call(n),t.complete()}),(function(e){var r;i=!1,null===(r=n.error)||void 0===r||r.call(n,e),t.error(e)}),(function(){var e,t;i&&(null===(e=n.unsubscribe)||void 0===e||e.call(n)),null===(t=n.finalize)||void 0===t||t.call(n)})))})):Ag.identity};var Eg={};!function(e){e.throttle=e.defaultThrottleConfig=void 0;var t=Co,r=Mo,n=Ma;e.defaultThrottleConfig={leading:!0,trailing:!1},e.throttle=function(i,o){return void 0===o&&(o=e.defaultThrottleConfig),t.operate((function(e,t){var u=o.leading,a=o.trailing,c=!1,s=null,l=null,f=!1,d=function(){null==l||l.unsubscribe(),l=null,a&&(p(),f&&t.complete())},v=function(){l=null,f&&t.complete()},h=function(e){return l=n.innerFrom(i(e)).subscribe(r.createOperatorSubscriber(t,d,v))},p=function(){if(c){c=!1;var e=s;s=null,t.next(e),!f&&h(e)}};e.subscribe(r.createOperatorSubscriber(t,(function(e){c=!0,s=e,(!l||l.closed)&&(u?p():h(e))}),(function(){f=!0,(!(a&&c&&l)||l.closed)&&t.complete()})))}))}}(Eg);var jg={throttleTime:void 0},Tg=ta,Ig=Eg,kg=Pf;jg.throttleTime=function(e,t,r){void 0===t&&(t=Tg.asyncScheduler),void 0===r&&(r=Ig.defaultThrottleConfig);var n=kg.timer(e,t);return Ig.throttle((function(){return n}),r)};var Cg={};Cg.TimeInterval=Cg.timeInterval=void 0;var Fg=ta,Ng=Co,Mg=Mo;Cg.timeInterval=function(e){return void 0===e&&(e=Fg.asyncScheduler),Ng.operate((function(t,r){var n=e.now();t.subscribe(Mg.createOperatorSubscriber(r,(function(t){var i=e.now(),o=i-n;n=i,r.next(new Rg(t,o))})))}))};var Rg=function(e,t){this.value=e,this.interval=t};Cg.TimeInterval=Rg;var zg={timeoutWith:void 0},Bg=ta,qg=Cs,Dg=ks;zg.timeoutWith=function(e,t,r){var n,i,o;if(r=null!=r?r:Bg.async,qg.isValidDate(e)?n=e:"number"==typeof e&&(i=e),!t)throw new TypeError("No observable provided to switch to");if(o=function(){return t},null==n&&null==i)throw new TypeError("No timeout provided.");return Dg.timeout({first:n,each:i,scheduler:r,with:o})};var Lg={timestamp:void 0},Ug=mu,Vg=Rs;Lg.timestamp=function(e){return void 0===e&&(e=Ug.dateTimestampProvider),Vg.map((function(t){return{value:t,timestamp:e.now()}}))};var Wg={window:void 0},Jg=ru,Gg=Co,Kg=Mo,Yg=so;Wg.window=function(e){return Gg.operate((function(t,r){var n=new Jg.Subject;r.next(n.asObservable());var i=function(e){n.error(e),r.error(e)};return t.subscribe(Kg.createOperatorSubscriber(r,(function(e){return null==n?void 0:n.next(e)}),(function(){n.complete(),r.complete()}),i)),e.subscribe(Kg.createOperatorSubscriber(r,(function(){n.complete(),r.next(n=new Jg.Subject)}),Yg.noop,i)),function(){null==n||n.unsubscribe(),n=null}}))};var Qg={},$g=a&&a.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Qg.windowCount=void 0;var Hg=ru,Xg=Co,Zg=Mo;Qg.windowCount=function(e,t){void 0===t&&(t=0);var r=t>0?t:e;return Xg.operate((function(t,n){var i=[new Hg.Subject],o=0;n.next(i[0].asObservable()),t.subscribe(Zg.createOperatorSubscriber(n,(function(t){var u,a;try{for(var c=$g(i),s=c.next();!s.done;s=c.next()){s.value.next(t)}}catch(e){u={error:e}}finally{try{s&&!s.done&&(a=c.return)&&a.call(c)}finally{if(u)throw u.error}}var l=o-e+1;if(l>=0&&l%r==0&&i.shift().complete(),++o%r==0){var f=new Hg.Subject;i.push(f),n.next(f.asObservable())}}),(function(){for(;i.length>0;)i.shift().complete();n.complete()}),(function(e){for(;i.length>0;)i.shift().error(e);n.error(e)}),(function(){i=null})))}))};var ew={windowTime:void 0},tw=ru,rw=ta,nw=Ji,iw=Co,ow=Mo,uw=Qi,aw=Aa,cw=_c;ew.windowTime=function(e){for(var t,r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=null!==(t=aw.popScheduler(n))&&void 0!==t?t:rw.asyncScheduler,u=null!==(r=n[0])&&void 0!==r?r:null,a=n[1]||1/0;return iw.operate((function(t,r){var n=[],i=!1,c=function(e){var t=e.window,r=e.subs;t.complete(),r.unsubscribe(),uw.arrRemove(n,e),i&&s()},s=function(){if(n){var t=new nw.Subscription;r.add(t);var i=new tw.Subject,u={window:i,subs:t,seen:0};n.push(u),r.next(i.asObservable()),cw.executeSchedule(t,o,(function(){return c(u)}),e)}};null!==u&&u>=0?cw.executeSchedule(r,o,s,u,!0):i=!0,s();var l=function(e){return n.slice().forEach(e)},f=function(e){l((function(t){var r=t.window;return e(r)})),e(r),r.unsubscribe()};return t.subscribe(ow.createOperatorSubscriber(r,(function(e){l((function(t){t.window.next(e),a<=++t.seen&&c(t)}))}),(function(){return f((function(e){return e.complete()}))}),(function(e){return f((function(t){return t.error(e)}))}))),function(){n=null}}))};var sw={},lw=a&&a.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};sw.windowToggle=void 0;var fw=ru,dw=Ji,vw=Co,hw=Ma,pw=Mo,yw=so,bw=Qi;sw.windowToggle=function(e,t){return vw.operate((function(r,n){var i=[],o=function(e){for(;0<i.length;)i.shift().error(e);n.error(e)};hw.innerFrom(e).subscribe(pw.createOperatorSubscriber(n,(function(e){var r=new fw.Subject;i.push(r);var u,a=new dw.Subscription;try{u=hw.innerFrom(t(e))}catch(e){return void o(e)}n.next(r.asObservable()),a.add(u.subscribe(pw.createOperatorSubscriber(n,(function(){bw.arrRemove(i,r),r.complete(),a.unsubscribe()}),yw.noop,o)))}),yw.noop)),r.subscribe(pw.createOperatorSubscriber(n,(function(e){var t,r,n=i.slice();try{for(var o=lw(n),u=o.next();!u.done;u=o.next()){u.value.next(e)}}catch(e){t={error:e}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}}),(function(){for(;0<i.length;)i.shift().complete();n.complete()}),o,(function(){for(;0<i.length;)i.shift().unsubscribe()})))}))};var mw={windowWhen:void 0},gw=ru,ww=Co,Ow=Mo,Sw=Ma;mw.windowWhen=function(e){return ww.operate((function(t,r){var n,i,o=function(e){n.error(e),r.error(e)},u=function(){var t;null==i||i.unsubscribe(),null==n||n.complete(),n=new gw.Subject,r.next(n.asObservable());try{t=Sw.innerFrom(e())}catch(e){return void o(e)}t.subscribe(i=Ow.createOperatorSubscriber(r,u,u,o))};u(),t.subscribe(Ow.createOperatorSubscriber(r,(function(e){return n.next(e)}),(function(){n.complete(),r.complete()}),o,(function(){null==i||i.unsubscribe(),n=null})))}))};var _w={},xw=a&&a.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)u.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u},Pw=a&&a.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};_w.withLatestFrom=void 0;var Aw=Co,Ew=Mo,jw=Ma,Tw=mo,Iw=so,kw=Aa;_w.withLatestFrom=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=kw.popResultSelector(e);return Aw.operate((function(t,n){for(var i=e.length,o=new Array(i),u=e.map((function(){return!1})),a=!1,c=function(t){jw.innerFrom(e[t]).subscribe(Ew.createOperatorSubscriber(n,(function(e){o[t]=e,a||u[t]||(u[t]=!0,(a=u.every(Tw.identity))&&(u=null))}),Iw.noop))},s=0;s<i;s++)c(s);t.subscribe(Ew.createOperatorSubscriber(n,(function(e){if(a){var t=Pw([e],xw(o));n.next(r?r.apply(void 0,Pw([],xw(t))):t)}})))}))};var Cw={zipAll:void 0},Fw=Sd,Nw=_v;Cw.zipAll=function(e){return Nw.joinAllInternals(Fw.zip,e)};var Mw={},Rw={},zw=a&&a.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)u.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u},Bw=a&&a.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Rw.zip=void 0;var qw=Sd,Dw=Co;Rw.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Dw.operate((function(t,r){qw.zip.apply(void 0,Bw([t],zw(e))).subscribe(r)}))};var Lw=a&&a.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)u.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u},Uw=a&&a.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Mw.zipWith=void 0;var Vw=Rw;Mw.zipWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Vw.zip.apply(void 0,Uw([],Lw(e)))},function(e){var t=a&&a.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=a&&a.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};e.interval=e.iif=e.generate=e.fromEventPattern=e.fromEvent=e.from=e.forkJoin=e.empty=e.defer=e.connectable=e.concat=e.combineLatest=e.bindNodeCallback=e.bindCallback=e.UnsubscriptionError=e.TimeoutError=e.SequenceError=e.ObjectUnsubscribedError=e.NotFoundError=e.EmptyError=e.ArgumentOutOfRangeError=e.firstValueFrom=e.lastValueFrom=e.isObservable=e.identity=e.noop=e.pipe=e.NotificationKind=e.Notification=e.Subscriber=e.Subscription=e.Scheduler=e.VirtualAction=e.VirtualTimeScheduler=e.animationFrameScheduler=e.animationFrame=e.queueScheduler=e.queue=e.asyncScheduler=e.async=e.asapScheduler=e.asap=e.AsyncSubject=e.ReplaySubject=e.BehaviorSubject=e.Subject=e.animationFrames=e.observable=e.ConnectableObservable=e.Observable=void 0,e.filter=e.expand=e.exhaustMap=e.exhaustAll=e.exhaust=e.every=e.endWith=e.elementAt=e.distinctUntilKeyChanged=e.distinctUntilChanged=e.distinct=e.dematerialize=e.delayWhen=e.delay=e.defaultIfEmpty=e.debounceTime=e.debounce=e.count=e.connect=e.concatWith=e.concatMapTo=e.concatMap=e.concatAll=e.combineLatestWith=e.combineLatestAll=e.combineAll=e.catchError=e.bufferWhen=e.bufferToggle=e.bufferTime=e.bufferCount=e.buffer=e.auditTime=e.audit=e.config=e.NEVER=e.EMPTY=e.scheduled=e.zip=e.using=e.timer=e.throwError=e.range=e.race=e.partition=e.pairs=e.onErrorResumeNext=e.of=e.never=e.merge=void 0,e.switchMapTo=e.switchMap=e.switchAll=e.subscribeOn=e.startWith=e.skipWhile=e.skipUntil=e.skipLast=e.skip=e.single=e.shareReplay=e.share=e.sequenceEqual=e.scan=e.sampleTime=e.sample=e.refCount=e.retryWhen=e.retry=e.repeatWhen=e.repeat=e.reduce=e.raceWith=e.publishReplay=e.publishLast=e.publishBehavior=e.publish=e.pluck=e.pairwise=e.observeOn=e.multicast=e.min=e.mergeWith=e.mergeScan=e.mergeMapTo=e.mergeMap=e.flatMap=e.mergeAll=e.max=e.materialize=e.mapTo=e.map=e.last=e.isEmpty=e.ignoreElements=e.groupBy=e.first=e.findIndex=e.find=e.finalize=void 0,e.zipWith=e.zipAll=e.withLatestFrom=e.windowWhen=e.windowToggle=e.windowTime=e.windowCount=e.window=e.toArray=e.timestamp=e.timeoutWith=e.timeout=e.timeInterval=e.throwIfEmpty=e.throttleTime=e.throttle=e.tap=e.takeWhile=e.takeUntil=e.takeLast=e.take=e.switchScan=void 0;var n=Ui;Object.defineProperty(e,"Observable",{enumerable:!0,get:function(){return n.Observable}});var i=Io;Object.defineProperty(e,"ConnectableObservable",{enumerable:!0,get:function(){return i.ConnectableObservable}});var o=yo;Object.defineProperty(e,"observable",{enumerable:!0,get:function(){return o.observable}});var u=Ko;Object.defineProperty(e,"animationFrames",{enumerable:!0,get:function(){return u.animationFrames}});var c=ru;Object.defineProperty(e,"Subject",{enumerable:!0,get:function(){return c.Subject}});var s=hu;Object.defineProperty(e,"BehaviorSubject",{enumerable:!0,get:function(){return s.BehaviorSubject}});var l=bu;Object.defineProperty(e,"ReplaySubject",{enumerable:!0,get:function(){return l.ReplaySubject}});var f=Su;Object.defineProperty(e,"AsyncSubject",{enumerable:!0,get:function(){return f.AsyncSubject}});var d=Pu;Object.defineProperty(e,"asap",{enumerable:!0,get:function(){return d.asap}}),Object.defineProperty(e,"asapScheduler",{enumerable:!0,get:function(){return d.asapScheduler}});var v=ta;Object.defineProperty(e,"async",{enumerable:!0,get:function(){return v.async}}),Object.defineProperty(e,"asyncScheduler",{enumerable:!0,get:function(){return v.asyncScheduler}});var h=ra;Object.defineProperty(e,"queue",{enumerable:!0,get:function(){return h.queue}}),Object.defineProperty(e,"queueScheduler",{enumerable:!0,get:function(){return h.queueScheduler}});var p=sa;Object.defineProperty(e,"animationFrame",{enumerable:!0,get:function(){return p.animationFrame}}),Object.defineProperty(e,"animationFrameScheduler",{enumerable:!0,get:function(){return p.animationFrameScheduler}});var y=ba;Object.defineProperty(e,"VirtualTimeScheduler",{enumerable:!0,get:function(){return y.VirtualTimeScheduler}}),Object.defineProperty(e,"VirtualAction",{enumerable:!0,get:function(){return y.VirtualAction}});var b=Ku;Object.defineProperty(e,"Scheduler",{enumerable:!0,get:function(){return b.Scheduler}});var m=Ji;Object.defineProperty(e,"Subscription",{enumerable:!0,get:function(){return m.Subscription}});var g=Vi;Object.defineProperty(e,"Subscriber",{enumerable:!0,get:function(){return g.Subscriber}});var w=_a;Object.defineProperty(e,"Notification",{enumerable:!0,get:function(){return w.Notification}}),Object.defineProperty(e,"NotificationKind",{enumerable:!0,get:function(){return w.NotificationKind}});var O=bo;Object.defineProperty(e,"pipe",{enumerable:!0,get:function(){return O.pipe}});var S=so;Object.defineProperty(e,"noop",{enumerable:!0,get:function(){return S.noop}});var _=mo;Object.defineProperty(e,"identity",{enumerable:!0,get:function(){return _.identity}});var x=ps;Object.defineProperty(e,"isObservable",{enumerable:!0,get:function(){return x.isObservable}});var P=ms;Object.defineProperty(e,"lastValueFrom",{enumerable:!0,get:function(){return P.lastValueFrom}});var A=Ss;Object.defineProperty(e,"firstValueFrom",{enumerable:!0,get:function(){return A.firstValueFrom}});var E=Ps;Object.defineProperty(e,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return E.ArgumentOutOfRangeError}});var j=gs;Object.defineProperty(e,"EmptyError",{enumerable:!0,get:function(){return j.EmptyError}});var T=Es;Object.defineProperty(e,"NotFoundError",{enumerable:!0,get:function(){return T.NotFoundError}});var I=nu;Object.defineProperty(e,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return I.ObjectUnsubscribedError}});var k=Ts;Object.defineProperty(e,"SequenceError",{enumerable:!0,get:function(){return k.SequenceError}});var C=ks;Object.defineProperty(e,"TimeoutError",{enumerable:!0,get:function(){return C.TimeoutError}});var F=Gi;Object.defineProperty(e,"UnsubscriptionError",{enumerable:!0,get:function(){return F.UnsubscriptionError}});var N=Fs;Object.defineProperty(e,"bindCallback",{enumerable:!0,get:function(){return N.bindCallback}});var M=Xs;Object.defineProperty(e,"bindNodeCallback",{enumerable:!0,get:function(){return M.bindNodeCallback}});var R=el;Object.defineProperty(e,"combineLatest",{enumerable:!0,get:function(){return R.combineLatest}});var z=ml;Object.defineProperty(e,"concat",{enumerable:!0,get:function(){return z.concat}});var B=zl;Object.defineProperty(e,"connectable",{enumerable:!0,get:function(){return B.connectable}});var q=Bl;Object.defineProperty(e,"defer",{enumerable:!0,get:function(){return q.defer}});var D=xa;Object.defineProperty(e,"empty",{enumerable:!0,get:function(){return D.empty}});var L=Jl;Object.defineProperty(e,"forkJoin",{enumerable:!0,get:function(){return L.forkJoin}});var U=Ca;Object.defineProperty(e,"from",{enumerable:!0,get:function(){return U.from}});var V=Zl;Object.defineProperty(e,"fromEvent",{enumerable:!0,get:function(){return V.fromEvent}});var W=df;Object.defineProperty(e,"fromEventPattern",{enumerable:!0,get:function(){return W.fromEventPattern}});var J=yf;Object.defineProperty(e,"generate",{enumerable:!0,get:function(){return J.generate}});var G=Sf;Object.defineProperty(e,"iif",{enumerable:!0,get:function(){return G.iif}});var K=xf;Object.defineProperty(e,"interval",{enumerable:!0,get:function(){return K.interval}});var Y=Cf;Object.defineProperty(e,"merge",{enumerable:!0,get:function(){return Y.merge}});var Q=Bf;Object.defineProperty(e,"never",{enumerable:!0,get:function(){return Q.never}});var $=Pa;Object.defineProperty(e,"of",{enumerable:!0,get:function(){return $.of}});var H=qf;Object.defineProperty(e,"onErrorResumeNext",{enumerable:!0,get:function(){return H.onErrorResumeNext}});var X=Zf;Object.defineProperty(e,"pairs",{enumerable:!0,get:function(){return X.pairs}});var Z=td;Object.defineProperty(e,"partition",{enumerable:!0,get:function(){return Z.partition}});var ee=sd;Object.defineProperty(e,"race",{enumerable:!0,get:function(){return ee.race}});var te=pd;Object.defineProperty(e,"range",{enumerable:!0,get:function(){return te.range}});var re=ds;Object.defineProperty(e,"throwError",{enumerable:!0,get:function(){return re.throwError}});var ne=Pf;Object.defineProperty(e,"timer",{enumerable:!0,get:function(){return ne.timer}});var ie=md;Object.defineProperty(e,"using",{enumerable:!0,get:function(){return ie.using}});var oe=Sd;Object.defineProperty(e,"zip",{enumerable:!0,get:function(){return oe.zip}});var ue=Fa;Object.defineProperty(e,"scheduled",{enumerable:!0,get:function(){return ue.scheduled}});var ae=xa;Object.defineProperty(e,"EMPTY",{enumerable:!0,get:function(){return ae.EMPTY}});var ce=Bf;Object.defineProperty(e,"NEVER",{enumerable:!0,get:function(){return ce.NEVER}}),r(kd,e);var se=io;Object.defineProperty(e,"config",{enumerable:!0,get:function(){return se.config}});var le=Cd;Object.defineProperty(e,"audit",{enumerable:!0,get:function(){return le.audit}});var fe=Rd;Object.defineProperty(e,"auditTime",{enumerable:!0,get:function(){return fe.auditTime}});var de=Dd;Object.defineProperty(e,"buffer",{enumerable:!0,get:function(){return de.buffer}});var ve=Wd;Object.defineProperty(e,"bufferCount",{enumerable:!0,get:function(){return ve.bufferCount}});var he=Qd;Object.defineProperty(e,"bufferTime",{enumerable:!0,get:function(){return he.bufferTime}});var pe=iv;Object.defineProperty(e,"bufferToggle",{enumerable:!0,get:function(){return pe.bufferToggle}});var ye=dv;Object.defineProperty(e,"bufferWhen",{enumerable:!0,get:function(){return ye.bufferWhen}});var be=bv;Object.defineProperty(e,"catchError",{enumerable:!0,get:function(){return be.catchError}});var me=Ov;Object.defineProperty(e,"combineAll",{enumerable:!0,get:function(){return me.combineAll}});var ge=Sv;Object.defineProperty(e,"combineLatestAll",{enumerable:!0,get:function(){return ge.combineLatestAll}});var we=Lv;Object.defineProperty(e,"combineLatestWith",{enumerable:!0,get:function(){return we.combineLatestWith}});var Oe=gl;Object.defineProperty(e,"concatAll",{enumerable:!0,get:function(){return Oe.concatAll}});var Se=eh;Object.defineProperty(e,"concatMap",{enumerable:!0,get:function(){return Se.concatMap}});var _e=nh;Object.defineProperty(e,"concatMapTo",{enumerable:!0,get:function(){return _e.concatMapTo}});var xe=uh;Object.defineProperty(e,"concatWith",{enumerable:!0,get:function(){return xe.concatWith}});var Pe=bh;Object.defineProperty(e,"connect",{enumerable:!0,get:function(){return Pe.connect}});var Ae=Ph;Object.defineProperty(e,"count",{enumerable:!0,get:function(){return Ae.count}});var Ee=Eh;Object.defineProperty(e,"debounce",{enumerable:!0,get:function(){return Ee.debounce}});var je=Ch;Object.defineProperty(e,"debounceTime",{enumerable:!0,get:function(){return je.debounceTime}});var Te=Rh;Object.defineProperty(e,"defaultIfEmpty",{enumerable:!0,get:function(){return Te.defaultIfEmpty}});var Ie=qh;Object.defineProperty(e,"delay",{enumerable:!0,get:function(){return Ie.delay}});var ke=Dh;Object.defineProperty(e,"delayWhen",{enumerable:!0,get:function(){return ke.delayWhen}});var Ce=op;Object.defineProperty(e,"dematerialize",{enumerable:!0,get:function(){return Ce.dematerialize}});var Fe=sp;Object.defineProperty(e,"distinct",{enumerable:!0,get:function(){return Fe.distinct}});var Ne=vp;Object.defineProperty(e,"distinctUntilChanged",{enumerable:!0,get:function(){return Ne.distinctUntilChanged}});var Me=mp;Object.defineProperty(e,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return Me.distinctUntilKeyChanged}});var Re=wp;Object.defineProperty(e,"elementAt",{enumerable:!0,get:function(){return Re.elementAt}});var ze=kp;Object.defineProperty(e,"endWith",{enumerable:!0,get:function(){return ze.endWith}});var Be=Rp;Object.defineProperty(e,"every",{enumerable:!0,get:function(){return Be.every}});var qe=qp;Object.defineProperty(e,"exhaust",{enumerable:!0,get:function(){return qe.exhaust}});var De=Dp;Object.defineProperty(e,"exhaustAll",{enumerable:!0,get:function(){return De.exhaustAll}});var Le=Lp;Object.defineProperty(e,"exhaustMap",{enumerable:!0,get:function(){return Le.exhaustMap}});var Ue=Qp;Object.defineProperty(e,"expand",{enumerable:!0,get:function(){return Ue.expand}});var Ve=nd;Object.defineProperty(e,"filter",{enumerable:!0,get:function(){return Ve.filter}});var We=Xp;Object.defineProperty(e,"finalize",{enumerable:!0,get:function(){return We.finalize}});var Je=ey;Object.defineProperty(e,"find",{enumerable:!0,get:function(){return Je.find}});var Ge=iy;Object.defineProperty(e,"findIndex",{enumerable:!0,get:function(){return Ge.findIndex}});var Ke=ay;Object.defineProperty(e,"first",{enumerable:!0,get:function(){return Ke.first}});var Ye=hy;Object.defineProperty(e,"groupBy",{enumerable:!0,get:function(){return Ye.groupBy}});var Qe=Jh;Object.defineProperty(e,"ignoreElements",{enumerable:!0,get:function(){return Qe.ignoreElements}});var $e=wy;Object.defineProperty(e,"isEmpty",{enumerable:!0,get:function(){return $e.isEmpty}});var He=_y;Object.defineProperty(e,"last",{enumerable:!0,get:function(){return He.last}});var Xe=Rs;Object.defineProperty(e,"map",{enumerable:!0,get:function(){return Xe.map}});var Ze=Qh;Object.defineProperty(e,"mapTo",{enumerable:!0,get:function(){return Ze.mapTo}});var et=My;Object.defineProperty(e,"materialize",{enumerable:!0,get:function(){return et.materialize}});var tt=qy;Object.defineProperty(e,"max",{enumerable:!0,get:function(){return tt.max}});var rt=wl;Object.defineProperty(e,"mergeAll",{enumerable:!0,get:function(){return rt.mergeAll}});var nt=Uy;Object.defineProperty(e,"flatMap",{enumerable:!0,get:function(){return nt.flatMap}});var it=Ol;Object.defineProperty(e,"mergeMap",{enumerable:!0,get:function(){return it.mergeMap}});var ot=Wy;Object.defineProperty(e,"mergeMapTo",{enumerable:!0,get:function(){return ot.mergeMapTo}});var ut=Ky;Object.defineProperty(e,"mergeScan",{enumerable:!0,get:function(){return ut.mergeScan}});var at=$y;Object.defineProperty(e,"mergeWith",{enumerable:!0,get:function(){return at.mergeWith}});var ct=cb;Object.defineProperty(e,"min",{enumerable:!0,get:function(){return ct.min}});var st=fb;Object.defineProperty(e,"multicast",{enumerable:!0,get:function(){return st.multicast}});var lt=Sc;Object.defineProperty(e,"observeOn",{enumerable:!0,get:function(){return lt.observeOn}});var ft=pb;Object.defineProperty(e,"pairwise",{enumerable:!0,get:function(){return ft.pairwise}});var dt=mb;Object.defineProperty(e,"pluck",{enumerable:!0,get:function(){return dt.pluck}});var vt=wb;Object.defineProperty(e,"publish",{enumerable:!0,get:function(){return vt.publish}});var ht=xb;Object.defineProperty(e,"publishBehavior",{enumerable:!0,get:function(){return ht.publishBehavior}});var pt=Eb;Object.defineProperty(e,"publishLast",{enumerable:!0,get:function(){return pt.publishLast}});var yt=Ib;Object.defineProperty(e,"publishReplay",{enumerable:!0,get:function(){return yt.publishReplay}});var bt=Nb;Object.defineProperty(e,"raceWith",{enumerable:!0,get:function(){return bt.raceWith}});var mt=Pv;Object.defineProperty(e,"reduce",{enumerable:!0,get:function(){return mt.reduce}});var gt=Db;Object.defineProperty(e,"repeat",{enumerable:!0,get:function(){return gt.repeat}});var wt=Gb;Object.defineProperty(e,"repeatWhen",{enumerable:!0,get:function(){return wt.repeatWhen}});var Ot=$b;Object.defineProperty(e,"retry",{enumerable:!0,get:function(){return Ot.retry}});var St=rm;Object.defineProperty(e,"retryWhen",{enumerable:!0,get:function(){return St.retryWhen}});var _t=ko;Object.defineProperty(e,"refCount",{enumerable:!0,get:function(){return _t.refCount}});var xt=um;Object.defineProperty(e,"sample",{enumerable:!0,get:function(){return xt.sample}});var Pt=lm;Object.defineProperty(e,"sampleTime",{enumerable:!0,get:function(){return Pt.sampleTime}});var At=hm;Object.defineProperty(e,"scan",{enumerable:!0,get:function(){return At.scan}});var Et=bm;Object.defineProperty(e,"sequenceEqual",{enumerable:!0,get:function(){return Et.sequenceEqual}});var jt=wm;Object.defineProperty(e,"share",{enumerable:!0,get:function(){return jt.share}});var Tt=jm;Object.defineProperty(e,"shareReplay",{enumerable:!0,get:function(){return Tt.shareReplay}});var It=km;Object.defineProperty(e,"single",{enumerable:!0,get:function(){return It.single}});var kt=zm;Object.defineProperty(e,"skip",{enumerable:!0,get:function(){return kt.skip}});var Ct=qm;Object.defineProperty(e,"skipLast",{enumerable:!0,get:function(){return Ct.skipLast}});var Ft=Vm;Object.defineProperty(e,"skipUntil",{enumerable:!0,get:function(){return Ft.skipUntil}});var Nt=Ym;Object.defineProperty(e,"skipWhile",{enumerable:!0,get:function(){return Nt.skipWhile}});var Mt=Hm;Object.defineProperty(e,"startWith",{enumerable:!0,get:function(){return Mt.startWith}});var Rt=Ec;Object.defineProperty(e,"subscribeOn",{enumerable:!0,get:function(){return Rt.subscribeOn}});var zt=tg;Object.defineProperty(e,"switchAll",{enumerable:!0,get:function(){return zt.switchAll}});var Bt=rg;Object.defineProperty(e,"switchMap",{enumerable:!0,get:function(){return Bt.switchMap}});var qt=cg;Object.defineProperty(e,"switchMapTo",{enumerable:!0,get:function(){return qt.switchMapTo}});var Dt=fg;Object.defineProperty(e,"switchScan",{enumerable:!0,get:function(){return Dt.switchScan}});var Lt=Lh;Object.defineProperty(e,"take",{enumerable:!0,get:function(){return Lt.take}});var Ut=xy;Object.defineProperty(e,"takeLast",{enumerable:!0,get:function(){return Ut.takeLast}});var Vt=hg;Object.defineProperty(e,"takeUntil",{enumerable:!0,get:function(){return Vt.takeUntil}});var Wt=gg;Object.defineProperty(e,"takeWhile",{enumerable:!0,get:function(){return Wt.takeWhile}});var Jt=Sg;Object.defineProperty(e,"tap",{enumerable:!0,get:function(){return Jt.tap}});var Gt=Eg;Object.defineProperty(e,"throttle",{enumerable:!0,get:function(){return Gt.throttle}});var Kt=jg;Object.defineProperty(e,"throttleTime",{enumerable:!0,get:function(){return Kt.throttleTime}});var Yt=Op;Object.defineProperty(e,"throwIfEmpty",{enumerable:!0,get:function(){return Yt.throwIfEmpty}});var Qt=Cg;Object.defineProperty(e,"timeInterval",{enumerable:!0,get:function(){return Qt.timeInterval}});var $t=ks;Object.defineProperty(e,"timeout",{enumerable:!0,get:function(){return $t.timeout}});var Ht=zg;Object.defineProperty(e,"timeoutWith",{enumerable:!0,get:function(){return Ht.timeoutWith}});var Xt=Lg;Object.defineProperty(e,"timestamp",{enumerable:!0,get:function(){return Xt.timestamp}});var Zt=xv;Object.defineProperty(e,"toArray",{enumerable:!0,get:function(){return Zt.toArray}});var er=Wg;Object.defineProperty(e,"window",{enumerable:!0,get:function(){return er.window}});var tr=Qg;Object.defineProperty(e,"windowCount",{enumerable:!0,get:function(){return tr.windowCount}});var rr=ew;Object.defineProperty(e,"windowTime",{enumerable:!0,get:function(){return rr.windowTime}});var nr=sw;Object.defineProperty(e,"windowToggle",{enumerable:!0,get:function(){return nr.windowToggle}});var ir=mw;Object.defineProperty(e,"windowWhen",{enumerable:!0,get:function(){return ir.windowWhen}});var or=_w;Object.defineProperty(e,"withLatestFrom",{enumerable:!0,get:function(){return or.withLatestFrom}});var ur=Cw;Object.defineProperty(e,"zipAll",{enumerable:!0,get:function(){return ur.zipAll}});var ar=Mw;Object.defineProperty(e,"zipWith",{enumerable:!0,get:function(){return ar.zipWith}})}(Li),function(e){e.BadEventError=e.ObservableFiniteStateMachine=void 0;const t=Ri,r=Li,n=z;class i extends t.FiniteStateMachine{constructor(){super(...arguments),this.stateChanges=new r.Subject}get[Symbol.toStringTag](){return this.constructor.name}observeStateChanges(){return this.stateChanges}send(e){const t=this.state;super.send(e);const r=this.state;this.stateChanges.next({event:e,oldState:t,newState:r}),(0,n.isEmptyObject)(this.schema[r])&&this.stateChanges.complete()}}e.ObservableFiniteStateMachine=i;var o=Ri;Object.defineProperty(e,"BadEventError",{enumerable:!0,get:function(){return o.BadEventError}})}(Di);var Ww={SparseSet:void 0};class Jw{constructor(e=[]){this.indexToValue=[];const t=[];if(e.length>0)for(const[r,n]of e.entries())t[n]=r;this.valueToIndex=t}get[Symbol.toStringTag](){return this.constructor.name}[Symbol.iterator](){return this.indexToValue[Symbol.iterator]()}values(){return this.indexToValue[Symbol.iterator]()}has(e){return e in this.valueToIndex}add(e){if(!this.has(e)){const t=this.indexToValue.length;this.indexToValue.push(e),this.valueToIndex[e]=t}}delete(e){if(this.has(e)){const t=this.indexToValue.pop();if(e===t)delete this.valueToIndex[e];else{const r=this.valueToIndex[e];this.indexToValue[r]=t,this.valueToIndex[t]=r,delete this.valueToIndex[e]}return!0}return!1}}Ww.SparseSet=Jw;var Gw={SparseMap:void 0};class Kw{constructor(){this.keyToIndex=[],this.indexToKey=[],this.indexToValue=[]}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.indexToKey.length}get internalArray(){return this.indexToValue}*entries(){for(let e=0;e<this.indexToKey.length;e++)yield[this.indexToKey[e],this.indexToValue[e]]}keys(){return this.indexToKey.values()}values(){return this.indexToValue.values()}getInternalIndexOfKey(e){return this.keyToIndex[e]}has(e){return e in this.keyToIndex}get(e){if(this.has(e)){const t=this.keyToIndex[e];return this.indexToValue[t]}}set(e,t){if(this.has(e)){const r=this.keyToIndex[e];this.indexToValue[r]=t}else{const r=this.indexToKey.length;this.indexToKey.push(e),this.indexToValue.push(t),this.keyToIndex[e]=r}}delete(e){if(this.has(e)){const t=this.indexToKey.pop(),r=this.indexToValue.pop();if(e===t)delete this.keyToIndex[e];else{const n=this.keyToIndex[e];this.indexToKey[n]=t,this.indexToValue[n]=r,this.keyToIndex[t]=n,delete this.keyToIndex[e]}}}}Gw.SparseMap=Kw;var Yw={TypedSparseMap:void 0};const Qw=ii();class $w{constructor(e){this.keyToIndex=[],this.indexToKey=[],(0,Qw.assert)(0===e.length,"array should be empty"),this.indexToValue=e}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.indexToKey.length}get internalTypedArray(){return this.indexToValue.internalTypedArray}*entries(){for(let e=0;e<this.indexToKey.length;e++)yield[this.indexToKey[e],this.indexToValue.internalTypedArray[e]]}keys(){return this.indexToKey.values()}*values(){for(let e=0;e<this.indexToKey.length;e++)yield this.indexToValue.internalTypedArray[e]}getInternalIndexOfKey(e){return this.keyToIndex[e]}has(e){const t=this.keyToIndex[e];return this.indexToKey[t]===e}get(e){const t=this.keyToIndex[e];return this.indexToKey[t]===e?this.indexToValue.internalTypedArray[t]:void 0}set(e,t){const r=this.keyToIndex[e];if(this.indexToKey[r]===e)this.indexToValue.internalTypedArray[r]=t;else{const r=this.indexToKey.length;this.indexToKey.push(e),this.indexToValue.push(t),this.keyToIndex[e]=r}}delete(e){const t=this.keyToIndex[e];if(this.indexToKey[t]===e){const r=this.indexToKey.pop(),n=this.indexToValue.pop();e!==r&&(this.indexToKey[t]=r,this.indexToValue.internalTypedArray[t]=n,this.keyToIndex[r]=t)}}}Yw.TypedSparseMap=$w;var Hw={TypedSparseSet:void 0};class Xw{constructor(e){const t=[];if(e.length>0)for(const[r,n]of e.internalTypedArray.entries())t[n]=r;this.indexToValue=e,this.valueToIndex=t}get[Symbol.toStringTag](){return this.constructor.name}[Symbol.iterator](){return this.values()}*values(){for(let e=0;e<this.indexToValue.length;e++)yield this.indexToValue.internalTypedArray[e]}has(e){const t=this.valueToIndex[e];return this.indexToValue.internalTypedArray[t]===e}add(e){if(!this.has(e)){const t=this.indexToValue.length;this.indexToValue.push(e),this.valueToIndex[e]=t}}delete(e){const t=this.valueToIndex[e];if(this.indexToValue.internalTypedArray[t]===e){const r=this.indexToValue.pop();return e!==r&&(this.indexToValue.internalTypedArray[t]=r,this.valueToIndex[r]=t),!0}return!1}}Hw.TypedSparseSet=Xw;var Zw={};Zw.computeNewCapacity=Zw.DynamicTypedArray=void 0;const eO=ii();class tO{constructor(e,{capacity:t=0,growthFactor:r=1.5}={}){this.typedArrayConstructor=e,this._length=0,(0,eO.assert)(Number.isInteger(t),"capacity must be an integer"),(0,eO.assert)(t>=0,"capacity must be greater than or equal to 0"),(0,eO.assert)(r>=1,"growthFactory must be greater than or equal to 1"),this.array=new e(t),this.growthFactor=r}get internalTypedArray(){return this.array}get[Symbol.toStringTag](){return this.constructor.name}get capacity(){return this.array.length}get length(){return this._length}set(e,t){if(e>=this.capacity){const t=rO(this.capacity,e+1,this.growthFactor);this.resize(t)}e>=this._length&&(this._length=e+1),this.array[e]=t}get(e){return e<this._length?this.array[e]:void 0}push(...e){const t=this._length+e.length;if(t>this.capacity){const e=rO(this.capacity,t,this.growthFactor);this.resize(e)}for(const t of e)this.array[this._length++]=t}pop(){if(this._length>0){const e=this.array[this._length-1];this._length--;const t=rO(this.capacity,this.length,this.growthFactor);return this.resize(t),e}}sort(e){const t=this.capacity;this.resize(this.length),this.array.sort(e),this.resize(t)}resize(e){if(this.array.length!==e)if(this.array.length<e){const t=new this.typedArrayConstructor(e);t.set(this.array),this.array=t}else if(this.array.length>e){const t=new this.typedArrayConstructor(e);for(let r=e;r--;)t[r]=this.array[r];this.array=t}}}function rO(e,t,r){if(1===r)return t;if(e===t)return t;if(e<t){let n=Math.max(e,1);for(;n<t;)n*=r;return Math.floor(n)}if(0===t)return 0;{let n=e;for(;;){const e=n/r;if(e<t)break;n=e}return Math.floor(n)}}Zw.DynamicTypedArray=tO,Zw.computeNewCapacity=rO;var nO={},iO={};iO.SkipList=iO.SkipListNode=void 0;const oO=z;class uO{constructor(e){this.value=e,this.previous=null,this.next=null,this.up=null,this.down=null}}iO.SkipListNode=uO;iO.SkipList=class{constructor(e){this.compare=e,this.head=new uO(null),this.tail=new uO(null),this.height=0,this._size=0,this.head.next=this.tail,this.tail.previous=this.head}get size(){return this._size}*elements(){let e=this.head;for(;e.down;)e=e.down;for(;e.next&&(0,oO.isntNull)(e.next.value);)e=e.next,yield e}dumpList(){const e=[];let t=this.head;do{e.push([]);let r=t;do{e[e.length-1].push(r.value),r=r.next}while(r)}while(t=t.down);return e}delete(e){let t=this.findNode(e);for(;t;)t.previous.next=t.next,t.next.previous=t.previous,t=t.down;this._size--}has(e){return(0,oO.isntNull)(this.findNode(e))}findNode(e){let t=this.head;for(;;){for(;t.next&&(0,oO.isntNull)(t.next.value);){const r=this.compare(t.next.value,e);if(0===r)return t.next;if(!(r<0))break;t=t.next}if(!t.down)return null;t=t.down}}add(e){let t=this.findPreviousNode(e);if(t.next&&(0,oO.isntNull)(t.next.value)&&0===this.compare(t.next.value,e))return;let r=new uO(e);t.next&&(r.next=t.next,t.next.previous=r),t.next=r,r.previous=t;let n=0;for(;Math.random()<.5;){if(n===this.height){const e=new uO(null),t=new uO(null);e.next=t,e.down=this.head,t.previous=e,t.down=this.tail,this.head.up=e,this.tail.up=t,this.head=e,this.tail=t,this.height++}for(;!t.up;)t=t.previous;t=t.up;const i=new uO(e);t.next&&(i.next=t.next,t.next.previous=i),t.next=i,i.previous=t,i.down=r,r.up=i,r=i,n++}this._size++}findPreviousNode(e){let t=this.head;for(;;){for(;t.next&&(0,oO.isntNull)(t.next.value);){if(this.compare(t.next.value,e)>=0)break;t=t.next}if(!t.down)return t;t=t.down}}},nO.SortedSet=void 0;const aO=iO,cO=Rn();class sO{constructor(e){this.skipList=new aO.SkipList(e)}get[Symbol.toStringTag](){return this.constructor.name}[Symbol.iterator](){return this.values()}values(){return(0,cO.map)(this.skipList.elements(),(e=>e.value))}has(e){return this.skipList.has(e)}add(e){this.skipList.add(e)}delete(e){this.skipList.delete(e)}}nO.SortedSet=sO;var lO={BitSet:void 0};const fO=ii();class dO{constructor(e=8){this.bitsPerElement=e,this.array=[],this.length=0}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.length}[Symbol.iterator](){return this.values()}*values(){if(this.length>0){const e=Math.ceil(this.length/this.bitsPerElement),t=this.bitsPerElement-(e*this.bitsPerElement-this.length),r=e-1;for(let e=0;e<r;e++){const t=this.array[e];for(let r=0;r<this.bitsPerElement;r++){const n=this.getMask(r);(t&n)===n&&(yield e*this.bitsPerElement+r)}}const n=this.array[e-1];for(let e=0;e<t;e++){const t=this.getMask(e);(n&t)===t&&(yield r*this.bitsPerElement+e)}}}_dumpBinaryStrings(){const e=[];for(let t=0;t<this.array.length;t++){const r=this.array[t].toString(2);r.length<this.bitsPerElement?e.push("0".repeat(this.bitsPerElement-r.length)+r):e.push(r)}return e}has(e){var t;const[r,n]=this.getPosition(e);return((null!==(t=this.array[r])&&void 0!==t?t:0)&n)===n}add(e){var t;(0,fO.assert)(e>=0,"value must be greater than or equal to 0"),e>=this.length&&(this.length=e+1);const[r,n]=this.getPosition(e);this.array[r]=(null!==(t=this.array[r])&&void 0!==t?t:0)|n}delete(e){var t;const[r,n]=this.getPosition(e),i=null!==(t=this.array[r])&&void 0!==t?t:0;return this.array[r]=i&~n,(i&n)===n}clear(){for(let e=this.array.length;e--;)this.array[e]=0}getPosition(e){const t=e%this.bitsPerElement;return[(e-t)/this.bitsPerElement,this.getMask(t)]}getMask(e){return 2**e}}lO.BitSet=dO;var vO={TypedBitSet:void 0};const hO=ii();class pO{constructor(e){this.array=e,this.bitsPerElement=8*this.array.internalTypedArray.BYTES_PER_ELEMENT,this.length=0}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.length}[Symbol.iterator](){return this.values()}*values(){if(this.length>0){const e=Math.ceil(this.length/this.bitsPerElement),t=this.bitsPerElement-(e*this.bitsPerElement-this.length),r=e-1;for(let e=0;e<r;e++){const t=this.array.internalTypedArray[e];for(let r=0;r<this.bitsPerElement;r++){const n=this.getMask(r);(t&n)===n&&(yield e*this.bitsPerElement+r)}}const n=this.array.internalTypedArray[e-1];for(let e=0;e<t;e++){const t=this.getMask(e);(n&t)===t&&(yield r*this.bitsPerElement+e)}}}_dumpBinaryStrings(){const e=[];for(let t=0;t<this.array.length;t++){const r=this.array.internalTypedArray[t].toString(2);r.length<this.bitsPerElement?e.push("0".repeat(this.bitsPerElement-r.length)+r):e.push(r)}return e}has(e){var t;const[r,n]=this.getPosition(e);return((null!==(t=this.array.get(r))&&void 0!==t?t:0)&n)===n}add(e){var t;(0,hO.assert)(e>=0,"value must be greater than or equal to 0"),e>=this.length&&(this.length=e+1);const[r,n]=this.getPosition(e);this.array.set(r,(null!==(t=this.array.get(r))&&void 0!==t?t:0)|n)}delete(e){var t;const[r,n]=this.getPosition(e),i=null!==(t=this.array.get(r))&&void 0!==t?t:0;return this.array.set(r,i&~n),(i&n)===n}clear(){for(let e=this.array.length;e--;)this.array.set(e,0)}getPosition(e){const t=e%this.bitsPerElement;return[(e-t)/this.bitsPerElement,this.getMask(t)]}getMask(e){return 2**e}}vO.TypedBitSet=pO,function(e){var t=a&&a.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=a&&a.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};e.DynamicTypedArray=void 0,r(ai,e),r(si,e),r(fi,e),r(vi,e),r(pi,e),r(bi,e),r(gi,e),r(_i,e),r(Ai,e),r(ki,e),r(Ri,e),r(Di,e),r(Ww,e),r(Gw,e),r(Yw,e),r(Hw,e);var n=Zw;Object.defineProperty(e,"DynamicTypedArray",{enumerable:!0,get:function(){return n.DynamicTypedArray}}),r(nO,e),r(lO,e),r(vO,e)}(ui);var yO={},bO={};!function(e){e.ExtraPromise=e.ExtraPromiseState=void 0;const t=ui;var r;!function(e){e.Pending="pending",e.Fulfilled="fulfilled",e.Rejected="rejected"}(r=e.ExtraPromiseState||(e.ExtraPromiseState={}));e.ExtraPromise=class extends Promise{constructor(e){const n=new t.FiniteStateMachine({[r.Pending]:{resolve:r.Fulfilled,reject:r.Rejected},[r.Fulfilled]:{},[r.Rejected]:{}},r.Pending);super(((t,r)=>{e((e=>{n.send("resolve"),t(e)}),(e=>{n.send("reject"),r(e)}))})),this.fsm=n}get pending(){return this.fsm.matches(r.Pending)}get fulfilled(){return this.fsm.matches(r.Fulfilled)}get rejected(){return this.fsm.matches(r.Rejected)}get state(){return this.fsm.state}}}(bO);var mO={Deferred:void 0};mO.Deferred=class{constructor(){this.promise=new Promise(((e,t)=>{this._resolve=e,this._reject=t}))}get then(){return this.promise.then.bind(this.promise)}resolve(e){this._resolve(e)}reject(e){this._reject(e)}};var gO={MutableDeferred:void 0};const wO=mO,OO=Hn;gO.MutableDeferred=class{constructor(){this.deferred=this.createDeferred(),this.isFirstRun=!0}get then(){return this.deferred.then.bind(this.deferred)}resolve(e){if(this.isFirstRun)this.isFirstRun=!1,this.deferred.resolve(e);else{const t=this.createDeferred();t.resolve(e),this.deferred=t}}reject(e){if(this.isFirstRun)this.isFirstRun=!1,this.deferred.reject(e);else{const t=this.createDeferred();t.reject(e),this.deferred=t}}createDeferred(){const e=new wO.Deferred;return Promise.resolve(e).catch(OO.pass),e}};var SO={ReusableDeferred:void 0};const _O=mO,xO=Hn;SO.ReusableDeferred=class{constructor(){this.deferred=this.createDeferred()}get then(){return this.deferred.then.bind(this.deferred)}resolve(e){this.deferred.resolve(e),this.deferred=this.createDeferred()}reject(e){this.deferred.reject(e),this.deferred=this.createDeferred()}createDeferred(){const e=new _O.Deferred;return Promise.resolve(e).catch(xO.pass),e}};var PO={LazyPromise:void 0};PO.LazyPromise=class{constructor(e){this.executor=e}get then(){return this.promise||(this.promise=new Promise(this.executor)),this.promise.then.bind(this.promise)}};var AO={},EO={};EO.ChannelClosedError=EO.SignalDiscarded=void 0;const jO=ii();class TO extends jO.CustomError{}EO.SignalDiscarded=TO;class IO extends jO.CustomError{}EO.ChannelClosedError=IO,function(e){e.SignalDiscarded=e.Signal=void 0;const t=mO,r=Hn,n=EO;e.Signal=class{constructor(){this.deferred=new t.Deferred}get then(){return this.deferred.then.bind(this.deferred)}emit(){this.deferred.resolve()}discard(){Promise.resolve(this.deferred).catch(r.pass),this.deferred.reject(new n.SignalDiscarded)}};var i=EO;Object.defineProperty(e,"SignalDiscarded",{enumerable:!0,get:function(){return i.SignalDiscarded}})}(AO);var kO={SignalGroup:void 0};kO.SignalGroup=class{constructor(){this.group=new Set}add(e){this.group.add(e)}remove(e){this.group.delete(e)}emitAll(){for(const e of this.group)e.emit()}discardAll(){for(const e of this.group)e.discard()}};var CO={},FO=/\s/;var NO=function(e){for(var t=e.length;t--&&FO.test(e.charAt(t)););return t},MO=/^\s+/;var RO=Re,zO=Be;var BO=function(e){return e?e.slice(0,NO(e)+1).replace(MO,""):e},qO=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},DO=function(e){return"symbol"==typeof e||zO(e)&&"[object Symbol]"==RO(e)},LO=/^[-+]0x[0-9a-f]+$/i,UO=/^0b[01]+$/i,VO=/^0o[0-7]+$/i,WO=parseInt;var JO=function(e){if("number"==typeof e)return e;if(DO(e))return NaN;if(qO(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=qO(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=BO(e);var r=UO.test(e);return r||VO.test(e)?WO(e.slice(2),r?2:8):LO.test(e)?NaN:+e},GO=1/0;var KO=function(e){return e?(e=JO(e))===GO||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0};var YO=function(e){var t=KO(e),r=t%1;return t==t?r?t-r:t:0};var QO=function(e,t){var r;if("function"!=typeof t)throw new TypeError("Expected a function");return e=YO(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=void 0),r}};var $O=function(e){return QO(2,e)},HO=a&&a.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};CO.Semaphore=void 0;const XO=AO,ZO=kO,eS=v,tS=HO($O);CO.Semaphore=class{constructor(e){this.count=e,this.locked=0,this.awaitings=new ZO.SignalGroup}acquire(...e){if(0===e.length)return new Promise((async e=>{await this.lock(),e((0,tS.default)((()=>this.unlock())))}));{const[t]=e;return(0,eS.go)((async()=>{await this.lock();try{return await t()}finally{this.unlock()}}))}}async lock(){for(;this.isLocked();){const e=new XO.Signal;this.awaitings.add(e),await e,this.awaitings.remove(e)}this.locked++}unlock(){this.locked--,this.awaitings.emitAll()}isLocked(){return this.count-this.locked==0}};var rS={Mutex:void 0};const nS=CO;class iS extends nS.Semaphore{constructor(){super(1)}}rS.Mutex=iS;var oS={DebounceMicrotask:void 0};oS.DebounceMicrotask=class{constructor(){this.registry=new WeakSet}queue(e){this.registry.has(e)||(this.registry.add(e),queueMicrotask((()=>{if(this.registry.has(e))try{e()}finally{this.registry.delete(e)}})))}cancel(e){this.registry.delete(e)}};var uS={},aS={},cS={};cS.getErrorResult=void 0,cS.getErrorResult=function(e){try{return[void 0,e()]}catch(e){return[e,void 0]}};var sS={};sS.getErrorResultAsync=void 0,sS.getErrorResultAsync=async function(e){try{return[void 0,await e()]}catch(e){return[e,void 0]}};var lS={};lS.getErrorResultPromise=void 0,lS.getErrorResultPromise=async function(e){try{return[void 0,await e]}catch(e){return[e,void 0]}};var fS={};fS.getResultError=void 0,fS.getResultError=function(e){try{return[e(),void 0]}catch(e){return[void 0,e]}};var dS={};dS.getResultErrorAsync=void 0,dS.getResultErrorAsync=async function(e){try{return[await e(),void 0]}catch(e){return[void 0,e]}};var vS={};vS.getResultErrorPromise=void 0,vS.getResultErrorPromise=async function(e){try{return[await e,void 0]}catch(e){return[void 0,e]}};var hS={};hS.getSuccess=void 0,hS.getSuccess=function(e){try{return[!0,e()]}catch(e){return[!1,void 0]}};var pS={};pS.getSuccessAsync=void 0,pS.getSuccessAsync=async function(e){try{return[!0,await e()]}catch(e){return[!1,void 0]}};var yS={};yS.getSuccessPromise=void 0,yS.getSuccessPromise=async function(e){try{return[!0,await e]}catch(e){return[!1,void 0]}};var bS={};bS.getFailure=void 0,bS.getFailure=function(e){try{return e(),[!1,void 0]}catch(e){return[!0,e]}};var mS={};mS.getFailureAsync=void 0,mS.getFailureAsync=async function(e){try{return await e(),[!1,void 0]}catch(e){return[!0,e]}};var gS={};gS.getFailurePromise=void 0,gS.getFailurePromise=async function(e){try{return await e,[!1,void 0]}catch(e){return[!0,e]}};var wS={};wS.isSuccess=void 0,wS.isSuccess=function(e){try{return e(),!0}catch(e){return!1}};var OS={};OS.isSuccessAsync=void 0,OS.isSuccessAsync=async function(e){try{return await e(),!0}catch(e){return!1}};var SS={};SS.isSuccessPromise=void 0,SS.isSuccessPromise=async function(e){try{return await e,!0}catch(e){return!1}};var _S={};_S.isFailure=void 0,_S.isFailure=function(e){try{return e(),!1}catch(e){return!0}};var xS={};xS.isFailureAsync=void 0,xS.isFailureAsync=async function(e){try{return await e(),!1}catch(e){return!0}};var PS={};PS.isFailurePromise=void 0,PS.isFailurePromise=async function(e){try{return await e,!1}catch(e){return!0}};var AS={};AS.getResult=void 0,AS.getResult=function(e){try{return e()}catch(e){return}};var ES={};ES.getResultAsync=void 0,ES.getResultAsync=async function(e){try{return await e()}catch(e){return}};var jS={};jS.getResultPromise=void 0,jS.getResultPromise=async function(e){try{return await e}catch(e){return}};var TS={};TS.getError=void 0,TS.getError=function(e){try{e()}catch(e){return e}};var IS={};IS.getErrorAsync=void 0,IS.getErrorAsync=async function(e){try{await e()}catch(e){return e}};var kS={};kS.getErrorPromise=void 0,kS.getErrorPromise=async function(e){try{await e}catch(e){return e}};var CS={},FS={},NS={},MS={};MS.log=void 0,MS.log=function(...e){return console.log(...e),e[e.length-1]};var RS={},zS={};zS.elapsed=zS.now=void 0,zS.now=function(){return performance.now()},zS.elapsed=function(e,t){return t-e+"ms"},RS.time=void 0;const BS=zS,qS=z;RS.time=function(e,t){const r=(0,BS.now)(),n=t();if((0,qS.isPromiseLike)(n))return n.then((()=>{const t=(0,BS.now)();return console.log(e,(0,BS.elapsed)(r,t)),n}));{const t=(0,BS.now)();return console.log(e,(0,BS.elapsed)(r,t)),n}};var DS={timeFunction:void 0};const LS=zS;DS.timeFunction=function(e,t){return function(...r){const n=(0,LS.now)(),i=t(...r),o=(0,LS.now)();return console.log(e,(0,LS.elapsed)(n,o)),i}};var US={timeAsyncFunction:void 0};const VS=zS;US.timeAsyncFunction=function(e,t){return async function(...r){const n=(0,VS.now)(),i=await t(...r),o=(0,VS.now)();return console.log(e,(0,VS.elapsed)(n,o)),i}},function(e){var t=a&&a.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=a&&a.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};r(MS,e),r(RS,e),r(DS,e),r(US,e)}(NS);var WS={},JS={};JS.lazy=void 0,JS.lazy=function(e){let t,r=!1;return function(){return r||(t=e(),r=!0),t}};var GS={lazyFunction:void 0};const KS=JS;GS.lazyFunction=function(e){const t=(0,KS.lazy)(e);return(...e)=>t()(...e)};var YS={lazyAsyncFunction:void 0};const QS=JS;YS.lazyAsyncFunction=function(e){const t=(0,QS.lazy)(e);return async(...e)=>(await t())(...e)};var $S={};$S.lazyStatic=$S.withLazyStatic=void 0;const HS=[];$S.withLazyStatic=function(e){const t=[];return(...r)=>{HS.push({cache:t,index:0});try{return e(...r)}finally{HS.pop()}}},$S.lazyStatic=function(e,t=[]){if(HS.length){const n=HS[HS.length-1],i=n.index++;if(i===n.cache.length)r();else{const e=n.cache[i].deps;t.length===e.length?t.some(((t,r)=>t!==e[r]))&&r():r()}return n.cache[i].value;function r(){n.cache[i]=null,n.cache[i]={value:e(),deps:Array.from(t)}}}throw new Error("lazyStatic can only be called in the function wrapped by withlazyStatic.")},function(e){var t=a&&a.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=a&&a.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};r(JS,e),r(GS,e),r(YS,e),r($S,e)}(WS),function(e){e.isntNumber=e.isntNull=e.isntJson=e.isntIterable=e.isntFunction=e.isntFalsy=e.isntError=e.isntEmptyObject=e.isntEmptyArray=e.isntDate=e.isntChar=e.isntBoolean=e.isntBigInt=e.isntAsyncIterable=e.isntArray=e.isSymbol=e.isRegExp=e.isUndefined=e.isString=e.isPromiseLike=e.isPromise=e.isPlainObject=e.isObject=e.isntNaN=e.isNaN=e.isNegativeInfinity=e.isPositiveInfinity=e.isFinite=e.isNumber=e.isNull=e.isJson=e.isIterable=e.isFunction=e.isFalsy=e.isError=e.isEmptyObject=e.isEmptyArray=e.isDate=e.isChar=e.isBoolean=e.isBigInt=e.isAsyncIterable=e.isArray=e.toArrayAsync=e.toArray=e.pass=e.lazy=e.log=e.go=e.assert=void 0,e.isntSymbol=e.isntRegExp=e.isntUndefined=e.isntString=e.isntPromiseLike=e.isntPromise=e.isntPlainObject=e.isntObject=void 0;var t=ii();Object.defineProperty(e,"assert",{enumerable:!0,get:function(){return t.assert}});var r=v;Object.defineProperty(e,"go",{enumerable:!0,get:function(){return r.go}});var n=NS;Object.defineProperty(e,"log",{enumerable:!0,get:function(){return n.log}});var i=WS;Object.defineProperty(e,"lazy",{enumerable:!0,get:function(){return i.lazy}});var o=Hn;Object.defineProperty(e,"pass",{enumerable:!0,get:function(){return o.pass}});var u=Rn();Object.defineProperty(e,"toArray",{enumerable:!0,get:function(){return u.toArray}}),Object.defineProperty(e,"toArrayAsync",{enumerable:!0,get:function(){return u.toArrayAsync}});var a=z;Object.defineProperty(e,"isArray",{enumerable:!0,get:function(){return a.isArray}}),Object.defineProperty(e,"isAsyncIterable",{enumerable:!0,get:function(){return a.isAsyncIterable}}),Object.defineProperty(e,"isBigInt",{enumerable:!0,get:function(){return a.isBigInt}}),Object.defineProperty(e,"isBoolean",{enumerable:!0,get:function(){return a.isBoolean}}),Object.defineProperty(e,"isChar",{enumerable:!0,get:function(){return a.isChar}}),Object.defineProperty(e,"isDate",{enumerable:!0,get:function(){return a.isDate}}),Object.defineProperty(e,"isEmptyArray",{enumerable:!0,get:function(){return a.isEmptyArray}}),Object.defineProperty(e,"isEmptyObject",{enumerable:!0,get:function(){return a.isEmptyObject}}),Object.defineProperty(e,"isError",{enumerable:!0,get:function(){return a.isError}}),Object.defineProperty(e,"isFalsy",{enumerable:!0,get:function(){return a.isFalsy}}),Object.defineProperty(e,"isFunction",{enumerable:!0,get:function(){return a.isFunction}}),Object.defineProperty(e,"isIterable",{enumerable:!0,get:function(){return a.isIterable}}),Object.defineProperty(e,"isJson",{enumerable:!0,get:function(){return a.isJson}}),Object.defineProperty(e,"isNull",{enumerable:!0,get:function(){return a.isNull}}),Object.defineProperty(e,"isNumber",{enumerable:!0,get:function(){return a.isNumber}}),Object.defineProperty(e,"isFinite",{enumerable:!0,get:function(){return a.isFinite}}),Object.defineProperty(e,"isPositiveInfinity",{enumerable:!0,get:function(){return a.isPositiveInfinity}}),Object.defineProperty(e,"isNegativeInfinity",{enumerable:!0,get:function(){return a.isNegativeInfinity}}),Object.defineProperty(e,"isNaN",{enumerable:!0,get:function(){return a.isNaN}}),Object.defineProperty(e,"isntNaN",{enumerable:!0,get:function(){return a.isntNaN}}),Object.defineProperty(e,"isObject",{enumerable:!0,get:function(){return a.isObject}}),Object.defineProperty(e,"isPlainObject",{enumerable:!0,get:function(){return a.isPlainObject}}),Object.defineProperty(e,"isPromise",{enumerable:!0,get:function(){return a.isPromise}}),Object.defineProperty(e,"isPromiseLike",{enumerable:!0,get:function(){return a.isPromiseLike}}),Object.defineProperty(e,"isString",{enumerable:!0,get:function(){return a.isString}}),Object.defineProperty(e,"isUndefined",{enumerable:!0,get:function(){return a.isUndefined}}),Object.defineProperty(e,"isRegExp",{enumerable:!0,get:function(){return a.isRegExp}}),Object.defineProperty(e,"isSymbol",{enumerable:!0,get:function(){return a.isSymbol}}),Object.defineProperty(e,"isntArray",{enumerable:!0,get:function(){return a.isntArray}}),Object.defineProperty(e,"isntAsyncIterable",{enumerable:!0,get:function(){return a.isntAsyncIterable}}),Object.defineProperty(e,"isntBigInt",{enumerable:!0,get:function(){return a.isntBigInt}}),Object.defineProperty(e,"isntBoolean",{enumerable:!0,get:function(){return a.isntBoolean}}),Object.defineProperty(e,"isntChar",{enumerable:!0,get:function(){return a.isntChar}}),Object.defineProperty(e,"isntDate",{enumerable:!0,get:function(){return a.isntDate}}),Object.defineProperty(e,"isntEmptyArray",{enumerable:!0,get:function(){return a.isntEmptyArray}}),Object.defineProperty(e,"isntEmptyObject",{enumerable:!0,get:function(){return a.isntEmptyObject}}),Object.defineProperty(e,"isntError",{enumerable:!0,get:function(){return a.isntError}}),Object.defineProperty(e,"isntFalsy",{enumerable:!0,get:function(){return a.isntFalsy}}),Object.defineProperty(e,"isntFunction",{enumerable:!0,get:function(){return a.isntFunction}}),Object.defineProperty(e,"isntIterable",{enumerable:!0,get:function(){return a.isntIterable}}),Object.defineProperty(e,"isntJson",{enumerable:!0,get:function(){return a.isntJson}}),Object.defineProperty(e,"isntNull",{enumerable:!0,get:function(){return a.isntNull}}),Object.defineProperty(e,"isntNumber",{enumerable:!0,get:function(){return a.isntNumber}}),Object.defineProperty(e,"isntObject",{enumerable:!0,get:function(){return a.isntObject}}),Object.defineProperty(e,"isntPlainObject",{enumerable:!0,get:function(){return a.isntPlainObject}}),Object.defineProperty(e,"isntPromise",{enumerable:!0,get:function(){return a.isntPromise}}),Object.defineProperty(e,"isntPromiseLike",{enumerable:!0,get:function(){return a.isntPromiseLike}}),Object.defineProperty(e,"isntString",{enumerable:!0,get:function(){return a.isntString}}),Object.defineProperty(e,"isntUndefined",{enumerable:!0,get:function(){return a.isntUndefined}}),Object.defineProperty(e,"isntRegExp",{enumerable:!0,get:function(){return a.isntRegExp}}),Object.defineProperty(e,"isntSymbol",{enumerable:!0,get:function(){return a.isntSymbol}})}(FS),CS.getErrorAsyncIterable=void 0;const XS=FS;CS.getErrorAsyncIterable=async function(e){try{for await(const t of e)(0,XS.pass)()}catch(e){return e}};var ZS,e_,t_={},r_={};function n_(){if(ZS)return r_;ZS=1,r_.Option=void 0;const e=i_();var t;!function(e){e[e.Some=0]="Some",e[e.None=1]="None"}(t||(t={}));class r{constructor(e,t){this.type=e,this.value=t}static Some(e){return new r(t.Some,e)}static None(){return new r(t.None)}isSome(){return this.type===t.Some}isNone(){return this.type===t.None}map(e){return this.isSome()?r.Some(e(this.value)):r.None()}mapOr(e,t){return this.isSome()?r.Some(t(this.value)):r.Some(e)}mapOrElse(e,t){return this.isSome()?r.Some(t(this.value)):r.Some(e())}filter(e){return this.isSome()&&e(this.value)?r.Some(this.value):r.None()}unwrap(){if(this.isSome())return this.value;throw new Error("unwrap called on a None")}unwrapOr(e){return this.isSome()?this.value:e}unwrapOrElse(e){return this.isSome()?this.value:e()}expect(e){if(this.isSome())return this.value;throw new Error(e)}okOr(t){return this.isSome()?e.Result.Ok(this.value):e.Result.Err(t)}okOrElse(t){return this.isSome()?e.Result.Ok(this.value):e.Result.Err(t())}}return r_.Option=r,r_}function i_(){if(e_)return t_;e_=1,t_.Result=void 0;const e=n_();var t;!function(e){e[e.Ok=0]="Ok",e[e.Err=1]="Err"}(t||(t={}));class r{constructor(e,r){this.type=e,e===t.Ok?this.value=r:this.error=r}static Ok(e){return new r(t.Ok,e)}static Err(e){return new r(t.Err,e)}isOk(){return this.type===t.Ok}isErr(){return this.type===t.Err}map(e){return this.isOk()?r.Ok(e(this.value)):r.Err(this.error)}mapOr(e,t){return this.isOk()?r.Ok(t(this.value)):r.Ok(e)}mapOrElse(e,t){return this.isOk()?r.Ok(t(this.value)):r.Ok(e(this.error))}mapErr(e){return this.isOk()?r.Ok(this.value):r.Err(e(this.error))}unwrap(){if(this.isOk())return this.value;throw this.error}unwrapOr(e){return this.isOk()?this.value:e}unwrapOrElse(e){return this.isOk()?this.value:e(this.error)}unwrapErr(){if(this.isErr())return this.error;throw new Error("unwrapErr called on a Ok")}expect(e){if(this.isOk())return this.value;throw new Error(e)}expectErr(e){if(this.isErr())return this.error;throw new Error(e)}ok(){return this.isOk()?e.Option.Some(this.value):e.Option.None()}err(){return this.isOk()?e.Option.None():e.Option.Some(this.error)}}return t_.Result=r,t_}var o_={toResult:void 0};const u_=i_();o_.toResult=function(e){try{const t=e();return u_.Result.Ok(t)}catch(e){return u_.Result.Err(e)}};var a_={toResultAsync:void 0};const c_=i_();a_.toResultAsync=async function(e){try{const t=await e();return c_.Result.Ok(t)}catch(e){return c_.Result.Err(e)}};var s_={toResultPromise:void 0};const l_=i_();s_.toResultPromise=async function(e){try{const t=await e;return l_.Result.Ok(t)}catch(e){return l_.Result.Err(e)}};var f_={toOption:void 0};const d_=n_();f_.toOption=function(e){try{const t=e();return d_.Option.Some(t)}catch(e){return d_.Option.None()}};var v_={toOptionAsync:void 0};const h_=n_();v_.toOptionAsync=async function(e){try{const t=await e();return h_.Option.Some(t)}catch(e){return h_.Option.None()}};var p_={toOptionPromise:void 0};const y_=n_();p_.toOptionPromise=async function(e){try{const t=await e;return y_.Option.Some(t)}catch(e){return y_.Option.None()}},function(e){e.toOptionPromise=e.toOptionAsync=e.toOption=e.Option=e.toResultPromise=e.toResultAsync=e.toResult=e.Result=e.getErrorAsyncIterable=e.getErrorPromise=e.getErrorAsync=e.getError=e.getResultPromise=e.getResultAsync=e.getResult=e.isFailurePromise=e.isFailureAsync=e.isFailure=e.isSuccessPromise=e.isSuccessAsync=e.isSuccess=e.getFailurePromise=e.getFailureAsync=e.getFailure=e.getSuccessPromise=e.getSuccessAsync=e.getSuccess=e.getResultErrorPromise=e.getResultErrorAsync=e.getResultError=e.getErrorResultPromise=e.getErrorResultAsync=e.getErrorResult=void 0;var t=cS;Object.defineProperty(e,"getErrorResult",{enumerable:!0,get:function(){return t.getErrorResult}});var r=sS;Object.defineProperty(e,"getErrorResultAsync",{enumerable:!0,get:function(){return r.getErrorResultAsync}});var n=lS;Object.defineProperty(e,"getErrorResultPromise",{enumerable:!0,get:function(){return n.getErrorResultPromise}});var i=fS;Object.defineProperty(e,"getResultError",{enumerable:!0,get:function(){return i.getResultError}});var o=dS;Object.defineProperty(e,"getResultErrorAsync",{enumerable:!0,get:function(){return o.getResultErrorAsync}});var u=vS;Object.defineProperty(e,"getResultErrorPromise",{enumerable:!0,get:function(){return u.getResultErrorPromise}});var a=hS;Object.defineProperty(e,"getSuccess",{enumerable:!0,get:function(){return a.getSuccess}});var c=pS;Object.defineProperty(e,"getSuccessAsync",{enumerable:!0,get:function(){return c.getSuccessAsync}});var s=yS;Object.defineProperty(e,"getSuccessPromise",{enumerable:!0,get:function(){return s.getSuccessPromise}});var l=bS;Object.defineProperty(e,"getFailure",{enumerable:!0,get:function(){return l.getFailure}});var f=mS;Object.defineProperty(e,"getFailureAsync",{enumerable:!0,get:function(){return f.getFailureAsync}});var d=gS;Object.defineProperty(e,"getFailurePromise",{enumerable:!0,get:function(){return d.getFailurePromise}});var v=wS;Object.defineProperty(e,"isSuccess",{enumerable:!0,get:function(){return v.isSuccess}});var h=OS;Object.defineProperty(e,"isSuccessAsync",{enumerable:!0,get:function(){return h.isSuccessAsync}});var p=SS;Object.defineProperty(e,"isSuccessPromise",{enumerable:!0,get:function(){return p.isSuccessPromise}});var y=_S;Object.defineProperty(e,"isFailure",{enumerable:!0,get:function(){return y.isFailure}});var b=xS;Object.defineProperty(e,"isFailureAsync",{enumerable:!0,get:function(){return b.isFailureAsync}});var m=PS;Object.defineProperty(e,"isFailurePromise",{enumerable:!0,get:function(){return m.isFailurePromise}});var g=AS;Object.defineProperty(e,"getResult",{enumerable:!0,get:function(){return g.getResult}});var w=ES;Object.defineProperty(e,"getResultAsync",{enumerable:!0,get:function(){return w.getResultAsync}});var O=jS;Object.defineProperty(e,"getResultPromise",{enumerable:!0,get:function(){return O.getResultPromise}});var S=TS;Object.defineProperty(e,"getError",{enumerable:!0,get:function(){return S.getError}});var _=IS;Object.defineProperty(e,"getErrorAsync",{enumerable:!0,get:function(){return _.getErrorAsync}});var x=kS;Object.defineProperty(e,"getErrorPromise",{enumerable:!0,get:function(){return x.getErrorPromise}});var P=CS;Object.defineProperty(e,"getErrorAsyncIterable",{enumerable:!0,get:function(){return P.getErrorAsyncIterable}});var A=i_();Object.defineProperty(e,"Result",{enumerable:!0,get:function(){return A.Result}});var E=o_;Object.defineProperty(e,"toResult",{enumerable:!0,get:function(){return E.toResult}});var j=a_;Object.defineProperty(e,"toResultAsync",{enumerable:!0,get:function(){return j.toResultAsync}});var T=s_;Object.defineProperty(e,"toResultPromise",{enumerable:!0,get:function(){return T.toResultPromise}});var I=n_();Object.defineProperty(e,"Option",{enumerable:!0,get:function(){return I.Option}});var k=f_;Object.defineProperty(e,"toOption",{enumerable:!0,get:function(){return k.toOption}});var C=v_;Object.defineProperty(e,"toOptionAsync",{enumerable:!0,get:function(){return C.toOptionAsync}});var F=p_;Object.defineProperty(e,"toOptionPromise",{enumerable:!0,get:function(){return F.toOptionPromise}})}(aS),function(e){e.ChannelClosedError=e.Channel=void 0;const t=aS,r=AO,n=kO,i=EO,o=rS,u=ui;e.Channel=class{constructor(){this.isClosed=!1,this.writeLock=new o.Mutex,this.writeSignalGroup=new n.SignalGroup,this.readSignalGroup=new n.SignalGroup,this.queue=new u.Queue}async send(e){if(this.isClosed)throw new i.ChannelClosedError;const n=await this.writeLock.acquire(),o=new r.Signal;this.readSignalGroup.add(o);try{if(this.isClosed)throw new i.ChannelClosedError;if(this.queue.enqueue(e),this.writeSignalGroup.emitAll(),await(0,t.isFailurePromise)(o))throw this.queue.empty(),new i.ChannelClosedError}finally{this.readSignalGroup.remove(o),n()}}receive(){return{[Symbol.asyncIterator]:()=>({next:async()=>{for(;0===this.queue.size;){if(this.isClosed)return{done:!0,value:void 0};const e=new r.Signal;this.writeSignalGroup.add(e);try{if(await(0,t.isFailurePromise)(e))return{done:!0,value:void 0}}finally{this.writeSignalGroup.remove(e)}}const e=this.queue.dequeue();return this.readSignalGroup.emitAll(),{done:!1,value:e}},return:async()=>(this.close(),{done:!0,value:void 0})})}}close(){this.isClosed||(this.isClosed=!0,this.writeSignalGroup.discardAll(),this.readSignalGroup.discardAll())}};var a=EO;Object.defineProperty(e,"ChannelClosedError",{enumerable:!0,get:function(){return a.ChannelClosedError}})}(uS);var b_={};!function(e){e.ChannelClosedError=e.BufferedChannel=void 0;const t=aS,r=AO,n=kO,i=ui,o=EO;e.BufferedChannel=class{constructor(e){this.bufferSize=e,this.isClosed=!1,this.enqueueSingalGroup=new n.SignalGroup,this.dequeueSignalGroup=new n.SignalGroup,this.buffer=new i.Queue}async send(e){if(this.isClosed)throw new o.ChannelClosedError;for(;this.buffer.size===this.bufferSize;){const e=new r.Signal;this.dequeueSignalGroup.add(e);try{if(await(0,t.isFailurePromise)(e))throw new o.ChannelClosedError}finally{this.dequeueSignalGroup.remove(e)}if(this.isClosed)throw new o.ChannelClosedError}this.buffer.enqueue(e),this.enqueueSingalGroup.emitAll()}receive(){return{[Symbol.asyncIterator]:()=>({next:async()=>{for(;0===this.buffer.size;){if(this.isClosed)return{done:!0,value:void 0};const e=new r.Signal;this.enqueueSingalGroup.add(e);try{if(await(0,t.isFailurePromise)(e))return{done:!0,value:void 0}}finally{this.enqueueSingalGroup.remove(e)}}const e=this.buffer.dequeue();return this.dequeueSignalGroup.emitAll(),{done:!1,value:e}},return:async()=>(this.close(),{done:!0,value:void 0})})}}close(){this.isClosed||(this.isClosed=!0,this.enqueueSingalGroup.discardAll(),this.dequeueSignalGroup.discardAll())}};var u=EO;Object.defineProperty(e,"ChannelClosedError",{enumerable:!0,get:function(){return u.ChannelClosedError}})}(b_);var m_={};!function(e){e.ChannelClosedError=e.UnlimitedChannel=void 0;const t=aS,r=AO,n=kO,i=ui,o=EO;e.UnlimitedChannel=class{constructor(){this.isClosed=!1,this.enqueueSignalGroup=new n.SignalGroup,this.buffer=new i.Queue}send(e){if(this.isClosed)throw new o.ChannelClosedError;this.buffer.enqueue(e),this.enqueueSignalGroup.emitAll()}receive(){return{[Symbol.asyncIterator]:()=>({next:async()=>{for(;0===this.buffer.size;){if(this.isClosed)return{done:!0,value:void 0};const e=new r.Signal;this.enqueueSignalGroup.add(e);try{if(await(0,t.isFailurePromise)(e))return{done:!0,value:void 0}}finally{this.enqueueSignalGroup.remove(e)}}return{done:!1,value:this.buffer.dequeue()}},return:async()=>(this.close(),{done:!0,value:void 0})})}}close(){this.isClosed||(this.isClosed=!0,this.enqueueSignalGroup.discardAll())}};var u=EO;Object.defineProperty(e,"ChannelClosedError",{enumerable:!0,get:function(){return u.ChannelClosedError}})}(m_);var g_={},w_={validateConcurrency:void 0};const O_=ii();w_.validateConcurrency=function(e,t){(0,O_.assert)(t===1/0||Number.isInteger(t),`The parameter ${e} must be an integer`),(0,O_.assert)(t>=1,`The parameter ${e} must be greater than or equal to 1`)},g_.TaskRunner=void 0;const S_=mO,__=oS,x_=ui,P_=w_;g_.TaskRunner=class{constructor(e=1/0){this.concurrency=e,this.fsm=new x_.FiniteStateMachine({running:{stop:"stopped"},stopped:{start:"running"}},"stopped"),this.queue=new x_.Queue,this.pending=0,this.debounceMicrotask=new __.DebounceMicrotask,this.nextTick=()=>{for(;this.queue.size>0&&this.pending<this.concurrency;){const[e,t]=this.queue.dequeue();this.run(e,t)}}}getConcurrency(){return this.concurrency}setConcurrency(e){(0,P_.validateConcurrency)("concurrency",e),this.concurrency=e}async add(e){const t=new S_.Deferred;return this.queue.enqueue([e,t]),this.fsm.matches("running")&&this.debounceMicrotask.queue(this.nextTick),await t}start(){this.fsm.send("start"),this.debounceMicrotask.queue(this.nextTick)}stop(){this.fsm.send("stop"),this.debounceMicrotask.cancel(this.nextTick)}clear(){this.queue.empty()}async run(e,t){this.pending++;try{const r=await e();t.resolve(r)}catch(e){t.reject(e)}this.pending--,this.fsm.matches("running")&&this.debounceMicrotask.queue(this.nextTick)}};var A_={},E_={},j_={},T_={parallel:void 0};const I_=w_;T_.parallel=function(e,t=1/0){return(0,I_.validateConcurrency)("concurrency",t),new Promise(((r,n)=>{let i=0,o=!0;const u=e[Symbol.iterator]();let a;for(let e=0;!a&&e<t;e++)c();async function c(){if(!o)return;if(a&&0===i)return s();let e;try{({value:e,done:a}=u.next())}catch(e){return l(e)}if(a)return void(0===i&&s());const t=e;i++;try{await t()}catch(e){return l(e)}i--,c()}function s(){var e;o=!1,a||null===(e=u.return)||void 0===e||e.call(u),r()}function l(e){var t;o=!1,a||null===(t=u.return)||void 0===t||t.call(u),n(e)}}))},j_.each=void 0;const k_=T_,C_=w_,F_=Rn(),N_=v;j_.each=function(e,t,r=1/0){return(0,C_.validateConcurrency)("concurrency",r),(0,N_.go)((async()=>{const n=(0,F_.map)(e,((e,r)=>()=>t(e,r)));return await(0,k_.parallel)(n,r)}))},E_.map=void 0;const M_=j_,R_=w_,z_=v;E_.map=function(e,t,r=1/0){return(0,R_.validateConcurrency)("concurrency",r),(0,z_.go)((async()=>{const n=[];return await(0,M_.each)(e,(async(e,r)=>{n[r]=await t(e,r)}),r),n}))};var B_=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var i=e[t];n[i[0]]=i[1]}return n},q_=a&&a.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};A_.all=void 0;const D_=E_,L_=v,U_=q_(B_);A_.all=function(e){return(0,L_.go)((async()=>{const t=Object.entries(e),r=await(0,D_.map)(t,(async([e,t])=>[e,await t]));return(0,U_.default)(r)}))};var V_={};V_.asyncify=void 0,V_.asyncify=function(e){return async function(...t){return Reflect.apply(e,this,await Promise.all(t))}};var W_={callbackify:void 0};const J_=v;W_.callbackify=function(e){return function(...t){const r=t.slice(0,-1),n=t[t.length-1];(0,J_.go)((async()=>{try{const t=await Reflect.apply(e,this,r);n(null,t)}catch(e){n(e)}}))}};var G_={};G_.delay=void 0,G_.delay=function(e){return new Promise((t=>setTimeout(t,e)))};var K_={},Y_={parallelAsync:void 0};const Q_=w_,$_=ii();Y_.parallelAsync=function(e,t){return(0,Q_.validateConcurrency)("concurrency",t),(0,$_.assert)(Number.isFinite(t),"concurrency must be finite number"),new Promise(((r,n)=>{let i=0,o=!0;const u=e[Symbol.asyncIterator]();let a;for(let e=0;!a&&e<t;e++)c();async function c(){if(!o)return;if(a&&0===i)return s();let e;try{({value:e,done:a}=await u.next())}catch(e){return l(e)}if(a)return void(0===i&&s());const t=e;i++;try{await t()}catch(e){return l(e)}i--,c()}function s(){var e;o=!1,a||null===(e=u.return)||void 0===e||e.call(u),r()}function l(e){var t;o=!1,a||null===(t=u.return)||void 0===t||t.call(u),n(e)}}))},K_.eachAsync=void 0;const H_=Y_,X_=w_,Z_=Rn(),ex=v,tx=ii();K_.eachAsync=function(e,t,r){return(0,X_.validateConcurrency)("concurrency",r),(0,tx.assert)(Number.isFinite(r),"concurrency must be finite number"),(0,ex.go)((async()=>{const n=(0,Z_.mapAsync)(e,((e,r)=>()=>t(e,r)));return await(0,H_.parallelAsync)(n,r)}))};var rx={filter:void 0};const nx=j_,ix=w_,ox=v;rx.filter=function(e,t,r=1/0){return(0,ix.validateConcurrency)("concurrency",r),(0,ox.go)((async()=>{const n=[];return await(0,nx.each)(e,(async(e,r)=>{await t(e,r)&&(n[r]=e)}),r),Object.values(n)}))};var ux={filterAsync:void 0};const ax=K_,cx=w_,sx=v;ux.filterAsync=function(e,t,r){return(0,cx.validateConcurrency)("concurrency",r),(0,sx.go)((async()=>{const n=[];return await(0,ax.eachAsync)(e,(async(e,r)=>{await t(e,r)&&(n[r]=e)}),r),Object.values(n)}))};var lx={mapAsync:void 0};const fx=K_,dx=w_,vx=v,hx=ii();lx.mapAsync=function(e,t,r){return(0,dx.validateConcurrency)("concurrency",r),(0,hx.assert)(Number.isFinite(r),"concurrency must be finite number"),(0,vx.go)((async()=>{const n=[];return await(0,fx.eachAsync)(e,(async(e,r)=>{n[r]=await t(e,r)}),r),n}))};var px={};px.promisify=function(e){return function(...t){return new Promise(((r,n)=>{Reflect.apply(e,this,[...t,(e,t)=>{if(e)return n(e);r(t)}])}))}};var yx={series:void 0};const bx=z;yx.series=async function(e){if((0,bx.isIterable)(e))for(const t of e)await t();else for await(const t of e)await t()};var mx={};mx.TimeoutError=mx.timeout=void 0;const gx=ii();mx.timeout=function(e){return new Promise(((t,r)=>{setTimeout((()=>r(new wx)),e)}))};class wx extends gx.CustomError{}mx.TimeoutError=wx;var Ox={};Ox.waterfall=void 0,Ox.waterfall=async function(e){let t;for await(const r of e)t=await r(t);return t};var Sx={pad:void 0};const _x=G_,xx=aS;Sx.pad=async function(e,t){const r=Date.now(),[n,i]=await(0,xx.getErrorResultAsync)((async()=>t()));if(n)throw n;return Date.now()-r<e&&await(0,_x.delay)(e),i};var Px={toExtraPromise:void 0};const Ax=bO;Px.toExtraPromise=function(e){return new Ax.ExtraPromise((async(t,r)=>{try{t(await e)}catch(e){r(e)}}))};var Ex={},jx={},Tx={};Tx.of=void 0,Tx.of=function*(e){yield e};var Ix={repeat:void 0};const kx=ii(),Cx=v;Ix.repeat=function(e,t=1/0){return(0,kx.assert)(t===1/0||Number.isInteger(t),"The parameter times must be an integer"),(0,Cx.go)((function*(){for(;t-- >0;)yield e}))};var Fx={};Fx.countdown=void 0,Fx.countdown=function*(e,t){if(!(e<t))for(let r=e;r>=t;r--)yield r};var Nx={};Nx.countup=void 0,Nx.countup=function*(e,t){if(!(e>t))for(let r=e;r<=t;r++)yield r};var Mx={range:void 0};const Rx=ii();Mx.range=function(e,t,r=1){return(0,Rx.assert)(r>0,"step parameter must be greater than 0"),function*(e,t,r){if(e<t)for(let n=e;n<t;n+=r)yield n;else for(let n=e;n>t;n-=r)yield n}(e,t,r)};var zx={};zx.stringifyJSONStream=void 0,zx.stringifyJSONStream=function*(e){var t;const r=e[Symbol.iterator]();let n;try{let e;for(({value:e,done:n}=r.next()),yield"[",n||(yield JSON.stringify(e));({value:e,done:n}=r.next()),!n;)yield","+JSON.stringify(e);yield"]"}finally{n||null===(t=r.return)||void 0===t||t.call(r)}};var Bx={};Bx.stringifyJSONStreamAsync=void 0,Bx.stringifyJSONStreamAsync=async function*(e){var t;const r=e[Symbol.asyncIterator]();let n;try{let e;for(({value:e,done:n}=await r.next()),yield"[",n||(yield JSON.stringify(e));({value:e,done:n}=await r.next()),!n;)yield","+JSON.stringify(e);yield"]"}finally{n||await(null===(t=r.return)||void 0===t?void 0:t.call(r))}};var qx={};qx.stringifyNDJSONStream=void 0,qx.stringifyNDJSONStream=function*(e){var t;const r=e[Symbol.iterator]();let n;try{let e;for(({value:e,done:n}=r.next()),n||(yield JSON.stringify(e));({value:e,done:n}=r.next()),!n;)yield"\n"+JSON.stringify(e)}finally{n||null===(t=r.return)||void 0===t||t.call(r)}};var Dx={};Dx.stringifyNDJSONStreamAsync=void 0,Dx.stringifyNDJSONStreamAsync=async function*(e){var t;const r=e[Symbol.asyncIterator]();let n;try{let e;for(({value:e,done:n}=await r.next()),n||(yield JSON.stringify(e));({value:e,done:n}=await r.next()),!n;)yield"\n"+JSON.stringify(e)}finally{n||await(null===(t=r.return)||void 0===t?void 0:t.call(r))}};var Lx={};Lx.sse=void 0,Lx.sse=function*(e){e.event&&(yield`event: ${e.event}\n`);for(const t of e.data.split("\n"))yield`data: ${t}\n`;e.id&&(yield`id: ${e.id}\n`),e.retry&&(yield`retry: ${e.retry}\n`),yield"\n"};var Ux={ReusableIterable:void 0};const Vx=WS;class Wx{constructor(e){this.getIterator=(0,Vx.lazy)((()=>e[Symbol.iterator]()))}get done(){return this._done}close(){var e,t;this._done||(this._done=!0,null===(t=(e=this.getIterator()).return)||void 0===t||t.call(e))}[Symbol.iterator](){return{next:()=>{if(this._done)return{done:!0,value:void 0};const{value:e,done:t}=this.getIterator().next();return t&&(this._done=!0),{value:e,done:t}}}}}Ux.ReusableIterable=Wx;var Jx={ReusableAsyncIterable:void 0};const Gx=WS;class Kx{constructor(e){this.getIterator=(0,Gx.lazy)((()=>e[Symbol.asyncIterator]()))}get done(){return this._done}async close(){var e,t;this.done||(this._done=!0,await(null===(t=(e=this.getIterator()).return)||void 0===t?void 0:t.call(e)))}[Symbol.asyncIterator](){return{next:async()=>{if(this._done)return{done:!0,value:void 0};const{value:e,done:t}=await this.getIterator().next();return t&&(this._done=!0),{value:e,done:t}}}}}Jx.ReusableAsyncIterable=Kx;var Yx={};Yx.timestampBasedId=void 0,Yx.timestampBasedId=function*(){const e=Date.now();yield[e,0];let t=e,r=0;for(;;){const e=Date.now();e===t?yield[t,++r]:(r=0,t=e,yield[t,r])}},function(e){var t=a&&a.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=a&&a.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};r(Tx,e),r(Ix,e),r(Fx,e),r(Nx,e),r(Mx,e),r(zx,e),r(Bx,e),r(qx,e),r(Dx,e),r(Lx,e),r(Ux,e),r(Jx,e),r(Yx,e)}(jx),Ex.spawn=void 0;const Qx=j_,$x=jx;Ex.spawn=async function(e,t){await(0,Qx.each)((0,$x.countup)(1,e),(e=>t(e)))};var Hx={queueConcurrency:void 0};const Xx=g_;Hx.queueConcurrency=function(e,t){const r=new Xx.TaskRunner(e);return r.start(),async function(...e){return await r.add((()=>t.apply(this,e)))}};var Zx={throttleConcurrency:void 0};const eP=w_;Zx.throttleConcurrency=function(e,t){(0,eP.validateConcurrency)("concurrency",e);let r=0;return function(...n){if(r<e)return r++,Promise.resolve(t.apply(this,n)).finally((()=>r--))}};var tP={};tP.throttleUntilDone=void 0,tP.throttleUntilDone=function(e){let t;return function(){return t||(t=Promise.resolve(e.apply(this)).finally((()=>t=void 0))),t}};var rP={},nP=a&&a.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};rP.reusePendingPromise=void 0;const iP=nP((function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var r,n="boolean"==typeof t.cycles&&t.cycles,i=t.cmp&&(r=t.cmp,function(e){return function(t,n){var i={key:t,value:e[t]},o={key:n,value:e[n]};return r(i,o)}}),o=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);var r,u;if(Array.isArray(t)){for(u="[",r=0;r<t.length;r++)r&&(u+=","),u+=e(t[r])||"null";return u+"]"}if(null===t)return"null";if(-1!==o.indexOf(t)){if(n)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var a=o.push(t)-1,c=Object.keys(t).sort(i&&i(t));for(u="",r=0;r<c.length;r++){var s=c[r],l=e(t[s]);l&&(u&&(u+=","),u+=JSON.stringify(s)+":"+l)}return o.splice(a,1),"{"+u+"}"}}(e)})),oP=ui;rP.reusePendingPromise=function(e,t){const r=new oP.HashMap((e=>(0,iP.default)(e)));return async function(...e){const[r,i]=await n.apply(this,e);return(null==t?void 0:t.verbose)?[r,i]:r};async function n(...t){const n=r.get(t);if(n)return[await n,!0];{const n=Promise.resolve(e.apply(this,t)).finally((()=>r.delete(t)));return r.set(t,n),[await n,!1]}}},function(e){var t=a&&a.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=a&&a.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};r(bO,e),r(mO,e),r(gO,e),r(SO,e),r(PO,e),r(AO,e),r(kO,e),r(CO,e),r(rS,e),r(oS,e),r(uS,e),r(b_,e),r(m_,e),r(g_,e),r(A_,e),r(V_,e),r(W_,e),r(G_,e),r(j_,e),r(K_,e),r(rx,e),r(ux,e),r(E_,e),r(lx,e),r(T_,e),r(Y_,e),r(px,e),r(yx,e),r(mx,e),r(Ox,e),r(Sx,e),r(Px,e),r(Ex,e),r(Hx,e),r(Zx,e),r(tP,e),r(rP,e)}(yO);var uP=Rn();function aP(e){return"function"==typeof e}function cP(e){var t=e((function(e){Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var sP=cP((function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}));function lP(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var fP=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,r,n,a;if(!this.closed){this.closed=!0;var c=this._parentage;if(c)if(this._parentage=null,Array.isArray(c))try{for(var s=i(c),l=s.next();!l.done;l=s.next()){l.value.remove(this)}}catch(t){e={error:t}}finally{try{l&&!l.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}else c.remove(this);var f=this.initialTeardown;if(aP(f))try{f()}catch(e){a=e instanceof sP?e.errors:[e]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var v=i(d),h=v.next();!h.done;h=v.next()){var p=h.value;try{hP(p)}catch(e){a=null!=a?a:[],e instanceof sP?a=u(u([],o(a)),o(e.errors)):a.push(e)}}}catch(e){r={error:e}}finally{try{h&&!h.done&&(n=v.return)&&n.call(v)}finally{if(r)throw r.error}}}if(a)throw new sP(a)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)hP(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(r=this._finalizers)&&void 0!==r?r:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&lP(t,e)},e.prototype.remove=function(t){var r=this._finalizers;r&&lP(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),dP=fP.EMPTY;function vP(e){return e instanceof fP||e&&"closed"in e&&aP(e.remove)&&aP(e.add)&&aP(e.unsubscribe)}function hP(e){aP(e)?e():e.unsubscribe()}var pP={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},yP=function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setTimeout.apply(void 0,u([e,t],o(r)))};function bP(){}function mP(e){e()}var gP=function(e){function t(t){var r=e.call(this)||this;return r.isStopped=!1,t?(r.destination=t,vP(t)&&t.add(r)):r.destination=PP,r}return r(t,e),t.create=function(e,t,r){return new _P(e,t,r)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(fP),wP=Function.prototype.bind;function OP(e,t){return wP.call(e,t)}var SP=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){xP(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){xP(e)}else xP(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){xP(e)}},e}(),_P=function(e){function t(t,r,n){var i,o,u=e.call(this)||this;aP(t)||!t?i={next:null!=t?t:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:u&&pP.useDeprecatedNextContext?((o=Object.create(t)).unsubscribe=function(){return u.unsubscribe()},i={next:t.next&&OP(t.next,o),error:t.error&&OP(t.error,o),complete:t.complete&&OP(t.complete,o)}):i=t;return u.destination=new SP(i),u}return r(t,e),t}(gP);function xP(e){var t;t=e,yP((function(){throw t}))}var PP={closed:!0,next:bP,error:function(e){throw e},complete:bP},AP="function"==typeof Symbol&&Symbol.observable||"@@observable";function EP(e){return e}function jP(e){return 0===e.length?EP:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var TP=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var n,i=this,o=(n=e)&&n instanceof gP||function(e){return e&&aP(e.next)&&aP(e.error)&&aP(e.complete)}(n)&&vP(n)?e:new _P(e,t,r);return mP((function(){var e=i,t=e.operator,r=e.source;o.add(t?t.call(o,r):r?i._subscribe(o):i._trySubscribe(o))})),o},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=IP(t))((function(t,n){var i=new _P({next:function(t){try{e(t)}catch(e){n(e),i.unsubscribe()}},error:n,complete:t});r.subscribe(i)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[AP]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return jP(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=IP(e))((function(e,r){var n;t.subscribe((function(e){return n=e}),(function(e){return r(e)}),(function(){return e(n)}))}))},e.create=function(t){return new e(t)},e}();function IP(e){var t;return null!==(t=null!=e?e:pP.Promise)&&void 0!==t?t:Promise}function kP(e){return aP(null==e?void 0:e.lift)}function CP(e){return function(t){if(kP(t))return t.lift((function(t){try{return e(t,this)}catch(e){this.error(e)}}));throw new TypeError("Unable to lift unknown Observable type")}}function FP(e,t,r,n,i){return new NP(e,t,r,n,i)}var NP=function(e){function t(t,r,n,i,o,u){var a=e.call(this,t)||this;return a.onFinalize=o,a.shouldUnsubscribe=u,a._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:e.prototype._next,a._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,a._complete=n?function(){try{n()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,a}return r(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},t}(gP);!function(e){function t(t,r){var n=e.call(this)||this;return n.source=t,n.subjectFactory=r,n._subject=null,n._refCount=0,n._connection=null,kP(t)&&(n.lift=t.lift),n}r(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},t.prototype._teardown=function(){this._refCount=0;var e=this._connection;this._subject=this._connection=null,null==e||e.unsubscribe()},t.prototype.connect=function(){var e=this,t=this._connection;if(!t){t=this._connection=new fP;var r=this.getSubject();t.add(this.source.subscribe(FP(r,void 0,(function(){e._teardown(),r.complete()}),(function(t){e._teardown(),r.error(t)}),(function(){return e._teardown()})))),t.closed&&(this._connection=null,t=fP.EMPTY)}return t},t.prototype.refCount=function(){return CP((function(e,t){var r=null;e._refCount++;var n=FP(t,void 0,void 0,void 0,(function(){if(!e||e._refCount<=0||0<--e._refCount)r=null;else{var n=e._connection,i=r;r=null,!n||i&&n!==i||n.unsubscribe(),t.unsubscribe()}}));e.subscribe(n),n.closed||(r=e.connect())}))(this)}}(TP);var MP,RP,zP={now:function(){return(zP.delegate||performance).now()},delegate:void 0},BP={schedule:function(e){var t=requestAnimationFrame,r=cancelAnimationFrame,n=t((function(t){r=void 0,e(t)}));return new fP((function(){return null==r?void 0:r(n)}))},requestAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=BP.delegate;return((null==r?void 0:r.requestAnimationFrame)||requestAnimationFrame).apply(void 0,u([],o(e)))},cancelAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return cancelAnimationFrame.apply(void 0,u([],o(e)))},delegate:void 0};RP=BP.schedule,new TP((function(e){var t=new fP,r=MP||zP,n=r.now(),i=function(o){var u=r.now();e.next({timestamp:MP?u:o,elapsed:u-n}),e.closed||t.add(RP(i))};return t.add(RP(i)),t}));var qP=cP((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),DP=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return r(t,e),t.prototype.lift=function(e){var t=new LP(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new qP},t.prototype.next=function(e){var t=this;mP((function(){var r,n;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var o=i(t.currentObservers),u=o.next();!u.done;u=o.next()){u.value.next(e)}}catch(e){r={error:e}}finally{try{u&&!u.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}}}))},t.prototype.error=function(e){var t=this;mP((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var r=t.observers;r.length;)r.shift().error(e)}}))},t.prototype.complete=function(){var e=this;mP((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,r=this,n=r.hasError,i=r.isStopped,o=r.observers;return n||i?dP:(this.currentObservers=null,o.push(e),new fP((function(){t.currentObservers=null,lP(o,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,r=t.hasError,n=t.thrownError,i=t.isStopped;r?e.error(n):i&&e.complete()},t.prototype.asObservable=function(){var e=new TP;return e.source=this,e},t.create=function(e,t){return new LP(e,t)},t}(TP),LP=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return r(t,e),t.prototype.next=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===r||r.call(t,e)},t.prototype.error=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===r||r.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,r;return null!==(r=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==r?r:dP},t}(DP);!function(e){function t(t){var r=e.call(this)||this;return r._value=t,r}r(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var r=e.prototype._subscribe.call(this,t);return!r.closed&&t.next(this._value),r},t.prototype.getValue=function(){var e=this,t=e.hasError,r=e.thrownError,n=e._value;if(t)throw r;return this._throwIfClosed(),n},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)}}(DP);var UP={now:function(){return(UP.delegate||Date).now()},delegate:void 0};!function(e){function t(t,r,n){void 0===t&&(t=1/0),void 0===r&&(r=1/0),void 0===n&&(n=UP);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=r,i._timestampProvider=n,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=r===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,r),i}r(t,e),t.prototype.next=function(t){var r=this,n=r.isStopped,i=r._buffer,o=r._infiniteTimeWindow,u=r._timestampProvider,a=r._windowTime;n||(i.push(t),!o&&i.push(u.now()+a)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),r=this._infiniteTimeWindow,n=this._buffer.slice(),i=0;i<n.length&&!e.closed;i+=r?1:2)e.next(n[i]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,r=e._timestampProvider,n=e._buffer,i=e._infiniteTimeWindow,o=(i?1:2)*t;if(t<1/0&&o<n.length&&n.splice(0,n.length-o),!i){for(var u=r.now(),a=0,c=1;c<n.length&&n[c]<=u;c+=2)a=c;a&&n.splice(0,a+1)}}}(DP),function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._value=null,t._hasValue=!1,t._isComplete=!1,t}r(t,e),t.prototype._checkFinalizedStatuses=function(e){var t=this,r=t.hasError,n=t._hasValue,i=t._value,o=t.thrownError,u=t.isStopped,a=t._isComplete;r?e.error(o):(u||a)&&(n&&e.next(i),e.complete())},t.prototype.next=function(e){this.isStopped||(this._value=e,this._hasValue=!0)},t.prototype.complete=function(){var t=this,r=t._hasValue,n=t._value;t._isComplete||(this._isComplete=!0,r&&e.prototype.next.call(this,n),e.prototype.complete.call(this))}}(DP);var VP,WP=function(e){function t(t,r){return e.call(this)||this}return r(t,e),t.prototype.schedule=function(e,t){return this},t}(fP),JP=function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setInterval.apply(void 0,u([e,t],o(r)))},GP=function(e){return clearInterval(e)},KP=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n.pending=!1,n}return r(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r=this.id,n=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(n,r,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(n,this.id,t),this},t.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),JP(e.flush.bind(e,this),r)},t.prototype.recycleAsyncId=function(e,t,r){if(void 0===r&&(r=0),null!=r&&this.delay===r&&!1===this.pending)return t;GP(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var r,n=!1;try{this.work(e)}catch(e){n=!0,r=e||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,r=this.scheduler,n=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,lP(n,this),null!=t&&(this.id=this.recycleAsyncId(r,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(WP),YP=1,QP={};function $P(e){return e in QP&&(delete QP[e],!0)}var HP=function(e){var t=YP++;return QP[t]=!0,VP||(VP=Promise.resolve()),VP.then((function(){return $P(t)&&e()})),t},XP=function(e){$P(e)},ZP={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=ZP.delegate;return((null==r?void 0:r.setImmediate)||HP).apply(void 0,u([],o(e)))},clearImmediate:function(e){return XP(e)},delegate:void 0},eA=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return r(t,e),t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!==n&&n>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t._scheduled||(t._scheduled=ZP.setImmediate(t.flush.bind(t,void 0))))},t.prototype.recycleAsyncId=function(t,r,n){if(void 0===n&&(n=0),null!=n&&n>0||null==n&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);t.actions.some((function(e){return e.id===r}))||(ZP.clearImmediate(r),t._scheduled=void 0)},t}(KP),tA=function(){function e(t,r){void 0===r&&(r=e.now),this.schedulerActionCtor=t,this.now=r}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},e.now=UP.now,e}(),rA=function(e){function t(t,r){void 0===r&&(r=tA.now);var n=e.call(this,t,r)||this;return n.actions=[],n._active=!1,n._scheduled=void 0,n}return r(t,e),t.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var r;this._active=!0;do{if(r=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,r){for(;e=t.shift();)e.unsubscribe();throw r}}},t}(tA);new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.flush=function(e){this._active=!0;var t=this._scheduled;this._scheduled=void 0;var r,n=this.actions;e=e||n.shift();do{if(r=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},t}(rA))(eA),new rA(KP);var nA=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return r(t,e),t.prototype.schedule=function(t,r){return void 0===r&&(r=0),r>0?e.prototype.schedule.call(this,t,r):(this.delay=r,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,r){return r>0||this.closed?e.prototype.execute.call(this,t,r):this._execute(t,r)},t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!=n&&n>0||null==n&&this.delay>0?e.prototype.requestAsyncId.call(this,t,r,n):t.flush(this)},t}(KP);new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t}(rA))(nA);var iA=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return r(t,e),t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!==n&&n>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t._scheduled||(t._scheduled=BP.requestAnimationFrame((function(){return t.flush(void 0)}))))},t.prototype.recycleAsyncId=function(t,r,n){if(void 0===n&&(n=0),null!=n&&n>0||null==n&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);t.actions.some((function(e){return e.id===r}))||(BP.cancelAnimationFrame(r),t._scheduled=void 0)},t}(KP);new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.flush=function(e){this._active=!0;var t=this._scheduled;this._scheduled=void 0;var r,n=this.actions;e=e||n.shift();do{if(r=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},t}(rA))(iA),function(e){function t(t,r){void 0===t&&(t=uA),void 0===r&&(r=1/0);var n=e.call(this,t,(function(){return n.frame}))||this;return n.maxFrames=r,n.frame=0,n.index=-1,n}r(t,e),t.prototype.flush=function(){for(var e,t,r=this.actions,n=this.maxFrames;(t=r[0])&&t.delay<=n&&(r.shift(),this.frame=t.delay,!(e=t.execute(t.state,t.delay))););if(e){for(;t=r.shift();)t.unsubscribe();throw e}},t.frameTimeFactor=10}(rA);var oA,uA=function(e){function t(t,r,n){void 0===n&&(n=t.index+=1);var i=e.call(this,t,r)||this;return i.scheduler=t,i.work=r,i.index=n,i.active=!0,i.index=t.index=n,i}return r(t,e),t.prototype.schedule=function(r,n){if(void 0===n&&(n=0),Number.isFinite(n)){if(!this.id)return e.prototype.schedule.call(this,r,n);this.active=!1;var i=new t(this.scheduler,this.work);return this.add(i),i.schedule(r,n)}return fP.EMPTY},t.prototype.requestAsyncId=function(e,r,n){void 0===n&&(n=0),this.delay=e.frame+n;var i=e.actions;return i.push(this),i.sort(t.sortActions),!0},t.prototype.recycleAsyncId=function(e,t,r){},t.prototype._execute=function(t,r){if(!0===this.active)return e.prototype._execute.call(this,t,r)},t.sortActions=function(e,t){return e.delay===t.delay?e.index===t.index?0:e.index>t.index?1:-1:e.delay>t.delay?1:-1},t}(KP);new TP((function(e){return e.complete()})),function(e){e.NEXT="N",e.ERROR="E",e.COMPLETE="C"}(oA||(oA={}));var aA,cA=cP((function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}));function sA(e,t){var r="object"==typeof t;return new Promise((function(n,i){var o=new _P({next:function(e){n(e),o.unsubscribe()},error:i,complete:function(){r?n(t.defaultValue):i(new cA)}});e.subscribe(o)}))}function lA(e,t){return CP((function(r,n){var i=0;r.subscribe(FP(n,(function(r){return e.call(t,r,i++)&&n.next(r)})))}))}cP((function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})),cP((function(e){return function(t){e(this),this.name="NotFoundError",this.message=t}})),cP((function(e){return function(t){e(this),this.name="SequenceError",this.message=t}})),cP((function(e){return function(t){void 0===t&&(t=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=t}})),new TP(bP),function(e){e.Creating="creating",e.Idle="idle",e.Using="using",e.Destroying="destroying",e.Destroyed="destroyed"}(aA||(aA={}));const fA={[aA.Creating]:{created:aA.Idle},[aA.Idle]:{use:aA.Using,destroy:aA.Destroying},[aA.Using]:{used:aA.Idle},[aA.Destroying]:{destroyed:aA.Destroyed},[aA.Destroyed]:{}};class dA{constructor(e,t){this.destroyValue=t,this._value=new yO.Deferred,this.fsm=new ui.ObservableFiniteStateMachine(fA,aA.Creating),FS.go((()=>n(this,void 0,void 0,(function*(){try{const t=yield e();this._value.resolve(t),this.fsm.send("created")}catch(e){this._value.reject(e)}}))))}waitForCreated(){return n(this,void 0,void 0,(function*(){yield this._value}))}getState(){return this.fsm.state}use(e){return n(this,void 0,void 0,(function*(){this.fsm.send("use");const t=yield this._value;try{return yield e(t)}finally{this.fsm.send("used")}}))}destroy(){var e;return n(this,void 0,void 0,(function*(){(this.fsm.matches(aA.Creating)||this.fsm.matches(aA.Using))&&(yield sA(this.fsm.observeStateChanges().pipe(lA((e=>e.newState===aA.Idle))))),this.fsm.matches(aA.Idle)?(this.fsm.send("destroy"),yield null===(e=this.destroyValue)||void 0===e?void 0:e.call(this,yield this._value),this.fsm.send("destroyed")):this.fsm.matches(aA.Destroying)&&(yield sA(this.fsm.observeStateChanges().pipe(lA((e=>e.newState===aA.Destroyed)))))}))}}var vA;!function(e){e.Running="running",e.Destroying="destroying",e.Destroyed="destroyed"}(vA||(vA={}));const hA={[vA.Running]:{destroy:vA.Destroying},[vA.Destroying]:{destroyed:vA.Destroyed},[vA.Destroyed]:{}};class pA extends oi.CustomError{}e.Pool=class{constructor(e){var t,r,n;this.fsm=new ui.FiniteStateMachine(hA,vA.Running),this.items=new Set,this.userDeferredQueue=new ui.Queue,this.createValue=e.create,this.destroyValue=e.destroy,this.maxInstances=null!==(t=e.maxInstances)&&void 0!==t?t:1/0,this.minInstances=null!==(r=e.minInstances)&&void 0!==r?r:0,this.idleTimeout=null!==(n=e.idleTimeout)&&void 0!==n?n:0}get size(){return this.items.size}use(e){return n(this,void 0,void 0,(function*(){const t=this,r=uP.find(this.items,(e=>!e.using));if(r)return yield i(r);if(this.items.size<this.maxInstances){const e={instance:new dA(this.createValue,this.destroyValue),using:!0};return this.items.add(e),yield i(e)}{const e=new yO.Deferred;this.userDeferredQueue.enqueue(e);const t=yield e;return yield i(t)}function i(r){return n(this,void 0,void 0,(function*(){r.using=!0,r.cancelDeletion&&(r.cancelDeletion(),delete r.cancelDeletion),yield r.instance.waitForCreated();try{return yield r.instance.use(e)}finally{t.userDeferredQueue.size>0?t.userDeferredQueue.dequeue().resolve(r):(r.using=!1,t.items.size>t.minInstances&&(t.idleTimeout>0?r.cancelDeletion=b.setTimeout(t.idleTimeout,i):yield i()))}function i(){return n(this,void 0,void 0,(function*(){t.items.delete(r),yield r.instance.destroy()}))}}))}}))}destroy(){return n(this,void 0,void 0,(function*(){this.fsm.send("destroy");for(const e of this.items)yield e.instance.destroy();let e;for(this.items.clear();e=this.userDeferredQueue.dequeue();)e.reject(new pA);this.fsm.send("destroyed")}))}},e.UnavailablePool=pA,Object.defineProperty(e,"__esModule",{value:!0})}));
2
- //# sourceMappingURL=index.umd.min.js.map