@blackglory/structures
Advanced tools
Comparing version 0.2.3 to 0.2.4
@@ -16,3 +16,3 @@ !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 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,i,o;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 i=n(this,e,"f").get(t);i.delete(r),0===i.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,i.set(this,new Map)}get[(i=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return n(this,i,"f").size}[Symbol.iterator](){return n(this,i,"f").values()}add(t){return n(this,i,"f").set(this.hash(t),t),this}delete(t){return n(this,i,"f").delete(this.hash(t))}has(t){return n(this,i,"f").has(this.hash(t))}clear(){n(this,i,"f").clear()}values(){return n(this,i,"f").values()}}class u{constructor(){o.set(this,[])}get[(o=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return n(this,o,"f").length}empty(){n(this,o,"f").length=0}enqueue(...t){n(this,o,"f").push(...t)}dequeue(){return n(this,o,"f").shift()}remove(t){let e;for(;(e=n(this,o,"f").indexOf(t))>=0;)n(this,o,"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 S=v;A.refute=function(t,n){if(t)throw new S.ExpectedError(n)};var I={assert:void 0};const T=m;var O,j;I.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(I,t)}(l);class E{constructor(t){O.set(this,void 0),j.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,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 n?t!==n||!i:!n.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===r?i.call(t,e):i?i.value=e:n.set(t,e)}(this,O,t,"f")}get[(O=new WeakMap,j=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return n(this,j,"f").size}set(t,e){return n(this,j,"f").has(t)?this.updateItem(t,e):(n(this,j,"f").size===n(this,O,"f")&&n(this,j,"f").delete(this.getColdestKey()),n(this,j,"f").set(t,e)),this}has(t){return n(this,j,"f").has(t)}get(t){if(!this.has(t))return;const e=n(this,j,"f").get(t);return this.updateItem(t,e),e}delete(t){return n(this,j,"f").delete(t)}clear(){n(this,j,"f").clear()}updateItem(t,e){n(this,j,"f").delete(t),n(this,j,"f").set(t,e)}getColdestKey(){return n(this,j,"f").keys().next().value}}var R={},k={},x={},N={},B={};B.go=void 0,B.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)})(B,t)}(N),x.chunkAsync=void 0;const q=N,_=l;x.chunkAsync=function(t,n){return _.assert(Number.isInteger(n),"The parameter size must be an integer"),_.assert(n>0,"The parameter size must be greater than 0"),q.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 C={},P={},U={};function z(t){return Array.isArray(t)}U.isntEmptyArray=U.isEmptyArray=U.isntArray=U.isArray=void 0,U.isArray=z,U.isntArray=function(t){return!z(t)},U.isEmptyArray=function(t){return 0===t.length},U.isntEmptyArray=function(t){return 0!==t.length};var J={},M={};function D(t){return null===t}M.isntNull=M.isNull=void 0,M.isNull=D,M.isntNull=function(t){return!D(t)};var W={};function F(t){return void 0===t}W.isntUndefined=W.isUndefined=void 0,W.isUndefined=F,W.isntUndefined=function(t){return!F(t)},J.isntAsyncIterable=J.isAsyncIterable=void 0;const L=M,H=W;function K(t){return L.isntNull(t)&&H.isntUndefined(t)&&"function"==typeof t[Symbol.asyncIterator]}J.isAsyncIterable=K,J.isntAsyncIterable=function(t){return!K(t)};var V={};function Q(t){return"bigint"==typeof t}V.isntBigInt=V.isBigInt=void 0,V.isBigInt=Q,V.isntBigInt=function(t){return!Q(t)};var G={};function X(t){return"boolean"==typeof t}G.isntBoolean=G.isBoolean=void 0,G.isBoolean=X,G.isntBoolean=function(t){return!X(t)};var Y={},Z={};function $(t){return tt(t)||nt(t)}function tt(t){return"string"==typeof t}function nt(t){return"object"==typeof t&&t instanceof String}Z.isntStringObject=Z.isStringObject=Z.isntStringPrimitive=Z.isStringPrimitive=Z.isntString=Z.isString=void 0,Z.isString=$,Z.isntString=function(t){return!$(t)},Z.isStringPrimitive=tt,Z.isntStringPrimitive=function(t){return!tt(t)},Z.isStringObject=nt,Z.isntStringObject=function(t){return!nt(t)},Y.isntCharObject=Y.isCharObject=Y.isntCharPrimitive=Y.isCharPrimitive=Y.isntChar=Y.isChar=void 0;const et=Z;function rt(t){return(et.isString(t)||et.isStringObject(t))&&1===t.length}function it(t){return et.isString(t)&&1===t.length}function ot(t){return et.isStringObject(t)&&1===t.length}Y.isChar=rt,Y.isntChar=function(t){return!rt(t)},Y.isCharPrimitive=it,Y.isntCharPrimitive=function(t){return!it(t)},Y.isCharObject=ot,Y.isntCharObject=function(t){return!ot(t)};var st={};function at(t){return t instanceof Date}st.isntDate=st.isDate=void 0,st.isDate=at,st.isntDate=function(t){return!at(t)};var ct={};ct.inEnum=void 0,ct.inEnum=function(t,n){return Object.values(n).includes(t)};var ut={};function ft(t){return!t}ut.isntFalsy=ut.isFalsy=void 0,ut.isFalsy=ft,ut.isntFalsy=function(t){return!ft(t)};var lt={};function dt(t){return"function"==typeof t}lt.isntFunction=lt.isFunction=void 0,lt.isFunction=dt,lt.isntFunction=function(t){return!dt(t)};var yt={};yt.isntIterable=yt.isIterable=void 0;const vt=M,ht=W;function pt(t){return vt.isntNull(t)&&ht.isntUndefined(t)&&"function"==typeof t[Symbol.iterator]}yt.isIterable=pt,yt.isntIterable=function(t){return!pt(t)};var mt={},bt={};function gt(t){return null!==t&&"object"==typeof t}bt.isntEmptyObject=bt.isEmptyObject=bt.isRecord=bt.isntObject=bt.isObject=void 0,bt.isObject=gt,bt.isntObject=function(t){return!gt(t)},bt.isRecord=function(t){return gt(t)},bt.isEmptyObject=function(t){return 0===Object.keys(t).length},bt.isntEmptyObject=function(t){return 0!==Object.keys(t).length};var wt={};function At(t){return"number"==typeof t}wt.isntNumber=wt.isNumber=void 0,wt.isNumber=At,wt.isntNumber=function(t){return!At(t)},mt.isntJsonRpcError=mt.isJsonRpcError=mt.isntJsonRpcSuccess=mt.isJsonRpcSuccess=mt.isntJsonRpcRequest=mt.isJsonRpcRequest=mt.isntJsonRpcNotification=mt.isJsonRpcNotification=void 0;const St=U,It=bt,Tt=Z,Ot=wt,jt=W;function Et(t){return Tt.isString(t)||Ot.isNumber(t)}function Rt(t){return St.isArray(t)||It.isObject(t)}function kt(t){return It.isRecord(t)&&Tt.isString(t.jsonrpc)&&Tt.isString(t.method)&&jt.isUndefined(t.id)&&Rt(t.params)}function xt(t){return It.isRecord(t)&&Tt.isString(t.jsonrpc)&&Tt.isString(t.method)&&Et(t.id)&&Rt(t.params)}function Nt(t){return It.isRecord(t)&&Tt.isString(t.jsonrpc)&&Tt.isString(t.id)&&jt.isntUndefined(t.result)}function Bt(t){return It.isRecord(t)&&Tt.isString(t.jsonrpc)&&Et(t.id)&&function(t){return It.isRecord(t)&&Ot.isNumber(t.code)&&Tt.isString(t.message)&&(jt.isUndefined(t.data)||It.isObject(t.data))}(t.error)}mt.isJsonRpcNotification=kt,mt.isntJsonRpcNotification=function(t){return!kt(t)},mt.isJsonRpcRequest=xt,mt.isntJsonRpcRequest=function(t){return!xt(t)},mt.isJsonRpcSuccess=Nt,mt.isntJsonRpcSuccess=function(t){return!Nt(t)},mt.isJsonRpcError=Bt,mt.isntJsonRpcError=function(t){return!Bt(t)};var qt={};qt.isntJson=qt.isJson=void 0,qt.isJson=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},qt.isntJson=function t(n){return!t()};var _t={};_t.isAbsoluteURL=void 0,_t.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}},function(t){var 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(U,t),e(J,t),e(V,t),e(G,t),e(Y,t),e(st,t),e(ct,t),e(ut,t),e(lt,t),e(yt,t),e(mt,t),e(qt,t),e(M,t),e(wt,t),e(bt,t),e(Z,t),e(W,t),e(_t,t)}(P),C.chunkByAsync=void 0;const Ct=P;C.chunkByAsync=function(t,n){return Ct.isAsyncIterable(t)?async function*(t){let e=[],r=0;for await(const i of t)e.push(i),await n(i,r)&&(yield e,e=[]),r++;e.length&&(yield e)}(t):async function*(t){let e=[],r=0;for(const i of t)e.push(i),await n(i,r)&&(yield e,e=[]),r++;e.length&&(yield e)}(t)};var Pt={};Pt.chunkBy=void 0,Pt.chunkBy=function*(t,n){let e=[],r=0;for(const i of t)e.push(i),n(i,r)&&(yield e,e=[]),r++;e.length&&(yield e)};var Ut={chunk:void 0};const zt=N,Jt=l;Ut.chunk=function(t,n){return Jt.assert(Number.isInteger(n),"The parameter size must be an integer"),Jt.assert(n>0,"The parameter size must be greater than 0"),zt.go((function*(){let e=[];for(const r of t)e.push(r),e.length>=n&&(yield e,e=[]);e.length&&(yield e)}))};var Mt={concatAsync:void 0};const Dt=P,Wt=N;Mt.concatAsync=function(t,...n){return Wt.go((async function*(){for(const e of[t,...n])if(Dt.isAsyncIterable(e))for await(const t of e)yield t;else for(const t of e)yield t}))};var Ft={concat:void 0};const Lt=N;Ft.concat=function(t,...n){return Lt.go((function*(){for(const e of[t,...n])yield*e}))};var Ht={},Kt={};Kt.copyIterable=Kt.copyAsyncIterable=void 0,Kt.copyAsyncIterable=async function*(t){for await(const n of t)yield n},Kt.copyIterable=function*(t){for(const n of t)yield n},Ht.dropAsync=void 0;const Vt=N,Qt=Kt,Gt=l;Ht.dropAsync=function(t,n){return Gt.assert(Number.isInteger(n),"The parameter count must be an integer"),Gt.assert(n>=0,"The parameter count must be greater than or equal to 0"),0===n?Qt.copyAsyncIterable(t):Vt.go((async function*(){var e;const r=t[Symbol.asyncIterator]();let i;try{let t;for(;!(({value:t,done:i}=await r.next()),i||n<=0);)n--;for(;!i;)yield t,({value:t,done:i}=await r.next())}finally{i||await(null===(e=r.return)||void 0===e?void 0:e.call(r))}}))};var Xt={dropRightAsync:void 0};const Yt=N,Zt=Kt,$t=l;Xt.dropRightAsync=function(t,n){return $t.assert(Number.isInteger(n),"The parameter count must be an integer"),$t.assert(n>=0,"The parameter count must be greater than or equal to 0"),0===n?Zt.copyAsyncIterable(t):Yt.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 tn={dropRight:void 0};const nn=N,en=Kt,rn=l;tn.dropRight=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*(){const e=Array.from(t);yield*e.slice(0,-n)}))};var on={dropUntilAsync:void 0};const sn=P;on.dropUntilAsync=function(t,n){return sn.isAsyncIterable(t)?async function*(t){var e;const r=t[Symbol.asyncIterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=await r.next()),i||await n(t,o++)););for(;!i;)yield t,({value:t,done:i}=await r.next())}finally{i||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 i;try{let t,o=0;for(;!(({value:t,done:i}=r.next()),i||await n(t,o++)););for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(e=r.return)||void 0===e||e.call(r)}}(t)};var an={};an.dropUntil=void 0,an.dropUntil=function*(t,n){var e;const r=t[Symbol.iterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=r.next()),i||n(t,o++)););for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(e=r.return)||void 0===e||e.call(r)}};var cn={drop:void 0};const un=N,fn=Kt,ln=l;cn.drop=function(t,n){return ln.assert(Number.isInteger(n),"The parameter count must be an integer"),ln.assert(n>=0,"The parameter count must be greater than or equal to 0"),0===n?fn.copyIterable(t):un.go((function*(){var e;const r=t[Symbol.iterator]();let i;try{let t;for(;!(({value:t,done:i}=r.next()),i||n<=0);)n--;for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(e=r.return)||void 0===e||e.call(r)}}))};var dn={filterAsync:void 0};const yn=P;dn.filterAsync=function(t,n){return yn.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 vn={};vn.filter=void 0,vn.filter=function*(t,n){let e=0;for(const r of t)n(r,e)&&(yield r),e++};var hn={},pn={},mn={flattenByAsync:void 0};const bn=P;function gn(t){return bn.isIterable(t)&&bn.isntChar(t)}mn.flattenByAsync=function(t,n){return bn.isAsyncIterable(t)?async function*(t){const r=1;for await(const i of t)gn(i)&&await n(i,r)?yield*e(i,r+1):yield i}(t):function(t){return e(t,1)}(t);async function*e(t,r){for(const i of t)gn(i)&&await n(i,r)?yield*e(i,r+1):yield i}},pn.flattenDeepAsync=void 0;const wn=mn,An=l;pn.flattenDeepAsync=function(t,n=1/0){return An.assert(n===1/0||Number.isInteger(n),"The parameter depth must be an integer"),An.assert(n>=0,"The parameter depth must be greater than or equal to 0"),wn.flattenByAsync(t,((t,e)=>e<=n))},hn.flattenAsync=void 0;const Sn=pn;hn.flattenAsync=function(t){return Sn.flattenDeepAsync(t,1)};var In={flattenBy:void 0};const Tn=P;In.flattenBy=function(t,n){return function*t(e,r){for(const o of e)i=o,Tn.isIterable(i)&&Tn.isntChar(i)&&n(o,r)?yield*t(o,r+1):yield o;var i}(t,1)};var On={flattenDeep:void 0};const jn=In,En=l;On.flattenDeep=function(t,n=1/0){return En.assert(n===1/0||Number.isInteger(n),"The parameter depth must be an integer"),En.assert(n>=0,"The parameter depth must be greater than or equal to 0"),jn.flattenBy(t,((t,e)=>e<=n))};var Rn={flatten:void 0};const kn=On;Rn.flatten=function(t){return kn.flattenDeep(t,1)};var xn={mapAsync:void 0};const Nn=P;xn.mapAsync=function(t,n){return Nn.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 Bn={};Bn.map=void 0,Bn.map=function*(t,n){let e=0;for(const r of t)yield n(r,e),e++};var qn={repeatAsync:void 0};const _n=N,Cn=l;qn.repeatAsync=function(t,n){return Cn.assert(n===1/0||Number.isInteger(n),"The parameter times must be an integer"),Cn.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")}(),_n.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 Pn={repeat:void 0};const Un=N,zn=l;Pn.repeat=function(t,n){return zn.assert(n===1/0||Number.isInteger(n),"The parameter times must be an integer"),zn.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")}(),Un.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 Jn={sliceAsync:void 0};const Mn=N,Dn=l;Jn.sliceAsync=function(t,n,e=1/0){return Dn.assert(Number.isInteger(n),"The parameter start must be an integer"),Dn.assert(n>=0,"The parameter start must be greater than or equal to 0"),Dn.assert(Number.isInteger(e),"The parameter end must be an integer"),Dn.assert(e>=n,"The parameter end must be greater than or equal to start"),Mn.go((async function*(){let r=0;for await(const i of t){if(r>=e)break;r>=n&&(yield i),r++}}))};var Wn={slice:void 0};const Fn=N,Ln=l;Wn.slice=function(t,n,e=1/0){return Ln.assert(Number.isInteger(n),"The parameter start must be an integer"),Ln.assert(n>=0,"The parameter start must be greater than or equal to 0"),Ln.assert(Number.isInteger(e),"The parameter end must be an integer"),Ln.assert(e>=n,"The parameter end must be greater than or equal to start"),Fn.go((function*(){let r=0;for(const i of t){if(r>=e)break;r>=n&&(yield i),r++}}))};var Hn={};Hn.splitAsync=void 0,Hn.splitAsync=async function*(t,n){let e=[];for await(const r of t)r===n?(yield e,e=[]):e.push(r);yield e};var Kn={splitByAsync:void 0};const Vn=P;Kn.splitByAsync=function(t,n){return Vn.isAsyncIterable(t)?async function*(t){let e=[],r=0;for await(const i of t)await n(i,r)?(yield e,e=[]):e.push(i),r++;yield e}(t):async function*(t){let e=[],r=0;for(const i of t)await n(i,r)?(yield e,e=[]):e.push(i),r++;yield e}(t)};var Qn={};Qn.splitBy=void 0,Qn.splitBy=function*(t,n){let e=[],r=0;for(const i of t)n(i,r)?(yield e,e=[]):e.push(i),r++;yield e};var Gn={};Gn.split=void 0,Gn.split=function*(t,n){let e=[];for(const r of t)r===n?(yield e,e=[]):e.push(r);yield e};var Xn={takeAsync:void 0};const Yn=N,Zn=l;Xn.takeAsync=function(t,n){return Zn.assert(Number.isInteger(n),"The parameter count must be an integer"),Zn.assert(n>=0,"The parameter count must be greater than or equal to 0"),Yn.go((async function*(){if(0!==n)for await(const e of t)if(yield e,0===--n)break}))};var $n={takeRightAsync:void 0};const te=N,ne=l;$n.takeRightAsync=function(t,n){return ne.assert(Number.isInteger(n),"The parameter count must be an integer"),ne.assert(n>=0,"The parameter count must be greater than or equal to 0"),te.go((async function*(){var e;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>n&&t.shift();yield*t}finally{i||await(null===(e=r.return)||void 0===e?void 0:e.call(r))}}))};var ee={takeRight:void 0};const re=N,ie=l;ee.takeRight=function(t,n){return ie.assert(Number.isInteger(n),"The parameter count must be an integer"),ie.assert(n>=0,"The parameter count must be greater than or equal to 0"),re.go((function*(){var e;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>n&&t.shift();yield*t}finally{i||null===(e=r.return)||void 0===e||e.call(r)}}))};var oe={takeUntilAsync:void 0};const se=P;oe.takeUntilAsync=function(t,n){return se.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 ae={};ae.takeUntil=void 0,ae.takeUntil=function*(t,n){let e=0;for(const r of t){if(n(r,e))break;yield r,e++}};var ce={take:void 0};const ue=N,fe=l;ce.take=function(t,n){return fe.assert(Number.isInteger(n),"The parameter count must be an integer"),fe.assert(n>=0,"The parameter count must be greater than or equal to 0"),ue.go((function*(){if(0!==n)for(const e of t)if(yield e,0===--n)break}))};var le={tapAsync:void 0};const de=P;le.tapAsync=function(t,n){return de.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 ye={};ye.tap=void 0,ye.tap=function*(t,n){let e=0;for(const r of t)n(r,e),yield r,e++};var ve={};ve.toAsyncIterable=void 0,ve.toAsyncIterable=async function*(t){for(const n of t)yield n};var he={};he.transformAsync=void 0,he.transformAsync=async function*(t,n){yield*n(t)};var pe={};pe.transform=void 0,pe.transform=function*(t,n){yield*n(t)};var me={};me.uniqAsync=void 0,me.uniqAsync=async function*(t){const n=new Set;for await(const e of t)n.has(e)||(yield e,n.add(e))};var be={uniqByAsync:void 0};const ge=P;be.uniqByAsync=function(t,n){return ge.isAsyncIterable(t)?async function*(t){const e=new Set;let r=0;for await(const i of t){const t=await n(i,r);e.has(t)||(yield i,e.add(t)),r++}}(t):async function*(t){const e=new Set;let r=0;for(const i of t){const t=await n(i,r);e.has(t)||(yield i,e.add(t)),r++}}(t)};var we={};we.uniqBy=void 0,we.uniqBy=function*(t,n){const e=new Set;let r=0;for(const i of t){const t=n(i,r);e.has(t)||(yield i,e.add(t)),r++}};var Ae={};Ae.uniq=void 0,Ae.uniq=function*(t){const n=new Set;for(const e of t)n.has(e)||(yield e,n.add(e))};var Se={zipAsync:void 0};const Ie=P;var Te;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(Te||(Te={})),Se.zipAsync=function(t,...n){return async function*(...t){var n,e,r,i;const o=t.length,s=t.map((t=>Ie.isAsyncIterable(t)?[Te.Async,t[Symbol.asyncIterator]()]:[Te.Sync,t[Symbol.iterator]()])),a=s.map((()=>!1));try{for(;;){const t=new Array(o);for(let n=0;n<o;n++){const[e,r]=s[n];let i;if(i=e===Te.Async?await r.next():r.next(),i.done)return void(a[n]=!0);t[n]=i.value}yield t}}finally{const t=s.filter(((t,n)=>!a[n]));for(const[o,s]of t)o===Te.Async?await(null===(e=(n=s).return)||void 0===e?void 0:e.call(n)):null===(i=(r=s).return)||void 0===i||i.call(r)}}(t,...n)};var Oe={};Oe.zip=void 0,Oe.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 i=0;i<n;i++){const{value:n,done:o}=e[i].next();if(o)return void(r[i]=!0);t[i]=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(x,t),e(C,t),e(Pt,t),e(Ut,t),e(Mt,t),e(Ft,t),e(Ht,t),e(Xt,t),e(tn,t),e(on,t),e(an,t),e(cn,t),e(dn,t),e(vn,t),e(hn,t),e(mn,t),e(In,t),e(pn,t),e(On,t),e(Rn,t),e(xn,t),e(Bn,t),e(qn,t),e(Pn,t),e(Jn,t),e(Wn,t),e(Hn,t),e(Kn,t),e(Qn,t),e(Gn,t),e(Xn,t),e($n,t),e(ee,t),e(oe,t),e(ae,t),e(ce,t),e(le,t),e(ye,t),e(ve,t),e(he,t),e(pe,t),e(me,t),e(be,t),e(we,t),e(Ae,t),e(Se,t),e(Oe,t)}(k);var je={},Ee={};Ee.consume=void 0,Ee.consume=function(t,n){return n(t)};var Re={eachAsync:void 0};const ke=P;Re.eachAsync=function(t,n){return ke.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 xe={};xe.each=void 0,xe.each=function(t,n){let e=0;for(const r of t)n(r,e),e++};var Ne={everyAsync:void 0};const Be=P;Ne.everyAsync=function(t,n){return Be.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 qe={};qe.every=void 0,qe.every=function(t,n){let e=0;for(const r of t){if(!n(r,e))return!1;e++}return!0};var _e={findAsync:void 0};const Ce=P;_e.findAsync=function(t,n){return Ce.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 Pe={};Pe.find=void 0,Pe.find=function(t,n){let e=0;for(const r of t){if(n(r,e))return r;e++}};var Ue={};Ue.firstAsync=void 0,Ue.firstAsync=async function(t){for await(const n of t)return n};var ze={};ze.first=void 0,ze.first=function(t){for(const n of t)return n};var Je={};Je.includesAsync=void 0,Je.includesAsync=async function(t,n){for await(const e of t)if(e===n)return!0;return!1};var Me={};Me.includes=void 0,Me.includes=function(t,n){for(const e of t)if(e===n)return!0;return!1};var De={};De.matchAsync=void 0,De.matchAsync=async function(t,n){const e=n.length;let r=0;for await(const i of t)if(i===n[r]&&r++,r===e)return!0;return!1};var We={};We.match=void 0,We.match=function(t,n){const e=n.length;let r=0;for(const i of t)if(i===n[r]&&r++,r===e)return!0;return!1};var Fe={reduceAsync:void 0};const Le=P;Fe.reduceAsync=function(t,n,e){return Le.isUndefined(e)?function(t,n){return Le.isAsyncIterable(t)?e(t):r(t);async function e(t){var e;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 n(s,t,a++);return s}finally{i||await(null===(e=r.return)||void 0===e?void 0:e.call(r))}async function o(t){const n=await t.next();if(n.done)throw i=!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 i;try{let t,s=o(r),a=1;for(;({value:t,done:i}=r.next()),!i;)s=await n(s,t,a++);return s}finally{i||null===(e=r.return)||void 0===e||e.call(r)}function o(t){const n=t.next();if(n.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return n.value}}}(t,n):function(t,n,e){return Le.isAsyncIterable(t)?i(t):r(t);async function r(t){let r=e,i=0;for(const e of t)r=await n(r,e,i++);return r}async function i(t){let r=e,i=0;for await(const e of t)r=await n(r,e,i++);return r}}(t,n,e)};var He={reduce:void 0};const Ke=P;He.reduce=function(t,n,e){return Ke.isUndefined(e)?function(t,n){var e;const r=t[Symbol.iterator]();let i;try{let t,s=o(r),a=1;for(;({value:t,done:i}=r.next()),!i;)s=n(s,t,a++);return s}finally{i||null===(e=r.return)||void 0===e||e.call(r)}function o(t){const n=t.next();if(n.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return n.value}}(t,n):function(t,n,e){let r=e,i=0;for(const e of t)r=n(r,e,i++);return r}(t,n,e)};var Ve={someAsync:void 0};const Qe=P;Ve.someAsync=function(t,n){return Qe.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 Ge={};Ge.some=void 0,Ge.some=function(t,n){let e=0;for(const r of t){if(n(r,e))return!0;e++}return!1};var Xe={};Xe.lastAsync=void 0,Xe.lastAsync=async function(t){var n;const e=t[Symbol.asyncIterator]();let r;try{let t,i;for(;({value:t,done:r}=await e.next()),!r;)i=t;return i}finally{r||await(null===(n=e.return)||void 0===n?void 0:n.call(e))}};var Ye={};Ye.last=void 0,Ye.last=function(t){var n;const e=t[Symbol.iterator]();let r;try{let t,i;for(;({value:t,done:r}=e.next()),!r;)i=t;return i}finally{r||null===(n=e.return)||void 0===n||n.call(e)}};var Ze={toArrayAsync:void 0};const $e=Ee;Ze.toArrayAsync=function(t){return $e.consume(t,(async t=>{const n=[];for await(const e of t)n.push(e);return n}))};var tr={toArray:void 0};const nr=Ee;tr.toArray=function(t){return nr.consume(t,(t=>Array.from(t)))};var er={toSetAsync:void 0};const rr=Ee;er.toSetAsync=function(t){return rr.consume(t,(async t=>{const n=new Set;for await(const e of t)n.add(e);return n}))};var ir={toSet:void 0};const or=Ee;var sr;ir.toSet=function(t){return or.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(Ee,t),e(Re,t),e(xe,t),e(Ne,t),e(qe,t),e(_e,t),e(Pe,t),e(Ue,t),e(ze,t),e(Je,t),e(Me,t),e(De,t),e(We,t),e(Fe,t),e(He,t),e(Ve,t),e(Ge,t),e(Xe,t),e(Ye,t),e(Ze,t),e(tr,t),e(er,t),e(ir,t)}(je),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(k,t),e(je,t)}(R);class ar{constructor(t){this.value=t,this.children=new Map}}class cr{constructor(){sr.set(this,new ar)}get[(sr=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}set(t,e){let r=n(this,sr,"f");for(const n of t)r.children.has(n)||r.children.set(n,new ar),r=r.children.get(n);return r.value=e,this}has(t){let e=n(this,sr,"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,sr,"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,sr,"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 R.toArray(R.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=E,t.Queue=u,t.TrieMap=cr,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 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)&>.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)&>.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})})); | ||
//# sourceMappingURL=index.umd.min.js.map |
@@ -16,3 +16,3 @@ !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 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,i,o;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 i=n(this,e,"f").get(t);i.delete(r),0===i.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,i.set(this,new Map)}get[(i=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return n(this,i,"f").size}[Symbol.iterator](){return n(this,i,"f").values()}add(t){return n(this,i,"f").set(this.hash(t),t),this}delete(t){return n(this,i,"f").delete(this.hash(t))}has(t){return n(this,i,"f").has(this.hash(t))}clear(){n(this,i,"f").clear()}values(){return n(this,i,"f").values()}}class u{constructor(){o.set(this,[])}get[(o=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return n(this,o,"f").length}empty(){n(this,o,"f").length=0}enqueue(...t){n(this,o,"f").push(...t)}dequeue(){return n(this,o,"f").shift()}remove(t){let e;for(;(e=n(this,o,"f").indexOf(t))>=0;)n(this,o,"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 S=v;A.refute=function(t,n){if(t)throw new S.ExpectedError(n)};var I={assert:void 0};const T=m;var O,j;I.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(I,t)}(l);class E{constructor(t){O.set(this,void 0),j.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,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 n?t!==n||!i:!n.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===r?i.call(t,e):i?i.value=e:n.set(t,e)}(this,O,t,"f")}get[(O=new WeakMap,j=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return n(this,j,"f").size}set(t,e){return n(this,j,"f").has(t)?this.updateItem(t,e):(n(this,j,"f").size===n(this,O,"f")&&n(this,j,"f").delete(this.getColdestKey()),n(this,j,"f").set(t,e)),this}has(t){return n(this,j,"f").has(t)}get(t){if(!this.has(t))return;const e=n(this,j,"f").get(t);return this.updateItem(t,e),e}delete(t){return n(this,j,"f").delete(t)}clear(){n(this,j,"f").clear()}updateItem(t,e){n(this,j,"f").delete(t),n(this,j,"f").set(t,e)}getColdestKey(){return n(this,j,"f").keys().next().value}}var R={},k={},x={},N={},B={};B.go=void 0,B.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)})(B,t)}(N),x.chunkAsync=void 0;const q=N,_=l;x.chunkAsync=function(t,n){return _.assert(Number.isInteger(n),"The parameter size must be an integer"),_.assert(n>0,"The parameter size must be greater than 0"),q.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 C={},P={},U={};function z(t){return Array.isArray(t)}U.isntEmptyArray=U.isEmptyArray=U.isntArray=U.isArray=void 0,U.isArray=z,U.isntArray=function(t){return!z(t)},U.isEmptyArray=function(t){return 0===t.length},U.isntEmptyArray=function(t){return 0!==t.length};var J={},M={};function D(t){return null===t}M.isntNull=M.isNull=void 0,M.isNull=D,M.isntNull=function(t){return!D(t)};var W={};function F(t){return void 0===t}W.isntUndefined=W.isUndefined=void 0,W.isUndefined=F,W.isntUndefined=function(t){return!F(t)},J.isntAsyncIterable=J.isAsyncIterable=void 0;const L=M,H=W;function K(t){return L.isntNull(t)&&H.isntUndefined(t)&&"function"==typeof t[Symbol.asyncIterator]}J.isAsyncIterable=K,J.isntAsyncIterable=function(t){return!K(t)};var V={};function Q(t){return"bigint"==typeof t}V.isntBigInt=V.isBigInt=void 0,V.isBigInt=Q,V.isntBigInt=function(t){return!Q(t)};var G={};function X(t){return"boolean"==typeof t}G.isntBoolean=G.isBoolean=void 0,G.isBoolean=X,G.isntBoolean=function(t){return!X(t)};var Y={},Z={};function $(t){return tt(t)||nt(t)}function tt(t){return"string"==typeof t}function nt(t){return"object"==typeof t&&t instanceof String}Z.isntStringObject=Z.isStringObject=Z.isntStringPrimitive=Z.isStringPrimitive=Z.isntString=Z.isString=void 0,Z.isString=$,Z.isntString=function(t){return!$(t)},Z.isStringPrimitive=tt,Z.isntStringPrimitive=function(t){return!tt(t)},Z.isStringObject=nt,Z.isntStringObject=function(t){return!nt(t)},Y.isntCharObject=Y.isCharObject=Y.isntCharPrimitive=Y.isCharPrimitive=Y.isntChar=Y.isChar=void 0;const et=Z;function rt(t){return(et.isString(t)||et.isStringObject(t))&&1===t.length}function it(t){return et.isString(t)&&1===t.length}function ot(t){return et.isStringObject(t)&&1===t.length}Y.isChar=rt,Y.isntChar=function(t){return!rt(t)},Y.isCharPrimitive=it,Y.isntCharPrimitive=function(t){return!it(t)},Y.isCharObject=ot,Y.isntCharObject=function(t){return!ot(t)};var st={};function at(t){return t instanceof Date}st.isntDate=st.isDate=void 0,st.isDate=at,st.isntDate=function(t){return!at(t)};var ct={};ct.inEnum=void 0,ct.inEnum=function(t,n){return Object.values(n).includes(t)};var ut={};function ft(t){return!t}ut.isntFalsy=ut.isFalsy=void 0,ut.isFalsy=ft,ut.isntFalsy=function(t){return!ft(t)};var lt={};function dt(t){return"function"==typeof t}lt.isntFunction=lt.isFunction=void 0,lt.isFunction=dt,lt.isntFunction=function(t){return!dt(t)};var yt={};yt.isntIterable=yt.isIterable=void 0;const vt=M,ht=W;function pt(t){return vt.isntNull(t)&&ht.isntUndefined(t)&&"function"==typeof t[Symbol.iterator]}yt.isIterable=pt,yt.isntIterable=function(t){return!pt(t)};var mt={},bt={};function gt(t){return null!==t&&"object"==typeof t}bt.isntEmptyObject=bt.isEmptyObject=bt.isRecord=bt.isntObject=bt.isObject=void 0,bt.isObject=gt,bt.isntObject=function(t){return!gt(t)},bt.isRecord=function(t){return gt(t)},bt.isEmptyObject=function(t){return 0===Object.keys(t).length},bt.isntEmptyObject=function(t){return 0!==Object.keys(t).length};var wt={};function At(t){return"number"==typeof t}wt.isntNumber=wt.isNumber=void 0,wt.isNumber=At,wt.isntNumber=function(t){return!At(t)},mt.isntJsonRpcError=mt.isJsonRpcError=mt.isntJsonRpcSuccess=mt.isJsonRpcSuccess=mt.isntJsonRpcRequest=mt.isJsonRpcRequest=mt.isntJsonRpcNotification=mt.isJsonRpcNotification=void 0;const St=U,It=bt,Tt=Z,Ot=wt,jt=W;function Et(t){return Tt.isString(t)||Ot.isNumber(t)}function Rt(t){return St.isArray(t)||It.isObject(t)}function kt(t){return It.isRecord(t)&&Tt.isString(t.jsonrpc)&&Tt.isString(t.method)&&jt.isUndefined(t.id)&&Rt(t.params)}function xt(t){return It.isRecord(t)&&Tt.isString(t.jsonrpc)&&Tt.isString(t.method)&&Et(t.id)&&Rt(t.params)}function Nt(t){return It.isRecord(t)&&Tt.isString(t.jsonrpc)&&Tt.isString(t.id)&&jt.isntUndefined(t.result)}function Bt(t){return It.isRecord(t)&&Tt.isString(t.jsonrpc)&&Et(t.id)&&function(t){return It.isRecord(t)&&Ot.isNumber(t.code)&&Tt.isString(t.message)&&(jt.isUndefined(t.data)||It.isObject(t.data))}(t.error)}mt.isJsonRpcNotification=kt,mt.isntJsonRpcNotification=function(t){return!kt(t)},mt.isJsonRpcRequest=xt,mt.isntJsonRpcRequest=function(t){return!xt(t)},mt.isJsonRpcSuccess=Nt,mt.isntJsonRpcSuccess=function(t){return!Nt(t)},mt.isJsonRpcError=Bt,mt.isntJsonRpcError=function(t){return!Bt(t)};var qt={};qt.isntJson=qt.isJson=void 0,qt.isJson=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},qt.isntJson=function t(n){return!t()};var _t={};_t.isAbsoluteURL=void 0,_t.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}},function(t){var 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(U,t),e(J,t),e(V,t),e(G,t),e(Y,t),e(st,t),e(ct,t),e(ut,t),e(lt,t),e(yt,t),e(mt,t),e(qt,t),e(M,t),e(wt,t),e(bt,t),e(Z,t),e(W,t),e(_t,t)}(P),C.chunkByAsync=void 0;const Ct=P;C.chunkByAsync=function(t,n){return Ct.isAsyncIterable(t)?async function*(t){let e=[],r=0;for await(const i of t)e.push(i),await n(i,r)&&(yield e,e=[]),r++;e.length&&(yield e)}(t):async function*(t){let e=[],r=0;for(const i of t)e.push(i),await n(i,r)&&(yield e,e=[]),r++;e.length&&(yield e)}(t)};var Pt={};Pt.chunkBy=void 0,Pt.chunkBy=function*(t,n){let e=[],r=0;for(const i of t)e.push(i),n(i,r)&&(yield e,e=[]),r++;e.length&&(yield e)};var Ut={chunk:void 0};const zt=N,Jt=l;Ut.chunk=function(t,n){return Jt.assert(Number.isInteger(n),"The parameter size must be an integer"),Jt.assert(n>0,"The parameter size must be greater than 0"),zt.go((function*(){let e=[];for(const r of t)e.push(r),e.length>=n&&(yield e,e=[]);e.length&&(yield e)}))};var Mt={concatAsync:void 0};const Dt=P,Wt=N;Mt.concatAsync=function(t,...n){return Wt.go((async function*(){for(const e of[t,...n])if(Dt.isAsyncIterable(e))for await(const t of e)yield t;else for(const t of e)yield t}))};var Ft={concat:void 0};const Lt=N;Ft.concat=function(t,...n){return Lt.go((function*(){for(const e of[t,...n])yield*e}))};var Ht={},Kt={};Kt.copyIterable=Kt.copyAsyncIterable=void 0,Kt.copyAsyncIterable=async function*(t){for await(const n of t)yield n},Kt.copyIterable=function*(t){for(const n of t)yield n},Ht.dropAsync=void 0;const Vt=N,Qt=Kt,Gt=l;Ht.dropAsync=function(t,n){return Gt.assert(Number.isInteger(n),"The parameter count must be an integer"),Gt.assert(n>=0,"The parameter count must be greater than or equal to 0"),0===n?Qt.copyAsyncIterable(t):Vt.go((async function*(){var e;const r=t[Symbol.asyncIterator]();let i;try{let t;for(;!(({value:t,done:i}=await r.next()),i||n<=0);)n--;for(;!i;)yield t,({value:t,done:i}=await r.next())}finally{i||await(null===(e=r.return)||void 0===e?void 0:e.call(r))}}))};var Xt={dropRightAsync:void 0};const Yt=N,Zt=Kt,$t=l;Xt.dropRightAsync=function(t,n){return $t.assert(Number.isInteger(n),"The parameter count must be an integer"),$t.assert(n>=0,"The parameter count must be greater than or equal to 0"),0===n?Zt.copyAsyncIterable(t):Yt.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 tn={dropRight:void 0};const nn=N,en=Kt,rn=l;tn.dropRight=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*(){const e=Array.from(t);yield*e.slice(0,-n)}))};var on={dropUntilAsync:void 0};const sn=P;on.dropUntilAsync=function(t,n){return sn.isAsyncIterable(t)?async function*(t){var e;const r=t[Symbol.asyncIterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=await r.next()),i||await n(t,o++)););for(;!i;)yield t,({value:t,done:i}=await r.next())}finally{i||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 i;try{let t,o=0;for(;!(({value:t,done:i}=r.next()),i||await n(t,o++)););for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(e=r.return)||void 0===e||e.call(r)}}(t)};var an={};an.dropUntil=void 0,an.dropUntil=function*(t,n){var e;const r=t[Symbol.iterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=r.next()),i||n(t,o++)););for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(e=r.return)||void 0===e||e.call(r)}};var cn={drop:void 0};const un=N,fn=Kt,ln=l;cn.drop=function(t,n){return ln.assert(Number.isInteger(n),"The parameter count must be an integer"),ln.assert(n>=0,"The parameter count must be greater than or equal to 0"),0===n?fn.copyIterable(t):un.go((function*(){var e;const r=t[Symbol.iterator]();let i;try{let t;for(;!(({value:t,done:i}=r.next()),i||n<=0);)n--;for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(e=r.return)||void 0===e||e.call(r)}}))};var dn={filterAsync:void 0};const yn=P;dn.filterAsync=function(t,n){return yn.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 vn={};vn.filter=void 0,vn.filter=function*(t,n){let e=0;for(const r of t)n(r,e)&&(yield r),e++};var hn={},pn={},mn={flattenByAsync:void 0};const bn=P;function gn(t){return bn.isIterable(t)&&bn.isntChar(t)}mn.flattenByAsync=function(t,n){return bn.isAsyncIterable(t)?async function*(t){const r=1;for await(const i of t)gn(i)&&await n(i,r)?yield*e(i,r+1):yield i}(t):function(t){return e(t,1)}(t);async function*e(t,r){for(const i of t)gn(i)&&await n(i,r)?yield*e(i,r+1):yield i}},pn.flattenDeepAsync=void 0;const wn=mn,An=l;pn.flattenDeepAsync=function(t,n=1/0){return An.assert(n===1/0||Number.isInteger(n),"The parameter depth must be an integer"),An.assert(n>=0,"The parameter depth must be greater than or equal to 0"),wn.flattenByAsync(t,((t,e)=>e<=n))},hn.flattenAsync=void 0;const Sn=pn;hn.flattenAsync=function(t){return Sn.flattenDeepAsync(t,1)};var In={flattenBy:void 0};const Tn=P;In.flattenBy=function(t,n){return function*t(e,r){for(const o of e)i=o,Tn.isIterable(i)&&Tn.isntChar(i)&&n(o,r)?yield*t(o,r+1):yield o;var i}(t,1)};var On={flattenDeep:void 0};const jn=In,En=l;On.flattenDeep=function(t,n=1/0){return En.assert(n===1/0||Number.isInteger(n),"The parameter depth must be an integer"),En.assert(n>=0,"The parameter depth must be greater than or equal to 0"),jn.flattenBy(t,((t,e)=>e<=n))};var Rn={flatten:void 0};const kn=On;Rn.flatten=function(t){return kn.flattenDeep(t,1)};var xn={mapAsync:void 0};const Nn=P;xn.mapAsync=function(t,n){return Nn.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 Bn={};Bn.map=void 0,Bn.map=function*(t,n){let e=0;for(const r of t)yield n(r,e),e++};var qn={repeatAsync:void 0};const _n=N,Cn=l;qn.repeatAsync=function(t,n){return Cn.assert(n===1/0||Number.isInteger(n),"The parameter times must be an integer"),Cn.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")}(),_n.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 Pn={repeat:void 0};const Un=N,zn=l;Pn.repeat=function(t,n){return zn.assert(n===1/0||Number.isInteger(n),"The parameter times must be an integer"),zn.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")}(),Un.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 Jn={sliceAsync:void 0};const Mn=N,Dn=l;Jn.sliceAsync=function(t,n,e=1/0){return Dn.assert(Number.isInteger(n),"The parameter start must be an integer"),Dn.assert(n>=0,"The parameter start must be greater than or equal to 0"),Dn.assert(Number.isInteger(e),"The parameter end must be an integer"),Dn.assert(e>=n,"The parameter end must be greater than or equal to start"),Mn.go((async function*(){let r=0;for await(const i of t){if(r>=e)break;r>=n&&(yield i),r++}}))};var Wn={slice:void 0};const Fn=N,Ln=l;Wn.slice=function(t,n,e=1/0){return Ln.assert(Number.isInteger(n),"The parameter start must be an integer"),Ln.assert(n>=0,"The parameter start must be greater than or equal to 0"),Ln.assert(Number.isInteger(e),"The parameter end must be an integer"),Ln.assert(e>=n,"The parameter end must be greater than or equal to start"),Fn.go((function*(){let r=0;for(const i of t){if(r>=e)break;r>=n&&(yield i),r++}}))};var Hn={};Hn.splitAsync=void 0,Hn.splitAsync=async function*(t,n){let e=[];for await(const r of t)r===n?(yield e,e=[]):e.push(r);yield e};var Kn={splitByAsync:void 0};const Vn=P;Kn.splitByAsync=function(t,n){return Vn.isAsyncIterable(t)?async function*(t){let e=[],r=0;for await(const i of t)await n(i,r)?(yield e,e=[]):e.push(i),r++;yield e}(t):async function*(t){let e=[],r=0;for(const i of t)await n(i,r)?(yield e,e=[]):e.push(i),r++;yield e}(t)};var Qn={};Qn.splitBy=void 0,Qn.splitBy=function*(t,n){let e=[],r=0;for(const i of t)n(i,r)?(yield e,e=[]):e.push(i),r++;yield e};var Gn={};Gn.split=void 0,Gn.split=function*(t,n){let e=[];for(const r of t)r===n?(yield e,e=[]):e.push(r);yield e};var Xn={takeAsync:void 0};const Yn=N,Zn=l;Xn.takeAsync=function(t,n){return Zn.assert(Number.isInteger(n),"The parameter count must be an integer"),Zn.assert(n>=0,"The parameter count must be greater than or equal to 0"),Yn.go((async function*(){if(0!==n)for await(const e of t)if(yield e,0===--n)break}))};var $n={takeRightAsync:void 0};const te=N,ne=l;$n.takeRightAsync=function(t,n){return ne.assert(Number.isInteger(n),"The parameter count must be an integer"),ne.assert(n>=0,"The parameter count must be greater than or equal to 0"),te.go((async function*(){var e;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>n&&t.shift();yield*t}finally{i||await(null===(e=r.return)||void 0===e?void 0:e.call(r))}}))};var ee={takeRight:void 0};const re=N,ie=l;ee.takeRight=function(t,n){return ie.assert(Number.isInteger(n),"The parameter count must be an integer"),ie.assert(n>=0,"The parameter count must be greater than or equal to 0"),re.go((function*(){var e;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>n&&t.shift();yield*t}finally{i||null===(e=r.return)||void 0===e||e.call(r)}}))};var oe={takeUntilAsync:void 0};const se=P;oe.takeUntilAsync=function(t,n){return se.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 ae={};ae.takeUntil=void 0,ae.takeUntil=function*(t,n){let e=0;for(const r of t){if(n(r,e))break;yield r,e++}};var ce={take:void 0};const ue=N,fe=l;ce.take=function(t,n){return fe.assert(Number.isInteger(n),"The parameter count must be an integer"),fe.assert(n>=0,"The parameter count must be greater than or equal to 0"),ue.go((function*(){if(0!==n)for(const e of t)if(yield e,0===--n)break}))};var le={tapAsync:void 0};const de=P;le.tapAsync=function(t,n){return de.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 ye={};ye.tap=void 0,ye.tap=function*(t,n){let e=0;for(const r of t)n(r,e),yield r,e++};var ve={};ve.toAsyncIterable=void 0,ve.toAsyncIterable=async function*(t){for(const n of t)yield n};var he={};he.transformAsync=void 0,he.transformAsync=async function*(t,n){yield*n(t)};var pe={};pe.transform=void 0,pe.transform=function*(t,n){yield*n(t)};var me={};me.uniqAsync=void 0,me.uniqAsync=async function*(t){const n=new Set;for await(const e of t)n.has(e)||(yield e,n.add(e))};var be={uniqByAsync:void 0};const ge=P;be.uniqByAsync=function(t,n){return ge.isAsyncIterable(t)?async function*(t){const e=new Set;let r=0;for await(const i of t){const t=await n(i,r);e.has(t)||(yield i,e.add(t)),r++}}(t):async function*(t){const e=new Set;let r=0;for(const i of t){const t=await n(i,r);e.has(t)||(yield i,e.add(t)),r++}}(t)};var we={};we.uniqBy=void 0,we.uniqBy=function*(t,n){const e=new Set;let r=0;for(const i of t){const t=n(i,r);e.has(t)||(yield i,e.add(t)),r++}};var Ae={};Ae.uniq=void 0,Ae.uniq=function*(t){const n=new Set;for(const e of t)n.has(e)||(yield e,n.add(e))};var Se={zipAsync:void 0};const Ie=P;var Te;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(Te||(Te={})),Se.zipAsync=function(t,...n){return async function*(...t){var n,e,r,i;const o=t.length,s=t.map((t=>Ie.isAsyncIterable(t)?[Te.Async,t[Symbol.asyncIterator]()]:[Te.Sync,t[Symbol.iterator]()])),a=s.map((()=>!1));try{for(;;){const t=new Array(o);for(let n=0;n<o;n++){const[e,r]=s[n];let i;if(i=e===Te.Async?await r.next():r.next(),i.done)return void(a[n]=!0);t[n]=i.value}yield t}}finally{const t=s.filter(((t,n)=>!a[n]));for(const[o,s]of t)o===Te.Async?await(null===(e=(n=s).return)||void 0===e?void 0:e.call(n)):null===(i=(r=s).return)||void 0===i||i.call(r)}}(t,...n)};var Oe={};Oe.zip=void 0,Oe.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 i=0;i<n;i++){const{value:n,done:o}=e[i].next();if(o)return void(r[i]=!0);t[i]=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(x,t),e(C,t),e(Pt,t),e(Ut,t),e(Mt,t),e(Ft,t),e(Ht,t),e(Xt,t),e(tn,t),e(on,t),e(an,t),e(cn,t),e(dn,t),e(vn,t),e(hn,t),e(mn,t),e(In,t),e(pn,t),e(On,t),e(Rn,t),e(xn,t),e(Bn,t),e(qn,t),e(Pn,t),e(Jn,t),e(Wn,t),e(Hn,t),e(Kn,t),e(Qn,t),e(Gn,t),e(Xn,t),e($n,t),e(ee,t),e(oe,t),e(ae,t),e(ce,t),e(le,t),e(ye,t),e(ve,t),e(he,t),e(pe,t),e(me,t),e(be,t),e(we,t),e(Ae,t),e(Se,t),e(Oe,t)}(k);var je={},Ee={};Ee.consume=void 0,Ee.consume=function(t,n){return n(t)};var Re={eachAsync:void 0};const ke=P;Re.eachAsync=function(t,n){return ke.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 xe={};xe.each=void 0,xe.each=function(t,n){let e=0;for(const r of t)n(r,e),e++};var Ne={everyAsync:void 0};const Be=P;Ne.everyAsync=function(t,n){return Be.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 qe={};qe.every=void 0,qe.every=function(t,n){let e=0;for(const r of t){if(!n(r,e))return!1;e++}return!0};var _e={findAsync:void 0};const Ce=P;_e.findAsync=function(t,n){return Ce.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 Pe={};Pe.find=void 0,Pe.find=function(t,n){let e=0;for(const r of t){if(n(r,e))return r;e++}};var Ue={};Ue.firstAsync=void 0,Ue.firstAsync=async function(t){for await(const n of t)return n};var ze={};ze.first=void 0,ze.first=function(t){for(const n of t)return n};var Je={};Je.includesAsync=void 0,Je.includesAsync=async function(t,n){for await(const e of t)if(e===n)return!0;return!1};var Me={};Me.includes=void 0,Me.includes=function(t,n){for(const e of t)if(e===n)return!0;return!1};var De={};De.matchAsync=void 0,De.matchAsync=async function(t,n){const e=n.length;let r=0;for await(const i of t)if(i===n[r]&&r++,r===e)return!0;return!1};var We={};We.match=void 0,We.match=function(t,n){const e=n.length;let r=0;for(const i of t)if(i===n[r]&&r++,r===e)return!0;return!1};var Fe={reduceAsync:void 0};const Le=P;Fe.reduceAsync=function(t,n,e){return Le.isUndefined(e)?function(t,n){return Le.isAsyncIterable(t)?e(t):r(t);async function e(t){var e;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 n(s,t,a++);return s}finally{i||await(null===(e=r.return)||void 0===e?void 0:e.call(r))}async function o(t){const n=await t.next();if(n.done)throw i=!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 i;try{let t,s=o(r),a=1;for(;({value:t,done:i}=r.next()),!i;)s=await n(s,t,a++);return s}finally{i||null===(e=r.return)||void 0===e||e.call(r)}function o(t){const n=t.next();if(n.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return n.value}}}(t,n):function(t,n,e){return Le.isAsyncIterable(t)?i(t):r(t);async function r(t){let r=e,i=0;for(const e of t)r=await n(r,e,i++);return r}async function i(t){let r=e,i=0;for await(const e of t)r=await n(r,e,i++);return r}}(t,n,e)};var He={reduce:void 0};const Ke=P;He.reduce=function(t,n,e){return Ke.isUndefined(e)?function(t,n){var e;const r=t[Symbol.iterator]();let i;try{let t,s=o(r),a=1;for(;({value:t,done:i}=r.next()),!i;)s=n(s,t,a++);return s}finally{i||null===(e=r.return)||void 0===e||e.call(r)}function o(t){const n=t.next();if(n.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return n.value}}(t,n):function(t,n,e){let r=e,i=0;for(const e of t)r=n(r,e,i++);return r}(t,n,e)};var Ve={someAsync:void 0};const Qe=P;Ve.someAsync=function(t,n){return Qe.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 Ge={};Ge.some=void 0,Ge.some=function(t,n){let e=0;for(const r of t){if(n(r,e))return!0;e++}return!1};var Xe={};Xe.lastAsync=void 0,Xe.lastAsync=async function(t){var n;const e=t[Symbol.asyncIterator]();let r;try{let t,i;for(;({value:t,done:r}=await e.next()),!r;)i=t;return i}finally{r||await(null===(n=e.return)||void 0===n?void 0:n.call(e))}};var Ye={};Ye.last=void 0,Ye.last=function(t){var n;const e=t[Symbol.iterator]();let r;try{let t,i;for(;({value:t,done:r}=e.next()),!r;)i=t;return i}finally{r||null===(n=e.return)||void 0===n||n.call(e)}};var Ze={toArrayAsync:void 0};const $e=Ee;Ze.toArrayAsync=function(t){return $e.consume(t,(async t=>{const n=[];for await(const e of t)n.push(e);return n}))};var tr={toArray:void 0};const nr=Ee;tr.toArray=function(t){return nr.consume(t,(t=>Array.from(t)))};var er={toSetAsync:void 0};const rr=Ee;er.toSetAsync=function(t){return rr.consume(t,(async t=>{const n=new Set;for await(const e of t)n.add(e);return n}))};var ir={toSet:void 0};const or=Ee;var sr;ir.toSet=function(t){return or.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(Ee,t),e(Re,t),e(xe,t),e(Ne,t),e(qe,t),e(_e,t),e(Pe,t),e(Ue,t),e(ze,t),e(Je,t),e(Me,t),e(De,t),e(We,t),e(Fe,t),e(He,t),e(Ve,t),e(Ge,t),e(Xe,t),e(Ye,t),e(Ze,t),e(tr,t),e(er,t),e(ir,t)}(je),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(k,t),e(je,t)}(R);class ar{constructor(t){this.value=t,this.children=new Map}}class cr{constructor(){sr.set(this,new ar)}get[(sr=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}set(t,e){let r=n(this,sr,"f");for(const n of t)r.children.has(n)||r.children.set(n,new ar),r=r.children.get(n);return r.value=e,this}has(t){let e=n(this,sr,"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,sr,"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,sr,"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 R.toArray(R.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=E,t.Queue=u,t.TrieMap=cr,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 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)&>.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)&>.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})})); | ||
//# sourceMappingURL=index.umd.min.js.map |
@@ -17,2 +17,3 @@ "use strict"; | ||
const errors_1 = require("@blackglory/errors"); | ||
const iterable_operator_1 = require("iterable-operator"); | ||
class LRUMap { | ||
@@ -22,4 +23,4 @@ constructor(limit) { | ||
_LRUMap_map.set(this, new Map()); | ||
errors_1.assert(Number.isInteger(limit), 'The parameter limit must be an integer'); | ||
errors_1.assert(limit > 0, 'The parameter limit must be a positive value'); | ||
(0, errors_1.assert)(Number.isInteger(limit), 'The parameter limit must be an integer'); | ||
(0, errors_1.assert)(limit > 0, 'The parameter limit must be a positive value'); | ||
__classPrivateFieldSet(this, _LRUMap_limit, limit, "f"); | ||
@@ -66,3 +67,3 @@ } | ||
getColdestKey() { | ||
return __classPrivateFieldGet(this, _LRUMap_map, "f").keys().next().value; | ||
return (0, iterable_operator_1.first)(__classPrivateFieldGet(this, _LRUMap_map, "f").keys()); | ||
} | ||
@@ -69,0 +70,0 @@ } |
@@ -73,3 +73,3 @@ "use strict"; | ||
if (node.children.size === 0) { | ||
for (const [part, parentNode] of iterable_operator_1.toArray(iterable_operator_1.zip(key, parentNodes)).reverse()) { | ||
for (const [part, parentNode] of (0, iterable_operator_1.toArray)((0, iterable_operator_1.zip)(key, parentNodes)).reverse()) { | ||
parentNode.children.delete(part); | ||
@@ -76,0 +76,0 @@ if (parentNode.children.size !== 0) |
@@ -17,2 +17,3 @@ "use strict"; | ||
const errors_1 = require("@blackglory/errors"); | ||
const iterable_operator_1 = require("iterable-operator"); | ||
class LRUMap { | ||
@@ -22,4 +23,4 @@ constructor(limit) { | ||
_LRUMap_map.set(this, new Map()); | ||
errors_1.assert(Number.isInteger(limit), 'The parameter limit must be an integer'); | ||
errors_1.assert(limit > 0, 'The parameter limit must be a positive value'); | ||
(0, errors_1.assert)(Number.isInteger(limit), 'The parameter limit must be an integer'); | ||
(0, errors_1.assert)(limit > 0, 'The parameter limit must be a positive value'); | ||
__classPrivateFieldSet(this, _LRUMap_limit, limit, "f"); | ||
@@ -66,3 +67,3 @@ } | ||
getColdestKey() { | ||
return __classPrivateFieldGet(this, _LRUMap_map, "f").keys().next().value; | ||
return (0, iterable_operator_1.first)(__classPrivateFieldGet(this, _LRUMap_map, "f").keys()); | ||
} | ||
@@ -69,0 +70,0 @@ } |
@@ -73,3 +73,3 @@ "use strict"; | ||
if (node.children.size === 0) { | ||
for (const [part, parentNode] of iterable_operator_1.toArray(iterable_operator_1.zip(key, parentNodes)).reverse()) { | ||
for (const [part, parentNode] of (0, iterable_operator_1.toArray)((0, iterable_operator_1.zip)(key, parentNodes)).reverse()) { | ||
parentNode.children.delete(part); | ||
@@ -76,0 +76,0 @@ if (parentNode.children.size !== 0) |
{ | ||
"name": "@blackglory/structures", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"description": "", | ||
@@ -46,25 +46,25 @@ "files": [ | ||
"@commitlint/config-conventional": "^13.1.0", | ||
"@rollup/plugin-commonjs": "^19.0.2", | ||
"@rollup/plugin-commonjs": "^20.0.0", | ||
"@rollup/plugin-json": "^4.1.0", | ||
"@rollup/plugin-node-resolve": "^13.0.4", | ||
"@rollup/plugin-replace": "^3.0.0", | ||
"@rollup/plugin-typescript": "^8.2.3", | ||
"@types/jest": "^26.0.24", | ||
"@types/node": "^16.4.5", | ||
"@typescript-eslint/eslint-plugin": "^4.28.5", | ||
"@typescript-eslint/parser": "^4.28.5", | ||
"eslint": "^7.31.0", | ||
"@rollup/plugin-typescript": "^8.2.5", | ||
"@types/jest": "^27.0.1", | ||
"@types/node": "^16.9.1", | ||
"@typescript-eslint/eslint-plugin": "^4.31.1", | ||
"@typescript-eslint/parser": "^4.31.1", | ||
"eslint": "^7.32.0", | ||
"husky": "^4.3.8", | ||
"iterable-operator": "^0.14.2", | ||
"jest": "^27.0.6", | ||
"iterable-operator": "^0.14.3", | ||
"jest": "^27.2.0", | ||
"npm-run-all": "^4.1.5", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^2.55.0", | ||
"rollup": "^2.56.3", | ||
"rollup-plugin-analyzer": "^4.0.0", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"standard-version": "^9.3.1", | ||
"ts-jest": "^27.0.4", | ||
"ts-jest": "^27.0.5", | ||
"tscpaths": "^0.0.9", | ||
"tslib": "^2.3.0", | ||
"typescript": "^4.3.5" | ||
"tslib": "^2.3.1", | ||
"typescript": "^4.4.3" | ||
}, | ||
@@ -71,0 +71,0 @@ "dependencies": { |
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
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1717877
67
10488