@blackglory/structures 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Structures={})}(this,(function(t){"use strict";function e(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)}function n(t,e,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(t,n):o?o.value=n:e.set(t,n),n}var r,o,i,a,s;r=new WeakMap;class c{constructor(){o.set(this,new Map)}get[(o=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}on(t,n){e(this,o,"f").has(t)||e(this,o,"f").set(t,new Set);e(this,o,"f").get(t).add(n)}off(t,n){if(!e(this,o,"f").has(t))return;const r=e(this,o,"f").get(t);r.delete(n),0===r.size&&e(this,o,"f").delete(t)}emit(t,n){if(!e(this,o,"f").has(t))return;e(this,o,"f").get(t).forEach((t=>t(n)))}}class u{constructor(t){this.hash=t,i.set(this,new Map)}get[(i=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return e(this,i,"f").size}set(t,n){return e(this,i,"f").set(this.hash(t),n),this}has(t){return e(this,i,"f").has(this.hash(t))}get(t){return e(this,i,"f").get(this.hash(t))}delete(t){return e(this,i,"f").delete(this.hash(t))}clear(){e(this,i,"f").clear()}}class l{constructor(t){this.hash=t,a.set(this,new Map)}get[(a=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return e(this,a,"f").size}[Symbol.iterator](){return e(this,a,"f").values()}add(t){return e(this,a,"f").set(this.hash(t),t),this}delete(t){return e(this,a,"f").delete(this.hash(t))}has(t){return e(this,a,"f").has(this.hash(t))}clear(){e(this,a,"f").clear()}values(){return e(this,a,"f").values()}}class f{constructor(){s.set(this,[])}get[(s=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return e(this,s,"f").length}empty(){e(this,s,"f").length=0}enqueue(...t){e(this,s,"f").push(...t)}dequeue(){return e(this,s,"f").shift()}remove(t){let n;for(;(n=e(this,s,"f").indexOf(t))>=0;)e(this,s,"f").splice(n,1)}}var d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},y={},h={},v={},p={},m={},b={},g={};g.go=void 0,g.go=function(t){return t()},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]});(d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)})(g,t)}(b);var w={},A={},S={},I={},_={},x={},T={CustomError:void 0};class E extends Error{get name(){return this.constructor.name}}T.CustomError=E;var O={ExpectedError:void 0};const j=T;class k extends j.CustomError{}O.ExpectedError=k;var N={AssertionError:void 0};const B=T;class P extends B.CustomError{}N.AssertionError=P;var M={};M.normalize=void 0,M.normalize=function(t){var e;return{name:t.name,message:t.message,stack:null!==(e=t.stack)&&void 0!==e?e:null}};var q={refute:void 0};const C=O;q.refute=function(t,e){if(t)throw new C.ExpectedError(e)};var z={assert:void 0};const R=N;z.assert=function(t,e){if(!t)throw new R.AssertionError(e)},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(T,t),n(O,t),n(N,t),n(M,t),n(q,t),n(z,t)}(x),_.chunkAsync=void 0;const U=b,D=x;_.chunkAsync=function(t,e){return(0,D.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,D.assert)(e>0,"The parameter size must be greater than 0"),(0,U.go)((async function*(){let n=[];for await(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var F={},J={},W={};function L(t){return Array.isArray(t)}W.isntEmptyArray=W.isEmptyArray=W.isntArray=W.isArray=void 0,W.isArray=L,W.isntArray=function(t){return!L(t)},W.isEmptyArray=function(t){return 0===t.length},W.isntEmptyArray=function(t){return 0!==t.length};var V={},K={};function Y(t){return null===t}K.isntNull=K.isNull=void 0,K.isNull=Y,K.isntNull=function(t){return!Y(t)};var H={};function $(t){return void 0===t}H.isntUndefined=H.isUndefined=void 0,H.isUndefined=$,H.isntUndefined=function(t){return!$(t)},V.isntAsyncIterable=V.isAsyncIterable=void 0;const Q=K,X=H;function G(t){return(0,Q.isntNull)(t)&&(0,X.isntUndefined)(t)&&"function"==typeof t[Symbol.asyncIterator]}V.isAsyncIterable=G,V.isntAsyncIterable=function(t){return!G(t)};var Z={};function tt(t){return"bigint"==typeof t}Z.isntBigInt=Z.isBigInt=void 0,Z.isBigInt=tt,Z.isntBigInt=function(t){return!tt(t)};var et={};function nt(t){return"boolean"==typeof t}et.isntBoolean=et.isBoolean=void 0,et.isBoolean=nt,et.isntBoolean=function(t){return!nt(t)};var rt={},ot={};function it(t){return"string"==typeof t}ot.isntString=ot.isString=void 0,ot.isString=it,ot.isntString=function(t){return!it(t)},rt.isntChar=rt.isChar=void 0;const at=ot;function st(t){return(0,at.isString)(t)&&1===t.length}rt.isChar=st,rt.isntChar=function(t){return!st(t)};var ct={};function ut(t){return t instanceof Date}ct.isntDate=ct.isDate=void 0,ct.isDate=ut,ct.isntDate=function(t){return!ut(t)};var lt={};lt.inEnum=void 0,lt.inEnum=function(t,e){return Object.values(e).includes(t)};var ft={};function dt(t){return t instanceof Error}ft.isntError=ft.isError=void 0,ft.isError=dt,ft.isntError=function(t){return!dt(t)};var yt={};function ht(t){return!t}yt.isntFalsy=yt.isFalsy=void 0,yt.isFalsy=ht,yt.isntFalsy=function(t){return!ht(t)};var vt={};function pt(t){return"function"==typeof t}vt.isntFunction=vt.isFunction=void 0,vt.isFunction=pt,vt.isntFunction=function(t){return!pt(t)};var mt={};mt.isntIterable=mt.isIterable=void 0;const bt=K,gt=H;function wt(t){return(0,bt.isntNull)(t)&&(0,gt.isntUndefined)(t)&&"function"==typeof t[Symbol.iterator]}mt.isIterable=wt,mt.isntIterable=function(t){return!wt(t)};var At={},St={};var It=Function.prototype,_t=Object.prototype,xt=It.toString,Tt=_t.hasOwnProperty,Et=xt.call(Object),Ot=_t.toString,jt=function(t,e){return function(n){return t(e(n))}}(Object.getPrototypeOf,Object);var kt=function(t){if(!function(t){return!!t&&"object"==typeof t}(t)||"[object Object]"!=Ot.call(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t))return!1;var e=jt(t);if(null===e)return!0;var n=Tt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&xt.call(n)==Et},Nt=d&&d.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};St.isntEmptyObject=St.isEmptyObject=St.isntPlainObject=St.isPlainObject=St.isntObject=St.isObject=void 0;const Bt=Nt(kt);function Pt(t){return null!==t&&"object"==typeof t}function Mt(t){return(0,Bt.default)(t)}St.isObject=Pt,St.isntObject=function(t){return!Pt(t)},St.isPlainObject=Mt,St.isntPlainObject=function(t){return!Mt(t)},St.isEmptyObject=function(t){return 0===Object.keys(t).length},St.isntEmptyObject=function(t){return 0!==Object.keys(t).length};var qt={};function Ct(t){return"number"==typeof t}qt.isntNumber=qt.isNumber=void 0,qt.isNumber=Ct,qt.isntNumber=function(t){return!Ct(t)},At.isntJsonRpcError=At.isJsonRpcError=At.isntJsonRpcSuccess=At.isJsonRpcSuccess=At.isntJsonRpcRequest=At.isJsonRpcRequest=At.isntJsonRpcNotification=At.isJsonRpcNotification=void 0;const zt=W,Rt=St,Ut=ot,Dt=qt,Ft=H;function Jt(t){return(0,Ut.isString)(t)||(0,Dt.isNumber)(t)}function Wt(t){return(0,zt.isArray)(t)||(0,Rt.isObject)(t)}function Lt(t){return(0,Rt.isPlainObject)(t)&&(0,Ut.isString)(t.jsonrpc)&&(0,Ut.isString)(t.method)&&(0,Ft.isUndefined)(t.id)&&Wt(t.params)}function Vt(t){return(0,Rt.isPlainObject)(t)&&(0,Ut.isString)(t.jsonrpc)&&(0,Ut.isString)(t.method)&&Jt(t.id)&&Wt(t.params)}function Kt(t){return(0,Rt.isPlainObject)(t)&&(0,Ut.isString)(t.jsonrpc)&&(0,Ut.isString)(t.id)&&"result"in t}function Yt(t){return(0,Rt.isPlainObject)(t)&&(0,Ut.isString)(t.jsonrpc)&&Jt(t.id)&&function(t){return(0,Rt.isPlainObject)(t)&&(0,Dt.isNumber)(t.code)&&(0,Ut.isString)(t.message)&&((0,Ft.isUndefined)(t.data)||(0,Rt.isObject)(t.data))}(t.error)}At.isJsonRpcNotification=Lt,At.isntJsonRpcNotification=function(t){return!Lt(t)},At.isJsonRpcRequest=Vt,At.isntJsonRpcRequest=function(t){return!Vt(t)},At.isJsonRpcSuccess=Kt,At.isntJsonRpcSuccess=function(t){return!Kt(t)},At.isJsonRpcError=Yt,At.isntJsonRpcError=function(t){return!Yt(t)};var Ht={};Ht.isntJson=Ht.isJson=void 0,Ht.isJson=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},Ht.isntJson=function t(e){return!t()};var $t={};$t.isAbsoluteURL=void 0,$t.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(W,t),n(V,t),n(Z,t),n(et,t),n(rt,t),n(ct,t),n(lt,t),n(ft,t),n(yt,t),n(vt,t),n(mt,t),n(At,t),n(Ht,t),n(K,t),n(qt,t),n(St,t),n(ot,t),n(H,t),n($t,t)}(J),F.chunkByAsync=void 0;const Qt=J;F.chunkByAsync=function(t,e){return(0,Qt.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const o of t)n.push(o),await e(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t):async function*(t){let n=[],r=0;for(const o of t)n.push(o),await e(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t)};var Xt={};Xt.chunkBy=void 0,Xt.chunkBy=function*(t,e){let n=[],r=0;for(const o of t)n.push(o),e(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)};var Gt={chunk:void 0};const Zt=b,te=x;Gt.chunk=function(t,e){return(0,te.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,te.assert)(e>0,"The parameter size must be greater than 0"),(0,Zt.go)((function*(){let n=[];for(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var ee={concatAsync:void 0};const ne=J,re=b;ee.concatAsync=function(t,...e){return(0,re.go)((async function*(){for(const n of[t,...e])if((0,ne.isAsyncIterable)(n))for await(const t of n)yield t;else for(const t of n)yield t}))};var oe={concat:void 0};const ie=b;oe.concat=function(t,...e){return(0,ie.go)((function*(){for(const n of[t,...e])yield*n}))};var ae={},se={};se.copyIterable=se.copyAsyncIterable=void 0,se.copyAsyncIterable=async function*(t){for await(const e of t)yield e},se.copyIterable=function*(t){for(const e of t)yield e},ae.dropAsync=void 0;const ce=b,ue=se,le=x;ae.dropAsync=function(t,e){return(0,le.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,le.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,ue.copyAsyncIterable)(t):(0,ce.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let o;try{let t;for(;!(({value:t,done:o}=await r.next()),o||e<=0);)e--;for(;!o;)yield t,({value:t,done:o}=await r.next())}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var fe={dropRightAsync:void 0};const de=b,ye=se,he=x;fe.dropRightAsync=function(t,e){return(0,he.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,he.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,ye.copyAsyncIterable)(t):(0,de.go)((async function*(){const n=(await async function(t){const e=[];for await(const n of t)e.push(n);return e}(t)).slice(0,-e);for(const t of n)yield t}))};var ve={dropRight:void 0};const pe=b,me=se,be=x;ve.dropRight=function(t,e){return(0,be.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,be.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,me.copyIterable)(t):(0,pe.go)((function*(){const n=Array.from(t);yield*n.slice(0,-e)}))};var ge={dropUntilAsync:void 0};const we=J;ge.dropUntilAsync=function(t,e){return(0,we.isAsyncIterable)(t)?async function*(t){var n;const r=t[Symbol.asyncIterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=await r.next()),o||await e(t,i++)););for(;!o;)yield t,({value:t,done:o}=await r.next())}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}(t):async function*(t){var n;const r=t[Symbol.iterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=r.next()),o||await e(t,i++)););for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}(t)};var Ae={};Ae.dropUntil=void 0,Ae.dropUntil=function*(t,e){var n;const r=t[Symbol.iterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=r.next()),o||e(t,i++)););for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}};var Se={drop:void 0};const Ie=b,_e=se,xe=x;Se.drop=function(t,e){return(0,xe.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,xe.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,_e.copyIterable)(t):(0,Ie.go)((function*(){var n;const r=t[Symbol.iterator]();let o;try{let t;for(;!(({value:t,done:o}=r.next()),o||e<=0);)e--;for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}))};var Te={filterAsync:void 0};const Ee=J;Te.filterAsync=function(t,e){return(0,Ee.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n)&&(yield r),n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n)&&(yield r),n++}(t)};var Oe={};Oe.filter=void 0,Oe.filter=function*(t,e){let n=0;for(const r of t)e(r,n)&&(yield r),n++};var je={},ke={},Ne={flattenByAsync:void 0};const Be=J;function Pe(t){return(0,Be.isIterable)(t)&&(0,Be.isntChar)(t)}Ne.flattenByAsync=function(t,e){return(0,Be.isAsyncIterable)(t)?async function*(t){const r=1;for await(const o of t)Pe(o)&&await e(o,r)?yield*n(o,r+1):yield o}(t):function(t){return n(t,1)}(t);async function*n(t,r){for(const o of t)Pe(o)&&await e(o,r)?yield*n(o,r+1):yield o}},ke.flattenDeepAsync=void 0;const Me=Ne,qe=x;ke.flattenDeepAsync=function(t,e=1/0){return(0,qe.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,qe.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,Me.flattenByAsync)(t,((t,n)=>n<=e))},je.flattenAsync=void 0;const Ce=ke;je.flattenAsync=function(t){return(0,Ce.flattenDeepAsync)(t,1)};var ze={flattenBy:void 0};const Re=J;ze.flattenBy=function(t,e){return function*t(n,r){for(const i of n)(0,Re.isIterable)(o=i)&&(0,Re.isntChar)(o)&&e(i,r)?yield*t(i,r+1):yield i;var o}(t,1)};var Ue={flattenDeep:void 0};const De=ze,Fe=x;Ue.flattenDeep=function(t,e=1/0){return(0,Fe.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,Fe.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,De.flattenBy)(t,((t,n)=>n<=e))};var Je={flatten:void 0};const We=Ue;Je.flatten=function(t){return(0,We.flattenDeep)(t,1)};var Le={mapAsync:void 0};const Ve=J;Le.mapAsync=function(t,e){return(0,Ve.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)yield await e(r,n),n++}(t):async function*(t){let n=0;for(const r of t)yield await e(r,n),n++}(t)};var Ke={};Ke.map=void 0,Ke.map=function*(t,e){let n=0;for(const r of t)yield e(r,n),n++};var Ye={repeatAsync:void 0};const He=b,$e=x;Ye.repeatAsync=function(t,e){return(0,$e.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,$e.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===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,He.go)((async function*(){const n=[];if(e>0){for await(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var Qe={repeat:void 0};const Xe=b,Ge=x;Qe.repeat=function(t,e){return(0,Ge.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,Ge.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===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,Xe.go)((function*(){const n=[];if(e>0){for(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var Ze={sliceAsync:void 0};const tn=b,en=x;Ze.sliceAsync=function(t,e,n=1/0){return(0,en.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,en.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,en.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,en.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,tn.go)((async function*(){let r=0;for await(const o of t){if(r>=n)break;r>=e&&(yield o),r++}}))};var nn={slice:void 0};const rn=b,on=x;nn.slice=function(t,e,n=1/0){return(0,on.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,on.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,on.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,on.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,rn.go)((function*(){let r=0;for(const o of t){if(r>=n)break;r>=e&&(yield o),r++}}))};var an={};an.splitAsync=void 0,an.splitAsync=async function*(t,e){let n=[];for await(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var sn={splitByAsync:void 0};const cn=J;sn.splitByAsync=function(t,e){return(0,cn.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const o of t)await e(o,r)?(yield n,n=[]):n.push(o),r++;yield n}(t):async function*(t){let n=[],r=0;for(const o of t)await e(o,r)?(yield n,n=[]):n.push(o),r++;yield n}(t)};var un={};un.splitBy=void 0,un.splitBy=function*(t,e){let n=[],r=0;for(const o of t)e(o,r)?(yield n,n=[]):n.push(o),r++;yield n};var ln={};ln.split=void 0,ln.split=function*(t,e){let n=[];for(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var fn={takeAsync:void 0};const dn=b,yn=x;fn.takeAsync=function(t,e){return(0,yn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,yn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,dn.go)((async function*(){if(0!==e)for await(const n of t)if(yield n,0===--e)break}))};var hn={takeRightAsync:void 0};const vn=b,pn=x;hn.takeRightAsync=function(t,e){return(0,pn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,pn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,vn.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let o;try{const t=[];let i;for(;({value:i,done:o}=await r.next()),!o;)t.push(i),t.length>e&&t.shift();yield*t}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var mn={takeRight:void 0};const bn=b,gn=x;mn.takeRight=function(t,e){return(0,gn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,gn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,bn.go)((function*(){var n;const r=t[Symbol.iterator]();let o;try{const t=[];let i;for(;({value:i,done:o}=r.next()),!o;)t.push(i),t.length>e&&t.shift();yield*t}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}))};var wn={takeUntilAsync:void 0};const An=J;wn.takeUntilAsync=function(t,e){return(0,An.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t){if(await e(r,n))break;yield r,n++}}(t):async function*(t){let n=0;for(const r of t){if(await e(r,n))break;yield r,n++}}(t)};var Sn={};Sn.takeUntil=void 0,Sn.takeUntil=function*(t,e){let n=0;for(const r of t){if(e(r,n))break;yield r,n++}};var In={take:void 0};const _n=b,xn=x;In.take=function(t,e){return(0,xn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,xn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,_n.go)((function*(){if(0!==e)for(const n of t)if(yield n,0===--e)break}))};var Tn={tapAsync:void 0};const En=J;Tn.tapAsync=function(t,e){return(0,En.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n),yield r,n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n),yield r,n++}(t)};var On={};On.tap=void 0,On.tap=function*(t,e){let n=0;for(const r of t)e(r,n),yield r,n++};var jn={};jn.toAsyncIterable=void 0,jn.toAsyncIterable=async function*(t){for(const e of t)yield e};var kn={};kn.transformAsync=void 0,kn.transformAsync=async function*(t,e){yield*e(t)};var Nn={};Nn.transform=void 0,Nn.transform=function*(t,e){yield*e(t)};var Bn={};Bn.uniqAsync=void 0,Bn.uniqAsync=async function*(t){const e=new Set;for await(const n of t)e.has(n)||(yield n,e.add(n))};var Pn={uniqByAsync:void 0};const Mn=J;Pn.uniqByAsync=function(t,e){return(0,Mn.isAsyncIterable)(t)?async function*(t){const n=new Set;let r=0;for await(const o of t){const t=await e(o,r);n.has(t)||(yield o,n.add(t)),r++}}(t):async function*(t){const n=new Set;let r=0;for(const o of t){const t=await e(o,r);n.has(t)||(yield o,n.add(t)),r++}}(t)};var qn={};qn.uniqBy=void 0,qn.uniqBy=function*(t,e){const n=new Set;let r=0;for(const o of t){const t=e(o,r);n.has(t)||(yield o,n.add(t)),r++}};var Cn={};Cn.uniq=void 0,Cn.uniq=function*(t){const e=new Set;for(const n of t)e.has(n)||(yield n,e.add(n))};var zn={zipAsync:void 0};const Rn=J;var Un;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(Un||(Un={})),zn.zipAsync=function(t,...e){return async function*(...t){var e,n,r,o;const i=t.length,a=t.map((t=>(0,Rn.isAsyncIterable)(t)?[Un.Async,t[Symbol.asyncIterator]()]:[Un.Sync,t[Symbol.iterator]()])),s=a.map((()=>!1));try{for(;;){const t=new Array(i);for(let e=0;e<i;e++){const[n,r]=a[e];let o;if(o=n===Un.Async?await r.next():r.next(),o.done)return void(s[e]=!0);t[e]=o.value}yield t}}finally{const t=a.filter(((t,e)=>!s[e]));for(const[i,a]of t)i===Un.Async?await(null===(n=(e=a).return)||void 0===n?void 0:n.call(e)):null===(o=(r=a).return)||void 0===o||o.call(r)}}(t,...e)};var Dn={};Dn.zip=void 0,Dn.zip=function(t,...e){return function*(...t){const e=t.length,n=t.map((t=>t[Symbol.iterator]())),r=n.map((()=>!1));try{for(;;){const t=new Array(e);for(let o=0;o<e;o++){const{value:e,done:i}=n[o].next();if(i)return void(r[o]=!0);t[o]=e}yield t}}finally{n.filter(((t,e)=>!r[e])).forEach((t=>{var e;return null===(e=t.return)||void 0===e?void 0:e.call(t)}))}}(t,...e)},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(_,t),n(F,t),n(Xt,t),n(Gt,t),n(ee,t),n(oe,t),n(ae,t),n(fe,t),n(ve,t),n(ge,t),n(Ae,t),n(Se,t),n(Te,t),n(Oe,t),n(je,t),n(Ne,t),n(ze,t),n(ke,t),n(Ue,t),n(Je,t),n(Le,t),n(Ke,t),n(Ye,t),n(Qe,t),n(Ze,t),n(nn,t),n(an,t),n(sn,t),n(un,t),n(ln,t),n(fn,t),n(hn,t),n(mn,t),n(wn,t),n(Sn,t),n(In,t),n(Tn,t),n(On,t),n(jn,t),n(kn,t),n(Nn,t),n(Bn,t),n(Pn,t),n(qn,t),n(Cn,t),n(zn,t),n(Dn,t)}(I);var Fn={},Jn={};Jn.consume=void 0,Jn.consume=function(t,e){return e(t)};var Wn={eachAsync:void 0};const Ln=J;Wn.eachAsync=function(t,e){return(0,Ln.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t)await e(r,n),n++}(t):async function(t){let n=0;for(const r of t)await e(r,n),n++}(t)};var Vn={};Vn.each=void 0,Vn.each=function(t,e){let n=0;for(const r of t)e(r,n),n++};var Kn={everyAsync:void 0};const Yn=J;Kn.everyAsync=function(t,e){return(0,Yn.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(!await e(r,n))return!1;n++}return!0}(t):async function(t){let n=0;for(const r of t){if(!await e(r,n))return!1;n++}return!0}(t)};var Hn={};Hn.every=void 0,Hn.every=function(t,e){let n=0;for(const r of t){if(!e(r,n))return!1;n++}return!0};var $n={findAsync:void 0};const Qn=J;$n.findAsync=function(t,e){return(0,Qn.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return r;n++}return}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return r;n++}return}(t)};var Xn={};Xn.find=void 0,Xn.find=function(t,e){let n=0;for(const r of t){if(e(r,n))return r;n++}};var Gn={};Gn.firstAsync=void 0,Gn.firstAsync=async function(t){for await(const e of t)return e};var Zn={};Zn.first=void 0,Zn.first=function(t){for(const e of t)return e};var tr={};tr.includesAsync=void 0,tr.includesAsync=async function(t,e){for await(const n of t)if(n===e)return!0;return!1};var er={};er.includes=void 0,er.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1};var nr={};nr.matchAsync=void 0,nr.matchAsync=async function(t,e){const n=e.length;let r=0;for await(const o of t)if(o===e[r]&&r++,r===n)return!0;return!1};var rr={};rr.match=void 0,rr.match=function(t,e){const n=e.length;let r=0;for(const o of t)if(o===e[r]&&r++,r===n)return!0;return!1};var or={reduceAsync:void 0};const ir=J;or.reduceAsync=function(t,e,n){return(0,ir.isUndefined)(n)?function(t,e){return(0,ir.isAsyncIterable)(t)?n(t):r(t);async function n(t){var n;const r=t[Symbol.asyncIterator]();let o;try{let t,a=await i(r),s=1;for(;({value:t,done:o}=await r.next()),!o;)a=await e(a,t,s++);return a}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}async function i(t){const e=await t.next();if(e.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}async function r(t){var n;const r=t[Symbol.iterator]();let o;try{let t,a=i(r),s=1;for(;({value:t,done:o}=r.next()),!o;)a=await e(a,t,s++);return a}finally{o||null===(n=r.return)||void 0===n||n.call(r)}function i(t){const e=t.next();if(e.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}}(t,e):function(t,e,n){return(0,ir.isAsyncIterable)(t)?o(t):r(t);async function r(t){let r=n,o=0;for(const n of t)r=await e(r,n,o++);return r}async function o(t){let r=n,o=0;for await(const n of t)r=await e(r,n,o++);return r}}(t,e,n)};var ar={reduce:void 0};const sr=J;ar.reduce=function(t,e,n){return(0,sr.isUndefined)(n)?function(t,e){var n;const r=t[Symbol.iterator]();let o;try{let t,a=i(r),s=1;for(;({value:t,done:o}=r.next()),!o;)a=e(a,t,s++);return a}finally{o||null===(n=r.return)||void 0===n||n.call(r)}function i(t){const e=t.next();if(e.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}(t,e):function(t,e,n){let r=n,o=0;for(const n of t)r=e(r,n,o++);return r}(t,e,n)};var cr={someAsync:void 0};const ur=J;cr.someAsync=function(t,e){return(0,ur.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return!0;n++}return!1}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return!0;n++}return!1}(t)};var lr={};lr.some=void 0,lr.some=function(t,e){let n=0;for(const r of t){if(e(r,n))return!0;n++}return!1};var fr={};fr.lastAsync=void 0,fr.lastAsync=async function(t){var e;const n=t[Symbol.asyncIterator]();let r;try{let t,o;for(;({value:t,done:r}=await n.next()),!r;)o=t;return o}finally{r||await(null===(e=n.return)||void 0===e?void 0:e.call(n))}};var dr={};dr.last=void 0,dr.last=function(t){var e;const n=t[Symbol.iterator]();let r;try{let t,o;for(;({value:t,done:r}=n.next()),!r;)o=t;return o}finally{r||null===(e=n.return)||void 0===e||e.call(n)}};var yr={toArrayAsync:void 0};const hr=Jn;yr.toArrayAsync=function(t){return(0,hr.consume)(t,(async t=>{const e=[];for await(const n of t)e.push(n);return e}))};var vr={toArray:void 0};const pr=Jn;vr.toArray=function(t){return(0,pr.consume)(t,(t=>Array.from(t)))};var mr={toSetAsync:void 0};const br=Jn;mr.toSetAsync=function(t){return(0,br.consume)(t,(async t=>{const e=new Set;for await(const n of t)e.add(n);return e}))};var gr={toSet:void 0};const wr=Jn;gr.toSet=function(t){return(0,wr.consume)(t,(t=>new Set(t)))},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(Jn,t),n(Wn,t),n(Vn,t),n(Kn,t),n(Hn,t),n($n,t),n(Xn,t),n(Gn,t),n(Zn,t),n(tr,t),n(er,t),n(nr,t),n(rr,t),n(or,t),n(ar,t),n(cr,t),n(lr,t),n(fr,t),n(dr,t),n(yr,t),n(vr,t),n(mr,t),n(gr,t)}(Fn),function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(I,t),n(Fn,t)}(S);var Ar={},Sr={};Sr.traverseErrorPrototypeChain=void 0,Sr.traverseErrorPrototypeChain=function*(t){let e=t;for(;(e=Object.getPrototypeOf(e))&&(yield e,e!==Error.prototype););},Ar.getErrorNames=void 0;const Ir=J,_r=Sr;Ar.getErrorNames=function*(t){var e;if((0,Ir.isError)(t))for(const n of(0,_r.traverseErrorPrototypeChain)(t))(null===(e=n.constructor)||void 0===e?void 0:e.name)&&(yield n.constructor.name);else yield t.name,yield*t.ancestors};var xr={isSerializableError:void 0};const Tr=J;xr.isSerializableError=function(t){return(0,Tr.isObject)(t)&&(0,Tr.isString)(t.name)&&(0,Tr.isString)(t.message)&&((0,Tr.isString)(t.stack)||(0,Tr.isNull)(t.stack))&&(0,Tr.isArray)(t.ancestors)&&t.ancestors.every(Tr.isString)},A.CustomError=void 0;const Er=S,Or=Ar,jr=J,kr=xr;class Nr extends Error{get name(){var t,e;return null!==(e=null!==(t=(0,Er.first)((0,Or.getErrorNames)(this)))&&void 0!==t?t:Nr.name)&&void 0!==e?e:"CustomError"}static[Symbol.hasInstance](t){var e;if((0,jr.isError)(t)||(0,kr.isSerializableError)(t)){const n=[null!==(e=this.prototype.constructor.name)&&void 0!==e?e:this.name,...(0,Or.getErrorNames)(this.prototype)].reverse(),r=(0,Er.toArray)((0,Or.getErrorNames)(t)).reverse();return n.every(((t,e)=>t===r[e]))}return!1}}A.CustomError=Nr;var Br={AssertionError:void 0};const Pr=A;class Mr extends Pr.CustomError{}Br.AssertionError=Mr;var qr={normalize:void 0};const Cr=Ar,zr=S;qr.normalize=function(t){var e;const[n,...r]=(0,zr.toArray)((0,Cr.getErrorNames)(t));return{name:n,ancestors:r,message:t.message,stack:null!==(e=t.stack)&&void 0!==e?e:null}};var Rr={},Ur={},Dr={};Dr.pass=void 0,Dr.pass=function(){},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]});(d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)})(Dr,t)}(Ur),Rr.hydrate=void 0;const Fr=Ur;function Jr(t,e){const n=function(){(0,Fr.pass)()};return(n.prototype=Object.create(t.prototype)).constructor=n,Object.defineProperty(n,"name",{value:e}),n}Rr.hydrate=function(t){var e;const n=[t.name,...t.ancestors].slice(0,-1).reverse();let r=Error;for(const t of n)r=Jr(r,t);const o=new r;return o.name=t.name,o.message=t.message,o.stack=null!==(e=t.stack)&&void 0!==e?e:void 0,o};var Wr={assert:void 0};const Lr=Br;Wr.assert=function(t,e){if(!t)throw new Lr.AssertionError(e)},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(A,t),n(Br,t),n(xr,t),n(qr,t),n(Rr,t),n(Wr,t),n(Ar,t),n(Sr,t)}(w),m.chunkAsync=void 0;const Vr=b,Kr=w;m.chunkAsync=function(t,e){return(0,Kr.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,Kr.assert)(e>0,"The parameter size must be greater than 0"),(0,Vr.go)((async function*(){let n=[];for await(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var Yr={chunkByAsync:void 0};const Hr=J;Yr.chunkByAsync=function(t,e){return(0,Hr.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const o of t)n.push(o),await e(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t):async function*(t){let n=[],r=0;for(const o of t)n.push(o),await e(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t)};var $r={};$r.chunkBy=void 0,$r.chunkBy=function*(t,e){let n=[],r=0;for(const o of t)n.push(o),e(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)};var Qr={chunk:void 0};const Xr=b,Gr=w;Qr.chunk=function(t,e){return(0,Gr.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,Gr.assert)(e>0,"The parameter size must be greater than 0"),(0,Xr.go)((function*(){let n=[];for(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var Zr={concatAsync:void 0};const to=J,eo=b;Zr.concatAsync=function(t,...e){return(0,eo.go)((async function*(){for(const n of[t,...e])if((0,to.isAsyncIterable)(n))for await(const t of n)yield t;else for(const t of n)yield t}))};var no={concat:void 0};const ro=b;no.concat=function(t,...e){return(0,ro.go)((function*(){for(const n of[t,...e])yield*n}))};var oo={},io={};io.copyIterable=io.copyAsyncIterable=void 0,io.copyAsyncIterable=async function*(t){for await(const e of t)yield e},io.copyIterable=function*(t){for(const e of t)yield e},oo.dropAsync=void 0;const ao=b,so=io,co=w;oo.dropAsync=function(t,e){return(0,co.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,co.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,so.copyAsyncIterable)(t):(0,ao.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let o;try{let t;for(;!(({value:t,done:o}=await r.next()),o||e<=0);)e--;for(;!o;)yield t,({value:t,done:o}=await r.next())}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var uo={dropRightAsync:void 0};const lo=b,fo=io,yo=w;uo.dropRightAsync=function(t,e){return(0,yo.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,yo.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,fo.copyAsyncIterable)(t):(0,lo.go)((async function*(){const n=(await async function(t){const e=[];for await(const n of t)e.push(n);return e}(t)).slice(0,-e);for(const t of n)yield t}))};var ho={dropRight:void 0};const vo=b,po=io,mo=w;ho.dropRight=function(t,e){return(0,mo.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,mo.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,po.copyIterable)(t):(0,vo.go)((function*(){const n=Array.from(t);yield*n.slice(0,-e)}))};var bo={dropUntilAsync:void 0};const go=J;bo.dropUntilAsync=function(t,e){return(0,go.isAsyncIterable)(t)?async function*(t){var n;const r=t[Symbol.asyncIterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=await r.next()),o||await e(t,i++)););for(;!o;)yield t,({value:t,done:o}=await r.next())}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}(t):async function*(t){var n;const r=t[Symbol.iterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=r.next()),o||await e(t,i++)););for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}(t)};var wo={};wo.dropUntil=void 0,wo.dropUntil=function*(t,e){var n;const r=t[Symbol.iterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=r.next()),o||e(t,i++)););for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}};var Ao={drop:void 0};const So=b,Io=io,_o=w;Ao.drop=function(t,e){return(0,_o.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,_o.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Io.copyIterable)(t):(0,So.go)((function*(){var n;const r=t[Symbol.iterator]();let o;try{let t;for(;!(({value:t,done:o}=r.next()),o||e<=0);)e--;for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}))};var xo={filterAsync:void 0};const To=J;xo.filterAsync=function(t,e){return(0,To.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n)&&(yield r),n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n)&&(yield r),n++}(t)};var Eo={};Eo.filter=void 0,Eo.filter=function*(t,e){let n=0;for(const r of t)e(r,n)&&(yield r),n++};var Oo={},jo={},ko={flattenByAsync:void 0};const No=J;function Bo(t){return(0,No.isIterable)(t)&&(0,No.isntChar)(t)}ko.flattenByAsync=function(t,e){return(0,No.isAsyncIterable)(t)?async function*(t){const r=1;for await(const o of t)Bo(o)&&await e(o,r)?yield*n(o,r+1):yield o}(t):function(t){return n(t,1)}(t);async function*n(t,r){for(const o of t)Bo(o)&&await e(o,r)?yield*n(o,r+1):yield o}},jo.flattenDeepAsync=void 0;const Po=ko,Mo=w;jo.flattenDeepAsync=function(t,e=1/0){return(0,Mo.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,Mo.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,Po.flattenByAsync)(t,((t,n)=>n<=e))},Oo.flattenAsync=void 0;const qo=jo;Oo.flattenAsync=function(t){return(0,qo.flattenDeepAsync)(t,1)};var Co={flattenBy:void 0};const zo=J;Co.flattenBy=function(t,e){return function*t(n,r){for(const i of n)(0,zo.isIterable)(o=i)&&(0,zo.isntChar)(o)&&e(i,r)?yield*t(i,r+1):yield i;var o}(t,1)};var Ro={flattenDeep:void 0};const Uo=Co,Do=w;Ro.flattenDeep=function(t,e=1/0){return(0,Do.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,Do.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,Uo.flattenBy)(t,((t,n)=>n<=e))};var Fo={flatten:void 0};const Jo=Ro;Fo.flatten=function(t){return(0,Jo.flattenDeep)(t,1)};var Wo={mapAsync:void 0};const Lo=J;Wo.mapAsync=function(t,e){return(0,Lo.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)yield await e(r,n),n++}(t):async function*(t){let n=0;for(const r of t)yield await e(r,n),n++}(t)};var Vo={};Vo.map=void 0,Vo.map=function*(t,e){let n=0;for(const r of t)yield e(r,n),n++};var Ko={repeatAsync:void 0};const Yo=b,Ho=w;Ko.repeatAsync=function(t,e){return(0,Ho.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,Ho.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===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,Yo.go)((async function*(){const n=[];if(e>0){for await(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var $o={repeat:void 0};const Qo=b,Xo=w;$o.repeat=function(t,e){return(0,Xo.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,Xo.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===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,Qo.go)((function*(){const n=[];if(e>0){for(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var Go={sliceAsync:void 0};const Zo=b,ti=w;Go.sliceAsync=function(t,e,n=1/0){return(0,ti.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,ti.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,ti.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,ti.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,Zo.go)((async function*(){let r=0;for await(const o of t){if(r>=n)break;r>=e&&(yield o),r++}}))};var ei={slice:void 0};const ni=b,ri=w;ei.slice=function(t,e,n=1/0){return(0,ri.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,ri.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,ri.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,ri.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,ni.go)((function*(){let r=0;for(const o of t){if(r>=n)break;r>=e&&(yield o),r++}}))};var oi={};oi.splitAsync=void 0,oi.splitAsync=async function*(t,e){let n=[];for await(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var ii={splitByAsync:void 0};const ai=J;ii.splitByAsync=function(t,e){return(0,ai.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const o of t)await e(o,r)?(yield n,n=[]):n.push(o),r++;yield n}(t):async function*(t){let n=[],r=0;for(const o of t)await e(o,r)?(yield n,n=[]):n.push(o),r++;yield n}(t)};var si={};si.splitBy=void 0,si.splitBy=function*(t,e){let n=[],r=0;for(const o of t)e(o,r)?(yield n,n=[]):n.push(o),r++;yield n};var ci={};ci.split=void 0,ci.split=function*(t,e){let n=[];for(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var ui={takeAsync:void 0};const li=b,fi=w;ui.takeAsync=function(t,e){return(0,fi.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,fi.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,li.go)((async function*(){if(0!==e)for await(const n of t)if(yield n,0===--e)break}))};var di={takeRightAsync:void 0};const yi=b,hi=w;di.takeRightAsync=function(t,e){return(0,hi.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,hi.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,yi.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let o;try{const t=[];let i;for(;({value:i,done:o}=await r.next()),!o;)t.push(i),t.length>e&&t.shift();yield*t}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var vi={takeRight:void 0};const pi=b,mi=w;vi.takeRight=function(t,e){return(0,mi.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,mi.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,pi.go)((function*(){var n;const r=t[Symbol.iterator]();let o;try{const t=[];let i;for(;({value:i,done:o}=r.next()),!o;)t.push(i),t.length>e&&t.shift();yield*t}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}))};var bi={takeUntilAsync:void 0};const gi=J;bi.takeUntilAsync=function(t,e){return(0,gi.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t){if(await e(r,n))break;yield r,n++}}(t):async function*(t){let n=0;for(const r of t){if(await e(r,n))break;yield r,n++}}(t)};var wi={};wi.takeUntil=void 0,wi.takeUntil=function*(t,e){let n=0;for(const r of t){if(e(r,n))break;yield r,n++}};var Ai={take:void 0};const Si=b,Ii=w;Ai.take=function(t,e){return(0,Ii.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Ii.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Si.go)((function*(){if(0!==e)for(const n of t)if(yield n,0===--e)break}))};var _i={tapAsync:void 0};const xi=J;_i.tapAsync=function(t,e){return(0,xi.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n),yield r,n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n),yield r,n++}(t)};var Ti={};Ti.tap=void 0,Ti.tap=function*(t,e){let n=0;for(const r of t)e(r,n),yield r,n++};var Ei={};Ei.toAsyncIterable=void 0,Ei.toAsyncIterable=async function*(t){for(const e of t)yield e};var Oi={};Oi.transformAsync=void 0,Oi.transformAsync=async function*(t,e){yield*e(t)};var ji={};ji.transform=void 0,ji.transform=function*(t,e){yield*e(t)};var ki={};ki.uniqAsync=void 0,ki.uniqAsync=async function*(t){const e=new Set;for await(const n of t)e.has(n)||(yield n,e.add(n))};var Ni={uniqByAsync:void 0};const Bi=J;Ni.uniqByAsync=function(t,e){return(0,Bi.isAsyncIterable)(t)?async function*(t){const n=new Set;let r=0;for await(const o of t){const t=await e(o,r);n.has(t)||(yield o,n.add(t)),r++}}(t):async function*(t){const n=new Set;let r=0;for(const o of t){const t=await e(o,r);n.has(t)||(yield o,n.add(t)),r++}}(t)};var Pi={};Pi.uniqBy=void 0,Pi.uniqBy=function*(t,e){const n=new Set;let r=0;for(const o of t){const t=e(o,r);n.has(t)||(yield o,n.add(t)),r++}};var Mi={};Mi.uniq=void 0,Mi.uniq=function*(t){const e=new Set;for(const n of t)e.has(n)||(yield n,e.add(n))};var qi={zipAsync:void 0};const Ci=J;var zi;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(zi||(zi={})),qi.zipAsync=function(t,...e){return async function*(...t){var e,n,r,o;const i=t.length,a=t.map((t=>(0,Ci.isAsyncIterable)(t)?[zi.Async,t[Symbol.asyncIterator]()]:[zi.Sync,t[Symbol.iterator]()])),s=a.map((()=>!1));try{for(;;){const t=new Array(i);for(let e=0;e<i;e++){const[n,r]=a[e];let o;if(o=n===zi.Async?await r.next():r.next(),o.done)return void(s[e]=!0);t[e]=o.value}yield t}}finally{const t=a.filter(((t,e)=>!s[e]));for(const[i,a]of t)i===zi.Async?await(null===(n=(e=a).return)||void 0===n?void 0:n.call(e)):null===(o=(r=a).return)||void 0===o||o.call(r)}}(t,...e)};var Ri={};Ri.zip=void 0,Ri.zip=function(t,...e){return function*(...t){const e=t.length,n=t.map((t=>t[Symbol.iterator]())),r=n.map((()=>!1));try{for(;;){const t=new Array(e);for(let o=0;o<e;o++){const{value:e,done:i}=n[o].next();if(i)return void(r[o]=!0);t[o]=e}yield t}}finally{n.filter(((t,e)=>!r[e])).forEach((t=>{var e;return null===(e=t.return)||void 0===e?void 0:e.call(t)}))}}(t,...e)},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(m,t),n(Yr,t),n($r,t),n(Qr,t),n(Zr,t),n(no,t),n(oo,t),n(uo,t),n(ho,t),n(bo,t),n(wo,t),n(Ao,t),n(xo,t),n(Eo,t),n(Oo,t),n(ko,t),n(Co,t),n(jo,t),n(Ro,t),n(Fo,t),n(Wo,t),n(Vo,t),n(Ko,t),n($o,t),n(Go,t),n(ei,t),n(oi,t),n(ii,t),n(si,t),n(ci,t),n(ui,t),n(di,t),n(vi,t),n(bi,t),n(wi,t),n(Ai,t),n(_i,t),n(Ti,t),n(Ei,t),n(Oi,t),n(ji,t),n(ki,t),n(Ni,t),n(Pi,t),n(Mi,t),n(qi,t),n(Ri,t)}(p);var Ui={},Di={};Di.consume=void 0,Di.consume=function(t,e){return e(t)};var Fi={eachAsync:void 0};const Ji=J;Fi.eachAsync=function(t,e){return(0,Ji.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t)await e(r,n),n++}(t):async function(t){let n=0;for(const r of t)await e(r,n),n++}(t)};var Wi={};Wi.each=void 0,Wi.each=function(t,e){let n=0;for(const r of t)e(r,n),n++};var Li={everyAsync:void 0};const Vi=J;Li.everyAsync=function(t,e){return(0,Vi.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(!await e(r,n))return!1;n++}return!0}(t):async function(t){let n=0;for(const r of t){if(!await e(r,n))return!1;n++}return!0}(t)};var Ki={};Ki.every=void 0,Ki.every=function(t,e){let n=0;for(const r of t){if(!e(r,n))return!1;n++}return!0};var Yi={findAsync:void 0};const Hi=J;Yi.findAsync=function(t,e){return(0,Hi.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return r;n++}return}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return r;n++}return}(t)};var $i={};$i.find=void 0,$i.find=function(t,e){let n=0;for(const r of t){if(e(r,n))return r;n++}};var Qi={};Qi.firstAsync=void 0,Qi.firstAsync=async function(t){for await(const e of t)return e};var Xi={};Xi.first=void 0,Xi.first=function(t){for(const e of t)return e};var Gi={};Gi.includesAsync=void 0,Gi.includesAsync=async function(t,e){for await(const n of t)if(n===e)return!0;return!1};var Zi={};Zi.includes=void 0,Zi.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1};var ta={};ta.matchAsync=void 0,ta.matchAsync=async function(t,e){const n=e.length;let r=0;for await(const o of t)if(o===e[r]&&r++,r===n)return!0;return!1};var ea={};ea.match=void 0,ea.match=function(t,e){const n=e.length;let r=0;for(const o of t)if(o===e[r]&&r++,r===n)return!0;return!1};var na={reduceAsync:void 0};const ra=J;na.reduceAsync=function(t,e,n){return(0,ra.isUndefined)(n)?function(t,e){return(0,ra.isAsyncIterable)(t)?n(t):r(t);async function n(t){var n;const r=t[Symbol.asyncIterator]();let o;try{let t,a=await i(r),s=1;for(;({value:t,done:o}=await r.next()),!o;)a=await e(a,t,s++);return a}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}async function i(t){const e=await t.next();if(e.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}async function r(t){var n;const r=t[Symbol.iterator]();let o;try{let t,a=i(r),s=1;for(;({value:t,done:o}=r.next()),!o;)a=await e(a,t,s++);return a}finally{o||null===(n=r.return)||void 0===n||n.call(r)}function i(t){const e=t.next();if(e.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}}(t,e):function(t,e,n){return(0,ra.isAsyncIterable)(t)?o(t):r(t);async function r(t){let r=n,o=0;for(const n of t)r=await e(r,n,o++);return r}async function o(t){let r=n,o=0;for await(const n of t)r=await e(r,n,o++);return r}}(t,e,n)};var oa={reduce:void 0};const ia=J;oa.reduce=function(t,e,n){return(0,ia.isUndefined)(n)?function(t,e){var n;const r=t[Symbol.iterator]();let o;try{let t,a=i(r),s=1;for(;({value:t,done:o}=r.next()),!o;)a=e(a,t,s++);return a}finally{o||null===(n=r.return)||void 0===n||n.call(r)}function i(t){const e=t.next();if(e.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}(t,e):function(t,e,n){let r=n,o=0;for(const n of t)r=e(r,n,o++);return r}(t,e,n)};var aa={someAsync:void 0};const sa=J;aa.someAsync=function(t,e){return(0,sa.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return!0;n++}return!1}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return!0;n++}return!1}(t)};var ca={};ca.some=void 0,ca.some=function(t,e){let n=0;for(const r of t){if(e(r,n))return!0;n++}return!1};var ua={};ua.lastAsync=void 0,ua.lastAsync=async function(t){var e;const n=t[Symbol.asyncIterator]();let r;try{let t,o;for(;({value:t,done:r}=await n.next()),!r;)o=t;return o}finally{r||await(null===(e=n.return)||void 0===e?void 0:e.call(n))}};var la={};la.last=void 0,la.last=function(t){var e;const n=t[Symbol.iterator]();let r;try{let t,o;for(;({value:t,done:r}=n.next()),!r;)o=t;return o}finally{r||null===(e=n.return)||void 0===e||e.call(n)}};var fa={toArrayAsync:void 0};const da=Di;fa.toArrayAsync=function(t){return(0,da.consume)(t,(async t=>{const e=[];for await(const n of t)e.push(n);return e}))};var ya={toArray:void 0};const ha=Di;ya.toArray=function(t){return(0,ha.consume)(t,(t=>Array.from(t)))};var va={toSetAsync:void 0};const pa=Di;va.toSetAsync=function(t){return(0,pa.consume)(t,(async t=>{const e=new Set;for await(const n of t)e.add(n);return e}))};var ma={toSet:void 0};const ba=Di;ma.toSet=function(t){return(0,ba.consume)(t,(t=>new Set(t)))},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(Di,t),n(Fi,t),n(Wi,t),n(Li,t),n(Ki,t),n(Yi,t),n($i,t),n(Qi,t),n(Xi,t),n(Gi,t),n(Zi,t),n(ta,t),n(ea,t),n(na,t),n(oa,t),n(aa,t),n(ca,t),n(ua,t),n(la,t),n(fa,t),n(ya,t),n(va,t),n(ma,t)}(Ui),function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(p,t),n(Ui,t)}(v);var ga={},wa={};wa.traverseErrorPrototypeChain=void 0,wa.traverseErrorPrototypeChain=function*(t){let e=t;for(;(e=Object.getPrototypeOf(e))&&(yield e,e!==Error.prototype););},ga.getErrorNames=void 0;const Aa=J,Sa=wa;ga.getErrorNames=function*(t){var e;if((0,Aa.isError)(t))for(const n of(0,Sa.traverseErrorPrototypeChain)(t))(null===(e=n.constructor)||void 0===e?void 0:e.name)&&(yield n.constructor.name);else yield t.name,yield*t.ancestors};var Ia={isSerializableError:void 0};const _a=J;Ia.isSerializableError=function(t){return(0,_a.isObject)(t)&&(0,_a.isString)(t.name)&&(0,_a.isString)(t.message)&&((0,_a.isString)(t.stack)||(0,_a.isNull)(t.stack))&&(0,_a.isArray)(t.ancestors)&&t.ancestors.every(_a.isString)},h.CustomError=void 0;const xa=v,Ta=ga,Ea=J,Oa=Ia;class ja extends Error{get name(){var t,e;return null!==(e=null!==(t=(0,xa.first)((0,Ta.getErrorNames)(this)))&&void 0!==t?t:ja.name)&&void 0!==e?e:"CustomError"}static[Symbol.hasInstance](t){var e;if((0,Ea.isError)(t)||(0,Oa.isSerializableError)(t)){const n=[null!==(e=this.prototype.constructor.name)&&void 0!==e?e:this.name,...(0,Ta.getErrorNames)(this.prototype)].reverse(),r=(0,xa.toArray)((0,Ta.getErrorNames)(t)).reverse();return n.every(((t,e)=>t===r[e]))}return!1}}h.CustomError=ja;var ka={AssertionError:void 0};const Na=h;class Ba extends Na.CustomError{}ka.AssertionError=Ba;var Pa={normalize:void 0};const Ma=ga,qa=v;Pa.normalize=function(t){var e;const[n,...r]=(0,qa.toArray)((0,Ma.getErrorNames)(t));return{name:n,ancestors:r,message:t.message,stack:null!==(e=t.stack)&&void 0!==e?e:null}};var Ca={},za={},Ra={};Ra.pass=void 0,Ra.pass=function(){},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]});(d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)})(Ra,t)}(za),Ca.hydrate=void 0;const Ua=za;function Da(t,e){const n=function(){(0,Ua.pass)()};return(n.prototype=Object.create(t.prototype)).constructor=n,Object.defineProperty(n,"name",{value:e}),n}Ca.hydrate=function(t){var e;const n=[t.name,...t.ancestors].slice(0,-1).reverse();let r=Error;for(const t of n)r=Da(r,t);const o=new r;return o.name=t.name,o.message=t.message,o.stack=null!==(e=t.stack)&&void 0!==e?e:void 0,o};var Fa={assert:void 0};const Ja=ka;Fa.assert=function(t,e){if(!t)throw new Ja.AssertionError(e)},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(h,t),n(ka,t),n(Ia,t),n(Pa,t),n(Ca,t),n(Fa,t),n(ga,t),n(wa,t)}(y);var Wa={},La={},Va={},Ka={},Ya={};Ya.go=void 0,Ya.go=function(t){return t()},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]});(d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)})(Ya,t)}(Ka),Va.chunkAsync=void 0;const Ha=Ka,$a=y;Va.chunkAsync=function(t,e){return(0,$a.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,$a.assert)(e>0,"The parameter size must be greater than 0"),(0,Ha.go)((async function*(){let n=[];for await(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var Qa={},Xa={},Ga={};function Za(t){return Array.isArray(t)}Ga.isntEmptyArray=Ga.isEmptyArray=Ga.isntArray=Ga.isArray=void 0,Ga.isArray=Za,Ga.isntArray=function(t){return!Za(t)},Ga.isEmptyArray=function(t){return 0===t.length},Ga.isntEmptyArray=function(t){return 0!==t.length};var ts={},es={};function ns(t){return null===t}es.isntNull=es.isNull=void 0,es.isNull=ns,es.isntNull=function(t){return!ns(t)};var rs={};function os(t){return void 0===t}rs.isntUndefined=rs.isUndefined=void 0,rs.isUndefined=os,rs.isntUndefined=function(t){return!os(t)};var is={};function as(t){return"function"==typeof t}is.isntFunction=is.isFunction=void 0,is.isFunction=as,is.isntFunction=function(t){return!as(t)},ts.isntAsyncIterable=ts.isAsyncIterable=void 0;const ss=es,cs=rs,us=is;function ls(t){return(0,ss.isntNull)(t)&&(0,cs.isntUndefined)(t)&&(0,us.isFunction)(t[Symbol.asyncIterator])}ts.isAsyncIterable=ls,ts.isntAsyncIterable=function(t){return!ls(t)};var fs={};function ds(t){return"bigint"==typeof t}fs.isntBigInt=fs.isBigInt=void 0,fs.isBigInt=ds,fs.isntBigInt=function(t){return!ds(t)};var ys={};function hs(t){return"boolean"==typeof t}ys.isntBoolean=ys.isBoolean=void 0,ys.isBoolean=hs,ys.isntBoolean=function(t){return!hs(t)};var vs={},ps={};function ms(t){return"string"==typeof t}ps.isntString=ps.isString=void 0,ps.isString=ms,ps.isntString=function(t){return!ms(t)},vs.isntChar=vs.isChar=void 0;const bs=ps;function gs(t){return(0,bs.isString)(t)&&1===t.length}vs.isChar=gs,vs.isntChar=function(t){return!gs(t)};var ws={};function As(t){return t instanceof Date}ws.isntDate=ws.isDate=void 0,ws.isDate=As,ws.isntDate=function(t){return!As(t)};var Ss={};Ss.inEnum=void 0,Ss.inEnum=function(t,e){return Object.values(e).includes(t)};var Is={};function _s(t){return t instanceof Error}Is.isntError=Is.isError=void 0,Is.isError=_s,Is.isntError=function(t){return!_s(t)};var xs={};function Ts(t){return!t}xs.isntFalsy=xs.isFalsy=void 0,xs.isFalsy=Ts,xs.isntFalsy=function(t){return!Ts(t)};var Es={};Es.isntIterable=Es.isIterable=void 0;const Os=es,js=rs,ks=is;function Ns(t){return(0,Os.isntNull)(t)&&(0,js.isntUndefined)(t)&&(0,ks.isFunction)(t[Symbol.iterator])}Es.isIterable=Ns,Es.isntIterable=function(t){return!Ns(t)};var Bs={},Ps={};function Ms(t){return"number"==typeof t}function qs(t){return Number.isNaN(t)}Ps.isntNaN=Ps.isNaN=Ps.isNegativeInfinity=Ps.isPositiveInfinity=Ps.isFinite=Ps.isntNumber=Ps.isNumber=void 0,Ps.isNumber=Ms,Ps.isntNumber=function(t){return!Ms(t)},Ps.isFinite=function(t){return Number.isFinite(t)},Ps.isPositiveInfinity=function(t){return t===1/0},Ps.isNegativeInfinity=function(t){return t===-1/0},Ps.isNaN=qs,Ps.isntNaN=function(t){return!qs(t)};var Cs={},zs="object"==typeof d&&d&&d.Object===Object&&d,Rs="object"==typeof self&&self&&self.Object===Object&&self,Us=(zs||Rs||Function("return this")()).Symbol,Ds=Us,Fs=Object.prototype,Js=Fs.hasOwnProperty,Ws=Fs.toString,Ls=Ds?Ds.toStringTag:void 0;var Vs=function(t){var e=Js.call(t,Ls),n=t[Ls];try{t[Ls]=void 0;var r=!0}catch(t){}var o=Ws.call(t);return r&&(e?t[Ls]=n:delete t[Ls]),o},Ks=Object.prototype.toString;var Ys=Vs,Hs=function(t){return Ks.call(t)},$s=Us?Us.toStringTag:void 0;var Qs=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":$s&&$s in Object(t)?Ys(t):Hs(t)};var Xs=function(t,e){return function(n){return t(e(n))}}(Object.getPrototypeOf,Object);var Gs=Qs,Zs=Xs,tc=function(t){return null!=t&&"object"==typeof t},ec=Function.prototype,nc=Object.prototype,rc=ec.toString,oc=nc.hasOwnProperty,ic=rc.call(Object);var ac=function(t){if(!tc(t)||"[object Object]"!=Gs(t))return!1;var e=Zs(t);if(null===e)return!0;var n=oc.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&rc.call(n)==ic},sc=d&&d.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Cs.isntEmptyObject=Cs.isEmptyObject=Cs.isntPlainObject=Cs.isPlainObject=Cs.isntObject=Cs.isObject=void 0;const cc=sc(ac);function uc(t){return null!==t&&"object"==typeof t}function lc(t){return(0,cc.default)(t)}Cs.isObject=uc,Cs.isntObject=function(t){return!uc(t)},Cs.isPlainObject=lc,Cs.isntPlainObject=function(t){return!lc(t)},Cs.isEmptyObject=function(t){return 0===Object.keys(t).length},Cs.isntEmptyObject=function(t){return 0!==Object.keys(t).length},Bs.isntJsonable=Bs.isJsonable=Bs.isntJson=Bs.isJson=void 0;const fc=es,dc=ys,yc=ps,hc=Ps,vc=Ga,pc=Cs;function mc(t){return(0,fc.isNull)(t)||(0,dc.isBoolean)(t)||(0,yc.isString)(t)||(0,hc.isNumber)(t)||(0,vc.isArray)(t)&&t.every(mc)||(0,pc.isPlainObject)(t)&&Object.values(t).every(mc)}Bs.isJson=mc,Bs.isntJson=function(t){return!mc(t)},Bs.isJsonable=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},Bs.isntJsonable=function t(e){return!t()};var bc={};bc.isPromiseLike=bc.isntPromiseLike=bc.isntPromise=bc.isPromise=void 0;const gc=Cs,wc=is;function Ac(t){return t instanceof Promise}function Sc(t){return(0,gc.isObject)(t)&&(0,wc.isFunction)(t.then)}bc.isPromise=Ac,bc.isntPromise=function(t){return!Ac(t)},bc.isntPromiseLike=function(t){return!Sc(t)},bc.isPromiseLike=Sc;var Ic={};Ic.isAbsoluteURL=void 0,Ic.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(Ga,t),n(ts,t),n(fs,t),n(ys,t),n(vs,t),n(ws,t),n(Ss,t),n(Is,t),n(xs,t),n(is,t),n(Es,t),n(Bs,t),n(es,t),n(Ps,t),n(Cs,t),n(bc,t),n(ps,t),n(rs,t),n(Ic,t)}(Xa),Qa.chunkByAsync=void 0;const _c=Xa;Qa.chunkByAsync=function(t,e){return(0,_c.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const o of t)n.push(o),await e(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t):async function*(t){let n=[],r=0;for(const o of t)n.push(o),await e(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t)};var xc={};xc.chunkBy=void 0,xc.chunkBy=function*(t,e){let n=[],r=0;for(const o of t)n.push(o),e(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)};var Tc={chunk:void 0};const Ec=Ka,Oc=y;Tc.chunk=function(t,e){return(0,Oc.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,Oc.assert)(e>0,"The parameter size must be greater than 0"),(0,Ec.go)((function*(){let n=[];for(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var jc={concatAsync:void 0};const kc=Xa,Nc=Ka;jc.concatAsync=function(t,...e){return(0,Nc.go)((async function*(){for(const n of[t,...e])if((0,kc.isAsyncIterable)(n))for await(const t of n)yield t;else for(const t of n)yield t}))};var Bc={concat:void 0};const Pc=Ka;Bc.concat=function(t,...e){return(0,Pc.go)((function*(){for(const n of[t,...e])yield*n}))};var Mc={},qc={};qc.copyIterable=qc.copyAsyncIterable=void 0,qc.copyAsyncIterable=async function*(t){for await(const e of t)yield e},qc.copyIterable=function*(t){for(const e of t)yield e},Mc.dropAsync=void 0;const Cc=Ka,zc=qc,Rc=y;Mc.dropAsync=function(t,e){return(0,Rc.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Rc.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,zc.copyAsyncIterable)(t):(0,Cc.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let o;try{let t;for(;!(({value:t,done:o}=await r.next()),o||e<=0);)e--;for(;!o;)yield t,({value:t,done:o}=await r.next())}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var Uc={dropRightAsync:void 0};const Dc=Ka,Fc=qc,Jc=y;Uc.dropRightAsync=function(t,e){return(0,Jc.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Jc.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Fc.copyAsyncIterable)(t):(0,Dc.go)((async function*(){const n=(await async function(t){const e=[];for await(const n of t)e.push(n);return e}(t)).slice(0,-e);for(const t of n)yield t}))};var Wc={dropRight:void 0};const Lc=Ka,Vc=qc,Kc=y;Wc.dropRight=function(t,e){return(0,Kc.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Kc.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Vc.copyIterable)(t):(0,Lc.go)((function*(){const n=Array.from(t);yield*n.slice(0,-e)}))};var Yc={dropUntilAsync:void 0};const Hc=Xa;Yc.dropUntilAsync=function(t,e){return(0,Hc.isAsyncIterable)(t)?async function*(t){var n;const r=t[Symbol.asyncIterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=await r.next()),o||await e(t,i++)););for(;!o;)yield t,({value:t,done:o}=await r.next())}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}(t):async function*(t){var n;const r=t[Symbol.iterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=r.next()),o||await e(t,i++)););for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}(t)};var $c={};$c.dropUntil=void 0,$c.dropUntil=function*(t,e){var n;const r=t[Symbol.iterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=r.next()),o||e(t,i++)););for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}};var Qc={drop:void 0};const Xc=Ka,Gc=qc,Zc=y;Qc.drop=function(t,e){return(0,Zc.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Zc.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Gc.copyIterable)(t):(0,Xc.go)((function*(){var n;const r=t[Symbol.iterator]();let o;try{let t;for(;!(({value:t,done:o}=r.next()),o||e<=0);)e--;for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}))};var tu={filterAsync:void 0};const eu=Xa;tu.filterAsync=function(t,e){return(0,eu.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n)&&(yield r),n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n)&&(yield r),n++}(t)};var nu={};nu.filter=void 0,nu.filter=function*(t,e){let n=0;for(const r of t)e(r,n)&&(yield r),n++};var ru={},ou={},iu={flattenByAsync:void 0};const au=Xa;function su(t){return(0,au.isIterable)(t)&&(0,au.isntChar)(t)}iu.flattenByAsync=function(t,e){return(0,au.isAsyncIterable)(t)?async function*(t){const r=1;for await(const o of t)su(o)&&await e(o,r)?yield*n(o,r+1):yield o}(t):function(t){return n(t,1)}(t);async function*n(t,r){for(const o of t)su(o)&&await e(o,r)?yield*n(o,r+1):yield o}},ou.flattenDeepAsync=void 0;const cu=iu,uu=y;ou.flattenDeepAsync=function(t,e=1/0){return(0,uu.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,uu.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,cu.flattenByAsync)(t,((t,n)=>n<=e))},ru.flattenAsync=void 0;const lu=ou;ru.flattenAsync=function(t){return(0,lu.flattenDeepAsync)(t,1)};var fu={flattenBy:void 0};const du=Xa;fu.flattenBy=function(t,e){return function*t(n,r){for(const i of n)o=i,(0,du.isIterable)(o)&&(0,du.isntChar)(o)&&e(i,r)?yield*t(i,r+1):yield i;var o}(t,1)};var yu={flattenDeep:void 0};const hu=fu,vu=y;yu.flattenDeep=function(t,e=1/0){return(0,vu.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,vu.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,hu.flattenBy)(t,((t,n)=>n<=e))};var pu={flatten:void 0};const mu=yu;pu.flatten=function(t){return(0,mu.flattenDeep)(t,1)};var bu={mapAsync:void 0};const gu=Xa;bu.mapAsync=function(t,e){return(0,gu.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)yield await e(r,n),n++}(t):async function*(t){let n=0;for(const r of t)yield await e(r,n),n++}(t)};var wu={};wu.map=void 0,wu.map=function*(t,e){let n=0;for(const r of t)yield e(r,n),n++};var Au={repeatAsync:void 0};const Su=Ka,Iu=y;Au.repeatAsync=function(t,e){return(0,Iu.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,Iu.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===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,Su.go)((async function*(){const n=[];if(e>0){for await(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var _u={repeat:void 0};const xu=Ka,Tu=y;_u.repeat=function(t,e){return(0,Tu.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,Tu.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===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,xu.go)((function*(){const n=[];if(e>0){for(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var Eu={sliceAsync:void 0};const Ou=Ka,ju=y;Eu.sliceAsync=function(t,e,n=1/0){return(0,ju.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,ju.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,ju.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,ju.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,Ou.go)((async function*(){let r=0;for await(const o of t){if(r>=n)break;r>=e&&(yield o),r++}}))};var ku={slice:void 0};const Nu=Ka,Bu=y;ku.slice=function(t,e,n=1/0){return(0,Bu.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,Bu.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,Bu.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Bu.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,Nu.go)((function*(){let r=0;for(const o of t){if(r>=n)break;r>=e&&(yield o),r++}}))};var Pu={};Pu.splitAsync=void 0,Pu.splitAsync=async function*(t,e){let n=[];for await(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Mu={splitByAsync:void 0};const qu=Xa;Mu.splitByAsync=function(t,e){return(0,qu.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const o of t)await e(o,r)?(yield n,n=[]):n.push(o),r++;yield n}(t):async function*(t){let n=[],r=0;for(const o of t)await e(o,r)?(yield n,n=[]):n.push(o),r++;yield n}(t)};var Cu={};Cu.splitBy=void 0,Cu.splitBy=function*(t,e){let n=[],r=0;for(const o of t)e(o,r)?(yield n,n=[]):n.push(o),r++;yield n};var zu={};zu.split=void 0,zu.split=function*(t,e){let n=[];for(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Ru={takeAsync:void 0};const Uu=Ka,Du=y;Ru.takeAsync=function(t,e){return(0,Du.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Du.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Uu.go)((async function*(){if(0!==e)for await(const n of t)if(yield n,0===--e)break}))};var Fu={takeRightAsync:void 0};const Ju=Ka,Wu=y;Fu.takeRightAsync=function(t,e){return(0,Wu.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Wu.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Ju.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let o;try{const t=[];let i;for(;({value:i,done:o}=await r.next()),!o;)t.push(i),t.length>e&&t.shift();yield*t}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var Lu={takeRight:void 0};const Vu=Ka,Ku=y;Lu.takeRight=function(t,e){return(0,Ku.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Ku.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Vu.go)((function*(){var n;const r=t[Symbol.iterator]();let o;try{const t=[];let i;for(;({value:i,done:o}=r.next()),!o;)t.push(i),t.length>e&&t.shift();yield*t}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}))};var Yu={takeUntilAsync:void 0};const Hu=Xa;Yu.takeUntilAsync=function(t,e){return(0,Hu.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t){if(await e(r,n))break;yield r,n++}}(t):async function*(t){let n=0;for(const r of t){if(await e(r,n))break;yield r,n++}}(t)};var $u={};$u.takeUntil=void 0,$u.takeUntil=function*(t,e){let n=0;for(const r of t){if(e(r,n))break;yield r,n++}};var Qu={take:void 0};const Xu=Ka,Gu=y;Qu.take=function(t,e){return(0,Gu.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Gu.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Xu.go)((function*(){if(0!==e)for(const n of t)if(yield n,0===--e)break}))};var Zu={tapAsync:void 0};const tl=Xa;Zu.tapAsync=function(t,e){return(0,tl.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n),yield r,n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n),yield r,n++}(t)};var el={};el.tap=void 0,el.tap=function*(t,e){let n=0;for(const r of t)e(r,n),yield r,n++};var nl={};nl.toAsyncIterable=void 0,nl.toAsyncIterable=async function*(t){for(const e of t)yield e};var rl={};rl.transformAsync=void 0,rl.transformAsync=async function*(t,e){yield*e(t)};var ol={};ol.transform=void 0,ol.transform=function*(t,e){yield*e(t)};var il={};il.uniqAsync=void 0,il.uniqAsync=async function*(t){const e=new Set;for await(const n of t)e.has(n)||(yield n,e.add(n))};var al={uniqByAsync:void 0};const sl=Xa;al.uniqByAsync=function(t,e){return(0,sl.isAsyncIterable)(t)?async function*(t){const n=new Set;let r=0;for await(const o of t){const t=await e(o,r);n.has(t)||(yield o,n.add(t)),r++}}(t):async function*(t){const n=new Set;let r=0;for(const o of t){const t=await e(o,r);n.has(t)||(yield o,n.add(t)),r++}}(t)};var cl={};cl.uniqBy=void 0,cl.uniqBy=function*(t,e){const n=new Set;let r=0;for(const o of t){const t=e(o,r);n.has(t)||(yield o,n.add(t)),r++}};var ul={};ul.uniq=void 0,ul.uniq=function*(t){const e=new Set;for(const n of t)e.has(n)||(yield n,e.add(n))};var ll={zipAsync:void 0};const fl=Xa;var dl;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(dl||(dl={})),ll.zipAsync=function(t,...e){return async function*(...t){var e,n,r,o;const i=t.length,a=t.map((t=>(0,fl.isAsyncIterable)(t)?[dl.Async,t[Symbol.asyncIterator]()]:[dl.Sync,t[Symbol.iterator]()])),s=a.map((()=>!1));try{for(;;){const t=new Array(i);for(let e=0;e<i;e++){const[n,r]=a[e];let o;if(o=n===dl.Async?await r.next():r.next(),o.done)return void(s[e]=!0);t[e]=o.value}yield t}}finally{const t=a.filter(((t,e)=>!s[e]));for(const[i,a]of t)i===dl.Async?await(null===(n=(e=a).return)||void 0===n?void 0:n.call(e)):null===(o=(r=a).return)||void 0===o||o.call(r)}}(t,...e)};var yl={};yl.zip=void 0,yl.zip=function(t,...e){return function*(...t){const e=t.length,n=t.map((t=>t[Symbol.iterator]())),r=n.map((()=>!1));try{for(;;){const t=new Array(e);for(let o=0;o<e;o++){const{value:e,done:i}=n[o].next();if(i)return void(r[o]=!0);t[o]=e}yield t}}finally{n.filter(((t,e)=>!r[e])).forEach((t=>{var e;return null===(e=t.return)||void 0===e?void 0:e.call(t)}))}}(t,...e)},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(Va,t),n(Qa,t),n(xc,t),n(Tc,t),n(jc,t),n(Bc,t),n(Mc,t),n(Uc,t),n(Wc,t),n(Yc,t),n($c,t),n(Qc,t),n(tu,t),n(nu,t),n(ru,t),n(iu,t),n(fu,t),n(ou,t),n(yu,t),n(pu,t),n(bu,t),n(wu,t),n(Au,t),n(_u,t),n(Eu,t),n(ku,t),n(Pu,t),n(Mu,t),n(Cu,t),n(zu,t),n(Ru,t),n(Fu,t),n(Lu,t),n(Yu,t),n($u,t),n(Qu,t),n(Zu,t),n(el,t),n(nl,t),n(rl,t),n(ol,t),n(il,t),n(al,t),n(cl,t),n(ul,t),n(ll,t),n(yl,t)}(La);var hl={},vl={};vl.consume=void 0,vl.consume=function(t,e){return e(t)};var pl={eachAsync:void 0};const ml=Xa;pl.eachAsync=function(t,e){return(0,ml.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t)await e(r,n),n++}(t):async function(t){let n=0;for(const r of t)await e(r,n),n++}(t)};var bl={};bl.each=void 0,bl.each=function(t,e){let n=0;for(const r of t)e(r,n),n++};var gl={everyAsync:void 0};const wl=Xa;gl.everyAsync=function(t,e){return(0,wl.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(!await e(r,n))return!1;n++}return!0}(t):async function(t){let n=0;for(const r of t){if(!await e(r,n))return!1;n++}return!0}(t)};var Al={};Al.every=void 0,Al.every=function(t,e){let n=0;for(const r of t){if(!e(r,n))return!1;n++}return!0};var Sl={findAsync:void 0};const Il=Xa;Sl.findAsync=function(t,e){return(0,Il.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return r;n++}return}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return r;n++}return}(t)};var _l={};_l.find=void 0,_l.find=function(t,e){let n=0;for(const r of t){if(e(r,n))return r;n++}};var xl={};xl.firstAsync=void 0,xl.firstAsync=async function(t){for await(const e of t)return e};var Tl={};Tl.first=void 0,Tl.first=function(t){for(const e of t)return e};var El={};El.includesAsync=void 0,El.includesAsync=async function(t,e){for await(const n of t)if(n===e)return!0;return!1};var Ol={};Ol.includes=void 0,Ol.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1};var jl={};jl.matchAsync=void 0,jl.matchAsync=async function(t,e){const n=e.length;let r=0;for await(const o of t)if(o===e[r]&&r++,r===n)return!0;return!1};var kl={};kl.match=void 0,kl.match=function(t,e){const n=e.length;let r=0;for(const o of t)if(o===e[r]&&r++,r===n)return!0;return!1};var Nl={reduceAsync:void 0};const Bl=Xa;Nl.reduceAsync=function(t,e,n){return(0,Bl.isUndefined)(n)?function(t,e){return(0,Bl.isAsyncIterable)(t)?n(t):r(t);async function n(t){var n;const r=t[Symbol.asyncIterator]();let o;try{let t,a=await i(r),s=1;for(;({value:t,done:o}=await r.next()),!o;)a=await e(a,t,s++);return a}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}async function i(t){const e=await t.next();if(e.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}async function r(t){var n;const r=t[Symbol.iterator]();let o;try{let t,a=i(r),s=1;for(;({value:t,done:o}=r.next()),!o;)a=await e(a,t,s++);return a}finally{o||null===(n=r.return)||void 0===n||n.call(r)}function i(t){const e=t.next();if(e.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}}(t,e):function(t,e,n){return(0,Bl.isAsyncIterable)(t)?o(t):r(t);async function r(t){let r=n,o=0;for(const n of t)r=await e(r,n,o++);return r}async function o(t){let r=n,o=0;for await(const n of t)r=await e(r,n,o++);return r}}(t,e,n)};var Pl={reduce:void 0};const Ml=Xa;Pl.reduce=function(t,e,n){return(0,Ml.isUndefined)(n)?function(t,e){var n;const r=t[Symbol.iterator]();let o;try{let t,a=i(r),s=1;for(;({value:t,done:o}=r.next()),!o;)a=e(a,t,s++);return a}finally{o||null===(n=r.return)||void 0===n||n.call(r)}function i(t){const e=t.next();if(e.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}(t,e):function(t,e,n){let r=n,o=0;for(const n of t)r=e(r,n,o++);return r}(t,e,n)};var ql={someAsync:void 0};const Cl=Xa;ql.someAsync=function(t,e){return(0,Cl.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return!0;n++}return!1}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return!0;n++}return!1}(t)};var zl={};zl.some=void 0,zl.some=function(t,e){let n=0;for(const r of t){if(e(r,n))return!0;n++}return!1};var Rl={};Rl.lastAsync=void 0,Rl.lastAsync=async function(t){var e;const n=t[Symbol.asyncIterator]();let r;try{let t,o;for(;({value:t,done:r}=await n.next()),!r;)o=t;return o}finally{r||await(null===(e=n.return)||void 0===e?void 0:e.call(n))}};var Ul={};Ul.last=void 0,Ul.last=function(t){var e;const n=t[Symbol.iterator]();let r;try{let t,o;for(;({value:t,done:r}=n.next()),!r;)o=t;return o}finally{r||null===(e=n.return)||void 0===e||e.call(n)}};var Dl={toArrayAsync:void 0};const Fl=vl;Dl.toArrayAsync=function(t){return(0,Fl.consume)(t,(async t=>{const e=[];for await(const n of t)e.push(n);return e}))};var Jl={toArray:void 0};const Wl=vl;Jl.toArray=function(t){return(0,Wl.consume)(t,(t=>Array.from(t)))};var Ll={toSetAsync:void 0};const Vl=vl;Ll.toSetAsync=function(t){return(0,Vl.consume)(t,(async t=>{const e=new Set;for await(const n of t)e.add(n);return e}))};var Kl={toSet:void 0};const Yl=vl;Kl.toSet=function(t){return(0,Yl.consume)(t,(t=>new Set(t)))};var Hl={};Hl.count=void 0,Hl.count=function(t){let e=0;for(const n of t)e++;return e};var $l,Ql,Xl={};Xl.countAsync=void 0,Xl.countAsync=async function(t){let e=0;for await(const n of t)e++;return e},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(vl,t),n(pl,t),n(bl,t),n(gl,t),n(Al,t),n(Sl,t),n(_l,t),n(xl,t),n(Tl,t),n(El,t),n(Ol,t),n(jl,t),n(kl,t),n(Nl,t),n(Pl,t),n(ql,t),n(zl,t),n(Rl,t),n(Ul,t),n(Dl,t),n(Jl,t),n(Ll,t),n(Kl,t),n(Hl,t),n(Xl,t)}(hl),function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(La,t),n(hl,t)}(Wa);class Gl{constructor(t){$l.set(this,void 0),Ql.set(this,new Map),y.assert(Number.isInteger(t),"The parameter limit must be an integer"),y.assert(t>0,"The parameter limit must be a positive value"),n(this,$l,t,"f")}get[($l=new WeakMap,Ql=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return e(this,Ql,"f").size}set(t,n){return e(this,Ql,"f").has(t)?this.updateItem(t,n):(e(this,Ql,"f").size===e(this,$l,"f")&&e(this,Ql,"f").delete(this.getColdestKey()),e(this,Ql,"f").set(t,n)),this}has(t){return e(this,Ql,"f").has(t)}get(t){if(!this.has(t))return;const n=e(this,Ql,"f").get(t);return this.updateItem(t,n),n}delete(t){return e(this,Ql,"f").delete(t)}clear(){e(this,Ql,"f").clear()}updateItem(t,n){e(this,Ql,"f").delete(t),e(this,Ql,"f").set(t,n)}getColdestKey(){return Wa.first(e(this,Ql,"f").keys())}}var Zl={},tf={},ef={},nf={};nf.random=void 0,nf.random=function(t,e){return Math.random()*(e-t)+t};var rf={};rf.randomInt=void 0,rf.randomInt=function(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t))+t};var of={};of.randomIntInclusive=void 0,of.randomIntInclusive=function(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(nf,t),n(rf,t),n(of,t)}(ef),tf.calculateExponentialBackoffTimeout=void 0;const af=ef;tf.calculateExponentialBackoffTimeout=function({baseTimeout:t,retries:e,maxTimeout:n=1/0,factor:r=2,jitter:o=!0}){const i=Math.min(r**e*t,n);return o?(0,af.randomIntInclusive)(0,i):i};var sf={};sf.setTimeout=void 0,sf.setTimeout=function(t,e){const n=globalThis.setTimeout(e,t);return()=>clearTimeout(n)};var cf={setSchedule:void 0};const uf=sf;cf.setSchedule=function(t,e){const n=t-Date.now();return(0,uf.setTimeout)(n,e)};var lf={};lf.setInterval=void 0,lf.setInterval=function(t,e){const n=globalThis.setInterval(e,t);return()=>clearInterval(n)};var ff={setImmediate:void 0};const df=sf;ff.setImmediate=function(t){if(globalThis.setImmediate){const e=globalThis.setImmediate(t);return()=>clearImmediate(e)}return(0,df.setTimeout)(0,t)};var yf={setTimeoutLoop:void 0};const hf=sf;yf.setTimeoutLoop=function(t,e){let n=!1,r=(0,hf.setTimeout)(t,(async function o(){await e(),n||(r=(0,hf.setTimeout)(t,o))}));return()=>{n=!0,r()}};var vf={setDynamicTimeoutLoop:void 0};const pf=sf;var mf,bf,gf,wf,Af,Sf,If;vf.setDynamicTimeoutLoop=function(t,e){let n=!1,r=(0,pf.setTimeout)(t,(async function o(){const i=Date.now();await e();const a=Date.now()-i;n||(r=(0,pf.setTimeout)(Math.max(t-a,0),o))}));return()=>{n=!0,r()}},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(tf,t),n(sf,t),n(cf,t),n(lf,t),n(ff,t),n(yf,t),n(vf,t)}(Zl);class _f{constructor(){mf.set(this,new Map),bf.set(this,void 0),this.itemMetadataSortedByExpirationTime=[]}get[(mf=new WeakMap,bf=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return e(this,mf,"f").size}set(t,n,r){return e(this,mf,"f").set(t,n),this.removeItemMetadata(t),this.addItemMetadata(t,Date.now()+r),this}has(t){return e(this,mf,"f").has(t)}get(t){return e(this,mf,"f").get(t)}delete(t){const n=e(this,mf,"f").delete(t);if(n){const e=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.key===t));this.itemMetadataSortedByExpirationTime.splice(e,1),0===e&&this.rescheduleClearTimeout()}return n}clear(){var t;e(this,mf,"f").clear(),null===(t=e(this,bf,"f"))||void 0===t||t.call(this),this.itemMetadataSortedByExpirationTime=[]}addItemMetadata(t,e){for(let n=0;n<this.itemMetadataSortedByExpirationTime.length;n++){if(e<this.itemMetadataSortedByExpirationTime[n].expirationTime)return this.itemMetadataSortedByExpirationTime.splice(n,0,{key:t,expirationTime:e}),void(0===n&&this.rescheduleClearTimeout())}this.itemMetadataSortedByExpirationTime.push({key:t,expirationTime:e}),1===this.itemMetadataSortedByExpirationTime.length&&this.rescheduleClearTimeout()}removeItemMetadata(t){const e=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.key===t));e>=0&&(this.itemMetadataSortedByExpirationTime.splice(e,1),0===e&&this.rescheduleClearTimeout())}clearExpiredItems(t){const n=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.expirationTime>t));(n>=0?this.itemMetadataSortedByExpirationTime.splice(0,n):this.itemMetadataSortedByExpirationTime.splice(0,this.itemMetadataSortedByExpirationTime.length)).forEach((t=>e(this,mf,"f").delete(t.key)))}rescheduleClearTimeout(){var t;if(null===(t=e(this,bf,"f"))||void 0===t||t.call(this),this.itemMetadataSortedByExpirationTime.length>0){const t=this.itemMetadataSortedByExpirationTime[0];if(Number.isFinite(t.expirationTime)){const e=Zl.setSchedule(t.expirationTime,(()=>{this.clearExpiredItems(Date.now()),this.rescheduleClearTimeout()}));n(this,bf,(()=>{e(),n(this,bf,void 0,"f")}),"f")}}}}class xf{constructor(t){gf.set(this,void 0),wf.set(this,new Map),Af.set(this,void 0),this.itemMetadataSortedByExpirationTime=[],y.assert(Number.isInteger(t),"The parameter limit must be an integer"),y.assert(t>0,"The parameter limit must be a positive value"),n(this,gf,t,"f")}get[(gf=new WeakMap,wf=new WeakMap,Af=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return e(this,wf,"f").size}set(t,n,r){return e(this,wf,"f").has(t)?(this.updateItem(t,n),this.removeItemMetadata(t),this.addItemMetadata(t,Date.now()+r)):(e(this,wf,"f").size===e(this,gf,"f")&&e(this,wf,"f").delete(this.getColdestKey()),e(this,wf,"f").set(t,n),this.addItemMetadata(t,Date.now()+r)),this}has(t){return e(this,wf,"f").has(t)}get(t){if(this.has(t)){const n=e(this,wf,"f").get(t);return this.updateItem(t,n),n}}delete(t){const n=e(this,wf,"f").delete(t);if(n){const e=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.key===t));this.itemMetadataSortedByExpirationTime.splice(e,1),0===e&&this.rescheduleClearTimeout()}return n}clear(){var t;e(this,wf,"f").clear(),null===(t=e(this,Af,"f"))||void 0===t||t.call(this),this.itemMetadataSortedByExpirationTime=[]}updateItem(t,n){e(this,wf,"f").delete(t),e(this,wf,"f").set(t,n)}addItemMetadata(t,e){for(let n=0;n<this.itemMetadataSortedByExpirationTime.length;n++){if(e<this.itemMetadataSortedByExpirationTime[n].expirationTime)return this.itemMetadataSortedByExpirationTime.splice(n,0,{key:t,expirationTime:e}),void(0===n&&this.rescheduleClearTimeout())}this.itemMetadataSortedByExpirationTime.push({key:t,expirationTime:e}),1===this.itemMetadataSortedByExpirationTime.length&&this.rescheduleClearTimeout()}removeItemMetadata(t){const e=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.key===t));e>=0&&(this.itemMetadataSortedByExpirationTime.splice(e,1),0===e&&this.rescheduleClearTimeout())}clearExpiredItems(t){const n=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.expirationTime>t));(n>=0?this.itemMetadataSortedByExpirationTime.splice(0,n):this.itemMetadataSortedByExpirationTime.splice(0,this.itemMetadataSortedByExpirationTime.length)).forEach((t=>e(this,wf,"f").delete(t.key)))}rescheduleClearTimeout(){var t;if(null===(t=e(this,Af,"f"))||void 0===t||t.call(this),this.itemMetadataSortedByExpirationTime.length>0){const t=this.itemMetadataSortedByExpirationTime[0];if(Number.isFinite(t.expirationTime)){const e=Zl.setSchedule(t.expirationTime,(()=>{this.clearExpiredItems(Date.now()),this.rescheduleClearTimeout()}));n(this,Af,(()=>{e(),n(this,Af,void 0,"f")}),"f")}}}getColdestKey(){return Wa.first(e(this,wf,"f").keys())}}class Tf{constructor(t){this.value=t,this.children=new Map}}class Ef{constructor(){Sf.set(this,new Tf)}get[(Sf=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}set(t,n){let r=e(this,Sf,"f");for(const e of t)r.children.has(e)||r.children.set(e,new Tf),r=r.children.get(e);return r.value=n,this}has(t){let n=e(this,Sf,"f");for(const e of t){if(!n.children.has(e))return!1;n=n.children.get(e)}return void 0!==n.value}get(t){let n=e(this,Sf,"f");for(const e of t){if(!n.children.has(e))return;n=n.children.get(e)}return n.value}delete(t){const n=[];let r=e(this,Sf,"f");for(const e of t){if(!r.children.has(e))return!1;n.push(r),r=r.children.get(e)}if(delete r.value,0===r.children.size)for(const[e,r]of Wa.toArray(Wa.zip(t,n)).reverse())if(r.children.delete(e),0!==r.children.size)break;return!0}}class Of{constructor(t,e){this.schema=t,If.set(this,void 0),n(this,If,e,"f")}get state(){return e(this,If,"f")}matches(t){return e(this,If,"f")===t}can(t){return t in this.schema[this.state]}send(t){if(!this.can(t))throw new jf(this.state,t);n(this,If,this.schema[this.state][t],"f")}}If=new WeakMap;class jf extends y.CustomError{constructor(t,e){super(`State ${t} cannot react to event ${e}`)}}
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Structures={})}(this,(function(t){"use strict";function e(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)}function n(t,e,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(t,n):o?o.value=n:e.set(t,n),n}var r,o,i,a,s;r=new WeakMap;class c{constructor(){o.set(this,new Map)}get[(o=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}on(t,n){e(this,o,"f").has(t)||e(this,o,"f").set(t,new Set);e(this,o,"f").get(t).add(n)}off(t,n){if(!e(this,o,"f").has(t))return;const r=e(this,o,"f").get(t);r.delete(n),0===r.size&&e(this,o,"f").delete(t)}emit(t,...n){e(this,o,"f").has(t)&&e(this,o,"f").get(t).forEach((t=>t(...n)))}}class u{constructor(t){this.hash=t,i.set(this,new Map)}get[(i=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return e(this,i,"f").size}set(t,n){return e(this,i,"f").set(this.hash(t),n),this}has(t){return e(this,i,"f").has(this.hash(t))}get(t){return e(this,i,"f").get(this.hash(t))}delete(t){return e(this,i,"f").delete(this.hash(t))}clear(){e(this,i,"f").clear()}}class l{constructor(t){this.hash=t,a.set(this,new Map)}get[(a=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return e(this,a,"f").size}[Symbol.iterator](){return e(this,a,"f").values()}add(t){return e(this,a,"f").set(this.hash(t),t),this}delete(t){return e(this,a,"f").delete(this.hash(t))}has(t){return e(this,a,"f").has(this.hash(t))}clear(){e(this,a,"f").clear()}values(){return e(this,a,"f").values()}}class f{constructor(){s.set(this,[])}get[(s=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return e(this,s,"f").length}empty(){e(this,s,"f").length=0}enqueue(...t){e(this,s,"f").push(...t)}dequeue(){return e(this,s,"f").shift()}remove(t){let n;for(;(n=e(this,s,"f").indexOf(t))>=0;)e(this,s,"f").splice(n,1)}}var d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},y={},h={},v={},p={},m={},b={},g={};g.go=void 0,g.go=function(t){return t()},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]});(d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)})(g,t)}(b);var w={},A={},S={},I={},_={},x={},T={CustomError:void 0};class E extends Error{get name(){return this.constructor.name}}T.CustomError=E;var O={ExpectedError:void 0};const j=T;class k extends j.CustomError{}O.ExpectedError=k;var N={AssertionError:void 0};const B=T;class P extends B.CustomError{}N.AssertionError=P;var M={};M.normalize=void 0,M.normalize=function(t){var e;return{name:t.name,message:t.message,stack:null!==(e=t.stack)&&void 0!==e?e:null}};var q={refute:void 0};const C=O;q.refute=function(t,e){if(t)throw new C.ExpectedError(e)};var z={assert:void 0};const R=N;z.assert=function(t,e){if(!t)throw new R.AssertionError(e)},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(T,t),n(O,t),n(N,t),n(M,t),n(q,t),n(z,t)}(x),_.chunkAsync=void 0;const U=b,D=x;_.chunkAsync=function(t,e){return(0,D.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,D.assert)(e>0,"The parameter size must be greater than 0"),(0,U.go)((async function*(){let n=[];for await(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var F={},J={},W={};function L(t){return Array.isArray(t)}W.isntEmptyArray=W.isEmptyArray=W.isntArray=W.isArray=void 0,W.isArray=L,W.isntArray=function(t){return!L(t)},W.isEmptyArray=function(t){return 0===t.length},W.isntEmptyArray=function(t){return 0!==t.length};var V={},K={};function Y(t){return null===t}K.isntNull=K.isNull=void 0,K.isNull=Y,K.isntNull=function(t){return!Y(t)};var H={};function $(t){return void 0===t}H.isntUndefined=H.isUndefined=void 0,H.isUndefined=$,H.isntUndefined=function(t){return!$(t)},V.isntAsyncIterable=V.isAsyncIterable=void 0;const Q=K,X=H;function G(t){return(0,Q.isntNull)(t)&&(0,X.isntUndefined)(t)&&"function"==typeof t[Symbol.asyncIterator]}V.isAsyncIterable=G,V.isntAsyncIterable=function(t){return!G(t)};var Z={};function tt(t){return"bigint"==typeof t}Z.isntBigInt=Z.isBigInt=void 0,Z.isBigInt=tt,Z.isntBigInt=function(t){return!tt(t)};var et={};function nt(t){return"boolean"==typeof t}et.isntBoolean=et.isBoolean=void 0,et.isBoolean=nt,et.isntBoolean=function(t){return!nt(t)};var rt={},ot={};function it(t){return"string"==typeof t}ot.isntString=ot.isString=void 0,ot.isString=it,ot.isntString=function(t){return!it(t)},rt.isntChar=rt.isChar=void 0;const at=ot;function st(t){return(0,at.isString)(t)&&1===t.length}rt.isChar=st,rt.isntChar=function(t){return!st(t)};var ct={};function ut(t){return t instanceof Date}ct.isntDate=ct.isDate=void 0,ct.isDate=ut,ct.isntDate=function(t){return!ut(t)};var lt={};lt.inEnum=void 0,lt.inEnum=function(t,e){return Object.values(e).includes(t)};var ft={};function dt(t){return t instanceof Error}ft.isntError=ft.isError=void 0,ft.isError=dt,ft.isntError=function(t){return!dt(t)};var yt={};function ht(t){return!t}yt.isntFalsy=yt.isFalsy=void 0,yt.isFalsy=ht,yt.isntFalsy=function(t){return!ht(t)};var vt={};function pt(t){return"function"==typeof t}vt.isntFunction=vt.isFunction=void 0,vt.isFunction=pt,vt.isntFunction=function(t){return!pt(t)};var mt={};mt.isntIterable=mt.isIterable=void 0;const bt=K,gt=H;function wt(t){return(0,bt.isntNull)(t)&&(0,gt.isntUndefined)(t)&&"function"==typeof t[Symbol.iterator]}mt.isIterable=wt,mt.isntIterable=function(t){return!wt(t)};var At={},St={};var It=Function.prototype,_t=Object.prototype,xt=It.toString,Tt=_t.hasOwnProperty,Et=xt.call(Object),Ot=_t.toString,jt=function(t,e){return function(n){return t(e(n))}}(Object.getPrototypeOf,Object);var kt=function(t){if(!function(t){return!!t&&"object"==typeof t}(t)||"[object Object]"!=Ot.call(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t))return!1;var e=jt(t);if(null===e)return!0;var n=Tt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&xt.call(n)==Et},Nt=d&&d.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};St.isntEmptyObject=St.isEmptyObject=St.isntPlainObject=St.isPlainObject=St.isntObject=St.isObject=void 0;const Bt=Nt(kt);function Pt(t){return null!==t&&"object"==typeof t}function Mt(t){return(0,Bt.default)(t)}St.isObject=Pt,St.isntObject=function(t){return!Pt(t)},St.isPlainObject=Mt,St.isntPlainObject=function(t){return!Mt(t)},St.isEmptyObject=function(t){return 0===Object.keys(t).length},St.isntEmptyObject=function(t){return 0!==Object.keys(t).length};var qt={};function Ct(t){return"number"==typeof t}qt.isntNumber=qt.isNumber=void 0,qt.isNumber=Ct,qt.isntNumber=function(t){return!Ct(t)},At.isntJsonRpcError=At.isJsonRpcError=At.isntJsonRpcSuccess=At.isJsonRpcSuccess=At.isntJsonRpcRequest=At.isJsonRpcRequest=At.isntJsonRpcNotification=At.isJsonRpcNotification=void 0;const zt=W,Rt=St,Ut=ot,Dt=qt,Ft=H;function Jt(t){return(0,Ut.isString)(t)||(0,Dt.isNumber)(t)}function Wt(t){return(0,zt.isArray)(t)||(0,Rt.isObject)(t)}function Lt(t){return(0,Rt.isPlainObject)(t)&&(0,Ut.isString)(t.jsonrpc)&&(0,Ut.isString)(t.method)&&(0,Ft.isUndefined)(t.id)&&Wt(t.params)}function Vt(t){return(0,Rt.isPlainObject)(t)&&(0,Ut.isString)(t.jsonrpc)&&(0,Ut.isString)(t.method)&&Jt(t.id)&&Wt(t.params)}function Kt(t){return(0,Rt.isPlainObject)(t)&&(0,Ut.isString)(t.jsonrpc)&&(0,Ut.isString)(t.id)&&"result"in t}function Yt(t){return(0,Rt.isPlainObject)(t)&&(0,Ut.isString)(t.jsonrpc)&&Jt(t.id)&&function(t){return(0,Rt.isPlainObject)(t)&&(0,Dt.isNumber)(t.code)&&(0,Ut.isString)(t.message)&&((0,Ft.isUndefined)(t.data)||(0,Rt.isObject)(t.data))}(t.error)}At.isJsonRpcNotification=Lt,At.isntJsonRpcNotification=function(t){return!Lt(t)},At.isJsonRpcRequest=Vt,At.isntJsonRpcRequest=function(t){return!Vt(t)},At.isJsonRpcSuccess=Kt,At.isntJsonRpcSuccess=function(t){return!Kt(t)},At.isJsonRpcError=Yt,At.isntJsonRpcError=function(t){return!Yt(t)};var Ht={};Ht.isntJson=Ht.isJson=void 0,Ht.isJson=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},Ht.isntJson=function t(e){return!t()};var $t={};$t.isAbsoluteURL=void 0,$t.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(W,t),n(V,t),n(Z,t),n(et,t),n(rt,t),n(ct,t),n(lt,t),n(ft,t),n(yt,t),n(vt,t),n(mt,t),n(At,t),n(Ht,t),n(K,t),n(qt,t),n(St,t),n(ot,t),n(H,t),n($t,t)}(J),F.chunkByAsync=void 0;const Qt=J;F.chunkByAsync=function(t,e){return(0,Qt.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const o of t)n.push(o),await e(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t):async function*(t){let n=[],r=0;for(const o of t)n.push(o),await e(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t)};var Xt={};Xt.chunkBy=void 0,Xt.chunkBy=function*(t,e){let n=[],r=0;for(const o of t)n.push(o),e(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)};var Gt={chunk:void 0};const Zt=b,te=x;Gt.chunk=function(t,e){return(0,te.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,te.assert)(e>0,"The parameter size must be greater than 0"),(0,Zt.go)((function*(){let n=[];for(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var ee={concatAsync:void 0};const ne=J,re=b;ee.concatAsync=function(t,...e){return(0,re.go)((async function*(){for(const n of[t,...e])if((0,ne.isAsyncIterable)(n))for await(const t of n)yield t;else for(const t of n)yield t}))};var oe={concat:void 0};const ie=b;oe.concat=function(t,...e){return(0,ie.go)((function*(){for(const n of[t,...e])yield*n}))};var ae={},se={};se.copyIterable=se.copyAsyncIterable=void 0,se.copyAsyncIterable=async function*(t){for await(const e of t)yield e},se.copyIterable=function*(t){for(const e of t)yield e},ae.dropAsync=void 0;const ce=b,ue=se,le=x;ae.dropAsync=function(t,e){return(0,le.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,le.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,ue.copyAsyncIterable)(t):(0,ce.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let o;try{let t;for(;!(({value:t,done:o}=await r.next()),o||e<=0);)e--;for(;!o;)yield t,({value:t,done:o}=await r.next())}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var fe={dropRightAsync:void 0};const de=b,ye=se,he=x;fe.dropRightAsync=function(t,e){return(0,he.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,he.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,ye.copyAsyncIterable)(t):(0,de.go)((async function*(){const n=(await async function(t){const e=[];for await(const n of t)e.push(n);return e}(t)).slice(0,-e);for(const t of n)yield t}))};var ve={dropRight:void 0};const pe=b,me=se,be=x;ve.dropRight=function(t,e){return(0,be.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,be.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,me.copyIterable)(t):(0,pe.go)((function*(){const n=Array.from(t);yield*n.slice(0,-e)}))};var ge={dropUntilAsync:void 0};const we=J;ge.dropUntilAsync=function(t,e){return(0,we.isAsyncIterable)(t)?async function*(t){var n;const r=t[Symbol.asyncIterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=await r.next()),o||await e(t,i++)););for(;!o;)yield t,({value:t,done:o}=await r.next())}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}(t):async function*(t){var n;const r=t[Symbol.iterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=r.next()),o||await e(t,i++)););for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}(t)};var Ae={};Ae.dropUntil=void 0,Ae.dropUntil=function*(t,e){var n;const r=t[Symbol.iterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=r.next()),o||e(t,i++)););for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}};var Se={drop:void 0};const Ie=b,_e=se,xe=x;Se.drop=function(t,e){return(0,xe.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,xe.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,_e.copyIterable)(t):(0,Ie.go)((function*(){var n;const r=t[Symbol.iterator]();let o;try{let t;for(;!(({value:t,done:o}=r.next()),o||e<=0);)e--;for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}))};var Te={filterAsync:void 0};const Ee=J;Te.filterAsync=function(t,e){return(0,Ee.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n)&&(yield r),n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n)&&(yield r),n++}(t)};var Oe={};Oe.filter=void 0,Oe.filter=function*(t,e){let n=0;for(const r of t)e(r,n)&&(yield r),n++};var je={},ke={},Ne={flattenByAsync:void 0};const Be=J;function Pe(t){return(0,Be.isIterable)(t)&&(0,Be.isntChar)(t)}Ne.flattenByAsync=function(t,e){return(0,Be.isAsyncIterable)(t)?async function*(t){const r=1;for await(const o of t)Pe(o)&&await e(o,r)?yield*n(o,r+1):yield o}(t):function(t){return n(t,1)}(t);async function*n(t,r){for(const o of t)Pe(o)&&await e(o,r)?yield*n(o,r+1):yield o}},ke.flattenDeepAsync=void 0;const Me=Ne,qe=x;ke.flattenDeepAsync=function(t,e=1/0){return(0,qe.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,qe.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,Me.flattenByAsync)(t,((t,n)=>n<=e))},je.flattenAsync=void 0;const Ce=ke;je.flattenAsync=function(t){return(0,Ce.flattenDeepAsync)(t,1)};var ze={flattenBy:void 0};const Re=J;ze.flattenBy=function(t,e){return function*t(n,r){for(const i of n)(0,Re.isIterable)(o=i)&&(0,Re.isntChar)(o)&&e(i,r)?yield*t(i,r+1):yield i;var o}(t,1)};var Ue={flattenDeep:void 0};const De=ze,Fe=x;Ue.flattenDeep=function(t,e=1/0){return(0,Fe.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,Fe.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,De.flattenBy)(t,((t,n)=>n<=e))};var Je={flatten:void 0};const We=Ue;Je.flatten=function(t){return(0,We.flattenDeep)(t,1)};var Le={mapAsync:void 0};const Ve=J;Le.mapAsync=function(t,e){return(0,Ve.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)yield await e(r,n),n++}(t):async function*(t){let n=0;for(const r of t)yield await e(r,n),n++}(t)};var Ke={};Ke.map=void 0,Ke.map=function*(t,e){let n=0;for(const r of t)yield e(r,n),n++};var Ye={repeatAsync:void 0};const He=b,$e=x;Ye.repeatAsync=function(t,e){return(0,$e.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,$e.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===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,He.go)((async function*(){const n=[];if(e>0){for await(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var Qe={repeat:void 0};const Xe=b,Ge=x;Qe.repeat=function(t,e){return(0,Ge.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,Ge.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===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,Xe.go)((function*(){const n=[];if(e>0){for(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var Ze={sliceAsync:void 0};const tn=b,en=x;Ze.sliceAsync=function(t,e,n=1/0){return(0,en.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,en.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,en.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,en.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,tn.go)((async function*(){let r=0;for await(const o of t){if(r>=n)break;r>=e&&(yield o),r++}}))};var nn={slice:void 0};const rn=b,on=x;nn.slice=function(t,e,n=1/0){return(0,on.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,on.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,on.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,on.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,rn.go)((function*(){let r=0;for(const o of t){if(r>=n)break;r>=e&&(yield o),r++}}))};var an={};an.splitAsync=void 0,an.splitAsync=async function*(t,e){let n=[];for await(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var sn={splitByAsync:void 0};const cn=J;sn.splitByAsync=function(t,e){return(0,cn.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const o of t)await e(o,r)?(yield n,n=[]):n.push(o),r++;yield n}(t):async function*(t){let n=[],r=0;for(const o of t)await e(o,r)?(yield n,n=[]):n.push(o),r++;yield n}(t)};var un={};un.splitBy=void 0,un.splitBy=function*(t,e){let n=[],r=0;for(const o of t)e(o,r)?(yield n,n=[]):n.push(o),r++;yield n};var ln={};ln.split=void 0,ln.split=function*(t,e){let n=[];for(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var fn={takeAsync:void 0};const dn=b,yn=x;fn.takeAsync=function(t,e){return(0,yn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,yn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,dn.go)((async function*(){if(0!==e)for await(const n of t)if(yield n,0===--e)break}))};var hn={takeRightAsync:void 0};const vn=b,pn=x;hn.takeRightAsync=function(t,e){return(0,pn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,pn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,vn.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let o;try{const t=[];let i;for(;({value:i,done:o}=await r.next()),!o;)t.push(i),t.length>e&&t.shift();yield*t}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var mn={takeRight:void 0};const bn=b,gn=x;mn.takeRight=function(t,e){return(0,gn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,gn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,bn.go)((function*(){var n;const r=t[Symbol.iterator]();let o;try{const t=[];let i;for(;({value:i,done:o}=r.next()),!o;)t.push(i),t.length>e&&t.shift();yield*t}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}))};var wn={takeUntilAsync:void 0};const An=J;wn.takeUntilAsync=function(t,e){return(0,An.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t){if(await e(r,n))break;yield r,n++}}(t):async function*(t){let n=0;for(const r of t){if(await e(r,n))break;yield r,n++}}(t)};var Sn={};Sn.takeUntil=void 0,Sn.takeUntil=function*(t,e){let n=0;for(const r of t){if(e(r,n))break;yield r,n++}};var In={take:void 0};const _n=b,xn=x;In.take=function(t,e){return(0,xn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,xn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,_n.go)((function*(){if(0!==e)for(const n of t)if(yield n,0===--e)break}))};var Tn={tapAsync:void 0};const En=J;Tn.tapAsync=function(t,e){return(0,En.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n),yield r,n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n),yield r,n++}(t)};var On={};On.tap=void 0,On.tap=function*(t,e){let n=0;for(const r of t)e(r,n),yield r,n++};var jn={};jn.toAsyncIterable=void 0,jn.toAsyncIterable=async function*(t){for(const e of t)yield e};var kn={};kn.transformAsync=void 0,kn.transformAsync=async function*(t,e){yield*e(t)};var Nn={};Nn.transform=void 0,Nn.transform=function*(t,e){yield*e(t)};var Bn={};Bn.uniqAsync=void 0,Bn.uniqAsync=async function*(t){const e=new Set;for await(const n of t)e.has(n)||(yield n,e.add(n))};var Pn={uniqByAsync:void 0};const Mn=J;Pn.uniqByAsync=function(t,e){return(0,Mn.isAsyncIterable)(t)?async function*(t){const n=new Set;let r=0;for await(const o of t){const t=await e(o,r);n.has(t)||(yield o,n.add(t)),r++}}(t):async function*(t){const n=new Set;let r=0;for(const o of t){const t=await e(o,r);n.has(t)||(yield o,n.add(t)),r++}}(t)};var qn={};qn.uniqBy=void 0,qn.uniqBy=function*(t,e){const n=new Set;let r=0;for(const o of t){const t=e(o,r);n.has(t)||(yield o,n.add(t)),r++}};var Cn={};Cn.uniq=void 0,Cn.uniq=function*(t){const e=new Set;for(const n of t)e.has(n)||(yield n,e.add(n))};var zn={zipAsync:void 0};const Rn=J;var Un;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(Un||(Un={})),zn.zipAsync=function(t,...e){return async function*(...t){var e,n,r,o;const i=t.length,a=t.map((t=>(0,Rn.isAsyncIterable)(t)?[Un.Async,t[Symbol.asyncIterator]()]:[Un.Sync,t[Symbol.iterator]()])),s=a.map((()=>!1));try{for(;;){const t=new Array(i);for(let e=0;e<i;e++){const[n,r]=a[e];let o;if(o=n===Un.Async?await r.next():r.next(),o.done)return void(s[e]=!0);t[e]=o.value}yield t}}finally{const t=a.filter(((t,e)=>!s[e]));for(const[i,a]of t)i===Un.Async?await(null===(n=(e=a).return)||void 0===n?void 0:n.call(e)):null===(o=(r=a).return)||void 0===o||o.call(r)}}(t,...e)};var Dn={};Dn.zip=void 0,Dn.zip=function(t,...e){return function*(...t){const e=t.length,n=t.map((t=>t[Symbol.iterator]())),r=n.map((()=>!1));try{for(;;){const t=new Array(e);for(let o=0;o<e;o++){const{value:e,done:i}=n[o].next();if(i)return void(r[o]=!0);t[o]=e}yield t}}finally{n.filter(((t,e)=>!r[e])).forEach((t=>{var e;return null===(e=t.return)||void 0===e?void 0:e.call(t)}))}}(t,...e)},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(_,t),n(F,t),n(Xt,t),n(Gt,t),n(ee,t),n(oe,t),n(ae,t),n(fe,t),n(ve,t),n(ge,t),n(Ae,t),n(Se,t),n(Te,t),n(Oe,t),n(je,t),n(Ne,t),n(ze,t),n(ke,t),n(Ue,t),n(Je,t),n(Le,t),n(Ke,t),n(Ye,t),n(Qe,t),n(Ze,t),n(nn,t),n(an,t),n(sn,t),n(un,t),n(ln,t),n(fn,t),n(hn,t),n(mn,t),n(wn,t),n(Sn,t),n(In,t),n(Tn,t),n(On,t),n(jn,t),n(kn,t),n(Nn,t),n(Bn,t),n(Pn,t),n(qn,t),n(Cn,t),n(zn,t),n(Dn,t)}(I);var Fn={},Jn={};Jn.consume=void 0,Jn.consume=function(t,e){return e(t)};var Wn={eachAsync:void 0};const Ln=J;Wn.eachAsync=function(t,e){return(0,Ln.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t)await e(r,n),n++}(t):async function(t){let n=0;for(const r of t)await e(r,n),n++}(t)};var Vn={};Vn.each=void 0,Vn.each=function(t,e){let n=0;for(const r of t)e(r,n),n++};var Kn={everyAsync:void 0};const Yn=J;Kn.everyAsync=function(t,e){return(0,Yn.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(!await e(r,n))return!1;n++}return!0}(t):async function(t){let n=0;for(const r of t){if(!await e(r,n))return!1;n++}return!0}(t)};var Hn={};Hn.every=void 0,Hn.every=function(t,e){let n=0;for(const r of t){if(!e(r,n))return!1;n++}return!0};var $n={findAsync:void 0};const Qn=J;$n.findAsync=function(t,e){return(0,Qn.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return r;n++}return}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return r;n++}return}(t)};var Xn={};Xn.find=void 0,Xn.find=function(t,e){let n=0;for(const r of t){if(e(r,n))return r;n++}};var Gn={};Gn.firstAsync=void 0,Gn.firstAsync=async function(t){for await(const e of t)return e};var Zn={};Zn.first=void 0,Zn.first=function(t){for(const e of t)return e};var tr={};tr.includesAsync=void 0,tr.includesAsync=async function(t,e){for await(const n of t)if(n===e)return!0;return!1};var er={};er.includes=void 0,er.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1};var nr={};nr.matchAsync=void 0,nr.matchAsync=async function(t,e){const n=e.length;let r=0;for await(const o of t)if(o===e[r]&&r++,r===n)return!0;return!1};var rr={};rr.match=void 0,rr.match=function(t,e){const n=e.length;let r=0;for(const o of t)if(o===e[r]&&r++,r===n)return!0;return!1};var or={reduceAsync:void 0};const ir=J;or.reduceAsync=function(t,e,n){return(0,ir.isUndefined)(n)?function(t,e){return(0,ir.isAsyncIterable)(t)?n(t):r(t);async function n(t){var n;const r=t[Symbol.asyncIterator]();let o;try{let t,a=await i(r),s=1;for(;({value:t,done:o}=await r.next()),!o;)a=await e(a,t,s++);return a}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}async function i(t){const e=await t.next();if(e.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}async function r(t){var n;const r=t[Symbol.iterator]();let o;try{let t,a=i(r),s=1;for(;({value:t,done:o}=r.next()),!o;)a=await e(a,t,s++);return a}finally{o||null===(n=r.return)||void 0===n||n.call(r)}function i(t){const e=t.next();if(e.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}}(t,e):function(t,e,n){return(0,ir.isAsyncIterable)(t)?o(t):r(t);async function r(t){let r=n,o=0;for(const n of t)r=await e(r,n,o++);return r}async function o(t){let r=n,o=0;for await(const n of t)r=await e(r,n,o++);return r}}(t,e,n)};var ar={reduce:void 0};const sr=J;ar.reduce=function(t,e,n){return(0,sr.isUndefined)(n)?function(t,e){var n;const r=t[Symbol.iterator]();let o;try{let t,a=i(r),s=1;for(;({value:t,done:o}=r.next()),!o;)a=e(a,t,s++);return a}finally{o||null===(n=r.return)||void 0===n||n.call(r)}function i(t){const e=t.next();if(e.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}(t,e):function(t,e,n){let r=n,o=0;for(const n of t)r=e(r,n,o++);return r}(t,e,n)};var cr={someAsync:void 0};const ur=J;cr.someAsync=function(t,e){return(0,ur.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return!0;n++}return!1}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return!0;n++}return!1}(t)};var lr={};lr.some=void 0,lr.some=function(t,e){let n=0;for(const r of t){if(e(r,n))return!0;n++}return!1};var fr={};fr.lastAsync=void 0,fr.lastAsync=async function(t){var e;const n=t[Symbol.asyncIterator]();let r;try{let t,o;for(;({value:t,done:r}=await n.next()),!r;)o=t;return o}finally{r||await(null===(e=n.return)||void 0===e?void 0:e.call(n))}};var dr={};dr.last=void 0,dr.last=function(t){var e;const n=t[Symbol.iterator]();let r;try{let t,o;for(;({value:t,done:r}=n.next()),!r;)o=t;return o}finally{r||null===(e=n.return)||void 0===e||e.call(n)}};var yr={toArrayAsync:void 0};const hr=Jn;yr.toArrayAsync=function(t){return(0,hr.consume)(t,(async t=>{const e=[];for await(const n of t)e.push(n);return e}))};var vr={toArray:void 0};const pr=Jn;vr.toArray=function(t){return(0,pr.consume)(t,(t=>Array.from(t)))};var mr={toSetAsync:void 0};const br=Jn;mr.toSetAsync=function(t){return(0,br.consume)(t,(async t=>{const e=new Set;for await(const n of t)e.add(n);return e}))};var gr={toSet:void 0};const wr=Jn;gr.toSet=function(t){return(0,wr.consume)(t,(t=>new Set(t)))},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(Jn,t),n(Wn,t),n(Vn,t),n(Kn,t),n(Hn,t),n($n,t),n(Xn,t),n(Gn,t),n(Zn,t),n(tr,t),n(er,t),n(nr,t),n(rr,t),n(or,t),n(ar,t),n(cr,t),n(lr,t),n(fr,t),n(dr,t),n(yr,t),n(vr,t),n(mr,t),n(gr,t)}(Fn),function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(I,t),n(Fn,t)}(S);var Ar={},Sr={};Sr.traverseErrorPrototypeChain=void 0,Sr.traverseErrorPrototypeChain=function*(t){let e=t;for(;(e=Object.getPrototypeOf(e))&&(yield e,e!==Error.prototype););},Ar.getErrorNames=void 0;const Ir=J,_r=Sr;Ar.getErrorNames=function*(t){var e;if((0,Ir.isError)(t))for(const n of(0,_r.traverseErrorPrototypeChain)(t))(null===(e=n.constructor)||void 0===e?void 0:e.name)&&(yield n.constructor.name);else yield t.name,yield*t.ancestors};var xr={isSerializableError:void 0};const Tr=J;xr.isSerializableError=function(t){return(0,Tr.isObject)(t)&&(0,Tr.isString)(t.name)&&(0,Tr.isString)(t.message)&&((0,Tr.isString)(t.stack)||(0,Tr.isNull)(t.stack))&&(0,Tr.isArray)(t.ancestors)&&t.ancestors.every(Tr.isString)},A.CustomError=void 0;const Er=S,Or=Ar,jr=J,kr=xr;class Nr extends Error{get name(){var t,e;return null!==(e=null!==(t=(0,Er.first)((0,Or.getErrorNames)(this)))&&void 0!==t?t:Nr.name)&&void 0!==e?e:"CustomError"}static[Symbol.hasInstance](t){var e;if((0,jr.isError)(t)||(0,kr.isSerializableError)(t)){const n=[null!==(e=this.prototype.constructor.name)&&void 0!==e?e:this.name,...(0,Or.getErrorNames)(this.prototype)].reverse(),r=(0,Er.toArray)((0,Or.getErrorNames)(t)).reverse();return n.every(((t,e)=>t===r[e]))}return!1}}A.CustomError=Nr;var Br={AssertionError:void 0};const Pr=A;class Mr extends Pr.CustomError{}Br.AssertionError=Mr;var qr={normalize:void 0};const Cr=Ar,zr=S;qr.normalize=function(t){var e;const[n,...r]=(0,zr.toArray)((0,Cr.getErrorNames)(t));return{name:n,ancestors:r,message:t.message,stack:null!==(e=t.stack)&&void 0!==e?e:null}};var Rr={},Ur={},Dr={};Dr.pass=void 0,Dr.pass=function(){},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]});(d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)})(Dr,t)}(Ur),Rr.hydrate=void 0;const Fr=Ur;function Jr(t,e){const n=function(){(0,Fr.pass)()};return(n.prototype=Object.create(t.prototype)).constructor=n,Object.defineProperty(n,"name",{value:e}),n}Rr.hydrate=function(t){var e;const n=[t.name,...t.ancestors].slice(0,-1).reverse();let r=Error;for(const t of n)r=Jr(r,t);const o=new r;return o.name=t.name,o.message=t.message,o.stack=null!==(e=t.stack)&&void 0!==e?e:void 0,o};var Wr={assert:void 0};const Lr=Br;Wr.assert=function(t,e){if(!t)throw new Lr.AssertionError(e)},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(A,t),n(Br,t),n(xr,t),n(qr,t),n(Rr,t),n(Wr,t),n(Ar,t),n(Sr,t)}(w),m.chunkAsync=void 0;const Vr=b,Kr=w;m.chunkAsync=function(t,e){return(0,Kr.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,Kr.assert)(e>0,"The parameter size must be greater than 0"),(0,Vr.go)((async function*(){let n=[];for await(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var Yr={chunkByAsync:void 0};const Hr=J;Yr.chunkByAsync=function(t,e){return(0,Hr.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const o of t)n.push(o),await e(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t):async function*(t){let n=[],r=0;for(const o of t)n.push(o),await e(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t)};var $r={};$r.chunkBy=void 0,$r.chunkBy=function*(t,e){let n=[],r=0;for(const o of t)n.push(o),e(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)};var Qr={chunk:void 0};const Xr=b,Gr=w;Qr.chunk=function(t,e){return(0,Gr.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,Gr.assert)(e>0,"The parameter size must be greater than 0"),(0,Xr.go)((function*(){let n=[];for(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var Zr={concatAsync:void 0};const to=J,eo=b;Zr.concatAsync=function(t,...e){return(0,eo.go)((async function*(){for(const n of[t,...e])if((0,to.isAsyncIterable)(n))for await(const t of n)yield t;else for(const t of n)yield t}))};var no={concat:void 0};const ro=b;no.concat=function(t,...e){return(0,ro.go)((function*(){for(const n of[t,...e])yield*n}))};var oo={},io={};io.copyIterable=io.copyAsyncIterable=void 0,io.copyAsyncIterable=async function*(t){for await(const e of t)yield e},io.copyIterable=function*(t){for(const e of t)yield e},oo.dropAsync=void 0;const ao=b,so=io,co=w;oo.dropAsync=function(t,e){return(0,co.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,co.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,so.copyAsyncIterable)(t):(0,ao.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let o;try{let t;for(;!(({value:t,done:o}=await r.next()),o||e<=0);)e--;for(;!o;)yield t,({value:t,done:o}=await r.next())}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var uo={dropRightAsync:void 0};const lo=b,fo=io,yo=w;uo.dropRightAsync=function(t,e){return(0,yo.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,yo.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,fo.copyAsyncIterable)(t):(0,lo.go)((async function*(){const n=(await async function(t){const e=[];for await(const n of t)e.push(n);return e}(t)).slice(0,-e);for(const t of n)yield t}))};var ho={dropRight:void 0};const vo=b,po=io,mo=w;ho.dropRight=function(t,e){return(0,mo.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,mo.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,po.copyIterable)(t):(0,vo.go)((function*(){const n=Array.from(t);yield*n.slice(0,-e)}))};var bo={dropUntilAsync:void 0};const go=J;bo.dropUntilAsync=function(t,e){return(0,go.isAsyncIterable)(t)?async function*(t){var n;const r=t[Symbol.asyncIterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=await r.next()),o||await e(t,i++)););for(;!o;)yield t,({value:t,done:o}=await r.next())}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}(t):async function*(t){var n;const r=t[Symbol.iterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=r.next()),o||await e(t,i++)););for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}(t)};var wo={};wo.dropUntil=void 0,wo.dropUntil=function*(t,e){var n;const r=t[Symbol.iterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=r.next()),o||e(t,i++)););for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}};var Ao={drop:void 0};const So=b,Io=io,_o=w;Ao.drop=function(t,e){return(0,_o.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,_o.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Io.copyIterable)(t):(0,So.go)((function*(){var n;const r=t[Symbol.iterator]();let o;try{let t;for(;!(({value:t,done:o}=r.next()),o||e<=0);)e--;for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}))};var xo={filterAsync:void 0};const To=J;xo.filterAsync=function(t,e){return(0,To.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n)&&(yield r),n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n)&&(yield r),n++}(t)};var Eo={};Eo.filter=void 0,Eo.filter=function*(t,e){let n=0;for(const r of t)e(r,n)&&(yield r),n++};var Oo={},jo={},ko={flattenByAsync:void 0};const No=J;function Bo(t){return(0,No.isIterable)(t)&&(0,No.isntChar)(t)}ko.flattenByAsync=function(t,e){return(0,No.isAsyncIterable)(t)?async function*(t){const r=1;for await(const o of t)Bo(o)&&await e(o,r)?yield*n(o,r+1):yield o}(t):function(t){return n(t,1)}(t);async function*n(t,r){for(const o of t)Bo(o)&&await e(o,r)?yield*n(o,r+1):yield o}},jo.flattenDeepAsync=void 0;const Po=ko,Mo=w;jo.flattenDeepAsync=function(t,e=1/0){return(0,Mo.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,Mo.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,Po.flattenByAsync)(t,((t,n)=>n<=e))},Oo.flattenAsync=void 0;const qo=jo;Oo.flattenAsync=function(t){return(0,qo.flattenDeepAsync)(t,1)};var Co={flattenBy:void 0};const zo=J;Co.flattenBy=function(t,e){return function*t(n,r){for(const i of n)(0,zo.isIterable)(o=i)&&(0,zo.isntChar)(o)&&e(i,r)?yield*t(i,r+1):yield i;var o}(t,1)};var Ro={flattenDeep:void 0};const Uo=Co,Do=w;Ro.flattenDeep=function(t,e=1/0){return(0,Do.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,Do.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,Uo.flattenBy)(t,((t,n)=>n<=e))};var Fo={flatten:void 0};const Jo=Ro;Fo.flatten=function(t){return(0,Jo.flattenDeep)(t,1)};var Wo={mapAsync:void 0};const Lo=J;Wo.mapAsync=function(t,e){return(0,Lo.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)yield await e(r,n),n++}(t):async function*(t){let n=0;for(const r of t)yield await e(r,n),n++}(t)};var Vo={};Vo.map=void 0,Vo.map=function*(t,e){let n=0;for(const r of t)yield e(r,n),n++};var Ko={repeatAsync:void 0};const Yo=b,Ho=w;Ko.repeatAsync=function(t,e){return(0,Ho.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,Ho.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===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,Yo.go)((async function*(){const n=[];if(e>0){for await(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var $o={repeat:void 0};const Qo=b,Xo=w;$o.repeat=function(t,e){return(0,Xo.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,Xo.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===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,Qo.go)((function*(){const n=[];if(e>0){for(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var Go={sliceAsync:void 0};const Zo=b,ti=w;Go.sliceAsync=function(t,e,n=1/0){return(0,ti.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,ti.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,ti.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,ti.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,Zo.go)((async function*(){let r=0;for await(const o of t){if(r>=n)break;r>=e&&(yield o),r++}}))};var ei={slice:void 0};const ni=b,ri=w;ei.slice=function(t,e,n=1/0){return(0,ri.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,ri.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,ri.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,ri.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,ni.go)((function*(){let r=0;for(const o of t){if(r>=n)break;r>=e&&(yield o),r++}}))};var oi={};oi.splitAsync=void 0,oi.splitAsync=async function*(t,e){let n=[];for await(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var ii={splitByAsync:void 0};const ai=J;ii.splitByAsync=function(t,e){return(0,ai.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const o of t)await e(o,r)?(yield n,n=[]):n.push(o),r++;yield n}(t):async function*(t){let n=[],r=0;for(const o of t)await e(o,r)?(yield n,n=[]):n.push(o),r++;yield n}(t)};var si={};si.splitBy=void 0,si.splitBy=function*(t,e){let n=[],r=0;for(const o of t)e(o,r)?(yield n,n=[]):n.push(o),r++;yield n};var ci={};ci.split=void 0,ci.split=function*(t,e){let n=[];for(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var ui={takeAsync:void 0};const li=b,fi=w;ui.takeAsync=function(t,e){return(0,fi.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,fi.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,li.go)((async function*(){if(0!==e)for await(const n of t)if(yield n,0===--e)break}))};var di={takeRightAsync:void 0};const yi=b,hi=w;di.takeRightAsync=function(t,e){return(0,hi.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,hi.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,yi.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let o;try{const t=[];let i;for(;({value:i,done:o}=await r.next()),!o;)t.push(i),t.length>e&&t.shift();yield*t}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var vi={takeRight:void 0};const pi=b,mi=w;vi.takeRight=function(t,e){return(0,mi.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,mi.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,pi.go)((function*(){var n;const r=t[Symbol.iterator]();let o;try{const t=[];let i;for(;({value:i,done:o}=r.next()),!o;)t.push(i),t.length>e&&t.shift();yield*t}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}))};var bi={takeUntilAsync:void 0};const gi=J;bi.takeUntilAsync=function(t,e){return(0,gi.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t){if(await e(r,n))break;yield r,n++}}(t):async function*(t){let n=0;for(const r of t){if(await e(r,n))break;yield r,n++}}(t)};var wi={};wi.takeUntil=void 0,wi.takeUntil=function*(t,e){let n=0;for(const r of t){if(e(r,n))break;yield r,n++}};var Ai={take:void 0};const Si=b,Ii=w;Ai.take=function(t,e){return(0,Ii.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Ii.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Si.go)((function*(){if(0!==e)for(const n of t)if(yield n,0===--e)break}))};var _i={tapAsync:void 0};const xi=J;_i.tapAsync=function(t,e){return(0,xi.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n),yield r,n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n),yield r,n++}(t)};var Ti={};Ti.tap=void 0,Ti.tap=function*(t,e){let n=0;for(const r of t)e(r,n),yield r,n++};var Ei={};Ei.toAsyncIterable=void 0,Ei.toAsyncIterable=async function*(t){for(const e of t)yield e};var Oi={};Oi.transformAsync=void 0,Oi.transformAsync=async function*(t,e){yield*e(t)};var ji={};ji.transform=void 0,ji.transform=function*(t,e){yield*e(t)};var ki={};ki.uniqAsync=void 0,ki.uniqAsync=async function*(t){const e=new Set;for await(const n of t)e.has(n)||(yield n,e.add(n))};var Ni={uniqByAsync:void 0};const Bi=J;Ni.uniqByAsync=function(t,e){return(0,Bi.isAsyncIterable)(t)?async function*(t){const n=new Set;let r=0;for await(const o of t){const t=await e(o,r);n.has(t)||(yield o,n.add(t)),r++}}(t):async function*(t){const n=new Set;let r=0;for(const o of t){const t=await e(o,r);n.has(t)||(yield o,n.add(t)),r++}}(t)};var Pi={};Pi.uniqBy=void 0,Pi.uniqBy=function*(t,e){const n=new Set;let r=0;for(const o of t){const t=e(o,r);n.has(t)||(yield o,n.add(t)),r++}};var Mi={};Mi.uniq=void 0,Mi.uniq=function*(t){const e=new Set;for(const n of t)e.has(n)||(yield n,e.add(n))};var qi={zipAsync:void 0};const Ci=J;var zi;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(zi||(zi={})),qi.zipAsync=function(t,...e){return async function*(...t){var e,n,r,o;const i=t.length,a=t.map((t=>(0,Ci.isAsyncIterable)(t)?[zi.Async,t[Symbol.asyncIterator]()]:[zi.Sync,t[Symbol.iterator]()])),s=a.map((()=>!1));try{for(;;){const t=new Array(i);for(let e=0;e<i;e++){const[n,r]=a[e];let o;if(o=n===zi.Async?await r.next():r.next(),o.done)return void(s[e]=!0);t[e]=o.value}yield t}}finally{const t=a.filter(((t,e)=>!s[e]));for(const[i,a]of t)i===zi.Async?await(null===(n=(e=a).return)||void 0===n?void 0:n.call(e)):null===(o=(r=a).return)||void 0===o||o.call(r)}}(t,...e)};var Ri={};Ri.zip=void 0,Ri.zip=function(t,...e){return function*(...t){const e=t.length,n=t.map((t=>t[Symbol.iterator]())),r=n.map((()=>!1));try{for(;;){const t=new Array(e);for(let o=0;o<e;o++){const{value:e,done:i}=n[o].next();if(i)return void(r[o]=!0);t[o]=e}yield t}}finally{n.filter(((t,e)=>!r[e])).forEach((t=>{var e;return null===(e=t.return)||void 0===e?void 0:e.call(t)}))}}(t,...e)},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(m,t),n(Yr,t),n($r,t),n(Qr,t),n(Zr,t),n(no,t),n(oo,t),n(uo,t),n(ho,t),n(bo,t),n(wo,t),n(Ao,t),n(xo,t),n(Eo,t),n(Oo,t),n(ko,t),n(Co,t),n(jo,t),n(Ro,t),n(Fo,t),n(Wo,t),n(Vo,t),n(Ko,t),n($o,t),n(Go,t),n(ei,t),n(oi,t),n(ii,t),n(si,t),n(ci,t),n(ui,t),n(di,t),n(vi,t),n(bi,t),n(wi,t),n(Ai,t),n(_i,t),n(Ti,t),n(Ei,t),n(Oi,t),n(ji,t),n(ki,t),n(Ni,t),n(Pi,t),n(Mi,t),n(qi,t),n(Ri,t)}(p);var Ui={},Di={};Di.consume=void 0,Di.consume=function(t,e){return e(t)};var Fi={eachAsync:void 0};const Ji=J;Fi.eachAsync=function(t,e){return(0,Ji.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t)await e(r,n),n++}(t):async function(t){let n=0;for(const r of t)await e(r,n),n++}(t)};var Wi={};Wi.each=void 0,Wi.each=function(t,e){let n=0;for(const r of t)e(r,n),n++};var Li={everyAsync:void 0};const Vi=J;Li.everyAsync=function(t,e){return(0,Vi.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(!await e(r,n))return!1;n++}return!0}(t):async function(t){let n=0;for(const r of t){if(!await e(r,n))return!1;n++}return!0}(t)};var Ki={};Ki.every=void 0,Ki.every=function(t,e){let n=0;for(const r of t){if(!e(r,n))return!1;n++}return!0};var Yi={findAsync:void 0};const Hi=J;Yi.findAsync=function(t,e){return(0,Hi.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return r;n++}return}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return r;n++}return}(t)};var $i={};$i.find=void 0,$i.find=function(t,e){let n=0;for(const r of t){if(e(r,n))return r;n++}};var Qi={};Qi.firstAsync=void 0,Qi.firstAsync=async function(t){for await(const e of t)return e};var Xi={};Xi.first=void 0,Xi.first=function(t){for(const e of t)return e};var Gi={};Gi.includesAsync=void 0,Gi.includesAsync=async function(t,e){for await(const n of t)if(n===e)return!0;return!1};var Zi={};Zi.includes=void 0,Zi.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1};var ta={};ta.matchAsync=void 0,ta.matchAsync=async function(t,e){const n=e.length;let r=0;for await(const o of t)if(o===e[r]&&r++,r===n)return!0;return!1};var ea={};ea.match=void 0,ea.match=function(t,e){const n=e.length;let r=0;for(const o of t)if(o===e[r]&&r++,r===n)return!0;return!1};var na={reduceAsync:void 0};const ra=J;na.reduceAsync=function(t,e,n){return(0,ra.isUndefined)(n)?function(t,e){return(0,ra.isAsyncIterable)(t)?n(t):r(t);async function n(t){var n;const r=t[Symbol.asyncIterator]();let o;try{let t,a=await i(r),s=1;for(;({value:t,done:o}=await r.next()),!o;)a=await e(a,t,s++);return a}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}async function i(t){const e=await t.next();if(e.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}async function r(t){var n;const r=t[Symbol.iterator]();let o;try{let t,a=i(r),s=1;for(;({value:t,done:o}=r.next()),!o;)a=await e(a,t,s++);return a}finally{o||null===(n=r.return)||void 0===n||n.call(r)}function i(t){const e=t.next();if(e.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}}(t,e):function(t,e,n){return(0,ra.isAsyncIterable)(t)?o(t):r(t);async function r(t){let r=n,o=0;for(const n of t)r=await e(r,n,o++);return r}async function o(t){let r=n,o=0;for await(const n of t)r=await e(r,n,o++);return r}}(t,e,n)};var oa={reduce:void 0};const ia=J;oa.reduce=function(t,e,n){return(0,ia.isUndefined)(n)?function(t,e){var n;const r=t[Symbol.iterator]();let o;try{let t,a=i(r),s=1;for(;({value:t,done:o}=r.next()),!o;)a=e(a,t,s++);return a}finally{o||null===(n=r.return)||void 0===n||n.call(r)}function i(t){const e=t.next();if(e.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}(t,e):function(t,e,n){let r=n,o=0;for(const n of t)r=e(r,n,o++);return r}(t,e,n)};var aa={someAsync:void 0};const sa=J;aa.someAsync=function(t,e){return(0,sa.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return!0;n++}return!1}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return!0;n++}return!1}(t)};var ca={};ca.some=void 0,ca.some=function(t,e){let n=0;for(const r of t){if(e(r,n))return!0;n++}return!1};var ua={};ua.lastAsync=void 0,ua.lastAsync=async function(t){var e;const n=t[Symbol.asyncIterator]();let r;try{let t,o;for(;({value:t,done:r}=await n.next()),!r;)o=t;return o}finally{r||await(null===(e=n.return)||void 0===e?void 0:e.call(n))}};var la={};la.last=void 0,la.last=function(t){var e;const n=t[Symbol.iterator]();let r;try{let t,o;for(;({value:t,done:r}=n.next()),!r;)o=t;return o}finally{r||null===(e=n.return)||void 0===e||e.call(n)}};var fa={toArrayAsync:void 0};const da=Di;fa.toArrayAsync=function(t){return(0,da.consume)(t,(async t=>{const e=[];for await(const n of t)e.push(n);return e}))};var ya={toArray:void 0};const ha=Di;ya.toArray=function(t){return(0,ha.consume)(t,(t=>Array.from(t)))};var va={toSetAsync:void 0};const pa=Di;va.toSetAsync=function(t){return(0,pa.consume)(t,(async t=>{const e=new Set;for await(const n of t)e.add(n);return e}))};var ma={toSet:void 0};const ba=Di;ma.toSet=function(t){return(0,ba.consume)(t,(t=>new Set(t)))},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(Di,t),n(Fi,t),n(Wi,t),n(Li,t),n(Ki,t),n(Yi,t),n($i,t),n(Qi,t),n(Xi,t),n(Gi,t),n(Zi,t),n(ta,t),n(ea,t),n(na,t),n(oa,t),n(aa,t),n(ca,t),n(ua,t),n(la,t),n(fa,t),n(ya,t),n(va,t),n(ma,t)}(Ui),function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(p,t),n(Ui,t)}(v);var ga={},wa={};wa.traverseErrorPrototypeChain=void 0,wa.traverseErrorPrototypeChain=function*(t){let e=t;for(;(e=Object.getPrototypeOf(e))&&(yield e,e!==Error.prototype););},ga.getErrorNames=void 0;const Aa=J,Sa=wa;ga.getErrorNames=function*(t){var e;if((0,Aa.isError)(t))for(const n of(0,Sa.traverseErrorPrototypeChain)(t))(null===(e=n.constructor)||void 0===e?void 0:e.name)&&(yield n.constructor.name);else yield t.name,yield*t.ancestors};var Ia={isSerializableError:void 0};const _a=J;Ia.isSerializableError=function(t){return(0,_a.isObject)(t)&&(0,_a.isString)(t.name)&&(0,_a.isString)(t.message)&&((0,_a.isString)(t.stack)||(0,_a.isNull)(t.stack))&&(0,_a.isArray)(t.ancestors)&&t.ancestors.every(_a.isString)},h.CustomError=void 0;const xa=v,Ta=ga,Ea=J,Oa=Ia;class ja extends Error{get name(){var t,e;return null!==(e=null!==(t=(0,xa.first)((0,Ta.getErrorNames)(this)))&&void 0!==t?t:ja.name)&&void 0!==e?e:"CustomError"}static[Symbol.hasInstance](t){var e;if((0,Ea.isError)(t)||(0,Oa.isSerializableError)(t)){const n=[null!==(e=this.prototype.constructor.name)&&void 0!==e?e:this.name,...(0,Ta.getErrorNames)(this.prototype)].reverse(),r=(0,xa.toArray)((0,Ta.getErrorNames)(t)).reverse();return n.every(((t,e)=>t===r[e]))}return!1}}h.CustomError=ja;var ka={AssertionError:void 0};const Na=h;class Ba extends Na.CustomError{}ka.AssertionError=Ba;var Pa={normalize:void 0};const Ma=ga,qa=v;Pa.normalize=function(t){var e;const[n,...r]=(0,qa.toArray)((0,Ma.getErrorNames)(t));return{name:n,ancestors:r,message:t.message,stack:null!==(e=t.stack)&&void 0!==e?e:null}};var Ca={},za={},Ra={};Ra.pass=void 0,Ra.pass=function(){},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]});(d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)})(Ra,t)}(za),Ca.hydrate=void 0;const Ua=za;function Da(t,e){const n=function(){(0,Ua.pass)()};return(n.prototype=Object.create(t.prototype)).constructor=n,Object.defineProperty(n,"name",{value:e}),n}Ca.hydrate=function(t){var e;const n=[t.name,...t.ancestors].slice(0,-1).reverse();let r=Error;for(const t of n)r=Da(r,t);const o=new r;return o.name=t.name,o.message=t.message,o.stack=null!==(e=t.stack)&&void 0!==e?e:void 0,o};var Fa={assert:void 0};const Ja=ka;Fa.assert=function(t,e){if(!t)throw new Ja.AssertionError(e)},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(h,t),n(ka,t),n(Ia,t),n(Pa,t),n(Ca,t),n(Fa,t),n(ga,t),n(wa,t)}(y);var Wa={},La={},Va={},Ka={},Ya={};Ya.go=void 0,Ya.go=function(t){return t()},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]});(d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)})(Ya,t)}(Ka),Va.chunkAsync=void 0;const Ha=Ka,$a=y;Va.chunkAsync=function(t,e){return(0,$a.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,$a.assert)(e>0,"The parameter size must be greater than 0"),(0,Ha.go)((async function*(){let n=[];for await(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var Qa={},Xa={},Ga={};function Za(t){return Array.isArray(t)}Ga.isntEmptyArray=Ga.isEmptyArray=Ga.isntArray=Ga.isArray=void 0,Ga.isArray=Za,Ga.isntArray=function(t){return!Za(t)},Ga.isEmptyArray=function(t){return 0===t.length},Ga.isntEmptyArray=function(t){return 0!==t.length};var ts={},es={};function ns(t){return null===t}es.isntNull=es.isNull=void 0,es.isNull=ns,es.isntNull=function(t){return!ns(t)};var rs={};function os(t){return void 0===t}rs.isntUndefined=rs.isUndefined=void 0,rs.isUndefined=os,rs.isntUndefined=function(t){return!os(t)};var is={};function as(t){return"function"==typeof t}is.isntFunction=is.isFunction=void 0,is.isFunction=as,is.isntFunction=function(t){return!as(t)},ts.isntAsyncIterable=ts.isAsyncIterable=void 0;const ss=es,cs=rs,us=is;function ls(t){return(0,ss.isntNull)(t)&&(0,cs.isntUndefined)(t)&&(0,us.isFunction)(t[Symbol.asyncIterator])}ts.isAsyncIterable=ls,ts.isntAsyncIterable=function(t){return!ls(t)};var fs={};function ds(t){return"bigint"==typeof t}fs.isntBigInt=fs.isBigInt=void 0,fs.isBigInt=ds,fs.isntBigInt=function(t){return!ds(t)};var ys={};function hs(t){return"boolean"==typeof t}ys.isntBoolean=ys.isBoolean=void 0,ys.isBoolean=hs,ys.isntBoolean=function(t){return!hs(t)};var vs={},ps={};function ms(t){return"string"==typeof t}ps.isntString=ps.isString=void 0,ps.isString=ms,ps.isntString=function(t){return!ms(t)},vs.isntChar=vs.isChar=void 0;const bs=ps;function gs(t){return(0,bs.isString)(t)&&1===t.length}vs.isChar=gs,vs.isntChar=function(t){return!gs(t)};var ws={};function As(t){return t instanceof Date}ws.isntDate=ws.isDate=void 0,ws.isDate=As,ws.isntDate=function(t){return!As(t)};var Ss={};Ss.inEnum=void 0,Ss.inEnum=function(t,e){return Object.values(e).includes(t)};var Is={};function _s(t){return t instanceof Error}Is.isntError=Is.isError=void 0,Is.isError=_s,Is.isntError=function(t){return!_s(t)};var xs={};function Ts(t){return!t}xs.isntFalsy=xs.isFalsy=void 0,xs.isFalsy=Ts,xs.isntFalsy=function(t){return!Ts(t)};var Es={};Es.isntIterable=Es.isIterable=void 0;const Os=es,js=rs,ks=is;function Ns(t){return(0,Os.isntNull)(t)&&(0,js.isntUndefined)(t)&&(0,ks.isFunction)(t[Symbol.iterator])}Es.isIterable=Ns,Es.isntIterable=function(t){return!Ns(t)};var Bs={},Ps={};function Ms(t){return"number"==typeof t}function qs(t){return Number.isNaN(t)}Ps.isntNaN=Ps.isNaN=Ps.isNegativeInfinity=Ps.isPositiveInfinity=Ps.isFinite=Ps.isntNumber=Ps.isNumber=void 0,Ps.isNumber=Ms,Ps.isntNumber=function(t){return!Ms(t)},Ps.isFinite=function(t){return Number.isFinite(t)},Ps.isPositiveInfinity=function(t){return t===1/0},Ps.isNegativeInfinity=function(t){return t===-1/0},Ps.isNaN=qs,Ps.isntNaN=function(t){return!qs(t)};var Cs={},zs="object"==typeof d&&d&&d.Object===Object&&d,Rs="object"==typeof self&&self&&self.Object===Object&&self,Us=(zs||Rs||Function("return this")()).Symbol,Ds=Us,Fs=Object.prototype,Js=Fs.hasOwnProperty,Ws=Fs.toString,Ls=Ds?Ds.toStringTag:void 0;var Vs=function(t){var e=Js.call(t,Ls),n=t[Ls];try{t[Ls]=void 0;var r=!0}catch(t){}var o=Ws.call(t);return r&&(e?t[Ls]=n:delete t[Ls]),o},Ks=Object.prototype.toString;var Ys=Vs,Hs=function(t){return Ks.call(t)},$s=Us?Us.toStringTag:void 0;var Qs=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":$s&&$s in Object(t)?Ys(t):Hs(t)};var Xs=function(t,e){return function(n){return t(e(n))}}(Object.getPrototypeOf,Object);var Gs=Qs,Zs=Xs,tc=function(t){return null!=t&&"object"==typeof t},ec=Function.prototype,nc=Object.prototype,rc=ec.toString,oc=nc.hasOwnProperty,ic=rc.call(Object);var ac=function(t){if(!tc(t)||"[object Object]"!=Gs(t))return!1;var e=Zs(t);if(null===e)return!0;var n=oc.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&rc.call(n)==ic},sc=d&&d.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Cs.isntEmptyObject=Cs.isEmptyObject=Cs.isntPlainObject=Cs.isPlainObject=Cs.isntObject=Cs.isObject=void 0;const cc=sc(ac);function uc(t){return null!==t&&"object"==typeof t}function lc(t){return(0,cc.default)(t)}Cs.isObject=uc,Cs.isntObject=function(t){return!uc(t)},Cs.isPlainObject=lc,Cs.isntPlainObject=function(t){return!lc(t)},Cs.isEmptyObject=function(t){return 0===Object.keys(t).length},Cs.isntEmptyObject=function(t){return 0!==Object.keys(t).length},Bs.isntJsonable=Bs.isJsonable=Bs.isntJson=Bs.isJson=void 0;const fc=es,dc=ys,yc=ps,hc=Ps,vc=Ga,pc=Cs;function mc(t){return(0,fc.isNull)(t)||(0,dc.isBoolean)(t)||(0,yc.isString)(t)||(0,hc.isNumber)(t)||(0,vc.isArray)(t)&&t.every(mc)||(0,pc.isPlainObject)(t)&&Object.values(t).every(mc)}Bs.isJson=mc,Bs.isntJson=function(t){return!mc(t)},Bs.isJsonable=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},Bs.isntJsonable=function t(e){return!t()};var bc={};bc.isPromiseLike=bc.isntPromiseLike=bc.isntPromise=bc.isPromise=void 0;const gc=Cs,wc=is;function Ac(t){return t instanceof Promise}function Sc(t){return(0,gc.isObject)(t)&&(0,wc.isFunction)(t.then)}bc.isPromise=Ac,bc.isntPromise=function(t){return!Ac(t)},bc.isntPromiseLike=function(t){return!Sc(t)},bc.isPromiseLike=Sc;var Ic={};Ic.isAbsoluteURL=void 0,Ic.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(Ga,t),n(ts,t),n(fs,t),n(ys,t),n(vs,t),n(ws,t),n(Ss,t),n(Is,t),n(xs,t),n(is,t),n(Es,t),n(Bs,t),n(es,t),n(Ps,t),n(Cs,t),n(bc,t),n(ps,t),n(rs,t),n(Ic,t)}(Xa),Qa.chunkByAsync=void 0;const _c=Xa;Qa.chunkByAsync=function(t,e){return(0,_c.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const o of t)n.push(o),await e(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t):async function*(t){let n=[],r=0;for(const o of t)n.push(o),await e(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t)};var xc={};xc.chunkBy=void 0,xc.chunkBy=function*(t,e){let n=[],r=0;for(const o of t)n.push(o),e(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)};var Tc={chunk:void 0};const Ec=Ka,Oc=y;Tc.chunk=function(t,e){return(0,Oc.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,Oc.assert)(e>0,"The parameter size must be greater than 0"),(0,Ec.go)((function*(){let n=[];for(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var jc={concatAsync:void 0};const kc=Xa,Nc=Ka;jc.concatAsync=function(t,...e){return(0,Nc.go)((async function*(){for(const n of[t,...e])if((0,kc.isAsyncIterable)(n))for await(const t of n)yield t;else for(const t of n)yield t}))};var Bc={concat:void 0};const Pc=Ka;Bc.concat=function(t,...e){return(0,Pc.go)((function*(){for(const n of[t,...e])yield*n}))};var Mc={},qc={};qc.copyIterable=qc.copyAsyncIterable=void 0,qc.copyAsyncIterable=async function*(t){for await(const e of t)yield e},qc.copyIterable=function*(t){for(const e of t)yield e},Mc.dropAsync=void 0;const Cc=Ka,zc=qc,Rc=y;Mc.dropAsync=function(t,e){return(0,Rc.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Rc.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,zc.copyAsyncIterable)(t):(0,Cc.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let o;try{let t;for(;!(({value:t,done:o}=await r.next()),o||e<=0);)e--;for(;!o;)yield t,({value:t,done:o}=await r.next())}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var Uc={dropRightAsync:void 0};const Dc=Ka,Fc=qc,Jc=y;Uc.dropRightAsync=function(t,e){return(0,Jc.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Jc.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Fc.copyAsyncIterable)(t):(0,Dc.go)((async function*(){const n=(await async function(t){const e=[];for await(const n of t)e.push(n);return e}(t)).slice(0,-e);for(const t of n)yield t}))};var Wc={dropRight:void 0};const Lc=Ka,Vc=qc,Kc=y;Wc.dropRight=function(t,e){return(0,Kc.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Kc.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Vc.copyIterable)(t):(0,Lc.go)((function*(){const n=Array.from(t);yield*n.slice(0,-e)}))};var Yc={dropUntilAsync:void 0};const Hc=Xa;Yc.dropUntilAsync=function(t,e){return(0,Hc.isAsyncIterable)(t)?async function*(t){var n;const r=t[Symbol.asyncIterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=await r.next()),o||await e(t,i++)););for(;!o;)yield t,({value:t,done:o}=await r.next())}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}(t):async function*(t){var n;const r=t[Symbol.iterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=r.next()),o||await e(t,i++)););for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}(t)};var $c={};$c.dropUntil=void 0,$c.dropUntil=function*(t,e){var n;const r=t[Symbol.iterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=r.next()),o||e(t,i++)););for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}};var Qc={drop:void 0};const Xc=Ka,Gc=qc,Zc=y;Qc.drop=function(t,e){return(0,Zc.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Zc.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Gc.copyIterable)(t):(0,Xc.go)((function*(){var n;const r=t[Symbol.iterator]();let o;try{let t;for(;!(({value:t,done:o}=r.next()),o||e<=0);)e--;for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}))};var tu={filterAsync:void 0};const eu=Xa;tu.filterAsync=function(t,e){return(0,eu.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n)&&(yield r),n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n)&&(yield r),n++}(t)};var nu={};nu.filter=void 0,nu.filter=function*(t,e){let n=0;for(const r of t)e(r,n)&&(yield r),n++};var ru={},ou={},iu={flattenByAsync:void 0};const au=Xa;function su(t){return(0,au.isIterable)(t)&&(0,au.isntChar)(t)}iu.flattenByAsync=function(t,e){return(0,au.isAsyncIterable)(t)?async function*(t){const r=1;for await(const o of t)su(o)&&await e(o,r)?yield*n(o,r+1):yield o}(t):function(t){return n(t,1)}(t);async function*n(t,r){for(const o of t)su(o)&&await e(o,r)?yield*n(o,r+1):yield o}},ou.flattenDeepAsync=void 0;const cu=iu,uu=y;ou.flattenDeepAsync=function(t,e=1/0){return(0,uu.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,uu.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,cu.flattenByAsync)(t,((t,n)=>n<=e))},ru.flattenAsync=void 0;const lu=ou;ru.flattenAsync=function(t){return(0,lu.flattenDeepAsync)(t,1)};var fu={flattenBy:void 0};const du=Xa;fu.flattenBy=function(t,e){return function*t(n,r){for(const i of n)o=i,(0,du.isIterable)(o)&&(0,du.isntChar)(o)&&e(i,r)?yield*t(i,r+1):yield i;var o}(t,1)};var yu={flattenDeep:void 0};const hu=fu,vu=y;yu.flattenDeep=function(t,e=1/0){return(0,vu.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,vu.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,hu.flattenBy)(t,((t,n)=>n<=e))};var pu={flatten:void 0};const mu=yu;pu.flatten=function(t){return(0,mu.flattenDeep)(t,1)};var bu={mapAsync:void 0};const gu=Xa;bu.mapAsync=function(t,e){return(0,gu.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)yield await e(r,n),n++}(t):async function*(t){let n=0;for(const r of t)yield await e(r,n),n++}(t)};var wu={};wu.map=void 0,wu.map=function*(t,e){let n=0;for(const r of t)yield e(r,n),n++};var Au={repeatAsync:void 0};const Su=Ka,Iu=y;Au.repeatAsync=function(t,e){return(0,Iu.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,Iu.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===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,Su.go)((async function*(){const n=[];if(e>0){for await(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var _u={repeat:void 0};const xu=Ka,Tu=y;_u.repeat=function(t,e){return(0,Tu.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,Tu.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===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,xu.go)((function*(){const n=[];if(e>0){for(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var Eu={sliceAsync:void 0};const Ou=Ka,ju=y;Eu.sliceAsync=function(t,e,n=1/0){return(0,ju.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,ju.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,ju.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,ju.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,Ou.go)((async function*(){let r=0;for await(const o of t){if(r>=n)break;r>=e&&(yield o),r++}}))};var ku={slice:void 0};const Nu=Ka,Bu=y;ku.slice=function(t,e,n=1/0){return(0,Bu.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,Bu.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,Bu.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Bu.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,Nu.go)((function*(){let r=0;for(const o of t){if(r>=n)break;r>=e&&(yield o),r++}}))};var Pu={};Pu.splitAsync=void 0,Pu.splitAsync=async function*(t,e){let n=[];for await(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Mu={splitByAsync:void 0};const qu=Xa;Mu.splitByAsync=function(t,e){return(0,qu.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const o of t)await e(o,r)?(yield n,n=[]):n.push(o),r++;yield n}(t):async function*(t){let n=[],r=0;for(const o of t)await e(o,r)?(yield n,n=[]):n.push(o),r++;yield n}(t)};var Cu={};Cu.splitBy=void 0,Cu.splitBy=function*(t,e){let n=[],r=0;for(const o of t)e(o,r)?(yield n,n=[]):n.push(o),r++;yield n};var zu={};zu.split=void 0,zu.split=function*(t,e){let n=[];for(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Ru={takeAsync:void 0};const Uu=Ka,Du=y;Ru.takeAsync=function(t,e){return(0,Du.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Du.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Uu.go)((async function*(){if(0!==e)for await(const n of t)if(yield n,0===--e)break}))};var Fu={takeRightAsync:void 0};const Ju=Ka,Wu=y;Fu.takeRightAsync=function(t,e){return(0,Wu.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Wu.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Ju.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let o;try{const t=[];let i;for(;({value:i,done:o}=await r.next()),!o;)t.push(i),t.length>e&&t.shift();yield*t}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var Lu={takeRight:void 0};const Vu=Ka,Ku=y;Lu.takeRight=function(t,e){return(0,Ku.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Ku.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Vu.go)((function*(){var n;const r=t[Symbol.iterator]();let o;try{const t=[];let i;for(;({value:i,done:o}=r.next()),!o;)t.push(i),t.length>e&&t.shift();yield*t}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}))};var Yu={takeUntilAsync:void 0};const Hu=Xa;Yu.takeUntilAsync=function(t,e){return(0,Hu.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t){if(await e(r,n))break;yield r,n++}}(t):async function*(t){let n=0;for(const r of t){if(await e(r,n))break;yield r,n++}}(t)};var $u={};$u.takeUntil=void 0,$u.takeUntil=function*(t,e){let n=0;for(const r of t){if(e(r,n))break;yield r,n++}};var Qu={take:void 0};const Xu=Ka,Gu=y;Qu.take=function(t,e){return(0,Gu.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Gu.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Xu.go)((function*(){if(0!==e)for(const n of t)if(yield n,0===--e)break}))};var Zu={tapAsync:void 0};const tl=Xa;Zu.tapAsync=function(t,e){return(0,tl.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n),yield r,n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n),yield r,n++}(t)};var el={};el.tap=void 0,el.tap=function*(t,e){let n=0;for(const r of t)e(r,n),yield r,n++};var nl={};nl.toAsyncIterable=void 0,nl.toAsyncIterable=async function*(t){for(const e of t)yield e};var rl={};rl.transformAsync=void 0,rl.transformAsync=async function*(t,e){yield*e(t)};var ol={};ol.transform=void 0,ol.transform=function*(t,e){yield*e(t)};var il={};il.uniqAsync=void 0,il.uniqAsync=async function*(t){const e=new Set;for await(const n of t)e.has(n)||(yield n,e.add(n))};var al={uniqByAsync:void 0};const sl=Xa;al.uniqByAsync=function(t,e){return(0,sl.isAsyncIterable)(t)?async function*(t){const n=new Set;let r=0;for await(const o of t){const t=await e(o,r);n.has(t)||(yield o,n.add(t)),r++}}(t):async function*(t){const n=new Set;let r=0;for(const o of t){const t=await e(o,r);n.has(t)||(yield o,n.add(t)),r++}}(t)};var cl={};cl.uniqBy=void 0,cl.uniqBy=function*(t,e){const n=new Set;let r=0;for(const o of t){const t=e(o,r);n.has(t)||(yield o,n.add(t)),r++}};var ul={};ul.uniq=void 0,ul.uniq=function*(t){const e=new Set;for(const n of t)e.has(n)||(yield n,e.add(n))};var ll={zipAsync:void 0};const fl=Xa;var dl;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(dl||(dl={})),ll.zipAsync=function(t,...e){return async function*(...t){var e,n,r,o;const i=t.length,a=t.map((t=>(0,fl.isAsyncIterable)(t)?[dl.Async,t[Symbol.asyncIterator]()]:[dl.Sync,t[Symbol.iterator]()])),s=a.map((()=>!1));try{for(;;){const t=new Array(i);for(let e=0;e<i;e++){const[n,r]=a[e];let o;if(o=n===dl.Async?await r.next():r.next(),o.done)return void(s[e]=!0);t[e]=o.value}yield t}}finally{const t=a.filter(((t,e)=>!s[e]));for(const[i,a]of t)i===dl.Async?await(null===(n=(e=a).return)||void 0===n?void 0:n.call(e)):null===(o=(r=a).return)||void 0===o||o.call(r)}}(t,...e)};var yl={};yl.zip=void 0,yl.zip=function(t,...e){return function*(...t){const e=t.length,n=t.map((t=>t[Symbol.iterator]())),r=n.map((()=>!1));try{for(;;){const t=new Array(e);for(let o=0;o<e;o++){const{value:e,done:i}=n[o].next();if(i)return void(r[o]=!0);t[o]=e}yield t}}finally{n.filter(((t,e)=>!r[e])).forEach((t=>{var e;return null===(e=t.return)||void 0===e?void 0:e.call(t)}))}}(t,...e)},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(Va,t),n(Qa,t),n(xc,t),n(Tc,t),n(jc,t),n(Bc,t),n(Mc,t),n(Uc,t),n(Wc,t),n(Yc,t),n($c,t),n(Qc,t),n(tu,t),n(nu,t),n(ru,t),n(iu,t),n(fu,t),n(ou,t),n(yu,t),n(pu,t),n(bu,t),n(wu,t),n(Au,t),n(_u,t),n(Eu,t),n(ku,t),n(Pu,t),n(Mu,t),n(Cu,t),n(zu,t),n(Ru,t),n(Fu,t),n(Lu,t),n(Yu,t),n($u,t),n(Qu,t),n(Zu,t),n(el,t),n(nl,t),n(rl,t),n(ol,t),n(il,t),n(al,t),n(cl,t),n(ul,t),n(ll,t),n(yl,t)}(La);var hl={},vl={};vl.consume=void 0,vl.consume=function(t,e){return e(t)};var pl={eachAsync:void 0};const ml=Xa;pl.eachAsync=function(t,e){return(0,ml.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t)await e(r,n),n++}(t):async function(t){let n=0;for(const r of t)await e(r,n),n++}(t)};var bl={};bl.each=void 0,bl.each=function(t,e){let n=0;for(const r of t)e(r,n),n++};var gl={everyAsync:void 0};const wl=Xa;gl.everyAsync=function(t,e){return(0,wl.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(!await e(r,n))return!1;n++}return!0}(t):async function(t){let n=0;for(const r of t){if(!await e(r,n))return!1;n++}return!0}(t)};var Al={};Al.every=void 0,Al.every=function(t,e){let n=0;for(const r of t){if(!e(r,n))return!1;n++}return!0};var Sl={findAsync:void 0};const Il=Xa;Sl.findAsync=function(t,e){return(0,Il.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return r;n++}return}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return r;n++}return}(t)};var _l={};_l.find=void 0,_l.find=function(t,e){let n=0;for(const r of t){if(e(r,n))return r;n++}};var xl={};xl.firstAsync=void 0,xl.firstAsync=async function(t){for await(const e of t)return e};var Tl={};Tl.first=void 0,Tl.first=function(t){for(const e of t)return e};var El={};El.includesAsync=void 0,El.includesAsync=async function(t,e){for await(const n of t)if(n===e)return!0;return!1};var Ol={};Ol.includes=void 0,Ol.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1};var jl={};jl.matchAsync=void 0,jl.matchAsync=async function(t,e){const n=e.length;let r=0;for await(const o of t)if(o===e[r]&&r++,r===n)return!0;return!1};var kl={};kl.match=void 0,kl.match=function(t,e){const n=e.length;let r=0;for(const o of t)if(o===e[r]&&r++,r===n)return!0;return!1};var Nl={reduceAsync:void 0};const Bl=Xa;Nl.reduceAsync=function(t,e,n){return(0,Bl.isUndefined)(n)?function(t,e){return(0,Bl.isAsyncIterable)(t)?n(t):r(t);async function n(t){var n;const r=t[Symbol.asyncIterator]();let o;try{let t,a=await i(r),s=1;for(;({value:t,done:o}=await r.next()),!o;)a=await e(a,t,s++);return a}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}async function i(t){const e=await t.next();if(e.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}async function r(t){var n;const r=t[Symbol.iterator]();let o;try{let t,a=i(r),s=1;for(;({value:t,done:o}=r.next()),!o;)a=await e(a,t,s++);return a}finally{o||null===(n=r.return)||void 0===n||n.call(r)}function i(t){const e=t.next();if(e.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}}(t,e):function(t,e,n){return(0,Bl.isAsyncIterable)(t)?o(t):r(t);async function r(t){let r=n,o=0;for(const n of t)r=await e(r,n,o++);return r}async function o(t){let r=n,o=0;for await(const n of t)r=await e(r,n,o++);return r}}(t,e,n)};var Pl={reduce:void 0};const Ml=Xa;Pl.reduce=function(t,e,n){return(0,Ml.isUndefined)(n)?function(t,e){var n;const r=t[Symbol.iterator]();let o;try{let t,a=i(r),s=1;for(;({value:t,done:o}=r.next()),!o;)a=e(a,t,s++);return a}finally{o||null===(n=r.return)||void 0===n||n.call(r)}function i(t){const e=t.next();if(e.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}(t,e):function(t,e,n){let r=n,o=0;for(const n of t)r=e(r,n,o++);return r}(t,e,n)};var ql={someAsync:void 0};const Cl=Xa;ql.someAsync=function(t,e){return(0,Cl.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return!0;n++}return!1}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return!0;n++}return!1}(t)};var zl={};zl.some=void 0,zl.some=function(t,e){let n=0;for(const r of t){if(e(r,n))return!0;n++}return!1};var Rl={};Rl.lastAsync=void 0,Rl.lastAsync=async function(t){var e;const n=t[Symbol.asyncIterator]();let r;try{let t,o;for(;({value:t,done:r}=await n.next()),!r;)o=t;return o}finally{r||await(null===(e=n.return)||void 0===e?void 0:e.call(n))}};var Ul={};Ul.last=void 0,Ul.last=function(t){var e;const n=t[Symbol.iterator]();let r;try{let t,o;for(;({value:t,done:r}=n.next()),!r;)o=t;return o}finally{r||null===(e=n.return)||void 0===e||e.call(n)}};var Dl={toArrayAsync:void 0};const Fl=vl;Dl.toArrayAsync=function(t){return(0,Fl.consume)(t,(async t=>{const e=[];for await(const n of t)e.push(n);return e}))};var Jl={toArray:void 0};const Wl=vl;Jl.toArray=function(t){return(0,Wl.consume)(t,(t=>Array.from(t)))};var Ll={toSetAsync:void 0};const Vl=vl;Ll.toSetAsync=function(t){return(0,Vl.consume)(t,(async t=>{const e=new Set;for await(const n of t)e.add(n);return e}))};var Kl={toSet:void 0};const Yl=vl;Kl.toSet=function(t){return(0,Yl.consume)(t,(t=>new Set(t)))};var Hl={};Hl.count=void 0,Hl.count=function(t){let e=0;for(const n of t)e++;return e};var $l,Ql,Xl={};Xl.countAsync=void 0,Xl.countAsync=async function(t){let e=0;for await(const n of t)e++;return e},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(vl,t),n(pl,t),n(bl,t),n(gl,t),n(Al,t),n(Sl,t),n(_l,t),n(xl,t),n(Tl,t),n(El,t),n(Ol,t),n(jl,t),n(kl,t),n(Nl,t),n(Pl,t),n(ql,t),n(zl,t),n(Rl,t),n(Ul,t),n(Dl,t),n(Jl,t),n(Ll,t),n(Kl,t),n(Hl,t),n(Xl,t)}(hl),function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(La,t),n(hl,t)}(Wa);class Gl{constructor(t){$l.set(this,void 0),Ql.set(this,new Map),y.assert(Number.isInteger(t),"The parameter limit must be an integer"),y.assert(t>0,"The parameter limit must be a positive value"),n(this,$l,t,"f")}get[($l=new WeakMap,Ql=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return e(this,Ql,"f").size}set(t,n){return e(this,Ql,"f").has(t)?this.updateItem(t,n):(e(this,Ql,"f").size===e(this,$l,"f")&&e(this,Ql,"f").delete(this.getColdestKey()),e(this,Ql,"f").set(t,n)),this}has(t){return e(this,Ql,"f").has(t)}get(t){if(!this.has(t))return;const n=e(this,Ql,"f").get(t);return this.updateItem(t,n),n}delete(t){return e(this,Ql,"f").delete(t)}clear(){e(this,Ql,"f").clear()}updateItem(t,n){e(this,Ql,"f").delete(t),e(this,Ql,"f").set(t,n)}getColdestKey(){return Wa.first(e(this,Ql,"f").keys())}}var Zl={},tf={},ef={},nf={};nf.random=void 0,nf.random=function(t,e){return Math.random()*(e-t)+t};var rf={};rf.randomInt=void 0,rf.randomInt=function(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t))+t};var of={};of.randomIntInclusive=void 0,of.randomIntInclusive=function(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(nf,t),n(rf,t),n(of,t)}(ef),tf.calculateExponentialBackoffTimeout=void 0;const af=ef;tf.calculateExponentialBackoffTimeout=function({baseTimeout:t,retries:e,maxTimeout:n=1/0,factor:r=2,jitter:o=!0}){const i=Math.min(r**e*t,n);return o?(0,af.randomIntInclusive)(0,i):i};var sf={};sf.setTimeout=void 0,sf.setTimeout=function(t,e){const n=globalThis.setTimeout(e,t);return()=>clearTimeout(n)};var cf={setSchedule:void 0};const uf=sf;cf.setSchedule=function(t,e){const n=t-Date.now();return(0,uf.setTimeout)(n,e)};var lf={};lf.setInterval=void 0,lf.setInterval=function(t,e){const n=globalThis.setInterval(e,t);return()=>clearInterval(n)};var ff={setImmediate:void 0};const df=sf;ff.setImmediate=function(t){if(globalThis.setImmediate){const e=globalThis.setImmediate(t);return()=>clearImmediate(e)}return(0,df.setTimeout)(0,t)};var yf={setTimeoutLoop:void 0};const hf=sf;yf.setTimeoutLoop=function(t,e){let n=!1,r=(0,hf.setTimeout)(t,(async function o(){await e(),n||(r=(0,hf.setTimeout)(t,o))}));return()=>{n=!0,r()}};var vf={setDynamicTimeoutLoop:void 0};const pf=sf;var mf,bf,gf,wf,Af,Sf,If;vf.setDynamicTimeoutLoop=function(t,e){let n=!1,r=(0,pf.setTimeout)(t,(async function o(){const i=Date.now();await e();const a=Date.now()-i;n||(r=(0,pf.setTimeout)(Math.max(t-a,0),o))}));return()=>{n=!0,r()}},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(tf,t),n(sf,t),n(cf,t),n(lf,t),n(ff,t),n(yf,t),n(vf,t)}(Zl);class _f{constructor(){mf.set(this,new Map),bf.set(this,void 0),this.itemMetadataSortedByExpirationTime=[]}get[(mf=new WeakMap,bf=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return e(this,mf,"f").size}set(t,n,r){return e(this,mf,"f").set(t,n),this.removeItemMetadata(t),this.addItemMetadata(t,Date.now()+r),this}has(t){return e(this,mf,"f").has(t)}get(t){return e(this,mf,"f").get(t)}delete(t){const n=e(this,mf,"f").delete(t);if(n){const e=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.key===t));this.itemMetadataSortedByExpirationTime.splice(e,1),0===e&&this.rescheduleClearTimeout()}return n}clear(){var t;e(this,mf,"f").clear(),null===(t=e(this,bf,"f"))||void 0===t||t.call(this),this.itemMetadataSortedByExpirationTime=[]}addItemMetadata(t,e){for(let n=0;n<this.itemMetadataSortedByExpirationTime.length;n++){if(e<this.itemMetadataSortedByExpirationTime[n].expirationTime)return this.itemMetadataSortedByExpirationTime.splice(n,0,{key:t,expirationTime:e}),void(0===n&&this.rescheduleClearTimeout())}this.itemMetadataSortedByExpirationTime.push({key:t,expirationTime:e}),1===this.itemMetadataSortedByExpirationTime.length&&this.rescheduleClearTimeout()}removeItemMetadata(t){const e=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.key===t));e>=0&&(this.itemMetadataSortedByExpirationTime.splice(e,1),0===e&&this.rescheduleClearTimeout())}clearExpiredItems(t){const n=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.expirationTime>t));(n>=0?this.itemMetadataSortedByExpirationTime.splice(0,n):this.itemMetadataSortedByExpirationTime.splice(0,this.itemMetadataSortedByExpirationTime.length)).forEach((t=>e(this,mf,"f").delete(t.key)))}rescheduleClearTimeout(){var t;if(null===(t=e(this,bf,"f"))||void 0===t||t.call(this),this.itemMetadataSortedByExpirationTime.length>0){const t=this.itemMetadataSortedByExpirationTime[0];if(Number.isFinite(t.expirationTime)){const e=Zl.setSchedule(t.expirationTime,(()=>{this.clearExpiredItems(Date.now()),this.rescheduleClearTimeout()}));n(this,bf,(()=>{e(),n(this,bf,void 0,"f")}),"f")}}}}class xf{constructor(t){gf.set(this,void 0),wf.set(this,new Map),Af.set(this,void 0),this.itemMetadataSortedByExpirationTime=[],y.assert(Number.isInteger(t),"The parameter limit must be an integer"),y.assert(t>0,"The parameter limit must be a positive value"),n(this,gf,t,"f")}get[(gf=new WeakMap,wf=new WeakMap,Af=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return e(this,wf,"f").size}set(t,n,r){return e(this,wf,"f").has(t)?(this.updateItem(t,n),this.removeItemMetadata(t),this.addItemMetadata(t,Date.now()+r)):(e(this,wf,"f").size===e(this,gf,"f")&&e(this,wf,"f").delete(this.getColdestKey()),e(this,wf,"f").set(t,n),this.addItemMetadata(t,Date.now()+r)),this}has(t){return e(this,wf,"f").has(t)}get(t){if(this.has(t)){const n=e(this,wf,"f").get(t);return this.updateItem(t,n),n}}delete(t){const n=e(this,wf,"f").delete(t);if(n){const e=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.key===t));this.itemMetadataSortedByExpirationTime.splice(e,1),0===e&&this.rescheduleClearTimeout()}return n}clear(){var t;e(this,wf,"f").clear(),null===(t=e(this,Af,"f"))||void 0===t||t.call(this),this.itemMetadataSortedByExpirationTime=[]}updateItem(t,n){e(this,wf,"f").delete(t),e(this,wf,"f").set(t,n)}addItemMetadata(t,e){for(let n=0;n<this.itemMetadataSortedByExpirationTime.length;n++){if(e<this.itemMetadataSortedByExpirationTime[n].expirationTime)return this.itemMetadataSortedByExpirationTime.splice(n,0,{key:t,expirationTime:e}),void(0===n&&this.rescheduleClearTimeout())}this.itemMetadataSortedByExpirationTime.push({key:t,expirationTime:e}),1===this.itemMetadataSortedByExpirationTime.length&&this.rescheduleClearTimeout()}removeItemMetadata(t){const e=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.key===t));e>=0&&(this.itemMetadataSortedByExpirationTime.splice(e,1),0===e&&this.rescheduleClearTimeout())}clearExpiredItems(t){const n=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.expirationTime>t));(n>=0?this.itemMetadataSortedByExpirationTime.splice(0,n):this.itemMetadataSortedByExpirationTime.splice(0,this.itemMetadataSortedByExpirationTime.length)).forEach((t=>e(this,wf,"f").delete(t.key)))}rescheduleClearTimeout(){var t;if(null===(t=e(this,Af,"f"))||void 0===t||t.call(this),this.itemMetadataSortedByExpirationTime.length>0){const t=this.itemMetadataSortedByExpirationTime[0];if(Number.isFinite(t.expirationTime)){const e=Zl.setSchedule(t.expirationTime,(()=>{this.clearExpiredItems(Date.now()),this.rescheduleClearTimeout()}));n(this,Af,(()=>{e(),n(this,Af,void 0,"f")}),"f")}}}getColdestKey(){return Wa.first(e(this,wf,"f").keys())}}class Tf{constructor(t){this.value=t,this.children=new Map}}class Ef{constructor(){Sf.set(this,new Tf)}get[(Sf=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}set(t,n){let r=e(this,Sf,"f");for(const e of t)r.children.has(e)||r.children.set(e,new Tf),r=r.children.get(e);return r.value=n,this}has(t){let n=e(this,Sf,"f");for(const e of t){if(!n.children.has(e))return!1;n=n.children.get(e)}return void 0!==n.value}get(t){let n=e(this,Sf,"f");for(const e of t){if(!n.children.has(e))return;n=n.children.get(e)}return n.value}delete(t){const n=[];let r=e(this,Sf,"f");for(const e of t){if(!r.children.has(e))return!1;n.push(r),r=r.children.get(e)}if(delete r.value,0===r.children.size)for(const[e,r]of Wa.toArray(Wa.zip(t,n)).reverse())if(r.children.delete(e),0!==r.children.size)break;return!0}}class Of{constructor(t,e){this.schema=t,If.set(this,void 0),n(this,If,e,"f")}get state(){return e(this,If,"f")}matches(t){return e(this,If,"f")===t}can(t){return t in this.schema[this.state]}send(t){if(!this.can(t))throw new jf(this.state,t);n(this,If,this.schema[this.state][t],"f")}}If=new WeakMap;class jf extends y.CustomError{constructor(t,e){super(`State ${t} cannot react to event ${e}`)}}
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation.
4
4
 
@@ -12,5 +12,5 @@
12
12
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
  PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */var kf=function(t,e){return(kf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function Nf(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}kf(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function Bf(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Pf(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function Mf(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}function qf(t){return"function"==typeof t}function Cf(t){var e=t((function(t){Error.call(t),t.stack=(new Error).stack}));return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var zf=Cf((function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}));function Rf(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Uf=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}var e;return t.prototype.unsubscribe=function(){var t,e,n,r,o;if(!this.closed){this.closed=!0;var i=this._parentage;if(i)if(this._parentage=null,Array.isArray(i))try{for(var a=Bf(i),s=a.next();!s.done;s=a.next()){s.value.remove(this)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else i.remove(this);var c=this.initialTeardown;if(qf(c))try{c()}catch(t){o=t instanceof zf?t.errors:[t]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var l=Bf(u),f=l.next();!f.done;f=l.next()){var d=f.value;try{Jf(d)}catch(t){o=null!=o?o:[],t instanceof zf?o=Mf(Mf([],Pf(o)),Pf(t.errors)):o.push(t)}}}catch(t){n={error:t}}finally{try{f&&!f.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}if(o)throw new zf(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Jf(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(e)}},t.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},t.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},t.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&Rf(e,t)},t.prototype.remove=function(e){var n=this._finalizers;n&&Rf(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}(),Df=Uf.EMPTY;function Ff(t){return t instanceof Uf||t&&"closed"in t&&qf(t.remove)&&qf(t.add)&&qf(t.unsubscribe)}function Jf(t){qf(t)?t():t.unsubscribe()}var Wf={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Lf=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Mf([t,e],Pf(n)))};function Vf(){}function Kf(t){t()}var Yf=function(t){function e(e){var n=t.call(this)||this;return n.isStopped=!1,e?(n.destination=e,Ff(e)&&e.add(n)):n.destination=Zf,n}return Nf(e,t),e.create=function(t,e,n){return new Xf(t,e,n)},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Uf),Hf=Function.prototype.bind;function $f(t,e){return Hf.call(t,e)}var Qf=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(t){Gf(t)}},t.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(t){Gf(t)}else Gf(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){Gf(t)}},t}(),Xf=function(t){function e(e,n,r){var o,i,a=t.call(this)||this;qf(e)||!e?o={next:null!=e?e:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:a&&Wf.useDeprecatedNextContext?((i=Object.create(e)).unsubscribe=function(){return a.unsubscribe()},o={next:e.next&&$f(e.next,i),error:e.error&&$f(e.error,i),complete:e.complete&&$f(e.complete,i)}):o=e;return a.destination=new Qf(o),a}return Nf(e,t),e}(Yf);function Gf(t){var e;e=t,Lf((function(){throw e}))}var Zf={closed:!0,next:Vf,error:function(t){throw t},complete:Vf},td="function"==typeof Symbol&&Symbol.observable||"@@observable";function ed(t){return t}function nd(t){return 0===t.length?ed:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}var rd=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r,o=this,i=(r=t)&&r instanceof Yf||function(t){return t&&qf(t.next)&&qf(t.error)&&qf(t.complete)}(r)&&Ff(r)?t:new Xf(t,e,n);return Kf((function(){var t=o,e=t.operator,n=t.source;i.add(e?e.call(i,n):n?o._subscribe(i):o._trySubscribe(i))})),i},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=od(e))((function(e,r){var o=new Xf({next:function(e){try{t(e)}catch(t){r(t),o.unsubscribe()}},error:r,complete:e});n.subscribe(o)}))},t.prototype._subscribe=function(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)},t.prototype[td]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return nd(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=od(t))((function(t,n){var r;e.subscribe((function(t){return r=t}),(function(t){return n(t)}),(function(){return t(r)}))}))},t.create=function(e){return new t(e)},t}();function od(t){var e;return null!==(e=null!=t?t:Wf.Promise)&&void 0!==e?e:Promise}function id(t){return qf(null==t?void 0:t.lift)}function ad(t,e,n,r,o){return new sd(t,e,n,r,o)}var sd=function(t){function e(e,n,r,o,i,a){var s=t.call(this,e)||this;return s.onFinalize=i,s.shouldUnsubscribe=a,s._next=n?function(t){try{n(t)}catch(t){e.error(t)}}:t.prototype._next,s._error=o?function(t){try{o(t)}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._error,s._complete=r?function(){try{r()}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._complete,s}return Nf(e,t),e.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;t.prototype.unsubscribe.call(this),!n&&(null===(e=this.onFinalize)||void 0===e||e.call(this))}},e}(Yf);function cd(){return t=function(t,e){var n=null;t._refCount++;var r=ad(e,void 0,void 0,void 0,(function(){if(!t||t._refCount<=0||0<--t._refCount)n=null;else{var r=t._connection,o=n;n=null,!r||o&&r!==o||r.unsubscribe(),e.unsubscribe()}}));t.subscribe(r),r.closed||(n=t.connect())},function(e){if(id(e))return e.lift((function(e){try{return t(e,this)}catch(t){this.error(t)}}));throw new TypeError("Unable to lift unknown Observable type")};var t}!function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subjectFactory=n,r._subject=null,r._refCount=0,r._connection=null,id(e)&&(r.lift=e.lift),r}Nf(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype._teardown=function(){this._refCount=0;var t=this._connection;this._subject=this._connection=null,null==t||t.unsubscribe()},e.prototype.connect=function(){var t=this,e=this._connection;if(!e){e=this._connection=new Uf;var n=this.getSubject();e.add(this.source.subscribe(ad(n,void 0,(function(){t._teardown(),n.complete()}),(function(e){t._teardown(),n.error(e)}),(function(){return t._teardown()})))),e.closed&&(this._connection=null,e=Uf.EMPTY)}return e},e.prototype.refCount=function(){return cd()(this)}}(rd);var ud,ld,fd={now:function(){return(fd.delegate||performance).now()},delegate:void 0},dd={schedule:function(t){var e=requestAnimationFrame,n=cancelAnimationFrame,r=e((function(e){n=void 0,t(e)}));return new Uf((function(){return null==n?void 0:n(r)}))},requestAnimationFrame:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=dd.delegate;return((null==n?void 0:n.requestAnimationFrame)||requestAnimationFrame).apply(void 0,Mf([],Pf(t)))},cancelAnimationFrame:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=dd.delegate;return((null==n?void 0:n.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,Mf([],Pf(t)))},delegate:void 0};ld=dd.schedule,new rd((function(t){var e=new Uf,n=ud||fd,r=n.now(),o=function(i){var a=n.now();t.next({timestamp:ud?a:i,elapsed:a-r}),t.closed||e.add(ld(o))};return e.add(ld(o)),e}));var yd=Cf((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),hd=function(t){function e(){var e=t.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return Nf(e,t),e.prototype.lift=function(t){var e=new vd(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new yd},e.prototype.next=function(t){var e=this;Kf((function(){var n,r;if(e._throwIfClosed(),!e.isStopped){e.currentObservers||(e.currentObservers=Array.from(e.observers));try{for(var o=Bf(e.currentObservers),i=o.next();!i.done;i=o.next()){i.value.next(t)}}catch(t){n={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}}))},e.prototype.error=function(t){var e=this;Kf((function(){if(e._throwIfClosed(),!e.isStopped){e.hasError=e.isStopped=!0,e.thrownError=t;for(var n=e.observers;n.length;)n.shift().error(t)}}))},e.prototype.complete=function(){var t=this;Kf((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}}))},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(e){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var e=this,n=this,r=n.hasError,o=n.isStopped,i=n.observers;return r||o?Df:(this.currentObservers=null,i.push(t),new Uf((function(){e.currentObservers=null,Rf(i,t)})))},e.prototype._checkFinalizedStatuses=function(t){var e=this,n=e.hasError,r=e.thrownError,o=e.isStopped;n?t.error(r):o&&t.complete()},e.prototype.asObservable=function(){var t=new rd;return t.source=this,t},e.create=function(t,e){return new vd(t,e)},e}(rd),vd=function(t){function e(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return Nf(e,t),e.prototype.next=function(t){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===n||n.call(e,t)},e.prototype.error=function(t){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===n||n.call(e,t)},e.prototype.complete=function(){var t,e;null===(e=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===e||e.call(t)},e.prototype._subscribe=function(t){var e,n;return null!==(n=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==n?n:Df},e}(hd);!function(t){function e(e){var n=t.call(this)||this;return n._value=e,n}Nf(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return!n.closed&&e.next(this._value),n},e.prototype.getValue=function(){var t=this,e=t.hasError,n=t.thrownError,r=t._value;if(e)throw n;return this._throwIfClosed(),r},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)}}(hd);var pd={now:function(){return(pd.delegate||Date).now()},delegate:void 0};!function(t){function e(e,n,r){void 0===e&&(e=1/0),void 0===n&&(n=1/0),void 0===r&&(r=pd);var o=t.call(this)||this;return o._bufferSize=e,o._windowTime=n,o._timestampProvider=r,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=n===1/0,o._bufferSize=Math.max(1,e),o._windowTime=Math.max(1,n),o}Nf(e,t),e.prototype.next=function(e){var n=this,r=n.isStopped,o=n._buffer,i=n._infiniteTimeWindow,a=n._timestampProvider,s=n._windowTime;r||(o.push(e),!i&&o.push(a.now()+s)),this._trimBuffer(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var e=this._innerSubscribe(t),n=this._infiniteTimeWindow,r=this._buffer.slice(),o=0;o<r.length&&!t.closed;o+=n?1:2)t.next(r[o]);return this._checkFinalizedStatuses(t),e},e.prototype._trimBuffer=function(){var t=this,e=t._bufferSize,n=t._timestampProvider,r=t._buffer,o=t._infiniteTimeWindow,i=(o?1:2)*e;if(e<1/0&&i<r.length&&r.splice(0,r.length-i),!o){for(var a=n.now(),s=0,c=1;c<r.length&&r[c]<=a;c+=2)s=c;s&&r.splice(0,s+1)}}}(hd),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._value=null,e._hasValue=!1,e._isComplete=!1,e}Nf(e,t),e.prototype._checkFinalizedStatuses=function(t){var e=this,n=e.hasError,r=e._hasValue,o=e._value,i=e.thrownError,a=e.isStopped,s=e._isComplete;n?t.error(i):(a||s)&&(r&&t.next(o),t.complete())},e.prototype.next=function(t){this.isStopped||(this._value=t,this._hasValue=!0)},e.prototype.complete=function(){var e=this,n=e._hasValue,r=e._value;e._isComplete||(this._isComplete=!0,n&&t.prototype.next.call(this,r),t.prototype.complete.call(this))}}(hd);var md,bd=function(t){function e(e,n){return t.call(this)||this}return Nf(e,t),e.prototype.schedule=function(t,e){return this},e}(Uf),gd=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,Mf([t,e],Pf(n)))},wd=function(t){return clearInterval(t)},Ad=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r.pending=!1,r}return Nf(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),gd(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return e;wd(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var n,r=!1;try{this.work(t)}catch(t){r=!0,n=t||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),n},e.prototype.unsubscribe=function(){if(!this.closed){var e=this.id,n=this.scheduler,r=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Rf(r,this),null!=e&&(this.id=this.recycleAsyncId(n,e,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(bd),Sd=1,Id={};function _d(t){return t in Id&&(delete Id[t],!0)}var xd=function(t){var e=Sd++;return Id[e]=!0,md||(md=Promise.resolve()),md.then((function(){return _d(e)&&t()})),e},Td=function(t){_d(t)},Ed={setImmediate:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Ed.delegate;return((null==n?void 0:n.setImmediate)||xd).apply(void 0,Mf([],Pf(t)))},clearImmediate:function(t){return Td(t)},delegate:void 0},Od=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return Nf(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e._scheduled||(e._scheduled=Ed.setImmediate(e.flush.bind(e,void 0))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);e.actions.some((function(t){return t.id===n}))||(Ed.clearImmediate(n),e._scheduled=void 0)},e}(Ad),jd=function(){function t(e,n){void 0===n&&(n=t.now),this.schedulerActionCtor=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.schedulerActionCtor(this,t).schedule(n,e)},t.now=pd.now,t}(),kd=function(t){function e(e,n){void 0===n&&(n=jd.now);var r=t.call(this,e,n)||this;return r.actions=[],r._active=!1,r._scheduled=void 0,r}return Nf(e,t),e.prototype.flush=function(t){var e=this.actions;if(this._active)e.push(t);else{var n;this._active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this._active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(jd);new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Nf(e,t),e.prototype.flush=function(t){this._active=!0;var e=this._scheduled;this._scheduled=void 0;var n,r=this.actions;t=t||r.shift();do{if(n=t.execute(t.state,t.delay))break}while((t=r[0])&&t.id===e&&r.shift());if(this._active=!1,n){for(;(t=r[0])&&t.id===e&&r.shift();)t.unsubscribe();throw n}},e}(kd))(Od),new kd(Ad);var Nd=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return Nf(e,t),e.prototype.schedule=function(e,n){return void 0===n&&(n=0),n>0?t.prototype.schedule.call(this,e,n):(this.delay=n,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,n){return n>0||this.closed?t.prototype.execute.call(this,e,n):this._execute(e,n)},e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0?t.prototype.requestAsyncId.call(this,e,n,r):e.flush(this)},e}(Ad);new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Nf(e,t),e}(kd))(Nd);var Bd=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return Nf(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e._scheduled||(e._scheduled=dd.requestAnimationFrame((function(){return e.flush(void 0)}))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);e.actions.some((function(t){return t.id===n}))||(dd.cancelAnimationFrame(n),e._scheduled=void 0)},e}(Ad);new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Nf(e,t),e.prototype.flush=function(t){this._active=!0;var e=this._scheduled;this._scheduled=void 0;var n,r=this.actions;t=t||r.shift();do{if(n=t.execute(t.state,t.delay))break}while((t=r[0])&&t.id===e&&r.shift());if(this._active=!1,n){for(;(t=r[0])&&t.id===e&&r.shift();)t.unsubscribe();throw n}},e}(kd))(Bd),function(t){function e(e,n){void 0===e&&(e=Md),void 0===n&&(n=1/0);var r=t.call(this,e,(function(){return r.frame}))||this;return r.maxFrames=n,r.frame=0,r.index=-1,r}Nf(e,t),e.prototype.flush=function(){for(var t,e,n=this.actions,r=this.maxFrames;(e=n[0])&&e.delay<=r&&(n.shift(),this.frame=e.delay,!(t=e.execute(e.state,e.delay))););if(t){for(;e=n.shift();)e.unsubscribe();throw t}},e.frameTimeFactor=10}(kd);var Pd,Md=function(t){function e(e,n,r){void 0===r&&(r=e.index+=1);var o=t.call(this,e,n)||this;return o.scheduler=e,o.work=n,o.index=r,o.active=!0,o.index=e.index=r,o}return Nf(e,t),e.prototype.schedule=function(n,r){if(void 0===r&&(r=0),Number.isFinite(r)){if(!this.id)return t.prototype.schedule.call(this,n,r);this.active=!1;var o=new e(this.scheduler,this.work);return this.add(o),o.schedule(n,r)}return Uf.EMPTY},e.prototype.requestAsyncId=function(t,n,r){void 0===r&&(r=0),this.delay=t.frame+r;var o=t.actions;return o.push(this),o.sort(e.sortActions),!0},e.prototype.recycleAsyncId=function(t,e,n){},e.prototype._execute=function(e,n){if(!0===this.active)return t.prototype._execute.call(this,e,n)},e.sortActions=function(t,e){return t.delay===e.delay?t.index===e.index?0:t.index>e.index?1:-1:t.delay>e.delay?1:-1},e}(Ad);new rd((function(t){return t.complete()})),function(t){t.NEXT="N",t.ERROR="E",t.COMPLETE="C"}(Pd||(Pd={})),Cf((function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}})),Cf((function(t){return function(){t(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})),Cf((function(t){return function(e){t(this),this.name="NotFoundError",this.message=e}})),Cf((function(t){return function(e){t(this),this.name="SequenceError",this.message=e}})),Cf((function(t){return function(e){void 0===e&&(e=null),t(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=e}})),new rd(Vf);t.BadEventError=jf,t.Box=class{constructor(t){r.set(this,void 0),n(this,r,t,"f")}set(t){n(this,r,t,"f")}get(){return e(this,r,"f")}},t.Emitter=c,t.ExpirableMap=_f,t.FiniteStateMachine=Of,t.HashMap=u,t.HashSet=l,t.LRUMap=Gl,t.ObservableFiniteStateMachine=class extends Of{constructor(){super(...arguments),this.stateChanges=new hd}observeStateChanges(){return this.stateChanges}send(t){const e=this.state;super.send(t);const n=this.state;this.stateChanges.next({event:t,oldState:e,newState:n}),Xa.isEmptyObject(this.schema[n])&&this.stateChanges.complete()}},t.Queue=f,t.TLRUMap=xf,t.TrieMap=Ef,t.convertArrayToCons=function t([e,...n]){return[e,n.length?t(n):null]},t.convertConsToArray=function t([e,n]){return null===n?[e]:[e,...t(n)]},Object.defineProperty(t,"__esModule",{value:!0})}));
