extra-request 2.3.1 → 3.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/CHANGELOG.md +233 -0
  2. package/LICENSE +1 -1
  3. package/dist/es2015/index.min.mjs +2 -2
  4. package/dist/es2015/index.min.mjs.map +1 -1
  5. package/dist/es2015/index.mjs +48 -63
  6. package/dist/es2015/index.mjs.map +1 -1
  7. package/dist/es2015/index.umd.js +50 -65
  8. package/dist/es2015/index.umd.js.map +1 -1
  9. package/dist/es2015/index.umd.min.js +2 -2
  10. package/dist/es2015/index.umd.min.js.map +1 -1
  11. package/dist/es2018/index.min.mjs +2 -2
  12. package/dist/es2018/index.min.mjs.map +1 -1
  13. package/dist/es2018/index.mjs +48 -63
  14. package/dist/es2018/index.mjs.map +1 -1
  15. package/dist/es2018/index.umd.js +50 -65
  16. package/dist/es2018/index.umd.js.map +1 -1
  17. package/dist/es2018/index.umd.min.js +2 -2
  18. package/dist/es2018/index.umd.min.js.map +1 -1
  19. package/lib/es2015/request.js +1 -1
  20. package/lib/es2015/request.js.map +1 -1
  21. package/lib/es2015/transformers/accept.js +1 -1
  22. package/lib/es2015/transformers/accept.js.map +1 -1
  23. package/lib/es2015/transformers/basic-auth.js +1 -1
  24. package/lib/es2015/transformers/basic-auth.js.map +1 -1
  25. package/lib/es2015/transformers/bearer-auth.js +1 -1
  26. package/lib/es2015/transformers/bearer-auth.js.map +1 -1
  27. package/lib/es2015/transformers/csv.js +2 -2
  28. package/lib/es2015/transformers/csv.js.map +1 -1
  29. package/lib/es2015/transformers/form-data-field.js +2 -1
  30. package/lib/es2015/transformers/form-data-field.js.map +1 -1
  31. package/lib/es2018/request.js +1 -1
  32. package/lib/es2018/request.js.map +1 -1
  33. package/lib/es2018/transformers/accept.js +1 -1
  34. package/lib/es2018/transformers/accept.js.map +1 -1
  35. package/lib/es2018/transformers/basic-auth.js +1 -1
  36. package/lib/es2018/transformers/basic-auth.js.map +1 -1
  37. package/lib/es2018/transformers/bearer-auth.js +1 -1
  38. package/lib/es2018/transformers/bearer-auth.js.map +1 -1
  39. package/lib/es2018/transformers/csv.js +2 -2
  40. package/lib/es2018/transformers/csv.js.map +1 -1
  41. package/lib/es2018/transformers/form-data-field.js +2 -1
  42. package/lib/es2018/transformers/form-data-field.js.map +1 -1
  43. package/package.json +30 -23
