extra-pool 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t={},r={},n={},i={},o={},a={},u={};u.go=void 0,u.go=function(e){return e()};var c={};c.goMicrotask=void 0,c.goMicrotask=function(e){return new Promise(((t,r)=>{queueMicrotask((async()=>{try{t(await e())}catch(e){r(e)}}))}))};var s={},l={},f={},d={},v={};v.random=void 0,v.random=function(e,t){return Math.random()*(t-e)+e};var h={};h.randomInt=void 0,h.randomInt=function(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e))+e};var p,y,b,m={};m.randomIntInclusive=void 0,m.randomIntInclusive=function(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e},p=d,y=e&&e.__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]}),(b=e&&e.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||y(t,e,r)})(v,p),b(h,p),b(m,p),f.calculateExponentialBackoffTimeout=void 0;const g=d;f.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,g.randomIntInclusive)(0,o):o};var w={};w.setTimeout=void 0,w.setTimeout=function(e,t){const r=globalThis.setTimeout(t,e);return()=>clearTimeout(r)};var O={setSchedule:void 0};const S=w;O.setSchedule=function(e,t){const r=e-Date.now();return(0,S.setTimeout)(r,t)};var _={};_.setInterval=void 0,_.setInterval=function(e,t){const r=globalThis.setInterval(t,e);return()=>clearInterval(r)};var x={setImmediate:void 0};const P=w;x.setImmediate=function(e){if(globalThis.setImmediate){const t=globalThis.setImmediate(e);return()=>clearImmediate(t)}return(0,P.setTimeout)(0,e)};var A={setTimeoutLoop:void 0};const E=w;A.setTimeoutLoop=function(e,t){let r=!1,n=(0,E.setTimeout)(e,(async function i(){await t(),r||(n=(0,E.setTimeout)(e,i))}));return()=>{r=!0,n()}};var j={setDynamicTimeoutLoop:void 0};const T=w;j.setDynamicTimeoutLoop=function(e,t){let r=!1,n=(0,T.setTimeout)(e,(async function i(){const o=Date.now();await t();const a=Date.now()-o;r||(n=(0,T.setTimeout)(Math.max(e-a,0),i))}));return()=>{r=!0,n()}},function(t){var r=e&&e.__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]}),n=e&&e.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};n(f,t),n(w,t),n(O,t),n(_,t),n(x,t),n(A,t),n(j,t)}(l),s.goMacrotask=void 0;const I=l;var k;s.goMacrotask=function(e){return new Promise(((t,r)=>{(0,I.setImmediate)((async()=>{try{t(await e())}catch(e){r(e)}}))}))},function(t){var r=e&&e.__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]}),n=e&&e.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};n(u,t),n(c,t),n(s,t)}(a);var C={},F={},N={};function M(e){return Array.isArray(e)}N.isntEmptyArray=N.isEmptyArray=N.isntArray=N.isArray=void 0,N.isArray=M,N.isntArray=function(e){return!M(e)},N.isEmptyArray=function(e){return 0===e.length},N.isntEmptyArray=function(e){return 0!==e.length};var R={},z={};function B(e){return null===e}z.isntNull=z.isNull=void 0,z.isNull=B,z.isntNull=function(e){return!B(e)};var q={};function D(e){return void 0===e}q.isntUndefined=q.isUndefined=void 0,q.isUndefined=D,q.isntUndefined=function(e){return!D(e)};var L={};function U(e){return"function"==typeof e}L.isntFunction=L.isFunction=void 0,L.isFunction=U,L.isntFunction=function(e){return!U(e)},R.isntAsyncIterable=R.isAsyncIterable=void 0;const V=z,W=q,J=L;function G(e){return(0,V.isntNull)(e)&&(0,W.isntUndefined)(e)&&(0,J.isFunction)(e[Symbol.asyncIterator])}R.isAsyncIterable=G,R.isntAsyncIterable=function(e){return!G(e)};var K={};function Y(e){return"bigint"==typeof e}K.isntBigInt=K.isBigInt=void 0,K.isBigInt=Y,K.isntBigInt=function(e){return!Y(e)};var Q={};function $(e){return"boolean"==typeof e}Q.isntBoolean=Q.isBoolean=void 0,Q.isBoolean=$,Q.isntBoolean=function(e){return!$(e)};var H={},X={};function Z(e){return"string"==typeof e}X.isntString=X.isString=void 0,X.isString=Z,X.isntString=function(e){return!Z(e)},H.isntChar=H.isChar=void 0;const ee=X;function te(e){return(0,ee.isString)(e)&&1===e.length}H.isChar=te,H.isntChar=function(e){return!te(e)};var re={};function ne(e){return e instanceof Date}re.isntDate=re.isDate=void 0,re.isDate=ne,re.isntDate=function(e){return!ne(e)};var ie={};ie.inEnum=void 0,ie.inEnum=function(e,t){return Object.values(t).includes(e)};var oe={};function ae(e){return e instanceof Error}oe.isntError=oe.isError=void 0,oe.isError=ae,oe.isntError=function(e){return!ae(e)};var ue={};function ce(e){return!e}ue.isntFalsy=ue.isFalsy=void 0,ue.isFalsy=ce,ue.isntFalsy=function(e){return!ce(e)};var se={};se.isntIterable=se.isIterable=void 0;const le=z,fe=q,de=L;function ve(e){return(0,le.isntNull)(e)&&(0,fe.isntUndefined)(e)&&(0,de.isFunction)(e[Symbol.iterator])}se.isIterable=ve,se.isntIterable=function(e){return!ve(e)};var he={},pe={};function ye(e){return"number"==typeof e}function be(e){return Number.isNaN(e)}pe.isntNaN=pe.isNaN=pe.isNegativeInfinity=pe.isPositiveInfinity=pe.isFinite=pe.isntNumber=pe.isNumber=void 0,pe.isNumber=ye,pe.isntNumber=function(e){return!ye(e)},pe.isFinite=function(e){return Number.isFinite(e)},pe.isPositiveInfinity=function(e){return e===1/0},pe.isNegativeInfinity=function(e){return e===-1/0},pe.isNaN=be,pe.isntNaN=function(e){return!be(e)};var me={},ge="object"==typeof e&&e&&e.Object===Object&&e,we="object"==typeof self&&self&&self.Object===Object&&self,Oe=(ge||we||Function("return this")()).Symbol,Se=Oe,_e=Object.prototype,xe=_e.hasOwnProperty,Pe=_e.toString,Ae=Se?Se.toStringTag:void 0;var Ee=function(e){var t=xe.call(e,Ae),r=e[Ae];try{e[Ae]=void 0;var n=!0}catch(e){}var i=Pe.call(e);return n&&(t?e[Ae]=r:delete e[Ae]),i},je=Object.prototype.toString;var Te=Ee,Ie=function(e){return je.call(e)},ke=Oe?Oe.toStringTag:void 0;var Ce=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":ke&&ke in Object(e)?Te(e):Ie(e)};var Fe=function(e,t){return function(r){return e(t(r))}}(Object.getPrototypeOf,Object);var Ne=function(e){return null!=e&&"object"==typeof e},Me=Ce,Re=Fe,ze=Ne,Be=Function.prototype,qe=Object.prototype,De=Be.toString,Le=qe.hasOwnProperty,Ue=De.call(Object);var Ve=function(e){if(!ze(e)||"[object Object]"!=Me(e))return!1;var t=Re(e);if(null===t)return!0;var r=Le.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&De.call(r)==Ue},We=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};me.isntEmptyObject=me.isEmptyObject=me.isntPlainObject=me.isPlainObject=me.isntObject=me.isObject=void 0;const Je=We(Ve);function Ge(e){return null!==e&&"object"==typeof e}function Ke(e){return(0,Je.default)(e)}me.isObject=Ge,me.isntObject=function(e){return!Ge(e)},me.isPlainObject=Ke,me.isntPlainObject=function(e){return!Ke(e)},me.isEmptyObject=function(e){return 0===Object.keys(e).length},me.isntEmptyObject=function(e){return 0!==Object.keys(e).length},he.isntJsonable=he.isJsonable=he.isntJson=he.isJson=void 0;const Ye=z,Qe=Q,$e=X,He=pe,Xe=N,Ze=me;function et(e){return(0,Ye.isNull)(e)||(0,Qe.isBoolean)(e)||(0,$e.isString)(e)||(0,He.isNumber)(e)||(0,Xe.isArray)(e)&&e.every(et)||(0,Ze.isPlainObject)(e)&&Object.values(e).every(et)}he.isJson=et,he.isntJson=function(e){return!et(e)},he.isJsonable=function(e){try{return JSON.stringify(e),!0}catch(e){return!1}},he.isntJsonable=function e(t){return!e()};var tt={};tt.isPromiseLike=tt.isntPromiseLike=tt.isntPromise=tt.isPromise=void 0;const rt=me,nt=L;function it(e){return e instanceof Promise}function ot(e){return(0,rt.isObject)(e)&&(0,nt.isFunction)(e.then)}tt.isPromise=it,tt.isntPromise=function(e){return!it(e)},tt.isntPromiseLike=function(e){return!ot(e)},tt.isPromiseLike=ot;var at={};at.isAbsoluteURL=void 0,at.isAbsoluteURL=function(e){try{return new URL(e),!0}catch(e){return!1}};var ut={};function ct(e){return e instanceof RegExp}ut.isntRegExp=ut.isRegExp=void 0,ut.isRegExp=ct,ut.isntRegExp=function(e){return!ct(e)};var st={};function lt(e){return"symbol"==typeof e}st.isntSymbol=st.isSymbol=void 0,st.isSymbol=lt,st.isntSymbol=function(e){return!lt(e)},function(t){var r=e&&e.__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]}),n=e&&e.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};n(N,t),n(R,t),n(K,t),n(Q,t),n(H,t),n(re,t),n(ie,t),n(oe,t),n(ue,t),n(L,t),n(se,t),n(he,t),n(z,t),n(pe,t),n(me,t),n(tt,t),n(X,t),n(q,t),n(at,t),n(ut,t),n(st,t)}(F),C.chunkByAsync=void 0;const ft=F;C.chunkByAsync=function(e,t){return(0,ft.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 dt={};dt.chunkBy=void 0,dt.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 vt,ht={};var pt={concatAsync:void 0};const yt=F,bt=a;pt.concatAsync=function(e,...t){return(0,bt.go)((async function*(){for(const r of[e,...t])if((0,yt.isAsyncIterable)(r))for await(const e of r)yield e;else for(const e of r)yield e}))};var mt={concat:void 0};const gt=a;mt.concat=function(e,...t){return(0,gt.go)((function*(){for(const r of[e,...t])yield*r}))};var wt,Ot={},St={};St.copyIterable=St.copyAsyncIterable=void 0,St.copyAsyncIterable=async function*(e){for await(const t of e)yield t},St.copyIterable=function*(e){for(const t of e)yield t};var _t,xt={};var Pt,At={};var Et={dropUntilAsync:void 0};const jt=F;Et.dropUntilAsync=function(e,t){return(0,jt.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 Tt={};Tt.dropUntil=void 0,Tt.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 It,kt={};var Ct={filterAsync:void 0};const Ft=F;Ct.filterAsync=function(e,t){return(0,Ft.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 Nt={};Nt.filter=void 0,Nt.filter=function*(e,t){let r=0;for(const n of e)t(n,r)&&(yield n),r++};var Mt={},Rt={},zt={flattenByAsync:void 0};const Bt=F;async function*qt(e,t,r){for(const n of e)Dt(n)&&await t(n,r)?yield*qt(n,t,r+1):yield n}function Dt(e){return(0,Bt.isIterable)(e)&&(0,Bt.isntChar)(e)}var Lt,Ut;function Vt(){if(Lt)return Rt;Lt=1,Rt.flattenDeepAsync=void 0;const e=zt,t=ei();return Rt.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))},Rt}zt.flattenByAsync=function(e,t){return(0,Bt.isAsyncIterable)(e)?async function*(e,t){const r=1;for await(const n of e)Dt(n)&&await t(n,r)?yield*qt(n,t,r+1):yield n}(e,t):function(e,t){return qt(e,t,1)}(e,t)};var Wt={flattenBy:void 0};const Jt=F;function*Gt(e,t,r){for(const i of e)(0,Jt.isIterable)(n=i)&&(0,Jt.isntChar)(n)&&t(i,r)?yield*Gt(i,t,r+1):yield i;var n}Wt.flattenBy=function(e,t){return Gt(e,t,1)};var Kt,Yt={};function Qt(){if(Kt)return Yt;Kt=1,Yt.flattenDeep=void 0;const e=Wt,t=ei();return Yt.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))},Yt}var $t,Ht={};var Xt={mapAsync:void 0};const Zt=F;Xt.mapAsync=function(e,t){return(0,Zt.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 er={};er.map=void 0,er.map=function*(e,t){let r=0;for(const n of e)yield t(n,r),r++};var tr,rr={};function nr(){if(tr)return rr;tr=1,rr.repeatAsync=void 0;const e=a,t=ei();return rr.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--}))},rr}var ir,or={};function ar(){if(ir)return or;ir=1,or.repeat=void 0;const e=a,t=ei();return or.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--}))},or}var ur,cr={};var sr,lr={};var fr={};fr.splitAsync=void 0,fr.splitAsync=async function*(e,t){let r=[];for await(const n of e)n===t?(yield r,r=[]):r.push(n);yield r};var dr={splitByAsync:void 0};const vr=F;dr.splitByAsync=function(e,t){return(0,vr.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 hr={};hr.splitBy=void 0,hr.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 pr={};pr.split=void 0,pr.split=function*(e,t){let r=[];for(const n of e)n===t?(yield r,r=[]):r.push(n);yield r};var yr,br={};var mr,gr={};var wr,Or={};var Sr={takeUntilAsync:void 0};const _r=F;Sr.takeUntilAsync=function(e,t){return(0,_r.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 xr={};xr.takeUntil=void 0,xr.takeUntil=function*(e,t){let r=0;for(const n of e){if(t(n,r))break;yield n,r++}};var Pr,Ar={};var Er={tapAsync:void 0};const jr=F;Er.tapAsync=function(e,t){return(0,jr.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 Tr={};Tr.tap=void 0,Tr.tap=function*(e,t){let r=0;for(const n of e)t(n,r),yield n,r++};var Ir={};Ir.toAsyncIterable=void 0,Ir.toAsyncIterable=async function*(e){for(const t of e)yield t};var kr={};kr.transformAsync=void 0,kr.transformAsync=async function*(e,t){yield*t(e)};var Cr={};Cr.transform=void 0,Cr.transform=function*(e,t){yield*t(e)};var Fr={};Fr.uniqAsync=void 0,Fr.uniqAsync=async function*(e){const t=new Set;for await(const r of e)t.has(r)||(yield r,t.add(r))};var Nr={uniqByAsync:void 0};const Mr=F;Nr.uniqByAsync=function(e,t){return(0,Mr.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 Rr={};Rr.uniqBy=void 0,Rr.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 zr={};zr.uniq=void 0,zr.uniq=function*(e){const t=new Set;for(const r of e)t.has(r)||(yield r,t.add(r))};var Br={zipAsync:void 0};const qr=F;var Dr;!function(e){e[e.Sync=0]="Sync",e[e.Async=1]="Async"}(Dr||(Dr={})),Br.zipAsync=function(e,...t){return async function*(...e){var t,r,n,i;const o=e.length,a=e.map((e=>(0,qr.isAsyncIterable)(e)?[Dr.Async,e[Symbol.asyncIterator]()]:[Dr.Sync,e[Symbol.iterator]()])),u=a.map((()=>!1));try{for(;;){const e=new Array(o);for(let t=0;t<o;t++){const[r,n]=a[t];let i;if(i=r===Dr.Async?await n.next():n.next(),i.done)return void(u[t]=!0);e[t]=i.value}yield e}}finally{const e=a.filter(((e,t)=>!u[t]));for(const[o,a]of e)o===Dr.Async?await(null===(r=(t=a).return)||void 0===r?void 0:r.call(t)):null===(i=(n=a).return)||void 0===i||i.call(n)}}(e,...t)};var Lr,Ur={};function Vr(){return Lr||(Lr=1,function(t){var r=e&&e.__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]}),n=e&&e.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};n(function(){if(k)return o;k=1,o.chunkAsync=void 0;const e=a,t=ei();return o.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)}))},o}(),t),n(C,t),n(dt,t),n(function(){if(vt)return ht;vt=1,ht.chunk=void 0;const e=a,t=ei();return ht.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)}))},ht}(),t),n(pt,t),n(mt,t),n(function(){if(wt)return Ot;wt=1,Ot.dropAsync=void 0;const e=a,t=St,r=ei();return Ot.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))}}))},Ot}(),t),n(function(){if(_t)return xt;_t=1,xt.dropRightAsync=void 0;const e=a,t=St,r=ei();return xt.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}))},xt}(),t),n(function(){if(Pt)return At;Pt=1,At.dropRight=void 0;const e=a,t=St,r=ei();return At.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)}))},At}(),t),n(Et,t),n(Tt,t),n(function(){if(It)return kt;It=1,kt.drop=void 0;const e=a,t=St,r=ei();return kt.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)}}))},kt}(),t),n(Ct,t),n(Nt,t),n(function(){if(Ut)return Mt;Ut=1,Mt.flattenAsync=void 0;const e=Vt();return Mt.flattenAsync=function(t){return(0,e.flattenDeepAsync)(t,1)},Mt}(),t),n(zt,t),n(Wt,t),n(Vt(),t),n(Qt(),t),n(function(){if($t)return Ht;$t=1,Ht.flatten=void 0;const e=Qt();return Ht.flatten=function(t){return(0,e.flattenDeep)(t,1)},Ht}(),t),n(Xt,t),n(er,t),n(nr(),t),n(ar(),t),n(function(){if(ur)return cr;ur=1,cr.sliceAsync=void 0;const e=a,t=ei();return cr.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++}}))},cr}(),t),n(function(){if(sr)return lr;sr=1,lr.slice=void 0;const e=a,t=ei();return lr.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++}}))},lr}(),t),n(fr,t),n(dr,t),n(hr,t),n(pr,t),n(function(){if(yr)return br;yr=1,br.takeAsync=void 0;const e=a,t=ei();return br.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}))},br}(),t),n(function(){if(mr)return gr;mr=1,gr.takeRightAsync=void 0;const e=a,t=ei();return gr.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))}}))},gr}(),t),n(function(){if(wr)return Or;wr=1,Or.takeRight=void 0;const e=a,t=ei();return Or.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)}}))},Or}(),t),n(Sr,t),n(xr,t),n(function(){if(Pr)return Ar;Pr=1,Ar.take=void 0;const e=a,t=ei();return Ar.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}))},Ar}(),t),n(Er,t),n(Tr,t),n(Ir,t),n(kr,t),n(Cr,t),n(Fr,t),n(Nr,t),n(Rr,t),n(zr,t),n(Br,t),n(Ur,t)}(i)),i}Ur.zip=void 0,Ur.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 Wr={},Jr={};Jr.consume=void 0,Jr.consume=function(e,t){return t(e)};var Gr={eachAsync:void 0};const Kr=F;Gr.eachAsync=function(e,t){return(0,Kr.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 Yr={};Yr.each=void 0,Yr.each=function(e,t){let r=0;for(const n of e)t(n,r),r++};var Qr={everyAsync:void 0};const $r=F;Qr.everyAsync=function(e,t){return(0,$r.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 Hr={};Hr.every=void 0,Hr.every=function(e,t){let r=0;for(const n of e){if(!t(n,r))return!1;r++}return!0};var Xr={findAsync:void 0};const Zr=F;Xr.findAsync=function(e,t){return(0,Zr.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 en={};en.find=void 0,en.find=function(e,t){let r=0;for(const n of e){if(t(n,r))return n;r++}};var tn={};tn.firstAsync=void 0,tn.firstAsync=async function(e){for await(const t of e)return t};var rn={};rn.first=void 0,rn.first=function(e){for(const t of e)return t};var nn={};nn.includesAsync=void 0,nn.includesAsync=async function(e,t){for await(const r of e)if(r===t)return!0;return!1};var on={};on.includes=void 0,on.includes=function(e,t){for(const r of e)if(r===t)return!0;return!1};var an={};an.matchAsync=void 0,an.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 un={};un.match=void 0,un.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 cn={reduceAsync:void 0};const sn=F;cn.reduceAsync=function(e,t,r){return(0,sn.isUndefined)(r)?function(e,t){return(0,sn.isAsyncIterable)(e)?r(e):n(e);async function r(e){var r;const n=e[Symbol.asyncIterator]();let i;try{let e,a=await o(n),u=1;for(;({value:e,done:i}=await n.next()),!i;)a=await t(a,e,u++);return a}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,a=o(n),u=1;for(;({value:e,done:i}=n.next()),!i;)a=await t(a,e,u++);return a}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,sn.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 ln={reduce:void 0};const fn=F;ln.reduce=function(e,t,r){return(0,fn.isUndefined)(r)?function(e,t){var r;const n=e[Symbol.iterator]();let i;try{let e,a=o(n),u=1;for(;({value:e,done:i}=n.next()),!i;)a=t(a,e,u++);return a}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 dn={someAsync:void 0};const vn=F;dn.someAsync=function(e,t){return(0,vn.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 hn={};hn.some=void 0,hn.some=function(e,t){let r=0;for(const n of e){if(t(n,r))return!0;r++}return!1};var pn={};pn.lastAsync=void 0,pn.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 yn={};yn.last=void 0,yn.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 bn={toArrayAsync:void 0};const mn=Jr;bn.toArrayAsync=function(e){return(0,mn.consume)(e,(async e=>{const t=[];for await(const r of e)t.push(r);return t}))};var gn={toArray:void 0};const wn=Jr;gn.toArray=function(e){return(0,wn.consume)(e,(e=>Array.from(e)))};var On={toSetAsync:void 0};const Sn=Jr;On.toSetAsync=function(e){return(0,Sn.consume)(e,(async e=>{const t=new Set;for await(const r of e)t.add(r);return t}))};var _n={toSet:void 0};const xn=Jr;_n.toSet=function(e){return(0,xn.consume)(e,(e=>new Set(e)))};var Pn={};Pn.count=void 0,Pn.count=function(e){let t=0;for(const r of e)t++;return t};var An={};An.countAsync=void 0,An.countAsync=async function(e){let t=0;for await(const r of e)t++;return t};var En={groupBy:void 0};const jn=Yr;En.groupBy=function(e,t){const r=new Map;return(0,jn.each)(e,((e,n)=>{const i=t(e,n);r.has(i)||r.set(i,[]),r.get(i).push(e)})),r};var Tn={groupByAsync:void 0};const In=Gr;var kn;function Cn(){return kn||(kn=1,function(t){var r=e&&e.__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]}),n=e&&e.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};n(Vr(),t),n(Wr,t)}(n)),n}Tn.groupByAsync=async function(e,t){const r=new Map;return await(0,In.eachAsync)(e,(async(e,n)=>{const i=await t(e,n);r.has(i)||r.set(i,[]),r.get(i).push(e)})),r},function(t){var r=e&&e.__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]}),n=e&&e.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};n(Jr,t),n(Gr,t),n(Yr,t),n(Qr,t),n(Hr,t),n(Xr,t),n(en,t),n(tn,t),n(rn,t),n(nn,t),n(on,t),n(an,t),n(un,t),n(cn,t),n(ln,t),n(dn,t),n(hn,t),n(pn,t),n(yn,t),n(bn,t),n(gn,t),n(On,t),n(_n,t),n(Pn,t),n(An,t),n(En,t),n(Tn,t)}(Wr);var Fn={},Nn={};Nn.traverseErrorPrototypeChain=void 0,Nn.traverseErrorPrototypeChain=function*(e){let t=e;for(;(t=Object.getPrototypeOf(t))&&(yield t,t!==Error.prototype););},Fn.getErrorNames=void 0;const Mn=F,Rn=Nn;Fn.getErrorNames=function*(e){var t;if((0,Mn.isError)(e))for(const r of(0,Rn.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 zn={isSerializableError:void 0};const Bn=F;var qn;function Dn(){if(qn)return r;qn=1,r.CustomError=void 0;const e=Cn(),t=Fn,n=F,i=zn;class o extends Error{get name(){var r,n;return null!==(n=null!==(r=(0,e.first)((0,t.getErrorNames)(this)))&&void 0!==r?r:o.name)&&void 0!==n?n:"CustomError"}static[Symbol.hasInstance](r){var o;if((0,n.isError)(r)||(0,i.isSerializableError)(r)){const n=[null!==(o=this.prototype.constructor.name)&&void 0!==o?o:this.name,...(0,t.getErrorNames)(this.prototype)].reverse(),i=(0,e.toArray)((0,t.getErrorNames)(r)).reverse();return n.every(((e,t)=>e===i[t]))}return!1}}return r.CustomError=o,r}zn.isSerializableError=function(e){return(0,Bn.isObject)(e)&&(0,Bn.isString)(e.name)&&(0,Bn.isString)(e.message)&&((0,Bn.isString)(e.stack)||(0,Bn.isNull)(e.stack))&&(0,Bn.isArray)(e.ancestors)&&e.ancestors.every(Bn.isString)};var Ln,Un={};function Vn(){if(Ln)return Un;Ln=1,Un.AssertionError=void 0;const e=Dn();class t extends e.CustomError{}return Un.AssertionError=t,Un}var Wn,Jn={};var Gn={},Kn={},Yn={};Yn.pass=void 0,Yn.pass=function(){},function(t){var r=e&&e.__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]});(e&&e.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)})(Yn,t)}(Kn),Gn.hydrate=void 0;const Qn=Kn;function $n(e,t){const r=function(){(0,Qn.pass)()};return(r.prototype=Object.create(e.prototype)).constructor=r,Object.defineProperty(r,"name",{value:t}),r}Gn.hydrate=function(e){var t;const r=[e.name,...e.ancestors].slice(0,-1).reverse();let n=Error;for(const e of r)n=$n(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 Hn,Xn,Zn={};function ei(){return Xn||(Xn=1,function(t){var r=e&&e.__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]}),n=e&&e.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};n(Dn(),t),n(Vn(),t),n(zn,t),n(function(){if(Wn)return Jn;Wn=1,Jn.normalize=void 0;const e=Fn,t=Cn();return Jn.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}},Jn}(),t),n(Gn,t),n(function(){if(Hn)return Zn;Hn=1,Zn.assert=void 0;const e=Vn();return Zn.assert=function(t,r){if(!t)throw new e.AssertionError(r)},Zn}(),t),n(Fn,t),n(Nn,t)}(t)),t}var ti=ei(),ri={},ni={Box:void 0};class ii{constructor(e){this.value=e}get[Symbol.toStringTag](){return this.constructor.name}set(e){this.value=e}get(){return this.value}}ni.Box=ii;var oi={};oi.convertArrayToCons=oi.convertConsToArray=void 0;const ai=F;oi.convertConsToArray=function e([t,r]){return(0,ai.isNull)(r)?[t]:[t,...e(r)]},oi.convertArrayToCons=function e([t,...r]){return[t,r.length?e(r):null]};var ui={Emitter:void 0};class ci{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)))}}ui.Emitter=ci;var si={HashMap:void 0};class li{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()}}si.HashMap=li;var fi={HashSet:void 0};class di{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()}}fi.HashSet=di;var vi={Queue:void 0};class hi{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)}}vi.Queue=hi;var pi={LRUMap:void 0};const yi=ei(),bi=Cn();class mi{constructor(e){this.map=new Map,(0,yi.assert)(Number.isInteger(e),"The parameter limit must be an integer"),(0,yi.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,bi.first)(this.map.keys())}}pi.LRUMap=mi;var gi={ExpirableMap:void 0};const wi=l;class Oi{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,wi.setSchedule)(e.expirationTime,(()=>{this.clearExpiredItems(Date.now()),this.rescheduleClearTimeout()}));this.cancelClearTimeout=()=>{t(),this.cancelClearTimeout=void 0}}}}}gi.ExpirableMap=Oi;var Si={TLRUMap:void 0};const _i=ei(),xi=Cn(),Pi=l;class Ai{constructor(e){this.map=new Map,this.itemMetadataSortedByExpirationTime=[],(0,_i.assert)(Number.isInteger(e),"The parameter limit must be an integer"),(0,_i.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,Pi.setSchedule)(e.expirationTime,(()=>{this.clearExpiredItems(Date.now()),this.rescheduleClearTimeout()}));this.cancelClearTimeout=()=>{t(),this.cancelClearTimeout=void 0}}}}getColdestKey(){return(0,xi.first)(this.map.keys())}}Si.TLRUMap=Ai;var Ei={TrieMap:void 0};const ji=Cn(),Ti=F;class Ii{constructor(e){this.value=e,this.children=new Map}}class ki{constructor(){this.root=new Ii}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,Ti.isntUndefined)(i.value)&&(yield[t,i.value]),yield*e(i,t)}}(this.root,[])}keys(){return(0,ji.map)(this.entries(),(([e])=>e))}values(){return(0,ji.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 Ii),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,ji.toArray)((0,ji.zip)(e,t)).reverse())if(n.children.delete(r),0!==n.children.size)break;return!0}}Ei.TrieMap=ki;var Ci={};Ci.BadEventError=Ci.FiniteStateMachine=void 0;const Fi=ei();class Ni{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 Mi(this.state,e);this._state=this.schema[this.state][e]}}Ci.FiniteStateMachine=Ni;class Mi extends Fi.CustomError{constructor(e,t){super(`State ${e} cannot react to event ${t}`)}}Ci.BadEventError=Mi;var Ri={},zi={},Bi={},qi={},Di={};Di.isFunction=void 0,Di.isFunction=function(e){return"function"==typeof e};var Li={},Ui={},Vi={};Vi.createErrorClass=void 0,Vi.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},Ui.UnsubscriptionError=void 0;var Wi=Vi;Ui.UnsubscriptionError=Wi.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 Ji={};Ji.arrRemove=void 0,Ji.arrRemove=function(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}};var Gi=e&&e.__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.")},Ki=e&&e.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},Yi=e&&e.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Li.isSubscription=Li.EMPTY_SUBSCRIPTION=Li.Subscription=void 0;var Qi=Di,$i=Ui,Hi=Ji,Xi=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 a=Gi(o),u=a.next();!u.done;u=a.next()){u.value.remove(this)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}else o.remove(this);var c=this.initialTeardown;if(Qi.isFunction(c))try{c()}catch(e){i=e instanceof $i.UnsubscriptionError?e.errors:[e]}var s=this._finalizers;if(s){this._finalizers=null;try{for(var l=Gi(s),f=l.next();!f.done;f=l.next()){var d=f.value;try{Zi(d)}catch(e){i=null!=i?i:[],e instanceof $i.UnsubscriptionError?i=Yi(Yi([],Ki(i)),Ki(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 $i.UnsubscriptionError(i)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)Zi(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)&&Hi.arrRemove(t,e)},e.prototype.remove=function(t){var r=this._finalizers;r&&Hi.arrRemove(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();function Zi(e){Qi.isFunction(e)?e():e.unsubscribe()}Li.Subscription=Xi,Li.EMPTY_SUBSCRIPTION=Xi.EMPTY,Li.isSubscription=function(e){return e instanceof Xi||e&&"closed"in e&&Qi.isFunction(e.remove)&&Qi.isFunction(e.add)&&Qi.isFunction(e.unsubscribe)};var eo={config:void 0};eo.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var to={},ro={};!function(t){var r=e&&e.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},n=e&&e.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};t.timeoutProvider=void 0,t.timeoutProvider={setTimeout:function(e,i){for(var o=[],a=2;a<arguments.length;a++)o[a-2]=arguments[a];var u=t.timeoutProvider.delegate;return(null==u?void 0:u.setTimeout)?u.setTimeout.apply(u,n([e,i],r(o))):setTimeout.apply(void 0,n([e,i],r(o)))},clearTimeout:function(e){var r=t.timeoutProvider.delegate;return((null==r?void 0:r.clearTimeout)||clearTimeout)(e)},delegate:void 0}}(ro),to.reportUnhandledError=void 0;var no=eo,io=ro;to.reportUnhandledError=function(e){io.timeoutProvider.setTimeout((function(){var t=no.config.onUnhandledError;if(!t)throw e;t(e)}))};var oo={};oo.noop=void 0,oo.noop=function(){};var ao={};function uo(e,t,r){return{kind:e,value:t,error:r}}ao.createNotification=ao.nextNotification=ao.errorNotification=ao.COMPLETE_NOTIFICATION=void 0,ao.COMPLETE_NOTIFICATION=uo("C",void 0,void 0),ao.errorNotification=function(e){return uo("E",void 0,e)},ao.nextNotification=function(e){return uo("N",e,void 0)},ao.createNotification=uo;var co={};co.captureError=co.errorContext=void 0;var so=eo,lo=null;co.errorContext=function(e){if(so.config.useDeprecatedSynchronousErrorHandling){var t=!lo;if(t&&(lo={errorThrown:!1,error:null}),e(),t){var r=lo,n=r.errorThrown,i=r.error;if(lo=null,n)throw i}}else e()},co.captureError=function(e){so.config.useDeprecatedSynchronousErrorHandling&&lo&&(lo.errorThrown=!0,lo.error=e)},function(t){var r=e&&e.__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)}}();t.EMPTY_OBSERVER=t.SafeSubscriber=t.Subscriber=void 0;var n=Di,i=Li,o=eo,a=to,u=oo,c=ao,s=ro,l=co,f=function(e){function n(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,i.isSubscription(r)&&r.add(n)):n.destination=t.EMPTY_OBSERVER,n}return r(n,e),n.create=function(e,t,r){return new p(e,t,r)},n.prototype.next=function(e){this.isStopped?b(c.nextNotification(e),this):this._next(e)},n.prototype.error=function(e){this.isStopped?b(c.errorNotification(e),this):(this.isStopped=!0,this._error(e))},n.prototype.complete=function(){this.isStopped?b(c.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},n.prototype._next=function(e){this.destination.next(e)},n.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},n.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},n}(i.Subscription);t.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 t(t,r,i){var a,u,c=e.call(this)||this;n.isFunction(t)||!t?a={next:null!=t?t:void 0,error:null!=r?r:void 0,complete:null!=i?i:void 0}:c&&o.config.useDeprecatedNextContext?((u=Object.create(t)).unsubscribe=function(){return c.unsubscribe()},a={next:t.next&&v(t.next,u),error:t.error&&v(t.error,u),complete:t.complete&&v(t.complete,u)}):a=t;return c.destination=new h(a),c}return r(t,e),t}(f);function y(e){o.config.useDeprecatedSynchronousErrorHandling?l.captureError(e):a.reportUnhandledError(e)}function b(e,t){var r=o.config.onStoppedNotification;r&&s.timeoutProvider.setTimeout((function(){return r(e,t)}))}t.SafeSubscriber=p,t.EMPTY_OBSERVER={closed:!0,next:u.noop,error:function(e){throw e},complete:u.noop}}(qi);var fo={observable:void 0};fo.observable="function"==typeof Symbol&&Symbol.observable||"@@observable";var vo={},ho={};ho.identity=void 0,ho.identity=function(e){return e},vo.pipeFromArray=vo.pipe=void 0;var po=ho;function yo(e){return 0===e.length?po.identity:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}vo.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return yo(e)},vo.pipeFromArray=yo,Bi.Observable=void 0;var bo=qi,mo=Li,go=fo,wo=vo,Oo=eo,So=Di,_o=co,xo=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 bo.Subscriber||function(e){return e&&So.isFunction(e.next)&&So.isFunction(e.error)&&So.isFunction(e.complete)}(n)&&mo.isSubscription(n)?e:new bo.SafeSubscriber(e,t,r);return _o.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=Po(t))((function(t,n){var i=new bo.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[go.observable]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return wo.pipeFromArray(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=Po(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 Po(e){var t;return null!==(t=null!=e?e:Oo.config.Promise)&&void 0!==t?t:Promise}Bi.Observable=xo;var Ao={},Eo={},jo={};jo.operate=jo.hasLift=void 0;var To=Di;function Io(e){return To.isFunction(null==e?void 0:e.lift)}jo.hasLift=Io,jo.operate=function(e){return function(t){if(Io(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 ko={},Co=e&&e.__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)}}();ko.OperatorSubscriber=ko.createOperatorSubscriber=void 0;var Fo=qi;ko.createOperatorSubscriber=function(e,t,r,n,i){return new No(e,t,r,n,i)};var No=function(e){function t(t,r,n,i,o,a){var u=e.call(this,t)||this;return u.onFinalize=o,u.shouldUnsubscribe=a,u._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:e.prototype._next,u._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,u._complete=n?function(){try{n()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,u}return Co(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}(Fo.Subscriber);ko.OperatorSubscriber=No,Eo.refCount=void 0;var Mo=jo,Ro=ko;Eo.refCount=function(){return Mo.operate((function(e,t){var r=null;e._refCount++;var n=Ro.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 zo=e&&e.__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)}}();Ao.ConnectableObservable=void 0;var Bo=Li,qo=Eo,Do=ko,Lo=jo,Uo=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,Lo.hasLift(t)&&(n.lift=t.lift),n}return zo(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 Bo.Subscription;var r=this.getSubject();t.add(this.source.subscribe(Do.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=Bo.Subscription.EMPTY)}return t},t.prototype.refCount=function(){return qo.refCount()(this)},t}(Bi.Observable);Ao.ConnectableObservable=Uo;var Vo={},Wo={};!function(e){e.performanceTimestampProvider=void 0,e.performanceTimestampProvider={now:function(){return(e.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}}(Wo);var Jo={};!function(t){var r=e&&e.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},n=e&&e.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};t.animationFrameProvider=void 0;var i=Li;t.animationFrameProvider={schedule:function(e){var r=requestAnimationFrame,n=cancelAnimationFrame,o=t.animationFrameProvider.delegate;o&&(r=o.requestAnimationFrame,n=o.cancelAnimationFrame);var a=r((function(t){n=void 0,e(t)}));return new i.Subscription((function(){return null==n?void 0:n(a)}))},requestAnimationFrame:function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var o=t.animationFrameProvider.delegate;return((null==o?void 0:o.requestAnimationFrame)||requestAnimationFrame).apply(void 0,n([],r(e)))},cancelAnimationFrame:function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var o=t.animationFrameProvider.delegate;return((null==o?void 0:o.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,n([],r(e)))},delegate:void 0}}(Jo),Vo.animationFrames=void 0;var Go=Bi,Ko=Li,Yo=Wo,Qo=Jo;function $o(e){var t=Qo.animationFrameProvider.schedule;return new Go.Observable((function(r){var n=new Ko.Subscription,i=e||Yo.performanceTimestampProvider,o=i.now(),a=function(u){var c=i.now();r.next({timestamp:e?c:u,elapsed:c-o}),r.closed||n.add(t(a))};return n.add(t(a)),n}))}Vo.animationFrames=function(e){return e?$o(e):Ho};var Ho=$o(),Xo={},Zo={ObjectUnsubscribedError:void 0},ea=Vi;Zo.ObjectUnsubscribedError=ea.createErrorClass((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}));var ta=e&&e.__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)}}(),ra=e&&e.__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.")};Xo.AnonymousSubject=Xo.Subject=void 0;var na=Bi,ia=Li,oa=Zo,aa=Ji,ua=co,ca=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 ta(t,e),t.prototype.lift=function(e){var t=new sa(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new oa.ObjectUnsubscribedError},t.prototype.next=function(e){var t=this;ua.errorContext((function(){var r,n;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=ra(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;ua.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;ua.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?ia.EMPTY_SUBSCRIPTION:(this.currentObservers=null,o.push(e),new ia.Subscription((function(){t.currentObservers=null,aa.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 na.Observable;return e.source=this,e},t.create=function(e,t){return new sa(e,t)},t}(na.Observable);Xo.Subject=ca;var sa=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return ta(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:ia.EMPTY_SUBSCRIPTION},t}(ca);Xo.AnonymousSubject=sa;var la={},fa=e&&e.__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.BehaviorSubject=void 0;var da=function(e){function t(t){var r=e.call(this)||this;return r._value=t,r}return fa(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}(Xo.Subject);la.BehaviorSubject=da;var va={},ha={};!function(e){e.dateTimestampProvider=void 0,e.dateTimestampProvider={now:function(){return(e.dateTimestampProvider.delegate||Date).now()},delegate:void 0}}(ha);var pa=e&&e.__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)}}();va.ReplaySubject=void 0;var ya=ha,ba=function(e){function t(t,r,n){void 0===t&&(t=1/0),void 0===r&&(r=1/0),void 0===n&&(n=ya.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 pa(t,e),t.prototype.next=function(t){var r=this,n=r.isStopped,i=r._buffer,o=r._infiniteTimeWindow,a=r._timestampProvider,u=r._windowTime;n||(i.push(t),!o&&i.push(a.now()+u)),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 a=r.now(),u=0,c=1;c<n.length&&n[c]<=a;c+=2)u=c;u&&n.splice(0,u+1)}},t}(Xo.Subject);va.ReplaySubject=ba;var ma={},ga=e&&e.__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)}}();ma.AsyncSubject=void 0;var wa=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 ga(t,e),t.prototype._checkFinalizedStatuses=function(e){var t=this,r=t.hasError,n=t._hasValue,i=t._value,o=t.thrownError,a=t.isStopped,u=t._isComplete;r?e.error(o):(a||u)&&(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}(Xo.Subject);ma.AsyncSubject=wa;var Oa={},Sa={},_a={},xa={},Pa=e&&e.__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)}}();xa.Action=void 0;var Aa=function(e){function t(t,r){return e.call(this)||this}return Pa(t,e),t.prototype.schedule=function(e,t){return this},t}(Li.Subscription);xa.Action=Aa;var Ea={};!function(t){var r=e&&e.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},n=e&&e.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};t.intervalProvider=void 0,t.intervalProvider={setInterval:function(e,i){for(var o=[],a=2;a<arguments.length;a++)o[a-2]=arguments[a];var u=t.intervalProvider.delegate;return(null==u?void 0:u.setInterval)?u.setInterval.apply(u,n([e,i],r(o))):setInterval.apply(void 0,n([e,i],r(o)))},clearInterval:function(e){var r=t.intervalProvider.delegate;return((null==r?void 0:r.clearInterval)||clearInterval)(e)},delegate:void 0}}(Ea);var ja=e&&e.__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)}}();_a.AsyncAction=void 0;var Ta=Ea,Ia=Ji,ka=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 ja(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),Ta.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;Ta.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,Ia.arrRemove(n,this),null!=t&&(this.id=this.recycleAsyncId(r,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(xa.Action);_a.AsyncAction=ka;var Ca={},Fa={};Fa.TestTools=Fa.Immediate=void 0;var Na,Ma=1,Ra={};function za(e){return e in Ra&&(delete Ra[e],!0)}Fa.Immediate={setImmediate:function(e){var t=Ma++;return Ra[t]=!0,Na||(Na=Promise.resolve()),Na.then((function(){return za(t)&&e()})),t},clearImmediate:function(e){za(e)}},Fa.TestTools={pending:function(){return Object.keys(Ra).length}},function(t){var r=e&&e.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},n=e&&e.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};t.immediateProvider=void 0;var i=Fa,o=i.Immediate.setImmediate,a=i.Immediate.clearImmediate;t.immediateProvider={setImmediate:function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var a=t.immediateProvider.delegate;return((null==a?void 0:a.setImmediate)||o).apply(void 0,n([],r(e)))},clearImmediate:function(e){var r=t.immediateProvider.delegate;return((null==r?void 0:r.clearImmediate)||a)(e)},delegate:void 0}}(Ca);var Ba=e&&e.__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)}}();Sa.AsapAction=void 0;var qa=Ca,Da=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return Ba(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=qa.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}))||(qa.immediateProvider.clearImmediate(r),t._scheduled=void 0)},t}(_a.AsyncAction);Sa.AsapAction=Da;var La={},Ua={},Va={Scheduler:void 0},Wa=ha,Ja=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=Wa.dateTimestampProvider.now,e}();Va.Scheduler=Ja;var Ga=e&&e.__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.AsyncScheduler=void 0;var Ka=Va,Ya=function(e){function t(t,r){void 0===r&&(r=Ka.Scheduler.now);var n=e.call(this,t,r)||this;return n.actions=[],n._active=!1,n._scheduled=void 0,n}return Ga(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}(Ka.Scheduler);Ua.AsyncScheduler=Ya;var Qa=e&&e.__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.AsapScheduler=void 0;var $a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Qa(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}(Ua.AsyncScheduler);La.AsapScheduler=$a,function(e){e.asap=e.asapScheduler=void 0;var t=Sa,r=La;e.asapScheduler=new r.AsapScheduler(t.AsapAction),e.asap=e.asapScheduler}(Oa);var Ha={};!function(e){e.async=e.asyncScheduler=void 0;var t=_a,r=Ua;e.asyncScheduler=new r.AsyncScheduler(t.AsyncAction),e.async=e.asyncScheduler}(Ha);var Xa={},Za={},eu=e&&e.__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)}}();Za.QueueAction=void 0;var tu=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return eu(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}(_a.AsyncAction);Za.QueueAction=tu;var ru={},nu=e&&e.__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)}}();ru.QueueScheduler=void 0;var iu=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return nu(t,e),t}(Ua.AsyncScheduler);ru.QueueScheduler=iu,function(e){e.queue=e.queueScheduler=void 0;var t=Za,r=ru;e.queueScheduler=new r.QueueScheduler(t.QueueAction),e.queue=e.queueScheduler}(Xa);var ou={},au={},uu=e&&e.__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.AnimationFrameAction=void 0;var cu=Jo,su=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=cu.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}))||(cu.animationFrameProvider.cancelAnimationFrame(r),t._scheduled=void 0)},t}(_a.AsyncAction);au.AnimationFrameAction=su;var lu={},fu=e&&e.__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)}}();lu.AnimationFrameScheduler=void 0;var du=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return fu(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}(Ua.AsyncScheduler);lu.AnimationFrameScheduler=du,function(e){e.animationFrame=e.animationFrameScheduler=void 0;var t=au,r=lu;e.animationFrameScheduler=new r.AnimationFrameScheduler(t.AnimationFrameAction),e.animationFrame=e.animationFrameScheduler}(ou);var vu={},hu=e&&e.__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)}}();vu.VirtualAction=vu.VirtualTimeScheduler=void 0;var pu=_a,yu=Li,bu=function(e){function t(t,r){void 0===t&&(t=mu),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 hu(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}(Ua.AsyncScheduler);vu.VirtualTimeScheduler=bu;var mu=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 hu(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 yu.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}(pu.AsyncAction);vu.VirtualAction=mu;var gu={},wu={};!function(e){e.empty=e.EMPTY=void 0;var t=Bi;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}}(wu);var Ou={},Su={},_u={isScheduler:void 0},xu=Di;_u.isScheduler=function(e){return e&&xu.isFunction(e.schedule)},Su.popNumber=Su.popScheduler=Su.popResultSelector=void 0;var Pu=Di,Au=_u;function Eu(e){return e[e.length-1]}Su.popResultSelector=function(e){return Pu.isFunction(Eu(e))?e.pop():void 0},Su.popScheduler=function(e){return Au.isScheduler(Eu(e))?e.pop():void 0},Su.popNumber=function(e,t){return"number"==typeof Eu(e)?e.pop():t};var ju={},Tu={},Iu={},ku={},Cu={isArrayLike:void 0};Cu.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};var Fu={isPromise:void 0},Nu=Di;Fu.isPromise=function(e){return Nu.isFunction(null==e?void 0:e.then)};var Mu={isInteropObservable:void 0},Ru=fo,zu=Di;Mu.isInteropObservable=function(e){return zu.isFunction(e[Ru.observable])};var Bu={isAsyncIterable:void 0},qu=Di;Bu.isAsyncIterable=function(e){return Symbol.asyncIterator&&qu.isFunction(null==e?void 0:e[Symbol.asyncIterator])};var Du={};Du.createInvalidObservableTypeError=void 0,Du.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 Lu={},Uu={};function Vu(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Uu.iterator=Uu.getSymbolIterator=void 0,Uu.getSymbolIterator=Vu,Uu.iterator=Vu(),Lu.isIterable=void 0;var Wu=Uu,Ju=Di;Lu.isIterable=function(e){return Ju.isFunction(null==e?void 0:e[Wu.iterator])};var Gu={},Ku=e&&e.__generator||function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)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 a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}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,u])}}},Yu=e&&e.__await||function(e){return this instanceof Yu?(this.v=e,this):new Yu(e)},Qu=e&&e.__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={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){i[e]&&(n[e]=function(t){return new Promise((function(r,n){o.push([e,t,r,n])>1||u(e,t)}))})}function u(e,t){try{(r=i[e](t)).value instanceof Yu?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){u("next",e)}function s(e){u("throw",e)}function l(e,t){e(t),o.shift(),o.length&&u(o[0][0],o[0][1])}};Gu.isReadableStreamLike=Gu.readableStreamLikeToAsyncGenerator=void 0;var $u=Di;Gu.readableStreamLikeToAsyncGenerator=function(e){return Qu(this,arguments,(function(){var t,r,n;return Ku(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,Yu(t.read())];case 3:return r=i.sent(),n=r.value,r.done?[4,Yu(void 0)]:[3,5];case 4:return[2,i.sent()];case 5:return[4,Yu(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]}}))}))},Gu.isReadableStreamLike=function(e){return $u.isFunction(null==e?void 0:e.getReader)};var Hu=e&&e.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{c(n.next(e))}catch(e){o(e)}}function u(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(a,u)}c((n=n.apply(e,t||[])).next())}))},Xu=e&&e.__generator||function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)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 a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}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,u])}}},Zu=e&&e.__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 ec?ec(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)}))}}},ec=e&&e.__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.")};ku.fromReadableStreamLike=ku.fromAsyncIterable=ku.fromIterable=ku.fromPromise=ku.fromArrayLike=ku.fromInteropObservable=ku.innerFrom=void 0;var tc=Cu,rc=Fu,nc=Bi,ic=Mu,oc=Bu,ac=Du,uc=Lu,cc=Gu,sc=Di,lc=to,fc=fo;function dc(e){return new nc.Observable((function(t){var r=e[fc.observable]();if(sc.isFunction(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")}))}function vc(e){return new nc.Observable((function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()}))}function hc(e){return new nc.Observable((function(t){e.then((function(e){t.closed||(t.next(e),t.complete())}),(function(e){return t.error(e)})).then(null,lc.reportUnhandledError)}))}function pc(e){return new nc.Observable((function(t){var r,n;try{for(var i=ec(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(t.next(a),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 yc(e){return new nc.Observable((function(t){(function(e,t){var r,n,i,o;return Hu(this,void 0,void 0,(function(){var a,u;return Xu(this,(function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),r=Zu(e),c.label=1;case 1:return[4,r.next()];case 2:if((n=c.sent()).done)return[3,4];if(a=n.value,t.next(a),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return u=c.sent(),i={error:u},[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 bc(e){return yc(cc.readableStreamLikeToAsyncGenerator(e))}ku.innerFrom=function(e){if(e instanceof nc.Observable)return e;if(null!=e){if(ic.isInteropObservable(e))return dc(e);if(tc.isArrayLike(e))return vc(e);if(rc.isPromise(e))return hc(e);if(oc.isAsyncIterable(e))return yc(e);if(uc.isIterable(e))return pc(e);if(cc.isReadableStreamLike(e))return bc(e)}throw ac.createInvalidObservableTypeError(e)},ku.fromInteropObservable=dc,ku.fromArrayLike=vc,ku.fromPromise=hc,ku.fromIterable=pc,ku.fromAsyncIterable=yc,ku.fromReadableStreamLike=bc;var mc={},gc={};gc.executeSchedule=void 0,gc.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},mc.observeOn=void 0;var wc=gc,Oc=jo,Sc=ko;mc.observeOn=function(e,t){return void 0===t&&(t=0),Oc.operate((function(r,n){r.subscribe(Sc.createOperatorSubscriber(n,(function(r){return wc.executeSchedule(n,e,(function(){return n.next(r)}),t)}),(function(){return wc.executeSchedule(n,e,(function(){return n.complete()}),t)}),(function(r){return wc.executeSchedule(n,e,(function(){return n.error(r)}),t)})))}))};var _c={subscribeOn:void 0},xc=jo;_c.subscribeOn=function(e,t){return void 0===t&&(t=0),xc.operate((function(r,n){n.add(e.schedule((function(){return r.subscribe(n)}),t))}))},Iu.scheduleObservable=void 0;var Pc=ku,Ac=mc,Ec=_c;Iu.scheduleObservable=function(e,t){return Pc.innerFrom(e).pipe(Ec.subscribeOn(t),Ac.observeOn(t))};var jc={schedulePromise:void 0},Tc=ku,Ic=mc,kc=_c;jc.schedulePromise=function(e,t){return Tc.innerFrom(e).pipe(kc.subscribeOn(t),Ic.observeOn(t))};var Cc={scheduleArray:void 0},Fc=Bi;Cc.scheduleArray=function(e,t){return new Fc.Observable((function(r){var n=0;return t.schedule((function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())}))}))};var Nc={scheduleIterable:void 0},Mc=Bi,Rc=Uu,zc=Di,Bc=gc;Nc.scheduleIterable=function(e,t){return new Mc.Observable((function(r){var n;return Bc.executeSchedule(r,t,(function(){n=e[Rc.iterator](),Bc.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 zc.isFunction(null==n?void 0:n.return)&&n.return()}}))};var qc={scheduleAsyncIterable:void 0},Dc=Bi,Lc=gc;qc.scheduleAsyncIterable=function(e,t){if(!e)throw new Error("Iterable cannot be null");return new Dc.Observable((function(r){Lc.executeSchedule(r,t,(function(){var n=e[Symbol.asyncIterator]();Lc.executeSchedule(r,t,(function(){n.next().then((function(e){e.done?r.complete():r.next(e.value)}))}),0,!0)}))}))};var Uc={scheduleReadableStreamLike:void 0},Vc=qc,Wc=Gu;Uc.scheduleReadableStreamLike=function(e,t){return Vc.scheduleAsyncIterable(Wc.readableStreamLikeToAsyncGenerator(e),t)},Tu.scheduled=void 0;var Jc=Iu,Gc=jc,Kc=Cc,Yc=Nc,Qc=qc,$c=Mu,Hc=Fu,Xc=Cu,Zc=Lu,es=Bu,ts=Du,rs=Gu,ns=Uc;Tu.scheduled=function(e,t){if(null!=e){if($c.isInteropObservable(e))return Jc.scheduleObservable(e,t);if(Xc.isArrayLike(e))return Kc.scheduleArray(e,t);if(Hc.isPromise(e))return Gc.schedulePromise(e,t);if(es.isAsyncIterable(e))return Qc.scheduleAsyncIterable(e,t);if(Zc.isIterable(e))return Yc.scheduleIterable(e,t);if(rs.isReadableStreamLike(e))return ns.scheduleReadableStreamLike(e,t)}throw ts.createInvalidObservableTypeError(e)},ju.from=void 0;var is=Tu,os=ku;ju.from=function(e,t){return t?is.scheduled(e,t):os.innerFrom(e)},Ou.of=void 0;var as=Su,us=ju;Ou.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=as.popScheduler(e);return us.from(e,r)};var cs={throwError:void 0},ss=Bi,ls=Di;cs.throwError=function(e,t){var r=ls.isFunction(e)?e:function(){return e},n=function(e){return e.error(r())};return new ss.Observable(t?function(e){return t.schedule(n,0,e)}:n)},function(e){e.observeNotification=e.Notification=e.NotificationKind=void 0;var t=wu,r=Ou,n=cs,i=Di;!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 a(this,e)},e.prototype.do=function(e,t,r){var n=this,i=n.kind,o=n.value,a=n.error;return"N"===i?null==e?void 0:e(o):"E"===i?null==t?void 0:t(a):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,a=e.error,u="N"===i?r.of(o):"E"===i?n.throwError((function(){return a})):"C"===i?t.EMPTY:0;if(!u)throw new TypeError("Unexpected notification kind "+i);return u},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 a(e,t){var r,n,i,o=e,a=o.kind,u=o.value,c=o.error;if("string"!=typeof a)throw new TypeError('Invalid notification, missing "kind"');"N"===a?null===(r=t.next)||void 0===r||r.call(t,u):"E"===a?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=a}(gu);var fs={isObservable:void 0},ds=Bi,vs=Di;fs.isObservable=function(e){return!!e&&(e instanceof ds.Observable||vs.isFunction(e.lift)&&vs.isFunction(e.subscribe))};var hs={},ps={EmptyError:void 0},ys=Vi;ps.EmptyError=ys.createErrorClass((function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}})),hs.lastValueFrom=void 0;var bs=ps;hs.lastValueFrom=function(e,t){var r="object"==typeof t;return new Promise((function(n,i){var o,a=!1;e.subscribe({next:function(e){o=e,a=!0},error:i,complete:function(){a?n(o):r?n(t.defaultValue):i(new bs.EmptyError)}})}))};var ms={firstValueFrom:void 0},gs=ps,ws=qi;ms.firstValueFrom=function(e,t){var r="object"==typeof t;return new Promise((function(n,i){var o=new ws.SafeSubscriber({next:function(e){n(e),o.unsubscribe()},error:i,complete:function(){r?n(t.defaultValue):i(new gs.EmptyError)}});e.subscribe(o)}))};var Os={ArgumentOutOfRangeError:void 0},Ss=Vi;Os.ArgumentOutOfRangeError=Ss.createErrorClass((function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}}));var _s={NotFoundError:void 0},xs=Vi;_s.NotFoundError=xs.createErrorClass((function(e){return function(t){e(this),this.name="NotFoundError",this.message=t}}));var Ps={SequenceError:void 0},As=Vi;Ps.SequenceError=As.createErrorClass((function(e){return function(t){e(this),this.name="SequenceError",this.message=t}}));var Es={},js={};js.isValidDate=void 0,js.isValidDate=function(e){return e instanceof Date&&!isNaN(e)},function(e){e.timeout=e.TimeoutError=void 0;var t=Ha,r=js,n=jo,i=ku,o=Vi,a=ko,u=gc;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=u.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(a.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)}))}}(Es);var Ts={},Is={},ks={},Cs={map:void 0},Fs=jo,Ns=ko;Cs.map=function(e,t){return Fs.operate((function(r,n){var i=0;r.subscribe(Ns.createOperatorSubscriber(n,(function(r){n.next(e.call(t,r,i++))})))}))};var Ms=e&&e.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},Rs=e&&e.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};ks.mapOneOrManyArgs=void 0;var zs=Cs,Bs=Array.isArray;ks.mapOneOrManyArgs=function(e){return zs.map((function(t){return function(e,t){return Bs(t)?e.apply(void 0,Rs([],Ms(t))):e(t)}(e,t)}))};var qs=e&&e.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},Ds=e&&e.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Is.bindCallbackInternals=void 0;var Ls=_u,Us=Bi,Vs=_c,Ws=ks,Js=mc,Gs=ma;Is.bindCallbackInternals=function e(t,r,n,i){if(n){if(!Ls.isScheduler(n))return function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];return e(t,r,i).apply(this,o).pipe(Ws.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(Vs.subscribeOn(i),Js.observeOn(i))}:function(){for(var e=this,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var o=new Gs.AsyncSubject,a=!0;return new Us.Observable((function(i){var u=o.subscribe(i);if(a){a=!1;var c=!1,s=!1;r.apply(e,Ds(Ds([],qs(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 u}))}},Ts.bindCallback=void 0;var Ks=Is;Ts.bindCallback=function(e,t,r){return Ks.bindCallbackInternals(!1,e,t,r)};var Ys={bindNodeCallback:void 0},Qs=Is;Ys.bindNodeCallback=function(e,t,r){return Qs.bindCallbackInternals(!0,e,t,r)};var $s={},Hs={argsArgArrayOrObject:void 0},Xs=Array.isArray,Zs=Object.getPrototypeOf,el=Object.prototype,tl=Object.keys;Hs.argsArgArrayOrObject=function(e){if(1===e.length){var t=e[0];if(Xs(t))return{args:t,keys:null};if((n=t)&&"object"==typeof n&&Zs(n)===el){var r=tl(t);return{args:r.map((function(e){return t[e]})),keys:r}}}var n;return{args:e,keys:null}};var rl={};rl.createObject=void 0,rl.createObject=function(e,t){return e.reduce((function(e,r,n){return e[r]=t[n],e}),{})},$s.combineLatestInit=$s.combineLatest=void 0;var nl=Bi,il=Hs,ol=ju,al=ho,ul=ks,cl=Su,sl=rl,ll=ko,fl=gc;function dl(e,t,r){return void 0===r&&(r=al.identity),function(n){vl(t,(function(){for(var i=e.length,o=new Array(i),a=i,u=i,c=function(i){vl(t,(function(){var c=ol.from(e[i],t),s=!1;c.subscribe(ll.createOperatorSubscriber(n,(function(e){o[i]=e,s||(s=!0,u--),u||n.next(r(o.slice()))}),(function(){--a||n.complete()})))}),n)},s=0;s<i;s++)c(s)}),n)}}function vl(e,t,r){e?fl.executeSchedule(r,e,t):t()}$s.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=cl.popScheduler(e),n=cl.popResultSelector(e),i=il.argsArgArrayOrObject(e),o=i.args,a=i.keys;if(0===o.length)return ol.from([],r);var u=new nl.Observable(dl(o,r,a?function(e){return sl.createObject(a,e)}:al.identity));return n?u.pipe(ul.mapOneOrManyArgs(n)):u},$s.combineLatestInit=dl;var hl={},pl={},yl={},bl={},ml={mergeInternals:void 0},gl=ku,wl=gc,Ol=ko;ml.mergeInternals=function(e,t,r,n,i,o,a,u){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 u=!1;gl.innerFrom(r(e,l++)).subscribe(Ol.createOperatorSubscriber(t,(function(e){null==i||i(e),o?v(e):t.next(e)}),(function(){u=!0}),void 0,(function(){if(u)try{s--;for(var e=function(){var e=c.shift();a?wl.executeSchedule(t,a,(function(){return h(e)})):h(e)};c.length&&s<n;)e();d()}catch(e){t.error(e)}})))};return e.subscribe(Ol.createOperatorSubscriber(t,v,(function(){f=!0,d()}))),function(){null==u||u()}},bl.mergeMap=void 0;var Sl=Cs,_l=ku,xl=jo,Pl=ml,Al=Di;bl.mergeMap=function e(t,r,n){return void 0===n&&(n=1/0),Al.isFunction(r)?e((function(e,n){return Sl.map((function(t,i){return r(e,t,n,i)}))(_l.innerFrom(t(e,n)))}),n):("number"==typeof r&&(n=r),xl.operate((function(e,r){return Pl.mergeInternals(e,r,t,n)})))},yl.mergeAll=void 0;var El=bl,jl=ho;yl.mergeAll=function(e){return void 0===e&&(e=1/0),El.mergeMap(jl.identity,e)},pl.concatAll=void 0;var Tl=yl;pl.concatAll=function(){return Tl.mergeAll(1)},hl.concat=void 0;var Il=pl,kl=Su,Cl=ju;hl.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Il.concatAll()(Cl.from(e,kl.popScheduler(e)))};var Fl={},Nl={defer:void 0},Ml=Bi,Rl=ku;Nl.defer=function(e){return new Ml.Observable((function(t){Rl.innerFrom(e()).subscribe(t)}))},Fl.connectable=void 0;var zl=Xo,Bl=Bi,ql=Nl,Dl={connector:function(){return new zl.Subject},resetOnDisconnect:!0};Fl.connectable=function(e,t){void 0===t&&(t=Dl);var r=null,n=t.connector,i=t.resetOnDisconnect,o=void 0===i||i,a=n(),u=new Bl.Observable((function(e){return a.subscribe(e)}));return u.connect=function(){return r&&!r.closed||(r=ql.defer((function(){return e})).subscribe(a),o&&r.add((function(){return a=n()}))),r},u};var Ll={forkJoin:void 0},Ul=Bi,Vl=Hs,Wl=ku,Jl=Su,Gl=ko,Kl=ks,Yl=rl;Ll.forkJoin=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Jl.popResultSelector(e),n=Vl.argsArgArrayOrObject(e),i=n.args,o=n.keys,a=new Ul.Observable((function(e){var t=i.length;if(t)for(var r=new Array(t),n=t,a=t,u=function(t){var u=!1;Wl.innerFrom(i[t]).subscribe(Gl.createOperatorSubscriber(e,(function(e){u||(u=!0,a--),r[t]=e}),(function(){return n--}),void 0,(function(){n&&u||(a||e.next(o?Yl.createObject(o,r):r),e.complete())})))},c=0;c<t;c++)u(c);else e.complete()}));return r?a.pipe(Kl.mapOneOrManyArgs(r)):a};var Ql={},$l=e&&e.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a};Ql.fromEvent=void 0;var Hl=ku,Xl=Bi,Zl=bl,ef=Cu,tf=Di,rf=ks,nf=["addListener","removeListener"],of=["addEventListener","removeEventListener"],af=["on","off"];function uf(e,t){return function(r){return function(n){return e[r](t,n)}}}Ql.fromEvent=function e(t,r,n,i){if(tf.isFunction(n)&&(i=n,n=void 0),i)return e(t,r,n).pipe(rf.mapOneOrManyArgs(i));var o=$l(function(e){return tf.isFunction(e.addEventListener)&&tf.isFunction(e.removeEventListener)}(t)?of.map((function(e){return function(i){return t[e](r,i,n)}})):function(e){return tf.isFunction(e.addListener)&&tf.isFunction(e.removeListener)}(t)?nf.map(uf(t,r)):function(e){return tf.isFunction(e.on)&&tf.isFunction(e.off)}(t)?af.map(uf(t,r)):[],2),a=o[0],u=o[1];if(!a&&ef.isArrayLike(t))return Zl.mergeMap((function(t){return e(t,r,n)}))(Hl.innerFrom(t));if(!a)throw new TypeError("Invalid event target");return new Xl.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 a(t),function(){return u(t)}}))};var cf={fromEventPattern:void 0},sf=Bi,lf=Di,ff=ks;cf.fromEventPattern=function e(t,r,n){return n?e(t,r).pipe(ff.mapOneOrManyArgs(n)):new sf.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 lf.isFunction(r)?function(){return r(n,i)}:void 0}))};var df={},vf=e&&e.__generator||function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)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 a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}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,u])}}};df.generate=void 0;var hf=ho,pf=_u,yf=Nl,bf=Nc;df.generate=function(e,t,r,n,i){var o,a,u,c;function s(){var e;return vf(this,(function(n){switch(n.label){case 0:e=c,n.label=1;case 1:return t&&!t(e)?[3,4]:[4,u(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,a=o.resultSelector,u=void 0===a?hf.identity:a,i=o.scheduler):(c=e,!n||pf.isScheduler(n)?(u=hf.identity,i=n):u=n),yf.defer(i?function(){return bf.scheduleIterable(s(),i)}:s)};var mf={iif:void 0},gf=Nl;mf.iif=function(e,t,r){return gf.defer((function(){return e()?t:r}))};var wf={},Of={timer:void 0},Sf=Bi,_f=Ha,xf=_u,Pf=js;Of.timer=function(e,t,r){void 0===e&&(e=0),void 0===r&&(r=_f.async);var n=-1;return null!=t&&(xf.isScheduler(t)?r=t:n=t),new Sf.Observable((function(t){var i=Pf.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)}))},wf.interval=void 0;var Af=Ha,Ef=Of;wf.interval=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=Af.asyncScheduler),e<0&&(e=0),Ef.timer(e,e,t)};var jf={merge:void 0},Tf=yl,If=ku,kf=wu,Cf=Su,Ff=ju;jf.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Cf.popScheduler(e),n=Cf.popNumber(e,1/0),i=e;return i.length?1===i.length?If.innerFrom(i[0]):Tf.mergeAll(n)(Ff.from(i,r)):kf.EMPTY};var Nf={};!function(e){e.never=e.NEVER=void 0;var t=Bi,r=oo;e.NEVER=new t.Observable(r.noop),e.never=function(){return e.NEVER}}(Nf);var Mf={},Rf={},zf={argsOrArgArray:void 0},Bf=Array.isArray;zf.argsOrArgArray=function(e){return 1===e.length&&Bf(e[0])?e[0]:e};var qf=e&&e.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},Df=e&&e.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Rf.onErrorResumeNext=void 0;var Lf=jo,Uf=ku,Vf=zf,Wf=ko,Jf=oo;Rf.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Vf.argsOrArgArray(e);return Lf.operate((function(e,t){var n=Df([e],qf(r)),i=function(){if(!t.closed)if(n.length>0){var e=void 0;try{e=Uf.innerFrom(n.shift())}catch(e){return void i()}var r=Wf.createOperatorSubscriber(t,void 0,Jf.noop,Jf.noop);e.subscribe(r),r.add(i)}else t.complete()};i()}))},Mf.onErrorResumeNext=void 0;var Gf=wu,Kf=Rf,Yf=zf;Mf.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Kf.onErrorResumeNext(Yf.argsOrArgArray(e))(Gf.EMPTY)};var Qf={pairs:void 0},$f=ju;Qf.pairs=function(e,t){return $f.from(Object.entries(e),t)};var Hf={},Xf={};Xf.not=void 0,Xf.not=function(e,t){return function(r,n){return!e.call(t,r,n)}};var Zf={filter:void 0},ed=jo,td=ko;Zf.filter=function(e,t){return ed.operate((function(r,n){var i=0;r.subscribe(td.createOperatorSubscriber(n,(function(r){return e.call(t,r,i++)&&n.next(r)})))}))},Hf.partition=void 0;var rd=Xf,nd=Zf,id=ku;Hf.partition=function(e,t,r){return[nd.filter(t,r)(id.innerFrom(e)),nd.filter(rd.not(t,r))(id.innerFrom(e))]};var od={};od.raceInit=od.race=void 0;var ad=Bi,ud=ku,cd=zf,sd=ko;function ld(e){return function(t){for(var r=[],n=function(n){r.push(ud.innerFrom(e[n]).subscribe(sd.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)}}od.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===(e=cd.argsOrArgArray(e)).length?ud.innerFrom(e[0]):new ad.Observable(ld(e))},od.raceInit=ld;var fd={range:void 0},dd=Bi,vd=wu;fd.range=function(e,t,r){if(null==t&&(t=e,e=0),t<=0)return vd.EMPTY;var n=t+e;return new dd.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 hd={using:void 0},pd=Bi,yd=ku,bd=wu;hd.using=function(e,t){return new pd.Observable((function(r){var n=e(),i=t(n);return(i?yd.innerFrom(i):bd.EMPTY).subscribe(r),function(){n&&n.unsubscribe()}}))};var md={},gd=e&&e.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},wd=e&&e.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};md.zip=void 0;var Od=Bi,Sd=ku,_d=zf,xd=wu,Pd=ko,Ad=Su;md.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Ad.popResultSelector(e),n=_d.argsOrArgArray(e);return n.length?new Od.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){Sd.innerFrom(n[o]).subscribe(Pd.createOperatorSubscriber(e,(function(n){if(t[o].push(n),t.every((function(e){return e.length}))){var a=t.map((function(e){return e.shift()}));e.next(r?r.apply(void 0,wd([],gd(a))):a),t.some((function(e,t){return!e.length&&i[t]}))&&e.complete()}}),(function(){i[o]=!0,!t[o].length&&e.complete()})))},a=0;!e.closed&&a<n.length;a++)o(a);return function(){t=i=null}})):xd.EMPTY};var Ed={},jd={audit:void 0},Td=jo,Id=ku,kd=ko;jd.audit=function(e){return Td.operate((function(t,r){var n=!1,i=null,o=null,a=!1,u=function(){if(null==o||o.unsubscribe(),o=null,n){n=!1;var e=i;i=null,r.next(e)}a&&r.complete()},c=function(){o=null,a&&r.complete()};t.subscribe(kd.createOperatorSubscriber(r,(function(t){n=!0,i=t,o||Id.innerFrom(e(t)).subscribe(o=kd.createOperatorSubscriber(r,u,c))}),(function(){a=!0,(!n||!o||o.closed)&&r.complete()})))}))};var Cd={auditTime:void 0},Fd=Ha,Nd=jd,Md=Of;Cd.auditTime=function(e,t){return void 0===t&&(t=Fd.asyncScheduler),Nd.audit((function(){return Md.timer(e,t)}))};var Rd={buffer:void 0},zd=jo,Bd=oo,qd=ko;Rd.buffer=function(e){return zd.operate((function(t,r){var n=[];return t.subscribe(qd.createOperatorSubscriber(r,(function(e){return n.push(e)}),(function(){r.next(n),r.complete()}))),e.subscribe(qd.createOperatorSubscriber(r,(function(){var e=n;n=[],r.next(e)}),Bd.noop)),function(){n=null}}))};var Dd={},Ld=e&&e.__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.")};Dd.bufferCount=void 0;var Ud=jo,Vd=ko,Wd=Ji;Dd.bufferCount=function(e,t){return void 0===t&&(t=null),t=null!=t?t:e,Ud.operate((function(r,n){var i=[],o=0;r.subscribe(Vd.createOperatorSubscriber(n,(function(r){var a,u,c,s,l=null;o++%t==0&&i.push([]);try{for(var f=Ld(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){a={error:e}}finally{try{d&&!d.done&&(u=f.return)&&u.call(f)}finally{if(a)throw a.error}}if(l)try{for(var v=Ld(l),h=v.next();!h.done;h=v.next()){var p=h.value;Wd.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=Ld(i),o=r.next();!o.done;o=r.next()){var a=o.value;n.next(a)}}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 Jd={},Gd=e&&e.__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.")};Jd.bufferTime=void 0;var Kd=Li,Yd=jo,Qd=ko,$d=Ji,Hd=Ha,Xd=Su,Zd=gc;Jd.bufferTime=function(e){for(var t,r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=null!==(t=Xd.popScheduler(n))&&void 0!==t?t:Hd.asyncScheduler,a=null!==(r=n[0])&&void 0!==r?r:null,u=n[1]||1/0;return Yd.operate((function(t,r){var n=[],i=!1,c=function(e){var t=e.buffer;e.subs.unsubscribe(),$d.arrRemove(n,e),r.next(t),i&&s()},s=function(){if(n){var t=new Kd.Subscription;r.add(t);var i={buffer:[],subs:t};n.push(i),Zd.executeSchedule(t,o,(function(){return c(i)}),e)}};null!==a&&a>=0?Zd.executeSchedule(r,o,s,a,!0):i=!0,s();var l=Qd.createOperatorSubscriber(r,(function(e){var t,r,i=n.slice();try{for(var o=Gd(i),a=o.next();!a.done;a=o.next()){var s=a.value,l=s.buffer;l.push(e),u<=l.length&&c(s)}}catch(e){t={error:e}}finally{try{a&&!a.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 ev={},tv=e&&e.__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.")};ev.bufferToggle=void 0;var rv=Li,nv=jo,iv=ku,ov=ko,av=oo,uv=Ji;ev.bufferToggle=function(e,t){return nv.operate((function(r,n){var i=[];iv.innerFrom(e).subscribe(ov.createOperatorSubscriber(n,(function(e){var r=[];i.push(r);var o=new rv.Subscription;o.add(iv.innerFrom(t(e)).subscribe(ov.createOperatorSubscriber(n,(function(){uv.arrRemove(i,r),n.next(r),o.unsubscribe()}),av.noop)))}),av.noop)),r.subscribe(ov.createOperatorSubscriber(n,(function(e){var t,r;try{for(var n=tv(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 cv={bufferWhen:void 0},sv=jo,lv=oo,fv=ko,dv=ku;cv.bufferWhen=function(e){return sv.operate((function(t,r){var n=null,i=null,o=function(){null==i||i.unsubscribe();var t=n;n=[],t&&r.next(t),dv.innerFrom(e()).subscribe(i=fv.createOperatorSubscriber(r,o,lv.noop))};o(),t.subscribe(fv.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 vv={catchError:void 0},hv=ku,pv=ko,yv=jo;vv.catchError=function e(t){return yv.operate((function(r,n){var i,o=null,a=!1;o=r.subscribe(pv.createOperatorSubscriber(n,void 0,void 0,(function(u){i=hv.innerFrom(t(u,e(t)(r))),o?(o.unsubscribe(),o=null,i.subscribe(n)):a=!0}))),a&&(o.unsubscribe(),o=null,i.subscribe(n))}))};var bv={},mv={},gv={},wv={},Ov={},Sv={scanInternals:void 0},_v=ko;Sv.scanInternals=function(e,t,r,n,i){return function(o,a){var u=r,c=t,s=0;o.subscribe(_v.createOperatorSubscriber(a,(function(t){var r=s++;c=u?e(c,t,r):(u=!0,t),n&&a.next(c)}),i&&function(){u&&a.next(c),a.complete()}))}},Ov.reduce=void 0;var xv=Sv,Pv=jo;Ov.reduce=function(e,t){return Pv.operate(xv.scanInternals(e,t,arguments.length>=2,!1,!0))},wv.toArray=void 0;var Av=Ov,Ev=jo,jv=function(e,t){return e.push(t),e};wv.toArray=function(){return Ev.operate((function(e,t){Av.reduce(jv,[])(e).subscribe(t)}))},gv.joinAllInternals=void 0;var Tv=ho,Iv=ks,kv=vo,Cv=bl,Fv=wv;gv.joinAllInternals=function(e,t){return kv.pipe(Fv.toArray(),Cv.mergeMap((function(t){return e(t)})),t?Iv.mapOneOrManyArgs(t):Tv.identity)},mv.combineLatestAll=void 0;var Nv=$s,Mv=gv;mv.combineLatestAll=function(e){return Mv.joinAllInternals(Nv.combineLatest,e)},bv.combineAll=void 0;var Rv=mv;bv.combineAll=Rv.combineLatestAll;var zv={},Bv={},qv=e&&e.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},Dv=e&&e.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Bv.combineLatest=void 0;var Lv=$s,Uv=jo,Vv=zf,Wv=ks,Jv=vo,Gv=Su;Bv.combineLatest=function e(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=Gv.popResultSelector(t);return n?Jv.pipe(e.apply(void 0,Dv([],qv(t))),Wv.mapOneOrManyArgs(n)):Uv.operate((function(e,r){Lv.combineLatestInit(Dv([e],qv(Vv.argsOrArgArray(t))))(r)}))};var Kv=e&&e.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},Yv=e&&e.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};zv.combineLatestWith=void 0;var Qv=Bv;zv.combineLatestWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Qv.combineLatest.apply(void 0,Yv([],Kv(e)))};var $v={concatMap:void 0},Hv=bl,Xv=Di;$v.concatMap=function(e,t){return Xv.isFunction(t)?Hv.mergeMap(e,t,1):Hv.mergeMap(e,1)};var Zv={concatMapTo:void 0},eh=$v,th=Di;Zv.concatMapTo=function(e,t){return th.isFunction(t)?eh.concatMap((function(){return e}),t):eh.concatMap((function(){return e}))};var rh={},nh={},ih=e&&e.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},oh=e&&e.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};nh.concat=void 0;var ah=jo,uh=pl,ch=Su,sh=ju;nh.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=ch.popScheduler(e);return ah.operate((function(t,n){uh.concatAll()(sh.from(oh([t],ih(e)),r)).subscribe(n)}))};var lh=e&&e.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},fh=e&&e.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};rh.concatWith=void 0;var dh=nh;rh.concatWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return dh.concat.apply(void 0,fh([],lh(e)))};var vh={},hh={fromSubscribable:void 0},ph=Bi;hh.fromSubscribable=function(e){return new ph.Observable((function(t){return e.subscribe(t)}))},vh.connect=void 0;var yh=Xo,bh=ku,mh=jo,gh=hh,wh={connector:function(){return new yh.Subject}};vh.connect=function(e,t){void 0===t&&(t=wh);var r=t.connector;return mh.operate((function(t,n){var i=r();bh.innerFrom(e(gh.fromSubscribable(i))).subscribe(n),n.add(t.subscribe(i))}))};var Oh={count:void 0},Sh=Ov;Oh.count=function(e){return Sh.reduce((function(t,r,n){return!e||e(r,n)?t+1:t}),0)};var _h={debounce:void 0},xh=jo,Ph=oo,Ah=ko,Eh=ku;_h.debounce=function(e){return xh.operate((function(t,r){var n=!1,i=null,o=null,a=function(){if(null==o||o.unsubscribe(),o=null,n){n=!1;var e=i;i=null,r.next(e)}};t.subscribe(Ah.createOperatorSubscriber(r,(function(t){null==o||o.unsubscribe(),n=!0,i=t,o=Ah.createOperatorSubscriber(r,a,Ph.noop),Eh.innerFrom(e(t)).subscribe(o)}),(function(){a(),r.complete()}),void 0,(function(){i=o=null})))}))};var jh={debounceTime:void 0},Th=Ha,Ih=jo,kh=ko;jh.debounceTime=function(e,t){return void 0===t&&(t=Th.asyncScheduler),Ih.operate((function(r,n){var i=null,o=null,a=null,u=function(){if(i){i.unsubscribe(),i=null;var e=o;o=null,n.next(e)}};function c(){var r=a+e,o=t.now();if(o<r)return i=this.schedule(void 0,r-o),void n.add(i);u()}r.subscribe(kh.createOperatorSubscriber(n,(function(r){o=r,a=t.now(),i||(i=t.schedule(c,e),n.add(i))}),(function(){u(),n.complete()}),void 0,(function(){o=i=null})))}))};var Ch={defaultIfEmpty:void 0},Fh=jo,Nh=ko;Ch.defaultIfEmpty=function(e){return Fh.operate((function(t,r){var n=!1;t.subscribe(Nh.createOperatorSubscriber(r,(function(e){n=!0,r.next(e)}),(function(){n||r.next(e),r.complete()})))}))};var Mh={},Rh={},zh={take:void 0},Bh=wu,qh=jo,Dh=ko;zh.take=function(e){return e<=0?function(){return Bh.EMPTY}:qh.operate((function(t,r){var n=0;t.subscribe(Dh.createOperatorSubscriber(r,(function(t){++n<=e&&(r.next(t),e<=n&&r.complete())})))}))};var Lh={ignoreElements:void 0},Uh=jo,Vh=ko,Wh=oo;Lh.ignoreElements=function(){return Uh.operate((function(e,t){e.subscribe(Vh.createOperatorSubscriber(t,Wh.noop))}))};var Jh={mapTo:void 0},Gh=Cs;Jh.mapTo=function(e){return Gh.map((function(){return e}))},Rh.delayWhen=void 0;var Kh=hl,Yh=zh,Qh=Lh,$h=Jh,Hh=bl;Rh.delayWhen=function e(t,r){return r?function(n){return Kh.concat(r.pipe(Yh.take(1),Qh.ignoreElements()),n.pipe(e(t)))}:Hh.mergeMap((function(e,r){return t(e,r).pipe(Yh.take(1),$h.mapTo(e))}))},Mh.delay=void 0;var Xh=Ha,Zh=Rh,ep=Of;Mh.delay=function(e,t){void 0===t&&(t=Xh.asyncScheduler);var r=ep.timer(e,t);return Zh.delayWhen((function(){return r}))};var tp={dematerialize:void 0},rp=gu,np=jo,ip=ko;tp.dematerialize=function(){return np.operate((function(e,t){e.subscribe(ip.createOperatorSubscriber(t,(function(e){return rp.observeNotification(e,t)})))}))};var op={distinct:void 0},ap=jo,up=ko,cp=oo;op.distinct=function(e,t){return ap.operate((function(r,n){var i=new Set;r.subscribe(up.createOperatorSubscriber(n,(function(t){var r=e?e(t):t;i.has(r)||(i.add(r),n.next(t))}))),null==t||t.subscribe(up.createOperatorSubscriber(n,(function(){return i.clear()}),cp.noop))}))};var sp={distinctUntilChanged:void 0},lp=ho,fp=jo,dp=ko;function vp(e,t){return e===t}sp.distinctUntilChanged=function(e,t){return void 0===t&&(t=lp.identity),e=null!=e?e:vp,fp.operate((function(r,n){var i,o=!0;r.subscribe(dp.createOperatorSubscriber(n,(function(r){var a=t(r);!o&&e(i,a)||(o=!1,i=a,n.next(r))})))}))};var hp={distinctUntilKeyChanged:void 0},pp=sp;hp.distinctUntilKeyChanged=function(e,t){return pp.distinctUntilChanged((function(r,n){return t?t(r[e],n[e]):r[e]===n[e]}))};var yp={},bp={throwIfEmpty:void 0},mp=ps,gp=jo,wp=ko;function Op(){return new mp.EmptyError}bp.throwIfEmpty=function(e){return void 0===e&&(e=Op),gp.operate((function(t,r){var n=!1;t.subscribe(wp.createOperatorSubscriber(r,(function(e){n=!0,r.next(e)}),(function(){return n?r.complete():r.error(e())})))}))},yp.elementAt=void 0;var Sp=Os,_p=Zf,xp=bp,Pp=Ch,Ap=zh;yp.elementAt=function(e,t){if(e<0)throw new Sp.ArgumentOutOfRangeError;var r=arguments.length>=2;return function(n){return n.pipe(_p.filter((function(t,r){return r===e})),Ap.take(1),r?Pp.defaultIfEmpty(t):xp.throwIfEmpty((function(){return new Sp.ArgumentOutOfRangeError})))}};var Ep={},jp=e&&e.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},Tp=e&&e.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Ep.endWith=void 0;var Ip=hl,kp=Ou;Ep.endWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return Ip.concat(t,kp.of.apply(void 0,Tp([],jp(e))))}};var Cp={every:void 0},Fp=jo,Np=ko;Cp.every=function(e,t){return Fp.operate((function(r,n){var i=0;r.subscribe(Np.createOperatorSubscriber(n,(function(o){e.call(t,o,i++,r)||(n.next(!1),n.complete())}),(function(){n.next(!0),n.complete()})))}))};var Mp={},Rp={},zp={exhaustMap:void 0},Bp=Cs,qp=ku,Dp=jo,Lp=ko;zp.exhaustMap=function e(t,r){return r?function(n){return n.pipe(e((function(e,n){return qp.innerFrom(t(e,n)).pipe(Bp.map((function(t,i){return r(e,t,n,i)})))})))}:Dp.operate((function(e,r){var n=0,i=null,o=!1;e.subscribe(Lp.createOperatorSubscriber(r,(function(e){i||(i=Lp.createOperatorSubscriber(r,void 0,(function(){i=null,o&&r.complete()})),qp.innerFrom(t(e,n++)).subscribe(i))}),(function(){o=!0,!i&&r.complete()})))}))},Rp.exhaustAll=void 0;var Up=zp,Vp=ho;Rp.exhaustAll=function(){return Up.exhaustMap(Vp.identity)},Mp.exhaust=void 0;var Wp=Rp;Mp.exhaust=Wp.exhaustAll;var Jp={expand:void 0},Gp=jo,Kp=ml;Jp.expand=function(e,t,r){return void 0===t&&(t=1/0),t=(t||0)<1?1/0:t,Gp.operate((function(n,i){return Kp.mergeInternals(n,i,e,t,void 0,!0,r)}))};var Yp={finalize:void 0},Qp=jo;Yp.finalize=function(e){return Qp.operate((function(t,r){try{t.subscribe(r)}finally{r.add(e)}}))};var $p={};$p.createFind=$p.find=void 0;var Hp=jo,Xp=ko;function Zp(e,t,r){var n="index"===r;return function(r,i){var o=0;r.subscribe(Xp.createOperatorSubscriber(i,(function(a){var u=o++;e.call(t,a,u,r)&&(i.next(n?u:a),i.complete())}),(function(){i.next(n?-1:void 0),i.complete()})))}}$p.find=function(e,t){return Hp.operate(Zp(e,t,"value"))},$p.createFind=Zp;var ey={findIndex:void 0},ty=jo,ry=$p;ey.findIndex=function(e,t){return ty.operate(ry.createFind(e,t,"index"))};var ny={first:void 0},iy=ps,oy=Zf,ay=zh,uy=Ch,cy=bp,sy=ho;ny.first=function(e,t){var r=arguments.length>=2;return function(n){return n.pipe(e?oy.filter((function(t,r){return e(t,r,n)})):sy.identity,ay.take(1),r?uy.defaultIfEmpty(t):cy.throwIfEmpty((function(){return new iy.EmptyError})))}};var ly={groupBy:void 0},fy=Bi,dy=ku,vy=Xo,hy=jo,py=ko;ly.groupBy=function(e,t,r,n){return hy.operate((function(i,o){var a;t&&"function"!=typeof t?(r=t.duration,a=t.element,n=t.connector):a=t;var u=new Map,c=function(e){u.forEach(e),e(o)},s=function(e){return c((function(t){return t.error(e)}))},l=0,f=!1,d=new py.OperatorSubscriber(o,(function(t){try{var i=e(t),c=u.get(i);if(!c){u.set(i,c=n?n():new vy.Subject);var v=function(e,t){var r=new fy.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=py.createOperatorSubscriber(c,(function(){c.complete(),null==h||h.unsubscribe()}),void 0,void 0,(function(){return u.delete(i)}));d.add(dy.innerFrom(r(v)).subscribe(h))}}c.next(a?a(t):t)}catch(e){s(e)}}),(function(){return c((function(e){return e.complete()}))}),s,(function(){return u.clear()}),(function(){return f=!0,0===l}));i.subscribe(d)}))};var yy={isEmpty:void 0},by=jo,my=ko;yy.isEmpty=function(){return by.operate((function(e,t){e.subscribe(my.createOperatorSubscriber(t,(function(){t.next(!1),t.complete()}),(function(){t.next(!0),t.complete()})))}))};var gy={},wy={},Oy=e&&e.__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.")};wy.takeLast=void 0;var Sy=wu,_y=jo,xy=ko;wy.takeLast=function(e){return e<=0?function(){return Sy.EMPTY}:_y.operate((function(t,r){var n=[];t.subscribe(xy.createOperatorSubscriber(r,(function(t){n.push(t),e<n.length&&n.shift()}),(function(){var e,t;try{for(var i=Oy(n),o=i.next();!o.done;o=i.next()){var a=o.value;r.next(a)}}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})))}))},gy.last=void 0;var Py=ps,Ay=Zf,Ey=wy,jy=bp,Ty=Ch,Iy=ho;gy.last=function(e,t){var r=arguments.length>=2;return function(n){return n.pipe(e?Ay.filter((function(t,r){return e(t,r,n)})):Iy.identity,Ey.takeLast(1),r?Ty.defaultIfEmpty(t):jy.throwIfEmpty((function(){return new Py.EmptyError})))}};var ky={materialize:void 0},Cy=gu,Fy=jo,Ny=ko;ky.materialize=function(){return Fy.operate((function(e,t){e.subscribe(Ny.createOperatorSubscriber(t,(function(e){t.next(Cy.Notification.createNext(e))}),(function(){t.next(Cy.Notification.createComplete()),t.complete()}),(function(e){t.next(Cy.Notification.createError(e)),t.complete()})))}))};var My={max:void 0},Ry=Ov,zy=Di;My.max=function(e){return Ry.reduce(zy.isFunction(e)?function(t,r){return e(t,r)>0?t:r}:function(e,t){return e>t?e:t})};var By={flatMap:void 0},qy=bl;By.flatMap=qy.mergeMap;var Dy={mergeMapTo:void 0},Ly=bl,Uy=Di;Dy.mergeMapTo=function(e,t,r){return void 0===r&&(r=1/0),Uy.isFunction(t)?Ly.mergeMap((function(){return e}),t,r):("number"==typeof t&&(r=t),Ly.mergeMap((function(){return e}),r))};var Vy={mergeScan:void 0},Wy=jo,Jy=ml;Vy.mergeScan=function(e,t,r){return void 0===r&&(r=1/0),Wy.operate((function(n,i){var o=t;return Jy.mergeInternals(n,i,(function(t,r){return e(o,t,r)}),r,(function(e){o=e}),!1,void 0,(function(){return o=null}))}))};var Gy={},Ky={},Yy=e&&e.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},Qy=e&&e.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Ky.merge=void 0;var $y=jo,Hy=zf,Xy=yl,Zy=Su,eb=ju;Ky.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Zy.popScheduler(e),n=Zy.popNumber(e,1/0);return e=Hy.argsOrArgArray(e),$y.operate((function(t,i){Xy.mergeAll(n)(eb.from(Qy([t],Yy(e)),r)).subscribe(i)}))};var tb=e&&e.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},rb=e&&e.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Gy.mergeWith=void 0;var nb=Ky;Gy.mergeWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return nb.merge.apply(void 0,rb([],tb(e)))};var ib={min:void 0},ob=Ov,ab=Di;ib.min=function(e){return ob.reduce(ab.isFunction(e)?function(t,r){return e(t,r)<0?t:r}:function(e,t){return e<t?e:t})};var ub={multicast:void 0},cb=Ao,sb=Di,lb=vh;ub.multicast=function(e,t){var r=sb.isFunction(e)?e:function(){return e};return sb.isFunction(t)?lb.connect(t,{connector:r}):function(e){return new cb.ConnectableObservable(e,r)}};var fb={pairwise:void 0},db=jo,vb=ko;fb.pairwise=function(){return db.operate((function(e,t){var r,n=!1;e.subscribe(vb.createOperatorSubscriber(t,(function(e){var i=r;r=e,n&&t.next([i,e]),n=!0})))}))};var hb={pluck:void 0},pb=Cs;hb.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 pb.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 yb={publish:void 0},bb=Xo,mb=ub,gb=vh;yb.publish=function(e){return e?function(t){return gb.connect(e)(t)}:function(e){return mb.multicast(new bb.Subject)(e)}};var wb={publishBehavior:void 0},Ob=la,Sb=Ao;wb.publishBehavior=function(e){return function(t){var r=new Ob.BehaviorSubject(e);return new Sb.ConnectableObservable(t,(function(){return r}))}};var _b={publishLast:void 0},xb=ma,Pb=Ao;_b.publishLast=function(){return function(e){var t=new xb.AsyncSubject;return new Pb.ConnectableObservable(e,(function(){return t}))}};var Ab={publishReplay:void 0},Eb=va,jb=ub,Tb=Di;Ab.publishReplay=function(e,t,r,n){r&&!Tb.isFunction(r)&&(n=r);var i=Tb.isFunction(r)?r:void 0;return function(r){return jb.multicast(new Eb.ReplaySubject(e,t,n),i)(r)}};var Ib={},kb=e&&e.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},Cb=e&&e.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Ib.raceWith=void 0;var Fb=od,Nb=jo,Mb=ho;Ib.raceWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length?Nb.operate((function(t,r){Fb.raceInit(Cb([t],kb(e)))(r)})):Mb.identity};var Rb={repeat:void 0},zb=wu,Bb=jo,qb=ko,Db=ku,Lb=Of;Rb.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 zb.EMPTY}:Bb.operate((function(e,t){var i,o=0,a=function(){if(null==i||i.unsubscribe(),i=null,null!=r){var e="number"==typeof r?Lb.timer(r):Db.innerFrom(r(o)),n=qb.createOperatorSubscriber(t,(function(){n.unsubscribe(),u()}));e.subscribe(n)}else u()},u=function(){var r=!1;i=e.subscribe(qb.createOperatorSubscriber(t,void 0,(function(){++o<n?i?a():r=!0:t.complete()}))),r&&a()};u()}))};var Ub={repeatWhen:void 0},Vb=Xo,Wb=jo,Jb=ko;Ub.repeatWhen=function(e){return Wb.operate((function(t,r){var n,i,o=!1,a=!1,u=!1,c=function(){return u&&a&&(r.complete(),!0)},s=function(){u=!1,n=t.subscribe(Jb.createOperatorSubscriber(r,void 0,(function(){u=!0,!c()&&(i||(i=new Vb.Subject,e(i).subscribe(Jb.createOperatorSubscriber(r,(function(){n?s():o=!0}),(function(){a=!0,c()})))),i).next()}))),o&&(n.unsubscribe(),n=null,o=!1,s())};s()}))};var Gb={retry:void 0},Kb=jo,Yb=ko,Qb=ho,$b=Of,Hb=ku;Gb.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,a=void 0!==o&&o;return n<=0?Qb.identity:Kb.operate((function(e,t){var r,o=0,u=function(){var c=!1;r=e.subscribe(Yb.createOperatorSubscriber(t,(function(e){a&&(o=0),t.next(e)}),void 0,(function(e){if(o++<n){var a=function(){r?(r.unsubscribe(),r=null,u()):c=!0};if(null!=i){var s="number"==typeof i?$b.timer(i):Hb.innerFrom(i(e,o)),l=Yb.createOperatorSubscriber(t,(function(){l.unsubscribe(),a()}),(function(){t.complete()}));s.subscribe(l)}else a()}else t.error(e)}))),c&&(r.unsubscribe(),r=null,u())};u()}))};var Xb={retryWhen:void 0},Zb=Xo,em=jo,tm=ko;Xb.retryWhen=function(e){return em.operate((function(t,r){var n,i,o=!1,a=function(){n=t.subscribe(tm.createOperatorSubscriber(r,void 0,void 0,(function(t){i||(i=new Zb.Subject,e(i).subscribe(tm.createOperatorSubscriber(r,(function(){return n?a():o=!0})))),i&&i.next(t)}))),o&&(n.unsubscribe(),n=null,o=!1,a())};a()}))};var rm={sample:void 0},nm=jo,im=oo,om=ko;rm.sample=function(e){return nm.operate((function(t,r){var n=!1,i=null;t.subscribe(om.createOperatorSubscriber(r,(function(e){n=!0,i=e}))),e.subscribe(om.createOperatorSubscriber(r,(function(){if(n){n=!1;var e=i;i=null,r.next(e)}}),im.noop))}))};var am={sampleTime:void 0},um=Ha,cm=rm,sm=wf;am.sampleTime=function(e,t){return void 0===t&&(t=um.asyncScheduler),cm.sample(sm.interval(e,t))};var lm={scan:void 0},fm=jo,dm=Sv;lm.scan=function(e,t){return fm.operate(dm.scanInternals(e,t,arguments.length>=2,!0))};var vm={sequenceEqual:void 0},hm=jo,pm=ko;vm.sequenceEqual=function(e,t){return void 0===t&&(t=function(e,t){return e===t}),hm.operate((function(r,n){var i={buffer:[],complete:!1},o={buffer:[],complete:!1},a=function(e){n.next(e),n.complete()},u=function(e,r){var i=pm.createOperatorSubscriber(n,(function(n){var i=r.buffer,o=r.complete;0===i.length?o?a(!1):e.buffer.push(n):!t(n,i.shift())&&a(!1)}),(function(){e.complete=!0;var t=r.complete,n=r.buffer;t&&a(0===n.length),null==i||i.unsubscribe()}));return i};r.subscribe(u(i,o)),e.subscribe(u(o,i))}))};var ym={},bm=e&&e.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},mm=e&&e.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};ym.share=void 0;var gm=ku,wm=Xo,Om=qi,Sm=jo;function _m(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 Om.SafeSubscriber({next:function(){i.unsubscribe(),e()}});return t.apply(void 0,mm([],bm(r))).subscribe(i)}}else e()}ym.share=function(e){void 0===e&&(e={});var t=e.connector,r=void 0===t?function(){return new wm.Subject}:t,n=e.resetOnError,i=void 0===n||n,o=e.resetOnComplete,a=void 0===o||o,u=e.resetOnRefCountZero,c=void 0===u||u;return function(e){var t,n,o,u=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 Sm.operate((function(e,h){u++,l||s||f();var p=o=null!=o?o:r();h.add((function(){0!==--u||l||s||(n=_m(v,c))})),p.subscribe(h),!t&&u>0&&(t=new Om.SafeSubscriber({next:function(e){return p.next(e)},error:function(e){l=!0,f(),n=_m(d,i,e),p.error(e)},complete:function(){s=!0,f(),n=_m(d,a),p.complete()}}),gm.innerFrom(e).subscribe(t))}))(e)}};var xm={shareReplay:void 0},Pm=va,Am=ym;xm.shareReplay=function(e,t,r){var n,i,o,a,u=!1;return e&&"object"==typeof e?(n=e.bufferSize,a=void 0===n?1/0:n,i=e.windowTime,t=void 0===i?1/0:i,u=void 0!==(o=e.refCount)&&o,r=e.scheduler):a=null!=e?e:1/0,Am.share({connector:function(){return new Pm.ReplaySubject(a,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:u})};var Em={single:void 0},jm=ps,Tm=Ps,Im=_s,km=jo,Cm=ko;Em.single=function(e){return km.operate((function(t,r){var n,i=!1,o=!1,a=0;t.subscribe(Cm.createOperatorSubscriber(r,(function(u){o=!0,e&&!e(u,a++,t)||(i&&r.error(new Tm.SequenceError("Too many matching values")),i=!0,n=u)}),(function(){i?(r.next(n),r.complete()):r.error(o?new Im.NotFoundError("No matching values"):new jm.EmptyError)})))}))};var Fm={skip:void 0},Nm=Zf;Fm.skip=function(e){return Nm.filter((function(t,r){return e<=r}))};var Mm={skipLast:void 0},Rm=ho,zm=jo,Bm=ko;Mm.skipLast=function(e){return e<=0?Rm.identity:zm.operate((function(t,r){var n=new Array(e),i=0;return t.subscribe(Bm.createOperatorSubscriber(r,(function(t){var o=i++;if(o<e)n[o]=t;else{var a=o%e,u=n[a];n[a]=t,r.next(u)}}))),function(){n=null}}))};var qm={skipUntil:void 0},Dm=jo,Lm=ko,Um=ku,Vm=oo;qm.skipUntil=function(e){return Dm.operate((function(t,r){var n=!1,i=Lm.createOperatorSubscriber(r,(function(){null==i||i.unsubscribe(),n=!0}),Vm.noop);Um.innerFrom(e).subscribe(i),t.subscribe(Lm.createOperatorSubscriber(r,(function(e){return n&&r.next(e)})))}))};var Wm={skipWhile:void 0},Jm=jo,Gm=ko;Wm.skipWhile=function(e){return Jm.operate((function(t,r){var n=!1,i=0;t.subscribe(Gm.createOperatorSubscriber(r,(function(t){return(n||(n=!e(t,i++)))&&r.next(t)})))}))};var Km={startWith:void 0},Ym=hl,Qm=Su,$m=jo;Km.startWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Qm.popScheduler(e);return $m.operate((function(t,n){(r?Ym.concat(e,t,r):Ym.concat(e,t)).subscribe(n)}))};var Hm={},Xm={switchMap:void 0},Zm=ku,eg=jo,tg=ko;Xm.switchMap=function(e,t){return eg.operate((function(r,n){var i=null,o=0,a=!1,u=function(){return a&&!i&&n.complete()};r.subscribe(tg.createOperatorSubscriber(n,(function(r){null==i||i.unsubscribe();var a=0,c=o++;Zm.innerFrom(e(r,c)).subscribe(i=tg.createOperatorSubscriber(n,(function(e){return n.next(t?t(r,e,c,a++):e)}),(function(){i=null,u()})))}),(function(){a=!0,u()})))}))},Hm.switchAll=void 0;var rg=Xm,ng=ho;Hm.switchAll=function(){return rg.switchMap(ng.identity)};var ig={switchMapTo:void 0},og=Xm,ag=Di;ig.switchMapTo=function(e,t){return ag.isFunction(t)?og.switchMap((function(){return e}),t):og.switchMap((function(){return e}))};var ug={switchScan:void 0},cg=Xm,sg=jo;ug.switchScan=function(e,t){return sg.operate((function(r,n){var i=t;return cg.switchMap((function(t,r){return e(i,t,r)}),(function(e,t){return i=t,t}))(r).subscribe(n),function(){i=null}}))};var lg={takeUntil:void 0},fg=jo,dg=ko,vg=ku,hg=oo;lg.takeUntil=function(e){return fg.operate((function(t,r){vg.innerFrom(e).subscribe(dg.createOperatorSubscriber(r,(function(){return r.complete()}),hg.noop)),!r.closed&&t.subscribe(r)}))};var pg={takeWhile:void 0},yg=jo,bg=ko;pg.takeWhile=function(e,t){return void 0===t&&(t=!1),yg.operate((function(r,n){var i=0;r.subscribe(bg.createOperatorSubscriber(n,(function(r){var o=e(r,i++);(o||t)&&n.next(r),!o&&n.complete()})))}))};var mg={tap:void 0},gg=Di,wg=jo,Og=ko,Sg=ho;mg.tap=function(e,t,r){var n=gg.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return n?wg.operate((function(e,t){var r;null===(r=n.subscribe)||void 0===r||r.call(n);var i=!0;e.subscribe(Og.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)})))})):Sg.identity};var _g={};!function(e){e.throttle=e.defaultThrottleConfig=void 0;var t=jo,r=ko,n=ku;e.defaultThrottleConfig={leading:!0,trailing:!1},e.throttle=function(i,o){return void 0===o&&(o=e.defaultThrottleConfig),t.operate((function(e,t){var a=o.leading,u=o.trailing,c=!1,s=null,l=null,f=!1,d=function(){null==l||l.unsubscribe(),l=null,u&&(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)&&(a?p():h(e))}),(function(){f=!0,(!(u&&c&&l)||l.closed)&&t.complete()})))}))}}(_g);var xg={throttleTime:void 0},Pg=Ha,Ag=_g,Eg=Of;xg.throttleTime=function(e,t,r){void 0===t&&(t=Pg.asyncScheduler),void 0===r&&(r=Ag.defaultThrottleConfig);var n=Eg.timer(e,t);return Ag.throttle((function(){return n}),r)};var jg={};jg.TimeInterval=jg.timeInterval=void 0;var Tg=Ha,Ig=jo,kg=ko;jg.timeInterval=function(e){return void 0===e&&(e=Tg.asyncScheduler),Ig.operate((function(t,r){var n=e.now();t.subscribe(kg.createOperatorSubscriber(r,(function(t){var i=e.now(),o=i-n;n=i,r.next(new Cg(t,o))})))}))};var Cg=function(e,t){this.value=e,this.interval=t};jg.TimeInterval=Cg;var Fg={timeoutWith:void 0},Ng=Ha,Mg=js,Rg=Es;Fg.timeoutWith=function(e,t,r){var n,i,o;if(r=null!=r?r:Ng.async,Mg.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 Rg.timeout({first:n,each:i,scheduler:r,with:o})};var zg={timestamp:void 0},Bg=ha,qg=Cs;zg.timestamp=function(e){return void 0===e&&(e=Bg.dateTimestampProvider),qg.map((function(t){return{value:t,timestamp:e.now()}}))};var Dg={window:void 0},Lg=Xo,Ug=jo,Vg=ko,Wg=oo;Dg.window=function(e){return Ug.operate((function(t,r){var n=new Lg.Subject;r.next(n.asObservable());var i=function(e){n.error(e),r.error(e)};return t.subscribe(Vg.createOperatorSubscriber(r,(function(e){return null==n?void 0:n.next(e)}),(function(){n.complete(),r.complete()}),i)),e.subscribe(Vg.createOperatorSubscriber(r,(function(){n.complete(),r.next(n=new Lg.Subject)}),Wg.noop,i)),function(){null==n||n.unsubscribe(),n=null}}))};var Jg={},Gg=e&&e.__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.")};Jg.windowCount=void 0;var Kg=Xo,Yg=jo,Qg=ko;Jg.windowCount=function(e,t){void 0===t&&(t=0);var r=t>0?t:e;return Yg.operate((function(t,n){var i=[new Kg.Subject],o=0;n.next(i[0].asObservable()),t.subscribe(Qg.createOperatorSubscriber(n,(function(t){var a,u;try{for(var c=Gg(i),s=c.next();!s.done;s=c.next()){s.value.next(t)}}catch(e){a={error:e}}finally{try{s&&!s.done&&(u=c.return)&&u.call(c)}finally{if(a)throw a.error}}var l=o-e+1;if(l>=0&&l%r==0&&i.shift().complete(),++o%r==0){var f=new Kg.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 $g={windowTime:void 0},Hg=Xo,Xg=Ha,Zg=Li,ew=jo,tw=ko,rw=Ji,nw=Su,iw=gc;$g.windowTime=function(e){for(var t,r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=null!==(t=nw.popScheduler(n))&&void 0!==t?t:Xg.asyncScheduler,a=null!==(r=n[0])&&void 0!==r?r:null,u=n[1]||1/0;return ew.operate((function(t,r){var n=[],i=!1,c=function(e){var t=e.window,r=e.subs;t.complete(),r.unsubscribe(),rw.arrRemove(n,e),i&&s()},s=function(){if(n){var t=new Zg.Subscription;r.add(t);var i=new Hg.Subject,a={window:i,subs:t,seen:0};n.push(a),r.next(i.asObservable()),iw.executeSchedule(t,o,(function(){return c(a)}),e)}};null!==a&&a>=0?iw.executeSchedule(r,o,s,a,!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(tw.createOperatorSubscriber(r,(function(e){l((function(t){t.window.next(e),u<=++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 ow={},aw=e&&e.__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.")};ow.windowToggle=void 0;var uw=Xo,cw=Li,sw=jo,lw=ku,fw=ko,dw=oo,vw=Ji;ow.windowToggle=function(e,t){return sw.operate((function(r,n){var i=[],o=function(e){for(;0<i.length;)i.shift().error(e);n.error(e)};lw.innerFrom(e).subscribe(fw.createOperatorSubscriber(n,(function(e){var r=new uw.Subject;i.push(r);var a,u=new cw.Subscription;try{a=lw.innerFrom(t(e))}catch(e){return void o(e)}n.next(r.asObservable()),u.add(a.subscribe(fw.createOperatorSubscriber(n,(function(){vw.arrRemove(i,r),r.complete(),u.unsubscribe()}),dw.noop,o)))}),dw.noop)),r.subscribe(fw.createOperatorSubscriber(n,(function(e){var t,r,n=i.slice();try{for(var o=aw(n),a=o.next();!a.done;a=o.next()){a.value.next(e)}}catch(e){t={error:e}}finally{try{a&&!a.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 hw={windowWhen:void 0},pw=Xo,yw=jo,bw=ko,mw=ku;hw.windowWhen=function(e){return yw.operate((function(t,r){var n,i,o=function(e){n.error(e),r.error(e)},a=function(){var t;null==i||i.unsubscribe(),null==n||n.complete(),n=new pw.Subject,r.next(n.asObservable());try{t=mw.innerFrom(e())}catch(e){return void o(e)}t.subscribe(i=bw.createOperatorSubscriber(r,a,a,o))};a(),t.subscribe(bw.createOperatorSubscriber(r,(function(e){return n.next(e)}),(function(){n.complete(),r.complete()}),o,(function(){null==i||i.unsubscribe(),n=null})))}))};var gw={},ww=e&&e.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},Ow=e&&e.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};gw.withLatestFrom=void 0;var Sw=jo,_w=ko,xw=ku,Pw=ho,Aw=oo,Ew=Su;gw.withLatestFrom=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Ew.popResultSelector(e);return Sw.operate((function(t,n){for(var i=e.length,o=new Array(i),a=e.map((function(){return!1})),u=!1,c=function(t){xw.innerFrom(e[t]).subscribe(_w.createOperatorSubscriber(n,(function(e){o[t]=e,u||a[t]||(a[t]=!0,(u=a.every(Pw.identity))&&(a=null))}),Aw.noop))},s=0;s<i;s++)c(s);t.subscribe(_w.createOperatorSubscriber(n,(function(e){if(u){var t=Ow([e],ww(o));n.next(r?r.apply(void 0,Ow([],ww(t))):t)}})))}))};var jw={zipAll:void 0},Tw=md,Iw=gv;jw.zipAll=function(e){return Iw.joinAllInternals(Tw.zip,e)};var kw={},Cw={},Fw=e&&e.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},Nw=e&&e.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Cw.zip=void 0;var Mw=md,Rw=jo;Cw.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Rw.operate((function(t,r){Mw.zip.apply(void 0,Nw([t],Fw(e))).subscribe(r)}))};var zw=e&&e.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a},Bw=e&&e.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};kw.zipWith=void 0;var qw=Cw;kw.zipWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return qw.zip.apply(void 0,Bw([],zw(e)))},function(t){var r=e&&e.__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]}),n=e&&e.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};t.interval=t.iif=t.generate=t.fromEventPattern=t.fromEvent=t.from=t.forkJoin=t.empty=t.defer=t.connectable=t.concat=t.combineLatest=t.bindNodeCallback=t.bindCallback=t.UnsubscriptionError=t.TimeoutError=t.SequenceError=t.ObjectUnsubscribedError=t.NotFoundError=t.EmptyError=t.ArgumentOutOfRangeError=t.firstValueFrom=t.lastValueFrom=t.isObservable=t.identity=t.noop=t.pipe=t.NotificationKind=t.Notification=t.Subscriber=t.Subscription=t.Scheduler=t.VirtualAction=t.VirtualTimeScheduler=t.animationFrameScheduler=t.animationFrame=t.queueScheduler=t.queue=t.asyncScheduler=t.async=t.asapScheduler=t.asap=t.AsyncSubject=t.ReplaySubject=t.BehaviorSubject=t.Subject=t.animationFrames=t.observable=t.ConnectableObservable=t.Observable=void 0,t.filter=t.expand=t.exhaustMap=t.exhaustAll=t.exhaust=t.every=t.endWith=t.elementAt=t.distinctUntilKeyChanged=t.distinctUntilChanged=t.distinct=t.dematerialize=t.delayWhen=t.delay=t.defaultIfEmpty=t.debounceTime=t.debounce=t.count=t.connect=t.concatWith=t.concatMapTo=t.concatMap=t.concatAll=t.combineLatestWith=t.combineLatestAll=t.combineAll=t.catchError=t.bufferWhen=t.bufferToggle=t.bufferTime=t.bufferCount=t.buffer=t.auditTime=t.audit=t.config=t.NEVER=t.EMPTY=t.scheduled=t.zip=t.using=t.timer=t.throwError=t.range=t.race=t.partition=t.pairs=t.onErrorResumeNext=t.of=t.never=t.merge=void 0,t.switchMapTo=t.switchMap=t.switchAll=t.subscribeOn=t.startWith=t.skipWhile=t.skipUntil=t.skipLast=t.skip=t.single=t.shareReplay=t.share=t.sequenceEqual=t.scan=t.sampleTime=t.sample=t.refCount=t.retryWhen=t.retry=t.repeatWhen=t.repeat=t.reduce=t.raceWith=t.publishReplay=t.publishLast=t.publishBehavior=t.publish=t.pluck=t.pairwise=t.observeOn=t.multicast=t.min=t.mergeWith=t.mergeScan=t.mergeMapTo=t.mergeMap=t.flatMap=t.mergeAll=t.max=t.materialize=t.mapTo=t.map=t.last=t.isEmpty=t.ignoreElements=t.groupBy=t.first=t.findIndex=t.find=t.finalize=void 0,t.zipWith=t.zipAll=t.withLatestFrom=t.windowWhen=t.windowToggle=t.windowTime=t.windowCount=t.window=t.toArray=t.timestamp=t.timeoutWith=t.timeout=t.timeInterval=t.throwIfEmpty=t.throttleTime=t.throttle=t.tap=t.takeWhile=t.takeUntil=t.takeLast=t.take=t.switchScan=void 0;var i=Bi;Object.defineProperty(t,"Observable",{enumerable:!0,get:function(){return i.Observable}});var o=Ao;Object.defineProperty(t,"ConnectableObservable",{enumerable:!0,get:function(){return o.ConnectableObservable}});var a=fo;Object.defineProperty(t,"observable",{enumerable:!0,get:function(){return a.observable}});var u=Vo;Object.defineProperty(t,"animationFrames",{enumerable:!0,get:function(){return u.animationFrames}});var c=Xo;Object.defineProperty(t,"Subject",{enumerable:!0,get:function(){return c.Subject}});var s=la;Object.defineProperty(t,"BehaviorSubject",{enumerable:!0,get:function(){return s.BehaviorSubject}});var l=va;Object.defineProperty(t,"ReplaySubject",{enumerable:!0,get:function(){return l.ReplaySubject}});var f=ma;Object.defineProperty(t,"AsyncSubject",{enumerable:!0,get:function(){return f.AsyncSubject}});var d=Oa;Object.defineProperty(t,"asap",{enumerable:!0,get:function(){return d.asap}}),Object.defineProperty(t,"asapScheduler",{enumerable:!0,get:function(){return d.asapScheduler}});var v=Ha;Object.defineProperty(t,"async",{enumerable:!0,get:function(){return v.async}}),Object.defineProperty(t,"asyncScheduler",{enumerable:!0,get:function(){return v.asyncScheduler}});var h=Xa;Object.defineProperty(t,"queue",{enumerable:!0,get:function(){return h.queue}}),Object.defineProperty(t,"queueScheduler",{enumerable:!0,get:function(){return h.queueScheduler}});var p=ou;Object.defineProperty(t,"animationFrame",{enumerable:!0,get:function(){return p.animationFrame}}),Object.defineProperty(t,"animationFrameScheduler",{enumerable:!0,get:function(){return p.animationFrameScheduler}});var y=vu;Object.defineProperty(t,"VirtualTimeScheduler",{enumerable:!0,get:function(){return y.VirtualTimeScheduler}}),Object.defineProperty(t,"VirtualAction",{enumerable:!0,get:function(){return y.VirtualAction}});var b=Va;Object.defineProperty(t,"Scheduler",{enumerable:!0,get:function(){return b.Scheduler}});var m=Li;Object.defineProperty(t,"Subscription",{enumerable:!0,get:function(){return m.Subscription}});var g=qi;Object.defineProperty(t,"Subscriber",{enumerable:!0,get:function(){return g.Subscriber}});var w=gu;Object.defineProperty(t,"Notification",{enumerable:!0,get:function(){return w.Notification}}),Object.defineProperty(t,"NotificationKind",{enumerable:!0,get:function(){return w.NotificationKind}});var O=vo;Object.defineProperty(t,"pipe",{enumerable:!0,get:function(){return O.pipe}});var S=oo;Object.defineProperty(t,"noop",{enumerable:!0,get:function(){return S.noop}});var _=ho;Object.defineProperty(t,"identity",{enumerable:!0,get:function(){return _.identity}});var x=fs;Object.defineProperty(t,"isObservable",{enumerable:!0,get:function(){return x.isObservable}});var P=hs;Object.defineProperty(t,"lastValueFrom",{enumerable:!0,get:function(){return P.lastValueFrom}});var A=ms;Object.defineProperty(t,"firstValueFrom",{enumerable:!0,get:function(){return A.firstValueFrom}});var E=Os;Object.defineProperty(t,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return E.ArgumentOutOfRangeError}});var j=ps;Object.defineProperty(t,"EmptyError",{enumerable:!0,get:function(){return j.EmptyError}});var T=_s;Object.defineProperty(t,"NotFoundError",{enumerable:!0,get:function(){return T.NotFoundError}});var I=Zo;Object.defineProperty(t,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return I.ObjectUnsubscribedError}});var k=Ps;Object.defineProperty(t,"SequenceError",{enumerable:!0,get:function(){return k.SequenceError}});var C=Es;Object.defineProperty(t,"TimeoutError",{enumerable:!0,get:function(){return C.TimeoutError}});var F=Ui;Object.defineProperty(t,"UnsubscriptionError",{enumerable:!0,get:function(){return F.UnsubscriptionError}});var N=Ts;Object.defineProperty(t,"bindCallback",{enumerable:!0,get:function(){return N.bindCallback}});var M=Ys;Object.defineProperty(t,"bindNodeCallback",{enumerable:!0,get:function(){return M.bindNodeCallback}});var R=$s;Object.defineProperty(t,"combineLatest",{enumerable:!0,get:function(){return R.combineLatest}});var z=hl;Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return z.concat}});var B=Fl;Object.defineProperty(t,"connectable",{enumerable:!0,get:function(){return B.connectable}});var q=Nl;Object.defineProperty(t,"defer",{enumerable:!0,get:function(){return q.defer}});var D=wu;Object.defineProperty(t,"empty",{enumerable:!0,get:function(){return D.empty}});var L=Ll;Object.defineProperty(t,"forkJoin",{enumerable:!0,get:function(){return L.forkJoin}});var U=ju;Object.defineProperty(t,"from",{enumerable:!0,get:function(){return U.from}});var V=Ql;Object.defineProperty(t,"fromEvent",{enumerable:!0,get:function(){return V.fromEvent}});var W=cf;Object.defineProperty(t,"fromEventPattern",{enumerable:!0,get:function(){return W.fromEventPattern}});var J=df;Object.defineProperty(t,"generate",{enumerable:!0,get:function(){return J.generate}});var G=mf;Object.defineProperty(t,"iif",{enumerable:!0,get:function(){return G.iif}});var K=wf;Object.defineProperty(t,"interval",{enumerable:!0,get:function(){return K.interval}});var Y=jf;Object.defineProperty(t,"merge",{enumerable:!0,get:function(){return Y.merge}});var Q=Nf;Object.defineProperty(t,"never",{enumerable:!0,get:function(){return Q.never}});var $=Ou;Object.defineProperty(t,"of",{enumerable:!0,get:function(){return $.of}});var H=Mf;Object.defineProperty(t,"onErrorResumeNext",{enumerable:!0,get:function(){return H.onErrorResumeNext}});var X=Qf;Object.defineProperty(t,"pairs",{enumerable:!0,get:function(){return X.pairs}});var Z=Hf;Object.defineProperty(t,"partition",{enumerable:!0,get:function(){return Z.partition}});var ee=od;Object.defineProperty(t,"race",{enumerable:!0,get:function(){return ee.race}});var te=fd;Object.defineProperty(t,"range",{enumerable:!0,get:function(){return te.range}});var re=cs;Object.defineProperty(t,"throwError",{enumerable:!0,get:function(){return re.throwError}});var ne=Of;Object.defineProperty(t,"timer",{enumerable:!0,get:function(){return ne.timer}});var ie=hd;Object.defineProperty(t,"using",{enumerable:!0,get:function(){return ie.using}});var oe=md;Object.defineProperty(t,"zip",{enumerable:!0,get:function(){return oe.zip}});var ae=Tu;Object.defineProperty(t,"scheduled",{enumerable:!0,get:function(){return ae.scheduled}});var ue=wu;Object.defineProperty(t,"EMPTY",{enumerable:!0,get:function(){return ue.EMPTY}});var ce=Nf;Object.defineProperty(t,"NEVER",{enumerable:!0,get:function(){return ce.NEVER}}),n(Ed,t);var se=eo;Object.defineProperty(t,"config",{enumerable:!0,get:function(){return se.config}});var le=jd;Object.defineProperty(t,"audit",{enumerable:!0,get:function(){return le.audit}});var fe=Cd;Object.defineProperty(t,"auditTime",{enumerable:!0,get:function(){return fe.auditTime}});var de=Rd;Object.defineProperty(t,"buffer",{enumerable:!0,get:function(){return de.buffer}});var ve=Dd;Object.defineProperty(t,"bufferCount",{enumerable:!0,get:function(){return ve.bufferCount}});var he=Jd;Object.defineProperty(t,"bufferTime",{enumerable:!0,get:function(){return he.bufferTime}});var pe=ev;Object.defineProperty(t,"bufferToggle",{enumerable:!0,get:function(){return pe.bufferToggle}});var ye=cv;Object.defineProperty(t,"bufferWhen",{enumerable:!0,get:function(){return ye.bufferWhen}});var be=vv;Object.defineProperty(t,"catchError",{enumerable:!0,get:function(){return be.catchError}});var me=bv;Object.defineProperty(t,"combineAll",{enumerable:!0,get:function(){return me.combineAll}});var ge=mv;Object.defineProperty(t,"combineLatestAll",{enumerable:!0,get:function(){return ge.combineLatestAll}});var we=zv;Object.defineProperty(t,"combineLatestWith",{enumerable:!0,get:function(){return we.combineLatestWith}});var Oe=pl;Object.defineProperty(t,"concatAll",{enumerable:!0,get:function(){return Oe.concatAll}});var Se=$v;Object.defineProperty(t,"concatMap",{enumerable:!0,get:function(){return Se.concatMap}});var _e=Zv;Object.defineProperty(t,"concatMapTo",{enumerable:!0,get:function(){return _e.concatMapTo}});var xe=rh;Object.defineProperty(t,"concatWith",{enumerable:!0,get:function(){return xe.concatWith}});var Pe=vh;Object.defineProperty(t,"connect",{enumerable:!0,get:function(){return Pe.connect}});var Ae=Oh;Object.defineProperty(t,"count",{enumerable:!0,get:function(){return Ae.count}});var Ee=_h;Object.defineProperty(t,"debounce",{enumerable:!0,get:function(){return Ee.debounce}});var je=jh;Object.defineProperty(t,"debounceTime",{enumerable:!0,get:function(){return je.debounceTime}});var Te=Ch;Object.defineProperty(t,"defaultIfEmpty",{enumerable:!0,get:function(){return Te.defaultIfEmpty}});var Ie=Mh;Object.defineProperty(t,"delay",{enumerable:!0,get:function(){return Ie.delay}});var ke=Rh;Object.defineProperty(t,"delayWhen",{enumerable:!0,get:function(){return ke.delayWhen}});var Ce=tp;Object.defineProperty(t,"dematerialize",{enumerable:!0,get:function(){return Ce.dematerialize}});var Fe=op;Object.defineProperty(t,"distinct",{enumerable:!0,get:function(){return Fe.distinct}});var Ne=sp;Object.defineProperty(t,"distinctUntilChanged",{enumerable:!0,get:function(){return Ne.distinctUntilChanged}});var Me=hp;Object.defineProperty(t,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return Me.distinctUntilKeyChanged}});var Re=yp;Object.defineProperty(t,"elementAt",{enumerable:!0,get:function(){return Re.elementAt}});var ze=Ep;Object.defineProperty(t,"endWith",{enumerable:!0,get:function(){return ze.endWith}});var Be=Cp;Object.defineProperty(t,"every",{enumerable:!0,get:function(){return Be.every}});var qe=Mp;Object.defineProperty(t,"exhaust",{enumerable:!0,get:function(){return qe.exhaust}});var De=Rp;Object.defineProperty(t,"exhaustAll",{enumerable:!0,get:function(){return De.exhaustAll}});var Le=zp;Object.defineProperty(t,"exhaustMap",{enumerable:!0,get:function(){return Le.exhaustMap}});var Ue=Jp;Object.defineProperty(t,"expand",{enumerable:!0,get:function(){return Ue.expand}});var Ve=Zf;Object.defineProperty(t,"filter",{enumerable:!0,get:function(){return Ve.filter}});var We=Yp;Object.defineProperty(t,"finalize",{enumerable:!0,get:function(){return We.finalize}});var Je=$p;Object.defineProperty(t,"find",{enumerable:!0,get:function(){return Je.find}});var Ge=ey;Object.defineProperty(t,"findIndex",{enumerable:!0,get:function(){return Ge.findIndex}});var Ke=ny;Object.defineProperty(t,"first",{enumerable:!0,get:function(){return Ke.first}});var Ye=ly;Object.defineProperty(t,"groupBy",{enumerable:!0,get:function(){return Ye.groupBy}});var Qe=Lh;Object.defineProperty(t,"ignoreElements",{enumerable:!0,get:function(){return Qe.ignoreElements}});var $e=yy;Object.defineProperty(t,"isEmpty",{enumerable:!0,get:function(){return $e.isEmpty}});var He=gy;Object.defineProperty(t,"last",{enumerable:!0,get:function(){return He.last}});var Xe=Cs;Object.defineProperty(t,"map",{enumerable:!0,get:function(){return Xe.map}});var Ze=Jh;Object.defineProperty(t,"mapTo",{enumerable:!0,get:function(){return Ze.mapTo}});var et=ky;Object.defineProperty(t,"materialize",{enumerable:!0,get:function(){return et.materialize}});var tt=My;Object.defineProperty(t,"max",{enumerable:!0,get:function(){return tt.max}});var rt=yl;Object.defineProperty(t,"mergeAll",{enumerable:!0,get:function(){return rt.mergeAll}});var nt=By;Object.defineProperty(t,"flatMap",{enumerable:!0,get:function(){return nt.flatMap}});var it=bl;Object.defineProperty(t,"mergeMap",{enumerable:!0,get:function(){return it.mergeMap}});var ot=Dy;Object.defineProperty(t,"mergeMapTo",{enumerable:!0,get:function(){return ot.mergeMapTo}});var at=Vy;Object.defineProperty(t,"mergeScan",{enumerable:!0,get:function(){return at.mergeScan}});var ut=Gy;Object.defineProperty(t,"mergeWith",{enumerable:!0,get:function(){return ut.mergeWith}});var ct=ib;Object.defineProperty(t,"min",{enumerable:!0,get:function(){return ct.min}});var st=ub;Object.defineProperty(t,"multicast",{enumerable:!0,get:function(){return st.multicast}});var lt=mc;Object.defineProperty(t,"observeOn",{enumerable:!0,get:function(){return lt.observeOn}});var ft=fb;Object.defineProperty(t,"pairwise",{enumerable:!0,get:function(){return ft.pairwise}});var dt=hb;Object.defineProperty(t,"pluck",{enumerable:!0,get:function(){return dt.pluck}});var vt=yb;Object.defineProperty(t,"publish",{enumerable:!0,get:function(){return vt.publish}});var ht=wb;Object.defineProperty(t,"publishBehavior",{enumerable:!0,get:function(){return ht.publishBehavior}});var pt=_b;Object.defineProperty(t,"publishLast",{enumerable:!0,get:function(){return pt.publishLast}});var yt=Ab;Object.defineProperty(t,"publishReplay",{enumerable:!0,get:function(){return yt.publishReplay}});var bt=Ib;Object.defineProperty(t,"raceWith",{enumerable:!0,get:function(){return bt.raceWith}});var mt=Ov;Object.defineProperty(t,"reduce",{enumerable:!0,get:function(){return mt.reduce}});var gt=Rb;Object.defineProperty(t,"repeat",{enumerable:!0,get:function(){return gt.repeat}});var wt=Ub;Object.defineProperty(t,"repeatWhen",{enumerable:!0,get:function(){return wt.repeatWhen}});var Ot=Gb;Object.defineProperty(t,"retry",{enumerable:!0,get:function(){return Ot.retry}});var St=Xb;Object.defineProperty(t,"retryWhen",{enumerable:!0,get:function(){return St.retryWhen}});var _t=Eo;Object.defineProperty(t,"refCount",{enumerable:!0,get:function(){return _t.refCount}});var xt=rm;Object.defineProperty(t,"sample",{enumerable:!0,get:function(){return xt.sample}});var Pt=am;Object.defineProperty(t,"sampleTime",{enumerable:!0,get:function(){return Pt.sampleTime}});var At=lm;Object.defineProperty(t,"scan",{enumerable:!0,get:function(){return At.scan}});var Et=vm;Object.defineProperty(t,"sequenceEqual",{enumerable:!0,get:function(){return Et.sequenceEqual}});var jt=ym;Object.defineProperty(t,"share",{enumerable:!0,get:function(){return jt.share}});var Tt=xm;Object.defineProperty(t,"shareReplay",{enumerable:!0,get:function(){return Tt.shareReplay}});var It=Em;Object.defineProperty(t,"single",{enumerable:!0,get:function(){return It.single}});var kt=Fm;Object.defineProperty(t,"skip",{enumerable:!0,get:function(){return kt.skip}});var Ct=Mm;Object.defineProperty(t,"skipLast",{enumerable:!0,get:function(){return Ct.skipLast}});var Ft=qm;Object.defineProperty(t,"skipUntil",{enumerable:!0,get:function(){return Ft.skipUntil}});var Nt=Wm;Object.defineProperty(t,"skipWhile",{enumerable:!0,get:function(){return Nt.skipWhile}});var Mt=Km;Object.defineProperty(t,"startWith",{enumerable:!0,get:function(){return Mt.startWith}});var Rt=_c;Object.defineProperty(t,"subscribeOn",{enumerable:!0,get:function(){return Rt.subscribeOn}});var zt=Hm;Object.defineProperty(t,"switchAll",{enumerable:!0,get:function(){return zt.switchAll}});var Bt=Xm;Object.defineProperty(t,"switchMap",{enumerable:!0,get:function(){return Bt.switchMap}});var qt=ig;Object.defineProperty(t,"switchMapTo",{enumerable:!0,get:function(){return qt.switchMapTo}});var Dt=ug;Object.defineProperty(t,"switchScan",{enumerable:!0,get:function(){return Dt.switchScan}});var Lt=zh;Object.defineProperty(t,"take",{enumerable:!0,get:function(){return Lt.take}});var Ut=wy;Object.defineProperty(t,"takeLast",{enumerable:!0,get:function(){return Ut.takeLast}});var Vt=lg;Object.defineProperty(t,"takeUntil",{enumerable:!0,get:function(){return Vt.takeUntil}});var Wt=pg;Object.defineProperty(t,"takeWhile",{enumerable:!0,get:function(){return Wt.takeWhile}});var Jt=mg;Object.defineProperty(t,"tap",{enumerable:!0,get:function(){return Jt.tap}});var Gt=_g;Object.defineProperty(t,"throttle",{enumerable:!0,get:function(){return Gt.throttle}});var Kt=xg;Object.defineProperty(t,"throttleTime",{enumerable:!0,get:function(){return Kt.throttleTime}});var Yt=bp;Object.defineProperty(t,"throwIfEmpty",{enumerable:!0,get:function(){return Yt.throwIfEmpty}});var Qt=jg;Object.defineProperty(t,"timeInterval",{enumerable:!0,get:function(){return Qt.timeInterval}});var $t=Es;Object.defineProperty(t,"timeout",{enumerable:!0,get:function(){return $t.timeout}});var Ht=Fg;Object.defineProperty(t,"timeoutWith",{enumerable:!0,get:function(){return Ht.timeoutWith}});var Xt=zg;Object.defineProperty(t,"timestamp",{enumerable:!0,get:function(){return Xt.timestamp}});var Zt=wv;Object.defineProperty(t,"toArray",{enumerable:!0,get:function(){return Zt.toArray}});var er=Dg;Object.defineProperty(t,"window",{enumerable:!0,get:function(){return er.window}});var tr=Jg;Object.defineProperty(t,"windowCount",{enumerable:!0,get:function(){return tr.windowCount}});var rr=$g;Object.defineProperty(t,"windowTime",{enumerable:!0,get:function(){return rr.windowTime}});var nr=ow;Object.defineProperty(t,"windowToggle",{enumerable:!0,get:function(){return nr.windowToggle}});var ir=hw;Object.defineProperty(t,"windowWhen",{enumerable:!0,get:function(){return ir.windowWhen}});var or=gw;Object.defineProperty(t,"withLatestFrom",{enumerable:!0,get:function(){return or.withLatestFrom}});var ar=jw;Object.defineProperty(t,"zipAll",{enumerable:!0,get:function(){return ar.zipAll}});var ur=kw;Object.defineProperty(t,"zipWith",{enumerable:!0,get:function(){return ur.zipWith}})}(zi),function(e){e.BadEventError=e.ObservableFiniteStateMachine=void 0;const t=Ci,r=zi,n=F;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=Ci;Object.defineProperty(e,"BadEventError",{enumerable:!0,get:function(){return o.BadEventError}})}(Ri);var Dw={SparseSet:void 0};class Lw{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}}Dw.SparseSet=Lw;var Uw={SparseMap:void 0};class Vw{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]}}}}Uw.SparseMap=Vw;var Ww={TypedSparseMap:void 0};const Jw=ei();class Gw{constructor(e){this.keyToIndex=[],this.indexToKey=[],(0,Jw.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)}}}Ww.TypedSparseMap=Gw;var Kw={TypedSparseSet:void 0};class Yw{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}}Kw.TypedSparseSet=Yw;var Qw={};Qw.computeNewCapacity=Qw.DynamicTypedArray=void 0;const $w=ei();class Hw{constructor(e,{capacity:t=0,growthFactor:r=1.5}={}){this.typedArrayConstructor=e,this._length=0,(0,$w.assert)(Number.isInteger(t),"capacity must be an integer"),(0,$w.assert)(t>=0,"capacity must be greater than or equal to 0"),(0,$w.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=Xw(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=Xw(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=Xw(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 Xw(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)}}Qw.DynamicTypedArray=Hw,Qw.computeNewCapacity=Xw;var Zw={},eO={};eO.SkipList=eO.SkipListNode=void 0;const tO=F;class rO{constructor(e){this.value=e,this.previous=null,this.next=null,this.up=null,this.down=null}}eO.SkipListNode=rO;eO.SkipList=class{constructor(e){this.compare=e,this.head=new rO(null),this.tail=new rO(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,tO.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,tO.isntNull)(this.findNode(e))}findNode(e){let t=this.head;for(;;){for(;t.next&&(0,tO.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,tO.isntNull)(t.next.value)&&0===this.compare(t.next.value,e))return;let r=new rO(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 rO(null),t=new rO(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 rO(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,tO.isntNull)(t.next.value);){if(this.compare(t.next.value,e)>=0)break;t=t.next}if(!t.down)return t;t=t.down}}},Zw.SortedSet=void 0;const nO=eO,iO=Cn();class oO{constructor(e){this.skipList=new nO.SkipList(e)}get[Symbol.toStringTag](){return this.constructor.name}[Symbol.iterator](){return this.values()}values(){return(0,iO.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)}}Zw.SortedSet=oO;var aO={BitSet:void 0};const uO=ei();class cO{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,uO.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}}aO.BitSet=cO;var sO={TypedBitSet:void 0};const lO=ei();class fO{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,lO.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}}sO.TypedBitSet=fO,function(t){var r=e&&e.__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]}),n=e&&e.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};t.DynamicTypedArray=void 0,n(ni,t),n(oi,t),n(ui,t),n(si,t),n(fi,t),n(vi,t),n(pi,t),n(gi,t),n(Si,t),n(Ei,t),n(Ci,t),n(Ri,t),n(Dw,t),n(Uw,t),n(Ww,t),n(Kw,t);var i=Qw;Object.defineProperty(t,"DynamicTypedArray",{enumerable:!0,get:function(){return i.DynamicTypedArray}}),n(Zw,t),n(aO,t),n(sO,t)}(ri);var dO={},vO={};!function(e){e.ExtraPromise=e.ExtraPromiseState=void 0;const t=ri;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}}}(vO);var hO={Deferred:void 0};hO.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 pO={MutableDeferred:void 0};const yO=hO,bO=Kn;pO.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 yO.Deferred;return Promise.resolve(e).catch(bO.pass),e}};var mO={ReusableDeferred:void 0};const gO=hO,wO=Kn;mO.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 gO.Deferred;return Promise.resolve(e).catch(wO.pass),e}};var OO={LazyPromise:void 0};OO.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 SO={},_O={};_O.ChannelClosedError=_O.SignalDiscarded=void 0;const xO=ei();class PO extends xO.CustomError{}_O.SignalDiscarded=PO;class AO extends xO.CustomError{}_O.ChannelClosedError=AO,function(e){e.SignalDiscarded=e.Signal=void 0;const t=hO,r=Kn,n=_O;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=_O;Object.defineProperty(e,"SignalDiscarded",{enumerable:!0,get:function(){return i.SignalDiscarded}})}(SO);var EO={SignalGroup:void 0};EO.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 jO={},TO=/\s/;var IO=function(e){for(var t=e.length;t--&&TO.test(e.charAt(t)););return t},kO=/^\s+/;var CO=Ce,FO=Ne;var NO=function(e){return e?e.slice(0,IO(e)+1).replace(kO,""):e},MO=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},RO=function(e){return"symbol"==typeof e||FO(e)&&"[object Symbol]"==CO(e)},zO=/^[-+]0x[0-9a-f]+$/i,BO=/^0b[01]+$/i,qO=/^0o[0-7]+$/i,DO=parseInt;var LO=function(e){if("number"==typeof e)return e;if(RO(e))return NaN;if(MO(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=MO(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=NO(e);var r=BO.test(e);return r||qO.test(e)?DO(e.slice(2),r?2:8):zO.test(e)?NaN:+e};var UO=function(e){return e?Infinity===(e=LO(e))||-Infinity===e?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0};var VO=function(e){var t=UO(e),r=t%1;return t==t?r?t-r:t:0};var WO=function(e,t){var r;if("function"!=typeof t)throw new TypeError("Expected a function");return e=VO(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=void 0),r}};var JO=function(e){return WO(2,e)},GO=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};jO.Semaphore=void 0;const KO=SO,YO=EO,QO=a,$O=GO(JO);jO.Semaphore=class{constructor(e){this.count=e,this.locked=0,this.awaitings=new YO.SignalGroup}acquire(...e){if(0===e.length)return new Promise((async e=>{await this.lock(),e((0,$O.default)((()=>this.unlock())))}));{const[t]=e;return(0,QO.go)((async()=>{await this.lock();try{return await t()}finally{this.unlock()}}))}}async lock(){for(;this.isLocked();){const e=new KO.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 HO={Mutex:void 0};const XO=jO;class ZO extends XO.Semaphore{constructor(){super(1)}}HO.Mutex=ZO;var eS={DebounceMicrotask:void 0};eS.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 tS={},rS={},nS={};nS.getErrorResult=void 0,nS.getErrorResult=function(e){try{return[void 0,e()]}catch(e){return[e,void 0]}};var iS={};iS.getErrorResultAsync=void 0,iS.getErrorResultAsync=async function(e){try{return[void 0,await e()]}catch(e){return[e,void 0]}};var oS={};oS.getErrorResultPromise=void 0,oS.getErrorResultPromise=async function(e){try{return[void 0,await e]}catch(e){return[e,void 0]}};var aS={};aS.getResultError=void 0,aS.getResultError=function(e){try{return[e(),void 0]}catch(e){return[void 0,e]}};var uS={};uS.getResultErrorAsync=void 0,uS.getResultErrorAsync=async function(e){try{return[await e(),void 0]}catch(e){return[void 0,e]}};var cS={};cS.getResultErrorPromise=void 0,cS.getResultErrorPromise=async function(e){try{return[await e,void 0]}catch(e){return[void 0,e]}};var sS={};sS.getSuccess=void 0,sS.getSuccess=function(e){try{return[!0,e()]}catch(e){return[!1,void 0]}};var lS={};lS.getSuccessAsync=void 0,lS.getSuccessAsync=async function(e){try{return[!0,await e()]}catch(e){return[!1,void 0]}};var fS={};fS.getSuccessPromise=void 0,fS.getSuccessPromise=async function(e){try{return[!0,await e]}catch(e){return[!1,void 0]}};var dS={};dS.getFailure=void 0,dS.getFailure=function(e){try{return e(),[!1,void 0]}catch(e){return[!0,e]}};var vS={};vS.getFailureAsync=void 0,vS.getFailureAsync=async function(e){try{return await e(),[!1,void 0]}catch(e){return[!0,e]}};var hS={};hS.getFailurePromise=void 0,hS.getFailurePromise=async function(e){try{return await e,[!1,void 0]}catch(e){return[!0,e]}};var pS={};pS.isSuccess=void 0,pS.isSuccess=function(e){try{return e(),!0}catch(e){return!1}};var yS={};yS.isSuccessAsync=void 0,yS.isSuccessAsync=async function(e){try{return await e(),!0}catch(e){return!1}};var bS={};bS.isSuccessPromise=void 0,bS.isSuccessPromise=async function(e){try{return await e,!0}catch(e){return!1}};var mS={};mS.isFailure=void 0,mS.isFailure=function(e){try{return e(),!1}catch(e){return!0}};var gS={};gS.isFailureAsync=void 0,gS.isFailureAsync=async function(e){try{return await e(),!1}catch(e){return!0}};var wS={};wS.isFailurePromise=void 0,wS.isFailurePromise=async function(e){try{return await e,!1}catch(e){return!0}};var OS={};OS.getResult=void 0,OS.getResult=function(e){try{return e()}catch(e){return}};var SS={};SS.getResultAsync=void 0,SS.getResultAsync=async function(e){try{return await e()}catch(e){return}};var _S={};_S.getResultPromise=void 0,_S.getResultPromise=async function(e){try{return await e}catch(e){return}};var xS={};xS.getError=void 0,xS.getError=function(e){try{e()}catch(e){return e}};var PS={};PS.getErrorAsync=void 0,PS.getErrorAsync=async function(e){try{await e()}catch(e){return e}};var AS={};AS.getErrorPromise=void 0,AS.getErrorPromise=async function(e){try{await e}catch(e){return e}};var ES={},jS={},TS={},IS={};IS.log=void 0,IS.log=function(...e){return console.log(...e),e[e.length-1]};var kS={},CS={};CS.elapsed=CS.now=void 0,CS.now=function(){return performance.now()},CS.elapsed=function(e,t){return t-e+"ms"},kS.time=void 0;const FS=CS,NS=F;kS.time=function(e,t){const r=(0,FS.now)(),n=t();if((0,NS.isPromiseLike)(n))return n.then((()=>{const t=(0,FS.now)();return console.log(e,(0,FS.elapsed)(r,t)),n}));{const t=(0,FS.now)();return console.log(e,(0,FS.elapsed)(r,t)),n}};var MS={timeFunction:void 0};const RS=CS;MS.timeFunction=function(e,t){return function(...r){const n=(0,RS.now)(),i=t(...r),o=(0,RS.now)();return console.log(e,(0,RS.elapsed)(n,o)),i}};var zS={timeAsyncFunction:void 0};const BS=CS;zS.timeAsyncFunction=function(e,t){return async function(...r){const n=(0,BS.now)(),i=await t(...r),o=(0,BS.now)();return console.log(e,(0,BS.elapsed)(n,o)),i}},function(t){var r=e&&e.__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]}),n=e&&e.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};n(IS,t),n(kS,t),n(MS,t),n(zS,t)}(TS);var qS={},DS={};DS.lazy=void 0,DS.lazy=function(e){let t,r=!1;return function(){return r||(t=e(),r=!0),t}};var LS={lazyFunction:void 0};const US=DS;LS.lazyFunction=function(e){const t=(0,US.lazy)(e);return(...e)=>t()(...e)};var VS={lazyAsyncFunction:void 0};const WS=DS;VS.lazyAsyncFunction=function(e){const t=(0,WS.lazy)(e);return async(...e)=>(await t())(...e)};var JS={};JS.lazyStatic=JS.withLazyStatic=void 0;const GS=[];JS.withLazyStatic=function(e){const t=[];return(...r)=>{GS.push({cache:t,index:0});try{return e(...r)}finally{GS.pop()}}},JS.lazyStatic=function(e,t=[]){if(GS.length){const n=GS[GS.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(t){var r=e&&e.__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]}),n=e&&e.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};n(DS,t),n(LS,t),n(VS,t),n(JS,t)}(qS),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=ei();Object.defineProperty(e,"assert",{enumerable:!0,get:function(){return t.assert}});var r=a;Object.defineProperty(e,"go",{enumerable:!0,get:function(){return r.go}});var n=TS;Object.defineProperty(e,"log",{enumerable:!0,get:function(){return n.log}});var i=qS;Object.defineProperty(e,"lazy",{enumerable:!0,get:function(){return i.lazy}});var o=Kn;Object.defineProperty(e,"pass",{enumerable:!0,get:function(){return o.pass}});var u=Cn();Object.defineProperty(e,"toArray",{enumerable:!0,get:function(){return u.toArray}}),Object.defineProperty(e,"toArrayAsync",{enumerable:!0,get:function(){return u.toArrayAsync}});var c=F;Object.defineProperty(e,"isArray",{enumerable:!0,get:function(){return c.isArray}}),Object.defineProperty(e,"isAsyncIterable",{enumerable:!0,get:function(){return c.isAsyncIterable}}),Object.defineProperty(e,"isBigInt",{enumerable:!0,get:function(){return c.isBigInt}}),Object.defineProperty(e,"isBoolean",{enumerable:!0,get:function(){return c.isBoolean}}),Object.defineProperty(e,"isChar",{enumerable:!0,get:function(){return c.isChar}}),Object.defineProperty(e,"isDate",{enumerable:!0,get:function(){return c.isDate}}),Object.defineProperty(e,"isEmptyArray",{enumerable:!0,get:function(){return c.isEmptyArray}}),Object.defineProperty(e,"isEmptyObject",{enumerable:!0,get:function(){return c.isEmptyObject}}),Object.defineProperty(e,"isError",{enumerable:!0,get:function(){return c.isError}}),Object.defineProperty(e,"isFalsy",{enumerable:!0,get:function(){return c.isFalsy}}),Object.defineProperty(e,"isFunction",{enumerable:!0,get:function(){return c.isFunction}}),Object.defineProperty(e,"isIterable",{enumerable:!0,get:function(){return c.isIterable}}),Object.defineProperty(e,"isJson",{enumerable:!0,get:function(){return c.isJson}}),Object.defineProperty(e,"isNull",{enumerable:!0,get:function(){return c.isNull}}),Object.defineProperty(e,"isNumber",{enumerable:!0,get:function(){return c.isNumber}}),Object.defineProperty(e,"isFinite",{enumerable:!0,get:function(){return c.isFinite}}),Object.defineProperty(e,"isPositiveInfinity",{enumerable:!0,get:function(){return c.isPositiveInfinity}}),Object.defineProperty(e,"isNegativeInfinity",{enumerable:!0,get:function(){return c.isNegativeInfinity}}),Object.defineProperty(e,"isNaN",{enumerable:!0,get:function(){return c.isNaN}}),Object.defineProperty(e,"isntNaN",{enumerable:!0,get:function(){return c.isntNaN}}),Object.defineProperty(e,"isObject",{enumerable:!0,get:function(){return c.isObject}}),Object.defineProperty(e,"isPlainObject",{enumerable:!0,get:function(){return c.isPlainObject}}),Object.defineProperty(e,"isPromise",{enumerable:!0,get:function(){return c.isPromise}}),Object.defineProperty(e,"isPromiseLike",{enumerable:!0,get:function(){return c.isPromiseLike}}),Object.defineProperty(e,"isString",{enumerable:!0,get:function(){return c.isString}}),Object.defineProperty(e,"isUndefined",{enumerable:!0,get:function(){return c.isUndefined}}),Object.defineProperty(e,"isRegExp",{enumerable:!0,get:function(){return c.isRegExp}}),Object.defineProperty(e,"isSymbol",{enumerable:!0,get:function(){return c.isSymbol}}),Object.defineProperty(e,"isntArray",{enumerable:!0,get:function(){return c.isntArray}}),Object.defineProperty(e,"isntAsyncIterable",{enumerable:!0,get:function(){return c.isntAsyncIterable}}),Object.defineProperty(e,"isntBigInt",{enumerable:!0,get:function(){return c.isntBigInt}}),Object.defineProperty(e,"isntBoolean",{enumerable:!0,get:function(){return c.isntBoolean}}),Object.defineProperty(e,"isntChar",{enumerable:!0,get:function(){return c.isntChar}}),Object.defineProperty(e,"isntDate",{enumerable:!0,get:function(){return c.isntDate}}),Object.defineProperty(e,"isntEmptyArray",{enumerable:!0,get:function(){return c.isntEmptyArray}}),Object.defineProperty(e,"isntEmptyObject",{enumerable:!0,get:function(){return c.isntEmptyObject}}),Object.defineProperty(e,"isntError",{enumerable:!0,get:function(){return c.isntError}}),Object.defineProperty(e,"isntFalsy",{enumerable:!0,get:function(){return c.isntFalsy}}),Object.defineProperty(e,"isntFunction",{enumerable:!0,get:function(){return c.isntFunction}}),Object.defineProperty(e,"isntIterable",{enumerable:!0,get:function(){return c.isntIterable}}),Object.defineProperty(e,"isntJson",{enumerable:!0,get:function(){return c.isntJson}}),Object.defineProperty(e,"isntNull",{enumerable:!0,get:function(){return c.isntNull}}),Object.defineProperty(e,"isntNumber",{enumerable:!0,get:function(){return c.isntNumber}}),Object.defineProperty(e,"isntObject",{enumerable:!0,get:function(){return c.isntObject}}),Object.defineProperty(e,"isntPlainObject",{enumerable:!0,get:function(){return c.isntPlainObject}}),Object.defineProperty(e,"isntPromise",{enumerable:!0,get:function(){return c.isntPromise}}),Object.defineProperty(e,"isntPromiseLike",{enumerable:!0,get:function(){return c.isntPromiseLike}}),Object.defineProperty(e,"isntString",{enumerable:!0,get:function(){return c.isntString}}),Object.defineProperty(e,"isntUndefined",{enumerable:!0,get:function(){return c.isntUndefined}}),Object.defineProperty(e,"isntRegExp",{enumerable:!0,get:function(){return c.isntRegExp}}),Object.defineProperty(e,"isntSymbol",{enumerable:!0,get:function(){return c.isntSymbol}})}(jS),ES.getErrorAsyncIterable=void 0;const KS=jS;ES.getErrorAsyncIterable=async function(e){try{for await(const t of e)(0,KS.pass)()}catch(e){return e}};var YS,QS,$S={},HS={};function XS(){if(YS)return HS;YS=1,HS.Option=void 0;const e=ZS();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 HS.Option=r,HS}function ZS(){if(QS)return $S;QS=1,$S.Result=void 0;const e=XS();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 $S.Result=r,$S}var e_={toResult:void 0};const t_=ZS();e_.toResult=function(e){try{const t=e();return t_.Result.Ok(t)}catch(e){return t_.Result.Err(e)}};var r_={toResultAsync:void 0};const n_=ZS();r_.toResultAsync=async function(e){try{const t=await e();return n_.Result.Ok(t)}catch(e){return n_.Result.Err(e)}};var i_={toResultPromise:void 0};const o_=ZS();i_.toResultPromise=async function(e){try{const t=await e;return o_.Result.Ok(t)}catch(e){return o_.Result.Err(e)}};var a_={toOption:void 0};const u_=XS();a_.toOption=function(e){try{const t=e();return u_.Option.Some(t)}catch(e){return u_.Option.None()}};var c_={toOptionAsync:void 0};const s_=XS();c_.toOptionAsync=async function(e){try{const t=await e();return s_.Option.Some(t)}catch(e){return s_.Option.None()}};var l_={toOptionPromise:void 0};const f_=XS();l_.toOptionPromise=async function(e){try{const t=await e;return f_.Option.Some(t)}catch(e){return f_.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=nS;Object.defineProperty(e,"getErrorResult",{enumerable:!0,get:function(){return t.getErrorResult}});var r=iS;Object.defineProperty(e,"getErrorResultAsync",{enumerable:!0,get:function(){return r.getErrorResultAsync}});var n=oS;Object.defineProperty(e,"getErrorResultPromise",{enumerable:!0,get:function(){return n.getErrorResultPromise}});var i=aS;Object.defineProperty(e,"getResultError",{enumerable:!0,get:function(){return i.getResultError}});var o=uS;Object.defineProperty(e,"getResultErrorAsync",{enumerable:!0,get:function(){return o.getResultErrorAsync}});var a=cS;Object.defineProperty(e,"getResultErrorPromise",{enumerable:!0,get:function(){return a.getResultErrorPromise}});var u=sS;Object.defineProperty(e,"getSuccess",{enumerable:!0,get:function(){return u.getSuccess}});var c=lS;Object.defineProperty(e,"getSuccessAsync",{enumerable:!0,get:function(){return c.getSuccessAsync}});var s=fS;Object.defineProperty(e,"getSuccessPromise",{enumerable:!0,get:function(){return s.getSuccessPromise}});var l=dS;Object.defineProperty(e,"getFailure",{enumerable:!0,get:function(){return l.getFailure}});var f=vS;Object.defineProperty(e,"getFailureAsync",{enumerable:!0,get:function(){return f.getFailureAsync}});var d=hS;Object.defineProperty(e,"getFailurePromise",{enumerable:!0,get:function(){return d.getFailurePromise}});var v=pS;Object.defineProperty(e,"isSuccess",{enumerable:!0,get:function(){return v.isSuccess}});var h=yS;Object.defineProperty(e,"isSuccessAsync",{enumerable:!0,get:function(){return h.isSuccessAsync}});var p=bS;Object.defineProperty(e,"isSuccessPromise",{enumerable:!0,get:function(){return p.isSuccessPromise}});var y=mS;Object.defineProperty(e,"isFailure",{enumerable:!0,get:function(){return y.isFailure}});var b=gS;Object.defineProperty(e,"isFailureAsync",{enumerable:!0,get:function(){return b.isFailureAsync}});var m=wS;Object.defineProperty(e,"isFailurePromise",{enumerable:!0,get:function(){return m.isFailurePromise}});var g=OS;Object.defineProperty(e,"getResult",{enumerable:!0,get:function(){return g.getResult}});var w=SS;Object.defineProperty(e,"getResultAsync",{enumerable:!0,get:function(){return w.getResultAsync}});var O=_S;Object.defineProperty(e,"getResultPromise",{enumerable:!0,get:function(){return O.getResultPromise}});var S=xS;Object.defineProperty(e,"getError",{enumerable:!0,get:function(){return S.getError}});var _=PS;Object.defineProperty(e,"getErrorAsync",{enumerable:!0,get:function(){return _.getErrorAsync}});var x=AS;Object.defineProperty(e,"getErrorPromise",{enumerable:!0,get:function(){return x.getErrorPromise}});var P=ES;Object.defineProperty(e,"getErrorAsyncIterable",{enumerable:!0,get:function(){return P.getErrorAsyncIterable}});var A=ZS();Object.defineProperty(e,"Result",{enumerable:!0,get:function(){return A.Result}});var E=e_;Object.defineProperty(e,"toResult",{enumerable:!0,get:function(){return E.toResult}});var j=r_;Object.defineProperty(e,"toResultAsync",{enumerable:!0,get:function(){return j.toResultAsync}});var T=i_;Object.defineProperty(e,"toResultPromise",{enumerable:!0,get:function(){return T.toResultPromise}});var I=XS();Object.defineProperty(e,"Option",{enumerable:!0,get:function(){return I.Option}});var k=a_;Object.defineProperty(e,"toOption",{enumerable:!0,get:function(){return k.toOption}});var C=c_;Object.defineProperty(e,"toOptionAsync",{enumerable:!0,get:function(){return C.toOptionAsync}});var F=l_;Object.defineProperty(e,"toOptionPromise",{enumerable:!0,get:function(){return F.toOptionPromise}})}(rS),function(e){e.ChannelClosedError=e.Channel=void 0;const t=rS,r=SO,n=EO,i=_O,o=HO,a=ri;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 a.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 u=_O;Object.defineProperty(e,"ChannelClosedError",{enumerable:!0,get:function(){return u.ChannelClosedError}})}(tS);var d_={};!function(e){e.ChannelClosedError=e.BufferedChannel=void 0;const t=rS,r=SO,n=EO,i=ri,o=_O;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 a=_O;Object.defineProperty(e,"ChannelClosedError",{enumerable:!0,get:function(){return a.ChannelClosedError}})}(d_);var v_={};!function(e){e.ChannelClosedError=e.UnlimitedChannel=void 0;const t=rS,r=SO,n=EO,i=ri,o=_O;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 a=_O;Object.defineProperty(e,"ChannelClosedError",{enumerable:!0,get:function(){return a.ChannelClosedError}})}(v_);var h_={},p_={validateConcurrency:void 0};const y_=ei();p_.validateConcurrency=function(e,t){(0,y_.assert)(t===1/0||Number.isInteger(t),`The parameter ${e} must be an integer`),(0,y_.assert)(t>=1,`The parameter ${e} must be greater than or equal to 1`)},h_.TaskRunner=void 0;const b_=hO,m_=eS,g_=ri,w_=p_;h_.TaskRunner=class{constructor(e=1/0){this.concurrency=e,this.fsm=new g_.FiniteStateMachine({running:{stop:"stopped"},stopped:{start:"running"}},"stopped"),this.queue=new g_.Queue,this.pending=0,this.debounceMicrotask=new m_.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,w_.validateConcurrency)("concurrency",e),this.concurrency=e}async add(e){const t=new b_.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 O_={},S_={},__={},x_={parallel:void 0};const P_=p_;x_.parallel=function(e,t=1/0){return(0,P_.validateConcurrency)("concurrency",t),new Promise(((r,n)=>{let i=0,o=!0;const a=e[Symbol.iterator]();let u;for(let e=0;!u&&e<t;e++)c();async function c(){if(!o)return;if(u&&0===i)return s();let e;try{({value:e,done:u}=a.next())}catch(e){return l(e)}if(u)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,u||null===(e=a.return)||void 0===e||e.call(a),r()}function l(e){var t;o=!1,u||null===(t=a.return)||void 0===t||t.call(a),n(e)}}))},__.each=void 0;const A_=x_,E_=p_,j_=Cn(),T_=a;__.each=function(e,t,r=1/0){return(0,E_.validateConcurrency)("concurrency",r),(0,T_.go)((async()=>{const n=(0,j_.map)(e,((e,r)=>()=>t(e,r)));return await(0,A_.parallel)(n,r)}))},S_.map=void 0;const I_=__,k_=p_,C_=a;S_.map=function(e,t,r=1/0){return(0,k_.validateConcurrency)("concurrency",r),(0,C_.go)((async()=>{const n=[];return await(0,I_.each)(e,(async(e,r)=>{n[r]=await t(e,r)}),r),n}))};var F_=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},N_=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};O_.all=void 0;const M_=S_,R_=a,z_=N_(F_);O_.all=function(e){return(0,R_.go)((async()=>{const t=Object.entries(e),r=await(0,M_.map)(t,(async([e,t])=>[e,await t]));return(0,z_.default)(r)}))};var B_={};B_.asyncify=void 0,B_.asyncify=function(e){return async function(...t){return Reflect.apply(e,this,await Promise.all(t))}};var q_={callbackify:void 0};const D_=a;q_.callbackify=function(e){return function(...t){const r=t.slice(0,-1),n=t[t.length-1];(0,D_.go)((async()=>{try{const t=await Reflect.apply(e,this,r);n(null,t)}catch(e){n(e)}}))}};var L_={};L_.delay=void 0,L_.delay=function(e){return new Promise((t=>setTimeout(t,e)))};var U_={},V_={parallelAsync:void 0};const W_=p_,J_=ei();V_.parallelAsync=function(e,t){return(0,W_.validateConcurrency)("concurrency",t),(0,J_.assert)(Number.isFinite(t),"concurrency must be finite number"),new Promise(((r,n)=>{let i=0,o=!0;const a=e[Symbol.asyncIterator]();let u;for(let e=0;!u&&e<t;e++)c();async function c(){if(!o)return;if(u&&0===i)return s();let e;try{({value:e,done:u}=await a.next())}catch(e){return l(e)}if(u)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,u||null===(e=a.return)||void 0===e||e.call(a),r()}function l(e){var t;o=!1,u||null===(t=a.return)||void 0===t||t.call(a),n(e)}}))},U_.eachAsync=void 0;const G_=V_,K_=p_,Y_=Cn(),Q_=a,$_=ei();U_.eachAsync=function(e,t,r){return(0,K_.validateConcurrency)("concurrency",r),(0,$_.assert)(Number.isFinite(r),"concurrency must be finite number"),(0,Q_.go)((async()=>{const n=(0,Y_.mapAsync)(e,((e,r)=>()=>t(e,r)));return await(0,G_.parallelAsync)(n,r)}))};var H_={filter:void 0};const X_=__,Z_=p_,ex=a;H_.filter=function(e,t,r=1/0){return(0,Z_.validateConcurrency)("concurrency",r),(0,ex.go)((async()=>{const n=[];return await(0,X_.each)(e,(async(e,r)=>{await t(e,r)&&(n[r]=e)}),r),Object.values(n)}))};var tx={filterAsync:void 0};const rx=U_,nx=p_,ix=a;tx.filterAsync=function(e,t,r){return(0,nx.validateConcurrency)("concurrency",r),(0,ix.go)((async()=>{const n=[];return await(0,rx.eachAsync)(e,(async(e,r)=>{await t(e,r)&&(n[r]=e)}),r),Object.values(n)}))};var ox={mapAsync:void 0};const ax=U_,ux=p_,cx=a,sx=ei();ox.mapAsync=function(e,t,r){return(0,ux.validateConcurrency)("concurrency",r),(0,sx.assert)(Number.isFinite(r),"concurrency must be finite number"),(0,cx.go)((async()=>{const n=[];return await(0,ax.eachAsync)(e,(async(e,r)=>{n[r]=await t(e,r)}),r),n}))};var lx={};lx.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 fx={series:void 0};const dx=F;fx.series=async function(e){if((0,dx.isIterable)(e))for(const t of e)await t();else for await(const t of e)await t()};var vx={};vx.TimeoutError=vx.timeout=void 0;const hx=ei();vx.timeout=function(e){return new Promise(((t,r)=>{setTimeout((()=>r(new px)),e)}))};class px extends hx.CustomError{}vx.TimeoutError=px;var yx={};yx.waterfall=void 0,yx.waterfall=async function(e){let t;for await(const r of e)t=await r(t);return t};var bx={pad:void 0};const mx=L_,gx=rS;bx.pad=async function(e,t){const r=Date.now(),[n,i]=await(0,gx.getErrorResultAsync)((async()=>t()));if(n)throw n;return Date.now()-r<e&&await(0,mx.delay)(e),i};var wx={toExtraPromise:void 0};const Ox=vO;wx.toExtraPromise=function(e){return new Ox.ExtraPromise((async(t,r)=>{try{t(await e)}catch(e){r(e)}}))};var Sx={},_x={},xx={};xx.of=void 0,xx.of=function*(e){yield e};var Px={repeat:void 0};const Ax=ei(),Ex=a;Px.repeat=function(e,t=1/0){return(0,Ax.assert)(t===1/0||Number.isInteger(t),"The parameter times must be an integer"),(0,Ex.go)((function*(){for(;t-- >0;)yield e}))};var jx={};jx.countdown=void 0,jx.countdown=function*(e,t){if(!(e<t))for(let r=e;r>=t;r--)yield r};var Tx={};Tx.countup=void 0,Tx.countup=function*(e,t){if(!(e>t))for(let r=e;r<=t;r++)yield r};var Ix={range:void 0};const kx=ei();Ix.range=function(e,t,r=1){return(0,kx.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 Cx={};Cx.stringifyJSONStream=void 0,Cx.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 Fx={};Fx.stringifyJSONStreamAsync=void 0,Fx.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 Nx={};Nx.stringifyNDJSONStream=void 0,Nx.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 Mx={};Mx.stringifyNDJSONStreamAsync=void 0,Mx.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 Rx={};Rx.sse=void 0,Rx.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 zx={ReusableIterable:void 0};const Bx=qS;class qx{constructor(e){this.getIterator=(0,Bx.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}}}}}zx.ReusableIterable=qx;var Dx={ReusableAsyncIterable:void 0};const Lx=qS;class Ux{constructor(e){this.getIterator=(0,Lx.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}}}}}Dx.ReusableAsyncIterable=Ux;var Vx={};Vx.timestampBasedId=void 0,Vx.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(t){var r=e&&e.__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]}),n=e&&e.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};n(xx,t),n(Px,t),n(jx,t),n(Tx,t),n(Ix,t),n(Cx,t),n(Fx,t),n(Nx,t),n(Mx,t),n(Rx,t),n(zx,t),n(Dx,t),n(Vx,t)}(_x),Sx.spawn=void 0;const Wx=__,Jx=_x;Sx.spawn=async function(e,t){await(0,Wx.each)((0,Jx.countup)(1,e),(e=>t(e)))};var Gx={queueConcurrency:void 0};const Kx=h_;Gx.queueConcurrency=function(e,t){const r=new Kx.TaskRunner(e);return r.start(),async function(...e){return await r.add((()=>t.apply(this,e)))}};var Yx={throttleConcurrency:void 0};const Qx=p_;Yx.throttleConcurrency=function(e,t){(0,Qx.validateConcurrency)("concurrency",e);let r=0;return function(...n){if(r<e)return r++,Promise.resolve(t.apply(this,n)).finally((()=>r--))}};var $x={};$x.throttleUntilDone=void 0,$x.throttleUntilDone=function(e){let t;return function(){return t||(t=Promise.resolve(e.apply(this)).finally((()=>t=void 0))),t}};var Hx={},Xx=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Hx.reusePendingPromise=void 0;const Zx=Xx((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,a;if(Array.isArray(t)){for(a="[",r=0;r<t.length;r++)r&&(a+=","),a+=e(t[r])||"null";return a+"]"}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 u=o.push(t)-1,c=Object.keys(t).sort(i&&i(t));for(a="",r=0;r<c.length;r++){var s=c[r],l=e(t[s]);l&&(a&&(a+=","),a+=JSON.stringify(s)+":"+l)}return o.splice(u,1),"{"+a+"}"}}(e)})),eP=ri;Hx.reusePendingPromise=function(e,t){const r=new eP.HashMap((e=>(0,Zx.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(t){var r=e&&e.__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]}),n=e&&e.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};n(vO,t),n(hO,t),n(pO,t),n(mO,t),n(OO,t),n(SO,t),n(EO,t),n(jO,t),n(HO,t),n(eS,t),n(tS,t),n(d_,t),n(v_,t),n(h_,t),n(O_,t),n(B_,t),n(q_,t),n(L_,t),n(__,t),n(U_,t),n(H_,t),n(tx,t),n(S_,t),n(ox,t),n(x_,t),n(V_,t),n(lx,t),n(fx,t),n(vx,t),n(yx,t),n(bx,t),n(wx,t),n(Sx,t),n(Gx,t),n(Yx,t),n($x,t),n(Hx,t)}(dO);var tP=Cn(),rP=function(e,t){return(rP=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,t)};function nP(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}rP(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function iP(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 oP(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.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 a}function aP(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))}function uP(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,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=iP(o),u=a.next();!u.done;u=a.next()){u.value.remove(this)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}else o.remove(this);var c=this.initialTeardown;if(uP(c))try{c()}catch(e){i=e instanceof sP?e.errors:[e]}var s=this._finalizers;if(s){this._finalizers=null;try{for(var l=iP(s),f=l.next();!f.done;f=l.next()){var d=f.value;try{hP(d)}catch(e){i=null!=i?i:[],e instanceof sP?i=aP(aP([],oP(i)),oP(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 sP(i)}},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&&uP(e.remove)&&uP(e.add)&&uP(e.unsubscribe)}function hP(e){uP(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,aP([e,t],oP(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 nP(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,a=e.call(this)||this;uP(t)||!t?i={next:null!=t?t:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:a&&pP.useDeprecatedNextContext?((o=Object.create(t)).unsubscribe=function(){return a.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 a.destination=new SP(i),a}return nP(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&&uP(e.next)&&uP(e.error)&&uP(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 uP(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,a){var u=e.call(this,t)||this;return u.onFinalize=o,u.shouldUnsubscribe=a,u._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:e.prototype._next,u._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,u._complete=n?function(){try{n()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,u}return nP(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}nP(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,aP([],oP(e)))},cancelAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return cancelAnimationFrame.apply(void 0,aP([],oP(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 a=r.now();e.next({timestamp:MP?a:o,elapsed:a-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 nP(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 i=iP(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;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 nP(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}nP(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}nP(t,e),t.prototype.next=function(t){var r=this,n=r.isStopped,i=r._buffer,o=r._infiniteTimeWindow,a=r._timestampProvider,u=r._windowTime;n||(i.push(t),!o&&i.push(a.now()+u)),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 a=r.now(),u=0,c=1;c<n.length&&n[c]<=a;c+=2)u=c;u&&n.splice(0,u+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}nP(t,e),t.prototype._checkFinalizedStatuses=function(e){var t=this,r=t.hasError,n=t._hasValue,i=t._value,o=t.thrownError,a=t.isStopped,u=t._isComplete;r?e.error(o):(a||u)&&(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 nP(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,aP([e,t],oP(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 nP(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,aP([],oP(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 nP(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 nP(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 nP(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 nP(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 nP(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 nP(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 nP(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=aA),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}nP(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,aA=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 nP(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 uA,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"}(uA||(uA={}));const fA={[uA.Creating]:{created:uA.Idle},[uA.Idle]:{use:uA.Using,destroy:uA.Destroying},[uA.Using]:{used:uA.Idle},[uA.Destroying]:{destroyed:uA.Destroyed},[uA.Destroyed]:{}};class dA{constructor(e,t){this.destroyValue=t,this._value=new dO.Deferred,this.fsm=new ri.ObservableFiniteStateMachine(fA,uA.Creating),jS.go((async()=>{try{const t=await e();this._value.resolve(t),this.fsm.send("created")}catch(e){this._value.reject(e)}}))}async waitForCreated(){await this._value}getState(){return this.fsm.state}async use(e){this.fsm.send("use");const t=await this._value;try{return await e(t)}finally{this.fsm.send("used")}}async destroy(){var e;(this.fsm.matches(uA.Creating)||this.fsm.matches(uA.Using))&&await sA(this.fsm.observeStateChanges().pipe(lA((e=>e.newState===uA.Idle)))),this.fsm.matches(uA.Idle)?(this.fsm.send("destroy"),await(null===(e=this.destroyValue)||void 0===e?void 0:e.call(this,await this._value)),this.fsm.send("destroyed")):this.fsm.matches(uA.Destroying)&&await sA(this.fsm.observeStateChanges().pipe(lA((e=>e.newState===uA.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{constructor(e){var t,r,n;this.fsm=new ri.FiniteStateMachine(hA,vA.Running),this.items=new Set,this.userDeferredQueue=new ri.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}async use(e){const t=this,r=tP.find(this.items,(e=>!e.using));if(r)return await n(r);if(this.items.size<this.maxInstances){const e={instance:new dA(this.createValue,this.destroyValue),using:!0};return this.items.add(e),await n(e)}{const e=new dO.Deferred;this.userDeferredQueue.enqueue(e);const t=await e;return await n(t)}async function n(r){r.using=!0,r.cancelDeletion&&(r.cancelDeletion(),delete r.cancelDeletion),await r.instance.waitForCreated();try{return await 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=l.setTimeout(t.idleTimeout,n):await n()))}async function n(){t.items.delete(r),await r.instance.destroy()}}}async destroy(){this.fsm.send("destroy");for(const e of this.items)await e.instance.destroy();let e;for(this.items.clear();e=this.userDeferredQueue.dequeue();)e.reject(new yA);this.fsm.send("destroyed")}}class yA extends ti.CustomError{}export{pA as Pool,yA as UnavailablePool};
2
+ //# sourceMappingURL=index.min.mjs.map