Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@blackglory/structures

Package Overview
Dependencies
Maintainers
1
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blackglory/structures - npm Package Compare versions

Comparing version 0.2.4 to 0.2.5

lib/es2015/expirable-map.d.ts

4

dist/es2015/index.umd.min.js

@@ -1,2 +0,2 @@

!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).Structures={})}(this,(function(t){"use strict";
!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";
/*! *****************************************************************************

@@ -16,3 +16,3 @@ Copyright (c) Microsoft Corporation.

***************************************************************************** */
function n(t,n,e,r){if("a"===e&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof n?t!==n||!r:!n.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===e?r:"a"===e?r.call(t):r?r.value:n.get(t)}var e,r,o,i;class s{constructor(){e.set(this,new Map)}get[(e=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}on(t,r){n(this,e,"f").has(t)||n(this,e,"f").set(t,new Set);n(this,e,"f").get(t).add(r)}off(t,r){if(!n(this,e,"f").has(t))return;const o=n(this,e,"f").get(t);o.delete(r),0===o.size&&n(this,e,"f").delete(t)}emit(t,r){if(!n(this,e,"f").has(t))return;n(this,e,"f").get(t).forEach((t=>t(r)))}}class a{constructor(t){this.hash=t,r.set(this,new Map)}get[(r=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return n(this,r,"f").size}set(t,e){return n(this,r,"f").set(this.hash(t),e),this}has(t){return n(this,r,"f").has(this.hash(t))}get(t){return n(this,r,"f").get(this.hash(t))}delete(t){return n(this,r,"f").delete(this.hash(t))}clear(){n(this,r,"f").clear()}}class c{constructor(t){this.hash=t,o.set(this,new Map)}get[(o=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return n(this,o,"f").size}[Symbol.iterator](){return n(this,o,"f").values()}add(t){return n(this,o,"f").set(this.hash(t),t),this}delete(t){return n(this,o,"f").delete(this.hash(t))}has(t){return n(this,o,"f").has(this.hash(t))}clear(){n(this,o,"f").clear()}values(){return n(this,o,"f").values()}}class u{constructor(){i.set(this,[])}get[(i=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return n(this,i,"f").length}empty(){n(this,i,"f").length=0}enqueue(...t){n(this,i,"f").push(...t)}dequeue(){return n(this,i,"f").shift()}remove(t){let e;for(;(e=n(this,i,"f").indexOf(t))>=0;)n(this,i,"f").splice(e,1)}}var f="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},l={},d={CustomError:void 0};class y extends Error{get name(){return this.constructor.name}}d.CustomError=y;var v={ExpectedError:void 0};const h=d;class p extends h.CustomError{}v.ExpectedError=p;var m={AssertionError:void 0};const b=d;class g extends b.CustomError{}m.AssertionError=g;var w={};w.normalize=void 0,w.normalize=function(t){var n;return{name:t.name,message:t.message,stack:null!==(n=t.stack)&&void 0!==n?n:null}};var A={refute:void 0};const I=v;A.refute=function(t,n){if(t)throw new I.ExpectedError(n)};var S={assert:void 0};const T=m;S.assert=function(t,n){if(!t)throw new T.AssertionError(n)},function(t){var n=f&&f.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),e=f&&f.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};e(d,t),e(v,t),e(m,t),e(w,t),e(A,t),e(S,t)}(l);var E={},O={},R={},j={},k={};k.go=void 0,k.go=function(t){return t()},function(t){var n=f&&f.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]});(f&&f.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)})(k,t)}(j),R.chunkAsync=void 0;const N=j,x=l;R.chunkAsync=function(t,n){return x.assert(Number.isInteger(n),"The parameter size must be an integer"),x.assert(n>0,"The parameter size must be greater than 0"),N.go((async function*(){let e=[];for await(const r of t)e.push(r),e.length>=n&&(yield e,e=[]);e.length&&(yield e)}))};var B={},q={},_={};function U(t){return Array.isArray(t)}_.isntEmptyArray=_.isEmptyArray=_.isntArray=_.isArray=void 0,_.isArray=U,_.isntArray=function(t){return!U(t)},_.isEmptyArray=function(t){return 0===t.length},_.isntEmptyArray=function(t){return 0!==t.length};var z={},J={};function C(t){return null===t}J.isntNull=J.isNull=void 0,J.isNull=C,J.isntNull=function(t){return!C(t)};var M={};function P(t){return void 0===t}M.isntUndefined=M.isUndefined=void 0,M.isUndefined=P,M.isntUndefined=function(t){return!P(t)},z.isntAsyncIterable=z.isAsyncIterable=void 0;const D=J,W=M;function F(t){return D.isntNull(t)&&W.isntUndefined(t)&&"function"==typeof t[Symbol.asyncIterator]}z.isAsyncIterable=F,z.isntAsyncIterable=function(t){return!F(t)};var L={};function H(t){return"bigint"==typeof t}L.isntBigInt=L.isBigInt=void 0,L.isBigInt=H,L.isntBigInt=function(t){return!H(t)};var K={};function V(t){return"boolean"==typeof t}K.isntBoolean=K.isBoolean=void 0,K.isBoolean=V,K.isntBoolean=function(t){return!V(t)};var Q={},G={};function X(t){return"string"==typeof t}G.isntString=G.isString=void 0,G.isString=X,G.isntString=function(t){return!X(t)},Q.isntChar=Q.isChar=void 0;const Y=G;function Z(t){return Y.isString(t)&&1===t.length}Q.isChar=Z,Q.isntChar=function(t){return!Z(t)};var $={};function tt(t){return t instanceof Date}$.isntDate=$.isDate=void 0,$.isDate=tt,$.isntDate=function(t){return!tt(t)};var nt={};nt.inEnum=void 0,nt.inEnum=function(t,n){return Object.values(n).includes(t)};var et={};function rt(t){return!t}et.isntFalsy=et.isFalsy=void 0,et.isFalsy=rt,et.isntFalsy=function(t){return!rt(t)};var ot={};function it(t){return"function"==typeof t}ot.isntFunction=ot.isFunction=void 0,ot.isFunction=it,ot.isntFunction=function(t){return!it(t)};var st={};st.isntIterable=st.isIterable=void 0;const at=J,ct=M;function ut(t){return at.isntNull(t)&&ct.isntUndefined(t)&&"function"==typeof t[Symbol.iterator]}st.isIterable=ut,st.isntIterable=function(t){return!ut(t)};var ft={},lt={};function dt(t){return null!==t&&"object"==typeof t}lt.isntEmptyObject=lt.isEmptyObject=lt.isRecord=lt.isntObject=lt.isObject=void 0,lt.isObject=dt,lt.isntObject=function(t){return!dt(t)},lt.isRecord=function(t){return dt(t)},lt.isEmptyObject=function(t){return 0===Object.keys(t).length},lt.isntEmptyObject=function(t){return 0!==Object.keys(t).length};var yt={};function vt(t){return"number"==typeof t}yt.isntNumber=yt.isNumber=void 0,yt.isNumber=vt,yt.isntNumber=function(t){return!vt(t)},ft.isntJsonRpcError=ft.isJsonRpcError=ft.isntJsonRpcSuccess=ft.isJsonRpcSuccess=ft.isntJsonRpcRequest=ft.isJsonRpcRequest=ft.isntJsonRpcNotification=ft.isJsonRpcNotification=void 0;const ht=_,pt=lt,mt=G,bt=yt,gt=M;function wt(t){return mt.isString(t)||bt.isNumber(t)}function At(t){return ht.isArray(t)||pt.isObject(t)}function It(t){return pt.isRecord(t)&&mt.isString(t.jsonrpc)&&mt.isString(t.method)&&gt.isUndefined(t.id)&&At(t.params)}function St(t){return pt.isRecord(t)&&mt.isString(t.jsonrpc)&&mt.isString(t.method)&&wt(t.id)&&At(t.params)}function Tt(t){return pt.isRecord(t)&&mt.isString(t.jsonrpc)&&mt.isString(t.id)&&gt.isntUndefined(t.result)}function Et(t){return pt.isRecord(t)&&mt.isString(t.jsonrpc)&&wt(t.id)&&function(t){return pt.isRecord(t)&&bt.isNumber(t.code)&&mt.isString(t.message)&&(gt.isUndefined(t.data)||pt.isObject(t.data))}(t.error)}ft.isJsonRpcNotification=It,ft.isntJsonRpcNotification=function(t){return!It(t)},ft.isJsonRpcRequest=St,ft.isntJsonRpcRequest=function(t){return!St(t)},ft.isJsonRpcSuccess=Tt,ft.isntJsonRpcSuccess=function(t){return!Tt(t)},ft.isJsonRpcError=Et,ft.isntJsonRpcError=function(t){return!Et(t)};var Ot={};Ot.isntJson=Ot.isJson=void 0,Ot.isJson=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},Ot.isntJson=function t(n){return!t()};var Rt={};Rt.isAbsoluteURL=void 0,Rt.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}},function(t){var n=f&&f.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),e=f&&f.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};e(_,t),e(z,t),e(L,t),e(K,t),e(Q,t),e($,t),e(nt,t),e(et,t),e(ot,t),e(st,t),e(ft,t),e(Ot,t),e(J,t),e(yt,t),e(lt,t),e(G,t),e(M,t),e(Rt,t)}(q),B.chunkByAsync=void 0;const jt=q;B.chunkByAsync=function(t,n){return jt.isAsyncIterable(t)?async function*(t){let e=[],r=0;for await(const o of t)e.push(o),await n(o,r)&&(yield e,e=[]),r++;e.length&&(yield e)}(t):async function*(t){let e=[],r=0;for(const o of t)e.push(o),await n(o,r)&&(yield e,e=[]),r++;e.length&&(yield e)}(t)};var kt={};kt.chunkBy=void 0,kt.chunkBy=function*(t,n){let e=[],r=0;for(const o of t)e.push(o),n(o,r)&&(yield e,e=[]),r++;e.length&&(yield e)};var Nt={chunk:void 0};const xt=j,Bt=l;Nt.chunk=function(t,n){return Bt.assert(Number.isInteger(n),"The parameter size must be an integer"),Bt.assert(n>0,"The parameter size must be greater than 0"),xt.go((function*(){let e=[];for(const r of t)e.push(r),e.length>=n&&(yield e,e=[]);e.length&&(yield e)}))};var qt={concatAsync:void 0};const _t=q,Ut=j;qt.concatAsync=function(t,...n){return Ut.go((async function*(){for(const e of[t,...n])if(_t.isAsyncIterable(e))for await(const t of e)yield t;else for(const t of e)yield t}))};var zt={concat:void 0};const Jt=j;zt.concat=function(t,...n){return Jt.go((function*(){for(const e of[t,...n])yield*e}))};var Ct={},Mt={};Mt.copyIterable=Mt.copyAsyncIterable=void 0,Mt.copyAsyncIterable=async function*(t){for await(const n of t)yield n},Mt.copyIterable=function*(t){for(const n of t)yield n},Ct.dropAsync=void 0;const Pt=j,Dt=Mt,Wt=l;Ct.dropAsync=function(t,n){return Wt.assert(Number.isInteger(n),"The parameter count must be an integer"),Wt.assert(n>=0,"The parameter count must be greater than or equal to 0"),0===n?Dt.copyAsyncIterable(t):Pt.go((async function*(){var e;const r=t[Symbol.asyncIterator]();let o;try{let t;for(;!(({value:t,done:o}=await r.next()),o||n<=0);)n--;for(;!o;)yield t,({value:t,done:o}=await r.next())}finally{o||await(null===(e=r.return)||void 0===e?void 0:e.call(r))}}))};var Ft={dropRightAsync:void 0};const Lt=j,Ht=Mt,Kt=l;Ft.dropRightAsync=function(t,n){return Kt.assert(Number.isInteger(n),"The parameter count must be an integer"),Kt.assert(n>=0,"The parameter count must be greater than or equal to 0"),0===n?Ht.copyAsyncIterable(t):Lt.go((async function*(){const e=(await async function(t){const n=[];for await(const e of t)n.push(e);return n}(t)).slice(0,-n);for(const t of e)yield t}))};var Vt={dropRight:void 0};const Qt=j,Gt=Mt,Xt=l;Vt.dropRight=function(t,n){return Xt.assert(Number.isInteger(n),"The parameter count must be an integer"),Xt.assert(n>=0,"The parameter count must be greater than or equal to 0"),0===n?Gt.copyIterable(t):Qt.go((function*(){const e=Array.from(t);yield*e.slice(0,-n)}))};var Yt={dropUntilAsync:void 0};const Zt=q;Yt.dropUntilAsync=function(t,n){return Zt.isAsyncIterable(t)?async function*(t){var e;const r=t[Symbol.asyncIterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=await r.next()),o||await n(t,i++)););for(;!o;)yield t,({value:t,done:o}=await r.next())}finally{o||await(null===(e=r.return)||void 0===e?void 0:e.call(r))}}(t):async function*(t){var e;const r=t[Symbol.iterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=r.next()),o||await n(t,i++)););for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(e=r.return)||void 0===e||e.call(r)}}(t)};var $t={};$t.dropUntil=void 0,$t.dropUntil=function*(t,n){var e;const r=t[Symbol.iterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=r.next()),o||n(t,i++)););for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(e=r.return)||void 0===e||e.call(r)}};var tn={drop:void 0};const nn=j,en=Mt,rn=l;tn.drop=function(t,n){return rn.assert(Number.isInteger(n),"The parameter count must be an integer"),rn.assert(n>=0,"The parameter count must be greater than or equal to 0"),0===n?en.copyIterable(t):nn.go((function*(){var e;const r=t[Symbol.iterator]();let o;try{let t;for(;!(({value:t,done:o}=r.next()),o||n<=0);)n--;for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(e=r.return)||void 0===e||e.call(r)}}))};var on={filterAsync:void 0};const sn=q;on.filterAsync=function(t,n){return sn.isAsyncIterable(t)?async function*(t){let e=0;for await(const r of t)await n(r,e)&&(yield r),e++}(t):async function*(t){let e=0;for(const r of t)await n(r,e)&&(yield r),e++}(t)};var an={};an.filter=void 0,an.filter=function*(t,n){let e=0;for(const r of t)n(r,e)&&(yield r),e++};var cn={},un={},fn={flattenByAsync:void 0};const ln=q;function dn(t){return ln.isIterable(t)&&ln.isntChar(t)}fn.flattenByAsync=function(t,n){return ln.isAsyncIterable(t)?async function*(t){const r=1;for await(const o of t)dn(o)&&await n(o,r)?yield*e(o,r+1):yield o}(t):function(t){return e(t,1)}(t);async function*e(t,r){for(const o of t)dn(o)&&await n(o,r)?yield*e(o,r+1):yield o}},un.flattenDeepAsync=void 0;const yn=fn,vn=l;un.flattenDeepAsync=function(t,n=1/0){return vn.assert(n===1/0||Number.isInteger(n),"The parameter depth must be an integer"),vn.assert(n>=0,"The parameter depth must be greater than or equal to 0"),yn.flattenByAsync(t,((t,e)=>e<=n))},cn.flattenAsync=void 0;const hn=un;cn.flattenAsync=function(t){return hn.flattenDeepAsync(t,1)};var pn={flattenBy:void 0};const mn=q;pn.flattenBy=function(t,n){return function*t(e,r){for(const i of e)o=i,mn.isIterable(o)&&mn.isntChar(o)&&n(i,r)?yield*t(i,r+1):yield i;var o}(t,1)};var bn={flattenDeep:void 0};const gn=pn,wn=l;bn.flattenDeep=function(t,n=1/0){return wn.assert(n===1/0||Number.isInteger(n),"The parameter depth must be an integer"),wn.assert(n>=0,"The parameter depth must be greater than or equal to 0"),gn.flattenBy(t,((t,e)=>e<=n))};var An={flatten:void 0};const In=bn;An.flatten=function(t){return In.flattenDeep(t,1)};var Sn={mapAsync:void 0};const Tn=q;Sn.mapAsync=function(t,n){return Tn.isAsyncIterable(t)?async function*(t){let e=0;for await(const r of t)yield await n(r,e),e++}(t):async function*(t){let e=0;for(const r of t)yield await n(r,e),e++}(t)};var En={};En.map=void 0,En.map=function*(t,n){let e=0;for(const r of t)yield n(r,e),e++};var On={repeatAsync:void 0};const Rn=j,jn=l;On.repeatAsync=function(t,n){return jn.assert(n===1/0||Number.isInteger(n),"The parameter times must be an integer"),jn.assert(n>=0,"The parameter times must be greater than or equal to 0"),n===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),Rn.go((async function*(){const e=[];if(n>0){for await(const n of t)yield n,e.push(n);n--}for(;n>0;)yield*e,n--}))};var kn={repeat:void 0};const Nn=j,xn=l;kn.repeat=function(t,n){return xn.assert(n===1/0||Number.isInteger(n),"The parameter times must be an integer"),xn.assert(n>=0,"The parameter times must be greater than or equal to 0"),n===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),Nn.go((function*(){const e=[];if(n>0){for(const n of t)yield n,e.push(n);n--}for(;n>0;)yield*e,n--}))};var Bn={sliceAsync:void 0};const qn=j,_n=l;Bn.sliceAsync=function(t,n,e=1/0){return _n.assert(Number.isInteger(n),"The parameter start must be an integer"),_n.assert(n>=0,"The parameter start must be greater than or equal to 0"),_n.assert(Number.isInteger(e),"The parameter end must be an integer"),_n.assert(e>=n,"The parameter end must be greater than or equal to start"),qn.go((async function*(){let r=0;for await(const o of t){if(r>=e)break;r>=n&&(yield o),r++}}))};var Un={slice:void 0};const zn=j,Jn=l;Un.slice=function(t,n,e=1/0){return Jn.assert(Number.isInteger(n),"The parameter start must be an integer"),Jn.assert(n>=0,"The parameter start must be greater than or equal to 0"),Jn.assert(Number.isInteger(e),"The parameter end must be an integer"),Jn.assert(e>=n,"The parameter end must be greater than or equal to start"),zn.go((function*(){let r=0;for(const o of t){if(r>=e)break;r>=n&&(yield o),r++}}))};var Cn={};Cn.splitAsync=void 0,Cn.splitAsync=async function*(t,n){let e=[];for await(const r of t)r===n?(yield e,e=[]):e.push(r);yield e};var Mn={splitByAsync:void 0};const Pn=q;Mn.splitByAsync=function(t,n){return Pn.isAsyncIterable(t)?async function*(t){let e=[],r=0;for await(const o of t)await n(o,r)?(yield e,e=[]):e.push(o),r++;yield e}(t):async function*(t){let e=[],r=0;for(const o of t)await n(o,r)?(yield e,e=[]):e.push(o),r++;yield e}(t)};var Dn={};Dn.splitBy=void 0,Dn.splitBy=function*(t,n){let e=[],r=0;for(const o of t)n(o,r)?(yield e,e=[]):e.push(o),r++;yield e};var Wn={};Wn.split=void 0,Wn.split=function*(t,n){let e=[];for(const r of t)r===n?(yield e,e=[]):e.push(r);yield e};var Fn={takeAsync:void 0};const Ln=j,Hn=l;Fn.takeAsync=function(t,n){return Hn.assert(Number.isInteger(n),"The parameter count must be an integer"),Hn.assert(n>=0,"The parameter count must be greater than or equal to 0"),Ln.go((async function*(){if(0!==n)for await(const e of t)if(yield e,0===--n)break}))};var Kn={takeRightAsync:void 0};const Vn=j,Qn=l;Kn.takeRightAsync=function(t,n){return Qn.assert(Number.isInteger(n),"The parameter count must be an integer"),Qn.assert(n>=0,"The parameter count must be greater than or equal to 0"),Vn.go((async function*(){var e;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>n&&t.shift();yield*t}finally{o||await(null===(e=r.return)||void 0===e?void 0:e.call(r))}}))};var Gn={takeRight:void 0};const Xn=j,Yn=l;Gn.takeRight=function(t,n){return Yn.assert(Number.isInteger(n),"The parameter count must be an integer"),Yn.assert(n>=0,"The parameter count must be greater than or equal to 0"),Xn.go((function*(){var e;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>n&&t.shift();yield*t}finally{o||null===(e=r.return)||void 0===e||e.call(r)}}))};var Zn={takeUntilAsync:void 0};const $n=q;Zn.takeUntilAsync=function(t,n){return $n.isAsyncIterable(t)?async function*(t){let e=0;for await(const r of t){if(await n(r,e))break;yield r,e++}}(t):async function*(t){let e=0;for(const r of t){if(await n(r,e))break;yield r,e++}}(t)};var te={};te.takeUntil=void 0,te.takeUntil=function*(t,n){let e=0;for(const r of t){if(n(r,e))break;yield r,e++}};var ne={take:void 0};const ee=j,re=l;ne.take=function(t,n){return re.assert(Number.isInteger(n),"The parameter count must be an integer"),re.assert(n>=0,"The parameter count must be greater than or equal to 0"),ee.go((function*(){if(0!==n)for(const e of t)if(yield e,0===--n)break}))};var oe={tapAsync:void 0};const ie=q;oe.tapAsync=function(t,n){return ie.isAsyncIterable(t)?async function*(t){let e=0;for await(const r of t)await n(r,e),yield r,e++}(t):async function*(t){let e=0;for(const r of t)await n(r,e),yield r,e++}(t)};var se={};se.tap=void 0,se.tap=function*(t,n){let e=0;for(const r of t)n(r,e),yield r,e++};var ae={};ae.toAsyncIterable=void 0,ae.toAsyncIterable=async function*(t){for(const n of t)yield n};var ce={};ce.transformAsync=void 0,ce.transformAsync=async function*(t,n){yield*n(t)};var ue={};ue.transform=void 0,ue.transform=function*(t,n){yield*n(t)};var fe={};fe.uniqAsync=void 0,fe.uniqAsync=async function*(t){const n=new Set;for await(const e of t)n.has(e)||(yield e,n.add(e))};var le={uniqByAsync:void 0};const de=q;le.uniqByAsync=function(t,n){return de.isAsyncIterable(t)?async function*(t){const e=new Set;let r=0;for await(const o of t){const t=await n(o,r);e.has(t)||(yield o,e.add(t)),r++}}(t):async function*(t){const e=new Set;let r=0;for(const o of t){const t=await n(o,r);e.has(t)||(yield o,e.add(t)),r++}}(t)};var ye={};ye.uniqBy=void 0,ye.uniqBy=function*(t,n){const e=new Set;let r=0;for(const o of t){const t=n(o,r);e.has(t)||(yield o,e.add(t)),r++}};var ve={};ve.uniq=void 0,ve.uniq=function*(t){const n=new Set;for(const e of t)n.has(e)||(yield e,n.add(e))};var he={zipAsync:void 0};const pe=q;var me;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(me||(me={})),he.zipAsync=function(t,...n){return async function*(...t){var n,e,r,o;const i=t.length,s=t.map((t=>pe.isAsyncIterable(t)?[me.Async,t[Symbol.asyncIterator]()]:[me.Sync,t[Symbol.iterator]()])),a=s.map((()=>!1));try{for(;;){const t=new Array(i);for(let n=0;n<i;n++){const[e,r]=s[n];let o;if(o=e===me.Async?await r.next():r.next(),o.done)return void(a[n]=!0);t[n]=o.value}yield t}}finally{const t=s.filter(((t,n)=>!a[n]));for(const[i,s]of t)i===me.Async?await(null===(e=(n=s).return)||void 0===e?void 0:e.call(n)):null===(o=(r=s).return)||void 0===o||o.call(r)}}(t,...n)};var be={};be.zip=void 0,be.zip=function(t,...n){return function*(...t){const n=t.length,e=t.map((t=>t[Symbol.iterator]())),r=e.map((()=>!1));try{for(;;){const t=new Array(n);for(let o=0;o<n;o++){const{value:n,done:i}=e[o].next();if(i)return void(r[o]=!0);t[o]=n}yield t}}finally{e.filter(((t,n)=>!r[n])).forEach((t=>{var n;return null===(n=t.return)||void 0===n?void 0:n.call(t)}))}}(t,...n)},function(t){var n=f&&f.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),e=f&&f.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};e(R,t),e(B,t),e(kt,t),e(Nt,t),e(qt,t),e(zt,t),e(Ct,t),e(Ft,t),e(Vt,t),e(Yt,t),e($t,t),e(tn,t),e(on,t),e(an,t),e(cn,t),e(fn,t),e(pn,t),e(un,t),e(bn,t),e(An,t),e(Sn,t),e(En,t),e(On,t),e(kn,t),e(Bn,t),e(Un,t),e(Cn,t),e(Mn,t),e(Dn,t),e(Wn,t),e(Fn,t),e(Kn,t),e(Gn,t),e(Zn,t),e(te,t),e(ne,t),e(oe,t),e(se,t),e(ae,t),e(ce,t),e(ue,t),e(fe,t),e(le,t),e(ye,t),e(ve,t),e(he,t),e(be,t)}(O);var ge={},we={};we.consume=void 0,we.consume=function(t,n){return n(t)};var Ae={eachAsync:void 0};const Ie=q;Ae.eachAsync=function(t,n){return Ie.isAsyncIterable(t)?async function(t){let e=0;for await(const r of t)await n(r,e),e++}(t):async function(t){let e=0;for(const r of t)await n(r,e),e++}(t)};var Se={};Se.each=void 0,Se.each=function(t,n){let e=0;for(const r of t)n(r,e),e++};var Te={everyAsync:void 0};const Ee=q;Te.everyAsync=function(t,n){return Ee.isAsyncIterable(t)?async function(t){let e=0;for await(const r of t){if(!await n(r,e))return!1;e++}return!0}(t):async function(t){let e=0;for(const r of t){if(!await n(r,e))return!1;e++}return!0}(t)};var Oe={};Oe.every=void 0,Oe.every=function(t,n){let e=0;for(const r of t){if(!n(r,e))return!1;e++}return!0};var Re={findAsync:void 0};const je=q;Re.findAsync=function(t,n){return je.isAsyncIterable(t)?async function(t){let e=0;for await(const r of t){if(await n(r,e))return r;e++}return}(t):async function(t){let e=0;for(const r of t){if(await n(r,e))return r;e++}return}(t)};var ke={};ke.find=void 0,ke.find=function(t,n){let e=0;for(const r of t){if(n(r,e))return r;e++}};var Ne={};Ne.firstAsync=void 0,Ne.firstAsync=async function(t){for await(const n of t)return n};var xe={};xe.first=void 0,xe.first=function(t){for(const n of t)return n};var Be={};Be.includesAsync=void 0,Be.includesAsync=async function(t,n){for await(const e of t)if(e===n)return!0;return!1};var qe={};qe.includes=void 0,qe.includes=function(t,n){for(const e of t)if(e===n)return!0;return!1};var _e={};_e.matchAsync=void 0,_e.matchAsync=async function(t,n){const e=n.length;let r=0;for await(const o of t)if(o===n[r]&&r++,r===e)return!0;return!1};var Ue={};Ue.match=void 0,Ue.match=function(t,n){const e=n.length;let r=0;for(const o of t)if(o===n[r]&&r++,r===e)return!0;return!1};var ze={reduceAsync:void 0};const Je=q;ze.reduceAsync=function(t,n,e){return Je.isUndefined(e)?function(t,n){return Je.isAsyncIterable(t)?e(t):r(t);async function e(t){var e;const r=t[Symbol.asyncIterator]();let o;try{let t,s=await i(r),a=1;for(;({value:t,done:o}=await r.next()),!o;)s=await n(s,t,a++);return s}finally{o||await(null===(e=r.return)||void 0===e?void 0:e.call(r))}async function i(t){const n=await t.next();if(n.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return n.value}}async function r(t){var e;const r=t[Symbol.iterator]();let o;try{let t,s=i(r),a=1;for(;({value:t,done:o}=r.next()),!o;)s=await n(s,t,a++);return s}finally{o||null===(e=r.return)||void 0===e||e.call(r)}function i(t){const n=t.next();if(n.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return n.value}}}(t,n):function(t,n,e){return Je.isAsyncIterable(t)?o(t):r(t);async function r(t){let r=e,o=0;for(const e of t)r=await n(r,e,o++);return r}async function o(t){let r=e,o=0;for await(const e of t)r=await n(r,e,o++);return r}}(t,n,e)};var Ce={reduce:void 0};const Me=q;Ce.reduce=function(t,n,e){return Me.isUndefined(e)?function(t,n){var e;const r=t[Symbol.iterator]();let o;try{let t,s=i(r),a=1;for(;({value:t,done:o}=r.next()),!o;)s=n(s,t,a++);return s}finally{o||null===(e=r.return)||void 0===e||e.call(r)}function i(t){const n=t.next();if(n.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return n.value}}(t,n):function(t,n,e){let r=e,o=0;for(const e of t)r=n(r,e,o++);return r}(t,n,e)};var Pe={someAsync:void 0};const De=q;Pe.someAsync=function(t,n){return De.isAsyncIterable(t)?async function(t){let e=0;for await(const r of t){if(await n(r,e))return!0;e++}return!1}(t):async function(t){let e=0;for(const r of t){if(await n(r,e))return!0;e++}return!1}(t)};var We={};We.some=void 0,We.some=function(t,n){let e=0;for(const r of t){if(n(r,e))return!0;e++}return!1};var Fe={};Fe.lastAsync=void 0,Fe.lastAsync=async function(t){var n;const e=t[Symbol.asyncIterator]();let r;try{let t,o;for(;({value:t,done:r}=await e.next()),!r;)o=t;return o}finally{r||await(null===(n=e.return)||void 0===n?void 0:n.call(e))}};var Le={};Le.last=void 0,Le.last=function(t){var n;const e=t[Symbol.iterator]();let r;try{let t,o;for(;({value:t,done:r}=e.next()),!r;)o=t;return o}finally{r||null===(n=e.return)||void 0===n||n.call(e)}};var He={toArrayAsync:void 0};const Ke=we;He.toArrayAsync=function(t){return Ke.consume(t,(async t=>{const n=[];for await(const e of t)n.push(e);return n}))};var Ve={toArray:void 0};const Qe=we;Ve.toArray=function(t){return Qe.consume(t,(t=>Array.from(t)))};var Ge={toSetAsync:void 0};const Xe=we;Ge.toSetAsync=function(t){return Xe.consume(t,(async t=>{const n=new Set;for await(const e of t)n.add(e);return n}))};var Ye={toSet:void 0};const Ze=we;var $e,tr,nr;Ye.toSet=function(t){return Ze.consume(t,(t=>new Set(t)))},function(t){var n=f&&f.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),e=f&&f.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};e(we,t),e(Ae,t),e(Se,t),e(Te,t),e(Oe,t),e(Re,t),e(ke,t),e(Ne,t),e(xe,t),e(Be,t),e(qe,t),e(_e,t),e(Ue,t),e(ze,t),e(Ce,t),e(Pe,t),e(We,t),e(Fe,t),e(Le,t),e(He,t),e(Ve,t),e(Ge,t),e(Ye,t)}(ge),function(t){var n=f&&f.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),e=f&&f.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};e(O,t),e(ge,t)}(E);class er{constructor(t){$e.set(this,void 0),tr.set(this,new Map),l.assert(Number.isInteger(t),"The parameter limit must be an integer"),l.assert(t>0,"The parameter limit must be a positive value"),function(t,n,e,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 n?t!==n||!o:!n.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===r?o.call(t,e):o?o.value=e:n.set(t,e)}(this,$e,t,"f")}get[($e=new WeakMap,tr=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return n(this,tr,"f").size}set(t,e){return n(this,tr,"f").has(t)?this.updateItem(t,e):(n(this,tr,"f").size===n(this,$e,"f")&&n(this,tr,"f").delete(this.getColdestKey()),n(this,tr,"f").set(t,e)),this}has(t){return n(this,tr,"f").has(t)}get(t){if(!this.has(t))return;const e=n(this,tr,"f").get(t);return this.updateItem(t,e),e}delete(t){return n(this,tr,"f").delete(t)}clear(){n(this,tr,"f").clear()}updateItem(t,e){n(this,tr,"f").delete(t),n(this,tr,"f").set(t,e)}getColdestKey(){return E.first(n(this,tr,"f").keys())}}class rr{constructor(t){this.value=t,this.children=new Map}}class or{constructor(){nr.set(this,new rr)}get[(nr=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}set(t,e){let r=n(this,nr,"f");for(const n of t)r.children.has(n)||r.children.set(n,new rr),r=r.children.get(n);return r.value=e,this}has(t){let e=n(this,nr,"f");for(const n of t){if(!e.children.has(n))return!1;e=e.children.get(n)}return void 0!==e.value}get(t){let e=n(this,nr,"f");for(const n of t){if(!e.children.has(n))return;e=e.children.get(n)}return e.value}delete(t){const e=[];let r=n(this,nr,"f");for(const n of t){if(!r.children.has(n))return!1;e.push(r),r=r.children.get(n)}if(delete r.value,0===r.children.size)for(const[n,r]of E.toArray(E.zip(t,e)).reverse())if(r.children.delete(n),0!==r.children.size)break;return!0}}t.Emitter=s,t.HashMap=a,t.HashSet=c,t.LRUMap=er,t.Queue=u,t.TrieMap=or,t.convertArrayToCons=function t([n,...e]){return[n,e.length?t(e):null]},t.convertConsToArray=function t([n,e]){return null===e?[n]:[n,...t(e)]},Object.defineProperty(t,"__esModule",{value:!0})}));
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,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n}var r,i,o,s;class a{constructor(){r.set(this,new Map)}get[(r=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}on(t,n){e(this,r,"f").has(t)||e(this,r,"f").set(t,new Set);e(this,r,"f").get(t).add(n)}off(t,n){if(!e(this,r,"f").has(t))return;const i=e(this,r,"f").get(t);i.delete(n),0===i.size&&e(this,r,"f").delete(t)}emit(t,n){if(!e(this,r,"f").has(t))return;e(this,r,"f").get(t).forEach((t=>t(n)))}}class c{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 u{constructor(t){this.hash=t,o.set(this,new Map)}get[(o=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return e(this,o,"f").size}[Symbol.iterator](){return e(this,o,"f").values()}add(t){return e(this,o,"f").set(this.hash(t),t),this}delete(t){return e(this,o,"f").delete(this.hash(t))}has(t){return e(this,o,"f").has(this.hash(t))}clear(){e(this,o,"f").clear()}values(){return e(this,o,"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 l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},d={},y={CustomError:void 0};class h extends Error{get name(){return this.constructor.name}}y.CustomError=h;var m={ExpectedError:void 0};const v=y;class p extends v.CustomError{}m.ExpectedError=p;var g={AssertionError:void 0};const b=y;class w extends b.CustomError{}g.AssertionError=w;var T={};T.normalize=void 0,T.normalize=function(t){var e;return{name:t.name,message:t.message,stack:null!==(e=t.stack)&&void 0!==e?e:null}};var A={refute:void 0};const S=m;A.refute=function(t,e){if(t)throw new S.ExpectedError(e)};var I={assert:void 0};const x=g;I.assert=function(t,e){if(!t)throw new x.AssertionError(e)},function(t){var e=l&&l.__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=l&&l.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(y,t),n(m,t),n(g,t),n(T,t),n(A,t),n(I,t)}(d);var E={},B={},k={},O={},j={};j.go=void 0,j.go=function(t){return t()},function(t){var e=l&&l.__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]});(l&&l.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)})(j,t)}(O),k.chunkAsync=void 0;const N=O,R=d;k.chunkAsync=function(t,e){return R.assert(Number.isInteger(e),"The parameter size must be an integer"),R.assert(e>0,"The parameter size must be greater than 0"),N.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 _={},q={},z={};function M(t){return Array.isArray(t)}z.isntEmptyArray=z.isEmptyArray=z.isntArray=z.isArray=void 0,z.isArray=M,z.isntArray=function(t){return!M(t)},z.isEmptyArray=function(t){return 0===t.length},z.isntEmptyArray=function(t){return 0!==t.length};var U={},D={};function J(t){return null===t}D.isntNull=D.isNull=void 0,D.isNull=J,D.isntNull=function(t){return!J(t)};var C={};function P(t){return void 0===t}C.isntUndefined=C.isUndefined=void 0,C.isUndefined=P,C.isntUndefined=function(t){return!P(t)},U.isntAsyncIterable=U.isAsyncIterable=void 0;const W=D,F=C;function L(t){return W.isntNull(t)&&F.isntUndefined(t)&&"function"==typeof t[Symbol.asyncIterator]}U.isAsyncIterable=L,U.isntAsyncIterable=function(t){return!L(t)};var K={};function H(t){return"bigint"==typeof t}K.isntBigInt=K.isBigInt=void 0,K.isBigInt=H,K.isntBigInt=function(t){return!H(t)};var V={};function Q(t){return"boolean"==typeof t}V.isntBoolean=V.isBoolean=void 0,V.isBoolean=Q,V.isntBoolean=function(t){return!Q(t)};var G={},X={};function Y(t){return"string"==typeof t}X.isntString=X.isString=void 0,X.isString=Y,X.isntString=function(t){return!Y(t)},G.isntChar=G.isChar=void 0;const Z=X;function $(t){return Z.isString(t)&&1===t.length}G.isChar=$,G.isntChar=function(t){return!$(t)};var tt={};function et(t){return t instanceof Date}tt.isntDate=tt.isDate=void 0,tt.isDate=et,tt.isntDate=function(t){return!et(t)};var nt={};nt.inEnum=void 0,nt.inEnum=function(t,e){return Object.values(e).includes(t)};var rt={};function it(t){return!t}rt.isntFalsy=rt.isFalsy=void 0,rt.isFalsy=it,rt.isntFalsy=function(t){return!it(t)};var ot={};function st(t){return"function"==typeof t}ot.isntFunction=ot.isFunction=void 0,ot.isFunction=st,ot.isntFunction=function(t){return!st(t)};var at={};at.isntIterable=at.isIterable=void 0;const ct=D,ut=C;function ft(t){return ct.isntNull(t)&&ut.isntUndefined(t)&&"function"==typeof t[Symbol.iterator]}at.isIterable=ft,at.isntIterable=function(t){return!ft(t)};var lt={},dt={};function yt(t){return null!==t&&"object"==typeof t}dt.isntEmptyObject=dt.isEmptyObject=dt.isRecord=dt.isntObject=dt.isObject=void 0,dt.isObject=yt,dt.isntObject=function(t){return!yt(t)},dt.isRecord=function(t){return yt(t)},dt.isEmptyObject=function(t){return 0===Object.keys(t).length},dt.isntEmptyObject=function(t){return 0!==Object.keys(t).length};var ht={};function mt(t){return"number"==typeof t}ht.isntNumber=ht.isNumber=void 0,ht.isNumber=mt,ht.isntNumber=function(t){return!mt(t)},lt.isntJsonRpcError=lt.isJsonRpcError=lt.isntJsonRpcSuccess=lt.isJsonRpcSuccess=lt.isntJsonRpcRequest=lt.isJsonRpcRequest=lt.isntJsonRpcNotification=lt.isJsonRpcNotification=void 0;const vt=z,pt=dt,gt=X,bt=ht,wt=C;function Tt(t){return gt.isString(t)||bt.isNumber(t)}function At(t){return vt.isArray(t)||pt.isObject(t)}function St(t){return pt.isRecord(t)&&gt.isString(t.jsonrpc)&&gt.isString(t.method)&&wt.isUndefined(t.id)&&At(t.params)}function It(t){return pt.isRecord(t)&&gt.isString(t.jsonrpc)&&gt.isString(t.method)&&Tt(t.id)&&At(t.params)}function xt(t){return pt.isRecord(t)&&gt.isString(t.jsonrpc)&&gt.isString(t.id)&&wt.isntUndefined(t.result)}function Et(t){return pt.isRecord(t)&&gt.isString(t.jsonrpc)&&Tt(t.id)&&function(t){return pt.isRecord(t)&&bt.isNumber(t.code)&&gt.isString(t.message)&&(wt.isUndefined(t.data)||pt.isObject(t.data))}(t.error)}lt.isJsonRpcNotification=St,lt.isntJsonRpcNotification=function(t){return!St(t)},lt.isJsonRpcRequest=It,lt.isntJsonRpcRequest=function(t){return!It(t)},lt.isJsonRpcSuccess=xt,lt.isntJsonRpcSuccess=function(t){return!xt(t)},lt.isJsonRpcError=Et,lt.isntJsonRpcError=function(t){return!Et(t)};var Bt={};Bt.isntJson=Bt.isJson=void 0,Bt.isJson=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},Bt.isntJson=function t(e){return!t()};var kt={};kt.isAbsoluteURL=void 0,kt.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}},function(t){var e=l&&l.__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=l&&l.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(z,t),n(U,t),n(K,t),n(V,t),n(G,t),n(tt,t),n(nt,t),n(rt,t),n(ot,t),n(at,t),n(lt,t),n(Bt,t),n(D,t),n(ht,t),n(dt,t),n(X,t),n(C,t),n(kt,t)}(q),_.chunkByAsync=void 0;const Ot=q;_.chunkByAsync=function(t,e){return Ot.isAsyncIterable(t)?async function*(t){let n=[],r=0;for await(const i of t)n.push(i),await e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t):async function*(t){let n=[],r=0;for(const i of t)n.push(i),await e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t)};var jt={};jt.chunkBy=void 0,jt.chunkBy=function*(t,e){let n=[],r=0;for(const i of t)n.push(i),e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)};var Nt={chunk:void 0};const Rt=O,_t=d;Nt.chunk=function(t,e){return _t.assert(Number.isInteger(e),"The parameter size must be an integer"),_t.assert(e>0,"The parameter size must be greater than 0"),Rt.go((function*(){let n=[];for(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var qt={concatAsync:void 0};const zt=q,Mt=O;qt.concatAsync=function(t,...e){return Mt.go((async function*(){for(const n of[t,...e])if(zt.isAsyncIterable(n))for await(const t of n)yield t;else for(const t of n)yield t}))};var Ut={concat:void 0};const Dt=O;Ut.concat=function(t,...e){return Dt.go((function*(){for(const n of[t,...e])yield*n}))};var Jt={},Ct={};Ct.copyIterable=Ct.copyAsyncIterable=void 0,Ct.copyAsyncIterable=async function*(t){for await(const e of t)yield e},Ct.copyIterable=function*(t){for(const e of t)yield e},Jt.dropAsync=void 0;const Pt=O,Wt=Ct,Ft=d;Jt.dropAsync=function(t,e){return Ft.assert(Number.isInteger(e),"The parameter count must be an integer"),Ft.assert(e>=0,"The parameter count must be greater than or equal to 0"),0===e?Wt.copyAsyncIterable(t):Pt.go((async function*(){var n;const r=t[Symbol.asyncIterator]();let i;try{let t;for(;!(({value:t,done:i}=await r.next()),i||e<=0);)e--;for(;!i;)yield t,({value:t,done:i}=await r.next())}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var Lt={dropRightAsync:void 0};const Kt=O,Ht=Ct,Vt=d;Lt.dropRightAsync=function(t,e){return Vt.assert(Number.isInteger(e),"The parameter count must be an integer"),Vt.assert(e>=0,"The parameter count must be greater than or equal to 0"),0===e?Ht.copyAsyncIterable(t):Kt.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 Qt={dropRight:void 0};const Gt=O,Xt=Ct,Yt=d;Qt.dropRight=function(t,e){return Yt.assert(Number.isInteger(e),"The parameter count must be an integer"),Yt.assert(e>=0,"The parameter count must be greater than or equal to 0"),0===e?Xt.copyIterable(t):Gt.go((function*(){const n=Array.from(t);yield*n.slice(0,-e)}))};var Zt={dropUntilAsync:void 0};const $t=q;Zt.dropUntilAsync=function(t,e){return $t.isAsyncIterable(t)?async function*(t){var n;const r=t[Symbol.asyncIterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=await r.next()),i||await e(t,o++)););for(;!i;)yield t,({value:t,done:i}=await r.next())}finally{i||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 i;try{let t,o=0;for(;!(({value:t,done:i}=r.next()),i||await e(t,o++)););for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}(t)};var te={};te.dropUntil=void 0,te.dropUntil=function*(t,e){var n;const r=t[Symbol.iterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=r.next()),i||e(t,o++)););for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}};var ee={drop:void 0};const ne=O,re=Ct,ie=d;ee.drop=function(t,e){return ie.assert(Number.isInteger(e),"The parameter count must be an integer"),ie.assert(e>=0,"The parameter count must be greater than or equal to 0"),0===e?re.copyIterable(t):ne.go((function*(){var n;const r=t[Symbol.iterator]();let i;try{let t;for(;!(({value:t,done:i}=r.next()),i||e<=0);)e--;for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}))};var oe={filterAsync:void 0};const se=q;oe.filterAsync=function(t,e){return se.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 ae={};ae.filter=void 0,ae.filter=function*(t,e){let n=0;for(const r of t)e(r,n)&&(yield r),n++};var ce={},ue={},fe={flattenByAsync:void 0};const le=q;function de(t){return le.isIterable(t)&&le.isntChar(t)}fe.flattenByAsync=function(t,e){return le.isAsyncIterable(t)?async function*(t){const r=1;for await(const i of t)de(i)&&await e(i,r)?yield*n(i,r+1):yield i}(t):function(t){return n(t,1)}(t);async function*n(t,r){for(const i of t)de(i)&&await e(i,r)?yield*n(i,r+1):yield i}},ue.flattenDeepAsync=void 0;const ye=fe,he=d;ue.flattenDeepAsync=function(t,e=1/0){return he.assert(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),he.assert(e>=0,"The parameter depth must be greater than or equal to 0"),ye.flattenByAsync(t,((t,n)=>n<=e))},ce.flattenAsync=void 0;const me=ue;ce.flattenAsync=function(t){return me.flattenDeepAsync(t,1)};var ve={flattenBy:void 0};const pe=q;ve.flattenBy=function(t,e){return function*t(n,r){for(const o of n)i=o,pe.isIterable(i)&&pe.isntChar(i)&&e(o,r)?yield*t(o,r+1):yield o;var i}(t,1)};var ge={flattenDeep:void 0};const be=ve,we=d;ge.flattenDeep=function(t,e=1/0){return we.assert(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),we.assert(e>=0,"The parameter depth must be greater than or equal to 0"),be.flattenBy(t,((t,n)=>n<=e))};var Te={flatten:void 0};const Ae=ge;Te.flatten=function(t){return Ae.flattenDeep(t,1)};var Se={mapAsync:void 0};const Ie=q;Se.mapAsync=function(t,e){return Ie.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 xe={};xe.map=void 0,xe.map=function*(t,e){let n=0;for(const r of t)yield e(r,n),n++};var Ee={repeatAsync:void 0};const Be=O,ke=d;Ee.repeatAsync=function(t,e){return ke.assert(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),ke.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")}(),Be.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 Oe={repeat:void 0};const je=O,Ne=d;Oe.repeat=function(t,e){return Ne.assert(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),Ne.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")}(),je.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 Re={sliceAsync:void 0};const _e=O,qe=d;Re.sliceAsync=function(t,e,n=1/0){return qe.assert(Number.isInteger(e),"The parameter start must be an integer"),qe.assert(e>=0,"The parameter start must be greater than or equal to 0"),qe.assert(Number.isInteger(n),"The parameter end must be an integer"),qe.assert(n>=e,"The parameter end must be greater than or equal to start"),_e.go((async function*(){let r=0;for await(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var ze={slice:void 0};const Me=O,Ue=d;ze.slice=function(t,e,n=1/0){return Ue.assert(Number.isInteger(e),"The parameter start must be an integer"),Ue.assert(e>=0,"The parameter start must be greater than or equal to 0"),Ue.assert(Number.isInteger(n),"The parameter end must be an integer"),Ue.assert(n>=e,"The parameter end must be greater than or equal to start"),Me.go((function*(){let r=0;for(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var De={};De.splitAsync=void 0,De.splitAsync=async function*(t,e){let n=[];for await(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Je={splitByAsync:void 0};const Ce=q;Je.splitByAsync=function(t,e){return Ce.isAsyncIterable(t)?async function*(t){let n=[],r=0;for await(const i of t)await e(i,r)?(yield n,n=[]):n.push(i),r++;yield n}(t):async function*(t){let n=[],r=0;for(const i of t)await e(i,r)?(yield n,n=[]):n.push(i),r++;yield n}(t)};var Pe={};Pe.splitBy=void 0,Pe.splitBy=function*(t,e){let n=[],r=0;for(const i of t)e(i,r)?(yield n,n=[]):n.push(i),r++;yield n};var We={};We.split=void 0,We.split=function*(t,e){let n=[];for(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Fe={takeAsync:void 0};const Le=O,Ke=d;Fe.takeAsync=function(t,e){return Ke.assert(Number.isInteger(e),"The parameter count must be an integer"),Ke.assert(e>=0,"The parameter count must be greater than or equal to 0"),Le.go((async function*(){if(0!==e)for await(const n of t)if(yield n,0===--e)break}))};var He={takeRightAsync:void 0};const Ve=O,Qe=d;He.takeRightAsync=function(t,e){return Qe.assert(Number.isInteger(e),"The parameter count must be an integer"),Qe.assert(e>=0,"The parameter count must be greater than or equal to 0"),Ve.go((async function*(){var n;const r=t[Symbol.asyncIterator]();let i;try{const t=[];let o;for(;({value:o,done:i}=await r.next()),!i;)t.push(o),t.length>e&&t.shift();yield*t}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var Ge={takeRight:void 0};const Xe=O,Ye=d;Ge.takeRight=function(t,e){return Ye.assert(Number.isInteger(e),"The parameter count must be an integer"),Ye.assert(e>=0,"The parameter count must be greater than or equal to 0"),Xe.go((function*(){var n;const r=t[Symbol.iterator]();let i;try{const t=[];let o;for(;({value:o,done:i}=r.next()),!i;)t.push(o),t.length>e&&t.shift();yield*t}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}))};var Ze={takeUntilAsync:void 0};const $e=q;Ze.takeUntilAsync=function(t,e){return $e.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 tn={};tn.takeUntil=void 0,tn.takeUntil=function*(t,e){let n=0;for(const r of t){if(e(r,n))break;yield r,n++}};var en={take:void 0};const nn=O,rn=d;en.take=function(t,e){return rn.assert(Number.isInteger(e),"The parameter count must be an integer"),rn.assert(e>=0,"The parameter count must be greater than or equal to 0"),nn.go((function*(){if(0!==e)for(const n of t)if(yield n,0===--e)break}))};var on={tapAsync:void 0};const sn=q;on.tapAsync=function(t,e){return sn.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 an={};an.tap=void 0,an.tap=function*(t,e){let n=0;for(const r of t)e(r,n),yield r,n++};var cn={};cn.toAsyncIterable=void 0,cn.toAsyncIterable=async function*(t){for(const e of t)yield e};var un={};un.transformAsync=void 0,un.transformAsync=async function*(t,e){yield*e(t)};var fn={};fn.transform=void 0,fn.transform=function*(t,e){yield*e(t)};var ln={};ln.uniqAsync=void 0,ln.uniqAsync=async function*(t){const e=new Set;for await(const n of t)e.has(n)||(yield n,e.add(n))};var dn={uniqByAsync:void 0};const yn=q;dn.uniqByAsync=function(t,e){return yn.isAsyncIterable(t)?async function*(t){const n=new Set;let r=0;for await(const i of t){const t=await e(i,r);n.has(t)||(yield i,n.add(t)),r++}}(t):async function*(t){const n=new Set;let r=0;for(const i of t){const t=await e(i,r);n.has(t)||(yield i,n.add(t)),r++}}(t)};var hn={};hn.uniqBy=void 0,hn.uniqBy=function*(t,e){const n=new Set;let r=0;for(const i of t){const t=e(i,r);n.has(t)||(yield i,n.add(t)),r++}};var mn={};mn.uniq=void 0,mn.uniq=function*(t){const e=new Set;for(const n of t)e.has(n)||(yield n,e.add(n))};var vn={zipAsync:void 0};const pn=q;var gn;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(gn||(gn={})),vn.zipAsync=function(t,...e){return async function*(...t){var e,n,r,i;const o=t.length,s=t.map((t=>pn.isAsyncIterable(t)?[gn.Async,t[Symbol.asyncIterator]()]:[gn.Sync,t[Symbol.iterator]()])),a=s.map((()=>!1));try{for(;;){const t=new Array(o);for(let e=0;e<o;e++){const[n,r]=s[e];let i;if(i=n===gn.Async?await r.next():r.next(),i.done)return void(a[e]=!0);t[e]=i.value}yield t}}finally{const t=s.filter(((t,e)=>!a[e]));for(const[o,s]of t)o===gn.Async?await(null===(n=(e=s).return)||void 0===n?void 0:n.call(e)):null===(i=(r=s).return)||void 0===i||i.call(r)}}(t,...e)};var bn={};bn.zip=void 0,bn.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 i=0;i<e;i++){const{value:e,done:o}=n[i].next();if(o)return void(r[i]=!0);t[i]=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=l&&l.__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=l&&l.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(k,t),n(_,t),n(jt,t),n(Nt,t),n(qt,t),n(Ut,t),n(Jt,t),n(Lt,t),n(Qt,t),n(Zt,t),n(te,t),n(ee,t),n(oe,t),n(ae,t),n(ce,t),n(fe,t),n(ve,t),n(ue,t),n(ge,t),n(Te,t),n(Se,t),n(xe,t),n(Ee,t),n(Oe,t),n(Re,t),n(ze,t),n(De,t),n(Je,t),n(Pe,t),n(We,t),n(Fe,t),n(He,t),n(Ge,t),n(Ze,t),n(tn,t),n(en,t),n(on,t),n(an,t),n(cn,t),n(un,t),n(fn,t),n(ln,t),n(dn,t),n(hn,t),n(mn,t),n(vn,t),n(bn,t)}(B);var wn={},Tn={};Tn.consume=void 0,Tn.consume=function(t,e){return e(t)};var An={eachAsync:void 0};const Sn=q;An.eachAsync=function(t,e){return Sn.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 In={};In.each=void 0,In.each=function(t,e){let n=0;for(const r of t)e(r,n),n++};var xn={everyAsync:void 0};const En=q;xn.everyAsync=function(t,e){return En.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 Bn={};Bn.every=void 0,Bn.every=function(t,e){let n=0;for(const r of t){if(!e(r,n))return!1;n++}return!0};var kn={findAsync:void 0};const On=q;kn.findAsync=function(t,e){return On.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 jn={};jn.find=void 0,jn.find=function(t,e){let n=0;for(const r of t){if(e(r,n))return r;n++}};var Nn={};Nn.firstAsync=void 0,Nn.firstAsync=async function(t){for await(const e of t)return e};var Rn={};Rn.first=void 0,Rn.first=function(t){for(const e of t)return e};var _n={};_n.includesAsync=void 0,_n.includesAsync=async function(t,e){for await(const n of t)if(n===e)return!0;return!1};var qn={};qn.includes=void 0,qn.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1};var zn={};zn.matchAsync=void 0,zn.matchAsync=async function(t,e){const n=e.length;let r=0;for await(const i of t)if(i===e[r]&&r++,r===n)return!0;return!1};var Mn={};Mn.match=void 0,Mn.match=function(t,e){const n=e.length;let r=0;for(const i of t)if(i===e[r]&&r++,r===n)return!0;return!1};var Un={reduceAsync:void 0};const Dn=q;Un.reduceAsync=function(t,e,n){return Dn.isUndefined(n)?function(t,e){return Dn.isAsyncIterable(t)?n(t):r(t);async function n(t){var n;const r=t[Symbol.asyncIterator]();let i;try{let t,s=await o(r),a=1;for(;({value:t,done:i}=await r.next()),!i;)s=await e(s,t,a++);return s}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}async function o(t){const e=await t.next();if(e.done)throw i=!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 i;try{let t,s=o(r),a=1;for(;({value:t,done:i}=r.next()),!i;)s=await e(s,t,a++);return s}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}}(t,e):function(t,e,n){return Dn.isAsyncIterable(t)?i(t):r(t);async function r(t){let r=n,i=0;for(const n of t)r=await e(r,n,i++);return r}async function i(t){let r=n,i=0;for await(const n of t)r=await e(r,n,i++);return r}}(t,e,n)};var Jn={reduce:void 0};const Cn=q;Jn.reduce=function(t,e,n){return Cn.isUndefined(n)?function(t,e){var n;const r=t[Symbol.iterator]();let i;try{let t,s=o(r),a=1;for(;({value:t,done:i}=r.next()),!i;)s=e(s,t,a++);return s}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}(t,e):function(t,e,n){let r=n,i=0;for(const n of t)r=e(r,n,i++);return r}(t,e,n)};var Pn={someAsync:void 0};const Wn=q;Pn.someAsync=function(t,e){return Wn.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 Fn={};Fn.some=void 0,Fn.some=function(t,e){let n=0;for(const r of t){if(e(r,n))return!0;n++}return!1};var Ln={};Ln.lastAsync=void 0,Ln.lastAsync=async function(t){var e;const n=t[Symbol.asyncIterator]();let r;try{let t,i;for(;({value:t,done:r}=await n.next()),!r;)i=t;return i}finally{r||await(null===(e=n.return)||void 0===e?void 0:e.call(n))}};var Kn={};Kn.last=void 0,Kn.last=function(t){var e;const n=t[Symbol.iterator]();let r;try{let t,i;for(;({value:t,done:r}=n.next()),!r;)i=t;return i}finally{r||null===(e=n.return)||void 0===e||e.call(n)}};var Hn={toArrayAsync:void 0};const Vn=Tn;Hn.toArrayAsync=function(t){return Vn.consume(t,(async t=>{const e=[];for await(const n of t)e.push(n);return e}))};var Qn={toArray:void 0};const Gn=Tn;Qn.toArray=function(t){return Gn.consume(t,(t=>Array.from(t)))};var Xn={toSetAsync:void 0};const Yn=Tn;Xn.toSetAsync=function(t){return Yn.consume(t,(async t=>{const e=new Set;for await(const n of t)e.add(n);return e}))};var Zn={toSet:void 0};const $n=Tn;var tr,er;Zn.toSet=function(t){return $n.consume(t,(t=>new Set(t)))},function(t){var e=l&&l.__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=l&&l.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(Tn,t),n(An,t),n(In,t),n(xn,t),n(Bn,t),n(kn,t),n(jn,t),n(Nn,t),n(Rn,t),n(_n,t),n(qn,t),n(zn,t),n(Mn,t),n(Un,t),n(Jn,t),n(Pn,t),n(Fn,t),n(Ln,t),n(Kn,t),n(Hn,t),n(Qn,t),n(Xn,t),n(Zn,t)}(wn),function(t){var e=l&&l.__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=l&&l.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(B,t),n(wn,t)}(E);class nr{constructor(t){tr.set(this,void 0),er.set(this,new Map),d.assert(Number.isInteger(t),"The parameter limit must be an integer"),d.assert(t>0,"The parameter limit must be a positive value"),n(this,tr,t,"f")}get[(tr=new WeakMap,er=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return e(this,er,"f").size}set(t,n){return e(this,er,"f").has(t)?this.updateItem(t,n):(e(this,er,"f").size===e(this,tr,"f")&&e(this,er,"f").delete(this.getColdestKey()),e(this,er,"f").set(t,n)),this}has(t){return e(this,er,"f").has(t)}get(t){if(!this.has(t))return;const n=e(this,er,"f").get(t);return this.updateItem(t,n),n}delete(t){return e(this,er,"f").delete(t)}clear(){e(this,er,"f").clear()}updateItem(t,n){e(this,er,"f").delete(t),e(this,er,"f").set(t,n)}getColdestKey(){return E.first(e(this,er,"f").keys())}}var rr={},ir={};ir.setTimeout=void 0,ir.setTimeout=function(t,e){const n=globalThis.setTimeout(e,t);return()=>clearTimeout(n)};var or={setSchedule:void 0};const sr=ir;or.setSchedule=function(t,e){const n=t-Date.now();return(0,sr.setTimeout)(n,e)};var ar={};ar.setInterval=void 0,ar.setInterval=function(t,e){const n=globalThis.setInterval(e,t);return()=>clearInterval(n)};var cr={setImmediate:void 0};const ur=ir;cr.setImmediate=function(t){if(globalThis.setImmediate){const e=globalThis.setImmediate(t);return()=>clearImmediate(e)}return(0,ur.setTimeout)(0,t)};var fr={setTimeoutLoop:void 0};const lr=ir;fr.setTimeoutLoop=function(t,e){let n=!1,r=(0,lr.setTimeout)(t,(async function i(){await e(),n||(r=(0,lr.setTimeout)(t,i))}));return()=>{n=!0,r()}};var dr={setDynamicTimeoutLoop:void 0};const yr=ir;var hr,mr,vr,pr,gr,br;dr.setDynamicTimeoutLoop=function(t,e){let n=!1,r=(0,yr.setTimeout)(t,(async function i(){const o=Date.now();await e();const s=Date.now()-o;n||(r=(0,yr.setTimeout)(Math.max(t-s,0),i))}));return()=>{n=!0,r()}},function(t){var e=l&&l.__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=l&&l.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(ir,t),n(or,t),n(ar,t),n(cr,t),n(fr,t),n(dr,t)}(rr);class wr{constructor(){hr.set(this,new Map),mr.set(this,void 0),this.itemsSortedByExpirationTime=[]}get[(hr=new WeakMap,mr=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return e(this,hr,"f").size}set(t,n,r){return e(this,hr,"f").set(t,n),this.removeItem(t),this.addItem(t,Date.now()+r),this}has(t){return e(this,hr,"f").has(t)}get(t){return e(this,hr,"f").get(t)}delete(t){const n=e(this,hr,"f").delete(t);if(n){const e=this.itemsSortedByExpirationTime.findIndex((e=>e.key===t));this.itemsSortedByExpirationTime.splice(e,1),0===e&&this.rescheduleTimeout()}return n}clear(){var t;e(this,hr,"f").clear(),null===(t=e(this,mr,"f"))||void 0===t||t.call(this),this.itemsSortedByExpirationTime=[]}addItem(t,e){for(let n=0;n<this.itemsSortedByExpirationTime.length;n++){if(e<this.itemsSortedByExpirationTime[n].expirationTime)return this.itemsSortedByExpirationTime.splice(n,0,{key:t,expirationTime:e}),void(0===n&&this.rescheduleTimeout())}this.itemsSortedByExpirationTime.push({key:t,expirationTime:e}),1===this.itemsSortedByExpirationTime.length&&this.rescheduleTimeout()}removeItem(t){const e=this.itemsSortedByExpirationTime.findIndex((e=>e.key===t));e>=0&&(this.itemsSortedByExpirationTime.splice(e,1),0===e&&this.rescheduleTimeout())}clearExpiredItems(t){const n=this.itemsSortedByExpirationTime.findIndex((e=>e.expirationTime>t));(n>=0?this.itemsSortedByExpirationTime.splice(0,n):this.itemsSortedByExpirationTime.splice(0,this.itemsSortedByExpirationTime.length)).forEach((t=>e(this,hr,"f").delete(t.key)))}rescheduleTimeout(){var t;if(null===(t=e(this,mr,"f"))||void 0===t||t.call(this),this.itemsSortedByExpirationTime.length>0){const t=this.itemsSortedByExpirationTime[0];if(Number.isFinite(t.expirationTime)){const e=rr.setSchedule(t.expirationTime,(()=>{this.clearExpiredItems(Date.now()),this.rescheduleTimeout()}));n(this,mr,(()=>{e(),n(this,mr,void 0,"f")}),"f")}}}}class Tr{constructor(t){vr.set(this,void 0),pr.set(this,new Map),gr.set(this,void 0),this.itemsSortedByExpirationTime=[],d.assert(Number.isInteger(t),"The parameter limit must be an integer"),d.assert(t>0,"The parameter limit must be a positive value"),n(this,vr,t,"f")}get[(vr=new WeakMap,pr=new WeakMap,gr=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return e(this,pr,"f").size}set(t,n,r){return e(this,pr,"f").has(t)?(this.updateItem(t,n),this.removeItem(t),this.addItem(t,Date.now()+r)):(e(this,pr,"f").size===e(this,vr,"f")&&e(this,pr,"f").delete(this.getColdestKey()),e(this,pr,"f").set(t,n),this.addItem(t,Date.now()+r)),this}has(t){return e(this,pr,"f").has(t)}get(t){if(this.has(t)){const n=e(this,pr,"f").get(t);return this.updateItem(t,n),n}}delete(t){const n=e(this,pr,"f").delete(t);if(n){const e=this.itemsSortedByExpirationTime.findIndex((e=>e.key===t));this.itemsSortedByExpirationTime.splice(e,1),0===e&&this.rescheduleTimeout()}return n}clear(){var t;e(this,pr,"f").clear(),null===(t=e(this,gr,"f"))||void 0===t||t.call(this),this.itemsSortedByExpirationTime=[]}updateItem(t,n){e(this,pr,"f").delete(t),e(this,pr,"f").set(t,n)}addItem(t,e){for(let n=0;n<this.itemsSortedByExpirationTime.length;n++){if(e<this.itemsSortedByExpirationTime[n].expirationTime)return this.itemsSortedByExpirationTime.splice(n,0,{key:t,expirationTime:e}),void(0===n&&this.rescheduleTimeout())}this.itemsSortedByExpirationTime.push({key:t,expirationTime:e}),1===this.itemsSortedByExpirationTime.length&&this.rescheduleTimeout()}removeItem(t){const e=this.itemsSortedByExpirationTime.findIndex((e=>e.key===t));e>=0&&(this.itemsSortedByExpirationTime.splice(e,1),0===e&&this.rescheduleTimeout())}clearExpiredItems(t){const n=this.itemsSortedByExpirationTime.findIndex((e=>e.expirationTime>t));(n>=0?this.itemsSortedByExpirationTime.splice(0,n):this.itemsSortedByExpirationTime.splice(0,this.itemsSortedByExpirationTime.length)).forEach((t=>e(this,pr,"f").delete(t.key)))}rescheduleTimeout(){var t;if(null===(t=e(this,gr,"f"))||void 0===t||t.call(this),this.itemsSortedByExpirationTime.length>0){const t=this.itemsSortedByExpirationTime[0];if(Number.isFinite(t.expirationTime)){const e=rr.setSchedule(t.expirationTime,(()=>{this.clearExpiredItems(Date.now()),this.rescheduleTimeout()}));n(this,gr,(()=>{e(),n(this,gr,void 0,"f")}),"f")}}}getColdestKey(){return E.first(e(this,pr,"f").keys())}}class Ar{constructor(t){this.value=t,this.children=new Map}}class Sr{constructor(){br.set(this,new Ar)}get[(br=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}set(t,n){let r=e(this,br,"f");for(const e of t)r.children.has(e)||r.children.set(e,new Ar),r=r.children.get(e);return r.value=n,this}has(t){let n=e(this,br,"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,br,"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,br,"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 E.toArray(E.zip(t,n)).reverse())if(r.children.delete(e),0!==r.children.size)break;return!0}}t.Emitter=a,t.ExpirableMap=wr,t.HashMap=c,t.HashSet=u,t.LRUMap=nr,t.Queue=f,t.TLRUMap=Tr,t.TrieMap=Sr,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})}));
//# sourceMappingURL=index.umd.min.js.map

@@ -1,2 +0,2 @@

!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).Structures={})}(this,(function(t){"use strict";
!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";
/*! *****************************************************************************

@@ -16,3 +16,3 @@ Copyright (c) Microsoft Corporation.

***************************************************************************** */
function n(t,n,e,r){if("a"===e&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof n?t!==n||!r:!n.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===e?r:"a"===e?r.call(t):r?r.value:n.get(t)}var e,r,o,i;class s{constructor(){e.set(this,new Map)}get[(e=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}on(t,r){n(this,e,"f").has(t)||n(this,e,"f").set(t,new Set);n(this,e,"f").get(t).add(r)}off(t,r){if(!n(this,e,"f").has(t))return;const o=n(this,e,"f").get(t);o.delete(r),0===o.size&&n(this,e,"f").delete(t)}emit(t,r){if(!n(this,e,"f").has(t))return;n(this,e,"f").get(t).forEach((t=>t(r)))}}class a{constructor(t){this.hash=t,r.set(this,new Map)}get[(r=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return n(this,r,"f").size}set(t,e){return n(this,r,"f").set(this.hash(t),e),this}has(t){return n(this,r,"f").has(this.hash(t))}get(t){return n(this,r,"f").get(this.hash(t))}delete(t){return n(this,r,"f").delete(this.hash(t))}clear(){n(this,r,"f").clear()}}class c{constructor(t){this.hash=t,o.set(this,new Map)}get[(o=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return n(this,o,"f").size}[Symbol.iterator](){return n(this,o,"f").values()}add(t){return n(this,o,"f").set(this.hash(t),t),this}delete(t){return n(this,o,"f").delete(this.hash(t))}has(t){return n(this,o,"f").has(this.hash(t))}clear(){n(this,o,"f").clear()}values(){return n(this,o,"f").values()}}class u{constructor(){i.set(this,[])}get[(i=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return n(this,i,"f").length}empty(){n(this,i,"f").length=0}enqueue(...t){n(this,i,"f").push(...t)}dequeue(){return n(this,i,"f").shift()}remove(t){let e;for(;(e=n(this,i,"f").indexOf(t))>=0;)n(this,i,"f").splice(e,1)}}var f="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},l={},d={CustomError:void 0};class y extends Error{get name(){return this.constructor.name}}d.CustomError=y;var v={ExpectedError:void 0};const h=d;class p extends h.CustomError{}v.ExpectedError=p;var m={AssertionError:void 0};const b=d;class g extends b.CustomError{}m.AssertionError=g;var w={};w.normalize=void 0,w.normalize=function(t){var n;return{name:t.name,message:t.message,stack:null!==(n=t.stack)&&void 0!==n?n:null}};var A={refute:void 0};const I=v;A.refute=function(t,n){if(t)throw new I.ExpectedError(n)};var S={assert:void 0};const T=m;S.assert=function(t,n){if(!t)throw new T.AssertionError(n)},function(t){var n=f&&f.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),e=f&&f.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};e(d,t),e(v,t),e(m,t),e(w,t),e(A,t),e(S,t)}(l);var E={},O={},R={},j={},k={};k.go=void 0,k.go=function(t){return t()},function(t){var n=f&&f.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]});(f&&f.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)})(k,t)}(j),R.chunkAsync=void 0;const N=j,x=l;R.chunkAsync=function(t,n){return x.assert(Number.isInteger(n),"The parameter size must be an integer"),x.assert(n>0,"The parameter size must be greater than 0"),N.go((async function*(){let e=[];for await(const r of t)e.push(r),e.length>=n&&(yield e,e=[]);e.length&&(yield e)}))};var B={},q={},_={};function U(t){return Array.isArray(t)}_.isntEmptyArray=_.isEmptyArray=_.isntArray=_.isArray=void 0,_.isArray=U,_.isntArray=function(t){return!U(t)},_.isEmptyArray=function(t){return 0===t.length},_.isntEmptyArray=function(t){return 0!==t.length};var z={},J={};function C(t){return null===t}J.isntNull=J.isNull=void 0,J.isNull=C,J.isntNull=function(t){return!C(t)};var M={};function P(t){return void 0===t}M.isntUndefined=M.isUndefined=void 0,M.isUndefined=P,M.isntUndefined=function(t){return!P(t)},z.isntAsyncIterable=z.isAsyncIterable=void 0;const D=J,W=M;function F(t){return D.isntNull(t)&&W.isntUndefined(t)&&"function"==typeof t[Symbol.asyncIterator]}z.isAsyncIterable=F,z.isntAsyncIterable=function(t){return!F(t)};var L={};function H(t){return"bigint"==typeof t}L.isntBigInt=L.isBigInt=void 0,L.isBigInt=H,L.isntBigInt=function(t){return!H(t)};var K={};function V(t){return"boolean"==typeof t}K.isntBoolean=K.isBoolean=void 0,K.isBoolean=V,K.isntBoolean=function(t){return!V(t)};var Q={},G={};function X(t){return"string"==typeof t}G.isntString=G.isString=void 0,G.isString=X,G.isntString=function(t){return!X(t)},Q.isntChar=Q.isChar=void 0;const Y=G;function Z(t){return Y.isString(t)&&1===t.length}Q.isChar=Z,Q.isntChar=function(t){return!Z(t)};var $={};function tt(t){return t instanceof Date}$.isntDate=$.isDate=void 0,$.isDate=tt,$.isntDate=function(t){return!tt(t)};var nt={};nt.inEnum=void 0,nt.inEnum=function(t,n){return Object.values(n).includes(t)};var et={};function rt(t){return!t}et.isntFalsy=et.isFalsy=void 0,et.isFalsy=rt,et.isntFalsy=function(t){return!rt(t)};var ot={};function it(t){return"function"==typeof t}ot.isntFunction=ot.isFunction=void 0,ot.isFunction=it,ot.isntFunction=function(t){return!it(t)};var st={};st.isntIterable=st.isIterable=void 0;const at=J,ct=M;function ut(t){return at.isntNull(t)&&ct.isntUndefined(t)&&"function"==typeof t[Symbol.iterator]}st.isIterable=ut,st.isntIterable=function(t){return!ut(t)};var ft={},lt={};function dt(t){return null!==t&&"object"==typeof t}lt.isntEmptyObject=lt.isEmptyObject=lt.isRecord=lt.isntObject=lt.isObject=void 0,lt.isObject=dt,lt.isntObject=function(t){return!dt(t)},lt.isRecord=function(t){return dt(t)},lt.isEmptyObject=function(t){return 0===Object.keys(t).length},lt.isntEmptyObject=function(t){return 0!==Object.keys(t).length};var yt={};function vt(t){return"number"==typeof t}yt.isntNumber=yt.isNumber=void 0,yt.isNumber=vt,yt.isntNumber=function(t){return!vt(t)},ft.isntJsonRpcError=ft.isJsonRpcError=ft.isntJsonRpcSuccess=ft.isJsonRpcSuccess=ft.isntJsonRpcRequest=ft.isJsonRpcRequest=ft.isntJsonRpcNotification=ft.isJsonRpcNotification=void 0;const ht=_,pt=lt,mt=G,bt=yt,gt=M;function wt(t){return mt.isString(t)||bt.isNumber(t)}function At(t){return ht.isArray(t)||pt.isObject(t)}function It(t){return pt.isRecord(t)&&mt.isString(t.jsonrpc)&&mt.isString(t.method)&&gt.isUndefined(t.id)&&At(t.params)}function St(t){return pt.isRecord(t)&&mt.isString(t.jsonrpc)&&mt.isString(t.method)&&wt(t.id)&&At(t.params)}function Tt(t){return pt.isRecord(t)&&mt.isString(t.jsonrpc)&&mt.isString(t.id)&&gt.isntUndefined(t.result)}function Et(t){return pt.isRecord(t)&&mt.isString(t.jsonrpc)&&wt(t.id)&&function(t){return pt.isRecord(t)&&bt.isNumber(t.code)&&mt.isString(t.message)&&(gt.isUndefined(t.data)||pt.isObject(t.data))}(t.error)}ft.isJsonRpcNotification=It,ft.isntJsonRpcNotification=function(t){return!It(t)},ft.isJsonRpcRequest=St,ft.isntJsonRpcRequest=function(t){return!St(t)},ft.isJsonRpcSuccess=Tt,ft.isntJsonRpcSuccess=function(t){return!Tt(t)},ft.isJsonRpcError=Et,ft.isntJsonRpcError=function(t){return!Et(t)};var Ot={};Ot.isntJson=Ot.isJson=void 0,Ot.isJson=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},Ot.isntJson=function t(n){return!t()};var Rt={};Rt.isAbsoluteURL=void 0,Rt.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}},function(t){var n=f&&f.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),e=f&&f.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};e(_,t),e(z,t),e(L,t),e(K,t),e(Q,t),e($,t),e(nt,t),e(et,t),e(ot,t),e(st,t),e(ft,t),e(Ot,t),e(J,t),e(yt,t),e(lt,t),e(G,t),e(M,t),e(Rt,t)}(q),B.chunkByAsync=void 0;const jt=q;B.chunkByAsync=function(t,n){return jt.isAsyncIterable(t)?async function*(t){let e=[],r=0;for await(const o of t)e.push(o),await n(o,r)&&(yield e,e=[]),r++;e.length&&(yield e)}(t):async function*(t){let e=[],r=0;for(const o of t)e.push(o),await n(o,r)&&(yield e,e=[]),r++;e.length&&(yield e)}(t)};var kt={};kt.chunkBy=void 0,kt.chunkBy=function*(t,n){let e=[],r=0;for(const o of t)e.push(o),n(o,r)&&(yield e,e=[]),r++;e.length&&(yield e)};var Nt={chunk:void 0};const xt=j,Bt=l;Nt.chunk=function(t,n){return Bt.assert(Number.isInteger(n),"The parameter size must be an integer"),Bt.assert(n>0,"The parameter size must be greater than 0"),xt.go((function*(){let e=[];for(const r of t)e.push(r),e.length>=n&&(yield e,e=[]);e.length&&(yield e)}))};var qt={concatAsync:void 0};const _t=q,Ut=j;qt.concatAsync=function(t,...n){return Ut.go((async function*(){for(const e of[t,...n])if(_t.isAsyncIterable(e))for await(const t of e)yield t;else for(const t of e)yield t}))};var zt={concat:void 0};const Jt=j;zt.concat=function(t,...n){return Jt.go((function*(){for(const e of[t,...n])yield*e}))};var Ct={},Mt={};Mt.copyIterable=Mt.copyAsyncIterable=void 0,Mt.copyAsyncIterable=async function*(t){for await(const n of t)yield n},Mt.copyIterable=function*(t){for(const n of t)yield n},Ct.dropAsync=void 0;const Pt=j,Dt=Mt,Wt=l;Ct.dropAsync=function(t,n){return Wt.assert(Number.isInteger(n),"The parameter count must be an integer"),Wt.assert(n>=0,"The parameter count must be greater than or equal to 0"),0===n?Dt.copyAsyncIterable(t):Pt.go((async function*(){var e;const r=t[Symbol.asyncIterator]();let o;try{let t;for(;!(({value:t,done:o}=await r.next()),o||n<=0);)n--;for(;!o;)yield t,({value:t,done:o}=await r.next())}finally{o||await(null===(e=r.return)||void 0===e?void 0:e.call(r))}}))};var Ft={dropRightAsync:void 0};const Lt=j,Ht=Mt,Kt=l;Ft.dropRightAsync=function(t,n){return Kt.assert(Number.isInteger(n),"The parameter count must be an integer"),Kt.assert(n>=0,"The parameter count must be greater than or equal to 0"),0===n?Ht.copyAsyncIterable(t):Lt.go((async function*(){const e=(await async function(t){const n=[];for await(const e of t)n.push(e);return n}(t)).slice(0,-n);for(const t of e)yield t}))};var Vt={dropRight:void 0};const Qt=j,Gt=Mt,Xt=l;Vt.dropRight=function(t,n){return Xt.assert(Number.isInteger(n),"The parameter count must be an integer"),Xt.assert(n>=0,"The parameter count must be greater than or equal to 0"),0===n?Gt.copyIterable(t):Qt.go((function*(){const e=Array.from(t);yield*e.slice(0,-n)}))};var Yt={dropUntilAsync:void 0};const Zt=q;Yt.dropUntilAsync=function(t,n){return Zt.isAsyncIterable(t)?async function*(t){var e;const r=t[Symbol.asyncIterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=await r.next()),o||await n(t,i++)););for(;!o;)yield t,({value:t,done:o}=await r.next())}finally{o||await(null===(e=r.return)||void 0===e?void 0:e.call(r))}}(t):async function*(t){var e;const r=t[Symbol.iterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=r.next()),o||await n(t,i++)););for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(e=r.return)||void 0===e||e.call(r)}}(t)};var $t={};$t.dropUntil=void 0,$t.dropUntil=function*(t,n){var e;const r=t[Symbol.iterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=r.next()),o||n(t,i++)););for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(e=r.return)||void 0===e||e.call(r)}};var tn={drop:void 0};const nn=j,en=Mt,rn=l;tn.drop=function(t,n){return rn.assert(Number.isInteger(n),"The parameter count must be an integer"),rn.assert(n>=0,"The parameter count must be greater than or equal to 0"),0===n?en.copyIterable(t):nn.go((function*(){var e;const r=t[Symbol.iterator]();let o;try{let t;for(;!(({value:t,done:o}=r.next()),o||n<=0);)n--;for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(e=r.return)||void 0===e||e.call(r)}}))};var on={filterAsync:void 0};const sn=q;on.filterAsync=function(t,n){return sn.isAsyncIterable(t)?async function*(t){let e=0;for await(const r of t)await n(r,e)&&(yield r),e++}(t):async function*(t){let e=0;for(const r of t)await n(r,e)&&(yield r),e++}(t)};var an={};an.filter=void 0,an.filter=function*(t,n){let e=0;for(const r of t)n(r,e)&&(yield r),e++};var cn={},un={},fn={flattenByAsync:void 0};const ln=q;function dn(t){return ln.isIterable(t)&&ln.isntChar(t)}fn.flattenByAsync=function(t,n){return ln.isAsyncIterable(t)?async function*(t){const r=1;for await(const o of t)dn(o)&&await n(o,r)?yield*e(o,r+1):yield o}(t):function(t){return e(t,1)}(t);async function*e(t,r){for(const o of t)dn(o)&&await n(o,r)?yield*e(o,r+1):yield o}},un.flattenDeepAsync=void 0;const yn=fn,vn=l;un.flattenDeepAsync=function(t,n=1/0){return vn.assert(n===1/0||Number.isInteger(n),"The parameter depth must be an integer"),vn.assert(n>=0,"The parameter depth must be greater than or equal to 0"),yn.flattenByAsync(t,((t,e)=>e<=n))},cn.flattenAsync=void 0;const hn=un;cn.flattenAsync=function(t){return hn.flattenDeepAsync(t,1)};var pn={flattenBy:void 0};const mn=q;pn.flattenBy=function(t,n){return function*t(e,r){for(const i of e)o=i,mn.isIterable(o)&&mn.isntChar(o)&&n(i,r)?yield*t(i,r+1):yield i;var o}(t,1)};var bn={flattenDeep:void 0};const gn=pn,wn=l;bn.flattenDeep=function(t,n=1/0){return wn.assert(n===1/0||Number.isInteger(n),"The parameter depth must be an integer"),wn.assert(n>=0,"The parameter depth must be greater than or equal to 0"),gn.flattenBy(t,((t,e)=>e<=n))};var An={flatten:void 0};const In=bn;An.flatten=function(t){return In.flattenDeep(t,1)};var Sn={mapAsync:void 0};const Tn=q;Sn.mapAsync=function(t,n){return Tn.isAsyncIterable(t)?async function*(t){let e=0;for await(const r of t)yield await n(r,e),e++}(t):async function*(t){let e=0;for(const r of t)yield await n(r,e),e++}(t)};var En={};En.map=void 0,En.map=function*(t,n){let e=0;for(const r of t)yield n(r,e),e++};var On={repeatAsync:void 0};const Rn=j,jn=l;On.repeatAsync=function(t,n){return jn.assert(n===1/0||Number.isInteger(n),"The parameter times must be an integer"),jn.assert(n>=0,"The parameter times must be greater than or equal to 0"),n===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),Rn.go((async function*(){const e=[];if(n>0){for await(const n of t)yield n,e.push(n);n--}for(;n>0;)yield*e,n--}))};var kn={repeat:void 0};const Nn=j,xn=l;kn.repeat=function(t,n){return xn.assert(n===1/0||Number.isInteger(n),"The parameter times must be an integer"),xn.assert(n>=0,"The parameter times must be greater than or equal to 0"),n===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),Nn.go((function*(){const e=[];if(n>0){for(const n of t)yield n,e.push(n);n--}for(;n>0;)yield*e,n--}))};var Bn={sliceAsync:void 0};const qn=j,_n=l;Bn.sliceAsync=function(t,n,e=1/0){return _n.assert(Number.isInteger(n),"The parameter start must be an integer"),_n.assert(n>=0,"The parameter start must be greater than or equal to 0"),_n.assert(Number.isInteger(e),"The parameter end must be an integer"),_n.assert(e>=n,"The parameter end must be greater than or equal to start"),qn.go((async function*(){let r=0;for await(const o of t){if(r>=e)break;r>=n&&(yield o),r++}}))};var Un={slice:void 0};const zn=j,Jn=l;Un.slice=function(t,n,e=1/0){return Jn.assert(Number.isInteger(n),"The parameter start must be an integer"),Jn.assert(n>=0,"The parameter start must be greater than or equal to 0"),Jn.assert(Number.isInteger(e),"The parameter end must be an integer"),Jn.assert(e>=n,"The parameter end must be greater than or equal to start"),zn.go((function*(){let r=0;for(const o of t){if(r>=e)break;r>=n&&(yield o),r++}}))};var Cn={};Cn.splitAsync=void 0,Cn.splitAsync=async function*(t,n){let e=[];for await(const r of t)r===n?(yield e,e=[]):e.push(r);yield e};var Mn={splitByAsync:void 0};const Pn=q;Mn.splitByAsync=function(t,n){return Pn.isAsyncIterable(t)?async function*(t){let e=[],r=0;for await(const o of t)await n(o,r)?(yield e,e=[]):e.push(o),r++;yield e}(t):async function*(t){let e=[],r=0;for(const o of t)await n(o,r)?(yield e,e=[]):e.push(o),r++;yield e}(t)};var Dn={};Dn.splitBy=void 0,Dn.splitBy=function*(t,n){let e=[],r=0;for(const o of t)n(o,r)?(yield e,e=[]):e.push(o),r++;yield e};var Wn={};Wn.split=void 0,Wn.split=function*(t,n){let e=[];for(const r of t)r===n?(yield e,e=[]):e.push(r);yield e};var Fn={takeAsync:void 0};const Ln=j,Hn=l;Fn.takeAsync=function(t,n){return Hn.assert(Number.isInteger(n),"The parameter count must be an integer"),Hn.assert(n>=0,"The parameter count must be greater than or equal to 0"),Ln.go((async function*(){if(0!==n)for await(const e of t)if(yield e,0===--n)break}))};var Kn={takeRightAsync:void 0};const Vn=j,Qn=l;Kn.takeRightAsync=function(t,n){return Qn.assert(Number.isInteger(n),"The parameter count must be an integer"),Qn.assert(n>=0,"The parameter count must be greater than or equal to 0"),Vn.go((async function*(){var e;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>n&&t.shift();yield*t}finally{o||await(null===(e=r.return)||void 0===e?void 0:e.call(r))}}))};var Gn={takeRight:void 0};const Xn=j,Yn=l;Gn.takeRight=function(t,n){return Yn.assert(Number.isInteger(n),"The parameter count must be an integer"),Yn.assert(n>=0,"The parameter count must be greater than or equal to 0"),Xn.go((function*(){var e;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>n&&t.shift();yield*t}finally{o||null===(e=r.return)||void 0===e||e.call(r)}}))};var Zn={takeUntilAsync:void 0};const $n=q;Zn.takeUntilAsync=function(t,n){return $n.isAsyncIterable(t)?async function*(t){let e=0;for await(const r of t){if(await n(r,e))break;yield r,e++}}(t):async function*(t){let e=0;for(const r of t){if(await n(r,e))break;yield r,e++}}(t)};var te={};te.takeUntil=void 0,te.takeUntil=function*(t,n){let e=0;for(const r of t){if(n(r,e))break;yield r,e++}};var ne={take:void 0};const ee=j,re=l;ne.take=function(t,n){return re.assert(Number.isInteger(n),"The parameter count must be an integer"),re.assert(n>=0,"The parameter count must be greater than or equal to 0"),ee.go((function*(){if(0!==n)for(const e of t)if(yield e,0===--n)break}))};var oe={tapAsync:void 0};const ie=q;oe.tapAsync=function(t,n){return ie.isAsyncIterable(t)?async function*(t){let e=0;for await(const r of t)await n(r,e),yield r,e++}(t):async function*(t){let e=0;for(const r of t)await n(r,e),yield r,e++}(t)};var se={};se.tap=void 0,se.tap=function*(t,n){let e=0;for(const r of t)n(r,e),yield r,e++};var ae={};ae.toAsyncIterable=void 0,ae.toAsyncIterable=async function*(t){for(const n of t)yield n};var ce={};ce.transformAsync=void 0,ce.transformAsync=async function*(t,n){yield*n(t)};var ue={};ue.transform=void 0,ue.transform=function*(t,n){yield*n(t)};var fe={};fe.uniqAsync=void 0,fe.uniqAsync=async function*(t){const n=new Set;for await(const e of t)n.has(e)||(yield e,n.add(e))};var le={uniqByAsync:void 0};const de=q;le.uniqByAsync=function(t,n){return de.isAsyncIterable(t)?async function*(t){const e=new Set;let r=0;for await(const o of t){const t=await n(o,r);e.has(t)||(yield o,e.add(t)),r++}}(t):async function*(t){const e=new Set;let r=0;for(const o of t){const t=await n(o,r);e.has(t)||(yield o,e.add(t)),r++}}(t)};var ye={};ye.uniqBy=void 0,ye.uniqBy=function*(t,n){const e=new Set;let r=0;for(const o of t){const t=n(o,r);e.has(t)||(yield o,e.add(t)),r++}};var ve={};ve.uniq=void 0,ve.uniq=function*(t){const n=new Set;for(const e of t)n.has(e)||(yield e,n.add(e))};var he={zipAsync:void 0};const pe=q;var me;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(me||(me={})),he.zipAsync=function(t,...n){return async function*(...t){var n,e,r,o;const i=t.length,s=t.map((t=>pe.isAsyncIterable(t)?[me.Async,t[Symbol.asyncIterator]()]:[me.Sync,t[Symbol.iterator]()])),a=s.map((()=>!1));try{for(;;){const t=new Array(i);for(let n=0;n<i;n++){const[e,r]=s[n];let o;if(o=e===me.Async?await r.next():r.next(),o.done)return void(a[n]=!0);t[n]=o.value}yield t}}finally{const t=s.filter(((t,n)=>!a[n]));for(const[i,s]of t)i===me.Async?await(null===(e=(n=s).return)||void 0===e?void 0:e.call(n)):null===(o=(r=s).return)||void 0===o||o.call(r)}}(t,...n)};var be={};be.zip=void 0,be.zip=function(t,...n){return function*(...t){const n=t.length,e=t.map((t=>t[Symbol.iterator]())),r=e.map((()=>!1));try{for(;;){const t=new Array(n);for(let o=0;o<n;o++){const{value:n,done:i}=e[o].next();if(i)return void(r[o]=!0);t[o]=n}yield t}}finally{e.filter(((t,n)=>!r[n])).forEach((t=>{var n;return null===(n=t.return)||void 0===n?void 0:n.call(t)}))}}(t,...n)},function(t){var n=f&&f.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),e=f&&f.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};e(R,t),e(B,t),e(kt,t),e(Nt,t),e(qt,t),e(zt,t),e(Ct,t),e(Ft,t),e(Vt,t),e(Yt,t),e($t,t),e(tn,t),e(on,t),e(an,t),e(cn,t),e(fn,t),e(pn,t),e(un,t),e(bn,t),e(An,t),e(Sn,t),e(En,t),e(On,t),e(kn,t),e(Bn,t),e(Un,t),e(Cn,t),e(Mn,t),e(Dn,t),e(Wn,t),e(Fn,t),e(Kn,t),e(Gn,t),e(Zn,t),e(te,t),e(ne,t),e(oe,t),e(se,t),e(ae,t),e(ce,t),e(ue,t),e(fe,t),e(le,t),e(ye,t),e(ve,t),e(he,t),e(be,t)}(O);var ge={},we={};we.consume=void 0,we.consume=function(t,n){return n(t)};var Ae={eachAsync:void 0};const Ie=q;Ae.eachAsync=function(t,n){return Ie.isAsyncIterable(t)?async function(t){let e=0;for await(const r of t)await n(r,e),e++}(t):async function(t){let e=0;for(const r of t)await n(r,e),e++}(t)};var Se={};Se.each=void 0,Se.each=function(t,n){let e=0;for(const r of t)n(r,e),e++};var Te={everyAsync:void 0};const Ee=q;Te.everyAsync=function(t,n){return Ee.isAsyncIterable(t)?async function(t){let e=0;for await(const r of t){if(!await n(r,e))return!1;e++}return!0}(t):async function(t){let e=0;for(const r of t){if(!await n(r,e))return!1;e++}return!0}(t)};var Oe={};Oe.every=void 0,Oe.every=function(t,n){let e=0;for(const r of t){if(!n(r,e))return!1;e++}return!0};var Re={findAsync:void 0};const je=q;Re.findAsync=function(t,n){return je.isAsyncIterable(t)?async function(t){let e=0;for await(const r of t){if(await n(r,e))return r;e++}return}(t):async function(t){let e=0;for(const r of t){if(await n(r,e))return r;e++}return}(t)};var ke={};ke.find=void 0,ke.find=function(t,n){let e=0;for(const r of t){if(n(r,e))return r;e++}};var Ne={};Ne.firstAsync=void 0,Ne.firstAsync=async function(t){for await(const n of t)return n};var xe={};xe.first=void 0,xe.first=function(t){for(const n of t)return n};var Be={};Be.includesAsync=void 0,Be.includesAsync=async function(t,n){for await(const e of t)if(e===n)return!0;return!1};var qe={};qe.includes=void 0,qe.includes=function(t,n){for(const e of t)if(e===n)return!0;return!1};var _e={};_e.matchAsync=void 0,_e.matchAsync=async function(t,n){const e=n.length;let r=0;for await(const o of t)if(o===n[r]&&r++,r===e)return!0;return!1};var Ue={};Ue.match=void 0,Ue.match=function(t,n){const e=n.length;let r=0;for(const o of t)if(o===n[r]&&r++,r===e)return!0;return!1};var ze={reduceAsync:void 0};const Je=q;ze.reduceAsync=function(t,n,e){return Je.isUndefined(e)?function(t,n){return Je.isAsyncIterable(t)?e(t):r(t);async function e(t){var e;const r=t[Symbol.asyncIterator]();let o;try{let t,s=await i(r),a=1;for(;({value:t,done:o}=await r.next()),!o;)s=await n(s,t,a++);return s}finally{o||await(null===(e=r.return)||void 0===e?void 0:e.call(r))}async function i(t){const n=await t.next();if(n.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return n.value}}async function r(t){var e;const r=t[Symbol.iterator]();let o;try{let t,s=i(r),a=1;for(;({value:t,done:o}=r.next()),!o;)s=await n(s,t,a++);return s}finally{o||null===(e=r.return)||void 0===e||e.call(r)}function i(t){const n=t.next();if(n.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return n.value}}}(t,n):function(t,n,e){return Je.isAsyncIterable(t)?o(t):r(t);async function r(t){let r=e,o=0;for(const e of t)r=await n(r,e,o++);return r}async function o(t){let r=e,o=0;for await(const e of t)r=await n(r,e,o++);return r}}(t,n,e)};var Ce={reduce:void 0};const Me=q;Ce.reduce=function(t,n,e){return Me.isUndefined(e)?function(t,n){var e;const r=t[Symbol.iterator]();let o;try{let t,s=i(r),a=1;for(;({value:t,done:o}=r.next()),!o;)s=n(s,t,a++);return s}finally{o||null===(e=r.return)||void 0===e||e.call(r)}function i(t){const n=t.next();if(n.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return n.value}}(t,n):function(t,n,e){let r=e,o=0;for(const e of t)r=n(r,e,o++);return r}(t,n,e)};var Pe={someAsync:void 0};const De=q;Pe.someAsync=function(t,n){return De.isAsyncIterable(t)?async function(t){let e=0;for await(const r of t){if(await n(r,e))return!0;e++}return!1}(t):async function(t){let e=0;for(const r of t){if(await n(r,e))return!0;e++}return!1}(t)};var We={};We.some=void 0,We.some=function(t,n){let e=0;for(const r of t){if(n(r,e))return!0;e++}return!1};var Fe={};Fe.lastAsync=void 0,Fe.lastAsync=async function(t){var n;const e=t[Symbol.asyncIterator]();let r;try{let t,o;for(;({value:t,done:r}=await e.next()),!r;)o=t;return o}finally{r||await(null===(n=e.return)||void 0===n?void 0:n.call(e))}};var Le={};Le.last=void 0,Le.last=function(t){var n;const e=t[Symbol.iterator]();let r;try{let t,o;for(;({value:t,done:r}=e.next()),!r;)o=t;return o}finally{r||null===(n=e.return)||void 0===n||n.call(e)}};var He={toArrayAsync:void 0};const Ke=we;He.toArrayAsync=function(t){return Ke.consume(t,(async t=>{const n=[];for await(const e of t)n.push(e);return n}))};var Ve={toArray:void 0};const Qe=we;Ve.toArray=function(t){return Qe.consume(t,(t=>Array.from(t)))};var Ge={toSetAsync:void 0};const Xe=we;Ge.toSetAsync=function(t){return Xe.consume(t,(async t=>{const n=new Set;for await(const e of t)n.add(e);return n}))};var Ye={toSet:void 0};const Ze=we;var $e,tr,nr;Ye.toSet=function(t){return Ze.consume(t,(t=>new Set(t)))},function(t){var n=f&&f.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),e=f&&f.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};e(we,t),e(Ae,t),e(Se,t),e(Te,t),e(Oe,t),e(Re,t),e(ke,t),e(Ne,t),e(xe,t),e(Be,t),e(qe,t),e(_e,t),e(Ue,t),e(ze,t),e(Ce,t),e(Pe,t),e(We,t),e(Fe,t),e(Le,t),e(He,t),e(Ve,t),e(Ge,t),e(Ye,t)}(ge),function(t){var n=f&&f.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),e=f&&f.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};e(O,t),e(ge,t)}(E);class er{constructor(t){$e.set(this,void 0),tr.set(this,new Map),l.assert(Number.isInteger(t),"The parameter limit must be an integer"),l.assert(t>0,"The parameter limit must be a positive value"),function(t,n,e,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 n?t!==n||!o:!n.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===r?o.call(t,e):o?o.value=e:n.set(t,e)}(this,$e,t,"f")}get[($e=new WeakMap,tr=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return n(this,tr,"f").size}set(t,e){return n(this,tr,"f").has(t)?this.updateItem(t,e):(n(this,tr,"f").size===n(this,$e,"f")&&n(this,tr,"f").delete(this.getColdestKey()),n(this,tr,"f").set(t,e)),this}has(t){return n(this,tr,"f").has(t)}get(t){if(!this.has(t))return;const e=n(this,tr,"f").get(t);return this.updateItem(t,e),e}delete(t){return n(this,tr,"f").delete(t)}clear(){n(this,tr,"f").clear()}updateItem(t,e){n(this,tr,"f").delete(t),n(this,tr,"f").set(t,e)}getColdestKey(){return E.first(n(this,tr,"f").keys())}}class rr{constructor(t){this.value=t,this.children=new Map}}class or{constructor(){nr.set(this,new rr)}get[(nr=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}set(t,e){let r=n(this,nr,"f");for(const n of t)r.children.has(n)||r.children.set(n,new rr),r=r.children.get(n);return r.value=e,this}has(t){let e=n(this,nr,"f");for(const n of t){if(!e.children.has(n))return!1;e=e.children.get(n)}return void 0!==e.value}get(t){let e=n(this,nr,"f");for(const n of t){if(!e.children.has(n))return;e=e.children.get(n)}return e.value}delete(t){const e=[];let r=n(this,nr,"f");for(const n of t){if(!r.children.has(n))return!1;e.push(r),r=r.children.get(n)}if(delete r.value,0===r.children.size)for(const[n,r]of E.toArray(E.zip(t,e)).reverse())if(r.children.delete(n),0!==r.children.size)break;return!0}}t.Emitter=s,t.HashMap=a,t.HashSet=c,t.LRUMap=er,t.Queue=u,t.TrieMap=or,t.convertArrayToCons=function t([n,...e]){return[n,e.length?t(e):null]},t.convertConsToArray=function t([n,e]){return null===e?[n]:[n,...t(e)]},Object.defineProperty(t,"__esModule",{value:!0})}));
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,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n}var r,i,o,s;class a{constructor(){r.set(this,new Map)}get[(r=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}on(t,n){e(this,r,"f").has(t)||e(this,r,"f").set(t,new Set);e(this,r,"f").get(t).add(n)}off(t,n){if(!e(this,r,"f").has(t))return;const i=e(this,r,"f").get(t);i.delete(n),0===i.size&&e(this,r,"f").delete(t)}emit(t,n){if(!e(this,r,"f").has(t))return;e(this,r,"f").get(t).forEach((t=>t(n)))}}class c{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 u{constructor(t){this.hash=t,o.set(this,new Map)}get[(o=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return e(this,o,"f").size}[Symbol.iterator](){return e(this,o,"f").values()}add(t){return e(this,o,"f").set(this.hash(t),t),this}delete(t){return e(this,o,"f").delete(this.hash(t))}has(t){return e(this,o,"f").has(this.hash(t))}clear(){e(this,o,"f").clear()}values(){return e(this,o,"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 l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},d={},y={CustomError:void 0};class h extends Error{get name(){return this.constructor.name}}y.CustomError=h;var m={ExpectedError:void 0};const v=y;class p extends v.CustomError{}m.ExpectedError=p;var g={AssertionError:void 0};const b=y;class w extends b.CustomError{}g.AssertionError=w;var T={};T.normalize=void 0,T.normalize=function(t){var e;return{name:t.name,message:t.message,stack:null!==(e=t.stack)&&void 0!==e?e:null}};var A={refute:void 0};const S=m;A.refute=function(t,e){if(t)throw new S.ExpectedError(e)};var I={assert:void 0};const x=g;I.assert=function(t,e){if(!t)throw new x.AssertionError(e)},function(t){var e=l&&l.__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=l&&l.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(y,t),n(m,t),n(g,t),n(T,t),n(A,t),n(I,t)}(d);var E={},B={},k={},O={},j={};j.go=void 0,j.go=function(t){return t()},function(t){var e=l&&l.__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]});(l&&l.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)})(j,t)}(O),k.chunkAsync=void 0;const N=O,R=d;k.chunkAsync=function(t,e){return R.assert(Number.isInteger(e),"The parameter size must be an integer"),R.assert(e>0,"The parameter size must be greater than 0"),N.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 _={},q={},z={};function M(t){return Array.isArray(t)}z.isntEmptyArray=z.isEmptyArray=z.isntArray=z.isArray=void 0,z.isArray=M,z.isntArray=function(t){return!M(t)},z.isEmptyArray=function(t){return 0===t.length},z.isntEmptyArray=function(t){return 0!==t.length};var U={},D={};function J(t){return null===t}D.isntNull=D.isNull=void 0,D.isNull=J,D.isntNull=function(t){return!J(t)};var C={};function P(t){return void 0===t}C.isntUndefined=C.isUndefined=void 0,C.isUndefined=P,C.isntUndefined=function(t){return!P(t)},U.isntAsyncIterable=U.isAsyncIterable=void 0;const W=D,F=C;function L(t){return W.isntNull(t)&&F.isntUndefined(t)&&"function"==typeof t[Symbol.asyncIterator]}U.isAsyncIterable=L,U.isntAsyncIterable=function(t){return!L(t)};var K={};function H(t){return"bigint"==typeof t}K.isntBigInt=K.isBigInt=void 0,K.isBigInt=H,K.isntBigInt=function(t){return!H(t)};var V={};function Q(t){return"boolean"==typeof t}V.isntBoolean=V.isBoolean=void 0,V.isBoolean=Q,V.isntBoolean=function(t){return!Q(t)};var G={},X={};function Y(t){return"string"==typeof t}X.isntString=X.isString=void 0,X.isString=Y,X.isntString=function(t){return!Y(t)},G.isntChar=G.isChar=void 0;const Z=X;function $(t){return Z.isString(t)&&1===t.length}G.isChar=$,G.isntChar=function(t){return!$(t)};var tt={};function et(t){return t instanceof Date}tt.isntDate=tt.isDate=void 0,tt.isDate=et,tt.isntDate=function(t){return!et(t)};var nt={};nt.inEnum=void 0,nt.inEnum=function(t,e){return Object.values(e).includes(t)};var rt={};function it(t){return!t}rt.isntFalsy=rt.isFalsy=void 0,rt.isFalsy=it,rt.isntFalsy=function(t){return!it(t)};var ot={};function st(t){return"function"==typeof t}ot.isntFunction=ot.isFunction=void 0,ot.isFunction=st,ot.isntFunction=function(t){return!st(t)};var at={};at.isntIterable=at.isIterable=void 0;const ct=D,ut=C;function ft(t){return ct.isntNull(t)&&ut.isntUndefined(t)&&"function"==typeof t[Symbol.iterator]}at.isIterable=ft,at.isntIterable=function(t){return!ft(t)};var lt={},dt={};function yt(t){return null!==t&&"object"==typeof t}dt.isntEmptyObject=dt.isEmptyObject=dt.isRecord=dt.isntObject=dt.isObject=void 0,dt.isObject=yt,dt.isntObject=function(t){return!yt(t)},dt.isRecord=function(t){return yt(t)},dt.isEmptyObject=function(t){return 0===Object.keys(t).length},dt.isntEmptyObject=function(t){return 0!==Object.keys(t).length};var ht={};function mt(t){return"number"==typeof t}ht.isntNumber=ht.isNumber=void 0,ht.isNumber=mt,ht.isntNumber=function(t){return!mt(t)},lt.isntJsonRpcError=lt.isJsonRpcError=lt.isntJsonRpcSuccess=lt.isJsonRpcSuccess=lt.isntJsonRpcRequest=lt.isJsonRpcRequest=lt.isntJsonRpcNotification=lt.isJsonRpcNotification=void 0;const vt=z,pt=dt,gt=X,bt=ht,wt=C;function Tt(t){return gt.isString(t)||bt.isNumber(t)}function At(t){return vt.isArray(t)||pt.isObject(t)}function St(t){return pt.isRecord(t)&&gt.isString(t.jsonrpc)&&gt.isString(t.method)&&wt.isUndefined(t.id)&&At(t.params)}function It(t){return pt.isRecord(t)&&gt.isString(t.jsonrpc)&&gt.isString(t.method)&&Tt(t.id)&&At(t.params)}function xt(t){return pt.isRecord(t)&&gt.isString(t.jsonrpc)&&gt.isString(t.id)&&wt.isntUndefined(t.result)}function Et(t){return pt.isRecord(t)&&gt.isString(t.jsonrpc)&&Tt(t.id)&&function(t){return pt.isRecord(t)&&bt.isNumber(t.code)&&gt.isString(t.message)&&(wt.isUndefined(t.data)||pt.isObject(t.data))}(t.error)}lt.isJsonRpcNotification=St,lt.isntJsonRpcNotification=function(t){return!St(t)},lt.isJsonRpcRequest=It,lt.isntJsonRpcRequest=function(t){return!It(t)},lt.isJsonRpcSuccess=xt,lt.isntJsonRpcSuccess=function(t){return!xt(t)},lt.isJsonRpcError=Et,lt.isntJsonRpcError=function(t){return!Et(t)};var Bt={};Bt.isntJson=Bt.isJson=void 0,Bt.isJson=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},Bt.isntJson=function t(e){return!t()};var kt={};kt.isAbsoluteURL=void 0,kt.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}},function(t){var e=l&&l.__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=l&&l.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(z,t),n(U,t),n(K,t),n(V,t),n(G,t),n(tt,t),n(nt,t),n(rt,t),n(ot,t),n(at,t),n(lt,t),n(Bt,t),n(D,t),n(ht,t),n(dt,t),n(X,t),n(C,t),n(kt,t)}(q),_.chunkByAsync=void 0;const Ot=q;_.chunkByAsync=function(t,e){return Ot.isAsyncIterable(t)?async function*(t){let n=[],r=0;for await(const i of t)n.push(i),await e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t):async function*(t){let n=[],r=0;for(const i of t)n.push(i),await e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t)};var jt={};jt.chunkBy=void 0,jt.chunkBy=function*(t,e){let n=[],r=0;for(const i of t)n.push(i),e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)};var Nt={chunk:void 0};const Rt=O,_t=d;Nt.chunk=function(t,e){return _t.assert(Number.isInteger(e),"The parameter size must be an integer"),_t.assert(e>0,"The parameter size must be greater than 0"),Rt.go((function*(){let n=[];for(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var qt={concatAsync:void 0};const zt=q,Mt=O;qt.concatAsync=function(t,...e){return Mt.go((async function*(){for(const n of[t,...e])if(zt.isAsyncIterable(n))for await(const t of n)yield t;else for(const t of n)yield t}))};var Ut={concat:void 0};const Dt=O;Ut.concat=function(t,...e){return Dt.go((function*(){for(const n of[t,...e])yield*n}))};var Jt={},Ct={};Ct.copyIterable=Ct.copyAsyncIterable=void 0,Ct.copyAsyncIterable=async function*(t){for await(const e of t)yield e},Ct.copyIterable=function*(t){for(const e of t)yield e},Jt.dropAsync=void 0;const Pt=O,Wt=Ct,Ft=d;Jt.dropAsync=function(t,e){return Ft.assert(Number.isInteger(e),"The parameter count must be an integer"),Ft.assert(e>=0,"The parameter count must be greater than or equal to 0"),0===e?Wt.copyAsyncIterable(t):Pt.go((async function*(){var n;const r=t[Symbol.asyncIterator]();let i;try{let t;for(;!(({value:t,done:i}=await r.next()),i||e<=0);)e--;for(;!i;)yield t,({value:t,done:i}=await r.next())}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var Lt={dropRightAsync:void 0};const Kt=O,Ht=Ct,Vt=d;Lt.dropRightAsync=function(t,e){return Vt.assert(Number.isInteger(e),"The parameter count must be an integer"),Vt.assert(e>=0,"The parameter count must be greater than or equal to 0"),0===e?Ht.copyAsyncIterable(t):Kt.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 Qt={dropRight:void 0};const Gt=O,Xt=Ct,Yt=d;Qt.dropRight=function(t,e){return Yt.assert(Number.isInteger(e),"The parameter count must be an integer"),Yt.assert(e>=0,"The parameter count must be greater than or equal to 0"),0===e?Xt.copyIterable(t):Gt.go((function*(){const n=Array.from(t);yield*n.slice(0,-e)}))};var Zt={dropUntilAsync:void 0};const $t=q;Zt.dropUntilAsync=function(t,e){return $t.isAsyncIterable(t)?async function*(t){var n;const r=t[Symbol.asyncIterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=await r.next()),i||await e(t,o++)););for(;!i;)yield t,({value:t,done:i}=await r.next())}finally{i||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 i;try{let t,o=0;for(;!(({value:t,done:i}=r.next()),i||await e(t,o++)););for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}(t)};var te={};te.dropUntil=void 0,te.dropUntil=function*(t,e){var n;const r=t[Symbol.iterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=r.next()),i||e(t,o++)););for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}};var ee={drop:void 0};const ne=O,re=Ct,ie=d;ee.drop=function(t,e){return ie.assert(Number.isInteger(e),"The parameter count must be an integer"),ie.assert(e>=0,"The parameter count must be greater than or equal to 0"),0===e?re.copyIterable(t):ne.go((function*(){var n;const r=t[Symbol.iterator]();let i;try{let t;for(;!(({value:t,done:i}=r.next()),i||e<=0);)e--;for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}))};var oe={filterAsync:void 0};const se=q;oe.filterAsync=function(t,e){return se.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 ae={};ae.filter=void 0,ae.filter=function*(t,e){let n=0;for(const r of t)e(r,n)&&(yield r),n++};var ce={},ue={},fe={flattenByAsync:void 0};const le=q;function de(t){return le.isIterable(t)&&le.isntChar(t)}fe.flattenByAsync=function(t,e){return le.isAsyncIterable(t)?async function*(t){const r=1;for await(const i of t)de(i)&&await e(i,r)?yield*n(i,r+1):yield i}(t):function(t){return n(t,1)}(t);async function*n(t,r){for(const i of t)de(i)&&await e(i,r)?yield*n(i,r+1):yield i}},ue.flattenDeepAsync=void 0;const ye=fe,he=d;ue.flattenDeepAsync=function(t,e=1/0){return he.assert(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),he.assert(e>=0,"The parameter depth must be greater than or equal to 0"),ye.flattenByAsync(t,((t,n)=>n<=e))},ce.flattenAsync=void 0;const me=ue;ce.flattenAsync=function(t){return me.flattenDeepAsync(t,1)};var ve={flattenBy:void 0};const pe=q;ve.flattenBy=function(t,e){return function*t(n,r){for(const o of n)i=o,pe.isIterable(i)&&pe.isntChar(i)&&e(o,r)?yield*t(o,r+1):yield o;var i}(t,1)};var ge={flattenDeep:void 0};const be=ve,we=d;ge.flattenDeep=function(t,e=1/0){return we.assert(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),we.assert(e>=0,"The parameter depth must be greater than or equal to 0"),be.flattenBy(t,((t,n)=>n<=e))};var Te={flatten:void 0};const Ae=ge;Te.flatten=function(t){return Ae.flattenDeep(t,1)};var Se={mapAsync:void 0};const Ie=q;Se.mapAsync=function(t,e){return Ie.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 xe={};xe.map=void 0,xe.map=function*(t,e){let n=0;for(const r of t)yield e(r,n),n++};var Ee={repeatAsync:void 0};const Be=O,ke=d;Ee.repeatAsync=function(t,e){return ke.assert(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),ke.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")}(),Be.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 Oe={repeat:void 0};const je=O,Ne=d;Oe.repeat=function(t,e){return Ne.assert(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),Ne.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")}(),je.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 Re={sliceAsync:void 0};const _e=O,qe=d;Re.sliceAsync=function(t,e,n=1/0){return qe.assert(Number.isInteger(e),"The parameter start must be an integer"),qe.assert(e>=0,"The parameter start must be greater than or equal to 0"),qe.assert(Number.isInteger(n),"The parameter end must be an integer"),qe.assert(n>=e,"The parameter end must be greater than or equal to start"),_e.go((async function*(){let r=0;for await(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var ze={slice:void 0};const Me=O,Ue=d;ze.slice=function(t,e,n=1/0){return Ue.assert(Number.isInteger(e),"The parameter start must be an integer"),Ue.assert(e>=0,"The parameter start must be greater than or equal to 0"),Ue.assert(Number.isInteger(n),"The parameter end must be an integer"),Ue.assert(n>=e,"The parameter end must be greater than or equal to start"),Me.go((function*(){let r=0;for(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var De={};De.splitAsync=void 0,De.splitAsync=async function*(t,e){let n=[];for await(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Je={splitByAsync:void 0};const Ce=q;Je.splitByAsync=function(t,e){return Ce.isAsyncIterable(t)?async function*(t){let n=[],r=0;for await(const i of t)await e(i,r)?(yield n,n=[]):n.push(i),r++;yield n}(t):async function*(t){let n=[],r=0;for(const i of t)await e(i,r)?(yield n,n=[]):n.push(i),r++;yield n}(t)};var Pe={};Pe.splitBy=void 0,Pe.splitBy=function*(t,e){let n=[],r=0;for(const i of t)e(i,r)?(yield n,n=[]):n.push(i),r++;yield n};var We={};We.split=void 0,We.split=function*(t,e){let n=[];for(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Fe={takeAsync:void 0};const Le=O,Ke=d;Fe.takeAsync=function(t,e){return Ke.assert(Number.isInteger(e),"The parameter count must be an integer"),Ke.assert(e>=0,"The parameter count must be greater than or equal to 0"),Le.go((async function*(){if(0!==e)for await(const n of t)if(yield n,0===--e)break}))};var He={takeRightAsync:void 0};const Ve=O,Qe=d;He.takeRightAsync=function(t,e){return Qe.assert(Number.isInteger(e),"The parameter count must be an integer"),Qe.assert(e>=0,"The parameter count must be greater than or equal to 0"),Ve.go((async function*(){var n;const r=t[Symbol.asyncIterator]();let i;try{const t=[];let o;for(;({value:o,done:i}=await r.next()),!i;)t.push(o),t.length>e&&t.shift();yield*t}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var Ge={takeRight:void 0};const Xe=O,Ye=d;Ge.takeRight=function(t,e){return Ye.assert(Number.isInteger(e),"The parameter count must be an integer"),Ye.assert(e>=0,"The parameter count must be greater than or equal to 0"),Xe.go((function*(){var n;const r=t[Symbol.iterator]();let i;try{const t=[];let o;for(;({value:o,done:i}=r.next()),!i;)t.push(o),t.length>e&&t.shift();yield*t}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}))};var Ze={takeUntilAsync:void 0};const $e=q;Ze.takeUntilAsync=function(t,e){return $e.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 tn={};tn.takeUntil=void 0,tn.takeUntil=function*(t,e){let n=0;for(const r of t){if(e(r,n))break;yield r,n++}};var en={take:void 0};const nn=O,rn=d;en.take=function(t,e){return rn.assert(Number.isInteger(e),"The parameter count must be an integer"),rn.assert(e>=0,"The parameter count must be greater than or equal to 0"),nn.go((function*(){if(0!==e)for(const n of t)if(yield n,0===--e)break}))};var on={tapAsync:void 0};const sn=q;on.tapAsync=function(t,e){return sn.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 an={};an.tap=void 0,an.tap=function*(t,e){let n=0;for(const r of t)e(r,n),yield r,n++};var cn={};cn.toAsyncIterable=void 0,cn.toAsyncIterable=async function*(t){for(const e of t)yield e};var un={};un.transformAsync=void 0,un.transformAsync=async function*(t,e){yield*e(t)};var fn={};fn.transform=void 0,fn.transform=function*(t,e){yield*e(t)};var ln={};ln.uniqAsync=void 0,ln.uniqAsync=async function*(t){const e=new Set;for await(const n of t)e.has(n)||(yield n,e.add(n))};var dn={uniqByAsync:void 0};const yn=q;dn.uniqByAsync=function(t,e){return yn.isAsyncIterable(t)?async function*(t){const n=new Set;let r=0;for await(const i of t){const t=await e(i,r);n.has(t)||(yield i,n.add(t)),r++}}(t):async function*(t){const n=new Set;let r=0;for(const i of t){const t=await e(i,r);n.has(t)||(yield i,n.add(t)),r++}}(t)};var hn={};hn.uniqBy=void 0,hn.uniqBy=function*(t,e){const n=new Set;let r=0;for(const i of t){const t=e(i,r);n.has(t)||(yield i,n.add(t)),r++}};var mn={};mn.uniq=void 0,mn.uniq=function*(t){const e=new Set;for(const n of t)e.has(n)||(yield n,e.add(n))};var vn={zipAsync:void 0};const pn=q;var gn;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(gn||(gn={})),vn.zipAsync=function(t,...e){return async function*(...t){var e,n,r,i;const o=t.length,s=t.map((t=>pn.isAsyncIterable(t)?[gn.Async,t[Symbol.asyncIterator]()]:[gn.Sync,t[Symbol.iterator]()])),a=s.map((()=>!1));try{for(;;){const t=new Array(o);for(let e=0;e<o;e++){const[n,r]=s[e];let i;if(i=n===gn.Async?await r.next():r.next(),i.done)return void(a[e]=!0);t[e]=i.value}yield t}}finally{const t=s.filter(((t,e)=>!a[e]));for(const[o,s]of t)o===gn.Async?await(null===(n=(e=s).return)||void 0===n?void 0:n.call(e)):null===(i=(r=s).return)||void 0===i||i.call(r)}}(t,...e)};var bn={};bn.zip=void 0,bn.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 i=0;i<e;i++){const{value:e,done:o}=n[i].next();if(o)return void(r[i]=!0);t[i]=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=l&&l.__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=l&&l.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(k,t),n(_,t),n(jt,t),n(Nt,t),n(qt,t),n(Ut,t),n(Jt,t),n(Lt,t),n(Qt,t),n(Zt,t),n(te,t),n(ee,t),n(oe,t),n(ae,t),n(ce,t),n(fe,t),n(ve,t),n(ue,t),n(ge,t),n(Te,t),n(Se,t),n(xe,t),n(Ee,t),n(Oe,t),n(Re,t),n(ze,t),n(De,t),n(Je,t),n(Pe,t),n(We,t),n(Fe,t),n(He,t),n(Ge,t),n(Ze,t),n(tn,t),n(en,t),n(on,t),n(an,t),n(cn,t),n(un,t),n(fn,t),n(ln,t),n(dn,t),n(hn,t),n(mn,t),n(vn,t),n(bn,t)}(B);var wn={},Tn={};Tn.consume=void 0,Tn.consume=function(t,e){return e(t)};var An={eachAsync:void 0};const Sn=q;An.eachAsync=function(t,e){return Sn.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 In={};In.each=void 0,In.each=function(t,e){let n=0;for(const r of t)e(r,n),n++};var xn={everyAsync:void 0};const En=q;xn.everyAsync=function(t,e){return En.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 Bn={};Bn.every=void 0,Bn.every=function(t,e){let n=0;for(const r of t){if(!e(r,n))return!1;n++}return!0};var kn={findAsync:void 0};const On=q;kn.findAsync=function(t,e){return On.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 jn={};jn.find=void 0,jn.find=function(t,e){let n=0;for(const r of t){if(e(r,n))return r;n++}};var Nn={};Nn.firstAsync=void 0,Nn.firstAsync=async function(t){for await(const e of t)return e};var Rn={};Rn.first=void 0,Rn.first=function(t){for(const e of t)return e};var _n={};_n.includesAsync=void 0,_n.includesAsync=async function(t,e){for await(const n of t)if(n===e)return!0;return!1};var qn={};qn.includes=void 0,qn.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1};var zn={};zn.matchAsync=void 0,zn.matchAsync=async function(t,e){const n=e.length;let r=0;for await(const i of t)if(i===e[r]&&r++,r===n)return!0;return!1};var Mn={};Mn.match=void 0,Mn.match=function(t,e){const n=e.length;let r=0;for(const i of t)if(i===e[r]&&r++,r===n)return!0;return!1};var Un={reduceAsync:void 0};const Dn=q;Un.reduceAsync=function(t,e,n){return Dn.isUndefined(n)?function(t,e){return Dn.isAsyncIterable(t)?n(t):r(t);async function n(t){var n;const r=t[Symbol.asyncIterator]();let i;try{let t,s=await o(r),a=1;for(;({value:t,done:i}=await r.next()),!i;)s=await e(s,t,a++);return s}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}async function o(t){const e=await t.next();if(e.done)throw i=!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 i;try{let t,s=o(r),a=1;for(;({value:t,done:i}=r.next()),!i;)s=await e(s,t,a++);return s}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}}(t,e):function(t,e,n){return Dn.isAsyncIterable(t)?i(t):r(t);async function r(t){let r=n,i=0;for(const n of t)r=await e(r,n,i++);return r}async function i(t){let r=n,i=0;for await(const n of t)r=await e(r,n,i++);return r}}(t,e,n)};var Jn={reduce:void 0};const Cn=q;Jn.reduce=function(t,e,n){return Cn.isUndefined(n)?function(t,e){var n;const r=t[Symbol.iterator]();let i;try{let t,s=o(r),a=1;for(;({value:t,done:i}=r.next()),!i;)s=e(s,t,a++);return s}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}(t,e):function(t,e,n){let r=n,i=0;for(const n of t)r=e(r,n,i++);return r}(t,e,n)};var Pn={someAsync:void 0};const Wn=q;Pn.someAsync=function(t,e){return Wn.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 Fn={};Fn.some=void 0,Fn.some=function(t,e){let n=0;for(const r of t){if(e(r,n))return!0;n++}return!1};var Ln={};Ln.lastAsync=void 0,Ln.lastAsync=async function(t){var e;const n=t[Symbol.asyncIterator]();let r;try{let t,i;for(;({value:t,done:r}=await n.next()),!r;)i=t;return i}finally{r||await(null===(e=n.return)||void 0===e?void 0:e.call(n))}};var Kn={};Kn.last=void 0,Kn.last=function(t){var e;const n=t[Symbol.iterator]();let r;try{let t,i;for(;({value:t,done:r}=n.next()),!r;)i=t;return i}finally{r||null===(e=n.return)||void 0===e||e.call(n)}};var Hn={toArrayAsync:void 0};const Vn=Tn;Hn.toArrayAsync=function(t){return Vn.consume(t,(async t=>{const e=[];for await(const n of t)e.push(n);return e}))};var Qn={toArray:void 0};const Gn=Tn;Qn.toArray=function(t){return Gn.consume(t,(t=>Array.from(t)))};var Xn={toSetAsync:void 0};const Yn=Tn;Xn.toSetAsync=function(t){return Yn.consume(t,(async t=>{const e=new Set;for await(const n of t)e.add(n);return e}))};var Zn={toSet:void 0};const $n=Tn;var tr,er;Zn.toSet=function(t){return $n.consume(t,(t=>new Set(t)))},function(t){var e=l&&l.__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=l&&l.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(Tn,t),n(An,t),n(In,t),n(xn,t),n(Bn,t),n(kn,t),n(jn,t),n(Nn,t),n(Rn,t),n(_n,t),n(qn,t),n(zn,t),n(Mn,t),n(Un,t),n(Jn,t),n(Pn,t),n(Fn,t),n(Ln,t),n(Kn,t),n(Hn,t),n(Qn,t),n(Xn,t),n(Zn,t)}(wn),function(t){var e=l&&l.__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=l&&l.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(B,t),n(wn,t)}(E);class nr{constructor(t){tr.set(this,void 0),er.set(this,new Map),d.assert(Number.isInteger(t),"The parameter limit must be an integer"),d.assert(t>0,"The parameter limit must be a positive value"),n(this,tr,t,"f")}get[(tr=new WeakMap,er=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return e(this,er,"f").size}set(t,n){return e(this,er,"f").has(t)?this.updateItem(t,n):(e(this,er,"f").size===e(this,tr,"f")&&e(this,er,"f").delete(this.getColdestKey()),e(this,er,"f").set(t,n)),this}has(t){return e(this,er,"f").has(t)}get(t){if(!this.has(t))return;const n=e(this,er,"f").get(t);return this.updateItem(t,n),n}delete(t){return e(this,er,"f").delete(t)}clear(){e(this,er,"f").clear()}updateItem(t,n){e(this,er,"f").delete(t),e(this,er,"f").set(t,n)}getColdestKey(){return E.first(e(this,er,"f").keys())}}var rr={},ir={};ir.setTimeout=void 0,ir.setTimeout=function(t,e){const n=globalThis.setTimeout(e,t);return()=>clearTimeout(n)};var or={setSchedule:void 0};const sr=ir;or.setSchedule=function(t,e){const n=t-Date.now();return(0,sr.setTimeout)(n,e)};var ar={};ar.setInterval=void 0,ar.setInterval=function(t,e){const n=globalThis.setInterval(e,t);return()=>clearInterval(n)};var cr={setImmediate:void 0};const ur=ir;cr.setImmediate=function(t){if(globalThis.setImmediate){const e=globalThis.setImmediate(t);return()=>clearImmediate(e)}return(0,ur.setTimeout)(0,t)};var fr={setTimeoutLoop:void 0};const lr=ir;fr.setTimeoutLoop=function(t,e){let n=!1,r=(0,lr.setTimeout)(t,(async function i(){await e(),n||(r=(0,lr.setTimeout)(t,i))}));return()=>{n=!0,r()}};var dr={setDynamicTimeoutLoop:void 0};const yr=ir;var hr,mr,vr,pr,gr,br;dr.setDynamicTimeoutLoop=function(t,e){let n=!1,r=(0,yr.setTimeout)(t,(async function i(){const o=Date.now();await e();const s=Date.now()-o;n||(r=(0,yr.setTimeout)(Math.max(t-s,0),i))}));return()=>{n=!0,r()}},function(t){var e=l&&l.__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=l&&l.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(ir,t),n(or,t),n(ar,t),n(cr,t),n(fr,t),n(dr,t)}(rr);class wr{constructor(){hr.set(this,new Map),mr.set(this,void 0),this.itemsSortedByExpirationTime=[]}get[(hr=new WeakMap,mr=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return e(this,hr,"f").size}set(t,n,r){return e(this,hr,"f").set(t,n),this.removeItem(t),this.addItem(t,Date.now()+r),this}has(t){return e(this,hr,"f").has(t)}get(t){return e(this,hr,"f").get(t)}delete(t){const n=e(this,hr,"f").delete(t);if(n){const e=this.itemsSortedByExpirationTime.findIndex((e=>e.key===t));this.itemsSortedByExpirationTime.splice(e,1),0===e&&this.rescheduleTimeout()}return n}clear(){var t;e(this,hr,"f").clear(),null===(t=e(this,mr,"f"))||void 0===t||t.call(this),this.itemsSortedByExpirationTime=[]}addItem(t,e){for(let n=0;n<this.itemsSortedByExpirationTime.length;n++){if(e<this.itemsSortedByExpirationTime[n].expirationTime)return this.itemsSortedByExpirationTime.splice(n,0,{key:t,expirationTime:e}),void(0===n&&this.rescheduleTimeout())}this.itemsSortedByExpirationTime.push({key:t,expirationTime:e}),1===this.itemsSortedByExpirationTime.length&&this.rescheduleTimeout()}removeItem(t){const e=this.itemsSortedByExpirationTime.findIndex((e=>e.key===t));e>=0&&(this.itemsSortedByExpirationTime.splice(e,1),0===e&&this.rescheduleTimeout())}clearExpiredItems(t){const n=this.itemsSortedByExpirationTime.findIndex((e=>e.expirationTime>t));(n>=0?this.itemsSortedByExpirationTime.splice(0,n):this.itemsSortedByExpirationTime.splice(0,this.itemsSortedByExpirationTime.length)).forEach((t=>e(this,hr,"f").delete(t.key)))}rescheduleTimeout(){var t;if(null===(t=e(this,mr,"f"))||void 0===t||t.call(this),this.itemsSortedByExpirationTime.length>0){const t=this.itemsSortedByExpirationTime[0];if(Number.isFinite(t.expirationTime)){const e=rr.setSchedule(t.expirationTime,(()=>{this.clearExpiredItems(Date.now()),this.rescheduleTimeout()}));n(this,mr,(()=>{e(),n(this,mr,void 0,"f")}),"f")}}}}class Tr{constructor(t){vr.set(this,void 0),pr.set(this,new Map),gr.set(this,void 0),this.itemsSortedByExpirationTime=[],d.assert(Number.isInteger(t),"The parameter limit must be an integer"),d.assert(t>0,"The parameter limit must be a positive value"),n(this,vr,t,"f")}get[(vr=new WeakMap,pr=new WeakMap,gr=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return e(this,pr,"f").size}set(t,n,r){return e(this,pr,"f").has(t)?(this.updateItem(t,n),this.removeItem(t),this.addItem(t,Date.now()+r)):(e(this,pr,"f").size===e(this,vr,"f")&&e(this,pr,"f").delete(this.getColdestKey()),e(this,pr,"f").set(t,n),this.addItem(t,Date.now()+r)),this}has(t){return e(this,pr,"f").has(t)}get(t){if(this.has(t)){const n=e(this,pr,"f").get(t);return this.updateItem(t,n),n}}delete(t){const n=e(this,pr,"f").delete(t);if(n){const e=this.itemsSortedByExpirationTime.findIndex((e=>e.key===t));this.itemsSortedByExpirationTime.splice(e,1),0===e&&this.rescheduleTimeout()}return n}clear(){var t;e(this,pr,"f").clear(),null===(t=e(this,gr,"f"))||void 0===t||t.call(this),this.itemsSortedByExpirationTime=[]}updateItem(t,n){e(this,pr,"f").delete(t),e(this,pr,"f").set(t,n)}addItem(t,e){for(let n=0;n<this.itemsSortedByExpirationTime.length;n++){if(e<this.itemsSortedByExpirationTime[n].expirationTime)return this.itemsSortedByExpirationTime.splice(n,0,{key:t,expirationTime:e}),void(0===n&&this.rescheduleTimeout())}this.itemsSortedByExpirationTime.push({key:t,expirationTime:e}),1===this.itemsSortedByExpirationTime.length&&this.rescheduleTimeout()}removeItem(t){const e=this.itemsSortedByExpirationTime.findIndex((e=>e.key===t));e>=0&&(this.itemsSortedByExpirationTime.splice(e,1),0===e&&this.rescheduleTimeout())}clearExpiredItems(t){const n=this.itemsSortedByExpirationTime.findIndex((e=>e.expirationTime>t));(n>=0?this.itemsSortedByExpirationTime.splice(0,n):this.itemsSortedByExpirationTime.splice(0,this.itemsSortedByExpirationTime.length)).forEach((t=>e(this,pr,"f").delete(t.key)))}rescheduleTimeout(){var t;if(null===(t=e(this,gr,"f"))||void 0===t||t.call(this),this.itemsSortedByExpirationTime.length>0){const t=this.itemsSortedByExpirationTime[0];if(Number.isFinite(t.expirationTime)){const e=rr.setSchedule(t.expirationTime,(()=>{this.clearExpiredItems(Date.now()),this.rescheduleTimeout()}));n(this,gr,(()=>{e(),n(this,gr,void 0,"f")}),"f")}}}getColdestKey(){return E.first(e(this,pr,"f").keys())}}class Ar{constructor(t){this.value=t,this.children=new Map}}class Sr{constructor(){br.set(this,new Ar)}get[(br=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}set(t,n){let r=e(this,br,"f");for(const e of t)r.children.has(e)||r.children.set(e,new Ar),r=r.children.get(e);return r.value=n,this}has(t){let n=e(this,br,"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,br,"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,br,"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 E.toArray(E.zip(t,n)).reverse())if(r.children.delete(e),0!==r.children.size)break;return!0}}t.Emitter=a,t.ExpirableMap=wr,t.HashMap=c,t.HashSet=u,t.LRUMap=nr,t.Queue=f,t.TLRUMap=Tr,t.TrieMap=Sr,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})}));
//# sourceMappingURL=index.umd.min.js.map

@@ -7,2 +7,4 @@ export * from './cons';

export * from './lru-map';
export * from './expirable-map';
export * from './tlru-map';
export * from './trie-map';

@@ -19,3 +19,5 @@ "use strict";

__exportStar(require("./lru-map"), exports);
__exportStar(require("./expirable-map"), exports);
__exportStar(require("./tlru-map"), exports);
__exportStar(require("./trie-map"), exports);
//# sourceMappingURL=index.js.map

@@ -7,2 +7,4 @@ export * from './cons';

export * from './lru-map';
export * from './expirable-map';
export * from './tlru-map';
export * from './trie-map';

@@ -19,3 +19,5 @@ "use strict";

__exportStar(require("./lru-map"), exports);
__exportStar(require("./expirable-map"), exports);
__exportStar(require("./tlru-map"), exports);
__exportStar(require("./trie-map"), exports);
//# sourceMappingURL=index.js.map
{
"name": "@blackglory/structures",
"version": "0.2.4",
"version": "0.2.5",
"description": "",

@@ -56,2 +56,3 @@ "files": [

"eslint": "^7.32.0",
"extra-promise": "^0.18.5",
"husky": "^4.3.8",

@@ -73,4 +74,5 @@ "iterable-operator": "^0.14.3",

"@blackglory/errors": "^1.1.2",
"extra-timers": "^0.2.2",
"justypes": "^0.1.5"
}
}

@@ -95,2 +95,36 @@ # structures

### ExpirableMap
```ts
class ExpirableMap<K, V> {
get[Symbol.toStringTag](): string
get size(): number
constructor()
set(key: K, value: V, maxAge: number): this
has(key: K): boolean
get(key: K): V | undefined
delete(key: K): boolean
clear(): void
}
```
### TLRUMap
```ts
class TLRUMap<K, V> {
get[Symbol.toStringTag](): string
get size(): number
constructor(limit: number)
set(key: K, value: V, maxAge: number): this
has(key: K): boolean
get(key: K): V | undefined
delete(key: K): boolean
clear(): void
}
```
### Queue

@@ -97,0 +131,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc