@blackglory/estore-js 0.1.0 → 0.1.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.
- package/dist/es2015/index.min.mjs +1 -1
- package/dist/es2015/index.min.mjs.map +1 -1
- package/dist/es2015/index.mjs +867 -1224
- package/dist/es2015/index.mjs.map +1 -1
- package/dist/es2015/index.umd.js +867 -1224
- package/dist/es2015/index.umd.js.map +1 -1
- package/dist/es2015/index.umd.min.js +2 -2
- package/dist/es2015/index.umd.min.js.map +1 -1
- package/dist/es2018/index.min.mjs +1 -1
- package/dist/es2018/index.min.mjs.map +1 -1
- package/dist/es2018/index.mjs +867 -1224
- package/dist/es2018/index.mjs.map +1 -1
- package/dist/es2018/index.umd.js +867 -1224
- package/dist/es2018/index.umd.js.map +1 -1
- package/dist/es2018/index.umd.min.js +2 -2
- package/dist/es2018/index.umd.min.js.map +1 -1
- package/lib/es2015/estore-client.js +3 -1
- package/lib/es2015/estore-client.js.map +1 -1
- package/lib/es2015/utils.d.ts +1 -0
- package/lib/es2015/utils.js +3 -2
- package/lib/es2015/utils.js.map +1 -1
- package/lib/es2018/estore-client.js +3 -1
- package/lib/es2018/estore-client.js.map +1 -1
- package/lib/es2018/utils.d.ts +1 -0
- package/lib/es2018/utils.js +3 -2
- package/lib/es2018/utils.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).EStore={})}(this,(function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})})),t}var r={},o={fetch:void 0};o.fetch=globalThis.fetch.bind(globalThis);var i={Headers:void 0};i.Headers=globalThis.Headers;var s={Request:void 0};s.Request=globalThis.Request;var a={Response:void 0};a.Response=globalThis.Response;var c={FormData:void 0};c.FormData=globalThis.FormData;var u={AbortController:void 0};u.AbortController=globalThis.AbortController;var l={AbortError:void 0};l.AbortError=globalThis.DOMException;var d={Blob:void 0};d.Blob=globalThis.Blob;var f={EventSource:void 0};f.EventSource=globalThis.EventSource,function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(o,e),r(i,e),r(s,e),r(a,e),r(c,e),r(u,e),r(l,e),r(d,e),r(f,e)}(r);var h={},p=n(Object.freeze({__proto__:null})),
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).EStore={})}(this,(function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})})),t}var r={},o={fetch:void 0};o.fetch=globalThis.fetch.bind(globalThis);var i={Headers:void 0};i.Headers=globalThis.Headers;var s={Request:void 0};s.Request=globalThis.Request;var a={Response:void 0};a.Response=globalThis.Response;var c={FormData:void 0};c.FormData=globalThis.FormData;var u={AbortController:void 0};u.AbortController=globalThis.AbortController;var l={AbortError:void 0};l.AbortError=globalThis.DOMException;var d={Blob:void 0};d.Blob=globalThis.Blob;var f={EventSource:void 0};f.EventSource=globalThis.EventSource,function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(o,e),r(i,e),r(s,e),r(a,e),r(c,e),r(u,e),r(l,e),r(d,e),r(f,e)}(r);var h={},p=n(Object.freeze({__proto__:null})),m={},y={},v={};function g(e){return Array.isArray(e)}v.isntEmptyArray=v.isEmptyArray=v.isntArray=v.isArray=void 0,v.isArray=g,v.isntArray=function(e){return!g(e)},v.isEmptyArray=function(e){return 0===e.length},v.isntEmptyArray=function(e){return 0!==e.length};var b={},w={};function A(e){return null===e}w.isntNull=w.isNull=void 0,w.isNull=A,w.isntNull=function(e){return!A(e)};var E={};function S(e){return void 0===e}E.isntUndefined=E.isUndefined=void 0,E.isUndefined=S,E.isntUndefined=function(e){return!S(e)},b.isntAsyncIterable=b.isAsyncIterable=void 0;const R=w,T=E;function _(e){return(0,R.isntNull)(e)&&(0,T.isntUndefined)(e)&&"function"==typeof e[Symbol.asyncIterator]}b.isAsyncIterable=_,b.isntAsyncIterable=function(e){return!_(e)};var k={};function C(e){return"bigint"==typeof e}k.isntBigInt=k.isBigInt=void 0,k.isBigInt=C,k.isntBigInt=function(e){return!C(e)};var x={};function O(e){return"boolean"==typeof e}x.isntBoolean=x.isBoolean=void 0,x.isBoolean=O,x.isntBoolean=function(e){return!O(e)};var N={},P={};function I(e){return"string"==typeof e}P.isntString=P.isString=void 0,P.isString=I,P.isntString=function(e){return!I(e)},N.isntChar=N.isChar=void 0;const j=P;function U(e){return(0,j.isString)(e)&&1===e.length}N.isChar=U,N.isntChar=function(e){return!U(e)};var q={};function F(e){return e instanceof Date}q.isntDate=q.isDate=void 0,q.isDate=F,q.isntDate=function(e){return!F(e)};var L={};L.inEnum=void 0,L.inEnum=function(e,t){return Object.values(t).includes(e)};var B={};function D(e){return e instanceof Error}B.isntError=B.isError=void 0,B.isError=D,B.isntError=function(e){return!D(e)};var M={};function H(e){return!e}M.isntFalsy=M.isFalsy=void 0,M.isFalsy=H,M.isntFalsy=function(e){return!H(e)};var J={};function z(e){return"function"==typeof e}J.isntFunction=J.isFunction=void 0,J.isFunction=z,J.isntFunction=function(e){return!z(e)};var $={};$.isntIterable=$.isIterable=void 0;const G=w,V=E;function K(e){return(0,G.isntNull)(e)&&(0,V.isntUndefined)(e)&&"function"==typeof e[Symbol.iterator]}$.isIterable=K,$.isntIterable=function(e){return!K(e)};var W={},Z={};var Q=Function.prototype,Y=Object.prototype,X=Q.toString,ee=Y.hasOwnProperty,te=X.call(Object),ne=Y.toString,re=function(e,t){return function(n){return e(t(n))}}(Object.getPrototypeOf,Object);var oe=function(e){if(!function(e){return!!e&&"object"==typeof e}(e)||"[object Object]"!=ne.call(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e))return!1;var t=re(e);if(null===t)return!0;var n=ee.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&X.call(n)==te},ie=t&&t.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Z.isntEmptyObject=Z.isEmptyObject=Z.isntPlainObject=Z.isPlainObject=Z.isntObject=Z.isObject=void 0;const se=ie(oe);function ae(e){return null!==e&&"object"==typeof e}function ce(e){return(0,se.default)(e)}Z.isObject=ae,Z.isntObject=function(e){return!ae(e)},Z.isPlainObject=ce,Z.isntPlainObject=function(e){return!ce(e)},Z.isEmptyObject=function(e){return 0===Object.keys(e).length},Z.isntEmptyObject=function(e){return 0!==Object.keys(e).length};var ue={};function le(e){return"number"==typeof e}ue.isntNumber=ue.isNumber=void 0,ue.isNumber=le,ue.isntNumber=function(e){return!le(e)},W.isntJsonRpcError=W.isJsonRpcError=W.isntJsonRpcSuccess=W.isJsonRpcSuccess=W.isntJsonRpcRequest=W.isJsonRpcRequest=W.isntJsonRpcNotification=W.isJsonRpcNotification=void 0;const de=v,fe=Z,he=P,pe=ue,me=E;function ye(e){return(0,he.isString)(e)||(0,pe.isNumber)(e)}function ve(e){return(0,de.isArray)(e)||(0,fe.isObject)(e)}function ge(e){return(0,fe.isPlainObject)(e)&&(0,he.isString)(e.jsonrpc)&&(0,he.isString)(e.method)&&(0,me.isUndefined)(e.id)&&ve(e.params)}function be(e){return(0,fe.isPlainObject)(e)&&(0,he.isString)(e.jsonrpc)&&(0,he.isString)(e.method)&&ye(e.id)&&ve(e.params)}function we(e){return(0,fe.isPlainObject)(e)&&(0,he.isString)(e.jsonrpc)&&(0,he.isString)(e.id)&&"result"in e}function Ae(e){return(0,fe.isPlainObject)(e)&&(0,he.isString)(e.jsonrpc)&&ye(e.id)&&function(e){return(0,fe.isPlainObject)(e)&&(0,pe.isNumber)(e.code)&&(0,he.isString)(e.message)&&((0,me.isUndefined)(e.data)||(0,fe.isObject)(e.data))}(e.error)}W.isJsonRpcNotification=ge,W.isntJsonRpcNotification=function(e){return!ge(e)},W.isJsonRpcRequest=be,W.isntJsonRpcRequest=function(e){return!be(e)},W.isJsonRpcSuccess=we,W.isntJsonRpcSuccess=function(e){return!we(e)},W.isJsonRpcError=Ae,W.isntJsonRpcError=function(e){return!Ae(e)};var Ee={};Ee.isntJson=Ee.isJson=void 0,Ee.isJson=function(e){try{return JSON.stringify(e),!0}catch(e){return!1}},Ee.isntJson=function e(t){return!e()};var Se={};Se.isAbsoluteURL=void 0,Se.isAbsoluteURL=function(e){try{return new URL(e),!0}catch(e){return!1}},function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(v,e),r(b,e),r(k,e),r(x,e),r(N,e),r(q,e),r(L,e),r(B,e),r(M,e),r(J,e),r($,e),r(W,e),r(Ee,e),r(w,e),r(ue,e),r(Z,e),r(P,e),r(E,e),r(Se,e)}(y),m.del=m.patch=m.put=m.post=m.head=m.get=void 0;const Re=r,Te=y;function _e(e,...t){const n=t.reduce(((e,t)=>(0,Te.isFunction)(t)?t(e):e),{url:new URL("http://localhost"),headers:new Re.Headers}),r=new Re.Headers(n.headers);return new Re.Request(n.url.href,{method:e,headers:r,signal:n.signal,body:n.payload,keepalive:n.keepalive})}m.get=function(...e){return _e("GET",...e)},m.head=function(...e){return _e("HEAD",...e)},m.post=function(...e){return _e("POST",...e)},m.put=function(...e){return _e("PUT",...e)},m.patch=function(...e){return _e("PATCH",...e)},m.del=function(...e){return _e("DELETE",...e)},function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(p,e),r(m,e)}(h);var ke={},Ce={};Ce.url=void 0,Ce.url=function(...e){return t=>({...t,url:new URL(e.reduce(((e,t)=>new URL(t,e).href)))})};var xe={text:void 0};const Oe=r;xe.text=function(e){return t=>{const n=new Oe.Headers(t.headers);return n.set("Content-Type","application/x-www-form-urlencoded"),{...t,headers:n,payload:e}}};var Ne={json:void 0};const Pe=r;Ne.json=function(e){return t=>{const n=new Pe.Headers(t.headers);return n.set("Content-Type","application/json"),{...t,headers:n,payload:JSON.stringify(e)}}};var Ie={},je={exports:{}};
|
|
2
2
|
/* @license
|
|
3
3
|
Papa Parse
|
|
4
4
|
v5.3.1
|
|
5
5
|
https://github.com/mholt/PapaParse
|
|
6
6
|
License: MIT
|
|
7
7
|
*/
|
|
8
|
-
!function(e,t){e.exports=function e(){var t="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:{},n=!t.document&&!!t.postMessage,r=n&&/blob:/i.test((t.location||{}).protocol),o={},i=0,s={parse:function(n,r){var a=(r=r||{}).dynamicTyping||!1;if(A(a)&&(r.dynamicTypingFunction=a,a={}),r.dynamicTyping=a,r.transform=!!A(r.transform)&&r.transform,r.worker&&s.WORKERS_SUPPORTED){var c=function(){if(!s.WORKERS_SUPPORTED)return!1;var n,r,a=(n=t.URL||t.webkitURL||null,r=e.toString(),s.BLOB_URL||(s.BLOB_URL=n.createObjectURL(new Blob(["(",r,")();"],{type:"text/javascript"})))),c=new t.Worker(a);return c.onmessage=m,c.id=i++,o[c.id]=c}();return c.userStep=r.step,c.userChunk=r.chunk,c.userComplete=r.complete,c.userError=r.error,r.step=A(r.step),r.chunk=A(r.chunk),r.complete=A(r.complete),r.error=A(r.error),delete r.worker,void c.postMessage({input:n,config:r,workerId:c.id})}var h=null;return s.NODE_STREAM_INPUT,"string"==typeof n?h=r.download?new u(r):new d(r):!0===n.readable&&A(n.read)&&A(n.on)?h=new f(r):(t.File&&n instanceof File||n instanceof Object)&&(h=new l(r)),h.stream(n)},unparse:function(e,t){var n=!1,r=!0,o=",",i="\r\n",a='"',c=a+a,u=!1,l=null,d=!1;!function(){if("object"==typeof t){if("string"!=typeof t.delimiter||s.BAD_DELIMITERS.filter((function(e){return-1!==t.delimiter.indexOf(e)})).length||(o=t.delimiter),("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(n=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(u=t.skipEmptyLines),"string"==typeof t.newline&&(i=t.newline),"string"==typeof t.quoteChar&&(a=t.quoteChar),"boolean"==typeof t.header&&(r=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");l=t.columns}void 0!==t.escapeChar&&(c=t.escapeChar+a),"boolean"==typeof t.escapeFormulae&&(d=t.escapeFormulae)}}();var f=new RegExp(p(a),"g");if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return h(null,e,u);if("object"==typeof e[0])return h(l||Object.keys(e[0]),e,u)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),h(e.fields||[],e.data||[],u);throw new Error("Unable to serialize unrecognized input");function h(e,t,n){var s="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var a=Array.isArray(e)&&0<e.length,c=!Array.isArray(t[0]);if(a&&r){for(var u=0;u<e.length;u++)0<u&&(s+=o),s+=y(e[u],u);0<t.length&&(s+=i)}for(var l=0;l<t.length;l++){var d=a?e.length:t[l].length,f=!1,h=a?0===Object.keys(t[l]).length:0===t[l].length;if(n&&!a&&(f="greedy"===n?""===t[l].join("").trim():1===t[l].length&&0===t[l][0].length),"greedy"===n&&a){for(var p=[],m=0;m<d;m++){var v=c?e[m]:m;p.push(t[l][v])}f=""===p.join("").trim()}if(!f){for(var g=0;g<d;g++){0<g&&!h&&(s+=o);var b=a&&c?e[g]:g;s+=y(t[l][b],g)}l<t.length-1&&(!n||0<d&&!h)&&(s+=i)}}return s}function y(e,t){if(null==e)return"";if(e.constructor===Date)return JSON.stringify(e).slice(1,25);!0===d&&"string"==typeof e&&null!==e.match(/^[=+\-@].*$/)&&(e="'"+e);var r=e.toString().replace(f,c);return"boolean"==typeof n&&n||"function"==typeof n&&n(e,t)||Array.isArray(n)&&n[t]||function(e,t){for(var n=0;n<t.length;n++)if(-1<e.indexOf(t[n]))return!0;return!1}(r,s.BAD_DELIMITERS)||-1<r.indexOf(o)||" "===r.charAt(0)||" "===r.charAt(r.length-1)?a+r+a:r}}};if(s.RECORD_SEP=String.fromCharCode(30),s.UNIT_SEP=String.fromCharCode(31),s.BYTE_ORDER_MARK="\ufeff",s.BAD_DELIMITERS=["\r","\n",'"',s.BYTE_ORDER_MARK],s.WORKERS_SUPPORTED=!n&&!!t.Worker,s.NODE_STREAM_INPUT=1,s.LocalChunkSize=10485760,s.RemoteChunkSize=5242880,s.DefaultDelimiter=",",s.Parser=y,s.ParserHandle=h,s.NetworkStreamer=u,s.FileStreamer=l,s.StringStreamer=d,s.ReadableStreamStreamer=f,t.jQuery){var a=t.jQuery;a.fn.parse=function(e){var n=e.config||{},r=[];return this.each((function(e){if("INPUT"!==a(this).prop("tagName").toUpperCase()||"file"!==a(this).attr("type").toLowerCase()||!t.FileReader||!this.files||0===this.files.length)return!0;for(var o=0;o<this.files.length;o++)r.push({file:this.files[o],inputElem:this,instanceConfig:a.extend({},n)})})),o(),this;function o(){if(0!==r.length){var t,n,o,c,u=r[0];if(A(e.before)){var l=e.before(u.file,u.inputElem);if("object"==typeof l){if("abort"===l.action)return t="AbortError",n=u.file,o=u.inputElem,c=l.reason,void(A(e.error)&&e.error({name:t},n,o,c));if("skip"===l.action)return void i();"object"==typeof l.config&&(u.instanceConfig=a.extend(u.instanceConfig,l.config))}else if("skip"===l)return void i()}var d=u.instanceConfig.complete;u.instanceConfig.complete=function(e){A(d)&&d(e,u.file,u.inputElem),i()},s.parse(u.file,u.instanceConfig)}else A(e.complete)&&e.complete()}function i(){r.splice(0,1),o()}}}function c(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var t=b(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new h(t),(this._handle.streamer=this)._config=t}.call(this,e),this.parseChunk=function(e,n){if(this.isFirstChunk&&A(this._config.beforeFirstChunk)){var o=this._config.beforeFirstChunk(e);void 0!==o&&(e=o)}this.isFirstChunk=!1,this._halted=!1;var i=this._partialLine+e;this._partialLine="";var a=this._handle.parse(i,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var c=a.meta.cursor;this._finished||(this._partialLine=i.substring(c-this._baseIndex),this._baseIndex=c),a&&a.data&&(this._rowCount+=a.data.length);var u=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(r)t.postMessage({results:a,workerId:s.WORKER_ID,finished:u});else if(A(this._config.chunk)&&!n){if(this._config.chunk(a,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);a=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(a.data),this._completeResults.errors=this._completeResults.errors.concat(a.errors),this._completeResults.meta=a.meta),this._completed||!u||!A(this._config.complete)||a&&a.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),u||a&&a.meta.paused||this._nextChunk(),a}this._halted=!0},this._sendError=function(e){A(this._config.error)?this._config.error(e):r&&this._config.error&&t.postMessage({workerId:s.WORKER_ID,error:e,finished:!1})}}function u(e){var t;(e=e||{}).chunkSize||(e.chunkSize=s.RemoteChunkSize),c.call(this,e),this._nextChunk=n?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),n||(t.onload=w(this._chunkLoaded,this),t.onerror=w(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!n),this._config.downloadRequestHeaders){var e=this._config.downloadRequestHeaders;for(var r in e)t.setRequestHeader(r,e[r])}if(this._config.chunkSize){var o=this._start+this._config.chunkSize-1;t.setRequestHeader("Range","bytes="+this._start+"-"+o)}try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}n&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){4===t.readyState&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:t.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(e){var t=e.getResponseHeader("Content-Range");return null===t?-1:parseInt(t.substring(t.lastIndexOf("/")+1))}(t),this.parseChunk(t.responseText)))},this._chunkError=function(e){var n=t.statusText||e;this._sendError(new Error(n))}}function l(e){var t,n;(e=e||{}).chunkSize||(e.chunkSize=s.LocalChunkSize),c.call(this,e);var r="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,n=e.slice||e.webkitSlice||e.mozSlice,r?((t=new FileReader).onload=w(this._chunkLoaded,this),t.onerror=w(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var e=this._input;if(this._config.chunkSize){var o=Math.min(this._start+this._config.chunkSize,this._input.size);e=n.call(e,this._start,o)}var i=t.readAsText(e,this._config.encoding);r||this._chunkLoaded({target:{result:i}})},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function d(e){var t;c.call(this,e=e||{}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e,n=this._config.chunkSize;return n?(e=t.substring(0,n),t=t.substring(n)):(e=t,t=""),this._finished=!t,this.parseChunk(e)}}}function f(e){c.call(this,e=e||{});var t=[],n=!0,r=!1;this.pause=function(){c.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){c.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){r&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):n=!0},this._streamData=w((function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),n&&(n=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}}),this),this._streamError=w((function(e){this._streamCleanUp(),this._sendError(e)}),this),this._streamEnd=w((function(){this._streamCleanUp(),r=!0,this._streamData("")}),this),this._streamCleanUp=w((function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)}),this)}function h(e){var t,n,r,o=Math.pow(2,53),i=-o,a=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,c=/^(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))$/,u=this,l=0,d=0,f=!1,h=!1,m=[],v={data:[],errors:[],meta:{}};if(A(e.step)){var g=e.step;e.step=function(t){if(v=t,S())E();else{if(E(),0===v.data.length)return;l+=t.data.length,e.preview&&l>e.preview?n.abort():(v.data=v.data[0],g(v,u))}}}function w(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function E(){if(v&&r&&(_("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+s.DefaultDelimiter+"'"),r=!1),e.skipEmptyLines)for(var t=0;t<v.data.length;t++)w(v.data[t])&&v.data.splice(t--,1);return S()&&function(){if(v)if(Array.isArray(v.data[0])){for(var t=0;S()&&t<v.data.length;t++)v.data[t].forEach(n);v.data.splice(0,1)}else v.data.forEach(n);function n(t,n){A(e.transformHeader)&&(t=e.transformHeader(t,n)),m.push(t)}}(),function(){if(!v||!e.header&&!e.dynamicTyping&&!e.transform)return v;function t(t,n){var r,o=e.header?{}:[];for(r=0;r<t.length;r++){var i=r,s=t[r];e.header&&(i=r>=m.length?"__parsed_extra":m[r]),e.transform&&(s=e.transform(s,i)),s=R(i,s),"__parsed_extra"===i?(o[i]=o[i]||[],o[i].push(s)):o[i]=s}return e.header&&(r>m.length?_("FieldMismatch","TooManyFields","Too many fields: expected "+m.length+" fields but parsed "+r,d+n):r<m.length&&_("FieldMismatch","TooFewFields","Too few fields: expected "+m.length+" fields but parsed "+r,d+n)),o}var n=1;return!v.data.length||Array.isArray(v.data[0])?(v.data=v.data.map(t),n=v.data.length):v.data=t(v.data,0),e.header&&v.meta&&(v.meta.fields=m),d+=n,v}()}function S(){return e.header&&0===m.length}function R(t,n){return r=t,e.dynamicTypingFunction&&void 0===e.dynamicTyping[r]&&(e.dynamicTyping[r]=e.dynamicTypingFunction(r)),!0===(e.dynamicTyping[r]||e.dynamicTyping)?"true"===n||"TRUE"===n||"false"!==n&&"FALSE"!==n&&(function(e){if(a.test(e)){var t=parseFloat(e);if(i<t&&t<o)return!0}return!1}(n)?parseFloat(n):c.test(n)?new Date(n):""===n?null:n):n;var r}function _(e,t,n,r){var o={type:e,code:t,message:n};void 0!==r&&(o.row=r),v.errors.push(o)}this.parse=function(o,i,a){var c=e.quoteChar||'"';if(e.newline||(e.newline=function(e,t){e=e.substring(0,1048576);var n=new RegExp(p(t)+"([^]*?)"+p(t),"gm"),r=(e=e.replace(n,"")).split("\r"),o=e.split("\n"),i=1<o.length&&o[0].length<r[0].length;if(1===r.length||i)return"\n";for(var s=0,a=0;a<r.length;a++)"\n"===r[a][0]&&s++;return s>=r.length/2?"\r\n":"\r"}(o,c)),r=!1,e.delimiter)A(e.delimiter)&&(e.delimiter=e.delimiter(o),v.meta.delimiter=e.delimiter);else{var u=function(t,n,r,o,i){var a,c,u,l;i=i||[",","\t","|",";",s.RECORD_SEP,s.UNIT_SEP];for(var d=0;d<i.length;d++){var f=i[d],h=0,p=0,m=0;u=void 0;for(var v=new y({comments:o,delimiter:f,newline:n,preview:10}).parse(t),g=0;g<v.data.length;g++)if(r&&w(v.data[g]))m++;else{var b=v.data[g].length;p+=b,void 0!==u?0<b&&(h+=Math.abs(b-u),u=b):u=b}0<v.data.length&&(p/=v.data.length-m),(void 0===c||h<=c)&&(void 0===l||l<p)&&1.99<p&&(c=h,a=f,l=p)}return{successful:!!(e.delimiter=a),bestDelimiter:a}}(o,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess);u.successful?e.delimiter=u.bestDelimiter:(r=!0,e.delimiter=s.DefaultDelimiter),v.meta.delimiter=e.delimiter}var l=b(e);return e.preview&&e.header&&l.preview++,t=o,n=new y(l),v=n.parse(t,i,a),E(),f?{meta:{paused:!0}}:v||{meta:{paused:!1}}},this.paused=function(){return f},this.pause=function(){f=!0,n.abort(),t=A(e.chunk)?"":t.substring(n.getCharIndex())},this.resume=function(){u.streamer._halted?(f=!1,u.streamer.parseChunk(t,!0)):setTimeout(u.resume,3)},this.aborted=function(){return h},this.abort=function(){h=!0,n.abort(),v.meta.aborted=!0,A(e.complete)&&e.complete(v),t=""}}function p(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function y(e){var t,n=(e=e||{}).delimiter,r=e.newline,o=e.comments,i=e.step,a=e.preview,c=e.fastMode,u=t=void 0===e.quoteChar?'"':e.quoteChar;if(void 0!==e.escapeChar&&(u=e.escapeChar),("string"!=typeof n||-1<s.BAD_DELIMITERS.indexOf(n))&&(n=","),o===n)throw new Error("Comment character same as delimiter");!0===o?o="#":("string"!=typeof o||-1<s.BAD_DELIMITERS.indexOf(o))&&(o=!1),"\n"!==r&&"\r"!==r&&"\r\n"!==r&&(r="\n");var l=0,d=!1;this.parse=function(e,s,f){if("string"!=typeof e)throw new Error("Input must be a string");var h=e.length,y=n.length,m=r.length,v=o.length,g=A(i),b=[],w=[],E=[],S=l=0;if(!e)return q();if(c||!1!==c&&-1===e.indexOf(t)){for(var R=e.split(r),_=0;_<R.length;_++){if(E=R[_],l+=E.length,_!==R.length-1)l+=r.length;else if(f)return q();if(!o||E.substring(0,v)!==o){if(g){if(b=[],P(E.split(n)),F(),d)return q()}else P(E.split(n));if(a&&a<=_)return b=b.slice(0,a),q(!0)}}return q()}for(var T=e.indexOf(n,l),k=e.indexOf(r,l),C=new RegExp(p(u)+p(t),"g"),O=e.indexOf(t,l);;)if(e[l]!==t)if(o&&0===E.length&&e.substring(l,l+v)===o){if(-1===k)return q();l=k+m,k=e.indexOf(r,l),T=e.indexOf(n,l)}else if(-1!==T&&(T<k||-1===k))E.push(e.substring(l,T)),l=T+y,T=e.indexOf(n,l);else{if(-1===k)break;if(E.push(e.substring(l,k)),U(k+m),g&&(F(),d))return q();if(a&&b.length>=a)return q(!0)}else for(O=l,l++;;){if(-1===(O=e.indexOf(t,O+1)))return f||w.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:b.length,index:l}),j();if(O===h-1)return j(e.substring(l,O).replace(C,t));if(t!==u||e[O+1]!==u){if(t===u||0===O||e[O-1]!==u){-1!==T&&T<O+1&&(T=e.indexOf(n,O+1)),-1!==k&&k<O+1&&(k=e.indexOf(r,O+1));var x=I(-1===k?T:Math.min(T,k));if(e[O+1+x]===n){E.push(e.substring(l,O).replace(C,t)),e[l=O+1+x+y]!==t&&(O=e.indexOf(t,l)),T=e.indexOf(n,l),k=e.indexOf(r,l);break}var N=I(k);if(e.substring(O+1+N,O+1+N+m)===r){if(E.push(e.substring(l,O).replace(C,t)),U(O+1+N+m),T=e.indexOf(n,l),O=e.indexOf(t,l),g&&(F(),d))return q();if(a&&b.length>=a)return q(!0);break}w.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:b.length,index:l}),O++}}else O++}return j();function P(e){b.push(e),S=l}function I(t){var n=0;if(-1!==t){var r=e.substring(O+1,t);r&&""===r.trim()&&(n=r.length)}return n}function j(t){return f||(void 0===t&&(t=e.substring(l)),E.push(t),l=h,P(E),g&&F()),q()}function U(t){l=t,P(E),E=[],k=e.indexOf(r,l)}function q(e){return{data:b,errors:w,meta:{delimiter:n,linebreak:r,aborted:d,truncated:!!e,cursor:S+(s||0)}}}function F(){i(q()),b=[],w=[]}},this.abort=function(){d=!0},this.getCharIndex=function(){return l}}function m(e){var t=e.data,n=o[t.workerId],r=!1;if(t.error)n.userError(t.error,t.file);else if(t.results&&t.results.data){var i={abort:function(){r=!0,v(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:g,resume:g};if(A(n.userStep)){for(var s=0;s<t.results.data.length&&(n.userStep({data:t.results.data[s],errors:t.results.errors,meta:t.results.meta},i),!r);s++);delete t.results}else A(n.userChunk)&&(n.userChunk(t.results,i,t.file),delete t.results)}t.finished&&!r&&v(t.workerId,t.results)}function v(e,t){var n=o[e];A(n.userComplete)&&n.userComplete(t),n.terminate(),delete o[e]}function g(){throw new Error("Not implemented.")}function b(e){if("object"!=typeof e||null===e)return e;var t=Array.isArray(e)?[]:{};for(var n in e)t[n]=b(e[n]);return t}function w(e,t){return function(){e.apply(t,arguments)}}function A(e){return"function"==typeof e}return r&&(t.onmessage=function(e){var n=e.data;if(void 0===s.WORKER_ID&&n&&(s.WORKER_ID=n.workerId),"string"==typeof n.input)t.postMessage({workerId:s.WORKER_ID,results:s.parse(n.input,n.config),finished:!0});else if(t.File&&n.input instanceof File||n.input instanceof Object){var r=s.parse(n.input,n.config);r&&t.postMessage({workerId:s.WORKER_ID,results:r,finished:!0})}}),(u.prototype=Object.create(c.prototype)).constructor=u,(l.prototype=Object.create(c.prototype)).constructor=l,(d.prototype=Object.create(d.prototype)).constructor=d,(f.prototype=Object.create(c.prototype)).constructor=f,s}()}(je);var Ue={},qe={CustomError:void 0};class Fe extends Error{get name(){return this.constructor.name}}qe.CustomError=Fe;var Le={ExpectedError:void 0};const Be=qe;class De extends Be.CustomError{}Le.ExpectedError=De;var Me={AssertionError:void 0};const Je=qe;class He extends Je.CustomError{}Me.AssertionError=He;var ze={};ze.normalize=void 0,ze.normalize=function(e){var t;return{name:e.name,message:e.message,stack:null!==(t=e.stack)&&void 0!==t?t:null}};var $e={refute:void 0};const Ge=Le;$e.refute=function(e,t){if(e)throw new Ge.ExpectedError(t)};var Ve={assert:void 0};const Ke=Me;Ve.assert=function(e,t){if(!e)throw new Ke.AssertionError(t)},function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(qe,e),r(Le,e),r(Me,e),r(ze,e),r($e,e),r(Ve,e)}(Ue),Ie.csv=void 0;const We=r,Ze=je.exports,Qe=Ue;function Ye(e){const t=Object.keys(e[0]);return(0,Ze.unparse)({data:e,fields:t})}Ie.csv=function(e){return(0,Qe.assert)(e.length>0,"payload must be a non-empty array"),t=>{const n=new We.Headers(t.headers);return n.set("Content-Type","text/csv"),{...t,headers:n,payload:Ye(e)}}};var Xe={};Xe.signal=void 0,Xe.signal=function(e){return t=>({...t,signal:e})};var et={header:void 0};const tt=r;et.header=function(e,t){return n=>{const r=new tt.Headers(n.headers);return r.set(e,t),{...n,headers:r}}};var nt={appendHeader:void 0};const rt=r;nt.appendHeader=function(e,t){return n=>{const r=new rt.Headers(n.headers);return r.append(e,t),{...n,headers:r}}};var ot={headers:void 0};const it=r;ot.headers=function(e){return t=>{const n=new it.Headers(t.headers);for(const[t,r]of Object.entries(e))n.set(t,r);return{...t,headers:n}}};var st={accept:void 0};const at=nt;st.accept=function(e){return(0,at.appendHeader)("Accept",e)};var ct={};ct.host=void 0,ct.host=function(e){return t=>{const n=new URL(t.url.href);return n.host=e,{...t,url:n}}};var ut={};ut.port=void 0,ut.port=function(e){return t=>{const n=new URL(t.url.href);return n.port=e.toString(),{...t,url:n}}};var lt={};lt.pathname=void 0,lt.pathname=function(e){return t=>{const n=new URL(t.url.href);return n.pathname=e,{...t,url:n}}};var dt={};dt.search=void 0,dt.search=function(e){return t=>{const n=new URL(t.url.href);return n.search=e,{...t,url:n}}};var ft={};ft.searchParam=void 0,ft.searchParam=function(e,t){return n=>{const r=new URL(n.url.href),o=new URLSearchParams(r.searchParams);return o.set(e,t.toString()),r.search=o.toString(),{...n,url:r}}};var ht={};ht.searchParams=void 0,ht.searchParams=function(e){return t=>{const n=new URL(t.url.href),r=new URLSearchParams(n.searchParams);for(const[t,n]of Object.entries(e))r.set(t,n.toString());return n.search=r.toString(),{...t,url:n}}};var pt={};pt.appendSearchParam=void 0,pt.appendSearchParam=function(e,t){return n=>{const r=new URL(n.url.href),o=new URLSearchParams(r.searchParams);return o.append(e,t.toString()),r.search=o.toString(),{...n,url:r}}};var yt={formDataField:void 0};const mt=r,vt=m;yt.formDataField=function(e,t){return n=>{const r=n.payload instanceof mt.FormData?function(e){const t=new mt.FormData;for(const[n,r]of e.entries())t.append(n,r);return t}(n.payload):new mt.FormData;return(0,vt.isArray)(t)?t.forEach((t=>r.append(e,t))):r.append(e,t),{...n,payload:r}}};var gt={},bt={exports:{}};!function(e,t){var n,r,o,i,s,a,c,u,l,d,f,h,p,y,m,v,g,b,w,A,E,S,R,_,T,k,C,O,x,N,P,I,j,U,q,F,L,B,D,M,J;"undefined"!=typeof self?self:"undefined"!=typeof window&&window,e.exports=(r=n="3.7.2",o="function"==typeof atob,i="function"==typeof btoa,s="function"==typeof Buffer,a="function"==typeof TextDecoder?new TextDecoder:void 0,c="function"==typeof TextEncoder?new TextEncoder:void 0,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l=Array.prototype.slice.call(u),J={},l.forEach((function(e,t){return J[e]=t})),d=J,f=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,h=String.fromCharCode.bind(String),p="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):function(e,t){return void 0===t&&(t=function(e){return e}),new Uint8Array(Array.prototype.slice.call(e,0).map(t))},y=function(e){return e.replace(/=/g,"").replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"}))},m=function(e){return e.replace(/[^A-Za-z0-9\+\/]/g,"")},v=function(e){for(var t,n,r,o,i="",s=e.length%3,a=0;a<e.length;){if((n=e.charCodeAt(a++))>255||(r=e.charCodeAt(a++))>255||(o=e.charCodeAt(a++))>255)throw new TypeError("invalid character found");i+=l[(t=n<<16|r<<8|o)>>18&63]+l[t>>12&63]+l[t>>6&63]+l[63&t]}return s?i.slice(0,s-3)+"===".substring(s):i},b=s?function(e){return Buffer.from(e).toString("base64")}:function(e){for(var t=4096,n=[],r=0,o=e.length;r<o;r+=t)n.push(h.apply(null,e.subarray(r,r+t)));return g(n.join(""))},A=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?h(192|t>>>6)+h(128|63&t):h(224|t>>>12&15)+h(128|t>>>6&63)+h(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return h(240|t>>>18&7)+h(128|t>>>12&63)+h(128|t>>>6&63)+h(128|63&t)},E=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,R=s?function(e){return Buffer.from(e,"utf8").toString("base64")}:c?function(e){return b(c.encode(e))}:function(e){return g(S(e))},T=function(e){return _(e,!0)},k=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,C=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return h(55296+(t>>>10))+h(56320+(1023&t));case 3:return h((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return h((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},x=function(e){if(e=e.replace(/\s+/g,""),!f.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));for(var t,n,r,o="",i=0;i<e.length;)t=d[e.charAt(i++)]<<18|d[e.charAt(i++)]<<12|(n=d[e.charAt(i++)])<<6|(r=d[e.charAt(i++)]),o+=64===n?h(t>>16&255):64===r?h(t>>16&255,t>>8&255):h(t>>16&255,t>>8&255,255&t);return o},P=s?function(e){return p(Buffer.from(e,"base64"))}:function(e){return p(N(e),(function(e){return e.charCodeAt(0)}))},I=function(e){return P(U(e))},j=s?function(e){return Buffer.from(e,"base64").toString("utf8")}:a?function(e){return a.decode(P(e))}:function(e){return O(N(e))},U=function(e){return m(e.replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})))},F=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}},L=function(){var e=function(e,t){return Object.defineProperty(String.prototype,e,F(t))};e("fromBase64",(function(){return q(this)})),e("toBase64",(function(e){return _(this,e)})),e("toBase64URI",(function(){return _(this,!0)})),e("toBase64URL",(function(){return _(this,!0)})),e("toUint8Array",(function(){return I(this)}))},B=function(){var e=function(e,t){return Object.defineProperty(Uint8Array.prototype,e,F(t))};e("toBase64",(function(e){return w(this,e)})),e("toBase64URI",(function(){return w(this,!0)})),e("toBase64URL",(function(){return w(this,!0)}))},D=function(){L(),B()},M={version:n,VERSION:r,atob:N=o?function(e){return atob(m(e))}:s?function(e){return Buffer.from(e,"base64").toString("binary")}:x,atobPolyfill:x,btoa:g=i?function(e){return btoa(e)}:s?function(e){return Buffer.from(e,"binary").toString("base64")}:v,btoaPolyfill:v,fromBase64:q=function(e){return j(U(e))},toBase64:_=function(e,t){return void 0===t&&(t=!1),t?y(R(e)):R(e)},encode:_,encodeURI:T,encodeURL:T,utob:S=function(e){return e.replace(E,A)},btou:O=function(e){return e.replace(k,C)},decode:q,isValid:function(e){if("string"!=typeof e)return!1;var t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},fromUint8Array:w=function(e,t){return void 0===t&&(t=!1),t?y(b(e)):b(e)},toUint8Array:I,extendString:L,extendUint8Array:B,extendBuiltins:D,Base64:{}},Object.keys(M).forEach((function(e){return M.Base64[e]=M[e]})),M)}(bt),gt.basicAuth=void 0;const wt=et,At=bt.exports;gt.basicAuth=function(e,t){return(0,wt.header)("Authorization","Basic "+(0,At.btoa)(`${e}:${t}`))};var Et={bearerAuth:void 0};const St=et;Et.bearerAuth=function(e){return(0,St.header)("Authorization",`Bearer ${e}`)};var Rt={};Rt.keepalive=void 0,Rt.keepalive=function(e=!0){return t=>({...t,keepalive:e})},function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(Ce,e),r(Oe,e),r(Ne,e),r(Ie,e),r(Xe,e),r(et,e),r(nt,e),r(ot,e),r(st,e),r(ct,e),r(ut,e),r(lt,e),r(dt,e),r(ft,e),r(ht,e),r(pt,e),r(yt,e),r(gt,e),r(Et,e),r(Rt,e)}(ke);var _t={},Tt=n(Object.freeze({__proto__:null})),kt={},Ct={},Ot={CustomError:void 0};class xt extends Error{get name(){return this.constructor.name}}Ot.CustomError=xt;var Nt={ExpectedError:void 0};const Pt=Ot;class It extends Pt.CustomError{}Nt.ExpectedError=It;var jt={AssertionError:void 0};const Ut=Ot;class qt extends Ut.CustomError{}jt.AssertionError=qt;var Ft={};Ft.normalize=void 0,Ft.normalize=function(e){var t;return{name:e.name,message:e.message,stack:null!==(t=e.stack)&&void 0!==t?t:null}};var Lt={refute:void 0};const Bt=Nt;Lt.refute=function(e,t){if(e)throw new Bt.ExpectedError(t)};var Dt={assert:void 0};const Mt=jt;Dt.assert=function(e,t){if(!e)throw new Mt.AssertionError(t)},function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(Ot,e),r(Nt,e),r(jt,e),r(Ft,e),r(Lt,e),r(Dt,e)}(Ct),kt.HTTPError=void 0;const Jt=Ct;kt.HTTPError=class extends Jt.CustomError{constructor(e,t){super(t),this.code=e}};var Ht={},zt={};!function(e){e.ServerError=e.ClientError=e.Redirection=e.Successful=e.Informational=void 0,function(e){e[e.Continue=100]="Continue",e[e.SwitchingProtocol=101]="SwitchingProtocol",e[e.Processing=102]="Processing",e[e.EarlyHints=103]="EarlyHints"}(e.Informational||(e.Informational={})),function(e){e[e.OK=200]="OK",e[e.Created=201]="Created",e[e.Accepted=202]="Accepted",e[e.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",e[e.NoContent=204]="NoContent",e[e.ResetContent=205]="ResetContent",e[e.PartialContent=206]="PartialContent",e[e.MultiStatus=207]="MultiStatus",e[e.AlreadyReported=208]="AlreadyReported",e[e.IMUsed=226]="IMUsed"}(e.Successful||(e.Successful={})),function(e){e[e.MultipleChoice=300]="MultipleChoice",e[e.MovedPermanently=3011]="MovedPermanently",e[e.Found=302]="Found",e[e.SeeOther=303]="SeeOther",e[e.NotModified=304]="NotModified",e[e.TemporaryRedirect=307]="TemporaryRedirect",e[e.PermanentRedirect=308]="PermanentRedirect"}(e.Redirection||(e.Redirection={})),function(e){e[e.BadRequest=400]="BadRequest",e[e.Unauthorized=401]="Unauthorized",e[e.Forbidden=403]="Forbidden",e[e.NotFound=404]="NotFound",e[e.MethodNotAllowed=405]="MethodNotAllowed",e[e.NotAcceptable=406]="NotAcceptable",e[e.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",e[e.RequestTimeout=408]="RequestTimeout",e[e.Conflict=409]="Conflict",e[e.Gone=410]="Gone",e[e.LengthRequired=411]="LengthRequired",e[e.PreconditionFailed=412]="PreconditionFailed",e[e.PayloadTooLarge=413]="PayloadTooLarge",e[e.URITooLong=414]="URITooLong",e[e.UnsupportedMediaType=415]="UnsupportedMediaType",e[e.RangeNotSatisfiable=416]="RangeNotSatisfiable",e[e.ExpectationFailed=417]="ExpectationFailed",e[e.MisdirectedRequest=421]="MisdirectedRequest",e[e.UnprocessableEntity=422]="UnprocessableEntity",e[e.Locked=423]="Locked",e[e.FailedDependency=424]="FailedDependency",e[e.UpgradeRequired=426]="UpgradeRequired",e[e.PreconditionRequired=428]="PreconditionRequired",e[e.TooManyRequests=429]="TooManyRequests",e[e.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",e[e.UnavailableForLegalReasons=451]="UnavailableForLegalReasons"}(e.ClientError||(e.ClientError={})),function(e){e[e.InternalServerError=500]="InternalServerError",e[e.NotImplemented=501]="NotImplemented",e[e.BadGateway=502]="BadGateway",e[e.ServiceUnavailable=503]="ServiceUnavailable",e[e.GatewayTimeout=504]="GatewayTimeout",e[e.HTTPVersionNotSupported=505]="HTTPVersionNotSupported",e[e.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",e[e.InsufficientStorage=507]="InsufficientStorage",e[e.LoopDetected=508]="LoopDetected",e[e.NotExtended=510]="NotExtended",e[e.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired"}(e.ServerError||(e.ServerError={}))}(zt),Ht.EarlyHints=Ht.Processing=Ht.SwitchingProtocol=Ht.Continue=Ht.HTTPInformational=void 0;const $t=zt;class Gt{constructor(e,t){this.code=e,this.message=t}}Ht.HTTPInformational=Gt;Ht.Continue=class extends Gt{constructor(){super($t.Informational.Continue,"Continue")}};Ht.SwitchingProtocol=class extends Gt{constructor(){super($t.Informational.SwitchingProtocol,"Switching Protocol")}};Ht.Processing=class extends Gt{constructor(){super($t.Informational.Processing,"Processing")}};Ht.EarlyHints=class extends Gt{constructor(){super($t.Informational.EarlyHints,"Early Hints")}};var Vt={};Vt.IMUsed=Vt.AlreadyReported=Vt.MultiStatus=Vt.PartialContent=Vt.ResetContent=Vt.NoContent=Vt.NonAuthoritativeInformation=Vt.Accepted=Vt.Created=Vt.OK=Vt.HTTPSuccessful=void 0;const Kt=zt;class Wt{constructor(e,t){this.code=e,this.message=t}}Vt.HTTPSuccessful=Wt;Vt.OK=class extends Wt{constructor(){super(Kt.Successful.OK,"OK")}};Vt.Created=class extends Wt{constructor(){super(Kt.Successful.Created,"Created")}};Vt.Accepted=class extends Wt{constructor(){super(Kt.Successful.Accepted,"Accepted")}};Vt.NonAuthoritativeInformation=class extends Wt{constructor(){super(Kt.Successful.NonAuthoritativeInformation,"Non-Authoritative Information")}};Vt.NoContent=class extends Wt{constructor(){super(Kt.Successful.NoContent,"No Content")}};Vt.ResetContent=class extends Wt{constructor(){super(Kt.Successful.ResetContent,"Reset Content")}};Vt.PartialContent=class extends Wt{constructor(){super(Kt.Successful.PartialContent,"Partial Content")}};Vt.MultiStatus=class extends Wt{constructor(){super(Kt.Successful.MultiStatus,"Multi-Status")}};Vt.AlreadyReported=class extends Wt{constructor(){super(Kt.Successful.AlreadyReported,"Already Reported")}};Vt.IMUsed=class extends Wt{constructor(){super(Kt.Successful.IMUsed,"IM Used")}};var Zt={};Zt.PermanentRedirect=Zt.TemporaryRedirect=Zt.NotModified=Zt.SeeOther=Zt.Found=Zt.MovedPermanently=Zt.MultipleChoice=Zt.HTTPRedirection=void 0;const Qt=zt;class Yt{constructor(e,t){this.code=e,this.message=t}}Zt.HTTPRedirection=Yt;Zt.MultipleChoice=class extends Yt{constructor(){super(Qt.Redirection.MultipleChoice,"Multiple Choice")}};Zt.MovedPermanently=class extends Yt{constructor(){super(Qt.Redirection.MovedPermanently,"Moved Permanently")}};Zt.Found=class extends Yt{constructor(){super(Qt.Redirection.Found,"Found")}};Zt.SeeOther=class extends Yt{constructor(){super(Qt.Redirection.SeeOther,"See Other")}};Zt.NotModified=class extends Yt{constructor(){super(Qt.Redirection.NotModified,"Not Modified")}};Zt.TemporaryRedirect=class extends Yt{constructor(){super(Qt.Redirection.TemporaryRedirect,"Temporary Redirect")}};Zt.PermanentRedirect=class extends Yt{constructor(){super(Qt.Redirection.PermanentRedirect,"Permanent Redirect")}};var Xt={};Xt.UnavailableForLegalReasons=Xt.RequestHeaderFieldsTooLarge=Xt.TooManyRequests=Xt.PreconditionRequired=Xt.UpgradeRequired=Xt.FailedDependency=Xt.Locked=Xt.UnprocessableEntity=Xt.MisdirectedRequest=Xt.ExpectationFailed=Xt.RangeNotSatisfiable=Xt.UnsupportedMediaType=Xt.URITooLong=Xt.PayloadTooLarge=Xt.PreconditionFailed=Xt.LengthRequired=Xt.Gone=Xt.Conflict=Xt.RequestTimeout=Xt.ProxyAuthenticationRequired=Xt.NotAcceptable=Xt.MethodNotAllowed=Xt.NotFound=Xt.Forbidden=Xt.Unauthorized=Xt.BadRequest=Xt.HTTPClientError=void 0;const en=kt,tn=zt;class nn extends en.HTTPError{}Xt.HTTPClientError=nn;Xt.BadRequest=class extends nn{constructor(e){super(tn.ClientError.BadRequest,null!=e?e:"Bad Request")}};Xt.Unauthorized=class extends nn{constructor(e){super(tn.ClientError.Unauthorized,null!=e?e:"Unauthorized")}};Xt.Forbidden=class extends nn{constructor(e){super(tn.ClientError.Forbidden,null!=e?e:"Forbidden")}};Xt.NotFound=class extends nn{constructor(e){super(tn.ClientError.NotFound,null!=e?e:"Not Found")}};Xt.MethodNotAllowed=class extends nn{constructor(e){super(tn.ClientError.MethodNotAllowed,null!=e?e:"Method Not Allowed")}};Xt.NotAcceptable=class extends nn{constructor(e){super(tn.ClientError.NotAcceptable,null!=e?e:"Not Acceptable")}};Xt.ProxyAuthenticationRequired=class extends nn{constructor(e){super(tn.ClientError.ProxyAuthenticationRequired,null!=e?e:"Proxy Authentication Required")}};Xt.RequestTimeout=class extends nn{constructor(e){super(tn.ClientError.RequestTimeout,null!=e?e:"Request Timeout")}};Xt.Conflict=class extends nn{constructor(e){super(tn.ClientError.Conflict,null!=e?e:"Conflict")}};Xt.Gone=class extends nn{constructor(e){super(tn.ClientError.Gone,null!=e?e:"Gone")}};Xt.LengthRequired=class extends nn{constructor(e){super(tn.ClientError.LengthRequired,null!=e?e:"Length Required")}};Xt.PreconditionFailed=class extends nn{constructor(e){super(tn.ClientError.PreconditionFailed,null!=e?e:"Precondition Failed")}};Xt.PayloadTooLarge=class extends nn{constructor(e){super(tn.ClientError.PayloadTooLarge,null!=e?e:"Payload Too Large")}};Xt.URITooLong=class extends nn{constructor(e){super(tn.ClientError.URITooLong,null!=e?e:"URI Too Long")}};Xt.UnsupportedMediaType=class extends nn{constructor(e){super(tn.ClientError.UnsupportedMediaType,null!=e?e:"Unsupported Media Type")}};Xt.RangeNotSatisfiable=class extends nn{constructor(e){super(tn.ClientError.RangeNotSatisfiable,null!=e?e:"Range Not Satisfiable")}};Xt.ExpectationFailed=class extends nn{constructor(e){super(tn.ClientError.ExpectationFailed,null!=e?e:"Expectation Failed")}};Xt.MisdirectedRequest=class extends nn{constructor(e){super(tn.ClientError.MisdirectedRequest,null!=e?e:"Misdirected Request")}};Xt.UnprocessableEntity=class extends nn{constructor(e){super(tn.ClientError.UnprocessableEntity,null!=e?e:"Unprocessable Entity")}};Xt.Locked=class extends nn{constructor(e){super(tn.ClientError.Locked,null!=e?e:"Locked")}};Xt.FailedDependency=class extends nn{constructor(e){super(tn.ClientError.FailedDependency,null!=e?e:"Failed Dependency")}};Xt.UpgradeRequired=class extends nn{constructor(e){super(tn.ClientError.UpgradeRequired,null!=e?e:"Upgrade Required")}};Xt.PreconditionRequired=class extends nn{constructor(e){super(tn.ClientError.PreconditionRequired,null!=e?e:"Precondition Required")}};Xt.TooManyRequests=class extends nn{constructor(e){super(tn.ClientError.TooManyRequests,null!=e?e:"Too Many Requests")}};Xt.RequestHeaderFieldsTooLarge=class extends nn{constructor(e){super(tn.ClientError.RequestHeaderFieldsTooLarge,null!=e?e:"Request Header Fields Too Large")}};Xt.UnavailableForLegalReasons=class extends nn{constructor(e){super(tn.ClientError.UnavailableForLegalReasons,null!=e?e:"Unavailable For Legal Reasons")}};var rn={};rn.NetworkAuthenticationRequired=rn.NotExtended=rn.LoopDetected=rn.InsufficientStorage=rn.VariantAlsoNegotiates=rn.HTTPVersionNotSupported=rn.GatewayTimeout=rn.ServiceUnavailable=rn.BadGateway=rn.NotImplemented=rn.InternalServerError=rn.HTTPServerError=void 0;const on=kt,sn=zt;class an extends on.HTTPError{}rn.HTTPServerError=an;rn.InternalServerError=class extends an{constructor(e){super(sn.ServerError.InternalServerError,null!=e?e:"Internal Server Error")}};rn.NotImplemented=class extends an{constructor(e){super(sn.ServerError.NotImplemented,null!=e?e:"Not Implemented")}};rn.BadGateway=class extends an{constructor(e){super(sn.ServerError.BadGateway,null!=e?e:"Bad Gateway")}};rn.ServiceUnavailable=class extends an{constructor(e){super(sn.ServerError.ServiceUnavailable,null!=e?e:"Service Unavailable")}};rn.GatewayTimeout=class extends an{constructor(e){super(sn.ServerError.GatewayTimeout,null!=e?e:"Gateway Timeout")}};rn.HTTPVersionNotSupported=class extends an{constructor(e){super(sn.ServerError.HTTPVersionNotSupported,null!=e?e:"HTTP Version Not Supported")}};rn.VariantAlsoNegotiates=class extends an{constructor(e){super(sn.ServerError.VariantAlsoNegotiates,null!=e?e:"Variant Also Negotiates")}};rn.InsufficientStorage=class extends an{constructor(e){super(sn.ServerError.InsufficientStorage,null!=e?e:"Insufficient Storage")}};rn.LoopDetected=class extends an{constructor(e){super(sn.ServerError.LoopDetected,null!=e?e:"Loop Detected")}};rn.NotExtended=class extends an{constructor(e){super(sn.ServerError.NotExtended,null!=e?e:"Not Extended")}};rn.NetworkAuthenticationRequired=class extends an{constructor(e){super(sn.ServerError.NetworkAuthenticationRequired,null!=e?e:"Network Authentication Required")}};var cn={};cn.fromCode=cn.UnknownHTTPStatusError=void 0;const un=Ht,ln=Vt,dn=Zt,fn=Xt,hn=rn;class pn extends Error{constructor(e){super(`The HTTP status code ${e} is unknown`),this.name=this.constructor.name}}cn.UnknownHTTPStatusError=pn,cn.fromCode=function(e,t){switch(e){case 100:return new un.Continue;case 101:return new un.SwitchingProtocol;case 102:return new un.Processing;case 103:return new un.EarlyHints;case 200:return new ln.OK;case 201:return new ln.Created;case 202:return new ln.Accepted;case 203:return new ln.NonAuthoritativeInformation;case 204:return new ln.NoContent;case 205:return new ln.ResetContent;case 206:return new ln.PartialContent;case 207:return new ln.MultiStatus;case 208:return new ln.AlreadyReported;case 226:return new ln.IMUsed;case 300:return new dn.MultipleChoice;case 301:return new dn.MovedPermanently;case 302:return new dn.Found;case 303:return new dn.SeeOther;case 304:return new dn.NotModified;case 307:return new dn.TemporaryRedirect;case 308:return new dn.PermanentRedirect;case 400:return new fn.BadRequest(t);case 401:return new fn.Unauthorized(t);case 403:return new fn.Forbidden(t);case 404:return new fn.NotFound(t);case 405:return new fn.MethodNotAllowed(t);case 406:return new fn.NotAcceptable(t);case 407:return new fn.ProxyAuthenticationRequired(t);case 408:return new fn.RequestTimeout(t);case 409:return new fn.Conflict(t);case 410:return new fn.Gone(t);case 411:return new fn.LengthRequired(t);case 412:return new fn.PreconditionFailed(t);case 413:return new fn.PayloadTooLarge(t);case 414:return new fn.URITooLong(t);case 415:return new fn.UnsupportedMediaType(t);case 416:return new fn.RangeNotSatisfiable(t);case 417:return new fn.ExpectationFailed(t);case 421:return new fn.MisdirectedRequest(t);case 422:return new fn.UnprocessableEntity(t);case 423:return new fn.Locked(t);case 424:return new fn.FailedDependency(t);case 426:return new fn.UpgradeRequired(t);case 428:return new fn.PreconditionRequired(t);case 429:return new fn.TooManyRequests(t);case 431:return new fn.RequestHeaderFieldsTooLarge(t);case 451:return new fn.UnavailableForLegalReasons(t);case 500:return new hn.InternalServerError(t);case 501:return new hn.NotImplemented(t);case 502:return new hn.BadGateway(t);case 503:return new hn.ServiceUnavailable(t);case 504:return new hn.GatewayTimeout(t);case 505:return new hn.HTTPVersionNotSupported(t);case 506:return new hn.VariantAlsoNegotiates(t);case 507:return new hn.InsufficientStorage(t);case 508:return new hn.LoopDetected(t);case 510:return new hn.NotExtended(t);case 511:return new hn.NetworkAuthenticationRequired(t);default:throw new pn(e)}},function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(Tt,e),r(kt,e),r(Ht,e),r(Vt,e),r(Zt,e),r(Xt,e),r(rn,e),r(cn,e)}(_t);var yn={},mn={};!function(e){e.ok=e.HTTPError=void 0;const t=_t;var n=_t;Object.defineProperty(e,"HTTPError",{enumerable:!0,get:function(){return n.HTTPError}}),e.ok=async function(e){if(!e.ok){const n=await e.text();throw(0,t.fromCode)(e.status,n)}return e}}(mn);var vn={};vn.toJSON=void 0,vn.toJSON=function(e){return e.json()};var gn={};gn.toText=void 0,gn.toText=async function(e,t){if(t){const n=await e.arrayBuffer();return new TextDecoder(t).decode(n)}return await e.text()};var bn={};bn.toLines=void 0,bn.toLines=async function*(e){const t=e.body.pipeThrough(new TextDecoderStream).getReader();let n="";for(;;){const{value:e,done:r}=await t.read();if(r)break;let o=e;for(;o.includes("\n");){const e=o.indexOf("\n");yield o.slice(0,e),o=o.slice(e+1)}n+=o}n&&(yield n)};var wn={},An={},En={},Sn={},Rn={},_n={};_n.go=void 0,_n.go=function(e){return e()},function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]});(t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)})(_n,e)}(Rn);var Tn={},kn={CustomError:void 0};class Cn extends Error{get name(){return this.constructor.name}}kn.CustomError=Cn;var On={ExpectedError:void 0};const xn=kn;class Nn extends xn.CustomError{}On.ExpectedError=Nn;var Pn={AssertionError:void 0};const In=kn;class jn extends In.CustomError{}Pn.AssertionError=jn;var Un={};Un.normalize=void 0,Un.normalize=function(e){var t;return{name:e.name,message:e.message,stack:null!==(t=e.stack)&&void 0!==t?t:null}};var qn={refute:void 0};const Fn=On;qn.refute=function(e,t){if(e)throw new Fn.ExpectedError(t)};var Ln={assert:void 0};const Bn=Pn;Ln.assert=function(e,t){if(!e)throw new Bn.AssertionError(t)},function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(kn,e),r(On,e),r(Pn,e),r(Un,e),r(qn,e),r(Ln,e)}(Tn),Sn.chunkAsync=void 0;const Dn=Rn,Mn=Tn;Sn.chunkAsync=function(e,t){return(0,Mn.assert)(Number.isInteger(t),"The parameter size must be an integer"),(0,Mn.assert)(t>0,"The parameter size must be greater than 0"),(0,Dn.go)((async function*(){let n=[];for await(const r of e)n.push(r),n.length>=t&&(yield n,n=[]);n.length&&(yield n)}))};var Jn={},Hn={},zn={};function $n(e){return Array.isArray(e)}zn.isntEmptyArray=zn.isEmptyArray=zn.isntArray=zn.isArray=void 0,zn.isArray=$n,zn.isntArray=function(e){return!$n(e)},zn.isEmptyArray=function(e){return 0===e.length},zn.isntEmptyArray=function(e){return 0!==e.length};var Gn={},Vn={};function Kn(e){return null===e}Vn.isntNull=Vn.isNull=void 0,Vn.isNull=Kn,Vn.isntNull=function(e){return!Kn(e)};var Wn={};function Zn(e){return void 0===e}Wn.isntUndefined=Wn.isUndefined=void 0,Wn.isUndefined=Zn,Wn.isntUndefined=function(e){return!Zn(e)},Gn.isntAsyncIterable=Gn.isAsyncIterable=void 0;const Qn=Vn,Yn=Wn;function Xn(e){return(0,Qn.isntNull)(e)&&(0,Yn.isntUndefined)(e)&&"function"==typeof e[Symbol.asyncIterator]}Gn.isAsyncIterable=Xn,Gn.isntAsyncIterable=function(e){return!Xn(e)};var er={};function tr(e){return"bigint"==typeof e}er.isntBigInt=er.isBigInt=void 0,er.isBigInt=tr,er.isntBigInt=function(e){return!tr(e)};var nr={};function rr(e){return"boolean"==typeof e}nr.isntBoolean=nr.isBoolean=void 0,nr.isBoolean=rr,nr.isntBoolean=function(e){return!rr(e)};var or={},ir={};function sr(e){return"string"==typeof e}ir.isntString=ir.isString=void 0,ir.isString=sr,ir.isntString=function(e){return!sr(e)},or.isntChar=or.isChar=void 0;const ar=ir;function cr(e){return(0,ar.isString)(e)&&1===e.length}or.isChar=cr,or.isntChar=function(e){return!cr(e)};var ur={};function lr(e){return e instanceof Date}ur.isntDate=ur.isDate=void 0,ur.isDate=lr,ur.isntDate=function(e){return!lr(e)};var dr={};dr.inEnum=void 0,dr.inEnum=function(e,t){return Object.values(t).includes(e)};var fr={};function hr(e){return e instanceof Error}fr.isntError=fr.isError=void 0,fr.isError=hr,fr.isntError=function(e){return!hr(e)};var pr={};function yr(e){return!e}pr.isntFalsy=pr.isFalsy=void 0,pr.isFalsy=yr,pr.isntFalsy=function(e){return!yr(e)};var mr={};function vr(e){return"function"==typeof e}mr.isntFunction=mr.isFunction=void 0,mr.isFunction=vr,mr.isntFunction=function(e){return!vr(e)};var gr={};gr.isntIterable=gr.isIterable=void 0;const br=Vn,wr=Wn;function Ar(e){return(0,br.isntNull)(e)&&(0,wr.isntUndefined)(e)&&"function"==typeof e[Symbol.iterator]}gr.isIterable=Ar,gr.isntIterable=function(e){return!Ar(e)};var Er={},Sr={},Rr=t&&t.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Sr.isntEmptyObject=Sr.isEmptyObject=Sr.isntPlainObject=Sr.isPlainObject=Sr.isntObject=Sr.isObject=void 0;const _r=Rr(oe);function Tr(e){return null!==e&&"object"==typeof e}function kr(e){return(0,_r.default)(e)}Sr.isObject=Tr,Sr.isntObject=function(e){return!Tr(e)},Sr.isPlainObject=kr,Sr.isntPlainObject=function(e){return!kr(e)},Sr.isEmptyObject=function(e){return 0===Object.keys(e).length},Sr.isntEmptyObject=function(e){return 0!==Object.keys(e).length};var Cr={};function Or(e){return"number"==typeof e}Cr.isntNumber=Cr.isNumber=void 0,Cr.isNumber=Or,Cr.isntNumber=function(e){return!Or(e)},Er.isntJsonRpcError=Er.isJsonRpcError=Er.isntJsonRpcSuccess=Er.isJsonRpcSuccess=Er.isntJsonRpcRequest=Er.isJsonRpcRequest=Er.isntJsonRpcNotification=Er.isJsonRpcNotification=void 0;const xr=zn,Nr=Sr,Pr=ir,Ir=Cr,jr=Wn;function Ur(e){return(0,Pr.isString)(e)||(0,Ir.isNumber)(e)}function qr(e){return(0,xr.isArray)(e)||(0,Nr.isObject)(e)}function Fr(e){return(0,Nr.isPlainObject)(e)&&(0,Pr.isString)(e.jsonrpc)&&(0,Pr.isString)(e.method)&&(0,jr.isUndefined)(e.id)&&qr(e.params)}function Lr(e){return(0,Nr.isPlainObject)(e)&&(0,Pr.isString)(e.jsonrpc)&&(0,Pr.isString)(e.method)&&Ur(e.id)&&qr(e.params)}function Br(e){return(0,Nr.isPlainObject)(e)&&(0,Pr.isString)(e.jsonrpc)&&(0,Pr.isString)(e.id)&&"result"in e}function Dr(e){return(0,Nr.isPlainObject)(e)&&(0,Pr.isString)(e.jsonrpc)&&Ur(e.id)&&function(e){return(0,Nr.isPlainObject)(e)&&(0,Ir.isNumber)(e.code)&&(0,Pr.isString)(e.message)&&((0,jr.isUndefined)(e.data)||(0,Nr.isObject)(e.data))}(e.error)}Er.isJsonRpcNotification=Fr,Er.isntJsonRpcNotification=function(e){return!Fr(e)},Er.isJsonRpcRequest=Lr,Er.isntJsonRpcRequest=function(e){return!Lr(e)},Er.isJsonRpcSuccess=Br,Er.isntJsonRpcSuccess=function(e){return!Br(e)},Er.isJsonRpcError=Dr,Er.isntJsonRpcError=function(e){return!Dr(e)};var Mr={};Mr.isntJson=Mr.isJson=void 0,Mr.isJson=function(e){try{return JSON.stringify(e),!0}catch(e){return!1}},Mr.isntJson=function e(t){return!e()};var Jr={};Jr.isAbsoluteURL=void 0,Jr.isAbsoluteURL=function(e){try{return new URL(e),!0}catch(e){return!1}},function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(zn,e),r(Gn,e),r(er,e),r(nr,e),r(or,e),r(ur,e),r(dr,e),r(fr,e),r(pr,e),r(mr,e),r(gr,e),r(Er,e),r(Mr,e),r(Vn,e),r(Cr,e),r(Sr,e),r(ir,e),r(Wn,e),r(Jr,e)}(Hn),Jn.chunkByAsync=void 0;const Hr=Hn;Jn.chunkByAsync=function(e,t){return(0,Hr.isAsyncIterable)(e)?async function*(e){let n=[],r=0;for await(const o of e)n.push(o),await t(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(e):async function*(e){let n=[],r=0;for(const o of e)n.push(o),await t(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(e)};var zr={};zr.chunkBy=void 0,zr.chunkBy=function*(e,t){let n=[],r=0;for(const o of e)n.push(o),t(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)};var $r={chunk:void 0};const Gr=Rn,Vr=Tn;$r.chunk=function(e,t){return(0,Vr.assert)(Number.isInteger(t),"The parameter size must be an integer"),(0,Vr.assert)(t>0,"The parameter size must be greater than 0"),(0,Gr.go)((function*(){let n=[];for(const r of e)n.push(r),n.length>=t&&(yield n,n=[]);n.length&&(yield n)}))};var Kr={concatAsync:void 0};const Wr=Hn,Zr=Rn;Kr.concatAsync=function(e,...t){return(0,Zr.go)((async function*(){for(const n of[e,...t])if((0,Wr.isAsyncIterable)(n))for await(const e of n)yield e;else for(const e of n)yield e}))};var Qr={concat:void 0};const Yr=Rn;Qr.concat=function(e,...t){return(0,Yr.go)((function*(){for(const n of[e,...t])yield*n}))};var Xr={},eo={};eo.copyIterable=eo.copyAsyncIterable=void 0,eo.copyAsyncIterable=async function*(e){for await(const t of e)yield t},eo.copyIterable=function*(e){for(const t of e)yield t},Xr.dropAsync=void 0;const to=Rn,no=eo,ro=Tn;Xr.dropAsync=function(e,t){return(0,ro.assert)(Number.isInteger(t),"The parameter count must be an integer"),(0,ro.assert)(t>=0,"The parameter count must be greater than or equal to 0"),0===t?(0,no.copyAsyncIterable)(e):(0,to.go)((async function*(){var n;const r=e[Symbol.asyncIterator]();let o;try{let e;for(;!(({value:e,done:o}=await r.next()),o||t<=0);)t--;for(;!o;)yield e,({value:e,done:o}=await r.next())}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var oo={dropRightAsync:void 0};const io=Rn,so=eo,ao=Tn;oo.dropRightAsync=function(e,t){return(0,ao.assert)(Number.isInteger(t),"The parameter count must be an integer"),(0,ao.assert)(t>=0,"The parameter count must be greater than or equal to 0"),0===t?(0,so.copyAsyncIterable)(e):(0,io.go)((async function*(){const n=(await async function(e){const t=[];for await(const n of e)t.push(n);return t}(e)).slice(0,-t);for(const e of n)yield e}))};var co={dropRight:void 0};const uo=Rn,lo=eo,fo=Tn;co.dropRight=function(e,t){return(0,fo.assert)(Number.isInteger(t),"The parameter count must be an integer"),(0,fo.assert)(t>=0,"The parameter count must be greater than or equal to 0"),0===t?(0,lo.copyIterable)(e):(0,uo.go)((function*(){const n=Array.from(e);yield*n.slice(0,-t)}))};var ho={dropUntilAsync:void 0};const po=Hn;ho.dropUntilAsync=function(e,t){return(0,po.isAsyncIterable)(e)?async function*(e){var n;const r=e[Symbol.asyncIterator]();let o;try{let e,i=0;for(;!(({value:e,done:o}=await r.next()),o||await t(e,i++)););for(;!o;)yield e,({value:e,done:o}=await r.next())}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}(e):async function*(e){var n;const r=e[Symbol.iterator]();let o;try{let e,i=0;for(;!(({value:e,done:o}=r.next()),o||await t(e,i++)););for(;!o;)yield e,({value:e,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}(e)};var yo={};yo.dropUntil=void 0,yo.dropUntil=function*(e,t){var n;const r=e[Symbol.iterator]();let o;try{let e,i=0;for(;!(({value:e,done:o}=r.next()),o||t(e,i++)););for(;!o;)yield e,({value:e,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}};var mo={drop:void 0};const vo=Rn,go=eo,bo=Tn;mo.drop=function(e,t){return(0,bo.assert)(Number.isInteger(t),"The parameter count must be an integer"),(0,bo.assert)(t>=0,"The parameter count must be greater than or equal to 0"),0===t?(0,go.copyIterable)(e):(0,vo.go)((function*(){var n;const r=e[Symbol.iterator]();let o;try{let e;for(;!(({value:e,done:o}=r.next()),o||t<=0);)t--;for(;!o;)yield e,({value:e,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}))};var wo={filterAsync:void 0};const Ao=Hn;wo.filterAsync=function(e,t){return(0,Ao.isAsyncIterable)(e)?async function*(e){let n=0;for await(const r of e)await t(r,n)&&(yield r),n++}(e):async function*(e){let n=0;for(const r of e)await t(r,n)&&(yield r),n++}(e)};var Eo={};Eo.filter=void 0,Eo.filter=function*(e,t){let n=0;for(const r of e)t(r,n)&&(yield r),n++};var So={},Ro={},_o={flattenByAsync:void 0};const To=Hn;function ko(e){return(0,To.isIterable)(e)&&(0,To.isntChar)(e)}_o.flattenByAsync=function(e,t){return(0,To.isAsyncIterable)(e)?async function*(e){const r=1;for await(const o of e)ko(o)&&await t(o,r)?yield*n(o,r+1):yield o}(e):function(e){return n(e,1)}(e);async function*n(e,r){for(const o of e)ko(o)&&await t(o,r)?yield*n(o,r+1):yield o}},Ro.flattenDeepAsync=void 0;const Co=_o,Oo=Tn;Ro.flattenDeepAsync=function(e,t=1/0){return(0,Oo.assert)(t===1/0||Number.isInteger(t),"The parameter depth must be an integer"),(0,Oo.assert)(t>=0,"The parameter depth must be greater than or equal to 0"),(0,Co.flattenByAsync)(e,((e,n)=>n<=t))},So.flattenAsync=void 0;const xo=Ro;So.flattenAsync=function(e){return(0,xo.flattenDeepAsync)(e,1)};var No={flattenBy:void 0};const Po=Hn;No.flattenBy=function(e,t){return function*e(n,r){for(const i of n)(0,Po.isIterable)(o=i)&&(0,Po.isntChar)(o)&&t(i,r)?yield*e(i,r+1):yield i;var o}(e,1)};var Io={flattenDeep:void 0};const jo=No,Uo=Tn;Io.flattenDeep=function(e,t=1/0){return(0,Uo.assert)(t===1/0||Number.isInteger(t),"The parameter depth must be an integer"),(0,Uo.assert)(t>=0,"The parameter depth must be greater than or equal to 0"),(0,jo.flattenBy)(e,((e,n)=>n<=t))};var qo={flatten:void 0};const Fo=Io;qo.flatten=function(e){return(0,Fo.flattenDeep)(e,1)};var Lo={mapAsync:void 0};const Bo=Hn;Lo.mapAsync=function(e,t){return(0,Bo.isAsyncIterable)(e)?async function*(e){let n=0;for await(const r of e)yield await t(r,n),n++}(e):async function*(e){let n=0;for(const r of e)yield await t(r,n),n++}(e)};var Do={};Do.map=void 0,Do.map=function*(e,t){let n=0;for(const r of e)yield t(r,n),n++};var Mo={repeatAsync:void 0};const Jo=Rn,Ho=Tn;Mo.repeatAsync=function(e,t){return(0,Ho.assert)(t===1/0||Number.isInteger(t),"The parameter times must be an integer"),(0,Ho.assert)(t>=0,"The parameter times must be greater than or equal to 0"),t===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,Jo.go)((async function*(){const n=[];if(t>0){for await(const t of e)yield t,n.push(t);t--}for(;t>0;)yield*n,t--}))};var zo={repeat:void 0};const $o=Rn,Go=Tn;zo.repeat=function(e,t){return(0,Go.assert)(t===1/0||Number.isInteger(t),"The parameter times must be an integer"),(0,Go.assert)(t>=0,"The parameter times must be greater than or equal to 0"),t===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,$o.go)((function*(){const n=[];if(t>0){for(const t of e)yield t,n.push(t);t--}for(;t>0;)yield*n,t--}))};var Vo={sliceAsync:void 0};const Ko=Rn,Wo=Tn;Vo.sliceAsync=function(e,t,n=1/0){return(0,Wo.assert)(Number.isInteger(t),"The parameter start must be an integer"),(0,Wo.assert)(t>=0,"The parameter start must be greater than or equal to 0"),(0,Wo.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Wo.assert)(n>=t,"The parameter end must be greater than or equal to start"),(0,Ko.go)((async function*(){let r=0;for await(const o of e){if(r>=n)break;r>=t&&(yield o),r++}}))};var Zo={slice:void 0};const Qo=Rn,Yo=Tn;Zo.slice=function(e,t,n=1/0){return(0,Yo.assert)(Number.isInteger(t),"The parameter start must be an integer"),(0,Yo.assert)(t>=0,"The parameter start must be greater than or equal to 0"),(0,Yo.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Yo.assert)(n>=t,"The parameter end must be greater than or equal to start"),(0,Qo.go)((function*(){let r=0;for(const o of e){if(r>=n)break;r>=t&&(yield o),r++}}))};var Xo={};Xo.splitAsync=void 0,Xo.splitAsync=async function*(e,t){let n=[];for await(const r of e)r===t?(yield n,n=[]):n.push(r);yield n};var ei={splitByAsync:void 0};const ti=Hn;ei.splitByAsync=function(e,t){return(0,ti.isAsyncIterable)(e)?async function*(e){let n=[],r=0;for await(const o of e)await t(o,r)?(yield n,n=[]):n.push(o),r++;yield n}(e):async function*(e){let n=[],r=0;for(const o of e)await t(o,r)?(yield n,n=[]):n.push(o),r++;yield n}(e)};var ni={};ni.splitBy=void 0,ni.splitBy=function*(e,t){let n=[],r=0;for(const o of e)t(o,r)?(yield n,n=[]):n.push(o),r++;yield n};var ri={};ri.split=void 0,ri.split=function*(e,t){let n=[];for(const r of e)r===t?(yield n,n=[]):n.push(r);yield n};var oi={takeAsync:void 0};const ii=Rn,si=Tn;oi.takeAsync=function(e,t){return(0,si.assert)(Number.isInteger(t),"The parameter count must be an integer"),(0,si.assert)(t>=0,"The parameter count must be greater than or equal to 0"),(0,ii.go)((async function*(){if(0!==t)for await(const n of e)if(yield n,0===--t)break}))};var ai={takeRightAsync:void 0};const ci=Rn,ui=Tn;ai.takeRightAsync=function(e,t){return(0,ui.assert)(Number.isInteger(t),"The parameter count must be an integer"),(0,ui.assert)(t>=0,"The parameter count must be greater than or equal to 0"),(0,ci.go)((async function*(){var n;const r=e[Symbol.asyncIterator]();let o;try{const e=[];let i;for(;({value:i,done:o}=await r.next()),!o;)e.push(i),e.length>t&&e.shift();yield*e}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var li={takeRight:void 0};const di=Rn,fi=Tn;li.takeRight=function(e,t){return(0,fi.assert)(Number.isInteger(t),"The parameter count must be an integer"),(0,fi.assert)(t>=0,"The parameter count must be greater than or equal to 0"),(0,di.go)((function*(){var n;const r=e[Symbol.iterator]();let o;try{const e=[];let i;for(;({value:i,done:o}=r.next()),!o;)e.push(i),e.length>t&&e.shift();yield*e}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}))};var hi={takeUntilAsync:void 0};const pi=Hn;hi.takeUntilAsync=function(e,t){return(0,pi.isAsyncIterable)(e)?async function*(e){let n=0;for await(const r of e){if(await t(r,n))break;yield r,n++}}(e):async function*(e){let n=0;for(const r of e){if(await t(r,n))break;yield r,n++}}(e)};var yi={};yi.takeUntil=void 0,yi.takeUntil=function*(e,t){let n=0;for(const r of e){if(t(r,n))break;yield r,n++}};var mi={take:void 0};const vi=Rn,gi=Tn;mi.take=function(e,t){return(0,gi.assert)(Number.isInteger(t),"The parameter count must be an integer"),(0,gi.assert)(t>=0,"The parameter count must be greater than or equal to 0"),(0,vi.go)((function*(){if(0!==t)for(const n of e)if(yield n,0===--t)break}))};var bi={tapAsync:void 0};const wi=Hn;bi.tapAsync=function(e,t){return(0,wi.isAsyncIterable)(e)?async function*(e){let n=0;for await(const r of e)await t(r,n),yield r,n++}(e):async function*(e){let n=0;for(const r of e)await t(r,n),yield r,n++}(e)};var Ai={};Ai.tap=void 0,Ai.tap=function*(e,t){let n=0;for(const r of e)t(r,n),yield r,n++};var Ei={};Ei.toAsyncIterable=void 0,Ei.toAsyncIterable=async function*(e){for(const t of e)yield t};var Si={};Si.transformAsync=void 0,Si.transformAsync=async function*(e,t){yield*t(e)};var Ri={};Ri.transform=void 0,Ri.transform=function*(e,t){yield*t(e)};var _i={};_i.uniqAsync=void 0,_i.uniqAsync=async function*(e){const t=new Set;for await(const n of e)t.has(n)||(yield n,t.add(n))};var Ti={uniqByAsync:void 0};const ki=Hn;Ti.uniqByAsync=function(e,t){return(0,ki.isAsyncIterable)(e)?async function*(e){const n=new Set;let r=0;for await(const o of e){const e=await t(o,r);n.has(e)||(yield o,n.add(e)),r++}}(e):async function*(e){const n=new Set;let r=0;for(const o of e){const e=await t(o,r);n.has(e)||(yield o,n.add(e)),r++}}(e)};var Ci={};Ci.uniqBy=void 0,Ci.uniqBy=function*(e,t){const n=new Set;let r=0;for(const o of e){const e=t(o,r);n.has(e)||(yield o,n.add(e)),r++}};var Oi={};Oi.uniq=void 0,Oi.uniq=function*(e){const t=new Set;for(const n of e)t.has(n)||(yield n,t.add(n))};var xi={zipAsync:void 0};const Ni=Hn;var Pi;!function(e){e[e.Sync=0]="Sync",e[e.Async=1]="Async"}(Pi||(Pi={})),xi.zipAsync=function(e,...t){return async function*(...e){var t,n,r,o;const i=e.length,s=e.map((e=>(0,Ni.isAsyncIterable)(e)?[Pi.Async,e[Symbol.asyncIterator]()]:[Pi.Sync,e[Symbol.iterator]()])),a=s.map((()=>!1));try{for(;;){const e=new Array(i);for(let t=0;t<i;t++){const[n,r]=s[t];let o;if(o=n===Pi.Async?await r.next():r.next(),o.done)return void(a[t]=!0);e[t]=o.value}yield e}}finally{const e=s.filter(((e,t)=>!a[t]));for(const[i,s]of e)i===Pi.Async?await(null===(n=(t=s).return)||void 0===n?void 0:n.call(t)):null===(o=(r=s).return)||void 0===o||o.call(r)}}(e,...t)};var Ii={};Ii.zip=void 0,Ii.zip=function(e,...t){return function*(...e){const t=e.length,n=e.map((e=>e[Symbol.iterator]())),r=n.map((()=>!1));try{for(;;){const e=new Array(t);for(let o=0;o<t;o++){const{value:t,done:i}=n[o].next();if(i)return void(r[o]=!0);e[o]=t}yield e}}finally{n.filter(((e,t)=>!r[t])).forEach((e=>{var t;return null===(t=e.return)||void 0===t?void 0:t.call(e)}))}}(e,...t)},function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(Sn,e),r(Jn,e),r(zr,e),r($r,e),r(Kr,e),r(Qr,e),r(Xr,e),r(oo,e),r(co,e),r(ho,e),r(yo,e),r(mo,e),r(wo,e),r(Eo,e),r(So,e),r(_o,e),r(No,e),r(Ro,e),r(Io,e),r(qo,e),r(Lo,e),r(Do,e),r(Mo,e),r(zo,e),r(Vo,e),r(Zo,e),r(Xo,e),r(ei,e),r(ni,e),r(ri,e),r(oi,e),r(ai,e),r(li,e),r(hi,e),r(yi,e),r(mi,e),r(bi,e),r(Ai,e),r(Ei,e),r(Si,e),r(Ri,e),r(_i,e),r(Ti,e),r(Ci,e),r(Oi,e),r(xi,e),r(Ii,e)}(En);var ji={},Ui={};Ui.consume=void 0,Ui.consume=function(e,t){return t(e)};var qi={eachAsync:void 0};const Fi=Hn;qi.eachAsync=function(e,t){return(0,Fi.isAsyncIterable)(e)?async function(e){let n=0;for await(const r of e)await t(r,n),n++}(e):async function(e){let n=0;for(const r of e)await t(r,n),n++}(e)};var Li={};Li.each=void 0,Li.each=function(e,t){let n=0;for(const r of e)t(r,n),n++};var Bi={everyAsync:void 0};const Di=Hn;Bi.everyAsync=function(e,t){return(0,Di.isAsyncIterable)(e)?async function(e){let n=0;for await(const r of e){if(!await t(r,n))return!1;n++}return!0}(e):async function(e){let n=0;for(const r of e){if(!await t(r,n))return!1;n++}return!0}(e)};var Mi={};Mi.every=void 0,Mi.every=function(e,t){let n=0;for(const r of e){if(!t(r,n))return!1;n++}return!0};var Ji={findAsync:void 0};const Hi=Hn;Ji.findAsync=function(e,t){return(0,Hi.isAsyncIterable)(e)?async function(e){let n=0;for await(const r of e){if(await t(r,n))return r;n++}return}(e):async function(e){let n=0;for(const r of e){if(await t(r,n))return r;n++}return}(e)};var zi={};zi.find=void 0,zi.find=function(e,t){let n=0;for(const r of e){if(t(r,n))return r;n++}};var $i={};$i.firstAsync=void 0,$i.firstAsync=async function(e){for await(const t of e)return t};var Gi={};Gi.first=void 0,Gi.first=function(e){for(const t of e)return t};var Vi={};Vi.includesAsync=void 0,Vi.includesAsync=async function(e,t){for await(const n of e)if(n===t)return!0;return!1};var Ki={};Ki.includes=void 0,Ki.includes=function(e,t){for(const n of e)if(n===t)return!0;return!1};var Wi={};Wi.matchAsync=void 0,Wi.matchAsync=async function(e,t){const n=t.length;let r=0;for await(const o of e)if(o===t[r]&&r++,r===n)return!0;return!1};var Zi={};Zi.match=void 0,Zi.match=function(e,t){const n=t.length;let r=0;for(const o of e)if(o===t[r]&&r++,r===n)return!0;return!1};var Qi={reduceAsync:void 0};const Yi=Hn;Qi.reduceAsync=function(e,t,n){return(0,Yi.isUndefined)(n)?function(e,t){return(0,Yi.isAsyncIterable)(e)?n(e):r(e);async function n(e){var n;const r=e[Symbol.asyncIterator]();let o;try{let e,s=await i(r),a=1;for(;({value:e,done:o}=await r.next()),!o;)s=await t(s,e,a++);return s}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}async function i(e){const t=await e.next();if(t.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return t.value}}async function r(e){var n;const r=e[Symbol.iterator]();let o;try{let e,s=i(r),a=1;for(;({value:e,done:o}=r.next()),!o;)s=await t(s,e,a++);return s}finally{o||null===(n=r.return)||void 0===n||n.call(r)}function i(e){const t=e.next();if(t.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return t.value}}}(e,t):function(e,t,n){return(0,Yi.isAsyncIterable)(e)?o(e):r(e);async function r(e){let r=n,o=0;for(const n of e)r=await t(r,n,o++);return r}async function o(e){let r=n,o=0;for await(const n of e)r=await t(r,n,o++);return r}}(e,t,n)};var Xi={reduce:void 0};const es=Hn;Xi.reduce=function(e,t,n){return(0,es.isUndefined)(n)?function(e,t){var n;const r=e[Symbol.iterator]();let o;try{let e,s=i(r),a=1;for(;({value:e,done:o}=r.next()),!o;)s=t(s,e,a++);return s}finally{o||null===(n=r.return)||void 0===n||n.call(r)}function i(e){const t=e.next();if(t.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return t.value}}(e,t):function(e,t,n){let r=n,o=0;for(const n of e)r=t(r,n,o++);return r}(e,t,n)};var ts={someAsync:void 0};const ns=Hn;ts.someAsync=function(e,t){return(0,ns.isAsyncIterable)(e)?async function(e){let n=0;for await(const r of e){if(await t(r,n))return!0;n++}return!1}(e):async function(e){let n=0;for(const r of e){if(await t(r,n))return!0;n++}return!1}(e)};var rs={};rs.some=void 0,rs.some=function(e,t){let n=0;for(const r of e){if(t(r,n))return!0;n++}return!1};var os={};os.lastAsync=void 0,os.lastAsync=async function(e){var t;const n=e[Symbol.asyncIterator]();let r;try{let e,o;for(;({value:e,done:r}=await n.next()),!r;)o=e;return o}finally{r||await(null===(t=n.return)||void 0===t?void 0:t.call(n))}};var is={};is.last=void 0,is.last=function(e){var t;const n=e[Symbol.iterator]();let r;try{let e,o;for(;({value:e,done:r}=n.next()),!r;)o=e;return o}finally{r||null===(t=n.return)||void 0===t||t.call(n)}};var ss={toArrayAsync:void 0};const as=Ui;ss.toArrayAsync=function(e){return(0,as.consume)(e,(async e=>{const t=[];for await(const n of e)t.push(n);return t}))};var cs={toArray:void 0};const us=Ui;cs.toArray=function(e){return(0,us.consume)(e,(e=>Array.from(e)))};var ls={toSetAsync:void 0};const ds=Ui;ls.toSetAsync=function(e){return(0,ds.consume)(e,(async e=>{const t=new Set;for await(const n of e)t.add(n);return t}))};var fs={toSet:void 0};const hs=Ui;fs.toSet=function(e){return(0,hs.consume)(e,(e=>new Set(e)))},function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(Ui,e),r(qi,e),r(Li,e),r(Bi,e),r(Mi,e),r(Ji,e),r(zi,e),r($i,e),r(Gi,e),r(Vi,e),r(Ki,e),r(Wi,e),r(Zi,e),r(Qi,e),r(Xi,e),r(ts,e),r(rs,e),r(os,e),r(is,e),r(ss,e),r(cs,e),r(ls,e),r(fs,e)}(ji),function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(En,e),r(ji,e)}(An),wn.toNDJSON=void 0;const ps=An,ys=bn;wn.toNDJSON=function(e){return(0,ps.mapAsync)((0,ys.toLines)(e),(e=>JSON.parse(e)))};var ms={toCSV:void 0};const vs=je.exports;ms.toCSV=async function(e){const t=await e.text();return(0,vs.parse)(t,{header:!0,skipEmptyLines:"greedy"}).data},function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(mn,e),r(vn,e),r(gn,e),r(bn,e),r(wn,e),r(ms,e)}(yn);var gs={},bs={},ws={exports:{}};const{AbortController:As,AbortSignal:Es}="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;ws.exports=As,ws.exports.AbortSignal=Es,ws.exports.default=As;var Ss,Rs=t&&t.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};bs.AbortController=void 0;const _s=Rs(ws.exports);bs.AbortController=null!==(Ss=globalThis.AbortController)&&void 0!==Ss?Ss:_s.default;var Ts={},ks={},Cs={},Os={},xs={},Ns={};function Ps(e){return Array.isArray(e)}Ns.isntEmptyArray=Ns.isEmptyArray=Ns.isntArray=Ns.isArray=void 0,Ns.isArray=Ps,Ns.isntArray=function(e){return!Ps(e)},Ns.isEmptyArray=function(e){return 0===e.length},Ns.isntEmptyArray=function(e){return 0!==e.length};var Is={},js={};function Us(e){return null===e}js.isntNull=js.isNull=void 0,js.isNull=Us,js.isntNull=function(e){return!Us(e)};var qs={};function Fs(e){return void 0===e}qs.isntUndefined=qs.isUndefined=void 0,qs.isUndefined=Fs,qs.isntUndefined=function(e){return!Fs(e)},Is.isntAsyncIterable=Is.isAsyncIterable=void 0;const Ls=js,Bs=qs;function Ds(e){return(0,Ls.isntNull)(e)&&(0,Bs.isntUndefined)(e)&&"function"==typeof e[Symbol.asyncIterator]}Is.isAsyncIterable=Ds,Is.isntAsyncIterable=function(e){return!Ds(e)};var Ms={};function Js(e){return"bigint"==typeof e}Ms.isntBigInt=Ms.isBigInt=void 0,Ms.isBigInt=Js,Ms.isntBigInt=function(e){return!Js(e)};var Hs={};function zs(e){return"boolean"==typeof e}Hs.isntBoolean=Hs.isBoolean=void 0,Hs.isBoolean=zs,Hs.isntBoolean=function(e){return!zs(e)};var $s={},Gs={};function Vs(e){return"string"==typeof e}Gs.isntString=Gs.isString=void 0,Gs.isString=Vs,Gs.isntString=function(e){return!Vs(e)},$s.isntChar=$s.isChar=void 0;const Ks=Gs;function Ws(e){return(0,Ks.isString)(e)&&1===e.length}$s.isChar=Ws,$s.isntChar=function(e){return!Ws(e)};var Zs={};function Qs(e){return e instanceof Date}Zs.isntDate=Zs.isDate=void 0,Zs.isDate=Qs,Zs.isntDate=function(e){return!Qs(e)};var Ys={};Ys.inEnum=void 0,Ys.inEnum=function(e,t){return Object.values(t).includes(e)};var Xs={};function ea(e){return e instanceof Error}Xs.isntError=Xs.isError=void 0,Xs.isError=ea,Xs.isntError=function(e){return!ea(e)};var ta={};function na(e){return!e}ta.isntFalsy=ta.isFalsy=void 0,ta.isFalsy=na,ta.isntFalsy=function(e){return!na(e)};var ra={};function oa(e){return"function"==typeof e}ra.isntFunction=ra.isFunction=void 0,ra.isFunction=oa,ra.isntFunction=function(e){return!oa(e)};var ia={};ia.isntIterable=ia.isIterable=void 0;const sa=js,aa=qs;function ca(e){return(0,sa.isntNull)(e)&&(0,aa.isntUndefined)(e)&&"function"==typeof e[Symbol.iterator]}ia.isIterable=ca,ia.isntIterable=function(e){return!ca(e)};var ua={},la={},da=t&&t.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};la.isntEmptyObject=la.isEmptyObject=la.isntPlainObject=la.isPlainObject=la.isntObject=la.isObject=void 0;const fa=da(oe);function ha(e){return null!==e&&"object"==typeof e}function pa(e){return(0,fa.default)(e)}la.isObject=ha,la.isntObject=function(e){return!ha(e)},la.isPlainObject=pa,la.isntPlainObject=function(e){return!pa(e)},la.isEmptyObject=function(e){return 0===Object.keys(e).length},la.isntEmptyObject=function(e){return 0!==Object.keys(e).length};var ya={};function ma(e){return"number"==typeof e}ya.isntNumber=ya.isNumber=void 0,ya.isNumber=ma,ya.isntNumber=function(e){return!ma(e)},ua.isntJsonRpcError=ua.isJsonRpcError=ua.isntJsonRpcSuccess=ua.isJsonRpcSuccess=ua.isntJsonRpcRequest=ua.isJsonRpcRequest=ua.isntJsonRpcNotification=ua.isJsonRpcNotification=void 0;const va=Ns,ga=la,ba=Gs,wa=ya,Aa=qs;function Ea(e){return(0,ba.isString)(e)||(0,wa.isNumber)(e)}function Sa(e){return(0,va.isArray)(e)||(0,ga.isObject)(e)}function Ra(e){return(0,ga.isPlainObject)(e)&&(0,ba.isString)(e.jsonrpc)&&(0,ba.isString)(e.method)&&(0,Aa.isUndefined)(e.id)&&Sa(e.params)}function _a(e){return(0,ga.isPlainObject)(e)&&(0,ba.isString)(e.jsonrpc)&&(0,ba.isString)(e.method)&&Ea(e.id)&&Sa(e.params)}function Ta(e){return(0,ga.isPlainObject)(e)&&(0,ba.isString)(e.jsonrpc)&&(0,ba.isString)(e.id)&&"result"in e}function ka(e){return(0,ga.isPlainObject)(e)&&(0,ba.isString)(e.jsonrpc)&&Ea(e.id)&&function(e){return(0,ga.isPlainObject)(e)&&(0,wa.isNumber)(e.code)&&(0,ba.isString)(e.message)&&((0,Aa.isUndefined)(e.data)||(0,ga.isObject)(e.data))}(e.error)}ua.isJsonRpcNotification=Ra,ua.isntJsonRpcNotification=function(e){return!Ra(e)},ua.isJsonRpcRequest=_a,ua.isntJsonRpcRequest=function(e){return!_a(e)},ua.isJsonRpcSuccess=Ta,ua.isntJsonRpcSuccess=function(e){return!Ta(e)},ua.isJsonRpcError=ka,ua.isntJsonRpcError=function(e){return!ka(e)};var Ca={};Ca.isntJson=Ca.isJson=void 0,Ca.isJson=function(e){try{return JSON.stringify(e),!0}catch(e){return!1}},Ca.isntJson=function e(t){return!e()};var Oa={};Oa.isAbsoluteURL=void 0,Oa.isAbsoluteURL=function(e){try{return new URL(e),!0}catch(e){return!1}},function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(Ns,e),r(Is,e),r(Ms,e),r(Hs,e),r($s,e),r(Zs,e),r(Ys,e),r(Xs,e),r(ta,e),r(ra,e),r(ia,e),r(ua,e),r(Ca,e),r(js,e),r(ya,e),r(la,e),r(Gs,e),r(qs,e),r(Oa,e)}(xs);var xa={};xa.traverseErrorPrototypeChain=void 0,xa.traverseErrorPrototypeChain=function*(e){let t=e;for(;(t=Object.getPrototypeOf(t))&&(yield t,t!==Error.prototype););},Os.getErrorNames=void 0;const Na=xs,Pa=xa;Os.getErrorNames=function*(e){var t;if((0,Na.isError)(e))for(const n of(0,Pa.traverseErrorPrototypeChain)(e))(null===(t=n.constructor)||void 0===t?void 0:t.name)&&(yield n.constructor.name);else yield e.name,yield*e.ancestors};var Ia={isSerializableError:void 0};const ja=xs;Ia.isSerializableError=function(e){return(0,ja.isObject)(e)&&(0,ja.isString)(e.name)&&(0,ja.isString)(e.message)&&((0,ja.isString)(e.stack)||(0,ja.isNull)(e.stack))&&(0,ja.isArray)(e.ancestors)&&e.ancestors.every(ja.isString)},Cs.CustomError=void 0;const Ua=An,qa=Os,Fa=xs,La=Ia;class Ba extends Error{get name(){var e,t;return null!==(t=null!==(e=(0,Ua.first)((0,qa.getErrorNames)(this)))&&void 0!==e?e:Ba.name)&&void 0!==t?t:"CustomError"}static[Symbol.hasInstance](e){var t;if((0,Fa.isError)(e)||(0,La.isSerializableError)(e)){const n=[null!==(t=this.prototype.constructor.name)&&void 0!==t?t:this.name,...(0,qa.getErrorNames)(this.prototype)].reverse(),r=(0,Ua.toArray)((0,qa.getErrorNames)(e)).reverse();return n.every(((e,t)=>e===r[t]))}return!1}}Cs.CustomError=Ba;var Da={AssertionError:void 0};const Ma=Cs;class Ja extends Ma.CustomError{}Da.AssertionError=Ja;var Ha={normalize:void 0};const za=Os,$a=An;Ha.normalize=function(e){var t;const[n,...r]=(0,$a.toArray)((0,za.getErrorNames)(e));return{name:n,ancestors:r,message:e.message,stack:null!==(t=e.stack)&&void 0!==t?t:null}};var Ga={assert:void 0};const Va=Da;Ga.assert=function(e,t){if(!e)throw new Va.AssertionError(t)},function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(Cs,e),r(Da,e),r(Ia,e),r(Ha,e),r(Ga,e),r(Os,e),r(xa,e)}(ks),Ts.AbortError=void 0;const Ka=ks,Wa=xs,Za=An;class Qa extends Ka.CustomError{static[Symbol.hasInstance](e){return(0,Wa.isError)(e)?(0,Za.some)((0,Ka.getErrorNames)(e),(e=>"AbortError"===e)):super[Symbol.hasInstance](e)}}Ts.AbortError=Qa;var Ya,Xa={};Xa.AbortSignal=void 0;const ec=ws.exports;Xa.AbortSignal=null!==(Ya=globalThis.AbortSignal)&&void 0!==Ya?Ya:ec.AbortSignal;var tc={raceAbortSignals:void 0};const nc=bs;tc.raceAbortSignals=function(e){const t=new nc.AbortController,n=[];for(const o of e)if(o){if(o.aborted){t.abort();break}o.addEventListener("abort",r),n.push(o)}return t.signal;function r(){t.abort(),n.forEach((e=>e.removeEventListener("abort",r)))}};var rc={timeoutSignal:void 0};const oc=bs;rc.timeoutSignal=function(e){const t=new oc.AbortController;return setTimeout((()=>t.abort()),e),t.signal};var ic={withAbortSignal:void 0};const sc=Ts;ic.withAbortSignal=async function(e,t){return new Promise((async(n,r)=>{if(e.aborted)return o();e.addEventListener("abort",o);try{n(await t())}catch(e){r(e)}finally{e.removeEventListener("abort",o)}function o(){r(new sc.AbortError)}}))},function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(bs,e),r(Ts,e),r(Xa,e),r(tc,e),r(rc,e),r(ic,e)}(gs);class ac{constructor(e){this.options=e}getCommonTransformers(e){var t,n;return[ke.url(this.options.server),ke.bearerAuth(this.options.adminPassword),ke.signal(gs.raceAbortSignals([e.signal,!1!==e.timeout&&(null!==(t=e.timeout&&gs.timeoutSignal(e.timeout))&&void 0!==t?t:this.options.timeout&&gs.timeoutSignal(this.options.timeout))])),ke.keepalive(null!==(n=e.keepalive)&&void 0!==n?n:this.options.keepalive),ke.header("Accept-Version","0.1.0")]}}class cc extends ac{async getNamespaces(e={}){const t=h.get(...this.getCommonTransformers(e),ke.pathname("/admin/estore-with-json-schema"));return await r.fetch(t).then(yn.ok).then(yn.toJSON)}async get(e,t={}){const n=h.get(...this.getCommonTransformers(t),ke.pathname(`/admin/estore/${e}/json-schema`));return await r.fetch(n).then(yn.ok).then(yn.toJSON)}async set(e,t,n={}){const o=h.put(...this.getCommonTransformers(n),ke.pathname(`/admin/estore/${e}/json-schema`),ke.json(t));await r.fetch(o).then(yn.ok)}async remove(e,t={}){const n=h.del(...this.getCommonTransformers(t),ke.pathname(`/admin/estore/${e}/json-schema`));await r.fetch(n).then(yn.ok)}}class uc extends ac{async getNamespaces(e={}){const t=h.get(...this.getCommonTransformers(e),ke.pathname("/admin/blacklist"));return await r.fetch(t).then(yn.ok).then(yn.toJSON)}async add(e,t={}){const n=h.put(...this.getCommonTransformers(t),ke.pathname(`/admin/blacklist/${e}`));await r.fetch(n).then(yn.ok)}async remove(e,t={}){const n=h.del(...this.getCommonTransformers(t),ke.pathname(`/admin/blacklist/${e}`));await r.fetch(n).then(yn.ok)}}class lc extends ac{async getNamespaces(e={}){const t=h.get(...this.getCommonTransformers(e),ke.pathname("/admin/whitelist"));return await r.fetch(t).then(yn.ok).then(yn.toJSON)}async add(e,t={}){const n=h.put(...this.getCommonTransformers(t),ke.pathname(`/admin/whitelist/${e}`));await r.fetch(n).then(yn.ok)}async remove(e,t={}){const n=h.del(...this.getCommonTransformers(t),ke.pathname(`/admin/whitelist/${e}`));await r.fetch(n).then(yn.ok)}}class dc extends ac{async getNamespaces(e={}){const t=h.get(...this.getCommonTransformers(e),ke.pathname("/admin/estore-with-token-policies"));return await r.fetch(t).then(yn.ok).then(yn.toJSON)}async get(e,t={}){const n=h.get(...this.getCommonTransformers(t),ke.pathname(`/admin/estore/${e}/token-policies`));return await r.fetch(n).then(yn.ok).then(yn.toJSON)}async setWriteTokenRequired(e,t,n={}){const o=h.put(...this.getCommonTransformers(n),ke.pathname(`/admin/estore/${e}/token-policies/write-token-required`),ke.json(t));await r.fetch(o).then(yn.ok)}async removeWriteTokenRequired(e,t={}){const n=h.del(...this.getCommonTransformers(t),ke.pathname(`/admin/estore/${e}/token-policies/write-token-required`));await r.fetch(n).then(yn.ok)}async setReadTokenRequired(e,t,n={}){const o=h.put(...this.getCommonTransformers(n),ke.pathname(`/admin/estore/${e}/token-policies/read-token-required`),ke.json(t));await r.fetch(o).then(yn.ok)}async removeReadTokenRequired(e,t={}){const n=h.del(...this.getCommonTransformers(t),ke.pathname(`/admin/estore/${e}/token-policies/read-token-required`));await r.fetch(n).then(yn.ok)}async setDeleteTokenRequired(e,t,n={}){const o=h.put(...this.getCommonTransformers(n),ke.pathname(`/admin/estore/${e}/token-policies/delete-token-required`),ke.json(t));await r.fetch(o).then(yn.ok)}async removeDeleteTokenRequired(e,t={}){const n=h.del(...this.getCommonTransformers(t),ke.pathname(`/admin/estore/${e}/token-policies/delete-token-required`));await r.fetch(n).then(yn.ok)}}class fc extends ac{async getNamespaces(e={}){const t=h.get(...this.getCommonTransformers(e),ke.pathname("/admin/estore-with-tokens"));return await r.fetch(t).then(yn.ok).then(yn.toJSON)}async getTokens(e,t={}){const n=h.get(...this.getCommonTransformers(t),ke.pathname(`/admin/estore/${e}/tokens`));return await r.fetch(n).then(yn.ok).then(yn.toJSON)}async addWriteToken(e,t,n={}){const o=h.put(...this.getCommonTransformers(n),ke.pathname(`/admin/estore/${e}/tokens/${t}/write`));await r.fetch(o).then(yn.ok)}async removeWriteToken(e,t,n={}){const o=h.del(...this.getCommonTransformers(n),ke.pathname(`/admin/estore/${e}/tokens/${t}/write`));await r.fetch(o).then(yn.ok)}async addReadToken(e,t,n={}){const o=h.put(...this.getCommonTransformers(n),ke.pathname(`/admin/estore/${e}/tokens/${t}/read`));await r.fetch(o).then(yn.ok)}async removeReadToken(e,t,n={}){const o=h.del(...this.getCommonTransformers(n),ke.pathname(`/admin/estore/${e}/tokens/${t}/read`));await r.fetch(o).then(yn.ok)}async addDeleteToken(e,t,n={}){const o=h.put(...this.getCommonTransformers(n),ke.pathname(`/admin/estore/${e}/tokens/${t}/delete`));await r.fetch(o).then(yn.ok)}async removeDeleteToken(e,t,n={}){const o=h.del(...this.getCommonTransformers(n),ke.pathname(`/admin/estore/${e}/tokens/${t}/delete`));await r.fetch(o).then(yn.ok)}}e.AbortError=r.AbortError,e.EStoreClient=class{constructor(e){this.options=e}getCommonTransformers(e){var t,n,r;const o="token"in e&&null!==(t=e.token)&&void 0!==t?t:this.options.token,i=this.options.basicAuth;return[ke.url(this.options.server),i&&ke.basicAuth(i.username,i.password),o&&ke.searchParams({token:o}),ke.signal(gs.raceAbortSignals([e.signal,!1!==e.timeout&&(null!==(n=e.timeout&&gs.timeoutSignal(e.timeout))&&void 0!==n?n:this.options.timeout&&gs.timeoutSignal(this.options.timeout))])),ke.keepalive(null!==(r=e.keepalive)&&void 0!==r?r:this.options.keepalive)]}async append(e,t,n,o,i={}){const s=h.post(...this.getCommonTransformers(i),ke.pathname(`/estore/${e}/items/${t}/events`),xs.isntUndefined(o)&&ke.header("If-Match",`${o}`),ke.json(n));await r.fetch(s).then(yn.ok)}async getEvent(e,t,n,o={}){const i=h.get(...this.getCommonTransformers(o),ke.pathname(`/estore/${e}/items/${t}/events/${n}`));try{return await r.fetch(i).then(yn.ok).then(yn.toJSON)}catch(e){if(e instanceof _t.NotFound)return;throw e}}async getEvents(e,t,n={}){const o=h.get(...this.getCommonTransformers(n),ke.pathname(`/estore/${e}/items/${t}/events`));try{return await r.fetch(o).then(yn.ok).then(yn.toJSON)}catch(e){if(e instanceof _t.NotFound)return;throw e}}async getSize(e,t,n={}){const o=h.get(...this.getCommonTransformers(n),ke.pathname(`/estore/${e}/items/${t}/size`));return await r.fetch(o).then(yn.ok).then(yn.toJSON)}async has(e,t,n={}){const o=h.head(...this.getCommonTransformers(n),ke.pathname(`/estore/${e}/items/${t}`));try{return await r.fetch(o).then(yn.ok),!0}catch(e){if(e instanceof _t.NotFound)return!1;throw e}}async del(e,t,n={}){const o=h.del(...this.getCommonTransformers(n),ke.pathname(`/estore/${e}/items/${t}`));await r.fetch(o).then(yn.ok)}async clear(e,t={}){const n=h.del(...this.getCommonTransformers(t),ke.pathname(`/estore/${e}`));await r.fetch(n).then(yn.ok)}async getAllItemIds(e,t={}){const n=h.get(...this.getCommonTransformers(t),ke.pathname(`/estore/${e}/items`));return await r.fetch(n).then(yn.ok).then(yn.toJSON)}async getAllNamespaces(e={}){const t=h.get(...this.getCommonTransformers(e),ke.pathname("/estore"));return await r.fetch(t).then(yn.ok).then(yn.toJSON)}async stats(e,t={}){const n=h.get(...this.getCommonTransformers(t),ke.pathname(`/estore/${e}/stats`));return await r.fetch(n).then(yn.ok).then(yn.toJSON)}},e.EStoreManager=class{constructor(e){this.options=e,this.JsonSchema=new cc(this.options),this.Blacklist=new uc(this.options),this.Whitelist=new lc(this.options),this.TokenPolicy=new dc(this.options),this.Token=new fc(this.options)}},e.HTTPClientError=_t.HTTPClientError,e.HTTPError=yn.HTTPError,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
8
|
+
!function(e,t){e.exports=function e(){var t="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:{},n=!t.document&&!!t.postMessage,r=n&&/blob:/i.test((t.location||{}).protocol),o={},i=0,s={parse:function(n,r){var a=(r=r||{}).dynamicTyping||!1;if(A(a)&&(r.dynamicTypingFunction=a,a={}),r.dynamicTyping=a,r.transform=!!A(r.transform)&&r.transform,r.worker&&s.WORKERS_SUPPORTED){var c=function(){if(!s.WORKERS_SUPPORTED)return!1;var n,r,a=(n=t.URL||t.webkitURL||null,r=e.toString(),s.BLOB_URL||(s.BLOB_URL=n.createObjectURL(new Blob(["(",r,")();"],{type:"text/javascript"})))),c=new t.Worker(a);return c.onmessage=y,c.id=i++,o[c.id]=c}();return c.userStep=r.step,c.userChunk=r.chunk,c.userComplete=r.complete,c.userError=r.error,r.step=A(r.step),r.chunk=A(r.chunk),r.complete=A(r.complete),r.error=A(r.error),delete r.worker,void c.postMessage({input:n,config:r,workerId:c.id})}var h=null;return s.NODE_STREAM_INPUT,"string"==typeof n?h=r.download?new u(r):new d(r):!0===n.readable&&A(n.read)&&A(n.on)?h=new f(r):(t.File&&n instanceof File||n instanceof Object)&&(h=new l(r)),h.stream(n)},unparse:function(e,t){var n=!1,r=!0,o=",",i="\r\n",a='"',c=a+a,u=!1,l=null,d=!1;!function(){if("object"==typeof t){if("string"!=typeof t.delimiter||s.BAD_DELIMITERS.filter((function(e){return-1!==t.delimiter.indexOf(e)})).length||(o=t.delimiter),("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(n=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(u=t.skipEmptyLines),"string"==typeof t.newline&&(i=t.newline),"string"==typeof t.quoteChar&&(a=t.quoteChar),"boolean"==typeof t.header&&(r=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");l=t.columns}void 0!==t.escapeChar&&(c=t.escapeChar+a),"boolean"==typeof t.escapeFormulae&&(d=t.escapeFormulae)}}();var f=new RegExp(p(a),"g");if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return h(null,e,u);if("object"==typeof e[0])return h(l||Object.keys(e[0]),e,u)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),h(e.fields||[],e.data||[],u);throw new Error("Unable to serialize unrecognized input");function h(e,t,n){var s="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var a=Array.isArray(e)&&0<e.length,c=!Array.isArray(t[0]);if(a&&r){for(var u=0;u<e.length;u++)0<u&&(s+=o),s+=m(e[u],u);0<t.length&&(s+=i)}for(var l=0;l<t.length;l++){var d=a?e.length:t[l].length,f=!1,h=a?0===Object.keys(t[l]).length:0===t[l].length;if(n&&!a&&(f="greedy"===n?""===t[l].join("").trim():1===t[l].length&&0===t[l][0].length),"greedy"===n&&a){for(var p=[],y=0;y<d;y++){var v=c?e[y]:y;p.push(t[l][v])}f=""===p.join("").trim()}if(!f){for(var g=0;g<d;g++){0<g&&!h&&(s+=o);var b=a&&c?e[g]:g;s+=m(t[l][b],g)}l<t.length-1&&(!n||0<d&&!h)&&(s+=i)}}return s}function m(e,t){if(null==e)return"";if(e.constructor===Date)return JSON.stringify(e).slice(1,25);!0===d&&"string"==typeof e&&null!==e.match(/^[=+\-@].*$/)&&(e="'"+e);var r=e.toString().replace(f,c);return"boolean"==typeof n&&n||"function"==typeof n&&n(e,t)||Array.isArray(n)&&n[t]||function(e,t){for(var n=0;n<t.length;n++)if(-1<e.indexOf(t[n]))return!0;return!1}(r,s.BAD_DELIMITERS)||-1<r.indexOf(o)||" "===r.charAt(0)||" "===r.charAt(r.length-1)?a+r+a:r}}};if(s.RECORD_SEP=String.fromCharCode(30),s.UNIT_SEP=String.fromCharCode(31),s.BYTE_ORDER_MARK="\ufeff",s.BAD_DELIMITERS=["\r","\n",'"',s.BYTE_ORDER_MARK],s.WORKERS_SUPPORTED=!n&&!!t.Worker,s.NODE_STREAM_INPUT=1,s.LocalChunkSize=10485760,s.RemoteChunkSize=5242880,s.DefaultDelimiter=",",s.Parser=m,s.ParserHandle=h,s.NetworkStreamer=u,s.FileStreamer=l,s.StringStreamer=d,s.ReadableStreamStreamer=f,t.jQuery){var a=t.jQuery;a.fn.parse=function(e){var n=e.config||{},r=[];return this.each((function(e){if("INPUT"!==a(this).prop("tagName").toUpperCase()||"file"!==a(this).attr("type").toLowerCase()||!t.FileReader||!this.files||0===this.files.length)return!0;for(var o=0;o<this.files.length;o++)r.push({file:this.files[o],inputElem:this,instanceConfig:a.extend({},n)})})),o(),this;function o(){if(0!==r.length){var t,n,o,c,u=r[0];if(A(e.before)){var l=e.before(u.file,u.inputElem);if("object"==typeof l){if("abort"===l.action)return t="AbortError",n=u.file,o=u.inputElem,c=l.reason,void(A(e.error)&&e.error({name:t},n,o,c));if("skip"===l.action)return void i();"object"==typeof l.config&&(u.instanceConfig=a.extend(u.instanceConfig,l.config))}else if("skip"===l)return void i()}var d=u.instanceConfig.complete;u.instanceConfig.complete=function(e){A(d)&&d(e,u.file,u.inputElem),i()},s.parse(u.file,u.instanceConfig)}else A(e.complete)&&e.complete()}function i(){r.splice(0,1),o()}}}function c(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var t=b(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new h(t),(this._handle.streamer=this)._config=t}.call(this,e),this.parseChunk=function(e,n){if(this.isFirstChunk&&A(this._config.beforeFirstChunk)){var o=this._config.beforeFirstChunk(e);void 0!==o&&(e=o)}this.isFirstChunk=!1,this._halted=!1;var i=this._partialLine+e;this._partialLine="";var a=this._handle.parse(i,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var c=a.meta.cursor;this._finished||(this._partialLine=i.substring(c-this._baseIndex),this._baseIndex=c),a&&a.data&&(this._rowCount+=a.data.length);var u=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(r)t.postMessage({results:a,workerId:s.WORKER_ID,finished:u});else if(A(this._config.chunk)&&!n){if(this._config.chunk(a,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);a=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(a.data),this._completeResults.errors=this._completeResults.errors.concat(a.errors),this._completeResults.meta=a.meta),this._completed||!u||!A(this._config.complete)||a&&a.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),u||a&&a.meta.paused||this._nextChunk(),a}this._halted=!0},this._sendError=function(e){A(this._config.error)?this._config.error(e):r&&this._config.error&&t.postMessage({workerId:s.WORKER_ID,error:e,finished:!1})}}function u(e){var t;(e=e||{}).chunkSize||(e.chunkSize=s.RemoteChunkSize),c.call(this,e),this._nextChunk=n?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),n||(t.onload=w(this._chunkLoaded,this),t.onerror=w(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!n),this._config.downloadRequestHeaders){var e=this._config.downloadRequestHeaders;for(var r in e)t.setRequestHeader(r,e[r])}if(this._config.chunkSize){var o=this._start+this._config.chunkSize-1;t.setRequestHeader("Range","bytes="+this._start+"-"+o)}try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}n&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){4===t.readyState&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:t.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(e){var t=e.getResponseHeader("Content-Range");return null===t?-1:parseInt(t.substring(t.lastIndexOf("/")+1))}(t),this.parseChunk(t.responseText)))},this._chunkError=function(e){var n=t.statusText||e;this._sendError(new Error(n))}}function l(e){var t,n;(e=e||{}).chunkSize||(e.chunkSize=s.LocalChunkSize),c.call(this,e);var r="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,n=e.slice||e.webkitSlice||e.mozSlice,r?((t=new FileReader).onload=w(this._chunkLoaded,this),t.onerror=w(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var e=this._input;if(this._config.chunkSize){var o=Math.min(this._start+this._config.chunkSize,this._input.size);e=n.call(e,this._start,o)}var i=t.readAsText(e,this._config.encoding);r||this._chunkLoaded({target:{result:i}})},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function d(e){var t;c.call(this,e=e||{}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e,n=this._config.chunkSize;return n?(e=t.substring(0,n),t=t.substring(n)):(e=t,t=""),this._finished=!t,this.parseChunk(e)}}}function f(e){c.call(this,e=e||{});var t=[],n=!0,r=!1;this.pause=function(){c.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){c.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){r&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):n=!0},this._streamData=w((function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),n&&(n=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}}),this),this._streamError=w((function(e){this._streamCleanUp(),this._sendError(e)}),this),this._streamEnd=w((function(){this._streamCleanUp(),r=!0,this._streamData("")}),this),this._streamCleanUp=w((function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)}),this)}function h(e){var t,n,r,o=Math.pow(2,53),i=-o,a=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,c=/^(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))$/,u=this,l=0,d=0,f=!1,h=!1,y=[],v={data:[],errors:[],meta:{}};if(A(e.step)){var g=e.step;e.step=function(t){if(v=t,S())E();else{if(E(),0===v.data.length)return;l+=t.data.length,e.preview&&l>e.preview?n.abort():(v.data=v.data[0],g(v,u))}}}function w(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function E(){if(v&&r&&(T("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+s.DefaultDelimiter+"'"),r=!1),e.skipEmptyLines)for(var t=0;t<v.data.length;t++)w(v.data[t])&&v.data.splice(t--,1);return S()&&function(){if(v)if(Array.isArray(v.data[0])){for(var t=0;S()&&t<v.data.length;t++)v.data[t].forEach(n);v.data.splice(0,1)}else v.data.forEach(n);function n(t,n){A(e.transformHeader)&&(t=e.transformHeader(t,n)),y.push(t)}}(),function(){if(!v||!e.header&&!e.dynamicTyping&&!e.transform)return v;function t(t,n){var r,o=e.header?{}:[];for(r=0;r<t.length;r++){var i=r,s=t[r];e.header&&(i=r>=y.length?"__parsed_extra":y[r]),e.transform&&(s=e.transform(s,i)),s=R(i,s),"__parsed_extra"===i?(o[i]=o[i]||[],o[i].push(s)):o[i]=s}return e.header&&(r>y.length?T("FieldMismatch","TooManyFields","Too many fields: expected "+y.length+" fields but parsed "+r,d+n):r<y.length&&T("FieldMismatch","TooFewFields","Too few fields: expected "+y.length+" fields but parsed "+r,d+n)),o}var n=1;return!v.data.length||Array.isArray(v.data[0])?(v.data=v.data.map(t),n=v.data.length):v.data=t(v.data,0),e.header&&v.meta&&(v.meta.fields=y),d+=n,v}()}function S(){return e.header&&0===y.length}function R(t,n){return r=t,e.dynamicTypingFunction&&void 0===e.dynamicTyping[r]&&(e.dynamicTyping[r]=e.dynamicTypingFunction(r)),!0===(e.dynamicTyping[r]||e.dynamicTyping)?"true"===n||"TRUE"===n||"false"!==n&&"FALSE"!==n&&(function(e){if(a.test(e)){var t=parseFloat(e);if(i<t&&t<o)return!0}return!1}(n)?parseFloat(n):c.test(n)?new Date(n):""===n?null:n):n;var r}function T(e,t,n,r){var o={type:e,code:t,message:n};void 0!==r&&(o.row=r),v.errors.push(o)}this.parse=function(o,i,a){var c=e.quoteChar||'"';if(e.newline||(e.newline=function(e,t){e=e.substring(0,1048576);var n=new RegExp(p(t)+"([^]*?)"+p(t),"gm"),r=(e=e.replace(n,"")).split("\r"),o=e.split("\n"),i=1<o.length&&o[0].length<r[0].length;if(1===r.length||i)return"\n";for(var s=0,a=0;a<r.length;a++)"\n"===r[a][0]&&s++;return s>=r.length/2?"\r\n":"\r"}(o,c)),r=!1,e.delimiter)A(e.delimiter)&&(e.delimiter=e.delimiter(o),v.meta.delimiter=e.delimiter);else{var u=function(t,n,r,o,i){var a,c,u,l;i=i||[",","\t","|",";",s.RECORD_SEP,s.UNIT_SEP];for(var d=0;d<i.length;d++){var f=i[d],h=0,p=0,y=0;u=void 0;for(var v=new m({comments:o,delimiter:f,newline:n,preview:10}).parse(t),g=0;g<v.data.length;g++)if(r&&w(v.data[g]))y++;else{var b=v.data[g].length;p+=b,void 0!==u?0<b&&(h+=Math.abs(b-u),u=b):u=b}0<v.data.length&&(p/=v.data.length-y),(void 0===c||h<=c)&&(void 0===l||l<p)&&1.99<p&&(c=h,a=f,l=p)}return{successful:!!(e.delimiter=a),bestDelimiter:a}}(o,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess);u.successful?e.delimiter=u.bestDelimiter:(r=!0,e.delimiter=s.DefaultDelimiter),v.meta.delimiter=e.delimiter}var l=b(e);return e.preview&&e.header&&l.preview++,t=o,n=new m(l),v=n.parse(t,i,a),E(),f?{meta:{paused:!0}}:v||{meta:{paused:!1}}},this.paused=function(){return f},this.pause=function(){f=!0,n.abort(),t=A(e.chunk)?"":t.substring(n.getCharIndex())},this.resume=function(){u.streamer._halted?(f=!1,u.streamer.parseChunk(t,!0)):setTimeout(u.resume,3)},this.aborted=function(){return h},this.abort=function(){h=!0,n.abort(),v.meta.aborted=!0,A(e.complete)&&e.complete(v),t=""}}function p(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function m(e){var t,n=(e=e||{}).delimiter,r=e.newline,o=e.comments,i=e.step,a=e.preview,c=e.fastMode,u=t=void 0===e.quoteChar?'"':e.quoteChar;if(void 0!==e.escapeChar&&(u=e.escapeChar),("string"!=typeof n||-1<s.BAD_DELIMITERS.indexOf(n))&&(n=","),o===n)throw new Error("Comment character same as delimiter");!0===o?o="#":("string"!=typeof o||-1<s.BAD_DELIMITERS.indexOf(o))&&(o=!1),"\n"!==r&&"\r"!==r&&"\r\n"!==r&&(r="\n");var l=0,d=!1;this.parse=function(e,s,f){if("string"!=typeof e)throw new Error("Input must be a string");var h=e.length,m=n.length,y=r.length,v=o.length,g=A(i),b=[],w=[],E=[],S=l=0;if(!e)return q();if(c||!1!==c&&-1===e.indexOf(t)){for(var R=e.split(r),T=0;T<R.length;T++){if(E=R[T],l+=E.length,T!==R.length-1)l+=r.length;else if(f)return q();if(!o||E.substring(0,v)!==o){if(g){if(b=[],P(E.split(n)),F(),d)return q()}else P(E.split(n));if(a&&a<=T)return b=b.slice(0,a),q(!0)}}return q()}for(var _=e.indexOf(n,l),k=e.indexOf(r,l),C=new RegExp(p(u)+p(t),"g"),x=e.indexOf(t,l);;)if(e[l]!==t)if(o&&0===E.length&&e.substring(l,l+v)===o){if(-1===k)return q();l=k+y,k=e.indexOf(r,l),_=e.indexOf(n,l)}else if(-1!==_&&(_<k||-1===k))E.push(e.substring(l,_)),l=_+m,_=e.indexOf(n,l);else{if(-1===k)break;if(E.push(e.substring(l,k)),U(k+y),g&&(F(),d))return q();if(a&&b.length>=a)return q(!0)}else for(x=l,l++;;){if(-1===(x=e.indexOf(t,x+1)))return f||w.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:b.length,index:l}),j();if(x===h-1)return j(e.substring(l,x).replace(C,t));if(t!==u||e[x+1]!==u){if(t===u||0===x||e[x-1]!==u){-1!==_&&_<x+1&&(_=e.indexOf(n,x+1)),-1!==k&&k<x+1&&(k=e.indexOf(r,x+1));var O=I(-1===k?_:Math.min(_,k));if(e[x+1+O]===n){E.push(e.substring(l,x).replace(C,t)),e[l=x+1+O+m]!==t&&(x=e.indexOf(t,l)),_=e.indexOf(n,l),k=e.indexOf(r,l);break}var N=I(k);if(e.substring(x+1+N,x+1+N+y)===r){if(E.push(e.substring(l,x).replace(C,t)),U(x+1+N+y),_=e.indexOf(n,l),x=e.indexOf(t,l),g&&(F(),d))return q();if(a&&b.length>=a)return q(!0);break}w.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:b.length,index:l}),x++}}else x++}return j();function P(e){b.push(e),S=l}function I(t){var n=0;if(-1!==t){var r=e.substring(x+1,t);r&&""===r.trim()&&(n=r.length)}return n}function j(t){return f||(void 0===t&&(t=e.substring(l)),E.push(t),l=h,P(E),g&&F()),q()}function U(t){l=t,P(E),E=[],k=e.indexOf(r,l)}function q(e){return{data:b,errors:w,meta:{delimiter:n,linebreak:r,aborted:d,truncated:!!e,cursor:S+(s||0)}}}function F(){i(q()),b=[],w=[]}},this.abort=function(){d=!0},this.getCharIndex=function(){return l}}function y(e){var t=e.data,n=o[t.workerId],r=!1;if(t.error)n.userError(t.error,t.file);else if(t.results&&t.results.data){var i={abort:function(){r=!0,v(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:g,resume:g};if(A(n.userStep)){for(var s=0;s<t.results.data.length&&(n.userStep({data:t.results.data[s],errors:t.results.errors,meta:t.results.meta},i),!r);s++);delete t.results}else A(n.userChunk)&&(n.userChunk(t.results,i,t.file),delete t.results)}t.finished&&!r&&v(t.workerId,t.results)}function v(e,t){var n=o[e];A(n.userComplete)&&n.userComplete(t),n.terminate(),delete o[e]}function g(){throw new Error("Not implemented.")}function b(e){if("object"!=typeof e||null===e)return e;var t=Array.isArray(e)?[]:{};for(var n in e)t[n]=b(e[n]);return t}function w(e,t){return function(){e.apply(t,arguments)}}function A(e){return"function"==typeof e}return r&&(t.onmessage=function(e){var n=e.data;if(void 0===s.WORKER_ID&&n&&(s.WORKER_ID=n.workerId),"string"==typeof n.input)t.postMessage({workerId:s.WORKER_ID,results:s.parse(n.input,n.config),finished:!0});else if(t.File&&n.input instanceof File||n.input instanceof Object){var r=s.parse(n.input,n.config);r&&t.postMessage({workerId:s.WORKER_ID,results:r,finished:!0})}}),(u.prototype=Object.create(c.prototype)).constructor=u,(l.prototype=Object.create(c.prototype)).constructor=l,(d.prototype=Object.create(d.prototype)).constructor=d,(f.prototype=Object.create(c.prototype)).constructor=f,s}()}(je);var Ue={},qe={CustomError:void 0};class Fe extends Error{get name(){return this.constructor.name}}qe.CustomError=Fe;var Le={ExpectedError:void 0};const Be=qe;class De extends Be.CustomError{}Le.ExpectedError=De;var Me={AssertionError:void 0};const He=qe;class Je extends He.CustomError{}Me.AssertionError=Je;var ze={};ze.normalize=void 0,ze.normalize=function(e){var t;return{name:e.name,message:e.message,stack:null!==(t=e.stack)&&void 0!==t?t:null}};var $e={refute:void 0};const Ge=Le;$e.refute=function(e,t){if(e)throw new Ge.ExpectedError(t)};var Ve={assert:void 0};const Ke=Me;Ve.assert=function(e,t){if(!e)throw new Ke.AssertionError(t)},function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(qe,e),r(Le,e),r(Me,e),r(ze,e),r($e,e),r(Ve,e)}(Ue),Ie.csv=void 0;const We=r,Ze=je.exports,Qe=Ue;function Ye(e){const t=Object.keys(e[0]);return(0,Ze.unparse)({data:e,fields:t})}Ie.csv=function(e){return(0,Qe.assert)(e.length>0,"payload must be a non-empty array"),t=>{const n=new We.Headers(t.headers);return n.set("Content-Type","text/csv"),{...t,headers:n,payload:Ye(e)}}};var Xe={};Xe.signal=void 0,Xe.signal=function(e){return t=>({...t,signal:e})};var et={header:void 0};const tt=r;et.header=function(e,t){return n=>{const r=new tt.Headers(n.headers);return r.set(e,t),{...n,headers:r}}};var nt={appendHeader:void 0};const rt=r;nt.appendHeader=function(e,t){return n=>{const r=new rt.Headers(n.headers);return r.append(e,t),{...n,headers:r}}};var ot={headers:void 0};const it=r;ot.headers=function(e){return t=>{const n=new it.Headers(t.headers);for(const[t,r]of Object.entries(e))n.set(t,r);return{...t,headers:n}}};var st={accept:void 0};const at=nt;st.accept=function(e){return(0,at.appendHeader)("Accept",e)};var ct={};ct.host=void 0,ct.host=function(e){return t=>{const n=new URL(t.url.href);return n.host=e,{...t,url:n}}};var ut={};ut.port=void 0,ut.port=function(e){return t=>{const n=new URL(t.url.href);return n.port=e.toString(),{...t,url:n}}};var lt={};lt.pathname=void 0,lt.pathname=function(e){return t=>{const n=new URL(t.url.href);return n.pathname=e,{...t,url:n}}};var dt={};dt.search=void 0,dt.search=function(e){return t=>{const n=new URL(t.url.href);return n.search=e,{...t,url:n}}};var ft={};ft.searchParam=void 0,ft.searchParam=function(e,t){return n=>{const r=new URL(n.url.href),o=new URLSearchParams(r.searchParams);return o.set(e,t.toString()),r.search=o.toString(),{...n,url:r}}};var ht={};ht.searchParams=void 0,ht.searchParams=function(e){return t=>{const n=new URL(t.url.href),r=new URLSearchParams(n.searchParams);for(const[t,n]of Object.entries(e))r.set(t,n.toString());return n.search=r.toString(),{...t,url:n}}};var pt={};pt.appendSearchParam=void 0,pt.appendSearchParam=function(e,t){return n=>{const r=new URL(n.url.href),o=new URLSearchParams(r.searchParams);return o.append(e,t.toString()),r.search=o.toString(),{...n,url:r}}};var mt={formDataField:void 0};const yt=r,vt=y;mt.formDataField=function(e,t){return n=>{const r=n.payload instanceof yt.FormData?function(e){const t=new yt.FormData;for(const[n,r]of e.entries())t.append(n,r);return t}(n.payload):new yt.FormData;return(0,vt.isArray)(t)?t.forEach((t=>r.append(e,t))):r.append(e,t),{...n,payload:r}}};var gt={},bt={exports:{}};!function(e,t){var n,r,o,i,s,a,c,u,l,d,f,h,p,m,y,v,g,b,w,A,E,S,R,T,_,k,C,x,O,N,P,I,j,U,q,F,L,B,D,M,H;"undefined"!=typeof self?self:"undefined"!=typeof window&&window,e.exports=(r=n="3.7.2",o="function"==typeof atob,i="function"==typeof btoa,s="function"==typeof Buffer,a="function"==typeof TextDecoder?new TextDecoder:void 0,c="function"==typeof TextEncoder?new TextEncoder:void 0,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l=Array.prototype.slice.call(u),H={},l.forEach((function(e,t){return H[e]=t})),d=H,f=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,h=String.fromCharCode.bind(String),p="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):function(e,t){return void 0===t&&(t=function(e){return e}),new Uint8Array(Array.prototype.slice.call(e,0).map(t))},m=function(e){return e.replace(/=/g,"").replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"}))},y=function(e){return e.replace(/[^A-Za-z0-9\+\/]/g,"")},v=function(e){for(var t,n,r,o,i="",s=e.length%3,a=0;a<e.length;){if((n=e.charCodeAt(a++))>255||(r=e.charCodeAt(a++))>255||(o=e.charCodeAt(a++))>255)throw new TypeError("invalid character found");i+=l[(t=n<<16|r<<8|o)>>18&63]+l[t>>12&63]+l[t>>6&63]+l[63&t]}return s?i.slice(0,s-3)+"===".substring(s):i},b=s?function(e){return Buffer.from(e).toString("base64")}:function(e){for(var t=4096,n=[],r=0,o=e.length;r<o;r+=t)n.push(h.apply(null,e.subarray(r,r+t)));return g(n.join(""))},A=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?h(192|t>>>6)+h(128|63&t):h(224|t>>>12&15)+h(128|t>>>6&63)+h(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return h(240|t>>>18&7)+h(128|t>>>12&63)+h(128|t>>>6&63)+h(128|63&t)},E=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,R=s?function(e){return Buffer.from(e,"utf8").toString("base64")}:c?function(e){return b(c.encode(e))}:function(e){return g(S(e))},_=function(e){return T(e,!0)},k=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,C=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return h(55296+(t>>>10))+h(56320+(1023&t));case 3:return h((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return h((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},O=function(e){if(e=e.replace(/\s+/g,""),!f.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));for(var t,n,r,o="",i=0;i<e.length;)t=d[e.charAt(i++)]<<18|d[e.charAt(i++)]<<12|(n=d[e.charAt(i++)])<<6|(r=d[e.charAt(i++)]),o+=64===n?h(t>>16&255):64===r?h(t>>16&255,t>>8&255):h(t>>16&255,t>>8&255,255&t);return o},P=s?function(e){return p(Buffer.from(e,"base64"))}:function(e){return p(N(e),(function(e){return e.charCodeAt(0)}))},I=function(e){return P(U(e))},j=s?function(e){return Buffer.from(e,"base64").toString("utf8")}:a?function(e){return a.decode(P(e))}:function(e){return x(N(e))},U=function(e){return y(e.replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})))},F=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}},L=function(){var e=function(e,t){return Object.defineProperty(String.prototype,e,F(t))};e("fromBase64",(function(){return q(this)})),e("toBase64",(function(e){return T(this,e)})),e("toBase64URI",(function(){return T(this,!0)})),e("toBase64URL",(function(){return T(this,!0)})),e("toUint8Array",(function(){return I(this)}))},B=function(){var e=function(e,t){return Object.defineProperty(Uint8Array.prototype,e,F(t))};e("toBase64",(function(e){return w(this,e)})),e("toBase64URI",(function(){return w(this,!0)})),e("toBase64URL",(function(){return w(this,!0)}))},D=function(){L(),B()},M={version:n,VERSION:r,atob:N=o?function(e){return atob(y(e))}:s?function(e){return Buffer.from(e,"base64").toString("binary")}:O,atobPolyfill:O,btoa:g=i?function(e){return btoa(e)}:s?function(e){return Buffer.from(e,"binary").toString("base64")}:v,btoaPolyfill:v,fromBase64:q=function(e){return j(U(e))},toBase64:T=function(e,t){return void 0===t&&(t=!1),t?m(R(e)):R(e)},encode:T,encodeURI:_,encodeURL:_,utob:S=function(e){return e.replace(E,A)},btou:x=function(e){return e.replace(k,C)},decode:q,isValid:function(e){if("string"!=typeof e)return!1;var t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},fromUint8Array:w=function(e,t){return void 0===t&&(t=!1),t?m(b(e)):b(e)},toUint8Array:I,extendString:L,extendUint8Array:B,extendBuiltins:D,Base64:{}},Object.keys(M).forEach((function(e){return M.Base64[e]=M[e]})),M)}(bt),gt.basicAuth=void 0;const wt=et,At=bt.exports;gt.basicAuth=function(e,t){return(0,wt.header)("Authorization","Basic "+(0,At.btoa)(`${e}:${t}`))};var Et={bearerAuth:void 0};const St=et;Et.bearerAuth=function(e){return(0,St.header)("Authorization",`Bearer ${e}`)};var Rt={};Rt.keepalive=void 0,Rt.keepalive=function(e=!0){return t=>({...t,keepalive:e})},function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(Ce,e),r(xe,e),r(Ne,e),r(Ie,e),r(Xe,e),r(et,e),r(nt,e),r(ot,e),r(st,e),r(ct,e),r(ut,e),r(lt,e),r(dt,e),r(ft,e),r(ht,e),r(pt,e),r(mt,e),r(gt,e),r(Et,e),r(Rt,e)}(ke);var Tt={},_t=n(Object.freeze({__proto__:null})),kt={},Ct={},xt={CustomError:void 0};class Ot extends Error{get name(){return this.constructor.name}}xt.CustomError=Ot;var Nt={ExpectedError:void 0};const Pt=xt;class It extends Pt.CustomError{}Nt.ExpectedError=It;var jt={AssertionError:void 0};const Ut=xt;class qt extends Ut.CustomError{}jt.AssertionError=qt;var Ft={};Ft.normalize=void 0,Ft.normalize=function(e){var t;return{name:e.name,message:e.message,stack:null!==(t=e.stack)&&void 0!==t?t:null}};var Lt={refute:void 0};const Bt=Nt;Lt.refute=function(e,t){if(e)throw new Bt.ExpectedError(t)};var Dt={assert:void 0};const Mt=jt;Dt.assert=function(e,t){if(!e)throw new Mt.AssertionError(t)},function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(xt,e),r(Nt,e),r(jt,e),r(Ft,e),r(Lt,e),r(Dt,e)}(Ct),kt.HTTPError=void 0;const Ht=Ct;kt.HTTPError=class extends Ht.CustomError{constructor(e,t){super(t),this.code=e}};var Jt={},zt={};!function(e){e.ServerError=e.ClientError=e.Redirection=e.Successful=e.Informational=void 0,function(e){e[e.Continue=100]="Continue",e[e.SwitchingProtocol=101]="SwitchingProtocol",e[e.Processing=102]="Processing",e[e.EarlyHints=103]="EarlyHints"}(e.Informational||(e.Informational={})),function(e){e[e.OK=200]="OK",e[e.Created=201]="Created",e[e.Accepted=202]="Accepted",e[e.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",e[e.NoContent=204]="NoContent",e[e.ResetContent=205]="ResetContent",e[e.PartialContent=206]="PartialContent",e[e.MultiStatus=207]="MultiStatus",e[e.AlreadyReported=208]="AlreadyReported",e[e.IMUsed=226]="IMUsed"}(e.Successful||(e.Successful={})),function(e){e[e.MultipleChoice=300]="MultipleChoice",e[e.MovedPermanently=3011]="MovedPermanently",e[e.Found=302]="Found",e[e.SeeOther=303]="SeeOther",e[e.NotModified=304]="NotModified",e[e.TemporaryRedirect=307]="TemporaryRedirect",e[e.PermanentRedirect=308]="PermanentRedirect"}(e.Redirection||(e.Redirection={})),function(e){e[e.BadRequest=400]="BadRequest",e[e.Unauthorized=401]="Unauthorized",e[e.Forbidden=403]="Forbidden",e[e.NotFound=404]="NotFound",e[e.MethodNotAllowed=405]="MethodNotAllowed",e[e.NotAcceptable=406]="NotAcceptable",e[e.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",e[e.RequestTimeout=408]="RequestTimeout",e[e.Conflict=409]="Conflict",e[e.Gone=410]="Gone",e[e.LengthRequired=411]="LengthRequired",e[e.PreconditionFailed=412]="PreconditionFailed",e[e.PayloadTooLarge=413]="PayloadTooLarge",e[e.URITooLong=414]="URITooLong",e[e.UnsupportedMediaType=415]="UnsupportedMediaType",e[e.RangeNotSatisfiable=416]="RangeNotSatisfiable",e[e.ExpectationFailed=417]="ExpectationFailed",e[e.MisdirectedRequest=421]="MisdirectedRequest",e[e.UnprocessableEntity=422]="UnprocessableEntity",e[e.Locked=423]="Locked",e[e.FailedDependency=424]="FailedDependency",e[e.UpgradeRequired=426]="UpgradeRequired",e[e.PreconditionRequired=428]="PreconditionRequired",e[e.TooManyRequests=429]="TooManyRequests",e[e.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",e[e.UnavailableForLegalReasons=451]="UnavailableForLegalReasons"}(e.ClientError||(e.ClientError={})),function(e){e[e.InternalServerError=500]="InternalServerError",e[e.NotImplemented=501]="NotImplemented",e[e.BadGateway=502]="BadGateway",e[e.ServiceUnavailable=503]="ServiceUnavailable",e[e.GatewayTimeout=504]="GatewayTimeout",e[e.HTTPVersionNotSupported=505]="HTTPVersionNotSupported",e[e.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",e[e.InsufficientStorage=507]="InsufficientStorage",e[e.LoopDetected=508]="LoopDetected",e[e.NotExtended=510]="NotExtended",e[e.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired"}(e.ServerError||(e.ServerError={}))}(zt),Jt.EarlyHints=Jt.Processing=Jt.SwitchingProtocol=Jt.Continue=Jt.HTTPInformational=void 0;const $t=zt;class Gt{constructor(e,t){this.code=e,this.message=t}}Jt.HTTPInformational=Gt;Jt.Continue=class extends Gt{constructor(){super($t.Informational.Continue,"Continue")}};Jt.SwitchingProtocol=class extends Gt{constructor(){super($t.Informational.SwitchingProtocol,"Switching Protocol")}};Jt.Processing=class extends Gt{constructor(){super($t.Informational.Processing,"Processing")}};Jt.EarlyHints=class extends Gt{constructor(){super($t.Informational.EarlyHints,"Early Hints")}};var Vt={};Vt.IMUsed=Vt.AlreadyReported=Vt.MultiStatus=Vt.PartialContent=Vt.ResetContent=Vt.NoContent=Vt.NonAuthoritativeInformation=Vt.Accepted=Vt.Created=Vt.OK=Vt.HTTPSuccessful=void 0;const Kt=zt;class Wt{constructor(e,t){this.code=e,this.message=t}}Vt.HTTPSuccessful=Wt;Vt.OK=class extends Wt{constructor(){super(Kt.Successful.OK,"OK")}};Vt.Created=class extends Wt{constructor(){super(Kt.Successful.Created,"Created")}};Vt.Accepted=class extends Wt{constructor(){super(Kt.Successful.Accepted,"Accepted")}};Vt.NonAuthoritativeInformation=class extends Wt{constructor(){super(Kt.Successful.NonAuthoritativeInformation,"Non-Authoritative Information")}};Vt.NoContent=class extends Wt{constructor(){super(Kt.Successful.NoContent,"No Content")}};Vt.ResetContent=class extends Wt{constructor(){super(Kt.Successful.ResetContent,"Reset Content")}};Vt.PartialContent=class extends Wt{constructor(){super(Kt.Successful.PartialContent,"Partial Content")}};Vt.MultiStatus=class extends Wt{constructor(){super(Kt.Successful.MultiStatus,"Multi-Status")}};Vt.AlreadyReported=class extends Wt{constructor(){super(Kt.Successful.AlreadyReported,"Already Reported")}};Vt.IMUsed=class extends Wt{constructor(){super(Kt.Successful.IMUsed,"IM Used")}};var Zt={};Zt.PermanentRedirect=Zt.TemporaryRedirect=Zt.NotModified=Zt.SeeOther=Zt.Found=Zt.MovedPermanently=Zt.MultipleChoice=Zt.HTTPRedirection=void 0;const Qt=zt;class Yt{constructor(e,t){this.code=e,this.message=t}}Zt.HTTPRedirection=Yt;Zt.MultipleChoice=class extends Yt{constructor(){super(Qt.Redirection.MultipleChoice,"Multiple Choice")}};Zt.MovedPermanently=class extends Yt{constructor(){super(Qt.Redirection.MovedPermanently,"Moved Permanently")}};Zt.Found=class extends Yt{constructor(){super(Qt.Redirection.Found,"Found")}};Zt.SeeOther=class extends Yt{constructor(){super(Qt.Redirection.SeeOther,"See Other")}};Zt.NotModified=class extends Yt{constructor(){super(Qt.Redirection.NotModified,"Not Modified")}};Zt.TemporaryRedirect=class extends Yt{constructor(){super(Qt.Redirection.TemporaryRedirect,"Temporary Redirect")}};Zt.PermanentRedirect=class extends Yt{constructor(){super(Qt.Redirection.PermanentRedirect,"Permanent Redirect")}};var Xt={};Xt.UnavailableForLegalReasons=Xt.RequestHeaderFieldsTooLarge=Xt.TooManyRequests=Xt.PreconditionRequired=Xt.UpgradeRequired=Xt.FailedDependency=Xt.Locked=Xt.UnprocessableEntity=Xt.MisdirectedRequest=Xt.ExpectationFailed=Xt.RangeNotSatisfiable=Xt.UnsupportedMediaType=Xt.URITooLong=Xt.PayloadTooLarge=Xt.PreconditionFailed=Xt.LengthRequired=Xt.Gone=Xt.Conflict=Xt.RequestTimeout=Xt.ProxyAuthenticationRequired=Xt.NotAcceptable=Xt.MethodNotAllowed=Xt.NotFound=Xt.Forbidden=Xt.Unauthorized=Xt.BadRequest=Xt.HTTPClientError=void 0;const en=kt,tn=zt;class nn extends en.HTTPError{}Xt.HTTPClientError=nn;Xt.BadRequest=class extends nn{constructor(e){super(tn.ClientError.BadRequest,null!=e?e:"Bad Request")}};Xt.Unauthorized=class extends nn{constructor(e){super(tn.ClientError.Unauthorized,null!=e?e:"Unauthorized")}};Xt.Forbidden=class extends nn{constructor(e){super(tn.ClientError.Forbidden,null!=e?e:"Forbidden")}};Xt.NotFound=class extends nn{constructor(e){super(tn.ClientError.NotFound,null!=e?e:"Not Found")}};Xt.MethodNotAllowed=class extends nn{constructor(e){super(tn.ClientError.MethodNotAllowed,null!=e?e:"Method Not Allowed")}};Xt.NotAcceptable=class extends nn{constructor(e){super(tn.ClientError.NotAcceptable,null!=e?e:"Not Acceptable")}};Xt.ProxyAuthenticationRequired=class extends nn{constructor(e){super(tn.ClientError.ProxyAuthenticationRequired,null!=e?e:"Proxy Authentication Required")}};Xt.RequestTimeout=class extends nn{constructor(e){super(tn.ClientError.RequestTimeout,null!=e?e:"Request Timeout")}};Xt.Conflict=class extends nn{constructor(e){super(tn.ClientError.Conflict,null!=e?e:"Conflict")}};Xt.Gone=class extends nn{constructor(e){super(tn.ClientError.Gone,null!=e?e:"Gone")}};Xt.LengthRequired=class extends nn{constructor(e){super(tn.ClientError.LengthRequired,null!=e?e:"Length Required")}};Xt.PreconditionFailed=class extends nn{constructor(e){super(tn.ClientError.PreconditionFailed,null!=e?e:"Precondition Failed")}};Xt.PayloadTooLarge=class extends nn{constructor(e){super(tn.ClientError.PayloadTooLarge,null!=e?e:"Payload Too Large")}};Xt.URITooLong=class extends nn{constructor(e){super(tn.ClientError.URITooLong,null!=e?e:"URI Too Long")}};Xt.UnsupportedMediaType=class extends nn{constructor(e){super(tn.ClientError.UnsupportedMediaType,null!=e?e:"Unsupported Media Type")}};Xt.RangeNotSatisfiable=class extends nn{constructor(e){super(tn.ClientError.RangeNotSatisfiable,null!=e?e:"Range Not Satisfiable")}};Xt.ExpectationFailed=class extends nn{constructor(e){super(tn.ClientError.ExpectationFailed,null!=e?e:"Expectation Failed")}};Xt.MisdirectedRequest=class extends nn{constructor(e){super(tn.ClientError.MisdirectedRequest,null!=e?e:"Misdirected Request")}};Xt.UnprocessableEntity=class extends nn{constructor(e){super(tn.ClientError.UnprocessableEntity,null!=e?e:"Unprocessable Entity")}};Xt.Locked=class extends nn{constructor(e){super(tn.ClientError.Locked,null!=e?e:"Locked")}};Xt.FailedDependency=class extends nn{constructor(e){super(tn.ClientError.FailedDependency,null!=e?e:"Failed Dependency")}};Xt.UpgradeRequired=class extends nn{constructor(e){super(tn.ClientError.UpgradeRequired,null!=e?e:"Upgrade Required")}};Xt.PreconditionRequired=class extends nn{constructor(e){super(tn.ClientError.PreconditionRequired,null!=e?e:"Precondition Required")}};Xt.TooManyRequests=class extends nn{constructor(e){super(tn.ClientError.TooManyRequests,null!=e?e:"Too Many Requests")}};Xt.RequestHeaderFieldsTooLarge=class extends nn{constructor(e){super(tn.ClientError.RequestHeaderFieldsTooLarge,null!=e?e:"Request Header Fields Too Large")}};Xt.UnavailableForLegalReasons=class extends nn{constructor(e){super(tn.ClientError.UnavailableForLegalReasons,null!=e?e:"Unavailable For Legal Reasons")}};var rn={};rn.NetworkAuthenticationRequired=rn.NotExtended=rn.LoopDetected=rn.InsufficientStorage=rn.VariantAlsoNegotiates=rn.HTTPVersionNotSupported=rn.GatewayTimeout=rn.ServiceUnavailable=rn.BadGateway=rn.NotImplemented=rn.InternalServerError=rn.HTTPServerError=void 0;const on=kt,sn=zt;class an extends on.HTTPError{}rn.HTTPServerError=an;rn.InternalServerError=class extends an{constructor(e){super(sn.ServerError.InternalServerError,null!=e?e:"Internal Server Error")}};rn.NotImplemented=class extends an{constructor(e){super(sn.ServerError.NotImplemented,null!=e?e:"Not Implemented")}};rn.BadGateway=class extends an{constructor(e){super(sn.ServerError.BadGateway,null!=e?e:"Bad Gateway")}};rn.ServiceUnavailable=class extends an{constructor(e){super(sn.ServerError.ServiceUnavailable,null!=e?e:"Service Unavailable")}};rn.GatewayTimeout=class extends an{constructor(e){super(sn.ServerError.GatewayTimeout,null!=e?e:"Gateway Timeout")}};rn.HTTPVersionNotSupported=class extends an{constructor(e){super(sn.ServerError.HTTPVersionNotSupported,null!=e?e:"HTTP Version Not Supported")}};rn.VariantAlsoNegotiates=class extends an{constructor(e){super(sn.ServerError.VariantAlsoNegotiates,null!=e?e:"Variant Also Negotiates")}};rn.InsufficientStorage=class extends an{constructor(e){super(sn.ServerError.InsufficientStorage,null!=e?e:"Insufficient Storage")}};rn.LoopDetected=class extends an{constructor(e){super(sn.ServerError.LoopDetected,null!=e?e:"Loop Detected")}};rn.NotExtended=class extends an{constructor(e){super(sn.ServerError.NotExtended,null!=e?e:"Not Extended")}};rn.NetworkAuthenticationRequired=class extends an{constructor(e){super(sn.ServerError.NetworkAuthenticationRequired,null!=e?e:"Network Authentication Required")}};var cn={};cn.fromCode=cn.UnknownHTTPStatusError=void 0;const un=Jt,ln=Vt,dn=Zt,fn=Xt,hn=rn;class pn extends Error{constructor(e){super(`The HTTP status code ${e} is unknown`),this.name=this.constructor.name}}cn.UnknownHTTPStatusError=pn,cn.fromCode=function(e,t){switch(e){case 100:return new un.Continue;case 101:return new un.SwitchingProtocol;case 102:return new un.Processing;case 103:return new un.EarlyHints;case 200:return new ln.OK;case 201:return new ln.Created;case 202:return new ln.Accepted;case 203:return new ln.NonAuthoritativeInformation;case 204:return new ln.NoContent;case 205:return new ln.ResetContent;case 206:return new ln.PartialContent;case 207:return new ln.MultiStatus;case 208:return new ln.AlreadyReported;case 226:return new ln.IMUsed;case 300:return new dn.MultipleChoice;case 301:return new dn.MovedPermanently;case 302:return new dn.Found;case 303:return new dn.SeeOther;case 304:return new dn.NotModified;case 307:return new dn.TemporaryRedirect;case 308:return new dn.PermanentRedirect;case 400:return new fn.BadRequest(t);case 401:return new fn.Unauthorized(t);case 403:return new fn.Forbidden(t);case 404:return new fn.NotFound(t);case 405:return new fn.MethodNotAllowed(t);case 406:return new fn.NotAcceptable(t);case 407:return new fn.ProxyAuthenticationRequired(t);case 408:return new fn.RequestTimeout(t);case 409:return new fn.Conflict(t);case 410:return new fn.Gone(t);case 411:return new fn.LengthRequired(t);case 412:return new fn.PreconditionFailed(t);case 413:return new fn.PayloadTooLarge(t);case 414:return new fn.URITooLong(t);case 415:return new fn.UnsupportedMediaType(t);case 416:return new fn.RangeNotSatisfiable(t);case 417:return new fn.ExpectationFailed(t);case 421:return new fn.MisdirectedRequest(t);case 422:return new fn.UnprocessableEntity(t);case 423:return new fn.Locked(t);case 424:return new fn.FailedDependency(t);case 426:return new fn.UpgradeRequired(t);case 428:return new fn.PreconditionRequired(t);case 429:return new fn.TooManyRequests(t);case 431:return new fn.RequestHeaderFieldsTooLarge(t);case 451:return new fn.UnavailableForLegalReasons(t);case 500:return new hn.InternalServerError(t);case 501:return new hn.NotImplemented(t);case 502:return new hn.BadGateway(t);case 503:return new hn.ServiceUnavailable(t);case 504:return new hn.GatewayTimeout(t);case 505:return new hn.HTTPVersionNotSupported(t);case 506:return new hn.VariantAlsoNegotiates(t);case 507:return new hn.InsufficientStorage(t);case 508:return new hn.LoopDetected(t);case 510:return new hn.NotExtended(t);case 511:return new hn.NetworkAuthenticationRequired(t);default:throw new pn(e)}},function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(_t,e),r(kt,e),r(Jt,e),r(Vt,e),r(Zt,e),r(Xt,e),r(rn,e),r(cn,e)}(Tt);var mn={},yn={};!function(e){e.ok=e.HTTPError=void 0;const t=Tt;var n=Tt;Object.defineProperty(e,"HTTPError",{enumerable:!0,get:function(){return n.HTTPError}}),e.ok=async function(e){if(!e.ok){const n=await e.text();throw(0,t.fromCode)(e.status,n)}return e}}(yn);var vn={};vn.toJSON=void 0,vn.toJSON=function(e){return e.json()};var gn={};gn.toText=void 0,gn.toText=async function(e,t){if(t){const n=await e.arrayBuffer();return new TextDecoder(t).decode(n)}return await e.text()};var bn={};bn.toLines=void 0,bn.toLines=async function*(e){const t=e.body.pipeThrough(new TextDecoderStream).getReader();let n="";for(;;){const{value:e,done:r}=await t.read();if(r)break;let o=e;for(;o.includes("\n");){const e=o.indexOf("\n");yield o.slice(0,e),o=o.slice(e+1)}n+=o}n&&(yield n)};var wn={},An={},En={},Sn={},Rn={},Tn={};Tn.go=void 0,Tn.go=function(e){return e()},function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]});(t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)})(Tn,e)}(Rn);var _n={},kn={CustomError:void 0};class Cn extends Error{get name(){return this.constructor.name}}kn.CustomError=Cn;var xn={ExpectedError:void 0};const On=kn;class Nn extends On.CustomError{}xn.ExpectedError=Nn;var Pn={AssertionError:void 0};const In=kn;class jn extends In.CustomError{}Pn.AssertionError=jn;var Un={};Un.normalize=void 0,Un.normalize=function(e){var t;return{name:e.name,message:e.message,stack:null!==(t=e.stack)&&void 0!==t?t:null}};var qn={refute:void 0};const Fn=xn;qn.refute=function(e,t){if(e)throw new Fn.ExpectedError(t)};var Ln={assert:void 0};const Bn=Pn;Ln.assert=function(e,t){if(!e)throw new Bn.AssertionError(t)},function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(kn,e),r(xn,e),r(Pn,e),r(Un,e),r(qn,e),r(Ln,e)}(_n),Sn.chunkAsync=void 0;const Dn=Rn,Mn=_n;Sn.chunkAsync=function(e,t){return(0,Mn.assert)(Number.isInteger(t),"The parameter size must be an integer"),(0,Mn.assert)(t>0,"The parameter size must be greater than 0"),(0,Dn.go)((async function*(){let n=[];for await(const r of e)n.push(r),n.length>=t&&(yield n,n=[]);n.length&&(yield n)}))};var Hn={},Jn={},zn={};function $n(e){return Array.isArray(e)}zn.isntEmptyArray=zn.isEmptyArray=zn.isntArray=zn.isArray=void 0,zn.isArray=$n,zn.isntArray=function(e){return!$n(e)},zn.isEmptyArray=function(e){return 0===e.length},zn.isntEmptyArray=function(e){return 0!==e.length};var Gn={},Vn={};function Kn(e){return null===e}Vn.isntNull=Vn.isNull=void 0,Vn.isNull=Kn,Vn.isntNull=function(e){return!Kn(e)};var Wn={};function Zn(e){return void 0===e}Wn.isntUndefined=Wn.isUndefined=void 0,Wn.isUndefined=Zn,Wn.isntUndefined=function(e){return!Zn(e)},Gn.isntAsyncIterable=Gn.isAsyncIterable=void 0;const Qn=Vn,Yn=Wn;function Xn(e){return(0,Qn.isntNull)(e)&&(0,Yn.isntUndefined)(e)&&"function"==typeof e[Symbol.asyncIterator]}Gn.isAsyncIterable=Xn,Gn.isntAsyncIterable=function(e){return!Xn(e)};var er={};function tr(e){return"bigint"==typeof e}er.isntBigInt=er.isBigInt=void 0,er.isBigInt=tr,er.isntBigInt=function(e){return!tr(e)};var nr={};function rr(e){return"boolean"==typeof e}nr.isntBoolean=nr.isBoolean=void 0,nr.isBoolean=rr,nr.isntBoolean=function(e){return!rr(e)};var or={},ir={};function sr(e){return"string"==typeof e}ir.isntString=ir.isString=void 0,ir.isString=sr,ir.isntString=function(e){return!sr(e)},or.isntChar=or.isChar=void 0;const ar=ir;function cr(e){return(0,ar.isString)(e)&&1===e.length}or.isChar=cr,or.isntChar=function(e){return!cr(e)};var ur={};function lr(e){return e instanceof Date}ur.isntDate=ur.isDate=void 0,ur.isDate=lr,ur.isntDate=function(e){return!lr(e)};var dr={};dr.inEnum=void 0,dr.inEnum=function(e,t){return Object.values(t).includes(e)};var fr={};function hr(e){return e instanceof Error}fr.isntError=fr.isError=void 0,fr.isError=hr,fr.isntError=function(e){return!hr(e)};var pr={};function mr(e){return!e}pr.isntFalsy=pr.isFalsy=void 0,pr.isFalsy=mr,pr.isntFalsy=function(e){return!mr(e)};var yr={};function vr(e){return"function"==typeof e}yr.isntFunction=yr.isFunction=void 0,yr.isFunction=vr,yr.isntFunction=function(e){return!vr(e)};var gr={};gr.isntIterable=gr.isIterable=void 0;const br=Vn,wr=Wn;function Ar(e){return(0,br.isntNull)(e)&&(0,wr.isntUndefined)(e)&&"function"==typeof e[Symbol.iterator]}gr.isIterable=Ar,gr.isntIterable=function(e){return!Ar(e)};var Er={},Sr={},Rr=t&&t.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Sr.isntEmptyObject=Sr.isEmptyObject=Sr.isntPlainObject=Sr.isPlainObject=Sr.isntObject=Sr.isObject=void 0;const Tr=Rr(oe);function _r(e){return null!==e&&"object"==typeof e}function kr(e){return(0,Tr.default)(e)}Sr.isObject=_r,Sr.isntObject=function(e){return!_r(e)},Sr.isPlainObject=kr,Sr.isntPlainObject=function(e){return!kr(e)},Sr.isEmptyObject=function(e){return 0===Object.keys(e).length},Sr.isntEmptyObject=function(e){return 0!==Object.keys(e).length};var Cr={};function xr(e){return"number"==typeof e}Cr.isntNumber=Cr.isNumber=void 0,Cr.isNumber=xr,Cr.isntNumber=function(e){return!xr(e)},Er.isntJsonRpcError=Er.isJsonRpcError=Er.isntJsonRpcSuccess=Er.isJsonRpcSuccess=Er.isntJsonRpcRequest=Er.isJsonRpcRequest=Er.isntJsonRpcNotification=Er.isJsonRpcNotification=void 0;const Or=zn,Nr=Sr,Pr=ir,Ir=Cr,jr=Wn;function Ur(e){return(0,Pr.isString)(e)||(0,Ir.isNumber)(e)}function qr(e){return(0,Or.isArray)(e)||(0,Nr.isObject)(e)}function Fr(e){return(0,Nr.isPlainObject)(e)&&(0,Pr.isString)(e.jsonrpc)&&(0,Pr.isString)(e.method)&&(0,jr.isUndefined)(e.id)&&qr(e.params)}function Lr(e){return(0,Nr.isPlainObject)(e)&&(0,Pr.isString)(e.jsonrpc)&&(0,Pr.isString)(e.method)&&Ur(e.id)&&qr(e.params)}function Br(e){return(0,Nr.isPlainObject)(e)&&(0,Pr.isString)(e.jsonrpc)&&(0,Pr.isString)(e.id)&&"result"in e}function Dr(e){return(0,Nr.isPlainObject)(e)&&(0,Pr.isString)(e.jsonrpc)&&Ur(e.id)&&function(e){return(0,Nr.isPlainObject)(e)&&(0,Ir.isNumber)(e.code)&&(0,Pr.isString)(e.message)&&((0,jr.isUndefined)(e.data)||(0,Nr.isObject)(e.data))}(e.error)}Er.isJsonRpcNotification=Fr,Er.isntJsonRpcNotification=function(e){return!Fr(e)},Er.isJsonRpcRequest=Lr,Er.isntJsonRpcRequest=function(e){return!Lr(e)},Er.isJsonRpcSuccess=Br,Er.isntJsonRpcSuccess=function(e){return!Br(e)},Er.isJsonRpcError=Dr,Er.isntJsonRpcError=function(e){return!Dr(e)};var Mr={};Mr.isntJson=Mr.isJson=void 0,Mr.isJson=function(e){try{return JSON.stringify(e),!0}catch(e){return!1}},Mr.isntJson=function e(t){return!e()};var Hr={};Hr.isAbsoluteURL=void 0,Hr.isAbsoluteURL=function(e){try{return new URL(e),!0}catch(e){return!1}},function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(zn,e),r(Gn,e),r(er,e),r(nr,e),r(or,e),r(ur,e),r(dr,e),r(fr,e),r(pr,e),r(yr,e),r(gr,e),r(Er,e),r(Mr,e),r(Vn,e),r(Cr,e),r(Sr,e),r(ir,e),r(Wn,e),r(Hr,e)}(Jn),Hn.chunkByAsync=void 0;const Jr=Jn;Hn.chunkByAsync=function(e,t){return(0,Jr.isAsyncIterable)(e)?async function*(e){let n=[],r=0;for await(const o of e)n.push(o),await t(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(e):async function*(e){let n=[],r=0;for(const o of e)n.push(o),await t(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(e)};var zr={};zr.chunkBy=void 0,zr.chunkBy=function*(e,t){let n=[],r=0;for(const o of e)n.push(o),t(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)};var $r={chunk:void 0};const Gr=Rn,Vr=_n;$r.chunk=function(e,t){return(0,Vr.assert)(Number.isInteger(t),"The parameter size must be an integer"),(0,Vr.assert)(t>0,"The parameter size must be greater than 0"),(0,Gr.go)((function*(){let n=[];for(const r of e)n.push(r),n.length>=t&&(yield n,n=[]);n.length&&(yield n)}))};var Kr={concatAsync:void 0};const Wr=Jn,Zr=Rn;Kr.concatAsync=function(e,...t){return(0,Zr.go)((async function*(){for(const n of[e,...t])if((0,Wr.isAsyncIterable)(n))for await(const e of n)yield e;else for(const e of n)yield e}))};var Qr={concat:void 0};const Yr=Rn;Qr.concat=function(e,...t){return(0,Yr.go)((function*(){for(const n of[e,...t])yield*n}))};var Xr={},eo={};eo.copyIterable=eo.copyAsyncIterable=void 0,eo.copyAsyncIterable=async function*(e){for await(const t of e)yield t},eo.copyIterable=function*(e){for(const t of e)yield t},Xr.dropAsync=void 0;const to=Rn,no=eo,ro=_n;Xr.dropAsync=function(e,t){return(0,ro.assert)(Number.isInteger(t),"The parameter count must be an integer"),(0,ro.assert)(t>=0,"The parameter count must be greater than or equal to 0"),0===t?(0,no.copyAsyncIterable)(e):(0,to.go)((async function*(){var n;const r=e[Symbol.asyncIterator]();let o;try{let e;for(;!(({value:e,done:o}=await r.next()),o||t<=0);)t--;for(;!o;)yield e,({value:e,done:o}=await r.next())}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var oo={dropRightAsync:void 0};const io=Rn,so=eo,ao=_n;oo.dropRightAsync=function(e,t){return(0,ao.assert)(Number.isInteger(t),"The parameter count must be an integer"),(0,ao.assert)(t>=0,"The parameter count must be greater than or equal to 0"),0===t?(0,so.copyAsyncIterable)(e):(0,io.go)((async function*(){const n=(await async function(e){const t=[];for await(const n of e)t.push(n);return t}(e)).slice(0,-t);for(const e of n)yield e}))};var co={dropRight:void 0};const uo=Rn,lo=eo,fo=_n;co.dropRight=function(e,t){return(0,fo.assert)(Number.isInteger(t),"The parameter count must be an integer"),(0,fo.assert)(t>=0,"The parameter count must be greater than or equal to 0"),0===t?(0,lo.copyIterable)(e):(0,uo.go)((function*(){const n=Array.from(e);yield*n.slice(0,-t)}))};var ho={dropUntilAsync:void 0};const po=Jn;ho.dropUntilAsync=function(e,t){return(0,po.isAsyncIterable)(e)?async function*(e){var n;const r=e[Symbol.asyncIterator]();let o;try{let e,i=0;for(;!(({value:e,done:o}=await r.next()),o||await t(e,i++)););for(;!o;)yield e,({value:e,done:o}=await r.next())}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}(e):async function*(e){var n;const r=e[Symbol.iterator]();let o;try{let e,i=0;for(;!(({value:e,done:o}=r.next()),o||await t(e,i++)););for(;!o;)yield e,({value:e,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}(e)};var mo={};mo.dropUntil=void 0,mo.dropUntil=function*(e,t){var n;const r=e[Symbol.iterator]();let o;try{let e,i=0;for(;!(({value:e,done:o}=r.next()),o||t(e,i++)););for(;!o;)yield e,({value:e,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}};var yo={drop:void 0};const vo=Rn,go=eo,bo=_n;yo.drop=function(e,t){return(0,bo.assert)(Number.isInteger(t),"The parameter count must be an integer"),(0,bo.assert)(t>=0,"The parameter count must be greater than or equal to 0"),0===t?(0,go.copyIterable)(e):(0,vo.go)((function*(){var n;const r=e[Symbol.iterator]();let o;try{let e;for(;!(({value:e,done:o}=r.next()),o||t<=0);)t--;for(;!o;)yield e,({value:e,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}))};var wo={filterAsync:void 0};const Ao=Jn;wo.filterAsync=function(e,t){return(0,Ao.isAsyncIterable)(e)?async function*(e){let n=0;for await(const r of e)await t(r,n)&&(yield r),n++}(e):async function*(e){let n=0;for(const r of e)await t(r,n)&&(yield r),n++}(e)};var Eo={};Eo.filter=void 0,Eo.filter=function*(e,t){let n=0;for(const r of e)t(r,n)&&(yield r),n++};var So={},Ro={},To={flattenByAsync:void 0};const _o=Jn;function ko(e){return(0,_o.isIterable)(e)&&(0,_o.isntChar)(e)}To.flattenByAsync=function(e,t){return(0,_o.isAsyncIterable)(e)?async function*(e){const r=1;for await(const o of e)ko(o)&&await t(o,r)?yield*n(o,r+1):yield o}(e):function(e){return n(e,1)}(e);async function*n(e,r){for(const o of e)ko(o)&&await t(o,r)?yield*n(o,r+1):yield o}},Ro.flattenDeepAsync=void 0;const Co=To,xo=_n;Ro.flattenDeepAsync=function(e,t=1/0){return(0,xo.assert)(t===1/0||Number.isInteger(t),"The parameter depth must be an integer"),(0,xo.assert)(t>=0,"The parameter depth must be greater than or equal to 0"),(0,Co.flattenByAsync)(e,((e,n)=>n<=t))},So.flattenAsync=void 0;const Oo=Ro;So.flattenAsync=function(e){return(0,Oo.flattenDeepAsync)(e,1)};var No={flattenBy:void 0};const Po=Jn;No.flattenBy=function(e,t){return function*e(n,r){for(const i of n)o=i,(0,Po.isIterable)(o)&&(0,Po.isntChar)(o)&&t(i,r)?yield*e(i,r+1):yield i;var o}(e,1)};var Io={flattenDeep:void 0};const jo=No,Uo=_n;Io.flattenDeep=function(e,t=1/0){return(0,Uo.assert)(t===1/0||Number.isInteger(t),"The parameter depth must be an integer"),(0,Uo.assert)(t>=0,"The parameter depth must be greater than or equal to 0"),(0,jo.flattenBy)(e,((e,n)=>n<=t))};var qo={flatten:void 0};const Fo=Io;qo.flatten=function(e){return(0,Fo.flattenDeep)(e,1)};var Lo={mapAsync:void 0};const Bo=Jn;Lo.mapAsync=function(e,t){return(0,Bo.isAsyncIterable)(e)?async function*(e){let n=0;for await(const r of e)yield await t(r,n),n++}(e):async function*(e){let n=0;for(const r of e)yield await t(r,n),n++}(e)};var Do={};Do.map=void 0,Do.map=function*(e,t){let n=0;for(const r of e)yield t(r,n),n++};var Mo={repeatAsync:void 0};const Ho=Rn,Jo=_n;Mo.repeatAsync=function(e,t){return(0,Jo.assert)(t===1/0||Number.isInteger(t),"The parameter times must be an integer"),(0,Jo.assert)(t>=0,"The parameter times must be greater than or equal to 0"),t===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,Ho.go)((async function*(){const n=[];if(t>0){for await(const t of e)yield t,n.push(t);t--}for(;t>0;)yield*n,t--}))};var zo={repeat:void 0};const $o=Rn,Go=_n;zo.repeat=function(e,t){return(0,Go.assert)(t===1/0||Number.isInteger(t),"The parameter times must be an integer"),(0,Go.assert)(t>=0,"The parameter times must be greater than or equal to 0"),t===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,$o.go)((function*(){const n=[];if(t>0){for(const t of e)yield t,n.push(t);t--}for(;t>0;)yield*n,t--}))};var Vo={sliceAsync:void 0};const Ko=Rn,Wo=_n;Vo.sliceAsync=function(e,t,n=1/0){return(0,Wo.assert)(Number.isInteger(t),"The parameter start must be an integer"),(0,Wo.assert)(t>=0,"The parameter start must be greater than or equal to 0"),(0,Wo.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Wo.assert)(n>=t,"The parameter end must be greater than or equal to start"),(0,Ko.go)((async function*(){let r=0;for await(const o of e){if(r>=n)break;r>=t&&(yield o),r++}}))};var Zo={slice:void 0};const Qo=Rn,Yo=_n;Zo.slice=function(e,t,n=1/0){return(0,Yo.assert)(Number.isInteger(t),"The parameter start must be an integer"),(0,Yo.assert)(t>=0,"The parameter start must be greater than or equal to 0"),(0,Yo.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Yo.assert)(n>=t,"The parameter end must be greater than or equal to start"),(0,Qo.go)((function*(){let r=0;for(const o of e){if(r>=n)break;r>=t&&(yield o),r++}}))};var Xo={};Xo.splitAsync=void 0,Xo.splitAsync=async function*(e,t){let n=[];for await(const r of e)r===t?(yield n,n=[]):n.push(r);yield n};var ei={splitByAsync:void 0};const ti=Jn;ei.splitByAsync=function(e,t){return(0,ti.isAsyncIterable)(e)?async function*(e){let n=[],r=0;for await(const o of e)await t(o,r)?(yield n,n=[]):n.push(o),r++;yield n}(e):async function*(e){let n=[],r=0;for(const o of e)await t(o,r)?(yield n,n=[]):n.push(o),r++;yield n}(e)};var ni={};ni.splitBy=void 0,ni.splitBy=function*(e,t){let n=[],r=0;for(const o of e)t(o,r)?(yield n,n=[]):n.push(o),r++;yield n};var ri={};ri.split=void 0,ri.split=function*(e,t){let n=[];for(const r of e)r===t?(yield n,n=[]):n.push(r);yield n};var oi={takeAsync:void 0};const ii=Rn,si=_n;oi.takeAsync=function(e,t){return(0,si.assert)(Number.isInteger(t),"The parameter count must be an integer"),(0,si.assert)(t>=0,"The parameter count must be greater than or equal to 0"),(0,ii.go)((async function*(){if(0!==t)for await(const n of e)if(yield n,0===--t)break}))};var ai={takeRightAsync:void 0};const ci=Rn,ui=_n;ai.takeRightAsync=function(e,t){return(0,ui.assert)(Number.isInteger(t),"The parameter count must be an integer"),(0,ui.assert)(t>=0,"The parameter count must be greater than or equal to 0"),(0,ci.go)((async function*(){var n;const r=e[Symbol.asyncIterator]();let o;try{const e=[];let i;for(;({value:i,done:o}=await r.next()),!o;)e.push(i),e.length>t&&e.shift();yield*e}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var li={takeRight:void 0};const di=Rn,fi=_n;li.takeRight=function(e,t){return(0,fi.assert)(Number.isInteger(t),"The parameter count must be an integer"),(0,fi.assert)(t>=0,"The parameter count must be greater than or equal to 0"),(0,di.go)((function*(){var n;const r=e[Symbol.iterator]();let o;try{const e=[];let i;for(;({value:i,done:o}=r.next()),!o;)e.push(i),e.length>t&&e.shift();yield*e}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}))};var hi={takeUntilAsync:void 0};const pi=Jn;hi.takeUntilAsync=function(e,t){return(0,pi.isAsyncIterable)(e)?async function*(e){let n=0;for await(const r of e){if(await t(r,n))break;yield r,n++}}(e):async function*(e){let n=0;for(const r of e){if(await t(r,n))break;yield r,n++}}(e)};var mi={};mi.takeUntil=void 0,mi.takeUntil=function*(e,t){let n=0;for(const r of e){if(t(r,n))break;yield r,n++}};var yi={take:void 0};const vi=Rn,gi=_n;yi.take=function(e,t){return(0,gi.assert)(Number.isInteger(t),"The parameter count must be an integer"),(0,gi.assert)(t>=0,"The parameter count must be greater than or equal to 0"),(0,vi.go)((function*(){if(0!==t)for(const n of e)if(yield n,0===--t)break}))};var bi={tapAsync:void 0};const wi=Jn;bi.tapAsync=function(e,t){return(0,wi.isAsyncIterable)(e)?async function*(e){let n=0;for await(const r of e)await t(r,n),yield r,n++}(e):async function*(e){let n=0;for(const r of e)await t(r,n),yield r,n++}(e)};var Ai={};Ai.tap=void 0,Ai.tap=function*(e,t){let n=0;for(const r of e)t(r,n),yield r,n++};var Ei={};Ei.toAsyncIterable=void 0,Ei.toAsyncIterable=async function*(e){for(const t of e)yield t};var Si={};Si.transformAsync=void 0,Si.transformAsync=async function*(e,t){yield*t(e)};var Ri={};Ri.transform=void 0,Ri.transform=function*(e,t){yield*t(e)};var Ti={};Ti.uniqAsync=void 0,Ti.uniqAsync=async function*(e){const t=new Set;for await(const n of e)t.has(n)||(yield n,t.add(n))};var _i={uniqByAsync:void 0};const ki=Jn;_i.uniqByAsync=function(e,t){return(0,ki.isAsyncIterable)(e)?async function*(e){const n=new Set;let r=0;for await(const o of e){const e=await t(o,r);n.has(e)||(yield o,n.add(e)),r++}}(e):async function*(e){const n=new Set;let r=0;for(const o of e){const e=await t(o,r);n.has(e)||(yield o,n.add(e)),r++}}(e)};var Ci={};Ci.uniqBy=void 0,Ci.uniqBy=function*(e,t){const n=new Set;let r=0;for(const o of e){const e=t(o,r);n.has(e)||(yield o,n.add(e)),r++}};var xi={};xi.uniq=void 0,xi.uniq=function*(e){const t=new Set;for(const n of e)t.has(n)||(yield n,t.add(n))};var Oi={zipAsync:void 0};const Ni=Jn;var Pi;!function(e){e[e.Sync=0]="Sync",e[e.Async=1]="Async"}(Pi||(Pi={})),Oi.zipAsync=function(e,...t){return async function*(...e){var t,n,r,o;const i=e.length,s=e.map((e=>(0,Ni.isAsyncIterable)(e)?[Pi.Async,e[Symbol.asyncIterator]()]:[Pi.Sync,e[Symbol.iterator]()])),a=s.map((()=>!1));try{for(;;){const e=new Array(i);for(let t=0;t<i;t++){const[n,r]=s[t];let o;if(o=n===Pi.Async?await r.next():r.next(),o.done)return void(a[t]=!0);e[t]=o.value}yield e}}finally{const e=s.filter(((e,t)=>!a[t]));for(const[i,s]of e)i===Pi.Async?await(null===(n=(t=s).return)||void 0===n?void 0:n.call(t)):null===(o=(r=s).return)||void 0===o||o.call(r)}}(e,...t)};var Ii={};Ii.zip=void 0,Ii.zip=function(e,...t){return function*(...e){const t=e.length,n=e.map((e=>e[Symbol.iterator]())),r=n.map((()=>!1));try{for(;;){const e=new Array(t);for(let o=0;o<t;o++){const{value:t,done:i}=n[o].next();if(i)return void(r[o]=!0);e[o]=t}yield e}}finally{n.filter(((e,t)=>!r[t])).forEach((e=>{var t;return null===(t=e.return)||void 0===t?void 0:t.call(e)}))}}(e,...t)},function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(Sn,e),r(Hn,e),r(zr,e),r($r,e),r(Kr,e),r(Qr,e),r(Xr,e),r(oo,e),r(co,e),r(ho,e),r(mo,e),r(yo,e),r(wo,e),r(Eo,e),r(So,e),r(To,e),r(No,e),r(Ro,e),r(Io,e),r(qo,e),r(Lo,e),r(Do,e),r(Mo,e),r(zo,e),r(Vo,e),r(Zo,e),r(Xo,e),r(ei,e),r(ni,e),r(ri,e),r(oi,e),r(ai,e),r(li,e),r(hi,e),r(mi,e),r(yi,e),r(bi,e),r(Ai,e),r(Ei,e),r(Si,e),r(Ri,e),r(Ti,e),r(_i,e),r(Ci,e),r(xi,e),r(Oi,e),r(Ii,e)}(En);var ji={},Ui={};Ui.consume=void 0,Ui.consume=function(e,t){return t(e)};var qi={eachAsync:void 0};const Fi=Jn;qi.eachAsync=function(e,t){return(0,Fi.isAsyncIterable)(e)?async function(e){let n=0;for await(const r of e)await t(r,n),n++}(e):async function(e){let n=0;for(const r of e)await t(r,n),n++}(e)};var Li={};Li.each=void 0,Li.each=function(e,t){let n=0;for(const r of e)t(r,n),n++};var Bi={everyAsync:void 0};const Di=Jn;Bi.everyAsync=function(e,t){return(0,Di.isAsyncIterable)(e)?async function(e){let n=0;for await(const r of e){if(!await t(r,n))return!1;n++}return!0}(e):async function(e){let n=0;for(const r of e){if(!await t(r,n))return!1;n++}return!0}(e)};var Mi={};Mi.every=void 0,Mi.every=function(e,t){let n=0;for(const r of e){if(!t(r,n))return!1;n++}return!0};var Hi={findAsync:void 0};const Ji=Jn;Hi.findAsync=function(e,t){return(0,Ji.isAsyncIterable)(e)?async function(e){let n=0;for await(const r of e){if(await t(r,n))return r;n++}return}(e):async function(e){let n=0;for(const r of e){if(await t(r,n))return r;n++}return}(e)};var zi={};zi.find=void 0,zi.find=function(e,t){let n=0;for(const r of e){if(t(r,n))return r;n++}};var $i={};$i.firstAsync=void 0,$i.firstAsync=async function(e){for await(const t of e)return t};var Gi={};Gi.first=void 0,Gi.first=function(e){for(const t of e)return t};var Vi={};Vi.includesAsync=void 0,Vi.includesAsync=async function(e,t){for await(const n of e)if(n===t)return!0;return!1};var Ki={};Ki.includes=void 0,Ki.includes=function(e,t){for(const n of e)if(n===t)return!0;return!1};var Wi={};Wi.matchAsync=void 0,Wi.matchAsync=async function(e,t){const n=t.length;let r=0;for await(const o of e)if(o===t[r]&&r++,r===n)return!0;return!1};var Zi={};Zi.match=void 0,Zi.match=function(e,t){const n=t.length;let r=0;for(const o of e)if(o===t[r]&&r++,r===n)return!0;return!1};var Qi={reduceAsync:void 0};const Yi=Jn;Qi.reduceAsync=function(e,t,n){return(0,Yi.isUndefined)(n)?function(e,t){return(0,Yi.isAsyncIterable)(e)?n(e):r(e);async function n(e){var n;const r=e[Symbol.asyncIterator]();let o;try{let e,s=await i(r),a=1;for(;({value:e,done:o}=await r.next()),!o;)s=await t(s,e,a++);return s}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}async function i(e){const t=await e.next();if(t.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return t.value}}async function r(e){var n;const r=e[Symbol.iterator]();let o;try{let e,s=i(r),a=1;for(;({value:e,done:o}=r.next()),!o;)s=await t(s,e,a++);return s}finally{o||null===(n=r.return)||void 0===n||n.call(r)}function i(e){const t=e.next();if(t.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return t.value}}}(e,t):function(e,t,n){return(0,Yi.isAsyncIterable)(e)?o(e):r(e);async function r(e){let r=n,o=0;for(const n of e)r=await t(r,n,o++);return r}async function o(e){let r=n,o=0;for await(const n of e)r=await t(r,n,o++);return r}}(e,t,n)};var Xi={reduce:void 0};const es=Jn;Xi.reduce=function(e,t,n){return(0,es.isUndefined)(n)?function(e,t){var n;const r=e[Symbol.iterator]();let o;try{let e,s=i(r),a=1;for(;({value:e,done:o}=r.next()),!o;)s=t(s,e,a++);return s}finally{o||null===(n=r.return)||void 0===n||n.call(r)}function i(e){const t=e.next();if(t.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return t.value}}(e,t):function(e,t,n){let r=n,o=0;for(const n of e)r=t(r,n,o++);return r}(e,t,n)};var ts={someAsync:void 0};const ns=Jn;ts.someAsync=function(e,t){return(0,ns.isAsyncIterable)(e)?async function(e){let n=0;for await(const r of e){if(await t(r,n))return!0;n++}return!1}(e):async function(e){let n=0;for(const r of e){if(await t(r,n))return!0;n++}return!1}(e)};var rs={};rs.some=void 0,rs.some=function(e,t){let n=0;for(const r of e){if(t(r,n))return!0;n++}return!1};var os={};os.lastAsync=void 0,os.lastAsync=async function(e){var t;const n=e[Symbol.asyncIterator]();let r;try{let e,o;for(;({value:e,done:r}=await n.next()),!r;)o=e;return o}finally{r||await(null===(t=n.return)||void 0===t?void 0:t.call(n))}};var is={};is.last=void 0,is.last=function(e){var t;const n=e[Symbol.iterator]();let r;try{let e,o;for(;({value:e,done:r}=n.next()),!r;)o=e;return o}finally{r||null===(t=n.return)||void 0===t||t.call(n)}};var ss={toArrayAsync:void 0};const as=Ui;ss.toArrayAsync=function(e){return(0,as.consume)(e,(async e=>{const t=[];for await(const n of e)t.push(n);return t}))};var cs={toArray:void 0};const us=Ui;cs.toArray=function(e){return(0,us.consume)(e,(e=>Array.from(e)))};var ls={toSetAsync:void 0};const ds=Ui;ls.toSetAsync=function(e){return(0,ds.consume)(e,(async e=>{const t=new Set;for await(const n of e)t.add(n);return t}))};var fs={toSet:void 0};const hs=Ui;fs.toSet=function(e){return(0,hs.consume)(e,(e=>new Set(e)))},function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(Ui,e),r(qi,e),r(Li,e),r(Bi,e),r(Mi,e),r(Hi,e),r(zi,e),r($i,e),r(Gi,e),r(Vi,e),r(Ki,e),r(Wi,e),r(Zi,e),r(Qi,e),r(Xi,e),r(ts,e),r(rs,e),r(os,e),r(is,e),r(ss,e),r(cs,e),r(ls,e),r(fs,e)}(ji),function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(En,e),r(ji,e)}(An),wn.toNDJSON=void 0;const ps=An,ms=bn;wn.toNDJSON=function(e){return(0,ps.mapAsync)((0,ms.toLines)(e),(e=>JSON.parse(e)))};var ys={toCSV:void 0};const vs=je.exports;ys.toCSV=async function(e){const t=await e.text();return(0,vs.parse)(t,{header:!0,skipEmptyLines:"greedy"}).data},function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(yn,e),r(vn,e),r(gn,e),r(bn,e),r(wn,e),r(ys,e)}(mn);var gs={},bs={},ws={exports:{}};const{AbortController:As,AbortSignal:Es}="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;ws.exports=As,ws.exports.AbortSignal=Es,ws.exports.default=As;var Ss,Rs=t&&t.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};bs.AbortController=void 0;const Ts=Rs(ws.exports);bs.AbortController=null!==(Ss=globalThis.AbortController)&&void 0!==Ss?Ss:Ts.default;var _s={},ks={},Cs={},xs={},Os={};Os.traverseErrorPrototypeChain=void 0,Os.traverseErrorPrototypeChain=function*(e){let t=e;for(;(t=Object.getPrototypeOf(t))&&(yield t,t!==Error.prototype););},xs.getErrorNames=void 0;const Ns=Jn,Ps=Os;xs.getErrorNames=function*(e){var t;if((0,Ns.isError)(e))for(const n of(0,Ps.traverseErrorPrototypeChain)(e))(null===(t=n.constructor)||void 0===t?void 0:t.name)&&(yield n.constructor.name);else yield e.name,yield*e.ancestors};var Is={isSerializableError:void 0};const js=Jn;Is.isSerializableError=function(e){return(0,js.isObject)(e)&&(0,js.isString)(e.name)&&(0,js.isString)(e.message)&&((0,js.isString)(e.stack)||(0,js.isNull)(e.stack))&&(0,js.isArray)(e.ancestors)&&e.ancestors.every(js.isString)},Cs.CustomError=void 0;const Us=An,qs=xs,Fs=Jn,Ls=Is;class Bs extends Error{get name(){var e,t;return null!==(t=null!==(e=(0,Us.first)((0,qs.getErrorNames)(this)))&&void 0!==e?e:Bs.name)&&void 0!==t?t:"CustomError"}static[Symbol.hasInstance](e){var t;if((0,Fs.isError)(e)||(0,Ls.isSerializableError)(e)){const n=[null!==(t=this.prototype.constructor.name)&&void 0!==t?t:this.name,...(0,qs.getErrorNames)(this.prototype)].reverse(),r=(0,Us.toArray)((0,qs.getErrorNames)(e)).reverse();return n.every(((e,t)=>e===r[t]))}return!1}}Cs.CustomError=Bs;var Ds={AssertionError:void 0};const Ms=Cs;class Hs extends Ms.CustomError{}Ds.AssertionError=Hs;var Js={normalize:void 0};const zs=xs,$s=An;Js.normalize=function(e){var t;const[n,...r]=(0,$s.toArray)((0,zs.getErrorNames)(e));return{name:n,ancestors:r,message:e.message,stack:null!==(t=e.stack)&&void 0!==t?t:null}};var Gs={assert:void 0};const Vs=Ds;Gs.assert=function(e,t){if(!e)throw new Vs.AssertionError(t)},function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(Cs,e),r(Ds,e),r(Is,e),r(Js,e),r(Gs,e),r(xs,e),r(Os,e)}(ks),_s.AbortError=void 0;const Ks=ks,Ws=Jn,Zs=An;class Qs extends Ks.CustomError{static[Symbol.hasInstance](e){return(0,Ws.isError)(e)?(0,Zs.some)((0,Ks.getErrorNames)(e),(e=>"AbortError"===e)):super[Symbol.hasInstance](e)}}_s.AbortError=Qs;var Ys,Xs={};Xs.AbortSignal=void 0;const ea=ws.exports;Xs.AbortSignal=null!==(Ys=globalThis.AbortSignal)&&void 0!==Ys?Ys:ea.AbortSignal;var ta={raceAbortSignals:void 0};const na=bs;ta.raceAbortSignals=function(e){const t=new na.AbortController,n=[];for(const o of e)if(o){if(o.aborted){t.abort();break}o.addEventListener("abort",r),n.push(o)}return t.signal;function r(){t.abort(),n.forEach((e=>e.removeEventListener("abort",r)))}};var ra={timeoutSignal:void 0};const oa=bs;ra.timeoutSignal=function(e){const t=new oa.AbortController;return setTimeout((()=>t.abort()),e),t.signal};var ia={withAbortSignal:void 0};const sa=_s;ia.withAbortSignal=async function(e,t){return new Promise((async(n,r)=>{if(e.aborted)return o();e.addEventListener("abort",o);try{n(await t())}catch(e){r(e)}finally{e.removeEventListener("abort",o)}function o(){r(new sa.AbortError)}}))},function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(bs,e),r(_s,e),r(Xs,e),r(ta,e),r(ra,e),r(ia,e)}(gs);const aa="0.1.0";class ca{constructor(e){this.options=e}getCommonTransformers(e){var t,n;return[ke.url(this.options.server),ke.bearerAuth(this.options.adminPassword),ke.signal(gs.raceAbortSignals([e.signal,!1!==e.timeout&&(null!==(t=e.timeout&&gs.timeoutSignal(e.timeout))&&void 0!==t?t:this.options.timeout&&gs.timeoutSignal(this.options.timeout))])),ke.keepalive(null!==(n=e.keepalive)&&void 0!==n?n:this.options.keepalive),ke.header("Accept-Version",aa)]}}class ua extends ca{async getNamespaces(e={}){const t=h.get(...this.getCommonTransformers(e),ke.pathname("/admin/estore-with-json-schema"));return await r.fetch(t).then(mn.ok).then(mn.toJSON)}async get(e,t={}){const n=h.get(...this.getCommonTransformers(t),ke.pathname(`/admin/estore/${e}/json-schema`));return await r.fetch(n).then(mn.ok).then(mn.toJSON)}async set(e,t,n={}){const o=h.put(...this.getCommonTransformers(n),ke.pathname(`/admin/estore/${e}/json-schema`),ke.json(t));await r.fetch(o).then(mn.ok)}async remove(e,t={}){const n=h.del(...this.getCommonTransformers(t),ke.pathname(`/admin/estore/${e}/json-schema`));await r.fetch(n).then(mn.ok)}}class la extends ca{async getNamespaces(e={}){const t=h.get(...this.getCommonTransformers(e),ke.pathname("/admin/blacklist"));return await r.fetch(t).then(mn.ok).then(mn.toJSON)}async add(e,t={}){const n=h.put(...this.getCommonTransformers(t),ke.pathname(`/admin/blacklist/${e}`));await r.fetch(n).then(mn.ok)}async remove(e,t={}){const n=h.del(...this.getCommonTransformers(t),ke.pathname(`/admin/blacklist/${e}`));await r.fetch(n).then(mn.ok)}}class da extends ca{async getNamespaces(e={}){const t=h.get(...this.getCommonTransformers(e),ke.pathname("/admin/whitelist"));return await r.fetch(t).then(mn.ok).then(mn.toJSON)}async add(e,t={}){const n=h.put(...this.getCommonTransformers(t),ke.pathname(`/admin/whitelist/${e}`));await r.fetch(n).then(mn.ok)}async remove(e,t={}){const n=h.del(...this.getCommonTransformers(t),ke.pathname(`/admin/whitelist/${e}`));await r.fetch(n).then(mn.ok)}}class fa extends ca{async getNamespaces(e={}){const t=h.get(...this.getCommonTransformers(e),ke.pathname("/admin/estore-with-token-policies"));return await r.fetch(t).then(mn.ok).then(mn.toJSON)}async get(e,t={}){const n=h.get(...this.getCommonTransformers(t),ke.pathname(`/admin/estore/${e}/token-policies`));return await r.fetch(n).then(mn.ok).then(mn.toJSON)}async setWriteTokenRequired(e,t,n={}){const o=h.put(...this.getCommonTransformers(n),ke.pathname(`/admin/estore/${e}/token-policies/write-token-required`),ke.json(t));await r.fetch(o).then(mn.ok)}async removeWriteTokenRequired(e,t={}){const n=h.del(...this.getCommonTransformers(t),ke.pathname(`/admin/estore/${e}/token-policies/write-token-required`));await r.fetch(n).then(mn.ok)}async setReadTokenRequired(e,t,n={}){const o=h.put(...this.getCommonTransformers(n),ke.pathname(`/admin/estore/${e}/token-policies/read-token-required`),ke.json(t));await r.fetch(o).then(mn.ok)}async removeReadTokenRequired(e,t={}){const n=h.del(...this.getCommonTransformers(t),ke.pathname(`/admin/estore/${e}/token-policies/read-token-required`));await r.fetch(n).then(mn.ok)}async setDeleteTokenRequired(e,t,n={}){const o=h.put(...this.getCommonTransformers(n),ke.pathname(`/admin/estore/${e}/token-policies/delete-token-required`),ke.json(t));await r.fetch(o).then(mn.ok)}async removeDeleteTokenRequired(e,t={}){const n=h.del(...this.getCommonTransformers(t),ke.pathname(`/admin/estore/${e}/token-policies/delete-token-required`));await r.fetch(n).then(mn.ok)}}class ha extends ca{async getNamespaces(e={}){const t=h.get(...this.getCommonTransformers(e),ke.pathname("/admin/estore-with-tokens"));return await r.fetch(t).then(mn.ok).then(mn.toJSON)}async getTokens(e,t={}){const n=h.get(...this.getCommonTransformers(t),ke.pathname(`/admin/estore/${e}/tokens`));return await r.fetch(n).then(mn.ok).then(mn.toJSON)}async addWriteToken(e,t,n={}){const o=h.put(...this.getCommonTransformers(n),ke.pathname(`/admin/estore/${e}/tokens/${t}/write`));await r.fetch(o).then(mn.ok)}async removeWriteToken(e,t,n={}){const o=h.del(...this.getCommonTransformers(n),ke.pathname(`/admin/estore/${e}/tokens/${t}/write`));await r.fetch(o).then(mn.ok)}async addReadToken(e,t,n={}){const o=h.put(...this.getCommonTransformers(n),ke.pathname(`/admin/estore/${e}/tokens/${t}/read`));await r.fetch(o).then(mn.ok)}async removeReadToken(e,t,n={}){const o=h.del(...this.getCommonTransformers(n),ke.pathname(`/admin/estore/${e}/tokens/${t}/read`));await r.fetch(o).then(mn.ok)}async addDeleteToken(e,t,n={}){const o=h.put(...this.getCommonTransformers(n),ke.pathname(`/admin/estore/${e}/tokens/${t}/delete`));await r.fetch(o).then(mn.ok)}async removeDeleteToken(e,t,n={}){const o=h.del(...this.getCommonTransformers(n),ke.pathname(`/admin/estore/${e}/tokens/${t}/delete`));await r.fetch(o).then(mn.ok)}}e.AbortError=r.AbortError,e.EStoreClient=class{constructor(e){this.options=e}getCommonTransformers(e){var t,n,r;const o="token"in e&&null!==(t=e.token)&&void 0!==t?t:this.options.token,i=this.options.basicAuth;return[ke.url(this.options.server),i&&ke.basicAuth(i.username,i.password),o&&ke.searchParams({token:o}),ke.signal(gs.raceAbortSignals([e.signal,!1!==e.timeout&&(null!==(n=e.timeout&&gs.timeoutSignal(e.timeout))&&void 0!==n?n:this.options.timeout&&gs.timeoutSignal(this.options.timeout))])),ke.keepalive(null!==(r=e.keepalive)&&void 0!==r?r:this.options.keepalive),ke.header("Accept-Version",aa)]}async append(e,t,n,o,i={}){const s=h.post(...this.getCommonTransformers(i),ke.pathname(`/estore/${e}/items/${t}/events`),Jn.isntUndefined(o)&&ke.header("If-Match",`${o}`),ke.json(n));await r.fetch(s).then(mn.ok)}async getEvent(e,t,n,o={}){const i=h.get(...this.getCommonTransformers(o),ke.pathname(`/estore/${e}/items/${t}/events/${n}`));try{return await r.fetch(i).then(mn.ok).then(mn.toJSON)}catch(e){if(e instanceof Tt.NotFound)return;throw e}}async getEvents(e,t,n={}){const o=h.get(...this.getCommonTransformers(n),ke.pathname(`/estore/${e}/items/${t}/events`));try{return await r.fetch(o).then(mn.ok).then(mn.toJSON)}catch(e){if(e instanceof Tt.NotFound)return;throw e}}async getSize(e,t,n={}){const o=h.get(...this.getCommonTransformers(n),ke.pathname(`/estore/${e}/items/${t}/size`));return await r.fetch(o).then(mn.ok).then(mn.toJSON)}async has(e,t,n={}){const o=h.head(...this.getCommonTransformers(n),ke.pathname(`/estore/${e}/items/${t}`));try{return await r.fetch(o).then(mn.ok),!0}catch(e){if(e instanceof Tt.NotFound)return!1;throw e}}async del(e,t,n={}){const o=h.del(...this.getCommonTransformers(n),ke.pathname(`/estore/${e}/items/${t}`));await r.fetch(o).then(mn.ok)}async clear(e,t={}){const n=h.del(...this.getCommonTransformers(t),ke.pathname(`/estore/${e}`));await r.fetch(n).then(mn.ok)}async getAllItemIds(e,t={}){const n=h.get(...this.getCommonTransformers(t),ke.pathname(`/estore/${e}/items`));return await r.fetch(n).then(mn.ok).then(mn.toJSON)}async getAllNamespaces(e={}){const t=h.get(...this.getCommonTransformers(e),ke.pathname("/estore"));return await r.fetch(t).then(mn.ok).then(mn.toJSON)}async stats(e,t={}){const n=h.get(...this.getCommonTransformers(t),ke.pathname(`/estore/${e}/stats`));return await r.fetch(n).then(mn.ok).then(mn.toJSON)}},e.EStoreManager=class{constructor(e){this.options=e,this.JsonSchema=new ua(this.options),this.Blacklist=new la(this.options),this.Whitelist=new da(this.options),this.TokenPolicy=new fa(this.options),this.Token=new ha(this.options)}},e.HTTPClientError=Tt.HTTPClientError,e.HTTPError=mn.HTTPError,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
9
9
|
//# sourceMappingURL=index.umd.min.js.map
|