extra-pool 0.1.0 → 0.1.2

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