@@ -1,8 +1,8 @@
1
- var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t={},n={fetch:void 0};n.fetch=globalThis.fetch.bind(globalThis);var r={Headers:void 0};r.Headers=globalThis.Headers;var i={Request:void 0};i.Request=globalThis.Request;var s={Response:void 0};s.Response=globalThis.Response;var o={FormData:void 0};o.FormData=globalThis.FormData;var a={AbortController:void 0};a.AbortController=globalThis.AbortController;var u={Blob:void 0};u.Blob=globalThis.Blob;var c,f,h,d={};d.EventSource=void 0,d.EventSource=globalThis.EventSource,c=t,f=e&&e.__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]}),(h=e&&e.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||f(t,e,n)})(n,c),h(r,c),h(i,c),h(s,c),h(o,c),h(a,c),h(u,c),h(d,c);var l={},p={};function g(e){return Array.isArray(e)}p.isntEmptyArray=p.isEmptyArray=p.isntArray=p.isArray=void 0,p.isArray=g,p.isntArray=function(e){return!g(e)},p.isEmptyArray=function(e){return 0===e.length},p.isntEmptyArray=function(e){return 0!==e.length};var m={},v={};function y(e){return null===e}v.isntNull=v.isNull=void 0,v.isNull=y,v.isntNull=function(e){return!y(e)};var _={};function b(e){return void 0===e}_.isntUndefined=_.isUndefined=void 0,_.isUndefined=b,_.isntUndefined=function(e){return!b(e)},m.isntAsyncIterable=m.isAsyncIterable=void 0;const w=v,E=_;function R(e){return w.isntNull(e)&&E.isntUndefined(e)&&"function"==typeof e[Symbol.asyncIterator]}m.isAsyncIterable=R,m.isntAsyncIterable=function(e){return!R(e)};var S={};function k(e){return"bigint"==typeof e}S.isntBigInt=S.isBigInt=void 0,S.isBigInt=k,S.isntBigInt=function(e){return!k(e)};var C={};function O(e){return"boolean"==typeof e}C.isntBoolean=C.isBoolean=void 0,C.isBoolean=O,C.isntBoolean=function(e){return!O(e)};var A={},x={};function T(e){return j(e)||I(e)}function j(e){return"string"==typeof e}function I(e){return"object"==typeof e&&e instanceof String}x.isntStringObject=x.isStringObject=x.isntStringPrimitive=x.isStringPrimitive=x.isntString=x.isString=void 0,x.isString=T,x.isntString=function(e){return!T(e)},x.isStringPrimitive=j,x.isntStringPrimitive=function(e){return!j(e)},x.isStringObject=I,x.isntStringObject=function(e){return!I(e)},A.isntCharObject=A.isCharObject=A.isntCharPrimitive=A.isCharPrimitive=A.isntChar=A.isChar=void 0;const D=x;function L(e){return(D.isString(e)||D.isStringObject(e))&&1===e.length}function U(e){return D.isString(e)&&1===e.length}function F(e){return D.isStringObject(e)&&1===e.length}A.isChar=L,A.isntChar=function(e){return!L(e)},A.isCharPrimitive=U,A.isntCharPrimitive=function(e){return!U(e)},A.isCharObject=F,A.isntCharObject=function(e){return!F(e)};var P={};function N(e){return e instanceof Date}P.isntDate=P.isDate=void 0,P.isDate=N,P.isntDate=function(e){return!N(e)};var B={};B.inEnum=void 0,B.inEnum=function(e,t){return Object.values(t).includes(e)};var z={};function J(e){return!e}z.isntFalsy=z.isFalsy=void 0,z.isFalsy=J,z.isntFalsy=function(e){return!J(e)};var q={};function M(e){return"function"==typeof e}q.isntFunction=q.isFunction=void 0,q.isFunction=M,q.isntFunction=function(e){return!M(e)};var H={};H.isntIterable=H.isIterable=void 0;const K=v,W=_;function Q(e){return K.isntNull(e)&&W.isntUndefined(e)&&"function"==typeof e[Symbol.iterator]}H.isIterable=Q,H.isntIterable=function(e){return!Q(e)};var $={},G={};function Z(e){return null!==e&&"object"==typeof e}G.isntEmptyObject=G.isEmptyObject=G.isRecord=G.isntObject=G.isObject=void 0,G.isObject=Z,G.isntObject=function(e){return!Z(e)},G.isRecord=function(e){return Z(e)},G.isEmptyObject=function(e){return 0===Object.keys(e).length},G.isntEmptyObject=function(e){return 0!==Object.keys(e).length};var Y={};function X(e){return"number"==typeof e}Y.isntNumber=Y.isNumber=void 0,Y.isNumber=X,Y.isntNumber=function(e){return!X(e)},$.isntJsonRpcError=$.isJsonRpcError=$.isntJsonRpcSuccess=$.isJsonRpcSuccess=$.isntJsonRpcRequest=$.isJsonRpcRequest=$.isntJsonRpcNotification=$.isJsonRpcNotification=void 0;const V=p,ee=G,te=x,ne=Y,re=_;function ie(e){return te.isString(e)||ne.isNumber(e)}function se(e){return V.isArray(e)||ee.isObject(e)}function oe(e){return ee.isRecord(e)&&te.isString(e.jsonrpc)&&te.isString(e.method)&&re.isUndefined(e.id)&&se(e.params)}function ae(e){return ee.isRecord(e)&&te.isString(e.jsonrpc)&&te.isString(e.method)&&ie(e.id)&&se(e.params)}function ue(e){return ee.isRecord(e)&&te.isString(e.jsonrpc)&&te.isString(e.id)&&re.isntUndefined(e.result)}function ce(e){return ee.isRecord(e)&&te.isString(e.jsonrpc)&&ie(e.id)&&function(e){return ee.isRecord(e)&&ne.isNumber(e.code)&&te.isString(e.message)&&(re.isUndefined(e.data)||ee.isObject(e.data))}(e.error)}$.isJsonRpcNotification=oe,$.isntJsonRpcNotification=function(e){return!oe(e)},$.isJsonRpcRequest=ae,$.isntJsonRpcRequest=function(e){return!ae(e)},$.isJsonRpcSuccess=ue,$.isntJsonRpcSuccess=function(e){return!ue(e)},$.isJsonRpcError=ce,$.isntJsonRpcError=function(e){return!ce(e)};var fe={};fe.isntJson=fe.isJson=void 0,fe.isJson=function(e){try{return JSON.stringify(e),!0}catch(e){return!1}},fe.isntJson=function e(t){return!e()};var he={};function de(...e){return ye("GET",...e)}function le(...e){return ye("HEAD",...e)}function pe(...e){return ye("POST",...e)}function ge(...e){return ye("PUT",...e)}function me(...e){return ye("PATCH",...e)}function ve(...e){return ye("DELETE",...e)}function ye(e,...n){const r=n.reduce(((e,t)=>l.isFunction(t)?t(e):e),{url:new URL("http://localhost"),headers:new t.Headers}),i=new t.Headers(r.headers);return new t.Request(r.url.href,{method:e,headers:i,signal:r.signal,body:r.payload,keepalive:r.keepalive})}function _e(...e){return t=>({...t,url:new URL(e.reduce(((e,t)=>new URL(t,e).href)))})}function be(e){return n=>{const r=new t.Headers(n.headers);return r.set("Content-Type","application/x-www-form-urlencoded"),{...n,headers:r,payload:e}}}function we(e){return n=>{const r=new t.Headers(n.headers);return r.set("Content-Type","application/json"),{...n,headers:r,payload:JSON.stringify(e)}}}he.isAbsoluteURL=void 0,he.isAbsoluteURL=function(e){try{return new URL(e),!0}catch(e){return!1}},function(t){var n=e&&e.__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=e&&e.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(p,t),r(m,t),r(S,t),r(C,t),r(A,t),r(P,t),r(B,t),r(z,t),r(q,t),r(H,t),r($,t),r(fe,t),r(v,t),r(Y,t),r(G,t),r(x,t),r(_,t),r(he,t)}(l);var Ee={exports:{}};
1
+ var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t={},n={fetch:void 0};n.fetch=globalThis.fetch.bind(globalThis);var r={Headers:void 0};r.Headers=globalThis.Headers;var i={Request:void 0};i.Request=globalThis.Request;var s={Response:void 0};s.Response=globalThis.Response;var o={FormData:void 0};o.FormData=globalThis.FormData;var a={AbortController:void 0};a.AbortController=globalThis.AbortController;var u={AbortError:void 0};u.AbortError=globalThis.DOMException;var c={Blob:void 0};c.Blob=globalThis.Blob;var f,h,d,l={};l.EventSource=void 0,l.EventSource=globalThis.EventSource,f=t,h=e&&e.__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]}),(d=e&&e.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||h(t,e,n)})(n,f),d(r,f),d(i,f),d(s,f),d(o,f),d(a,f),d(u,f),d(c,f),d(l,f);var p={},g={};function m(e){return Array.isArray(e)}g.isntEmptyArray=g.isEmptyArray=g.isntArray=g.isArray=void 0,g.isArray=m,g.isntArray=function(e){return!m(e)},g.isEmptyArray=function(e){return 0===e.length},g.isntEmptyArray=function(e){return 0!==e.length};var y={},v={};function _(e){return null===e}v.isntNull=v.isNull=void 0,v.isNull=_,v.isntNull=function(e){return!_(e)};var b={};function E(e){return void 0===e}b.isntUndefined=b.isUndefined=void 0,b.isUndefined=E,b.isntUndefined=function(e){return!E(e)},y.isntAsyncIterable=y.isAsyncIterable=void 0;const w=v,R=b;function k(e){return(0,w.isntNull)(e)&&(0,R.isntUndefined)(e)&&"function"==typeof e[Symbol.asyncIterator]}y.isAsyncIterable=k,y.isntAsyncIterable=function(e){return!k(e)};var S={};function C(e){return"bigint"==typeof e}S.isntBigInt=S.isBigInt=void 0,S.isBigInt=C,S.isntBigInt=function(e){return!C(e)};var O={};function A(e){return"boolean"==typeof e}O.isntBoolean=O.isBoolean=void 0,O.isBoolean=A,O.isntBoolean=function(e){return!A(e)};var x={},T={};function D(e){return"string"==typeof e}T.isntString=T.isString=void 0,T.isString=D,T.isntString=function(e){return!D(e)},x.isntChar=x.isChar=void 0;const I=T;function j(e){return(0,I.isString)(e)&&1===e.length}x.isChar=j,x.isntChar=function(e){return!j(e)};var L={};function U(e){return e instanceof Date}L.isntDate=L.isDate=void 0,L.isDate=U,L.isntDate=function(e){return!U(e)};var F={};F.inEnum=void 0,F.inEnum=function(e,t){return Object.values(t).includes(e)};var N={};function B(e){return e instanceof Error}N.isntError=N.isError=void 0,N.isError=B,N.isntError=function(e){return!B(e)};var P={};function z(e){return!e}P.isntFalsy=P.isFalsy=void 0,P.isFalsy=z,P.isntFalsy=function(e){return!z(e)};var J={};function q(e){return"function"==typeof e}J.isntFunction=J.isFunction=void 0,J.isFunction=q,J.isntFunction=function(e){return!q(e)};var M={};M.isntIterable=M.isIterable=void 0;const H=v,K=b;function W(e){return(0,H.isntNull)(e)&&(0,K.isntUndefined)(e)&&"function"==typeof e[Symbol.iterator]}M.isIterable=W,M.isntIterable=function(e){return!W(e)};var Q={},$={};function G(e){return null!==e&&"object"==typeof e}$.isntEmptyObject=$.isEmptyObject=$.isRecord=$.isntObject=$.isObject=void 0,$.isObject=G,$.isntObject=function(e){return!G(e)},$.isRecord=function(e){return G(e)},$.isEmptyObject=function(e){return 0===Object.keys(e).length},$.isntEmptyObject=function(e){return 0!==Object.keys(e).length};var Z={};function Y(e){return"number"==typeof e}Z.isntNumber=Z.isNumber=void 0,Z.isNumber=Y,Z.isntNumber=function(e){return!Y(e)},Q.isntJsonRpcError=Q.isJsonRpcError=Q.isntJsonRpcSuccess=Q.isJsonRpcSuccess=Q.isntJsonRpcRequest=Q.isJsonRpcRequest=Q.isntJsonRpcNotification=Q.isJsonRpcNotification=void 0;const X=g,V=$,ee=T,te=Z,ne=b;function re(e){return(0,ee.isString)(e)||(0,te.isNumber)(e)}function ie(e){return(0,X.isArray)(e)||(0,V.isObject)(e)}function se(e){return(0,V.isRecord)(e)&&(0,ee.isString)(e.jsonrpc)&&(0,ee.isString)(e.method)&&(0,ne.isUndefined)(e.id)&&ie(e.params)}function oe(e){return(0,V.isRecord)(e)&&(0,ee.isString)(e.jsonrpc)&&(0,ee.isString)(e.method)&&re(e.id)&&ie(e.params)}function ae(e){return(0,V.isRecord)(e)&&(0,ee.isString)(e.jsonrpc)&&(0,ee.isString)(e.id)&&"result"in e}function ue(e){return(0,V.isRecord)(e)&&(0,ee.isString)(e.jsonrpc)&&re(e.id)&&function(e){return(0,V.isRecord)(e)&&(0,te.isNumber)(e.code)&&(0,ee.isString)(e.message)&&((0,ne.isUndefined)(e.data)||(0,V.isObject)(e.data))}(e.error)}Q.isJsonRpcNotification=se,Q.isntJsonRpcNotification=function(e){return!se(e)},Q.isJsonRpcRequest=oe,Q.isntJsonRpcRequest=function(e){return!oe(e)},Q.isJsonRpcSuccess=ae,Q.isntJsonRpcSuccess=function(e){return!ae(e)},Q.isJsonRpcError=ue,Q.isntJsonRpcError=function(e){return!ue(e)};var ce={};ce.isntJson=ce.isJson=void 0,ce.isJson=function(e){try{return JSON.stringify(e),!0}catch(e){return!1}},ce.isntJson=function e(t){return!e()};var fe={};function he(...e){return ye("GET",...e)}function de(...e){return ye("HEAD",...e)}function le(...e){return ye("POST",...e)}function pe(...e){return ye("PUT",...e)}function ge(...e){return ye("PATCH",...e)}function me(...e){return ye("DELETE",...e)}function ye(e,...n){const r=n.reduce(((e,t)=>p.isFunction(t)?t(e):e),{url:new URL("http://localhost"),headers:new t.Headers}),i=new t.Headers(r.headers);return new t.Request(r.url.href,{method:e,headers:i,signal:r.signal,body:r.payload,keepalive:r.keepalive})}function ve(...e){return t=>({...t,url:new URL(e.reduce(((e,t)=>new URL(t,e).href)))})}function _e(e){return n=>{const r=new t.Headers(n.headers);return r.set("Content-Type","application/x-www-form-urlencoded"),{...n,headers:r,payload:e}}}function be(e){return n=>{const r=new t.Headers(n.headers);return r.set("Content-Type","application/json"),{...n,headers:r,payload:JSON.stringify(e)}}}fe.isAbsoluteURL=void 0,fe.isAbsoluteURL=function(e){try{return new URL(e),!0}catch(e){return!1}},function(t){var n=e&&e.__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=e&&e.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(g,t),r(y,t),r(S,t),r(O,t),r(x,t),r(L,t),r(F,t),r(N,t),r(P,t),r(J,t),r(M,t),r(Q,t),r(ce,t),r(v,t),r(Z,t),r($,t),r(T,t),r(b,t),r(fe,t)}(p);var Ee={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
- */Ee.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),i={},s=0,o={parse:function(n,r){var a=(r=r||{}).dynamicTyping||!1;if(w(a)&&(r.dynamicTypingFunction=a,a={}),r.dynamicTyping=a,r.transform=!!w(r.transform)&&r.transform,r.worker&&o.WORKERS_SUPPORTED){var u=function(){if(!o.WORKERS_SUPPORTED)return!1;var n,r,a=(n=t.URL||t.webkitURL||null,r=e.toString(),o.BLOB_URL||(o.BLOB_URL=n.createObjectURL(new Blob(["(",r,")();"],{type:"text/javascript"})))),u=new t.Worker(a);return u.onmessage=m,u.id=s++,i[u.id]=u}();return u.userStep=r.step,u.userChunk=r.chunk,u.userComplete=r.complete,u.userError=r.error,r.step=w(r.step),r.chunk=w(r.chunk),r.complete=w(r.complete),r.error=w(r.error),delete r.worker,void u.postMessage({input:n,config:r,workerId:u.id})}var l=null;return o.NODE_STREAM_INPUT,"string"==typeof n?l=r.download?new c(r):new h(r):!0===n.readable&&w(n.read)&&w(n.on)?l=new d(r):(t.File&&n instanceof File||n instanceof Object)&&(l=new f(r)),l.stream(n)},unparse:function(e,t){var n=!1,r=!0,i=",",s="\r\n",a='"',u=a+a,c=!1,f=null,h=!1;!function(){if("object"==typeof t){if("string"!=typeof t.delimiter||o.BAD_DELIMITERS.filter((function(e){return-1!==t.delimiter.indexOf(e)})).length||(i=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||(c=t.skipEmptyLines),"string"==typeof t.newline&&(s=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");f=t.columns}void 0!==t.escapeChar&&(u=t.escapeChar+a),"boolean"==typeof t.escapeFormulae&&(h=t.escapeFormulae)}}();var d=new RegExp(p(a),"g");if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return l(null,e,c);if("object"==typeof e[0])return l(f||Object.keys(e[0]),e,c)}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])),l(e.fields||[],e.data||[],c);throw new Error("Unable to serialize unrecognized input");function l(e,t,n){var o="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var a=Array.isArray(e)&&0<e.length,u=!Array.isArray(t[0]);if(a&&r){for(var c=0;c<e.length;c++)0<c&&(o+=i),o+=g(e[c],c);0<t.length&&(o+=s)}for(var f=0;f<t.length;f++){var h=a?e.length:t[f].length,d=!1,l=a?0===Object.keys(t[f]).length:0===t[f].length;if(n&&!a&&(d="greedy"===n?""===t[f].join("").trim():1===t[f].length&&0===t[f][0].length),"greedy"===n&&a){for(var p=[],m=0;m<h;m++){var v=u?e[m]:m;p.push(t[f][v])}d=""===p.join("").trim()}if(!d){for(var y=0;y<h;y++){0<y&&!l&&(o+=i);var _=a&&u?e[y]:y;o+=g(t[f][_],y)}f<t.length-1&&(!n||0<h&&!l)&&(o+=s)}}return o}function g(e,t){if(null==e)return"";if(e.constructor===Date)return JSON.stringify(e).slice(1,25);!0===h&&"string"==typeof e&&null!==e.match(/^[=+\-@].*$/)&&(e="'"+e);var r=e.toString().replace(d,u);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,o.BAD_DELIMITERS)||-1<r.indexOf(i)||" "===r.charAt(0)||" "===r.charAt(r.length-1)?a+r+a:r}}};if(o.RECORD_SEP=String.fromCharCode(30),o.UNIT_SEP=String.fromCharCode(31),o.BYTE_ORDER_MARK="\ufeff",o.BAD_DELIMITERS=["\r","\n",'"',o.BYTE_ORDER_MARK],o.WORKERS_SUPPORTED=!n&&!!t.Worker,o.NODE_STREAM_INPUT=1,o.LocalChunkSize=10485760,o.RemoteChunkSize=5242880,o.DefaultDelimiter=",",o.Parser=g,o.ParserHandle=l,o.NetworkStreamer=c,o.FileStreamer=f,o.StringStreamer=h,o.ReadableStreamStreamer=d,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 i=0;i<this.files.length;i++)r.push({file:this.files[i],inputElem:this,instanceConfig:a.extend({},n)})})),i(),this;function i(){if(0!==r.length){var t,n,i,u,c=r[0];if(w(e.before)){var f=e.before(c.file,c.inputElem);if("object"==typeof f){if("abort"===f.action)return t="AbortError",n=c.file,i=c.inputElem,u=f.reason,void(w(e.error)&&e.error({name:t},n,i,u));if("skip"===f.action)return void s();"object"==typeof f.config&&(c.instanceConfig=a.extend(c.instanceConfig,f.config))}else if("skip"===f)return void s()}var h=c.instanceConfig.complete;c.instanceConfig.complete=function(e){w(h)&&h(e,c.file,c.inputElem),s()},o.parse(c.file,c.instanceConfig)}else w(e.complete)&&e.complete()}function s(){r.splice(0,1),i()}}}function u(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=_(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new l(t),(this._handle.streamer=this)._config=t}.call(this,e),this.parseChunk=function(e,n){if(this.isFirstChunk&&w(this._config.beforeFirstChunk)){var i=this._config.beforeFirstChunk(e);void 0!==i&&(e=i)}this.isFirstChunk=!1,this._halted=!1;var s=this._partialLine+e;this._partialLine="";var a=this._handle.parse(s,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var u=a.meta.cursor;this._finished||(this._partialLine=s.substring(u-this._baseIndex),this._baseIndex=u),a&&a.data&&(this._rowCount+=a.data.length);var c=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(r)t.postMessage({results:a,workerId:o.WORKER_ID,finished:c});else if(w(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||!c||!w(this._config.complete)||a&&a.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),c||a&&a.meta.paused||this._nextChunk(),a}this._halted=!0},this._sendError=function(e){w(this._config.error)?this._config.error(e):r&&this._config.error&&t.postMessage({workerId:o.WORKER_ID,error:e,finished:!1})}}function c(e){var t;(e=e||{}).chunkSize||(e.chunkSize=o.RemoteChunkSize),u.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=b(this._chunkLoaded,this),t.onerror=b(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 i=this._start+this._config.chunkSize-1;t.setRequestHeader("Range","bytes="+this._start+"-"+i)}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 f(e){var t,n;(e=e||{}).chunkSize||(e.chunkSize=o.LocalChunkSize),u.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=b(this._chunkLoaded,this),t.onerror=b(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 i=Math.min(this._start+this._config.chunkSize,this._input.size);e=n.call(e,this._start,i)}var s=t.readAsText(e,this._config.encoding);r||this._chunkLoaded({target:{result:s}})},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 h(e){var t;u.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 d(e){u.call(this,e=e||{});var t=[],n=!0,r=!1;this.pause=function(){u.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){u.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=b((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=b((function(e){this._streamCleanUp(),this._sendError(e)}),this),this._streamEnd=b((function(){this._streamCleanUp(),r=!0,this._streamData("")}),this),this._streamCleanUp=b((function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)}),this)}function l(e){var t,n,r,i=Math.pow(2,53),s=-i,a=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,u=/^(\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))$/,c=this,f=0,h=0,d=!1,l=!1,m=[],v={data:[],errors:[],meta:{}};if(w(e.step)){var y=e.step;e.step=function(t){if(v=t,R())E();else{if(E(),0===v.data.length)return;f+=t.data.length,e.preview&&f>e.preview?n.abort():(v.data=v.data[0],y(v,c))}}}function b(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function E(){if(v&&r&&(k("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+o.DefaultDelimiter+"'"),r=!1),e.skipEmptyLines)for(var t=0;t<v.data.length;t++)b(v.data[t])&&v.data.splice(t--,1);return R()&&function(){if(v)if(Array.isArray(v.data[0])){for(var t=0;R()&&t<v.data.length;t++)v.data[t].forEach(n);v.data.splice(0,1)}else v.data.forEach(n);function n(t,n){w(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,i=e.header?{}:[];for(r=0;r<t.length;r++){var s=r,o=t[r];e.header&&(s=r>=m.length?"__parsed_extra":m[r]),e.transform&&(o=e.transform(o,s)),o=S(s,o),"__parsed_extra"===s?(i[s]=i[s]||[],i[s].push(o)):i[s]=o}return e.header&&(r>m.length?k("FieldMismatch","TooManyFields","Too many fields: expected "+m.length+" fields but parsed "+r,h+n):r<m.length&&k("FieldMismatch","TooFewFields","Too few fields: expected "+m.length+" fields but parsed "+r,h+n)),i}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),h+=n,v}()}function R(){return e.header&&0===m.length}function S(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(s<t&&t<i)return!0}return!1}(n)?parseFloat(n):u.test(n)?new Date(n):""===n?null:n):n;var r}function k(e,t,n,r){var i={type:e,code:t,message:n};void 0!==r&&(i.row=r),v.errors.push(i)}this.parse=function(i,s,a){var u=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"),i=e.split("\n"),s=1<i.length&&i[0].length<r[0].length;if(1===r.length||s)return"\n";for(var o=0,a=0;a<r.length;a++)"\n"===r[a][0]&&o++;return o>=r.length/2?"\r\n":"\r"}(i,u)),r=!1,e.delimiter)w(e.delimiter)&&(e.delimiter=e.delimiter(i),v.meta.delimiter=e.delimiter);else{var c=function(t,n,r,i,s){var a,u,c,f;s=s||[",","\t","|",";",o.RECORD_SEP,o.UNIT_SEP];for(var h=0;h<s.length;h++){var d=s[h],l=0,p=0,m=0;c=void 0;for(var v=new g({comments:i,delimiter:d,newline:n,preview:10}).parse(t),y=0;y<v.data.length;y++)if(r&&b(v.data[y]))m++;else{var _=v.data[y].length;p+=_,void 0!==c?0<_&&(l+=Math.abs(_-c),c=_):c=_}0<v.data.length&&(p/=v.data.length-m),(void 0===u||l<=u)&&(void 0===f||f<p)&&1.99<p&&(u=l,a=d,f=p)}return{successful:!!(e.delimiter=a),bestDelimiter:a}}(i,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess);c.successful?e.delimiter=c.bestDelimiter:(r=!0,e.delimiter=o.DefaultDelimiter),v.meta.delimiter=e.delimiter}var f=_(e);return e.preview&&e.header&&f.preview++,t=i,n=new g(f),v=n.parse(t,s,a),E(),d?{meta:{paused:!0}}:v||{meta:{paused:!1}}},this.paused=function(){return d},this.pause=function(){d=!0,n.abort(),t=w(e.chunk)?"":t.substring(n.getCharIndex())},this.resume=function(){c.streamer._halted?(d=!1,c.streamer.parseChunk(t,!0)):setTimeout(c.resume,3)},this.aborted=function(){return l},this.abort=function(){l=!0,n.abort(),v.meta.aborted=!0,w(e.complete)&&e.complete(v),t=""}}function p(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function g(e){var t,n=(e=e||{}).delimiter,r=e.newline,i=e.comments,s=e.step,a=e.preview,u=e.fastMode,c=t=void 0===e.quoteChar?'"':e.quoteChar;if(void 0!==e.escapeChar&&(c=e.escapeChar),("string"!=typeof n||-1<o.BAD_DELIMITERS.indexOf(n))&&(n=","),i===n)throw new Error("Comment character same as delimiter");!0===i?i="#":("string"!=typeof i||-1<o.BAD_DELIMITERS.indexOf(i))&&(i=!1),"\n"!==r&&"\r"!==r&&"\r\n"!==r&&(r="\n");var f=0,h=!1;this.parse=function(e,o,d){if("string"!=typeof e)throw new Error("Input must be a string");var l=e.length,g=n.length,m=r.length,v=i.length,y=w(s),_=[],b=[],E=[],R=f=0;if(!e)return F();if(u||!1!==u&&-1===e.indexOf(t)){for(var S=e.split(r),k=0;k<S.length;k++){if(E=S[k],f+=E.length,k!==S.length-1)f+=r.length;else if(d)return F();if(!i||E.substring(0,v)!==i){if(y){if(_=[],I(E.split(n)),P(),h)return F()}else I(E.split(n));if(a&&a<=k)return _=_.slice(0,a),F(!0)}}return F()}for(var C=e.indexOf(n,f),O=e.indexOf(r,f),A=new RegExp(p(c)+p(t),"g"),x=e.indexOf(t,f);;)if(e[f]!==t)if(i&&0===E.length&&e.substring(f,f+v)===i){if(-1===O)return F();f=O+m,O=e.indexOf(r,f),C=e.indexOf(n,f)}else if(-1!==C&&(C<O||-1===O))E.push(e.substring(f,C)),f=C+g,C=e.indexOf(n,f);else{if(-1===O)break;if(E.push(e.substring(f,O)),U(O+m),y&&(P(),h))return F();if(a&&_.length>=a)return F(!0)}else for(x=f,f++;;){if(-1===(x=e.indexOf(t,x+1)))return d||b.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:_.length,index:f}),L();if(x===l-1)return L(e.substring(f,x).replace(A,t));if(t!==c||e[x+1]!==c){if(t===c||0===x||e[x-1]!==c){-1!==C&&C<x+1&&(C=e.indexOf(n,x+1)),-1!==O&&O<x+1&&(O=e.indexOf(r,x+1));var T=D(-1===O?C:Math.min(C,O));if(e[x+1+T]===n){E.push(e.substring(f,x).replace(A,t)),e[f=x+1+T+g]!==t&&(x=e.indexOf(t,f)),C=e.indexOf(n,f),O=e.indexOf(r,f);break}var j=D(O);if(e.substring(x+1+j,x+1+j+m)===r){if(E.push(e.substring(f,x).replace(A,t)),U(x+1+j+m),C=e.indexOf(n,f),x=e.indexOf(t,f),y&&(P(),h))return F();if(a&&_.length>=a)return F(!0);break}b.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:_.length,index:f}),x++}}else x++}return L();function I(e){_.push(e),R=f}function D(t){var n=0;if(-1!==t){var r=e.substring(x+1,t);r&&""===r.trim()&&(n=r.length)}return n}function L(t){return d||(void 0===t&&(t=e.substring(f)),E.push(t),f=l,I(E),y&&P()),F()}function U(t){f=t,I(E),E=[],O=e.indexOf(r,f)}function F(e){return{data:_,errors:b,meta:{delimiter:n,linebreak:r,aborted:h,truncated:!!e,cursor:R+(o||0)}}}function P(){s(F()),_=[],b=[]}},this.abort=function(){h=!0},this.getCharIndex=function(){return f}}function m(e){var t=e.data,n=i[t.workerId],r=!1;if(t.error)n.userError(t.error,t.file);else if(t.results&&t.results.data){var s={abort:function(){r=!0,v(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:y,resume:y};if(w(n.userStep)){for(var o=0;o<t.results.data.length&&(n.userStep({data:t.results.data[o],errors:t.results.errors,meta:t.results.meta},s),!r);o++);delete t.results}else w(n.userChunk)&&(n.userChunk(t.results,s,t.file),delete t.results)}t.finished&&!r&&v(t.workerId,t.results)}function v(e,t){var n=i[e];w(n.userComplete)&&n.userComplete(t),n.terminate(),delete i[e]}function y(){throw new Error("Not implemented.")}function _(e){if("object"!=typeof e||null===e)return e;var t=Array.isArray(e)?[]:{};for(var n in e)t[n]=_(e[n]);return t}function b(e,t){return function(){e.apply(t,arguments)}}function w(e){return"function"==typeof e}return r&&(t.onmessage=function(e){var n=e.data;if(void 0===o.WORKER_ID&&n&&(o.WORKER_ID=n.workerId),"string"==typeof n.input)t.postMessage({workerId:o.WORKER_ID,results:o.parse(n.input,n.config),finished:!0});else if(t.File&&n.input instanceof File||n.input instanceof Object){var r=o.parse(n.input,n.config);r&&t.postMessage({workerId:o.WORKER_ID,results:r,finished:!0})}}),(c.prototype=Object.create(u.prototype)).constructor=c,(f.prototype=Object.create(u.prototype)).constructor=f,(h.prototype=Object.create(h.prototype)).constructor=h,(d.prototype=Object.create(u.prototype)).constructor=d,o}();var Re={},Se={CustomError:void 0};class ke extends Error{get name(){return this.constructor.name}}Se.CustomError=ke;var Ce={ExpectedError:void 0};const Oe=Se;class Ae extends Oe.CustomError{}Ce.ExpectedError=Ae;var xe={AssertionError:void 0};const Te=Se;class je extends Te.CustomError{}xe.AssertionError=je;var Ie={};Ie.normalize=void 0,Ie.normalize=function(e){var t;return{name:e.name,message:e.message,stack:null!==(t=e.stack)&&void 0!==t?t:null}};var De={refute:void 0};const Le=Ce;De.refute=function(e,t){if(e)throw new Le.ExpectedError(t)};var Ue={assert:void 0};const Fe=xe;function Pe(e){return Re.assert(e.length>0,"payload must be a non-empty array"),n=>{const r=new t.Headers(n.headers);return r.set("Content-Type","text/csv"),{...n,headers:r,payload:Ne(e)}}}function Ne(e){const t=Object.keys(e[0]);return Ee.exports.unparse({data:e,fields:t})}function Be(e){return t=>({...t,signal:e})}function ze(e,n){return r=>{const i=new t.Headers(r.headers);return i.set(e,n),{...r,headers:i}}}function Je(e,n){return r=>{const i=new t.Headers(r.headers);return i.append(e,n),{...r,headers:i}}}function qe(e){return n=>{const r=new t.Headers(n.headers);for(const[t,n]of Object.entries(e))r.set(t,n);return{...n,headers:r}}}function Me(e){return Je("Accept",e)}function He(e){return t=>{const n=new URL(t.url.href);return n.host=e,{...t,url:n}}}function Ke(e){return t=>{const n=new URL(t.url.href);return n.port=e.toString(),{...t,url:n}}}function We(e){return t=>{const n=new URL(t.url.href);return n.pathname=e,{...t,url:n}}}function Qe(e){return t=>{const n=new URL(t.url.href);return n.search=e,{...t,url:n}}}function $e(e,t){return n=>{const r=new URL(n.url.href),i=new URLSearchParams(r.searchParams);return i.set(e,t.toString()),r.search=i.toString(),{...n,url:r}}}function Ge(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}}}function Ze(e,t){return n=>{const r=new URL(n.url.href),i=new URLSearchParams(r.searchParams);return i.append(e,t.toString()),r.search=i.toString(),{...n,url:r}}}function Ye(e,n){return r=>{const i=r.payload instanceof t.FormData?function(e){const n=new t.FormData;for(const[t,r]of e.entries())n.append(t,r);return n}(r.payload):new t.FormData;return Array.isArray(n)?n.forEach((t=>i.append(e,t))):i.append(e,n),{...r,payload:i}}}Ue.assert=function(e,t){if(!e)throw new Fe.AssertionError(t)},function(t){var n=e&&e.__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=e&&e.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(Se,t),r(Ce,t),r(xe,t),r(Ie,t),r(De,t),r(Ue,t)}(Re);const Xe="function"==typeof btoa,Ve="function"==typeof Buffer;"function"==typeof TextDecoder&&new TextDecoder,"function"==typeof TextEncoder&&new TextEncoder;const et=[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="];(e=>{let t={};et.forEach(((e,n)=>t[e]=n))})(),String.fromCharCode.bind(String),"function"==typeof Uint8Array.from&&Uint8Array.from.bind(Uint8Array);const tt=Xe?e=>btoa(e):Ve?e=>Buffer.from(e,"binary").toString("base64"):e=>{let t,n,r,i,s="";const o=e.length%3;for(let o=0;o<e.length;){if((n=e.charCodeAt(o++))>255||(r=e.charCodeAt(o++))>255||(i=e.charCodeAt(o++))>255)throw new TypeError("invalid character found");t=n<<16|r<<8|i,s+=et[t>>18&63]+et[t>>12&63]+et[t>>6&63]+et[63&t]}return o?s.slice(0,o-3)+"===".substring(o):s};function nt(e,t){return ze("Authorization","Basic "+tt(`${e}:${t}`))}function rt(e){return ze("Authorization",`Bearer ${e}`)}function it(e=!0){return t=>({...t,keepalive:e})}export{Me as accept,Je as appendHeader,Ze as appendSearchParam,nt as basicAuth,rt as bearerAuth,Pe as csv,ve as del,Ye as formDataField,de as get,le as head,ze as header,qe as headers,He as host,we as json,it as keepalive,me as patch,We as pathname,Ke as port,pe as post,ge as put,Qe as search,$e as searchParam,Ge as searchParams,Be as signal,be as text,_e as url};
7
+ */Ee.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),i={},s=0,o={parse:function(n,r){var a=(r=r||{}).dynamicTyping||!1;if(E(a)&&(r.dynamicTypingFunction=a,a={}),r.dynamicTyping=a,r.transform=!!E(r.transform)&&r.transform,r.worker&&o.WORKERS_SUPPORTED){var u=function(){if(!o.WORKERS_SUPPORTED)return!1;var n,r,a=(n=t.URL||t.webkitURL||null,r=e.toString(),o.BLOB_URL||(o.BLOB_URL=n.createObjectURL(new Blob(["(",r,")();"],{type:"text/javascript"})))),u=new t.Worker(a);return u.onmessage=m,u.id=s++,i[u.id]=u}();return u.userStep=r.step,u.userChunk=r.chunk,u.userComplete=r.complete,u.userError=r.error,r.step=E(r.step),r.chunk=E(r.chunk),r.complete=E(r.complete),r.error=E(r.error),delete r.worker,void u.postMessage({input:n,config:r,workerId:u.id})}var l=null;return o.NODE_STREAM_INPUT,"string"==typeof n?l=r.download?new c(r):new h(r):!0===n.readable&&E(n.read)&&E(n.on)?l=new d(r):(t.File&&n instanceof File||n instanceof Object)&&(l=new f(r)),l.stream(n)},unparse:function(e,t){var n=!1,r=!0,i=",",s="\r\n",a='"',u=a+a,c=!1,f=null,h=!1;!function(){if("object"==typeof t){if("string"!=typeof t.delimiter||o.BAD_DELIMITERS.filter((function(e){return-1!==t.delimiter.indexOf(e)})).length||(i=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||(c=t.skipEmptyLines),"string"==typeof t.newline&&(s=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");f=t.columns}void 0!==t.escapeChar&&(u=t.escapeChar+a),"boolean"==typeof t.escapeFormulae&&(h=t.escapeFormulae)}}();var d=new RegExp(p(a),"g");if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return l(null,e,c);if("object"==typeof e[0])return l(f||Object.keys(e[0]),e,c)}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])),l(e.fields||[],e.data||[],c);throw new Error("Unable to serialize unrecognized input");function l(e,t,n){var o="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var a=Array.isArray(e)&&0<e.length,u=!Array.isArray(t[0]);if(a&&r){for(var c=0;c<e.length;c++)0<c&&(o+=i),o+=g(e[c],c);0<t.length&&(o+=s)}for(var f=0;f<t.length;f++){var h=a?e.length:t[f].length,d=!1,l=a?0===Object.keys(t[f]).length:0===t[f].length;if(n&&!a&&(d="greedy"===n?""===t[f].join("").trim():1===t[f].length&&0===t[f][0].length),"greedy"===n&&a){for(var p=[],m=0;m<h;m++){var y=u?e[m]:m;p.push(t[f][y])}d=""===p.join("").trim()}if(!d){for(var v=0;v<h;v++){0<v&&!l&&(o+=i);var _=a&&u?e[v]:v;o+=g(t[f][_],v)}f<t.length-1&&(!n||0<h&&!l)&&(o+=s)}}return o}function g(e,t){if(null==e)return"";if(e.constructor===Date)return JSON.stringify(e).slice(1,25);!0===h&&"string"==typeof e&&null!==e.match(/^[=+\-@].*$/)&&(e="'"+e);var r=e.toString().replace(d,u);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,o.BAD_DELIMITERS)||-1<r.indexOf(i)||" "===r.charAt(0)||" "===r.charAt(r.length-1)?a+r+a:r}}};if(o.RECORD_SEP=String.fromCharCode(30),o.UNIT_SEP=String.fromCharCode(31),o.BYTE_ORDER_MARK="\ufeff",o.BAD_DELIMITERS=["\r","\n",'"',o.BYTE_ORDER_MARK],o.WORKERS_SUPPORTED=!n&&!!t.Worker,o.NODE_STREAM_INPUT=1,o.LocalChunkSize=10485760,o.RemoteChunkSize=5242880,o.DefaultDelimiter=",",o.Parser=g,o.ParserHandle=l,o.NetworkStreamer=c,o.FileStreamer=f,o.StringStreamer=h,o.ReadableStreamStreamer=d,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 i=0;i<this.files.length;i++)r.push({file:this.files[i],inputElem:this,instanceConfig:a.extend({},n)})})),i(),this;function i(){if(0!==r.length){var t,n,i,u,c=r[0];if(E(e.before)){var f=e.before(c.file,c.inputElem);if("object"==typeof f){if("abort"===f.action)return t="AbortError",n=c.file,i=c.inputElem,u=f.reason,void(E(e.error)&&e.error({name:t},n,i,u));if("skip"===f.action)return void s();"object"==typeof f.config&&(c.instanceConfig=a.extend(c.instanceConfig,f.config))}else if("skip"===f)return void s()}var h=c.instanceConfig.complete;c.instanceConfig.complete=function(e){E(h)&&h(e,c.file,c.inputElem),s()},o.parse(c.file,c.instanceConfig)}else E(e.complete)&&e.complete()}function s(){r.splice(0,1),i()}}}function u(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=_(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new l(t),(this._handle.streamer=this)._config=t}.call(this,e),this.parseChunk=function(e,n){if(this.isFirstChunk&&E(this._config.beforeFirstChunk)){var i=this._config.beforeFirstChunk(e);void 0!==i&&(e=i)}this.isFirstChunk=!1,this._halted=!1;var s=this._partialLine+e;this._partialLine="";var a=this._handle.parse(s,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var u=a.meta.cursor;this._finished||(this._partialLine=s.substring(u-this._baseIndex),this._baseIndex=u),a&&a.data&&(this._rowCount+=a.data.length);var c=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(r)t.postMessage({results:a,workerId:o.WORKER_ID,finished:c});else if(E(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||!c||!E(this._config.complete)||a&&a.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),c||a&&a.meta.paused||this._nextChunk(),a}this._halted=!0},this._sendError=function(e){E(this._config.error)?this._config.error(e):r&&this._config.error&&t.postMessage({workerId:o.WORKER_ID,error:e,finished:!1})}}function c(e){var t;(e=e||{}).chunkSize||(e.chunkSize=o.RemoteChunkSize),u.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=b(this._chunkLoaded,this),t.onerror=b(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 i=this._start+this._config.chunkSize-1;t.setRequestHeader("Range","bytes="+this._start+"-"+i)}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 f(e){var t,n;(e=e||{}).chunkSize||(e.chunkSize=o.LocalChunkSize),u.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=b(this._chunkLoaded,this),t.onerror=b(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 i=Math.min(this._start+this._config.chunkSize,this._input.size);e=n.call(e,this._start,i)}var s=t.readAsText(e,this._config.encoding);r||this._chunkLoaded({target:{result:s}})},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 h(e){var t;u.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 d(e){u.call(this,e=e||{});var t=[],n=!0,r=!1;this.pause=function(){u.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){u.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=b((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=b((function(e){this._streamCleanUp(),this._sendError(e)}),this),this._streamEnd=b((function(){this._streamCleanUp(),r=!0,this._streamData("")}),this),this._streamCleanUp=b((function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)}),this)}function l(e){var t,n,r,i=Math.pow(2,53),s=-i,a=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,u=/^(\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))$/,c=this,f=0,h=0,d=!1,l=!1,m=[],y={data:[],errors:[],meta:{}};if(E(e.step)){var v=e.step;e.step=function(t){if(y=t,R())w();else{if(w(),0===y.data.length)return;f+=t.data.length,e.preview&&f>e.preview?n.abort():(y.data=y.data[0],v(y,c))}}}function b(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function w(){if(y&&r&&(S("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+o.DefaultDelimiter+"'"),r=!1),e.skipEmptyLines)for(var t=0;t<y.data.length;t++)b(y.data[t])&&y.data.splice(t--,1);return R()&&function(){if(y)if(Array.isArray(y.data[0])){for(var t=0;R()&&t<y.data.length;t++)y.data[t].forEach(n);y.data.splice(0,1)}else y.data.forEach(n);function n(t,n){E(e.transformHeader)&&(t=e.transformHeader(t,n)),m.push(t)}}(),function(){if(!y||!e.header&&!e.dynamicTyping&&!e.transform)return y;function t(t,n){var r,i=e.header?{}:[];for(r=0;r<t.length;r++){var s=r,o=t[r];e.header&&(s=r>=m.length?"__parsed_extra":m[r]),e.transform&&(o=e.transform(o,s)),o=k(s,o),"__parsed_extra"===s?(i[s]=i[s]||[],i[s].push(o)):i[s]=o}return e.header&&(r>m.length?S("FieldMismatch","TooManyFields","Too many fields: expected "+m.length+" fields but parsed "+r,h+n):r<m.length&&S("FieldMismatch","TooFewFields","Too few fields: expected "+m.length+" fields but parsed "+r,h+n)),i}var n=1;return!y.data.length||Array.isArray(y.data[0])?(y.data=y.data.map(t),n=y.data.length):y.data=t(y.data,0),e.header&&y.meta&&(y.meta.fields=m),h+=n,y}()}function R(){return e.header&&0===m.length}function k(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(s<t&&t<i)return!0}return!1}(n)?parseFloat(n):u.test(n)?new Date(n):""===n?null:n):n;var r}function S(e,t,n,r){var i={type:e,code:t,message:n};void 0!==r&&(i.row=r),y.errors.push(i)}this.parse=function(i,s,a){var u=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"),i=e.split("\n"),s=1<i.length&&i[0].length<r[0].length;if(1===r.length||s)return"\n";for(var o=0,a=0;a<r.length;a++)"\n"===r[a][0]&&o++;return o>=r.length/2?"\r\n":"\r"}(i,u)),r=!1,e.delimiter)E(e.delimiter)&&(e.delimiter=e.delimiter(i),y.meta.delimiter=e.delimiter);else{var c=function(t,n,r,i,s){var a,u,c,f;s=s||[",","\t","|",";",o.RECORD_SEP,o.UNIT_SEP];for(var h=0;h<s.length;h++){var d=s[h],l=0,p=0,m=0;c=void 0;for(var y=new g({comments:i,delimiter:d,newline:n,preview:10}).parse(t),v=0;v<y.data.length;v++)if(r&&b(y.data[v]))m++;else{var _=y.data[v].length;p+=_,void 0!==c?0<_&&(l+=Math.abs(_-c),c=_):c=_}0<y.data.length&&(p/=y.data.length-m),(void 0===u||l<=u)&&(void 0===f||f<p)&&1.99<p&&(u=l,a=d,f=p)}return{successful:!!(e.delimiter=a),bestDelimiter:a}}(i,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess);c.successful?e.delimiter=c.bestDelimiter:(r=!0,e.delimiter=o.DefaultDelimiter),y.meta.delimiter=e.delimiter}var f=_(e);return e.preview&&e.header&&f.preview++,t=i,n=new g(f),y=n.parse(t,s,a),w(),d?{meta:{paused:!0}}:y||{meta:{paused:!1}}},this.paused=function(){return d},this.pause=function(){d=!0,n.abort(),t=E(e.chunk)?"":t.substring(n.getCharIndex())},this.resume=function(){c.streamer._halted?(d=!1,c.streamer.parseChunk(t,!0)):setTimeout(c.resume,3)},this.aborted=function(){return l},this.abort=function(){l=!0,n.abort(),y.meta.aborted=!0,E(e.complete)&&e.complete(y),t=""}}function p(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function g(e){var t,n=(e=e||{}).delimiter,r=e.newline,i=e.comments,s=e.step,a=e.preview,u=e.fastMode,c=t=void 0===e.quoteChar?'"':e.quoteChar;if(void 0!==e.escapeChar&&(c=e.escapeChar),("string"!=typeof n||-1<o.BAD_DELIMITERS.indexOf(n))&&(n=","),i===n)throw new Error("Comment character same as delimiter");!0===i?i="#":("string"!=typeof i||-1<o.BAD_DELIMITERS.indexOf(i))&&(i=!1),"\n"!==r&&"\r"!==r&&"\r\n"!==r&&(r="\n");var f=0,h=!1;this.parse=function(e,o,d){if("string"!=typeof e)throw new Error("Input must be a string");var l=e.length,g=n.length,m=r.length,y=i.length,v=E(s),_=[],b=[],w=[],R=f=0;if(!e)return F();if(u||!1!==u&&-1===e.indexOf(t)){for(var k=e.split(r),S=0;S<k.length;S++){if(w=k[S],f+=w.length,S!==k.length-1)f+=r.length;else if(d)return F();if(!i||w.substring(0,y)!==i){if(v){if(_=[],I(w.split(n)),N(),h)return F()}else I(w.split(n));if(a&&a<=S)return _=_.slice(0,a),F(!0)}}return F()}for(var C=e.indexOf(n,f),O=e.indexOf(r,f),A=new RegExp(p(c)+p(t),"g"),x=e.indexOf(t,f);;)if(e[f]!==t)if(i&&0===w.length&&e.substring(f,f+y)===i){if(-1===O)return F();f=O+m,O=e.indexOf(r,f),C=e.indexOf(n,f)}else if(-1!==C&&(C<O||-1===O))w.push(e.substring(f,C)),f=C+g,C=e.indexOf(n,f);else{if(-1===O)break;if(w.push(e.substring(f,O)),U(O+m),v&&(N(),h))return F();if(a&&_.length>=a)return F(!0)}else for(x=f,f++;;){if(-1===(x=e.indexOf(t,x+1)))return d||b.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:_.length,index:f}),L();if(x===l-1)return L(e.substring(f,x).replace(A,t));if(t!==c||e[x+1]!==c){if(t===c||0===x||e[x-1]!==c){-1!==C&&C<x+1&&(C=e.indexOf(n,x+1)),-1!==O&&O<x+1&&(O=e.indexOf(r,x+1));var T=j(-1===O?C:Math.min(C,O));if(e[x+1+T]===n){w.push(e.substring(f,x).replace(A,t)),e[f=x+1+T+g]!==t&&(x=e.indexOf(t,f)),C=e.indexOf(n,f),O=e.indexOf(r,f);break}var D=j(O);if(e.substring(x+1+D,x+1+D+m)===r){if(w.push(e.substring(f,x).replace(A,t)),U(x+1+D+m),C=e.indexOf(n,f),x=e.indexOf(t,f),v&&(N(),h))return F();if(a&&_.length>=a)return F(!0);break}b.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:_.length,index:f}),x++}}else x++}return L();function I(e){_.push(e),R=f}function j(t){var n=0;if(-1!==t){var r=e.substring(x+1,t);r&&""===r.trim()&&(n=r.length)}return n}function L(t){return d||(void 0===t&&(t=e.substring(f)),w.push(t),f=l,I(w),v&&N()),F()}function U(t){f=t,I(w),w=[],O=e.indexOf(r,f)}function F(e){return{data:_,errors:b,meta:{delimiter:n,linebreak:r,aborted:h,truncated:!!e,cursor:R+(o||0)}}}function N(){s(F()),_=[],b=[]}},this.abort=function(){h=!0},this.getCharIndex=function(){return f}}function m(e){var t=e.data,n=i[t.workerId],r=!1;if(t.error)n.userError(t.error,t.file);else if(t.results&&t.results.data){var s={abort:function(){r=!0,y(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:v,resume:v};if(E(n.userStep)){for(var o=0;o<t.results.data.length&&(n.userStep({data:t.results.data[o],errors:t.results.errors,meta:t.results.meta},s),!r);o++);delete t.results}else E(n.userChunk)&&(n.userChunk(t.results,s,t.file),delete t.results)}t.finished&&!r&&y(t.workerId,t.results)}function y(e,t){var n=i[e];E(n.userComplete)&&n.userComplete(t),n.terminate(),delete i[e]}function v(){throw new Error("Not implemented.")}function _(e){if("object"!=typeof e||null===e)return e;var t=Array.isArray(e)?[]:{};for(var n in e)t[n]=_(e[n]);return t}function b(e,t){return function(){e.apply(t,arguments)}}function E(e){return"function"==typeof e}return r&&(t.onmessage=function(e){var n=e.data;if(void 0===o.WORKER_ID&&n&&(o.WORKER_ID=n.workerId),"string"==typeof n.input)t.postMessage({workerId:o.WORKER_ID,results:o.parse(n.input,n.config),finished:!0});else if(t.File&&n.input instanceof File||n.input instanceof Object){var r=o.parse(n.input,n.config);r&&t.postMessage({workerId:o.WORKER_ID,results:r,finished:!0})}}),(c.prototype=Object.create(u.prototype)).constructor=c,(f.prototype=Object.create(u.prototype)).constructor=f,(h.prototype=Object.create(h.prototype)).constructor=h,(d.prototype=Object.create(u.prototype)).constructor=d,o}();var we={},Re={CustomError:void 0};class ke extends Error{get name(){return this.constructor.name}}Re.CustomError=ke;var Se={ExpectedError:void 0};const Ce=Re;class Oe extends Ce.CustomError{}Se.ExpectedError=Oe;var Ae={AssertionError:void 0};const xe=Re;class Te extends xe.CustomError{}Ae.AssertionError=Te;var De={};De.normalize=void 0,De.normalize=function(e){var t;return{name:e.name,message:e.message,stack:null!==(t=e.stack)&&void 0!==t?t:null}};var Ie={refute:void 0};const je=Se;Ie.refute=function(e,t){if(e)throw new je.ExpectedError(t)};var Le={assert:void 0};const Ue=Ae;function Fe(e){return we.assert(e.length>0,"payload must be a non-empty array"),n=>{const r=new t.Headers(n.headers);return r.set("Content-Type","text/csv"),{...n,headers:r,payload:Ne(e)}}}function Ne(e){const t=Object.keys(e[0]);return Ee.exports.unparse({data:e,fields:t})}function Be(e){return t=>({...t,signal:e})}function Pe(e,n){return r=>{const i=new t.Headers(r.headers);return i.set(e,n),{...r,headers:i}}}function ze(e,n){return r=>{const i=new t.Headers(r.headers);return i.append(e,n),{...r,headers:i}}}function Je(e){return n=>{const r=new t.Headers(n.headers);for(const[t,n]of Object.entries(e))r.set(t,n);return{...n,headers:r}}}function qe(e){return ze("Accept",e)}function Me(e){return t=>{const n=new URL(t.url.href);return n.host=e,{...t,url:n}}}function He(e){return t=>{const n=new URL(t.url.href);return n.port=e.toString(),{...t,url:n}}}function Ke(e){return t=>{const n=new URL(t.url.href);return n.pathname=e,{...t,url:n}}}function We(e){return t=>{const n=new URL(t.url.href);return n.search=e,{...t,url:n}}}function Qe(e,t){return n=>{const r=new URL(n.url.href),i=new URLSearchParams(r.searchParams);return i.set(e,t.toString()),r.search=i.toString(),{...n,url:r}}}function $e(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}}}function Ge(e,t){return n=>{const r=new URL(n.url.href),i=new URLSearchParams(r.searchParams);return i.append(e,t.toString()),r.search=i.toString(),{...n,url:r}}}function Ze(e,n){return r=>{const i=r.payload instanceof t.FormData?function(e){const n=new t.FormData;for(const[t,r]of e.entries())n.append(t,r);return n}(r.payload):new t.FormData;return p.isArray(n)?n.forEach((t=>i.append(e,t))):i.append(e,n),{...r,payload:i}}}Le.assert=function(e,t){if(!e)throw new Ue.AssertionError(t)},function(t){var n=e&&e.__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=e&&e.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(Re,t),r(Se,t),r(Ae,t),r(De,t),r(Ie,t),r(Le,t)}(we);const Ye="function"==typeof btoa,Xe="function"==typeof Buffer;"function"==typeof TextDecoder&&new TextDecoder,"function"==typeof TextEncoder&&new TextEncoder;const Ve=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=");(e=>{let t={};Ve.forEach(((e,n)=>t[e]=n))})(),String.fromCharCode.bind(String),"function"==typeof Uint8Array.from&&Uint8Array.from.bind(Uint8Array);const et=Ye?e=>btoa(e):Xe?e=>Buffer.from(e,"binary").toString("base64"):e=>{let t,n,r,i,s="";const o=e.length%3;for(let o=0;o<e.length;){if((n=e.charCodeAt(o++))>255||(r=e.charCodeAt(o++))>255||(i=e.charCodeAt(o++))>255)throw new TypeError("invalid character found");t=n<<16|r<<8|i,s+=Ve[t>>18&63]+Ve[t>>12&63]+Ve[t>>6&63]+Ve[63&t]}return o?s.slice(0,o-3)+"===".substring(o):s};function tt(e,t){return Pe("Authorization","Basic "+et(`${e}:${t}`))}function nt(e){return Pe("Authorization",`Bearer ${e}`)}function rt(e=!0){return t=>({...t,keepalive:e})}export{qe as accept,ze as appendHeader,Ge as appendSearchParam,tt as basicAuth,nt as bearerAuth,Fe as csv,me as del,Ze as formDataField,he as get,de as head,Pe as header,Je as headers,Me as host,be as json,rt as keepalive,ge as patch,Ke as pathname,He as port,le as post,pe as put,We as search,Qe as searchParam,$e as searchParams,Be as signal,_e as text,ve as url};
8
8
  //# sourceMappingURL=index.min.mjs.map