15
+ ***************************************************************************** */var kf=function(t,e){return(kf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function Nf(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}kf(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function Bf(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Pf(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function Mf(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}function qf(t){return"function"==typeof t}function Cf(t){var e=t((function(t){Error.call(t),t.stack=(new Error).stack}));return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var zf=Cf((function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}));function Rf(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Uf=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}var e;return t.prototype.unsubscribe=function(){var t,e,n,r,o;if(!this.closed){this.closed=!0;var i=this._parentage;if(i)if(this._parentage=null,Array.isArray(i))try{for(var a=Bf(i),s=a.next();!s.done;s=a.next()){s.value.remove(this)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else i.remove(this);var c=this.initialTeardown;if(qf(c))try{c()}catch(t){o=t instanceof zf?t.errors:[t]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var l=Bf(u),f=l.next();!f.done;f=l.next()){var d=f.value;try{Jf(d)}catch(t){o=null!=o?o:[],t instanceof zf?o=Mf(Mf([],Pf(o)),Pf(t.errors)):o.push(t)}}}catch(t){n={error:t}}finally{try{f&&!f.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}if(o)throw new zf(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Jf(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(e)}},t.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},t.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},t.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&Rf(e,t)},t.prototype.remove=function(e){var n=this._finalizers;n&&Rf(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}(),Df=Uf.EMPTY;function Ff(t){return t instanceof Uf||t&&"closed"in t&&qf(t.remove)&&qf(t.add)&&qf(t.unsubscribe)}function Jf(t){qf(t)?t():t.unsubscribe()}var Wf={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Lf=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Mf([t,e],Pf(n)))};function Vf(){}function Kf(t){t()}var Yf=function(t){function e(e){var n=t.call(this)||this;return n.isStopped=!1,e?(n.destination=e,Ff(e)&&e.add(n)):n.destination=Zf,n}return Nf(e,t),e.create=function(t,e,n){return new Xf(t,e,n)},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Uf),Hf=Function.prototype.bind;function $f(t,e){return Hf.call(t,e)}var Qf=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(t){Gf(t)}},t.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(t){Gf(t)}else Gf(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){Gf(t)}},t}(),Xf=function(t){function e(e,n,r){var o,i,a=t.call(this)||this;qf(e)||!e?o={next:null!=e?e:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:a&&Wf.useDeprecatedNextContext?((i=Object.create(e)).unsubscribe=function(){return a.unsubscribe()},o={next:e.next&&$f(e.next,i),error:e.error&&$f(e.error,i),complete:e.complete&&$f(e.complete,i)}):o=e;return a.destination=new Qf(o),a}return Nf(e,t),e}(Yf);function Gf(t){var e;e=t,Lf((function(){throw e}))}var Zf={closed:!0,next:Vf,error:function(t){throw t},complete:Vf},td="function"==typeof Symbol&&Symbol.observable||"@@observable";function ed(t){return t}function nd(t){return 0===t.length?ed:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}var rd=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r,o=this,i=(r=t)&&r instanceof Yf||function(t){return t&&qf(t.next)&&qf(t.error)&&qf(t.complete)}(r)&&Ff(r)?t:new Xf(t,e,n);return Kf((function(){var t=o,e=t.operator,n=t.source;i.add(e?e.call(i,n):n?o._subscribe(i):o._trySubscribe(i))})),i},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=od(e))((function(e,r){var o=new Xf({next:function(e){try{t(e)}catch(t){r(t),o.unsubscribe()}},error:r,complete:e});n.subscribe(o)}))},t.prototype._subscribe=function(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)},t.prototype[td]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return nd(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=od(t))((function(t,n){var r;e.subscribe((function(t){return r=t}),(function(t){return n(t)}),(function(){return t(r)}))}))},t.create=function(e){return new t(e)},t}();function od(t){var e;return null!==(e=null!=t?t:Wf.Promise)&&void 0!==e?e:Promise}function id(t){return qf(null==t?void 0:t.lift)}function ad(t,e,n,r,o){return new sd(t,e,n,r,o)}var sd=function(t){function e(e,n,r,o,i,a){var s=t.call(this,e)||this;return s.onFinalize=i,s.shouldUnsubscribe=a,s._next=n?function(t){try{n(t)}catch(t){e.error(t)}}:t.prototype._next,s._error=o?function(t){try{o(t)}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._error,s._complete=r?function(){try{r()}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._complete,s}return Nf(e,t),e.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;t.prototype.unsubscribe.call(this),!n&&(null===(e=this.onFinalize)||void 0===e||e.call(this))}},e}(Yf);function cd(){return t=function(t,e){var n=null;t._refCount++;var r=ad(e,void 0,void 0,void 0,(function(){if(!t||t._refCount<=0||0<--t._refCount)n=null;else{var r=t._connection,o=n;n=null,!r||o&&r!==o||r.unsubscribe(),e.unsubscribe()}}));t.subscribe(r),r.closed||(n=t.connect())},function(e){if(id(e))return e.lift((function(e){try{return t(e,this)}catch(t){this.error(t)}}));throw new TypeError("Unable to lift unknown Observable type")};var t}!function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subjectFactory=n,r._subject=null,r._refCount=0,r._connection=null,id(e)&&(r.lift=e.lift),r}Nf(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype._teardown=function(){this._refCount=0;var t=this._connection;this._subject=this._connection=null,null==t||t.unsubscribe()},e.prototype.connect=function(){var t=this,e=this._connection;if(!e){e=this._connection=new Uf;var n=this.getSubject();e.add(this.source.subscribe(ad(n,void 0,(function(){t._teardown(),n.complete()}),(function(e){t._teardown(),n.error(e)}),(function(){return t._teardown()})))),e.closed&&(this._connection=null,e=Uf.EMPTY)}return e},e.prototype.refCount=function(){return cd()(this)}}(rd);var ud,ld,fd={now:function(){return(fd.delegate||performance).now()},delegate:void 0},dd={schedule:function(t){var e=requestAnimationFrame,n=cancelAnimationFrame,r=e((function(e){n=void 0,t(e)}));return new Uf((function(){return null==n?void 0:n(r)}))},requestAnimationFrame:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=dd.delegate;return((null==n?void 0:n.requestAnimationFrame)||requestAnimationFrame).apply(void 0,Mf([],Pf(t)))},cancelAnimationFrame:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return cancelAnimationFrame.apply(void 0,Mf([],Pf(t)))},delegate:void 0};ld=dd.schedule,new rd((function(t){var e=new Uf,n=ud||fd,r=n.now(),o=function(i){var a=n.now();t.next({timestamp:ud?a:i,elapsed:a-r}),t.closed||e.add(ld(o))};return e.add(ld(o)),e}));var yd=Cf((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),hd=function(t){function e(){var e=t.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return Nf(e,t),e.prototype.lift=function(t){var e=new vd(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new yd},e.prototype.next=function(t){var e=this;Kf((function(){var n,r;if(e._throwIfClosed(),!e.isStopped){e.currentObservers||(e.currentObservers=Array.from(e.observers));try{for(var o=Bf(e.currentObservers),i=o.next();!i.done;i=o.next()){i.value.next(t)}}catch(t){n={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}}))},e.prototype.error=function(t){var e=this;Kf((function(){if(e._throwIfClosed(),!e.isStopped){e.hasError=e.isStopped=!0,e.thrownError=t;for(var n=e.observers;n.length;)n.shift().error(t)}}))},e.prototype.complete=function(){var t=this;Kf((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}}))},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(e){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var e=this,n=this,r=n.hasError,o=n.isStopped,i=n.observers;return r||o?Df:(this.currentObservers=null,i.push(t),new Uf((function(){e.currentObservers=null,Rf(i,t)})))},e.prototype._checkFinalizedStatuses=function(t){var e=this,n=e.hasError,r=e.thrownError,o=e.isStopped;n?t.error(r):o&&t.complete()},e.prototype.asObservable=function(){var t=new rd;return t.source=this,t},e.create=function(t,e){return new vd(t,e)},e}(rd),vd=function(t){function e(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return Nf(e,t),e.prototype.next=function(t){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===n||n.call(e,t)},e.prototype.error=function(t){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===n||n.call(e,t)},e.prototype.complete=function(){var t,e;null===(e=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===e||e.call(t)},e.prototype._subscribe=function(t){var e,n;return null!==(n=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==n?n:Df},e}(hd);!function(t){function e(e){var n=t.call(this)||this;return n._value=e,n}Nf(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return!n.closed&&e.next(this._value),n},e.prototype.getValue=function(){var t=this,e=t.hasError,n=t.thrownError,r=t._value;if(e)throw n;return this._throwIfClosed(),r},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)}}(hd);var pd={now:function(){return(pd.delegate||Date).now()},delegate:void 0};!function(t){function e(e,n,r){void 0===e&&(e=1/0),void 0===n&&(n=1/0),void 0===r&&(r=pd);var o=t.call(this)||this;return o._bufferSize=e,o._windowTime=n,o._timestampProvider=r,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=n===1/0,o._bufferSize=Math.max(1,e),o._windowTime=Math.max(1,n),o}Nf(e,t),e.prototype.next=function(e){var n=this,r=n.isStopped,o=n._buffer,i=n._infiniteTimeWindow,a=n._timestampProvider,s=n._windowTime;r||(o.push(e),!i&&o.push(a.now()+s)),this._trimBuffer(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var e=this._innerSubscribe(t),n=this._infiniteTimeWindow,r=this._buffer.slice(),o=0;o<r.length&&!t.closed;o+=n?1:2)t.next(r[o]);return this._checkFinalizedStatuses(t),e},e.prototype._trimBuffer=function(){var t=this,e=t._bufferSize,n=t._timestampProvider,r=t._buffer,o=t._infiniteTimeWindow,i=(o?1:2)*e;if(e<1/0&&i<r.length&&r.splice(0,r.length-i),!o){for(var a=n.now(),s=0,c=1;c<r.length&&r[c]<=a;c+=2)s=c;s&&r.splice(0,s+1)}}}(hd),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._value=null,e._hasValue=!1,e._isComplete=!1,e}Nf(e,t),e.prototype._checkFinalizedStatuses=function(t){var e=this,n=e.hasError,r=e._hasValue,o=e._value,i=e.thrownError,a=e.isStopped,s=e._isComplete;n?t.error(i):(a||s)&&(r&&t.next(o),t.complete())},e.prototype.next=function(t){this.isStopped||(this._value=t,this._hasValue=!0)},e.prototype.complete=function(){var e=this,n=e._hasValue,r=e._value;e._isComplete||(this._isComplete=!0,n&&t.prototype.next.call(this,r),t.prototype.complete.call(this))}}(hd);var md,bd=function(t){function e(e,n){return t.call(this)||this}return Nf(e,t),e.prototype.schedule=function(t,e){return this},e}(Uf),gd=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,Mf([t,e],Pf(n)))},wd=function(t){return clearInterval(t)},Ad=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r.pending=!1,r}return Nf(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),gd(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return e;wd(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var n,r=!1;try{this.work(t)}catch(t){r=!0,n=t||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),n},e.prototype.unsubscribe=function(){if(!this.closed){var e=this.id,n=this.scheduler,r=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Rf(r,this),null!=e&&(this.id=this.recycleAsyncId(n,e,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(bd),Sd=1,Id={};function _d(t){return t in Id&&(delete Id[t],!0)}var xd=function(t){var e=Sd++;return Id[e]=!0,md||(md=Promise.resolve()),md.then((function(){return _d(e)&&t()})),e},Td=function(t){_d(t)},Ed={setImmediate:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Ed.delegate;return((null==n?void 0:n.setImmediate)||xd).apply(void 0,Mf([],Pf(t)))},clearImmediate:function(t){return Td(t)},delegate:void 0},Od=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return Nf(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e._scheduled||(e._scheduled=Ed.setImmediate(e.flush.bind(e,void 0))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);e.actions.some((function(t){return t.id===n}))||(Ed.clearImmediate(n),e._scheduled=void 0)},e}(Ad),jd=function(){function t(e,n){void 0===n&&(n=t.now),this.schedulerActionCtor=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.schedulerActionCtor(this,t).schedule(n,e)},t.now=pd.now,t}(),kd=function(t){function e(e,n){void 0===n&&(n=jd.now);var r=t.call(this,e,n)||this;return r.actions=[],r._active=!1,r._scheduled=void 0,r}return Nf(e,t),e.prototype.flush=function(t){var e=this.actions;if(this._active)e.push(t);else{var n;this._active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this._active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(jd);new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Nf(e,t),e.prototype.flush=function(t){this._active=!0;var e=this._scheduled;this._scheduled=void 0;var n,r=this.actions;t=t||r.shift();do{if(n=t.execute(t.state,t.delay))break}while((t=r[0])&&t.id===e&&r.shift());if(this._active=!1,n){for(;(t=r[0])&&t.id===e&&r.shift();)t.unsubscribe();throw n}},e}(kd))(Od),new kd(Ad);var Nd=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return Nf(e,t),e.prototype.schedule=function(e,n){return void 0===n&&(n=0),n>0?t.prototype.schedule.call(this,e,n):(this.delay=n,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,n){return n>0||this.closed?t.prototype.execute.call(this,e,n):this._execute(e,n)},e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0?t.prototype.requestAsyncId.call(this,e,n,r):e.flush(this)},e}(Ad);new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Nf(e,t),e}(kd))(Nd);var Bd=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return Nf(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e._scheduled||(e._scheduled=dd.requestAnimationFrame((function(){return e.flush(void 0)}))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);e.actions.some((function(t){return t.id===n}))||(dd.cancelAnimationFrame(n),e._scheduled=void 0)},e}(Ad);new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Nf(e,t),e.prototype.flush=function(t){this._active=!0;var e=this._scheduled;this._scheduled=void 0;var n,r=this.actions;t=t||r.shift();do{if(n=t.execute(t.state,t.delay))break}while((t=r[0])&&t.id===e&&r.shift());if(this._active=!1,n){for(;(t=r[0])&&t.id===e&&r.shift();)t.unsubscribe();throw n}},e}(kd))(Bd),function(t){function e(e,n){void 0===e&&(e=Md),void 0===n&&(n=1/0);var r=t.call(this,e,(function(){return r.frame}))||this;return r.maxFrames=n,r.frame=0,r.index=-1,r}Nf(e,t),e.prototype.flush=function(){for(var t,e,n=this.actions,r=this.maxFrames;(e=n[0])&&e.delay<=r&&(n.shift(),this.frame=e.delay,!(t=e.execute(e.state,e.delay))););if(t){for(;e=n.shift();)e.unsubscribe();throw t}},e.frameTimeFactor=10}(kd);var Pd,Md=function(t){function e(e,n,r){void 0===r&&(r=e.index+=1);var o=t.call(this,e,n)||this;return o.scheduler=e,o.work=n,o.index=r,o.active=!0,o.index=e.index=r,o}return Nf(e,t),e.prototype.schedule=function(n,r){if(void 0===r&&(r=0),Number.isFinite(r)){if(!this.id)return t.prototype.schedule.call(this,n,r);this.active=!1;var o=new e(this.scheduler,this.work);return this.add(o),o.schedule(n,r)}return Uf.EMPTY},e.prototype.requestAsyncId=function(t,n,r){void 0===r&&(r=0),this.delay=t.frame+r;var o=t.actions;return o.push(this),o.sort(e.sortActions),!0},e.prototype.recycleAsyncId=function(t,e,n){},e.prototype._execute=function(e,n){if(!0===this.active)return t.prototype._execute.call(this,e,n)},e.sortActions=function(t,e){return t.delay===e.delay?t.index===e.index?0:t.index>e.index?1:-1:t.delay>e.delay?1:-1},e}(Ad);new rd((function(t){return t.complete()})),function(t){t.NEXT="N",t.ERROR="E",t.COMPLETE="C"}(Pd||(Pd={})),Cf((function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}})),Cf((function(t){return function(){t(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})),Cf((function(t){return function(e){t(this),this.name="NotFoundError",this.message=e}})),Cf((function(t){return function(e){t(this),this.name="SequenceError",this.message=e}})),Cf((function(t){return function(e){void 0===e&&(e=null),t(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=e}})),new rd(Vf);t.BadEventError=jf,t.Box=class{constructor(t){r.set(this,void 0),n(this,r,t,"f")}set(t){n(this,r,t,"f")}get(){return e(this,r,"f")}},t.Emitter=c,t.ExpirableMap=_f,t.FiniteStateMachine=Of,t.HashMap=u,t.HashSet=l,t.LRUMap=Gl,t.ObservableFiniteStateMachine=class extends Of{constructor(){super(...arguments),this.stateChanges=new hd}observeStateChanges(){return this.stateChanges}send(t){const e=this.state;super.send(t);const n=this.state;this.stateChanges.next({event:t,oldState:e,newState:n}),Xa.isEmptyObject(this.schema[n])&&this.stateChanges.complete()}},t.Queue=f,t.TLRUMap=xf,t.TrieMap=Ef,t.convertArrayToCons=function t([e,...n]){return[e,n.length?t(n):null]},t.convertConsToArray=function t([e,n]){return null===n?[e]:[e,...t(n)]},Object.defineProperty(t,"__esModule",{value:!0})}));
16
16
  //# sourceMappingURL=index.umd.min.js.map