@blackglory/structures 0.10.0 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/README.md +18 -1
  2. package/dist/es2015/index.min.mjs +2 -2
  3. package/dist/es2015/index.min.mjs.map +1 -1
  4. package/dist/es2015/index.mjs +198 -3
  5. package/dist/es2015/index.mjs.map +1 -1
  6. package/dist/es2015/index.umd.js +198 -2
  7. package/dist/es2015/index.umd.js.map +1 -1
  8. package/dist/es2015/index.umd.min.js +2 -2
  9. package/dist/es2015/index.umd.min.js.map +1 -1
  10. package/dist/es2018/index.min.mjs +2 -2
  11. package/dist/es2018/index.min.mjs.map +1 -1
  12. package/dist/es2018/index.mjs +198 -3
  13. package/dist/es2018/index.mjs.map +1 -1
  14. package/dist/es2018/index.umd.js +198 -2
  15. package/dist/es2018/index.umd.js.map +1 -1
  16. package/dist/es2018/index.umd.min.js +2 -2
  17. package/dist/es2018/index.umd.min.js.map +1 -1
  18. package/lib/es2015/index.d.ts +1 -0
  19. package/lib/es2015/index.js +1 -0
  20. package/lib/es2015/index.js.map +1 -1
  21. package/lib/es2015/sorted-set.d.ts +10 -0
  22. package/lib/es2015/sorted-set.js +32 -0
  23. package/lib/es2015/sorted-set.js.map +1 -0
  24. package/lib/es2015/sparse-set.d.ts +1 -0
  25. package/lib/es2015/sparse-set.js +8 -2
  26. package/lib/es2015/sparse-set.js.map +1 -1
  27. package/lib/es2015/utils/skip-list.d.ts +24 -0
  28. package/lib/es2015/utils/skip-list.js +155 -0
  29. package/lib/es2015/utils/skip-list.js.map +1 -0
  30. package/lib/es2018/index.d.ts +1 -0
  31. package/lib/es2018/index.js +1 -0
  32. package/lib/es2018/index.js.map +1 -1
  33. package/lib/es2018/sorted-set.d.ts +10 -0
  34. package/lib/es2018/sorted-set.js +32 -0
  35. package/lib/es2018/sorted-set.js.map +1 -0
  36. package/lib/es2018/sparse-set.d.ts +1 -0
  37. package/lib/es2018/sparse-set.js +8 -2
  38. package/lib/es2018/sparse-set.js.map +1 -1
  39. package/lib/es2018/utils/skip-list.d.ts +24 -0
  40. package/lib/es2018/utils/skip-list.js +155 -0
  41. package/lib/es2018/utils/skip-list.js.map +1 -0
  42. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Structures={})}(this,(function(t){"use strict";class e{constructor(t){this.value=t}get[Symbol.toStringTag](){return this.constructor.name}set(t){this.value=t}get(){return this.value}}var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},r={},i={};function o(t){return Array.isArray(t)}i.isntEmptyArray=i.isEmptyArray=i.isntArray=i.isArray=void 0,i.isArray=o,i.isntArray=function(t){return!o(t)},i.isEmptyArray=function(t){return 0===t.length},i.isntEmptyArray=function(t){return 0!==t.length};var s={},a={};function c(t){return null===t}a.isntNull=a.isNull=void 0,a.isNull=c,a.isntNull=function(t){return!c(t)};var u={};function l(t){return void 0===t}u.isntUndefined=u.isUndefined=void 0,u.isUndefined=l,u.isntUndefined=function(t){return!l(t)};var f={};function d(t){return"function"==typeof t}f.isntFunction=f.isFunction=void 0,f.isFunction=d,f.isntFunction=function(t){return!d(t)},s.isntAsyncIterable=s.isAsyncIterable=void 0;const y=a,h=u,v=f;function p(t){return(0,y.isntNull)(t)&&(0,h.isntUndefined)(t)&&(0,v.isFunction)(t[Symbol.asyncIterator])}s.isAsyncIterable=p,s.isntAsyncIterable=function(t){return!p(t)};var m={};function b(t){return"bigint"==typeof t}m.isntBigInt=m.isBigInt=void 0,m.isBigInt=b,m.isntBigInt=function(t){return!b(t)};var g={};function w(t){return"boolean"==typeof t}g.isntBoolean=g.isBoolean=void 0,g.isBoolean=w,g.isntBoolean=function(t){return!w(t)};var A={},T={};function x(t){return"string"==typeof t}T.isntString=T.isString=void 0,T.isString=x,T.isntString=function(t){return!x(t)},A.isntChar=A.isChar=void 0;const I=T;function S(t){return(0,I.isString)(t)&&1===t.length}A.isChar=S,A.isntChar=function(t){return!S(t)};var _={};function E(t){return t instanceof Date}_.isntDate=_.isDate=void 0,_.isDate=E,_.isntDate=function(t){return!E(t)};var O={};O.inEnum=void 0,O.inEnum=function(t,e){return Object.values(e).includes(t)};var j={};function N(t){return t instanceof Error}j.isntError=j.isError=void 0,j.isError=N,j.isntError=function(t){return!N(t)};var k={};function B(t){return!t}k.isntFalsy=k.isFalsy=void 0,k.isFalsy=B,k.isntFalsy=function(t){return!B(t)};var P={};P.isntIterable=P.isIterable=void 0;const q=a,C=u,M=f;function R(t){return(0,q.isntNull)(t)&&(0,C.isntUndefined)(t)&&(0,M.isFunction)(t[Symbol.iterator])}P.isIterable=R,P.isntIterable=function(t){return!R(t)};var z={},F={};function U(t){return"number"==typeof t}function D(t){return Number.isNaN(t)}F.isntNaN=F.isNaN=F.isNegativeInfinity=F.isPositiveInfinity=F.isFinite=F.isntNumber=F.isNumber=void 0,F.isNumber=U,F.isntNumber=function(t){return!U(t)},F.isFinite=function(t){return Number.isFinite(t)},F.isPositiveInfinity=function(t){return t===1/0},F.isNegativeInfinity=function(t){return t===-1/0},F.isNaN=D,F.isntNaN=function(t){return!D(t)};var V={},J="object"==typeof n&&n&&n.Object===Object&&n,K="object"==typeof self&&self&&self.Object===Object&&self,L=(J||K||Function("return this")()).Symbol,W=L,Y=Object.prototype,H=Y.hasOwnProperty,$=Y.toString,Q=W?W.toStringTag:void 0;var X=function(t){var e=H.call(t,Q),n=t[Q];try{t[Q]=void 0;var r=!0}catch(t){}var i=$.call(t);return r&&(e?t[Q]=n:delete t[Q]),i},G=Object.prototype.toString;var Z=X,tt=function(t){return G.call(t)},et=L?L.toStringTag:void 0;var nt=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":et&&et in Object(t)?Z(t):tt(t)};var rt=function(t,e){return function(n){return t(e(n))}}(Object.getPrototypeOf,Object);var it=nt,ot=rt,st=function(t){return null!=t&&"object"==typeof t},at=Function.prototype,ct=Object.prototype,ut=at.toString,lt=ct.hasOwnProperty,ft=ut.call(Object);var dt=function(t){if(!st(t)||"[object Object]"!=it(t))return!1;var e=ot(t);if(null===e)return!0;var n=lt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ut.call(n)==ft},yt=n&&n.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};V.isntEmptyObject=V.isEmptyObject=V.isntPlainObject=V.isPlainObject=V.isntObject=V.isObject=void 0;const ht=yt(dt);function vt(t){return null!==t&&"object"==typeof t}function pt(t){return(0,ht.default)(t)}V.isObject=vt,V.isntObject=function(t){return!vt(t)},V.isPlainObject=pt,V.isntPlainObject=function(t){return!pt(t)},V.isEmptyObject=function(t){return 0===Object.keys(t).length},V.isntEmptyObject=function(t){return 0!==Object.keys(t).length},z.isntJsonable=z.isJsonable=z.isntJson=z.isJson=void 0;const mt=a,bt=g,gt=T,wt=F,At=i,Tt=V;function xt(t){return(0,mt.isNull)(t)||(0,bt.isBoolean)(t)||(0,gt.isString)(t)||(0,wt.isNumber)(t)||(0,At.isArray)(t)&&t.every(xt)||(0,Tt.isPlainObject)(t)&&Object.values(t).every(xt)}z.isJson=xt,z.isntJson=function(t){return!xt(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 St=V,_t=f;function Et(t){return t instanceof Promise}function Ot(t){return(0,St.isObject)(t)&&(0,_t.isFunction)(t.then)}It.isPromise=Et,It.isntPromise=function(t){return!Et(t)},It.isntPromiseLike=function(t){return!Ot(t)},It.isPromiseLike=Ot;var jt={};jt.isAbsoluteURL=void 0,jt.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}};var Nt={};function kt(t){return t instanceof RegExp}Nt.isntRegExp=Nt.isRegExp=void 0,Nt.isRegExp=kt,Nt.isntRegExp=function(t){return!kt(t)},function(t){var e=n&&n.__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=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(i,t),r(s,t),r(m,t),r(g,t),r(A,t),r(_,t),r(O,t),r(j,t),r(k,t),r(f,t),r(P,t),r(z,t),r(a,t),r(F,t),r(V,t),r(It,t),r(T,t),r(u,t),r(jt,t),r(Nt,t)}(r);class Bt{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 Pt{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 qt{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 Ct{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 Mt={},Rt={},zt={},Ft={},Ut={},Dt={},Vt={};Vt.go=void 0,Vt.go=function(t){return t()},function(t){var e=n&&n.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]});(n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)})(Vt,t)}(Dt);var Jt={},Kt={},Lt={},Wt={},Yt={},Ht={},$t={CustomError:void 0};class Qt extends Error{get name(){return this.constructor.name}}$t.CustomError=Qt;var Xt={ExpectedError:void 0};const Gt=$t;class Zt extends Gt.CustomError{}Xt.ExpectedError=Zt;var te={AssertionError:void 0};const ee=$t;class ne extends ee.CustomError{}te.AssertionError=ne;var re={};re.normalize=void 0,re.normalize=function(t){var e;return{name:t.name,message:t.message,stack:null!==(e=t.stack)&&void 0!==e?e:null}};var ie={refute:void 0};const oe=Xt;ie.refute=function(t,e){if(t)throw new oe.ExpectedError(e)};var se={assert:void 0};const ae=te;se.assert=function(t,e){if(!t)throw new ae.AssertionError(e)},function(t){var e=n&&n.__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=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r($t,t),r(Xt,t),r(te,t),r(re,t),r(ie,t),r(se,t)}(Ht),Yt.chunkAsync=void 0;const ce=Dt,ue=Ht;Yt.chunkAsync=function(t,e){return(0,ue.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,ue.assert)(e>0,"The parameter size must be greater than 0"),(0,ce.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 le={},fe={},de={};function ye(t){return Array.isArray(t)}de.isntEmptyArray=de.isEmptyArray=de.isntArray=de.isArray=void 0,de.isArray=ye,de.isntArray=function(t){return!ye(t)},de.isEmptyArray=function(t){return 0===t.length},de.isntEmptyArray=function(t){return 0!==t.length};var he={},ve={};function pe(t){return null===t}ve.isntNull=ve.isNull=void 0,ve.isNull=pe,ve.isntNull=function(t){return!pe(t)};var me={};function be(t){return void 0===t}me.isntUndefined=me.isUndefined=void 0,me.isUndefined=be,me.isntUndefined=function(t){return!be(t)},he.isntAsyncIterable=he.isAsyncIterable=void 0;const ge=ve,we=me;function Ae(t){return(0,ge.isntNull)(t)&&(0,we.isntUndefined)(t)&&"function"==typeof t[Symbol.asyncIterator]}he.isAsyncIterable=Ae,he.isntAsyncIterable=function(t){return!Ae(t)};var Te={};function xe(t){return"bigint"==typeof t}Te.isntBigInt=Te.isBigInt=void 0,Te.isBigInt=xe,Te.isntBigInt=function(t){return!xe(t)};var Ie={};function Se(t){return"boolean"==typeof t}Ie.isntBoolean=Ie.isBoolean=void 0,Ie.isBoolean=Se,Ie.isntBoolean=function(t){return!Se(t)};var _e={},Ee={};function Oe(t){return"string"==typeof t}Ee.isntString=Ee.isString=void 0,Ee.isString=Oe,Ee.isntString=function(t){return!Oe(t)},_e.isntChar=_e.isChar=void 0;const je=Ee;function Ne(t){return(0,je.isString)(t)&&1===t.length}_e.isChar=Ne,_e.isntChar=function(t){return!Ne(t)};var ke={};function Be(t){return t instanceof Date}ke.isntDate=ke.isDate=void 0,ke.isDate=Be,ke.isntDate=function(t){return!Be(t)};var Pe={};Pe.inEnum=void 0,Pe.inEnum=function(t,e){return Object.values(e).includes(t)};var qe={};function Ce(t){return t instanceof Error}qe.isntError=qe.isError=void 0,qe.isError=Ce,qe.isntError=function(t){return!Ce(t)};var Me={};function Re(t){return!t}Me.isntFalsy=Me.isFalsy=void 0,Me.isFalsy=Re,Me.isntFalsy=function(t){return!Re(t)};var ze={};function Fe(t){return"function"==typeof t}ze.isntFunction=ze.isFunction=void 0,ze.isFunction=Fe,ze.isntFunction=function(t){return!Fe(t)};var Ue={};Ue.isntIterable=Ue.isIterable=void 0;const De=ve,Ve=me;function Je(t){return(0,De.isntNull)(t)&&(0,Ve.isntUndefined)(t)&&"function"==typeof t[Symbol.iterator]}Ue.isIterable=Je,Ue.isntIterable=function(t){return!Je(t)};var Ke={},Le={};var We=Function.prototype,Ye=Object.prototype,He=We.toString,$e=Ye.hasOwnProperty,Qe=He.call(Object),Xe=Ye.toString,Ge=function(t,e){return function(n){return t(e(n))}}(Object.getPrototypeOf,Object);var Ze=function(t){if(!function(t){return!!t&&"object"==typeof t}(t)||"[object Object]"!=Xe.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=Ge(t);if(null===e)return!0;var n=$e.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&He.call(n)==Qe},tn=n&&n.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Le.isntEmptyObject=Le.isEmptyObject=Le.isntPlainObject=Le.isPlainObject=Le.isntObject=Le.isObject=void 0;const en=tn(Ze);function nn(t){return null!==t&&"object"==typeof t}function rn(t){return(0,en.default)(t)}Le.isObject=nn,Le.isntObject=function(t){return!nn(t)},Le.isPlainObject=rn,Le.isntPlainObject=function(t){return!rn(t)},Le.isEmptyObject=function(t){return 0===Object.keys(t).length},Le.isntEmptyObject=function(t){return 0!==Object.keys(t).length};var on={};function sn(t){return"number"==typeof t}on.isntNumber=on.isNumber=void 0,on.isNumber=sn,on.isntNumber=function(t){return!sn(t)},Ke.isntJsonRpcError=Ke.isJsonRpcError=Ke.isntJsonRpcSuccess=Ke.isJsonRpcSuccess=Ke.isntJsonRpcRequest=Ke.isJsonRpcRequest=Ke.isntJsonRpcNotification=Ke.isJsonRpcNotification=void 0;const an=de,cn=Le,un=Ee,ln=on,fn=me;function dn(t){return(0,un.isString)(t)||(0,ln.isNumber)(t)}function yn(t){return(0,an.isArray)(t)||(0,cn.isObject)(t)}function hn(t){return(0,cn.isPlainObject)(t)&&(0,un.isString)(t.jsonrpc)&&(0,un.isString)(t.method)&&(0,fn.isUndefined)(t.id)&&yn(t.params)}function vn(t){return(0,cn.isPlainObject)(t)&&(0,un.isString)(t.jsonrpc)&&(0,un.isString)(t.method)&&dn(t.id)&&yn(t.params)}function pn(t){return(0,cn.isPlainObject)(t)&&(0,un.isString)(t.jsonrpc)&&(0,un.isString)(t.id)&&"result"in t}function mn(t){return(0,cn.isPlainObject)(t)&&(0,un.isString)(t.jsonrpc)&&dn(t.id)&&function(t){return(0,cn.isPlainObject)(t)&&(0,ln.isNumber)(t.code)&&(0,un.isString)(t.message)&&((0,fn.isUndefined)(t.data)||(0,cn.isObject)(t.data))}(t.error)}Ke.isJsonRpcNotification=hn,Ke.isntJsonRpcNotification=function(t){return!hn(t)},Ke.isJsonRpcRequest=vn,Ke.isntJsonRpcRequest=function(t){return!vn(t)},Ke.isJsonRpcSuccess=pn,Ke.isntJsonRpcSuccess=function(t){return!pn(t)},Ke.isJsonRpcError=mn,Ke.isntJsonRpcError=function(t){return!mn(t)};var bn={};bn.isntJson=bn.isJson=void 0,bn.isJson=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},bn.isntJson=function t(e){return!t()};var gn={};gn.isAbsoluteURL=void 0,gn.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}},function(t){var e=n&&n.__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=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(de,t),r(he,t),r(Te,t),r(Ie,t),r(_e,t),r(ke,t),r(Pe,t),r(qe,t),r(Me,t),r(ze,t),r(Ue,t),r(Ke,t),r(bn,t),r(ve,t),r(on,t),r(Le,t),r(Ee,t),r(me,t),r(gn,t)}(fe),le.chunkByAsync=void 0;const wn=fe;le.chunkByAsync=function(t,e){return(0,wn.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 An={};An.chunkBy=void 0,An.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 xn=Dt,In=Ht;Tn.chunk=function(t,e){return(0,In.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,In.assert)(e>0,"The parameter size must be greater than 0"),(0,xn.go)((function*(){let n=[];for(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var Sn={concatAsync:void 0};const _n=fe,En=Dt;Sn.concatAsync=function(t,...e){return(0,En.go)((async function*(){for(const n of[t,...e])if((0,_n.isAsyncIterable)(n))for await(const t of n)yield t;else for(const t of n)yield t}))};var On={concat:void 0};const jn=Dt;On.concat=function(t,...e){return(0,jn.go)((function*(){for(const n of[t,...e])yield*n}))};var Nn={},kn={};kn.copyIterable=kn.copyAsyncIterable=void 0,kn.copyAsyncIterable=async function*(t){for await(const e of t)yield e},kn.copyIterable=function*(t){for(const e of t)yield e},Nn.dropAsync=void 0;const Bn=Dt,Pn=kn,qn=Ht;Nn.dropAsync=function(t,e){return(0,qn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,qn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Pn.copyAsyncIterable)(t):(0,Bn.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 Cn={dropRightAsync:void 0};const Mn=Dt,Rn=kn,zn=Ht;Cn.dropRightAsync=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,Rn.copyAsyncIterable)(t):(0,Mn.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 Un=Dt,Dn=kn,Vn=Ht;Fn.dropRight=function(t,e){return(0,Vn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Vn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Dn.copyIterable)(t):(0,Un.go)((function*(){const n=Array.from(t);yield*n.slice(0,-e)}))};var Jn={dropUntilAsync:void 0};const Kn=fe;Jn.dropUntilAsync=function(t,e){return(0,Kn.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 Ln={};Ln.dropUntil=void 0,Ln.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 Wn={drop:void 0};const Yn=Dt,Hn=kn,$n=Ht;Wn.drop=function(t,e){return(0,$n.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,$n.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Hn.copyIterable)(t):(0,Yn.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 Qn={filterAsync:void 0};const Xn=fe;Qn.filterAsync=function(t,e){return(0,Xn.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 Gn={};Gn.filter=void 0,Gn.filter=function*(t,e){let n=0;for(const r of t)e(r,n)&&(yield r),n++};var Zn={},tr={},er={flattenByAsync:void 0};const nr=fe;function rr(t){return(0,nr.isIterable)(t)&&(0,nr.isntChar)(t)}er.flattenByAsync=function(t,e){return(0,nr.isAsyncIterable)(t)?async function*(t){const r=1;for await(const i of t)rr(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)rr(i)&&await e(i,r)?yield*n(i,r+1):yield i}},tr.flattenDeepAsync=void 0;const ir=er,or=Ht;tr.flattenDeepAsync=function(t,e=1/0){return(0,or.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,or.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,ir.flattenByAsync)(t,((t,n)=>n<=e))},Zn.flattenAsync=void 0;const sr=tr;Zn.flattenAsync=function(t){return(0,sr.flattenDeepAsync)(t,1)};var ar={flattenBy:void 0};const cr=fe;ar.flattenBy=function(t,e){return function*t(n,r){for(const o of n)(0,cr.isIterable)(i=o)&&(0,cr.isntChar)(i)&&e(o,r)?yield*t(o,r+1):yield o;var i}(t,1)};var ur={flattenDeep:void 0};const lr=ar,fr=Ht;ur.flattenDeep=function(t,e=1/0){return(0,fr.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,fr.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,lr.flattenBy)(t,((t,n)=>n<=e))};var dr={flatten:void 0};const yr=ur;dr.flatten=function(t){return(0,yr.flattenDeep)(t,1)};var hr={mapAsync:void 0};const vr=fe;hr.mapAsync=function(t,e){return(0,vr.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 pr={};pr.map=void 0,pr.map=function*(t,e){let n=0;for(const r of t)yield e(r,n),n++};var mr={repeatAsync:void 0};const br=Dt,gr=Ht;mr.repeatAsync=function(t,e){return(0,gr.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,gr.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,br.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 wr={repeat:void 0};const Ar=Dt,Tr=Ht;wr.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,Ar.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 xr={sliceAsync:void 0};const Ir=Dt,Sr=Ht;xr.sliceAsync=function(t,e,n=1/0){return(0,Sr.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,Sr.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,Sr.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Sr.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,Ir.go)((async function*(){let r=0;for await(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var _r={slice:void 0};const Er=Dt,Or=Ht;_r.slice=function(t,e,n=1/0){return(0,Or.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,Or.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,Or.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Or.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,Er.go)((function*(){let r=0;for(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var jr={};jr.splitAsync=void 0,jr.splitAsync=async function*(t,e){let n=[];for await(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Nr={splitByAsync:void 0};const kr=fe;Nr.splitByAsync=function(t,e){return(0,kr.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 Br={};Br.splitBy=void 0,Br.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 Pr={};Pr.split=void 0,Pr.split=function*(t,e){let n=[];for(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var qr={takeAsync:void 0};const Cr=Dt,Mr=Ht;qr.takeAsync=function(t,e){return(0,Mr.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Mr.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Cr.go)((async function*(){if(0!==e)for await(const n of t)if(yield n,0===--e)break}))};var Rr={takeRightAsync:void 0};const zr=Dt,Fr=Ht;Rr.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,zr.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 Ur={takeRight:void 0};const Dr=Dt,Vr=Ht;Ur.takeRight=function(t,e){return(0,Vr.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Vr.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Dr.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 Jr={takeUntilAsync:void 0};const Kr=fe;Jr.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 Lr={};Lr.takeUntil=void 0,Lr.takeUntil=function*(t,e){let n=0;for(const r of t){if(e(r,n))break;yield r,n++}};var Wr={take:void 0};const Yr=Dt,Hr=Ht;Wr.take=function(t,e){return(0,Hr.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Hr.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Yr.go)((function*(){if(0!==e)for(const n of t)if(yield n,0===--e)break}))};var $r={tapAsync:void 0};const Qr=fe;$r.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 Xr={};Xr.tap=void 0,Xr.tap=function*(t,e){let n=0;for(const r of t)e(r,n),yield r,n++};var Gr={};Gr.toAsyncIterable=void 0,Gr.toAsyncIterable=async function*(t){for(const e of t)yield e};var Zr={};Zr.transformAsync=void 0,Zr.transformAsync=async function*(t,e){yield*e(t)};var ti={};ti.transform=void 0,ti.transform=function*(t,e){yield*e(t)};var ei={};ei.uniqAsync=void 0,ei.uniqAsync=async function*(t){const e=new Set;for await(const n of t)e.has(n)||(yield n,e.add(n))};var ni={uniqByAsync:void 0};const ri=fe;ni.uniqByAsync=function(t,e){return(0,ri.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 ii={};ii.uniqBy=void 0,ii.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 oi={};oi.uniq=void 0,oi.uniq=function*(t){const e=new Set;for(const n of t)e.has(n)||(yield n,e.add(n))};var si={zipAsync:void 0};const ai=fe;var ci;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(ci||(ci={})),si.zipAsync=function(t,...e){return async function*(...t){var e,n,r,i;const o=t.length,s=t.map((t=>(0,ai.isAsyncIterable)(t)?[ci.Async,t[Symbol.asyncIterator]()]:[ci.Sync,t[Symbol.iterator]()])),a=s.map((()=>!1));try{for(;;){const t=new Array(o);for(let e=0;e<o;e++){const[n,r]=s[e];let i;if(i=n===ci.Async?await r.next():r.next(),i.done)return void(a[e]=!0);t[e]=i.value}yield t}}finally{const t=s.filter(((t,e)=>!a[e]));for(const[o,s]of t)o===ci.Async?await(null===(n=(e=s).return)||void 0===n?void 0:n.call(e)):null===(i=(r=s).return)||void 0===i||i.call(r)}}(t,...e)};var ui={};ui.zip=void 0,ui.zip=function(t,...e){return function*(...t){const e=t.length,n=t.map((t=>t[Symbol.iterator]())),r=n.map((()=>!1));try{for(;;){const t=new Array(e);for(let i=0;i<e;i++){const{value:e,done:o}=n[i].next();if(o)return void(r[i]=!0);t[i]=e}yield t}}finally{n.filter(((t,e)=>!r[e])).forEach((t=>{var e;return null===(e=t.return)||void 0===e?void 0:e.call(t)}))}}(t,...e)},function(t){var e=n&&n.__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=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(Yt,t),r(le,t),r(An,t),r(Tn,t),r(Sn,t),r(On,t),r(Nn,t),r(Cn,t),r(Fn,t),r(Jn,t),r(Ln,t),r(Wn,t),r(Qn,t),r(Gn,t),r(Zn,t),r(er,t),r(ar,t),r(tr,t),r(ur,t),r(dr,t),r(hr,t),r(pr,t),r(mr,t),r(wr,t),r(xr,t),r(_r,t),r(jr,t),r(Nr,t),r(Br,t),r(Pr,t),r(qr,t),r(Rr,t),r(Ur,t),r(Jr,t),r(Lr,t),r(Wr,t),r($r,t),r(Xr,t),r(Gr,t),r(Zr,t),r(ti,t),r(ei,t),r(ni,t),r(ii,t),r(oi,t),r(si,t),r(ui,t)}(Wt);var li={},fi={};fi.consume=void 0,fi.consume=function(t,e){return e(t)};var di={eachAsync:void 0};const yi=fe;di.eachAsync=function(t,e){return(0,yi.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 hi={};hi.each=void 0,hi.each=function(t,e){let n=0;for(const r of t)e(r,n),n++};var vi={everyAsync:void 0};const pi=fe;vi.everyAsync=function(t,e){return(0,pi.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 mi={};mi.every=void 0,mi.every=function(t,e){let n=0;for(const r of t){if(!e(r,n))return!1;n++}return!0};var bi={findAsync:void 0};const gi=fe;bi.findAsync=function(t,e){return(0,gi.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))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 wi={};wi.find=void 0,wi.find=function(t,e){let n=0;for(const r of t){if(e(r,n))return r;n++}};var Ai={};Ai.firstAsync=void 0,Ai.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 xi={};xi.includesAsync=void 0,xi.includesAsync=async function(t,e){for await(const n of t)if(n===e)return!0;return!1};var Ii={};Ii.includes=void 0,Ii.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1};var Si={};Si.matchAsync=void 0,Si.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 _i={};_i.match=void 0,_i.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 Ei={reduceAsync:void 0};const Oi=fe;Ei.reduceAsync=function(t,e,n){return(0,Oi.isUndefined)(n)?function(t,e){return(0,Oi.isAsyncIterable)(t)?n(t):r(t);async function n(t){var n;const r=t[Symbol.asyncIterator]();let i;try{let t,s=await o(r),a=1;for(;({value:t,done:i}=await r.next()),!i;)s=await e(s,t,a++);return s}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}async function o(t){const e=await t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}async function r(t){var n;const r=t[Symbol.iterator]();let i;try{let t,s=o(r),a=1;for(;({value:t,done:i}=r.next()),!i;)s=await e(s,t,a++);return s}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}}(t,e):function(t,e,n){return(0,Oi.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 ji={reduce:void 0};const Ni=fe;ji.reduce=function(t,e,n){return(0,Ni.isUndefined)(n)?function(t,e){var n;const r=t[Symbol.iterator]();let i;try{let t,s=o(r),a=1;for(;({value:t,done:i}=r.next()),!i;)s=e(s,t,a++);return s}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}(t,e):function(t,e,n){let r=n,i=0;for(const n of t)r=e(r,n,i++);return r}(t,e,n)};var ki={someAsync:void 0};const Bi=fe;ki.someAsync=function(t,e){return(0,Bi.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 Pi={};Pi.some=void 0,Pi.some=function(t,e){let n=0;for(const r of t){if(e(r,n))return!0;n++}return!1};var qi={};qi.lastAsync=void 0,qi.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 Ci={};Ci.last=void 0,Ci.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 Mi={toArrayAsync:void 0};const Ri=fi;Mi.toArrayAsync=function(t){return(0,Ri.consume)(t,(async t=>{const e=[];for await(const n of t)e.push(n);return e}))};var zi={toArray:void 0};const Fi=fi;zi.toArray=function(t){return(0,Fi.consume)(t,(t=>Array.from(t)))};var Ui={toSetAsync:void 0};const Di=fi;Ui.toSetAsync=function(t){return(0,Di.consume)(t,(async t=>{const e=new Set;for await(const n of t)e.add(n);return e}))};var Vi={toSet:void 0};const Ji=fi;Vi.toSet=function(t){return(0,Ji.consume)(t,(t=>new Set(t)))},function(t){var e=n&&n.__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=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(fi,t),r(di,t),r(hi,t),r(vi,t),r(mi,t),r(bi,t),r(wi,t),r(Ai,t),r(Ti,t),r(xi,t),r(Ii,t),r(Si,t),r(_i,t),r(Ei,t),r(ji,t),r(ki,t),r(Pi,t),r(qi,t),r(Ci,t),r(Mi,t),r(zi,t),r(Ui,t),r(Vi,t)}(li),function(t){var e=n&&n.__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=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(Wt,t),r(li,t)}(Lt);var Ki={},Li={};Li.traverseErrorPrototypeChain=void 0,Li.traverseErrorPrototypeChain=function*(t){let e=t;for(;(e=Object.getPrototypeOf(e))&&(yield e,e!==Error.prototype););},Ki.getErrorNames=void 0;const Wi=fe,Yi=Li;Ki.getErrorNames=function*(t){var e;if((0,Wi.isError)(t))for(const n of(0,Yi.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 Hi={isSerializableError:void 0};const $i=fe;Hi.isSerializableError=function(t){return(0,$i.isObject)(t)&&(0,$i.isString)(t.name)&&(0,$i.isString)(t.message)&&((0,$i.isString)(t.stack)||(0,$i.isNull)(t.stack))&&(0,$i.isArray)(t.ancestors)&&t.ancestors.every($i.isString)},Kt.CustomError=void 0;const Qi=Lt,Xi=Ki,Gi=fe,Zi=Hi;class to extends Error{get name(){var t,e;return null!==(e=null!==(t=(0,Qi.first)((0,Xi.getErrorNames)(this)))&&void 0!==t?t:to.name)&&void 0!==e?e:"CustomError"}static[Symbol.hasInstance](t){var e;if((0,Gi.isError)(t)||(0,Zi.isSerializableError)(t)){const n=[null!==(e=this.prototype.constructor.name)&&void 0!==e?e:this.name,...(0,Xi.getErrorNames)(this.prototype)].reverse(),r=(0,Qi.toArray)((0,Xi.getErrorNames)(t)).reverse();return n.every(((t,e)=>t===r[e]))}return!1}}Kt.CustomError=to;var eo={AssertionError:void 0};const no=Kt;class ro extends no.CustomError{}eo.AssertionError=ro;var io={normalize:void 0};const oo=Ki,so=Lt;io.normalize=function(t){var e;const[n,...r]=(0,so.toArray)((0,oo.getErrorNames)(t));return{name:n,ancestors:r,message:t.message,stack:null!==(e=t.stack)&&void 0!==e?e:null}};var ao={},co={},uo={};uo.pass=void 0,uo.pass=function(){},function(t){var e=n&&n.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]});(n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)})(uo,t)}(co),ao.hydrate=void 0;const lo=co;function fo(t,e){const n=function(){(0,lo.pass)()};return(n.prototype=Object.create(t.prototype)).constructor=n,Object.defineProperty(n,"name",{value:e}),n}ao.hydrate=function(t){var e;const n=[t.name,...t.ancestors].slice(0,-1).reverse();let r=Error;for(const t of n)r=fo(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 yo={assert:void 0};const ho=eo;yo.assert=function(t,e){if(!t)throw new ho.AssertionError(e)},function(t){var e=n&&n.__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=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(Kt,t),r(eo,t),r(Hi,t),r(io,t),r(ao,t),r(yo,t),r(Ki,t),r(Li,t)}(Jt),Ut.chunkAsync=void 0;const vo=Dt,po=Jt;Ut.chunkAsync=function(t,e){return(0,po.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,po.assert)(e>0,"The parameter size must be greater than 0"),(0,vo.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 mo={chunkByAsync:void 0};const bo=fe;mo.chunkByAsync=function(t,e){return(0,bo.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 go={};go.chunkBy=void 0,go.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 wo={chunk:void 0};const Ao=Dt,To=Jt;wo.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,Ao.go)((function*(){let n=[];for(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var xo={concatAsync:void 0};const Io=fe,So=Dt;xo.concatAsync=function(t,...e){return(0,So.go)((async function*(){for(const n of[t,...e])if((0,Io.isAsyncIterable)(n))for await(const t of n)yield t;else for(const t of n)yield t}))};var _o={concat:void 0};const Eo=Dt;_o.concat=function(t,...e){return(0,Eo.go)((function*(){for(const n of[t,...e])yield*n}))};var Oo={},jo={};jo.copyIterable=jo.copyAsyncIterable=void 0,jo.copyAsyncIterable=async function*(t){for await(const e of t)yield e},jo.copyIterable=function*(t){for(const e of t)yield e},Oo.dropAsync=void 0;const No=Dt,ko=jo,Bo=Jt;Oo.dropAsync=function(t,e){return(0,Bo.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Bo.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,ko.copyAsyncIterable)(t):(0,No.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 Po={dropRightAsync:void 0};const qo=Dt,Co=jo,Mo=Jt;Po.dropRightAsync=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*(){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 Ro={dropRight:void 0};const zo=Dt,Fo=jo,Uo=Jt;Ro.dropRight=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.copyIterable)(t):(0,zo.go)((function*(){const n=Array.from(t);yield*n.slice(0,-e)}))};var Do={dropUntilAsync:void 0};const Vo=fe;Do.dropUntilAsync=function(t,e){return(0,Vo.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 Jo={};Jo.dropUntil=void 0,Jo.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 Ko={drop:void 0};const Lo=Dt,Wo=jo,Yo=Jt;Ko.drop=function(t,e){return(0,Yo.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Yo.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Wo.copyIterable)(t):(0,Lo.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 Ho={filterAsync:void 0};const $o=fe;Ho.filterAsync=function(t,e){return(0,$o.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 Qo={};Qo.filter=void 0,Qo.filter=function*(t,e){let n=0;for(const r of t)e(r,n)&&(yield r),n++};var Xo={},Go={},Zo={flattenByAsync:void 0};const ts=fe;function es(t){return(0,ts.isIterable)(t)&&(0,ts.isntChar)(t)}Zo.flattenByAsync=function(t,e){return(0,ts.isAsyncIterable)(t)?async function*(t){const r=1;for await(const i of t)es(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)es(i)&&await e(i,r)?yield*n(i,r+1):yield i}},Go.flattenDeepAsync=void 0;const ns=Zo,rs=Jt;Go.flattenDeepAsync=function(t,e=1/0){return(0,rs.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,rs.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,ns.flattenByAsync)(t,((t,n)=>n<=e))},Xo.flattenAsync=void 0;const is=Go;Xo.flattenAsync=function(t){return(0,is.flattenDeepAsync)(t,1)};var os={flattenBy:void 0};const ss=fe;os.flattenBy=function(t,e){return function*t(n,r){for(const o of n)(0,ss.isIterable)(i=o)&&(0,ss.isntChar)(i)&&e(o,r)?yield*t(o,r+1):yield o;var i}(t,1)};var as={flattenDeep:void 0};const cs=os,us=Jt;as.flattenDeep=function(t,e=1/0){return(0,us.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,us.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,cs.flattenBy)(t,((t,n)=>n<=e))};var ls={flatten:void 0};const fs=as;ls.flatten=function(t){return(0,fs.flattenDeep)(t,1)};var ds={mapAsync:void 0};const ys=fe;ds.mapAsync=function(t,e){return(0,ys.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 hs={};hs.map=void 0,hs.map=function*(t,e){let n=0;for(const r of t)yield e(r,n),n++};var vs={repeatAsync:void 0};const ps=Dt,ms=Jt;vs.repeatAsync=function(t,e){return(0,ms.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,ms.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,ps.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 bs={repeat:void 0};const gs=Dt,ws=Jt;bs.repeat=function(t,e){return(0,ws.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,ws.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,gs.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 As={sliceAsync:void 0};const Ts=Dt,xs=Jt;As.sliceAsync=function(t,e,n=1/0){return(0,xs.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,xs.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,xs.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,xs.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,Ts.go)((async function*(){let r=0;for await(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var Is={slice:void 0};const Ss=Dt,_s=Jt;Is.slice=function(t,e,n=1/0){return(0,_s.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,_s.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,_s.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,_s.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,Ss.go)((function*(){let r=0;for(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var Es={};Es.splitAsync=void 0,Es.splitAsync=async function*(t,e){let n=[];for await(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Os={splitByAsync:void 0};const js=fe;Os.splitByAsync=function(t,e){return(0,js.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 Ns={};Ns.splitBy=void 0,Ns.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 ks={};ks.split=void 0,ks.split=function*(t,e){let n=[];for(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Bs={takeAsync:void 0};const Ps=Dt,qs=Jt;Bs.takeAsync=function(t,e){return(0,qs.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,qs.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Ps.go)((async function*(){if(0!==e)for await(const n of t)if(yield n,0===--e)break}))};var Cs={takeRightAsync:void 0};const Ms=Dt,Rs=Jt;Cs.takeRightAsync=function(t,e){return(0,Rs.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Rs.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Ms.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 zs={takeRight:void 0};const Fs=Dt,Us=Jt;zs.takeRight=function(t,e){return(0,Us.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Us.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Fs.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 Ds={takeUntilAsync:void 0};const Vs=fe;Ds.takeUntilAsync=function(t,e){return(0,Vs.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 Js={};Js.takeUntil=void 0,Js.takeUntil=function*(t,e){let n=0;for(const r of t){if(e(r,n))break;yield r,n++}};var Ks={take:void 0};const Ls=Dt,Ws=Jt;Ks.take=function(t,e){return(0,Ws.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Ws.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Ls.go)((function*(){if(0!==e)for(const n of t)if(yield n,0===--e)break}))};var Ys={tapAsync:void 0};const Hs=fe;Ys.tapAsync=function(t,e){return(0,Hs.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 $s={};$s.tap=void 0,$s.tap=function*(t,e){let n=0;for(const r of t)e(r,n),yield r,n++};var Qs={};Qs.toAsyncIterable=void 0,Qs.toAsyncIterable=async function*(t){for(const e of t)yield e};var Xs={};Xs.transformAsync=void 0,Xs.transformAsync=async function*(t,e){yield*e(t)};var Gs={};Gs.transform=void 0,Gs.transform=function*(t,e){yield*e(t)};var Zs={};Zs.uniqAsync=void 0,Zs.uniqAsync=async function*(t){const e=new Set;for await(const n of t)e.has(n)||(yield n,e.add(n))};var ta={uniqByAsync:void 0};const ea=fe;ta.uniqByAsync=function(t,e){return(0,ea.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 na={};na.uniqBy=void 0,na.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 ra={};ra.uniq=void 0,ra.uniq=function*(t){const e=new Set;for(const n of t)e.has(n)||(yield n,e.add(n))};var ia={zipAsync:void 0};const oa=fe;var sa;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(sa||(sa={})),ia.zipAsync=function(t,...e){return async function*(...t){var e,n,r,i;const o=t.length,s=t.map((t=>(0,oa.isAsyncIterable)(t)?[sa.Async,t[Symbol.asyncIterator]()]:[sa.Sync,t[Symbol.iterator]()])),a=s.map((()=>!1));try{for(;;){const t=new Array(o);for(let e=0;e<o;e++){const[n,r]=s[e];let i;if(i=n===sa.Async?await r.next():r.next(),i.done)return void(a[e]=!0);t[e]=i.value}yield t}}finally{const t=s.filter(((t,e)=>!a[e]));for(const[o,s]of t)o===sa.Async?await(null===(n=(e=s).return)||void 0===n?void 0:n.call(e)):null===(i=(r=s).return)||void 0===i||i.call(r)}}(t,...e)};var aa={};aa.zip=void 0,aa.zip=function(t,...e){return function*(...t){const e=t.length,n=t.map((t=>t[Symbol.iterator]())),r=n.map((()=>!1));try{for(;;){const t=new Array(e);for(let i=0;i<e;i++){const{value:e,done:o}=n[i].next();if(o)return void(r[i]=!0);t[i]=e}yield t}}finally{n.filter(((t,e)=>!r[e])).forEach((t=>{var e;return null===(e=t.return)||void 0===e?void 0:e.call(t)}))}}(t,...e)},function(t){var e=n&&n.__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=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(Ut,t),r(mo,t),r(go,t),r(wo,t),r(xo,t),r(_o,t),r(Oo,t),r(Po,t),r(Ro,t),r(Do,t),r(Jo,t),r(Ko,t),r(Ho,t),r(Qo,t),r(Xo,t),r(Zo,t),r(os,t),r(Go,t),r(as,t),r(ls,t),r(ds,t),r(hs,t),r(vs,t),r(bs,t),r(As,t),r(Is,t),r(Es,t),r(Os,t),r(Ns,t),r(ks,t),r(Bs,t),r(Cs,t),r(zs,t),r(Ds,t),r(Js,t),r(Ks,t),r(Ys,t),r($s,t),r(Qs,t),r(Xs,t),r(Gs,t),r(Zs,t),r(ta,t),r(na,t),r(ra,t),r(ia,t),r(aa,t)}(Ft);var ca={},ua={};ua.consume=void 0,ua.consume=function(t,e){return e(t)};var la={eachAsync:void 0};const fa=fe;la.eachAsync=function(t,e){return(0,fa.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 da={};da.each=void 0,da.each=function(t,e){let n=0;for(const r of t)e(r,n),n++};var ya={everyAsync:void 0};const ha=fe;ya.everyAsync=function(t,e){return(0,ha.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 va={};va.every=void 0,va.every=function(t,e){let n=0;for(const r of t){if(!e(r,n))return!1;n++}return!0};var pa={findAsync:void 0};const ma=fe;pa.findAsync=function(t,e){return(0,ma.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 ba={};ba.find=void 0,ba.find=function(t,e){let n=0;for(const r of t){if(e(r,n))return r;n++}};var ga={};ga.firstAsync=void 0,ga.firstAsync=async function(t){for await(const e of t)return e};var wa={};wa.first=void 0,wa.first=function(t){for(const e of t)return e};var Aa={};Aa.includesAsync=void 0,Aa.includesAsync=async function(t,e){for await(const n of t)if(n===e)return!0;return!1};var Ta={};Ta.includes=void 0,Ta.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1};var xa={};xa.matchAsync=void 0,xa.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 Ia={};Ia.match=void 0,Ia.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 Sa={reduceAsync:void 0};const _a=fe;Sa.reduceAsync=function(t,e,n){return(0,_a.isUndefined)(n)?function(t,e){return(0,_a.isAsyncIterable)(t)?n(t):r(t);async function n(t){var n;const r=t[Symbol.asyncIterator]();let i;try{let t,s=await o(r),a=1;for(;({value:t,done:i}=await r.next()),!i;)s=await e(s,t,a++);return s}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}async function o(t){const e=await t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}async function r(t){var n;const r=t[Symbol.iterator]();let i;try{let t,s=o(r),a=1;for(;({value:t,done:i}=r.next()),!i;)s=await e(s,t,a++);return s}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}}(t,e):function(t,e,n){return(0,_a.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 Ea={reduce:void 0};const Oa=fe;Ea.reduce=function(t,e,n){return(0,Oa.isUndefined)(n)?function(t,e){var n;const r=t[Symbol.iterator]();let i;try{let t,s=o(r),a=1;for(;({value:t,done:i}=r.next()),!i;)s=e(s,t,a++);return s}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}(t,e):function(t,e,n){let r=n,i=0;for(const n of t)r=e(r,n,i++);return r}(t,e,n)};var ja={someAsync:void 0};const Na=fe;ja.someAsync=function(t,e){return(0,Na.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 ka={};ka.some=void 0,ka.some=function(t,e){let n=0;for(const r of t){if(e(r,n))return!0;n++}return!1};var Ba={};Ba.lastAsync=void 0,Ba.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 Pa={};Pa.last=void 0,Pa.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 qa={toArrayAsync:void 0};const Ca=ua;qa.toArrayAsync=function(t){return(0,Ca.consume)(t,(async t=>{const e=[];for await(const n of t)e.push(n);return e}))};var Ma={toArray:void 0};const Ra=ua;Ma.toArray=function(t){return(0,Ra.consume)(t,(t=>Array.from(t)))};var za={toSetAsync:void 0};const Fa=ua;za.toSetAsync=function(t){return(0,Fa.consume)(t,(async t=>{const e=new Set;for await(const n of t)e.add(n);return e}))};var Ua={toSet:void 0};const Da=ua;Ua.toSet=function(t){return(0,Da.consume)(t,(t=>new Set(t)))},function(t){var e=n&&n.__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=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(ua,t),r(la,t),r(da,t),r(ya,t),r(va,t),r(pa,t),r(ba,t),r(ga,t),r(wa,t),r(Aa,t),r(Ta,t),r(xa,t),r(Ia,t),r(Sa,t),r(Ea,t),r(ja,t),r(ka,t),r(Ba,t),r(Pa,t),r(qa,t),r(Ma,t),r(za,t),r(Ua,t)}(ca),function(t){var e=n&&n.__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=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(Ft,t),r(ca,t)}(zt);var Va={},Ja={};Ja.traverseErrorPrototypeChain=void 0,Ja.traverseErrorPrototypeChain=function*(t){let e=t;for(;(e=Object.getPrototypeOf(e))&&(yield e,e!==Error.prototype););},Va.getErrorNames=void 0;const Ka=fe,La=Ja;Va.getErrorNames=function*(t){var e;if((0,Ka.isError)(t))for(const n of(0,La.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 Wa={isSerializableError:void 0};const Ya=fe;Wa.isSerializableError=function(t){return(0,Ya.isObject)(t)&&(0,Ya.isString)(t.name)&&(0,Ya.isString)(t.message)&&((0,Ya.isString)(t.stack)||(0,Ya.isNull)(t.stack))&&(0,Ya.isArray)(t.ancestors)&&t.ancestors.every(Ya.isString)},Rt.CustomError=void 0;const Ha=zt,$a=Va,Qa=fe,Xa=Wa;class Ga extends Error{get name(){var t,e;return null!==(e=null!==(t=(0,Ha.first)((0,$a.getErrorNames)(this)))&&void 0!==t?t:Ga.name)&&void 0!==e?e:"CustomError"}static[Symbol.hasInstance](t){var e;if((0,Qa.isError)(t)||(0,Xa.isSerializableError)(t)){const n=[null!==(e=this.prototype.constructor.name)&&void 0!==e?e:this.name,...(0,$a.getErrorNames)(this.prototype)].reverse(),r=(0,Ha.toArray)((0,$a.getErrorNames)(t)).reverse();return n.every(((t,e)=>t===r[e]))}return!1}}Rt.CustomError=Ga;var Za={AssertionError:void 0};const tc=Rt;class ec extends tc.CustomError{}Za.AssertionError=ec;var nc={normalize:void 0};const rc=Va,ic=zt;nc.normalize=function(t){var e;const[n,...r]=(0,ic.toArray)((0,rc.getErrorNames)(t));return{name:n,ancestors:r,message:t.message,stack:null!==(e=t.stack)&&void 0!==e?e:null}};var oc={},sc={},ac={};ac.pass=void 0,ac.pass=function(){},function(t){var e=n&&n.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]});(n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)})(ac,t)}(sc),oc.hydrate=void 0;const cc=sc;function uc(t,e){const n=function(){(0,cc.pass)()};return(n.prototype=Object.create(t.prototype)).constructor=n,Object.defineProperty(n,"name",{value:e}),n}oc.hydrate=function(t){var e;const n=[t.name,...t.ancestors].slice(0,-1).reverse();let r=Error;for(const t of n)r=uc(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 lc={assert:void 0};const fc=Za;lc.assert=function(t,e){if(!t)throw new fc.AssertionError(e)},function(t){var e=n&&n.__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=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(Rt,t),r(Za,t),r(Wa,t),r(nc,t),r(oc,t),r(lc,t),r(Va,t),r(Ja,t)}(Mt);var dc={},yc={},hc={},vc={},pc={};pc.go=void 0,pc.go=function(t){return t()},function(t){var e=n&&n.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]});(n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)})(pc,t)}(vc),hc.chunkAsync=void 0;const mc=vc,bc=Mt;hc.chunkAsync=function(t,e){return(0,bc.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,bc.assert)(e>0,"The parameter size must be greater than 0"),(0,mc.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 gc={},wc={},Ac={};function Tc(t){return Array.isArray(t)}Ac.isntEmptyArray=Ac.isEmptyArray=Ac.isntArray=Ac.isArray=void 0,Ac.isArray=Tc,Ac.isntArray=function(t){return!Tc(t)},Ac.isEmptyArray=function(t){return 0===t.length},Ac.isntEmptyArray=function(t){return 0!==t.length};var xc={},Ic={};function Sc(t){return null===t}Ic.isntNull=Ic.isNull=void 0,Ic.isNull=Sc,Ic.isntNull=function(t){return!Sc(t)};var _c={};function Ec(t){return void 0===t}_c.isntUndefined=_c.isUndefined=void 0,_c.isUndefined=Ec,_c.isntUndefined=function(t){return!Ec(t)};var Oc={};function jc(t){return"function"==typeof t}Oc.isntFunction=Oc.isFunction=void 0,Oc.isFunction=jc,Oc.isntFunction=function(t){return!jc(t)},xc.isntAsyncIterable=xc.isAsyncIterable=void 0;const Nc=Ic,kc=_c,Bc=Oc;function Pc(t){return(0,Nc.isntNull)(t)&&(0,kc.isntUndefined)(t)&&(0,Bc.isFunction)(t[Symbol.asyncIterator])}xc.isAsyncIterable=Pc,xc.isntAsyncIterable=function(t){return!Pc(t)};var qc={};function Cc(t){return"bigint"==typeof t}qc.isntBigInt=qc.isBigInt=void 0,qc.isBigInt=Cc,qc.isntBigInt=function(t){return!Cc(t)};var Mc={};function Rc(t){return"boolean"==typeof t}Mc.isntBoolean=Mc.isBoolean=void 0,Mc.isBoolean=Rc,Mc.isntBoolean=function(t){return!Rc(t)};var zc={},Fc={};function Uc(t){return"string"==typeof t}Fc.isntString=Fc.isString=void 0,Fc.isString=Uc,Fc.isntString=function(t){return!Uc(t)},zc.isntChar=zc.isChar=void 0;const Dc=Fc;function Vc(t){return(0,Dc.isString)(t)&&1===t.length}zc.isChar=Vc,zc.isntChar=function(t){return!Vc(t)};var Jc={};function Kc(t){return t instanceof Date}Jc.isntDate=Jc.isDate=void 0,Jc.isDate=Kc,Jc.isntDate=function(t){return!Kc(t)};var Lc={};Lc.inEnum=void 0,Lc.inEnum=function(t,e){return Object.values(e).includes(t)};var Wc={};function Yc(t){return t instanceof Error}Wc.isntError=Wc.isError=void 0,Wc.isError=Yc,Wc.isntError=function(t){return!Yc(t)};var Hc={};function $c(t){return!t}Hc.isntFalsy=Hc.isFalsy=void 0,Hc.isFalsy=$c,Hc.isntFalsy=function(t){return!$c(t)};var Qc={};Qc.isntIterable=Qc.isIterable=void 0;const Xc=Ic,Gc=_c,Zc=Oc;function tu(t){return(0,Xc.isntNull)(t)&&(0,Gc.isntUndefined)(t)&&(0,Zc.isFunction)(t[Symbol.iterator])}Qc.isIterable=tu,Qc.isntIterable=function(t){return!tu(t)};var eu={},nu={};function ru(t){return"number"==typeof t}function iu(t){return Number.isNaN(t)}nu.isntNaN=nu.isNaN=nu.isNegativeInfinity=nu.isPositiveInfinity=nu.isFinite=nu.isntNumber=nu.isNumber=void 0,nu.isNumber=ru,nu.isntNumber=function(t){return!ru(t)},nu.isFinite=function(t){return Number.isFinite(t)},nu.isPositiveInfinity=function(t){return t===1/0},nu.isNegativeInfinity=function(t){return t===-1/0},nu.isNaN=iu,nu.isntNaN=function(t){return!iu(t)};var ou={},su=n&&n.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};ou.isntEmptyObject=ou.isEmptyObject=ou.isntPlainObject=ou.isPlainObject=ou.isntObject=ou.isObject=void 0;const au=su(dt);function cu(t){return null!==t&&"object"==typeof t}function uu(t){return(0,au.default)(t)}ou.isObject=cu,ou.isntObject=function(t){return!cu(t)},ou.isPlainObject=uu,ou.isntPlainObject=function(t){return!uu(t)},ou.isEmptyObject=function(t){return 0===Object.keys(t).length},ou.isntEmptyObject=function(t){return 0!==Object.keys(t).length},eu.isntJsonable=eu.isJsonable=eu.isntJson=eu.isJson=void 0;const lu=Ic,fu=Mc,du=Fc,yu=nu,hu=Ac,vu=ou;function pu(t){return(0,lu.isNull)(t)||(0,fu.isBoolean)(t)||(0,du.isString)(t)||(0,yu.isNumber)(t)||(0,hu.isArray)(t)&&t.every(pu)||(0,vu.isPlainObject)(t)&&Object.values(t).every(pu)}eu.isJson=pu,eu.isntJson=function(t){return!pu(t)},eu.isJsonable=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},eu.isntJsonable=function t(e){return!t()};var mu={};mu.isPromiseLike=mu.isntPromiseLike=mu.isntPromise=mu.isPromise=void 0;const bu=ou,gu=Oc;function wu(t){return t instanceof Promise}function Au(t){return(0,bu.isObject)(t)&&(0,gu.isFunction)(t.then)}mu.isPromise=wu,mu.isntPromise=function(t){return!wu(t)},mu.isntPromiseLike=function(t){return!Au(t)},mu.isPromiseLike=Au;var Tu={};Tu.isAbsoluteURL=void 0,Tu.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}},function(t){var e=n&&n.__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=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(Ac,t),r(xc,t),r(qc,t),r(Mc,t),r(zc,t),r(Jc,t),r(Lc,t),r(Wc,t),r(Hc,t),r(Oc,t),r(Qc,t),r(eu,t),r(Ic,t),r(nu,t),r(ou,t),r(mu,t),r(Fc,t),r(_c,t),r(Tu,t)}(wc),gc.chunkByAsync=void 0;const xu=wc;gc.chunkByAsync=function(t,e){return(0,xu.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 Iu={};Iu.chunkBy=void 0,Iu.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 Su={chunk:void 0};const _u=vc,Eu=Mt;Su.chunk=function(t,e){return(0,Eu.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,Eu.assert)(e>0,"The parameter size must be greater than 0"),(0,_u.go)((function*(){let n=[];for(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var Ou={concatAsync:void 0};const ju=wc,Nu=vc;Ou.concatAsync=function(t,...e){return(0,Nu.go)((async function*(){for(const n of[t,...e])if((0,ju.isAsyncIterable)(n))for await(const t of n)yield t;else for(const t of n)yield t}))};var ku={concat:void 0};const Bu=vc;ku.concat=function(t,...e){return(0,Bu.go)((function*(){for(const n of[t,...e])yield*n}))};var Pu={},qu={};qu.copyIterable=qu.copyAsyncIterable=void 0,qu.copyAsyncIterable=async function*(t){for await(const e of t)yield e},qu.copyIterable=function*(t){for(const e of t)yield e},Pu.dropAsync=void 0;const Cu=vc,Mu=qu,Ru=Mt;Pu.dropAsync=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===e?(0,Mu.copyAsyncIterable)(t):(0,Cu.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 zu={dropRightAsync:void 0};const Fu=vc,Uu=qu,Du=Mt;zu.dropRightAsync=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*(){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 Vu={dropRight:void 0};const Ju=vc,Ku=qu,Lu=Mt;Vu.dropRight=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===e?(0,Ku.copyIterable)(t):(0,Ju.go)((function*(){const n=Array.from(t);yield*n.slice(0,-e)}))};var Wu={dropUntilAsync:void 0};const Yu=wc;Wu.dropUntilAsync=function(t,e){return(0,Yu.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 Hu={};Hu.dropUntil=void 0,Hu.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 $u={drop:void 0};const Qu=vc,Xu=qu,Gu=Mt;$u.drop=function(t,e){return(0,Gu.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Gu.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Xu.copyIterable)(t):(0,Qu.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 Zu={filterAsync:void 0};const tl=wc;Zu.filterAsync=function(t,e){return(0,tl.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n)&&(yield r),n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n)&&(yield r),n++}(t)};var el={};el.filter=void 0,el.filter=function*(t,e){let n=0;for(const r of t)e(r,n)&&(yield r),n++};var nl={},rl={},il={flattenByAsync:void 0};const ol=wc;function sl(t){return(0,ol.isIterable)(t)&&(0,ol.isntChar)(t)}il.flattenByAsync=function(t,e){return(0,ol.isAsyncIterable)(t)?async function*(t){const r=1;for await(const i of t)sl(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)sl(i)&&await e(i,r)?yield*n(i,r+1):yield i}},rl.flattenDeepAsync=void 0;const al=il,cl=Mt;rl.flattenDeepAsync=function(t,e=1/0){return(0,cl.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,cl.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,al.flattenByAsync)(t,((t,n)=>n<=e))},nl.flattenAsync=void 0;const ul=rl;nl.flattenAsync=function(t){return(0,ul.flattenDeepAsync)(t,1)};var ll={flattenBy:void 0};const fl=wc;ll.flattenBy=function(t,e){return function*t(n,r){for(const o of n)(0,fl.isIterable)(i=o)&&(0,fl.isntChar)(i)&&e(o,r)?yield*t(o,r+1):yield o;var i}(t,1)};var dl={flattenDeep:void 0};const yl=ll,hl=Mt;dl.flattenDeep=function(t,e=1/0){return(0,hl.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,hl.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,yl.flattenBy)(t,((t,n)=>n<=e))};var vl={flatten:void 0};const pl=dl;vl.flatten=function(t){return(0,pl.flattenDeep)(t,1)};var ml={mapAsync:void 0};const bl=wc;ml.mapAsync=function(t,e){return(0,bl.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 gl={};gl.map=void 0,gl.map=function*(t,e){let n=0;for(const r of t)yield e(r,n),n++};var wl={repeatAsync:void 0};const Al=vc,Tl=Mt;wl.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,Al.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 xl={repeat:void 0};const Il=vc,Sl=Mt;xl.repeat=function(t,e){return(0,Sl.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,Sl.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,Il.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 _l={sliceAsync:void 0};const El=vc,Ol=Mt;_l.sliceAsync=function(t,e,n=1/0){return(0,Ol.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,Ol.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,Ol.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Ol.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,El.go)((async function*(){let r=0;for await(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var jl={slice:void 0};const Nl=vc,kl=Mt;jl.slice=function(t,e,n=1/0){return(0,kl.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,kl.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,kl.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,kl.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,Nl.go)((function*(){let r=0;for(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var Bl={};Bl.splitAsync=void 0,Bl.splitAsync=async function*(t,e){let n=[];for await(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Pl={splitByAsync:void 0};const ql=wc;Pl.splitByAsync=function(t,e){return(0,ql.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 Cl={};Cl.splitBy=void 0,Cl.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 Ml={};Ml.split=void 0,Ml.split=function*(t,e){let n=[];for(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Rl={takeAsync:void 0};const zl=vc,Fl=Mt;Rl.takeAsync=function(t,e){return(0,Fl.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Fl.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,zl.go)((async function*(){if(0!==e)for await(const n of t)if(yield n,0===--e)break}))};var Ul={takeRightAsync:void 0};const Dl=vc,Vl=Mt;Ul.takeRightAsync=function(t,e){return(0,Vl.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Vl.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Dl.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 Jl={takeRight:void 0};const Kl=vc,Ll=Mt;Jl.takeRight=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,Kl.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 Wl={takeUntilAsync:void 0};const Yl=wc;Wl.takeUntilAsync=function(t,e){return(0,Yl.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 Hl={};Hl.takeUntil=void 0,Hl.takeUntil=function*(t,e){let n=0;for(const r of t){if(e(r,n))break;yield r,n++}};var $l={take:void 0};const Ql=vc,Xl=Mt;$l.take=function(t,e){return(0,Xl.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Xl.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Ql.go)((function*(){if(0!==e)for(const n of t)if(yield n,0===--e)break}))};var Gl={tapAsync:void 0};const Zl=wc;Gl.tapAsync=function(t,e){return(0,Zl.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 tf={};tf.tap=void 0,tf.tap=function*(t,e){let n=0;for(const r of t)e(r,n),yield r,n++};var ef={};ef.toAsyncIterable=void 0,ef.toAsyncIterable=async function*(t){for(const e of t)yield e};var nf={};nf.transformAsync=void 0,nf.transformAsync=async function*(t,e){yield*e(t)};var rf={};rf.transform=void 0,rf.transform=function*(t,e){yield*e(t)};var of={};of.uniqAsync=void 0,of.uniqAsync=async function*(t){const e=new Set;for await(const n of t)e.has(n)||(yield n,e.add(n))};var sf={uniqByAsync:void 0};const af=wc;sf.uniqByAsync=function(t,e){return(0,af.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 cf={};cf.uniqBy=void 0,cf.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 uf={};uf.uniq=void 0,uf.uniq=function*(t){const e=new Set;for(const n of t)e.has(n)||(yield n,e.add(n))};var lf={zipAsync:void 0};const ff=wc;var df;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(df||(df={})),lf.zipAsync=function(t,...e){return async function*(...t){var e,n,r,i;const o=t.length,s=t.map((t=>(0,ff.isAsyncIterable)(t)?[df.Async,t[Symbol.asyncIterator]()]:[df.Sync,t[Symbol.iterator]()])),a=s.map((()=>!1));try{for(;;){const t=new Array(o);for(let e=0;e<o;e++){const[n,r]=s[e];let i;if(i=n===df.Async?await r.next():r.next(),i.done)return void(a[e]=!0);t[e]=i.value}yield t}}finally{const t=s.filter(((t,e)=>!a[e]));for(const[o,s]of t)o===df.Async?await(null===(n=(e=s).return)||void 0===n?void 0:n.call(e)):null===(i=(r=s).return)||void 0===i||i.call(r)}}(t,...e)};var yf={};yf.zip=void 0,yf.zip=function(t,...e){return function*(...t){const e=t.length,n=t.map((t=>t[Symbol.iterator]())),r=n.map((()=>!1));try{for(;;){const t=new Array(e);for(let i=0;i<e;i++){const{value:e,done:o}=n[i].next();if(o)return void(r[i]=!0);t[i]=e}yield t}}finally{n.filter(((t,e)=>!r[e])).forEach((t=>{var e;return null===(e=t.return)||void 0===e?void 0:e.call(t)}))}}(t,...e)},function(t){var e=n&&n.__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=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(hc,t),r(gc,t),r(Iu,t),r(Su,t),r(Ou,t),r(ku,t),r(Pu,t),r(zu,t),r(Vu,t),r(Wu,t),r(Hu,t),r($u,t),r(Zu,t),r(el,t),r(nl,t),r(il,t),r(ll,t),r(rl,t),r(dl,t),r(vl,t),r(ml,t),r(gl,t),r(wl,t),r(xl,t),r(_l,t),r(jl,t),r(Bl,t),r(Pl,t),r(Cl,t),r(Ml,t),r(Rl,t),r(Ul,t),r(Jl,t),r(Wl,t),r(Hl,t),r($l,t),r(Gl,t),r(tf,t),r(ef,t),r(nf,t),r(rf,t),r(of,t),r(sf,t),r(cf,t),r(uf,t),r(lf,t),r(yf,t)}(yc);var hf={},vf={};vf.consume=void 0,vf.consume=function(t,e){return e(t)};var pf={eachAsync:void 0};const mf=wc;pf.eachAsync=function(t,e){return(0,mf.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 bf={};bf.each=void 0,bf.each=function(t,e){let n=0;for(const r of t)e(r,n),n++};var gf={everyAsync:void 0};const wf=wc;gf.everyAsync=function(t,e){return(0,wf.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 Af={};Af.every=void 0,Af.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 xf=wc;Tf.findAsync=function(t,e){return(0,xf.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 If={};If.find=void 0,If.find=function(t,e){let n=0;for(const r of t){if(e(r,n))return r;n++}};var Sf={};Sf.firstAsync=void 0,Sf.firstAsync=async function(t){for await(const e of t)return e};var _f={};_f.first=void 0,_f.first=function(t){for(const e of t)return e};var Ef={};Ef.includesAsync=void 0,Ef.includesAsync=async function(t,e){for await(const n of t)if(n===e)return!0;return!1};var Of={};Of.includes=void 0,Of.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1};var jf={};jf.matchAsync=void 0,jf.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 Nf={};Nf.match=void 0,Nf.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 kf={reduceAsync:void 0};const Bf=wc;kf.reduceAsync=function(t,e,n){return(0,Bf.isUndefined)(n)?function(t,e){return(0,Bf.isAsyncIterable)(t)?n(t):r(t);async function n(t){var n;const r=t[Symbol.asyncIterator]();let i;try{let t,s=await o(r),a=1;for(;({value:t,done:i}=await r.next()),!i;)s=await e(s,t,a++);return s}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}async function o(t){const e=await t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}async function r(t){var n;const r=t[Symbol.iterator]();let i;try{let t,s=o(r),a=1;for(;({value:t,done:i}=r.next()),!i;)s=await e(s,t,a++);return s}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}}(t,e):function(t,e,n){return(0,Bf.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 Pf={reduce:void 0};const qf=wc;Pf.reduce=function(t,e,n){return(0,qf.isUndefined)(n)?function(t,e){var n;const r=t[Symbol.iterator]();let i;try{let t,s=o(r),a=1;for(;({value:t,done:i}=r.next()),!i;)s=e(s,t,a++);return s}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}(t,e):function(t,e,n){let r=n,i=0;for(const n of t)r=e(r,n,i++);return r}(t,e,n)};var Cf={someAsync:void 0};const Mf=wc;Cf.someAsync=function(t,e){return(0,Mf.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 Rf={};Rf.some=void 0,Rf.some=function(t,e){let n=0;for(const r of t){if(e(r,n))return!0;n++}return!1};var zf={};zf.lastAsync=void 0,zf.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 Ff={};Ff.last=void 0,Ff.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 Uf={toArrayAsync:void 0};const Df=vf;Uf.toArrayAsync=function(t){return(0,Df.consume)(t,(async t=>{const e=[];for await(const n of t)e.push(n);return e}))};var Vf={toArray:void 0};const Jf=vf;Vf.toArray=function(t){return(0,Jf.consume)(t,(t=>Array.from(t)))};var Kf={toSetAsync:void 0};const Lf=vf;Kf.toSetAsync=function(t){return(0,Lf.consume)(t,(async t=>{const e=new Set;for await(const n of t)e.add(n);return e}))};var Wf={toSet:void 0};const Yf=vf;Wf.toSet=function(t){return(0,Yf.consume)(t,(t=>new Set(t)))};var Hf={};Hf.count=void 0,Hf.count=function(t){let e=0;for(const n of t)e++;return e};var $f={};$f.countAsync=void 0,$f.countAsync=async function(t){let e=0;for await(const n of t)e++;return e},function(t){var e=n&&n.__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=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(vf,t),r(pf,t),r(bf,t),r(gf,t),r(Af,t),r(Tf,t),r(If,t),r(Sf,t),r(_f,t),r(Ef,t),r(Of,t),r(jf,t),r(Nf,t),r(kf,t),r(Pf,t),r(Cf,t),r(Rf,t),r(zf,t),r(Ff,t),r(Uf,t),r(Vf,t),r(Kf,t),r(Wf,t),r(Hf,t),r($f,t)}(hf),function(t){var e=n&&n.__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=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(yc,t),r(hf,t)}(dc);class Qf{constructor(t){this.map=new Map,Mt.assert(Number.isInteger(t),"The parameter limit must be an integer"),Mt.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 dc.first(this.map.keys())}}var Xf={},Gf={},Zf={},td={};td.random=void 0,td.random=function(t,e){return Math.random()*(e-t)+t};var ed={};ed.randomInt=void 0,ed.randomInt=function(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t))+t};var nd={};nd.randomIntInclusive=void 0,nd.randomIntInclusive=function(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t},function(t){var e=n&&n.__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=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(td,t),r(ed,t),r(nd,t)}(Zf),Gf.calculateExponentialBackoffTimeout=void 0;const rd=Zf;Gf.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,rd.randomIntInclusive)(0,o):o};var id={};id.setTimeout=void 0,id.setTimeout=function(t,e){const n=globalThis.setTimeout(e,t);return()=>clearTimeout(n)};var od={setSchedule:void 0};const sd=id;od.setSchedule=function(t,e){const n=t-Date.now();return(0,sd.setTimeout)(n,e)};var ad={};ad.setInterval=void 0,ad.setInterval=function(t,e){const n=globalThis.setInterval(e,t);return()=>clearInterval(n)};var cd={setImmediate:void 0};const ud=id;cd.setImmediate=function(t){if(globalThis.setImmediate){const e=globalThis.setImmediate(t);return()=>clearImmediate(e)}return(0,ud.setTimeout)(0,t)};var ld={setTimeoutLoop:void 0};const fd=id;ld.setTimeoutLoop=function(t,e){let n=!1,r=(0,fd.setTimeout)(t,(async function i(){await e(),n||(r=(0,fd.setTimeout)(t,i))}));return()=>{n=!0,r()}};var dd={setDynamicTimeoutLoop:void 0};const yd=id;dd.setDynamicTimeoutLoop=function(t,e){let n=!1,r=(0,yd.setTimeout)(t,(async function i(){const o=Date.now();await e();const s=Date.now()-o;n||(r=(0,yd.setTimeout)(Math.max(t-s,0),i))}));return()=>{n=!0,r()}},function(t){var e=n&&n.__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=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(Gf,t),r(id,t),r(od,t),r(ad,t),r(cd,t),r(ld,t),r(dd,t)}(Xf);class hd{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=Xf.setSchedule(t.expirationTime,(()=>{this.clearExpiredItems(Date.now()),this.rescheduleClearTimeout()}));this.cancelClearTimeout=()=>{e(),this.cancelClearTimeout=void 0}}}}}class vd{constructor(t){this.map=new Map,this.itemMetadataSortedByExpirationTime=[],Mt.assert(Number.isInteger(t),"The parameter limit must be an integer"),Mt.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=Xf.setSchedule(t.expirationTime,(()=>{this.clearExpiredItems(Date.now()),this.rescheduleClearTimeout()}));this.cancelClearTimeout=()=>{e(),this.cancelClearTimeout=void 0}}}}getColdestKey(){return dc.first(this.map.keys())}}class pd{constructor(t){this.value=t,this.children=new Map}}class md{constructor(){this.root=new pd}get[Symbol.toStringTag](){return this.constructor.name}*entries(){yield*function*t(e,n){for(const[i,o]of e.children){const e=[...n,i];r.isntUndefined(o.value)&&(yield[e,o.value]),yield*t(o,e)}}(this.root,[])}keys(){return dc.map(this.entries(),(([t])=>t))}values(){return dc.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 pd),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 dc.toArray(dc.zip(t,e)).reverse())if(r.children.delete(n),0!==r.children.size)break;return!0}}class bd{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 gd(this.state,t);this._state=this.schema[this.state][t]}}class gd extends Mt.CustomError{constructor(t,e){super(`State ${t} cannot react to event ${e}`)}}
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Structures={})}(this,(function(t){"use strict";class e{constructor(t){this.value=t}get[Symbol.toStringTag](){return this.constructor.name}set(t){this.value=t}get(){return this.value}}var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},r={},i={};function o(t){return Array.isArray(t)}i.isntEmptyArray=i.isEmptyArray=i.isntArray=i.isArray=void 0,i.isArray=o,i.isntArray=function(t){return!o(t)},i.isEmptyArray=function(t){return 0===t.length},i.isntEmptyArray=function(t){return 0!==t.length};var s={},a={};function c(t){return null===t}a.isntNull=a.isNull=void 0,a.isNull=c,a.isntNull=function(t){return!c(t)};var u={};function l(t){return void 0===t}u.isntUndefined=u.isUndefined=void 0,u.isUndefined=l,u.isntUndefined=function(t){return!l(t)};var f={};function d(t){return"function"==typeof t}f.isntFunction=f.isFunction=void 0,f.isFunction=d,f.isntFunction=function(t){return!d(t)},s.isntAsyncIterable=s.isAsyncIterable=void 0;const y=a,h=u,v=f;function p(t){return(0,y.isntNull)(t)&&(0,h.isntUndefined)(t)&&(0,v.isFunction)(t[Symbol.asyncIterator])}s.isAsyncIterable=p,s.isntAsyncIterable=function(t){return!p(t)};var m={};function b(t){return"bigint"==typeof t}m.isntBigInt=m.isBigInt=void 0,m.isBigInt=b,m.isntBigInt=function(t){return!b(t)};var g={};function w(t){return"boolean"==typeof t}g.isntBoolean=g.isBoolean=void 0,g.isBoolean=w,g.isntBoolean=function(t){return!w(t)};var A={},x={};function T(t){return"string"==typeof t}x.isntString=x.isString=void 0,x.isString=T,x.isntString=function(t){return!T(t)},A.isntChar=A.isChar=void 0;const I=x;function S(t){return(0,I.isString)(t)&&1===t.length}A.isChar=S,A.isntChar=function(t){return!S(t)};var _={};function E(t){return t instanceof Date}_.isntDate=_.isDate=void 0,_.isDate=E,_.isntDate=function(t){return!E(t)};var O={};O.inEnum=void 0,O.inEnum=function(t,e){return Object.values(e).includes(t)};var j={};function N(t){return t instanceof Error}j.isntError=j.isError=void 0,j.isError=N,j.isntError=function(t){return!N(t)};var k={};function B(t){return!t}k.isntFalsy=k.isFalsy=void 0,k.isFalsy=B,k.isntFalsy=function(t){return!B(t)};var P={};P.isntIterable=P.isIterable=void 0;const q=a,C=u,M=f;function z(t){return(0,q.isntNull)(t)&&(0,C.isntUndefined)(t)&&(0,M.isFunction)(t[Symbol.iterator])}P.isIterable=z,P.isntIterable=function(t){return!z(t)};var R={},F={};function U(t){return"number"==typeof t}function D(t){return Number.isNaN(t)}F.isntNaN=F.isNaN=F.isNegativeInfinity=F.isPositiveInfinity=F.isFinite=F.isntNumber=F.isNumber=void 0,F.isNumber=U,F.isntNumber=function(t){return!U(t)},F.isFinite=function(t){return Number.isFinite(t)},F.isPositiveInfinity=function(t){return t===1/0},F.isNegativeInfinity=function(t){return t===-1/0},F.isNaN=D,F.isntNaN=function(t){return!D(t)};var V={},J="object"==typeof n&&n&&n.Object===Object&&n,L="object"==typeof self&&self&&self.Object===Object&&self,K=(J||L||Function("return this")()).Symbol,W=K,Y=Object.prototype,H=Y.hasOwnProperty,$=Y.toString,Q=W?W.toStringTag:void 0;var X=function(t){var e=H.call(t,Q),n=t[Q];try{t[Q]=void 0;var r=!0}catch(t){}var i=$.call(t);return r&&(e?t[Q]=n:delete t[Q]),i},G=Object.prototype.toString;var Z=X,tt=function(t){return G.call(t)},et=K?K.toStringTag:void 0;var nt=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":et&&et in Object(t)?Z(t):tt(t)};var rt=function(t,e){return function(n){return t(e(n))}}(Object.getPrototypeOf,Object);var it=nt,ot=rt,st=function(t){return null!=t&&"object"==typeof t},at=Function.prototype,ct=Object.prototype,ut=at.toString,lt=ct.hasOwnProperty,ft=ut.call(Object);var dt=function(t){if(!st(t)||"[object Object]"!=it(t))return!1;var e=ot(t);if(null===e)return!0;var n=lt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ut.call(n)==ft},yt=n&&n.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};V.isntEmptyObject=V.isEmptyObject=V.isntPlainObject=V.isPlainObject=V.isntObject=V.isObject=void 0;const ht=yt(dt);function vt(t){return null!==t&&"object"==typeof t}function pt(t){return(0,ht.default)(t)}V.isObject=vt,V.isntObject=function(t){return!vt(t)},V.isPlainObject=pt,V.isntPlainObject=function(t){return!pt(t)},V.isEmptyObject=function(t){return 0===Object.keys(t).length},V.isntEmptyObject=function(t){return 0!==Object.keys(t).length},R.isntJsonable=R.isJsonable=R.isntJson=R.isJson=void 0;const mt=a,bt=g,gt=x,wt=F,At=i,xt=V;function Tt(t){return(0,mt.isNull)(t)||(0,bt.isBoolean)(t)||(0,gt.isString)(t)||(0,wt.isNumber)(t)||(0,At.isArray)(t)&&t.every(Tt)||(0,xt.isPlainObject)(t)&&Object.values(t).every(Tt)}R.isJson=Tt,R.isntJson=function(t){return!Tt(t)},R.isJsonable=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},R.isntJsonable=function t(e){return!t()};var It={};It.isPromiseLike=It.isntPromiseLike=It.isntPromise=It.isPromise=void 0;const St=V,_t=f;function Et(t){return t instanceof Promise}function Ot(t){return(0,St.isObject)(t)&&(0,_t.isFunction)(t.then)}It.isPromise=Et,It.isntPromise=function(t){return!Et(t)},It.isntPromiseLike=function(t){return!Ot(t)},It.isPromiseLike=Ot;var jt={};jt.isAbsoluteURL=void 0,jt.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}};var Nt={};function kt(t){return t instanceof RegExp}Nt.isntRegExp=Nt.isRegExp=void 0,Nt.isRegExp=kt,Nt.isntRegExp=function(t){return!kt(t)},function(t){var e=n&&n.__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=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(i,t),r(s,t),r(m,t),r(g,t),r(A,t),r(_,t),r(O,t),r(j,t),r(k,t),r(f,t),r(P,t),r(R,t),r(a,t),r(F,t),r(V,t),r(It,t),r(x,t),r(u,t),r(jt,t),r(Nt,t)}(r);class Bt{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 Pt{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 qt{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 Ct{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 Mt={},zt={},Rt={},Ft={},Ut={},Dt={},Vt={};Vt.go=void 0,Vt.go=function(t){return t()},function(t){var e=n&&n.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]});(n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)})(Vt,t)}(Dt);var Jt={},Lt={},Kt={},Wt={},Yt={},Ht={},$t={CustomError:void 0};class Qt extends Error{get name(){return this.constructor.name}}$t.CustomError=Qt;var Xt={ExpectedError:void 0};const Gt=$t;class Zt extends Gt.CustomError{}Xt.ExpectedError=Zt;var te={AssertionError:void 0};const ee=$t;class ne extends ee.CustomError{}te.AssertionError=ne;var re={};re.normalize=void 0,re.normalize=function(t){var e;return{name:t.name,message:t.message,stack:null!==(e=t.stack)&&void 0!==e?e:null}};var ie={refute:void 0};const oe=Xt;ie.refute=function(t,e){if(t)throw new oe.ExpectedError(e)};var se={assert:void 0};const ae=te;se.assert=function(t,e){if(!t)throw new ae.AssertionError(e)},function(t){var e=n&&n.__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=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r($t,t),r(Xt,t),r(te,t),r(re,t),r(ie,t),r(se,t)}(Ht),Yt.chunkAsync=void 0;const ce=Dt,ue=Ht;Yt.chunkAsync=function(t,e){return(0,ue.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,ue.assert)(e>0,"The parameter size must be greater than 0"),(0,ce.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 le={},fe={},de={};function ye(t){return Array.isArray(t)}de.isntEmptyArray=de.isEmptyArray=de.isntArray=de.isArray=void 0,de.isArray=ye,de.isntArray=function(t){return!ye(t)},de.isEmptyArray=function(t){return 0===t.length},de.isntEmptyArray=function(t){return 0!==t.length};var he={},ve={};function pe(t){return null===t}ve.isntNull=ve.isNull=void 0,ve.isNull=pe,ve.isntNull=function(t){return!pe(t)};var me={};function be(t){return void 0===t}me.isntUndefined=me.isUndefined=void 0,me.isUndefined=be,me.isntUndefined=function(t){return!be(t)},he.isntAsyncIterable=he.isAsyncIterable=void 0;const ge=ve,we=me;function Ae(t){return(0,ge.isntNull)(t)&&(0,we.isntUndefined)(t)&&"function"==typeof t[Symbol.asyncIterator]}he.isAsyncIterable=Ae,he.isntAsyncIterable=function(t){return!Ae(t)};var xe={};function Te(t){return"bigint"==typeof t}xe.isntBigInt=xe.isBigInt=void 0,xe.isBigInt=Te,xe.isntBigInt=function(t){return!Te(t)};var Ie={};function Se(t){return"boolean"==typeof t}Ie.isntBoolean=Ie.isBoolean=void 0,Ie.isBoolean=Se,Ie.isntBoolean=function(t){return!Se(t)};var _e={},Ee={};function Oe(t){return"string"==typeof t}Ee.isntString=Ee.isString=void 0,Ee.isString=Oe,Ee.isntString=function(t){return!Oe(t)},_e.isntChar=_e.isChar=void 0;const je=Ee;function Ne(t){return(0,je.isString)(t)&&1===t.length}_e.isChar=Ne,_e.isntChar=function(t){return!Ne(t)};var ke={};function Be(t){return t instanceof Date}ke.isntDate=ke.isDate=void 0,ke.isDate=Be,ke.isntDate=function(t){return!Be(t)};var Pe={};Pe.inEnum=void 0,Pe.inEnum=function(t,e){return Object.values(e).includes(t)};var qe={};function Ce(t){return t instanceof Error}qe.isntError=qe.isError=void 0,qe.isError=Ce,qe.isntError=function(t){return!Ce(t)};var Me={};function ze(t){return!t}Me.isntFalsy=Me.isFalsy=void 0,Me.isFalsy=ze,Me.isntFalsy=function(t){return!ze(t)};var Re={};function Fe(t){return"function"==typeof t}Re.isntFunction=Re.isFunction=void 0,Re.isFunction=Fe,Re.isntFunction=function(t){return!Fe(t)};var Ue={};Ue.isntIterable=Ue.isIterable=void 0;const De=ve,Ve=me;function Je(t){return(0,De.isntNull)(t)&&(0,Ve.isntUndefined)(t)&&"function"==typeof t[Symbol.iterator]}Ue.isIterable=Je,Ue.isntIterable=function(t){return!Je(t)};var Le={},Ke={};var We=Function.prototype,Ye=Object.prototype,He=We.toString,$e=Ye.hasOwnProperty,Qe=He.call(Object),Xe=Ye.toString,Ge=function(t,e){return function(n){return t(e(n))}}(Object.getPrototypeOf,Object);var Ze=function(t){if(!function(t){return!!t&&"object"==typeof t}(t)||"[object Object]"!=Xe.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=Ge(t);if(null===e)return!0;var n=$e.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&He.call(n)==Qe},tn=n&&n.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Ke.isntEmptyObject=Ke.isEmptyObject=Ke.isntPlainObject=Ke.isPlainObject=Ke.isntObject=Ke.isObject=void 0;const en=tn(Ze);function nn(t){return null!==t&&"object"==typeof t}function rn(t){return(0,en.default)(t)}Ke.isObject=nn,Ke.isntObject=function(t){return!nn(t)},Ke.isPlainObject=rn,Ke.isntPlainObject=function(t){return!rn(t)},Ke.isEmptyObject=function(t){return 0===Object.keys(t).length},Ke.isntEmptyObject=function(t){return 0!==Object.keys(t).length};var on={};function sn(t){return"number"==typeof t}on.isntNumber=on.isNumber=void 0,on.isNumber=sn,on.isntNumber=function(t){return!sn(t)},Le.isntJsonRpcError=Le.isJsonRpcError=Le.isntJsonRpcSuccess=Le.isJsonRpcSuccess=Le.isntJsonRpcRequest=Le.isJsonRpcRequest=Le.isntJsonRpcNotification=Le.isJsonRpcNotification=void 0;const an=de,cn=Ke,un=Ee,ln=on,fn=me;function dn(t){return(0,un.isString)(t)||(0,ln.isNumber)(t)}function yn(t){return(0,an.isArray)(t)||(0,cn.isObject)(t)}function hn(t){return(0,cn.isPlainObject)(t)&&(0,un.isString)(t.jsonrpc)&&(0,un.isString)(t.method)&&(0,fn.isUndefined)(t.id)&&yn(t.params)}function vn(t){return(0,cn.isPlainObject)(t)&&(0,un.isString)(t.jsonrpc)&&(0,un.isString)(t.method)&&dn(t.id)&&yn(t.params)}function pn(t){return(0,cn.isPlainObject)(t)&&(0,un.isString)(t.jsonrpc)&&(0,un.isString)(t.id)&&"result"in t}function mn(t){return(0,cn.isPlainObject)(t)&&(0,un.isString)(t.jsonrpc)&&dn(t.id)&&function(t){return(0,cn.isPlainObject)(t)&&(0,ln.isNumber)(t.code)&&(0,un.isString)(t.message)&&((0,fn.isUndefined)(t.data)||(0,cn.isObject)(t.data))}(t.error)}Le.isJsonRpcNotification=hn,Le.isntJsonRpcNotification=function(t){return!hn(t)},Le.isJsonRpcRequest=vn,Le.isntJsonRpcRequest=function(t){return!vn(t)},Le.isJsonRpcSuccess=pn,Le.isntJsonRpcSuccess=function(t){return!pn(t)},Le.isJsonRpcError=mn,Le.isntJsonRpcError=function(t){return!mn(t)};var bn={};bn.isntJson=bn.isJson=void 0,bn.isJson=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},bn.isntJson=function t(e){return!t()};var gn={};gn.isAbsoluteURL=void 0,gn.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}},function(t){var e=n&&n.__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=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(de,t),r(he,t),r(xe,t),r(Ie,t),r(_e,t),r(ke,t),r(Pe,t),r(qe,t),r(Me,t),r(Re,t),r(Ue,t),r(Le,t),r(bn,t),r(ve,t),r(on,t),r(Ke,t),r(Ee,t),r(me,t),r(gn,t)}(fe),le.chunkByAsync=void 0;const wn=fe;le.chunkByAsync=function(t,e){return(0,wn.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 An={};An.chunkBy=void 0,An.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 xn={chunk:void 0};const Tn=Dt,In=Ht;xn.chunk=function(t,e){return(0,In.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,In.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 Sn={concatAsync:void 0};const _n=fe,En=Dt;Sn.concatAsync=function(t,...e){return(0,En.go)((async function*(){for(const n of[t,...e])if((0,_n.isAsyncIterable)(n))for await(const t of n)yield t;else for(const t of n)yield t}))};var On={concat:void 0};const jn=Dt;On.concat=function(t,...e){return(0,jn.go)((function*(){for(const n of[t,...e])yield*n}))};var Nn={},kn={};kn.copyIterable=kn.copyAsyncIterable=void 0,kn.copyAsyncIterable=async function*(t){for await(const e of t)yield e},kn.copyIterable=function*(t){for(const e of t)yield e},Nn.dropAsync=void 0;const Bn=Dt,Pn=kn,qn=Ht;Nn.dropAsync=function(t,e){return(0,qn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,qn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Pn.copyAsyncIterable)(t):(0,Bn.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 Cn={dropRightAsync:void 0};const Mn=Dt,zn=kn,Rn=Ht;Cn.dropRightAsync=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*(){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 Un=Dt,Dn=kn,Vn=Ht;Fn.dropRight=function(t,e){return(0,Vn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Vn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Dn.copyIterable)(t):(0,Un.go)((function*(){const n=Array.from(t);yield*n.slice(0,-e)}))};var Jn={dropUntilAsync:void 0};const Ln=fe;Jn.dropUntilAsync=function(t,e){return(0,Ln.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 Kn={};Kn.dropUntil=void 0,Kn.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 Wn={drop:void 0};const Yn=Dt,Hn=kn,$n=Ht;Wn.drop=function(t,e){return(0,$n.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,$n.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Hn.copyIterable)(t):(0,Yn.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 Qn={filterAsync:void 0};const Xn=fe;Qn.filterAsync=function(t,e){return(0,Xn.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 Gn={};Gn.filter=void 0,Gn.filter=function*(t,e){let n=0;for(const r of t)e(r,n)&&(yield r),n++};var Zn={},tr={},er={flattenByAsync:void 0};const nr=fe;function rr(t){return(0,nr.isIterable)(t)&&(0,nr.isntChar)(t)}er.flattenByAsync=function(t,e){return(0,nr.isAsyncIterable)(t)?async function*(t){const r=1;for await(const i of t)rr(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)rr(i)&&await e(i,r)?yield*n(i,r+1):yield i}},tr.flattenDeepAsync=void 0;const ir=er,or=Ht;tr.flattenDeepAsync=function(t,e=1/0){return(0,or.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,or.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,ir.flattenByAsync)(t,((t,n)=>n<=e))},Zn.flattenAsync=void 0;const sr=tr;Zn.flattenAsync=function(t){return(0,sr.flattenDeepAsync)(t,1)};var ar={flattenBy:void 0};const cr=fe;ar.flattenBy=function(t,e){return function*t(n,r){for(const o of n)(0,cr.isIterable)(i=o)&&(0,cr.isntChar)(i)&&e(o,r)?yield*t(o,r+1):yield o;var i}(t,1)};var ur={flattenDeep:void 0};const lr=ar,fr=Ht;ur.flattenDeep=function(t,e=1/0){return(0,fr.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,fr.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,lr.flattenBy)(t,((t,n)=>n<=e))};var dr={flatten:void 0};const yr=ur;dr.flatten=function(t){return(0,yr.flattenDeep)(t,1)};var hr={mapAsync:void 0};const vr=fe;hr.mapAsync=function(t,e){return(0,vr.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 pr={};pr.map=void 0,pr.map=function*(t,e){let n=0;for(const r of t)yield e(r,n),n++};var mr={repeatAsync:void 0};const br=Dt,gr=Ht;mr.repeatAsync=function(t,e){return(0,gr.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,gr.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,br.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 wr={repeat:void 0};const Ar=Dt,xr=Ht;wr.repeat=function(t,e){return(0,xr.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,xr.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,Ar.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 Ir=Dt,Sr=Ht;Tr.sliceAsync=function(t,e,n=1/0){return(0,Sr.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,Sr.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,Sr.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Sr.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,Ir.go)((async function*(){let r=0;for await(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var _r={slice:void 0};const Er=Dt,Or=Ht;_r.slice=function(t,e,n=1/0){return(0,Or.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,Or.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,Or.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Or.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,Er.go)((function*(){let r=0;for(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var jr={};jr.splitAsync=void 0,jr.splitAsync=async function*(t,e){let n=[];for await(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Nr={splitByAsync:void 0};const kr=fe;Nr.splitByAsync=function(t,e){return(0,kr.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 Br={};Br.splitBy=void 0,Br.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 Pr={};Pr.split=void 0,Pr.split=function*(t,e){let n=[];for(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var qr={takeAsync:void 0};const Cr=Dt,Mr=Ht;qr.takeAsync=function(t,e){return(0,Mr.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Mr.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Cr.go)((async function*(){if(0!==e)for await(const n of t)if(yield n,0===--e)break}))};var zr={takeRightAsync:void 0};const Rr=Dt,Fr=Ht;zr.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,Rr.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 Ur={takeRight:void 0};const Dr=Dt,Vr=Ht;Ur.takeRight=function(t,e){return(0,Vr.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Vr.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Dr.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 Jr={takeUntilAsync:void 0};const Lr=fe;Jr.takeUntilAsync=function(t,e){return(0,Lr.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 Kr={};Kr.takeUntil=void 0,Kr.takeUntil=function*(t,e){let n=0;for(const r of t){if(e(r,n))break;yield r,n++}};var Wr={take:void 0};const Yr=Dt,Hr=Ht;Wr.take=function(t,e){return(0,Hr.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Hr.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Yr.go)((function*(){if(0!==e)for(const n of t)if(yield n,0===--e)break}))};var $r={tapAsync:void 0};const Qr=fe;$r.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 Xr={};Xr.tap=void 0,Xr.tap=function*(t,e){let n=0;for(const r of t)e(r,n),yield r,n++};var Gr={};Gr.toAsyncIterable=void 0,Gr.toAsyncIterable=async function*(t){for(const e of t)yield e};var Zr={};Zr.transformAsync=void 0,Zr.transformAsync=async function*(t,e){yield*e(t)};var ti={};ti.transform=void 0,ti.transform=function*(t,e){yield*e(t)};var ei={};ei.uniqAsync=void 0,ei.uniqAsync=async function*(t){const e=new Set;for await(const n of t)e.has(n)||(yield n,e.add(n))};var ni={uniqByAsync:void 0};const ri=fe;ni.uniqByAsync=function(t,e){return(0,ri.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 ii={};ii.uniqBy=void 0,ii.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 oi={};oi.uniq=void 0,oi.uniq=function*(t){const e=new Set;for(const n of t)e.has(n)||(yield n,e.add(n))};var si={zipAsync:void 0};const ai=fe;var ci;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(ci||(ci={})),si.zipAsync=function(t,...e){return async function*(...t){var e,n,r,i;const o=t.length,s=t.map((t=>(0,ai.isAsyncIterable)(t)?[ci.Async,t[Symbol.asyncIterator]()]:[ci.Sync,t[Symbol.iterator]()])),a=s.map((()=>!1));try{for(;;){const t=new Array(o);for(let e=0;e<o;e++){const[n,r]=s[e];let i;if(i=n===ci.Async?await r.next():r.next(),i.done)return void(a[e]=!0);t[e]=i.value}yield t}}finally{const t=s.filter(((t,e)=>!a[e]));for(const[o,s]of t)o===ci.Async?await(null===(n=(e=s).return)||void 0===n?void 0:n.call(e)):null===(i=(r=s).return)||void 0===i||i.call(r)}}(t,...e)};var ui={};ui.zip=void 0,ui.zip=function(t,...e){return function*(...t){const e=t.length,n=t.map((t=>t[Symbol.iterator]())),r=n.map((()=>!1));try{for(;;){const t=new Array(e);for(let i=0;i<e;i++){const{value:e,done:o}=n[i].next();if(o)return void(r[i]=!0);t[i]=e}yield t}}finally{n.filter(((t,e)=>!r[e])).forEach((t=>{var e;return null===(e=t.return)||void 0===e?void 0:e.call(t)}))}}(t,...e)},function(t){var e=n&&n.__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=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(Yt,t),r(le,t),r(An,t),r(xn,t),r(Sn,t),r(On,t),r(Nn,t),r(Cn,t),r(Fn,t),r(Jn,t),r(Kn,t),r(Wn,t),r(Qn,t),r(Gn,t),r(Zn,t),r(er,t),r(ar,t),r(tr,t),r(ur,t),r(dr,t),r(hr,t),r(pr,t),r(mr,t),r(wr,t),r(Tr,t),r(_r,t),r(jr,t),r(Nr,t),r(Br,t),r(Pr,t),r(qr,t),r(zr,t),r(Ur,t),r(Jr,t),r(Kr,t),r(Wr,t),r($r,t),r(Xr,t),r(Gr,t),r(Zr,t),r(ti,t),r(ei,t),r(ni,t),r(ii,t),r(oi,t),r(si,t),r(ui,t)}(Wt);var li={},fi={};fi.consume=void 0,fi.consume=function(t,e){return e(t)};var di={eachAsync:void 0};const yi=fe;di.eachAsync=function(t,e){return(0,yi.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 hi={};hi.each=void 0,hi.each=function(t,e){let n=0;for(const r of t)e(r,n),n++};var vi={everyAsync:void 0};const pi=fe;vi.everyAsync=function(t,e){return(0,pi.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 mi={};mi.every=void 0,mi.every=function(t,e){let n=0;for(const r of t){if(!e(r,n))return!1;n++}return!0};var bi={findAsync:void 0};const gi=fe;bi.findAsync=function(t,e){return(0,gi.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))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 wi={};wi.find=void 0,wi.find=function(t,e){let n=0;for(const r of t){if(e(r,n))return r;n++}};var Ai={};Ai.firstAsync=void 0,Ai.firstAsync=async function(t){for await(const e of t)return e};var xi={};xi.first=void 0,xi.first=function(t){for(const e of t)return e};var Ti={};Ti.includesAsync=void 0,Ti.includesAsync=async function(t,e){for await(const n of t)if(n===e)return!0;return!1};var Ii={};Ii.includes=void 0,Ii.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1};var Si={};Si.matchAsync=void 0,Si.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 _i={};_i.match=void 0,_i.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 Ei={reduceAsync:void 0};const Oi=fe;Ei.reduceAsync=function(t,e,n){return(0,Oi.isUndefined)(n)?function(t,e){return(0,Oi.isAsyncIterable)(t)?n(t):r(t);async function n(t){var n;const r=t[Symbol.asyncIterator]();let i;try{let t,s=await o(r),a=1;for(;({value:t,done:i}=await r.next()),!i;)s=await e(s,t,a++);return s}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}async function o(t){const e=await t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}async function r(t){var n;const r=t[Symbol.iterator]();let i;try{let t,s=o(r),a=1;for(;({value:t,done:i}=r.next()),!i;)s=await e(s,t,a++);return s}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}}(t,e):function(t,e,n){return(0,Oi.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 ji={reduce:void 0};const Ni=fe;ji.reduce=function(t,e,n){return(0,Ni.isUndefined)(n)?function(t,e){var n;const r=t[Symbol.iterator]();let i;try{let t,s=o(r),a=1;for(;({value:t,done:i}=r.next()),!i;)s=e(s,t,a++);return s}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}(t,e):function(t,e,n){let r=n,i=0;for(const n of t)r=e(r,n,i++);return r}(t,e,n)};var ki={someAsync:void 0};const Bi=fe;ki.someAsync=function(t,e){return(0,Bi.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 Pi={};Pi.some=void 0,Pi.some=function(t,e){let n=0;for(const r of t){if(e(r,n))return!0;n++}return!1};var qi={};qi.lastAsync=void 0,qi.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 Ci={};Ci.last=void 0,Ci.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 Mi={toArrayAsync:void 0};const zi=fi;Mi.toArrayAsync=function(t){return(0,zi.consume)(t,(async t=>{const e=[];for await(const n of t)e.push(n);return e}))};var Ri={toArray:void 0};const Fi=fi;Ri.toArray=function(t){return(0,Fi.consume)(t,(t=>Array.from(t)))};var Ui={toSetAsync:void 0};const Di=fi;Ui.toSetAsync=function(t){return(0,Di.consume)(t,(async t=>{const e=new Set;for await(const n of t)e.add(n);return e}))};var Vi={toSet:void 0};const Ji=fi;Vi.toSet=function(t){return(0,Ji.consume)(t,(t=>new Set(t)))},function(t){var e=n&&n.__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=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(fi,t),r(di,t),r(hi,t),r(vi,t),r(mi,t),r(bi,t),r(wi,t),r(Ai,t),r(xi,t),r(Ti,t),r(Ii,t),r(Si,t),r(_i,t),r(Ei,t),r(ji,t),r(ki,t),r(Pi,t),r(qi,t),r(Ci,t),r(Mi,t),r(Ri,t),r(Ui,t),r(Vi,t)}(li),function(t){var e=n&&n.__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=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(Wt,t),r(li,t)}(Kt);var Li={},Ki={};Ki.traverseErrorPrototypeChain=void 0,Ki.traverseErrorPrototypeChain=function*(t){let e=t;for(;(e=Object.getPrototypeOf(e))&&(yield e,e!==Error.prototype););},Li.getErrorNames=void 0;const Wi=fe,Yi=Ki;Li.getErrorNames=function*(t){var e;if((0,Wi.isError)(t))for(const n of(0,Yi.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 Hi={isSerializableError:void 0};const $i=fe;Hi.isSerializableError=function(t){return(0,$i.isObject)(t)&&(0,$i.isString)(t.name)&&(0,$i.isString)(t.message)&&((0,$i.isString)(t.stack)||(0,$i.isNull)(t.stack))&&(0,$i.isArray)(t.ancestors)&&t.ancestors.every($i.isString)},Lt.CustomError=void 0;const Qi=Kt,Xi=Li,Gi=fe,Zi=Hi;class to extends Error{get name(){var t,e;return null!==(e=null!==(t=(0,Qi.first)((0,Xi.getErrorNames)(this)))&&void 0!==t?t:to.name)&&void 0!==e?e:"CustomError"}static[Symbol.hasInstance](t){var e;if((0,Gi.isError)(t)||(0,Zi.isSerializableError)(t)){const n=[null!==(e=this.prototype.constructor.name)&&void 0!==e?e:this.name,...(0,Xi.getErrorNames)(this.prototype)].reverse(),r=(0,Qi.toArray)((0,Xi.getErrorNames)(t)).reverse();return n.every(((t,e)=>t===r[e]))}return!1}}Lt.CustomError=to;var eo={AssertionError:void 0};const no=Lt;class ro extends no.CustomError{}eo.AssertionError=ro;var io={normalize:void 0};const oo=Li,so=Kt;io.normalize=function(t){var e;const[n,...r]=(0,so.toArray)((0,oo.getErrorNames)(t));return{name:n,ancestors:r,message:t.message,stack:null!==(e=t.stack)&&void 0!==e?e:null}};var ao={},co={},uo={};uo.pass=void 0,uo.pass=function(){},function(t){var e=n&&n.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]});(n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)})(uo,t)}(co),ao.hydrate=void 0;const lo=co;function fo(t,e){const n=function(){(0,lo.pass)()};return(n.prototype=Object.create(t.prototype)).constructor=n,Object.defineProperty(n,"name",{value:e}),n}ao.hydrate=function(t){var e;const n=[t.name,...t.ancestors].slice(0,-1).reverse();let r=Error;for(const t of n)r=fo(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 yo={assert:void 0};const ho=eo;yo.assert=function(t,e){if(!t)throw new ho.AssertionError(e)},function(t){var e=n&&n.__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=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(Lt,t),r(eo,t),r(Hi,t),r(io,t),r(ao,t),r(yo,t),r(Li,t),r(Ki,t)}(Jt),Ut.chunkAsync=void 0;const vo=Dt,po=Jt;Ut.chunkAsync=function(t,e){return(0,po.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,po.assert)(e>0,"The parameter size must be greater than 0"),(0,vo.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 mo={chunkByAsync:void 0};const bo=fe;mo.chunkByAsync=function(t,e){return(0,bo.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 go={};go.chunkBy=void 0,go.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 wo={chunk:void 0};const Ao=Dt,xo=Jt;wo.chunk=function(t,e){return(0,xo.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,xo.assert)(e>0,"The parameter size must be greater than 0"),(0,Ao.go)((function*(){let n=[];for(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var To={concatAsync:void 0};const Io=fe,So=Dt;To.concatAsync=function(t,...e){return(0,So.go)((async function*(){for(const n of[t,...e])if((0,Io.isAsyncIterable)(n))for await(const t of n)yield t;else for(const t of n)yield t}))};var _o={concat:void 0};const Eo=Dt;_o.concat=function(t,...e){return(0,Eo.go)((function*(){for(const n of[t,...e])yield*n}))};var Oo={},jo={};jo.copyIterable=jo.copyAsyncIterable=void 0,jo.copyAsyncIterable=async function*(t){for await(const e of t)yield e},jo.copyIterable=function*(t){for(const e of t)yield e},Oo.dropAsync=void 0;const No=Dt,ko=jo,Bo=Jt;Oo.dropAsync=function(t,e){return(0,Bo.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Bo.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,ko.copyAsyncIterable)(t):(0,No.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 Po={dropRightAsync:void 0};const qo=Dt,Co=jo,Mo=Jt;Po.dropRightAsync=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*(){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 zo={dropRight:void 0};const Ro=Dt,Fo=jo,Uo=Jt;zo.dropRight=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.copyIterable)(t):(0,Ro.go)((function*(){const n=Array.from(t);yield*n.slice(0,-e)}))};var Do={dropUntilAsync:void 0};const Vo=fe;Do.dropUntilAsync=function(t,e){return(0,Vo.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 Jo={};Jo.dropUntil=void 0,Jo.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 Lo={drop:void 0};const Ko=Dt,Wo=jo,Yo=Jt;Lo.drop=function(t,e){return(0,Yo.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Yo.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Wo.copyIterable)(t):(0,Ko.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 Ho={filterAsync:void 0};const $o=fe;Ho.filterAsync=function(t,e){return(0,$o.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 Qo={};Qo.filter=void 0,Qo.filter=function*(t,e){let n=0;for(const r of t)e(r,n)&&(yield r),n++};var Xo={},Go={},Zo={flattenByAsync:void 0};const ts=fe;function es(t){return(0,ts.isIterable)(t)&&(0,ts.isntChar)(t)}Zo.flattenByAsync=function(t,e){return(0,ts.isAsyncIterable)(t)?async function*(t){const r=1;for await(const i of t)es(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)es(i)&&await e(i,r)?yield*n(i,r+1):yield i}},Go.flattenDeepAsync=void 0;const ns=Zo,rs=Jt;Go.flattenDeepAsync=function(t,e=1/0){return(0,rs.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,rs.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,ns.flattenByAsync)(t,((t,n)=>n<=e))},Xo.flattenAsync=void 0;const is=Go;Xo.flattenAsync=function(t){return(0,is.flattenDeepAsync)(t,1)};var os={flattenBy:void 0};const ss=fe;os.flattenBy=function(t,e){return function*t(n,r){for(const o of n)(0,ss.isIterable)(i=o)&&(0,ss.isntChar)(i)&&e(o,r)?yield*t(o,r+1):yield o;var i}(t,1)};var as={flattenDeep:void 0};const cs=os,us=Jt;as.flattenDeep=function(t,e=1/0){return(0,us.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,us.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,cs.flattenBy)(t,((t,n)=>n<=e))};var ls={flatten:void 0};const fs=as;ls.flatten=function(t){return(0,fs.flattenDeep)(t,1)};var ds={mapAsync:void 0};const ys=fe;ds.mapAsync=function(t,e){return(0,ys.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 hs={};hs.map=void 0,hs.map=function*(t,e){let n=0;for(const r of t)yield e(r,n),n++};var vs={repeatAsync:void 0};const ps=Dt,ms=Jt;vs.repeatAsync=function(t,e){return(0,ms.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,ms.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,ps.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 bs={repeat:void 0};const gs=Dt,ws=Jt;bs.repeat=function(t,e){return(0,ws.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,ws.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,gs.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 As={sliceAsync:void 0};const xs=Dt,Ts=Jt;As.sliceAsync=function(t,e,n=1/0){return(0,Ts.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,Ts.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,Ts.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Ts.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,xs.go)((async function*(){let r=0;for await(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var Is={slice:void 0};const Ss=Dt,_s=Jt;Is.slice=function(t,e,n=1/0){return(0,_s.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,_s.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,_s.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,_s.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,Ss.go)((function*(){let r=0;for(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var Es={};Es.splitAsync=void 0,Es.splitAsync=async function*(t,e){let n=[];for await(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Os={splitByAsync:void 0};const js=fe;Os.splitByAsync=function(t,e){return(0,js.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 Ns={};Ns.splitBy=void 0,Ns.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 ks={};ks.split=void 0,ks.split=function*(t,e){let n=[];for(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Bs={takeAsync:void 0};const Ps=Dt,qs=Jt;Bs.takeAsync=function(t,e){return(0,qs.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,qs.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Ps.go)((async function*(){if(0!==e)for await(const n of t)if(yield n,0===--e)break}))};var Cs={takeRightAsync:void 0};const Ms=Dt,zs=Jt;Cs.takeRightAsync=function(t,e){return(0,zs.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,zs.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Ms.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 Rs={takeRight:void 0};const Fs=Dt,Us=Jt;Rs.takeRight=function(t,e){return(0,Us.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Us.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Fs.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 Ds={takeUntilAsync:void 0};const Vs=fe;Ds.takeUntilAsync=function(t,e){return(0,Vs.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 Js={};Js.takeUntil=void 0,Js.takeUntil=function*(t,e){let n=0;for(const r of t){if(e(r,n))break;yield r,n++}};var Ls={take:void 0};const Ks=Dt,Ws=Jt;Ls.take=function(t,e){return(0,Ws.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Ws.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Ks.go)((function*(){if(0!==e)for(const n of t)if(yield n,0===--e)break}))};var Ys={tapAsync:void 0};const Hs=fe;Ys.tapAsync=function(t,e){return(0,Hs.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 $s={};$s.tap=void 0,$s.tap=function*(t,e){let n=0;for(const r of t)e(r,n),yield r,n++};var Qs={};Qs.toAsyncIterable=void 0,Qs.toAsyncIterable=async function*(t){for(const e of t)yield e};var Xs={};Xs.transformAsync=void 0,Xs.transformAsync=async function*(t,e){yield*e(t)};var Gs={};Gs.transform=void 0,Gs.transform=function*(t,e){yield*e(t)};var Zs={};Zs.uniqAsync=void 0,Zs.uniqAsync=async function*(t){const e=new Set;for await(const n of t)e.has(n)||(yield n,e.add(n))};var ta={uniqByAsync:void 0};const ea=fe;ta.uniqByAsync=function(t,e){return(0,ea.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 na={};na.uniqBy=void 0,na.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 ra={};ra.uniq=void 0,ra.uniq=function*(t){const e=new Set;for(const n of t)e.has(n)||(yield n,e.add(n))};var ia={zipAsync:void 0};const oa=fe;var sa;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(sa||(sa={})),ia.zipAsync=function(t,...e){return async function*(...t){var e,n,r,i;const o=t.length,s=t.map((t=>(0,oa.isAsyncIterable)(t)?[sa.Async,t[Symbol.asyncIterator]()]:[sa.Sync,t[Symbol.iterator]()])),a=s.map((()=>!1));try{for(;;){const t=new Array(o);for(let e=0;e<o;e++){const[n,r]=s[e];let i;if(i=n===sa.Async?await r.next():r.next(),i.done)return void(a[e]=!0);t[e]=i.value}yield t}}finally{const t=s.filter(((t,e)=>!a[e]));for(const[o,s]of t)o===sa.Async?await(null===(n=(e=s).return)||void 0===n?void 0:n.call(e)):null===(i=(r=s).return)||void 0===i||i.call(r)}}(t,...e)};var aa={};aa.zip=void 0,aa.zip=function(t,...e){return function*(...t){const e=t.length,n=t.map((t=>t[Symbol.iterator]())),r=n.map((()=>!1));try{for(;;){const t=new Array(e);for(let i=0;i<e;i++){const{value:e,done:o}=n[i].next();if(o)return void(r[i]=!0);t[i]=e}yield t}}finally{n.filter(((t,e)=>!r[e])).forEach((t=>{var e;return null===(e=t.return)||void 0===e?void 0:e.call(t)}))}}(t,...e)},function(t){var e=n&&n.__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=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(Ut,t),r(mo,t),r(go,t),r(wo,t),r(To,t),r(_o,t),r(Oo,t),r(Po,t),r(zo,t),r(Do,t),r(Jo,t),r(Lo,t),r(Ho,t),r(Qo,t),r(Xo,t),r(Zo,t),r(os,t),r(Go,t),r(as,t),r(ls,t),r(ds,t),r(hs,t),r(vs,t),r(bs,t),r(As,t),r(Is,t),r(Es,t),r(Os,t),r(Ns,t),r(ks,t),r(Bs,t),r(Cs,t),r(Rs,t),r(Ds,t),r(Js,t),r(Ls,t),r(Ys,t),r($s,t),r(Qs,t),r(Xs,t),r(Gs,t),r(Zs,t),r(ta,t),r(na,t),r(ra,t),r(ia,t),r(aa,t)}(Ft);var ca={},ua={};ua.consume=void 0,ua.consume=function(t,e){return e(t)};var la={eachAsync:void 0};const fa=fe;la.eachAsync=function(t,e){return(0,fa.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 da={};da.each=void 0,da.each=function(t,e){let n=0;for(const r of t)e(r,n),n++};var ya={everyAsync:void 0};const ha=fe;ya.everyAsync=function(t,e){return(0,ha.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 va={};va.every=void 0,va.every=function(t,e){let n=0;for(const r of t){if(!e(r,n))return!1;n++}return!0};var pa={findAsync:void 0};const ma=fe;pa.findAsync=function(t,e){return(0,ma.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 ba={};ba.find=void 0,ba.find=function(t,e){let n=0;for(const r of t){if(e(r,n))return r;n++}};var ga={};ga.firstAsync=void 0,ga.firstAsync=async function(t){for await(const e of t)return e};var wa={};wa.first=void 0,wa.first=function(t){for(const e of t)return e};var Aa={};Aa.includesAsync=void 0,Aa.includesAsync=async function(t,e){for await(const n of t)if(n===e)return!0;return!1};var xa={};xa.includes=void 0,xa.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1};var Ta={};Ta.matchAsync=void 0,Ta.matchAsync=async function(t,e){const n=e.length;let r=0;for await(const i of t)if(i===e[r]&&r++,r===n)return!0;return!1};var Ia={};Ia.match=void 0,Ia.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 Sa={reduceAsync:void 0};const _a=fe;Sa.reduceAsync=function(t,e,n){return(0,_a.isUndefined)(n)?function(t,e){return(0,_a.isAsyncIterable)(t)?n(t):r(t);async function n(t){var n;const r=t[Symbol.asyncIterator]();let i;try{let t,s=await o(r),a=1;for(;({value:t,done:i}=await r.next()),!i;)s=await e(s,t,a++);return s}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}async function o(t){const e=await t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}async function r(t){var n;const r=t[Symbol.iterator]();let i;try{let t,s=o(r),a=1;for(;({value:t,done:i}=r.next()),!i;)s=await e(s,t,a++);return s}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}}(t,e):function(t,e,n){return(0,_a.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 Ea={reduce:void 0};const Oa=fe;Ea.reduce=function(t,e,n){return(0,Oa.isUndefined)(n)?function(t,e){var n;const r=t[Symbol.iterator]();let i;try{let t,s=o(r),a=1;for(;({value:t,done:i}=r.next()),!i;)s=e(s,t,a++);return s}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}(t,e):function(t,e,n){let r=n,i=0;for(const n of t)r=e(r,n,i++);return r}(t,e,n)};var ja={someAsync:void 0};const Na=fe;ja.someAsync=function(t,e){return(0,Na.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 ka={};ka.some=void 0,ka.some=function(t,e){let n=0;for(const r of t){if(e(r,n))return!0;n++}return!1};var Ba={};Ba.lastAsync=void 0,Ba.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 Pa={};Pa.last=void 0,Pa.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 qa={toArrayAsync:void 0};const Ca=ua;qa.toArrayAsync=function(t){return(0,Ca.consume)(t,(async t=>{const e=[];for await(const n of t)e.push(n);return e}))};var Ma={toArray:void 0};const za=ua;Ma.toArray=function(t){return(0,za.consume)(t,(t=>Array.from(t)))};var Ra={toSetAsync:void 0};const Fa=ua;Ra.toSetAsync=function(t){return(0,Fa.consume)(t,(async t=>{const e=new Set;for await(const n of t)e.add(n);return e}))};var Ua={toSet:void 0};const Da=ua;Ua.toSet=function(t){return(0,Da.consume)(t,(t=>new Set(t)))},function(t){var e=n&&n.__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=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(ua,t),r(la,t),r(da,t),r(ya,t),r(va,t),r(pa,t),r(ba,t),r(ga,t),r(wa,t),r(Aa,t),r(xa,t),r(Ta,t),r(Ia,t),r(Sa,t),r(Ea,t),r(ja,t),r(ka,t),r(Ba,t),r(Pa,t),r(qa,t),r(Ma,t),r(Ra,t),r(Ua,t)}(ca),function(t){var e=n&&n.__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=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(Ft,t),r(ca,t)}(Rt);var Va={},Ja={};Ja.traverseErrorPrototypeChain=void 0,Ja.traverseErrorPrototypeChain=function*(t){let e=t;for(;(e=Object.getPrototypeOf(e))&&(yield e,e!==Error.prototype););},Va.getErrorNames=void 0;const La=fe,Ka=Ja;Va.getErrorNames=function*(t){var e;if((0,La.isError)(t))for(const n of(0,Ka.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 Wa={isSerializableError:void 0};const Ya=fe;Wa.isSerializableError=function(t){return(0,Ya.isObject)(t)&&(0,Ya.isString)(t.name)&&(0,Ya.isString)(t.message)&&((0,Ya.isString)(t.stack)||(0,Ya.isNull)(t.stack))&&(0,Ya.isArray)(t.ancestors)&&t.ancestors.every(Ya.isString)},zt.CustomError=void 0;const Ha=Rt,$a=Va,Qa=fe,Xa=Wa;class Ga extends Error{get name(){var t,e;return null!==(e=null!==(t=(0,Ha.first)((0,$a.getErrorNames)(this)))&&void 0!==t?t:Ga.name)&&void 0!==e?e:"CustomError"}static[Symbol.hasInstance](t){var e;if((0,Qa.isError)(t)||(0,Xa.isSerializableError)(t)){const n=[null!==(e=this.prototype.constructor.name)&&void 0!==e?e:this.name,...(0,$a.getErrorNames)(this.prototype)].reverse(),r=(0,Ha.toArray)((0,$a.getErrorNames)(t)).reverse();return n.every(((t,e)=>t===r[e]))}return!1}}zt.CustomError=Ga;var Za={AssertionError:void 0};const tc=zt;class ec extends tc.CustomError{}Za.AssertionError=ec;var nc={normalize:void 0};const rc=Va,ic=Rt;nc.normalize=function(t){var e;const[n,...r]=(0,ic.toArray)((0,rc.getErrorNames)(t));return{name:n,ancestors:r,message:t.message,stack:null!==(e=t.stack)&&void 0!==e?e:null}};var oc={},sc={},ac={};ac.pass=void 0,ac.pass=function(){},function(t){var e=n&&n.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]});(n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)})(ac,t)}(sc),oc.hydrate=void 0;const cc=sc;function uc(t,e){const n=function(){(0,cc.pass)()};return(n.prototype=Object.create(t.prototype)).constructor=n,Object.defineProperty(n,"name",{value:e}),n}oc.hydrate=function(t){var e;const n=[t.name,...t.ancestors].slice(0,-1).reverse();let r=Error;for(const t of n)r=uc(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 lc={assert:void 0};const fc=Za;lc.assert=function(t,e){if(!t)throw new fc.AssertionError(e)},function(t){var e=n&&n.__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=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(zt,t),r(Za,t),r(Wa,t),r(nc,t),r(oc,t),r(lc,t),r(Va,t),r(Ja,t)}(Mt);var dc={},yc={},hc={},vc={},pc={};pc.go=void 0,pc.go=function(t){return t()},function(t){var e=n&&n.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]});(n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)})(pc,t)}(vc),hc.chunkAsync=void 0;const mc=vc,bc=Mt;hc.chunkAsync=function(t,e){return(0,bc.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,bc.assert)(e>0,"The parameter size must be greater than 0"),(0,mc.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 gc={},wc={},Ac={};function xc(t){return Array.isArray(t)}Ac.isntEmptyArray=Ac.isEmptyArray=Ac.isntArray=Ac.isArray=void 0,Ac.isArray=xc,Ac.isntArray=function(t){return!xc(t)},Ac.isEmptyArray=function(t){return 0===t.length},Ac.isntEmptyArray=function(t){return 0!==t.length};var Tc={},Ic={};function Sc(t){return null===t}Ic.isntNull=Ic.isNull=void 0,Ic.isNull=Sc,Ic.isntNull=function(t){return!Sc(t)};var _c={};function Ec(t){return void 0===t}_c.isntUndefined=_c.isUndefined=void 0,_c.isUndefined=Ec,_c.isntUndefined=function(t){return!Ec(t)};var Oc={};function jc(t){return"function"==typeof t}Oc.isntFunction=Oc.isFunction=void 0,Oc.isFunction=jc,Oc.isntFunction=function(t){return!jc(t)},Tc.isntAsyncIterable=Tc.isAsyncIterable=void 0;const Nc=Ic,kc=_c,Bc=Oc;function Pc(t){return(0,Nc.isntNull)(t)&&(0,kc.isntUndefined)(t)&&(0,Bc.isFunction)(t[Symbol.asyncIterator])}Tc.isAsyncIterable=Pc,Tc.isntAsyncIterable=function(t){return!Pc(t)};var qc={};function Cc(t){return"bigint"==typeof t}qc.isntBigInt=qc.isBigInt=void 0,qc.isBigInt=Cc,qc.isntBigInt=function(t){return!Cc(t)};var Mc={};function zc(t){return"boolean"==typeof t}Mc.isntBoolean=Mc.isBoolean=void 0,Mc.isBoolean=zc,Mc.isntBoolean=function(t){return!zc(t)};var Rc={},Fc={};function Uc(t){return"string"==typeof t}Fc.isntString=Fc.isString=void 0,Fc.isString=Uc,Fc.isntString=function(t){return!Uc(t)},Rc.isntChar=Rc.isChar=void 0;const Dc=Fc;function Vc(t){return(0,Dc.isString)(t)&&1===t.length}Rc.isChar=Vc,Rc.isntChar=function(t){return!Vc(t)};var Jc={};function Lc(t){return t instanceof Date}Jc.isntDate=Jc.isDate=void 0,Jc.isDate=Lc,Jc.isntDate=function(t){return!Lc(t)};var Kc={};Kc.inEnum=void 0,Kc.inEnum=function(t,e){return Object.values(e).includes(t)};var Wc={};function Yc(t){return t instanceof Error}Wc.isntError=Wc.isError=void 0,Wc.isError=Yc,Wc.isntError=function(t){return!Yc(t)};var Hc={};function $c(t){return!t}Hc.isntFalsy=Hc.isFalsy=void 0,Hc.isFalsy=$c,Hc.isntFalsy=function(t){return!$c(t)};var Qc={};Qc.isntIterable=Qc.isIterable=void 0;const Xc=Ic,Gc=_c,Zc=Oc;function tu(t){return(0,Xc.isntNull)(t)&&(0,Gc.isntUndefined)(t)&&(0,Zc.isFunction)(t[Symbol.iterator])}Qc.isIterable=tu,Qc.isntIterable=function(t){return!tu(t)};var eu={},nu={};function ru(t){return"number"==typeof t}function iu(t){return Number.isNaN(t)}nu.isntNaN=nu.isNaN=nu.isNegativeInfinity=nu.isPositiveInfinity=nu.isFinite=nu.isntNumber=nu.isNumber=void 0,nu.isNumber=ru,nu.isntNumber=function(t){return!ru(t)},nu.isFinite=function(t){return Number.isFinite(t)},nu.isPositiveInfinity=function(t){return t===1/0},nu.isNegativeInfinity=function(t){return t===-1/0},nu.isNaN=iu,nu.isntNaN=function(t){return!iu(t)};var ou={},su=n&&n.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};ou.isntEmptyObject=ou.isEmptyObject=ou.isntPlainObject=ou.isPlainObject=ou.isntObject=ou.isObject=void 0;const au=su(dt);function cu(t){return null!==t&&"object"==typeof t}function uu(t){return(0,au.default)(t)}ou.isObject=cu,ou.isntObject=function(t){return!cu(t)},ou.isPlainObject=uu,ou.isntPlainObject=function(t){return!uu(t)},ou.isEmptyObject=function(t){return 0===Object.keys(t).length},ou.isntEmptyObject=function(t){return 0!==Object.keys(t).length},eu.isntJsonable=eu.isJsonable=eu.isntJson=eu.isJson=void 0;const lu=Ic,fu=Mc,du=Fc,yu=nu,hu=Ac,vu=ou;function pu(t){return(0,lu.isNull)(t)||(0,fu.isBoolean)(t)||(0,du.isString)(t)||(0,yu.isNumber)(t)||(0,hu.isArray)(t)&&t.every(pu)||(0,vu.isPlainObject)(t)&&Object.values(t).every(pu)}eu.isJson=pu,eu.isntJson=function(t){return!pu(t)},eu.isJsonable=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},eu.isntJsonable=function t(e){return!t()};var mu={};mu.isPromiseLike=mu.isntPromiseLike=mu.isntPromise=mu.isPromise=void 0;const bu=ou,gu=Oc;function wu(t){return t instanceof Promise}function Au(t){return(0,bu.isObject)(t)&&(0,gu.isFunction)(t.then)}mu.isPromise=wu,mu.isntPromise=function(t){return!wu(t)},mu.isntPromiseLike=function(t){return!Au(t)},mu.isPromiseLike=Au;var xu={};xu.isAbsoluteURL=void 0,xu.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}},function(t){var e=n&&n.__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=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(Ac,t),r(Tc,t),r(qc,t),r(Mc,t),r(Rc,t),r(Jc,t),r(Kc,t),r(Wc,t),r(Hc,t),r(Oc,t),r(Qc,t),r(eu,t),r(Ic,t),r(nu,t),r(ou,t),r(mu,t),r(Fc,t),r(_c,t),r(xu,t)}(wc),gc.chunkByAsync=void 0;const Tu=wc;gc.chunkByAsync=function(t,e){return(0,Tu.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 Iu={};Iu.chunkBy=void 0,Iu.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 Su={chunk:void 0};const _u=vc,Eu=Mt;Su.chunk=function(t,e){return(0,Eu.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,Eu.assert)(e>0,"The parameter size must be greater than 0"),(0,_u.go)((function*(){let n=[];for(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var Ou={concatAsync:void 0};const ju=wc,Nu=vc;Ou.concatAsync=function(t,...e){return(0,Nu.go)((async function*(){for(const n of[t,...e])if((0,ju.isAsyncIterable)(n))for await(const t of n)yield t;else for(const t of n)yield t}))};var ku={concat:void 0};const Bu=vc;ku.concat=function(t,...e){return(0,Bu.go)((function*(){for(const n of[t,...e])yield*n}))};var Pu={},qu={};qu.copyIterable=qu.copyAsyncIterable=void 0,qu.copyAsyncIterable=async function*(t){for await(const e of t)yield e},qu.copyIterable=function*(t){for(const e of t)yield e},Pu.dropAsync=void 0;const Cu=vc,Mu=qu,zu=Mt;Pu.dropAsync=function(t,e){return(0,zu.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,zu.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Mu.copyAsyncIterable)(t):(0,Cu.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 Ru={dropRightAsync:void 0};const Fu=vc,Uu=qu,Du=Mt;Ru.dropRightAsync=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*(){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 Vu={dropRight:void 0};const Ju=vc,Lu=qu,Ku=Mt;Vu.dropRight=function(t,e){return(0,Ku.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Ku.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Lu.copyIterable)(t):(0,Ju.go)((function*(){const n=Array.from(t);yield*n.slice(0,-e)}))};var Wu={dropUntilAsync:void 0};const Yu=wc;Wu.dropUntilAsync=function(t,e){return(0,Yu.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 Hu={};Hu.dropUntil=void 0,Hu.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 $u={drop:void 0};const Qu=vc,Xu=qu,Gu=Mt;$u.drop=function(t,e){return(0,Gu.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Gu.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Xu.copyIterable)(t):(0,Qu.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 Zu={filterAsync:void 0};const tl=wc;Zu.filterAsync=function(t,e){return(0,tl.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n)&&(yield r),n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n)&&(yield r),n++}(t)};var el={};el.filter=void 0,el.filter=function*(t,e){let n=0;for(const r of t)e(r,n)&&(yield r),n++};var nl={},rl={},il={flattenByAsync:void 0};const ol=wc;function sl(t){return(0,ol.isIterable)(t)&&(0,ol.isntChar)(t)}il.flattenByAsync=function(t,e){return(0,ol.isAsyncIterable)(t)?async function*(t){const r=1;for await(const i of t)sl(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)sl(i)&&await e(i,r)?yield*n(i,r+1):yield i}},rl.flattenDeepAsync=void 0;const al=il,cl=Mt;rl.flattenDeepAsync=function(t,e=1/0){return(0,cl.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,cl.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,al.flattenByAsync)(t,((t,n)=>n<=e))},nl.flattenAsync=void 0;const ul=rl;nl.flattenAsync=function(t){return(0,ul.flattenDeepAsync)(t,1)};var ll={flattenBy:void 0};const fl=wc;ll.flattenBy=function(t,e){return function*t(n,r){for(const o of n)(0,fl.isIterable)(i=o)&&(0,fl.isntChar)(i)&&e(o,r)?yield*t(o,r+1):yield o;var i}(t,1)};var dl={flattenDeep:void 0};const yl=ll,hl=Mt;dl.flattenDeep=function(t,e=1/0){return(0,hl.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,hl.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,yl.flattenBy)(t,((t,n)=>n<=e))};var vl={flatten:void 0};const pl=dl;vl.flatten=function(t){return(0,pl.flattenDeep)(t,1)};var ml={mapAsync:void 0};const bl=wc;ml.mapAsync=function(t,e){return(0,bl.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 gl={};gl.map=void 0,gl.map=function*(t,e){let n=0;for(const r of t)yield e(r,n),n++};var wl={repeatAsync:void 0};const Al=vc,xl=Mt;wl.repeatAsync=function(t,e){return(0,xl.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,xl.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,Al.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 Tl={repeat:void 0};const Il=vc,Sl=Mt;Tl.repeat=function(t,e){return(0,Sl.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,Sl.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,Il.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 _l={sliceAsync:void 0};const El=vc,Ol=Mt;_l.sliceAsync=function(t,e,n=1/0){return(0,Ol.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,Ol.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,Ol.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Ol.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,El.go)((async function*(){let r=0;for await(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var jl={slice:void 0};const Nl=vc,kl=Mt;jl.slice=function(t,e,n=1/0){return(0,kl.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,kl.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,kl.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,kl.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,Nl.go)((function*(){let r=0;for(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var Bl={};Bl.splitAsync=void 0,Bl.splitAsync=async function*(t,e){let n=[];for await(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Pl={splitByAsync:void 0};const ql=wc;Pl.splitByAsync=function(t,e){return(0,ql.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 Cl={};Cl.splitBy=void 0,Cl.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 Ml={};Ml.split=void 0,Ml.split=function*(t,e){let n=[];for(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var zl={takeAsync:void 0};const Rl=vc,Fl=Mt;zl.takeAsync=function(t,e){return(0,Fl.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Fl.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Rl.go)((async function*(){if(0!==e)for await(const n of t)if(yield n,0===--e)break}))};var Ul={takeRightAsync:void 0};const Dl=vc,Vl=Mt;Ul.takeRightAsync=function(t,e){return(0,Vl.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Vl.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Dl.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 Jl={takeRight:void 0};const Ll=vc,Kl=Mt;Jl.takeRight=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,Ll.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 Wl={takeUntilAsync:void 0};const Yl=wc;Wl.takeUntilAsync=function(t,e){return(0,Yl.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 Hl={};Hl.takeUntil=void 0,Hl.takeUntil=function*(t,e){let n=0;for(const r of t){if(e(r,n))break;yield r,n++}};var $l={take:void 0};const Ql=vc,Xl=Mt;$l.take=function(t,e){return(0,Xl.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Xl.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Ql.go)((function*(){if(0!==e)for(const n of t)if(yield n,0===--e)break}))};var Gl={tapAsync:void 0};const Zl=wc;Gl.tapAsync=function(t,e){return(0,Zl.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 tf={};tf.tap=void 0,tf.tap=function*(t,e){let n=0;for(const r of t)e(r,n),yield r,n++};var ef={};ef.toAsyncIterable=void 0,ef.toAsyncIterable=async function*(t){for(const e of t)yield e};var nf={};nf.transformAsync=void 0,nf.transformAsync=async function*(t,e){yield*e(t)};var rf={};rf.transform=void 0,rf.transform=function*(t,e){yield*e(t)};var of={};of.uniqAsync=void 0,of.uniqAsync=async function*(t){const e=new Set;for await(const n of t)e.has(n)||(yield n,e.add(n))};var sf={uniqByAsync:void 0};const af=wc;sf.uniqByAsync=function(t,e){return(0,af.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 cf={};cf.uniqBy=void 0,cf.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 uf={};uf.uniq=void 0,uf.uniq=function*(t){const e=new Set;for(const n of t)e.has(n)||(yield n,e.add(n))};var lf={zipAsync:void 0};const ff=wc;var df;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(df||(df={})),lf.zipAsync=function(t,...e){return async function*(...t){var e,n,r,i;const o=t.length,s=t.map((t=>(0,ff.isAsyncIterable)(t)?[df.Async,t[Symbol.asyncIterator]()]:[df.Sync,t[Symbol.iterator]()])),a=s.map((()=>!1));try{for(;;){const t=new Array(o);for(let e=0;e<o;e++){const[n,r]=s[e];let i;if(i=n===df.Async?await r.next():r.next(),i.done)return void(a[e]=!0);t[e]=i.value}yield t}}finally{const t=s.filter(((t,e)=>!a[e]));for(const[o,s]of t)o===df.Async?await(null===(n=(e=s).return)||void 0===n?void 0:n.call(e)):null===(i=(r=s).return)||void 0===i||i.call(r)}}(t,...e)};var yf={};yf.zip=void 0,yf.zip=function(t,...e){return function*(...t){const e=t.length,n=t.map((t=>t[Symbol.iterator]())),r=n.map((()=>!1));try{for(;;){const t=new Array(e);for(let i=0;i<e;i++){const{value:e,done:o}=n[i].next();if(o)return void(r[i]=!0);t[i]=e}yield t}}finally{n.filter(((t,e)=>!r[e])).forEach((t=>{var e;return null===(e=t.return)||void 0===e?void 0:e.call(t)}))}}(t,...e)},function(t){var e=n&&n.__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=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(hc,t),r(gc,t),r(Iu,t),r(Su,t),r(Ou,t),r(ku,t),r(Pu,t),r(Ru,t),r(Vu,t),r(Wu,t),r(Hu,t),r($u,t),r(Zu,t),r(el,t),r(nl,t),r(il,t),r(ll,t),r(rl,t),r(dl,t),r(vl,t),r(ml,t),r(gl,t),r(wl,t),r(Tl,t),r(_l,t),r(jl,t),r(Bl,t),r(Pl,t),r(Cl,t),r(Ml,t),r(zl,t),r(Ul,t),r(Jl,t),r(Wl,t),r(Hl,t),r($l,t),r(Gl,t),r(tf,t),r(ef,t),r(nf,t),r(rf,t),r(of,t),r(sf,t),r(cf,t),r(uf,t),r(lf,t),r(yf,t)}(yc);var hf={},vf={};vf.consume=void 0,vf.consume=function(t,e){return e(t)};var pf={eachAsync:void 0};const mf=wc;pf.eachAsync=function(t,e){return(0,mf.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 bf={};bf.each=void 0,bf.each=function(t,e){let n=0;for(const r of t)e(r,n),n++};var gf={everyAsync:void 0};const wf=wc;gf.everyAsync=function(t,e){return(0,wf.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 Af={};Af.every=void 0,Af.every=function(t,e){let n=0;for(const r of t){if(!e(r,n))return!1;n++}return!0};var xf={findAsync:void 0};const Tf=wc;xf.findAsync=function(t,e){return(0,Tf.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 If={};If.find=void 0,If.find=function(t,e){let n=0;for(const r of t){if(e(r,n))return r;n++}};var Sf={};Sf.firstAsync=void 0,Sf.firstAsync=async function(t){for await(const e of t)return e};var _f={};_f.first=void 0,_f.first=function(t){for(const e of t)return e};var Ef={};Ef.includesAsync=void 0,Ef.includesAsync=async function(t,e){for await(const n of t)if(n===e)return!0;return!1};var Of={};Of.includes=void 0,Of.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1};var jf={};jf.matchAsync=void 0,jf.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 Nf={};Nf.match=void 0,Nf.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 kf={reduceAsync:void 0};const Bf=wc;kf.reduceAsync=function(t,e,n){return(0,Bf.isUndefined)(n)?function(t,e){return(0,Bf.isAsyncIterable)(t)?n(t):r(t);async function n(t){var n;const r=t[Symbol.asyncIterator]();let i;try{let t,s=await o(r),a=1;for(;({value:t,done:i}=await r.next()),!i;)s=await e(s,t,a++);return s}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}async function o(t){const e=await t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}async function r(t){var n;const r=t[Symbol.iterator]();let i;try{let t,s=o(r),a=1;for(;({value:t,done:i}=r.next()),!i;)s=await e(s,t,a++);return s}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}}(t,e):function(t,e,n){return(0,Bf.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 Pf={reduce:void 0};const qf=wc;Pf.reduce=function(t,e,n){return(0,qf.isUndefined)(n)?function(t,e){var n;const r=t[Symbol.iterator]();let i;try{let t,s=o(r),a=1;for(;({value:t,done:i}=r.next()),!i;)s=e(s,t,a++);return s}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}(t,e):function(t,e,n){let r=n,i=0;for(const n of t)r=e(r,n,i++);return r}(t,e,n)};var Cf={someAsync:void 0};const Mf=wc;Cf.someAsync=function(t,e){return(0,Mf.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 zf={};zf.some=void 0,zf.some=function(t,e){let n=0;for(const r of t){if(e(r,n))return!0;n++}return!1};var Rf={};Rf.lastAsync=void 0,Rf.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 Ff={};Ff.last=void 0,Ff.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 Uf={toArrayAsync:void 0};const Df=vf;Uf.toArrayAsync=function(t){return(0,Df.consume)(t,(async t=>{const e=[];for await(const n of t)e.push(n);return e}))};var Vf={toArray:void 0};const Jf=vf;Vf.toArray=function(t){return(0,Jf.consume)(t,(t=>Array.from(t)))};var Lf={toSetAsync:void 0};const Kf=vf;Lf.toSetAsync=function(t){return(0,Kf.consume)(t,(async t=>{const e=new Set;for await(const n of t)e.add(n);return e}))};var Wf={toSet:void 0};const Yf=vf;Wf.toSet=function(t){return(0,Yf.consume)(t,(t=>new Set(t)))};var Hf={};Hf.count=void 0,Hf.count=function(t){let e=0;for(const n of t)e++;return e};var $f={};$f.countAsync=void 0,$f.countAsync=async function(t){let e=0;for await(const n of t)e++;return e},function(t){var e=n&&n.__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=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(vf,t),r(pf,t),r(bf,t),r(gf,t),r(Af,t),r(xf,t),r(If,t),r(Sf,t),r(_f,t),r(Ef,t),r(Of,t),r(jf,t),r(Nf,t),r(kf,t),r(Pf,t),r(Cf,t),r(zf,t),r(Rf,t),r(Ff,t),r(Uf,t),r(Vf,t),r(Lf,t),r(Wf,t),r(Hf,t),r($f,t)}(hf),function(t){var e=n&&n.__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=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(yc,t),r(hf,t)}(dc);class Qf{constructor(t){this.map=new Map,Mt.assert(Number.isInteger(t),"The parameter limit must be an integer"),Mt.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 dc.first(this.map.keys())}}var Xf={},Gf={},Zf={},td={};td.random=void 0,td.random=function(t,e){return Math.random()*(e-t)+t};var ed={};ed.randomInt=void 0,ed.randomInt=function(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t))+t};var nd={};nd.randomIntInclusive=void 0,nd.randomIntInclusive=function(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t},function(t){var e=n&&n.__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=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(td,t),r(ed,t),r(nd,t)}(Zf),Gf.calculateExponentialBackoffTimeout=void 0;const rd=Zf;Gf.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,rd.randomIntInclusive)(0,o):o};var id={};id.setTimeout=void 0,id.setTimeout=function(t,e){const n=globalThis.setTimeout(e,t);return()=>clearTimeout(n)};var od={setSchedule:void 0};const sd=id;od.setSchedule=function(t,e){const n=t-Date.now();return(0,sd.setTimeout)(n,e)};var ad={};ad.setInterval=void 0,ad.setInterval=function(t,e){const n=globalThis.setInterval(e,t);return()=>clearInterval(n)};var cd={setImmediate:void 0};const ud=id;cd.setImmediate=function(t){if(globalThis.setImmediate){const e=globalThis.setImmediate(t);return()=>clearImmediate(e)}return(0,ud.setTimeout)(0,t)};var ld={setTimeoutLoop:void 0};const fd=id;ld.setTimeoutLoop=function(t,e){let n=!1,r=(0,fd.setTimeout)(t,(async function i(){await e(),n||(r=(0,fd.setTimeout)(t,i))}));return()=>{n=!0,r()}};var dd={setDynamicTimeoutLoop:void 0};const yd=id;dd.setDynamicTimeoutLoop=function(t,e){let n=!1,r=(0,yd.setTimeout)(t,(async function i(){const o=Date.now();await e();const s=Date.now()-o;n||(r=(0,yd.setTimeout)(Math.max(t-s,0),i))}));return()=>{n=!0,r()}},function(t){var e=n&&n.__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=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(Gf,t),r(id,t),r(od,t),r(ad,t),r(cd,t),r(ld,t),r(dd,t)}(Xf);class hd{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=Xf.setSchedule(t.expirationTime,(()=>{this.clearExpiredItems(Date.now()),this.rescheduleClearTimeout()}));this.cancelClearTimeout=()=>{e(),this.cancelClearTimeout=void 0}}}}}class vd{constructor(t){this.map=new Map,this.itemMetadataSortedByExpirationTime=[],Mt.assert(Number.isInteger(t),"The parameter limit must be an integer"),Mt.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=Xf.setSchedule(t.expirationTime,(()=>{this.clearExpiredItems(Date.now()),this.rescheduleClearTimeout()}));this.cancelClearTimeout=()=>{e(),this.cancelClearTimeout=void 0}}}}getColdestKey(){return dc.first(this.map.keys())}}class pd{constructor(t){this.value=t,this.children=new Map}}class md{constructor(){this.root=new pd}get[Symbol.toStringTag](){return this.constructor.name}*entries(){yield*function*t(e,n){for(const[i,o]of e.children){const e=[...n,i];r.isntUndefined(o.value)&&(yield[e,o.value]),yield*t(o,e)}}(this.root,[])}keys(){return dc.map(this.entries(),(([t])=>t))}values(){return dc.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 pd),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 dc.toArray(dc.zip(t,e)).reverse())if(r.children.delete(n),0!==r.children.size)break;return!0}}class bd{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 gd(this.state,t);this._state=this.schema[this.state][t]}}class gd extends Mt.CustomError{constructor(t,e){super(`State ${t} cannot react to event ${e}`)}}
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation.
4
4
 
@@ -12,5 +12,5 @@
12
12
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
  PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */var wd=function(t,e){return(wd=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 Ad(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}wd(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 xd(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)s.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 s}function Id(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 Sd(t){return"function"==typeof t}function _d(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 Ed=_d((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 Od(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var jd=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 s=Td(o),a=s.next();!a.done;a=s.next()){a.value.remove(this)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}else o.remove(this);var c=this.initialTeardown;if(Sd(c))try{c()}catch(t){i=t instanceof Ed?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{Bd(d)}catch(t){i=null!=i?i:[],t instanceof Ed?i=Id(Id([],xd(i)),xd(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 Ed(i)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Bd(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)&&Od(e,t)},t.prototype.remove=function(e){var n=this._finalizers;n&&Od(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}(),Nd=jd.EMPTY;function kd(t){return t instanceof jd||t&&"closed"in t&&Sd(t.remove)&&Sd(t.add)&&Sd(t.unsubscribe)}function Bd(t){Sd(t)?t():t.unsubscribe()}var Pd={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},qd=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Id([t,e],xd(n)))};function Cd(){}function Md(t){t()}var Rd=function(t){function e(e){var n=t.call(this)||this;return n.isStopped=!1,e?(n.destination=e,kd(e)&&e.add(n)):n.destination=Jd,n}return Ad(e,t),e.create=function(t,e,n){return new Dd(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}(jd),zd=Function.prototype.bind;function Fd(t,e){return zd.call(t,e)}var Ud=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){Vd(t)}},t.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(t){Vd(t)}else Vd(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){Vd(t)}},t}(),Dd=function(t){function e(e,n,r){var i,o,s=t.call(this)||this;Sd(e)||!e?i={next:null!=e?e:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:s&&Pd.useDeprecatedNextContext?((o=Object.create(e)).unsubscribe=function(){return s.unsubscribe()},i={next:e.next&&Fd(e.next,o),error:e.error&&Fd(e.error,o),complete:e.complete&&Fd(e.complete,o)}):i=e;return s.destination=new Ud(i),s}return Ad(e,t),e}(Rd);function Vd(t){var e;e=t,qd((function(){throw e}))}var Jd={closed:!0,next:Cd,error:function(t){throw t},complete:Cd},Kd="function"==typeof Symbol&&Symbol.observable||"@@observable";function Ld(t){return t}function Wd(t){return 0===t.length?Ld:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}var Yd=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 Rd||function(t){return t&&Sd(t.next)&&Sd(t.error)&&Sd(t.complete)}(r)&&kd(r)?t:new Dd(t,e,n);return Md((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=Hd(e))((function(e,r){var i=new Dd({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[Kd]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Wd(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=Hd(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 Hd(t){var e;return null!==(e=null!=t?t:Pd.Promise)&&void 0!==e?e:Promise}function $d(t){return Sd(null==t?void 0:t.lift)}function Qd(t,e,n,r,i){return new Xd(t,e,n,r,i)}var Xd=function(t){function e(e,n,r,i,o,s){var a=t.call(this,e)||this;return a.onFinalize=o,a.shouldUnsubscribe=s,a._next=n?function(t){try{n(t)}catch(t){e.error(t)}}:t.prototype._next,a._error=i?function(t){try{i(t)}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._error,a._complete=r?function(){try{r()}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._complete,a}return Ad(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}(Rd);function Gd(){return t=function(t,e){var n=null;t._refCount++;var r=Qd(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($d(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,$d(e)&&(r.lift=e.lift),r}Ad(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 jd;var n=this.getSubject();e.add(this.source.subscribe(Qd(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=jd.EMPTY)}return e},e.prototype.refCount=function(){return Gd()(this)}}(Yd);var Zd,ty,ey={now:function(){return(ey.delegate||performance).now()},delegate:void 0},ny={schedule:function(t){var e=requestAnimationFrame,n=cancelAnimationFrame,r=e((function(e){n=void 0,t(e)}));return new jd((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=ny.delegate;return((null==n?void 0:n.requestAnimationFrame)||requestAnimationFrame).apply(void 0,Id([],xd(t)))},cancelAnimationFrame:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return cancelAnimationFrame.apply(void 0,Id([],xd(t)))},delegate:void 0};ty=ny.schedule,new Yd((function(t){var e=new jd,n=Zd||ey,r=n.now(),i=function(o){var s=n.now();t.next({timestamp:Zd?s:o,elapsed:s-r}),t.closed||e.add(ty(i))};return e.add(ty(i)),e}));var ry=_d((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),iy=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 Ad(e,t),e.prototype.lift=function(t){var e=new oy(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new ry},e.prototype.next=function(t){var e=this;Md((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;Md((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;Md((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?Nd:(this.currentObservers=null,o.push(t),new jd((function(){e.currentObservers=null,Od(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 Yd;return t.source=this,t},e.create=function(t,e){return new oy(t,e)},e}(Yd),oy=function(t){function e(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return Ad(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:Nd},e}(iy);!function(t){function e(e){var n=t.call(this)||this;return n._value=e,n}Ad(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)}}(iy);var sy={now:function(){return(sy.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=sy);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}Ad(e,t),e.prototype.next=function(e){var n=this,r=n.isStopped,i=n._buffer,o=n._infiniteTimeWindow,s=n._timestampProvider,a=n._windowTime;r||(i.push(e),!o&&i.push(s.now()+a)),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 s=n.now(),a=0,c=1;c<r.length&&r[c]<=s;c+=2)a=c;a&&r.splice(0,a+1)}}}(iy),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._value=null,e._hasValue=!1,e._isComplete=!1,e}Ad(e,t),e.prototype._checkFinalizedStatuses=function(t){var e=this,n=e.hasError,r=e._hasValue,i=e._value,o=e.thrownError,s=e.isStopped,a=e._isComplete;n?t.error(o):(s||a)&&(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))}}(iy);var ay,cy=function(t){function e(e,n){return t.call(this)||this}return Ad(e,t),e.prototype.schedule=function(t,e){return this},e}(jd),uy=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,Id([t,e],xd(n)))},ly=function(t){return clearInterval(t)},fy=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 Ad(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),uy(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;ly(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,Od(r,this),null!=e&&(this.id=this.recycleAsyncId(n,e,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(cy),dy=1,yy={};function hy(t){return t in yy&&(delete yy[t],!0)}var vy=function(t){var e=dy++;return yy[e]=!0,ay||(ay=Promise.resolve()),ay.then((function(){return hy(e)&&t()})),e},py=function(t){hy(t)},my={setImmediate:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=my.delegate;return((null==n?void 0:n.setImmediate)||vy).apply(void 0,Id([],xd(t)))},clearImmediate:function(t){return py(t)},delegate:void 0},by=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return Ad(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=my.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}))||(my.clearImmediate(n),e._scheduled=void 0)},e}(fy),gy=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=sy.now,t}(),wy=function(t){function e(e,n){void 0===n&&(n=gy.now);var r=t.call(this,e,n)||this;return r.actions=[],r._active=!1,r._scheduled=void 0,r}return Ad(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}(gy);new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ad(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}(wy))(by),new wy(fy);var Ay=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return Ad(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}(fy);new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ad(e,t),e}(wy))(Ay);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 Ad(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=ny.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}))||(ny.cancelAnimationFrame(n),e._scheduled=void 0)},e}(fy);new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ad(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}(wy))(Ty),function(t){function e(e,n){void 0===e&&(e=Iy),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}Ad(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}(wy);var xy,Iy=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 Ad(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 jd.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}(fy);new Yd((function(t){return t.complete()})),function(t){t.NEXT="N",t.ERROR="E",t.COMPLETE="C"}(xy||(xy={})),_d((function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}})),_d((function(t){return function(){t(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})),_d((function(t){return function(e){t(this),this.name="NotFoundError",this.message=e}})),_d((function(t){return function(e){t(this),this.name="SequenceError",this.message=e}})),_d((function(t){return function(e){void 0===e&&(e=null),t(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=e}})),new Yd(Cd);class Sy extends bd{constructor(){super(...arguments),this.stateChanges=new iy}get[Symbol.toStringTag](){return this.constructor.name}observeStateChanges(){return this.stateChanges}send(t){const e=this.state;super.send(t);const n=this.state;this.stateChanges.next({event:t,oldState:e,newState:n}),r.isEmptyObject(this.schema[n])&&this.stateChanges.complete()}}class _y{constructor(){this.indexToValue=[],this.valueToIndex=[]}get[Symbol.toStringTag](){return this.constructor.name}[Symbol.iterator](){return this.indexToValue[Symbol.iterator]()}values(){return this.indexToValue[Symbol.iterator]()}has(t){return t in this.valueToIndex}add(t){if(!this.has(t)){const e=this.indexToValue.length;this.indexToValue.push(t),this.valueToIndex[t]=e}}delete(t){if(this.has(t)){const e=this.indexToValue.pop();if(t===e)delete this.valueToIndex[t];else{const n=this.valueToIndex[t];this.indexToValue[n]=e,this.valueToIndex[e]=n,delete this.valueToIndex[t]}}}}class Ey{constructor(){this.keyToIndex=[],this.indexToKey=[],this.indexToValue=[]}get[Symbol.toStringTag](){return this.constructor.name}*entries(){for(let t=0;t<this.indexToKey.length;t++)yield[this.indexToKey[t],this.indexToValue[t]]}keys(){return this.indexToKey.values()}values(){return this.indexToValue.values()}has(t){return t in this.keyToIndex}get(t){if(this.has(t)){const e=this.keyToIndex[t];return this.indexToValue[e]}}set(t,e){if(this.has(t)){const n=this.keyToIndex[t];this.indexToValue[n]=e}else{const n=this.indexToKey.length;this.indexToKey.push(t),this.indexToValue.push(e),this.keyToIndex[t]=n}}delete(t){if(this.has(t)){const e=this.indexToKey.pop(),n=this.indexToValue.pop();if(t===e)delete this.keyToIndex[t];else{const r=this.keyToIndex[t];this.indexToKey[r]=e,this.indexToValue[r]=n,this.keyToIndex[t]=r,delete this.keyToIndex[t]}}}}class Oy{constructor(t){this.keyToIndex=[],this.indexToKey=[],Mt.assert(0===t.length,"array should be empty"),this.indexToValue=t}get[Symbol.toStringTag](){return this.constructor.name}*entries(){for(let t=0;t<this.indexToKey.length;t++)yield[this.indexToKey[t],this.indexToValue.internalTypedArray[t]]}keys(){return this.indexToKey.values()}*values(){for(let t=0;t<this.indexToKey.length;t++)yield this.indexToValue.internalTypedArray[t]}has(t){const e=this.keyToIndex[t];return this.indexToKey[e]===t}get(t){const e=this.keyToIndex[t];return this.indexToKey[e]===t?this.indexToValue.internalTypedArray[e]:void 0}set(t,e){const n=this.keyToIndex[t];if(this.indexToKey[n]===t)this.indexToValue.internalTypedArray[n]=e;else{const n=this.indexToKey.length;this.indexToKey.push(t),this.indexToValue.push(e),this.keyToIndex[t]=n}}delete(t){const e=this.keyToIndex[t];if(this.indexToKey[e]===t){const n=this.indexToKey.pop(),r=this.indexToValue.pop();t!==n&&(this.indexToKey[e]=n,this.indexToValue.internalTypedArray[e]=r,this.keyToIndex[n]=e)}}}class jy{constructor(t){const e=[];if(t.length>0)for(const[n,r]of t.internalTypedArray.entries())e[r]=n;this.indexToValue=t,this.valueToIndex=e}get[Symbol.toStringTag](){return this.constructor.name}[Symbol.iterator](){return this.values()}*values(){for(let t=0;t<this.indexToValue.length;t++)yield this.indexToValue.internalTypedArray[t]}has(t){const e=this.valueToIndex[t];return this.indexToValue.internalTypedArray[e]===t}add(t){if(!this.has(t)){const e=this.indexToValue.length;this.indexToValue.push(t),this.valueToIndex[t]=e}}delete(t){const e=this.valueToIndex[t];if(this.indexToValue.internalTypedArray[e]===t){const n=this.indexToValue.pop();t!==n&&(this.indexToValue.internalTypedArray[e]=n,this.valueToIndex[n]=e)}}}class Ny{constructor(t,{capacity:e=0,growthFactor:n=1.5}={}){this.typedArrayConstructor=t,this._length=0,Mt.assert(Number.isInteger(e),"capacity must be an integer"),Mt.assert(e>=0,"capacity must be greater than or equal to 0"),Mt.assert(n>=1,"growthFactory must be greater than or equal to 1"),this.array=new t(e),this.growthFactor=n}get internalTypedArray(){return this.array}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=ky(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=ky(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=ky(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 ky(t,e,n){if(1===n)return e;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)}}t.BadEventError=gd,t.Box=e,t.DynamicTypedArray=Ny,t.Emitter=Bt,t.ExpirableMap=hd,t.FiniteStateMachine=bd,t.HashMap=Pt,t.HashSet=qt,t.LRUMap=Qf,t.ObservableFiniteStateMachine=Sy,t.Queue=Ct,t.SparseMap=Ey,t.SparseSet=_y,t.TLRUMap=vd,t.TrieMap=md,t.TypedSparseMap=Oy,t.TypedSparseSet=jy,t.convertArrayToCons=function t([e,...n]){return[e,n.length?t(n):null]},t.convertConsToArray=function t([e,n]){return r.isNull(n)?[e]:[e,...t(n)]},Object.defineProperty(t,"__esModule",{value:!0})}));
15
+ ***************************************************************************** */var wd=function(t,e){return(wd=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 Ad(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}wd(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function xd(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 Td(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)s.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 s}function Id(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 Sd(t){return"function"==typeof t}function _d(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 Ed=_d((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 Od(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var jd=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 s=xd(o),a=s.next();!a.done;a=s.next()){a.value.remove(this)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}else o.remove(this);var c=this.initialTeardown;if(Sd(c))try{c()}catch(t){i=t instanceof Ed?t.errors:[t]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var l=xd(u),f=l.next();!f.done;f=l.next()){var d=f.value;try{Bd(d)}catch(t){i=null!=i?i:[],t instanceof Ed?i=Id(Id([],Td(i)),Td(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 Ed(i)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Bd(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)&&Od(e,t)},t.prototype.remove=function(e){var n=this._finalizers;n&&Od(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}(),Nd=jd.EMPTY;function kd(t){return t instanceof jd||t&&"closed"in t&&Sd(t.remove)&&Sd(t.add)&&Sd(t.unsubscribe)}function Bd(t){Sd(t)?t():t.unsubscribe()}var Pd={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},qd=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Id([t,e],Td(n)))};function Cd(){}function Md(t){t()}var zd=function(t){function e(e){var n=t.call(this)||this;return n.isStopped=!1,e?(n.destination=e,kd(e)&&e.add(n)):n.destination=Jd,n}return Ad(e,t),e.create=function(t,e,n){return new Dd(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}(jd),Rd=Function.prototype.bind;function Fd(t,e){return Rd.call(t,e)}var Ud=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){Vd(t)}},t.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(t){Vd(t)}else Vd(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){Vd(t)}},t}(),Dd=function(t){function e(e,n,r){var i,o,s=t.call(this)||this;Sd(e)||!e?i={next:null!=e?e:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:s&&Pd.useDeprecatedNextContext?((o=Object.create(e)).unsubscribe=function(){return s.unsubscribe()},i={next:e.next&&Fd(e.next,o),error:e.error&&Fd(e.error,o),complete:e.complete&&Fd(e.complete,o)}):i=e;return s.destination=new Ud(i),s}return Ad(e,t),e}(zd);function Vd(t){var e;e=t,qd((function(){throw e}))}var Jd={closed:!0,next:Cd,error:function(t){throw t},complete:Cd},Ld="function"==typeof Symbol&&Symbol.observable||"@@observable";function Kd(t){return t}function Wd(t){return 0===t.length?Kd:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}var Yd=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 zd||function(t){return t&&Sd(t.next)&&Sd(t.error)&&Sd(t.complete)}(r)&&kd(r)?t:new Dd(t,e,n);return Md((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=Hd(e))((function(e,r){var i=new Dd({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[Ld]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Wd(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=Hd(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 Hd(t){var e;return null!==(e=null!=t?t:Pd.Promise)&&void 0!==e?e:Promise}function $d(t){return Sd(null==t?void 0:t.lift)}function Qd(t,e,n,r,i){return new Xd(t,e,n,r,i)}var Xd=function(t){function e(e,n,r,i,o,s){var a=t.call(this,e)||this;return a.onFinalize=o,a.shouldUnsubscribe=s,a._next=n?function(t){try{n(t)}catch(t){e.error(t)}}:t.prototype._next,a._error=i?function(t){try{i(t)}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._error,a._complete=r?function(){try{r()}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._complete,a}return Ad(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}(zd);function Gd(){return t=function(t,e){var n=null;t._refCount++;var r=Qd(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($d(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,$d(e)&&(r.lift=e.lift),r}Ad(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 jd;var n=this.getSubject();e.add(this.source.subscribe(Qd(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=jd.EMPTY)}return e},e.prototype.refCount=function(){return Gd()(this)}}(Yd);var Zd,ty,ey={now:function(){return(ey.delegate||performance).now()},delegate:void 0},ny={schedule:function(t){var e=requestAnimationFrame,n=cancelAnimationFrame,r=e((function(e){n=void 0,t(e)}));return new jd((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=ny.delegate;return((null==n?void 0:n.requestAnimationFrame)||requestAnimationFrame).apply(void 0,Id([],Td(t)))},cancelAnimationFrame:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return cancelAnimationFrame.apply(void 0,Id([],Td(t)))},delegate:void 0};ty=ny.schedule,new Yd((function(t){var e=new jd,n=Zd||ey,r=n.now(),i=function(o){var s=n.now();t.next({timestamp:Zd?s:o,elapsed:s-r}),t.closed||e.add(ty(i))};return e.add(ty(i)),e}));var ry=_d((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),iy=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 Ad(e,t),e.prototype.lift=function(t){var e=new oy(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new ry},e.prototype.next=function(t){var e=this;Md((function(){var n,r;if(e._throwIfClosed(),!e.isStopped){e.currentObservers||(e.currentObservers=Array.from(e.observers));try{for(var i=xd(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;Md((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;Md((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?Nd:(this.currentObservers=null,o.push(t),new jd((function(){e.currentObservers=null,Od(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 Yd;return t.source=this,t},e.create=function(t,e){return new oy(t,e)},e}(Yd),oy=function(t){function e(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return Ad(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:Nd},e}(iy);!function(t){function e(e){var n=t.call(this)||this;return n._value=e,n}Ad(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)}}(iy);var sy={now:function(){return(sy.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=sy);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}Ad(e,t),e.prototype.next=function(e){var n=this,r=n.isStopped,i=n._buffer,o=n._infiniteTimeWindow,s=n._timestampProvider,a=n._windowTime;r||(i.push(e),!o&&i.push(s.now()+a)),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 s=n.now(),a=0,c=1;c<r.length&&r[c]<=s;c+=2)a=c;a&&r.splice(0,a+1)}}}(iy),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._value=null,e._hasValue=!1,e._isComplete=!1,e}Ad(e,t),e.prototype._checkFinalizedStatuses=function(t){var e=this,n=e.hasError,r=e._hasValue,i=e._value,o=e.thrownError,s=e.isStopped,a=e._isComplete;n?t.error(o):(s||a)&&(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))}}(iy);var ay,cy=function(t){function e(e,n){return t.call(this)||this}return Ad(e,t),e.prototype.schedule=function(t,e){return this},e}(jd),uy=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,Id([t,e],Td(n)))},ly=function(t){return clearInterval(t)},fy=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 Ad(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),uy(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;ly(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,Od(r,this),null!=e&&(this.id=this.recycleAsyncId(n,e,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(cy),dy=1,yy={};function hy(t){return t in yy&&(delete yy[t],!0)}var vy=function(t){var e=dy++;return yy[e]=!0,ay||(ay=Promise.resolve()),ay.then((function(){return hy(e)&&t()})),e},py=function(t){hy(t)},my={setImmediate:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=my.delegate;return((null==n?void 0:n.setImmediate)||vy).apply(void 0,Id([],Td(t)))},clearImmediate:function(t){return py(t)},delegate:void 0},by=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return Ad(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=my.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}))||(my.clearImmediate(n),e._scheduled=void 0)},e}(fy),gy=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=sy.now,t}(),wy=function(t){function e(e,n){void 0===n&&(n=gy.now);var r=t.call(this,e,n)||this;return r.actions=[],r._active=!1,r._scheduled=void 0,r}return Ad(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}(gy);new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ad(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}(wy))(by),new wy(fy);var Ay=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return Ad(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}(fy);new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ad(e,t),e}(wy))(Ay);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 Ad(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=ny.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}))||(ny.cancelAnimationFrame(n),e._scheduled=void 0)},e}(fy);new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ad(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}(wy))(xy),function(t){function e(e,n){void 0===e&&(e=Iy),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}Ad(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}(wy);var Ty,Iy=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 Ad(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 jd.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}(fy);new Yd((function(t){return t.complete()})),function(t){t.NEXT="N",t.ERROR="E",t.COMPLETE="C"}(Ty||(Ty={})),_d((function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}})),_d((function(t){return function(){t(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})),_d((function(t){return function(e){t(this),this.name="NotFoundError",this.message=e}})),_d((function(t){return function(e){t(this),this.name="SequenceError",this.message=e}})),_d((function(t){return function(e){void 0===e&&(e=null),t(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=e}})),new Yd(Cd);class Sy extends bd{constructor(){super(...arguments),this.stateChanges=new iy}get[Symbol.toStringTag](){return this.constructor.name}observeStateChanges(){return this.stateChanges}send(t){const e=this.state;super.send(t);const n=this.state;this.stateChanges.next({event:t,oldState:e,newState:n}),r.isEmptyObject(this.schema[n])&&this.stateChanges.complete()}}class _y{constructor(t=[]){this.indexToValue=[];const e=[];if(t.length>0)for(const[n,r]of t.entries())e[r]=n;this.valueToIndex=e}get[Symbol.toStringTag](){return this.constructor.name}[Symbol.iterator](){return this.indexToValue[Symbol.iterator]()}values(){return this.indexToValue[Symbol.iterator]()}has(t){return t in this.valueToIndex}add(t){if(!this.has(t)){const e=this.indexToValue.length;this.indexToValue.push(t),this.valueToIndex[t]=e}}delete(t){if(this.has(t)){const e=this.indexToValue.pop();if(t===e)delete this.valueToIndex[t];else{const n=this.valueToIndex[t];this.indexToValue[n]=e,this.valueToIndex[e]=n,delete this.valueToIndex[t]}}}}class Ey{constructor(){this.keyToIndex=[],this.indexToKey=[],this.indexToValue=[]}get[Symbol.toStringTag](){return this.constructor.name}*entries(){for(let t=0;t<this.indexToKey.length;t++)yield[this.indexToKey[t],this.indexToValue[t]]}keys(){return this.indexToKey.values()}values(){return this.indexToValue.values()}has(t){return t in this.keyToIndex}get(t){if(this.has(t)){const e=this.keyToIndex[t];return this.indexToValue[e]}}set(t,e){if(this.has(t)){const n=this.keyToIndex[t];this.indexToValue[n]=e}else{const n=this.indexToKey.length;this.indexToKey.push(t),this.indexToValue.push(e),this.keyToIndex[t]=n}}delete(t){if(this.has(t)){const e=this.indexToKey.pop(),n=this.indexToValue.pop();if(t===e)delete this.keyToIndex[t];else{const r=this.keyToIndex[t];this.indexToKey[r]=e,this.indexToValue[r]=n,this.keyToIndex[t]=r,delete this.keyToIndex[t]}}}}class Oy{constructor(t){this.keyToIndex=[],this.indexToKey=[],Mt.assert(0===t.length,"array should be empty"),this.indexToValue=t}get[Symbol.toStringTag](){return this.constructor.name}*entries(){for(let t=0;t<this.indexToKey.length;t++)yield[this.indexToKey[t],this.indexToValue.internalTypedArray[t]]}keys(){return this.indexToKey.values()}*values(){for(let t=0;t<this.indexToKey.length;t++)yield this.indexToValue.internalTypedArray[t]}has(t){const e=this.keyToIndex[t];return this.indexToKey[e]===t}get(t){const e=this.keyToIndex[t];return this.indexToKey[e]===t?this.indexToValue.internalTypedArray[e]:void 0}set(t,e){const n=this.keyToIndex[t];if(this.indexToKey[n]===t)this.indexToValue.internalTypedArray[n]=e;else{const n=this.indexToKey.length;this.indexToKey.push(t),this.indexToValue.push(e),this.keyToIndex[t]=n}}delete(t){const e=this.keyToIndex[t];if(this.indexToKey[e]===t){const n=this.indexToKey.pop(),r=this.indexToValue.pop();t!==n&&(this.indexToKey[e]=n,this.indexToValue.internalTypedArray[e]=r,this.keyToIndex[n]=e)}}}class jy{constructor(t){const e=[];if(t.length>0)for(const[n,r]of t.internalTypedArray.entries())e[r]=n;this.indexToValue=t,this.valueToIndex=e}get[Symbol.toStringTag](){return this.constructor.name}[Symbol.iterator](){return this.values()}*values(){for(let t=0;t<this.indexToValue.length;t++)yield this.indexToValue.internalTypedArray[t]}has(t){const e=this.valueToIndex[t];return this.indexToValue.internalTypedArray[e]===t}add(t){if(!this.has(t)){const e=this.indexToValue.length;this.indexToValue.push(t),this.valueToIndex[t]=e}}delete(t){const e=this.valueToIndex[t];if(this.indexToValue.internalTypedArray[e]===t){const n=this.indexToValue.pop();t!==n&&(this.indexToValue.internalTypedArray[e]=n,this.valueToIndex[n]=e)}}}class Ny{constructor(t,{capacity:e=0,growthFactor:n=1.5}={}){this.typedArrayConstructor=t,this._length=0,Mt.assert(Number.isInteger(e),"capacity must be an integer"),Mt.assert(e>=0,"capacity must be greater than or equal to 0"),Mt.assert(n>=1,"growthFactory must be greater than or equal to 1"),this.array=new t(e),this.growthFactor=n}get internalTypedArray(){return this.array}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=ky(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=ky(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=ky(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 ky(t,e,n){if(1===n)return e;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)}}class By{constructor(t){this.value=t,this.previous=null,this.next=null,this.up=null,this.down=null}}class Py{constructor(t){this.compare=t,this.head=new By(null),this.tail=new By(null),this.height=0,this._size=0,this.head.next=this.tail,this.tail.previous=this.head}get size(){return this._size}*elements(){let t=this.head;for(;t.down;)t=t.down;for(;t.next&&r.isntNull(t.next.value);)t=t.next,yield t}dumpList(){const t=[];let e=this.head;do{t.push([]);let n=e;do{t[t.length-1].push(n.value),n=n.next}while(n)}while(e=e.down);return t}delete(t){let e=this.findNode(t);for(;e;)e.previous.next=e.next,e.next.previous=e.previous,e=e.down;this._size--}has(t){return r.isntNull(this.findNode(t))}findNode(t){let e=this.head;for(;;){for(;e.next&&r.isntNull(e.next.value);){const n=this.compare(e.next.value,t);if(0===n)return e.next;if(!(n<0))break;e=e.next}if(!e.down)return null;e=e.down}}add(t){let e=this.findPreviousNode(t);if(e.next&&r.isntNull(e.next.value)&&0===this.compare(e.next.value,t))return;let n=new By(t);e.next&&(n.next=e.next,e.next.previous=n),e.next=n,n.previous=e;let i=0;for(;Math.random()<.5;){if(i===this.height){const t=new By(null),e=new By(null);t.next=e,t.down=this.head,e.previous=t,e.down=this.tail,this.head.up=t,this.tail.up=e,this.head=t,this.tail=e,this.height++}for(;!e.up;)e=e.previous;e=e.up;const r=new By(t);e.next&&(r.next=e.next,e.next.previous=r),e.next=r,r.previous=e,r.down=n,n.up=r,n=r,i++}this._size++}findPreviousNode(t){let e=this.head;for(;;){for(;e.next&&r.isntNull(e.next.value);){if(this.compare(e.next.value,t)>=0)break;e=e.next}if(!e.down)return e;e=e.down}}}class qy{constructor(t){this.skipList=new Py(t)}get[Symbol.toStringTag](){return this.constructor.name}*[Symbol.iterator](){for(const t of this.values())yield t}values(){return dc.map(this.skipList.elements(),(t=>t.value))}has(t){return this.skipList.has(t)}add(t){this.skipList.add(t)}delete(t){this.skipList.delete(t)}}t.BadEventError=gd,t.Box=e,t.DynamicTypedArray=Ny,t.Emitter=Bt,t.ExpirableMap=hd,t.FiniteStateMachine=bd,t.HashMap=Pt,t.HashSet=qt,t.LRUMap=Qf,t.ObservableFiniteStateMachine=Sy,t.Queue=Ct,t.SortedSet=qy,t.SparseMap=Ey,t.SparseSet=_y,t.TLRUMap=vd,t.TrieMap=md,t.TypedSparseMap=Oy,t.TypedSparseSet=jy,t.convertArrayToCons=function t([e,...n]){return[e,n.length?t(n):null]},t.convertConsToArray=function t([e,n]){return r.isNull(n)?[e]:[e,...t(n)]},Object.defineProperty(t,"__esModule",{value:!0})}));
16
16
  //# sourceMappingURL=index.umd.min.js.map