@blackglory/structures 0.6.5 → 0.6.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -218,3 +218,25 @@ class SparseSet {
218
218
  remove(value: number): void
219
219
  }
220
220
  ```
221
+
222
+ ### DynamicTypedArray
223
+ ```ts
224
+ class DynamicTypedArray<T extends TypedArrayConstructor> {
225
+ get [Symbol.toStringTag](): string
226
+ get capacity(): number
227
+ get length(): number
228
+
229
+ constructor(
230
+ typedArrayConstructor: T
231
+ , options: {
232
+ capacity?: number = 0
233
+ growthFactor?: number = 1.5
234
+ } = {}
235
+ )
236
+
237
+ set(index: number, value: number): void
238
+ get(index: number): number | undefined
239
+ push(...values: number[]): void
240
+ pop(): number | undefined
241
+ }
242
+ ```
@@ -1,4 +1,4 @@
1
- class t{constructor(t){this.value=t}get[Symbol.toStringTag](){return this.constructor.name}set(t){this.value=t}get(){return this.value}}var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n={},r={};function o(t){return Array.isArray(t)}r.isntEmptyArray=r.isEmptyArray=r.isntArray=r.isArray=void 0,r.isArray=o,r.isntArray=function(t){return!o(t)},r.isEmptyArray=function(t){return 0===t.length},r.isntEmptyArray=function(t){return 0!==t.length};var i={},a={};function s(t){return null===t}a.isntNull=a.isNull=void 0,a.isNull=s,a.isntNull=function(t){return!s(t)};var c={};function u(t){return void 0===t}c.isntUndefined=c.isUndefined=void 0,c.isUndefined=u,c.isntUndefined=function(t){return!u(t)};var l={};function f(t){return"function"==typeof t}l.isntFunction=l.isFunction=void 0,l.isFunction=f,l.isntFunction=function(t){return!f(t)},i.isntAsyncIterable=i.isAsyncIterable=void 0;const d=a,y=c,h=l;function v(t){return(0,d.isntNull)(t)&&(0,y.isntUndefined)(t)&&(0,h.isFunction)(t[Symbol.asyncIterator])}i.isAsyncIterable=v,i.isntAsyncIterable=function(t){return!v(t)};var p={};function m(t){return"bigint"==typeof t}p.isntBigInt=p.isBigInt=void 0,p.isBigInt=m,p.isntBigInt=function(t){return!m(t)};var b={};function g(t){return"boolean"==typeof t}b.isntBoolean=b.isBoolean=void 0,b.isBoolean=g,b.isntBoolean=function(t){return!g(t)};var w={},A={};function S(t){return"string"==typeof t}A.isntString=A.isString=void 0,A.isString=S,A.isntString=function(t){return!S(t)},w.isntChar=w.isChar=void 0;const I=A;function _(t){return(0,I.isString)(t)&&1===t.length}w.isChar=_,w.isntChar=function(t){return!_(t)};var T={};function x(t){return t instanceof Date}T.isntDate=T.isDate=void 0,T.isDate=x,T.isntDate=function(t){return!x(t)};var E={};E.inEnum=void 0,E.inEnum=function(t,e){return Object.values(e).includes(t)};var O={};function j(t){return t instanceof Error}O.isntError=O.isError=void 0,O.isError=j,O.isntError=function(t){return!j(t)};var k={};function N(t){return!t}k.isntFalsy=k.isFalsy=void 0,k.isFalsy=N,k.isntFalsy=function(t){return!N(t)};var B={};B.isntIterable=B.isIterable=void 0;const P=a,q=c,C=l;function M(t){return(0,P.isntNull)(t)&&(0,q.isntUndefined)(t)&&(0,C.isFunction)(t[Symbol.iterator])}B.isIterable=M,B.isntIterable=function(t){return!M(t)};var z={},R={};function U(t){return"number"==typeof t}function D(t){return Number.isNaN(t)}R.isntNaN=R.isNaN=R.isNegativeInfinity=R.isPositiveInfinity=R.isFinite=R.isntNumber=R.isNumber=void 0,R.isNumber=U,R.isntNumber=function(t){return!U(t)},R.isFinite=function(t){return Number.isFinite(t)},R.isPositiveInfinity=function(t){return t===1/0},R.isNegativeInfinity=function(t){return t===-1/0},R.isNaN=D,R.isntNaN=function(t){return!D(t)};var F={},J="object"==typeof e&&e&&e.Object===Object&&e,V="object"==typeof self&&self&&self.Object===Object&&self,L=(J||V||Function("return this")()).Symbol,W=L,K=Object.prototype,Y=K.hasOwnProperty,$=K.toString,H=W?W.toStringTag:void 0;var X=function(t){var e=Y.call(t,H),n=t[H];try{t[H]=void 0;var r=!0}catch(t){}var o=$.call(t);return r&&(e?t[H]=n:delete t[H]),o},G=Object.prototype.toString;var Q=X,Z=function(t){return G.call(t)},tt=L?L.toStringTag:void 0;var et=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":tt&&tt in Object(t)?Q(t):Z(t)};var nt=function(t,e){return function(n){return t(e(n))}}(Object.getPrototypeOf,Object);var rt=et,ot=nt,it=function(t){return null!=t&&"object"==typeof t},at=Function.prototype,st=Object.prototype,ct=at.toString,ut=st.hasOwnProperty,lt=ct.call(Object);var ft=function(t){if(!it(t)||"[object Object]"!=rt(t))return!1;var e=ot(t);if(null===e)return!0;var n=ut.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ct.call(n)==lt},dt=e&&e.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};F.isntEmptyObject=F.isEmptyObject=F.isntPlainObject=F.isPlainObject=F.isntObject=F.isObject=void 0;const yt=dt(ft);function ht(t){return null!==t&&"object"==typeof t}function vt(t){return(0,yt.default)(t)}F.isObject=ht,F.isntObject=function(t){return!ht(t)},F.isPlainObject=vt,F.isntPlainObject=function(t){return!vt(t)},F.isEmptyObject=function(t){return 0===Object.keys(t).length},F.isntEmptyObject=function(t){return 0!==Object.keys(t).length},z.isntJsonable=z.isJsonable=z.isntJson=z.isJson=void 0;const pt=a,mt=b,bt=A,gt=R,wt=r,At=F;function St(t){return(0,pt.isNull)(t)||(0,mt.isBoolean)(t)||(0,bt.isString)(t)||(0,gt.isNumber)(t)||(0,wt.isArray)(t)&&t.every(St)||(0,At.isPlainObject)(t)&&Object.values(t).every(St)}z.isJson=St,z.isntJson=function(t){return!St(t)},z.isJsonable=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},z.isntJsonable=function t(e){return!t()};var It={};It.isPromiseLike=It.isntPromiseLike=It.isntPromise=It.isPromise=void 0;const _t=F,Tt=l;function xt(t){return t instanceof Promise}function Et(t){return(0,_t.isObject)(t)&&(0,Tt.isFunction)(t.then)}It.isPromise=xt,It.isntPromise=function(t){return!xt(t)},It.isntPromiseLike=function(t){return!Et(t)},It.isPromiseLike=Et;var Ot,jt,kt,Nt={};function Bt([t,e]){return n.isNull(e)?[t]:[t,...Bt(e)]}function Pt([t,...e]){return[t,e.length?Pt(e):null]}Nt.isAbsoluteURL=void 0,Nt.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}},Ot=n,jt=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),(kt=e&&e.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||jt(e,t,n)})(r,Ot),kt(i,Ot),kt(p,Ot),kt(b,Ot),kt(w,Ot),kt(T,Ot),kt(E,Ot),kt(O,Ot),kt(k,Ot),kt(l,Ot),kt(B,Ot),kt(z,Ot),kt(a,Ot),kt(R,Ot),kt(F,Ot),kt(It,Ot),kt(A,Ot),kt(c,Ot),kt(Nt,Ot);class qt{constructor(){this.map=new Map}get[Symbol.toStringTag](){return this.constructor.name}on(t,e){this.map.has(t)||this.map.set(t,new Set);return this.map.get(t).add(n),()=>{if(!this.map.has(t))return;const e=this.map.get(t);e.delete(n),0===e.size&&this.map.delete(t)};function n(...t){e(...t)}}once(t,e){const n=this.on(t,((...t)=>{e(...t),n()}));return n}emit(t,...e){this.map.has(t)&&this.map.get(t).forEach((t=>t(...e)))}}class Ct{constructor(t){this.hash=t,this.map=new Map}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.map.size}set(t,e){return this.map.set(this.hash(t),e),this}has(t){return this.map.has(this.hash(t))}get(t){return this.map.get(this.hash(t))}delete(t){return this.map.delete(this.hash(t))}clear(){this.map.clear()}}class Mt{constructor(t){this.hash=t,this.map=new Map}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.map.size}[Symbol.iterator](){return this.map.values()}add(t){return this.map.set(this.hash(t),t),this}delete(t){return this.map.delete(this.hash(t))}has(t){return this.map.has(this.hash(t))}clear(){this.map.clear()}values(){return this.map.values()}}class zt{constructor(){this.items=[]}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.items.length}empty(){this.items.length=0}enqueue(...t){this.items.push(...t)}dequeue(){return this.items.shift()}remove(t){let e;for(;(e=this.items.indexOf(t))>=0;)this.items.splice(e,1)}}var Rt={},Ut={},Dt={},Ft={},Jt={},Vt={},Lt={};Lt.go=void 0,Lt.go=function(t){return t()},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]});(e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)})(Lt,t)}(Vt);var Wt={},Kt={},Yt={},$t={},Ht={},Xt={},Gt={CustomError:void 0};class Qt extends Error{get name(){return this.constructor.name}}Gt.CustomError=Qt;var Zt={ExpectedError:void 0};const te=Gt;class ee extends te.CustomError{}Zt.ExpectedError=ee;var ne={AssertionError:void 0};const re=Gt;class oe extends re.CustomError{}ne.AssertionError=oe;var ie={};ie.normalize=void 0,ie.normalize=function(t){var e;return{name:t.name,message:t.message,stack:null!==(e=t.stack)&&void 0!==e?e:null}};var ae={refute:void 0};const se=Zt;ae.refute=function(t,e){if(t)throw new se.ExpectedError(e)};var ce={assert:void 0};const ue=ne;ce.assert=function(t,e){if(!t)throw new ue.AssertionError(e)},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(Gt,t),r(Zt,t),r(ne,t),r(ie,t),r(ae,t),r(ce,t)}(Xt),Ht.chunkAsync=void 0;const le=Vt,fe=Xt;Ht.chunkAsync=function(t,e){return(0,fe.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,fe.assert)(e>0,"The parameter size must be greater than 0"),(0,le.go)((async function*(){let n=[];for await(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var de={},ye={},he={};function ve(t){return Array.isArray(t)}he.isntEmptyArray=he.isEmptyArray=he.isntArray=he.isArray=void 0,he.isArray=ve,he.isntArray=function(t){return!ve(t)},he.isEmptyArray=function(t){return 0===t.length},he.isntEmptyArray=function(t){return 0!==t.length};var pe={},me={};function be(t){return null===t}me.isntNull=me.isNull=void 0,me.isNull=be,me.isntNull=function(t){return!be(t)};var ge={};function we(t){return void 0===t}ge.isntUndefined=ge.isUndefined=void 0,ge.isUndefined=we,ge.isntUndefined=function(t){return!we(t)},pe.isntAsyncIterable=pe.isAsyncIterable=void 0;const Ae=me,Se=ge;function Ie(t){return(0,Ae.isntNull)(t)&&(0,Se.isntUndefined)(t)&&"function"==typeof t[Symbol.asyncIterator]}pe.isAsyncIterable=Ie,pe.isntAsyncIterable=function(t){return!Ie(t)};var _e={};function Te(t){return"bigint"==typeof t}_e.isntBigInt=_e.isBigInt=void 0,_e.isBigInt=Te,_e.isntBigInt=function(t){return!Te(t)};var xe={};function Ee(t){return"boolean"==typeof t}xe.isntBoolean=xe.isBoolean=void 0,xe.isBoolean=Ee,xe.isntBoolean=function(t){return!Ee(t)};var Oe={},je={};function ke(t){return"string"==typeof t}je.isntString=je.isString=void 0,je.isString=ke,je.isntString=function(t){return!ke(t)},Oe.isntChar=Oe.isChar=void 0;const Ne=je;function Be(t){return(0,Ne.isString)(t)&&1===t.length}Oe.isChar=Be,Oe.isntChar=function(t){return!Be(t)};var Pe={};function qe(t){return t instanceof Date}Pe.isntDate=Pe.isDate=void 0,Pe.isDate=qe,Pe.isntDate=function(t){return!qe(t)};var Ce={};Ce.inEnum=void 0,Ce.inEnum=function(t,e){return Object.values(e).includes(t)};var Me={};function ze(t){return t instanceof Error}Me.isntError=Me.isError=void 0,Me.isError=ze,Me.isntError=function(t){return!ze(t)};var Re={};function Ue(t){return!t}Re.isntFalsy=Re.isFalsy=void 0,Re.isFalsy=Ue,Re.isntFalsy=function(t){return!Ue(t)};var De={};function Fe(t){return"function"==typeof t}De.isntFunction=De.isFunction=void 0,De.isFunction=Fe,De.isntFunction=function(t){return!Fe(t)};var Je={};Je.isntIterable=Je.isIterable=void 0;const Ve=me,Le=ge;function We(t){return(0,Ve.isntNull)(t)&&(0,Le.isntUndefined)(t)&&"function"==typeof t[Symbol.iterator]}Je.isIterable=We,Je.isntIterable=function(t){return!We(t)};var Ke={},Ye={};var $e=Function.prototype,He=Object.prototype,Xe=$e.toString,Ge=He.hasOwnProperty,Qe=Xe.call(Object),Ze=He.toString,tn=function(t,e){return function(n){return t(e(n))}}(Object.getPrototypeOf,Object);var en=function(t){if(!function(t){return!!t&&"object"==typeof t}(t)||"[object Object]"!=Ze.call(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t))return!1;var e=tn(t);if(null===e)return!0;var n=Ge.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Xe.call(n)==Qe},nn=e&&e.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Ye.isntEmptyObject=Ye.isEmptyObject=Ye.isntPlainObject=Ye.isPlainObject=Ye.isntObject=Ye.isObject=void 0;const rn=nn(en);function on(t){return null!==t&&"object"==typeof t}function an(t){return(0,rn.default)(t)}Ye.isObject=on,Ye.isntObject=function(t){return!on(t)},Ye.isPlainObject=an,Ye.isntPlainObject=function(t){return!an(t)},Ye.isEmptyObject=function(t){return 0===Object.keys(t).length},Ye.isntEmptyObject=function(t){return 0!==Object.keys(t).length};var sn={};function cn(t){return"number"==typeof t}sn.isntNumber=sn.isNumber=void 0,sn.isNumber=cn,sn.isntNumber=function(t){return!cn(t)},Ke.isntJsonRpcError=Ke.isJsonRpcError=Ke.isntJsonRpcSuccess=Ke.isJsonRpcSuccess=Ke.isntJsonRpcRequest=Ke.isJsonRpcRequest=Ke.isntJsonRpcNotification=Ke.isJsonRpcNotification=void 0;const un=he,ln=Ye,fn=je,dn=sn,yn=ge;function hn(t){return(0,fn.isString)(t)||(0,dn.isNumber)(t)}function vn(t){return(0,un.isArray)(t)||(0,ln.isObject)(t)}function pn(t){return(0,ln.isPlainObject)(t)&&(0,fn.isString)(t.jsonrpc)&&(0,fn.isString)(t.method)&&(0,yn.isUndefined)(t.id)&&vn(t.params)}function mn(t){return(0,ln.isPlainObject)(t)&&(0,fn.isString)(t.jsonrpc)&&(0,fn.isString)(t.method)&&hn(t.id)&&vn(t.params)}function bn(t){return(0,ln.isPlainObject)(t)&&(0,fn.isString)(t.jsonrpc)&&(0,fn.isString)(t.id)&&"result"in t}function gn(t){return(0,ln.isPlainObject)(t)&&(0,fn.isString)(t.jsonrpc)&&hn(t.id)&&function(t){return(0,ln.isPlainObject)(t)&&(0,dn.isNumber)(t.code)&&(0,fn.isString)(t.message)&&((0,yn.isUndefined)(t.data)||(0,ln.isObject)(t.data))}(t.error)}Ke.isJsonRpcNotification=pn,Ke.isntJsonRpcNotification=function(t){return!pn(t)},Ke.isJsonRpcRequest=mn,Ke.isntJsonRpcRequest=function(t){return!mn(t)},Ke.isJsonRpcSuccess=bn,Ke.isntJsonRpcSuccess=function(t){return!bn(t)},Ke.isJsonRpcError=gn,Ke.isntJsonRpcError=function(t){return!gn(t)};var wn={};wn.isntJson=wn.isJson=void 0,wn.isJson=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},wn.isntJson=function t(e){return!t()};var An={};An.isAbsoluteURL=void 0,An.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(he,t),r(pe,t),r(_e,t),r(xe,t),r(Oe,t),r(Pe,t),r(Ce,t),r(Me,t),r(Re,t),r(De,t),r(Je,t),r(Ke,t),r(wn,t),r(me,t),r(sn,t),r(Ye,t),r(je,t),r(ge,t),r(An,t)}(ye),de.chunkByAsync=void 0;const Sn=ye;de.chunkByAsync=function(t,e){return(0,Sn.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const o of t)n.push(o),await e(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t):async function*(t){let n=[],r=0;for(const o of t)n.push(o),await e(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t)};var In={};In.chunkBy=void 0,In.chunkBy=function*(t,e){let n=[],r=0;for(const o of t)n.push(o),e(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)};var _n={chunk:void 0};const Tn=Vt,xn=Xt;_n.chunk=function(t,e){return(0,xn.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,xn.assert)(e>0,"The parameter size must be greater than 0"),(0,Tn.go)((function*(){let n=[];for(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var En={concatAsync:void 0};const On=ye,jn=Vt;En.concatAsync=function(t,...e){return(0,jn.go)((async function*(){for(const n of[t,...e])if((0,On.isAsyncIterable)(n))for await(const t of n)yield t;else for(const t of n)yield t}))};var kn={concat:void 0};const Nn=Vt;kn.concat=function(t,...e){return(0,Nn.go)((function*(){for(const n of[t,...e])yield*n}))};var Bn={},Pn={};Pn.copyIterable=Pn.copyAsyncIterable=void 0,Pn.copyAsyncIterable=async function*(t){for await(const e of t)yield e},Pn.copyIterable=function*(t){for(const e of t)yield e},Bn.dropAsync=void 0;const qn=Vt,Cn=Pn,Mn=Xt;Bn.dropAsync=function(t,e){return(0,Mn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Mn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Cn.copyAsyncIterable)(t):(0,qn.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let o;try{let t;for(;!(({value:t,done:o}=await r.next()),o||e<=0);)e--;for(;!o;)yield t,({value:t,done:o}=await r.next())}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var zn={dropRightAsync:void 0};const Rn=Vt,Un=Pn,Dn=Xt;zn.dropRightAsync=function(t,e){return(0,Dn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Dn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Un.copyAsyncIterable)(t):(0,Rn.go)((async function*(){const n=(await async function(t){const e=[];for await(const n of t)e.push(n);return e}(t)).slice(0,-e);for(const t of n)yield t}))};var Fn={dropRight:void 0};const Jn=Vt,Vn=Pn,Ln=Xt;Fn.dropRight=function(t,e){return(0,Ln.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Ln.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Vn.copyIterable)(t):(0,Jn.go)((function*(){const n=Array.from(t);yield*n.slice(0,-e)}))};var Wn={dropUntilAsync:void 0};const Kn=ye;Wn.dropUntilAsync=function(t,e){return(0,Kn.isAsyncIterable)(t)?async function*(t){var n;const r=t[Symbol.asyncIterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=await r.next()),o||await e(t,i++)););for(;!o;)yield t,({value:t,done:o}=await r.next())}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}(t):async function*(t){var n;const r=t[Symbol.iterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=r.next()),o||await e(t,i++)););for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}(t)};var Yn={};Yn.dropUntil=void 0,Yn.dropUntil=function*(t,e){var n;const r=t[Symbol.iterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=r.next()),o||e(t,i++)););for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}};var $n={drop:void 0};const Hn=Vt,Xn=Pn,Gn=Xt;$n.drop=function(t,e){return(0,Gn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Gn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Xn.copyIterable)(t):(0,Hn.go)((function*(){var n;const r=t[Symbol.iterator]();let o;try{let t;for(;!(({value:t,done:o}=r.next()),o||e<=0);)e--;for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}))};var Qn={filterAsync:void 0};const Zn=ye;Qn.filterAsync=function(t,e){return(0,Zn.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n)&&(yield r),n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n)&&(yield r),n++}(t)};var tr={};tr.filter=void 0,tr.filter=function*(t,e){let n=0;for(const r of t)e(r,n)&&(yield r),n++};var er={},nr={},rr={flattenByAsync:void 0};const or=ye;function ir(t){return(0,or.isIterable)(t)&&(0,or.isntChar)(t)}rr.flattenByAsync=function(t,e){return(0,or.isAsyncIterable)(t)?async function*(t){const r=1;for await(const o of t)ir(o)&&await e(o,r)?yield*n(o,r+1):yield o}(t):function(t){return n(t,1)}(t);async function*n(t,r){for(const o of t)ir(o)&&await e(o,r)?yield*n(o,r+1):yield o}},nr.flattenDeepAsync=void 0;const ar=rr,sr=Xt;nr.flattenDeepAsync=function(t,e=1/0){return(0,sr.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,sr.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,ar.flattenByAsync)(t,((t,n)=>n<=e))},er.flattenAsync=void 0;const cr=nr;er.flattenAsync=function(t){return(0,cr.flattenDeepAsync)(t,1)};var ur={flattenBy:void 0};const lr=ye;ur.flattenBy=function(t,e){return function*t(n,r){for(const i of n)(0,lr.isIterable)(o=i)&&(0,lr.isntChar)(o)&&e(i,r)?yield*t(i,r+1):yield i;var o}(t,1)};var fr={flattenDeep:void 0};const dr=ur,yr=Xt;fr.flattenDeep=function(t,e=1/0){return(0,yr.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,yr.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,dr.flattenBy)(t,((t,n)=>n<=e))};var hr={flatten:void 0};const vr=fr;hr.flatten=function(t){return(0,vr.flattenDeep)(t,1)};var pr={mapAsync:void 0};const mr=ye;pr.mapAsync=function(t,e){return(0,mr.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)yield await e(r,n),n++}(t):async function*(t){let n=0;for(const r of t)yield await e(r,n),n++}(t)};var br={};br.map=void 0,br.map=function*(t,e){let n=0;for(const r of t)yield e(r,n),n++};var gr={repeatAsync:void 0};const wr=Vt,Ar=Xt;gr.repeatAsync=function(t,e){return(0,Ar.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,Ar.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,wr.go)((async function*(){const n=[];if(e>0){for await(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var Sr={repeat:void 0};const Ir=Vt,_r=Xt;Sr.repeat=function(t,e){return(0,_r.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,_r.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,Ir.go)((function*(){const n=[];if(e>0){for(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var Tr={sliceAsync:void 0};const xr=Vt,Er=Xt;Tr.sliceAsync=function(t,e,n=1/0){return(0,Er.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,Er.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,Er.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Er.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,xr.go)((async function*(){let r=0;for await(const o of t){if(r>=n)break;r>=e&&(yield o),r++}}))};var Or={slice:void 0};const jr=Vt,kr=Xt;Or.slice=function(t,e,n=1/0){return(0,kr.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,kr.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,kr.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,kr.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,jr.go)((function*(){let r=0;for(const o of t){if(r>=n)break;r>=e&&(yield o),r++}}))};var Nr={};Nr.splitAsync=void 0,Nr.splitAsync=async function*(t,e){let n=[];for await(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Br={splitByAsync:void 0};const Pr=ye;Br.splitByAsync=function(t,e){return(0,Pr.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const o of t)await e(o,r)?(yield n,n=[]):n.push(o),r++;yield n}(t):async function*(t){let n=[],r=0;for(const o of t)await e(o,r)?(yield n,n=[]):n.push(o),r++;yield n}(t)};var qr={};qr.splitBy=void 0,qr.splitBy=function*(t,e){let n=[],r=0;for(const o of t)e(o,r)?(yield n,n=[]):n.push(o),r++;yield n};var Cr={};Cr.split=void 0,Cr.split=function*(t,e){let n=[];for(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Mr={takeAsync:void 0};const zr=Vt,Rr=Xt;Mr.takeAsync=function(t,e){return(0,Rr.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Rr.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,zr.go)((async function*(){if(0!==e)for await(const n of t)if(yield n,0===--e)break}))};var Ur={takeRightAsync:void 0};const Dr=Vt,Fr=Xt;Ur.takeRightAsync=function(t,e){return(0,Fr.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Fr.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Dr.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let o;try{const t=[];let i;for(;({value:i,done:o}=await r.next()),!o;)t.push(i),t.length>e&&t.shift();yield*t}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var Jr={takeRight:void 0};const Vr=Vt,Lr=Xt;Jr.takeRight=function(t,e){return(0,Lr.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Lr.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Vr.go)((function*(){var n;const r=t[Symbol.iterator]();let o;try{const t=[];let i;for(;({value:i,done:o}=r.next()),!o;)t.push(i),t.length>e&&t.shift();yield*t}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}))};var Wr={takeUntilAsync:void 0};const Kr=ye;Wr.takeUntilAsync=function(t,e){return(0,Kr.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t){if(await e(r,n))break;yield r,n++}}(t):async function*(t){let n=0;for(const r of t){if(await e(r,n))break;yield r,n++}}(t)};var Yr={};Yr.takeUntil=void 0,Yr.takeUntil=function*(t,e){let n=0;for(const r of t){if(e(r,n))break;yield r,n++}};var $r={take:void 0};const Hr=Vt,Xr=Xt;$r.take=function(t,e){return(0,Xr.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Xr.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Hr.go)((function*(){if(0!==e)for(const n of t)if(yield n,0===--e)break}))};var Gr={tapAsync:void 0};const Qr=ye;Gr.tapAsync=function(t,e){return(0,Qr.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n),yield r,n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n),yield r,n++}(t)};var Zr={};Zr.tap=void 0,Zr.tap=function*(t,e){let n=0;for(const r of t)e(r,n),yield r,n++};var to={};to.toAsyncIterable=void 0,to.toAsyncIterable=async function*(t){for(const e of t)yield e};var eo={};eo.transformAsync=void 0,eo.transformAsync=async function*(t,e){yield*e(t)};var no={};no.transform=void 0,no.transform=function*(t,e){yield*e(t)};var ro={};ro.uniqAsync=void 0,ro.uniqAsync=async function*(t){const e=new Set;for await(const n of t)e.has(n)||(yield n,e.add(n))};var oo={uniqByAsync:void 0};const io=ye;oo.uniqByAsync=function(t,e){return(0,io.isAsyncIterable)(t)?async function*(t){const n=new Set;let r=0;for await(const o of t){const t=await e(o,r);n.has(t)||(yield o,n.add(t)),r++}}(t):async function*(t){const n=new Set;let r=0;for(const o of t){const t=await e(o,r);n.has(t)||(yield o,n.add(t)),r++}}(t)};var ao={};ao.uniqBy=void 0,ao.uniqBy=function*(t,e){const n=new Set;let r=0;for(const o of t){const t=e(o,r);n.has(t)||(yield o,n.add(t)),r++}};var so={};so.uniq=void 0,so.uniq=function*(t){const e=new Set;for(const n of t)e.has(n)||(yield n,e.add(n))};var co={zipAsync:void 0};const uo=ye;var lo;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(lo||(lo={})),co.zipAsync=function(t,...e){return async function*(...t){var e,n,r,o;const i=t.length,a=t.map((t=>(0,uo.isAsyncIterable)(t)?[lo.Async,t[Symbol.asyncIterator]()]:[lo.Sync,t[Symbol.iterator]()])),s=a.map((()=>!1));try{for(;;){const t=new Array(i);for(let e=0;e<i;e++){const[n,r]=a[e];let o;if(o=n===lo.Async?await r.next():r.next(),o.done)return void(s[e]=!0);t[e]=o.value}yield t}}finally{const t=a.filter(((t,e)=>!s[e]));for(const[i,a]of t)i===lo.Async?await(null===(n=(e=a).return)||void 0===n?void 0:n.call(e)):null===(o=(r=a).return)||void 0===o||o.call(r)}}(t,...e)};var fo={};fo.zip=void 0,fo.zip=function(t,...e){return function*(...t){const e=t.length,n=t.map((t=>t[Symbol.iterator]())),r=n.map((()=>!1));try{for(;;){const t=new Array(e);for(let o=0;o<e;o++){const{value:e,done:i}=n[o].next();if(i)return void(r[o]=!0);t[o]=e}yield t}}finally{n.filter(((t,e)=>!r[e])).forEach((t=>{var e;return null===(e=t.return)||void 0===e?void 0:e.call(t)}))}}(t,...e)},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(Ht,t),r(de,t),r(In,t),r(_n,t),r(En,t),r(kn,t),r(Bn,t),r(zn,t),r(Fn,t),r(Wn,t),r(Yn,t),r($n,t),r(Qn,t),r(tr,t),r(er,t),r(rr,t),r(ur,t),r(nr,t),r(fr,t),r(hr,t),r(pr,t),r(br,t),r(gr,t),r(Sr,t),r(Tr,t),r(Or,t),r(Nr,t),r(Br,t),r(qr,t),r(Cr,t),r(Mr,t),r(Ur,t),r(Jr,t),r(Wr,t),r(Yr,t),r($r,t),r(Gr,t),r(Zr,t),r(to,t),r(eo,t),r(no,t),r(ro,t),r(oo,t),r(ao,t),r(so,t),r(co,t),r(fo,t)}($t);var yo={},ho={};ho.consume=void 0,ho.consume=function(t,e){return e(t)};var vo={eachAsync:void 0};const po=ye;vo.eachAsync=function(t,e){return(0,po.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t)await e(r,n),n++}(t):async function(t){let n=0;for(const r of t)await e(r,n),n++}(t)};var mo={};mo.each=void 0,mo.each=function(t,e){let n=0;for(const r of t)e(r,n),n++};var bo={everyAsync:void 0};const go=ye;bo.everyAsync=function(t,e){return(0,go.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(!await e(r,n))return!1;n++}return!0}(t):async function(t){let n=0;for(const r of t){if(!await e(r,n))return!1;n++}return!0}(t)};var wo={};wo.every=void 0,wo.every=function(t,e){let n=0;for(const r of t){if(!e(r,n))return!1;n++}return!0};var Ao={findAsync:void 0};const So=ye;Ao.findAsync=function(t,e){return(0,So.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return r;n++}return}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return r;n++}return}(t)};var Io={};Io.find=void 0,Io.find=function(t,e){let n=0;for(const r of t){if(e(r,n))return r;n++}};var _o={};_o.firstAsync=void 0,_o.firstAsync=async function(t){for await(const e of t)return e};var To={};To.first=void 0,To.first=function(t){for(const e of t)return e};var xo={};xo.includesAsync=void 0,xo.includesAsync=async function(t,e){for await(const n of t)if(n===e)return!0;return!1};var Eo={};Eo.includes=void 0,Eo.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1};var Oo={};Oo.matchAsync=void 0,Oo.matchAsync=async function(t,e){const n=e.length;let r=0;for await(const o of t)if(o===e[r]&&r++,r===n)return!0;return!1};var jo={};jo.match=void 0,jo.match=function(t,e){const n=e.length;let r=0;for(const o of t)if(o===e[r]&&r++,r===n)return!0;return!1};var ko={reduceAsync:void 0};const No=ye;ko.reduceAsync=function(t,e,n){return(0,No.isUndefined)(n)?function(t,e){return(0,No.isAsyncIterable)(t)?n(t):r(t);async function n(t){var n;const r=t[Symbol.asyncIterator]();let o;try{let t,a=await i(r),s=1;for(;({value:t,done:o}=await r.next()),!o;)a=await e(a,t,s++);return a}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}async function i(t){const e=await t.next();if(e.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}async function r(t){var n;const r=t[Symbol.iterator]();let o;try{let t,a=i(r),s=1;for(;({value:t,done:o}=r.next()),!o;)a=await e(a,t,s++);return a}finally{o||null===(n=r.return)||void 0===n||n.call(r)}function i(t){const e=t.next();if(e.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}}(t,e):function(t,e,n){return(0,No.isAsyncIterable)(t)?o(t):r(t);async function r(t){let r=n,o=0;for(const n of t)r=await e(r,n,o++);return r}async function o(t){let r=n,o=0;for await(const n of t)r=await e(r,n,o++);return r}}(t,e,n)};var Bo={reduce:void 0};const Po=ye;Bo.reduce=function(t,e,n){return(0,Po.isUndefined)(n)?function(t,e){var n;const r=t[Symbol.iterator]();let o;try{let t,a=i(r),s=1;for(;({value:t,done:o}=r.next()),!o;)a=e(a,t,s++);return a}finally{o||null===(n=r.return)||void 0===n||n.call(r)}function i(t){const e=t.next();if(e.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}(t,e):function(t,e,n){let r=n,o=0;for(const n of t)r=e(r,n,o++);return r}(t,e,n)};var qo={someAsync:void 0};const Co=ye;qo.someAsync=function(t,e){return(0,Co.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return!0;n++}return!1}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return!0;n++}return!1}(t)};var Mo={};Mo.some=void 0,Mo.some=function(t,e){let n=0;for(const r of t){if(e(r,n))return!0;n++}return!1};var zo={};zo.lastAsync=void 0,zo.lastAsync=async function(t){var e;const n=t[Symbol.asyncIterator]();let r;try{let t,o;for(;({value:t,done:r}=await n.next()),!r;)o=t;return o}finally{r||await(null===(e=n.return)||void 0===e?void 0:e.call(n))}};var Ro={};Ro.last=void 0,Ro.last=function(t){var e;const n=t[Symbol.iterator]();let r;try{let t,o;for(;({value:t,done:r}=n.next()),!r;)o=t;return o}finally{r||null===(e=n.return)||void 0===e||e.call(n)}};var Uo={toArrayAsync:void 0};const Do=ho;Uo.toArrayAsync=function(t){return(0,Do.consume)(t,(async t=>{const e=[];for await(const n of t)e.push(n);return e}))};var Fo={toArray:void 0};const Jo=ho;Fo.toArray=function(t){return(0,Jo.consume)(t,(t=>Array.from(t)))};var Vo={toSetAsync:void 0};const Lo=ho;Vo.toSetAsync=function(t){return(0,Lo.consume)(t,(async t=>{const e=new Set;for await(const n of t)e.add(n);return e}))};var Wo={toSet:void 0};const Ko=ho;Wo.toSet=function(t){return(0,Ko.consume)(t,(t=>new Set(t)))},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(ho,t),r(vo,t),r(mo,t),r(bo,t),r(wo,t),r(Ao,t),r(Io,t),r(_o,t),r(To,t),r(xo,t),r(Eo,t),r(Oo,t),r(jo,t),r(ko,t),r(Bo,t),r(qo,t),r(Mo,t),r(zo,t),r(Ro,t),r(Uo,t),r(Fo,t),r(Vo,t),r(Wo,t)}(yo),function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r($t,t),r(yo,t)}(Yt);var Yo={},$o={};$o.traverseErrorPrototypeChain=void 0,$o.traverseErrorPrototypeChain=function*(t){let e=t;for(;(e=Object.getPrototypeOf(e))&&(yield e,e!==Error.prototype););},Yo.getErrorNames=void 0;const Ho=ye,Xo=$o;Yo.getErrorNames=function*(t){var e;if((0,Ho.isError)(t))for(const n of(0,Xo.traverseErrorPrototypeChain)(t))(null===(e=n.constructor)||void 0===e?void 0:e.name)&&(yield n.constructor.name);else yield t.name,yield*t.ancestors};var Go={isSerializableError:void 0};const Qo=ye;Go.isSerializableError=function(t){return(0,Qo.isObject)(t)&&(0,Qo.isString)(t.name)&&(0,Qo.isString)(t.message)&&((0,Qo.isString)(t.stack)||(0,Qo.isNull)(t.stack))&&(0,Qo.isArray)(t.ancestors)&&t.ancestors.every(Qo.isString)},Kt.CustomError=void 0;const Zo=Yt,ti=Yo,ei=ye,ni=Go;class ri extends Error{get name(){var t,e;return null!==(e=null!==(t=(0,Zo.first)((0,ti.getErrorNames)(this)))&&void 0!==t?t:ri.name)&&void 0!==e?e:"CustomError"}static[Symbol.hasInstance](t){var e;if((0,ei.isError)(t)||(0,ni.isSerializableError)(t)){const n=[null!==(e=this.prototype.constructor.name)&&void 0!==e?e:this.name,...(0,ti.getErrorNames)(this.prototype)].reverse(),r=(0,Zo.toArray)((0,ti.getErrorNames)(t)).reverse();return n.every(((t,e)=>t===r[e]))}return!1}}Kt.CustomError=ri;var oi={AssertionError:void 0};const ii=Kt;class ai extends ii.CustomError{}oi.AssertionError=ai;var si={normalize:void 0};const ci=Yo,ui=Yt;si.normalize=function(t){var e;const[n,...r]=(0,ui.toArray)((0,ci.getErrorNames)(t));return{name:n,ancestors:r,message:t.message,stack:null!==(e=t.stack)&&void 0!==e?e:null}};var li={},fi={},di={};di.pass=void 0,di.pass=function(){},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]});(e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)})(di,t)}(fi),li.hydrate=void 0;const yi=fi;function hi(t,e){const n=function(){(0,yi.pass)()};return(n.prototype=Object.create(t.prototype)).constructor=n,Object.defineProperty(n,"name",{value:e}),n}li.hydrate=function(t){var e;const n=[t.name,...t.ancestors].slice(0,-1).reverse();let r=Error;for(const t of n)r=hi(r,t);const o=new r;return o.name=t.name,o.message=t.message,o.stack=null!==(e=t.stack)&&void 0!==e?e:void 0,o};var vi={assert:void 0};const pi=oi;vi.assert=function(t,e){if(!t)throw new pi.AssertionError(e)},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(Kt,t),r(oi,t),r(Go,t),r(si,t),r(li,t),r(vi,t),r(Yo,t),r($o,t)}(Wt),Jt.chunkAsync=void 0;const mi=Vt,bi=Wt;Jt.chunkAsync=function(t,e){return(0,bi.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,bi.assert)(e>0,"The parameter size must be greater than 0"),(0,mi.go)((async function*(){let n=[];for await(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var gi={chunkByAsync:void 0};const wi=ye;gi.chunkByAsync=function(t,e){return(0,wi.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const o of t)n.push(o),await e(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t):async function*(t){let n=[],r=0;for(const o of t)n.push(o),await e(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t)};var Ai={};Ai.chunkBy=void 0,Ai.chunkBy=function*(t,e){let n=[],r=0;for(const o of t)n.push(o),e(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)};var Si={chunk:void 0};const Ii=Vt,_i=Wt;Si.chunk=function(t,e){return(0,_i.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,_i.assert)(e>0,"The parameter size must be greater than 0"),(0,Ii.go)((function*(){let n=[];for(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var Ti={concatAsync:void 0};const xi=ye,Ei=Vt;Ti.concatAsync=function(t,...e){return(0,Ei.go)((async function*(){for(const n of[t,...e])if((0,xi.isAsyncIterable)(n))for await(const t of n)yield t;else for(const t of n)yield t}))};var Oi={concat:void 0};const ji=Vt;Oi.concat=function(t,...e){return(0,ji.go)((function*(){for(const n of[t,...e])yield*n}))};var ki={},Ni={};Ni.copyIterable=Ni.copyAsyncIterable=void 0,Ni.copyAsyncIterable=async function*(t){for await(const e of t)yield e},Ni.copyIterable=function*(t){for(const e of t)yield e},ki.dropAsync=void 0;const Bi=Vt,Pi=Ni,qi=Wt;ki.dropAsync=function(t,e){return(0,qi.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,qi.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Pi.copyAsyncIterable)(t):(0,Bi.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let o;try{let t;for(;!(({value:t,done:o}=await r.next()),o||e<=0);)e--;for(;!o;)yield t,({value:t,done:o}=await r.next())}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var Ci={dropRightAsync:void 0};const Mi=Vt,zi=Ni,Ri=Wt;Ci.dropRightAsync=function(t,e){return(0,Ri.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Ri.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,zi.copyAsyncIterable)(t):(0,Mi.go)((async function*(){const n=(await async function(t){const e=[];for await(const n of t)e.push(n);return e}(t)).slice(0,-e);for(const t of n)yield t}))};var Ui={dropRight:void 0};const Di=Vt,Fi=Ni,Ji=Wt;Ui.dropRight=function(t,e){return(0,Ji.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Ji.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Fi.copyIterable)(t):(0,Di.go)((function*(){const n=Array.from(t);yield*n.slice(0,-e)}))};var Vi={dropUntilAsync:void 0};const Li=ye;Vi.dropUntilAsync=function(t,e){return(0,Li.isAsyncIterable)(t)?async function*(t){var n;const r=t[Symbol.asyncIterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=await r.next()),o||await e(t,i++)););for(;!o;)yield t,({value:t,done:o}=await r.next())}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}(t):async function*(t){var n;const r=t[Symbol.iterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=r.next()),o||await e(t,i++)););for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}(t)};var Wi={};Wi.dropUntil=void 0,Wi.dropUntil=function*(t,e){var n;const r=t[Symbol.iterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=r.next()),o||e(t,i++)););for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}};var Ki={drop:void 0};const Yi=Vt,$i=Ni,Hi=Wt;Ki.drop=function(t,e){return(0,Hi.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Hi.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,$i.copyIterable)(t):(0,Yi.go)((function*(){var n;const r=t[Symbol.iterator]();let o;try{let t;for(;!(({value:t,done:o}=r.next()),o||e<=0);)e--;for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}))};var Xi={filterAsync:void 0};const Gi=ye;Xi.filterAsync=function(t,e){return(0,Gi.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n)&&(yield r),n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n)&&(yield r),n++}(t)};var Qi={};Qi.filter=void 0,Qi.filter=function*(t,e){let n=0;for(const r of t)e(r,n)&&(yield r),n++};var Zi={},ta={},ea={flattenByAsync:void 0};const na=ye;function ra(t){return(0,na.isIterable)(t)&&(0,na.isntChar)(t)}ea.flattenByAsync=function(t,e){return(0,na.isAsyncIterable)(t)?async function*(t){const r=1;for await(const o of t)ra(o)&&await e(o,r)?yield*n(o,r+1):yield o}(t):function(t){return n(t,1)}(t);async function*n(t,r){for(const o of t)ra(o)&&await e(o,r)?yield*n(o,r+1):yield o}},ta.flattenDeepAsync=void 0;const oa=ea,ia=Wt;ta.flattenDeepAsync=function(t,e=1/0){return(0,ia.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,ia.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,oa.flattenByAsync)(t,((t,n)=>n<=e))},Zi.flattenAsync=void 0;const aa=ta;Zi.flattenAsync=function(t){return(0,aa.flattenDeepAsync)(t,1)};var sa={flattenBy:void 0};const ca=ye;sa.flattenBy=function(t,e){return function*t(n,r){for(const i of n)(0,ca.isIterable)(o=i)&&(0,ca.isntChar)(o)&&e(i,r)?yield*t(i,r+1):yield i;var o}(t,1)};var ua={flattenDeep:void 0};const la=sa,fa=Wt;ua.flattenDeep=function(t,e=1/0){return(0,fa.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,fa.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,la.flattenBy)(t,((t,n)=>n<=e))};var da={flatten:void 0};const ya=ua;da.flatten=function(t){return(0,ya.flattenDeep)(t,1)};var ha={mapAsync:void 0};const va=ye;ha.mapAsync=function(t,e){return(0,va.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)yield await e(r,n),n++}(t):async function*(t){let n=0;for(const r of t)yield await e(r,n),n++}(t)};var pa={};pa.map=void 0,pa.map=function*(t,e){let n=0;for(const r of t)yield e(r,n),n++};var ma={repeatAsync:void 0};const ba=Vt,ga=Wt;ma.repeatAsync=function(t,e){return(0,ga.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,ga.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,ba.go)((async function*(){const n=[];if(e>0){for await(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var wa={repeat:void 0};const Aa=Vt,Sa=Wt;wa.repeat=function(t,e){return(0,Sa.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,Sa.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,Aa.go)((function*(){const n=[];if(e>0){for(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var Ia={sliceAsync:void 0};const _a=Vt,Ta=Wt;Ia.sliceAsync=function(t,e,n=1/0){return(0,Ta.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,Ta.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,Ta.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Ta.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,_a.go)((async function*(){let r=0;for await(const o of t){if(r>=n)break;r>=e&&(yield o),r++}}))};var xa={slice:void 0};const Ea=Vt,Oa=Wt;xa.slice=function(t,e,n=1/0){return(0,Oa.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,Oa.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,Oa.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Oa.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,Ea.go)((function*(){let r=0;for(const o of t){if(r>=n)break;r>=e&&(yield o),r++}}))};var ja={};ja.splitAsync=void 0,ja.splitAsync=async function*(t,e){let n=[];for await(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var ka={splitByAsync:void 0};const Na=ye;ka.splitByAsync=function(t,e){return(0,Na.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const o of t)await e(o,r)?(yield n,n=[]):n.push(o),r++;yield n}(t):async function*(t){let n=[],r=0;for(const o of t)await e(o,r)?(yield n,n=[]):n.push(o),r++;yield n}(t)};var Ba={};Ba.splitBy=void 0,Ba.splitBy=function*(t,e){let n=[],r=0;for(const o of t)e(o,r)?(yield n,n=[]):n.push(o),r++;yield n};var Pa={};Pa.split=void 0,Pa.split=function*(t,e){let n=[];for(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var qa={takeAsync:void 0};const Ca=Vt,Ma=Wt;qa.takeAsync=function(t,e){return(0,Ma.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Ma.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Ca.go)((async function*(){if(0!==e)for await(const n of t)if(yield n,0===--e)break}))};var za={takeRightAsync:void 0};const Ra=Vt,Ua=Wt;za.takeRightAsync=function(t,e){return(0,Ua.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Ua.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Ra.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let o;try{const t=[];let i;for(;({value:i,done:o}=await r.next()),!o;)t.push(i),t.length>e&&t.shift();yield*t}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var Da={takeRight:void 0};const Fa=Vt,Ja=Wt;Da.takeRight=function(t,e){return(0,Ja.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Ja.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Fa.go)((function*(){var n;const r=t[Symbol.iterator]();let o;try{const t=[];let i;for(;({value:i,done:o}=r.next()),!o;)t.push(i),t.length>e&&t.shift();yield*t}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}))};var Va={takeUntilAsync:void 0};const La=ye;Va.takeUntilAsync=function(t,e){return(0,La.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t){if(await e(r,n))break;yield r,n++}}(t):async function*(t){let n=0;for(const r of t){if(await e(r,n))break;yield r,n++}}(t)};var Wa={};Wa.takeUntil=void 0,Wa.takeUntil=function*(t,e){let n=0;for(const r of t){if(e(r,n))break;yield r,n++}};var Ka={take:void 0};const Ya=Vt,$a=Wt;Ka.take=function(t,e){return(0,$a.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,$a.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Ya.go)((function*(){if(0!==e)for(const n of t)if(yield n,0===--e)break}))};var Ha={tapAsync:void 0};const Xa=ye;Ha.tapAsync=function(t,e){return(0,Xa.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n),yield r,n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n),yield r,n++}(t)};var Ga={};Ga.tap=void 0,Ga.tap=function*(t,e){let n=0;for(const r of t)e(r,n),yield r,n++};var Qa={};Qa.toAsyncIterable=void 0,Qa.toAsyncIterable=async function*(t){for(const e of t)yield e};var Za={};Za.transformAsync=void 0,Za.transformAsync=async function*(t,e){yield*e(t)};var ts={};ts.transform=void 0,ts.transform=function*(t,e){yield*e(t)};var es={};es.uniqAsync=void 0,es.uniqAsync=async function*(t){const e=new Set;for await(const n of t)e.has(n)||(yield n,e.add(n))};var ns={uniqByAsync:void 0};const rs=ye;ns.uniqByAsync=function(t,e){return(0,rs.isAsyncIterable)(t)?async function*(t){const n=new Set;let r=0;for await(const o of t){const t=await e(o,r);n.has(t)||(yield o,n.add(t)),r++}}(t):async function*(t){const n=new Set;let r=0;for(const o of t){const t=await e(o,r);n.has(t)||(yield o,n.add(t)),r++}}(t)};var os={};os.uniqBy=void 0,os.uniqBy=function*(t,e){const n=new Set;let r=0;for(const o of t){const t=e(o,r);n.has(t)||(yield o,n.add(t)),r++}};var is={};is.uniq=void 0,is.uniq=function*(t){const e=new Set;for(const n of t)e.has(n)||(yield n,e.add(n))};var as={zipAsync:void 0};const ss=ye;var cs;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(cs||(cs={})),as.zipAsync=function(t,...e){return async function*(...t){var e,n,r,o;const i=t.length,a=t.map((t=>(0,ss.isAsyncIterable)(t)?[cs.Async,t[Symbol.asyncIterator]()]:[cs.Sync,t[Symbol.iterator]()])),s=a.map((()=>!1));try{for(;;){const t=new Array(i);for(let e=0;e<i;e++){const[n,r]=a[e];let o;if(o=n===cs.Async?await r.next():r.next(),o.done)return void(s[e]=!0);t[e]=o.value}yield t}}finally{const t=a.filter(((t,e)=>!s[e]));for(const[i,a]of t)i===cs.Async?await(null===(n=(e=a).return)||void 0===n?void 0:n.call(e)):null===(o=(r=a).return)||void 0===o||o.call(r)}}(t,...e)};var us={};us.zip=void 0,us.zip=function(t,...e){return function*(...t){const e=t.length,n=t.map((t=>t[Symbol.iterator]())),r=n.map((()=>!1));try{for(;;){const t=new Array(e);for(let o=0;o<e;o++){const{value:e,done:i}=n[o].next();if(i)return void(r[o]=!0);t[o]=e}yield t}}finally{n.filter(((t,e)=>!r[e])).forEach((t=>{var e;return null===(e=t.return)||void 0===e?void 0:e.call(t)}))}}(t,...e)},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(Jt,t),r(gi,t),r(Ai,t),r(Si,t),r(Ti,t),r(Oi,t),r(ki,t),r(Ci,t),r(Ui,t),r(Vi,t),r(Wi,t),r(Ki,t),r(Xi,t),r(Qi,t),r(Zi,t),r(ea,t),r(sa,t),r(ta,t),r(ua,t),r(da,t),r(ha,t),r(pa,t),r(ma,t),r(wa,t),r(Ia,t),r(xa,t),r(ja,t),r(ka,t),r(Ba,t),r(Pa,t),r(qa,t),r(za,t),r(Da,t),r(Va,t),r(Wa,t),r(Ka,t),r(Ha,t),r(Ga,t),r(Qa,t),r(Za,t),r(ts,t),r(es,t),r(ns,t),r(os,t),r(is,t),r(as,t),r(us,t)}(Ft);var ls={},fs={};fs.consume=void 0,fs.consume=function(t,e){return e(t)};var ds={eachAsync:void 0};const ys=ye;ds.eachAsync=function(t,e){return(0,ys.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t)await e(r,n),n++}(t):async function(t){let n=0;for(const r of t)await e(r,n),n++}(t)};var hs={};hs.each=void 0,hs.each=function(t,e){let n=0;for(const r of t)e(r,n),n++};var vs={everyAsync:void 0};const ps=ye;vs.everyAsync=function(t,e){return(0,ps.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(!await e(r,n))return!1;n++}return!0}(t):async function(t){let n=0;for(const r of t){if(!await e(r,n))return!1;n++}return!0}(t)};var ms={};ms.every=void 0,ms.every=function(t,e){let n=0;for(const r of t){if(!e(r,n))return!1;n++}return!0};var bs={findAsync:void 0};const gs=ye;bs.findAsync=function(t,e){return(0,gs.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return r;n++}return}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return r;n++}return}(t)};var ws={};ws.find=void 0,ws.find=function(t,e){let n=0;for(const r of t){if(e(r,n))return r;n++}};var As={};As.firstAsync=void 0,As.firstAsync=async function(t){for await(const e of t)return e};var Ss={};Ss.first=void 0,Ss.first=function(t){for(const e of t)return e};var Is={};Is.includesAsync=void 0,Is.includesAsync=async function(t,e){for await(const n of t)if(n===e)return!0;return!1};var _s={};_s.includes=void 0,_s.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1};var Ts={};Ts.matchAsync=void 0,Ts.matchAsync=async function(t,e){const n=e.length;let r=0;for await(const o of t)if(o===e[r]&&r++,r===n)return!0;return!1};var xs={};xs.match=void 0,xs.match=function(t,e){const n=e.length;let r=0;for(const o of t)if(o===e[r]&&r++,r===n)return!0;return!1};var Es={reduceAsync:void 0};const Os=ye;Es.reduceAsync=function(t,e,n){return(0,Os.isUndefined)(n)?function(t,e){return(0,Os.isAsyncIterable)(t)?n(t):r(t);async function n(t){var n;const r=t[Symbol.asyncIterator]();let o;try{let t,a=await i(r),s=1;for(;({value:t,done:o}=await r.next()),!o;)a=await e(a,t,s++);return a}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}async function i(t){const e=await t.next();if(e.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}async function r(t){var n;const r=t[Symbol.iterator]();let o;try{let t,a=i(r),s=1;for(;({value:t,done:o}=r.next()),!o;)a=await e(a,t,s++);return a}finally{o||null===(n=r.return)||void 0===n||n.call(r)}function i(t){const e=t.next();if(e.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}}(t,e):function(t,e,n){return(0,Os.isAsyncIterable)(t)?o(t):r(t);async function r(t){let r=n,o=0;for(const n of t)r=await e(r,n,o++);return r}async function o(t){let r=n,o=0;for await(const n of t)r=await e(r,n,o++);return r}}(t,e,n)};var js={reduce:void 0};const ks=ye;js.reduce=function(t,e,n){return(0,ks.isUndefined)(n)?function(t,e){var n;const r=t[Symbol.iterator]();let o;try{let t,a=i(r),s=1;for(;({value:t,done:o}=r.next()),!o;)a=e(a,t,s++);return a}finally{o||null===(n=r.return)||void 0===n||n.call(r)}function i(t){const e=t.next();if(e.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}(t,e):function(t,e,n){let r=n,o=0;for(const n of t)r=e(r,n,o++);return r}(t,e,n)};var Ns={someAsync:void 0};const Bs=ye;Ns.someAsync=function(t,e){return(0,Bs.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return!0;n++}return!1}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return!0;n++}return!1}(t)};var Ps={};Ps.some=void 0,Ps.some=function(t,e){let n=0;for(const r of t){if(e(r,n))return!0;n++}return!1};var qs={};qs.lastAsync=void 0,qs.lastAsync=async function(t){var e;const n=t[Symbol.asyncIterator]();let r;try{let t,o;for(;({value:t,done:r}=await n.next()),!r;)o=t;return o}finally{r||await(null===(e=n.return)||void 0===e?void 0:e.call(n))}};var Cs={};Cs.last=void 0,Cs.last=function(t){var e;const n=t[Symbol.iterator]();let r;try{let t,o;for(;({value:t,done:r}=n.next()),!r;)o=t;return o}finally{r||null===(e=n.return)||void 0===e||e.call(n)}};var Ms={toArrayAsync:void 0};const zs=fs;Ms.toArrayAsync=function(t){return(0,zs.consume)(t,(async t=>{const e=[];for await(const n of t)e.push(n);return e}))};var Rs={toArray:void 0};const Us=fs;Rs.toArray=function(t){return(0,Us.consume)(t,(t=>Array.from(t)))};var Ds={toSetAsync:void 0};const Fs=fs;Ds.toSetAsync=function(t){return(0,Fs.consume)(t,(async t=>{const e=new Set;for await(const n of t)e.add(n);return e}))};var Js={toSet:void 0};const Vs=fs;Js.toSet=function(t){return(0,Vs.consume)(t,(t=>new Set(t)))},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(fs,t),r(ds,t),r(hs,t),r(vs,t),r(ms,t),r(bs,t),r(ws,t),r(As,t),r(Ss,t),r(Is,t),r(_s,t),r(Ts,t),r(xs,t),r(Es,t),r(js,t),r(Ns,t),r(Ps,t),r(qs,t),r(Cs,t),r(Ms,t),r(Rs,t),r(Ds,t),r(Js,t)}(ls),function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(Ft,t),r(ls,t)}(Dt);var Ls={},Ws={};Ws.traverseErrorPrototypeChain=void 0,Ws.traverseErrorPrototypeChain=function*(t){let e=t;for(;(e=Object.getPrototypeOf(e))&&(yield e,e!==Error.prototype););},Ls.getErrorNames=void 0;const Ks=ye,Ys=Ws;Ls.getErrorNames=function*(t){var e;if((0,Ks.isError)(t))for(const n of(0,Ys.traverseErrorPrototypeChain)(t))(null===(e=n.constructor)||void 0===e?void 0:e.name)&&(yield n.constructor.name);else yield t.name,yield*t.ancestors};var $s={isSerializableError:void 0};const Hs=ye;$s.isSerializableError=function(t){return(0,Hs.isObject)(t)&&(0,Hs.isString)(t.name)&&(0,Hs.isString)(t.message)&&((0,Hs.isString)(t.stack)||(0,Hs.isNull)(t.stack))&&(0,Hs.isArray)(t.ancestors)&&t.ancestors.every(Hs.isString)},Ut.CustomError=void 0;const Xs=Dt,Gs=Ls,Qs=ye,Zs=$s;class tc extends Error{get name(){var t,e;return null!==(e=null!==(t=(0,Xs.first)((0,Gs.getErrorNames)(this)))&&void 0!==t?t:tc.name)&&void 0!==e?e:"CustomError"}static[Symbol.hasInstance](t){var e;if((0,Qs.isError)(t)||(0,Zs.isSerializableError)(t)){const n=[null!==(e=this.prototype.constructor.name)&&void 0!==e?e:this.name,...(0,Gs.getErrorNames)(this.prototype)].reverse(),r=(0,Xs.toArray)((0,Gs.getErrorNames)(t)).reverse();return n.every(((t,e)=>t===r[e]))}return!1}}Ut.CustomError=tc;var ec={AssertionError:void 0};const nc=Ut;class rc extends nc.CustomError{}ec.AssertionError=rc;var oc={normalize:void 0};const ic=Ls,ac=Dt;oc.normalize=function(t){var e;const[n,...r]=(0,ac.toArray)((0,ic.getErrorNames)(t));return{name:n,ancestors:r,message:t.message,stack:null!==(e=t.stack)&&void 0!==e?e:null}};var sc={},cc={},uc={};uc.pass=void 0,uc.pass=function(){},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]});(e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)})(uc,t)}(cc),sc.hydrate=void 0;const lc=cc;function fc(t,e){const n=function(){(0,lc.pass)()};return(n.prototype=Object.create(t.prototype)).constructor=n,Object.defineProperty(n,"name",{value:e}),n}sc.hydrate=function(t){var e;const n=[t.name,...t.ancestors].slice(0,-1).reverse();let r=Error;for(const t of n)r=fc(r,t);const o=new r;return o.name=t.name,o.message=t.message,o.stack=null!==(e=t.stack)&&void 0!==e?e:void 0,o};var dc={assert:void 0};const yc=ec;dc.assert=function(t,e){if(!t)throw new yc.AssertionError(e)},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(Ut,t),r(ec,t),r($s,t),r(oc,t),r(sc,t),r(dc,t),r(Ls,t),r(Ws,t)}(Rt);var hc={},vc={},pc={},mc={},bc={};bc.go=void 0,bc.go=function(t){return t()},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]});(e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)})(bc,t)}(mc),pc.chunkAsync=void 0;const gc=mc,wc=Rt;pc.chunkAsync=function(t,e){return(0,wc.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,wc.assert)(e>0,"The parameter size must be greater than 0"),(0,gc.go)((async function*(){let n=[];for await(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var Ac={chunkByAsync:void 0};const Sc=n;Ac.chunkByAsync=function(t,e){return(0,Sc.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const o of t)n.push(o),await e(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t):async function*(t){let n=[],r=0;for(const o of t)n.push(o),await e(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t)};var Ic={};Ic.chunkBy=void 0,Ic.chunkBy=function*(t,e){let n=[],r=0;for(const o of t)n.push(o),e(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)};var _c={chunk:void 0};const Tc=mc,xc=Rt;_c.chunk=function(t,e){return(0,xc.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,xc.assert)(e>0,"The parameter size must be greater than 0"),(0,Tc.go)((function*(){let n=[];for(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var Ec={concatAsync:void 0};const Oc=n,jc=mc;Ec.concatAsync=function(t,...e){return(0,jc.go)((async function*(){for(const n of[t,...e])if((0,Oc.isAsyncIterable)(n))for await(const t of n)yield t;else for(const t of n)yield t}))};var kc={concat:void 0};const Nc=mc;kc.concat=function(t,...e){return(0,Nc.go)((function*(){for(const n of[t,...e])yield*n}))};var Bc={},Pc={};Pc.copyIterable=Pc.copyAsyncIterable=void 0,Pc.copyAsyncIterable=async function*(t){for await(const e of t)yield e},Pc.copyIterable=function*(t){for(const e of t)yield e},Bc.dropAsync=void 0;const qc=mc,Cc=Pc,Mc=Rt;Bc.dropAsync=function(t,e){return(0,Mc.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Mc.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Cc.copyAsyncIterable)(t):(0,qc.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let o;try{let t;for(;!(({value:t,done:o}=await r.next()),o||e<=0);)e--;for(;!o;)yield t,({value:t,done:o}=await r.next())}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var zc={dropRightAsync:void 0};const Rc=mc,Uc=Pc,Dc=Rt;zc.dropRightAsync=function(t,e){return(0,Dc.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Dc.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Uc.copyAsyncIterable)(t):(0,Rc.go)((async function*(){const n=(await async function(t){const e=[];for await(const n of t)e.push(n);return e}(t)).slice(0,-e);for(const t of n)yield t}))};var Fc={dropRight:void 0};const Jc=mc,Vc=Pc,Lc=Rt;Fc.dropRight=function(t,e){return(0,Lc.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Lc.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Vc.copyIterable)(t):(0,Jc.go)((function*(){const n=Array.from(t);yield*n.slice(0,-e)}))};var Wc={dropUntilAsync:void 0};const Kc=n;Wc.dropUntilAsync=function(t,e){return(0,Kc.isAsyncIterable)(t)?async function*(t){var n;const r=t[Symbol.asyncIterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=await r.next()),o||await e(t,i++)););for(;!o;)yield t,({value:t,done:o}=await r.next())}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}(t):async function*(t){var n;const r=t[Symbol.iterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=r.next()),o||await e(t,i++)););for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}(t)};var Yc={};Yc.dropUntil=void 0,Yc.dropUntil=function*(t,e){var n;const r=t[Symbol.iterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=r.next()),o||e(t,i++)););for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}};var $c={drop:void 0};const Hc=mc,Xc=Pc,Gc=Rt;$c.drop=function(t,e){return(0,Gc.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Gc.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Xc.copyIterable)(t):(0,Hc.go)((function*(){var n;const r=t[Symbol.iterator]();let o;try{let t;for(;!(({value:t,done:o}=r.next()),o||e<=0);)e--;for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}))};var Qc={filterAsync:void 0};const Zc=n;Qc.filterAsync=function(t,e){return(0,Zc.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n)&&(yield r),n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n)&&(yield r),n++}(t)};var tu={};tu.filter=void 0,tu.filter=function*(t,e){let n=0;for(const r of t)e(r,n)&&(yield r),n++};var eu={},nu={},ru={flattenByAsync:void 0};const ou=n;function iu(t){return(0,ou.isIterable)(t)&&(0,ou.isntChar)(t)}ru.flattenByAsync=function(t,e){return(0,ou.isAsyncIterable)(t)?async function*(t){const r=1;for await(const o of t)iu(o)&&await e(o,r)?yield*n(o,r+1):yield o}(t):function(t){return n(t,1)}(t);async function*n(t,r){for(const o of t)iu(o)&&await e(o,r)?yield*n(o,r+1):yield o}},nu.flattenDeepAsync=void 0;const au=ru,su=Rt;nu.flattenDeepAsync=function(t,e=1/0){return(0,su.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,su.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,au.flattenByAsync)(t,((t,n)=>n<=e))},eu.flattenAsync=void 0;const cu=nu;eu.flattenAsync=function(t){return(0,cu.flattenDeepAsync)(t,1)};var uu={flattenBy:void 0};const lu=n;uu.flattenBy=function(t,e){return function*t(n,r){for(const i of n)o=i,(0,lu.isIterable)(o)&&(0,lu.isntChar)(o)&&e(i,r)?yield*t(i,r+1):yield i;var o}(t,1)};var fu={flattenDeep:void 0};const du=uu,yu=Rt;fu.flattenDeep=function(t,e=1/0){return(0,yu.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,yu.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,du.flattenBy)(t,((t,n)=>n<=e))};var hu={flatten:void 0};const vu=fu;hu.flatten=function(t){return(0,vu.flattenDeep)(t,1)};var pu={mapAsync:void 0};const mu=n;pu.mapAsync=function(t,e){return(0,mu.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)yield await e(r,n),n++}(t):async function*(t){let n=0;for(const r of t)yield await e(r,n),n++}(t)};var bu={};bu.map=void 0,bu.map=function*(t,e){let n=0;for(const r of t)yield e(r,n),n++};var gu={repeatAsync:void 0};const wu=mc,Au=Rt;gu.repeatAsync=function(t,e){return(0,Au.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,Au.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,wu.go)((async function*(){const n=[];if(e>0){for await(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var Su={repeat:void 0};const Iu=mc,_u=Rt;Su.repeat=function(t,e){return(0,_u.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,_u.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,Iu.go)((function*(){const n=[];if(e>0){for(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var Tu={sliceAsync:void 0};const xu=mc,Eu=Rt;Tu.sliceAsync=function(t,e,n=1/0){return(0,Eu.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,Eu.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,Eu.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Eu.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,xu.go)((async function*(){let r=0;for await(const o of t){if(r>=n)break;r>=e&&(yield o),r++}}))};var Ou={slice:void 0};const ju=mc,ku=Rt;Ou.slice=function(t,e,n=1/0){return(0,ku.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,ku.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,ku.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,ku.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,ju.go)((function*(){let r=0;for(const o of t){if(r>=n)break;r>=e&&(yield o),r++}}))};var Nu={};Nu.splitAsync=void 0,Nu.splitAsync=async function*(t,e){let n=[];for await(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Bu={splitByAsync:void 0};const Pu=n;Bu.splitByAsync=function(t,e){return(0,Pu.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const o of t)await e(o,r)?(yield n,n=[]):n.push(o),r++;yield n}(t):async function*(t){let n=[],r=0;for(const o of t)await e(o,r)?(yield n,n=[]):n.push(o),r++;yield n}(t)};var qu={};qu.splitBy=void 0,qu.splitBy=function*(t,e){let n=[],r=0;for(const o of t)e(o,r)?(yield n,n=[]):n.push(o),r++;yield n};var Cu={};Cu.split=void 0,Cu.split=function*(t,e){let n=[];for(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Mu={takeAsync:void 0};const zu=mc,Ru=Rt;Mu.takeAsync=function(t,e){return(0,Ru.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Ru.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,zu.go)((async function*(){if(0!==e)for await(const n of t)if(yield n,0===--e)break}))};var Uu={takeRightAsync:void 0};const Du=mc,Fu=Rt;Uu.takeRightAsync=function(t,e){return(0,Fu.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Fu.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Du.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let o;try{const t=[];let i;for(;({value:i,done:o}=await r.next()),!o;)t.push(i),t.length>e&&t.shift();yield*t}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var Ju={takeRight:void 0};const Vu=mc,Lu=Rt;Ju.takeRight=function(t,e){return(0,Lu.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Lu.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Vu.go)((function*(){var n;const r=t[Symbol.iterator]();let o;try{const t=[];let i;for(;({value:i,done:o}=r.next()),!o;)t.push(i),t.length>e&&t.shift();yield*t}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}))};var Wu={takeUntilAsync:void 0};const Ku=n;Wu.takeUntilAsync=function(t,e){return(0,Ku.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t){if(await e(r,n))break;yield r,n++}}(t):async function*(t){let n=0;for(const r of t){if(await e(r,n))break;yield r,n++}}(t)};var Yu={};Yu.takeUntil=void 0,Yu.takeUntil=function*(t,e){let n=0;for(const r of t){if(e(r,n))break;yield r,n++}};var $u={take:void 0};const Hu=mc,Xu=Rt;$u.take=function(t,e){return(0,Xu.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Xu.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Hu.go)((function*(){if(0!==e)for(const n of t)if(yield n,0===--e)break}))};var Gu={tapAsync:void 0};const Qu=n;Gu.tapAsync=function(t,e){return(0,Qu.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n),yield r,n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n),yield r,n++}(t)};var Zu={};Zu.tap=void 0,Zu.tap=function*(t,e){let n=0;for(const r of t)e(r,n),yield r,n++};var tl={};tl.toAsyncIterable=void 0,tl.toAsyncIterable=async function*(t){for(const e of t)yield e};var el={};el.transformAsync=void 0,el.transformAsync=async function*(t,e){yield*e(t)};var nl={};nl.transform=void 0,nl.transform=function*(t,e){yield*e(t)};var rl={};rl.uniqAsync=void 0,rl.uniqAsync=async function*(t){const e=new Set;for await(const n of t)e.has(n)||(yield n,e.add(n))};var ol={uniqByAsync:void 0};const il=n;ol.uniqByAsync=function(t,e){return(0,il.isAsyncIterable)(t)?async function*(t){const n=new Set;let r=0;for await(const o of t){const t=await e(o,r);n.has(t)||(yield o,n.add(t)),r++}}(t):async function*(t){const n=new Set;let r=0;for(const o of t){const t=await e(o,r);n.has(t)||(yield o,n.add(t)),r++}}(t)};var al={};al.uniqBy=void 0,al.uniqBy=function*(t,e){const n=new Set;let r=0;for(const o of t){const t=e(o,r);n.has(t)||(yield o,n.add(t)),r++}};var sl={};sl.uniq=void 0,sl.uniq=function*(t){const e=new Set;for(const n of t)e.has(n)||(yield n,e.add(n))};var cl={zipAsync:void 0};const ul=n;var ll;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(ll||(ll={})),cl.zipAsync=function(t,...e){return async function*(...t){var e,n,r,o;const i=t.length,a=t.map((t=>(0,ul.isAsyncIterable)(t)?[ll.Async,t[Symbol.asyncIterator]()]:[ll.Sync,t[Symbol.iterator]()])),s=a.map((()=>!1));try{for(;;){const t=new Array(i);for(let e=0;e<i;e++){const[n,r]=a[e];let o;if(o=n===ll.Async?await r.next():r.next(),o.done)return void(s[e]=!0);t[e]=o.value}yield t}}finally{const t=a.filter(((t,e)=>!s[e]));for(const[i,a]of t)i===ll.Async?await(null===(n=(e=a).return)||void 0===n?void 0:n.call(e)):null===(o=(r=a).return)||void 0===o||o.call(r)}}(t,...e)};var fl={};fl.zip=void 0,fl.zip=function(t,...e){return function*(...t){const e=t.length,n=t.map((t=>t[Symbol.iterator]())),r=n.map((()=>!1));try{for(;;){const t=new Array(e);for(let o=0;o<e;o++){const{value:e,done:i}=n[o].next();if(i)return void(r[o]=!0);t[o]=e}yield t}}finally{n.filter(((t,e)=>!r[e])).forEach((t=>{var e;return null===(e=t.return)||void 0===e?void 0:e.call(t)}))}}(t,...e)},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(pc,t),r(Ac,t),r(Ic,t),r(_c,t),r(Ec,t),r(kc,t),r(Bc,t),r(zc,t),r(Fc,t),r(Wc,t),r(Yc,t),r($c,t),r(Qc,t),r(tu,t),r(eu,t),r(ru,t),r(uu,t),r(nu,t),r(fu,t),r(hu,t),r(pu,t),r(bu,t),r(gu,t),r(Su,t),r(Tu,t),r(Ou,t),r(Nu,t),r(Bu,t),r(qu,t),r(Cu,t),r(Mu,t),r(Uu,t),r(Ju,t),r(Wu,t),r(Yu,t),r($u,t),r(Gu,t),r(Zu,t),r(tl,t),r(el,t),r(nl,t),r(rl,t),r(ol,t),r(al,t),r(sl,t),r(cl,t),r(fl,t)}(vc);var dl={},yl={};yl.consume=void 0,yl.consume=function(t,e){return e(t)};var hl={eachAsync:void 0};const vl=n;hl.eachAsync=function(t,e){return(0,vl.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t)await e(r,n),n++}(t):async function(t){let n=0;for(const r of t)await e(r,n),n++}(t)};var pl={};pl.each=void 0,pl.each=function(t,e){let n=0;for(const r of t)e(r,n),n++};var ml={everyAsync:void 0};const bl=n;ml.everyAsync=function(t,e){return(0,bl.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(!await e(r,n))return!1;n++}return!0}(t):async function(t){let n=0;for(const r of t){if(!await e(r,n))return!1;n++}return!0}(t)};var gl={};gl.every=void 0,gl.every=function(t,e){let n=0;for(const r of t){if(!e(r,n))return!1;n++}return!0};var wl={findAsync:void 0};const Al=n;wl.findAsync=function(t,e){return(0,Al.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return r;n++}return}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return r;n++}return}(t)};var Sl={};Sl.find=void 0,Sl.find=function(t,e){let n=0;for(const r of t){if(e(r,n))return r;n++}};var Il={};Il.firstAsync=void 0,Il.firstAsync=async function(t){for await(const e of t)return e};var _l={};_l.first=void 0,_l.first=function(t){for(const e of t)return e};var Tl={};Tl.includesAsync=void 0,Tl.includesAsync=async function(t,e){for await(const n of t)if(n===e)return!0;return!1};var xl={};xl.includes=void 0,xl.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1};var El={};El.matchAsync=void 0,El.matchAsync=async function(t,e){const n=e.length;let r=0;for await(const o of t)if(o===e[r]&&r++,r===n)return!0;return!1};var Ol={};Ol.match=void 0,Ol.match=function(t,e){const n=e.length;let r=0;for(const o of t)if(o===e[r]&&r++,r===n)return!0;return!1};var jl={reduceAsync:void 0};const kl=n;jl.reduceAsync=function(t,e,n){return(0,kl.isUndefined)(n)?function(t,e){return(0,kl.isAsyncIterable)(t)?n(t):r(t);async function n(t){var n;const r=t[Symbol.asyncIterator]();let o;try{let t,a=await i(r),s=1;for(;({value:t,done:o}=await r.next()),!o;)a=await e(a,t,s++);return a}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}async function i(t){const e=await t.next();if(e.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}async function r(t){var n;const r=t[Symbol.iterator]();let o;try{let t,a=i(r),s=1;for(;({value:t,done:o}=r.next()),!o;)a=await e(a,t,s++);return a}finally{o||null===(n=r.return)||void 0===n||n.call(r)}function i(t){const e=t.next();if(e.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}}(t,e):function(t,e,n){return(0,kl.isAsyncIterable)(t)?o(t):r(t);async function r(t){let r=n,o=0;for(const n of t)r=await e(r,n,o++);return r}async function o(t){let r=n,o=0;for await(const n of t)r=await e(r,n,o++);return r}}(t,e,n)};var Nl={reduce:void 0};const Bl=n;Nl.reduce=function(t,e,n){return(0,Bl.isUndefined)(n)?function(t,e){var n;const r=t[Symbol.iterator]();let o;try{let t,a=i(r),s=1;for(;({value:t,done:o}=r.next()),!o;)a=e(a,t,s++);return a}finally{o||null===(n=r.return)||void 0===n||n.call(r)}function i(t){const e=t.next();if(e.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}(t,e):function(t,e,n){let r=n,o=0;for(const n of t)r=e(r,n,o++);return r}(t,e,n)};var Pl={someAsync:void 0};const ql=n;Pl.someAsync=function(t,e){return(0,ql.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return!0;n++}return!1}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return!0;n++}return!1}(t)};var Cl={};Cl.some=void 0,Cl.some=function(t,e){let n=0;for(const r of t){if(e(r,n))return!0;n++}return!1};var Ml={};Ml.lastAsync=void 0,Ml.lastAsync=async function(t){var e;const n=t[Symbol.asyncIterator]();let r;try{let t,o;for(;({value:t,done:r}=await n.next()),!r;)o=t;return o}finally{r||await(null===(e=n.return)||void 0===e?void 0:e.call(n))}};var zl={};zl.last=void 0,zl.last=function(t){var e;const n=t[Symbol.iterator]();let r;try{let t,o;for(;({value:t,done:r}=n.next()),!r;)o=t;return o}finally{r||null===(e=n.return)||void 0===e||e.call(n)}};var Rl={toArrayAsync:void 0};const Ul=yl;Rl.toArrayAsync=function(t){return(0,Ul.consume)(t,(async t=>{const e=[];for await(const n of t)e.push(n);return e}))};var Dl={toArray:void 0};const Fl=yl;Dl.toArray=function(t){return(0,Fl.consume)(t,(t=>Array.from(t)))};var Jl={toSetAsync:void 0};const Vl=yl;Jl.toSetAsync=function(t){return(0,Vl.consume)(t,(async t=>{const e=new Set;for await(const n of t)e.add(n);return e}))};var Ll={toSet:void 0};const Wl=yl;Ll.toSet=function(t){return(0,Wl.consume)(t,(t=>new Set(t)))};var Kl={};Kl.count=void 0,Kl.count=function(t){let e=0;for(const n of t)e++;return e};var Yl={};Yl.countAsync=void 0,Yl.countAsync=async function(t){let e=0;for await(const n of t)e++;return e},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(yl,t),r(hl,t),r(pl,t),r(ml,t),r(gl,t),r(wl,t),r(Sl,t),r(Il,t),r(_l,t),r(Tl,t),r(xl,t),r(El,t),r(Ol,t),r(jl,t),r(Nl,t),r(Pl,t),r(Cl,t),r(Ml,t),r(zl,t),r(Rl,t),r(Dl,t),r(Jl,t),r(Ll,t),r(Kl,t),r(Yl,t)}(dl),function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(vc,t),r(dl,t)}(hc);class $l{constructor(t){this.map=new Map,Rt.assert(Number.isInteger(t),"The parameter limit must be an integer"),Rt.assert(t>0,"The parameter limit must be a positive value"),this.limit=t}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.map.size}set(t,e){return this.map.has(t)?this.updateItem(t,e):(this.map.size===this.limit&&this.map.delete(this.getColdestKey()),this.map.set(t,e)),this}has(t){return this.map.has(t)}get(t){if(!this.has(t))return;const e=this.map.get(t);return this.updateItem(t,e),e}delete(t){return this.map.delete(t)}clear(){this.map.clear()}updateItem(t,e){this.map.delete(t),this.map.set(t,e)}getColdestKey(){return hc.first(this.map.keys())}}var Hl={},Xl={},Gl={},Ql={};Ql.random=void 0,Ql.random=function(t,e){return Math.random()*(e-t)+t};var Zl={};Zl.randomInt=void 0,Zl.randomInt=function(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t))+t};var tf={};tf.randomIntInclusive=void 0,tf.randomIntInclusive=function(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(Ql,t),r(Zl,t),r(tf,t)}(Gl),Xl.calculateExponentialBackoffTimeout=void 0;const ef=Gl;Xl.calculateExponentialBackoffTimeout=function({baseTimeout:t,retries:e,maxTimeout:n=1/0,factor:r=2,jitter:o=!0}){const i=Math.min(r**e*t,n);return o?(0,ef.randomIntInclusive)(0,i):i};var nf={};nf.setTimeout=void 0,nf.setTimeout=function(t,e){const n=globalThis.setTimeout(e,t);return()=>clearTimeout(n)};var rf={setSchedule:void 0};const of=nf;rf.setSchedule=function(t,e){const n=t-Date.now();return(0,of.setTimeout)(n,e)};var af={};af.setInterval=void 0,af.setInterval=function(t,e){const n=globalThis.setInterval(e,t);return()=>clearInterval(n)};var sf={setImmediate:void 0};const cf=nf;sf.setImmediate=function(t){if(globalThis.setImmediate){const e=globalThis.setImmediate(t);return()=>clearImmediate(e)}return(0,cf.setTimeout)(0,t)};var uf={setTimeoutLoop:void 0};const lf=nf;uf.setTimeoutLoop=function(t,e){let n=!1,r=(0,lf.setTimeout)(t,(async function o(){await e(),n||(r=(0,lf.setTimeout)(t,o))}));return()=>{n=!0,r()}};var ff={setDynamicTimeoutLoop:void 0};const df=nf;ff.setDynamicTimeoutLoop=function(t,e){let n=!1,r=(0,df.setTimeout)(t,(async function o(){const i=Date.now();await e();const a=Date.now()-i;n||(r=(0,df.setTimeout)(Math.max(t-a,0),o))}));return()=>{n=!0,r()}},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(Xl,t),r(nf,t),r(rf,t),r(af,t),r(sf,t),r(uf,t),r(ff,t)}(Hl);class yf{constructor(){this.map=new Map,this.itemMetadataSortedByExpirationTime=[]}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.map.size}set(t,e,n){return this.map.set(t,e),this.removeItemMetadata(t),this.addItemMetadata(t,Date.now()+n),this}has(t){return this.map.has(t)}get(t){return this.map.get(t)}delete(t){const e=this.map.delete(t);if(e){const e=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.key===t));this.itemMetadataSortedByExpirationTime.splice(e,1),0===e&&this.rescheduleClearTimeout()}return e}clear(){var t;this.map.clear(),null===(t=this.cancelClearTimeout)||void 0===t||t.call(this),this.itemMetadataSortedByExpirationTime=[]}addItemMetadata(t,e){for(let n=0;n<this.itemMetadataSortedByExpirationTime.length;n++){if(e<this.itemMetadataSortedByExpirationTime[n].expirationTime)return this.itemMetadataSortedByExpirationTime.splice(n,0,{key:t,expirationTime:e}),void(0===n&&this.rescheduleClearTimeout())}this.itemMetadataSortedByExpirationTime.push({key:t,expirationTime:e}),1===this.itemMetadataSortedByExpirationTime.length&&this.rescheduleClearTimeout()}removeItemMetadata(t){const e=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.key===t));e>=0&&(this.itemMetadataSortedByExpirationTime.splice(e,1),0===e&&this.rescheduleClearTimeout())}clearExpiredItems(t){const e=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.expirationTime>t));(e>=0?this.itemMetadataSortedByExpirationTime.splice(0,e):this.itemMetadataSortedByExpirationTime.splice(0,this.itemMetadataSortedByExpirationTime.length)).forEach((t=>this.map.delete(t.key)))}rescheduleClearTimeout(){var t;if(null===(t=this.cancelClearTimeout)||void 0===t||t.call(this),this.itemMetadataSortedByExpirationTime.length>0){const t=this.itemMetadataSortedByExpirationTime[0];if(Number.isFinite(t.expirationTime)){const e=Hl.setSchedule(t.expirationTime,(()=>{this.clearExpiredItems(Date.now()),this.rescheduleClearTimeout()}));this.cancelClearTimeout=()=>{e(),this.cancelClearTimeout=void 0}}}}}class hf{constructor(t){this.map=new Map,this.itemMetadataSortedByExpirationTime=[],Rt.assert(Number.isInteger(t),"The parameter limit must be an integer"),Rt.assert(t>0,"The parameter limit must be a positive value"),this.limit=t}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.map.size}set(t,e,n){return this.map.has(t)?(this.updateItem(t,e),this.removeItemMetadata(t),this.addItemMetadata(t,Date.now()+n)):(this.map.size===this.limit&&this.map.delete(this.getColdestKey()),this.map.set(t,e),this.addItemMetadata(t,Date.now()+n)),this}has(t){return this.map.has(t)}get(t){if(this.has(t)){const e=this.map.get(t);return this.updateItem(t,e),e}}delete(t){const e=this.map.delete(t);if(e){const e=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.key===t));this.itemMetadataSortedByExpirationTime.splice(e,1),0===e&&this.rescheduleClearTimeout()}return e}clear(){var t;this.map.clear(),null===(t=this.cancelClearTimeout)||void 0===t||t.call(this),this.itemMetadataSortedByExpirationTime=[]}updateItem(t,e){this.map.delete(t),this.map.set(t,e)}addItemMetadata(t,e){for(let n=0;n<this.itemMetadataSortedByExpirationTime.length;n++){if(e<this.itemMetadataSortedByExpirationTime[n].expirationTime)return this.itemMetadataSortedByExpirationTime.splice(n,0,{key:t,expirationTime:e}),void(0===n&&this.rescheduleClearTimeout())}this.itemMetadataSortedByExpirationTime.push({key:t,expirationTime:e}),1===this.itemMetadataSortedByExpirationTime.length&&this.rescheduleClearTimeout()}removeItemMetadata(t){const e=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.key===t));e>=0&&(this.itemMetadataSortedByExpirationTime.splice(e,1),0===e&&this.rescheduleClearTimeout())}clearExpiredItems(t){const e=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.expirationTime>t));(e>=0?this.itemMetadataSortedByExpirationTime.splice(0,e):this.itemMetadataSortedByExpirationTime.splice(0,this.itemMetadataSortedByExpirationTime.length)).forEach((t=>this.map.delete(t.key)))}rescheduleClearTimeout(){var t;if(null===(t=this.cancelClearTimeout)||void 0===t||t.call(this),this.itemMetadataSortedByExpirationTime.length>0){const t=this.itemMetadataSortedByExpirationTime[0];if(Number.isFinite(t.expirationTime)){const e=Hl.setSchedule(t.expirationTime,(()=>{this.clearExpiredItems(Date.now()),this.rescheduleClearTimeout()}));this.cancelClearTimeout=()=>{e(),this.cancelClearTimeout=void 0}}}}getColdestKey(){return hc.first(this.map.keys())}}class vf{constructor(t){this.value=t,this.children=new Map}}class pf{constructor(){this.root=new vf}get[Symbol.toStringTag](){return this.constructor.name}*entries(){yield*function*t(e,r){for(const[o,i]of e.children){const e=[...r,o];n.isntUndefined(i.value)&&(yield[e,i.value]),yield*t(i,e)}}(this.root,[])}keys(){return hc.map(this.entries(),(([t])=>t))}values(){return hc.map(this.entries(),(([t,e])=>e))}set(t,e){let n=this.root;for(const e of t)n.children.has(e)||n.children.set(e,new vf),n=n.children.get(e);return n.value=e,this}has(t){let e=this.root;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=this.root;for(const n of t){if(!e.children.has(n))return;e=e.children.get(n)}return e.value}delete(t){const e=[];let n=this.root;for(const r of t){if(!n.children.has(r))return!1;e.push(n),n=n.children.get(r)}if(delete n.value,0===n.children.size)for(const[n,r]of hc.toArray(hc.zip(t,e)).reverse())if(r.children.delete(n),0!==r.children.size)break;return!0}}class mf{constructor(t,e){this.schema=t,this._state=e}get[Symbol.toStringTag](){return this.constructor.name}get state(){return this._state}matches(t){return this._state===t}can(t){return t in this.schema[this.state]}send(t){if(!this.can(t))throw new bf(this.state,t);this._state=this.schema[this.state][t]}}class bf extends Rt.CustomError{constructor(t,e){super(`State ${t} cannot react to event ${e}`)}}
1
+ class t{constructor(t){this.value=t}get[Symbol.toStringTag](){return this.constructor.name}set(t){this.value=t}get(){return this.value}}var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n={},r={};function i(t){return Array.isArray(t)}r.isntEmptyArray=r.isEmptyArray=r.isntArray=r.isArray=void 0,r.isArray=i,r.isntArray=function(t){return!i(t)},r.isEmptyArray=function(t){return 0===t.length},r.isntEmptyArray=function(t){return 0!==t.length};var o={},a={};function s(t){return null===t}a.isntNull=a.isNull=void 0,a.isNull=s,a.isntNull=function(t){return!s(t)};var c={};function u(t){return void 0===t}c.isntUndefined=c.isUndefined=void 0,c.isUndefined=u,c.isntUndefined=function(t){return!u(t)};var l={};function f(t){return"function"==typeof t}l.isntFunction=l.isFunction=void 0,l.isFunction=f,l.isntFunction=function(t){return!f(t)},o.isntAsyncIterable=o.isAsyncIterable=void 0;const d=a,y=c,h=l;function v(t){return(0,d.isntNull)(t)&&(0,y.isntUndefined)(t)&&(0,h.isFunction)(t[Symbol.asyncIterator])}o.isAsyncIterable=v,o.isntAsyncIterable=function(t){return!v(t)};var p={};function m(t){return"bigint"==typeof t}p.isntBigInt=p.isBigInt=void 0,p.isBigInt=m,p.isntBigInt=function(t){return!m(t)};var b={};function g(t){return"boolean"==typeof t}b.isntBoolean=b.isBoolean=void 0,b.isBoolean=g,b.isntBoolean=function(t){return!g(t)};var w={},A={};function I(t){return"string"==typeof t}A.isntString=A.isString=void 0,A.isString=I,A.isntString=function(t){return!I(t)},w.isntChar=w.isChar=void 0;const S=A;function _(t){return(0,S.isString)(t)&&1===t.length}w.isChar=_,w.isntChar=function(t){return!_(t)};var x={};function T(t){return t instanceof Date}x.isntDate=x.isDate=void 0,x.isDate=T,x.isntDate=function(t){return!T(t)};var O={};O.inEnum=void 0,O.inEnum=function(t,e){return Object.values(e).includes(t)};var E={};function j(t){return t instanceof Error}E.isntError=E.isError=void 0,E.isError=j,E.isntError=function(t){return!j(t)};var N={};function k(t){return!t}N.isntFalsy=N.isFalsy=void 0,N.isFalsy=k,N.isntFalsy=function(t){return!k(t)};var B={};B.isntIterable=B.isIterable=void 0;const P=a,q=c,C=l;function M(t){return(0,P.isntNull)(t)&&(0,q.isntUndefined)(t)&&(0,C.isFunction)(t[Symbol.iterator])}B.isIterable=M,B.isntIterable=function(t){return!M(t)};var z={},R={};function F(t){return"number"==typeof t}function U(t){return Number.isNaN(t)}R.isntNaN=R.isNaN=R.isNegativeInfinity=R.isPositiveInfinity=R.isFinite=R.isntNumber=R.isNumber=void 0,R.isNumber=F,R.isntNumber=function(t){return!F(t)},R.isFinite=function(t){return Number.isFinite(t)},R.isPositiveInfinity=function(t){return t===1/0},R.isNegativeInfinity=function(t){return t===-1/0},R.isNaN=U,R.isntNaN=function(t){return!U(t)};var D={},J="object"==typeof e&&e&&e.Object===Object&&e,L="object"==typeof self&&self&&self.Object===Object&&self,V=(J||L||Function("return this")()).Symbol,W=V,K=Object.prototype,Y=K.hasOwnProperty,$=K.toString,H=W?W.toStringTag:void 0;var X=function(t){var e=Y.call(t,H),n=t[H];try{t[H]=void 0;var r=!0}catch(t){}var i=$.call(t);return r&&(e?t[H]=n:delete t[H]),i},G=Object.prototype.toString;var Q=X,Z=function(t){return G.call(t)},tt=V?V.toStringTag:void 0;var et=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":tt&&tt in Object(t)?Q(t):Z(t)};var nt=function(t,e){return function(n){return t(e(n))}}(Object.getPrototypeOf,Object);var rt=et,it=nt,ot=function(t){return null!=t&&"object"==typeof t},at=Function.prototype,st=Object.prototype,ct=at.toString,ut=st.hasOwnProperty,lt=ct.call(Object);var ft=function(t){if(!ot(t)||"[object Object]"!=rt(t))return!1;var e=it(t);if(null===e)return!0;var n=ut.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ct.call(n)==lt},dt=e&&e.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};D.isntEmptyObject=D.isEmptyObject=D.isntPlainObject=D.isPlainObject=D.isntObject=D.isObject=void 0;const yt=dt(ft);function ht(t){return null!==t&&"object"==typeof t}function vt(t){return(0,yt.default)(t)}D.isObject=ht,D.isntObject=function(t){return!ht(t)},D.isPlainObject=vt,D.isntPlainObject=function(t){return!vt(t)},D.isEmptyObject=function(t){return 0===Object.keys(t).length},D.isntEmptyObject=function(t){return 0!==Object.keys(t).length},z.isntJsonable=z.isJsonable=z.isntJson=z.isJson=void 0;const pt=a,mt=b,bt=A,gt=R,wt=r,At=D;function It(t){return(0,pt.isNull)(t)||(0,mt.isBoolean)(t)||(0,bt.isString)(t)||(0,gt.isNumber)(t)||(0,wt.isArray)(t)&&t.every(It)||(0,At.isPlainObject)(t)&&Object.values(t).every(It)}z.isJson=It,z.isntJson=function(t){return!It(t)},z.isJsonable=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},z.isntJsonable=function t(e){return!t()};var St={};St.isPromiseLike=St.isntPromiseLike=St.isntPromise=St.isPromise=void 0;const _t=D,xt=l;function Tt(t){return t instanceof Promise}function Ot(t){return(0,_t.isObject)(t)&&(0,xt.isFunction)(t.then)}St.isPromise=Tt,St.isntPromise=function(t){return!Tt(t)},St.isntPromiseLike=function(t){return!Ot(t)},St.isPromiseLike=Ot;var Et={};Et.isAbsoluteURL=void 0,Et.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}};var jt,Nt,kt,Bt={};function Pt(t){return t instanceof RegExp}function qt([t,e]){return n.isNull(e)?[t]:[t,...qt(e)]}function Ct([t,...e]){return[t,e.length?Ct(e):null]}Bt.isntRegExp=Bt.isRegExp=void 0,Bt.isRegExp=Pt,Bt.isntRegExp=function(t){return!Pt(t)},jt=n,Nt=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),(kt=e&&e.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||Nt(e,t,n)})(r,jt),kt(o,jt),kt(p,jt),kt(b,jt),kt(w,jt),kt(x,jt),kt(O,jt),kt(E,jt),kt(N,jt),kt(l,jt),kt(B,jt),kt(z,jt),kt(a,jt),kt(R,jt),kt(D,jt),kt(St,jt),kt(A,jt),kt(c,jt),kt(Et,jt),kt(Bt,jt);class Mt{constructor(){this.map=new Map}get[Symbol.toStringTag](){return this.constructor.name}on(t,e){this.map.has(t)||this.map.set(t,new Set);return this.map.get(t).add(n),()=>{if(!this.map.has(t))return;const e=this.map.get(t);e.delete(n),0===e.size&&this.map.delete(t)};function n(...t){e(...t)}}once(t,e){const n=this.on(t,((...t)=>{e(...t),n()}));return n}emit(t,...e){this.map.has(t)&&this.map.get(t).forEach((t=>t(...e)))}}class zt{constructor(t){this.hash=t,this.map=new Map}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.map.size}set(t,e){return this.map.set(this.hash(t),e),this}has(t){return this.map.has(this.hash(t))}get(t){return this.map.get(this.hash(t))}delete(t){return this.map.delete(this.hash(t))}clear(){this.map.clear()}}class Rt{constructor(t){this.hash=t,this.map=new Map}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.map.size}[Symbol.iterator](){return this.map.values()}add(t){return this.map.set(this.hash(t),t),this}delete(t){return this.map.delete(this.hash(t))}has(t){return this.map.has(this.hash(t))}clear(){this.map.clear()}values(){return this.map.values()}}class Ft{constructor(){this.items=[]}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.items.length}empty(){this.items.length=0}enqueue(...t){this.items.push(...t)}dequeue(){return this.items.shift()}remove(t){let e;for(;(e=this.items.indexOf(t))>=0;)this.items.splice(e,1)}}var Ut={},Dt={},Jt={},Lt={},Vt={},Wt={},Kt={};Kt.go=void 0,Kt.go=function(t){return t()},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]});(e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)})(Kt,t)}(Wt);var Yt={},$t={},Ht={},Xt={},Gt={},Qt={},Zt={CustomError:void 0};class te extends Error{get name(){return this.constructor.name}}Zt.CustomError=te;var ee={ExpectedError:void 0};const ne=Zt;class re extends ne.CustomError{}ee.ExpectedError=re;var ie={AssertionError:void 0};const oe=Zt;class ae extends oe.CustomError{}ie.AssertionError=ae;var se={};se.normalize=void 0,se.normalize=function(t){var e;return{name:t.name,message:t.message,stack:null!==(e=t.stack)&&void 0!==e?e:null}};var ce={refute:void 0};const ue=ee;ce.refute=function(t,e){if(t)throw new ue.ExpectedError(e)};var le={assert:void 0};const fe=ie;le.assert=function(t,e){if(!t)throw new fe.AssertionError(e)},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(Zt,t),r(ee,t),r(ie,t),r(se,t),r(ce,t),r(le,t)}(Qt),Gt.chunkAsync=void 0;const de=Wt,ye=Qt;Gt.chunkAsync=function(t,e){return(0,ye.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,ye.assert)(e>0,"The parameter size must be greater than 0"),(0,de.go)((async function*(){let n=[];for await(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var he={},ve={},pe={};function me(t){return Array.isArray(t)}pe.isntEmptyArray=pe.isEmptyArray=pe.isntArray=pe.isArray=void 0,pe.isArray=me,pe.isntArray=function(t){return!me(t)},pe.isEmptyArray=function(t){return 0===t.length},pe.isntEmptyArray=function(t){return 0!==t.length};var be={},ge={};function we(t){return null===t}ge.isntNull=ge.isNull=void 0,ge.isNull=we,ge.isntNull=function(t){return!we(t)};var Ae={};function Ie(t){return void 0===t}Ae.isntUndefined=Ae.isUndefined=void 0,Ae.isUndefined=Ie,Ae.isntUndefined=function(t){return!Ie(t)},be.isntAsyncIterable=be.isAsyncIterable=void 0;const Se=ge,_e=Ae;function xe(t){return(0,Se.isntNull)(t)&&(0,_e.isntUndefined)(t)&&"function"==typeof t[Symbol.asyncIterator]}be.isAsyncIterable=xe,be.isntAsyncIterable=function(t){return!xe(t)};var Te={};function Oe(t){return"bigint"==typeof t}Te.isntBigInt=Te.isBigInt=void 0,Te.isBigInt=Oe,Te.isntBigInt=function(t){return!Oe(t)};var Ee={};function je(t){return"boolean"==typeof t}Ee.isntBoolean=Ee.isBoolean=void 0,Ee.isBoolean=je,Ee.isntBoolean=function(t){return!je(t)};var Ne={},ke={};function Be(t){return"string"==typeof t}ke.isntString=ke.isString=void 0,ke.isString=Be,ke.isntString=function(t){return!Be(t)},Ne.isntChar=Ne.isChar=void 0;const Pe=ke;function qe(t){return(0,Pe.isString)(t)&&1===t.length}Ne.isChar=qe,Ne.isntChar=function(t){return!qe(t)};var Ce={};function Me(t){return t instanceof Date}Ce.isntDate=Ce.isDate=void 0,Ce.isDate=Me,Ce.isntDate=function(t){return!Me(t)};var ze={};ze.inEnum=void 0,ze.inEnum=function(t,e){return Object.values(e).includes(t)};var Re={};function Fe(t){return t instanceof Error}Re.isntError=Re.isError=void 0,Re.isError=Fe,Re.isntError=function(t){return!Fe(t)};var Ue={};function De(t){return!t}Ue.isntFalsy=Ue.isFalsy=void 0,Ue.isFalsy=De,Ue.isntFalsy=function(t){return!De(t)};var Je={};function Le(t){return"function"==typeof t}Je.isntFunction=Je.isFunction=void 0,Je.isFunction=Le,Je.isntFunction=function(t){return!Le(t)};var Ve={};Ve.isntIterable=Ve.isIterable=void 0;const We=ge,Ke=Ae;function Ye(t){return(0,We.isntNull)(t)&&(0,Ke.isntUndefined)(t)&&"function"==typeof t[Symbol.iterator]}Ve.isIterable=Ye,Ve.isntIterable=function(t){return!Ye(t)};var $e={},He={};var Xe=Function.prototype,Ge=Object.prototype,Qe=Xe.toString,Ze=Ge.hasOwnProperty,tn=Qe.call(Object),en=Ge.toString,nn=function(t,e){return function(n){return t(e(n))}}(Object.getPrototypeOf,Object);var rn=function(t){if(!function(t){return!!t&&"object"==typeof t}(t)||"[object Object]"!=en.call(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t))return!1;var e=nn(t);if(null===e)return!0;var n=Ze.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Qe.call(n)==tn},on=e&&e.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};He.isntEmptyObject=He.isEmptyObject=He.isntPlainObject=He.isPlainObject=He.isntObject=He.isObject=void 0;const an=on(rn);function sn(t){return null!==t&&"object"==typeof t}function cn(t){return(0,an.default)(t)}He.isObject=sn,He.isntObject=function(t){return!sn(t)},He.isPlainObject=cn,He.isntPlainObject=function(t){return!cn(t)},He.isEmptyObject=function(t){return 0===Object.keys(t).length},He.isntEmptyObject=function(t){return 0!==Object.keys(t).length};var un={};function ln(t){return"number"==typeof t}un.isntNumber=un.isNumber=void 0,un.isNumber=ln,un.isntNumber=function(t){return!ln(t)},$e.isntJsonRpcError=$e.isJsonRpcError=$e.isntJsonRpcSuccess=$e.isJsonRpcSuccess=$e.isntJsonRpcRequest=$e.isJsonRpcRequest=$e.isntJsonRpcNotification=$e.isJsonRpcNotification=void 0;const fn=pe,dn=He,yn=ke,hn=un,vn=Ae;function pn(t){return(0,yn.isString)(t)||(0,hn.isNumber)(t)}function mn(t){return(0,fn.isArray)(t)||(0,dn.isObject)(t)}function bn(t){return(0,dn.isPlainObject)(t)&&(0,yn.isString)(t.jsonrpc)&&(0,yn.isString)(t.method)&&(0,vn.isUndefined)(t.id)&&mn(t.params)}function gn(t){return(0,dn.isPlainObject)(t)&&(0,yn.isString)(t.jsonrpc)&&(0,yn.isString)(t.method)&&pn(t.id)&&mn(t.params)}function wn(t){return(0,dn.isPlainObject)(t)&&(0,yn.isString)(t.jsonrpc)&&(0,yn.isString)(t.id)&&"result"in t}function An(t){return(0,dn.isPlainObject)(t)&&(0,yn.isString)(t.jsonrpc)&&pn(t.id)&&function(t){return(0,dn.isPlainObject)(t)&&(0,hn.isNumber)(t.code)&&(0,yn.isString)(t.message)&&((0,vn.isUndefined)(t.data)||(0,dn.isObject)(t.data))}(t.error)}$e.isJsonRpcNotification=bn,$e.isntJsonRpcNotification=function(t){return!bn(t)},$e.isJsonRpcRequest=gn,$e.isntJsonRpcRequest=function(t){return!gn(t)},$e.isJsonRpcSuccess=wn,$e.isntJsonRpcSuccess=function(t){return!wn(t)},$e.isJsonRpcError=An,$e.isntJsonRpcError=function(t){return!An(t)};var In={};In.isntJson=In.isJson=void 0,In.isJson=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},In.isntJson=function t(e){return!t()};var Sn={};Sn.isAbsoluteURL=void 0,Sn.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(pe,t),r(be,t),r(Te,t),r(Ee,t),r(Ne,t),r(Ce,t),r(ze,t),r(Re,t),r(Ue,t),r(Je,t),r(Ve,t),r($e,t),r(In,t),r(ge,t),r(un,t),r(He,t),r(ke,t),r(Ae,t),r(Sn,t)}(ve),he.chunkByAsync=void 0;const _n=ve;he.chunkByAsync=function(t,e){return(0,_n.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const i of t)n.push(i),await e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t):async function*(t){let n=[],r=0;for(const i of t)n.push(i),await e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t)};var xn={};xn.chunkBy=void 0,xn.chunkBy=function*(t,e){let n=[],r=0;for(const i of t)n.push(i),e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)};var Tn={chunk:void 0};const On=Wt,En=Qt;Tn.chunk=function(t,e){return(0,En.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,En.assert)(e>0,"The parameter size must be greater than 0"),(0,On.go)((function*(){let n=[];for(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var jn={concatAsync:void 0};const Nn=ve,kn=Wt;jn.concatAsync=function(t,...e){return(0,kn.go)((async function*(){for(const n of[t,...e])if((0,Nn.isAsyncIterable)(n))for await(const t of n)yield t;else for(const t of n)yield t}))};var Bn={concat:void 0};const Pn=Wt;Bn.concat=function(t,...e){return(0,Pn.go)((function*(){for(const n of[t,...e])yield*n}))};var qn={},Cn={};Cn.copyIterable=Cn.copyAsyncIterable=void 0,Cn.copyAsyncIterable=async function*(t){for await(const e of t)yield e},Cn.copyIterable=function*(t){for(const e of t)yield e},qn.dropAsync=void 0;const Mn=Wt,zn=Cn,Rn=Qt;qn.dropAsync=function(t,e){return(0,Rn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Rn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,zn.copyAsyncIterable)(t):(0,Mn.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let i;try{let t;for(;!(({value:t,done:i}=await r.next()),i||e<=0);)e--;for(;!i;)yield t,({value:t,done:i}=await r.next())}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var Fn={dropRightAsync:void 0};const Un=Wt,Dn=Cn,Jn=Qt;Fn.dropRightAsync=function(t,e){return(0,Jn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Jn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Dn.copyAsyncIterable)(t):(0,Un.go)((async function*(){const n=(await async function(t){const e=[];for await(const n of t)e.push(n);return e}(t)).slice(0,-e);for(const t of n)yield t}))};var Ln={dropRight:void 0};const Vn=Wt,Wn=Cn,Kn=Qt;Ln.dropRight=function(t,e){return(0,Kn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Kn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Wn.copyIterable)(t):(0,Vn.go)((function*(){const n=Array.from(t);yield*n.slice(0,-e)}))};var Yn={dropUntilAsync:void 0};const $n=ve;Yn.dropUntilAsync=function(t,e){return(0,$n.isAsyncIterable)(t)?async function*(t){var n;const r=t[Symbol.asyncIterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=await r.next()),i||await e(t,o++)););for(;!i;)yield t,({value:t,done:i}=await r.next())}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}(t):async function*(t){var n;const r=t[Symbol.iterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=r.next()),i||await e(t,o++)););for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}(t)};var Hn={};Hn.dropUntil=void 0,Hn.dropUntil=function*(t,e){var n;const r=t[Symbol.iterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=r.next()),i||e(t,o++)););for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}};var Xn={drop:void 0};const Gn=Wt,Qn=Cn,Zn=Qt;Xn.drop=function(t,e){return(0,Zn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Zn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Qn.copyIterable)(t):(0,Gn.go)((function*(){var n;const r=t[Symbol.iterator]();let i;try{let t;for(;!(({value:t,done:i}=r.next()),i||e<=0);)e--;for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}))};var tr={filterAsync:void 0};const er=ve;tr.filterAsync=function(t,e){return(0,er.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n)&&(yield r),n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n)&&(yield r),n++}(t)};var nr={};nr.filter=void 0,nr.filter=function*(t,e){let n=0;for(const r of t)e(r,n)&&(yield r),n++};var rr={},ir={},or={flattenByAsync:void 0};const ar=ve;function sr(t){return(0,ar.isIterable)(t)&&(0,ar.isntChar)(t)}or.flattenByAsync=function(t,e){return(0,ar.isAsyncIterable)(t)?async function*(t){const r=1;for await(const i of t)sr(i)&&await e(i,r)?yield*n(i,r+1):yield i}(t):function(t){return n(t,1)}(t);async function*n(t,r){for(const i of t)sr(i)&&await e(i,r)?yield*n(i,r+1):yield i}},ir.flattenDeepAsync=void 0;const cr=or,ur=Qt;ir.flattenDeepAsync=function(t,e=1/0){return(0,ur.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,ur.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,cr.flattenByAsync)(t,((t,n)=>n<=e))},rr.flattenAsync=void 0;const lr=ir;rr.flattenAsync=function(t){return(0,lr.flattenDeepAsync)(t,1)};var fr={flattenBy:void 0};const dr=ve;fr.flattenBy=function(t,e){return function*t(n,r){for(const o of n)(0,dr.isIterable)(i=o)&&(0,dr.isntChar)(i)&&e(o,r)?yield*t(o,r+1):yield o;var i}(t,1)};var yr={flattenDeep:void 0};const hr=fr,vr=Qt;yr.flattenDeep=function(t,e=1/0){return(0,vr.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,vr.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,hr.flattenBy)(t,((t,n)=>n<=e))};var pr={flatten:void 0};const mr=yr;pr.flatten=function(t){return(0,mr.flattenDeep)(t,1)};var br={mapAsync:void 0};const gr=ve;br.mapAsync=function(t,e){return(0,gr.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)yield await e(r,n),n++}(t):async function*(t){let n=0;for(const r of t)yield await e(r,n),n++}(t)};var wr={};wr.map=void 0,wr.map=function*(t,e){let n=0;for(const r of t)yield e(r,n),n++};var Ar={repeatAsync:void 0};const Ir=Wt,Sr=Qt;Ar.repeatAsync=function(t,e){return(0,Sr.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,Sr.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,Ir.go)((async function*(){const n=[];if(e>0){for await(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var _r={repeat:void 0};const xr=Wt,Tr=Qt;_r.repeat=function(t,e){return(0,Tr.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,Tr.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,xr.go)((function*(){const n=[];if(e>0){for(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var Or={sliceAsync:void 0};const Er=Wt,jr=Qt;Or.sliceAsync=function(t,e,n=1/0){return(0,jr.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,jr.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,jr.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,jr.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,Er.go)((async function*(){let r=0;for await(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var Nr={slice:void 0};const kr=Wt,Br=Qt;Nr.slice=function(t,e,n=1/0){return(0,Br.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,Br.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,Br.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Br.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,kr.go)((function*(){let r=0;for(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var Pr={};Pr.splitAsync=void 0,Pr.splitAsync=async function*(t,e){let n=[];for await(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var qr={splitByAsync:void 0};const Cr=ve;qr.splitByAsync=function(t,e){return(0,Cr.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const i of t)await e(i,r)?(yield n,n=[]):n.push(i),r++;yield n}(t):async function*(t){let n=[],r=0;for(const i of t)await e(i,r)?(yield n,n=[]):n.push(i),r++;yield n}(t)};var Mr={};Mr.splitBy=void 0,Mr.splitBy=function*(t,e){let n=[],r=0;for(const i of t)e(i,r)?(yield n,n=[]):n.push(i),r++;yield n};var zr={};zr.split=void 0,zr.split=function*(t,e){let n=[];for(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Rr={takeAsync:void 0};const Fr=Wt,Ur=Qt;Rr.takeAsync=function(t,e){return(0,Ur.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Ur.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Fr.go)((async function*(){if(0!==e)for await(const n of t)if(yield n,0===--e)break}))};var Dr={takeRightAsync:void 0};const Jr=Wt,Lr=Qt;Dr.takeRightAsync=function(t,e){return(0,Lr.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Lr.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Jr.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let i;try{const t=[];let o;for(;({value:o,done:i}=await r.next()),!i;)t.push(o),t.length>e&&t.shift();yield*t}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var Vr={takeRight:void 0};const Wr=Wt,Kr=Qt;Vr.takeRight=function(t,e){return(0,Kr.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Kr.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Wr.go)((function*(){var n;const r=t[Symbol.iterator]();let i;try{const t=[];let o;for(;({value:o,done:i}=r.next()),!i;)t.push(o),t.length>e&&t.shift();yield*t}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}))};var Yr={takeUntilAsync:void 0};const $r=ve;Yr.takeUntilAsync=function(t,e){return(0,$r.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t){if(await e(r,n))break;yield r,n++}}(t):async function*(t){let n=0;for(const r of t){if(await e(r,n))break;yield r,n++}}(t)};var Hr={};Hr.takeUntil=void 0,Hr.takeUntil=function*(t,e){let n=0;for(const r of t){if(e(r,n))break;yield r,n++}};var Xr={take:void 0};const Gr=Wt,Qr=Qt;Xr.take=function(t,e){return(0,Qr.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Qr.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Gr.go)((function*(){if(0!==e)for(const n of t)if(yield n,0===--e)break}))};var Zr={tapAsync:void 0};const ti=ve;Zr.tapAsync=function(t,e){return(0,ti.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n),yield r,n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n),yield r,n++}(t)};var ei={};ei.tap=void 0,ei.tap=function*(t,e){let n=0;for(const r of t)e(r,n),yield r,n++};var ni={};ni.toAsyncIterable=void 0,ni.toAsyncIterable=async function*(t){for(const e of t)yield e};var ri={};ri.transformAsync=void 0,ri.transformAsync=async function*(t,e){yield*e(t)};var ii={};ii.transform=void 0,ii.transform=function*(t,e){yield*e(t)};var oi={};oi.uniqAsync=void 0,oi.uniqAsync=async function*(t){const e=new Set;for await(const n of t)e.has(n)||(yield n,e.add(n))};var ai={uniqByAsync:void 0};const si=ve;ai.uniqByAsync=function(t,e){return(0,si.isAsyncIterable)(t)?async function*(t){const n=new Set;let r=0;for await(const i of t){const t=await e(i,r);n.has(t)||(yield i,n.add(t)),r++}}(t):async function*(t){const n=new Set;let r=0;for(const i of t){const t=await e(i,r);n.has(t)||(yield i,n.add(t)),r++}}(t)};var ci={};ci.uniqBy=void 0,ci.uniqBy=function*(t,e){const n=new Set;let r=0;for(const i of t){const t=e(i,r);n.has(t)||(yield i,n.add(t)),r++}};var ui={};ui.uniq=void 0,ui.uniq=function*(t){const e=new Set;for(const n of t)e.has(n)||(yield n,e.add(n))};var li={zipAsync:void 0};const fi=ve;var di;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(di||(di={})),li.zipAsync=function(t,...e){return async function*(...t){var e,n,r,i;const o=t.length,a=t.map((t=>(0,fi.isAsyncIterable)(t)?[di.Async,t[Symbol.asyncIterator]()]:[di.Sync,t[Symbol.iterator]()])),s=a.map((()=>!1));try{for(;;){const t=new Array(o);for(let e=0;e<o;e++){const[n,r]=a[e];let i;if(i=n===di.Async?await r.next():r.next(),i.done)return void(s[e]=!0);t[e]=i.value}yield t}}finally{const t=a.filter(((t,e)=>!s[e]));for(const[o,a]of t)o===di.Async?await(null===(n=(e=a).return)||void 0===n?void 0:n.call(e)):null===(i=(r=a).return)||void 0===i||i.call(r)}}(t,...e)};var yi={};yi.zip=void 0,yi.zip=function(t,...e){return function*(...t){const e=t.length,n=t.map((t=>t[Symbol.iterator]())),r=n.map((()=>!1));try{for(;;){const t=new Array(e);for(let i=0;i<e;i++){const{value:e,done:o}=n[i].next();if(o)return void(r[i]=!0);t[i]=e}yield t}}finally{n.filter(((t,e)=>!r[e])).forEach((t=>{var e;return null===(e=t.return)||void 0===e?void 0:e.call(t)}))}}(t,...e)},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(Gt,t),r(he,t),r(xn,t),r(Tn,t),r(jn,t),r(Bn,t),r(qn,t),r(Fn,t),r(Ln,t),r(Yn,t),r(Hn,t),r(Xn,t),r(tr,t),r(nr,t),r(rr,t),r(or,t),r(fr,t),r(ir,t),r(yr,t),r(pr,t),r(br,t),r(wr,t),r(Ar,t),r(_r,t),r(Or,t),r(Nr,t),r(Pr,t),r(qr,t),r(Mr,t),r(zr,t),r(Rr,t),r(Dr,t),r(Vr,t),r(Yr,t),r(Hr,t),r(Xr,t),r(Zr,t),r(ei,t),r(ni,t),r(ri,t),r(ii,t),r(oi,t),r(ai,t),r(ci,t),r(ui,t),r(li,t),r(yi,t)}(Xt);var hi={},vi={};vi.consume=void 0,vi.consume=function(t,e){return e(t)};var pi={eachAsync:void 0};const mi=ve;pi.eachAsync=function(t,e){return(0,mi.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t)await e(r,n),n++}(t):async function(t){let n=0;for(const r of t)await e(r,n),n++}(t)};var bi={};bi.each=void 0,bi.each=function(t,e){let n=0;for(const r of t)e(r,n),n++};var gi={everyAsync:void 0};const wi=ve;gi.everyAsync=function(t,e){return(0,wi.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(!await e(r,n))return!1;n++}return!0}(t):async function(t){let n=0;for(const r of t){if(!await e(r,n))return!1;n++}return!0}(t)};var Ai={};Ai.every=void 0,Ai.every=function(t,e){let n=0;for(const r of t){if(!e(r,n))return!1;n++}return!0};var Ii={findAsync:void 0};const Si=ve;Ii.findAsync=function(t,e){return(0,Si.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return r;n++}return}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return r;n++}return}(t)};var _i={};_i.find=void 0,_i.find=function(t,e){let n=0;for(const r of t){if(e(r,n))return r;n++}};var xi={};xi.firstAsync=void 0,xi.firstAsync=async function(t){for await(const e of t)return e};var Ti={};Ti.first=void 0,Ti.first=function(t){for(const e of t)return e};var Oi={};Oi.includesAsync=void 0,Oi.includesAsync=async function(t,e){for await(const n of t)if(n===e)return!0;return!1};var Ei={};Ei.includes=void 0,Ei.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1};var ji={};ji.matchAsync=void 0,ji.matchAsync=async function(t,e){const n=e.length;let r=0;for await(const i of t)if(i===e[r]&&r++,r===n)return!0;return!1};var Ni={};Ni.match=void 0,Ni.match=function(t,e){const n=e.length;let r=0;for(const i of t)if(i===e[r]&&r++,r===n)return!0;return!1};var ki={reduceAsync:void 0};const Bi=ve;ki.reduceAsync=function(t,e,n){return(0,Bi.isUndefined)(n)?function(t,e){return(0,Bi.isAsyncIterable)(t)?n(t):r(t);async function n(t){var n;const r=t[Symbol.asyncIterator]();let i;try{let t,a=await o(r),s=1;for(;({value:t,done:i}=await r.next()),!i;)a=await e(a,t,s++);return a}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}async function o(t){const e=await t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}async function r(t){var n;const r=t[Symbol.iterator]();let i;try{let t,a=o(r),s=1;for(;({value:t,done:i}=r.next()),!i;)a=await e(a,t,s++);return a}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}}(t,e):function(t,e,n){return(0,Bi.isAsyncIterable)(t)?i(t):r(t);async function r(t){let r=n,i=0;for(const n of t)r=await e(r,n,i++);return r}async function i(t){let r=n,i=0;for await(const n of t)r=await e(r,n,i++);return r}}(t,e,n)};var Pi={reduce:void 0};const qi=ve;Pi.reduce=function(t,e,n){return(0,qi.isUndefined)(n)?function(t,e){var n;const r=t[Symbol.iterator]();let i;try{let t,a=o(r),s=1;for(;({value:t,done:i}=r.next()),!i;)a=e(a,t,s++);return a}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}(t,e):function(t,e,n){let r=n,i=0;for(const n of t)r=e(r,n,i++);return r}(t,e,n)};var Ci={someAsync:void 0};const Mi=ve;Ci.someAsync=function(t,e){return(0,Mi.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return!0;n++}return!1}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return!0;n++}return!1}(t)};var zi={};zi.some=void 0,zi.some=function(t,e){let n=0;for(const r of t){if(e(r,n))return!0;n++}return!1};var Ri={};Ri.lastAsync=void 0,Ri.lastAsync=async function(t){var e;const n=t[Symbol.asyncIterator]();let r;try{let t,i;for(;({value:t,done:r}=await n.next()),!r;)i=t;return i}finally{r||await(null===(e=n.return)||void 0===e?void 0:e.call(n))}};var Fi={};Fi.last=void 0,Fi.last=function(t){var e;const n=t[Symbol.iterator]();let r;try{let t,i;for(;({value:t,done:r}=n.next()),!r;)i=t;return i}finally{r||null===(e=n.return)||void 0===e||e.call(n)}};var Ui={toArrayAsync:void 0};const Di=vi;Ui.toArrayAsync=function(t){return(0,Di.consume)(t,(async t=>{const e=[];for await(const n of t)e.push(n);return e}))};var Ji={toArray:void 0};const Li=vi;Ji.toArray=function(t){return(0,Li.consume)(t,(t=>Array.from(t)))};var Vi={toSetAsync:void 0};const Wi=vi;Vi.toSetAsync=function(t){return(0,Wi.consume)(t,(async t=>{const e=new Set;for await(const n of t)e.add(n);return e}))};var Ki={toSet:void 0};const Yi=vi;Ki.toSet=function(t){return(0,Yi.consume)(t,(t=>new Set(t)))},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(vi,t),r(pi,t),r(bi,t),r(gi,t),r(Ai,t),r(Ii,t),r(_i,t),r(xi,t),r(Ti,t),r(Oi,t),r(Ei,t),r(ji,t),r(Ni,t),r(ki,t),r(Pi,t),r(Ci,t),r(zi,t),r(Ri,t),r(Fi,t),r(Ui,t),r(Ji,t),r(Vi,t),r(Ki,t)}(hi),function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(Xt,t),r(hi,t)}(Ht);var $i={},Hi={};Hi.traverseErrorPrototypeChain=void 0,Hi.traverseErrorPrototypeChain=function*(t){let e=t;for(;(e=Object.getPrototypeOf(e))&&(yield e,e!==Error.prototype););},$i.getErrorNames=void 0;const Xi=ve,Gi=Hi;$i.getErrorNames=function*(t){var e;if((0,Xi.isError)(t))for(const n of(0,Gi.traverseErrorPrototypeChain)(t))(null===(e=n.constructor)||void 0===e?void 0:e.name)&&(yield n.constructor.name);else yield t.name,yield*t.ancestors};var Qi={isSerializableError:void 0};const Zi=ve;Qi.isSerializableError=function(t){return(0,Zi.isObject)(t)&&(0,Zi.isString)(t.name)&&(0,Zi.isString)(t.message)&&((0,Zi.isString)(t.stack)||(0,Zi.isNull)(t.stack))&&(0,Zi.isArray)(t.ancestors)&&t.ancestors.every(Zi.isString)},$t.CustomError=void 0;const to=Ht,eo=$i,no=ve,ro=Qi;class io extends Error{get name(){var t,e;return null!==(e=null!==(t=(0,to.first)((0,eo.getErrorNames)(this)))&&void 0!==t?t:io.name)&&void 0!==e?e:"CustomError"}static[Symbol.hasInstance](t){var e;if((0,no.isError)(t)||(0,ro.isSerializableError)(t)){const n=[null!==(e=this.prototype.constructor.name)&&void 0!==e?e:this.name,...(0,eo.getErrorNames)(this.prototype)].reverse(),r=(0,to.toArray)((0,eo.getErrorNames)(t)).reverse();return n.every(((t,e)=>t===r[e]))}return!1}}$t.CustomError=io;var oo={AssertionError:void 0};const ao=$t;class so extends ao.CustomError{}oo.AssertionError=so;var co={normalize:void 0};const uo=$i,lo=Ht;co.normalize=function(t){var e;const[n,...r]=(0,lo.toArray)((0,uo.getErrorNames)(t));return{name:n,ancestors:r,message:t.message,stack:null!==(e=t.stack)&&void 0!==e?e:null}};var fo={},yo={},ho={};ho.pass=void 0,ho.pass=function(){},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]});(e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)})(ho,t)}(yo),fo.hydrate=void 0;const vo=yo;function po(t,e){const n=function(){(0,vo.pass)()};return(n.prototype=Object.create(t.prototype)).constructor=n,Object.defineProperty(n,"name",{value:e}),n}fo.hydrate=function(t){var e;const n=[t.name,...t.ancestors].slice(0,-1).reverse();let r=Error;for(const t of n)r=po(r,t);const i=new r;return i.name=t.name,i.message=t.message,i.stack=null!==(e=t.stack)&&void 0!==e?e:void 0,i};var mo={assert:void 0};const bo=oo;mo.assert=function(t,e){if(!t)throw new bo.AssertionError(e)},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r($t,t),r(oo,t),r(Qi,t),r(co,t),r(fo,t),r(mo,t),r($i,t),r(Hi,t)}(Yt),Vt.chunkAsync=void 0;const go=Wt,wo=Yt;Vt.chunkAsync=function(t,e){return(0,wo.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,wo.assert)(e>0,"The parameter size must be greater than 0"),(0,go.go)((async function*(){let n=[];for await(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var Ao={chunkByAsync:void 0};const Io=ve;Ao.chunkByAsync=function(t,e){return(0,Io.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const i of t)n.push(i),await e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t):async function*(t){let n=[],r=0;for(const i of t)n.push(i),await e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t)};var So={};So.chunkBy=void 0,So.chunkBy=function*(t,e){let n=[],r=0;for(const i of t)n.push(i),e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)};var _o={chunk:void 0};const xo=Wt,To=Yt;_o.chunk=function(t,e){return(0,To.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,To.assert)(e>0,"The parameter size must be greater than 0"),(0,xo.go)((function*(){let n=[];for(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var Oo={concatAsync:void 0};const Eo=ve,jo=Wt;Oo.concatAsync=function(t,...e){return(0,jo.go)((async function*(){for(const n of[t,...e])if((0,Eo.isAsyncIterable)(n))for await(const t of n)yield t;else for(const t of n)yield t}))};var No={concat:void 0};const ko=Wt;No.concat=function(t,...e){return(0,ko.go)((function*(){for(const n of[t,...e])yield*n}))};var Bo={},Po={};Po.copyIterable=Po.copyAsyncIterable=void 0,Po.copyAsyncIterable=async function*(t){for await(const e of t)yield e},Po.copyIterable=function*(t){for(const e of t)yield e},Bo.dropAsync=void 0;const qo=Wt,Co=Po,Mo=Yt;Bo.dropAsync=function(t,e){return(0,Mo.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Mo.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Co.copyAsyncIterable)(t):(0,qo.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let i;try{let t;for(;!(({value:t,done:i}=await r.next()),i||e<=0);)e--;for(;!i;)yield t,({value:t,done:i}=await r.next())}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var zo={dropRightAsync:void 0};const Ro=Wt,Fo=Po,Uo=Yt;zo.dropRightAsync=function(t,e){return(0,Uo.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Uo.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Fo.copyAsyncIterable)(t):(0,Ro.go)((async function*(){const n=(await async function(t){const e=[];for await(const n of t)e.push(n);return e}(t)).slice(0,-e);for(const t of n)yield t}))};var Do={dropRight:void 0};const Jo=Wt,Lo=Po,Vo=Yt;Do.dropRight=function(t,e){return(0,Vo.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Vo.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Lo.copyIterable)(t):(0,Jo.go)((function*(){const n=Array.from(t);yield*n.slice(0,-e)}))};var Wo={dropUntilAsync:void 0};const Ko=ve;Wo.dropUntilAsync=function(t,e){return(0,Ko.isAsyncIterable)(t)?async function*(t){var n;const r=t[Symbol.asyncIterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=await r.next()),i||await e(t,o++)););for(;!i;)yield t,({value:t,done:i}=await r.next())}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}(t):async function*(t){var n;const r=t[Symbol.iterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=r.next()),i||await e(t,o++)););for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}(t)};var Yo={};Yo.dropUntil=void 0,Yo.dropUntil=function*(t,e){var n;const r=t[Symbol.iterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=r.next()),i||e(t,o++)););for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}};var $o={drop:void 0};const Ho=Wt,Xo=Po,Go=Yt;$o.drop=function(t,e){return(0,Go.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Go.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Xo.copyIterable)(t):(0,Ho.go)((function*(){var n;const r=t[Symbol.iterator]();let i;try{let t;for(;!(({value:t,done:i}=r.next()),i||e<=0);)e--;for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}))};var Qo={filterAsync:void 0};const Zo=ve;Qo.filterAsync=function(t,e){return(0,Zo.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n)&&(yield r),n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n)&&(yield r),n++}(t)};var ta={};ta.filter=void 0,ta.filter=function*(t,e){let n=0;for(const r of t)e(r,n)&&(yield r),n++};var ea={},na={},ra={flattenByAsync:void 0};const ia=ve;function oa(t){return(0,ia.isIterable)(t)&&(0,ia.isntChar)(t)}ra.flattenByAsync=function(t,e){return(0,ia.isAsyncIterable)(t)?async function*(t){const r=1;for await(const i of t)oa(i)&&await e(i,r)?yield*n(i,r+1):yield i}(t):function(t){return n(t,1)}(t);async function*n(t,r){for(const i of t)oa(i)&&await e(i,r)?yield*n(i,r+1):yield i}},na.flattenDeepAsync=void 0;const aa=ra,sa=Yt;na.flattenDeepAsync=function(t,e=1/0){return(0,sa.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,sa.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,aa.flattenByAsync)(t,((t,n)=>n<=e))},ea.flattenAsync=void 0;const ca=na;ea.flattenAsync=function(t){return(0,ca.flattenDeepAsync)(t,1)};var ua={flattenBy:void 0};const la=ve;ua.flattenBy=function(t,e){return function*t(n,r){for(const o of n)(0,la.isIterable)(i=o)&&(0,la.isntChar)(i)&&e(o,r)?yield*t(o,r+1):yield o;var i}(t,1)};var fa={flattenDeep:void 0};const da=ua,ya=Yt;fa.flattenDeep=function(t,e=1/0){return(0,ya.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,ya.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,da.flattenBy)(t,((t,n)=>n<=e))};var ha={flatten:void 0};const va=fa;ha.flatten=function(t){return(0,va.flattenDeep)(t,1)};var pa={mapAsync:void 0};const ma=ve;pa.mapAsync=function(t,e){return(0,ma.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)yield await e(r,n),n++}(t):async function*(t){let n=0;for(const r of t)yield await e(r,n),n++}(t)};var ba={};ba.map=void 0,ba.map=function*(t,e){let n=0;for(const r of t)yield e(r,n),n++};var ga={repeatAsync:void 0};const wa=Wt,Aa=Yt;ga.repeatAsync=function(t,e){return(0,Aa.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,Aa.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,wa.go)((async function*(){const n=[];if(e>0){for await(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var Ia={repeat:void 0};const Sa=Wt,_a=Yt;Ia.repeat=function(t,e){return(0,_a.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,_a.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,Sa.go)((function*(){const n=[];if(e>0){for(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var xa={sliceAsync:void 0};const Ta=Wt,Oa=Yt;xa.sliceAsync=function(t,e,n=1/0){return(0,Oa.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,Oa.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,Oa.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Oa.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,Ta.go)((async function*(){let r=0;for await(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var Ea={slice:void 0};const ja=Wt,Na=Yt;Ea.slice=function(t,e,n=1/0){return(0,Na.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,Na.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,Na.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Na.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,ja.go)((function*(){let r=0;for(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var ka={};ka.splitAsync=void 0,ka.splitAsync=async function*(t,e){let n=[];for await(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Ba={splitByAsync:void 0};const Pa=ve;Ba.splitByAsync=function(t,e){return(0,Pa.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const i of t)await e(i,r)?(yield n,n=[]):n.push(i),r++;yield n}(t):async function*(t){let n=[],r=0;for(const i of t)await e(i,r)?(yield n,n=[]):n.push(i),r++;yield n}(t)};var qa={};qa.splitBy=void 0,qa.splitBy=function*(t,e){let n=[],r=0;for(const i of t)e(i,r)?(yield n,n=[]):n.push(i),r++;yield n};var Ca={};Ca.split=void 0,Ca.split=function*(t,e){let n=[];for(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Ma={takeAsync:void 0};const za=Wt,Ra=Yt;Ma.takeAsync=function(t,e){return(0,Ra.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Ra.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,za.go)((async function*(){if(0!==e)for await(const n of t)if(yield n,0===--e)break}))};var Fa={takeRightAsync:void 0};const Ua=Wt,Da=Yt;Fa.takeRightAsync=function(t,e){return(0,Da.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Da.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Ua.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let i;try{const t=[];let o;for(;({value:o,done:i}=await r.next()),!i;)t.push(o),t.length>e&&t.shift();yield*t}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var Ja={takeRight:void 0};const La=Wt,Va=Yt;Ja.takeRight=function(t,e){return(0,Va.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Va.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,La.go)((function*(){var n;const r=t[Symbol.iterator]();let i;try{const t=[];let o;for(;({value:o,done:i}=r.next()),!i;)t.push(o),t.length>e&&t.shift();yield*t}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}))};var Wa={takeUntilAsync:void 0};const Ka=ve;Wa.takeUntilAsync=function(t,e){return(0,Ka.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t){if(await e(r,n))break;yield r,n++}}(t):async function*(t){let n=0;for(const r of t){if(await e(r,n))break;yield r,n++}}(t)};var Ya={};Ya.takeUntil=void 0,Ya.takeUntil=function*(t,e){let n=0;for(const r of t){if(e(r,n))break;yield r,n++}};var $a={take:void 0};const Ha=Wt,Xa=Yt;$a.take=function(t,e){return(0,Xa.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Xa.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Ha.go)((function*(){if(0!==e)for(const n of t)if(yield n,0===--e)break}))};var Ga={tapAsync:void 0};const Qa=ve;Ga.tapAsync=function(t,e){return(0,Qa.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n),yield r,n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n),yield r,n++}(t)};var Za={};Za.tap=void 0,Za.tap=function*(t,e){let n=0;for(const r of t)e(r,n),yield r,n++};var ts={};ts.toAsyncIterable=void 0,ts.toAsyncIterable=async function*(t){for(const e of t)yield e};var es={};es.transformAsync=void 0,es.transformAsync=async function*(t,e){yield*e(t)};var ns={};ns.transform=void 0,ns.transform=function*(t,e){yield*e(t)};var rs={};rs.uniqAsync=void 0,rs.uniqAsync=async function*(t){const e=new Set;for await(const n of t)e.has(n)||(yield n,e.add(n))};var is={uniqByAsync:void 0};const os=ve;is.uniqByAsync=function(t,e){return(0,os.isAsyncIterable)(t)?async function*(t){const n=new Set;let r=0;for await(const i of t){const t=await e(i,r);n.has(t)||(yield i,n.add(t)),r++}}(t):async function*(t){const n=new Set;let r=0;for(const i of t){const t=await e(i,r);n.has(t)||(yield i,n.add(t)),r++}}(t)};var as={};as.uniqBy=void 0,as.uniqBy=function*(t,e){const n=new Set;let r=0;for(const i of t){const t=e(i,r);n.has(t)||(yield i,n.add(t)),r++}};var ss={};ss.uniq=void 0,ss.uniq=function*(t){const e=new Set;for(const n of t)e.has(n)||(yield n,e.add(n))};var cs={zipAsync:void 0};const us=ve;var ls;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(ls||(ls={})),cs.zipAsync=function(t,...e){return async function*(...t){var e,n,r,i;const o=t.length,a=t.map((t=>(0,us.isAsyncIterable)(t)?[ls.Async,t[Symbol.asyncIterator]()]:[ls.Sync,t[Symbol.iterator]()])),s=a.map((()=>!1));try{for(;;){const t=new Array(o);for(let e=0;e<o;e++){const[n,r]=a[e];let i;if(i=n===ls.Async?await r.next():r.next(),i.done)return void(s[e]=!0);t[e]=i.value}yield t}}finally{const t=a.filter(((t,e)=>!s[e]));for(const[o,a]of t)o===ls.Async?await(null===(n=(e=a).return)||void 0===n?void 0:n.call(e)):null===(i=(r=a).return)||void 0===i||i.call(r)}}(t,...e)};var fs={};fs.zip=void 0,fs.zip=function(t,...e){return function*(...t){const e=t.length,n=t.map((t=>t[Symbol.iterator]())),r=n.map((()=>!1));try{for(;;){const t=new Array(e);for(let i=0;i<e;i++){const{value:e,done:o}=n[i].next();if(o)return void(r[i]=!0);t[i]=e}yield t}}finally{n.filter(((t,e)=>!r[e])).forEach((t=>{var e;return null===(e=t.return)||void 0===e?void 0:e.call(t)}))}}(t,...e)},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(Vt,t),r(Ao,t),r(So,t),r(_o,t),r(Oo,t),r(No,t),r(Bo,t),r(zo,t),r(Do,t),r(Wo,t),r(Yo,t),r($o,t),r(Qo,t),r(ta,t),r(ea,t),r(ra,t),r(ua,t),r(na,t),r(fa,t),r(ha,t),r(pa,t),r(ba,t),r(ga,t),r(Ia,t),r(xa,t),r(Ea,t),r(ka,t),r(Ba,t),r(qa,t),r(Ca,t),r(Ma,t),r(Fa,t),r(Ja,t),r(Wa,t),r(Ya,t),r($a,t),r(Ga,t),r(Za,t),r(ts,t),r(es,t),r(ns,t),r(rs,t),r(is,t),r(as,t),r(ss,t),r(cs,t),r(fs,t)}(Lt);var ds={},ys={};ys.consume=void 0,ys.consume=function(t,e){return e(t)};var hs={eachAsync:void 0};const vs=ve;hs.eachAsync=function(t,e){return(0,vs.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t)await e(r,n),n++}(t):async function(t){let n=0;for(const r of t)await e(r,n),n++}(t)};var ps={};ps.each=void 0,ps.each=function(t,e){let n=0;for(const r of t)e(r,n),n++};var ms={everyAsync:void 0};const bs=ve;ms.everyAsync=function(t,e){return(0,bs.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(!await e(r,n))return!1;n++}return!0}(t):async function(t){let n=0;for(const r of t){if(!await e(r,n))return!1;n++}return!0}(t)};var gs={};gs.every=void 0,gs.every=function(t,e){let n=0;for(const r of t){if(!e(r,n))return!1;n++}return!0};var ws={findAsync:void 0};const As=ve;ws.findAsync=function(t,e){return(0,As.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return r;n++}return}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return r;n++}return}(t)};var Is={};Is.find=void 0,Is.find=function(t,e){let n=0;for(const r of t){if(e(r,n))return r;n++}};var Ss={};Ss.firstAsync=void 0,Ss.firstAsync=async function(t){for await(const e of t)return e};var _s={};_s.first=void 0,_s.first=function(t){for(const e of t)return e};var xs={};xs.includesAsync=void 0,xs.includesAsync=async function(t,e){for await(const n of t)if(n===e)return!0;return!1};var Ts={};Ts.includes=void 0,Ts.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1};var Os={};Os.matchAsync=void 0,Os.matchAsync=async function(t,e){const n=e.length;let r=0;for await(const i of t)if(i===e[r]&&r++,r===n)return!0;return!1};var Es={};Es.match=void 0,Es.match=function(t,e){const n=e.length;let r=0;for(const i of t)if(i===e[r]&&r++,r===n)return!0;return!1};var js={reduceAsync:void 0};const Ns=ve;js.reduceAsync=function(t,e,n){return(0,Ns.isUndefined)(n)?function(t,e){return(0,Ns.isAsyncIterable)(t)?n(t):r(t);async function n(t){var n;const r=t[Symbol.asyncIterator]();let i;try{let t,a=await o(r),s=1;for(;({value:t,done:i}=await r.next()),!i;)a=await e(a,t,s++);return a}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}async function o(t){const e=await t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}async function r(t){var n;const r=t[Symbol.iterator]();let i;try{let t,a=o(r),s=1;for(;({value:t,done:i}=r.next()),!i;)a=await e(a,t,s++);return a}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}}(t,e):function(t,e,n){return(0,Ns.isAsyncIterable)(t)?i(t):r(t);async function r(t){let r=n,i=0;for(const n of t)r=await e(r,n,i++);return r}async function i(t){let r=n,i=0;for await(const n of t)r=await e(r,n,i++);return r}}(t,e,n)};var ks={reduce:void 0};const Bs=ve;ks.reduce=function(t,e,n){return(0,Bs.isUndefined)(n)?function(t,e){var n;const r=t[Symbol.iterator]();let i;try{let t,a=o(r),s=1;for(;({value:t,done:i}=r.next()),!i;)a=e(a,t,s++);return a}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}(t,e):function(t,e,n){let r=n,i=0;for(const n of t)r=e(r,n,i++);return r}(t,e,n)};var Ps={someAsync:void 0};const qs=ve;Ps.someAsync=function(t,e){return(0,qs.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return!0;n++}return!1}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return!0;n++}return!1}(t)};var Cs={};Cs.some=void 0,Cs.some=function(t,e){let n=0;for(const r of t){if(e(r,n))return!0;n++}return!1};var Ms={};Ms.lastAsync=void 0,Ms.lastAsync=async function(t){var e;const n=t[Symbol.asyncIterator]();let r;try{let t,i;for(;({value:t,done:r}=await n.next()),!r;)i=t;return i}finally{r||await(null===(e=n.return)||void 0===e?void 0:e.call(n))}};var zs={};zs.last=void 0,zs.last=function(t){var e;const n=t[Symbol.iterator]();let r;try{let t,i;for(;({value:t,done:r}=n.next()),!r;)i=t;return i}finally{r||null===(e=n.return)||void 0===e||e.call(n)}};var Rs={toArrayAsync:void 0};const Fs=ys;Rs.toArrayAsync=function(t){return(0,Fs.consume)(t,(async t=>{const e=[];for await(const n of t)e.push(n);return e}))};var Us={toArray:void 0};const Ds=ys;Us.toArray=function(t){return(0,Ds.consume)(t,(t=>Array.from(t)))};var Js={toSetAsync:void 0};const Ls=ys;Js.toSetAsync=function(t){return(0,Ls.consume)(t,(async t=>{const e=new Set;for await(const n of t)e.add(n);return e}))};var Vs={toSet:void 0};const Ws=ys;Vs.toSet=function(t){return(0,Ws.consume)(t,(t=>new Set(t)))},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(ys,t),r(hs,t),r(ps,t),r(ms,t),r(gs,t),r(ws,t),r(Is,t),r(Ss,t),r(_s,t),r(xs,t),r(Ts,t),r(Os,t),r(Es,t),r(js,t),r(ks,t),r(Ps,t),r(Cs,t),r(Ms,t),r(zs,t),r(Rs,t),r(Us,t),r(Js,t),r(Vs,t)}(ds),function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(Lt,t),r(ds,t)}(Jt);var Ks={},Ys={};Ys.traverseErrorPrototypeChain=void 0,Ys.traverseErrorPrototypeChain=function*(t){let e=t;for(;(e=Object.getPrototypeOf(e))&&(yield e,e!==Error.prototype););},Ks.getErrorNames=void 0;const $s=ve,Hs=Ys;Ks.getErrorNames=function*(t){var e;if((0,$s.isError)(t))for(const n of(0,Hs.traverseErrorPrototypeChain)(t))(null===(e=n.constructor)||void 0===e?void 0:e.name)&&(yield n.constructor.name);else yield t.name,yield*t.ancestors};var Xs={isSerializableError:void 0};const Gs=ve;Xs.isSerializableError=function(t){return(0,Gs.isObject)(t)&&(0,Gs.isString)(t.name)&&(0,Gs.isString)(t.message)&&((0,Gs.isString)(t.stack)||(0,Gs.isNull)(t.stack))&&(0,Gs.isArray)(t.ancestors)&&t.ancestors.every(Gs.isString)},Dt.CustomError=void 0;const Qs=Jt,Zs=Ks,tc=ve,ec=Xs;class nc extends Error{get name(){var t,e;return null!==(e=null!==(t=(0,Qs.first)((0,Zs.getErrorNames)(this)))&&void 0!==t?t:nc.name)&&void 0!==e?e:"CustomError"}static[Symbol.hasInstance](t){var e;if((0,tc.isError)(t)||(0,ec.isSerializableError)(t)){const n=[null!==(e=this.prototype.constructor.name)&&void 0!==e?e:this.name,...(0,Zs.getErrorNames)(this.prototype)].reverse(),r=(0,Qs.toArray)((0,Zs.getErrorNames)(t)).reverse();return n.every(((t,e)=>t===r[e]))}return!1}}Dt.CustomError=nc;var rc={AssertionError:void 0};const ic=Dt;class oc extends ic.CustomError{}rc.AssertionError=oc;var ac={normalize:void 0};const sc=Ks,cc=Jt;ac.normalize=function(t){var e;const[n,...r]=(0,cc.toArray)((0,sc.getErrorNames)(t));return{name:n,ancestors:r,message:t.message,stack:null!==(e=t.stack)&&void 0!==e?e:null}};var uc={},lc={},fc={};fc.pass=void 0,fc.pass=function(){},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]});(e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)})(fc,t)}(lc),uc.hydrate=void 0;const dc=lc;function yc(t,e){const n=function(){(0,dc.pass)()};return(n.prototype=Object.create(t.prototype)).constructor=n,Object.defineProperty(n,"name",{value:e}),n}uc.hydrate=function(t){var e;const n=[t.name,...t.ancestors].slice(0,-1).reverse();let r=Error;for(const t of n)r=yc(r,t);const i=new r;return i.name=t.name,i.message=t.message,i.stack=null!==(e=t.stack)&&void 0!==e?e:void 0,i};var hc={assert:void 0};const vc=rc;hc.assert=function(t,e){if(!t)throw new vc.AssertionError(e)},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(Dt,t),r(rc,t),r(Xs,t),r(ac,t),r(uc,t),r(hc,t),r(Ks,t),r(Ys,t)}(Ut);var pc={},mc={},bc={},gc={},wc={};wc.go=void 0,wc.go=function(t){return t()},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]});(e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)})(wc,t)}(gc),bc.chunkAsync=void 0;const Ac=gc,Ic=Ut;bc.chunkAsync=function(t,e){return(0,Ic.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,Ic.assert)(e>0,"The parameter size must be greater than 0"),(0,Ac.go)((async function*(){let n=[];for await(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var Sc={},_c={},xc={};function Tc(t){return Array.isArray(t)}xc.isntEmptyArray=xc.isEmptyArray=xc.isntArray=xc.isArray=void 0,xc.isArray=Tc,xc.isntArray=function(t){return!Tc(t)},xc.isEmptyArray=function(t){return 0===t.length},xc.isntEmptyArray=function(t){return 0!==t.length};var Oc={},Ec={};function jc(t){return null===t}Ec.isntNull=Ec.isNull=void 0,Ec.isNull=jc,Ec.isntNull=function(t){return!jc(t)};var Nc={};function kc(t){return void 0===t}Nc.isntUndefined=Nc.isUndefined=void 0,Nc.isUndefined=kc,Nc.isntUndefined=function(t){return!kc(t)};var Bc={};function Pc(t){return"function"==typeof t}Bc.isntFunction=Bc.isFunction=void 0,Bc.isFunction=Pc,Bc.isntFunction=function(t){return!Pc(t)},Oc.isntAsyncIterable=Oc.isAsyncIterable=void 0;const qc=Ec,Cc=Nc,Mc=Bc;function zc(t){return(0,qc.isntNull)(t)&&(0,Cc.isntUndefined)(t)&&(0,Mc.isFunction)(t[Symbol.asyncIterator])}Oc.isAsyncIterable=zc,Oc.isntAsyncIterable=function(t){return!zc(t)};var Rc={};function Fc(t){return"bigint"==typeof t}Rc.isntBigInt=Rc.isBigInt=void 0,Rc.isBigInt=Fc,Rc.isntBigInt=function(t){return!Fc(t)};var Uc={};function Dc(t){return"boolean"==typeof t}Uc.isntBoolean=Uc.isBoolean=void 0,Uc.isBoolean=Dc,Uc.isntBoolean=function(t){return!Dc(t)};var Jc={},Lc={};function Vc(t){return"string"==typeof t}Lc.isntString=Lc.isString=void 0,Lc.isString=Vc,Lc.isntString=function(t){return!Vc(t)},Jc.isntChar=Jc.isChar=void 0;const Wc=Lc;function Kc(t){return(0,Wc.isString)(t)&&1===t.length}Jc.isChar=Kc,Jc.isntChar=function(t){return!Kc(t)};var Yc={};function $c(t){return t instanceof Date}Yc.isntDate=Yc.isDate=void 0,Yc.isDate=$c,Yc.isntDate=function(t){return!$c(t)};var Hc={};Hc.inEnum=void 0,Hc.inEnum=function(t,e){return Object.values(e).includes(t)};var Xc={};function Gc(t){return t instanceof Error}Xc.isntError=Xc.isError=void 0,Xc.isError=Gc,Xc.isntError=function(t){return!Gc(t)};var Qc={};function Zc(t){return!t}Qc.isntFalsy=Qc.isFalsy=void 0,Qc.isFalsy=Zc,Qc.isntFalsy=function(t){return!Zc(t)};var tu={};tu.isntIterable=tu.isIterable=void 0;const eu=Ec,nu=Nc,ru=Bc;function iu(t){return(0,eu.isntNull)(t)&&(0,nu.isntUndefined)(t)&&(0,ru.isFunction)(t[Symbol.iterator])}tu.isIterable=iu,tu.isntIterable=function(t){return!iu(t)};var ou={},au={};function su(t){return"number"==typeof t}function cu(t){return Number.isNaN(t)}au.isntNaN=au.isNaN=au.isNegativeInfinity=au.isPositiveInfinity=au.isFinite=au.isntNumber=au.isNumber=void 0,au.isNumber=su,au.isntNumber=function(t){return!su(t)},au.isFinite=function(t){return Number.isFinite(t)},au.isPositiveInfinity=function(t){return t===1/0},au.isNegativeInfinity=function(t){return t===-1/0},au.isNaN=cu,au.isntNaN=function(t){return!cu(t)};var uu={},lu=e&&e.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};uu.isntEmptyObject=uu.isEmptyObject=uu.isntPlainObject=uu.isPlainObject=uu.isntObject=uu.isObject=void 0;const fu=lu(ft);function du(t){return null!==t&&"object"==typeof t}function yu(t){return(0,fu.default)(t)}uu.isObject=du,uu.isntObject=function(t){return!du(t)},uu.isPlainObject=yu,uu.isntPlainObject=function(t){return!yu(t)},uu.isEmptyObject=function(t){return 0===Object.keys(t).length},uu.isntEmptyObject=function(t){return 0!==Object.keys(t).length},ou.isntJsonable=ou.isJsonable=ou.isntJson=ou.isJson=void 0;const hu=Ec,vu=Uc,pu=Lc,mu=au,bu=xc,gu=uu;function wu(t){return(0,hu.isNull)(t)||(0,vu.isBoolean)(t)||(0,pu.isString)(t)||(0,mu.isNumber)(t)||(0,bu.isArray)(t)&&t.every(wu)||(0,gu.isPlainObject)(t)&&Object.values(t).every(wu)}ou.isJson=wu,ou.isntJson=function(t){return!wu(t)},ou.isJsonable=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},ou.isntJsonable=function t(e){return!t()};var Au={};Au.isPromiseLike=Au.isntPromiseLike=Au.isntPromise=Au.isPromise=void 0;const Iu=uu,Su=Bc;function _u(t){return t instanceof Promise}function xu(t){return(0,Iu.isObject)(t)&&(0,Su.isFunction)(t.then)}Au.isPromise=_u,Au.isntPromise=function(t){return!_u(t)},Au.isntPromiseLike=function(t){return!xu(t)},Au.isPromiseLike=xu;var Tu={};Tu.isAbsoluteURL=void 0,Tu.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(xc,t),r(Oc,t),r(Rc,t),r(Uc,t),r(Jc,t),r(Yc,t),r(Hc,t),r(Xc,t),r(Qc,t),r(Bc,t),r(tu,t),r(ou,t),r(Ec,t),r(au,t),r(uu,t),r(Au,t),r(Lc,t),r(Nc,t),r(Tu,t)}(_c),Sc.chunkByAsync=void 0;const Ou=_c;Sc.chunkByAsync=function(t,e){return(0,Ou.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const i of t)n.push(i),await e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t):async function*(t){let n=[],r=0;for(const i of t)n.push(i),await e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t)};var Eu={};Eu.chunkBy=void 0,Eu.chunkBy=function*(t,e){let n=[],r=0;for(const i of t)n.push(i),e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)};var ju={chunk:void 0};const Nu=gc,ku=Ut;ju.chunk=function(t,e){return(0,ku.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,ku.assert)(e>0,"The parameter size must be greater than 0"),(0,Nu.go)((function*(){let n=[];for(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var Bu={concatAsync:void 0};const Pu=_c,qu=gc;Bu.concatAsync=function(t,...e){return(0,qu.go)((async function*(){for(const n of[t,...e])if((0,Pu.isAsyncIterable)(n))for await(const t of n)yield t;else for(const t of n)yield t}))};var Cu={concat:void 0};const Mu=gc;Cu.concat=function(t,...e){return(0,Mu.go)((function*(){for(const n of[t,...e])yield*n}))};var zu={},Ru={};Ru.copyIterable=Ru.copyAsyncIterable=void 0,Ru.copyAsyncIterable=async function*(t){for await(const e of t)yield e},Ru.copyIterable=function*(t){for(const e of t)yield e},zu.dropAsync=void 0;const Fu=gc,Uu=Ru,Du=Ut;zu.dropAsync=function(t,e){return(0,Du.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Du.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Uu.copyAsyncIterable)(t):(0,Fu.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let i;try{let t;for(;!(({value:t,done:i}=await r.next()),i||e<=0);)e--;for(;!i;)yield t,({value:t,done:i}=await r.next())}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var Ju={dropRightAsync:void 0};const Lu=gc,Vu=Ru,Wu=Ut;Ju.dropRightAsync=function(t,e){return(0,Wu.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Wu.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Vu.copyAsyncIterable)(t):(0,Lu.go)((async function*(){const n=(await async function(t){const e=[];for await(const n of t)e.push(n);return e}(t)).slice(0,-e);for(const t of n)yield t}))};var Ku={dropRight:void 0};const Yu=gc,$u=Ru,Hu=Ut;Ku.dropRight=function(t,e){return(0,Hu.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Hu.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,$u.copyIterable)(t):(0,Yu.go)((function*(){const n=Array.from(t);yield*n.slice(0,-e)}))};var Xu={dropUntilAsync:void 0};const Gu=_c;Xu.dropUntilAsync=function(t,e){return(0,Gu.isAsyncIterable)(t)?async function*(t){var n;const r=t[Symbol.asyncIterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=await r.next()),i||await e(t,o++)););for(;!i;)yield t,({value:t,done:i}=await r.next())}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}(t):async function*(t){var n;const r=t[Symbol.iterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=r.next()),i||await e(t,o++)););for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}(t)};var Qu={};Qu.dropUntil=void 0,Qu.dropUntil=function*(t,e){var n;const r=t[Symbol.iterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=r.next()),i||e(t,o++)););for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}};var Zu={drop:void 0};const tl=gc,el=Ru,nl=Ut;Zu.drop=function(t,e){return(0,nl.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,nl.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,el.copyIterable)(t):(0,tl.go)((function*(){var n;const r=t[Symbol.iterator]();let i;try{let t;for(;!(({value:t,done:i}=r.next()),i||e<=0);)e--;for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}))};var rl={filterAsync:void 0};const il=_c;rl.filterAsync=function(t,e){return(0,il.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n)&&(yield r),n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n)&&(yield r),n++}(t)};var ol={};ol.filter=void 0,ol.filter=function*(t,e){let n=0;for(const r of t)e(r,n)&&(yield r),n++};var al={},sl={},cl={flattenByAsync:void 0};const ul=_c;function ll(t){return(0,ul.isIterable)(t)&&(0,ul.isntChar)(t)}cl.flattenByAsync=function(t,e){return(0,ul.isAsyncIterable)(t)?async function*(t){const r=1;for await(const i of t)ll(i)&&await e(i,r)?yield*n(i,r+1):yield i}(t):function(t){return n(t,1)}(t);async function*n(t,r){for(const i of t)ll(i)&&await e(i,r)?yield*n(i,r+1):yield i}},sl.flattenDeepAsync=void 0;const fl=cl,dl=Ut;sl.flattenDeepAsync=function(t,e=1/0){return(0,dl.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,dl.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,fl.flattenByAsync)(t,((t,n)=>n<=e))},al.flattenAsync=void 0;const yl=sl;al.flattenAsync=function(t){return(0,yl.flattenDeepAsync)(t,1)};var hl={flattenBy:void 0};const vl=_c;hl.flattenBy=function(t,e){return function*t(n,r){for(const o of n)(0,vl.isIterable)(i=o)&&(0,vl.isntChar)(i)&&e(o,r)?yield*t(o,r+1):yield o;var i}(t,1)};var pl={flattenDeep:void 0};const ml=hl,bl=Ut;pl.flattenDeep=function(t,e=1/0){return(0,bl.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,bl.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,ml.flattenBy)(t,((t,n)=>n<=e))};var gl={flatten:void 0};const wl=pl;gl.flatten=function(t){return(0,wl.flattenDeep)(t,1)};var Al={mapAsync:void 0};const Il=_c;Al.mapAsync=function(t,e){return(0,Il.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)yield await e(r,n),n++}(t):async function*(t){let n=0;for(const r of t)yield await e(r,n),n++}(t)};var Sl={};Sl.map=void 0,Sl.map=function*(t,e){let n=0;for(const r of t)yield e(r,n),n++};var _l={repeatAsync:void 0};const xl=gc,Tl=Ut;_l.repeatAsync=function(t,e){return(0,Tl.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,Tl.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,xl.go)((async function*(){const n=[];if(e>0){for await(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var Ol={repeat:void 0};const El=gc,jl=Ut;Ol.repeat=function(t,e){return(0,jl.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,jl.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,El.go)((function*(){const n=[];if(e>0){for(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var Nl={sliceAsync:void 0};const kl=gc,Bl=Ut;Nl.sliceAsync=function(t,e,n=1/0){return(0,Bl.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,Bl.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,Bl.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Bl.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,kl.go)((async function*(){let r=0;for await(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var Pl={slice:void 0};const ql=gc,Cl=Ut;Pl.slice=function(t,e,n=1/0){return(0,Cl.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,Cl.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,Cl.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Cl.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,ql.go)((function*(){let r=0;for(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var Ml={};Ml.splitAsync=void 0,Ml.splitAsync=async function*(t,e){let n=[];for await(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var zl={splitByAsync:void 0};const Rl=_c;zl.splitByAsync=function(t,e){return(0,Rl.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const i of t)await e(i,r)?(yield n,n=[]):n.push(i),r++;yield n}(t):async function*(t){let n=[],r=0;for(const i of t)await e(i,r)?(yield n,n=[]):n.push(i),r++;yield n}(t)};var Fl={};Fl.splitBy=void 0,Fl.splitBy=function*(t,e){let n=[],r=0;for(const i of t)e(i,r)?(yield n,n=[]):n.push(i),r++;yield n};var Ul={};Ul.split=void 0,Ul.split=function*(t,e){let n=[];for(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Dl={takeAsync:void 0};const Jl=gc,Ll=Ut;Dl.takeAsync=function(t,e){return(0,Ll.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Ll.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Jl.go)((async function*(){if(0!==e)for await(const n of t)if(yield n,0===--e)break}))};var Vl={takeRightAsync:void 0};const Wl=gc,Kl=Ut;Vl.takeRightAsync=function(t,e){return(0,Kl.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Kl.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Wl.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let i;try{const t=[];let o;for(;({value:o,done:i}=await r.next()),!i;)t.push(o),t.length>e&&t.shift();yield*t}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var Yl={takeRight:void 0};const $l=gc,Hl=Ut;Yl.takeRight=function(t,e){return(0,Hl.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Hl.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,$l.go)((function*(){var n;const r=t[Symbol.iterator]();let i;try{const t=[];let o;for(;({value:o,done:i}=r.next()),!i;)t.push(o),t.length>e&&t.shift();yield*t}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}))};var Xl={takeUntilAsync:void 0};const Gl=_c;Xl.takeUntilAsync=function(t,e){return(0,Gl.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t){if(await e(r,n))break;yield r,n++}}(t):async function*(t){let n=0;for(const r of t){if(await e(r,n))break;yield r,n++}}(t)};var Ql={};Ql.takeUntil=void 0,Ql.takeUntil=function*(t,e){let n=0;for(const r of t){if(e(r,n))break;yield r,n++}};var Zl={take:void 0};const tf=gc,ef=Ut;Zl.take=function(t,e){return(0,ef.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,ef.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,tf.go)((function*(){if(0!==e)for(const n of t)if(yield n,0===--e)break}))};var nf={tapAsync:void 0};const rf=_c;nf.tapAsync=function(t,e){return(0,rf.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n),yield r,n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n),yield r,n++}(t)};var of={};of.tap=void 0,of.tap=function*(t,e){let n=0;for(const r of t)e(r,n),yield r,n++};var af={};af.toAsyncIterable=void 0,af.toAsyncIterable=async function*(t){for(const e of t)yield e};var sf={};sf.transformAsync=void 0,sf.transformAsync=async function*(t,e){yield*e(t)};var cf={};cf.transform=void 0,cf.transform=function*(t,e){yield*e(t)};var uf={};uf.uniqAsync=void 0,uf.uniqAsync=async function*(t){const e=new Set;for await(const n of t)e.has(n)||(yield n,e.add(n))};var lf={uniqByAsync:void 0};const ff=_c;lf.uniqByAsync=function(t,e){return(0,ff.isAsyncIterable)(t)?async function*(t){const n=new Set;let r=0;for await(const i of t){const t=await e(i,r);n.has(t)||(yield i,n.add(t)),r++}}(t):async function*(t){const n=new Set;let r=0;for(const i of t){const t=await e(i,r);n.has(t)||(yield i,n.add(t)),r++}}(t)};var df={};df.uniqBy=void 0,df.uniqBy=function*(t,e){const n=new Set;let r=0;for(const i of t){const t=e(i,r);n.has(t)||(yield i,n.add(t)),r++}};var yf={};yf.uniq=void 0,yf.uniq=function*(t){const e=new Set;for(const n of t)e.has(n)||(yield n,e.add(n))};var hf={zipAsync:void 0};const vf=_c;var pf;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(pf||(pf={})),hf.zipAsync=function(t,...e){return async function*(...t){var e,n,r,i;const o=t.length,a=t.map((t=>(0,vf.isAsyncIterable)(t)?[pf.Async,t[Symbol.asyncIterator]()]:[pf.Sync,t[Symbol.iterator]()])),s=a.map((()=>!1));try{for(;;){const t=new Array(o);for(let e=0;e<o;e++){const[n,r]=a[e];let i;if(i=n===pf.Async?await r.next():r.next(),i.done)return void(s[e]=!0);t[e]=i.value}yield t}}finally{const t=a.filter(((t,e)=>!s[e]));for(const[o,a]of t)o===pf.Async?await(null===(n=(e=a).return)||void 0===n?void 0:n.call(e)):null===(i=(r=a).return)||void 0===i||i.call(r)}}(t,...e)};var mf={};mf.zip=void 0,mf.zip=function(t,...e){return function*(...t){const e=t.length,n=t.map((t=>t[Symbol.iterator]())),r=n.map((()=>!1));try{for(;;){const t=new Array(e);for(let i=0;i<e;i++){const{value:e,done:o}=n[i].next();if(o)return void(r[i]=!0);t[i]=e}yield t}}finally{n.filter(((t,e)=>!r[e])).forEach((t=>{var e;return null===(e=t.return)||void 0===e?void 0:e.call(t)}))}}(t,...e)},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(bc,t),r(Sc,t),r(Eu,t),r(ju,t),r(Bu,t),r(Cu,t),r(zu,t),r(Ju,t),r(Ku,t),r(Xu,t),r(Qu,t),r(Zu,t),r(rl,t),r(ol,t),r(al,t),r(cl,t),r(hl,t),r(sl,t),r(pl,t),r(gl,t),r(Al,t),r(Sl,t),r(_l,t),r(Ol,t),r(Nl,t),r(Pl,t),r(Ml,t),r(zl,t),r(Fl,t),r(Ul,t),r(Dl,t),r(Vl,t),r(Yl,t),r(Xl,t),r(Ql,t),r(Zl,t),r(nf,t),r(of,t),r(af,t),r(sf,t),r(cf,t),r(uf,t),r(lf,t),r(df,t),r(yf,t),r(hf,t),r(mf,t)}(mc);var bf={},gf={};gf.consume=void 0,gf.consume=function(t,e){return e(t)};var wf={eachAsync:void 0};const Af=_c;wf.eachAsync=function(t,e){return(0,Af.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t)await e(r,n),n++}(t):async function(t){let n=0;for(const r of t)await e(r,n),n++}(t)};var If={};If.each=void 0,If.each=function(t,e){let n=0;for(const r of t)e(r,n),n++};var Sf={everyAsync:void 0};const _f=_c;Sf.everyAsync=function(t,e){return(0,_f.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(!await e(r,n))return!1;n++}return!0}(t):async function(t){let n=0;for(const r of t){if(!await e(r,n))return!1;n++}return!0}(t)};var xf={};xf.every=void 0,xf.every=function(t,e){let n=0;for(const r of t){if(!e(r,n))return!1;n++}return!0};var Tf={findAsync:void 0};const Of=_c;Tf.findAsync=function(t,e){return(0,Of.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return r;n++}return}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return r;n++}return}(t)};var Ef={};Ef.find=void 0,Ef.find=function(t,e){let n=0;for(const r of t){if(e(r,n))return r;n++}};var jf={};jf.firstAsync=void 0,jf.firstAsync=async function(t){for await(const e of t)return e};var Nf={};Nf.first=void 0,Nf.first=function(t){for(const e of t)return e};var kf={};kf.includesAsync=void 0,kf.includesAsync=async function(t,e){for await(const n of t)if(n===e)return!0;return!1};var Bf={};Bf.includes=void 0,Bf.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1};var Pf={};Pf.matchAsync=void 0,Pf.matchAsync=async function(t,e){const n=e.length;let r=0;for await(const i of t)if(i===e[r]&&r++,r===n)return!0;return!1};var qf={};qf.match=void 0,qf.match=function(t,e){const n=e.length;let r=0;for(const i of t)if(i===e[r]&&r++,r===n)return!0;return!1};var Cf={reduceAsync:void 0};const Mf=_c;Cf.reduceAsync=function(t,e,n){return(0,Mf.isUndefined)(n)?function(t,e){return(0,Mf.isAsyncIterable)(t)?n(t):r(t);async function n(t){var n;const r=t[Symbol.asyncIterator]();let i;try{let t,a=await o(r),s=1;for(;({value:t,done:i}=await r.next()),!i;)a=await e(a,t,s++);return a}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}async function o(t){const e=await t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}async function r(t){var n;const r=t[Symbol.iterator]();let i;try{let t,a=o(r),s=1;for(;({value:t,done:i}=r.next()),!i;)a=await e(a,t,s++);return a}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}}(t,e):function(t,e,n){return(0,Mf.isAsyncIterable)(t)?i(t):r(t);async function r(t){let r=n,i=0;for(const n of t)r=await e(r,n,i++);return r}async function i(t){let r=n,i=0;for await(const n of t)r=await e(r,n,i++);return r}}(t,e,n)};var zf={reduce:void 0};const Rf=_c;zf.reduce=function(t,e,n){return(0,Rf.isUndefined)(n)?function(t,e){var n;const r=t[Symbol.iterator]();let i;try{let t,a=o(r),s=1;for(;({value:t,done:i}=r.next()),!i;)a=e(a,t,s++);return a}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}(t,e):function(t,e,n){let r=n,i=0;for(const n of t)r=e(r,n,i++);return r}(t,e,n)};var Ff={someAsync:void 0};const Uf=_c;Ff.someAsync=function(t,e){return(0,Uf.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return!0;n++}return!1}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return!0;n++}return!1}(t)};var Df={};Df.some=void 0,Df.some=function(t,e){let n=0;for(const r of t){if(e(r,n))return!0;n++}return!1};var Jf={};Jf.lastAsync=void 0,Jf.lastAsync=async function(t){var e;const n=t[Symbol.asyncIterator]();let r;try{let t,i;for(;({value:t,done:r}=await n.next()),!r;)i=t;return i}finally{r||await(null===(e=n.return)||void 0===e?void 0:e.call(n))}};var Lf={};Lf.last=void 0,Lf.last=function(t){var e;const n=t[Symbol.iterator]();let r;try{let t,i;for(;({value:t,done:r}=n.next()),!r;)i=t;return i}finally{r||null===(e=n.return)||void 0===e||e.call(n)}};var Vf={toArrayAsync:void 0};const Wf=gf;Vf.toArrayAsync=function(t){return(0,Wf.consume)(t,(async t=>{const e=[];for await(const n of t)e.push(n);return e}))};var Kf={toArray:void 0};const Yf=gf;Kf.toArray=function(t){return(0,Yf.consume)(t,(t=>Array.from(t)))};var $f={toSetAsync:void 0};const Hf=gf;$f.toSetAsync=function(t){return(0,Hf.consume)(t,(async t=>{const e=new Set;for await(const n of t)e.add(n);return e}))};var Xf={toSet:void 0};const Gf=gf;Xf.toSet=function(t){return(0,Gf.consume)(t,(t=>new Set(t)))};var Qf={};Qf.count=void 0,Qf.count=function(t){let e=0;for(const n of t)e++;return e};var Zf={};Zf.countAsync=void 0,Zf.countAsync=async function(t){let e=0;for await(const n of t)e++;return e},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(gf,t),r(wf,t),r(If,t),r(Sf,t),r(xf,t),r(Tf,t),r(Ef,t),r(jf,t),r(Nf,t),r(kf,t),r(Bf,t),r(Pf,t),r(qf,t),r(Cf,t),r(zf,t),r(Ff,t),r(Df,t),r(Jf,t),r(Lf,t),r(Vf,t),r(Kf,t),r($f,t),r(Xf,t),r(Qf,t),r(Zf,t)}(bf),function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(mc,t),r(bf,t)}(pc);class td{constructor(t){this.map=new Map,Ut.assert(Number.isInteger(t),"The parameter limit must be an integer"),Ut.assert(t>0,"The parameter limit must be a positive value"),this.limit=t}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.map.size}set(t,e){return this.map.has(t)?this.updateItem(t,e):(this.map.size===this.limit&&this.map.delete(this.getColdestKey()),this.map.set(t,e)),this}has(t){return this.map.has(t)}get(t){if(!this.has(t))return;const e=this.map.get(t);return this.updateItem(t,e),e}delete(t){return this.map.delete(t)}clear(){this.map.clear()}updateItem(t,e){this.map.delete(t),this.map.set(t,e)}getColdestKey(){return pc.first(this.map.keys())}}var ed={},nd={},rd={},id={};id.random=void 0,id.random=function(t,e){return Math.random()*(e-t)+t};var od={};od.randomInt=void 0,od.randomInt=function(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t))+t};var ad={};ad.randomIntInclusive=void 0,ad.randomIntInclusive=function(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(id,t),r(od,t),r(ad,t)}(rd),nd.calculateExponentialBackoffTimeout=void 0;const sd=rd;nd.calculateExponentialBackoffTimeout=function({baseTimeout:t,retries:e,maxTimeout:n=1/0,factor:r=2,jitter:i=!0}){const o=Math.min(r**e*t,n);return i?(0,sd.randomIntInclusive)(0,o):o};var cd={};cd.setTimeout=void 0,cd.setTimeout=function(t,e){const n=globalThis.setTimeout(e,t);return()=>clearTimeout(n)};var ud={setSchedule:void 0};const ld=cd;ud.setSchedule=function(t,e){const n=t-Date.now();return(0,ld.setTimeout)(n,e)};var fd={};fd.setInterval=void 0,fd.setInterval=function(t,e){const n=globalThis.setInterval(e,t);return()=>clearInterval(n)};var dd={setImmediate:void 0};const yd=cd;dd.setImmediate=function(t){if(globalThis.setImmediate){const e=globalThis.setImmediate(t);return()=>clearImmediate(e)}return(0,yd.setTimeout)(0,t)};var hd={setTimeoutLoop:void 0};const vd=cd;hd.setTimeoutLoop=function(t,e){let n=!1,r=(0,vd.setTimeout)(t,(async function i(){await e(),n||(r=(0,vd.setTimeout)(t,i))}));return()=>{n=!0,r()}};var pd={setDynamicTimeoutLoop:void 0};const md=cd;pd.setDynamicTimeoutLoop=function(t,e){let n=!1,r=(0,md.setTimeout)(t,(async function i(){const o=Date.now();await e();const a=Date.now()-o;n||(r=(0,md.setTimeout)(Math.max(t-a,0),i))}));return()=>{n=!0,r()}},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(nd,t),r(cd,t),r(ud,t),r(fd,t),r(dd,t),r(hd,t),r(pd,t)}(ed);class bd{constructor(){this.map=new Map,this.itemMetadataSortedByExpirationTime=[]}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.map.size}set(t,e,n){return this.map.set(t,e),this.removeItemMetadata(t),this.addItemMetadata(t,Date.now()+n),this}has(t){return this.map.has(t)}get(t){return this.map.get(t)}delete(t){const e=this.map.delete(t);if(e){const e=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.key===t));this.itemMetadataSortedByExpirationTime.splice(e,1),0===e&&this.rescheduleClearTimeout()}return e}clear(){var t;this.map.clear(),null===(t=this.cancelClearTimeout)||void 0===t||t.call(this),this.itemMetadataSortedByExpirationTime=[]}addItemMetadata(t,e){for(let n=0;n<this.itemMetadataSortedByExpirationTime.length;n++){if(e<this.itemMetadataSortedByExpirationTime[n].expirationTime)return this.itemMetadataSortedByExpirationTime.splice(n,0,{key:t,expirationTime:e}),void(0===n&&this.rescheduleClearTimeout())}this.itemMetadataSortedByExpirationTime.push({key:t,expirationTime:e}),1===this.itemMetadataSortedByExpirationTime.length&&this.rescheduleClearTimeout()}removeItemMetadata(t){const e=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.key===t));e>=0&&(this.itemMetadataSortedByExpirationTime.splice(e,1),0===e&&this.rescheduleClearTimeout())}clearExpiredItems(t){const e=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.expirationTime>t));(e>=0?this.itemMetadataSortedByExpirationTime.splice(0,e):this.itemMetadataSortedByExpirationTime.splice(0,this.itemMetadataSortedByExpirationTime.length)).forEach((t=>this.map.delete(t.key)))}rescheduleClearTimeout(){var t;if(null===(t=this.cancelClearTimeout)||void 0===t||t.call(this),this.itemMetadataSortedByExpirationTime.length>0){const t=this.itemMetadataSortedByExpirationTime[0];if(Number.isFinite(t.expirationTime)){const e=ed.setSchedule(t.expirationTime,(()=>{this.clearExpiredItems(Date.now()),this.rescheduleClearTimeout()}));this.cancelClearTimeout=()=>{e(),this.cancelClearTimeout=void 0}}}}}class gd{constructor(t){this.map=new Map,this.itemMetadataSortedByExpirationTime=[],Ut.assert(Number.isInteger(t),"The parameter limit must be an integer"),Ut.assert(t>0,"The parameter limit must be a positive value"),this.limit=t}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.map.size}set(t,e,n){return this.map.has(t)?(this.updateItem(t,e),this.removeItemMetadata(t),this.addItemMetadata(t,Date.now()+n)):(this.map.size===this.limit&&this.map.delete(this.getColdestKey()),this.map.set(t,e),this.addItemMetadata(t,Date.now()+n)),this}has(t){return this.map.has(t)}get(t){if(this.has(t)){const e=this.map.get(t);return this.updateItem(t,e),e}}delete(t){const e=this.map.delete(t);if(e){const e=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.key===t));this.itemMetadataSortedByExpirationTime.splice(e,1),0===e&&this.rescheduleClearTimeout()}return e}clear(){var t;this.map.clear(),null===(t=this.cancelClearTimeout)||void 0===t||t.call(this),this.itemMetadataSortedByExpirationTime=[]}updateItem(t,e){this.map.delete(t),this.map.set(t,e)}addItemMetadata(t,e){for(let n=0;n<this.itemMetadataSortedByExpirationTime.length;n++){if(e<this.itemMetadataSortedByExpirationTime[n].expirationTime)return this.itemMetadataSortedByExpirationTime.splice(n,0,{key:t,expirationTime:e}),void(0===n&&this.rescheduleClearTimeout())}this.itemMetadataSortedByExpirationTime.push({key:t,expirationTime:e}),1===this.itemMetadataSortedByExpirationTime.length&&this.rescheduleClearTimeout()}removeItemMetadata(t){const e=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.key===t));e>=0&&(this.itemMetadataSortedByExpirationTime.splice(e,1),0===e&&this.rescheduleClearTimeout())}clearExpiredItems(t){const e=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.expirationTime>t));(e>=0?this.itemMetadataSortedByExpirationTime.splice(0,e):this.itemMetadataSortedByExpirationTime.splice(0,this.itemMetadataSortedByExpirationTime.length)).forEach((t=>this.map.delete(t.key)))}rescheduleClearTimeout(){var t;if(null===(t=this.cancelClearTimeout)||void 0===t||t.call(this),this.itemMetadataSortedByExpirationTime.length>0){const t=this.itemMetadataSortedByExpirationTime[0];if(Number.isFinite(t.expirationTime)){const e=ed.setSchedule(t.expirationTime,(()=>{this.clearExpiredItems(Date.now()),this.rescheduleClearTimeout()}));this.cancelClearTimeout=()=>{e(),this.cancelClearTimeout=void 0}}}}getColdestKey(){return pc.first(this.map.keys())}}class wd{constructor(t){this.value=t,this.children=new Map}}class Ad{constructor(){this.root=new wd}get[Symbol.toStringTag](){return this.constructor.name}*entries(){yield*function*t(e,r){for(const[i,o]of e.children){const e=[...r,i];n.isntUndefined(o.value)&&(yield[e,o.value]),yield*t(o,e)}}(this.root,[])}keys(){return pc.map(this.entries(),(([t])=>t))}values(){return pc.map(this.entries(),(([t,e])=>e))}set(t,e){let n=this.root;for(const e of t)n.children.has(e)||n.children.set(e,new wd),n=n.children.get(e);return n.value=e,this}has(t){let e=this.root;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=this.root;for(const n of t){if(!e.children.has(n))return;e=e.children.get(n)}return e.value}delete(t){const e=[];let n=this.root;for(const r of t){if(!n.children.has(r))return!1;e.push(n),n=n.children.get(r)}if(delete n.value,0===n.children.size)for(const[n,r]of pc.toArray(pc.zip(t,e)).reverse())if(r.children.delete(n),0!==r.children.size)break;return!0}}class Id{constructor(t,e){this.schema=t,this._state=e}get[Symbol.toStringTag](){return this.constructor.name}get state(){return this._state}matches(t){return this._state===t}can(t){return t in this.schema[this.state]}send(t){if(!this.can(t))throw new Sd(this.state,t);this._state=this.schema[this.state][t]}}class Sd extends Ut.CustomError{constructor(t,e){super(`State ${t} cannot react to event ${e}`)}}
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation.
4
4
 
@@ -12,5 +12,5 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
12
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
  PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */var gf=function(t,e){return(gf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function wf(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}gf(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function Af(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Sf(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function If(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}function _f(t){return"function"==typeof t}function Tf(t){var e=t((function(t){Error.call(t),t.stack=(new Error).stack}));return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var xf=Tf((function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}));function Ef(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Of=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}var e;return t.prototype.unsubscribe=function(){var t,e,n,r,o;if(!this.closed){this.closed=!0;var i=this._parentage;if(i)if(this._parentage=null,Array.isArray(i))try{for(var a=Af(i),s=a.next();!s.done;s=a.next()){s.value.remove(this)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else i.remove(this);var c=this.initialTeardown;if(_f(c))try{c()}catch(t){o=t instanceof xf?t.errors:[t]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var l=Af(u),f=l.next();!f.done;f=l.next()){var d=f.value;try{Nf(d)}catch(t){o=null!=o?o:[],t instanceof xf?o=If(If([],Sf(o)),Sf(t.errors)):o.push(t)}}}catch(t){n={error:t}}finally{try{f&&!f.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}if(o)throw new xf(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Nf(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(e)}},t.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},t.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},t.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&Ef(e,t)},t.prototype.remove=function(e){var n=this._finalizers;n&&Ef(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}(),jf=Of.EMPTY;function kf(t){return t instanceof Of||t&&"closed"in t&&_f(t.remove)&&_f(t.add)&&_f(t.unsubscribe)}function Nf(t){_f(t)?t():t.unsubscribe()}var Bf={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Pf=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,If([t,e],Sf(n)))};function qf(){}function Cf(t){t()}var Mf=function(t){function e(e){var n=t.call(this)||this;return n.isStopped=!1,e?(n.destination=e,kf(e)&&e.add(n)):n.destination=Jf,n}return wf(e,t),e.create=function(t,e,n){return new Df(t,e,n)},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Of),zf=Function.prototype.bind;function Rf(t,e){return zf.call(t,e)}var Uf=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(t){Ff(t)}},t.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(t){Ff(t)}else Ff(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){Ff(t)}},t}(),Df=function(t){function e(e,n,r){var o,i,a=t.call(this)||this;_f(e)||!e?o={next:null!=e?e:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:a&&Bf.useDeprecatedNextContext?((i=Object.create(e)).unsubscribe=function(){return a.unsubscribe()},o={next:e.next&&Rf(e.next,i),error:e.error&&Rf(e.error,i),complete:e.complete&&Rf(e.complete,i)}):o=e;return a.destination=new Uf(o),a}return wf(e,t),e}(Mf);function Ff(t){var e;e=t,Pf((function(){throw e}))}var Jf={closed:!0,next:qf,error:function(t){throw t},complete:qf},Vf="function"==typeof Symbol&&Symbol.observable||"@@observable";function Lf(t){return t}function Wf(t){return 0===t.length?Lf:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}var Kf=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r,o=this,i=(r=t)&&r instanceof Mf||function(t){return t&&_f(t.next)&&_f(t.error)&&_f(t.complete)}(r)&&kf(r)?t:new Df(t,e,n);return Cf((function(){var t=o,e=t.operator,n=t.source;i.add(e?e.call(i,n):n?o._subscribe(i):o._trySubscribe(i))})),i},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=Yf(e))((function(e,r){var o=new Df({next:function(e){try{t(e)}catch(t){r(t),o.unsubscribe()}},error:r,complete:e});n.subscribe(o)}))},t.prototype._subscribe=function(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)},t.prototype[Vf]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Wf(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=Yf(t))((function(t,n){var r;e.subscribe((function(t){return r=t}),(function(t){return n(t)}),(function(){return t(r)}))}))},t.create=function(e){return new t(e)},t}();function Yf(t){var e;return null!==(e=null!=t?t:Bf.Promise)&&void 0!==e?e:Promise}function $f(t){return _f(null==t?void 0:t.lift)}function Hf(t,e,n,r,o){return new Xf(t,e,n,r,o)}var Xf=function(t){function e(e,n,r,o,i,a){var s=t.call(this,e)||this;return s.onFinalize=i,s.shouldUnsubscribe=a,s._next=n?function(t){try{n(t)}catch(t){e.error(t)}}:t.prototype._next,s._error=o?function(t){try{o(t)}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._error,s._complete=r?function(){try{r()}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._complete,s}return wf(e,t),e.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;t.prototype.unsubscribe.call(this),!n&&(null===(e=this.onFinalize)||void 0===e||e.call(this))}},e}(Mf);function Gf(){return t=function(t,e){var n=null;t._refCount++;var r=Hf(e,void 0,void 0,void 0,(function(){if(!t||t._refCount<=0||0<--t._refCount)n=null;else{var r=t._connection,o=n;n=null,!r||o&&r!==o||r.unsubscribe(),e.unsubscribe()}}));t.subscribe(r),r.closed||(n=t.connect())},function(e){if($f(e))return e.lift((function(e){try{return t(e,this)}catch(t){this.error(t)}}));throw new TypeError("Unable to lift unknown Observable type")};var t}!function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subjectFactory=n,r._subject=null,r._refCount=0,r._connection=null,$f(e)&&(r.lift=e.lift),r}wf(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype._teardown=function(){this._refCount=0;var t=this._connection;this._subject=this._connection=null,null==t||t.unsubscribe()},e.prototype.connect=function(){var t=this,e=this._connection;if(!e){e=this._connection=new Of;var n=this.getSubject();e.add(this.source.subscribe(Hf(n,void 0,(function(){t._teardown(),n.complete()}),(function(e){t._teardown(),n.error(e)}),(function(){return t._teardown()})))),e.closed&&(this._connection=null,e=Of.EMPTY)}return e},e.prototype.refCount=function(){return Gf()(this)}}(Kf);var Qf,Zf,td={now:function(){return(td.delegate||performance).now()},delegate:void 0},ed={schedule:function(t){var e=requestAnimationFrame,n=cancelAnimationFrame,r=e((function(e){n=void 0,t(e)}));return new Of((function(){return null==n?void 0:n(r)}))},requestAnimationFrame:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=ed.delegate;return((null==n?void 0:n.requestAnimationFrame)||requestAnimationFrame).apply(void 0,If([],Sf(t)))},cancelAnimationFrame:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return cancelAnimationFrame.apply(void 0,If([],Sf(t)))},delegate:void 0};Zf=ed.schedule,new Kf((function(t){var e=new Of,n=Qf||td,r=n.now(),o=function(i){var a=n.now();t.next({timestamp:Qf?a:i,elapsed:a-r}),t.closed||e.add(Zf(o))};return e.add(Zf(o)),e}));var nd=Tf((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),rd=function(t){function e(){var e=t.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return wf(e,t),e.prototype.lift=function(t){var e=new od(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new nd},e.prototype.next=function(t){var e=this;Cf((function(){var n,r;if(e._throwIfClosed(),!e.isStopped){e.currentObservers||(e.currentObservers=Array.from(e.observers));try{for(var o=Af(e.currentObservers),i=o.next();!i.done;i=o.next()){i.value.next(t)}}catch(t){n={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}}))},e.prototype.error=function(t){var e=this;Cf((function(){if(e._throwIfClosed(),!e.isStopped){e.hasError=e.isStopped=!0,e.thrownError=t;for(var n=e.observers;n.length;)n.shift().error(t)}}))},e.prototype.complete=function(){var t=this;Cf((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}}))},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(e){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var e=this,n=this,r=n.hasError,o=n.isStopped,i=n.observers;return r||o?jf:(this.currentObservers=null,i.push(t),new Of((function(){e.currentObservers=null,Ef(i,t)})))},e.prototype._checkFinalizedStatuses=function(t){var e=this,n=e.hasError,r=e.thrownError,o=e.isStopped;n?t.error(r):o&&t.complete()},e.prototype.asObservable=function(){var t=new Kf;return t.source=this,t},e.create=function(t,e){return new od(t,e)},e}(Kf),od=function(t){function e(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return wf(e,t),e.prototype.next=function(t){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===n||n.call(e,t)},e.prototype.error=function(t){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===n||n.call(e,t)},e.prototype.complete=function(){var t,e;null===(e=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===e||e.call(t)},e.prototype._subscribe=function(t){var e,n;return null!==(n=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==n?n:jf},e}(rd);!function(t){function e(e){var n=t.call(this)||this;return n._value=e,n}wf(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return!n.closed&&e.next(this._value),n},e.prototype.getValue=function(){var t=this,e=t.hasError,n=t.thrownError,r=t._value;if(e)throw n;return this._throwIfClosed(),r},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)}}(rd);var id={now:function(){return(id.delegate||Date).now()},delegate:void 0};!function(t){function e(e,n,r){void 0===e&&(e=1/0),void 0===n&&(n=1/0),void 0===r&&(r=id);var o=t.call(this)||this;return o._bufferSize=e,o._windowTime=n,o._timestampProvider=r,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=n===1/0,o._bufferSize=Math.max(1,e),o._windowTime=Math.max(1,n),o}wf(e,t),e.prototype.next=function(e){var n=this,r=n.isStopped,o=n._buffer,i=n._infiniteTimeWindow,a=n._timestampProvider,s=n._windowTime;r||(o.push(e),!i&&o.push(a.now()+s)),this._trimBuffer(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var e=this._innerSubscribe(t),n=this._infiniteTimeWindow,r=this._buffer.slice(),o=0;o<r.length&&!t.closed;o+=n?1:2)t.next(r[o]);return this._checkFinalizedStatuses(t),e},e.prototype._trimBuffer=function(){var t=this,e=t._bufferSize,n=t._timestampProvider,r=t._buffer,o=t._infiniteTimeWindow,i=(o?1:2)*e;if(e<1/0&&i<r.length&&r.splice(0,r.length-i),!o){for(var a=n.now(),s=0,c=1;c<r.length&&r[c]<=a;c+=2)s=c;s&&r.splice(0,s+1)}}}(rd),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._value=null,e._hasValue=!1,e._isComplete=!1,e}wf(e,t),e.prototype._checkFinalizedStatuses=function(t){var e=this,n=e.hasError,r=e._hasValue,o=e._value,i=e.thrownError,a=e.isStopped,s=e._isComplete;n?t.error(i):(a||s)&&(r&&t.next(o),t.complete())},e.prototype.next=function(t){this.isStopped||(this._value=t,this._hasValue=!0)},e.prototype.complete=function(){var e=this,n=e._hasValue,r=e._value;e._isComplete||(this._isComplete=!0,n&&t.prototype.next.call(this,r),t.prototype.complete.call(this))}}(rd);var ad,sd=function(t){function e(e,n){return t.call(this)||this}return wf(e,t),e.prototype.schedule=function(t,e){return this},e}(Of),cd=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,If([t,e],Sf(n)))},ud=function(t){return clearInterval(t)},ld=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r.pending=!1,r}return wf(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),cd(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return e;ud(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var n,r=!1;try{this.work(t)}catch(t){r=!0,n=t||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),n},e.prototype.unsubscribe=function(){if(!this.closed){var e=this.id,n=this.scheduler,r=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Ef(r,this),null!=e&&(this.id=this.recycleAsyncId(n,e,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(sd),fd=1,dd={};function yd(t){return t in dd&&(delete dd[t],!0)}var hd=function(t){var e=fd++;return dd[e]=!0,ad||(ad=Promise.resolve()),ad.then((function(){return yd(e)&&t()})),e},vd=function(t){yd(t)},pd={setImmediate:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=pd.delegate;return((null==n?void 0:n.setImmediate)||hd).apply(void 0,If([],Sf(t)))},clearImmediate:function(t){return vd(t)},delegate:void 0},md=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return wf(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e._scheduled||(e._scheduled=pd.setImmediate(e.flush.bind(e,void 0))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);e.actions.some((function(t){return t.id===n}))||(pd.clearImmediate(n),e._scheduled=void 0)},e}(ld),bd=function(){function t(e,n){void 0===n&&(n=t.now),this.schedulerActionCtor=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.schedulerActionCtor(this,t).schedule(n,e)},t.now=id.now,t}(),gd=function(t){function e(e,n){void 0===n&&(n=bd.now);var r=t.call(this,e,n)||this;return r.actions=[],r._active=!1,r._scheduled=void 0,r}return wf(e,t),e.prototype.flush=function(t){var e=this.actions;if(this._active)e.push(t);else{var n;this._active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this._active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(bd);new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return wf(e,t),e.prototype.flush=function(t){this._active=!0;var e=this._scheduled;this._scheduled=void 0;var n,r=this.actions;t=t||r.shift();do{if(n=t.execute(t.state,t.delay))break}while((t=r[0])&&t.id===e&&r.shift());if(this._active=!1,n){for(;(t=r[0])&&t.id===e&&r.shift();)t.unsubscribe();throw n}},e}(gd))(md),new gd(ld);var wd=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return wf(e,t),e.prototype.schedule=function(e,n){return void 0===n&&(n=0),n>0?t.prototype.schedule.call(this,e,n):(this.delay=n,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,n){return n>0||this.closed?t.prototype.execute.call(this,e,n):this._execute(e,n)},e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0?t.prototype.requestAsyncId.call(this,e,n,r):e.flush(this)},e}(ld);new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return wf(e,t),e}(gd))(wd);var Ad=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return wf(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e._scheduled||(e._scheduled=ed.requestAnimationFrame((function(){return e.flush(void 0)}))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);e.actions.some((function(t){return t.id===n}))||(ed.cancelAnimationFrame(n),e._scheduled=void 0)},e}(ld);new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return wf(e,t),e.prototype.flush=function(t){this._active=!0;var e=this._scheduled;this._scheduled=void 0;var n,r=this.actions;t=t||r.shift();do{if(n=t.execute(t.state,t.delay))break}while((t=r[0])&&t.id===e&&r.shift());if(this._active=!1,n){for(;(t=r[0])&&t.id===e&&r.shift();)t.unsubscribe();throw n}},e}(gd))(Ad),function(t){function e(e,n){void 0===e&&(e=Id),void 0===n&&(n=1/0);var r=t.call(this,e,(function(){return r.frame}))||this;return r.maxFrames=n,r.frame=0,r.index=-1,r}wf(e,t),e.prototype.flush=function(){for(var t,e,n=this.actions,r=this.maxFrames;(e=n[0])&&e.delay<=r&&(n.shift(),this.frame=e.delay,!(t=e.execute(e.state,e.delay))););if(t){for(;e=n.shift();)e.unsubscribe();throw t}},e.frameTimeFactor=10}(gd);var Sd,Id=function(t){function e(e,n,r){void 0===r&&(r=e.index+=1);var o=t.call(this,e,n)||this;return o.scheduler=e,o.work=n,o.index=r,o.active=!0,o.index=e.index=r,o}return wf(e,t),e.prototype.schedule=function(n,r){if(void 0===r&&(r=0),Number.isFinite(r)){if(!this.id)return t.prototype.schedule.call(this,n,r);this.active=!1;var o=new e(this.scheduler,this.work);return this.add(o),o.schedule(n,r)}return Of.EMPTY},e.prototype.requestAsyncId=function(t,n,r){void 0===r&&(r=0),this.delay=t.frame+r;var o=t.actions;return o.push(this),o.sort(e.sortActions),!0},e.prototype.recycleAsyncId=function(t,e,n){},e.prototype._execute=function(e,n){if(!0===this.active)return t.prototype._execute.call(this,e,n)},e.sortActions=function(t,e){return t.delay===e.delay?t.index===e.index?0:t.index>e.index?1:-1:t.delay>e.delay?1:-1},e}(ld);new Kf((function(t){return t.complete()})),function(t){t.NEXT="N",t.ERROR="E",t.COMPLETE="C"}(Sd||(Sd={})),Tf((function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}})),Tf((function(t){return function(){t(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})),Tf((function(t){return function(e){t(this),this.name="NotFoundError",this.message=e}})),Tf((function(t){return function(e){t(this),this.name="SequenceError",this.message=e}})),Tf((function(t){return function(e){void 0===e&&(e=null),t(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=e}})),new Kf(qf);class _d extends mf{constructor(){super(...arguments),this.stateChanges=new rd}get[Symbol.toStringTag](){return this.constructor.name}observeStateChanges(){return this.stateChanges}send(t){const e=this.state;super.send(t);const r=this.state;this.stateChanges.next({event:t,oldState:e,newState:r}),n.isEmptyObject(this.schema[r])&&this.stateChanges.complete()}}class Td{constructor(){this.values=[],this.valueToValueIndex=[]}get[Symbol.toStringTag](){return this.constructor.name}*[Symbol.iterator](){for(const t of this.values)yield t}has(t){return n.isntUndefined(this.valueToValueIndex[t])}add(t){if(!this.has(t)){const e=this.values.length;this.values.push(t),this.valueToValueIndex[t]=e}}remove(t){if(this.has(t)){const e=this.values.pop();if(t!==e){const n=this.valueToValueIndex[t];this.values[n]=e,this.valueToValueIndex[e]=n,this.valueToValueIndex[t]=void 0}}}}export{bf as BadEventError,t as Box,qt as Emitter,yf as ExpirableMap,mf as FiniteStateMachine,Ct as HashMap,Mt as HashSet,$l as LRUMap,_d as ObservableFiniteStateMachine,zt as Queue,Td as SparseSet,hf as TLRUMap,pf as TrieMap,Pt as convertArrayToCons,Bt as convertConsToArray};
15
+ ***************************************************************************** */var _d=function(t,e){return(_d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function xd(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}_d(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function Td(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Od(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function Ed(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function jd(t){return"function"==typeof t}function Nd(t){var e=t((function(t){Error.call(t),t.stack=(new Error).stack}));return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var kd=Nd((function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}));function Bd(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Pd=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}var e;return t.prototype.unsubscribe=function(){var t,e,n,r,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=Td(o),s=a.next();!s.done;s=a.next()){s.value.remove(this)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else o.remove(this);var c=this.initialTeardown;if(jd(c))try{c()}catch(t){i=t instanceof kd?t.errors:[t]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var l=Td(u),f=l.next();!f.done;f=l.next()){var d=f.value;try{Md(d)}catch(t){i=null!=i?i:[],t instanceof kd?i=Ed(Ed([],Od(i)),Od(t.errors)):i.push(t)}}}catch(t){n={error:t}}finally{try{f&&!f.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}if(i)throw new kd(i)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Md(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(e)}},t.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},t.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},t.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&Bd(e,t)},t.prototype.remove=function(e){var n=this._finalizers;n&&Bd(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}(),qd=Pd.EMPTY;function Cd(t){return t instanceof Pd||t&&"closed"in t&&jd(t.remove)&&jd(t.add)&&jd(t.unsubscribe)}function Md(t){jd(t)?t():t.unsubscribe()}var zd={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Rd=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Ed([t,e],Od(n)))};function Fd(){}function Ud(t){t()}var Dd=function(t){function e(e){var n=t.call(this)||this;return n.isStopped=!1,e?(n.destination=e,Cd(e)&&e.add(n)):n.destination=Yd,n}return xd(e,t),e.create=function(t,e,n){return new Wd(t,e,n)},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Pd),Jd=Function.prototype.bind;function Ld(t,e){return Jd.call(t,e)}var Vd=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(t){Kd(t)}},t.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(t){Kd(t)}else Kd(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){Kd(t)}},t}(),Wd=function(t){function e(e,n,r){var i,o,a=t.call(this)||this;jd(e)||!e?i={next:null!=e?e:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:a&&zd.useDeprecatedNextContext?((o=Object.create(e)).unsubscribe=function(){return a.unsubscribe()},i={next:e.next&&Ld(e.next,o),error:e.error&&Ld(e.error,o),complete:e.complete&&Ld(e.complete,o)}):i=e;return a.destination=new Vd(i),a}return xd(e,t),e}(Dd);function Kd(t){var e;e=t,Rd((function(){throw e}))}var Yd={closed:!0,next:Fd,error:function(t){throw t},complete:Fd},$d="function"==typeof Symbol&&Symbol.observable||"@@observable";function Hd(t){return t}function Xd(t){return 0===t.length?Hd:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}var Gd=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r,i=this,o=(r=t)&&r instanceof Dd||function(t){return t&&jd(t.next)&&jd(t.error)&&jd(t.complete)}(r)&&Cd(r)?t:new Wd(t,e,n);return Ud((function(){var t=i,e=t.operator,n=t.source;o.add(e?e.call(o,n):n?i._subscribe(o):i._trySubscribe(o))})),o},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=Qd(e))((function(e,r){var i=new Wd({next:function(e){try{t(e)}catch(t){r(t),i.unsubscribe()}},error:r,complete:e});n.subscribe(i)}))},t.prototype._subscribe=function(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)},t.prototype[$d]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Xd(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=Qd(t))((function(t,n){var r;e.subscribe((function(t){return r=t}),(function(t){return n(t)}),(function(){return t(r)}))}))},t.create=function(e){return new t(e)},t}();function Qd(t){var e;return null!==(e=null!=t?t:zd.Promise)&&void 0!==e?e:Promise}function Zd(t){return jd(null==t?void 0:t.lift)}function ty(t,e,n,r,i){return new ey(t,e,n,r,i)}var ey=function(t){function e(e,n,r,i,o,a){var s=t.call(this,e)||this;return s.onFinalize=o,s.shouldUnsubscribe=a,s._next=n?function(t){try{n(t)}catch(t){e.error(t)}}:t.prototype._next,s._error=i?function(t){try{i(t)}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._error,s._complete=r?function(){try{r()}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._complete,s}return xd(e,t),e.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;t.prototype.unsubscribe.call(this),!n&&(null===(e=this.onFinalize)||void 0===e||e.call(this))}},e}(Dd);function ny(){return t=function(t,e){var n=null;t._refCount++;var r=ty(e,void 0,void 0,void 0,(function(){if(!t||t._refCount<=0||0<--t._refCount)n=null;else{var r=t._connection,i=n;n=null,!r||i&&r!==i||r.unsubscribe(),e.unsubscribe()}}));t.subscribe(r),r.closed||(n=t.connect())},function(e){if(Zd(e))return e.lift((function(e){try{return t(e,this)}catch(t){this.error(t)}}));throw new TypeError("Unable to lift unknown Observable type")};var t}!function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subjectFactory=n,r._subject=null,r._refCount=0,r._connection=null,Zd(e)&&(r.lift=e.lift),r}xd(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype._teardown=function(){this._refCount=0;var t=this._connection;this._subject=this._connection=null,null==t||t.unsubscribe()},e.prototype.connect=function(){var t=this,e=this._connection;if(!e){e=this._connection=new Pd;var n=this.getSubject();e.add(this.source.subscribe(ty(n,void 0,(function(){t._teardown(),n.complete()}),(function(e){t._teardown(),n.error(e)}),(function(){return t._teardown()})))),e.closed&&(this._connection=null,e=Pd.EMPTY)}return e},e.prototype.refCount=function(){return ny()(this)}}(Gd);var ry,iy,oy={now:function(){return(oy.delegate||performance).now()},delegate:void 0},ay={schedule:function(t){var e=requestAnimationFrame,n=cancelAnimationFrame,r=e((function(e){n=void 0,t(e)}));return new Pd((function(){return null==n?void 0:n(r)}))},requestAnimationFrame:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=ay.delegate;return((null==n?void 0:n.requestAnimationFrame)||requestAnimationFrame).apply(void 0,Ed([],Od(t)))},cancelAnimationFrame:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return cancelAnimationFrame.apply(void 0,Ed([],Od(t)))},delegate:void 0};iy=ay.schedule,new Gd((function(t){var e=new Pd,n=ry||oy,r=n.now(),i=function(o){var a=n.now();t.next({timestamp:ry?a:o,elapsed:a-r}),t.closed||e.add(iy(i))};return e.add(iy(i)),e}));var sy=Nd((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),cy=function(t){function e(){var e=t.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return xd(e,t),e.prototype.lift=function(t){var e=new uy(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new sy},e.prototype.next=function(t){var e=this;Ud((function(){var n,r;if(e._throwIfClosed(),!e.isStopped){e.currentObservers||(e.currentObservers=Array.from(e.observers));try{for(var i=Td(e.currentObservers),o=i.next();!o.done;o=i.next()){o.value.next(t)}}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}}))},e.prototype.error=function(t){var e=this;Ud((function(){if(e._throwIfClosed(),!e.isStopped){e.hasError=e.isStopped=!0,e.thrownError=t;for(var n=e.observers;n.length;)n.shift().error(t)}}))},e.prototype.complete=function(){var t=this;Ud((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}}))},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(e){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var e=this,n=this,r=n.hasError,i=n.isStopped,o=n.observers;return r||i?qd:(this.currentObservers=null,o.push(t),new Pd((function(){e.currentObservers=null,Bd(o,t)})))},e.prototype._checkFinalizedStatuses=function(t){var e=this,n=e.hasError,r=e.thrownError,i=e.isStopped;n?t.error(r):i&&t.complete()},e.prototype.asObservable=function(){var t=new Gd;return t.source=this,t},e.create=function(t,e){return new uy(t,e)},e}(Gd),uy=function(t){function e(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return xd(e,t),e.prototype.next=function(t){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===n||n.call(e,t)},e.prototype.error=function(t){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===n||n.call(e,t)},e.prototype.complete=function(){var t,e;null===(e=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===e||e.call(t)},e.prototype._subscribe=function(t){var e,n;return null!==(n=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==n?n:qd},e}(cy);!function(t){function e(e){var n=t.call(this)||this;return n._value=e,n}xd(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return!n.closed&&e.next(this._value),n},e.prototype.getValue=function(){var t=this,e=t.hasError,n=t.thrownError,r=t._value;if(e)throw n;return this._throwIfClosed(),r},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)}}(cy);var ly={now:function(){return(ly.delegate||Date).now()},delegate:void 0};!function(t){function e(e,n,r){void 0===e&&(e=1/0),void 0===n&&(n=1/0),void 0===r&&(r=ly);var i=t.call(this)||this;return i._bufferSize=e,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,e),i._windowTime=Math.max(1,n),i}xd(e,t),e.prototype.next=function(e){var n=this,r=n.isStopped,i=n._buffer,o=n._infiniteTimeWindow,a=n._timestampProvider,s=n._windowTime;r||(i.push(e),!o&&i.push(a.now()+s)),this._trimBuffer(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var e=this._innerSubscribe(t),n=this._infiniteTimeWindow,r=this._buffer.slice(),i=0;i<r.length&&!t.closed;i+=n?1:2)t.next(r[i]);return this._checkFinalizedStatuses(t),e},e.prototype._trimBuffer=function(){var t=this,e=t._bufferSize,n=t._timestampProvider,r=t._buffer,i=t._infiniteTimeWindow,o=(i?1:2)*e;if(e<1/0&&o<r.length&&r.splice(0,r.length-o),!i){for(var a=n.now(),s=0,c=1;c<r.length&&r[c]<=a;c+=2)s=c;s&&r.splice(0,s+1)}}}(cy),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._value=null,e._hasValue=!1,e._isComplete=!1,e}xd(e,t),e.prototype._checkFinalizedStatuses=function(t){var e=this,n=e.hasError,r=e._hasValue,i=e._value,o=e.thrownError,a=e.isStopped,s=e._isComplete;n?t.error(o):(a||s)&&(r&&t.next(i),t.complete())},e.prototype.next=function(t){this.isStopped||(this._value=t,this._hasValue=!0)},e.prototype.complete=function(){var e=this,n=e._hasValue,r=e._value;e._isComplete||(this._isComplete=!0,n&&t.prototype.next.call(this,r),t.prototype.complete.call(this))}}(cy);var fy,dy=function(t){function e(e,n){return t.call(this)||this}return xd(e,t),e.prototype.schedule=function(t,e){return this},e}(Pd),yy=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,Ed([t,e],Od(n)))},hy=function(t){return clearInterval(t)},vy=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r.pending=!1,r}return xd(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),yy(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return e;hy(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var n,r=!1;try{this.work(t)}catch(t){r=!0,n=t||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),n},e.prototype.unsubscribe=function(){if(!this.closed){var e=this.id,n=this.scheduler,r=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Bd(r,this),null!=e&&(this.id=this.recycleAsyncId(n,e,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(dy),py=1,my={};function by(t){return t in my&&(delete my[t],!0)}var gy=function(t){var e=py++;return my[e]=!0,fy||(fy=Promise.resolve()),fy.then((function(){return by(e)&&t()})),e},wy=function(t){by(t)},Ay={setImmediate:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Ay.delegate;return((null==n?void 0:n.setImmediate)||gy).apply(void 0,Ed([],Od(t)))},clearImmediate:function(t){return wy(t)},delegate:void 0},Iy=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return xd(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e._scheduled||(e._scheduled=Ay.setImmediate(e.flush.bind(e,void 0))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);e.actions.some((function(t){return t.id===n}))||(Ay.clearImmediate(n),e._scheduled=void 0)},e}(vy),Sy=function(){function t(e,n){void 0===n&&(n=t.now),this.schedulerActionCtor=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.schedulerActionCtor(this,t).schedule(n,e)},t.now=ly.now,t}(),_y=function(t){function e(e,n){void 0===n&&(n=Sy.now);var r=t.call(this,e,n)||this;return r.actions=[],r._active=!1,r._scheduled=void 0,r}return xd(e,t),e.prototype.flush=function(t){var e=this.actions;if(this._active)e.push(t);else{var n;this._active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this._active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(Sy);new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return xd(e,t),e.prototype.flush=function(t){this._active=!0;var e=this._scheduled;this._scheduled=void 0;var n,r=this.actions;t=t||r.shift();do{if(n=t.execute(t.state,t.delay))break}while((t=r[0])&&t.id===e&&r.shift());if(this._active=!1,n){for(;(t=r[0])&&t.id===e&&r.shift();)t.unsubscribe();throw n}},e}(_y))(Iy),new _y(vy);var xy=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return xd(e,t),e.prototype.schedule=function(e,n){return void 0===n&&(n=0),n>0?t.prototype.schedule.call(this,e,n):(this.delay=n,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,n){return n>0||this.closed?t.prototype.execute.call(this,e,n):this._execute(e,n)},e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0?t.prototype.requestAsyncId.call(this,e,n,r):e.flush(this)},e}(vy);new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return xd(e,t),e}(_y))(xy);var Ty=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return xd(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e._scheduled||(e._scheduled=ay.requestAnimationFrame((function(){return e.flush(void 0)}))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);e.actions.some((function(t){return t.id===n}))||(ay.cancelAnimationFrame(n),e._scheduled=void 0)},e}(vy);new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return xd(e,t),e.prototype.flush=function(t){this._active=!0;var e=this._scheduled;this._scheduled=void 0;var n,r=this.actions;t=t||r.shift();do{if(n=t.execute(t.state,t.delay))break}while((t=r[0])&&t.id===e&&r.shift());if(this._active=!1,n){for(;(t=r[0])&&t.id===e&&r.shift();)t.unsubscribe();throw n}},e}(_y))(Ty),function(t){function e(e,n){void 0===e&&(e=Ey),void 0===n&&(n=1/0);var r=t.call(this,e,(function(){return r.frame}))||this;return r.maxFrames=n,r.frame=0,r.index=-1,r}xd(e,t),e.prototype.flush=function(){for(var t,e,n=this.actions,r=this.maxFrames;(e=n[0])&&e.delay<=r&&(n.shift(),this.frame=e.delay,!(t=e.execute(e.state,e.delay))););if(t){for(;e=n.shift();)e.unsubscribe();throw t}},e.frameTimeFactor=10}(_y);var Oy,Ey=function(t){function e(e,n,r){void 0===r&&(r=e.index+=1);var i=t.call(this,e,n)||this;return i.scheduler=e,i.work=n,i.index=r,i.active=!0,i.index=e.index=r,i}return xd(e,t),e.prototype.schedule=function(n,r){if(void 0===r&&(r=0),Number.isFinite(r)){if(!this.id)return t.prototype.schedule.call(this,n,r);this.active=!1;var i=new e(this.scheduler,this.work);return this.add(i),i.schedule(n,r)}return Pd.EMPTY},e.prototype.requestAsyncId=function(t,n,r){void 0===r&&(r=0),this.delay=t.frame+r;var i=t.actions;return i.push(this),i.sort(e.sortActions),!0},e.prototype.recycleAsyncId=function(t,e,n){},e.prototype._execute=function(e,n){if(!0===this.active)return t.prototype._execute.call(this,e,n)},e.sortActions=function(t,e){return t.delay===e.delay?t.index===e.index?0:t.index>e.index?1:-1:t.delay>e.delay?1:-1},e}(vy);new Gd((function(t){return t.complete()})),function(t){t.NEXT="N",t.ERROR="E",t.COMPLETE="C"}(Oy||(Oy={})),Nd((function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}})),Nd((function(t){return function(){t(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})),Nd((function(t){return function(e){t(this),this.name="NotFoundError",this.message=e}})),Nd((function(t){return function(e){t(this),this.name="SequenceError",this.message=e}})),Nd((function(t){return function(e){void 0===e&&(e=null),t(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=e}})),new Gd(Fd);class jy extends Id{constructor(){super(...arguments),this.stateChanges=new cy}get[Symbol.toStringTag](){return this.constructor.name}observeStateChanges(){return this.stateChanges}send(t){const e=this.state;super.send(t);const r=this.state;this.stateChanges.next({event:t,oldState:e,newState:r}),n.isEmptyObject(this.schema[r])&&this.stateChanges.complete()}}class Ny{constructor(){this.values=[],this.valueToValueIndex=[]}get[Symbol.toStringTag](){return this.constructor.name}*[Symbol.iterator](){for(const t of this.values)yield t}has(t){return n.isntUndefined(this.valueToValueIndex[t])}add(t){if(!this.has(t)){const e=this.values.length;this.values.push(t),this.valueToValueIndex[t]=e}}remove(t){if(this.has(t)){const e=this.values.pop();if(t!==e){const n=this.valueToValueIndex[t];this.values[n]=e,this.valueToValueIndex[e]=n,this.valueToValueIndex[t]=void 0}}}}class ky{constructor(t,{capacity:e=0,growthFactor:n=1.5}={}){this.typedArrayConstructor=t,this._length=0,Ut.assert(Number.isInteger(e),"capacity must be an integer"),Ut.assert(e>=0,"capacity must be greater than or equal to 0"),Ut.assert(n>1,"growthFactory must be greater than or equal to 1"),this.array=new t(e),this.growthFactor=n}get[Symbol.toStringTag](){return this.constructor.name}get capacity(){return this.array.length}get length(){return this._length}set(t,e){if(t>=this.capacity){const e=By(this.capacity,t+1,this.growthFactor);this.resize(e)}t>=this._length&&(this._length=t+1),this.array[t]=e}get(t){return t<this._length?this.array[t]:void 0}push(...t){const e=this._length+t.length;if(e>this.capacity){const t=By(this.capacity,e,this.growthFactor);this.resize(t)}for(const e of t)this.array[this._length++]=e}pop(){if(this._length>0){const t=this.array[this._length-1];this._length--;const e=By(this.capacity,this.length,this.growthFactor);return this.resize(e),t}}resize(t){if(this.array.length!==t)if(this.array.length<t){const e=new this.typedArrayConstructor(t);e.set(this.array),this.array=e}else if(this.array.length>t){const e=new this.typedArrayConstructor(t);for(let n=t;n--;)e[n]=this.array[n];this.array=e}}}function By(t,e,n){if(t===e)return e;if(t<e){let r=Math.max(t,1);for(;r<e;)r*=n;return Math.floor(r)}if(0===e)return 0;{let r=t;for(;;){const t=r/n;if(t<e)break;r=t}return Math.floor(r)}}export{Sd as BadEventError,t as Box,ky as DynamicTypedArray,Mt as Emitter,bd as ExpirableMap,Id as FiniteStateMachine,zt as HashMap,Rt as HashSet,td as LRUMap,jy as ObservableFiniteStateMachine,Ft as Queue,Ny as SparseSet,gd as TLRUMap,Ad as TrieMap,Ct as convertArrayToCons,qt as convertConsToArray};
16
16
  //# sourceMappingURL=index.min.mjs.map